]> granicus.if.org Git - postgresql/blob - configure
Move pgrminclude debug code to be more effective.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.2devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 2003 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright (c) 1996-2006, PostgreSQL Global Development Group
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248 # Name of the host.
249 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
250 # so uname gets run too.
251 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252
253 exec 6>&1
254
255 #
256 # Initializations.
257 #
258 ac_default_prefix=/usr/local
259 ac_config_libobj_dir=.
260 cross_compiling=no
261 subdirs=
262 MFLAGS=
263 MAKEFLAGS=
264 SHELL=${CONFIG_SHELL-/bin/sh}
265
266 # Maximum number of lines to put in a shell here document.
267 # This variable seems obsolete.  It should probably be removed, and
268 # only ac_max_sed_lines should be used.
269 : ${ac_max_here_lines=38}
270
271 # Identity of this package.
272 PACKAGE_NAME='PostgreSQL'
273 PACKAGE_TARNAME='postgresql'
274 PACKAGE_VERSION='8.2devel'
275 PACKAGE_STRING='PostgreSQL 8.2devel'
276 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
277
278 ac_unique_file="src/backend/access/common/heaptuple.c"
279 ac_default_prefix=/usr/local/pgsql
280 # Factoring default headers for most tests.
281 ac_includes_default="\
282 #include <stdio.h>
283 #if HAVE_SYS_TYPES_H
284 # include <sys/types.h>
285 #endif
286 #if HAVE_SYS_STAT_H
287 # include <sys/stat.h>
288 #endif
289 #if STDC_HEADERS
290 # include <stdlib.h>
291 # include <stddef.h>
292 #else
293 # if HAVE_STDLIB_H
294 #  include <stdlib.h>
295 # endif
296 #endif
297 #if HAVE_STRING_H
298 # if !STDC_HEADERS && HAVE_MEMORY_H
299 #  include <memory.h>
300 # endif
301 # include <string.h>
302 #endif
303 #if HAVE_STRINGS_H
304 # include <strings.h>
305 #endif
306 #if HAVE_INTTYPES_H
307 # include <inttypes.h>
308 #else
309 # if HAVE_STDINT_H
310 #  include <stdint.h>
311 # endif
312 #endif
313 #if HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif"
316
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_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 HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318 ac_subst_files=''
319
320 # Initialize some variables set by options.
321 ac_init_help=
322 ac_init_version=false
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 cache_file=/dev/null
326 exec_prefix=NONE
327 no_create=
328 no_recursion=
329 prefix=NONE
330 program_prefix=NONE
331 program_suffix=NONE
332 program_transform_name=s,x,x,
333 silent=
334 site=
335 srcdir=
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339
340 # Installation directory options.
341 # These are left unexpanded so users can "make install exec_prefix=/foo"
342 # and all the variables that are supposed to be based on exec_prefix
343 # by default will actually change.
344 # Use braces instead of parens because sh, perl, etc. also accept them.
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 ac_prev=
359 for ac_option
360 do
361   # If the previous option needs an argument, assign it.
362   if test -n "$ac_prev"; then
363     eval "$ac_prev=\$ac_option"
364     ac_prev=
365     continue
366   fi
367
368   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
369
370   # Accept the important Cygnus configure options, so we can diagnose typos.
371
372   case $ac_option in
373
374   -bindir | --bindir | --bindi | --bind | --bin | --bi)
375     ac_prev=bindir ;;
376   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
377     bindir=$ac_optarg ;;
378
379   -build | --build | --buil | --bui | --bu)
380     ac_prev=build_alias ;;
381   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
382     build_alias=$ac_optarg ;;
383
384   -cache-file | --cache-file | --cache-fil | --cache-fi \
385   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
386     ac_prev=cache_file ;;
387   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
388   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
389     cache_file=$ac_optarg ;;
390
391   --config-cache | -C)
392     cache_file=config.cache ;;
393
394   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
395     ac_prev=datadir ;;
396   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
397   | --da=*)
398     datadir=$ac_optarg ;;
399
400   -disable-* | --disable-*)
401     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
405    { (exit 1); exit 1; }; }
406     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
407     eval "enable_$ac_feature=no" ;;
408
409   -enable-* | --enable-*)
410     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
414    { (exit 1); exit 1; }; }
415     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
416     case $ac_option in
417       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418       *) ac_optarg=yes ;;
419     esac
420     eval "enable_$ac_feature='$ac_optarg'" ;;
421
422   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
423   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
424   | --exec | --exe | --ex)
425     ac_prev=exec_prefix ;;
426   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
427   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
428   | --exec=* | --exe=* | --ex=*)
429     exec_prefix=$ac_optarg ;;
430
431   -gas | --gas | --ga | --g)
432     # Obsolete; use --with-gas.
433     with_gas=yes ;;
434
435   -help | --help | --hel | --he | -h)
436     ac_init_help=long ;;
437   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
438     ac_init_help=recursive ;;
439   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
440     ac_init_help=short ;;
441
442   -host | --host | --hos | --ho)
443     ac_prev=host_alias ;;
444   -host=* | --host=* | --hos=* | --ho=*)
445     host_alias=$ac_optarg ;;
446
447   -includedir | --includedir | --includedi | --included | --include \
448   | --includ | --inclu | --incl | --inc)
449     ac_prev=includedir ;;
450   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
451   | --includ=* | --inclu=* | --incl=* | --inc=*)
452     includedir=$ac_optarg ;;
453
454   -infodir | --infodir | --infodi | --infod | --info | --inf)
455     ac_prev=infodir ;;
456   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
457     infodir=$ac_optarg ;;
458
459   -libdir | --libdir | --libdi | --libd)
460     ac_prev=libdir ;;
461   -libdir=* | --libdir=* | --libdi=* | --libd=*)
462     libdir=$ac_optarg ;;
463
464   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
465   | --libexe | --libex | --libe)
466     ac_prev=libexecdir ;;
467   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
468   | --libexe=* | --libex=* | --libe=*)
469     libexecdir=$ac_optarg ;;
470
471   -localstatedir | --localstatedir | --localstatedi | --localstated \
472   | --localstate | --localstat | --localsta | --localst \
473   | --locals | --local | --loca | --loc | --lo)
474     ac_prev=localstatedir ;;
475   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
476   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
477   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
478     localstatedir=$ac_optarg ;;
479
480   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
481     ac_prev=mandir ;;
482   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
483     mandir=$ac_optarg ;;
484
485   -nfp | --nfp | --nf)
486     # Obsolete; use --without-fp.
487     with_fp=no ;;
488
489   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
490   | --no-cr | --no-c | -n)
491     no_create=yes ;;
492
493   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
495     no_recursion=yes ;;
496
497   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
498   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
499   | --oldin | --oldi | --old | --ol | --o)
500     ac_prev=oldincludedir ;;
501   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
502   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
503   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
504     oldincludedir=$ac_optarg ;;
505
506   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
507     ac_prev=prefix ;;
508   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
509     prefix=$ac_optarg ;;
510
511   -program-prefix | --program-prefix | --program-prefi | --program-pref \
512   | --program-pre | --program-pr | --program-p)
513     ac_prev=program_prefix ;;
514   -program-prefix=* | --program-prefix=* | --program-prefi=* \
515   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
516     program_prefix=$ac_optarg ;;
517
518   -program-suffix | --program-suffix | --program-suffi | --program-suff \
519   | --program-suf | --program-su | --program-s)
520     ac_prev=program_suffix ;;
521   -program-suffix=* | --program-suffix=* | --program-suffi=* \
522   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
523     program_suffix=$ac_optarg ;;
524
525   -program-transform-name | --program-transform-name \
526   | --program-transform-nam | --program-transform-na \
527   | --program-transform-n | --program-transform- \
528   | --program-transform | --program-transfor \
529   | --program-transfo | --program-transf \
530   | --program-trans | --program-tran \
531   | --progr-tra | --program-tr | --program-t)
532     ac_prev=program_transform_name ;;
533   -program-transform-name=* | --program-transform-name=* \
534   | --program-transform-nam=* | --program-transform-na=* \
535   | --program-transform-n=* | --program-transform-=* \
536   | --program-transform=* | --program-transfor=* \
537   | --program-transfo=* | --program-transf=* \
538   | --program-trans=* | --program-tran=* \
539   | --progr-tra=* | --program-tr=* | --program-t=*)
540     program_transform_name=$ac_optarg ;;
541
542   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
543   | -silent | --silent | --silen | --sile | --sil)
544     silent=yes ;;
545
546   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
547     ac_prev=sbindir ;;
548   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
549   | --sbi=* | --sb=*)
550     sbindir=$ac_optarg ;;
551
552   -sharedstatedir | --sharedstatedir | --sharedstatedi \
553   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
554   | --sharedst | --shareds | --shared | --share | --shar \
555   | --sha | --sh)
556     ac_prev=sharedstatedir ;;
557   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
558   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
559   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
560   | --sha=* | --sh=*)
561     sharedstatedir=$ac_optarg ;;
562
563   -site | --site | --sit)
564     ac_prev=site ;;
565   -site=* | --site=* | --sit=*)
566     site=$ac_optarg ;;
567
568   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
569     ac_prev=srcdir ;;
570   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
571     srcdir=$ac_optarg ;;
572
573   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
574   | --syscon | --sysco | --sysc | --sys | --sy)
575     ac_prev=sysconfdir ;;
576   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
577   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
578     sysconfdir=$ac_optarg ;;
579
580   -target | --target | --targe | --targ | --tar | --ta | --t)
581     ac_prev=target_alias ;;
582   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
583     target_alias=$ac_optarg ;;
584
585   -v | -verbose | --verbose | --verbos | --verbo | --verb)
586     verbose=yes ;;
587
588   -version | --version | --versio | --versi | --vers | -V)
589     ac_init_version=: ;;
590
591   -with-* | --with-*)
592     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
593     # Reject names that are not valid shell variable names.
594     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
595       { echo "$as_me: error: invalid package name: $ac_package" >&2
596    { (exit 1); exit 1; }; }
597     ac_package=`echo $ac_package| sed 's/-/_/g'`
598     case $ac_option in
599       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
600       *) ac_optarg=yes ;;
601     esac
602     eval "with_$ac_package='$ac_optarg'" ;;
603
604   -without-* | --without-*)
605     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
606     # Reject names that are not valid shell variable names.
607     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
608       { echo "$as_me: error: invalid package name: $ac_package" >&2
609    { (exit 1); exit 1; }; }
610     ac_package=`echo $ac_package | sed 's/-/_/g'`
611     eval "with_$ac_package=no" ;;
612
613   --x)
614     # Obsolete; use --with-x.
615     with_x=yes ;;
616
617   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
618   | --x-incl | --x-inc | --x-in | --x-i)
619     ac_prev=x_includes ;;
620   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
621   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
622     x_includes=$ac_optarg ;;
623
624   -x-libraries | --x-libraries | --x-librarie | --x-librari \
625   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
626     ac_prev=x_libraries ;;
627   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
628   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
629     x_libraries=$ac_optarg ;;
630
631   -*) { echo "$as_me: error: unrecognized option: $ac_option
632 Try \`$0 --help' for more information." >&2
633    { (exit 1); exit 1; }; }
634     ;;
635
636   *=*)
637     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
638     # Reject names that are not valid shell variable names.
639     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
640       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
641    { (exit 1); exit 1; }; }
642     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
643     eval "$ac_envvar='$ac_optarg'"
644     export $ac_envvar ;;
645
646   *)
647     # FIXME: should be removed in autoconf 3.0.
648     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
649     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
650       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
651     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
652     ;;
653
654   esac
655 done
656
657 if test -n "$ac_prev"; then
658   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
659   { echo "$as_me: error: missing argument to $ac_option" >&2
660    { (exit 1); exit 1; }; }
661 fi
662
663 # Be sure to have absolute paths.
664 for ac_var in exec_prefix prefix
665 do
666   eval ac_val=$`echo $ac_var`
667   case $ac_val in
668     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
669     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
670    { (exit 1); exit 1; }; };;
671   esac
672 done
673
674 # Be sure to have absolute paths.
675 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
676               localstatedir libdir includedir oldincludedir infodir mandir
677 do
678   eval ac_val=$`echo $ac_var`
679   case $ac_val in
680     [\\/$]* | ?:[\\/]* ) ;;
681     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
682    { (exit 1); exit 1; }; };;
683   esac
684 done
685
686 # There might be people who depend on the old broken behavior: `$host'
687 # used to hold the argument of --host etc.
688 # FIXME: To remove some day.
689 build=$build_alias
690 host=$host_alias
691 target=$target_alias
692
693 # FIXME: To remove some day.
694 if test "x$host_alias" != x; then
695   if test "x$build_alias" = x; then
696     cross_compiling=maybe
697     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
698     If a cross compiler is detected then cross compile mode will be used." >&2
699   elif test "x$build_alias" != "x$host_alias"; then
700     cross_compiling=yes
701   fi
702 fi
703
704 ac_tool_prefix=
705 test -n "$host_alias" && ac_tool_prefix=$host_alias-
706
707 test "$silent" = yes && exec 6>/dev/null
708
709
710 # Find the source files, if location was not specified.
711 if test -z "$srcdir"; then
712   ac_srcdir_defaulted=yes
713   # Try the directory containing this script, then its parent.
714   ac_confdir=`(dirname "$0") 2>/dev/null ||
715 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
716          X"$0" : 'X\(//\)[^/]' \| \
717          X"$0" : 'X\(//\)$' \| \
718          X"$0" : 'X\(/\)' \| \
719          .     : '\(.\)' 2>/dev/null ||
720 echo X"$0" |
721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
722           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
723           /^X\(\/\/\)$/{ s//\1/; q; }
724           /^X\(\/\).*/{ s//\1/; q; }
725           s/.*/./; q'`
726   srcdir=$ac_confdir
727   if test ! -r $srcdir/$ac_unique_file; then
728     srcdir=..
729   fi
730 else
731   ac_srcdir_defaulted=no
732 fi
733 if test ! -r $srcdir/$ac_unique_file; then
734   if test "$ac_srcdir_defaulted" = yes; then
735     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
736    { (exit 1); exit 1; }; }
737   else
738     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
739    { (exit 1); exit 1; }; }
740   fi
741 fi
742 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
743   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
744    { (exit 1); exit 1; }; }
745 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
746 ac_env_build_alias_set=${build_alias+set}
747 ac_env_build_alias_value=$build_alias
748 ac_cv_env_build_alias_set=${build_alias+set}
749 ac_cv_env_build_alias_value=$build_alias
750 ac_env_host_alias_set=${host_alias+set}
751 ac_env_host_alias_value=$host_alias
752 ac_cv_env_host_alias_set=${host_alias+set}
753 ac_cv_env_host_alias_value=$host_alias
754 ac_env_target_alias_set=${target_alias+set}
755 ac_env_target_alias_value=$target_alias
756 ac_cv_env_target_alias_set=${target_alias+set}
757 ac_cv_env_target_alias_value=$target_alias
758 ac_env_CC_set=${CC+set}
759 ac_env_CC_value=$CC
760 ac_cv_env_CC_set=${CC+set}
761 ac_cv_env_CC_value=$CC
762 ac_env_CFLAGS_set=${CFLAGS+set}
763 ac_env_CFLAGS_value=$CFLAGS
764 ac_cv_env_CFLAGS_set=${CFLAGS+set}
765 ac_cv_env_CFLAGS_value=$CFLAGS
766 ac_env_LDFLAGS_set=${LDFLAGS+set}
767 ac_env_LDFLAGS_value=$LDFLAGS
768 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
769 ac_cv_env_LDFLAGS_value=$LDFLAGS
770 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
771 ac_env_CPPFLAGS_value=$CPPFLAGS
772 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
773 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
774 ac_env_CPP_set=${CPP+set}
775 ac_env_CPP_value=$CPP
776 ac_cv_env_CPP_set=${CPP+set}
777 ac_cv_env_CPP_value=$CPP
778 ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
779 ac_env_LDFLAGS_SL_value=$LDFLAGS_SL
780 ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
781 ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL
782 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
783 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
784 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
785 ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
786
787 #
788 # Report the --help message.
789 #
790 if test "$ac_init_help" = "long"; then
791   # Omit some internal or obsolete options to make the list less imposing.
792   # This message is too long to be a string in the A/UX 3.1 sh.
793   cat <<_ACEOF
794 \`configure' configures PostgreSQL 8.2devel to adapt to many kinds of systems.
795
796 Usage: $0 [OPTION]... [VAR=VALUE]...
797
798 To assign environment variables (e.g., CC, CFLAGS...), specify them as
799 VAR=VALUE.  See below for descriptions of some of the useful variables.
800
801 Defaults for the options are specified in brackets.
802
803 Configuration:
804   -h, --help              display this help and exit
805       --help=short        display options specific to this package
806       --help=recursive    display the short help of all the included packages
807   -V, --version           display version information and exit
808   -q, --quiet, --silent   do not print \`checking...' messages
809       --cache-file=FILE   cache test results in FILE [disabled]
810   -C, --config-cache      alias for \`--cache-file=config.cache'
811   -n, --no-create         do not create output files
812       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
813
814 _ACEOF
815
816   cat <<_ACEOF
817 Installation directories:
818   --prefix=PREFIX         install architecture-independent files in PREFIX
819                           [$ac_default_prefix]
820   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
821                           [PREFIX]
822
823 By default, \`make install' will install all the files in
824 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
825 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
826 for instance \`--prefix=\$HOME'.
827
828 For better control, use the options below.
829
830 Fine tuning of the installation directories:
831   --bindir=DIR           user executables [EPREFIX/bin]
832   --sbindir=DIR          system admin executables [EPREFIX/sbin]
833   --libexecdir=DIR       program executables [EPREFIX/libexec]
834   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
835   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
836   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
837   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
838   --libdir=DIR           object code libraries [EPREFIX/lib]
839   --includedir=DIR       C header files [PREFIX/include]
840   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
841   --infodir=DIR          info documentation [PREFIX/info]
842   --mandir=DIR           man documentation [PREFIX/man]
843 _ACEOF
844
845   cat <<\_ACEOF
846
847 System types:
848   --build=BUILD     configure for building on BUILD [guessed]
849   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
850 _ACEOF
851 fi
852
853 if test -n "$ac_init_help"; then
854   case $ac_init_help in
855      short | recursive ) echo "Configuration of PostgreSQL 8.2devel:";;
856    esac
857   cat <<\_ACEOF
858
859 Optional Features:
860   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
861   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
862   --enable-integer-datetimes  enable 64-bit integer date/time support
863   --enable-nls[=LANGUAGES]  enable Native Language Support
864   --disable-shared        do not build shared libraries
865   --disable-rpath         do not embed shared library search path in executables
866   --disable-spinlocks     do not use spinlocks
867   --enable-debug          build with debugging symbols (-g)
868   --enable-depend         turn on automatic dependency tracking
869   --enable-cassert        enable assertion checks (for debugging)
870   --enable-thread-safety  make client libraries thread-safe
871   --enable-thread-safety-force  force thread-safety in spite of thread test failure
872   --disable-largefile     omit support for large files
873
874 Optional Packages:
875   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
876   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
877
878   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
879   --without-docdir        do not install the documentation
880   --with-includes=DIRS    look for additional header files in DIRS
881   --with-libraries=DIRS   look for additional libraries in DIRS
882   --with-libs=DIRS        alternative spelling of --with-libraries
883   --with-pgport=PORTNUM   change default port number [5432]
884   --with-tcl              build Tcl modules (PL/Tcl)
885   --with-tclconfig=DIR    tclConfig.sh is in DIR
886   --with-perl             build Perl modules (PL/Perl)
887   --with-python           build Python modules (PL/Python)
888   --with-krb5             build with Kerberos 5 support
889   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
890   --with-pam              build with PAM support
891   --with-ldap             build with LDAP support
892   --with-bonjour          build with Bonjour support
893   --with-openssl          build with OpenSSL support
894   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
895   --without-readline      do not use GNU Readline / BSD Libedit line editing
896   --without-zlib          do not use Zlib
897   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
898
899 Some influential environment variables:
900   CC          C compiler command
901   CFLAGS      C compiler flags
902   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
903               nonstandard directory <lib dir>
904   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
905               headers in a nonstandard directory <include dir>
906   CPP         C preprocessor
907   LDFLAGS_SL
908   DOCBOOKSTYLE
909               location of DocBook stylesheets
910
911 Use these variables to override the choices made by `configure' or to help
912 it to find libraries and programs with nonstandard names/locations.
913
914 Report bugs to <pgsql-bugs@postgresql.org>.
915 _ACEOF
916 fi
917
918 if test "$ac_init_help" = "recursive"; then
919   # If there are subdirs, report their specific --help.
920   ac_popdir=`pwd`
921   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
922     test -d $ac_dir || continue
923     ac_builddir=.
924
925 if test "$ac_dir" != .; then
926   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
927   # A "../" for each directory in $ac_dir_suffix.
928   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
929 else
930   ac_dir_suffix= ac_top_builddir=
931 fi
932
933 case $srcdir in
934   .)  # No --srcdir option.  We are building in place.
935     ac_srcdir=.
936     if test -z "$ac_top_builddir"; then
937        ac_top_srcdir=.
938     else
939        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
940     fi ;;
941   [\\/]* | ?:[\\/]* )  # Absolute path.
942     ac_srcdir=$srcdir$ac_dir_suffix;
943     ac_top_srcdir=$srcdir ;;
944   *) # Relative path.
945     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
946     ac_top_srcdir=$ac_top_builddir$srcdir ;;
947 esac
948
949 # Do not use `cd foo && pwd` to compute absolute paths, because
950 # the directories may not exist.
951 case `pwd` in
952 .) ac_abs_builddir="$ac_dir";;
953 *)
954   case "$ac_dir" in
955   .) ac_abs_builddir=`pwd`;;
956   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
957   *) ac_abs_builddir=`pwd`/"$ac_dir";;
958   esac;;
959 esac
960 case $ac_abs_builddir in
961 .) ac_abs_top_builddir=${ac_top_builddir}.;;
962 *)
963   case ${ac_top_builddir}. in
964   .) ac_abs_top_builddir=$ac_abs_builddir;;
965   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
966   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
967   esac;;
968 esac
969 case $ac_abs_builddir in
970 .) ac_abs_srcdir=$ac_srcdir;;
971 *)
972   case $ac_srcdir in
973   .) ac_abs_srcdir=$ac_abs_builddir;;
974   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
975   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
976   esac;;
977 esac
978 case $ac_abs_builddir in
979 .) ac_abs_top_srcdir=$ac_top_srcdir;;
980 *)
981   case $ac_top_srcdir in
982   .) ac_abs_top_srcdir=$ac_abs_builddir;;
983   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
984   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
985   esac;;
986 esac
987
988     cd $ac_dir
989     # Check for guested configure; otherwise get Cygnus style configure.
990     if test -f $ac_srcdir/configure.gnu; then
991       echo
992       $SHELL $ac_srcdir/configure.gnu  --help=recursive
993     elif test -f $ac_srcdir/configure; then
994       echo
995       $SHELL $ac_srcdir/configure  --help=recursive
996     elif test -f $ac_srcdir/configure.ac ||
997            test -f $ac_srcdir/configure.in; then
998       echo
999       $ac_configure --help
1000     else
1001       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1002     fi
1003     cd $ac_popdir
1004   done
1005 fi
1006
1007 test -n "$ac_init_help" && exit 0
1008 if $ac_init_version; then
1009   cat <<\_ACEOF
1010 PostgreSQL configure 8.2devel
1011 generated by GNU Autoconf 2.59
1012
1013 Copyright (C) 2003 Free Software Foundation, Inc.
1014 This configure script is free software; the Free Software Foundation
1015 gives unlimited permission to copy, distribute and modify it.
1016
1017 Copyright (c) 1996-2006, PostgreSQL Global Development Group
1018 _ACEOF
1019   exit 0
1020 fi
1021 exec 5>config.log
1022 cat >&5 <<_ACEOF
1023 This file contains any messages produced by compilers while
1024 running configure, to aid debugging if configure makes a mistake.
1025
1026 It was created by PostgreSQL $as_me 8.2devel, which was
1027 generated by GNU Autoconf 2.59.  Invocation command line was
1028
1029   $ $0 $@
1030
1031 _ACEOF
1032 {
1033 cat <<_ASUNAME
1034 ## --------- ##
1035 ## Platform. ##
1036 ## --------- ##
1037
1038 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1039 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1040 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1041 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1042 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1043
1044 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1045 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1046
1047 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1048 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1049 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1050 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1051 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1052 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1053 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1054
1055 _ASUNAME
1056
1057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1058 for as_dir in $PATH
1059 do
1060   IFS=$as_save_IFS
1061   test -z "$as_dir" && as_dir=.
1062   echo "PATH: $as_dir"
1063 done
1064
1065 } >&5
1066
1067 cat >&5 <<_ACEOF
1068
1069
1070 ## ----------- ##
1071 ## Core tests. ##
1072 ## ----------- ##
1073
1074 _ACEOF
1075
1076
1077 # Keep a trace of the command line.
1078 # Strip out --no-create and --no-recursion so they do not pile up.
1079 # Strip out --silent because we don't want to record it for future runs.
1080 # Also quote any args containing shell meta-characters.
1081 # Make two passes to allow for proper duplicate-argument suppression.
1082 ac_configure_args=
1083 ac_configure_args0=
1084 ac_configure_args1=
1085 ac_sep=
1086 ac_must_keep_next=false
1087 for ac_pass in 1 2
1088 do
1089   for ac_arg
1090   do
1091     case $ac_arg in
1092     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1093     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1094     | -silent | --silent | --silen | --sile | --sil)
1095       continue ;;
1096     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1097       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1098     esac
1099     case $ac_pass in
1100     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1101     2)
1102       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1103       if test $ac_must_keep_next = true; then
1104         ac_must_keep_next=false # Got value, back to normal.
1105       else
1106         case $ac_arg in
1107           *=* | --config-cache | -C | -disable-* | --disable-* \
1108           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1109           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1110           | -with-* | --with-* | -without-* | --without-* | --x)
1111             case "$ac_configure_args0 " in
1112               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1113             esac
1114             ;;
1115           -* ) ac_must_keep_next=true ;;
1116         esac
1117       fi
1118       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1119       # Get rid of the leading space.
1120       ac_sep=" "
1121       ;;
1122     esac
1123   done
1124 done
1125 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1126 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1127
1128 # When interrupted or exit'd, cleanup temporary files, and complete
1129 # config.log.  We remove comments because anyway the quotes in there
1130 # would cause problems or look ugly.
1131 # WARNING: Be sure not to use single quotes in there, as some shells,
1132 # such as our DU 5.0 friend, will then `close' the trap.
1133 trap 'exit_status=$?
1134   # Save into config.log some information that might help in debugging.
1135   {
1136     echo
1137
1138     cat <<\_ASBOX
1139 ## ---------------- ##
1140 ## Cache variables. ##
1141 ## ---------------- ##
1142 _ASBOX
1143     echo
1144     # The following way of writing the cache mishandles newlines in values,
1145 {
1146   (set) 2>&1 |
1147     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1148     *ac_space=\ *)
1149       sed -n \
1150         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1151           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1152       ;;
1153     *)
1154       sed -n \
1155         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1156       ;;
1157     esac;
1158 }
1159     echo
1160
1161     cat <<\_ASBOX
1162 ## ----------------- ##
1163 ## Output variables. ##
1164 ## ----------------- ##
1165 _ASBOX
1166     echo
1167     for ac_var in $ac_subst_vars
1168     do
1169       eval ac_val=$`echo $ac_var`
1170       echo "$ac_var='"'"'$ac_val'"'"'"
1171     done | sort
1172     echo
1173
1174     if test -n "$ac_subst_files"; then
1175       cat <<\_ASBOX
1176 ## ------------- ##
1177 ## Output files. ##
1178 ## ------------- ##
1179 _ASBOX
1180       echo
1181       for ac_var in $ac_subst_files
1182       do
1183         eval ac_val=$`echo $ac_var`
1184         echo "$ac_var='"'"'$ac_val'"'"'"
1185       done | sort
1186       echo
1187     fi
1188
1189     if test -s confdefs.h; then
1190       cat <<\_ASBOX
1191 ## ----------- ##
1192 ## confdefs.h. ##
1193 ## ----------- ##
1194 _ASBOX
1195       echo
1196       sed "/^$/d" confdefs.h | sort
1197       echo
1198     fi
1199     test "$ac_signal" != 0 &&
1200       echo "$as_me: caught signal $ac_signal"
1201     echo "$as_me: exit $exit_status"
1202   } >&5
1203   rm -f core *.core &&
1204   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1205     exit $exit_status
1206      ' 0
1207 for ac_signal in 1 2 13 15; do
1208   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1209 done
1210 ac_signal=0
1211
1212 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1213 rm -rf conftest* confdefs.h
1214 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1215 echo >confdefs.h
1216
1217 # Predefined preprocessor variables.
1218
1219 cat >>confdefs.h <<_ACEOF
1220 #define PACKAGE_NAME "$PACKAGE_NAME"
1221 _ACEOF
1222
1223
1224 cat >>confdefs.h <<_ACEOF
1225 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1226 _ACEOF
1227
1228
1229 cat >>confdefs.h <<_ACEOF
1230 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1231 _ACEOF
1232
1233
1234 cat >>confdefs.h <<_ACEOF
1235 #define PACKAGE_STRING "$PACKAGE_STRING"
1236 _ACEOF
1237
1238
1239 cat >>confdefs.h <<_ACEOF
1240 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1241 _ACEOF
1242
1243
1244 # Let the site file select an alternate cache file if it wants to.
1245 # Prefer explicitly selected file to automatically selected ones.
1246 if test -z "$CONFIG_SITE"; then
1247   if test "x$prefix" != xNONE; then
1248     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1249   else
1250     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1251   fi
1252 fi
1253 for ac_site_file in $CONFIG_SITE; do
1254   if test -r "$ac_site_file"; then
1255     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1256 echo "$as_me: loading site script $ac_site_file" >&6;}
1257     sed 's/^/| /' "$ac_site_file" >&5
1258     . "$ac_site_file"
1259   fi
1260 done
1261
1262 if test -r "$cache_file"; then
1263   # Some versions of bash will fail to source /dev/null (special
1264   # files actually), so we avoid doing that.
1265   if test -f "$cache_file"; then
1266     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1267 echo "$as_me: loading cache $cache_file" >&6;}
1268     case $cache_file in
1269       [\\/]* | ?:[\\/]* ) . $cache_file;;
1270       *)                      . ./$cache_file;;
1271     esac
1272   fi
1273 else
1274   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1275 echo "$as_me: creating cache $cache_file" >&6;}
1276   >$cache_file
1277 fi
1278
1279 # Check that the precious variables saved in the cache have kept the same
1280 # value.
1281 ac_cache_corrupted=false
1282 for ac_var in `(set) 2>&1 |
1283                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1284   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1285   eval ac_new_set=\$ac_env_${ac_var}_set
1286   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1287   eval ac_new_val="\$ac_env_${ac_var}_value"
1288   case $ac_old_set,$ac_new_set in
1289     set,)
1290       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1291 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1292       ac_cache_corrupted=: ;;
1293     ,set)
1294       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1295 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1296       ac_cache_corrupted=: ;;
1297     ,);;
1298     *)
1299       if test "x$ac_old_val" != "x$ac_new_val"; then
1300         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1301 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1302         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1303 echo "$as_me:   former value:  $ac_old_val" >&2;}
1304         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1305 echo "$as_me:   current value: $ac_new_val" >&2;}
1306         ac_cache_corrupted=:
1307       fi;;
1308   esac
1309   # Pass precious variables to config.status.
1310   if test "$ac_new_set" = set; then
1311     case $ac_new_val in
1312     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1313       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1314     *) ac_arg=$ac_var=$ac_new_val ;;
1315     esac
1316     case " $ac_configure_args " in
1317       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1318       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1319     esac
1320   fi
1321 done
1322 if $ac_cache_corrupted; then
1323   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1324 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1325   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1326 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1327    { (exit 1); exit 1; }; }
1328 fi
1329
1330 ac_ext=c
1331 ac_cpp='$CPP $CPPFLAGS'
1332 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1333 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1334 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366 ac_aux_dir=
1367 for ac_dir in config $srcdir/config; do
1368   if test -f $ac_dir/install-sh; then
1369     ac_aux_dir=$ac_dir
1370     ac_install_sh="$ac_aux_dir/install-sh -c"
1371     break
1372   elif test -f $ac_dir/install.sh; then
1373     ac_aux_dir=$ac_dir
1374     ac_install_sh="$ac_aux_dir/install.sh -c"
1375     break
1376   elif test -f $ac_dir/shtool; then
1377     ac_aux_dir=$ac_dir
1378     ac_install_sh="$ac_aux_dir/shtool install -c"
1379     break
1380   fi
1381 done
1382 if test -z "$ac_aux_dir"; then
1383   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1384 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1385    { (exit 1); exit 1; }; }
1386 fi
1387 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1388 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1389 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1390
1391
1392 configure_args=$ac_configure_args
1393
1394
1395
1396 cat >>confdefs.h <<_ACEOF
1397 #define PG_VERSION "$PACKAGE_VERSION"
1398 _ACEOF
1399
1400
1401 # Make sure we can run config.sub.
1402 $ac_config_sub sun4 >/dev/null 2>&1 ||
1403   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1404 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1405    { (exit 1); exit 1; }; }
1406
1407 echo "$as_me:$LINENO: checking build system type" >&5
1408 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1409 if test "${ac_cv_build+set}" = set; then
1410   echo $ECHO_N "(cached) $ECHO_C" >&6
1411 else
1412   ac_cv_build_alias=$build_alias
1413 test -z "$ac_cv_build_alias" &&
1414   ac_cv_build_alias=`$ac_config_guess`
1415 test -z "$ac_cv_build_alias" &&
1416   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1417 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1418    { (exit 1); exit 1; }; }
1419 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1420   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1421 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1422    { (exit 1); exit 1; }; }
1423
1424 fi
1425 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1426 echo "${ECHO_T}$ac_cv_build" >&6
1427 build=$ac_cv_build
1428 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1429 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1430 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1431
1432
1433 echo "$as_me:$LINENO: checking host system type" >&5
1434 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1435 if test "${ac_cv_host+set}" = set; then
1436   echo $ECHO_N "(cached) $ECHO_C" >&6
1437 else
1438   ac_cv_host_alias=$host_alias
1439 test -z "$ac_cv_host_alias" &&
1440   ac_cv_host_alias=$ac_cv_build_alias
1441 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1442   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1443 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1444    { (exit 1); exit 1; }; }
1445
1446 fi
1447 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1448 echo "${ECHO_T}$ac_cv_host" >&6
1449 host=$ac_cv_host
1450 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1451 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1452 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1453
1454
1455
1456 template=
1457 echo "$as_me:$LINENO: checking which template to use" >&5
1458 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1459
1460
1461
1462
1463
1464 # Check whether --with-template or --without-template was given.
1465 if test "${with_template+set}" = set; then
1466   withval="$with_template"
1467
1468   case $withval in
1469     yes)
1470       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1471 echo "$as_me: error: argument required for --with-template option" >&2;}
1472    { (exit 1); exit 1; }; }
1473       ;;
1474     no)
1475       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1476 echo "$as_me: error: argument required for --with-template option" >&2;}
1477    { (exit 1); exit 1; }; }
1478       ;;
1479     *)
1480
1481   case $withval in
1482     list)   echo; ls "$srcdir/src/template"; exit;;
1483     *)      if test -f "$srcdir/src/template/$with_template" ; then
1484               template=$withval
1485             else
1486               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1487 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1488    { (exit 1); exit 1; }; }
1489             fi;;
1490   esac
1491
1492       ;;
1493   esac
1494
1495 else
1496
1497 # --with-template not given
1498
1499 case $host_os in
1500      aix*) template=aix ;;
1501     bsdi*) template=bsdi ;;
1502   cygwin*) template=cygwin ;;
1503   darwin*) template=darwin ;;
1504     dgux*) template=dgux ;;
1505  freebsd*) template=freebsd ;;
1506     hpux*) template=hpux ;;
1507     irix*) template=irix ;;
1508  linux*|gnu*|k*bsd*-gnu)
1509            template=linux ;;
1510    mingw*) template=win32 ;;
1511   netbsd*) template=netbsd ;;
1512 nextstep*) template=nextstep ;;
1513  openbsd*) template=openbsd ;;
1514      osf*) template=osf ;;
1515      sco*) template=sco ;;
1516  solaris*) template=solaris ;;
1517    sunos*) template=sunos4 ;;
1518  sysv4.2*)
1519         case $host_vendor in
1520           univel) template=univel ;;
1521         esac ;;
1522    sysv4*) template=svr4 ;;
1523    sysv5*) template=unixware ;;
1524   ultrix*) template=ultrix4 ;;
1525 esac
1526
1527   if test x"$template" = x"" ; then
1528     { { echo "$as_me:$LINENO: error:
1529 *******************************************************************
1530 PostgreSQL has apparently not been ported to your platform yet.
1531 To try a manual configuration, look into the src/template directory
1532 for a similar platform and use the '--with-template=' option.
1533
1534 Please also contact <pgsql-ports@postgresql.org> to see about
1535 rectifying this.  Include the above 'checking host system type...'
1536 line.
1537 *******************************************************************
1538 " >&5
1539 echo "$as_me: error:
1540 *******************************************************************
1541 PostgreSQL has apparently not been ported to your platform yet.
1542 To try a manual configuration, look into the src/template directory
1543 for a similar platform and use the '--with-template=' option.
1544
1545 Please also contact <pgsql-ports@postgresql.org> to see about
1546 rectifying this.  Include the above 'checking host system type...'
1547 line.
1548 *******************************************************************
1549 " >&2;}
1550    { (exit 1); exit 1; }; }
1551   fi
1552
1553
1554 fi;
1555
1556
1557 echo "$as_me:$LINENO: result: $template" >&5
1558 echo "${ECHO_T}$template" >&6
1559
1560 PORTNAME=$template
1561
1562
1563 # Initialize default assumption that we do not need separate assembly code
1564 # for TAS (test-and-set).  This can be overridden by the template file
1565 # when it's executed.
1566 need_tas=no
1567 tas_file=dummy.s
1568
1569
1570
1571 ##
1572 ## Command line options
1573 ##
1574
1575 #
1576 # Installation directory for documentation
1577 #
1578
1579
1580
1581
1582 # Check whether --with-docdir or --without-docdir was given.
1583 if test "${with_docdir+set}" = set; then
1584   withval="$with_docdir"
1585
1586   case $withval in
1587     yes)
1588       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1589 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1590    { (exit 1); exit 1; }; }
1591       ;;
1592     no)
1593       docdir=
1594       ;;
1595     *)
1596       docdir=$withval
1597       ;;
1598   esac
1599
1600 else
1601   docdir='${prefix}/doc'
1602 fi;
1603
1604
1605
1606
1607 #
1608 # Add non-standard directories to the include path
1609 #
1610
1611
1612
1613
1614 # Check whether --with-includes or --without-includes was given.
1615 if test "${with_includes+set}" = set; then
1616   withval="$with_includes"
1617
1618   case $withval in
1619     yes)
1620       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1621 echo "$as_me: error: argument required for --with-includes option" >&2;}
1622    { (exit 1); exit 1; }; }
1623       ;;
1624     no)
1625       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1626 echo "$as_me: error: argument required for --with-includes option" >&2;}
1627    { (exit 1); exit 1; }; }
1628       ;;
1629     *)
1630
1631       ;;
1632   esac
1633
1634 fi;
1635
1636
1637
1638 #
1639 # Add non-standard directories to the library search path
1640 #
1641
1642
1643
1644
1645 # Check whether --with-libraries or --without-libraries was given.
1646 if test "${with_libraries+set}" = set; then
1647   withval="$with_libraries"
1648
1649   case $withval in
1650     yes)
1651       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1652 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1653    { (exit 1); exit 1; }; }
1654       ;;
1655     no)
1656       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1657 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1658    { (exit 1); exit 1; }; }
1659       ;;
1660     *)
1661       LIBRARY_DIRS=$withval
1662       ;;
1663   esac
1664
1665 fi;
1666
1667
1668
1669
1670
1671
1672 # Check whether --with-libs or --without-libs was given.
1673 if test "${with_libs+set}" = set; then
1674   withval="$with_libs"
1675
1676   case $withval in
1677     yes)
1678       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1679 echo "$as_me: error: argument required for --with-libs option" >&2;}
1680    { (exit 1); exit 1; }; }
1681       ;;
1682     no)
1683       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1684 echo "$as_me: error: argument required for --with-libs option" >&2;}
1685    { (exit 1); exit 1; }; }
1686       ;;
1687     *)
1688       LIBRARY_DIRS=$withval
1689       ;;
1690   esac
1691
1692 fi;
1693
1694
1695
1696 #
1697 # 64-bit integer date/time storage (--enable-integer-datetimes)
1698 #
1699 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1700 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1701
1702
1703
1704 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1705 if test "${enable_integer_datetimes+set}" = set; then
1706   enableval="$enable_integer_datetimes"
1707
1708   case $enableval in
1709     yes)
1710
1711 cat >>confdefs.h <<\_ACEOF
1712 #define USE_INTEGER_DATETIMES 1
1713 _ACEOF
1714
1715       ;;
1716     no)
1717       :
1718       ;;
1719     *)
1720       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1721 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1722    { (exit 1); exit 1; }; }
1723       ;;
1724   esac
1725
1726 else
1727   enable_integer_datetimes=no
1728
1729 fi;
1730
1731 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1732 echo "${ECHO_T}$enable_integer_datetimes" >&6
1733
1734
1735 #
1736 # NLS
1737 #
1738 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1739 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1740
1741
1742
1743 # Check whether --enable-nls or --disable-nls was given.
1744 if test "${enable_nls+set}" = set; then
1745   enableval="$enable_nls"
1746
1747   case $enableval in
1748     yes)
1749       :
1750       ;;
1751     no)
1752       :
1753       ;;
1754     *)
1755       enable_nls=yes
1756 WANTED_LANGUAGES=$enableval
1757       ;;
1758   esac
1759
1760 else
1761   enable_nls=no
1762 fi;
1763
1764
1765 if test "$enable_nls" = yes; then
1766
1767 cat >>confdefs.h <<\_ACEOF
1768 #define ENABLE_NLS 1
1769 _ACEOF
1770
1771 fi
1772
1773 echo "$as_me:$LINENO: result: $enable_nls" >&5
1774 echo "${ECHO_T}$enable_nls" >&6
1775
1776
1777
1778 #
1779 # Default port number (--with-pgport), default 5432
1780 #
1781 echo "$as_me:$LINENO: checking for default port number" >&5
1782 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1783
1784
1785
1786
1787 # Check whether --with-pgport or --without-pgport was given.
1788 if test "${with_pgport+set}" = set; then
1789   withval="$with_pgport"
1790
1791   case $withval in
1792     yes)
1793       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1794 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1795    { (exit 1); exit 1; }; }
1796       ;;
1797     no)
1798       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1799 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1800    { (exit 1); exit 1; }; }
1801       ;;
1802     *)
1803       default_port=$withval
1804       ;;
1805   esac
1806
1807 else
1808   default_port=5432
1809 fi;
1810
1811 echo "$as_me:$LINENO: result: $default_port" >&5
1812 echo "${ECHO_T}$default_port" >&6
1813 # Need both of these because some places want an integer and some a string
1814
1815 cat >>confdefs.h <<_ACEOF
1816 #define DEF_PGPORT ${default_port}
1817 _ACEOF
1818
1819
1820 cat >>confdefs.h <<_ACEOF
1821 #define DEF_PGPORT_STR "${default_port}"
1822 _ACEOF
1823
1824
1825
1826 #
1827 # Option to disable shared libraries
1828 #
1829
1830
1831
1832 # Check whether --enable-shared or --disable-shared was given.
1833 if test "${enable_shared+set}" = set; then
1834   enableval="$enable_shared"
1835
1836   case $enableval in
1837     yes)
1838       :
1839       ;;
1840     no)
1841       :
1842       ;;
1843     *)
1844       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1845 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1846    { (exit 1); exit 1; }; }
1847       ;;
1848   esac
1849
1850 else
1851   enable_shared=yes
1852
1853 fi;
1854
1855
1856
1857 #
1858 # '-rpath'-like feature can be disabled
1859 #
1860
1861
1862
1863 # Check whether --enable-rpath or --disable-rpath was given.
1864 if test "${enable_rpath+set}" = set; then
1865   enableval="$enable_rpath"
1866
1867   case $enableval in
1868     yes)
1869       :
1870       ;;
1871     no)
1872       :
1873       ;;
1874     *)
1875       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1876 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1877    { (exit 1); exit 1; }; }
1878       ;;
1879   esac
1880
1881 else
1882   enable_rpath=yes
1883
1884 fi;
1885
1886
1887
1888 #
1889 # Spinlocks
1890 #
1891
1892
1893
1894 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1895 if test "${enable_spinlocks+set}" = set; then
1896   enableval="$enable_spinlocks"
1897
1898   case $enableval in
1899     yes)
1900       :
1901       ;;
1902     no)
1903       :
1904       ;;
1905     *)
1906       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1907 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1908    { (exit 1); exit 1; }; }
1909       ;;
1910   esac
1911
1912 else
1913   enable_spinlocks=yes
1914
1915 fi;
1916
1917
1918 #
1919 # --enable-debug adds -g to compiler flags
1920 #
1921
1922
1923
1924 # Check whether --enable-debug or --disable-debug was given.
1925 if test "${enable_debug+set}" = set; then
1926   enableval="$enable_debug"
1927
1928   case $enableval in
1929     yes)
1930       :
1931       ;;
1932     no)
1933       :
1934       ;;
1935     *)
1936       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1937 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1938    { (exit 1); exit 1; }; }
1939       ;;
1940   esac
1941
1942 else
1943   enable_debug=no
1944
1945 fi;
1946
1947
1948
1949 #
1950 # C compiler
1951 #
1952
1953 # For historical reasons you can also use --with-CC to specify the C compiler
1954 # to use, although the standard way to do this is to set the CC environment
1955 # variable.
1956
1957
1958
1959
1960 # Check whether --with-CC or --without-CC was given.
1961 if test "${with_CC+set}" = set; then
1962   withval="$with_CC"
1963
1964   case $withval in
1965     yes)
1966       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1967 echo "$as_me: error: argument required for --with-CC option" >&2;}
1968    { (exit 1); exit 1; }; }
1969       ;;
1970     no)
1971       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1972 echo "$as_me: error: argument required for --with-CC option" >&2;}
1973    { (exit 1); exit 1; }; }
1974       ;;
1975     *)
1976       CC=$with_CC
1977       ;;
1978   esac
1979
1980 fi;
1981
1982
1983 case $template in
1984   aix) pgac_cc_list="gcc xlc";;
1985  irix) pgac_cc_list="cc";; # no gcc
1986     *) pgac_cc_list="gcc cc";;
1987 esac
1988
1989 ac_ext=c
1990 ac_cpp='$CPP $CPPFLAGS'
1991 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1992 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1993 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1994 if test -n "$ac_tool_prefix"; then
1995   for ac_prog in $pgac_cc_list
1996   do
1997     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1998 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1999 echo "$as_me:$LINENO: checking for $ac_word" >&5
2000 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2001 if test "${ac_cv_prog_CC+set}" = set; then
2002   echo $ECHO_N "(cached) $ECHO_C" >&6
2003 else
2004   if test -n "$CC"; then
2005   ac_cv_prog_CC="$CC" # Let the user override the test.
2006 else
2007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2008 for as_dir in $PATH
2009 do
2010   IFS=$as_save_IFS
2011   test -z "$as_dir" && as_dir=.
2012   for ac_exec_ext in '' $ac_executable_extensions; do
2013   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2014     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2015     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2016     break 2
2017   fi
2018 done
2019 done
2020
2021 fi
2022 fi
2023 CC=$ac_cv_prog_CC
2024 if test -n "$CC"; then
2025   echo "$as_me:$LINENO: result: $CC" >&5
2026 echo "${ECHO_T}$CC" >&6
2027 else
2028   echo "$as_me:$LINENO: result: no" >&5
2029 echo "${ECHO_T}no" >&6
2030 fi
2031
2032     test -n "$CC" && break
2033   done
2034 fi
2035 if test -z "$CC"; then
2036   ac_ct_CC=$CC
2037   for ac_prog in $pgac_cc_list
2038 do
2039   # Extract the first word of "$ac_prog", so it can be a program name with args.
2040 set dummy $ac_prog; ac_word=$2
2041 echo "$as_me:$LINENO: checking for $ac_word" >&5
2042 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2043 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2044   echo $ECHO_N "(cached) $ECHO_C" >&6
2045 else
2046   if test -n "$ac_ct_CC"; then
2047   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2048 else
2049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2050 for as_dir in $PATH
2051 do
2052   IFS=$as_save_IFS
2053   test -z "$as_dir" && as_dir=.
2054   for ac_exec_ext in '' $ac_executable_extensions; do
2055   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2056     ac_cv_prog_ac_ct_CC="$ac_prog"
2057     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2058     break 2
2059   fi
2060 done
2061 done
2062
2063 fi
2064 fi
2065 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2066 if test -n "$ac_ct_CC"; then
2067   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2068 echo "${ECHO_T}$ac_ct_CC" >&6
2069 else
2070   echo "$as_me:$LINENO: result: no" >&5
2071 echo "${ECHO_T}no" >&6
2072 fi
2073
2074   test -n "$ac_ct_CC" && break
2075 done
2076
2077   CC=$ac_ct_CC
2078 fi
2079
2080
2081 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2082 See \`config.log' for more details." >&5
2083 echo "$as_me: error: no acceptable C compiler found in \$PATH
2084 See \`config.log' for more details." >&2;}
2085    { (exit 1); exit 1; }; }
2086
2087 # Provide some information about the compiler.
2088 echo "$as_me:$LINENO:" \
2089      "checking for C compiler version" >&5
2090 ac_compiler=`set X $ac_compile; echo $2`
2091 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2092   (eval $ac_compiler --version </dev/null >&5) 2>&5
2093   ac_status=$?
2094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2095   (exit $ac_status); }
2096 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2097   (eval $ac_compiler -v </dev/null >&5) 2>&5
2098   ac_status=$?
2099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2100   (exit $ac_status); }
2101 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2102   (eval $ac_compiler -V </dev/null >&5) 2>&5
2103   ac_status=$?
2104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2105   (exit $ac_status); }
2106
2107 cat >conftest.$ac_ext <<_ACEOF
2108 /* confdefs.h.  */
2109 _ACEOF
2110 cat confdefs.h >>conftest.$ac_ext
2111 cat >>conftest.$ac_ext <<_ACEOF
2112 /* end confdefs.h.  */
2113
2114 int
2115 main ()
2116 {
2117
2118   ;
2119   return 0;
2120 }
2121 _ACEOF
2122 ac_clean_files_save=$ac_clean_files
2123 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2124 # Try to create an executable without -o first, disregard a.out.
2125 # It will help us diagnose broken compilers, and finding out an intuition
2126 # of exeext.
2127 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2128 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2129 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2130 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2131   (eval $ac_link_default) 2>&5
2132   ac_status=$?
2133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2134   (exit $ac_status); }; then
2135   # Find the output, starting from the most likely.  This scheme is
2136 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2137 # resort.
2138
2139 # Be careful to initialize this variable, since it used to be cached.
2140 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2141 ac_cv_exeext=
2142 # b.out is created by i960 compilers.
2143 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2144 do
2145   test -f "$ac_file" || continue
2146   case $ac_file in
2147     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2148         ;;
2149     conftest.$ac_ext )
2150         # This is the source file.
2151         ;;
2152     [ab].out )
2153         # We found the default executable, but exeext='' is most
2154         # certainly right.
2155         break;;
2156     *.* )
2157         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2158         # FIXME: I believe we export ac_cv_exeext for Libtool,
2159         # but it would be cool to find out if it's true.  Does anybody
2160         # maintain Libtool? --akim.
2161         export ac_cv_exeext
2162         break;;
2163     * )
2164         break;;
2165   esac
2166 done
2167 else
2168   echo "$as_me: failed program was:" >&5
2169 sed 's/^/| /' conftest.$ac_ext >&5
2170
2171 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2172 See \`config.log' for more details." >&5
2173 echo "$as_me: error: C compiler cannot create executables
2174 See \`config.log' for more details." >&2;}
2175    { (exit 77); exit 77; }; }
2176 fi
2177
2178 ac_exeext=$ac_cv_exeext
2179 echo "$as_me:$LINENO: result: $ac_file" >&5
2180 echo "${ECHO_T}$ac_file" >&6
2181
2182 # Check the compiler produces executables we can run.  If not, either
2183 # the compiler is broken, or we cross compile.
2184 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2185 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2186 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2187 # If not cross compiling, check that we can run a simple program.
2188 if test "$cross_compiling" != yes; then
2189   if { ac_try='./$ac_file'
2190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2191   (eval $ac_try) 2>&5
2192   ac_status=$?
2193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2194   (exit $ac_status); }; }; then
2195     cross_compiling=no
2196   else
2197     if test "$cross_compiling" = maybe; then
2198         cross_compiling=yes
2199     else
2200         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2201 If you meant to cross compile, use \`--host'.
2202 See \`config.log' for more details." >&5
2203 echo "$as_me: error: cannot run C compiled programs.
2204 If you meant to cross compile, use \`--host'.
2205 See \`config.log' for more details." >&2;}
2206    { (exit 1); exit 1; }; }
2207     fi
2208   fi
2209 fi
2210 echo "$as_me:$LINENO: result: yes" >&5
2211 echo "${ECHO_T}yes" >&6
2212
2213 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2214 ac_clean_files=$ac_clean_files_save
2215 # Check the compiler produces executables we can run.  If not, either
2216 # the compiler is broken, or we cross compile.
2217 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2218 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2219 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2220 echo "${ECHO_T}$cross_compiling" >&6
2221
2222 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2223 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2224 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2225   (eval $ac_link) 2>&5
2226   ac_status=$?
2227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2228   (exit $ac_status); }; then
2229   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2230 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2231 # work properly (i.e., refer to `conftest.exe'), while it won't with
2232 # `rm'.
2233 for ac_file in conftest.exe conftest conftest.*; do
2234   test -f "$ac_file" || continue
2235   case $ac_file in
2236     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2237     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2238           export ac_cv_exeext
2239           break;;
2240     * ) break;;
2241   esac
2242 done
2243 else
2244   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2245 See \`config.log' for more details." >&5
2246 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2247 See \`config.log' for more details." >&2;}
2248    { (exit 1); exit 1; }; }
2249 fi
2250
2251 rm -f conftest$ac_cv_exeext
2252 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2253 echo "${ECHO_T}$ac_cv_exeext" >&6
2254
2255 rm -f conftest.$ac_ext
2256 EXEEXT=$ac_cv_exeext
2257 ac_exeext=$EXEEXT
2258 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2259 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2260 if test "${ac_cv_objext+set}" = set; then
2261   echo $ECHO_N "(cached) $ECHO_C" >&6
2262 else
2263   cat >conftest.$ac_ext <<_ACEOF
2264 /* confdefs.h.  */
2265 _ACEOF
2266 cat confdefs.h >>conftest.$ac_ext
2267 cat >>conftest.$ac_ext <<_ACEOF
2268 /* end confdefs.h.  */
2269
2270 int
2271 main ()
2272 {
2273
2274   ;
2275   return 0;
2276 }
2277 _ACEOF
2278 rm -f conftest.o conftest.obj
2279 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2280   (eval $ac_compile) 2>&5
2281   ac_status=$?
2282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2283   (exit $ac_status); }; then
2284   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2285   case $ac_file in
2286     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2287     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2288        break;;
2289   esac
2290 done
2291 else
2292   echo "$as_me: failed program was:" >&5
2293 sed 's/^/| /' conftest.$ac_ext >&5
2294
2295 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2296 See \`config.log' for more details." >&5
2297 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2298 See \`config.log' for more details." >&2;}
2299    { (exit 1); exit 1; }; }
2300 fi
2301
2302 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2303 fi
2304 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2305 echo "${ECHO_T}$ac_cv_objext" >&6
2306 OBJEXT=$ac_cv_objext
2307 ac_objext=$OBJEXT
2308 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2309 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2310 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2311   echo $ECHO_N "(cached) $ECHO_C" >&6
2312 else
2313   cat >conftest.$ac_ext <<_ACEOF
2314 /* confdefs.h.  */
2315 _ACEOF
2316 cat confdefs.h >>conftest.$ac_ext
2317 cat >>conftest.$ac_ext <<_ACEOF
2318 /* end confdefs.h.  */
2319
2320 int
2321 main ()
2322 {
2323 #ifndef __GNUC__
2324        choke me
2325 #endif
2326
2327   ;
2328   return 0;
2329 }
2330 _ACEOF
2331 rm -f conftest.$ac_objext
2332 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2333   (eval $ac_compile) 2>conftest.er1
2334   ac_status=$?
2335   grep -v '^ *+' conftest.er1 >conftest.err
2336   rm -f conftest.er1
2337   cat conftest.err >&5
2338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339   (exit $ac_status); } &&
2340          { ac_try='test -z "$ac_c_werror_flag"
2341                          || test ! -s conftest.err'
2342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2343   (eval $ac_try) 2>&5
2344   ac_status=$?
2345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2346   (exit $ac_status); }; } &&
2347          { ac_try='test -s conftest.$ac_objext'
2348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2349   (eval $ac_try) 2>&5
2350   ac_status=$?
2351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352   (exit $ac_status); }; }; then
2353   ac_compiler_gnu=yes
2354 else
2355   echo "$as_me: failed program was:" >&5
2356 sed 's/^/| /' conftest.$ac_ext >&5
2357
2358 ac_compiler_gnu=no
2359 fi
2360 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2361 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2362
2363 fi
2364 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2365 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2366 GCC=`test $ac_compiler_gnu = yes && echo yes`
2367 ac_test_CFLAGS=${CFLAGS+set}
2368 ac_save_CFLAGS=$CFLAGS
2369 CFLAGS="-g"
2370 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2371 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2372 if test "${ac_cv_prog_cc_g+set}" = set; then
2373   echo $ECHO_N "(cached) $ECHO_C" >&6
2374 else
2375   cat >conftest.$ac_ext <<_ACEOF
2376 /* confdefs.h.  */
2377 _ACEOF
2378 cat confdefs.h >>conftest.$ac_ext
2379 cat >>conftest.$ac_ext <<_ACEOF
2380 /* end confdefs.h.  */
2381
2382 int
2383 main ()
2384 {
2385
2386   ;
2387   return 0;
2388 }
2389 _ACEOF
2390 rm -f conftest.$ac_objext
2391 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2392   (eval $ac_compile) 2>conftest.er1
2393   ac_status=$?
2394   grep -v '^ *+' conftest.er1 >conftest.err
2395   rm -f conftest.er1
2396   cat conftest.err >&5
2397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398   (exit $ac_status); } &&
2399          { ac_try='test -z "$ac_c_werror_flag"
2400                          || test ! -s conftest.err'
2401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2402   (eval $ac_try) 2>&5
2403   ac_status=$?
2404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2405   (exit $ac_status); }; } &&
2406          { ac_try='test -s conftest.$ac_objext'
2407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2408   (eval $ac_try) 2>&5
2409   ac_status=$?
2410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2411   (exit $ac_status); }; }; then
2412   ac_cv_prog_cc_g=yes
2413 else
2414   echo "$as_me: failed program was:" >&5
2415 sed 's/^/| /' conftest.$ac_ext >&5
2416
2417 ac_cv_prog_cc_g=no
2418 fi
2419 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2420 fi
2421 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2422 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2423 if test "$ac_test_CFLAGS" = set; then
2424   CFLAGS=$ac_save_CFLAGS
2425 elif test $ac_cv_prog_cc_g = yes; then
2426   if test "$GCC" = yes; then
2427     CFLAGS="-g -O2"
2428   else
2429     CFLAGS="-g"
2430   fi
2431 else
2432   if test "$GCC" = yes; then
2433     CFLAGS="-O2"
2434   else
2435     CFLAGS=
2436   fi
2437 fi
2438 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2439 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2440 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2441   echo $ECHO_N "(cached) $ECHO_C" >&6
2442 else
2443   ac_cv_prog_cc_stdc=no
2444 ac_save_CC=$CC
2445 cat >conftest.$ac_ext <<_ACEOF
2446 /* confdefs.h.  */
2447 _ACEOF
2448 cat confdefs.h >>conftest.$ac_ext
2449 cat >>conftest.$ac_ext <<_ACEOF
2450 /* end confdefs.h.  */
2451 #include <stdarg.h>
2452 #include <stdio.h>
2453 #include <sys/types.h>
2454 #include <sys/stat.h>
2455 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2456 struct buf { int x; };
2457 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2458 static char *e (p, i)
2459      char **p;
2460      int i;
2461 {
2462   return p[i];
2463 }
2464 static char *f (char * (*g) (char **, int), char **p, ...)
2465 {
2466   char *s;
2467   va_list v;
2468   va_start (v,p);
2469   s = g (p, va_arg (v,int));
2470   va_end (v);
2471   return s;
2472 }
2473
2474 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2475    function prototypes and stuff, but not '\xHH' hex character constants.
2476    These don't provoke an error unfortunately, instead are silently treated
2477    as 'x'.  The following induces an error, until -std1 is added to get
2478    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2479    array size at least.  It's necessary to write '\x00'==0 to get something
2480    that's true only with -std1.  */
2481 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2482
2483 int test (int i, double x);
2484 struct s1 {int (*f) (int a);};
2485 struct s2 {int (*f) (double a);};
2486 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2487 int argc;
2488 char **argv;
2489 int
2490 main ()
2491 {
2492 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2493   ;
2494   return 0;
2495 }
2496 _ACEOF
2497 # Don't try gcc -ansi; that turns off useful extensions and
2498 # breaks some systems' header files.
2499 # AIX                   -qlanglvl=ansi
2500 # Ultrix and OSF/1      -std1
2501 # HP-UX 10.20 and later -Ae
2502 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2503 # SVR4                  -Xc -D__EXTENSIONS__
2504 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2505 do
2506   CC="$ac_save_CC $ac_arg"
2507   rm -f conftest.$ac_objext
2508 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2509   (eval $ac_compile) 2>conftest.er1
2510   ac_status=$?
2511   grep -v '^ *+' conftest.er1 >conftest.err
2512   rm -f conftest.er1
2513   cat conftest.err >&5
2514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515   (exit $ac_status); } &&
2516          { ac_try='test -z "$ac_c_werror_flag"
2517                          || test ! -s conftest.err'
2518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2519   (eval $ac_try) 2>&5
2520   ac_status=$?
2521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2522   (exit $ac_status); }; } &&
2523          { ac_try='test -s conftest.$ac_objext'
2524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2525   (eval $ac_try) 2>&5
2526   ac_status=$?
2527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2528   (exit $ac_status); }; }; then
2529   ac_cv_prog_cc_stdc=$ac_arg
2530 break
2531 else
2532   echo "$as_me: failed program was:" >&5
2533 sed 's/^/| /' conftest.$ac_ext >&5
2534
2535 fi
2536 rm -f conftest.err conftest.$ac_objext
2537 done
2538 rm -f conftest.$ac_ext conftest.$ac_objext
2539 CC=$ac_save_CC
2540
2541 fi
2542
2543 case "x$ac_cv_prog_cc_stdc" in
2544   x|xno)
2545     echo "$as_me:$LINENO: result: none needed" >&5
2546 echo "${ECHO_T}none needed" >&6 ;;
2547   *)
2548     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2549 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2550     CC="$CC $ac_cv_prog_cc_stdc" ;;
2551 esac
2552
2553 # Some people use a C++ compiler to compile C.  Since we use `exit',
2554 # in C++ we need to declare it.  In case someone uses the same compiler
2555 # for both compiling C and C++ we need to have the C++ compiler decide
2556 # the declaration of exit, since it's the most demanding environment.
2557 cat >conftest.$ac_ext <<_ACEOF
2558 #ifndef __cplusplus
2559   choke me
2560 #endif
2561 _ACEOF
2562 rm -f conftest.$ac_objext
2563 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2564   (eval $ac_compile) 2>conftest.er1
2565   ac_status=$?
2566   grep -v '^ *+' conftest.er1 >conftest.err
2567   rm -f conftest.er1
2568   cat conftest.err >&5
2569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570   (exit $ac_status); } &&
2571          { ac_try='test -z "$ac_c_werror_flag"
2572                          || test ! -s conftest.err'
2573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2574   (eval $ac_try) 2>&5
2575   ac_status=$?
2576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2577   (exit $ac_status); }; } &&
2578          { ac_try='test -s conftest.$ac_objext'
2579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2580   (eval $ac_try) 2>&5
2581   ac_status=$?
2582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2583   (exit $ac_status); }; }; then
2584   for ac_declaration in \
2585    '' \
2586    'extern "C" void std::exit (int) throw (); using std::exit;' \
2587    'extern "C" void std::exit (int); using std::exit;' \
2588    'extern "C" void exit (int) throw ();' \
2589    'extern "C" void exit (int);' \
2590    'void exit (int);'
2591 do
2592   cat >conftest.$ac_ext <<_ACEOF
2593 /* confdefs.h.  */
2594 _ACEOF
2595 cat confdefs.h >>conftest.$ac_ext
2596 cat >>conftest.$ac_ext <<_ACEOF
2597 /* end confdefs.h.  */
2598 $ac_declaration
2599 #include <stdlib.h>
2600 int
2601 main ()
2602 {
2603 exit (42);
2604   ;
2605   return 0;
2606 }
2607 _ACEOF
2608 rm -f conftest.$ac_objext
2609 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2610   (eval $ac_compile) 2>conftest.er1
2611   ac_status=$?
2612   grep -v '^ *+' conftest.er1 >conftest.err
2613   rm -f conftest.er1
2614   cat conftest.err >&5
2615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2616   (exit $ac_status); } &&
2617          { ac_try='test -z "$ac_c_werror_flag"
2618                          || test ! -s conftest.err'
2619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2620   (eval $ac_try) 2>&5
2621   ac_status=$?
2622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2623   (exit $ac_status); }; } &&
2624          { ac_try='test -s conftest.$ac_objext'
2625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2626   (eval $ac_try) 2>&5
2627   ac_status=$?
2628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2629   (exit $ac_status); }; }; then
2630   :
2631 else
2632   echo "$as_me: failed program was:" >&5
2633 sed 's/^/| /' conftest.$ac_ext >&5
2634
2635 continue
2636 fi
2637 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2638   cat >conftest.$ac_ext <<_ACEOF
2639 /* confdefs.h.  */
2640 _ACEOF
2641 cat confdefs.h >>conftest.$ac_ext
2642 cat >>conftest.$ac_ext <<_ACEOF
2643 /* end confdefs.h.  */
2644 $ac_declaration
2645 int
2646 main ()
2647 {
2648 exit (42);
2649   ;
2650   return 0;
2651 }
2652 _ACEOF
2653 rm -f conftest.$ac_objext
2654 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2655   (eval $ac_compile) 2>conftest.er1
2656   ac_status=$?
2657   grep -v '^ *+' conftest.er1 >conftest.err
2658   rm -f conftest.er1
2659   cat conftest.err >&5
2660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661   (exit $ac_status); } &&
2662          { ac_try='test -z "$ac_c_werror_flag"
2663                          || test ! -s conftest.err'
2664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2665   (eval $ac_try) 2>&5
2666   ac_status=$?
2667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2668   (exit $ac_status); }; } &&
2669          { ac_try='test -s conftest.$ac_objext'
2670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2671   (eval $ac_try) 2>&5
2672   ac_status=$?
2673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2674   (exit $ac_status); }; }; then
2675   break
2676 else
2677   echo "$as_me: failed program was:" >&5
2678 sed 's/^/| /' conftest.$ac_ext >&5
2679
2680 fi
2681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2682 done
2683 rm -f conftest*
2684 if test -n "$ac_declaration"; then
2685   echo '#ifdef __cplusplus' >>confdefs.h
2686   echo $ac_declaration      >>confdefs.h
2687   echo '#endif'             >>confdefs.h
2688 fi
2689
2690 else
2691   echo "$as_me: failed program was:" >&5
2692 sed 's/^/| /' conftest.$ac_ext >&5
2693
2694 fi
2695 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2696 ac_ext=c
2697 ac_cpp='$CPP $CPPFLAGS'
2698 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2699 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2700 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2701
2702
2703 unset CFLAGS
2704
2705 #
2706 # Read the template
2707 #
2708 . "$srcdir/src/template/$template" || exit
2709
2710 # CFLAGS are selected so:
2711 # If the user specifies something in the environment, that is used.
2712 # else:  If the template file set something, that is used.
2713 # else:  If the compiler is GCC, then we use -O2.
2714 # else:  If the compiler is something else, then we use -0.
2715
2716 if test "$ac_env_CFLAGS_set" = set; then
2717   CFLAGS=$ac_env_CFLAGS_value
2718 elif test "${CFLAGS+set}" = set; then
2719   : # (keep what template set)
2720 elif test "$GCC" = yes; then
2721   CFLAGS="-O2"
2722 else
2723   # if the user selected debug mode, don't use -O
2724   if test "$enable_debug" != yes; then
2725     CFLAGS="-O"
2726   fi
2727 fi
2728
2729 # Some versions of GCC support some additional useful warning flags.
2730 # Check whether they are supported, and add them to CFLAGS if so.
2731
2732 if test "$GCC" = yes; then
2733
2734 # ICC pretends to be GCC but it's lying; it doesn't support these options.
2735 # So we have to check if "GCC" is really ICC.
2736
2737 cat >conftest.$ac_ext <<_ACEOF
2738 /* confdefs.h.  */
2739 _ACEOF
2740 cat confdefs.h >>conftest.$ac_ext
2741 cat >>conftest.$ac_ext <<_ACEOF
2742 /* end confdefs.h.  */
2743
2744 int
2745 main ()
2746 {
2747 #ifndef __INTEL_COMPILER
2748 choke me
2749 #endif
2750   ;
2751   return 0;
2752 }
2753 _ACEOF
2754 rm -f conftest.$ac_objext
2755 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2756   (eval $ac_compile) 2>conftest.er1
2757   ac_status=$?
2758   grep -v '^ *+' conftest.er1 >conftest.err
2759   rm -f conftest.er1
2760   cat conftest.err >&5
2761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2762   (exit $ac_status); } &&
2763          { ac_try='test -z "$ac_c_werror_flag"
2764                          || test ! -s conftest.err'
2765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2766   (eval $ac_try) 2>&5
2767   ac_status=$?
2768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2769   (exit $ac_status); }; } &&
2770          { ac_try='test -s conftest.$ac_objext'
2771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2772   (eval $ac_try) 2>&5
2773   ac_status=$?
2774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2775   (exit $ac_status); }; }; then
2776   ICC=yes
2777 else
2778   echo "$as_me: failed program was:" >&5
2779 sed 's/^/| /' conftest.$ac_ext >&5
2780
2781 ICC=no
2782 fi
2783 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2784
2785   if test "$ICC" = no; then
2786     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2787
2788     echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2789 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2790 pgac_save_CFLAGS=$CFLAGS
2791 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2792 cat >conftest.$ac_ext <<_ACEOF
2793 /* confdefs.h.  */
2794 _ACEOF
2795 cat confdefs.h >>conftest.$ac_ext
2796 cat >>conftest.$ac_ext <<_ACEOF
2797 /* end confdefs.h.  */
2798
2799 int
2800 main ()
2801 {
2802
2803   ;
2804   return 0;
2805 }
2806 _ACEOF
2807 rm -f conftest.$ac_objext
2808 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2809   (eval $ac_compile) 2>conftest.er1
2810   ac_status=$?
2811   grep -v '^ *+' conftest.er1 >conftest.err
2812   rm -f conftest.er1
2813   cat conftest.err >&5
2814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2815   (exit $ac_status); } &&
2816          { ac_try='test -z "$ac_c_werror_flag"
2817                          || test ! -s conftest.err'
2818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2819   (eval $ac_try) 2>&5
2820   ac_status=$?
2821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2822   (exit $ac_status); }; } &&
2823          { ac_try='test -s conftest.$ac_objext'
2824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2825   (eval $ac_try) 2>&5
2826   ac_status=$?
2827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2828   (exit $ac_status); }; }; then
2829   echo "$as_me:$LINENO: result: yes" >&5
2830 echo "${ECHO_T}yes" >&6
2831 else
2832   echo "$as_me: failed program was:" >&5
2833 sed 's/^/| /' conftest.$ac_ext >&5
2834
2835 CFLAGS="$pgac_save_CFLAGS"
2836                     echo "$as_me:$LINENO: result: no" >&5
2837 echo "${ECHO_T}no" >&6
2838 fi
2839 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2840
2841     echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2842 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2843 pgac_save_CFLAGS=$CFLAGS
2844 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2845 cat >conftest.$ac_ext <<_ACEOF
2846 /* confdefs.h.  */
2847 _ACEOF
2848 cat confdefs.h >>conftest.$ac_ext
2849 cat >>conftest.$ac_ext <<_ACEOF
2850 /* end confdefs.h.  */
2851
2852 int
2853 main ()
2854 {
2855
2856   ;
2857   return 0;
2858 }
2859 _ACEOF
2860 rm -f conftest.$ac_objext
2861 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2862   (eval $ac_compile) 2>conftest.er1
2863   ac_status=$?
2864   grep -v '^ *+' conftest.er1 >conftest.err
2865   rm -f conftest.er1
2866   cat conftest.err >&5
2867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2868   (exit $ac_status); } &&
2869          { ac_try='test -z "$ac_c_werror_flag"
2870                          || test ! -s conftest.err'
2871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2872   (eval $ac_try) 2>&5
2873   ac_status=$?
2874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2875   (exit $ac_status); }; } &&
2876          { ac_try='test -s conftest.$ac_objext'
2877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2878   (eval $ac_try) 2>&5
2879   ac_status=$?
2880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881   (exit $ac_status); }; }; then
2882   echo "$as_me:$LINENO: result: yes" >&5
2883 echo "${ECHO_T}yes" >&6
2884 else
2885   echo "$as_me: failed program was:" >&5
2886 sed 's/^/| /' conftest.$ac_ext >&5
2887
2888 CFLAGS="$pgac_save_CFLAGS"
2889                     echo "$as_me:$LINENO: result: no" >&5
2890 echo "${ECHO_T}no" >&6
2891 fi
2892 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2893
2894   else
2895     # Intel compiler has a bug/misoptimization in checking for
2896     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
2897     # CFLAGS.
2898     echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
2899 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6
2900 pgac_save_CFLAGS=$CFLAGS
2901 CFLAGS="$pgac_save_CFLAGS -mp1"
2902 cat >conftest.$ac_ext <<_ACEOF
2903 /* confdefs.h.  */
2904 _ACEOF
2905 cat confdefs.h >>conftest.$ac_ext
2906 cat >>conftest.$ac_ext <<_ACEOF
2907 /* end confdefs.h.  */
2908
2909 int
2910 main ()
2911 {
2912
2913   ;
2914   return 0;
2915 }
2916 _ACEOF
2917 rm -f conftest.$ac_objext
2918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2919   (eval $ac_compile) 2>conftest.er1
2920   ac_status=$?
2921   grep -v '^ *+' conftest.er1 >conftest.err
2922   rm -f conftest.er1
2923   cat conftest.err >&5
2924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2925   (exit $ac_status); } &&
2926          { ac_try='test -z "$ac_c_werror_flag"
2927                          || test ! -s conftest.err'
2928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2929   (eval $ac_try) 2>&5
2930   ac_status=$?
2931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2932   (exit $ac_status); }; } &&
2933          { ac_try='test -s conftest.$ac_objext'
2934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2935   (eval $ac_try) 2>&5
2936   ac_status=$?
2937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2938   (exit $ac_status); }; }; then
2939   echo "$as_me:$LINENO: result: yes" >&5
2940 echo "${ECHO_T}yes" >&6
2941 else
2942   echo "$as_me: failed program was:" >&5
2943 sed 's/^/| /' conftest.$ac_ext >&5
2944
2945 CFLAGS="$pgac_save_CFLAGS"
2946                     echo "$as_me:$LINENO: result: no" >&5
2947 echo "${ECHO_T}no" >&6
2948 fi
2949 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2950
2951   fi
2952
2953   # Disable strict-aliasing rules; needed for gcc 3.3+
2954   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
2955 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
2956 pgac_save_CFLAGS=$CFLAGS
2957 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
2958 cat >conftest.$ac_ext <<_ACEOF
2959 /* confdefs.h.  */
2960 _ACEOF
2961 cat confdefs.h >>conftest.$ac_ext
2962 cat >>conftest.$ac_ext <<_ACEOF
2963 /* end confdefs.h.  */
2964
2965 int
2966 main ()
2967 {
2968
2969   ;
2970   return 0;
2971 }
2972 _ACEOF
2973 rm -f conftest.$ac_objext
2974 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2975   (eval $ac_compile) 2>conftest.er1
2976   ac_status=$?
2977   grep -v '^ *+' conftest.er1 >conftest.err
2978   rm -f conftest.er1
2979   cat conftest.err >&5
2980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2981   (exit $ac_status); } &&
2982          { ac_try='test -z "$ac_c_werror_flag"
2983                          || test ! -s conftest.err'
2984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2985   (eval $ac_try) 2>&5
2986   ac_status=$?
2987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2988   (exit $ac_status); }; } &&
2989          { ac_try='test -s conftest.$ac_objext'
2990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2991   (eval $ac_try) 2>&5
2992   ac_status=$?
2993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2994   (exit $ac_status); }; }; then
2995   echo "$as_me:$LINENO: result: yes" >&5
2996 echo "${ECHO_T}yes" >&6
2997 else
2998   echo "$as_me: failed program was:" >&5
2999 sed 's/^/| /' conftest.$ac_ext >&5
3000
3001 CFLAGS="$pgac_save_CFLAGS"
3002                     echo "$as_me:$LINENO: result: no" >&5
3003 echo "${ECHO_T}no" >&6
3004 fi
3005 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3006
3007 elif test ${CC} = "xlc"; then
3008   # AIX xlc has to have strict aliasing turned off too
3009   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3010 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
3011 pgac_save_CFLAGS=$CFLAGS
3012 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3013 cat >conftest.$ac_ext <<_ACEOF
3014 /* confdefs.h.  */
3015 _ACEOF
3016 cat confdefs.h >>conftest.$ac_ext
3017 cat >>conftest.$ac_ext <<_ACEOF
3018 /* end confdefs.h.  */
3019
3020 int
3021 main ()
3022 {
3023
3024   ;
3025   return 0;
3026 }
3027 _ACEOF
3028 rm -f conftest.$ac_objext
3029 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3030   (eval $ac_compile) 2>conftest.er1
3031   ac_status=$?
3032   grep -v '^ *+' conftest.er1 >conftest.err
3033   rm -f conftest.er1
3034   cat conftest.err >&5
3035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3036   (exit $ac_status); } &&
3037          { ac_try='test -z "$ac_c_werror_flag"
3038                          || test ! -s conftest.err'
3039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3040   (eval $ac_try) 2>&5
3041   ac_status=$?
3042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3043   (exit $ac_status); }; } &&
3044          { ac_try='test -s conftest.$ac_objext'
3045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3046   (eval $ac_try) 2>&5
3047   ac_status=$?
3048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3049   (exit $ac_status); }; }; then
3050   echo "$as_me:$LINENO: result: yes" >&5
3051 echo "${ECHO_T}yes" >&6
3052 else
3053   echo "$as_me: failed program was:" >&5
3054 sed 's/^/| /' conftest.$ac_ext >&5
3055
3056 CFLAGS="$pgac_save_CFLAGS"
3057                     echo "$as_me:$LINENO: result: no" >&5
3058 echo "${ECHO_T}no" >&6
3059 fi
3060 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3061
3062 fi
3063
3064 # supply -g if --enable-debug
3065 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3066   CFLAGS="$CFLAGS -g"
3067 fi
3068
3069 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3070 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3071
3072 # We already have this in Makefile.win32, but configure needs it too
3073 if test "$PORTNAME" = "win32"; then
3074   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3075 fi
3076
3077 # Check if the compiler still works with the template settings
3078 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3079 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
3080 cat >conftest.$ac_ext <<_ACEOF
3081 /* confdefs.h.  */
3082 _ACEOF
3083 cat confdefs.h >>conftest.$ac_ext
3084 cat >>conftest.$ac_ext <<_ACEOF
3085 /* end confdefs.h.  */
3086
3087 int
3088 main ()
3089 {
3090 return 0;
3091   ;
3092   return 0;
3093 }
3094 _ACEOF
3095 rm -f conftest.$ac_objext conftest$ac_exeext
3096 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3097   (eval $ac_link) 2>conftest.er1
3098   ac_status=$?
3099   grep -v '^ *+' conftest.er1 >conftest.err
3100   rm -f conftest.er1
3101   cat conftest.err >&5
3102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3103   (exit $ac_status); } &&
3104          { ac_try='test -z "$ac_c_werror_flag"
3105                          || test ! -s conftest.err'
3106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3107   (eval $ac_try) 2>&5
3108   ac_status=$?
3109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3110   (exit $ac_status); }; } &&
3111          { ac_try='test -s conftest$ac_exeext'
3112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3113   (eval $ac_try) 2>&5
3114   ac_status=$?
3115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3116   (exit $ac_status); }; }; then
3117   echo "$as_me:$LINENO: result: yes" >&5
3118 echo "${ECHO_T}yes" >&6
3119 else
3120   echo "$as_me: failed program was:" >&5
3121 sed 's/^/| /' conftest.$ac_ext >&5
3122
3123 echo "$as_me:$LINENO: result: no" >&5
3124 echo "${ECHO_T}no" >&6
3125    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3126 echo "$as_me: error: cannot proceed" >&2;}
3127    { (exit 1); exit 1; }; }
3128 fi
3129 rm -f conftest.err conftest.$ac_objext \
3130       conftest$ac_exeext conftest.$ac_ext
3131
3132 # Defend against gcc -ffast-math
3133 if test "$GCC" = yes; then
3134 cat >conftest.$ac_ext <<_ACEOF
3135 /* confdefs.h.  */
3136 _ACEOF
3137 cat confdefs.h >>conftest.$ac_ext
3138 cat >>conftest.$ac_ext <<_ACEOF
3139 /* end confdefs.h.  */
3140
3141 int
3142 main ()
3143 {
3144 #ifdef __FAST_MATH__
3145 choke me
3146 #endif
3147   ;
3148   return 0;
3149 }
3150 _ACEOF
3151 rm -f conftest.$ac_objext
3152 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3153   (eval $ac_compile) 2>conftest.er1
3154   ac_status=$?
3155   grep -v '^ *+' conftest.er1 >conftest.err
3156   rm -f conftest.er1
3157   cat conftest.err >&5
3158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3159   (exit $ac_status); } &&
3160          { ac_try='test -z "$ac_c_werror_flag"
3161                          || test ! -s conftest.err'
3162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3163   (eval $ac_try) 2>&5
3164   ac_status=$?
3165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3166   (exit $ac_status); }; } &&
3167          { ac_try='test -s conftest.$ac_objext'
3168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3169   (eval $ac_try) 2>&5
3170   ac_status=$?
3171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3172   (exit $ac_status); }; }; then
3173   :
3174 else
3175   echo "$as_me: failed program was:" >&5
3176 sed 's/^/| /' conftest.$ac_ext >&5
3177
3178 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3179 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3180    { (exit 1); exit 1; }; }
3181 fi
3182 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3183 fi
3184
3185 ac_ext=c
3186 ac_cpp='$CPP $CPPFLAGS'
3187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3190 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3191 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3192 # On Suns, sometimes $CPP names a directory.
3193 if test -n "$CPP" && test -d "$CPP"; then
3194   CPP=
3195 fi
3196 if test -z "$CPP"; then
3197   if test "${ac_cv_prog_CPP+set}" = set; then
3198   echo $ECHO_N "(cached) $ECHO_C" >&6
3199 else
3200       # Double quotes because CPP needs to be expanded
3201     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3202     do
3203       ac_preproc_ok=false
3204 for ac_c_preproc_warn_flag in '' yes
3205 do
3206   # Use a header file that comes with gcc, so configuring glibc
3207   # with a fresh cross-compiler works.
3208   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3209   # <limits.h> exists even on freestanding compilers.
3210   # On the NeXT, cc -E runs the code through the compiler's parser,
3211   # not just through cpp. "Syntax error" is here to catch this case.
3212   cat >conftest.$ac_ext <<_ACEOF
3213 /* confdefs.h.  */
3214 _ACEOF
3215 cat confdefs.h >>conftest.$ac_ext
3216 cat >>conftest.$ac_ext <<_ACEOF
3217 /* end confdefs.h.  */
3218 #ifdef __STDC__
3219 # include <limits.h>
3220 #else
3221 # include <assert.h>
3222 #endif
3223                      Syntax error
3224 _ACEOF
3225 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3226   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3227   ac_status=$?
3228   grep -v '^ *+' conftest.er1 >conftest.err
3229   rm -f conftest.er1
3230   cat conftest.err >&5
3231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3232   (exit $ac_status); } >/dev/null; then
3233   if test -s conftest.err; then
3234     ac_cpp_err=$ac_c_preproc_warn_flag
3235     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3236   else
3237     ac_cpp_err=
3238   fi
3239 else
3240   ac_cpp_err=yes
3241 fi
3242 if test -z "$ac_cpp_err"; then
3243   :
3244 else
3245   echo "$as_me: failed program was:" >&5
3246 sed 's/^/| /' conftest.$ac_ext >&5
3247
3248   # Broken: fails on valid input.
3249 continue
3250 fi
3251 rm -f conftest.err conftest.$ac_ext
3252
3253   # OK, works on sane cases.  Now check whether non-existent headers
3254   # can be detected and how.
3255   cat >conftest.$ac_ext <<_ACEOF
3256 /* confdefs.h.  */
3257 _ACEOF
3258 cat confdefs.h >>conftest.$ac_ext
3259 cat >>conftest.$ac_ext <<_ACEOF
3260 /* end confdefs.h.  */
3261 #include <ac_nonexistent.h>
3262 _ACEOF
3263 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3264   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3265   ac_status=$?
3266   grep -v '^ *+' conftest.er1 >conftest.err
3267   rm -f conftest.er1
3268   cat conftest.err >&5
3269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3270   (exit $ac_status); } >/dev/null; then
3271   if test -s conftest.err; then
3272     ac_cpp_err=$ac_c_preproc_warn_flag
3273     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3274   else
3275     ac_cpp_err=
3276   fi
3277 else
3278   ac_cpp_err=yes
3279 fi
3280 if test -z "$ac_cpp_err"; then
3281   # Broken: success on invalid input.
3282 continue
3283 else
3284   echo "$as_me: failed program was:" >&5
3285 sed 's/^/| /' conftest.$ac_ext >&5
3286
3287   # Passes both tests.
3288 ac_preproc_ok=:
3289 break
3290 fi
3291 rm -f conftest.err conftest.$ac_ext
3292
3293 done
3294 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3295 rm -f conftest.err conftest.$ac_ext
3296 if $ac_preproc_ok; then
3297   break
3298 fi
3299
3300     done
3301     ac_cv_prog_CPP=$CPP
3302
3303 fi
3304   CPP=$ac_cv_prog_CPP
3305 else
3306   ac_cv_prog_CPP=$CPP
3307 fi
3308 echo "$as_me:$LINENO: result: $CPP" >&5
3309 echo "${ECHO_T}$CPP" >&6
3310 ac_preproc_ok=false
3311 for ac_c_preproc_warn_flag in '' yes
3312 do
3313   # Use a header file that comes with gcc, so configuring glibc
3314   # with a fresh cross-compiler works.
3315   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3316   # <limits.h> exists even on freestanding compilers.
3317   # On the NeXT, cc -E runs the code through the compiler's parser,
3318   # not just through cpp. "Syntax error" is here to catch this case.
3319   cat >conftest.$ac_ext <<_ACEOF
3320 /* confdefs.h.  */
3321 _ACEOF
3322 cat confdefs.h >>conftest.$ac_ext
3323 cat >>conftest.$ac_ext <<_ACEOF
3324 /* end confdefs.h.  */
3325 #ifdef __STDC__
3326 # include <limits.h>
3327 #else
3328 # include <assert.h>
3329 #endif
3330                      Syntax error
3331 _ACEOF
3332 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3333   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3334   ac_status=$?
3335   grep -v '^ *+' conftest.er1 >conftest.err
3336   rm -f conftest.er1
3337   cat conftest.err >&5
3338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3339   (exit $ac_status); } >/dev/null; then
3340   if test -s conftest.err; then
3341     ac_cpp_err=$ac_c_preproc_warn_flag
3342     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3343   else
3344     ac_cpp_err=
3345   fi
3346 else
3347   ac_cpp_err=yes
3348 fi
3349 if test -z "$ac_cpp_err"; then
3350   :
3351 else
3352   echo "$as_me: failed program was:" >&5
3353 sed 's/^/| /' conftest.$ac_ext >&5
3354
3355   # Broken: fails on valid input.
3356 continue
3357 fi
3358 rm -f conftest.err conftest.$ac_ext
3359
3360   # OK, works on sane cases.  Now check whether non-existent headers
3361   # can be detected and how.
3362   cat >conftest.$ac_ext <<_ACEOF
3363 /* confdefs.h.  */
3364 _ACEOF
3365 cat confdefs.h >>conftest.$ac_ext
3366 cat >>conftest.$ac_ext <<_ACEOF
3367 /* end confdefs.h.  */
3368 #include <ac_nonexistent.h>
3369 _ACEOF
3370 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3371   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3372   ac_status=$?
3373   grep -v '^ *+' conftest.er1 >conftest.err
3374   rm -f conftest.er1
3375   cat conftest.err >&5
3376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3377   (exit $ac_status); } >/dev/null; then
3378   if test -s conftest.err; then
3379     ac_cpp_err=$ac_c_preproc_warn_flag
3380     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3381   else
3382     ac_cpp_err=
3383   fi
3384 else
3385   ac_cpp_err=yes
3386 fi
3387 if test -z "$ac_cpp_err"; then
3388   # Broken: success on invalid input.
3389 continue
3390 else
3391   echo "$as_me: failed program was:" >&5
3392 sed 's/^/| /' conftest.$ac_ext >&5
3393
3394   # Passes both tests.
3395 ac_preproc_ok=:
3396 break
3397 fi
3398 rm -f conftest.err conftest.$ac_ext
3399
3400 done
3401 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3402 rm -f conftest.err conftest.$ac_ext
3403 if $ac_preproc_ok; then
3404   :
3405 else
3406   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3407 See \`config.log' for more details." >&5
3408 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3409 See \`config.log' for more details." >&2;}
3410    { (exit 1); exit 1; }; }
3411 fi
3412
3413 ac_ext=c
3414 ac_cpp='$CPP $CPPFLAGS'
3415 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3416 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3417 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3418
3419
3420
3421 # Create compiler version string
3422 if test x"$GCC" = x"yes" ; then
3423   cc_string="GCC `${CC} --version | sed q`"
3424 else
3425   cc_string=$CC
3426 fi
3427
3428 cat >>confdefs.h <<_ACEOF
3429 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3430 _ACEOF
3431
3432
3433
3434 #
3435 # Set up TAS assembly code if needed; the template file has now had its
3436 # chance to request this.
3437 #
3438           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3439
3440
3441 if test "$need_tas" = yes ; then
3442   TAS=tas.o
3443 else
3444   TAS=""
3445 fi
3446
3447
3448
3449 #
3450 # Automatic dependency tracking
3451 #
3452
3453
3454
3455 # Check whether --enable-depend or --disable-depend was given.
3456 if test "${enable_depend+set}" = set; then
3457   enableval="$enable_depend"
3458
3459   case $enableval in
3460     yes)
3461       autodepend=yes
3462       ;;
3463     no)
3464       :
3465       ;;
3466     *)
3467       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3468 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3469    { (exit 1); exit 1; }; }
3470       ;;
3471   esac
3472
3473 else
3474   enable_depend=no
3475
3476 fi;
3477
3478
3479
3480
3481 #
3482 # Enable assert checks
3483 #
3484
3485
3486
3487 # Check whether --enable-cassert or --disable-cassert was given.
3488 if test "${enable_cassert+set}" = set; then
3489   enableval="$enable_cassert"
3490
3491   case $enableval in
3492     yes)
3493
3494 cat >>confdefs.h <<\_ACEOF
3495 #define USE_ASSERT_CHECKING 1
3496 _ACEOF
3497
3498       ;;
3499     no)
3500       :
3501       ;;
3502     *)
3503       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3504 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3505    { (exit 1); exit 1; }; }
3506       ;;
3507   esac
3508
3509 else
3510   enable_cassert=no
3511
3512 fi;
3513
3514
3515
3516 #
3517 # Include directories
3518 #
3519 ac_save_IFS=$IFS
3520 IFS="${IFS}${PATH_SEPARATOR}"
3521 # SRCH_INC comes from the template file
3522 for dir in $with_includes $SRCH_INC; do
3523   if test -d "$dir"; then
3524     INCLUDES="$INCLUDES -I$dir"
3525   else
3526     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3527 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3528   fi
3529 done
3530 IFS=$ac_save_IFS
3531
3532
3533
3534 #
3535 # Library directories
3536 #
3537 ac_save_IFS=$IFS
3538 IFS="${IFS}${PATH_SEPARATOR}"
3539 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3540 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3541   if test -d "$dir"; then
3542     LIBDIRS="$LIBDIRS -L$dir"
3543   else
3544     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3545 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3546   fi
3547 done
3548 IFS=$ac_save_IFS
3549
3550 #
3551 # Enable thread-safe client libraries
3552 #
3553 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3554 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3555
3556
3557
3558 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3559 if test "${enable_thread_safety+set}" = set; then
3560   enableval="$enable_thread_safety"
3561
3562   case $enableval in
3563     yes)
3564       :
3565       ;;
3566     no)
3567       :
3568       ;;
3569     *)
3570       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3571 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3572    { (exit 1); exit 1; }; }
3573       ;;
3574   esac
3575
3576 else
3577   enable_thread_safety=no
3578
3579 fi;
3580
3581
3582
3583
3584 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3585 if test "${enable_thread_safety_force+set}" = set; then
3586   enableval="$enable_thread_safety_force"
3587
3588   case $enableval in
3589     yes)
3590       :
3591       ;;
3592     no)
3593       :
3594       ;;
3595     *)
3596       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3597 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3598    { (exit 1); exit 1; }; }
3599       ;;
3600   esac
3601
3602 else
3603   enable_thread_safety_force=no
3604
3605 fi;
3606
3607 if test "$enable_thread_safety" = yes -o \
3608         "$enable_thread_safety_force" = yes; then
3609   enable_thread_safety="yes"    # for 'force'
3610
3611 cat >>confdefs.h <<\_ACEOF
3612 #define ENABLE_THREAD_SAFETY 1
3613 _ACEOF
3614
3615 fi
3616 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3617 echo "${ECHO_T}$enable_thread_safety" >&6
3618
3619
3620 #
3621 # Optionally build Tcl modules (PL/Tcl)
3622 #
3623 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3624 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3625
3626
3627
3628
3629 # Check whether --with-tcl or --without-tcl was given.
3630 if test "${with_tcl+set}" = set; then
3631   withval="$with_tcl"
3632
3633   case $withval in
3634     yes)
3635       :
3636       ;;
3637     no)
3638       :
3639       ;;
3640     *)
3641       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3642 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3643    { (exit 1); exit 1; }; }
3644       ;;
3645   esac
3646
3647 else
3648   with_tcl=no
3649
3650 fi;
3651
3652 echo "$as_me:$LINENO: result: $with_tcl" >&5
3653 echo "${ECHO_T}$with_tcl" >&6
3654
3655
3656 # We see if the path to the Tcl/Tk configuration scripts is specified.
3657 # This will override the use of tclsh to find the paths to search.
3658
3659
3660
3661
3662
3663 # Check whether --with-tclconfig or --without-tclconfig was given.
3664 if test "${with_tclconfig+set}" = set; then
3665   withval="$with_tclconfig"
3666
3667   case $withval in
3668     yes)
3669       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3670 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3671    { (exit 1); exit 1; }; }
3672       ;;
3673     no)
3674       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3675 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3676    { (exit 1); exit 1; }; }
3677       ;;
3678     *)
3679
3680       ;;
3681   esac
3682
3683 fi;
3684
3685
3686 #
3687 # Optionally build Perl modules (PL/Perl)
3688 #
3689 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3690 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3691
3692
3693
3694
3695 # Check whether --with-perl or --without-perl was given.
3696 if test "${with_perl+set}" = set; then
3697   withval="$with_perl"
3698
3699   case $withval in
3700     yes)
3701       :
3702       ;;
3703     no)
3704       :
3705       ;;
3706     *)
3707       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3708 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3709    { (exit 1); exit 1; }; }
3710       ;;
3711   esac
3712
3713 else
3714   with_perl=no
3715
3716 fi;
3717
3718 echo "$as_me:$LINENO: result: $with_perl" >&5
3719 echo "${ECHO_T}$with_perl" >&6
3720
3721
3722 #
3723 # Optionally build Python modules (PL/Python)
3724 #
3725 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3726 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3727
3728
3729
3730
3731 # Check whether --with-python or --without-python was given.
3732 if test "${with_python+set}" = set; then
3733   withval="$with_python"
3734
3735   case $withval in
3736     yes)
3737       :
3738       ;;
3739     no)
3740       :
3741       ;;
3742     *)
3743       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3744 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3745    { (exit 1); exit 1; }; }
3746       ;;
3747   esac
3748
3749 else
3750   with_python=no
3751
3752 fi;
3753
3754 echo "$as_me:$LINENO: result: $with_python" >&5
3755 echo "${ECHO_T}$with_python" >&6
3756
3757
3758 #
3759 # Kerberos 5
3760 #
3761 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3762 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3763
3764
3765
3766
3767 # Check whether --with-krb5 or --without-krb5 was given.
3768 if test "${with_krb5+set}" = set; then
3769   withval="$with_krb5"
3770
3771   case $withval in
3772     yes)
3773
3774
3775 cat >>confdefs.h <<\_ACEOF
3776 #define KRB5 1
3777 _ACEOF
3778
3779   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3780
3781       ;;
3782     no)
3783       :
3784       ;;
3785     *)
3786       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3787 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3788    { (exit 1); exit 1; }; }
3789       ;;
3790   esac
3791
3792 else
3793   with_krb5=no
3794
3795 fi;
3796
3797 echo "$as_me:$LINENO: result: $with_krb5" >&5
3798 echo "${ECHO_T}$with_krb5" >&6
3799
3800
3801
3802
3803
3804
3805 #
3806 # Kerberos configuration parameters
3807 #
3808
3809
3810
3811
3812 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3813 if test "${with_krb_srvnam+set}" = set; then
3814   withval="$with_krb_srvnam"
3815
3816   case $withval in
3817     yes)
3818       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3819 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3820    { (exit 1); exit 1; }; }
3821       ;;
3822     no)
3823       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3824 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3825    { (exit 1); exit 1; }; }
3826       ;;
3827     *)
3828
3829       ;;
3830   esac
3831
3832 else
3833   with_krb_srvnam="postgres"
3834 fi;
3835
3836
3837 cat >>confdefs.h <<_ACEOF
3838 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3839 _ACEOF
3840
3841
3842
3843 #
3844 # PAM
3845 #
3846 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3847 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3848
3849
3850
3851
3852 # Check whether --with-pam or --without-pam was given.
3853 if test "${with_pam+set}" = set; then
3854   withval="$with_pam"
3855
3856   case $withval in
3857     yes)
3858
3859 cat >>confdefs.h <<\_ACEOF
3860 #define USE_PAM 1
3861 _ACEOF
3862
3863       ;;
3864     no)
3865       :
3866       ;;
3867     *)
3868       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3869 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3870    { (exit 1); exit 1; }; }
3871       ;;
3872   esac
3873
3874 else
3875   with_pam=no
3876
3877 fi;
3878
3879 echo "$as_me:$LINENO: result: $with_pam" >&5
3880 echo "${ECHO_T}$with_pam" >&6
3881
3882
3883
3884 #
3885 # LDAP
3886 #
3887 echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
3888 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
3889
3890
3891
3892
3893 # Check whether --with-ldap or --without-ldap was given.
3894 if test "${with_ldap+set}" = set; then
3895   withval="$with_ldap"
3896
3897   case $withval in
3898     yes)
3899
3900 cat >>confdefs.h <<\_ACEOF
3901 #define USE_LDAP 1
3902 _ACEOF
3903
3904       ;;
3905     no)
3906       :
3907       ;;
3908     *)
3909       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
3910 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
3911    { (exit 1); exit 1; }; }
3912       ;;
3913   esac
3914
3915 else
3916   with_ldap=no
3917
3918 fi;
3919
3920 echo "$as_me:$LINENO: result: $with_ldap" >&5
3921 echo "${ECHO_T}$with_ldap" >&6
3922
3923
3924
3925 #
3926 # Bonjour
3927 #
3928 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
3929 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
3930
3931
3932
3933
3934 # Check whether --with-bonjour or --without-bonjour was given.
3935 if test "${with_bonjour+set}" = set; then
3936   withval="$with_bonjour"
3937
3938   case $withval in
3939     yes)
3940
3941 cat >>confdefs.h <<\_ACEOF
3942 #define USE_BONJOUR 1
3943 _ACEOF
3944
3945       ;;
3946     no)
3947       :
3948       ;;
3949     *)
3950       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
3951 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
3952    { (exit 1); exit 1; }; }
3953       ;;
3954   esac
3955
3956 else
3957   with_bonjour=no
3958
3959 fi;
3960
3961 echo "$as_me:$LINENO: result: $with_bonjour" >&5
3962 echo "${ECHO_T}$with_bonjour" >&6
3963
3964
3965
3966 #
3967 # OpenSSL
3968 #
3969 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3970 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
3971
3972
3973
3974
3975 # Check whether --with-openssl or --without-openssl was given.
3976 if test "${with_openssl+set}" = set; then
3977   withval="$with_openssl"
3978
3979   case $withval in
3980     yes)
3981
3982 cat >>confdefs.h <<\_ACEOF
3983 #define USE_SSL 1
3984 _ACEOF
3985
3986       ;;
3987     no)
3988       :
3989       ;;
3990     *)
3991       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3992 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3993    { (exit 1); exit 1; }; }
3994       ;;
3995   esac
3996
3997 else
3998   with_openssl=no
3999
4000 fi;
4001
4002 echo "$as_me:$LINENO: result: $with_openssl" >&5
4003 echo "${ECHO_T}$with_openssl" >&6
4004
4005
4006
4007 #
4008 # Prefer libedit
4009 #
4010
4011
4012
4013
4014 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
4015 if test "${with_libedit_preferred+set}" = set; then
4016   withval="$with_libedit_preferred"
4017
4018   case $withval in
4019     yes)
4020       :
4021       ;;
4022     no)
4023       :
4024       ;;
4025     *)
4026       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4027 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4028    { (exit 1); exit 1; }; }
4029       ;;
4030   esac
4031
4032 else
4033   with_libedit_preferred=no
4034
4035 fi;
4036
4037
4038
4039 #
4040 # Readline
4041 #
4042
4043
4044
4045
4046 # Check whether --with-readline or --without-readline was given.
4047 if test "${with_readline+set}" = set; then
4048   withval="$with_readline"
4049
4050   case $withval in
4051     yes)
4052       :
4053       ;;
4054     no)
4055       :
4056       ;;
4057     *)
4058       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4059 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4060    { (exit 1); exit 1; }; }
4061       ;;
4062   esac
4063
4064 else
4065   with_readline=yes
4066
4067 fi;
4068
4069 # readline on MinGW has problems with backslashes in psql and other bugs.
4070 # This is particularly a problem with non-US code pages.
4071 # Therefore disable its use until we understand the cause. 2004-07-20
4072 if test "$PORTNAME" = "win32"; then
4073   if test "$with_readline" = yes; then
4074     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4075 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4076     with_readline=no
4077   fi
4078 fi
4079
4080
4081 #
4082 # Zlib
4083 #
4084
4085
4086
4087
4088 # Check whether --with-zlib or --without-zlib was given.
4089 if test "${with_zlib+set}" = set; then
4090   withval="$with_zlib"
4091
4092   case $withval in
4093     yes)
4094       :
4095       ;;
4096     no)
4097       :
4098       ;;
4099     *)
4100       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
4101 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
4102    { (exit 1); exit 1; }; }
4103       ;;
4104   esac
4105
4106 else
4107   with_zlib=yes
4108
4109 fi;
4110
4111
4112
4113 #
4114 # Elf
4115 #
4116
4117 # Assume system is ELF if it predefines __ELF__ as 1,
4118 # otherwise believe host_os based default.
4119 case $host_os in
4120     freebsd1*|freebsd2*) elf=no;;
4121     freebsd3*|freebsd4*) elf=yes;;
4122 esac
4123
4124
4125 echo "$as_me:$LINENO: checking for egrep" >&5
4126 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4127 if test "${ac_cv_prog_egrep+set}" = set; then
4128   echo $ECHO_N "(cached) $ECHO_C" >&6
4129 else
4130   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4131     then ac_cv_prog_egrep='grep -E'
4132     else ac_cv_prog_egrep='egrep'
4133     fi
4134 fi
4135 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4136 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4137  EGREP=$ac_cv_prog_egrep
4138
4139
4140 cat >conftest.$ac_ext <<_ACEOF
4141 /* confdefs.h.  */
4142 _ACEOF
4143 cat confdefs.h >>conftest.$ac_ext
4144 cat >>conftest.$ac_ext <<_ACEOF
4145 /* end confdefs.h.  */
4146 #if __ELF__
4147   yes
4148 #endif
4149
4150 _ACEOF
4151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4152   $EGREP "yes" >/dev/null 2>&1; then
4153   ELF_SYS=true
4154 else
4155   if test "X$elf" = "Xyes" ; then
4156   ELF_SYS=true
4157 else
4158   ELF_SYS=
4159 fi
4160 fi
4161 rm -f conftest*
4162
4163
4164
4165 #
4166 # Assignments
4167 #
4168
4169 CPPFLAGS="$CPPFLAGS $INCLUDES"
4170 LDFLAGS="$LDFLAGS $LIBDIRS"
4171
4172 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4173 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4174 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4175 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4176
4177
4178
4179 for ac_prog in gawk mawk nawk awk
4180 do
4181   # Extract the first word of "$ac_prog", so it can be a program name with args.
4182 set dummy $ac_prog; ac_word=$2
4183 echo "$as_me:$LINENO: checking for $ac_word" >&5
4184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185 if test "${ac_cv_prog_AWK+set}" = set; then
4186   echo $ECHO_N "(cached) $ECHO_C" >&6
4187 else
4188   if test -n "$AWK"; then
4189   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4190 else
4191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4192 for as_dir in $PATH
4193 do
4194   IFS=$as_save_IFS
4195   test -z "$as_dir" && as_dir=.
4196   for ac_exec_ext in '' $ac_executable_extensions; do
4197   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4198     ac_cv_prog_AWK="$ac_prog"
4199     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4200     break 2
4201   fi
4202 done
4203 done
4204
4205 fi
4206 fi
4207 AWK=$ac_cv_prog_AWK
4208 if test -n "$AWK"; then
4209   echo "$as_me:$LINENO: result: $AWK" >&5
4210 echo "${ECHO_T}$AWK" >&6
4211 else
4212   echo "$as_me:$LINENO: result: no" >&5
4213 echo "${ECHO_T}no" >&6
4214 fi
4215
4216   test -n "$AWK" && break
4217 done
4218
4219 echo "$as_me:$LINENO: checking for flex" >&5
4220 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4221 if test "${pgac_cv_path_flex+set}" = set; then
4222   echo $ECHO_N "(cached) $ECHO_C" >&6
4223 else
4224   # Let the user override the test
4225 if test -n "$FLEX"; then
4226   pgac_cv_path_flex=$FLEX
4227 else
4228   pgac_save_IFS=$IFS
4229   IFS=$PATH_SEPARATOR
4230   for pgac_dir in $PATH; do
4231     IFS=$pgac_save_IFS
4232     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4233       pgac_dir=`pwd`
4234     fi
4235     for pgac_prog in flex lex; do
4236       pgac_candidate="$pgac_dir/$pgac_prog"
4237       if test -f "$pgac_candidate" \
4238         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4239       then
4240         echo '%%'  > conftest.l
4241         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4242           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4243             pgac_broken_flex=$pgac_candidate
4244             continue
4245           fi
4246
4247           pgac_cv_path_flex=$pgac_candidate
4248           break 2
4249         fi
4250       fi
4251     done
4252   done
4253   rm -f conftest.l lex.yy.c
4254   : ${pgac_cv_path_flex=no}
4255 fi
4256
4257 fi
4258 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4259 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4260 if test x"$pgac_cv_path_flex" = x"no"; then
4261   if test -n "$pgac_broken_flex"; then
4262     { echo "$as_me:$LINENO: WARNING:
4263 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4264 *** should get version 2.5.4 or later." >&5
4265 echo "$as_me: WARNING:
4266 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4267 *** should get version 2.5.4 or later." >&2;}
4268   fi
4269
4270   { echo "$as_me:$LINENO: WARNING:
4271 *** Without Flex you will not be able to build PostgreSQL from CVS or
4272 *** change any of the scanner definition files.  You can obtain Flex from
4273 *** a GNU mirror site.  (If you are using the official distribution of
4274 *** PostgreSQL then you do not need to worry about this because the Flex
4275 *** output is pre-generated.)" >&5
4276 echo "$as_me: WARNING:
4277 *** Without Flex you will not be able to build PostgreSQL from CVS or
4278 *** change any of the scanner definition files.  You can obtain Flex from
4279 *** a GNU mirror site.  (If you are using the official distribution of
4280 *** PostgreSQL then you do not need to worry about this because the Flex
4281 *** output is pre-generated.)" >&2;}
4282 fi
4283
4284 if test x"$pgac_cv_path_flex" = x"no"; then
4285   FLEX=
4286 else
4287   FLEX=$pgac_cv_path_flex
4288 fi
4289
4290
4291
4292
4293 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4294 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4295 LN_S=$as_ln_s
4296 if test "$LN_S" = "ln -s"; then
4297   echo "$as_me:$LINENO: result: yes" >&5
4298 echo "${ECHO_T}yes" >&6
4299 else
4300   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4301 echo "${ECHO_T}no, using $LN_S" >&6
4302 fi
4303
4304
4305 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4306 if test "${with_gnu_ld+set}" = set; then
4307   withval="$with_gnu_ld"
4308   test "$withval" = no || with_gnu_ld=yes
4309 else
4310   with_gnu_ld=no
4311 fi;
4312 ac_prog=ld
4313 if test "$GCC" = yes; then
4314   # Check if gcc -print-prog-name=ld gives a path.
4315   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4316 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4317   case $host in
4318   *-*-mingw*)
4319     # gcc leaves a trailing carriage return which upsets mingw
4320     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4321   *)
4322     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4323   esac
4324   case "$ac_prog" in
4325     # Accept absolute paths.
4326     [\\/]* | [A-Za-z]:[\\/]*)
4327       re_direlt='/[^/][^/]*/\.\./'
4328       # Canonicalize the path of ld
4329       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4330       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4331         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4332       done
4333       test -z "$LD" && LD="$ac_prog"
4334       ;;
4335   "")
4336     # If it fails, then pretend we aren't using GCC.
4337     ac_prog=ld
4338     ;;
4339   *)
4340     # If it is relative, then search for the first ld in PATH.
4341     with_gnu_ld=unknown
4342     ;;
4343   esac
4344 elif test "$with_gnu_ld" = yes; then
4345   echo "$as_me:$LINENO: checking for GNU ld" >&5
4346 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4347 else
4348   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4349 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4350 fi
4351 if test "${ac_cv_path_LD+set}" = set; then
4352   echo $ECHO_N "(cached) $ECHO_C" >&6
4353 else
4354   if test -z "$LD"; then
4355   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4356   for ac_dir in $PATH; do
4357     test -z "$ac_dir" && ac_dir=.
4358     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4359       ac_cv_path_LD="$ac_dir/$ac_prog"
4360       # Check to see if the program is GNU ld.  I'd rather use --version,
4361       # but apparently some GNU ld's only accept -v.
4362       # Break only if it was the GNU/non-GNU ld that we prefer.
4363       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4364         test "$with_gnu_ld" != no && break
4365       else
4366         test "$with_gnu_ld" != yes && break
4367       fi
4368     fi
4369   done
4370   IFS="$ac_save_ifs"
4371 else
4372   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4373 fi
4374 fi
4375
4376 LD="$ac_cv_path_LD"
4377 if test -n "$LD"; then
4378   echo "$as_me:$LINENO: result: $LD" >&5
4379 echo "${ECHO_T}$LD" >&6
4380 else
4381   echo "$as_me:$LINENO: result: no" >&5
4382 echo "${ECHO_T}no" >&6
4383 fi
4384 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4385 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4386    { (exit 1); exit 1; }; }
4387 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4388 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4389 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4390   echo $ECHO_N "(cached) $ECHO_C" >&6
4391 else
4392   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4393 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4394   ac_cv_prog_gnu_ld=yes
4395 else
4396   ac_cv_prog_gnu_ld=no
4397 fi
4398 fi
4399 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4400 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4401 with_gnu_ld=$ac_cv_prog_gnu_ld
4402
4403
4404
4405
4406 case $host_os in sysv5*)
4407   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4408 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4409 if test "${pgac_cv_prog_ld_R+set}" = set; then
4410   echo $ECHO_N "(cached) $ECHO_C" >&6
4411 else
4412
4413     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4414     cat >conftest.$ac_ext <<_ACEOF
4415 /* confdefs.h.  */
4416 _ACEOF
4417 cat confdefs.h >>conftest.$ac_ext
4418 cat >>conftest.$ac_ext <<_ACEOF
4419 /* end confdefs.h.  */
4420
4421 int
4422 main ()
4423 {
4424
4425   ;
4426   return 0;
4427 }
4428 _ACEOF
4429 rm -f conftest.$ac_objext conftest$ac_exeext
4430 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4431   (eval $ac_link) 2>conftest.er1
4432   ac_status=$?
4433   grep -v '^ *+' conftest.er1 >conftest.err
4434   rm -f conftest.er1
4435   cat conftest.err >&5
4436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4437   (exit $ac_status); } &&
4438          { ac_try='test -z "$ac_c_werror_flag"
4439                          || test ! -s conftest.err'
4440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4441   (eval $ac_try) 2>&5
4442   ac_status=$?
4443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4444   (exit $ac_status); }; } &&
4445          { ac_try='test -s conftest$ac_exeext'
4446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4447   (eval $ac_try) 2>&5
4448   ac_status=$?
4449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4450   (exit $ac_status); }; }; then
4451   pgac_cv_prog_ld_R=yes
4452 else
4453   echo "$as_me: failed program was:" >&5
4454 sed 's/^/| /' conftest.$ac_ext >&5
4455
4456 pgac_cv_prog_ld_R=no
4457 fi
4458 rm -f conftest.err conftest.$ac_objext \
4459       conftest$ac_exeext conftest.$ac_ext
4460     LDFLAGS=$pgac_save_LDFLAGS
4461
4462 fi
4463 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4464 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4465   ld_R_works=$pgac_cv_prog_ld_R
4466
4467 esac
4468 if test -n "$ac_tool_prefix"; then
4469   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4470 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4471 echo "$as_me:$LINENO: checking for $ac_word" >&5
4472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4473 if test "${ac_cv_prog_RANLIB+set}" = set; then
4474   echo $ECHO_N "(cached) $ECHO_C" >&6
4475 else
4476   if test -n "$RANLIB"; then
4477   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4478 else
4479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4480 for as_dir in $PATH
4481 do
4482   IFS=$as_save_IFS
4483   test -z "$as_dir" && as_dir=.
4484   for ac_exec_ext in '' $ac_executable_extensions; do
4485   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4486     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4487     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4488     break 2
4489   fi
4490 done
4491 done
4492
4493 fi
4494 fi
4495 RANLIB=$ac_cv_prog_RANLIB
4496 if test -n "$RANLIB"; then
4497   echo "$as_me:$LINENO: result: $RANLIB" >&5
4498 echo "${ECHO_T}$RANLIB" >&6
4499 else
4500   echo "$as_me:$LINENO: result: no" >&5
4501 echo "${ECHO_T}no" >&6
4502 fi
4503
4504 fi
4505 if test -z "$ac_cv_prog_RANLIB"; then
4506   ac_ct_RANLIB=$RANLIB
4507   # Extract the first word of "ranlib", so it can be a program name with args.
4508 set dummy ranlib; ac_word=$2
4509 echo "$as_me:$LINENO: checking for $ac_word" >&5
4510 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4511 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4512   echo $ECHO_N "(cached) $ECHO_C" >&6
4513 else
4514   if test -n "$ac_ct_RANLIB"; then
4515   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4516 else
4517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518 for as_dir in $PATH
4519 do
4520   IFS=$as_save_IFS
4521   test -z "$as_dir" && as_dir=.
4522   for ac_exec_ext in '' $ac_executable_extensions; do
4523   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4524     ac_cv_prog_ac_ct_RANLIB="ranlib"
4525     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4526     break 2
4527   fi
4528 done
4529 done
4530
4531   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4532 fi
4533 fi
4534 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4535 if test -n "$ac_ct_RANLIB"; then
4536   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4537 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4538 else
4539   echo "$as_me:$LINENO: result: no" >&5
4540 echo "${ECHO_T}no" >&6
4541 fi
4542
4543   RANLIB=$ac_ct_RANLIB
4544 else
4545   RANLIB="$ac_cv_prog_RANLIB"
4546 fi
4547
4548 # Extract the first word of "tar", so it can be a program name with args.
4549 set dummy tar; ac_word=$2
4550 echo "$as_me:$LINENO: checking for $ac_word" >&5
4551 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4552 if test "${ac_cv_path_TAR+set}" = set; then
4553   echo $ECHO_N "(cached) $ECHO_C" >&6
4554 else
4555   case $TAR in
4556   [\\/]* | ?:[\\/]*)
4557   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4558   ;;
4559   *)
4560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4561 for as_dir in $PATH
4562 do
4563   IFS=$as_save_IFS
4564   test -z "$as_dir" && as_dir=.
4565   for ac_exec_ext in '' $ac_executable_extensions; do
4566   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4567     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4568     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4569     break 2
4570   fi
4571 done
4572 done
4573
4574   ;;
4575 esac
4576 fi
4577 TAR=$ac_cv_path_TAR
4578
4579 if test -n "$TAR"; then
4580   echo "$as_me:$LINENO: result: $TAR" >&5
4581 echo "${ECHO_T}$TAR" >&6
4582 else
4583   echo "$as_me:$LINENO: result: no" >&5
4584 echo "${ECHO_T}no" >&6
4585 fi
4586
4587
4588   if test -n "$ac_tool_prefix"; then
4589   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4590 set dummy ${ac_tool_prefix}strip; ac_word=$2
4591 echo "$as_me:$LINENO: checking for $ac_word" >&5
4592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4593 if test "${ac_cv_prog_STRIP+set}" = set; then
4594   echo $ECHO_N "(cached) $ECHO_C" >&6
4595 else
4596   if test -n "$STRIP"; then
4597   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4598 else
4599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600 for as_dir in $PATH
4601 do
4602   IFS=$as_save_IFS
4603   test -z "$as_dir" && as_dir=.
4604   for ac_exec_ext in '' $ac_executable_extensions; do
4605   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4606     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4607     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4608     break 2
4609   fi
4610 done
4611 done
4612
4613 fi
4614 fi
4615 STRIP=$ac_cv_prog_STRIP
4616 if test -n "$STRIP"; then
4617   echo "$as_me:$LINENO: result: $STRIP" >&5
4618 echo "${ECHO_T}$STRIP" >&6
4619 else
4620   echo "$as_me:$LINENO: result: no" >&5
4621 echo "${ECHO_T}no" >&6
4622 fi
4623
4624 fi
4625 if test -z "$ac_cv_prog_STRIP"; then
4626   ac_ct_STRIP=$STRIP
4627   # Extract the first word of "strip", so it can be a program name with args.
4628 set dummy strip; ac_word=$2
4629 echo "$as_me:$LINENO: checking for $ac_word" >&5
4630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4631 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4632   echo $ECHO_N "(cached) $ECHO_C" >&6
4633 else
4634   if test -n "$ac_ct_STRIP"; then
4635   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4636 else
4637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638 for as_dir in $PATH
4639 do
4640   IFS=$as_save_IFS
4641   test -z "$as_dir" && as_dir=.
4642   for ac_exec_ext in '' $ac_executable_extensions; do
4643   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644     ac_cv_prog_ac_ct_STRIP="strip"
4645     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4646     break 2
4647   fi
4648 done
4649 done
4650
4651   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4652 fi
4653 fi
4654 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4655 if test -n "$ac_ct_STRIP"; then
4656   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4657 echo "${ECHO_T}$ac_ct_STRIP" >&6
4658 else
4659   echo "$as_me:$LINENO: result: no" >&5
4660 echo "${ECHO_T}no" >&6
4661 fi
4662
4663   STRIP=$ac_ct_STRIP
4664 else
4665   STRIP="$ac_cv_prog_STRIP"
4666 fi
4667
4668
4669   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4670 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4671   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4672     STRIP_STATIC_LIB="$STRIP -x"
4673     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4674     echo "$as_me:$LINENO: result: yes" >&5
4675 echo "${ECHO_T}yes" >&6
4676   else
4677     STRIP_STATIC_LIB=:
4678     STRIP_SHARED_LIB=:
4679     echo "$as_me:$LINENO: result: no" >&5
4680 echo "${ECHO_T}no" >&6
4681   fi
4682
4683
4684
4685
4686 for ac_prog in 'bison -y'
4687 do
4688   # Extract the first word of "$ac_prog", so it can be a program name with args.
4689 set dummy $ac_prog; ac_word=$2
4690 echo "$as_me:$LINENO: checking for $ac_word" >&5
4691 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4692 if test "${ac_cv_prog_YACC+set}" = set; then
4693   echo $ECHO_N "(cached) $ECHO_C" >&6
4694 else
4695   if test -n "$YACC"; then
4696   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4697 else
4698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4699 for as_dir in $PATH
4700 do
4701   IFS=$as_save_IFS
4702   test -z "$as_dir" && as_dir=.
4703   for ac_exec_ext in '' $ac_executable_extensions; do
4704   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4705     ac_cv_prog_YACC="$ac_prog"
4706     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4707     break 2
4708   fi
4709 done
4710 done
4711
4712 fi
4713 fi
4714 YACC=$ac_cv_prog_YACC
4715 if test -n "$YACC"; then
4716   echo "$as_me:$LINENO: result: $YACC" >&5
4717 echo "${ECHO_T}$YACC" >&6
4718 else
4719   echo "$as_me:$LINENO: result: no" >&5
4720 echo "${ECHO_T}no" >&6
4721 fi
4722
4723   test -n "$YACC" && break
4724 done
4725
4726
4727 if test "$YACC"; then
4728   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4729     { echo "$as_me:$LINENO: WARNING:
4730 *** If you are going to modify the grammar files or build from CVS, the installed
4731 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4732 echo "$as_me: WARNING:
4733 *** If you are going to modify the grammar files or build from CVS, the installed
4734 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4735   fi
4736 fi
4737
4738 if test -z "$YACC"; then
4739   { echo "$as_me:$LINENO: WARNING:
4740 *** Without Bison you will not be able to build PostgreSQL from CVS or
4741 *** change any of the parser definition files.  You can obtain Bison from
4742 *** a GNU mirror site.  (If you are using the official distribution of
4743 *** PostgreSQL then you do not need to worry about this because the Bison
4744 *** output is pre-generated.)  To use a different yacc program (possible,
4745 *** but not recommended), set the environment variable YACC before running
4746 *** 'configure'." >&5
4747 echo "$as_me: WARNING:
4748 *** Without Bison you will not be able to build PostgreSQL from CVS or
4749 *** change any of the parser definition files.  You can obtain Bison from
4750 *** a GNU mirror site.  (If you are using the official distribution of
4751 *** PostgreSQL then you do not need to worry about this because the Bison
4752 *** output is pre-generated.)  To use a different yacc program (possible,
4753 *** but not recommended), set the environment variable YACC before running
4754 *** 'configure'." >&2;}
4755 fi
4756
4757
4758 # Extract the first word of "perl", so it can be a program name with args.
4759 set dummy perl; ac_word=$2
4760 echo "$as_me:$LINENO: checking for $ac_word" >&5
4761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4762 if test "${ac_cv_path_PERL+set}" = set; then
4763   echo $ECHO_N "(cached) $ECHO_C" >&6
4764 else
4765   case $PERL in
4766   [\\/]* | ?:[\\/]*)
4767   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4768   ;;
4769   *)
4770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4771 for as_dir in $PATH
4772 do
4773   IFS=$as_save_IFS
4774   test -z "$as_dir" && as_dir=.
4775   for ac_exec_ext in '' $ac_executable_extensions; do
4776   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4777     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4778     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4779     break 2
4780   fi
4781 done
4782 done
4783
4784   ;;
4785 esac
4786 fi
4787 PERL=$ac_cv_path_PERL
4788
4789 if test -n "$PERL"; then
4790   echo "$as_me:$LINENO: result: $PERL" >&5
4791 echo "${ECHO_T}$PERL" >&6
4792 else
4793   echo "$as_me:$LINENO: result: no" >&5
4794 echo "${ECHO_T}no" >&6
4795 fi
4796
4797 if test "$with_perl" = yes; then
4798
4799 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4800 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4801 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4802 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4803 echo "${ECHO_T}$perl_archlibexp" >&6
4804 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4805 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4806 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4807 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4808 echo "${ECHO_T}$perl_privlibexp" >&6
4809 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4810 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4811 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4812 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4813 echo "${ECHO_T}$perl_useshrplib" >&6
4814
4815 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4816 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4817 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4818 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4819 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4820 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4821 echo "${ECHO_T}$perl_embed_ldflags" >&6
4822 fi
4823
4824 if test "$with_python" = yes; then
4825   # Extract the first word of "python", so it can be a program name with args.
4826 set dummy python; ac_word=$2
4827 echo "$as_me:$LINENO: checking for $ac_word" >&5
4828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4829 if test "${ac_cv_path_PYTHON+set}" = set; then
4830   echo $ECHO_N "(cached) $ECHO_C" >&6
4831 else
4832   case $PYTHON in
4833   [\\/]* | ?:[\\/]*)
4834   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4835   ;;
4836   *)
4837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838 for as_dir in $PATH
4839 do
4840   IFS=$as_save_IFS
4841   test -z "$as_dir" && as_dir=.
4842   for ac_exec_ext in '' $ac_executable_extensions; do
4843   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4844     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4845     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4846     break 2
4847   fi
4848 done
4849 done
4850
4851   ;;
4852 esac
4853 fi
4854 PYTHON=$ac_cv_path_PYTHON
4855
4856 if test -n "$PYTHON"; then
4857   echo "$as_me:$LINENO: result: $PYTHON" >&5
4858 echo "${ECHO_T}$PYTHON" >&6
4859 else
4860   echo "$as_me:$LINENO: result: no" >&5
4861 echo "${ECHO_T}no" >&6
4862 fi
4863
4864 if test x"$PYTHON" = x""; then
4865   { { echo "$as_me:$LINENO: error: Python not found" >&5
4866 echo "$as_me: error: Python not found" >&2;}
4867    { (exit 1); exit 1; }; }
4868 fi
4869
4870
4871 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4872 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4873 if "${PYTHON}" 2>&- -c 'import distutils'
4874 then
4875     echo "$as_me:$LINENO: result: yes" >&5
4876 echo "${ECHO_T}yes" >&6
4877 else
4878     echo "$as_me:$LINENO: result: no" >&5
4879 echo "${ECHO_T}no" >&6
4880     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4881 echo "$as_me: error: distutils module not found" >&2;}
4882    { (exit 1); exit 1; }; }
4883 fi
4884 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4885 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4886 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4887 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')"`
4888 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4889
4890 # This should be enough of a message.
4891 echo "$as_me:$LINENO: result: $python_configdir" >&5
4892 echo "${ECHO_T}$python_configdir" >&6
4893
4894
4895 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4896 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4897
4898 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4899 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4900 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4901 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4902
4903 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4904 then
4905         # New way: use the official shared library
4906         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4907         python_libspec="-L${python_libdir} -l${ldlibrary}"
4908 else
4909         # Old way: use libpython from python_configdir
4910         python_libdir="${python_configdir}"
4911         python_libspec="-L${python_libdir} -lpython${python_version}"
4912 fi
4913
4914 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4915
4916 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4917 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4918
4919
4920 # threaded python is not supported on bsd's
4921 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4922 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
4923 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
4924 if test "$pythreads" = "1"; then
4925   echo "$as_me:$LINENO: result: yes" >&5
4926 echo "${ECHO_T}yes" >&6
4927   case $host_os in
4928   openbsd*|freebsd4*)
4929     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
4930 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
4931    { (exit 1); exit 1; }; }
4932     ;;
4933   esac
4934 else
4935   echo "$as_me:$LINENO: result: no" >&5
4936 echo "${ECHO_T}no" >&6
4937 fi
4938
4939
4940 fi
4941
4942 # Supply a numeric version string for use by 3rd party add-ons
4943 # awk -F is a regex on some platforms, and not on others, so make "." a tab
4944 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
4945 tr '.' '        ' |
4946 $AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
4947
4948 cat >>confdefs.h <<_ACEOF
4949 #define PG_VERSION_NUM $PG_VERSION_NUM
4950 _ACEOF
4951
4952
4953 ##
4954 ## Libraries
4955 ##
4956
4957 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
4958 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
4959 if test "${ac_cv_search_setproctitle+set}" = set; then
4960   echo $ECHO_N "(cached) $ECHO_C" >&6
4961 else
4962   ac_func_search_save_LIBS=$LIBS
4963 ac_cv_search_setproctitle=no
4964 cat >conftest.$ac_ext <<_ACEOF
4965 /* confdefs.h.  */
4966 _ACEOF
4967 cat confdefs.h >>conftest.$ac_ext
4968 cat >>conftest.$ac_ext <<_ACEOF
4969 /* end confdefs.h.  */
4970
4971 /* Override any gcc2 internal prototype to avoid an error.  */
4972 #ifdef __cplusplus
4973 extern "C"
4974 #endif
4975 /* We use char because int might match the return type of a gcc2
4976    builtin and then its argument prototype would still apply.  */
4977 char setproctitle ();
4978 int
4979 main ()
4980 {
4981 setproctitle ();
4982   ;
4983   return 0;
4984 }
4985 _ACEOF
4986 rm -f conftest.$ac_objext conftest$ac_exeext
4987 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4988   (eval $ac_link) 2>conftest.er1
4989   ac_status=$?
4990   grep -v '^ *+' conftest.er1 >conftest.err
4991   rm -f conftest.er1
4992   cat conftest.err >&5
4993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994   (exit $ac_status); } &&
4995          { ac_try='test -z "$ac_c_werror_flag"
4996                          || test ! -s conftest.err'
4997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4998   (eval $ac_try) 2>&5
4999   ac_status=$?
5000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001   (exit $ac_status); }; } &&
5002          { ac_try='test -s conftest$ac_exeext'
5003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5004   (eval $ac_try) 2>&5
5005   ac_status=$?
5006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5007   (exit $ac_status); }; }; then
5008   ac_cv_search_setproctitle="none required"
5009 else
5010   echo "$as_me: failed program was:" >&5
5011 sed 's/^/| /' conftest.$ac_ext >&5
5012
5013 fi
5014 rm -f conftest.err conftest.$ac_objext \
5015       conftest$ac_exeext conftest.$ac_ext
5016 if test "$ac_cv_search_setproctitle" = no; then
5017   for ac_lib in util; do
5018     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5019     cat >conftest.$ac_ext <<_ACEOF
5020 /* confdefs.h.  */
5021 _ACEOF
5022 cat confdefs.h >>conftest.$ac_ext
5023 cat >>conftest.$ac_ext <<_ACEOF
5024 /* end confdefs.h.  */
5025
5026 /* Override any gcc2 internal prototype to avoid an error.  */
5027 #ifdef __cplusplus
5028 extern "C"
5029 #endif
5030 /* We use char because int might match the return type of a gcc2
5031    builtin and then its argument prototype would still apply.  */
5032 char setproctitle ();
5033 int
5034 main ()
5035 {
5036 setproctitle ();
5037   ;
5038   return 0;
5039 }
5040 _ACEOF
5041 rm -f conftest.$ac_objext conftest$ac_exeext
5042 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5043   (eval $ac_link) 2>conftest.er1
5044   ac_status=$?
5045   grep -v '^ *+' conftest.er1 >conftest.err
5046   rm -f conftest.er1
5047   cat conftest.err >&5
5048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5049   (exit $ac_status); } &&
5050          { ac_try='test -z "$ac_c_werror_flag"
5051                          || test ! -s conftest.err'
5052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5053   (eval $ac_try) 2>&5
5054   ac_status=$?
5055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056   (exit $ac_status); }; } &&
5057          { ac_try='test -s conftest$ac_exeext'
5058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5059   (eval $ac_try) 2>&5
5060   ac_status=$?
5061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5062   (exit $ac_status); }; }; then
5063   ac_cv_search_setproctitle="-l$ac_lib"
5064 break
5065 else
5066   echo "$as_me: failed program was:" >&5
5067 sed 's/^/| /' conftest.$ac_ext >&5
5068
5069 fi
5070 rm -f conftest.err conftest.$ac_objext \
5071       conftest$ac_exeext conftest.$ac_ext
5072   done
5073 fi
5074 LIBS=$ac_func_search_save_LIBS
5075 fi
5076 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
5077 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
5078 if test "$ac_cv_search_setproctitle" != no; then
5079   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
5080
5081 fi
5082
5083 echo "$as_me:$LINENO: checking for library containing pow" >&5
5084 echo $ECHO_N "checking for library containing pow... $ECHO_C" >&6
5085 if test "${ac_cv_search_pow+set}" = set; then
5086   echo $ECHO_N "(cached) $ECHO_C" >&6
5087 else
5088   ac_func_search_save_LIBS=$LIBS
5089 ac_cv_search_pow=no
5090 cat >conftest.$ac_ext <<_ACEOF
5091 /* confdefs.h.  */
5092 _ACEOF
5093 cat confdefs.h >>conftest.$ac_ext
5094 cat >>conftest.$ac_ext <<_ACEOF
5095 /* end confdefs.h.  */
5096
5097 /* Override any gcc2 internal prototype to avoid an error.  */
5098 #ifdef __cplusplus
5099 extern "C"
5100 #endif
5101 /* We use char because int might match the return type of a gcc2
5102    builtin and then its argument prototype would still apply.  */
5103 char pow ();
5104 int
5105 main ()
5106 {
5107 pow ();
5108   ;
5109   return 0;
5110 }
5111 _ACEOF
5112 rm -f conftest.$ac_objext conftest$ac_exeext
5113 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5114   (eval $ac_link) 2>conftest.er1
5115   ac_status=$?
5116   grep -v '^ *+' conftest.er1 >conftest.err
5117   rm -f conftest.er1
5118   cat conftest.err >&5
5119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5120   (exit $ac_status); } &&
5121          { ac_try='test -z "$ac_c_werror_flag"
5122                          || test ! -s conftest.err'
5123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5124   (eval $ac_try) 2>&5
5125   ac_status=$?
5126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5127   (exit $ac_status); }; } &&
5128          { ac_try='test -s conftest$ac_exeext'
5129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5130   (eval $ac_try) 2>&5
5131   ac_status=$?
5132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133   (exit $ac_status); }; }; then
5134   ac_cv_search_pow="none required"
5135 else
5136   echo "$as_me: failed program was:" >&5
5137 sed 's/^/| /' conftest.$ac_ext >&5
5138
5139 fi
5140 rm -f conftest.err conftest.$ac_objext \
5141       conftest$ac_exeext conftest.$ac_ext
5142 if test "$ac_cv_search_pow" = no; then
5143   for ac_lib in m; do
5144     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5145     cat >conftest.$ac_ext <<_ACEOF
5146 /* confdefs.h.  */
5147 _ACEOF
5148 cat confdefs.h >>conftest.$ac_ext
5149 cat >>conftest.$ac_ext <<_ACEOF
5150 /* end confdefs.h.  */
5151
5152 /* Override any gcc2 internal prototype to avoid an error.  */
5153 #ifdef __cplusplus
5154 extern "C"
5155 #endif
5156 /* We use char because int might match the return type of a gcc2
5157    builtin and then its argument prototype would still apply.  */
5158 char pow ();
5159 int
5160 main ()
5161 {
5162 pow ();
5163   ;
5164   return 0;
5165 }
5166 _ACEOF
5167 rm -f conftest.$ac_objext conftest$ac_exeext
5168 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5169   (eval $ac_link) 2>conftest.er1
5170   ac_status=$?
5171   grep -v '^ *+' conftest.er1 >conftest.err
5172   rm -f conftest.er1
5173   cat conftest.err >&5
5174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5175   (exit $ac_status); } &&
5176          { ac_try='test -z "$ac_c_werror_flag"
5177                          || test ! -s conftest.err'
5178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5179   (eval $ac_try) 2>&5
5180   ac_status=$?
5181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182   (exit $ac_status); }; } &&
5183          { ac_try='test -s conftest$ac_exeext'
5184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5185   (eval $ac_try) 2>&5
5186   ac_status=$?
5187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5188   (exit $ac_status); }; }; then
5189   ac_cv_search_pow="-l$ac_lib"
5190 break
5191 else
5192   echo "$as_me: failed program was:" >&5
5193 sed 's/^/| /' conftest.$ac_ext >&5
5194
5195 fi
5196 rm -f conftest.err conftest.$ac_objext \
5197       conftest$ac_exeext conftest.$ac_ext
5198   done
5199 fi
5200 LIBS=$ac_func_search_save_LIBS
5201 fi
5202 echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
5203 echo "${ECHO_T}$ac_cv_search_pow" >&6
5204 if test "$ac_cv_search_pow" != no; then
5205   test "$ac_cv_search_pow" = "none required" || LIBS="$ac_cv_search_pow $LIBS"
5206
5207 fi
5208
5209 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5210 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5211 if test "${ac_cv_search_dlopen+set}" = set; then
5212   echo $ECHO_N "(cached) $ECHO_C" >&6
5213 else
5214   ac_func_search_save_LIBS=$LIBS
5215 ac_cv_search_dlopen=no
5216 cat >conftest.$ac_ext <<_ACEOF
5217 /* confdefs.h.  */
5218 _ACEOF
5219 cat confdefs.h >>conftest.$ac_ext
5220 cat >>conftest.$ac_ext <<_ACEOF
5221 /* end confdefs.h.  */
5222
5223 /* Override any gcc2 internal prototype to avoid an error.  */
5224 #ifdef __cplusplus
5225 extern "C"
5226 #endif
5227 /* We use char because int might match the return type of a gcc2
5228    builtin and then its argument prototype would still apply.  */
5229 char dlopen ();
5230 int
5231 main ()
5232 {
5233 dlopen ();
5234   ;
5235   return 0;
5236 }
5237 _ACEOF
5238 rm -f conftest.$ac_objext conftest$ac_exeext
5239 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5240   (eval $ac_link) 2>conftest.er1
5241   ac_status=$?
5242   grep -v '^ *+' conftest.er1 >conftest.err
5243   rm -f conftest.er1
5244   cat conftest.err >&5
5245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5246   (exit $ac_status); } &&
5247          { ac_try='test -z "$ac_c_werror_flag"
5248                          || test ! -s conftest.err'
5249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5250   (eval $ac_try) 2>&5
5251   ac_status=$?
5252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5253   (exit $ac_status); }; } &&
5254          { ac_try='test -s conftest$ac_exeext'
5255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5256   (eval $ac_try) 2>&5
5257   ac_status=$?
5258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5259   (exit $ac_status); }; }; then
5260   ac_cv_search_dlopen="none required"
5261 else
5262   echo "$as_me: failed program was:" >&5
5263 sed 's/^/| /' conftest.$ac_ext >&5
5264
5265 fi
5266 rm -f conftest.err conftest.$ac_objext \
5267       conftest$ac_exeext conftest.$ac_ext
5268 if test "$ac_cv_search_dlopen" = no; then
5269   for ac_lib in dl; do
5270     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5271     cat >conftest.$ac_ext <<_ACEOF
5272 /* confdefs.h.  */
5273 _ACEOF
5274 cat confdefs.h >>conftest.$ac_ext
5275 cat >>conftest.$ac_ext <<_ACEOF
5276 /* end confdefs.h.  */
5277
5278 /* Override any gcc2 internal prototype to avoid an error.  */
5279 #ifdef __cplusplus
5280 extern "C"
5281 #endif
5282 /* We use char because int might match the return type of a gcc2
5283    builtin and then its argument prototype would still apply.  */
5284 char dlopen ();
5285 int
5286 main ()
5287 {
5288 dlopen ();
5289   ;
5290   return 0;
5291 }
5292 _ACEOF
5293 rm -f conftest.$ac_objext conftest$ac_exeext
5294 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5295   (eval $ac_link) 2>conftest.er1
5296   ac_status=$?
5297   grep -v '^ *+' conftest.er1 >conftest.err
5298   rm -f conftest.er1
5299   cat conftest.err >&5
5300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301   (exit $ac_status); } &&
5302          { ac_try='test -z "$ac_c_werror_flag"
5303                          || test ! -s conftest.err'
5304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5305   (eval $ac_try) 2>&5
5306   ac_status=$?
5307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5308   (exit $ac_status); }; } &&
5309          { ac_try='test -s conftest$ac_exeext'
5310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5311   (eval $ac_try) 2>&5
5312   ac_status=$?
5313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5314   (exit $ac_status); }; }; then
5315   ac_cv_search_dlopen="-l$ac_lib"
5316 break
5317 else
5318   echo "$as_me: failed program was:" >&5
5319 sed 's/^/| /' conftest.$ac_ext >&5
5320
5321 fi
5322 rm -f conftest.err conftest.$ac_objext \
5323       conftest$ac_exeext conftest.$ac_ext
5324   done
5325 fi
5326 LIBS=$ac_func_search_save_LIBS
5327 fi
5328 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5329 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5330 if test "$ac_cv_search_dlopen" != no; then
5331   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5332
5333 fi
5334
5335 echo "$as_me:$LINENO: checking for library containing socket" >&5
5336 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5337 if test "${ac_cv_search_socket+set}" = set; then
5338   echo $ECHO_N "(cached) $ECHO_C" >&6
5339 else
5340   ac_func_search_save_LIBS=$LIBS
5341 ac_cv_search_socket=no
5342 cat >conftest.$ac_ext <<_ACEOF
5343 /* confdefs.h.  */
5344 _ACEOF
5345 cat confdefs.h >>conftest.$ac_ext
5346 cat >>conftest.$ac_ext <<_ACEOF
5347 /* end confdefs.h.  */
5348
5349 /* Override any gcc2 internal prototype to avoid an error.  */
5350 #ifdef __cplusplus
5351 extern "C"
5352 #endif
5353 /* We use char because int might match the return type of a gcc2
5354    builtin and then its argument prototype would still apply.  */
5355 char socket ();
5356 int
5357 main ()
5358 {
5359 socket ();
5360   ;
5361   return 0;
5362 }
5363 _ACEOF
5364 rm -f conftest.$ac_objext conftest$ac_exeext
5365 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5366   (eval $ac_link) 2>conftest.er1
5367   ac_status=$?
5368   grep -v '^ *+' conftest.er1 >conftest.err
5369   rm -f conftest.er1
5370   cat conftest.err >&5
5371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5372   (exit $ac_status); } &&
5373          { ac_try='test -z "$ac_c_werror_flag"
5374                          || test ! -s conftest.err'
5375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5376   (eval $ac_try) 2>&5
5377   ac_status=$?
5378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5379   (exit $ac_status); }; } &&
5380          { ac_try='test -s conftest$ac_exeext'
5381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5382   (eval $ac_try) 2>&5
5383   ac_status=$?
5384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5385   (exit $ac_status); }; }; then
5386   ac_cv_search_socket="none required"
5387 else
5388   echo "$as_me: failed program was:" >&5
5389 sed 's/^/| /' conftest.$ac_ext >&5
5390
5391 fi
5392 rm -f conftest.err conftest.$ac_objext \
5393       conftest$ac_exeext conftest.$ac_ext
5394 if test "$ac_cv_search_socket" = no; then
5395   for ac_lib in socket wsock32; do
5396     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5397     cat >conftest.$ac_ext <<_ACEOF
5398 /* confdefs.h.  */
5399 _ACEOF
5400 cat confdefs.h >>conftest.$ac_ext
5401 cat >>conftest.$ac_ext <<_ACEOF
5402 /* end confdefs.h.  */
5403
5404 /* Override any gcc2 internal prototype to avoid an error.  */
5405 #ifdef __cplusplus
5406 extern "C"
5407 #endif
5408 /* We use char because int might match the return type of a gcc2
5409    builtin and then its argument prototype would still apply.  */
5410 char socket ();
5411 int
5412 main ()
5413 {
5414 socket ();
5415   ;
5416   return 0;
5417 }
5418 _ACEOF
5419 rm -f conftest.$ac_objext conftest$ac_exeext
5420 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5421   (eval $ac_link) 2>conftest.er1
5422   ac_status=$?
5423   grep -v '^ *+' conftest.er1 >conftest.err
5424   rm -f conftest.er1
5425   cat conftest.err >&5
5426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5427   (exit $ac_status); } &&
5428          { ac_try='test -z "$ac_c_werror_flag"
5429                          || test ! -s conftest.err'
5430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5431   (eval $ac_try) 2>&5
5432   ac_status=$?
5433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434   (exit $ac_status); }; } &&
5435          { ac_try='test -s conftest$ac_exeext'
5436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5437   (eval $ac_try) 2>&5
5438   ac_status=$?
5439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440   (exit $ac_status); }; }; then
5441   ac_cv_search_socket="-l$ac_lib"
5442 break
5443 else
5444   echo "$as_me: failed program was:" >&5
5445 sed 's/^/| /' conftest.$ac_ext >&5
5446
5447 fi
5448 rm -f conftest.err conftest.$ac_objext \
5449       conftest$ac_exeext conftest.$ac_ext
5450   done
5451 fi
5452 LIBS=$ac_func_search_save_LIBS
5453 fi
5454 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5455 echo "${ECHO_T}$ac_cv_search_socket" >&6
5456 if test "$ac_cv_search_socket" != no; then
5457   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5458
5459 fi
5460
5461 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5462 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5463 if test "${ac_cv_search_shl_load+set}" = set; then
5464   echo $ECHO_N "(cached) $ECHO_C" >&6
5465 else
5466   ac_func_search_save_LIBS=$LIBS
5467 ac_cv_search_shl_load=no
5468 cat >conftest.$ac_ext <<_ACEOF
5469 /* confdefs.h.  */
5470 _ACEOF
5471 cat confdefs.h >>conftest.$ac_ext
5472 cat >>conftest.$ac_ext <<_ACEOF
5473 /* end confdefs.h.  */
5474
5475 /* Override any gcc2 internal prototype to avoid an error.  */
5476 #ifdef __cplusplus
5477 extern "C"
5478 #endif
5479 /* We use char because int might match the return type of a gcc2
5480    builtin and then its argument prototype would still apply.  */
5481 char shl_load ();
5482 int
5483 main ()
5484 {
5485 shl_load ();
5486   ;
5487   return 0;
5488 }
5489 _ACEOF
5490 rm -f conftest.$ac_objext conftest$ac_exeext
5491 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5492   (eval $ac_link) 2>conftest.er1
5493   ac_status=$?
5494   grep -v '^ *+' conftest.er1 >conftest.err
5495   rm -f conftest.er1
5496   cat conftest.err >&5
5497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498   (exit $ac_status); } &&
5499          { ac_try='test -z "$ac_c_werror_flag"
5500                          || test ! -s conftest.err'
5501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5502   (eval $ac_try) 2>&5
5503   ac_status=$?
5504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505   (exit $ac_status); }; } &&
5506          { ac_try='test -s conftest$ac_exeext'
5507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5508   (eval $ac_try) 2>&5
5509   ac_status=$?
5510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5511   (exit $ac_status); }; }; then
5512   ac_cv_search_shl_load="none required"
5513 else
5514   echo "$as_me: failed program was:" >&5
5515 sed 's/^/| /' conftest.$ac_ext >&5
5516
5517 fi
5518 rm -f conftest.err conftest.$ac_objext \
5519       conftest$ac_exeext conftest.$ac_ext
5520 if test "$ac_cv_search_shl_load" = no; then
5521   for ac_lib in dld; do
5522     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5523     cat >conftest.$ac_ext <<_ACEOF
5524 /* confdefs.h.  */
5525 _ACEOF
5526 cat confdefs.h >>conftest.$ac_ext
5527 cat >>conftest.$ac_ext <<_ACEOF
5528 /* end confdefs.h.  */
5529
5530 /* Override any gcc2 internal prototype to avoid an error.  */
5531 #ifdef __cplusplus
5532 extern "C"
5533 #endif
5534 /* We use char because int might match the return type of a gcc2
5535    builtin and then its argument prototype would still apply.  */
5536 char shl_load ();
5537 int
5538 main ()
5539 {
5540 shl_load ();
5541   ;
5542   return 0;
5543 }
5544 _ACEOF
5545 rm -f conftest.$ac_objext conftest$ac_exeext
5546 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5547   (eval $ac_link) 2>conftest.er1
5548   ac_status=$?
5549   grep -v '^ *+' conftest.er1 >conftest.err
5550   rm -f conftest.er1
5551   cat conftest.err >&5
5552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5553   (exit $ac_status); } &&
5554          { ac_try='test -z "$ac_c_werror_flag"
5555                          || test ! -s conftest.err'
5556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5557   (eval $ac_try) 2>&5
5558   ac_status=$?
5559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5560   (exit $ac_status); }; } &&
5561          { ac_try='test -s conftest$ac_exeext'
5562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5563   (eval $ac_try) 2>&5
5564   ac_status=$?
5565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5566   (exit $ac_status); }; }; then
5567   ac_cv_search_shl_load="-l$ac_lib"
5568 break
5569 else
5570   echo "$as_me: failed program was:" >&5
5571 sed 's/^/| /' conftest.$ac_ext >&5
5572
5573 fi
5574 rm -f conftest.err conftest.$ac_objext \
5575       conftest$ac_exeext conftest.$ac_ext
5576   done
5577 fi
5578 LIBS=$ac_func_search_save_LIBS
5579 fi
5580 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5581 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5582 if test "$ac_cv_search_shl_load" != no; then
5583   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5584
5585 fi
5586
5587 # We only use libld in port/dynloader/aix.c
5588 case $host_os in
5589      aix*)
5590         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5591 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5592 if test "${ac_cv_search_ldopen+set}" = set; then
5593   echo $ECHO_N "(cached) $ECHO_C" >&6
5594 else
5595   ac_func_search_save_LIBS=$LIBS
5596 ac_cv_search_ldopen=no
5597 cat >conftest.$ac_ext <<_ACEOF
5598 /* confdefs.h.  */
5599 _ACEOF
5600 cat confdefs.h >>conftest.$ac_ext
5601 cat >>conftest.$ac_ext <<_ACEOF
5602 /* end confdefs.h.  */
5603
5604 /* Override any gcc2 internal prototype to avoid an error.  */
5605 #ifdef __cplusplus
5606 extern "C"
5607 #endif
5608 /* We use char because int might match the return type of a gcc2
5609    builtin and then its argument prototype would still apply.  */
5610 char ldopen ();
5611 int
5612 main ()
5613 {
5614 ldopen ();
5615   ;
5616   return 0;
5617 }
5618 _ACEOF
5619 rm -f conftest.$ac_objext conftest$ac_exeext
5620 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5621   (eval $ac_link) 2>conftest.er1
5622   ac_status=$?
5623   grep -v '^ *+' conftest.er1 >conftest.err
5624   rm -f conftest.er1
5625   cat conftest.err >&5
5626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627   (exit $ac_status); } &&
5628          { ac_try='test -z "$ac_c_werror_flag"
5629                          || test ! -s conftest.err'
5630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5631   (eval $ac_try) 2>&5
5632   ac_status=$?
5633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5634   (exit $ac_status); }; } &&
5635          { ac_try='test -s conftest$ac_exeext'
5636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5637   (eval $ac_try) 2>&5
5638   ac_status=$?
5639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640   (exit $ac_status); }; }; then
5641   ac_cv_search_ldopen="none required"
5642 else
5643   echo "$as_me: failed program was:" >&5
5644 sed 's/^/| /' conftest.$ac_ext >&5
5645
5646 fi
5647 rm -f conftest.err conftest.$ac_objext \
5648       conftest$ac_exeext conftest.$ac_ext
5649 if test "$ac_cv_search_ldopen" = no; then
5650   for ac_lib in ld; do
5651     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5652     cat >conftest.$ac_ext <<_ACEOF
5653 /* confdefs.h.  */
5654 _ACEOF
5655 cat confdefs.h >>conftest.$ac_ext
5656 cat >>conftest.$ac_ext <<_ACEOF
5657 /* end confdefs.h.  */
5658
5659 /* Override any gcc2 internal prototype to avoid an error.  */
5660 #ifdef __cplusplus
5661 extern "C"
5662 #endif
5663 /* We use char because int might match the return type of a gcc2
5664    builtin and then its argument prototype would still apply.  */
5665 char ldopen ();
5666 int
5667 main ()
5668 {
5669 ldopen ();
5670   ;
5671   return 0;
5672 }
5673 _ACEOF
5674 rm -f conftest.$ac_objext conftest$ac_exeext
5675 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5676   (eval $ac_link) 2>conftest.er1
5677   ac_status=$?
5678   grep -v '^ *+' conftest.er1 >conftest.err
5679   rm -f conftest.er1
5680   cat conftest.err >&5
5681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682   (exit $ac_status); } &&
5683          { ac_try='test -z "$ac_c_werror_flag"
5684                          || test ! -s conftest.err'
5685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5686   (eval $ac_try) 2>&5
5687   ac_status=$?
5688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5689   (exit $ac_status); }; } &&
5690          { ac_try='test -s conftest$ac_exeext'
5691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5692   (eval $ac_try) 2>&5
5693   ac_status=$?
5694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5695   (exit $ac_status); }; }; then
5696   ac_cv_search_ldopen="-l$ac_lib"
5697 break
5698 else
5699   echo "$as_me: failed program was:" >&5
5700 sed 's/^/| /' conftest.$ac_ext >&5
5701
5702 fi
5703 rm -f conftest.err conftest.$ac_objext \
5704       conftest$ac_exeext conftest.$ac_ext
5705   done
5706 fi
5707 LIBS=$ac_func_search_save_LIBS
5708 fi
5709 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5710 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5711 if test "$ac_cv_search_ldopen" != no; then
5712   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5713
5714 fi
5715
5716         ;;
5717 esac
5718 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5719 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5720 if test "${ac_cv_search_getopt_long+set}" = set; then
5721   echo $ECHO_N "(cached) $ECHO_C" >&6
5722 else
5723   ac_func_search_save_LIBS=$LIBS
5724 ac_cv_search_getopt_long=no
5725 cat >conftest.$ac_ext <<_ACEOF
5726 /* confdefs.h.  */
5727 _ACEOF
5728 cat confdefs.h >>conftest.$ac_ext
5729 cat >>conftest.$ac_ext <<_ACEOF
5730 /* end confdefs.h.  */
5731
5732 /* Override any gcc2 internal prototype to avoid an error.  */
5733 #ifdef __cplusplus
5734 extern "C"
5735 #endif
5736 /* We use char because int might match the return type of a gcc2
5737    builtin and then its argument prototype would still apply.  */
5738 char getopt_long ();
5739 int
5740 main ()
5741 {
5742 getopt_long ();
5743   ;
5744   return 0;
5745 }
5746 _ACEOF
5747 rm -f conftest.$ac_objext conftest$ac_exeext
5748 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5749   (eval $ac_link) 2>conftest.er1
5750   ac_status=$?
5751   grep -v '^ *+' conftest.er1 >conftest.err
5752   rm -f conftest.er1
5753   cat conftest.err >&5
5754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5755   (exit $ac_status); } &&
5756          { ac_try='test -z "$ac_c_werror_flag"
5757                          || test ! -s conftest.err'
5758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5759   (eval $ac_try) 2>&5
5760   ac_status=$?
5761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5762   (exit $ac_status); }; } &&
5763          { ac_try='test -s conftest$ac_exeext'
5764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5765   (eval $ac_try) 2>&5
5766   ac_status=$?
5767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5768   (exit $ac_status); }; }; then
5769   ac_cv_search_getopt_long="none required"
5770 else
5771   echo "$as_me: failed program was:" >&5
5772 sed 's/^/| /' conftest.$ac_ext >&5
5773
5774 fi
5775 rm -f conftest.err conftest.$ac_objext \
5776       conftest$ac_exeext conftest.$ac_ext
5777 if test "$ac_cv_search_getopt_long" = no; then
5778   for ac_lib in getopt gnugetopt; do
5779     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5780     cat >conftest.$ac_ext <<_ACEOF
5781 /* confdefs.h.  */
5782 _ACEOF
5783 cat confdefs.h >>conftest.$ac_ext
5784 cat >>conftest.$ac_ext <<_ACEOF
5785 /* end confdefs.h.  */
5786
5787 /* Override any gcc2 internal prototype to avoid an error.  */
5788 #ifdef __cplusplus
5789 extern "C"
5790 #endif
5791 /* We use char because int might match the return type of a gcc2
5792    builtin and then its argument prototype would still apply.  */
5793 char getopt_long ();
5794 int
5795 main ()
5796 {
5797 getopt_long ();
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext conftest$ac_exeext
5803 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5804   (eval $ac_link) 2>conftest.er1
5805   ac_status=$?
5806   grep -v '^ *+' conftest.er1 >conftest.err
5807   rm -f conftest.er1
5808   cat conftest.err >&5
5809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810   (exit $ac_status); } &&
5811          { ac_try='test -z "$ac_c_werror_flag"
5812                          || test ! -s conftest.err'
5813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5814   (eval $ac_try) 2>&5
5815   ac_status=$?
5816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817   (exit $ac_status); }; } &&
5818          { ac_try='test -s conftest$ac_exeext'
5819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820   (eval $ac_try) 2>&5
5821   ac_status=$?
5822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823   (exit $ac_status); }; }; then
5824   ac_cv_search_getopt_long="-l$ac_lib"
5825 break
5826 else
5827   echo "$as_me: failed program was:" >&5
5828 sed 's/^/| /' conftest.$ac_ext >&5
5829
5830 fi
5831 rm -f conftest.err conftest.$ac_objext \
5832       conftest$ac_exeext conftest.$ac_ext
5833   done
5834 fi
5835 LIBS=$ac_func_search_save_LIBS
5836 fi
5837 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5838 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5839 if test "$ac_cv_search_getopt_long" != no; then
5840   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5841
5842 fi
5843
5844 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5845 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5846 if test "${ac_cv_search_crypt+set}" = set; then
5847   echo $ECHO_N "(cached) $ECHO_C" >&6
5848 else
5849   ac_func_search_save_LIBS=$LIBS
5850 ac_cv_search_crypt=no
5851 cat >conftest.$ac_ext <<_ACEOF
5852 /* confdefs.h.  */
5853 _ACEOF
5854 cat confdefs.h >>conftest.$ac_ext
5855 cat >>conftest.$ac_ext <<_ACEOF
5856 /* end confdefs.h.  */
5857
5858 /* Override any gcc2 internal prototype to avoid an error.  */
5859 #ifdef __cplusplus
5860 extern "C"
5861 #endif
5862 /* We use char because int might match the return type of a gcc2
5863    builtin and then its argument prototype would still apply.  */
5864 char crypt ();
5865 int
5866 main ()
5867 {
5868 crypt ();
5869   ;
5870   return 0;
5871 }
5872 _ACEOF
5873 rm -f conftest.$ac_objext conftest$ac_exeext
5874 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5875   (eval $ac_link) 2>conftest.er1
5876   ac_status=$?
5877   grep -v '^ *+' conftest.er1 >conftest.err
5878   rm -f conftest.er1
5879   cat conftest.err >&5
5880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5881   (exit $ac_status); } &&
5882          { ac_try='test -z "$ac_c_werror_flag"
5883                          || test ! -s conftest.err'
5884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5885   (eval $ac_try) 2>&5
5886   ac_status=$?
5887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5888   (exit $ac_status); }; } &&
5889          { ac_try='test -s conftest$ac_exeext'
5890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5891   (eval $ac_try) 2>&5
5892   ac_status=$?
5893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894   (exit $ac_status); }; }; then
5895   ac_cv_search_crypt="none required"
5896 else
5897   echo "$as_me: failed program was:" >&5
5898 sed 's/^/| /' conftest.$ac_ext >&5
5899
5900 fi
5901 rm -f conftest.err conftest.$ac_objext \
5902       conftest$ac_exeext conftest.$ac_ext
5903 if test "$ac_cv_search_crypt" = no; then
5904   for ac_lib in crypt; do
5905     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5906     cat >conftest.$ac_ext <<_ACEOF
5907 /* confdefs.h.  */
5908 _ACEOF
5909 cat confdefs.h >>conftest.$ac_ext
5910 cat >>conftest.$ac_ext <<_ACEOF
5911 /* end confdefs.h.  */
5912
5913 /* Override any gcc2 internal prototype to avoid an error.  */
5914 #ifdef __cplusplus
5915 extern "C"
5916 #endif
5917 /* We use char because int might match the return type of a gcc2
5918    builtin and then its argument prototype would still apply.  */
5919 char crypt ();
5920 int
5921 main ()
5922 {
5923 crypt ();
5924   ;
5925   return 0;
5926 }
5927 _ACEOF
5928 rm -f conftest.$ac_objext conftest$ac_exeext
5929 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5930   (eval $ac_link) 2>conftest.er1
5931   ac_status=$?
5932   grep -v '^ *+' conftest.er1 >conftest.err
5933   rm -f conftest.er1
5934   cat conftest.err >&5
5935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936   (exit $ac_status); } &&
5937          { ac_try='test -z "$ac_c_werror_flag"
5938                          || test ! -s conftest.err'
5939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940   (eval $ac_try) 2>&5
5941   ac_status=$?
5942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943   (exit $ac_status); }; } &&
5944          { ac_try='test -s conftest$ac_exeext'
5945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5946   (eval $ac_try) 2>&5
5947   ac_status=$?
5948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949   (exit $ac_status); }; }; then
5950   ac_cv_search_crypt="-l$ac_lib"
5951 break
5952 else
5953   echo "$as_me: failed program was:" >&5
5954 sed 's/^/| /' conftest.$ac_ext >&5
5955
5956 fi
5957 rm -f conftest.err conftest.$ac_objext \
5958       conftest$ac_exeext conftest.$ac_ext
5959   done
5960 fi
5961 LIBS=$ac_func_search_save_LIBS
5962 fi
5963 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
5964 echo "${ECHO_T}$ac_cv_search_crypt" >&6
5965 if test "$ac_cv_search_crypt" != no; then
5966   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
5967
5968 fi
5969
5970 # Solaris:
5971 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
5972 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
5973 if test "${ac_cv_search_fdatasync+set}" = set; then
5974   echo $ECHO_N "(cached) $ECHO_C" >&6
5975 else
5976   ac_func_search_save_LIBS=$LIBS
5977 ac_cv_search_fdatasync=no
5978 cat >conftest.$ac_ext <<_ACEOF
5979 /* confdefs.h.  */
5980 _ACEOF
5981 cat confdefs.h >>conftest.$ac_ext
5982 cat >>conftest.$ac_ext <<_ACEOF
5983 /* end confdefs.h.  */
5984
5985 /* Override any gcc2 internal prototype to avoid an error.  */
5986 #ifdef __cplusplus
5987 extern "C"
5988 #endif
5989 /* We use char because int might match the return type of a gcc2
5990    builtin and then its argument prototype would still apply.  */
5991 char fdatasync ();
5992 int
5993 main ()
5994 {
5995 fdatasync ();
5996   ;
5997   return 0;
5998 }
5999 _ACEOF
6000 rm -f conftest.$ac_objext conftest$ac_exeext
6001 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6002   (eval $ac_link) 2>conftest.er1
6003   ac_status=$?
6004   grep -v '^ *+' conftest.er1 >conftest.err
6005   rm -f conftest.er1
6006   cat conftest.err >&5
6007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008   (exit $ac_status); } &&
6009          { ac_try='test -z "$ac_c_werror_flag"
6010                          || test ! -s conftest.err'
6011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6012   (eval $ac_try) 2>&5
6013   ac_status=$?
6014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6015   (exit $ac_status); }; } &&
6016          { ac_try='test -s conftest$ac_exeext'
6017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6018   (eval $ac_try) 2>&5
6019   ac_status=$?
6020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021   (exit $ac_status); }; }; then
6022   ac_cv_search_fdatasync="none required"
6023 else
6024   echo "$as_me: failed program was:" >&5
6025 sed 's/^/| /' conftest.$ac_ext >&5
6026
6027 fi
6028 rm -f conftest.err conftest.$ac_objext \
6029       conftest$ac_exeext conftest.$ac_ext
6030 if test "$ac_cv_search_fdatasync" = no; then
6031   for ac_lib in rt posix4; do
6032     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6033     cat >conftest.$ac_ext <<_ACEOF
6034 /* confdefs.h.  */
6035 _ACEOF
6036 cat confdefs.h >>conftest.$ac_ext
6037 cat >>conftest.$ac_ext <<_ACEOF
6038 /* end confdefs.h.  */
6039
6040 /* Override any gcc2 internal prototype to avoid an error.  */
6041 #ifdef __cplusplus
6042 extern "C"
6043 #endif
6044 /* We use char because int might match the return type of a gcc2
6045    builtin and then its argument prototype would still apply.  */
6046 char fdatasync ();
6047 int
6048 main ()
6049 {
6050 fdatasync ();
6051   ;
6052   return 0;
6053 }
6054 _ACEOF
6055 rm -f conftest.$ac_objext conftest$ac_exeext
6056 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6057   (eval $ac_link) 2>conftest.er1
6058   ac_status=$?
6059   grep -v '^ *+' conftest.er1 >conftest.err
6060   rm -f conftest.er1
6061   cat conftest.err >&5
6062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6063   (exit $ac_status); } &&
6064          { ac_try='test -z "$ac_c_werror_flag"
6065                          || test ! -s conftest.err'
6066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6067   (eval $ac_try) 2>&5
6068   ac_status=$?
6069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6070   (exit $ac_status); }; } &&
6071          { ac_try='test -s conftest$ac_exeext'
6072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6073   (eval $ac_try) 2>&5
6074   ac_status=$?
6075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076   (exit $ac_status); }; }; then
6077   ac_cv_search_fdatasync="-l$ac_lib"
6078 break
6079 else
6080   echo "$as_me: failed program was:" >&5
6081 sed 's/^/| /' conftest.$ac_ext >&5
6082
6083 fi
6084 rm -f conftest.err conftest.$ac_objext \
6085       conftest$ac_exeext conftest.$ac_ext
6086   done
6087 fi
6088 LIBS=$ac_func_search_save_LIBS
6089 fi
6090 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6091 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6092 if test "$ac_cv_search_fdatasync" != no; then
6093   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6094
6095 fi
6096
6097 # Cygwin:
6098 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6099 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6100 if test "${ac_cv_search_shmget+set}" = set; then
6101   echo $ECHO_N "(cached) $ECHO_C" >&6
6102 else
6103   ac_func_search_save_LIBS=$LIBS
6104 ac_cv_search_shmget=no
6105 cat >conftest.$ac_ext <<_ACEOF
6106 /* confdefs.h.  */
6107 _ACEOF
6108 cat confdefs.h >>conftest.$ac_ext
6109 cat >>conftest.$ac_ext <<_ACEOF
6110 /* end confdefs.h.  */
6111
6112 /* Override any gcc2 internal prototype to avoid an error.  */
6113 #ifdef __cplusplus
6114 extern "C"
6115 #endif
6116 /* We use char because int might match the return type of a gcc2
6117    builtin and then its argument prototype would still apply.  */
6118 char shmget ();
6119 int
6120 main ()
6121 {
6122 shmget ();
6123   ;
6124   return 0;
6125 }
6126 _ACEOF
6127 rm -f conftest.$ac_objext conftest$ac_exeext
6128 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6129   (eval $ac_link) 2>conftest.er1
6130   ac_status=$?
6131   grep -v '^ *+' conftest.er1 >conftest.err
6132   rm -f conftest.er1
6133   cat conftest.err >&5
6134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135   (exit $ac_status); } &&
6136          { ac_try='test -z "$ac_c_werror_flag"
6137                          || test ! -s conftest.err'
6138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6139   (eval $ac_try) 2>&5
6140   ac_status=$?
6141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6142   (exit $ac_status); }; } &&
6143          { ac_try='test -s conftest$ac_exeext'
6144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6145   (eval $ac_try) 2>&5
6146   ac_status=$?
6147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6148   (exit $ac_status); }; }; then
6149   ac_cv_search_shmget="none required"
6150 else
6151   echo "$as_me: failed program was:" >&5
6152 sed 's/^/| /' conftest.$ac_ext >&5
6153
6154 fi
6155 rm -f conftest.err conftest.$ac_objext \
6156       conftest$ac_exeext conftest.$ac_ext
6157 if test "$ac_cv_search_shmget" = no; then
6158   for ac_lib in cygipc; do
6159     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6160     cat >conftest.$ac_ext <<_ACEOF
6161 /* confdefs.h.  */
6162 _ACEOF
6163 cat confdefs.h >>conftest.$ac_ext
6164 cat >>conftest.$ac_ext <<_ACEOF
6165 /* end confdefs.h.  */
6166
6167 /* Override any gcc2 internal prototype to avoid an error.  */
6168 #ifdef __cplusplus
6169 extern "C"
6170 #endif
6171 /* We use char because int might match the return type of a gcc2
6172    builtin and then its argument prototype would still apply.  */
6173 char shmget ();
6174 int
6175 main ()
6176 {
6177 shmget ();
6178   ;
6179   return 0;
6180 }
6181 _ACEOF
6182 rm -f conftest.$ac_objext conftest$ac_exeext
6183 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6184   (eval $ac_link) 2>conftest.er1
6185   ac_status=$?
6186   grep -v '^ *+' conftest.er1 >conftest.err
6187   rm -f conftest.er1
6188   cat conftest.err >&5
6189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6190   (exit $ac_status); } &&
6191          { ac_try='test -z "$ac_c_werror_flag"
6192                          || test ! -s conftest.err'
6193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6194   (eval $ac_try) 2>&5
6195   ac_status=$?
6196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6197   (exit $ac_status); }; } &&
6198          { ac_try='test -s conftest$ac_exeext'
6199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6200   (eval $ac_try) 2>&5
6201   ac_status=$?
6202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6203   (exit $ac_status); }; }; then
6204   ac_cv_search_shmget="-l$ac_lib"
6205 break
6206 else
6207   echo "$as_me: failed program was:" >&5
6208 sed 's/^/| /' conftest.$ac_ext >&5
6209
6210 fi
6211 rm -f conftest.err conftest.$ac_objext \
6212       conftest$ac_exeext conftest.$ac_ext
6213   done
6214 fi
6215 LIBS=$ac_func_search_save_LIBS
6216 fi
6217 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6218 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6219 if test "$ac_cv_search_shmget" != no; then
6220   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6221
6222 fi
6223
6224
6225 if test "$with_readline" = yes; then
6226
6227
6228 if test "${pgac_cv_check_readline+set}" = set; then
6229   echo $ECHO_N "(cached) $ECHO_C" >&6
6230 else
6231   pgac_cv_check_readline=no
6232 pgac_save_LIBS=$LIBS
6233 if test x"$with_libedit_preferred" != x"yes"
6234 then    READLINE_ORDER="-lreadline -ledit"
6235 else    READLINE_ORDER="-ledit -lreadline"
6236 fi
6237 for pgac_rllib in $READLINE_ORDER ; do
6238   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6239 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6240   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6241     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6242     cat >conftest.$ac_ext <<_ACEOF
6243 /* confdefs.h.  */
6244 _ACEOF
6245 cat confdefs.h >>conftest.$ac_ext
6246 cat >>conftest.$ac_ext <<_ACEOF
6247 /* end confdefs.h.  */
6248
6249 /* Override any gcc2 internal prototype to avoid an error.  */
6250 #ifdef __cplusplus
6251 extern "C"
6252 #endif
6253 /* We use char because int might match the return type of a gcc2
6254    builtin and then its argument prototype would still apply.  */
6255 char readline ();
6256 int
6257 main ()
6258 {
6259 readline ();
6260   ;
6261   return 0;
6262 }
6263 _ACEOF
6264 rm -f conftest.$ac_objext conftest$ac_exeext
6265 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6266   (eval $ac_link) 2>conftest.er1
6267   ac_status=$?
6268   grep -v '^ *+' conftest.er1 >conftest.err
6269   rm -f conftest.er1
6270   cat conftest.err >&5
6271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6272   (exit $ac_status); } &&
6273          { ac_try='test -z "$ac_c_werror_flag"
6274                          || test ! -s conftest.err'
6275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6276   (eval $ac_try) 2>&5
6277   ac_status=$?
6278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6279   (exit $ac_status); }; } &&
6280          { ac_try='test -s conftest$ac_exeext'
6281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6282   (eval $ac_try) 2>&5
6283   ac_status=$?
6284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6285   (exit $ac_status); }; }; then
6286
6287       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6288       # recognize dependent libraries; assume curses is needed if we didn't
6289       # find any dependency.
6290       case $host_os in
6291         netbsd* | openbsd* | irix*)
6292           if test x"$pgac_lib" = x"" ; then
6293             pgac_lib=" -lcurses"
6294           fi ;;
6295       esac
6296
6297       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6298       break
6299
6300 else
6301   echo "$as_me: failed program was:" >&5
6302 sed 's/^/| /' conftest.$ac_ext >&5
6303
6304 fi
6305 rm -f conftest.err conftest.$ac_objext \
6306       conftest$ac_exeext conftest.$ac_ext
6307   done
6308   if test "$pgac_cv_check_readline" != no ; then
6309     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6310 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6311     break
6312   else
6313     echo "$as_me:$LINENO: result: no" >&5
6314 echo "${ECHO_T}no" >&6
6315   fi
6316 done
6317 LIBS=$pgac_save_LIBS
6318
6319 fi
6320
6321 if test "$pgac_cv_check_readline" != no ; then
6322   LIBS="$pgac_cv_check_readline $LIBS"
6323
6324 cat >>confdefs.h <<\_ACEOF
6325 #define HAVE_LIBREADLINE 1
6326 _ACEOF
6327
6328 fi
6329
6330
6331   if test x"$pgac_cv_check_readline" = x"no"; then
6332     { { echo "$as_me:$LINENO: error: readline library not found
6333 If you have readline already installed, see config.log for details on the
6334 failure.  It is possible the compiler isn't looking in the proper directory.
6335 Use --without-readline to disable readline support." >&5
6336 echo "$as_me: error: readline library not found
6337 If you have readline already installed, see config.log for details on the
6338 failure.  It is possible the compiler isn't looking in the proper directory.
6339 Use --without-readline to disable readline support." >&2;}
6340    { (exit 1); exit 1; }; }
6341   fi
6342 fi
6343
6344 if test "$with_zlib" = yes; then
6345
6346 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6347 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6348 if test "${ac_cv_lib_z_inflate+set}" = set; then
6349   echo $ECHO_N "(cached) $ECHO_C" >&6
6350 else
6351   ac_check_lib_save_LIBS=$LIBS
6352 LIBS="-lz  $LIBS"
6353 cat >conftest.$ac_ext <<_ACEOF
6354 /* confdefs.h.  */
6355 _ACEOF
6356 cat confdefs.h >>conftest.$ac_ext
6357 cat >>conftest.$ac_ext <<_ACEOF
6358 /* end confdefs.h.  */
6359
6360 /* Override any gcc2 internal prototype to avoid an error.  */
6361 #ifdef __cplusplus
6362 extern "C"
6363 #endif
6364 /* We use char because int might match the return type of a gcc2
6365    builtin and then its argument prototype would still apply.  */
6366 char inflate ();
6367 int
6368 main ()
6369 {
6370 inflate ();
6371   ;
6372   return 0;
6373 }
6374 _ACEOF
6375 rm -f conftest.$ac_objext conftest$ac_exeext
6376 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6377   (eval $ac_link) 2>conftest.er1
6378   ac_status=$?
6379   grep -v '^ *+' conftest.er1 >conftest.err
6380   rm -f conftest.er1
6381   cat conftest.err >&5
6382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6383   (exit $ac_status); } &&
6384          { ac_try='test -z "$ac_c_werror_flag"
6385                          || test ! -s conftest.err'
6386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6387   (eval $ac_try) 2>&5
6388   ac_status=$?
6389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6390   (exit $ac_status); }; } &&
6391          { ac_try='test -s conftest$ac_exeext'
6392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6393   (eval $ac_try) 2>&5
6394   ac_status=$?
6395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6396   (exit $ac_status); }; }; then
6397   ac_cv_lib_z_inflate=yes
6398 else
6399   echo "$as_me: failed program was:" >&5
6400 sed 's/^/| /' conftest.$ac_ext >&5
6401
6402 ac_cv_lib_z_inflate=no
6403 fi
6404 rm -f conftest.err conftest.$ac_objext \
6405       conftest$ac_exeext conftest.$ac_ext
6406 LIBS=$ac_check_lib_save_LIBS
6407 fi
6408 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6409 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6410 if test $ac_cv_lib_z_inflate = yes; then
6411   cat >>confdefs.h <<_ACEOF
6412 #define HAVE_LIBZ 1
6413 _ACEOF
6414
6415   LIBS="-lz $LIBS"
6416
6417 else
6418   { { echo "$as_me:$LINENO: error: zlib library not found
6419 If you have zlib already installed, see config.log for details on the
6420 failure.  It is possible the compiler isn't looking in the proper directory.
6421 Use --without-zlib to disable zlib support." >&5
6422 echo "$as_me: error: zlib library not found
6423 If you have zlib already installed, see config.log for details on the
6424 failure.  It is possible the compiler isn't looking in the proper directory.
6425 Use --without-zlib to disable zlib support." >&2;}
6426    { (exit 1); exit 1; }; }
6427 fi
6428
6429 fi
6430
6431 if test "$enable_spinlocks" = yes; then
6432
6433 cat >>confdefs.h <<\_ACEOF
6434 #define HAVE_SPINLOCKS 1
6435 _ACEOF
6436
6437 else
6438   { echo "$as_me:$LINENO: WARNING:
6439 *** Not using spinlocks will cause poor performance." >&5
6440 echo "$as_me: WARNING:
6441 *** Not using spinlocks will cause poor performance." >&2;}
6442 fi
6443
6444 if test "$with_krb5" = yes ; then
6445   if test "$PORTNAME" != "win32"; then
6446      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6447 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6448 if test "${ac_cv_search_com_err+set}" = set; then
6449   echo $ECHO_N "(cached) $ECHO_C" >&6
6450 else
6451   ac_func_search_save_LIBS=$LIBS
6452 ac_cv_search_com_err=no
6453 cat >conftest.$ac_ext <<_ACEOF
6454 /* confdefs.h.  */
6455 _ACEOF
6456 cat confdefs.h >>conftest.$ac_ext
6457 cat >>conftest.$ac_ext <<_ACEOF
6458 /* end confdefs.h.  */
6459
6460 /* Override any gcc2 internal prototype to avoid an error.  */
6461 #ifdef __cplusplus
6462 extern "C"
6463 #endif
6464 /* We use char because int might match the return type of a gcc2
6465    builtin and then its argument prototype would still apply.  */
6466 char com_err ();
6467 int
6468 main ()
6469 {
6470 com_err ();
6471   ;
6472   return 0;
6473 }
6474 _ACEOF
6475 rm -f conftest.$ac_objext conftest$ac_exeext
6476 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6477   (eval $ac_link) 2>conftest.er1
6478   ac_status=$?
6479   grep -v '^ *+' conftest.er1 >conftest.err
6480   rm -f conftest.er1
6481   cat conftest.err >&5
6482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6483   (exit $ac_status); } &&
6484          { ac_try='test -z "$ac_c_werror_flag"
6485                          || test ! -s conftest.err'
6486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6487   (eval $ac_try) 2>&5
6488   ac_status=$?
6489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490   (exit $ac_status); }; } &&
6491          { ac_try='test -s conftest$ac_exeext'
6492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6493   (eval $ac_try) 2>&5
6494   ac_status=$?
6495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496   (exit $ac_status); }; }; then
6497   ac_cv_search_com_err="none required"
6498 else
6499   echo "$as_me: failed program was:" >&5
6500 sed 's/^/| /' conftest.$ac_ext >&5
6501
6502 fi
6503 rm -f conftest.err conftest.$ac_objext \
6504       conftest$ac_exeext conftest.$ac_ext
6505 if test "$ac_cv_search_com_err" = no; then
6506   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6507     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6508     cat >conftest.$ac_ext <<_ACEOF
6509 /* confdefs.h.  */
6510 _ACEOF
6511 cat confdefs.h >>conftest.$ac_ext
6512 cat >>conftest.$ac_ext <<_ACEOF
6513 /* end confdefs.h.  */
6514
6515 /* Override any gcc2 internal prototype to avoid an error.  */
6516 #ifdef __cplusplus
6517 extern "C"
6518 #endif
6519 /* We use char because int might match the return type of a gcc2
6520    builtin and then its argument prototype would still apply.  */
6521 char com_err ();
6522 int
6523 main ()
6524 {
6525 com_err ();
6526   ;
6527   return 0;
6528 }
6529 _ACEOF
6530 rm -f conftest.$ac_objext conftest$ac_exeext
6531 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6532   (eval $ac_link) 2>conftest.er1
6533   ac_status=$?
6534   grep -v '^ *+' conftest.er1 >conftest.err
6535   rm -f conftest.er1
6536   cat conftest.err >&5
6537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6538   (exit $ac_status); } &&
6539          { ac_try='test -z "$ac_c_werror_flag"
6540                          || test ! -s conftest.err'
6541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6542   (eval $ac_try) 2>&5
6543   ac_status=$?
6544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6545   (exit $ac_status); }; } &&
6546          { ac_try='test -s conftest$ac_exeext'
6547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6548   (eval $ac_try) 2>&5
6549   ac_status=$?
6550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6551   (exit $ac_status); }; }; then
6552   ac_cv_search_com_err="-l$ac_lib"
6553 break
6554 else
6555   echo "$as_me: failed program was:" >&5
6556 sed 's/^/| /' conftest.$ac_ext >&5
6557
6558 fi
6559 rm -f conftest.err conftest.$ac_objext \
6560       conftest$ac_exeext conftest.$ac_ext
6561   done
6562 fi
6563 LIBS=$ac_func_search_save_LIBS
6564 fi
6565 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6566 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6567 if test "$ac_cv_search_com_err" != no; then
6568   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6569
6570 else
6571   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6572 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6573    { (exit 1); exit 1; }; }
6574 fi
6575
6576      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6577 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6578 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6579   echo $ECHO_N "(cached) $ECHO_C" >&6
6580 else
6581   ac_func_search_save_LIBS=$LIBS
6582 ac_cv_search_krb5_sendauth=no
6583 cat >conftest.$ac_ext <<_ACEOF
6584 /* confdefs.h.  */
6585 _ACEOF
6586 cat confdefs.h >>conftest.$ac_ext
6587 cat >>conftest.$ac_ext <<_ACEOF
6588 /* end confdefs.h.  */
6589
6590 /* Override any gcc2 internal prototype to avoid an error.  */
6591 #ifdef __cplusplus
6592 extern "C"
6593 #endif
6594 /* We use char because int might match the return type of a gcc2
6595    builtin and then its argument prototype would still apply.  */
6596 char krb5_sendauth ();
6597 int
6598 main ()
6599 {
6600 krb5_sendauth ();
6601   ;
6602   return 0;
6603 }
6604 _ACEOF
6605 rm -f conftest.$ac_objext conftest$ac_exeext
6606 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6607   (eval $ac_link) 2>conftest.er1
6608   ac_status=$?
6609   grep -v '^ *+' conftest.er1 >conftest.err
6610   rm -f conftest.er1
6611   cat conftest.err >&5
6612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6613   (exit $ac_status); } &&
6614          { ac_try='test -z "$ac_c_werror_flag"
6615                          || test ! -s conftest.err'
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); }; } &&
6621          { ac_try='test -s conftest$ac_exeext'
6622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6623   (eval $ac_try) 2>&5
6624   ac_status=$?
6625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6626   (exit $ac_status); }; }; then
6627   ac_cv_search_krb5_sendauth="none required"
6628 else
6629   echo "$as_me: failed program was:" >&5
6630 sed 's/^/| /' conftest.$ac_ext >&5
6631
6632 fi
6633 rm -f conftest.err conftest.$ac_objext \
6634       conftest$ac_exeext conftest.$ac_ext
6635 if test "$ac_cv_search_krb5_sendauth" = no; then
6636   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6637     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6638     cat >conftest.$ac_ext <<_ACEOF
6639 /* confdefs.h.  */
6640 _ACEOF
6641 cat confdefs.h >>conftest.$ac_ext
6642 cat >>conftest.$ac_ext <<_ACEOF
6643 /* end confdefs.h.  */
6644
6645 /* Override any gcc2 internal prototype to avoid an error.  */
6646 #ifdef __cplusplus
6647 extern "C"
6648 #endif
6649 /* We use char because int might match the return type of a gcc2
6650    builtin and then its argument prototype would still apply.  */
6651 char krb5_sendauth ();
6652 int
6653 main ()
6654 {
6655 krb5_sendauth ();
6656   ;
6657   return 0;
6658 }
6659 _ACEOF
6660 rm -f conftest.$ac_objext conftest$ac_exeext
6661 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6662   (eval $ac_link) 2>conftest.er1
6663   ac_status=$?
6664   grep -v '^ *+' conftest.er1 >conftest.err
6665   rm -f conftest.er1
6666   cat conftest.err >&5
6667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6668   (exit $ac_status); } &&
6669          { ac_try='test -z "$ac_c_werror_flag"
6670                          || test ! -s conftest.err'
6671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6672   (eval $ac_try) 2>&5
6673   ac_status=$?
6674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675   (exit $ac_status); }; } &&
6676          { ac_try='test -s conftest$ac_exeext'
6677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6678   (eval $ac_try) 2>&5
6679   ac_status=$?
6680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681   (exit $ac_status); }; }; then
6682   ac_cv_search_krb5_sendauth="-l$ac_lib"
6683 break
6684 else
6685   echo "$as_me: failed program was:" >&5
6686 sed 's/^/| /' conftest.$ac_ext >&5
6687
6688 fi
6689 rm -f conftest.err conftest.$ac_objext \
6690       conftest$ac_exeext conftest.$ac_ext
6691   done
6692 fi
6693 LIBS=$ac_func_search_save_LIBS
6694 fi
6695 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6696 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6697 if test "$ac_cv_search_krb5_sendauth" != no; then
6698   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6699
6700 else
6701   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6702 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6703    { (exit 1); exit 1; }; }
6704 fi
6705
6706   else
6707      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6708 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6709 if test "${ac_cv_search_com_err+set}" = set; then
6710   echo $ECHO_N "(cached) $ECHO_C" >&6
6711 else
6712   ac_func_search_save_LIBS=$LIBS
6713 ac_cv_search_com_err=no
6714 cat >conftest.$ac_ext <<_ACEOF
6715 /* confdefs.h.  */
6716 _ACEOF
6717 cat confdefs.h >>conftest.$ac_ext
6718 cat >>conftest.$ac_ext <<_ACEOF
6719 /* end confdefs.h.  */
6720
6721 /* Override any gcc2 internal prototype to avoid an error.  */
6722 #ifdef __cplusplus
6723 extern "C"
6724 #endif
6725 /* We use char because int might match the return type of a gcc2
6726    builtin and then its argument prototype would still apply.  */
6727 char com_err ();
6728 int
6729 main ()
6730 {
6731 com_err ();
6732   ;
6733   return 0;
6734 }
6735 _ACEOF
6736 rm -f conftest.$ac_objext conftest$ac_exeext
6737 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6738   (eval $ac_link) 2>conftest.er1
6739   ac_status=$?
6740   grep -v '^ *+' conftest.er1 >conftest.err
6741   rm -f conftest.er1
6742   cat conftest.err >&5
6743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6744   (exit $ac_status); } &&
6745          { ac_try='test -z "$ac_c_werror_flag"
6746                          || test ! -s conftest.err'
6747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6748   (eval $ac_try) 2>&5
6749   ac_status=$?
6750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6751   (exit $ac_status); }; } &&
6752          { ac_try='test -s conftest$ac_exeext'
6753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6754   (eval $ac_try) 2>&5
6755   ac_status=$?
6756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6757   (exit $ac_status); }; }; then
6758   ac_cv_search_com_err="none required"
6759 else
6760   echo "$as_me: failed program was:" >&5
6761 sed 's/^/| /' conftest.$ac_ext >&5
6762
6763 fi
6764 rm -f conftest.err conftest.$ac_objext \
6765       conftest$ac_exeext conftest.$ac_ext
6766 if test "$ac_cv_search_com_err" = no; then
6767   for ac_lib in 'comerr32 -lkrb5_32'; do
6768     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6769     cat >conftest.$ac_ext <<_ACEOF
6770 /* confdefs.h.  */
6771 _ACEOF
6772 cat confdefs.h >>conftest.$ac_ext
6773 cat >>conftest.$ac_ext <<_ACEOF
6774 /* end confdefs.h.  */
6775
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 #ifdef __cplusplus
6778 extern "C"
6779 #endif
6780 /* We use char because int might match the return type of a gcc2
6781    builtin and then its argument prototype would still apply.  */
6782 char com_err ();
6783 int
6784 main ()
6785 {
6786 com_err ();
6787   ;
6788   return 0;
6789 }
6790 _ACEOF
6791 rm -f conftest.$ac_objext conftest$ac_exeext
6792 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6793   (eval $ac_link) 2>conftest.er1
6794   ac_status=$?
6795   grep -v '^ *+' conftest.er1 >conftest.err
6796   rm -f conftest.er1
6797   cat conftest.err >&5
6798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6799   (exit $ac_status); } &&
6800          { ac_try='test -z "$ac_c_werror_flag"
6801                          || test ! -s conftest.err'
6802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6803   (eval $ac_try) 2>&5
6804   ac_status=$?
6805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6806   (exit $ac_status); }; } &&
6807          { ac_try='test -s conftest$ac_exeext'
6808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6809   (eval $ac_try) 2>&5
6810   ac_status=$?
6811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6812   (exit $ac_status); }; }; then
6813   ac_cv_search_com_err="-l$ac_lib"
6814 break
6815 else
6816   echo "$as_me: failed program was:" >&5
6817 sed 's/^/| /' conftest.$ac_ext >&5
6818
6819 fi
6820 rm -f conftest.err conftest.$ac_objext \
6821       conftest$ac_exeext conftest.$ac_ext
6822   done
6823 fi
6824 LIBS=$ac_func_search_save_LIBS
6825 fi
6826 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6827 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6828 if test "$ac_cv_search_com_err" != no; then
6829   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6830
6831 else
6832   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6833 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6834    { (exit 1); exit 1; }; }
6835 fi
6836
6837   fi
6838 fi
6839
6840 if test "$with_openssl" = yes ; then
6841     if test "$PORTNAME" != "win32"; then
6842
6843 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6844 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6845 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6846   echo $ECHO_N "(cached) $ECHO_C" >&6
6847 else
6848   ac_check_lib_save_LIBS=$LIBS
6849 LIBS="-lcrypto  $LIBS"
6850 cat >conftest.$ac_ext <<_ACEOF
6851 /* confdefs.h.  */
6852 _ACEOF
6853 cat confdefs.h >>conftest.$ac_ext
6854 cat >>conftest.$ac_ext <<_ACEOF
6855 /* end confdefs.h.  */
6856
6857 /* Override any gcc2 internal prototype to avoid an error.  */
6858 #ifdef __cplusplus
6859 extern "C"
6860 #endif
6861 /* We use char because int might match the return type of a gcc2
6862    builtin and then its argument prototype would still apply.  */
6863 char CRYPTO_new_ex_data ();
6864 int
6865 main ()
6866 {
6867 CRYPTO_new_ex_data ();
6868   ;
6869   return 0;
6870 }
6871 _ACEOF
6872 rm -f conftest.$ac_objext conftest$ac_exeext
6873 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6874   (eval $ac_link) 2>conftest.er1
6875   ac_status=$?
6876   grep -v '^ *+' conftest.er1 >conftest.err
6877   rm -f conftest.er1
6878   cat conftest.err >&5
6879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6880   (exit $ac_status); } &&
6881          { ac_try='test -z "$ac_c_werror_flag"
6882                          || test ! -s conftest.err'
6883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6884   (eval $ac_try) 2>&5
6885   ac_status=$?
6886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6887   (exit $ac_status); }; } &&
6888          { ac_try='test -s conftest$ac_exeext'
6889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6890   (eval $ac_try) 2>&5
6891   ac_status=$?
6892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6893   (exit $ac_status); }; }; then
6894   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6895 else
6896   echo "$as_me: failed program was:" >&5
6897 sed 's/^/| /' conftest.$ac_ext >&5
6898
6899 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6900 fi
6901 rm -f conftest.err conftest.$ac_objext \
6902       conftest$ac_exeext conftest.$ac_ext
6903 LIBS=$ac_check_lib_save_LIBS
6904 fi
6905 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6906 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6907 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6908   cat >>confdefs.h <<_ACEOF
6909 #define HAVE_LIBCRYPTO 1
6910 _ACEOF
6911
6912   LIBS="-lcrypto $LIBS"
6913
6914 else
6915   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
6916 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
6917    { (exit 1); exit 1; }; }
6918 fi
6919
6920
6921 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
6922 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
6923 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
6924   echo $ECHO_N "(cached) $ECHO_C" >&6
6925 else
6926   ac_check_lib_save_LIBS=$LIBS
6927 LIBS="-lssl  $LIBS"
6928 cat >conftest.$ac_ext <<_ACEOF
6929 /* confdefs.h.  */
6930 _ACEOF
6931 cat confdefs.h >>conftest.$ac_ext
6932 cat >>conftest.$ac_ext <<_ACEOF
6933 /* end confdefs.h.  */
6934
6935 /* Override any gcc2 internal prototype to avoid an error.  */
6936 #ifdef __cplusplus
6937 extern "C"
6938 #endif
6939 /* We use char because int might match the return type of a gcc2
6940    builtin and then its argument prototype would still apply.  */
6941 char SSL_library_init ();
6942 int
6943 main ()
6944 {
6945 SSL_library_init ();
6946   ;
6947   return 0;
6948 }
6949 _ACEOF
6950 rm -f conftest.$ac_objext conftest$ac_exeext
6951 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6952   (eval $ac_link) 2>conftest.er1
6953   ac_status=$?
6954   grep -v '^ *+' conftest.er1 >conftest.err
6955   rm -f conftest.er1
6956   cat conftest.err >&5
6957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6958   (exit $ac_status); } &&
6959          { ac_try='test -z "$ac_c_werror_flag"
6960                          || test ! -s conftest.err'
6961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6962   (eval $ac_try) 2>&5
6963   ac_status=$?
6964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6965   (exit $ac_status); }; } &&
6966          { ac_try='test -s conftest$ac_exeext'
6967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6968   (eval $ac_try) 2>&5
6969   ac_status=$?
6970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6971   (exit $ac_status); }; }; then
6972   ac_cv_lib_ssl_SSL_library_init=yes
6973 else
6974   echo "$as_me: failed program was:" >&5
6975 sed 's/^/| /' conftest.$ac_ext >&5
6976
6977 ac_cv_lib_ssl_SSL_library_init=no
6978 fi
6979 rm -f conftest.err conftest.$ac_objext \
6980       conftest$ac_exeext conftest.$ac_ext
6981 LIBS=$ac_check_lib_save_LIBS
6982 fi
6983 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
6984 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
6985 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
6986   cat >>confdefs.h <<_ACEOF
6987 #define HAVE_LIBSSL 1
6988 _ACEOF
6989
6990   LIBS="-lssl $LIBS"
6991
6992 else
6993   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
6994 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
6995    { (exit 1); exit 1; }; }
6996 fi
6997
6998   else
6999
7000 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7001 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7002 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7003   echo $ECHO_N "(cached) $ECHO_C" >&6
7004 else
7005   ac_check_lib_save_LIBS=$LIBS
7006 LIBS="-leay32  $LIBS"
7007 cat >conftest.$ac_ext <<_ACEOF
7008 /* confdefs.h.  */
7009 _ACEOF
7010 cat confdefs.h >>conftest.$ac_ext
7011 cat >>conftest.$ac_ext <<_ACEOF
7012 /* end confdefs.h.  */
7013
7014 /* Override any gcc2 internal prototype to avoid an error.  */
7015 #ifdef __cplusplus
7016 extern "C"
7017 #endif
7018 /* We use char because int might match the return type of a gcc2
7019    builtin and then its argument prototype would still apply.  */
7020 char CRYPTO_new_ex_data ();
7021 int
7022 main ()
7023 {
7024 CRYPTO_new_ex_data ();
7025   ;
7026   return 0;
7027 }
7028 _ACEOF
7029 rm -f conftest.$ac_objext conftest$ac_exeext
7030 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7031   (eval $ac_link) 2>conftest.er1
7032   ac_status=$?
7033   grep -v '^ *+' conftest.er1 >conftest.err
7034   rm -f conftest.er1
7035   cat conftest.err >&5
7036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037   (exit $ac_status); } &&
7038          { ac_try='test -z "$ac_c_werror_flag"
7039                          || test ! -s conftest.err'
7040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7041   (eval $ac_try) 2>&5
7042   ac_status=$?
7043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7044   (exit $ac_status); }; } &&
7045          { ac_try='test -s conftest$ac_exeext'
7046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7047   (eval $ac_try) 2>&5
7048   ac_status=$?
7049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050   (exit $ac_status); }; }; then
7051   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7052 else
7053   echo "$as_me: failed program was:" >&5
7054 sed 's/^/| /' conftest.$ac_ext >&5
7055
7056 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7057 fi
7058 rm -f conftest.err conftest.$ac_objext \
7059       conftest$ac_exeext conftest.$ac_ext
7060 LIBS=$ac_check_lib_save_LIBS
7061 fi
7062 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7063 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7064 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7065   cat >>confdefs.h <<_ACEOF
7066 #define HAVE_LIBEAY32 1
7067 _ACEOF
7068
7069   LIBS="-leay32 $LIBS"
7070
7071 else
7072   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7073 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7074    { (exit 1); exit 1; }; }
7075 fi
7076
7077
7078 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7079 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7080 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7081   echo $ECHO_N "(cached) $ECHO_C" >&6
7082 else
7083   ac_check_lib_save_LIBS=$LIBS
7084 LIBS="-lssleay32  $LIBS"
7085 cat >conftest.$ac_ext <<_ACEOF
7086 /* confdefs.h.  */
7087 _ACEOF
7088 cat confdefs.h >>conftest.$ac_ext
7089 cat >>conftest.$ac_ext <<_ACEOF
7090 /* end confdefs.h.  */
7091
7092 /* Override any gcc2 internal prototype to avoid an error.  */
7093 #ifdef __cplusplus
7094 extern "C"
7095 #endif
7096 /* We use char because int might match the return type of a gcc2
7097    builtin and then its argument prototype would still apply.  */
7098 char SSL_library_init ();
7099 int
7100 main ()
7101 {
7102 SSL_library_init ();
7103   ;
7104   return 0;
7105 }
7106 _ACEOF
7107 rm -f conftest.$ac_objext conftest$ac_exeext
7108 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7109   (eval $ac_link) 2>conftest.er1
7110   ac_status=$?
7111   grep -v '^ *+' conftest.er1 >conftest.err
7112   rm -f conftest.er1
7113   cat conftest.err >&5
7114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7115   (exit $ac_status); } &&
7116          { ac_try='test -z "$ac_c_werror_flag"
7117                          || test ! -s conftest.err'
7118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7119   (eval $ac_try) 2>&5
7120   ac_status=$?
7121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122   (exit $ac_status); }; } &&
7123          { ac_try='test -s conftest$ac_exeext'
7124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7125   (eval $ac_try) 2>&5
7126   ac_status=$?
7127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128   (exit $ac_status); }; }; then
7129   ac_cv_lib_ssleay32_SSL_library_init=yes
7130 else
7131   echo "$as_me: failed program was:" >&5
7132 sed 's/^/| /' conftest.$ac_ext >&5
7133
7134 ac_cv_lib_ssleay32_SSL_library_init=no
7135 fi
7136 rm -f conftest.err conftest.$ac_objext \
7137       conftest$ac_exeext conftest.$ac_ext
7138 LIBS=$ac_check_lib_save_LIBS
7139 fi
7140 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7141 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7142 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7143   cat >>confdefs.h <<_ACEOF
7144 #define HAVE_LIBSSLEAY32 1
7145 _ACEOF
7146
7147   LIBS="-lssleay32 $LIBS"
7148
7149 else
7150   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7151 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7152    { (exit 1); exit 1; }; }
7153 fi
7154
7155   fi
7156 fi
7157
7158 if test "$with_pam" = yes ; then
7159
7160 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7161 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7162 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7163   echo $ECHO_N "(cached) $ECHO_C" >&6
7164 else
7165   ac_check_lib_save_LIBS=$LIBS
7166 LIBS="-lpam  $LIBS"
7167 cat >conftest.$ac_ext <<_ACEOF
7168 /* confdefs.h.  */
7169 _ACEOF
7170 cat confdefs.h >>conftest.$ac_ext
7171 cat >>conftest.$ac_ext <<_ACEOF
7172 /* end confdefs.h.  */
7173
7174 /* Override any gcc2 internal prototype to avoid an error.  */
7175 #ifdef __cplusplus
7176 extern "C"
7177 #endif
7178 /* We use char because int might match the return type of a gcc2
7179    builtin and then its argument prototype would still apply.  */
7180 char pam_start ();
7181 int
7182 main ()
7183 {
7184 pam_start ();
7185   ;
7186   return 0;
7187 }
7188 _ACEOF
7189 rm -f conftest.$ac_objext conftest$ac_exeext
7190 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7191   (eval $ac_link) 2>conftest.er1
7192   ac_status=$?
7193   grep -v '^ *+' conftest.er1 >conftest.err
7194   rm -f conftest.er1
7195   cat conftest.err >&5
7196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197   (exit $ac_status); } &&
7198          { ac_try='test -z "$ac_c_werror_flag"
7199                          || test ! -s conftest.err'
7200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7201   (eval $ac_try) 2>&5
7202   ac_status=$?
7203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7204   (exit $ac_status); }; } &&
7205          { ac_try='test -s conftest$ac_exeext'
7206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7207   (eval $ac_try) 2>&5
7208   ac_status=$?
7209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210   (exit $ac_status); }; }; then
7211   ac_cv_lib_pam_pam_start=yes
7212 else
7213   echo "$as_me: failed program was:" >&5
7214 sed 's/^/| /' conftest.$ac_ext >&5
7215
7216 ac_cv_lib_pam_pam_start=no
7217 fi
7218 rm -f conftest.err conftest.$ac_objext \
7219       conftest$ac_exeext conftest.$ac_ext
7220 LIBS=$ac_check_lib_save_LIBS
7221 fi
7222 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7223 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7224 if test $ac_cv_lib_pam_pam_start = yes; then
7225   cat >>confdefs.h <<_ACEOF
7226 #define HAVE_LIBPAM 1
7227 _ACEOF
7228
7229   LIBS="-lpam $LIBS"
7230
7231 else
7232   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7233 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7234    { (exit 1); exit 1; }; }
7235 fi
7236
7237 fi
7238
7239
7240 if test "$with_ldap" = yes ; then
7241   if test "$PORTNAME" != "win32"; then
7242
7243 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
7244 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
7245 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
7246   echo $ECHO_N "(cached) $ECHO_C" >&6
7247 else
7248   ac_check_lib_save_LIBS=$LIBS
7249 LIBS="-lldap  $LIBS"
7250 cat >conftest.$ac_ext <<_ACEOF
7251 /* confdefs.h.  */
7252 _ACEOF
7253 cat confdefs.h >>conftest.$ac_ext
7254 cat >>conftest.$ac_ext <<_ACEOF
7255 /* end confdefs.h.  */
7256
7257 /* Override any gcc2 internal prototype to avoid an error.  */
7258 #ifdef __cplusplus
7259 extern "C"
7260 #endif
7261 /* We use char because int might match the return type of a gcc2
7262    builtin and then its argument prototype would still apply.  */
7263 char ldap_bind ();
7264 int
7265 main ()
7266 {
7267 ldap_bind ();
7268   ;
7269   return 0;
7270 }
7271 _ACEOF
7272 rm -f conftest.$ac_objext conftest$ac_exeext
7273 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7274   (eval $ac_link) 2>conftest.er1
7275   ac_status=$?
7276   grep -v '^ *+' conftest.er1 >conftest.err
7277   rm -f conftest.er1
7278   cat conftest.err >&5
7279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7280   (exit $ac_status); } &&
7281          { ac_try='test -z "$ac_c_werror_flag"
7282                          || test ! -s conftest.err'
7283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287   (exit $ac_status); }; } &&
7288          { ac_try='test -s conftest$ac_exeext'
7289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7290   (eval $ac_try) 2>&5
7291   ac_status=$?
7292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7293   (exit $ac_status); }; }; then
7294   ac_cv_lib_ldap_ldap_bind=yes
7295 else
7296   echo "$as_me: failed program was:" >&5
7297 sed 's/^/| /' conftest.$ac_ext >&5
7298
7299 ac_cv_lib_ldap_ldap_bind=no
7300 fi
7301 rm -f conftest.err conftest.$ac_objext \
7302       conftest$ac_exeext conftest.$ac_ext
7303 LIBS=$ac_check_lib_save_LIBS
7304 fi
7305 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
7306 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
7307 if test $ac_cv_lib_ldap_ldap_bind = yes; then
7308   cat >>confdefs.h <<_ACEOF
7309 #define HAVE_LIBLDAP 1
7310 _ACEOF
7311
7312   LIBS="-lldap $LIBS"
7313
7314 else
7315   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
7316 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
7317    { (exit 1); exit 1; }; }
7318 fi
7319
7320   else
7321
7322 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
7323 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
7324 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
7325   echo $ECHO_N "(cached) $ECHO_C" >&6
7326 else
7327   ac_check_lib_save_LIBS=$LIBS
7328 LIBS="-lwldap32  $LIBS"
7329 cat >conftest.$ac_ext <<_ACEOF
7330 /* confdefs.h.  */
7331 _ACEOF
7332 cat confdefs.h >>conftest.$ac_ext
7333 cat >>conftest.$ac_ext <<_ACEOF
7334 /* end confdefs.h.  */
7335
7336 /* Override any gcc2 internal prototype to avoid an error.  */
7337 #ifdef __cplusplus
7338 extern "C"
7339 #endif
7340 /* We use char because int might match the return type of a gcc2
7341    builtin and then its argument prototype would still apply.  */
7342 char ldap_bind ();
7343 int
7344 main ()
7345 {
7346 ldap_bind ();
7347   ;
7348   return 0;
7349 }
7350 _ACEOF
7351 rm -f conftest.$ac_objext conftest$ac_exeext
7352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7353   (eval $ac_link) 2>conftest.er1
7354   ac_status=$?
7355   grep -v '^ *+' conftest.er1 >conftest.err
7356   rm -f conftest.er1
7357   cat conftest.err >&5
7358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7359   (exit $ac_status); } &&
7360          { ac_try='test -z "$ac_c_werror_flag"
7361                          || test ! -s conftest.err'
7362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7363   (eval $ac_try) 2>&5
7364   ac_status=$?
7365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7366   (exit $ac_status); }; } &&
7367          { ac_try='test -s conftest$ac_exeext'
7368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7369   (eval $ac_try) 2>&5
7370   ac_status=$?
7371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7372   (exit $ac_status); }; }; then
7373   ac_cv_lib_wldap32_ldap_bind=yes
7374 else
7375   echo "$as_me: failed program was:" >&5
7376 sed 's/^/| /' conftest.$ac_ext >&5
7377
7378 ac_cv_lib_wldap32_ldap_bind=no
7379 fi
7380 rm -f conftest.err conftest.$ac_objext \
7381       conftest$ac_exeext conftest.$ac_ext
7382 LIBS=$ac_check_lib_save_LIBS
7383 fi
7384 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
7385 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
7386 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
7387   cat >>confdefs.h <<_ACEOF
7388 #define HAVE_LIBWLDAP32 1
7389 _ACEOF
7390
7391   LIBS="-lwldap32 $LIBS"
7392
7393 else
7394   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
7395 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
7396    { (exit 1); exit 1; }; }
7397 fi
7398
7399   fi
7400 fi
7401
7402 ##
7403 ## Header files
7404 ##
7405
7406 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7407 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7408 if test "${ac_cv_header_stdc+set}" = set; then
7409   echo $ECHO_N "(cached) $ECHO_C" >&6
7410 else
7411   cat >conftest.$ac_ext <<_ACEOF
7412 /* confdefs.h.  */
7413 _ACEOF
7414 cat confdefs.h >>conftest.$ac_ext
7415 cat >>conftest.$ac_ext <<_ACEOF
7416 /* end confdefs.h.  */
7417 #include <stdlib.h>
7418 #include <stdarg.h>
7419 #include <string.h>
7420 #include <float.h>
7421
7422 int
7423 main ()
7424 {
7425
7426   ;
7427   return 0;
7428 }
7429 _ACEOF
7430 rm -f conftest.$ac_objext
7431 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7432   (eval $ac_compile) 2>conftest.er1
7433   ac_status=$?
7434   grep -v '^ *+' conftest.er1 >conftest.err
7435   rm -f conftest.er1
7436   cat conftest.err >&5
7437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7438   (exit $ac_status); } &&
7439          { ac_try='test -z "$ac_c_werror_flag"
7440                          || test ! -s conftest.err'
7441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7442   (eval $ac_try) 2>&5
7443   ac_status=$?
7444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445   (exit $ac_status); }; } &&
7446          { ac_try='test -s conftest.$ac_objext'
7447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7448   (eval $ac_try) 2>&5
7449   ac_status=$?
7450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451   (exit $ac_status); }; }; then
7452   ac_cv_header_stdc=yes
7453 else
7454   echo "$as_me: failed program was:" >&5
7455 sed 's/^/| /' conftest.$ac_ext >&5
7456
7457 ac_cv_header_stdc=no
7458 fi
7459 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7460
7461 if test $ac_cv_header_stdc = yes; then
7462   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7463   cat >conftest.$ac_ext <<_ACEOF
7464 /* confdefs.h.  */
7465 _ACEOF
7466 cat confdefs.h >>conftest.$ac_ext
7467 cat >>conftest.$ac_ext <<_ACEOF
7468 /* end confdefs.h.  */
7469 #include <string.h>
7470
7471 _ACEOF
7472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7473   $EGREP "memchr" >/dev/null 2>&1; then
7474   :
7475 else
7476   ac_cv_header_stdc=no
7477 fi
7478 rm -f conftest*
7479
7480 fi
7481
7482 if test $ac_cv_header_stdc = yes; then
7483   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7484   cat >conftest.$ac_ext <<_ACEOF
7485 /* confdefs.h.  */
7486 _ACEOF
7487 cat confdefs.h >>conftest.$ac_ext
7488 cat >>conftest.$ac_ext <<_ACEOF
7489 /* end confdefs.h.  */
7490 #include <stdlib.h>
7491
7492 _ACEOF
7493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7494   $EGREP "free" >/dev/null 2>&1; then
7495   :
7496 else
7497   ac_cv_header_stdc=no
7498 fi
7499 rm -f conftest*
7500
7501 fi
7502
7503 if test $ac_cv_header_stdc = yes; then
7504   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7505   if test "$cross_compiling" = yes; then
7506   :
7507 else
7508   cat >conftest.$ac_ext <<_ACEOF
7509 /* confdefs.h.  */
7510 _ACEOF
7511 cat confdefs.h >>conftest.$ac_ext
7512 cat >>conftest.$ac_ext <<_ACEOF
7513 /* end confdefs.h.  */
7514 #include <ctype.h>
7515 #if ((' ' & 0x0FF) == 0x020)
7516 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7517 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7518 #else
7519 # define ISLOWER(c) \
7520                    (('a' <= (c) && (c) <= 'i') \
7521                      || ('j' <= (c) && (c) <= 'r') \
7522                      || ('s' <= (c) && (c) <= 'z'))
7523 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7524 #endif
7525
7526 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7527 int
7528 main ()
7529 {
7530   int i;
7531   for (i = 0; i < 256; i++)
7532     if (XOR (islower (i), ISLOWER (i))
7533         || toupper (i) != TOUPPER (i))
7534       exit(2);
7535   exit (0);
7536 }
7537 _ACEOF
7538 rm -f conftest$ac_exeext
7539 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7540   (eval $ac_link) 2>&5
7541   ac_status=$?
7542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7545   (eval $ac_try) 2>&5
7546   ac_status=$?
7547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548   (exit $ac_status); }; }; then
7549   :
7550 else
7551   echo "$as_me: program exited with status $ac_status" >&5
7552 echo "$as_me: failed program was:" >&5
7553 sed 's/^/| /' conftest.$ac_ext >&5
7554
7555 ( exit $ac_status )
7556 ac_cv_header_stdc=no
7557 fi
7558 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7559 fi
7560 fi
7561 fi
7562 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7563 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7564 if test $ac_cv_header_stdc = yes; then
7565
7566 cat >>confdefs.h <<\_ACEOF
7567 #define STDC_HEADERS 1
7568 _ACEOF
7569
7570 fi
7571
7572 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7583                   inttypes.h stdint.h unistd.h
7584 do
7585 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7586 echo "$as_me:$LINENO: checking for $ac_header" >&5
7587 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7588 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7589   echo $ECHO_N "(cached) $ECHO_C" >&6
7590 else
7591   cat >conftest.$ac_ext <<_ACEOF
7592 /* confdefs.h.  */
7593 _ACEOF
7594 cat confdefs.h >>conftest.$ac_ext
7595 cat >>conftest.$ac_ext <<_ACEOF
7596 /* end confdefs.h.  */
7597 $ac_includes_default
7598
7599 #include <$ac_header>
7600 _ACEOF
7601 rm -f conftest.$ac_objext
7602 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7603   (eval $ac_compile) 2>conftest.er1
7604   ac_status=$?
7605   grep -v '^ *+' conftest.er1 >conftest.err
7606   rm -f conftest.er1
7607   cat conftest.err >&5
7608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7609   (exit $ac_status); } &&
7610          { ac_try='test -z "$ac_c_werror_flag"
7611                          || test ! -s conftest.err'
7612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7613   (eval $ac_try) 2>&5
7614   ac_status=$?
7615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7616   (exit $ac_status); }; } &&
7617          { ac_try='test -s conftest.$ac_objext'
7618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7619   (eval $ac_try) 2>&5
7620   ac_status=$?
7621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7622   (exit $ac_status); }; }; then
7623   eval "$as_ac_Header=yes"
7624 else
7625   echo "$as_me: failed program was:" >&5
7626 sed 's/^/| /' conftest.$ac_ext >&5
7627
7628 eval "$as_ac_Header=no"
7629 fi
7630 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7631 fi
7632 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7633 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7634 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7635   cat >>confdefs.h <<_ACEOF
7636 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7637 _ACEOF
7638
7639 fi
7640
7641 done
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669 for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
7670 do
7671 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7672 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7673   echo "$as_me:$LINENO: checking for $ac_header" >&5
7674 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7675 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7676   echo $ECHO_N "(cached) $ECHO_C" >&6
7677 fi
7678 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7679 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7680 else
7681   # Is the header compilable?
7682 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7683 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7684 cat >conftest.$ac_ext <<_ACEOF
7685 /* confdefs.h.  */
7686 _ACEOF
7687 cat confdefs.h >>conftest.$ac_ext
7688 cat >>conftest.$ac_ext <<_ACEOF
7689 /* end confdefs.h.  */
7690 $ac_includes_default
7691 #include <$ac_header>
7692 _ACEOF
7693 rm -f conftest.$ac_objext
7694 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7695   (eval $ac_compile) 2>conftest.er1
7696   ac_status=$?
7697   grep -v '^ *+' conftest.er1 >conftest.err
7698   rm -f conftest.er1
7699   cat conftest.err >&5
7700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7701   (exit $ac_status); } &&
7702          { ac_try='test -z "$ac_c_werror_flag"
7703                          || test ! -s conftest.err'
7704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7705   (eval $ac_try) 2>&5
7706   ac_status=$?
7707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7708   (exit $ac_status); }; } &&
7709          { ac_try='test -s conftest.$ac_objext'
7710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7711   (eval $ac_try) 2>&5
7712   ac_status=$?
7713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714   (exit $ac_status); }; }; then
7715   ac_header_compiler=yes
7716 else
7717   echo "$as_me: failed program was:" >&5
7718 sed 's/^/| /' conftest.$ac_ext >&5
7719
7720 ac_header_compiler=no
7721 fi
7722 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7723 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7724 echo "${ECHO_T}$ac_header_compiler" >&6
7725
7726 # Is the header present?
7727 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7728 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7729 cat >conftest.$ac_ext <<_ACEOF
7730 /* confdefs.h.  */
7731 _ACEOF
7732 cat confdefs.h >>conftest.$ac_ext
7733 cat >>conftest.$ac_ext <<_ACEOF
7734 /* end confdefs.h.  */
7735 #include <$ac_header>
7736 _ACEOF
7737 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7738   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7739   ac_status=$?
7740   grep -v '^ *+' conftest.er1 >conftest.err
7741   rm -f conftest.er1
7742   cat conftest.err >&5
7743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7744   (exit $ac_status); } >/dev/null; then
7745   if test -s conftest.err; then
7746     ac_cpp_err=$ac_c_preproc_warn_flag
7747     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7748   else
7749     ac_cpp_err=
7750   fi
7751 else
7752   ac_cpp_err=yes
7753 fi
7754 if test -z "$ac_cpp_err"; then
7755   ac_header_preproc=yes
7756 else
7757   echo "$as_me: failed program was:" >&5
7758 sed 's/^/| /' conftest.$ac_ext >&5
7759
7760   ac_header_preproc=no
7761 fi
7762 rm -f conftest.err conftest.$ac_ext
7763 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7764 echo "${ECHO_T}$ac_header_preproc" >&6
7765
7766 # So?  What about this header?
7767 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7768   yes:no: )
7769     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7770 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7771     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7772 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7773     ac_header_preproc=yes
7774     ;;
7775   no:yes:* )
7776     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7777 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7778     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7779 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7780     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7781 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7782     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7783 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7784     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7785 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7786     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7787 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7788     (
7789       cat <<\_ASBOX
7790 ## ---------------------------------------- ##
7791 ## Report this to pgsql-bugs@postgresql.org ##
7792 ## ---------------------------------------- ##
7793 _ASBOX
7794     ) |
7795       sed "s/^/$as_me: WARNING:     /" >&2
7796     ;;
7797 esac
7798 echo "$as_me:$LINENO: checking for $ac_header" >&5
7799 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7800 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7801   echo $ECHO_N "(cached) $ECHO_C" >&6
7802 else
7803   eval "$as_ac_Header=\$ac_header_preproc"
7804 fi
7805 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7806 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7807
7808 fi
7809 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7810   cat >>confdefs.h <<_ACEOF
7811 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7812 _ACEOF
7813
7814 fi
7815
7816 done
7817
7818
7819 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7820 # netinet/in.h is included first.
7821
7822 for ac_header in netinet/in.h
7823 do
7824 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7825 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7826   echo "$as_me:$LINENO: checking for $ac_header" >&5
7827 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7828 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7829   echo $ECHO_N "(cached) $ECHO_C" >&6
7830 fi
7831 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7832 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7833 else
7834   # Is the header compilable?
7835 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7836 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7837 cat >conftest.$ac_ext <<_ACEOF
7838 /* confdefs.h.  */
7839 _ACEOF
7840 cat confdefs.h >>conftest.$ac_ext
7841 cat >>conftest.$ac_ext <<_ACEOF
7842 /* end confdefs.h.  */
7843 $ac_includes_default
7844 #include <$ac_header>
7845 _ACEOF
7846 rm -f conftest.$ac_objext
7847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7848   (eval $ac_compile) 2>conftest.er1
7849   ac_status=$?
7850   grep -v '^ *+' conftest.er1 >conftest.err
7851   rm -f conftest.er1
7852   cat conftest.err >&5
7853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7854   (exit $ac_status); } &&
7855          { ac_try='test -z "$ac_c_werror_flag"
7856                          || test ! -s conftest.err'
7857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7858   (eval $ac_try) 2>&5
7859   ac_status=$?
7860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7861   (exit $ac_status); }; } &&
7862          { ac_try='test -s conftest.$ac_objext'
7863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7864   (eval $ac_try) 2>&5
7865   ac_status=$?
7866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7867   (exit $ac_status); }; }; then
7868   ac_header_compiler=yes
7869 else
7870   echo "$as_me: failed program was:" >&5
7871 sed 's/^/| /' conftest.$ac_ext >&5
7872
7873 ac_header_compiler=no
7874 fi
7875 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7876 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7877 echo "${ECHO_T}$ac_header_compiler" >&6
7878
7879 # Is the header present?
7880 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7881 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7882 cat >conftest.$ac_ext <<_ACEOF
7883 /* confdefs.h.  */
7884 _ACEOF
7885 cat confdefs.h >>conftest.$ac_ext
7886 cat >>conftest.$ac_ext <<_ACEOF
7887 /* end confdefs.h.  */
7888 #include <$ac_header>
7889 _ACEOF
7890 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7891   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7892   ac_status=$?
7893   grep -v '^ *+' conftest.er1 >conftest.err
7894   rm -f conftest.er1
7895   cat conftest.err >&5
7896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7897   (exit $ac_status); } >/dev/null; then
7898   if test -s conftest.err; then
7899     ac_cpp_err=$ac_c_preproc_warn_flag
7900     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7901   else
7902     ac_cpp_err=
7903   fi
7904 else
7905   ac_cpp_err=yes
7906 fi
7907 if test -z "$ac_cpp_err"; then
7908   ac_header_preproc=yes
7909 else
7910   echo "$as_me: failed program was:" >&5
7911 sed 's/^/| /' conftest.$ac_ext >&5
7912
7913   ac_header_preproc=no
7914 fi
7915 rm -f conftest.err conftest.$ac_ext
7916 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7917 echo "${ECHO_T}$ac_header_preproc" >&6
7918
7919 # So?  What about this header?
7920 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7921   yes:no: )
7922     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7923 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7924     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7925 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7926     ac_header_preproc=yes
7927     ;;
7928   no:yes:* )
7929     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7930 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7931     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7932 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7933     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7934 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7935     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7936 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7937     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7938 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7939     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7940 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7941     (
7942       cat <<\_ASBOX
7943 ## ---------------------------------------- ##
7944 ## Report this to pgsql-bugs@postgresql.org ##
7945 ## ---------------------------------------- ##
7946 _ASBOX
7947     ) |
7948       sed "s/^/$as_me: WARNING:     /" >&2
7949     ;;
7950 esac
7951 echo "$as_me:$LINENO: checking for $ac_header" >&5
7952 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7953 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7954   echo $ECHO_N "(cached) $ECHO_C" >&6
7955 else
7956   eval "$as_ac_Header=\$ac_header_preproc"
7957 fi
7958 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7959 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7960
7961 fi
7962 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7963   cat >>confdefs.h <<_ACEOF
7964 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7965 _ACEOF
7966
7967 fi
7968
7969 done
7970
7971
7972 for ac_header in netinet/tcp.h
7973 do
7974 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7975 echo "$as_me:$LINENO: checking for $ac_header" >&5
7976 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7977 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7978   echo $ECHO_N "(cached) $ECHO_C" >&6
7979 else
7980   cat >conftest.$ac_ext <<_ACEOF
7981 /* confdefs.h.  */
7982 _ACEOF
7983 cat confdefs.h >>conftest.$ac_ext
7984 cat >>conftest.$ac_ext <<_ACEOF
7985 /* end confdefs.h.  */
7986 $ac_includes_default
7987 #ifdef HAVE_NETINET_IN_H
7988 #include <netinet/in.h>
7989 #endif
7990
7991
7992 #include <$ac_header>
7993 _ACEOF
7994 rm -f conftest.$ac_objext
7995 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7996   (eval $ac_compile) 2>conftest.er1
7997   ac_status=$?
7998   grep -v '^ *+' conftest.er1 >conftest.err
7999   rm -f conftest.er1
8000   cat conftest.err >&5
8001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8002   (exit $ac_status); } &&
8003          { ac_try='test -z "$ac_c_werror_flag"
8004                          || test ! -s conftest.err'
8005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8006   (eval $ac_try) 2>&5
8007   ac_status=$?
8008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8009   (exit $ac_status); }; } &&
8010          { ac_try='test -s conftest.$ac_objext'
8011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8012   (eval $ac_try) 2>&5
8013   ac_status=$?
8014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8015   (exit $ac_status); }; }; then
8016   eval "$as_ac_Header=yes"
8017 else
8018   echo "$as_me: failed program was:" >&5
8019 sed 's/^/| /' conftest.$ac_ext >&5
8020
8021 eval "$as_ac_Header=no"
8022 fi
8023 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8024 fi
8025 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8026 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8027 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8028   cat >>confdefs.h <<_ACEOF
8029 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8030 _ACEOF
8031
8032 fi
8033
8034 done
8035
8036
8037 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8038
8039 for ac_header in readline/readline.h
8040 do
8041 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8042 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8043   echo "$as_me:$LINENO: checking for $ac_header" >&5
8044 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8045 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8046   echo $ECHO_N "(cached) $ECHO_C" >&6
8047 fi
8048 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8049 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8050 else
8051   # Is the header compilable?
8052 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8053 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8054 cat >conftest.$ac_ext <<_ACEOF
8055 /* confdefs.h.  */
8056 _ACEOF
8057 cat confdefs.h >>conftest.$ac_ext
8058 cat >>conftest.$ac_ext <<_ACEOF
8059 /* end confdefs.h.  */
8060 $ac_includes_default
8061 #include <$ac_header>
8062 _ACEOF
8063 rm -f conftest.$ac_objext
8064 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8065   (eval $ac_compile) 2>conftest.er1
8066   ac_status=$?
8067   grep -v '^ *+' conftest.er1 >conftest.err
8068   rm -f conftest.er1
8069   cat conftest.err >&5
8070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8071   (exit $ac_status); } &&
8072          { ac_try='test -z "$ac_c_werror_flag"
8073                          || test ! -s conftest.err'
8074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8075   (eval $ac_try) 2>&5
8076   ac_status=$?
8077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8078   (exit $ac_status); }; } &&
8079          { ac_try='test -s conftest.$ac_objext'
8080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8081   (eval $ac_try) 2>&5
8082   ac_status=$?
8083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8084   (exit $ac_status); }; }; then
8085   ac_header_compiler=yes
8086 else
8087   echo "$as_me: failed program was:" >&5
8088 sed 's/^/| /' conftest.$ac_ext >&5
8089
8090 ac_header_compiler=no
8091 fi
8092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8093 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8094 echo "${ECHO_T}$ac_header_compiler" >&6
8095
8096 # Is the header present?
8097 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8098 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8099 cat >conftest.$ac_ext <<_ACEOF
8100 /* confdefs.h.  */
8101 _ACEOF
8102 cat confdefs.h >>conftest.$ac_ext
8103 cat >>conftest.$ac_ext <<_ACEOF
8104 /* end confdefs.h.  */
8105 #include <$ac_header>
8106 _ACEOF
8107 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8108   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8109   ac_status=$?
8110   grep -v '^ *+' conftest.er1 >conftest.err
8111   rm -f conftest.er1
8112   cat conftest.err >&5
8113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8114   (exit $ac_status); } >/dev/null; then
8115   if test -s conftest.err; then
8116     ac_cpp_err=$ac_c_preproc_warn_flag
8117     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8118   else
8119     ac_cpp_err=
8120   fi
8121 else
8122   ac_cpp_err=yes
8123 fi
8124 if test -z "$ac_cpp_err"; then
8125   ac_header_preproc=yes
8126 else
8127   echo "$as_me: failed program was:" >&5
8128 sed 's/^/| /' conftest.$ac_ext >&5
8129
8130   ac_header_preproc=no
8131 fi
8132 rm -f conftest.err conftest.$ac_ext
8133 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8134 echo "${ECHO_T}$ac_header_preproc" >&6
8135
8136 # So?  What about this header?
8137 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8138   yes:no: )
8139     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8140 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8141     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8142 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8143     ac_header_preproc=yes
8144     ;;
8145   no:yes:* )
8146     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8147 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8148     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8149 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8150     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8151 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8152     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8153 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8154     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8155 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8156     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8157 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8158     (
8159       cat <<\_ASBOX
8160 ## ---------------------------------------- ##
8161 ## Report this to pgsql-bugs@postgresql.org ##
8162 ## ---------------------------------------- ##
8163 _ASBOX
8164     ) |
8165       sed "s/^/$as_me: WARNING:     /" >&2
8166     ;;
8167 esac
8168 echo "$as_me:$LINENO: checking for $ac_header" >&5
8169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8171   echo $ECHO_N "(cached) $ECHO_C" >&6
8172 else
8173   eval "$as_ac_Header=\$ac_header_preproc"
8174 fi
8175 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8176 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8177
8178 fi
8179 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8180   cat >>confdefs.h <<_ACEOF
8181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8182 _ACEOF
8183
8184 else
8185
8186 for ac_header in readline.h
8187 do
8188 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8189 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8190   echo "$as_me:$LINENO: checking for $ac_header" >&5
8191 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8192 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8193   echo $ECHO_N "(cached) $ECHO_C" >&6
8194 fi
8195 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8196 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8197 else
8198   # Is the header compilable?
8199 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8200 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8201 cat >conftest.$ac_ext <<_ACEOF
8202 /* confdefs.h.  */
8203 _ACEOF
8204 cat confdefs.h >>conftest.$ac_ext
8205 cat >>conftest.$ac_ext <<_ACEOF
8206 /* end confdefs.h.  */
8207 $ac_includes_default
8208 #include <$ac_header>
8209 _ACEOF
8210 rm -f conftest.$ac_objext
8211 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8212   (eval $ac_compile) 2>conftest.er1
8213   ac_status=$?
8214   grep -v '^ *+' conftest.er1 >conftest.err
8215   rm -f conftest.er1
8216   cat conftest.err >&5
8217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8218   (exit $ac_status); } &&
8219          { ac_try='test -z "$ac_c_werror_flag"
8220                          || test ! -s conftest.err'
8221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8222   (eval $ac_try) 2>&5
8223   ac_status=$?
8224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8225   (exit $ac_status); }; } &&
8226          { ac_try='test -s conftest.$ac_objext'
8227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8228   (eval $ac_try) 2>&5
8229   ac_status=$?
8230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8231   (exit $ac_status); }; }; then
8232   ac_header_compiler=yes
8233 else
8234   echo "$as_me: failed program was:" >&5
8235 sed 's/^/| /' conftest.$ac_ext >&5
8236
8237 ac_header_compiler=no
8238 fi
8239 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8240 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8241 echo "${ECHO_T}$ac_header_compiler" >&6
8242
8243 # Is the header present?
8244 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8245 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8246 cat >conftest.$ac_ext <<_ACEOF
8247 /* confdefs.h.  */
8248 _ACEOF
8249 cat confdefs.h >>conftest.$ac_ext
8250 cat >>conftest.$ac_ext <<_ACEOF
8251 /* end confdefs.h.  */
8252 #include <$ac_header>
8253 _ACEOF
8254 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8256   ac_status=$?
8257   grep -v '^ *+' conftest.er1 >conftest.err
8258   rm -f conftest.er1
8259   cat conftest.err >&5
8260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8261   (exit $ac_status); } >/dev/null; then
8262   if test -s conftest.err; then
8263     ac_cpp_err=$ac_c_preproc_warn_flag
8264     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8265   else
8266     ac_cpp_err=
8267   fi
8268 else
8269   ac_cpp_err=yes
8270 fi
8271 if test -z "$ac_cpp_err"; then
8272   ac_header_preproc=yes
8273 else
8274   echo "$as_me: failed program was:" >&5
8275 sed 's/^/| /' conftest.$ac_ext >&5
8276
8277   ac_header_preproc=no
8278 fi
8279 rm -f conftest.err conftest.$ac_ext
8280 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8281 echo "${ECHO_T}$ac_header_preproc" >&6
8282
8283 # So?  What about this header?
8284 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8285   yes:no: )
8286     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8287 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8288     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8289 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8290     ac_header_preproc=yes
8291     ;;
8292   no:yes:* )
8293     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8294 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8295     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8296 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8297     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8298 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8299     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8300 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8301     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8302 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8303     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8304 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8305     (
8306       cat <<\_ASBOX
8307 ## ---------------------------------------- ##
8308 ## Report this to pgsql-bugs@postgresql.org ##
8309 ## ---------------------------------------- ##
8310 _ASBOX
8311     ) |
8312       sed "s/^/$as_me: WARNING:     /" >&2
8313     ;;
8314 esac
8315 echo "$as_me:$LINENO: checking for $ac_header" >&5
8316 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8317 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8318   echo $ECHO_N "(cached) $ECHO_C" >&6
8319 else
8320   eval "$as_ac_Header=\$ac_header_preproc"
8321 fi
8322 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8323 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8324
8325 fi
8326 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8327   cat >>confdefs.h <<_ACEOF
8328 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8329 _ACEOF
8330
8331 else
8332   { { echo "$as_me:$LINENO: error: readline header not found
8333 If you have readline already installed, see config.log for details on the
8334 failure.  It is possible the compiler isn't looking in the proper directory.
8335 Use --without-readline to disable readline support." >&5
8336 echo "$as_me: error: readline header not found
8337 If you have readline already installed, see config.log for details on the
8338 failure.  It is possible the compiler isn't looking in the proper directory.
8339 Use --without-readline to disable readline support." >&2;}
8340    { (exit 1); exit 1; }; }
8341 fi
8342
8343 done
8344
8345 fi
8346
8347 done
8348
8349
8350 for ac_header in readline/history.h
8351 do
8352 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8353 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8354   echo "$as_me:$LINENO: checking for $ac_header" >&5
8355 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8356 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8357   echo $ECHO_N "(cached) $ECHO_C" >&6
8358 fi
8359 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8360 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8361 else
8362   # Is the header compilable?
8363 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8364 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8365 cat >conftest.$ac_ext <<_ACEOF
8366 /* confdefs.h.  */
8367 _ACEOF
8368 cat confdefs.h >>conftest.$ac_ext
8369 cat >>conftest.$ac_ext <<_ACEOF
8370 /* end confdefs.h.  */
8371 $ac_includes_default
8372 #include <$ac_header>
8373 _ACEOF
8374 rm -f conftest.$ac_objext
8375 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8376   (eval $ac_compile) 2>conftest.er1
8377   ac_status=$?
8378   grep -v '^ *+' conftest.er1 >conftest.err
8379   rm -f conftest.er1
8380   cat conftest.err >&5
8381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382   (exit $ac_status); } &&
8383          { ac_try='test -z "$ac_c_werror_flag"
8384                          || test ! -s conftest.err'
8385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8386   (eval $ac_try) 2>&5
8387   ac_status=$?
8388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389   (exit $ac_status); }; } &&
8390          { ac_try='test -s conftest.$ac_objext'
8391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392   (eval $ac_try) 2>&5
8393   ac_status=$?
8394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395   (exit $ac_status); }; }; then
8396   ac_header_compiler=yes
8397 else
8398   echo "$as_me: failed program was:" >&5
8399 sed 's/^/| /' conftest.$ac_ext >&5
8400
8401 ac_header_compiler=no
8402 fi
8403 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8404 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8405 echo "${ECHO_T}$ac_header_compiler" >&6
8406
8407 # Is the header present?
8408 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8409 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8410 cat >conftest.$ac_ext <<_ACEOF
8411 /* confdefs.h.  */
8412 _ACEOF
8413 cat confdefs.h >>conftest.$ac_ext
8414 cat >>conftest.$ac_ext <<_ACEOF
8415 /* end confdefs.h.  */
8416 #include <$ac_header>
8417 _ACEOF
8418 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8419   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8420   ac_status=$?
8421   grep -v '^ *+' conftest.er1 >conftest.err
8422   rm -f conftest.er1
8423   cat conftest.err >&5
8424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8425   (exit $ac_status); } >/dev/null; then
8426   if test -s conftest.err; then
8427     ac_cpp_err=$ac_c_preproc_warn_flag
8428     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8429   else
8430     ac_cpp_err=
8431   fi
8432 else
8433   ac_cpp_err=yes
8434 fi
8435 if test -z "$ac_cpp_err"; then
8436   ac_header_preproc=yes
8437 else
8438   echo "$as_me: failed program was:" >&5
8439 sed 's/^/| /' conftest.$ac_ext >&5
8440
8441   ac_header_preproc=no
8442 fi
8443 rm -f conftest.err conftest.$ac_ext
8444 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8445 echo "${ECHO_T}$ac_header_preproc" >&6
8446
8447 # So?  What about this header?
8448 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8449   yes:no: )
8450     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8451 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8452     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8453 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8454     ac_header_preproc=yes
8455     ;;
8456   no:yes:* )
8457     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8458 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8459     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8460 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8461     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8462 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8463     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8464 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8465     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8466 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8467     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8468 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8469     (
8470       cat <<\_ASBOX
8471 ## ---------------------------------------- ##
8472 ## Report this to pgsql-bugs@postgresql.org ##
8473 ## ---------------------------------------- ##
8474 _ASBOX
8475     ) |
8476       sed "s/^/$as_me: WARNING:     /" >&2
8477     ;;
8478 esac
8479 echo "$as_me:$LINENO: checking for $ac_header" >&5
8480 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8481 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8482   echo $ECHO_N "(cached) $ECHO_C" >&6
8483 else
8484   eval "$as_ac_Header=\$ac_header_preproc"
8485 fi
8486 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8487 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8488
8489 fi
8490 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8491   cat >>confdefs.h <<_ACEOF
8492 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8493 _ACEOF
8494
8495 else
8496
8497 for ac_header in history.h
8498 do
8499 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8500 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8501   echo "$as_me:$LINENO: checking for $ac_header" >&5
8502 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8503 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8504   echo $ECHO_N "(cached) $ECHO_C" >&6
8505 fi
8506 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8507 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8508 else
8509   # Is the header compilable?
8510 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8511 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8512 cat >conftest.$ac_ext <<_ACEOF
8513 /* confdefs.h.  */
8514 _ACEOF
8515 cat confdefs.h >>conftest.$ac_ext
8516 cat >>conftest.$ac_ext <<_ACEOF
8517 /* end confdefs.h.  */
8518 $ac_includes_default
8519 #include <$ac_header>
8520 _ACEOF
8521 rm -f conftest.$ac_objext
8522 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8523   (eval $ac_compile) 2>conftest.er1
8524   ac_status=$?
8525   grep -v '^ *+' conftest.er1 >conftest.err
8526   rm -f conftest.er1
8527   cat conftest.err >&5
8528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8529   (exit $ac_status); } &&
8530          { ac_try='test -z "$ac_c_werror_flag"
8531                          || test ! -s conftest.err'
8532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8533   (eval $ac_try) 2>&5
8534   ac_status=$?
8535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8536   (exit $ac_status); }; } &&
8537          { ac_try='test -s conftest.$ac_objext'
8538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8539   (eval $ac_try) 2>&5
8540   ac_status=$?
8541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8542   (exit $ac_status); }; }; then
8543   ac_header_compiler=yes
8544 else
8545   echo "$as_me: failed program was:" >&5
8546 sed 's/^/| /' conftest.$ac_ext >&5
8547
8548 ac_header_compiler=no
8549 fi
8550 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8551 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8552 echo "${ECHO_T}$ac_header_compiler" >&6
8553
8554 # Is the header present?
8555 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8556 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8557 cat >conftest.$ac_ext <<_ACEOF
8558 /* confdefs.h.  */
8559 _ACEOF
8560 cat confdefs.h >>conftest.$ac_ext
8561 cat >>conftest.$ac_ext <<_ACEOF
8562 /* end confdefs.h.  */
8563 #include <$ac_header>
8564 _ACEOF
8565 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8566   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8567   ac_status=$?
8568   grep -v '^ *+' conftest.er1 >conftest.err
8569   rm -f conftest.er1
8570   cat conftest.err >&5
8571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8572   (exit $ac_status); } >/dev/null; then
8573   if test -s conftest.err; then
8574     ac_cpp_err=$ac_c_preproc_warn_flag
8575     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8576   else
8577     ac_cpp_err=
8578   fi
8579 else
8580   ac_cpp_err=yes
8581 fi
8582 if test -z "$ac_cpp_err"; then
8583   ac_header_preproc=yes
8584 else
8585   echo "$as_me: failed program was:" >&5
8586 sed 's/^/| /' conftest.$ac_ext >&5
8587
8588   ac_header_preproc=no
8589 fi
8590 rm -f conftest.err conftest.$ac_ext
8591 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8592 echo "${ECHO_T}$ac_header_preproc" >&6
8593
8594 # So?  What about this header?
8595 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8596   yes:no: )
8597     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8598 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8599     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8600 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8601     ac_header_preproc=yes
8602     ;;
8603   no:yes:* )
8604     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8605 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8606     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8607 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8608     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8609 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8610     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8611 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8612     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8613 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8614     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8615 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8616     (
8617       cat <<\_ASBOX
8618 ## ---------------------------------------- ##
8619 ## Report this to pgsql-bugs@postgresql.org ##
8620 ## ---------------------------------------- ##
8621 _ASBOX
8622     ) |
8623       sed "s/^/$as_me: WARNING:     /" >&2
8624     ;;
8625 esac
8626 echo "$as_me:$LINENO: checking for $ac_header" >&5
8627 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8628 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8629   echo $ECHO_N "(cached) $ECHO_C" >&6
8630 else
8631   eval "$as_ac_Header=\$ac_header_preproc"
8632 fi
8633 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8634 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8635
8636 fi
8637 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8638   cat >>confdefs.h <<_ACEOF
8639 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8640 _ACEOF
8641
8642 else
8643   { { echo "$as_me:$LINENO: error: history header not found
8644 If you have readline already installed, see config.log for details on the
8645 failure.  It is possible the compiler isn't looking in the proper directory.
8646 Use --without-readline to disable readline support." >&5
8647 echo "$as_me: error: history header not found
8648 If you have readline already installed, see config.log for details on the
8649 failure.  It is possible the compiler isn't looking in the proper directory.
8650 Use --without-readline to disable readline support." >&2;}
8651    { (exit 1); exit 1; }; }
8652 fi
8653
8654 done
8655
8656 fi
8657
8658 done
8659
8660 fi
8661
8662 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8663 # Some installations of libedit usurp /usr/include/readline/, which seems
8664 # bad practice, since in combined installations readline will have its headers
8665 # there.  We might have to resort to AC_EGREP checks to make sure we found
8666 # the proper header...
8667
8668 for ac_header in editline/readline.h
8669 do
8670 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8671 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8672   echo "$as_me:$LINENO: checking for $ac_header" >&5
8673 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8674 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8675   echo $ECHO_N "(cached) $ECHO_C" >&6
8676 fi
8677 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8678 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8679 else
8680   # Is the header compilable?
8681 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8682 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8683 cat >conftest.$ac_ext <<_ACEOF
8684 /* confdefs.h.  */
8685 _ACEOF
8686 cat confdefs.h >>conftest.$ac_ext
8687 cat >>conftest.$ac_ext <<_ACEOF
8688 /* end confdefs.h.  */
8689 $ac_includes_default
8690 #include <$ac_header>
8691 _ACEOF
8692 rm -f conftest.$ac_objext
8693 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8694   (eval $ac_compile) 2>conftest.er1
8695   ac_status=$?
8696   grep -v '^ *+' conftest.er1 >conftest.err
8697   rm -f conftest.er1
8698   cat conftest.err >&5
8699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8700   (exit $ac_status); } &&
8701          { ac_try='test -z "$ac_c_werror_flag"
8702                          || test ! -s conftest.err'
8703   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8704   (eval $ac_try) 2>&5
8705   ac_status=$?
8706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8707   (exit $ac_status); }; } &&
8708          { ac_try='test -s conftest.$ac_objext'
8709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8710   (eval $ac_try) 2>&5
8711   ac_status=$?
8712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8713   (exit $ac_status); }; }; then
8714   ac_header_compiler=yes
8715 else
8716   echo "$as_me: failed program was:" >&5
8717 sed 's/^/| /' conftest.$ac_ext >&5
8718
8719 ac_header_compiler=no
8720 fi
8721 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8722 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8723 echo "${ECHO_T}$ac_header_compiler" >&6
8724
8725 # Is the header present?
8726 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8727 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8728 cat >conftest.$ac_ext <<_ACEOF
8729 /* confdefs.h.  */
8730 _ACEOF
8731 cat confdefs.h >>conftest.$ac_ext
8732 cat >>conftest.$ac_ext <<_ACEOF
8733 /* end confdefs.h.  */
8734 #include <$ac_header>
8735 _ACEOF
8736 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8737   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8738   ac_status=$?
8739   grep -v '^ *+' conftest.er1 >conftest.err
8740   rm -f conftest.er1
8741   cat conftest.err >&5
8742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8743   (exit $ac_status); } >/dev/null; then
8744   if test -s conftest.err; then
8745     ac_cpp_err=$ac_c_preproc_warn_flag
8746     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8747   else
8748     ac_cpp_err=
8749   fi
8750 else
8751   ac_cpp_err=yes
8752 fi
8753 if test -z "$ac_cpp_err"; then
8754   ac_header_preproc=yes
8755 else
8756   echo "$as_me: failed program was:" >&5
8757 sed 's/^/| /' conftest.$ac_ext >&5
8758
8759   ac_header_preproc=no
8760 fi
8761 rm -f conftest.err conftest.$ac_ext
8762 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8763 echo "${ECHO_T}$ac_header_preproc" >&6
8764
8765 # So?  What about this header?
8766 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8767   yes:no: )
8768     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8769 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8770     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8771 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8772     ac_header_preproc=yes
8773     ;;
8774   no:yes:* )
8775     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8776 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8777     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8778 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8779     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8780 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8781     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8782 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8783     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8784 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8785     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8786 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8787     (
8788       cat <<\_ASBOX
8789 ## ---------------------------------------- ##
8790 ## Report this to pgsql-bugs@postgresql.org ##
8791 ## ---------------------------------------- ##
8792 _ASBOX
8793     ) |
8794       sed "s/^/$as_me: WARNING:     /" >&2
8795     ;;
8796 esac
8797 echo "$as_me:$LINENO: checking for $ac_header" >&5
8798 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8799 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8800   echo $ECHO_N "(cached) $ECHO_C" >&6
8801 else
8802   eval "$as_ac_Header=\$ac_header_preproc"
8803 fi
8804 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8805 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8806
8807 fi
8808 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8809   cat >>confdefs.h <<_ACEOF
8810 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8811 _ACEOF
8812
8813 else
8814
8815 for ac_header in readline.h
8816 do
8817 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8818 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8819   echo "$as_me:$LINENO: checking for $ac_header" >&5
8820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8821 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8822   echo $ECHO_N "(cached) $ECHO_C" >&6
8823 fi
8824 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8825 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8826 else
8827   # Is the header compilable?
8828 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8829 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8830 cat >conftest.$ac_ext <<_ACEOF
8831 /* confdefs.h.  */
8832 _ACEOF
8833 cat confdefs.h >>conftest.$ac_ext
8834 cat >>conftest.$ac_ext <<_ACEOF
8835 /* end confdefs.h.  */
8836 $ac_includes_default
8837 #include <$ac_header>
8838 _ACEOF
8839 rm -f conftest.$ac_objext
8840 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8841   (eval $ac_compile) 2>conftest.er1
8842   ac_status=$?
8843   grep -v '^ *+' conftest.er1 >conftest.err
8844   rm -f conftest.er1
8845   cat conftest.err >&5
8846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8847   (exit $ac_status); } &&
8848          { ac_try='test -z "$ac_c_werror_flag"
8849                          || test ! -s conftest.err'
8850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8851   (eval $ac_try) 2>&5
8852   ac_status=$?
8853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8854   (exit $ac_status); }; } &&
8855          { ac_try='test -s conftest.$ac_objext'
8856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8857   (eval $ac_try) 2>&5
8858   ac_status=$?
8859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8860   (exit $ac_status); }; }; then
8861   ac_header_compiler=yes
8862 else
8863   echo "$as_me: failed program was:" >&5
8864 sed 's/^/| /' conftest.$ac_ext >&5
8865
8866 ac_header_compiler=no
8867 fi
8868 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8869 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8870 echo "${ECHO_T}$ac_header_compiler" >&6
8871
8872 # Is the header present?
8873 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8874 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8875 cat >conftest.$ac_ext <<_ACEOF
8876 /* confdefs.h.  */
8877 _ACEOF
8878 cat confdefs.h >>conftest.$ac_ext
8879 cat >>conftest.$ac_ext <<_ACEOF
8880 /* end confdefs.h.  */
8881 #include <$ac_header>
8882 _ACEOF
8883 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8884   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8885   ac_status=$?
8886   grep -v '^ *+' conftest.er1 >conftest.err
8887   rm -f conftest.er1
8888   cat conftest.err >&5
8889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8890   (exit $ac_status); } >/dev/null; then
8891   if test -s conftest.err; then
8892     ac_cpp_err=$ac_c_preproc_warn_flag
8893     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8894   else
8895     ac_cpp_err=
8896   fi
8897 else
8898   ac_cpp_err=yes
8899 fi
8900 if test -z "$ac_cpp_err"; then
8901   ac_header_preproc=yes
8902 else
8903   echo "$as_me: failed program was:" >&5
8904 sed 's/^/| /' conftest.$ac_ext >&5
8905
8906   ac_header_preproc=no
8907 fi
8908 rm -f conftest.err conftest.$ac_ext
8909 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8910 echo "${ECHO_T}$ac_header_preproc" >&6
8911
8912 # So?  What about this header?
8913 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8914   yes:no: )
8915     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8916 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8917     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8918 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8919     ac_header_preproc=yes
8920     ;;
8921   no:yes:* )
8922     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8923 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8924     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8925 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8926     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8927 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8928     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8929 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8930     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8931 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8932     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8933 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8934     (
8935       cat <<\_ASBOX
8936 ## ---------------------------------------- ##
8937 ## Report this to pgsql-bugs@postgresql.org ##
8938 ## ---------------------------------------- ##
8939 _ASBOX
8940     ) |
8941       sed "s/^/$as_me: WARNING:     /" >&2
8942     ;;
8943 esac
8944 echo "$as_me:$LINENO: checking for $ac_header" >&5
8945 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8946 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8947   echo $ECHO_N "(cached) $ECHO_C" >&6
8948 else
8949   eval "$as_ac_Header=\$ac_header_preproc"
8950 fi
8951 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8952 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8953
8954 fi
8955 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8956   cat >>confdefs.h <<_ACEOF
8957 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8958 _ACEOF
8959
8960 else
8961
8962 for ac_header in readline/readline.h
8963 do
8964 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8965 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8966   echo "$as_me:$LINENO: checking for $ac_header" >&5
8967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8968 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8969   echo $ECHO_N "(cached) $ECHO_C" >&6
8970 fi
8971 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8972 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8973 else
8974   # Is the header compilable?
8975 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8976 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8977 cat >conftest.$ac_ext <<_ACEOF
8978 /* confdefs.h.  */
8979 _ACEOF
8980 cat confdefs.h >>conftest.$ac_ext
8981 cat >>conftest.$ac_ext <<_ACEOF
8982 /* end confdefs.h.  */
8983 $ac_includes_default
8984 #include <$ac_header>
8985 _ACEOF
8986 rm -f conftest.$ac_objext
8987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8988   (eval $ac_compile) 2>conftest.er1
8989   ac_status=$?
8990   grep -v '^ *+' conftest.er1 >conftest.err
8991   rm -f conftest.er1
8992   cat conftest.err >&5
8993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8994   (exit $ac_status); } &&
8995          { ac_try='test -z "$ac_c_werror_flag"
8996                          || test ! -s conftest.err'
8997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8998   (eval $ac_try) 2>&5
8999   ac_status=$?
9000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9001   (exit $ac_status); }; } &&
9002          { ac_try='test -s conftest.$ac_objext'
9003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9004   (eval $ac_try) 2>&5
9005   ac_status=$?
9006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9007   (exit $ac_status); }; }; then
9008   ac_header_compiler=yes
9009 else
9010   echo "$as_me: failed program was:" >&5
9011 sed 's/^/| /' conftest.$ac_ext >&5
9012
9013 ac_header_compiler=no
9014 fi
9015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9016 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9017 echo "${ECHO_T}$ac_header_compiler" >&6
9018
9019 # Is the header present?
9020 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9021 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9022 cat >conftest.$ac_ext <<_ACEOF
9023 /* confdefs.h.  */
9024 _ACEOF
9025 cat confdefs.h >>conftest.$ac_ext
9026 cat >>conftest.$ac_ext <<_ACEOF
9027 /* end confdefs.h.  */
9028 #include <$ac_header>
9029 _ACEOF
9030 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9031   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9032   ac_status=$?
9033   grep -v '^ *+' conftest.er1 >conftest.err
9034   rm -f conftest.er1
9035   cat conftest.err >&5
9036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9037   (exit $ac_status); } >/dev/null; then
9038   if test -s conftest.err; then
9039     ac_cpp_err=$ac_c_preproc_warn_flag
9040     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9041   else
9042     ac_cpp_err=
9043   fi
9044 else
9045   ac_cpp_err=yes
9046 fi
9047 if test -z "$ac_cpp_err"; then
9048   ac_header_preproc=yes
9049 else
9050   echo "$as_me: failed program was:" >&5
9051 sed 's/^/| /' conftest.$ac_ext >&5
9052
9053   ac_header_preproc=no
9054 fi
9055 rm -f conftest.err conftest.$ac_ext
9056 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9057 echo "${ECHO_T}$ac_header_preproc" >&6
9058
9059 # So?  What about this header?
9060 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9061   yes:no: )
9062     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9063 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9064     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9065 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9066     ac_header_preproc=yes
9067     ;;
9068   no:yes:* )
9069     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9070 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9071     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9072 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9073     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9074 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9075     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9076 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9077     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9078 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9079     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9080 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9081     (
9082       cat <<\_ASBOX
9083 ## ---------------------------------------- ##
9084 ## Report this to pgsql-bugs@postgresql.org ##
9085 ## ---------------------------------------- ##
9086 _ASBOX
9087     ) |
9088       sed "s/^/$as_me: WARNING:     /" >&2
9089     ;;
9090 esac
9091 echo "$as_me:$LINENO: checking for $ac_header" >&5
9092 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9093 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9094   echo $ECHO_N "(cached) $ECHO_C" >&6
9095 else
9096   eval "$as_ac_Header=\$ac_header_preproc"
9097 fi
9098 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9099 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9100
9101 fi
9102 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9103   cat >>confdefs.h <<_ACEOF
9104 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9105 _ACEOF
9106
9107 else
9108   { { echo "$as_me:$LINENO: error: readline header not found
9109 If you have libedit already installed, see config.log for details on the
9110 failure.  It is possible the compiler isn't looking in the proper directory.
9111 Use --without-readline to disable libedit support." >&5
9112 echo "$as_me: error: readline header not found
9113 If you have libedit already installed, see config.log for details on the
9114 failure.  It is possible the compiler isn't looking in the proper directory.
9115 Use --without-readline to disable libedit support." >&2;}
9116    { (exit 1); exit 1; }; }
9117 fi
9118
9119 done
9120
9121 fi
9122
9123 done
9124
9125 fi
9126
9127 done
9128
9129
9130 for ac_header in editline/history.h
9131 do
9132 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9133 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9134   echo "$as_me:$LINENO: checking for $ac_header" >&5
9135 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9136 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9137   echo $ECHO_N "(cached) $ECHO_C" >&6
9138 fi
9139 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9140 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9141 else
9142   # Is the header compilable?
9143 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9144 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9145 cat >conftest.$ac_ext <<_ACEOF
9146 /* confdefs.h.  */
9147 _ACEOF
9148 cat confdefs.h >>conftest.$ac_ext
9149 cat >>conftest.$ac_ext <<_ACEOF
9150 /* end confdefs.h.  */
9151 $ac_includes_default
9152 #include <$ac_header>
9153 _ACEOF
9154 rm -f conftest.$ac_objext
9155 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9156   (eval $ac_compile) 2>conftest.er1
9157   ac_status=$?
9158   grep -v '^ *+' conftest.er1 >conftest.err
9159   rm -f conftest.er1
9160   cat conftest.err >&5
9161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9162   (exit $ac_status); } &&
9163          { ac_try='test -z "$ac_c_werror_flag"
9164                          || test ! -s conftest.err'
9165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9166   (eval $ac_try) 2>&5
9167   ac_status=$?
9168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169   (exit $ac_status); }; } &&
9170          { ac_try='test -s conftest.$ac_objext'
9171   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9172   (eval $ac_try) 2>&5
9173   ac_status=$?
9174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9175   (exit $ac_status); }; }; then
9176   ac_header_compiler=yes
9177 else
9178   echo "$as_me: failed program was:" >&5
9179 sed 's/^/| /' conftest.$ac_ext >&5
9180
9181 ac_header_compiler=no
9182 fi
9183 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9184 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9185 echo "${ECHO_T}$ac_header_compiler" >&6
9186
9187 # Is the header present?
9188 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9189 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9190 cat >conftest.$ac_ext <<_ACEOF
9191 /* confdefs.h.  */
9192 _ACEOF
9193 cat confdefs.h >>conftest.$ac_ext
9194 cat >>conftest.$ac_ext <<_ACEOF
9195 /* end confdefs.h.  */
9196 #include <$ac_header>
9197 _ACEOF
9198 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9199   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9200   ac_status=$?
9201   grep -v '^ *+' conftest.er1 >conftest.err
9202   rm -f conftest.er1
9203   cat conftest.err >&5
9204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9205   (exit $ac_status); } >/dev/null; then
9206   if test -s conftest.err; then
9207     ac_cpp_err=$ac_c_preproc_warn_flag
9208     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9209   else
9210     ac_cpp_err=
9211   fi
9212 else
9213   ac_cpp_err=yes
9214 fi
9215 if test -z "$ac_cpp_err"; then
9216   ac_header_preproc=yes
9217 else
9218   echo "$as_me: failed program was:" >&5
9219 sed 's/^/| /' conftest.$ac_ext >&5
9220
9221   ac_header_preproc=no
9222 fi
9223 rm -f conftest.err conftest.$ac_ext
9224 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9225 echo "${ECHO_T}$ac_header_preproc" >&6
9226
9227 # So?  What about this header?
9228 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9229   yes:no: )
9230     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9231 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9232     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9233 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9234     ac_header_preproc=yes
9235     ;;
9236   no:yes:* )
9237     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9238 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9239     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9240 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9241     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9242 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9243     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9244 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9245     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9246 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9247     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9248 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9249     (
9250       cat <<\_ASBOX
9251 ## ---------------------------------------- ##
9252 ## Report this to pgsql-bugs@postgresql.org ##
9253 ## ---------------------------------------- ##
9254 _ASBOX
9255     ) |
9256       sed "s/^/$as_me: WARNING:     /" >&2
9257     ;;
9258 esac
9259 echo "$as_me:$LINENO: checking for $ac_header" >&5
9260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9262   echo $ECHO_N "(cached) $ECHO_C" >&6
9263 else
9264   eval "$as_ac_Header=\$ac_header_preproc"
9265 fi
9266 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9267 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9268
9269 fi
9270 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9271   cat >>confdefs.h <<_ACEOF
9272 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9273 _ACEOF
9274
9275 else
9276
9277 for ac_header in history.h
9278 do
9279 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9280 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9281   echo "$as_me:$LINENO: checking for $ac_header" >&5
9282 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9283 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9284   echo $ECHO_N "(cached) $ECHO_C" >&6
9285 fi
9286 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9287 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9288 else
9289   # Is the header compilable?
9290 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9291 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9292 cat >conftest.$ac_ext <<_ACEOF
9293 /* confdefs.h.  */
9294 _ACEOF
9295 cat confdefs.h >>conftest.$ac_ext
9296 cat >>conftest.$ac_ext <<_ACEOF
9297 /* end confdefs.h.  */
9298 $ac_includes_default
9299 #include <$ac_header>
9300 _ACEOF
9301 rm -f conftest.$ac_objext
9302 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9303   (eval $ac_compile) 2>conftest.er1
9304   ac_status=$?
9305   grep -v '^ *+' conftest.er1 >conftest.err
9306   rm -f conftest.er1
9307   cat conftest.err >&5
9308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9309   (exit $ac_status); } &&
9310          { ac_try='test -z "$ac_c_werror_flag"
9311                          || test ! -s conftest.err'
9312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9313   (eval $ac_try) 2>&5
9314   ac_status=$?
9315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9316   (exit $ac_status); }; } &&
9317          { ac_try='test -s conftest.$ac_objext'
9318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9319   (eval $ac_try) 2>&5
9320   ac_status=$?
9321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9322   (exit $ac_status); }; }; then
9323   ac_header_compiler=yes
9324 else
9325   echo "$as_me: failed program was:" >&5
9326 sed 's/^/| /' conftest.$ac_ext >&5
9327
9328 ac_header_compiler=no
9329 fi
9330 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9331 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9332 echo "${ECHO_T}$ac_header_compiler" >&6
9333
9334 # Is the header present?
9335 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9336 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9337 cat >conftest.$ac_ext <<_ACEOF
9338 /* confdefs.h.  */
9339 _ACEOF
9340 cat confdefs.h >>conftest.$ac_ext
9341 cat >>conftest.$ac_ext <<_ACEOF
9342 /* end confdefs.h.  */
9343 #include <$ac_header>
9344 _ACEOF
9345 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9347   ac_status=$?
9348   grep -v '^ *+' conftest.er1 >conftest.err
9349   rm -f conftest.er1
9350   cat conftest.err >&5
9351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9352   (exit $ac_status); } >/dev/null; then
9353   if test -s conftest.err; then
9354     ac_cpp_err=$ac_c_preproc_warn_flag
9355     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9356   else
9357     ac_cpp_err=
9358   fi
9359 else
9360   ac_cpp_err=yes
9361 fi
9362 if test -z "$ac_cpp_err"; then
9363   ac_header_preproc=yes
9364 else
9365   echo "$as_me: failed program was:" >&5
9366 sed 's/^/| /' conftest.$ac_ext >&5
9367
9368   ac_header_preproc=no
9369 fi
9370 rm -f conftest.err conftest.$ac_ext
9371 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9372 echo "${ECHO_T}$ac_header_preproc" >&6
9373
9374 # So?  What about this header?
9375 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9376   yes:no: )
9377     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9378 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9379     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9380 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9381     ac_header_preproc=yes
9382     ;;
9383   no:yes:* )
9384     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9385 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9386     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9387 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9388     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9389 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9390     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9391 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9392     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9393 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9394     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9395 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9396     (
9397       cat <<\_ASBOX
9398 ## ---------------------------------------- ##
9399 ## Report this to pgsql-bugs@postgresql.org ##
9400 ## ---------------------------------------- ##
9401 _ASBOX
9402     ) |
9403       sed "s/^/$as_me: WARNING:     /" >&2
9404     ;;
9405 esac
9406 echo "$as_me:$LINENO: checking for $ac_header" >&5
9407 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9408 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9409   echo $ECHO_N "(cached) $ECHO_C" >&6
9410 else
9411   eval "$as_ac_Header=\$ac_header_preproc"
9412 fi
9413 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9414 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9415
9416 fi
9417 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9418   cat >>confdefs.h <<_ACEOF
9419 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9420 _ACEOF
9421
9422 else
9423
9424 for ac_header in readline/history.h
9425 do
9426 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9427 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9428   echo "$as_me:$LINENO: checking for $ac_header" >&5
9429 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9430 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9431   echo $ECHO_N "(cached) $ECHO_C" >&6
9432 fi
9433 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9434 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9435 else
9436   # Is the header compilable?
9437 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9438 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9439 cat >conftest.$ac_ext <<_ACEOF
9440 /* confdefs.h.  */
9441 _ACEOF
9442 cat confdefs.h >>conftest.$ac_ext
9443 cat >>conftest.$ac_ext <<_ACEOF
9444 /* end confdefs.h.  */
9445 $ac_includes_default
9446 #include <$ac_header>
9447 _ACEOF
9448 rm -f conftest.$ac_objext
9449 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9450   (eval $ac_compile) 2>conftest.er1
9451   ac_status=$?
9452   grep -v '^ *+' conftest.er1 >conftest.err
9453   rm -f conftest.er1
9454   cat conftest.err >&5
9455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9456   (exit $ac_status); } &&
9457          { ac_try='test -z "$ac_c_werror_flag"
9458                          || test ! -s conftest.err'
9459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9460   (eval $ac_try) 2>&5
9461   ac_status=$?
9462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9463   (exit $ac_status); }; } &&
9464          { ac_try='test -s conftest.$ac_objext'
9465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9466   (eval $ac_try) 2>&5
9467   ac_status=$?
9468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9469   (exit $ac_status); }; }; then
9470   ac_header_compiler=yes
9471 else
9472   echo "$as_me: failed program was:" >&5
9473 sed 's/^/| /' conftest.$ac_ext >&5
9474
9475 ac_header_compiler=no
9476 fi
9477 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9478 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9479 echo "${ECHO_T}$ac_header_compiler" >&6
9480
9481 # Is the header present?
9482 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9483 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9484 cat >conftest.$ac_ext <<_ACEOF
9485 /* confdefs.h.  */
9486 _ACEOF
9487 cat confdefs.h >>conftest.$ac_ext
9488 cat >>conftest.$ac_ext <<_ACEOF
9489 /* end confdefs.h.  */
9490 #include <$ac_header>
9491 _ACEOF
9492 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9493   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9494   ac_status=$?
9495   grep -v '^ *+' conftest.er1 >conftest.err
9496   rm -f conftest.er1
9497   cat conftest.err >&5
9498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9499   (exit $ac_status); } >/dev/null; then
9500   if test -s conftest.err; then
9501     ac_cpp_err=$ac_c_preproc_warn_flag
9502     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9503   else
9504     ac_cpp_err=
9505   fi
9506 else
9507   ac_cpp_err=yes
9508 fi
9509 if test -z "$ac_cpp_err"; then
9510   ac_header_preproc=yes
9511 else
9512   echo "$as_me: failed program was:" >&5
9513 sed 's/^/| /' conftest.$ac_ext >&5
9514
9515   ac_header_preproc=no
9516 fi
9517 rm -f conftest.err conftest.$ac_ext
9518 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9519 echo "${ECHO_T}$ac_header_preproc" >&6
9520
9521 # So?  What about this header?
9522 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9523   yes:no: )
9524     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9525 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9526     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9527 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9528     ac_header_preproc=yes
9529     ;;
9530   no:yes:* )
9531     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9532 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9533     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9534 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9535     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9536 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9537     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9538 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9539     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9540 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9541     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9542 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9543     (
9544       cat <<\_ASBOX
9545 ## ---------------------------------------- ##
9546 ## Report this to pgsql-bugs@postgresql.org ##
9547 ## ---------------------------------------- ##
9548 _ASBOX
9549     ) |
9550       sed "s/^/$as_me: WARNING:     /" >&2
9551     ;;
9552 esac
9553 echo "$as_me:$LINENO: checking for $ac_header" >&5
9554 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9555 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9556   echo $ECHO_N "(cached) $ECHO_C" >&6
9557 else
9558   eval "$as_ac_Header=\$ac_header_preproc"
9559 fi
9560 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9561 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9562
9563 fi
9564 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9565   cat >>confdefs.h <<_ACEOF
9566 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9567 _ACEOF
9568
9569 else
9570   { { echo "$as_me:$LINENO: error: history header not found
9571 If you have libedit already installed, see config.log for details on the
9572 failure.  It is possible the compiler isn't looking in the proper directory.
9573 Use --without-readline to disable libedit support." >&5
9574 echo "$as_me: error: history header not found
9575 If you have libedit already installed, see config.log for details on the
9576 failure.  It is possible the compiler isn't looking in the proper directory.
9577 Use --without-readline to disable libedit support." >&2;}
9578    { (exit 1); exit 1; }; }
9579 fi
9580
9581 done
9582
9583 fi
9584
9585 done
9586
9587 fi
9588
9589 done
9590
9591 fi
9592
9593 if test "$with_zlib" = yes; then
9594   if test "${ac_cv_header_zlib_h+set}" = set; then
9595   echo "$as_me:$LINENO: checking for zlib.h" >&5
9596 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9597 if test "${ac_cv_header_zlib_h+set}" = set; then
9598   echo $ECHO_N "(cached) $ECHO_C" >&6
9599 fi
9600 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9601 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9602 else
9603   # Is the header compilable?
9604 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9605 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9606 cat >conftest.$ac_ext <<_ACEOF
9607 /* confdefs.h.  */
9608 _ACEOF
9609 cat confdefs.h >>conftest.$ac_ext
9610 cat >>conftest.$ac_ext <<_ACEOF
9611 /* end confdefs.h.  */
9612 $ac_includes_default
9613 #include <zlib.h>
9614 _ACEOF
9615 rm -f conftest.$ac_objext
9616 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9617   (eval $ac_compile) 2>conftest.er1
9618   ac_status=$?
9619   grep -v '^ *+' conftest.er1 >conftest.err
9620   rm -f conftest.er1
9621   cat conftest.err >&5
9622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9623   (exit $ac_status); } &&
9624          { ac_try='test -z "$ac_c_werror_flag"
9625                          || test ! -s conftest.err'
9626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9627   (eval $ac_try) 2>&5
9628   ac_status=$?
9629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9630   (exit $ac_status); }; } &&
9631          { ac_try='test -s conftest.$ac_objext'
9632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9633   (eval $ac_try) 2>&5
9634   ac_status=$?
9635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9636   (exit $ac_status); }; }; then
9637   ac_header_compiler=yes
9638 else
9639   echo "$as_me: failed program was:" >&5
9640 sed 's/^/| /' conftest.$ac_ext >&5
9641
9642 ac_header_compiler=no
9643 fi
9644 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9645 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9646 echo "${ECHO_T}$ac_header_compiler" >&6
9647
9648 # Is the header present?
9649 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9650 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9651 cat >conftest.$ac_ext <<_ACEOF
9652 /* confdefs.h.  */
9653 _ACEOF
9654 cat confdefs.h >>conftest.$ac_ext
9655 cat >>conftest.$ac_ext <<_ACEOF
9656 /* end confdefs.h.  */
9657 #include <zlib.h>
9658 _ACEOF
9659 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9661   ac_status=$?
9662   grep -v '^ *+' conftest.er1 >conftest.err
9663   rm -f conftest.er1
9664   cat conftest.err >&5
9665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9666   (exit $ac_status); } >/dev/null; then
9667   if test -s conftest.err; then
9668     ac_cpp_err=$ac_c_preproc_warn_flag
9669     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9670   else
9671     ac_cpp_err=
9672   fi
9673 else
9674   ac_cpp_err=yes
9675 fi
9676 if test -z "$ac_cpp_err"; then
9677   ac_header_preproc=yes
9678 else
9679   echo "$as_me: failed program was:" >&5
9680 sed 's/^/| /' conftest.$ac_ext >&5
9681
9682   ac_header_preproc=no
9683 fi
9684 rm -f conftest.err conftest.$ac_ext
9685 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9686 echo "${ECHO_T}$ac_header_preproc" >&6
9687
9688 # So?  What about this header?
9689 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9690   yes:no: )
9691     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9692 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9693     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9694 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9695     ac_header_preproc=yes
9696     ;;
9697   no:yes:* )
9698     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9699 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9700     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9701 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9702     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9703 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9704     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9705 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9706     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9707 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9708     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9709 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9710     (
9711       cat <<\_ASBOX
9712 ## ---------------------------------------- ##
9713 ## Report this to pgsql-bugs@postgresql.org ##
9714 ## ---------------------------------------- ##
9715 _ASBOX
9716     ) |
9717       sed "s/^/$as_me: WARNING:     /" >&2
9718     ;;
9719 esac
9720 echo "$as_me:$LINENO: checking for zlib.h" >&5
9721 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9722 if test "${ac_cv_header_zlib_h+set}" = set; then
9723   echo $ECHO_N "(cached) $ECHO_C" >&6
9724 else
9725   ac_cv_header_zlib_h=$ac_header_preproc
9726 fi
9727 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9728 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9729
9730 fi
9731 if test $ac_cv_header_zlib_h = yes; then
9732   :
9733 else
9734   { { echo "$as_me:$LINENO: error: zlib header not found
9735 If you have zlib already installed, see config.log for details on the
9736 failure.  It is possible the compiler isn't looking in the proper directory.
9737 Use --without-zlib to disable zlib support." >&5
9738 echo "$as_me: error: zlib header not found
9739 If you have zlib already installed, see config.log for details on the
9740 failure.  It is possible the compiler isn't looking in the proper directory.
9741 Use --without-zlib to disable zlib support." >&2;}
9742    { (exit 1); exit 1; }; }
9743 fi
9744
9745
9746 fi
9747
9748 if test "$with_krb5" = yes ; then
9749   if test "${ac_cv_header_krb5_h+set}" = set; then
9750   echo "$as_me:$LINENO: checking for krb5.h" >&5
9751 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9752 if test "${ac_cv_header_krb5_h+set}" = set; then
9753   echo $ECHO_N "(cached) $ECHO_C" >&6
9754 fi
9755 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9756 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9757 else
9758   # Is the header compilable?
9759 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9760 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9761 cat >conftest.$ac_ext <<_ACEOF
9762 /* confdefs.h.  */
9763 _ACEOF
9764 cat confdefs.h >>conftest.$ac_ext
9765 cat >>conftest.$ac_ext <<_ACEOF
9766 /* end confdefs.h.  */
9767 $ac_includes_default
9768 #include <krb5.h>
9769 _ACEOF
9770 rm -f conftest.$ac_objext
9771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9772   (eval $ac_compile) 2>conftest.er1
9773   ac_status=$?
9774   grep -v '^ *+' conftest.er1 >conftest.err
9775   rm -f conftest.er1
9776   cat conftest.err >&5
9777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778   (exit $ac_status); } &&
9779          { ac_try='test -z "$ac_c_werror_flag"
9780                          || test ! -s conftest.err'
9781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9782   (eval $ac_try) 2>&5
9783   ac_status=$?
9784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9785   (exit $ac_status); }; } &&
9786          { ac_try='test -s conftest.$ac_objext'
9787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9788   (eval $ac_try) 2>&5
9789   ac_status=$?
9790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9791   (exit $ac_status); }; }; then
9792   ac_header_compiler=yes
9793 else
9794   echo "$as_me: failed program was:" >&5
9795 sed 's/^/| /' conftest.$ac_ext >&5
9796
9797 ac_header_compiler=no
9798 fi
9799 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9800 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9801 echo "${ECHO_T}$ac_header_compiler" >&6
9802
9803 # Is the header present?
9804 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9805 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9806 cat >conftest.$ac_ext <<_ACEOF
9807 /* confdefs.h.  */
9808 _ACEOF
9809 cat confdefs.h >>conftest.$ac_ext
9810 cat >>conftest.$ac_ext <<_ACEOF
9811 /* end confdefs.h.  */
9812 #include <krb5.h>
9813 _ACEOF
9814 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9815   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9816   ac_status=$?
9817   grep -v '^ *+' conftest.er1 >conftest.err
9818   rm -f conftest.er1
9819   cat conftest.err >&5
9820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9821   (exit $ac_status); } >/dev/null; then
9822   if test -s conftest.err; then
9823     ac_cpp_err=$ac_c_preproc_warn_flag
9824     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9825   else
9826     ac_cpp_err=
9827   fi
9828 else
9829   ac_cpp_err=yes
9830 fi
9831 if test -z "$ac_cpp_err"; then
9832   ac_header_preproc=yes
9833 else
9834   echo "$as_me: failed program was:" >&5
9835 sed 's/^/| /' conftest.$ac_ext >&5
9836
9837   ac_header_preproc=no
9838 fi
9839 rm -f conftest.err conftest.$ac_ext
9840 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9841 echo "${ECHO_T}$ac_header_preproc" >&6
9842
9843 # So?  What about this header?
9844 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9845   yes:no: )
9846     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9847 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9848     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9849 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9850     ac_header_preproc=yes
9851     ;;
9852   no:yes:* )
9853     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9854 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9855     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9856 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9857     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9858 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9859     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9860 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9861     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9862 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9863     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9864 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9865     (
9866       cat <<\_ASBOX
9867 ## ---------------------------------------- ##
9868 ## Report this to pgsql-bugs@postgresql.org ##
9869 ## ---------------------------------------- ##
9870 _ASBOX
9871     ) |
9872       sed "s/^/$as_me: WARNING:     /" >&2
9873     ;;
9874 esac
9875 echo "$as_me:$LINENO: checking for krb5.h" >&5
9876 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9877 if test "${ac_cv_header_krb5_h+set}" = set; then
9878   echo $ECHO_N "(cached) $ECHO_C" >&6
9879 else
9880   ac_cv_header_krb5_h=$ac_header_preproc
9881 fi
9882 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9883 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9884
9885 fi
9886 if test $ac_cv_header_krb5_h = yes; then
9887   :
9888 else
9889   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9890 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9891    { (exit 1); exit 1; }; }
9892 fi
9893
9894
9895 fi
9896
9897 if test "$with_openssl" = yes ; then
9898   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9899   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9900 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9901 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9902   echo $ECHO_N "(cached) $ECHO_C" >&6
9903 fi
9904 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9905 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9906 else
9907   # Is the header compilable?
9908 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9909 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9910 cat >conftest.$ac_ext <<_ACEOF
9911 /* confdefs.h.  */
9912 _ACEOF
9913 cat confdefs.h >>conftest.$ac_ext
9914 cat >>conftest.$ac_ext <<_ACEOF
9915 /* end confdefs.h.  */
9916 $ac_includes_default
9917 #include <openssl/ssl.h>
9918 _ACEOF
9919 rm -f conftest.$ac_objext
9920 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9921   (eval $ac_compile) 2>conftest.er1
9922   ac_status=$?
9923   grep -v '^ *+' conftest.er1 >conftest.err
9924   rm -f conftest.er1
9925   cat conftest.err >&5
9926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9927   (exit $ac_status); } &&
9928          { ac_try='test -z "$ac_c_werror_flag"
9929                          || test ! -s conftest.err'
9930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9931   (eval $ac_try) 2>&5
9932   ac_status=$?
9933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9934   (exit $ac_status); }; } &&
9935          { ac_try='test -s conftest.$ac_objext'
9936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9937   (eval $ac_try) 2>&5
9938   ac_status=$?
9939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9940   (exit $ac_status); }; }; then
9941   ac_header_compiler=yes
9942 else
9943   echo "$as_me: failed program was:" >&5
9944 sed 's/^/| /' conftest.$ac_ext >&5
9945
9946 ac_header_compiler=no
9947 fi
9948 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9949 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9950 echo "${ECHO_T}$ac_header_compiler" >&6
9951
9952 # Is the header present?
9953 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
9954 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
9955 cat >conftest.$ac_ext <<_ACEOF
9956 /* confdefs.h.  */
9957 _ACEOF
9958 cat confdefs.h >>conftest.$ac_ext
9959 cat >>conftest.$ac_ext <<_ACEOF
9960 /* end confdefs.h.  */
9961 #include <openssl/ssl.h>
9962 _ACEOF
9963 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9964   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9965   ac_status=$?
9966   grep -v '^ *+' conftest.er1 >conftest.err
9967   rm -f conftest.er1
9968   cat conftest.err >&5
9969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9970   (exit $ac_status); } >/dev/null; then
9971   if test -s conftest.err; then
9972     ac_cpp_err=$ac_c_preproc_warn_flag
9973     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9974   else
9975     ac_cpp_err=
9976   fi
9977 else
9978   ac_cpp_err=yes
9979 fi
9980 if test -z "$ac_cpp_err"; then
9981   ac_header_preproc=yes
9982 else
9983   echo "$as_me: failed program was:" >&5
9984 sed 's/^/| /' conftest.$ac_ext >&5
9985
9986   ac_header_preproc=no
9987 fi
9988 rm -f conftest.err conftest.$ac_ext
9989 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9990 echo "${ECHO_T}$ac_header_preproc" >&6
9991
9992 # So?  What about this header?
9993 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9994   yes:no: )
9995     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9996 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9997     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
9998 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
9999     ac_header_preproc=yes
10000     ;;
10001   no:yes:* )
10002     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10003 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10004     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10005 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10006     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10007 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10008     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10009 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10010     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10011 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10012     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10013 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10014     (
10015       cat <<\_ASBOX
10016 ## ---------------------------------------- ##
10017 ## Report this to pgsql-bugs@postgresql.org ##
10018 ## ---------------------------------------- ##
10019 _ASBOX
10020     ) |
10021       sed "s/^/$as_me: WARNING:     /" >&2
10022     ;;
10023 esac
10024 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10025 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10026 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10027   echo $ECHO_N "(cached) $ECHO_C" >&6
10028 else
10029   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10030 fi
10031 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10032 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10033
10034 fi
10035 if test $ac_cv_header_openssl_ssl_h = yes; then
10036   :
10037 else
10038   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10039 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10040    { (exit 1); exit 1; }; }
10041 fi
10042
10043
10044   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10045   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10046 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10047 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10048   echo $ECHO_N "(cached) $ECHO_C" >&6
10049 fi
10050 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10051 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10052 else
10053   # Is the header compilable?
10054 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10055 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10056 cat >conftest.$ac_ext <<_ACEOF
10057 /* confdefs.h.  */
10058 _ACEOF
10059 cat confdefs.h >>conftest.$ac_ext
10060 cat >>conftest.$ac_ext <<_ACEOF
10061 /* end confdefs.h.  */
10062 $ac_includes_default
10063 #include <openssl/err.h>
10064 _ACEOF
10065 rm -f conftest.$ac_objext
10066 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10067   (eval $ac_compile) 2>conftest.er1
10068   ac_status=$?
10069   grep -v '^ *+' conftest.er1 >conftest.err
10070   rm -f conftest.er1
10071   cat conftest.err >&5
10072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10073   (exit $ac_status); } &&
10074          { ac_try='test -z "$ac_c_werror_flag"
10075                          || test ! -s conftest.err'
10076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10077   (eval $ac_try) 2>&5
10078   ac_status=$?
10079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10080   (exit $ac_status); }; } &&
10081          { ac_try='test -s conftest.$ac_objext'
10082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10083   (eval $ac_try) 2>&5
10084   ac_status=$?
10085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086   (exit $ac_status); }; }; then
10087   ac_header_compiler=yes
10088 else
10089   echo "$as_me: failed program was:" >&5
10090 sed 's/^/| /' conftest.$ac_ext >&5
10091
10092 ac_header_compiler=no
10093 fi
10094 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10095 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10096 echo "${ECHO_T}$ac_header_compiler" >&6
10097
10098 # Is the header present?
10099 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10100 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10101 cat >conftest.$ac_ext <<_ACEOF
10102 /* confdefs.h.  */
10103 _ACEOF
10104 cat confdefs.h >>conftest.$ac_ext
10105 cat >>conftest.$ac_ext <<_ACEOF
10106 /* end confdefs.h.  */
10107 #include <openssl/err.h>
10108 _ACEOF
10109 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10110   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10111   ac_status=$?
10112   grep -v '^ *+' conftest.er1 >conftest.err
10113   rm -f conftest.er1
10114   cat conftest.err >&5
10115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10116   (exit $ac_status); } >/dev/null; then
10117   if test -s conftest.err; then
10118     ac_cpp_err=$ac_c_preproc_warn_flag
10119     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10120   else
10121     ac_cpp_err=
10122   fi
10123 else
10124   ac_cpp_err=yes
10125 fi
10126 if test -z "$ac_cpp_err"; then
10127   ac_header_preproc=yes
10128 else
10129   echo "$as_me: failed program was:" >&5
10130 sed 's/^/| /' conftest.$ac_ext >&5
10131
10132   ac_header_preproc=no
10133 fi
10134 rm -f conftest.err conftest.$ac_ext
10135 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10136 echo "${ECHO_T}$ac_header_preproc" >&6
10137
10138 # So?  What about this header?
10139 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10140   yes:no: )
10141     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10142 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10143     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10144 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10145     ac_header_preproc=yes
10146     ;;
10147   no:yes:* )
10148     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10149 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10150     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10151 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10152     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10153 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10154     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10155 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10156     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10157 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10158     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10159 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10160     (
10161       cat <<\_ASBOX
10162 ## ---------------------------------------- ##
10163 ## Report this to pgsql-bugs@postgresql.org ##
10164 ## ---------------------------------------- ##
10165 _ASBOX
10166     ) |
10167       sed "s/^/$as_me: WARNING:     /" >&2
10168     ;;
10169 esac
10170 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10171 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10172 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10173   echo $ECHO_N "(cached) $ECHO_C" >&6
10174 else
10175   ac_cv_header_openssl_err_h=$ac_header_preproc
10176 fi
10177 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10178 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10179
10180 fi
10181 if test $ac_cv_header_openssl_err_h = yes; then
10182   :
10183 else
10184   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10185 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10186    { (exit 1); exit 1; }; }
10187 fi
10188
10189
10190 fi
10191
10192 if test "$with_pam" = yes ; then
10193
10194 for ac_header in security/pam_appl.h
10195 do
10196 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10197 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10198   echo "$as_me:$LINENO: checking for $ac_header" >&5
10199 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10200 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10201   echo $ECHO_N "(cached) $ECHO_C" >&6
10202 fi
10203 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10204 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10205 else
10206   # Is the header compilable?
10207 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10208 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10209 cat >conftest.$ac_ext <<_ACEOF
10210 /* confdefs.h.  */
10211 _ACEOF
10212 cat confdefs.h >>conftest.$ac_ext
10213 cat >>conftest.$ac_ext <<_ACEOF
10214 /* end confdefs.h.  */
10215 $ac_includes_default
10216 #include <$ac_header>
10217 _ACEOF
10218 rm -f conftest.$ac_objext
10219 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10220   (eval $ac_compile) 2>conftest.er1
10221   ac_status=$?
10222   grep -v '^ *+' conftest.er1 >conftest.err
10223   rm -f conftest.er1
10224   cat conftest.err >&5
10225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226   (exit $ac_status); } &&
10227          { ac_try='test -z "$ac_c_werror_flag"
10228                          || test ! -s conftest.err'
10229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10230   (eval $ac_try) 2>&5
10231   ac_status=$?
10232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10233   (exit $ac_status); }; } &&
10234          { ac_try='test -s conftest.$ac_objext'
10235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10236   (eval $ac_try) 2>&5
10237   ac_status=$?
10238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10239   (exit $ac_status); }; }; then
10240   ac_header_compiler=yes
10241 else
10242   echo "$as_me: failed program was:" >&5
10243 sed 's/^/| /' conftest.$ac_ext >&5
10244
10245 ac_header_compiler=no
10246 fi
10247 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10248 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10249 echo "${ECHO_T}$ac_header_compiler" >&6
10250
10251 # Is the header present?
10252 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10253 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10254 cat >conftest.$ac_ext <<_ACEOF
10255 /* confdefs.h.  */
10256 _ACEOF
10257 cat confdefs.h >>conftest.$ac_ext
10258 cat >>conftest.$ac_ext <<_ACEOF
10259 /* end confdefs.h.  */
10260 #include <$ac_header>
10261 _ACEOF
10262 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10263   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10264   ac_status=$?
10265   grep -v '^ *+' conftest.er1 >conftest.err
10266   rm -f conftest.er1
10267   cat conftest.err >&5
10268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10269   (exit $ac_status); } >/dev/null; then
10270   if test -s conftest.err; then
10271     ac_cpp_err=$ac_c_preproc_warn_flag
10272     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10273   else
10274     ac_cpp_err=
10275   fi
10276 else
10277   ac_cpp_err=yes
10278 fi
10279 if test -z "$ac_cpp_err"; then
10280   ac_header_preproc=yes
10281 else
10282   echo "$as_me: failed program was:" >&5
10283 sed 's/^/| /' conftest.$ac_ext >&5
10284
10285   ac_header_preproc=no
10286 fi
10287 rm -f conftest.err conftest.$ac_ext
10288 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10289 echo "${ECHO_T}$ac_header_preproc" >&6
10290
10291 # So?  What about this header?
10292 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10293   yes:no: )
10294     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10295 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10296     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10297 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10298     ac_header_preproc=yes
10299     ;;
10300   no:yes:* )
10301     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10302 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10303     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10304 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10305     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10306 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10307     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10308 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10309     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10310 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10311     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10312 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10313     (
10314       cat <<\_ASBOX
10315 ## ---------------------------------------- ##
10316 ## Report this to pgsql-bugs@postgresql.org ##
10317 ## ---------------------------------------- ##
10318 _ASBOX
10319     ) |
10320       sed "s/^/$as_me: WARNING:     /" >&2
10321     ;;
10322 esac
10323 echo "$as_me:$LINENO: checking for $ac_header" >&5
10324 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10325 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10326   echo $ECHO_N "(cached) $ECHO_C" >&6
10327 else
10328   eval "$as_ac_Header=\$ac_header_preproc"
10329 fi
10330 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10331 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10332
10333 fi
10334 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10335   cat >>confdefs.h <<_ACEOF
10336 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10337 _ACEOF
10338
10339 else
10340
10341 for ac_header in pam/pam_appl.h
10342 do
10343 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10344 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10345   echo "$as_me:$LINENO: checking for $ac_header" >&5
10346 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10347 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10348   echo $ECHO_N "(cached) $ECHO_C" >&6
10349 fi
10350 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10351 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10352 else
10353   # Is the header compilable?
10354 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10355 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10356 cat >conftest.$ac_ext <<_ACEOF
10357 /* confdefs.h.  */
10358 _ACEOF
10359 cat confdefs.h >>conftest.$ac_ext
10360 cat >>conftest.$ac_ext <<_ACEOF
10361 /* end confdefs.h.  */
10362 $ac_includes_default
10363 #include <$ac_header>
10364 _ACEOF
10365 rm -f conftest.$ac_objext
10366 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10367   (eval $ac_compile) 2>conftest.er1
10368   ac_status=$?
10369   grep -v '^ *+' conftest.er1 >conftest.err
10370   rm -f conftest.er1
10371   cat conftest.err >&5
10372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10373   (exit $ac_status); } &&
10374          { ac_try='test -z "$ac_c_werror_flag"
10375                          || test ! -s conftest.err'
10376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10377   (eval $ac_try) 2>&5
10378   ac_status=$?
10379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10380   (exit $ac_status); }; } &&
10381          { ac_try='test -s conftest.$ac_objext'
10382   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10383   (eval $ac_try) 2>&5
10384   ac_status=$?
10385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10386   (exit $ac_status); }; }; then
10387   ac_header_compiler=yes
10388 else
10389   echo "$as_me: failed program was:" >&5
10390 sed 's/^/| /' conftest.$ac_ext >&5
10391
10392 ac_header_compiler=no
10393 fi
10394 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10395 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10396 echo "${ECHO_T}$ac_header_compiler" >&6
10397
10398 # Is the header present?
10399 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10400 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10401 cat >conftest.$ac_ext <<_ACEOF
10402 /* confdefs.h.  */
10403 _ACEOF
10404 cat confdefs.h >>conftest.$ac_ext
10405 cat >>conftest.$ac_ext <<_ACEOF
10406 /* end confdefs.h.  */
10407 #include <$ac_header>
10408 _ACEOF
10409 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10410   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10411   ac_status=$?
10412   grep -v '^ *+' conftest.er1 >conftest.err
10413   rm -f conftest.er1
10414   cat conftest.err >&5
10415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10416   (exit $ac_status); } >/dev/null; then
10417   if test -s conftest.err; then
10418     ac_cpp_err=$ac_c_preproc_warn_flag
10419     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10420   else
10421     ac_cpp_err=
10422   fi
10423 else
10424   ac_cpp_err=yes
10425 fi
10426 if test -z "$ac_cpp_err"; then
10427   ac_header_preproc=yes
10428 else
10429   echo "$as_me: failed program was:" >&5
10430 sed 's/^/| /' conftest.$ac_ext >&5
10431
10432   ac_header_preproc=no
10433 fi
10434 rm -f conftest.err conftest.$ac_ext
10435 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10436 echo "${ECHO_T}$ac_header_preproc" >&6
10437
10438 # So?  What about this header?
10439 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10440   yes:no: )
10441     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10442 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10443     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10444 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10445     ac_header_preproc=yes
10446     ;;
10447   no:yes:* )
10448     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10449 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10450     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10451 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10452     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10453 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10454     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10455 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10456     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10457 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10458     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10459 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10460     (
10461       cat <<\_ASBOX
10462 ## ---------------------------------------- ##
10463 ## Report this to pgsql-bugs@postgresql.org ##
10464 ## ---------------------------------------- ##
10465 _ASBOX
10466     ) |
10467       sed "s/^/$as_me: WARNING:     /" >&2
10468     ;;
10469 esac
10470 echo "$as_me:$LINENO: checking for $ac_header" >&5
10471 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10472 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10473   echo $ECHO_N "(cached) $ECHO_C" >&6
10474 else
10475   eval "$as_ac_Header=\$ac_header_preproc"
10476 fi
10477 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10478 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10479
10480 fi
10481 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10482   cat >>confdefs.h <<_ACEOF
10483 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10484 _ACEOF
10485
10486 else
10487   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10488 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10489    { (exit 1); exit 1; }; }
10490 fi
10491
10492 done
10493
10494 fi
10495
10496 done
10497
10498 fi
10499
10500 if test "$with_ldap" = yes ; then
10501   if test "$PORTNAME" != "win32"; then
10502
10503 for ac_header in ldap.h
10504 do
10505 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10506 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10507   echo "$as_me:$LINENO: checking for $ac_header" >&5
10508 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10509 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10510   echo $ECHO_N "(cached) $ECHO_C" >&6
10511 fi
10512 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10513 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10514 else
10515   # Is the header compilable?
10516 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10517 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10518 cat >conftest.$ac_ext <<_ACEOF
10519 /* confdefs.h.  */
10520 _ACEOF
10521 cat confdefs.h >>conftest.$ac_ext
10522 cat >>conftest.$ac_ext <<_ACEOF
10523 /* end confdefs.h.  */
10524 $ac_includes_default
10525 #include <$ac_header>
10526 _ACEOF
10527 rm -f conftest.$ac_objext
10528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10529   (eval $ac_compile) 2>conftest.er1
10530   ac_status=$?
10531   grep -v '^ *+' conftest.er1 >conftest.err
10532   rm -f conftest.er1
10533   cat conftest.err >&5
10534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10535   (exit $ac_status); } &&
10536          { ac_try='test -z "$ac_c_werror_flag"
10537                          || test ! -s conftest.err'
10538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10539   (eval $ac_try) 2>&5
10540   ac_status=$?
10541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10542   (exit $ac_status); }; } &&
10543          { ac_try='test -s conftest.$ac_objext'
10544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10545   (eval $ac_try) 2>&5
10546   ac_status=$?
10547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10548   (exit $ac_status); }; }; then
10549   ac_header_compiler=yes
10550 else
10551   echo "$as_me: failed program was:" >&5
10552 sed 's/^/| /' conftest.$ac_ext >&5
10553
10554 ac_header_compiler=no
10555 fi
10556 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10557 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10558 echo "${ECHO_T}$ac_header_compiler" >&6
10559
10560 # Is the header present?
10561 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10562 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10563 cat >conftest.$ac_ext <<_ACEOF
10564 /* confdefs.h.  */
10565 _ACEOF
10566 cat confdefs.h >>conftest.$ac_ext
10567 cat >>conftest.$ac_ext <<_ACEOF
10568 /* end confdefs.h.  */
10569 #include <$ac_header>
10570 _ACEOF
10571 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10572   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10573   ac_status=$?
10574   grep -v '^ *+' conftest.er1 >conftest.err
10575   rm -f conftest.er1
10576   cat conftest.err >&5
10577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10578   (exit $ac_status); } >/dev/null; then
10579   if test -s conftest.err; then
10580     ac_cpp_err=$ac_c_preproc_warn_flag
10581     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10582   else
10583     ac_cpp_err=
10584   fi
10585 else
10586   ac_cpp_err=yes
10587 fi
10588 if test -z "$ac_cpp_err"; then
10589   ac_header_preproc=yes
10590 else
10591   echo "$as_me: failed program was:" >&5
10592 sed 's/^/| /' conftest.$ac_ext >&5
10593
10594   ac_header_preproc=no
10595 fi
10596 rm -f conftest.err conftest.$ac_ext
10597 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10598 echo "${ECHO_T}$ac_header_preproc" >&6
10599
10600 # So?  What about this header?
10601 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10602   yes:no: )
10603     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10604 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10605     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10606 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10607     ac_header_preproc=yes
10608     ;;
10609   no:yes:* )
10610     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10611 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10612     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10613 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10614     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10615 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10616     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10617 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10618     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10619 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10620     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10621 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10622     (
10623       cat <<\_ASBOX
10624 ## ---------------------------------------- ##
10625 ## Report this to pgsql-bugs@postgresql.org ##
10626 ## ---------------------------------------- ##
10627 _ASBOX
10628     ) |
10629       sed "s/^/$as_me: WARNING:     /" >&2
10630     ;;
10631 esac
10632 echo "$as_me:$LINENO: checking for $ac_header" >&5
10633 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10634 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10635   echo $ECHO_N "(cached) $ECHO_C" >&6
10636 else
10637   eval "$as_ac_Header=\$ac_header_preproc"
10638 fi
10639 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10640 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10641
10642 fi
10643 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10644   cat >>confdefs.h <<_ACEOF
10645 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10646 _ACEOF
10647
10648 else
10649   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
10650 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10651    { (exit 1); exit 1; }; }
10652 fi
10653
10654 done
10655
10656   else
10657
10658 for ac_header in winldap.h
10659 do
10660 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10661 echo "$as_me:$LINENO: checking for $ac_header" >&5
10662 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10663 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10664   echo $ECHO_N "(cached) $ECHO_C" >&6
10665 else
10666   cat >conftest.$ac_ext <<_ACEOF
10667 /* confdefs.h.  */
10668 _ACEOF
10669 cat confdefs.h >>conftest.$ac_ext
10670 cat >>conftest.$ac_ext <<_ACEOF
10671 /* end confdefs.h.  */
10672 $ac_includes_default
10673 #include <windows.h>
10674
10675
10676 #include <$ac_header>
10677 _ACEOF
10678 rm -f conftest.$ac_objext
10679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10680   (eval $ac_compile) 2>conftest.er1
10681   ac_status=$?
10682   grep -v '^ *+' conftest.er1 >conftest.err
10683   rm -f conftest.er1
10684   cat conftest.err >&5
10685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10686   (exit $ac_status); } &&
10687          { ac_try='test -z "$ac_c_werror_flag"
10688                          || test ! -s conftest.err'
10689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10690   (eval $ac_try) 2>&5
10691   ac_status=$?
10692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10693   (exit $ac_status); }; } &&
10694          { ac_try='test -s conftest.$ac_objext'
10695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10696   (eval $ac_try) 2>&5
10697   ac_status=$?
10698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10699   (exit $ac_status); }; }; then
10700   eval "$as_ac_Header=yes"
10701 else
10702   echo "$as_me: failed program was:" >&5
10703 sed 's/^/| /' conftest.$ac_ext >&5
10704
10705 eval "$as_ac_Header=no"
10706 fi
10707 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10708 fi
10709 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10710 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10711 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10712   cat >>confdefs.h <<_ACEOF
10713 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10714 _ACEOF
10715
10716 else
10717   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10718 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10719    { (exit 1); exit 1; }; }
10720 fi
10721
10722 done
10723
10724   fi
10725 fi
10726
10727 if test "$with_bonjour" = yes ; then
10728   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10729   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10730 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10731 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10732   echo $ECHO_N "(cached) $ECHO_C" >&6
10733 fi
10734 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10735 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10736 else
10737   # Is the header compilable?
10738 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10739 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10740 cat >conftest.$ac_ext <<_ACEOF
10741 /* confdefs.h.  */
10742 _ACEOF
10743 cat confdefs.h >>conftest.$ac_ext
10744 cat >>conftest.$ac_ext <<_ACEOF
10745 /* end confdefs.h.  */
10746 $ac_includes_default
10747 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10748 _ACEOF
10749 rm -f conftest.$ac_objext
10750 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10751   (eval $ac_compile) 2>conftest.er1
10752   ac_status=$?
10753   grep -v '^ *+' conftest.er1 >conftest.err
10754   rm -f conftest.er1
10755   cat conftest.err >&5
10756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10757   (exit $ac_status); } &&
10758          { ac_try='test -z "$ac_c_werror_flag"
10759                          || test ! -s conftest.err'
10760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10761   (eval $ac_try) 2>&5
10762   ac_status=$?
10763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10764   (exit $ac_status); }; } &&
10765          { ac_try='test -s conftest.$ac_objext'
10766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10767   (eval $ac_try) 2>&5
10768   ac_status=$?
10769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10770   (exit $ac_status); }; }; then
10771   ac_header_compiler=yes
10772 else
10773   echo "$as_me: failed program was:" >&5
10774 sed 's/^/| /' conftest.$ac_ext >&5
10775
10776 ac_header_compiler=no
10777 fi
10778 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10779 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10780 echo "${ECHO_T}$ac_header_compiler" >&6
10781
10782 # Is the header present?
10783 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10784 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10785 cat >conftest.$ac_ext <<_ACEOF
10786 /* confdefs.h.  */
10787 _ACEOF
10788 cat confdefs.h >>conftest.$ac_ext
10789 cat >>conftest.$ac_ext <<_ACEOF
10790 /* end confdefs.h.  */
10791 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10792 _ACEOF
10793 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10794   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10795   ac_status=$?
10796   grep -v '^ *+' conftest.er1 >conftest.err
10797   rm -f conftest.er1
10798   cat conftest.err >&5
10799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10800   (exit $ac_status); } >/dev/null; then
10801   if test -s conftest.err; then
10802     ac_cpp_err=$ac_c_preproc_warn_flag
10803     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10804   else
10805     ac_cpp_err=
10806   fi
10807 else
10808   ac_cpp_err=yes
10809 fi
10810 if test -z "$ac_cpp_err"; then
10811   ac_header_preproc=yes
10812 else
10813   echo "$as_me: failed program was:" >&5
10814 sed 's/^/| /' conftest.$ac_ext >&5
10815
10816   ac_header_preproc=no
10817 fi
10818 rm -f conftest.err conftest.$ac_ext
10819 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10820 echo "${ECHO_T}$ac_header_preproc" >&6
10821
10822 # So?  What about this header?
10823 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10824   yes:no: )
10825     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10826 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10827     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10828 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10829     ac_header_preproc=yes
10830     ;;
10831   no:yes:* )
10832     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10833 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10834     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10835 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10836     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10837 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10838     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10839 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10840     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10841 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10842     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10843 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10844     (
10845       cat <<\_ASBOX
10846 ## ---------------------------------------- ##
10847 ## Report this to pgsql-bugs@postgresql.org ##
10848 ## ---------------------------------------- ##
10849 _ASBOX
10850     ) |
10851       sed "s/^/$as_me: WARNING:     /" >&2
10852     ;;
10853 esac
10854 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10855 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10856 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10857   echo $ECHO_N "(cached) $ECHO_C" >&6
10858 else
10859   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10860 fi
10861 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10862 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10863
10864 fi
10865 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10866   :
10867 else
10868   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10869 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10870    { (exit 1); exit 1; }; }
10871 fi
10872
10873
10874 fi
10875
10876
10877 ##
10878 ## Types, structures, compiler characteristics
10879 ##
10880
10881  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10882 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10883 if test "${ac_cv_c_const+set}" = set; then
10884   echo $ECHO_N "(cached) $ECHO_C" >&6
10885 else
10886   cat >conftest.$ac_ext <<_ACEOF
10887 /* confdefs.h.  */
10888 _ACEOF
10889 cat confdefs.h >>conftest.$ac_ext
10890 cat >>conftest.$ac_ext <<_ACEOF
10891 /* end confdefs.h.  */
10892
10893 int
10894 main ()
10895 {
10896 /* FIXME: Include the comments suggested by Paul. */
10897 #ifndef __cplusplus
10898   /* Ultrix mips cc rejects this.  */
10899   typedef int charset[2];
10900   const charset x;
10901   /* SunOS 4.1.1 cc rejects this.  */
10902   char const *const *ccp;
10903   char **p;
10904   /* NEC SVR4.0.2 mips cc rejects this.  */
10905   struct point {int x, y;};
10906   static struct point const zero = {0,0};
10907   /* AIX XL C 1.02.0.0 rejects this.
10908      It does not let you subtract one const X* pointer from another in
10909      an arm of an if-expression whose if-part is not a constant
10910      expression */
10911   const char *g = "string";
10912   ccp = &g + (g ? g-g : 0);
10913   /* HPUX 7.0 cc rejects these. */
10914   ++ccp;
10915   p = (char**) ccp;
10916   ccp = (char const *const *) p;
10917   { /* SCO 3.2v4 cc rejects this.  */
10918     char *t;
10919     char const *s = 0 ? (char *) 0 : (char const *) 0;
10920
10921     *t++ = 0;
10922   }
10923   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10924     int x[] = {25, 17};
10925     const int *foo = &x[0];
10926     ++foo;
10927   }
10928   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10929     typedef const int *iptr;
10930     iptr p = 0;
10931     ++p;
10932   }
10933   { /* AIX XL C 1.02.0.0 rejects this saying
10934        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10935     struct s { int j; const int *ap[3]; };
10936     struct s *b; b->j = 5;
10937   }
10938   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10939     const int foo = 10;
10940   }
10941 #endif
10942
10943   ;
10944   return 0;
10945 }
10946 _ACEOF
10947 rm -f conftest.$ac_objext
10948 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10949   (eval $ac_compile) 2>conftest.er1
10950   ac_status=$?
10951   grep -v '^ *+' conftest.er1 >conftest.err
10952   rm -f conftest.er1
10953   cat conftest.err >&5
10954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10955   (exit $ac_status); } &&
10956          { ac_try='test -z "$ac_c_werror_flag"
10957                          || test ! -s conftest.err'
10958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10959   (eval $ac_try) 2>&5
10960   ac_status=$?
10961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10962   (exit $ac_status); }; } &&
10963          { ac_try='test -s conftest.$ac_objext'
10964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10965   (eval $ac_try) 2>&5
10966   ac_status=$?
10967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10968   (exit $ac_status); }; }; then
10969   ac_cv_c_const=yes
10970 else
10971   echo "$as_me: failed program was:" >&5
10972 sed 's/^/| /' conftest.$ac_ext >&5
10973
10974 ac_cv_c_const=no
10975 fi
10976 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10977 fi
10978 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10979 echo "${ECHO_T}$ac_cv_c_const" >&6
10980 if test $ac_cv_c_const = no; then
10981
10982 cat >>confdefs.h <<\_ACEOF
10983 #define const
10984 _ACEOF
10985
10986 fi
10987
10988
10989 echo "$as_me:$LINENO: checking for inline" >&5
10990 echo $ECHO_N "checking for inline... $ECHO_C" >&6
10991 if test "${ac_cv_c_inline+set}" = set; then
10992   echo $ECHO_N "(cached) $ECHO_C" >&6
10993 else
10994   ac_cv_c_inline=no
10995 for ac_kw in inline __inline__ __inline; do
10996   cat >conftest.$ac_ext <<_ACEOF
10997 /* confdefs.h.  */
10998 _ACEOF
10999 cat confdefs.h >>conftest.$ac_ext
11000 cat >>conftest.$ac_ext <<_ACEOF
11001 /* end confdefs.h.  */
11002 #ifndef __cplusplus
11003 typedef int foo_t;
11004 static $ac_kw foo_t static_foo () {return 0; }
11005 $ac_kw int foo () {return 0; }
11006 #endif
11007
11008 _ACEOF
11009 rm -f conftest.$ac_objext
11010 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11011   (eval $ac_compile) 2>conftest.er1
11012   ac_status=$?
11013   grep -v '^ *+' conftest.er1 >conftest.err
11014   rm -f conftest.er1
11015   cat conftest.err >&5
11016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11017   (exit $ac_status); } &&
11018          { ac_try='test -z "$ac_c_werror_flag"
11019                          || test ! -s conftest.err'
11020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11021   (eval $ac_try) 2>&5
11022   ac_status=$?
11023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11024   (exit $ac_status); }; } &&
11025          { ac_try='test -s conftest.$ac_objext'
11026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11027   (eval $ac_try) 2>&5
11028   ac_status=$?
11029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11030   (exit $ac_status); }; }; then
11031   ac_cv_c_inline=$ac_kw; break
11032 else
11033   echo "$as_me: failed program was:" >&5
11034 sed 's/^/| /' conftest.$ac_ext >&5
11035
11036 fi
11037 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11038 done
11039
11040 fi
11041 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11042 echo "${ECHO_T}$ac_cv_c_inline" >&6
11043 case $ac_cv_c_inline in
11044   inline | yes) ;;
11045   no)
11046 cat >>confdefs.h <<\_ACEOF
11047 #define inline
11048 _ACEOF
11049  ;;
11050   *)  cat >>confdefs.h <<_ACEOF
11051 #define inline $ac_cv_c_inline
11052 _ACEOF
11053  ;;
11054 esac
11055
11056 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11057 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11058 if test "${ac_cv_c_stringize+set}" = set; then
11059   echo $ECHO_N "(cached) $ECHO_C" >&6
11060 else
11061   cat >conftest.$ac_ext <<_ACEOF
11062 /* confdefs.h.  */
11063 _ACEOF
11064 cat confdefs.h >>conftest.$ac_ext
11065 cat >>conftest.$ac_ext <<_ACEOF
11066 /* end confdefs.h.  */
11067 #define x(y) #y
11068
11069 char *s = x(teststring);
11070 _ACEOF
11071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11072   $EGREP "#teststring" >/dev/null 2>&1; then
11073   ac_cv_c_stringize=no
11074 else
11075   ac_cv_c_stringize=yes
11076 fi
11077 rm -f conftest*
11078
11079 fi
11080 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11081 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11082 if test $ac_cv_c_stringize = yes; then
11083
11084 cat >>confdefs.h <<\_ACEOF
11085 #define HAVE_STRINGIZE 1
11086 _ACEOF
11087
11088 fi
11089
11090 echo "$as_me:$LINENO: checking for signed types" >&5
11091 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11092 if test "${pgac_cv_c_signed+set}" = set; then
11093   echo $ECHO_N "(cached) $ECHO_C" >&6
11094 else
11095   cat >conftest.$ac_ext <<_ACEOF
11096 /* confdefs.h.  */
11097 _ACEOF
11098 cat confdefs.h >>conftest.$ac_ext
11099 cat >>conftest.$ac_ext <<_ACEOF
11100 /* end confdefs.h.  */
11101
11102 int
11103 main ()
11104 {
11105 signed char c; signed short s; signed int i;
11106   ;
11107   return 0;
11108 }
11109 _ACEOF
11110 rm -f conftest.$ac_objext
11111 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11112   (eval $ac_compile) 2>conftest.er1
11113   ac_status=$?
11114   grep -v '^ *+' conftest.er1 >conftest.err
11115   rm -f conftest.er1
11116   cat conftest.err >&5
11117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11118   (exit $ac_status); } &&
11119          { ac_try='test -z "$ac_c_werror_flag"
11120                          || test ! -s conftest.err'
11121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11122   (eval $ac_try) 2>&5
11123   ac_status=$?
11124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11125   (exit $ac_status); }; } &&
11126          { ac_try='test -s conftest.$ac_objext'
11127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11128   (eval $ac_try) 2>&5
11129   ac_status=$?
11130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11131   (exit $ac_status); }; }; then
11132   pgac_cv_c_signed=yes
11133 else
11134   echo "$as_me: failed program was:" >&5
11135 sed 's/^/| /' conftest.$ac_ext >&5
11136
11137 pgac_cv_c_signed=no
11138 fi
11139 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11140 fi
11141 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11142 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11143 if test x"$pgac_cv_c_signed" = xno ; then
11144
11145 cat >>confdefs.h <<\_ACEOF
11146 #define signed
11147 _ACEOF
11148
11149 fi
11150 echo "$as_me:$LINENO: checking for working volatile" >&5
11151 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11152 if test "${ac_cv_c_volatile+set}" = set; then
11153   echo $ECHO_N "(cached) $ECHO_C" >&6
11154 else
11155   cat >conftest.$ac_ext <<_ACEOF
11156 /* confdefs.h.  */
11157 _ACEOF
11158 cat confdefs.h >>conftest.$ac_ext
11159 cat >>conftest.$ac_ext <<_ACEOF
11160 /* end confdefs.h.  */
11161
11162 int
11163 main ()
11164 {
11165
11166 volatile int x;
11167 int * volatile y;
11168   ;
11169   return 0;
11170 }
11171 _ACEOF
11172 rm -f conftest.$ac_objext
11173 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11174   (eval $ac_compile) 2>conftest.er1
11175   ac_status=$?
11176   grep -v '^ *+' conftest.er1 >conftest.err
11177   rm -f conftest.er1
11178   cat conftest.err >&5
11179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11180   (exit $ac_status); } &&
11181          { ac_try='test -z "$ac_c_werror_flag"
11182                          || test ! -s conftest.err'
11183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11184   (eval $ac_try) 2>&5
11185   ac_status=$?
11186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11187   (exit $ac_status); }; } &&
11188          { ac_try='test -s conftest.$ac_objext'
11189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11190   (eval $ac_try) 2>&5
11191   ac_status=$?
11192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11193   (exit $ac_status); }; }; then
11194   ac_cv_c_volatile=yes
11195 else
11196   echo "$as_me: failed program was:" >&5
11197 sed 's/^/| /' conftest.$ac_ext >&5
11198
11199 ac_cv_c_volatile=no
11200 fi
11201 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11202 fi
11203 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11204 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11205 if test $ac_cv_c_volatile = no; then
11206
11207 cat >>confdefs.h <<\_ACEOF
11208 #define volatile
11209 _ACEOF
11210
11211 fi
11212
11213 echo "$as_me:$LINENO: checking for __func__" >&5
11214 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11215 if test "${pgac_cv_funcname_func_support+set}" = set; then
11216   echo $ECHO_N "(cached) $ECHO_C" >&6
11217 else
11218   cat >conftest.$ac_ext <<_ACEOF
11219 /* confdefs.h.  */
11220 _ACEOF
11221 cat confdefs.h >>conftest.$ac_ext
11222 cat >>conftest.$ac_ext <<_ACEOF
11223 /* end confdefs.h.  */
11224 #include <stdio.h>
11225 int
11226 main ()
11227 {
11228 printf("%s\n", __func__);
11229   ;
11230   return 0;
11231 }
11232 _ACEOF
11233 rm -f conftest.$ac_objext
11234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11235   (eval $ac_compile) 2>conftest.er1
11236   ac_status=$?
11237   grep -v '^ *+' conftest.er1 >conftest.err
11238   rm -f conftest.er1
11239   cat conftest.err >&5
11240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11241   (exit $ac_status); } &&
11242          { ac_try='test -z "$ac_c_werror_flag"
11243                          || test ! -s conftest.err'
11244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11245   (eval $ac_try) 2>&5
11246   ac_status=$?
11247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11248   (exit $ac_status); }; } &&
11249          { ac_try='test -s conftest.$ac_objext'
11250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11251   (eval $ac_try) 2>&5
11252   ac_status=$?
11253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11254   (exit $ac_status); }; }; then
11255   pgac_cv_funcname_func_support=yes
11256 else
11257   echo "$as_me: failed program was:" >&5
11258 sed 's/^/| /' conftest.$ac_ext >&5
11259
11260 pgac_cv_funcname_func_support=no
11261 fi
11262 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11263 fi
11264 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11265 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11266 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11267
11268 cat >>confdefs.h <<\_ACEOF
11269 #define HAVE_FUNCNAME__FUNC 1
11270 _ACEOF
11271
11272 else
11273 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11274 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11275 if test "${pgac_cv_funcname_function_support+set}" = set; then
11276   echo $ECHO_N "(cached) $ECHO_C" >&6
11277 else
11278   cat >conftest.$ac_ext <<_ACEOF
11279 /* confdefs.h.  */
11280 _ACEOF
11281 cat confdefs.h >>conftest.$ac_ext
11282 cat >>conftest.$ac_ext <<_ACEOF
11283 /* end confdefs.h.  */
11284 #include <stdio.h>
11285 int
11286 main ()
11287 {
11288 printf("%s\n", __FUNCTION__);
11289   ;
11290   return 0;
11291 }
11292 _ACEOF
11293 rm -f conftest.$ac_objext
11294 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11295   (eval $ac_compile) 2>conftest.er1
11296   ac_status=$?
11297   grep -v '^ *+' conftest.er1 >conftest.err
11298   rm -f conftest.er1
11299   cat conftest.err >&5
11300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11301   (exit $ac_status); } &&
11302          { ac_try='test -z "$ac_c_werror_flag"
11303                          || test ! -s conftest.err'
11304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11305   (eval $ac_try) 2>&5
11306   ac_status=$?
11307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11308   (exit $ac_status); }; } &&
11309          { ac_try='test -s conftest.$ac_objext'
11310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11311   (eval $ac_try) 2>&5
11312   ac_status=$?
11313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11314   (exit $ac_status); }; }; then
11315   pgac_cv_funcname_function_support=yes
11316 else
11317   echo "$as_me: failed program was:" >&5
11318 sed 's/^/| /' conftest.$ac_ext >&5
11319
11320 pgac_cv_funcname_function_support=no
11321 fi
11322 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11323 fi
11324 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11325 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11326 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11327
11328 cat >>confdefs.h <<\_ACEOF
11329 #define HAVE_FUNCNAME__FUNCTION 1
11330 _ACEOF
11331
11332 fi
11333 fi
11334 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11335 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11336 if test "${ac_cv_struct_tm+set}" = set; then
11337   echo $ECHO_N "(cached) $ECHO_C" >&6
11338 else
11339   cat >conftest.$ac_ext <<_ACEOF
11340 /* confdefs.h.  */
11341 _ACEOF
11342 cat confdefs.h >>conftest.$ac_ext
11343 cat >>conftest.$ac_ext <<_ACEOF
11344 /* end confdefs.h.  */
11345 #include <sys/types.h>
11346 #include <time.h>
11347
11348 int
11349 main ()
11350 {
11351 struct tm *tp; tp->tm_sec;
11352   ;
11353   return 0;
11354 }
11355 _ACEOF
11356 rm -f conftest.$ac_objext
11357 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11358   (eval $ac_compile) 2>conftest.er1
11359   ac_status=$?
11360   grep -v '^ *+' conftest.er1 >conftest.err
11361   rm -f conftest.er1
11362   cat conftest.err >&5
11363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11364   (exit $ac_status); } &&
11365          { ac_try='test -z "$ac_c_werror_flag"
11366                          || test ! -s conftest.err'
11367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11368   (eval $ac_try) 2>&5
11369   ac_status=$?
11370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11371   (exit $ac_status); }; } &&
11372          { ac_try='test -s conftest.$ac_objext'
11373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11374   (eval $ac_try) 2>&5
11375   ac_status=$?
11376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11377   (exit $ac_status); }; }; then
11378   ac_cv_struct_tm=time.h
11379 else
11380   echo "$as_me: failed program was:" >&5
11381 sed 's/^/| /' conftest.$ac_ext >&5
11382
11383 ac_cv_struct_tm=sys/time.h
11384 fi
11385 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11386 fi
11387 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11388 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11389 if test $ac_cv_struct_tm = sys/time.h; then
11390
11391 cat >>confdefs.h <<\_ACEOF
11392 #define TM_IN_SYS_TIME 1
11393 _ACEOF
11394
11395 fi
11396
11397 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11398 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11399 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11400   echo $ECHO_N "(cached) $ECHO_C" >&6
11401 else
11402   cat >conftest.$ac_ext <<_ACEOF
11403 /* confdefs.h.  */
11404 _ACEOF
11405 cat confdefs.h >>conftest.$ac_ext
11406 cat >>conftest.$ac_ext <<_ACEOF
11407 /* end confdefs.h.  */
11408 #include <sys/types.h>
11409 #include <$ac_cv_struct_tm>
11410
11411
11412 int
11413 main ()
11414 {
11415 static struct tm ac_aggr;
11416 if (ac_aggr.tm_zone)
11417 return 0;
11418   ;
11419   return 0;
11420 }
11421 _ACEOF
11422 rm -f conftest.$ac_objext
11423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11424   (eval $ac_compile) 2>conftest.er1
11425   ac_status=$?
11426   grep -v '^ *+' conftest.er1 >conftest.err
11427   rm -f conftest.er1
11428   cat conftest.err >&5
11429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11430   (exit $ac_status); } &&
11431          { ac_try='test -z "$ac_c_werror_flag"
11432                          || test ! -s conftest.err'
11433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11434   (eval $ac_try) 2>&5
11435   ac_status=$?
11436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437   (exit $ac_status); }; } &&
11438          { ac_try='test -s conftest.$ac_objext'
11439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11440   (eval $ac_try) 2>&5
11441   ac_status=$?
11442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11443   (exit $ac_status); }; }; then
11444   ac_cv_member_struct_tm_tm_zone=yes
11445 else
11446   echo "$as_me: failed program was:" >&5
11447 sed 's/^/| /' conftest.$ac_ext >&5
11448
11449 cat >conftest.$ac_ext <<_ACEOF
11450 /* confdefs.h.  */
11451 _ACEOF
11452 cat confdefs.h >>conftest.$ac_ext
11453 cat >>conftest.$ac_ext <<_ACEOF
11454 /* end confdefs.h.  */
11455 #include <sys/types.h>
11456 #include <$ac_cv_struct_tm>
11457
11458
11459 int
11460 main ()
11461 {
11462 static struct tm ac_aggr;
11463 if (sizeof ac_aggr.tm_zone)
11464 return 0;
11465   ;
11466   return 0;
11467 }
11468 _ACEOF
11469 rm -f conftest.$ac_objext
11470 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11471   (eval $ac_compile) 2>conftest.er1
11472   ac_status=$?
11473   grep -v '^ *+' conftest.er1 >conftest.err
11474   rm -f conftest.er1
11475   cat conftest.err >&5
11476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11477   (exit $ac_status); } &&
11478          { ac_try='test -z "$ac_c_werror_flag"
11479                          || test ! -s conftest.err'
11480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11481   (eval $ac_try) 2>&5
11482   ac_status=$?
11483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11484   (exit $ac_status); }; } &&
11485          { ac_try='test -s conftest.$ac_objext'
11486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11487   (eval $ac_try) 2>&5
11488   ac_status=$?
11489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11490   (exit $ac_status); }; }; then
11491   ac_cv_member_struct_tm_tm_zone=yes
11492 else
11493   echo "$as_me: failed program was:" >&5
11494 sed 's/^/| /' conftest.$ac_ext >&5
11495
11496 ac_cv_member_struct_tm_tm_zone=no
11497 fi
11498 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11499 fi
11500 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11501 fi
11502 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11503 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11504 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11505
11506 cat >>confdefs.h <<_ACEOF
11507 #define HAVE_STRUCT_TM_TM_ZONE 1
11508 _ACEOF
11509
11510
11511 fi
11512
11513 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11514
11515 cat >>confdefs.h <<\_ACEOF
11516 #define HAVE_TM_ZONE 1
11517 _ACEOF
11518
11519 fi
11520 echo "$as_me:$LINENO: checking for tzname" >&5
11521 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11522 if test "${ac_cv_var_tzname+set}" = set; then
11523   echo $ECHO_N "(cached) $ECHO_C" >&6
11524 else
11525   cat >conftest.$ac_ext <<_ACEOF
11526 /* confdefs.h.  */
11527 _ACEOF
11528 cat confdefs.h >>conftest.$ac_ext
11529 cat >>conftest.$ac_ext <<_ACEOF
11530 /* end confdefs.h.  */
11531 #include <time.h>
11532 #ifndef tzname /* For SGI.  */
11533 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11534 #endif
11535
11536 int
11537 main ()
11538 {
11539 atoi(*tzname);
11540   ;
11541   return 0;
11542 }
11543 _ACEOF
11544 rm -f conftest.$ac_objext conftest$ac_exeext
11545 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11546   (eval $ac_link) 2>conftest.er1
11547   ac_status=$?
11548   grep -v '^ *+' conftest.er1 >conftest.err
11549   rm -f conftest.er1
11550   cat conftest.err >&5
11551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11552   (exit $ac_status); } &&
11553          { ac_try='test -z "$ac_c_werror_flag"
11554                          || test ! -s conftest.err'
11555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11556   (eval $ac_try) 2>&5
11557   ac_status=$?
11558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11559   (exit $ac_status); }; } &&
11560          { ac_try='test -s conftest$ac_exeext'
11561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11562   (eval $ac_try) 2>&5
11563   ac_status=$?
11564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11565   (exit $ac_status); }; }; then
11566   ac_cv_var_tzname=yes
11567 else
11568   echo "$as_me: failed program was:" >&5
11569 sed 's/^/| /' conftest.$ac_ext >&5
11570
11571 ac_cv_var_tzname=no
11572 fi
11573 rm -f conftest.err conftest.$ac_objext \
11574       conftest$ac_exeext conftest.$ac_ext
11575 fi
11576 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11577 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11578 if test $ac_cv_var_tzname = yes; then
11579
11580 cat >>confdefs.h <<\_ACEOF
11581 #define HAVE_TZNAME 1
11582 _ACEOF
11583
11584 fi
11585
11586 echo "$as_me:$LINENO: checking for union semun" >&5
11587 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11588 if test "${ac_cv_type_union_semun+set}" = set; then
11589   echo $ECHO_N "(cached) $ECHO_C" >&6
11590 else
11591   cat >conftest.$ac_ext <<_ACEOF
11592 /* confdefs.h.  */
11593 _ACEOF
11594 cat confdefs.h >>conftest.$ac_ext
11595 cat >>conftest.$ac_ext <<_ACEOF
11596 /* end confdefs.h.  */
11597 #include <sys/types.h>
11598 #include <sys/ipc.h>
11599 #include <sys/sem.h>
11600
11601 int
11602 main ()
11603 {
11604 if ((union semun *) 0)
11605   return 0;
11606 if (sizeof (union semun))
11607   return 0;
11608   ;
11609   return 0;
11610 }
11611 _ACEOF
11612 rm -f conftest.$ac_objext
11613 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11614   (eval $ac_compile) 2>conftest.er1
11615   ac_status=$?
11616   grep -v '^ *+' conftest.er1 >conftest.err
11617   rm -f conftest.er1
11618   cat conftest.err >&5
11619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620   (exit $ac_status); } &&
11621          { ac_try='test -z "$ac_c_werror_flag"
11622                          || test ! -s conftest.err'
11623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11624   (eval $ac_try) 2>&5
11625   ac_status=$?
11626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11627   (exit $ac_status); }; } &&
11628          { ac_try='test -s conftest.$ac_objext'
11629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11630   (eval $ac_try) 2>&5
11631   ac_status=$?
11632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11633   (exit $ac_status); }; }; then
11634   ac_cv_type_union_semun=yes
11635 else
11636   echo "$as_me: failed program was:" >&5
11637 sed 's/^/| /' conftest.$ac_ext >&5
11638
11639 ac_cv_type_union_semun=no
11640 fi
11641 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11642 fi
11643 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11644 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11645 if test $ac_cv_type_union_semun = yes; then
11646
11647 cat >>confdefs.h <<_ACEOF
11648 #define HAVE_UNION_SEMUN 1
11649 _ACEOF
11650
11651
11652 fi
11653
11654 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11655 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11656 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11657   echo $ECHO_N "(cached) $ECHO_C" >&6
11658 else
11659   cat >conftest.$ac_ext <<_ACEOF
11660 /* confdefs.h.  */
11661 _ACEOF
11662 cat confdefs.h >>conftest.$ac_ext
11663 cat >>conftest.$ac_ext <<_ACEOF
11664 /* end confdefs.h.  */
11665 #include <sys/types.h>
11666 #ifdef HAVE_SYS_UN_H
11667 #include <sys/un.h>
11668 #endif
11669
11670
11671 int
11672 main ()
11673 {
11674 if ((struct sockaddr_un *) 0)
11675   return 0;
11676 if (sizeof (struct sockaddr_un))
11677   return 0;
11678   ;
11679   return 0;
11680 }
11681 _ACEOF
11682 rm -f conftest.$ac_objext
11683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11684   (eval $ac_compile) 2>conftest.er1
11685   ac_status=$?
11686   grep -v '^ *+' conftest.er1 >conftest.err
11687   rm -f conftest.er1
11688   cat conftest.err >&5
11689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11690   (exit $ac_status); } &&
11691          { ac_try='test -z "$ac_c_werror_flag"
11692                          || test ! -s conftest.err'
11693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11694   (eval $ac_try) 2>&5
11695   ac_status=$?
11696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697   (exit $ac_status); }; } &&
11698          { ac_try='test -s conftest.$ac_objext'
11699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11700   (eval $ac_try) 2>&5
11701   ac_status=$?
11702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11703   (exit $ac_status); }; }; then
11704   ac_cv_type_struct_sockaddr_un=yes
11705 else
11706   echo "$as_me: failed program was:" >&5
11707 sed 's/^/| /' conftest.$ac_ext >&5
11708
11709 ac_cv_type_struct_sockaddr_un=no
11710 fi
11711 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11712 fi
11713 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11714 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11715 if test $ac_cv_type_struct_sockaddr_un = yes; then
11716
11717 cat >>confdefs.h <<_ACEOF
11718 #define HAVE_STRUCT_SOCKADDR_UN 1
11719 _ACEOF
11720
11721
11722 cat >>confdefs.h <<\_ACEOF
11723 #define HAVE_UNIX_SOCKETS 1
11724 _ACEOF
11725
11726 fi
11727
11728 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11729 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11730 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11731   echo $ECHO_N "(cached) $ECHO_C" >&6
11732 else
11733   cat >conftest.$ac_ext <<_ACEOF
11734 /* confdefs.h.  */
11735 _ACEOF
11736 cat confdefs.h >>conftest.$ac_ext
11737 cat >>conftest.$ac_ext <<_ACEOF
11738 /* end confdefs.h.  */
11739 #include <sys/types.h>
11740 #ifdef HAVE_SYS_SOCKET_H
11741 #include <sys/socket.h>
11742 #endif
11743
11744
11745 int
11746 main ()
11747 {
11748 if ((struct sockaddr_storage *) 0)
11749   return 0;
11750 if (sizeof (struct sockaddr_storage))
11751   return 0;
11752   ;
11753   return 0;
11754 }
11755 _ACEOF
11756 rm -f conftest.$ac_objext
11757 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11758   (eval $ac_compile) 2>conftest.er1
11759   ac_status=$?
11760   grep -v '^ *+' conftest.er1 >conftest.err
11761   rm -f conftest.er1
11762   cat conftest.err >&5
11763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11764   (exit $ac_status); } &&
11765          { ac_try='test -z "$ac_c_werror_flag"
11766                          || test ! -s conftest.err'
11767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11768   (eval $ac_try) 2>&5
11769   ac_status=$?
11770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11771   (exit $ac_status); }; } &&
11772          { ac_try='test -s conftest.$ac_objext'
11773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11774   (eval $ac_try) 2>&5
11775   ac_status=$?
11776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11777   (exit $ac_status); }; }; then
11778   ac_cv_type_struct_sockaddr_storage=yes
11779 else
11780   echo "$as_me: failed program was:" >&5
11781 sed 's/^/| /' conftest.$ac_ext >&5
11782
11783 ac_cv_type_struct_sockaddr_storage=no
11784 fi
11785 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11786 fi
11787 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11788 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11789 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11790
11791 cat >>confdefs.h <<_ACEOF
11792 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11793 _ACEOF
11794
11795
11796 fi
11797
11798 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11799 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11800 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11801   echo $ECHO_N "(cached) $ECHO_C" >&6
11802 else
11803   cat >conftest.$ac_ext <<_ACEOF
11804 /* confdefs.h.  */
11805 _ACEOF
11806 cat confdefs.h >>conftest.$ac_ext
11807 cat >>conftest.$ac_ext <<_ACEOF
11808 /* end confdefs.h.  */
11809 #include <sys/types.h>
11810 #ifdef HAVE_SYS_SOCKET_H
11811 #include <sys/socket.h>
11812 #endif
11813
11814
11815 int
11816 main ()
11817 {
11818 static struct sockaddr_storage ac_aggr;
11819 if (ac_aggr.ss_family)
11820 return 0;
11821   ;
11822   return 0;
11823 }
11824 _ACEOF
11825 rm -f conftest.$ac_objext
11826 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11827   (eval $ac_compile) 2>conftest.er1
11828   ac_status=$?
11829   grep -v '^ *+' conftest.er1 >conftest.err
11830   rm -f conftest.er1
11831   cat conftest.err >&5
11832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11833   (exit $ac_status); } &&
11834          { ac_try='test -z "$ac_c_werror_flag"
11835                          || test ! -s conftest.err'
11836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11837   (eval $ac_try) 2>&5
11838   ac_status=$?
11839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11840   (exit $ac_status); }; } &&
11841          { ac_try='test -s conftest.$ac_objext'
11842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11843   (eval $ac_try) 2>&5
11844   ac_status=$?
11845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11846   (exit $ac_status); }; }; then
11847   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11848 else
11849   echo "$as_me: failed program was:" >&5
11850 sed 's/^/| /' conftest.$ac_ext >&5
11851
11852 cat >conftest.$ac_ext <<_ACEOF
11853 /* confdefs.h.  */
11854 _ACEOF
11855 cat confdefs.h >>conftest.$ac_ext
11856 cat >>conftest.$ac_ext <<_ACEOF
11857 /* end confdefs.h.  */
11858 #include <sys/types.h>
11859 #ifdef HAVE_SYS_SOCKET_H
11860 #include <sys/socket.h>
11861 #endif
11862
11863
11864 int
11865 main ()
11866 {
11867 static struct sockaddr_storage ac_aggr;
11868 if (sizeof ac_aggr.ss_family)
11869 return 0;
11870   ;
11871   return 0;
11872 }
11873 _ACEOF
11874 rm -f conftest.$ac_objext
11875 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11876   (eval $ac_compile) 2>conftest.er1
11877   ac_status=$?
11878   grep -v '^ *+' conftest.er1 >conftest.err
11879   rm -f conftest.er1
11880   cat conftest.err >&5
11881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11882   (exit $ac_status); } &&
11883          { ac_try='test -z "$ac_c_werror_flag"
11884                          || test ! -s conftest.err'
11885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11886   (eval $ac_try) 2>&5
11887   ac_status=$?
11888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11889   (exit $ac_status); }; } &&
11890          { ac_try='test -s conftest.$ac_objext'
11891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11892   (eval $ac_try) 2>&5
11893   ac_status=$?
11894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11895   (exit $ac_status); }; }; then
11896   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11897 else
11898   echo "$as_me: failed program was:" >&5
11899 sed 's/^/| /' conftest.$ac_ext >&5
11900
11901 ac_cv_member_struct_sockaddr_storage_ss_family=no
11902 fi
11903 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11904 fi
11905 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11906 fi
11907 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11908 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11909 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11910
11911 cat >>confdefs.h <<_ACEOF
11912 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11913 _ACEOF
11914
11915
11916 fi
11917 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11918 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11919 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11920   echo $ECHO_N "(cached) $ECHO_C" >&6
11921 else
11922   cat >conftest.$ac_ext <<_ACEOF
11923 /* confdefs.h.  */
11924 _ACEOF
11925 cat confdefs.h >>conftest.$ac_ext
11926 cat >>conftest.$ac_ext <<_ACEOF
11927 /* end confdefs.h.  */
11928 #include <sys/types.h>
11929 #ifdef HAVE_SYS_SOCKET_H
11930 #include <sys/socket.h>
11931 #endif
11932
11933
11934 int
11935 main ()
11936 {
11937 static struct sockaddr_storage ac_aggr;
11938 if (ac_aggr.__ss_family)
11939 return 0;
11940   ;
11941   return 0;
11942 }
11943 _ACEOF
11944 rm -f conftest.$ac_objext
11945 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11946   (eval $ac_compile) 2>conftest.er1
11947   ac_status=$?
11948   grep -v '^ *+' conftest.er1 >conftest.err
11949   rm -f conftest.er1
11950   cat conftest.err >&5
11951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11952   (exit $ac_status); } &&
11953          { ac_try='test -z "$ac_c_werror_flag"
11954                          || test ! -s conftest.err'
11955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11956   (eval $ac_try) 2>&5
11957   ac_status=$?
11958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11959   (exit $ac_status); }; } &&
11960          { ac_try='test -s conftest.$ac_objext'
11961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11962   (eval $ac_try) 2>&5
11963   ac_status=$?
11964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11965   (exit $ac_status); }; }; then
11966   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11967 else
11968   echo "$as_me: failed program was:" >&5
11969 sed 's/^/| /' conftest.$ac_ext >&5
11970
11971 cat >conftest.$ac_ext <<_ACEOF
11972 /* confdefs.h.  */
11973 _ACEOF
11974 cat confdefs.h >>conftest.$ac_ext
11975 cat >>conftest.$ac_ext <<_ACEOF
11976 /* end confdefs.h.  */
11977 #include <sys/types.h>
11978 #ifdef HAVE_SYS_SOCKET_H
11979 #include <sys/socket.h>
11980 #endif
11981
11982
11983 int
11984 main ()
11985 {
11986 static struct sockaddr_storage ac_aggr;
11987 if (sizeof ac_aggr.__ss_family)
11988 return 0;
11989   ;
11990   return 0;
11991 }
11992 _ACEOF
11993 rm -f conftest.$ac_objext
11994 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11995   (eval $ac_compile) 2>conftest.er1
11996   ac_status=$?
11997   grep -v '^ *+' conftest.er1 >conftest.err
11998   rm -f conftest.er1
11999   cat conftest.err >&5
12000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12001   (exit $ac_status); } &&
12002          { ac_try='test -z "$ac_c_werror_flag"
12003                          || test ! -s conftest.err'
12004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12005   (eval $ac_try) 2>&5
12006   ac_status=$?
12007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12008   (exit $ac_status); }; } &&
12009          { ac_try='test -s conftest.$ac_objext'
12010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12011   (eval $ac_try) 2>&5
12012   ac_status=$?
12013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12014   (exit $ac_status); }; }; then
12015   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12016 else
12017   echo "$as_me: failed program was:" >&5
12018 sed 's/^/| /' conftest.$ac_ext >&5
12019
12020 ac_cv_member_struct_sockaddr_storage___ss_family=no
12021 fi
12022 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12023 fi
12024 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12025 fi
12026 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12027 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12028 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12029
12030 cat >>confdefs.h <<_ACEOF
12031 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12032 _ACEOF
12033
12034
12035 fi
12036 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12037 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12038 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12039   echo $ECHO_N "(cached) $ECHO_C" >&6
12040 else
12041   cat >conftest.$ac_ext <<_ACEOF
12042 /* confdefs.h.  */
12043 _ACEOF
12044 cat confdefs.h >>conftest.$ac_ext
12045 cat >>conftest.$ac_ext <<_ACEOF
12046 /* end confdefs.h.  */
12047 #include <sys/types.h>
12048 #ifdef HAVE_SYS_SOCKET_H
12049 #include <sys/socket.h>
12050 #endif
12051
12052
12053 int
12054 main ()
12055 {
12056 static struct sockaddr_storage ac_aggr;
12057 if (ac_aggr.ss_len)
12058 return 0;
12059   ;
12060   return 0;
12061 }
12062 _ACEOF
12063 rm -f conftest.$ac_objext
12064 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12065   (eval $ac_compile) 2>conftest.er1
12066   ac_status=$?
12067   grep -v '^ *+' conftest.er1 >conftest.err
12068   rm -f conftest.er1
12069   cat conftest.err >&5
12070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12071   (exit $ac_status); } &&
12072          { ac_try='test -z "$ac_c_werror_flag"
12073                          || test ! -s conftest.err'
12074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12075   (eval $ac_try) 2>&5
12076   ac_status=$?
12077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12078   (exit $ac_status); }; } &&
12079          { ac_try='test -s conftest.$ac_objext'
12080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12081   (eval $ac_try) 2>&5
12082   ac_status=$?
12083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12084   (exit $ac_status); }; }; then
12085   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12086 else
12087   echo "$as_me: failed program was:" >&5
12088 sed 's/^/| /' conftest.$ac_ext >&5
12089
12090 cat >conftest.$ac_ext <<_ACEOF
12091 /* confdefs.h.  */
12092 _ACEOF
12093 cat confdefs.h >>conftest.$ac_ext
12094 cat >>conftest.$ac_ext <<_ACEOF
12095 /* end confdefs.h.  */
12096 #include <sys/types.h>
12097 #ifdef HAVE_SYS_SOCKET_H
12098 #include <sys/socket.h>
12099 #endif
12100
12101
12102 int
12103 main ()
12104 {
12105 static struct sockaddr_storage ac_aggr;
12106 if (sizeof ac_aggr.ss_len)
12107 return 0;
12108   ;
12109   return 0;
12110 }
12111 _ACEOF
12112 rm -f conftest.$ac_objext
12113 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12114   (eval $ac_compile) 2>conftest.er1
12115   ac_status=$?
12116   grep -v '^ *+' conftest.er1 >conftest.err
12117   rm -f conftest.er1
12118   cat conftest.err >&5
12119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120   (exit $ac_status); } &&
12121          { ac_try='test -z "$ac_c_werror_flag"
12122                          || test ! -s conftest.err'
12123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12124   (eval $ac_try) 2>&5
12125   ac_status=$?
12126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12127   (exit $ac_status); }; } &&
12128          { ac_try='test -s conftest.$ac_objext'
12129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12130   (eval $ac_try) 2>&5
12131   ac_status=$?
12132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12133   (exit $ac_status); }; }; then
12134   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12135 else
12136   echo "$as_me: failed program was:" >&5
12137 sed 's/^/| /' conftest.$ac_ext >&5
12138
12139 ac_cv_member_struct_sockaddr_storage_ss_len=no
12140 fi
12141 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12142 fi
12143 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12144 fi
12145 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12146 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12147 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12148
12149 cat >>confdefs.h <<_ACEOF
12150 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12151 _ACEOF
12152
12153
12154 fi
12155 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12156 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12157 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12158   echo $ECHO_N "(cached) $ECHO_C" >&6
12159 else
12160   cat >conftest.$ac_ext <<_ACEOF
12161 /* confdefs.h.  */
12162 _ACEOF
12163 cat confdefs.h >>conftest.$ac_ext
12164 cat >>conftest.$ac_ext <<_ACEOF
12165 /* end confdefs.h.  */
12166 #include <sys/types.h>
12167 #ifdef HAVE_SYS_SOCKET_H
12168 #include <sys/socket.h>
12169 #endif
12170
12171
12172 int
12173 main ()
12174 {
12175 static struct sockaddr_storage ac_aggr;
12176 if (ac_aggr.__ss_len)
12177 return 0;
12178   ;
12179   return 0;
12180 }
12181 _ACEOF
12182 rm -f conftest.$ac_objext
12183 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12184   (eval $ac_compile) 2>conftest.er1
12185   ac_status=$?
12186   grep -v '^ *+' conftest.er1 >conftest.err
12187   rm -f conftest.er1
12188   cat conftest.err >&5
12189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12190   (exit $ac_status); } &&
12191          { ac_try='test -z "$ac_c_werror_flag"
12192                          || test ! -s conftest.err'
12193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12194   (eval $ac_try) 2>&5
12195   ac_status=$?
12196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12197   (exit $ac_status); }; } &&
12198          { ac_try='test -s conftest.$ac_objext'
12199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12200   (eval $ac_try) 2>&5
12201   ac_status=$?
12202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12203   (exit $ac_status); }; }; then
12204   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12205 else
12206   echo "$as_me: failed program was:" >&5
12207 sed 's/^/| /' conftest.$ac_ext >&5
12208
12209 cat >conftest.$ac_ext <<_ACEOF
12210 /* confdefs.h.  */
12211 _ACEOF
12212 cat confdefs.h >>conftest.$ac_ext
12213 cat >>conftest.$ac_ext <<_ACEOF
12214 /* end confdefs.h.  */
12215 #include <sys/types.h>
12216 #ifdef HAVE_SYS_SOCKET_H
12217 #include <sys/socket.h>
12218 #endif
12219
12220
12221 int
12222 main ()
12223 {
12224 static struct sockaddr_storage ac_aggr;
12225 if (sizeof ac_aggr.__ss_len)
12226 return 0;
12227   ;
12228   return 0;
12229 }
12230 _ACEOF
12231 rm -f conftest.$ac_objext
12232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12233   (eval $ac_compile) 2>conftest.er1
12234   ac_status=$?
12235   grep -v '^ *+' conftest.er1 >conftest.err
12236   rm -f conftest.er1
12237   cat conftest.err >&5
12238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12239   (exit $ac_status); } &&
12240          { ac_try='test -z "$ac_c_werror_flag"
12241                          || test ! -s conftest.err'
12242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12243   (eval $ac_try) 2>&5
12244   ac_status=$?
12245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12246   (exit $ac_status); }; } &&
12247          { ac_try='test -s conftest.$ac_objext'
12248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12249   (eval $ac_try) 2>&5
12250   ac_status=$?
12251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12252   (exit $ac_status); }; }; then
12253   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12254 else
12255   echo "$as_me: failed program was:" >&5
12256 sed 's/^/| /' conftest.$ac_ext >&5
12257
12258 ac_cv_member_struct_sockaddr_storage___ss_len=no
12259 fi
12260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12261 fi
12262 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12263 fi
12264 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12265 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12266 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12267
12268 cat >>confdefs.h <<_ACEOF
12269 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12270 _ACEOF
12271
12272
12273 fi
12274 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12275 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12276 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12277   echo $ECHO_N "(cached) $ECHO_C" >&6
12278 else
12279   cat >conftest.$ac_ext <<_ACEOF
12280 /* confdefs.h.  */
12281 _ACEOF
12282 cat confdefs.h >>conftest.$ac_ext
12283 cat >>conftest.$ac_ext <<_ACEOF
12284 /* end confdefs.h.  */
12285 #include <sys/types.h>
12286 #ifdef HAVE_SYS_SOCKET_H
12287 #include <sys/socket.h>
12288 #endif
12289
12290
12291 int
12292 main ()
12293 {
12294 static struct sockaddr ac_aggr;
12295 if (ac_aggr.sa_len)
12296 return 0;
12297   ;
12298   return 0;
12299 }
12300 _ACEOF
12301 rm -f conftest.$ac_objext
12302 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12303   (eval $ac_compile) 2>conftest.er1
12304   ac_status=$?
12305   grep -v '^ *+' conftest.er1 >conftest.err
12306   rm -f conftest.er1
12307   cat conftest.err >&5
12308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12309   (exit $ac_status); } &&
12310          { ac_try='test -z "$ac_c_werror_flag"
12311                          || test ! -s conftest.err'
12312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12313   (eval $ac_try) 2>&5
12314   ac_status=$?
12315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12316   (exit $ac_status); }; } &&
12317          { ac_try='test -s conftest.$ac_objext'
12318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12319   (eval $ac_try) 2>&5
12320   ac_status=$?
12321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12322   (exit $ac_status); }; }; then
12323   ac_cv_member_struct_sockaddr_sa_len=yes
12324 else
12325   echo "$as_me: failed program was:" >&5
12326 sed 's/^/| /' conftest.$ac_ext >&5
12327
12328 cat >conftest.$ac_ext <<_ACEOF
12329 /* confdefs.h.  */
12330 _ACEOF
12331 cat confdefs.h >>conftest.$ac_ext
12332 cat >>conftest.$ac_ext <<_ACEOF
12333 /* end confdefs.h.  */
12334 #include <sys/types.h>
12335 #ifdef HAVE_SYS_SOCKET_H
12336 #include <sys/socket.h>
12337 #endif
12338
12339
12340 int
12341 main ()
12342 {
12343 static struct sockaddr ac_aggr;
12344 if (sizeof ac_aggr.sa_len)
12345 return 0;
12346   ;
12347   return 0;
12348 }
12349 _ACEOF
12350 rm -f conftest.$ac_objext
12351 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12352   (eval $ac_compile) 2>conftest.er1
12353   ac_status=$?
12354   grep -v '^ *+' conftest.er1 >conftest.err
12355   rm -f conftest.er1
12356   cat conftest.err >&5
12357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12358   (exit $ac_status); } &&
12359          { ac_try='test -z "$ac_c_werror_flag"
12360                          || test ! -s conftest.err'
12361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12362   (eval $ac_try) 2>&5
12363   ac_status=$?
12364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12365   (exit $ac_status); }; } &&
12366          { ac_try='test -s conftest.$ac_objext'
12367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12368   (eval $ac_try) 2>&5
12369   ac_status=$?
12370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12371   (exit $ac_status); }; }; then
12372   ac_cv_member_struct_sockaddr_sa_len=yes
12373 else
12374   echo "$as_me: failed program was:" >&5
12375 sed 's/^/| /' conftest.$ac_ext >&5
12376
12377 ac_cv_member_struct_sockaddr_sa_len=no
12378 fi
12379 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12380 fi
12381 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12382 fi
12383 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12384 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12385 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12386
12387 cat >>confdefs.h <<_ACEOF
12388 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12389 _ACEOF
12390
12391
12392 fi
12393
12394 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12395 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12396 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12397   echo $ECHO_N "(cached) $ECHO_C" >&6
12398 else
12399   cat >conftest.$ac_ext <<_ACEOF
12400 /* confdefs.h.  */
12401 _ACEOF
12402 cat confdefs.h >>conftest.$ac_ext
12403 cat >>conftest.$ac_ext <<_ACEOF
12404 /* end confdefs.h.  */
12405 #include <sys/types.h>
12406 #include <sys/socket.h>
12407 #include <netdb.h>
12408
12409
12410 int
12411 main ()
12412 {
12413 if ((struct addrinfo *) 0)
12414   return 0;
12415 if (sizeof (struct addrinfo))
12416   return 0;
12417   ;
12418   return 0;
12419 }
12420 _ACEOF
12421 rm -f conftest.$ac_objext
12422 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12423   (eval $ac_compile) 2>conftest.er1
12424   ac_status=$?
12425   grep -v '^ *+' conftest.er1 >conftest.err
12426   rm -f conftest.er1
12427   cat conftest.err >&5
12428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12429   (exit $ac_status); } &&
12430          { ac_try='test -z "$ac_c_werror_flag"
12431                          || test ! -s conftest.err'
12432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12433   (eval $ac_try) 2>&5
12434   ac_status=$?
12435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12436   (exit $ac_status); }; } &&
12437          { ac_try='test -s conftest.$ac_objext'
12438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12439   (eval $ac_try) 2>&5
12440   ac_status=$?
12441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12442   (exit $ac_status); }; }; then
12443   ac_cv_type_struct_addrinfo=yes
12444 else
12445   echo "$as_me: failed program was:" >&5
12446 sed 's/^/| /' conftest.$ac_ext >&5
12447
12448 ac_cv_type_struct_addrinfo=no
12449 fi
12450 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12451 fi
12452 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12453 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12454 if test $ac_cv_type_struct_addrinfo = yes; then
12455
12456 cat >>confdefs.h <<_ACEOF
12457 #define HAVE_STRUCT_ADDRINFO 1
12458 _ACEOF
12459
12460
12461 fi
12462
12463
12464 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12465 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12466 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12467   echo $ECHO_N "(cached) $ECHO_C" >&6
12468 else
12469   cat >conftest.$ac_ext <<_ACEOF
12470 /* confdefs.h.  */
12471 _ACEOF
12472 cat confdefs.h >>conftest.$ac_ext
12473 cat >>conftest.$ac_ext <<_ACEOF
12474 /* end confdefs.h.  */
12475 #include <sys/param.h>
12476 #include <sys/types.h>
12477 #include <sys/socket.h>
12478 #include <sys/ucred.h>
12479
12480 int
12481 main ()
12482 {
12483 if ((struct cmsgcred *) 0)
12484   return 0;
12485 if (sizeof (struct cmsgcred))
12486   return 0;
12487   ;
12488   return 0;
12489 }
12490 _ACEOF
12491 rm -f conftest.$ac_objext
12492 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12493   (eval $ac_compile) 2>conftest.er1
12494   ac_status=$?
12495   grep -v '^ *+' conftest.er1 >conftest.err
12496   rm -f conftest.er1
12497   cat conftest.err >&5
12498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12499   (exit $ac_status); } &&
12500          { ac_try='test -z "$ac_c_werror_flag"
12501                          || test ! -s conftest.err'
12502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12503   (eval $ac_try) 2>&5
12504   ac_status=$?
12505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12506   (exit $ac_status); }; } &&
12507          { ac_try='test -s conftest.$ac_objext'
12508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12509   (eval $ac_try) 2>&5
12510   ac_status=$?
12511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12512   (exit $ac_status); }; }; then
12513   ac_cv_type_struct_cmsgcred=yes
12514 else
12515   echo "$as_me: failed program was:" >&5
12516 sed 's/^/| /' conftest.$ac_ext >&5
12517
12518 ac_cv_type_struct_cmsgcred=no
12519 fi
12520 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12521 fi
12522 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12523 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12524 if test $ac_cv_type_struct_cmsgcred = yes; then
12525
12526 cat >>confdefs.h <<_ACEOF
12527 #define HAVE_STRUCT_CMSGCRED 1
12528 _ACEOF
12529
12530
12531 fi
12532 echo "$as_me:$LINENO: checking for struct fcred" >&5
12533 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12534 if test "${ac_cv_type_struct_fcred+set}" = set; then
12535   echo $ECHO_N "(cached) $ECHO_C" >&6
12536 else
12537   cat >conftest.$ac_ext <<_ACEOF
12538 /* confdefs.h.  */
12539 _ACEOF
12540 cat confdefs.h >>conftest.$ac_ext
12541 cat >>conftest.$ac_ext <<_ACEOF
12542 /* end confdefs.h.  */
12543 #include <sys/param.h>
12544 #include <sys/types.h>
12545 #include <sys/socket.h>
12546 #include <sys/ucred.h>
12547
12548 int
12549 main ()
12550 {
12551 if ((struct fcred *) 0)
12552   return 0;
12553 if (sizeof (struct fcred))
12554   return 0;
12555   ;
12556   return 0;
12557 }
12558 _ACEOF
12559 rm -f conftest.$ac_objext
12560 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12561   (eval $ac_compile) 2>conftest.er1
12562   ac_status=$?
12563   grep -v '^ *+' conftest.er1 >conftest.err
12564   rm -f conftest.er1
12565   cat conftest.err >&5
12566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12567   (exit $ac_status); } &&
12568          { ac_try='test -z "$ac_c_werror_flag"
12569                          || test ! -s conftest.err'
12570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12571   (eval $ac_try) 2>&5
12572   ac_status=$?
12573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12574   (exit $ac_status); }; } &&
12575          { ac_try='test -s conftest.$ac_objext'
12576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12577   (eval $ac_try) 2>&5
12578   ac_status=$?
12579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12580   (exit $ac_status); }; }; then
12581   ac_cv_type_struct_fcred=yes
12582 else
12583   echo "$as_me: failed program was:" >&5
12584 sed 's/^/| /' conftest.$ac_ext >&5
12585
12586 ac_cv_type_struct_fcred=no
12587 fi
12588 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12589 fi
12590 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12591 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12592 if test $ac_cv_type_struct_fcred = yes; then
12593
12594 cat >>confdefs.h <<_ACEOF
12595 #define HAVE_STRUCT_FCRED 1
12596 _ACEOF
12597
12598
12599 fi
12600 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12601 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12602 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12603   echo $ECHO_N "(cached) $ECHO_C" >&6
12604 else
12605   cat >conftest.$ac_ext <<_ACEOF
12606 /* confdefs.h.  */
12607 _ACEOF
12608 cat confdefs.h >>conftest.$ac_ext
12609 cat >>conftest.$ac_ext <<_ACEOF
12610 /* end confdefs.h.  */
12611 #include <sys/param.h>
12612 #include <sys/types.h>
12613 #include <sys/socket.h>
12614 #include <sys/ucred.h>
12615
12616 int
12617 main ()
12618 {
12619 if ((struct sockcred *) 0)
12620   return 0;
12621 if (sizeof (struct sockcred))
12622   return 0;
12623   ;
12624   return 0;
12625 }
12626 _ACEOF
12627 rm -f conftest.$ac_objext
12628 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12629   (eval $ac_compile) 2>conftest.er1
12630   ac_status=$?
12631   grep -v '^ *+' conftest.er1 >conftest.err
12632   rm -f conftest.er1
12633   cat conftest.err >&5
12634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12635   (exit $ac_status); } &&
12636          { ac_try='test -z "$ac_c_werror_flag"
12637                          || test ! -s conftest.err'
12638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12639   (eval $ac_try) 2>&5
12640   ac_status=$?
12641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12642   (exit $ac_status); }; } &&
12643          { ac_try='test -s conftest.$ac_objext'
12644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12645   (eval $ac_try) 2>&5
12646   ac_status=$?
12647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12648   (exit $ac_status); }; }; then
12649   ac_cv_type_struct_sockcred=yes
12650 else
12651   echo "$as_me: failed program was:" >&5
12652 sed 's/^/| /' conftest.$ac_ext >&5
12653
12654 ac_cv_type_struct_sockcred=no
12655 fi
12656 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12657 fi
12658 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12659 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12660 if test $ac_cv_type_struct_sockcred = yes; then
12661
12662 cat >>confdefs.h <<_ACEOF
12663 #define HAVE_STRUCT_SOCKCRED 1
12664 _ACEOF
12665
12666
12667 fi
12668
12669
12670 echo "$as_me:$LINENO: checking for struct option" >&5
12671 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12672 if test "${ac_cv_type_struct_option+set}" = set; then
12673   echo $ECHO_N "(cached) $ECHO_C" >&6
12674 else
12675   cat >conftest.$ac_ext <<_ACEOF
12676 /* confdefs.h.  */
12677 _ACEOF
12678 cat confdefs.h >>conftest.$ac_ext
12679 cat >>conftest.$ac_ext <<_ACEOF
12680 /* end confdefs.h.  */
12681 #ifdef HAVE_GETOPT_H
12682 #include <getopt.h>
12683 #endif
12684
12685 int
12686 main ()
12687 {
12688 if ((struct option *) 0)
12689   return 0;
12690 if (sizeof (struct option))
12691   return 0;
12692   ;
12693   return 0;
12694 }
12695 _ACEOF
12696 rm -f conftest.$ac_objext
12697 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12698   (eval $ac_compile) 2>conftest.er1
12699   ac_status=$?
12700   grep -v '^ *+' conftest.er1 >conftest.err
12701   rm -f conftest.er1
12702   cat conftest.err >&5
12703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12704   (exit $ac_status); } &&
12705          { ac_try='test -z "$ac_c_werror_flag"
12706                          || test ! -s conftest.err'
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); }; } &&
12712          { ac_try='test -s conftest.$ac_objext'
12713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12714   (eval $ac_try) 2>&5
12715   ac_status=$?
12716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12717   (exit $ac_status); }; }; then
12718   ac_cv_type_struct_option=yes
12719 else
12720   echo "$as_me: failed program was:" >&5
12721 sed 's/^/| /' conftest.$ac_ext >&5
12722
12723 ac_cv_type_struct_option=no
12724 fi
12725 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12726 fi
12727 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12728 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12729 if test $ac_cv_type_struct_option = yes; then
12730
12731 cat >>confdefs.h <<_ACEOF
12732 #define HAVE_STRUCT_OPTION 1
12733 _ACEOF
12734
12735
12736 fi
12737
12738
12739 if test "$with_zlib" = yes; then
12740   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12741   # did not).  While we could work around the lack of z_streamp, it
12742   # seems unwise to encourage people to use such old zlib versions...
12743   echo "$as_me:$LINENO: checking for z_streamp" >&5
12744 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12745 if test "${ac_cv_type_z_streamp+set}" = set; then
12746   echo $ECHO_N "(cached) $ECHO_C" >&6
12747 else
12748   cat >conftest.$ac_ext <<_ACEOF
12749 /* confdefs.h.  */
12750 _ACEOF
12751 cat confdefs.h >>conftest.$ac_ext
12752 cat >>conftest.$ac_ext <<_ACEOF
12753 /* end confdefs.h.  */
12754 #include <zlib.h>
12755
12756 int
12757 main ()
12758 {
12759 if ((z_streamp *) 0)
12760   return 0;
12761 if (sizeof (z_streamp))
12762   return 0;
12763   ;
12764   return 0;
12765 }
12766 _ACEOF
12767 rm -f conftest.$ac_objext
12768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12769   (eval $ac_compile) 2>conftest.er1
12770   ac_status=$?
12771   grep -v '^ *+' conftest.er1 >conftest.err
12772   rm -f conftest.er1
12773   cat conftest.err >&5
12774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12775   (exit $ac_status); } &&
12776          { ac_try='test -z "$ac_c_werror_flag"
12777                          || test ! -s conftest.err'
12778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12779   (eval $ac_try) 2>&5
12780   ac_status=$?
12781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12782   (exit $ac_status); }; } &&
12783          { ac_try='test -s conftest.$ac_objext'
12784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12785   (eval $ac_try) 2>&5
12786   ac_status=$?
12787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12788   (exit $ac_status); }; }; then
12789   ac_cv_type_z_streamp=yes
12790 else
12791   echo "$as_me: failed program was:" >&5
12792 sed 's/^/| /' conftest.$ac_ext >&5
12793
12794 ac_cv_type_z_streamp=no
12795 fi
12796 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12797 fi
12798 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12799 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12800 if test $ac_cv_type_z_streamp = yes; then
12801   :
12802 else
12803   { { echo "$as_me:$LINENO: error: zlib version is too old
12804 Use --without-zlib to disable zlib support." >&5
12805 echo "$as_me: error: zlib version is too old
12806 Use --without-zlib to disable zlib support." >&2;}
12807    { (exit 1); exit 1; }; }
12808 fi
12809
12810 fi
12811
12812 if test "$with_krb5" = yes; then
12813 # Check for differences between MIT and Heimdal (KTH) releases
12814   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12815 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12816 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12817   echo $ECHO_N "(cached) $ECHO_C" >&6
12818 else
12819   cat >conftest.$ac_ext <<_ACEOF
12820 /* confdefs.h.  */
12821 _ACEOF
12822 cat confdefs.h >>conftest.$ac_ext
12823 cat >>conftest.$ac_ext <<_ACEOF
12824 /* end confdefs.h.  */
12825 #include <krb5.h>
12826
12827 int
12828 main ()
12829 {
12830 static krb5_ticket ac_aggr;
12831 if (ac_aggr.enc_part2)
12832 return 0;
12833   ;
12834   return 0;
12835 }
12836 _ACEOF
12837 rm -f conftest.$ac_objext
12838 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12839   (eval $ac_compile) 2>conftest.er1
12840   ac_status=$?
12841   grep -v '^ *+' conftest.er1 >conftest.err
12842   rm -f conftest.er1
12843   cat conftest.err >&5
12844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12845   (exit $ac_status); } &&
12846          { ac_try='test -z "$ac_c_werror_flag"
12847                          || test ! -s conftest.err'
12848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12849   (eval $ac_try) 2>&5
12850   ac_status=$?
12851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12852   (exit $ac_status); }; } &&
12853          { ac_try='test -s conftest.$ac_objext'
12854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12855   (eval $ac_try) 2>&5
12856   ac_status=$?
12857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12858   (exit $ac_status); }; }; then
12859   ac_cv_member_krb5_ticket_enc_part2=yes
12860 else
12861   echo "$as_me: failed program was:" >&5
12862 sed 's/^/| /' conftest.$ac_ext >&5
12863
12864 cat >conftest.$ac_ext <<_ACEOF
12865 /* confdefs.h.  */
12866 _ACEOF
12867 cat confdefs.h >>conftest.$ac_ext
12868 cat >>conftest.$ac_ext <<_ACEOF
12869 /* end confdefs.h.  */
12870 #include <krb5.h>
12871
12872 int
12873 main ()
12874 {
12875 static krb5_ticket ac_aggr;
12876 if (sizeof ac_aggr.enc_part2)
12877 return 0;
12878   ;
12879   return 0;
12880 }
12881 _ACEOF
12882 rm -f conftest.$ac_objext
12883 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12884   (eval $ac_compile) 2>conftest.er1
12885   ac_status=$?
12886   grep -v '^ *+' conftest.er1 >conftest.err
12887   rm -f conftest.er1
12888   cat conftest.err >&5
12889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12890   (exit $ac_status); } &&
12891          { ac_try='test -z "$ac_c_werror_flag"
12892                          || test ! -s conftest.err'
12893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12894   (eval $ac_try) 2>&5
12895   ac_status=$?
12896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12897   (exit $ac_status); }; } &&
12898          { ac_try='test -s conftest.$ac_objext'
12899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12900   (eval $ac_try) 2>&5
12901   ac_status=$?
12902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12903   (exit $ac_status); }; }; then
12904   ac_cv_member_krb5_ticket_enc_part2=yes
12905 else
12906   echo "$as_me: failed program was:" >&5
12907 sed 's/^/| /' conftest.$ac_ext >&5
12908
12909 ac_cv_member_krb5_ticket_enc_part2=no
12910 fi
12911 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12912 fi
12913 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12914 fi
12915 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12916 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12917 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12918
12919 cat >>confdefs.h <<_ACEOF
12920 #define HAVE_KRB5_TICKET_ENC_PART2 1
12921 _ACEOF
12922
12923
12924 else
12925   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12926 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12927 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12928   echo $ECHO_N "(cached) $ECHO_C" >&6
12929 else
12930   cat >conftest.$ac_ext <<_ACEOF
12931 /* confdefs.h.  */
12932 _ACEOF
12933 cat confdefs.h >>conftest.$ac_ext
12934 cat >>conftest.$ac_ext <<_ACEOF
12935 /* end confdefs.h.  */
12936 #include <krb5.h>
12937
12938 int
12939 main ()
12940 {
12941 static krb5_ticket ac_aggr;
12942 if (ac_aggr.client)
12943 return 0;
12944   ;
12945   return 0;
12946 }
12947 _ACEOF
12948 rm -f conftest.$ac_objext
12949 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12950   (eval $ac_compile) 2>conftest.er1
12951   ac_status=$?
12952   grep -v '^ *+' conftest.er1 >conftest.err
12953   rm -f conftest.er1
12954   cat conftest.err >&5
12955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12956   (exit $ac_status); } &&
12957          { ac_try='test -z "$ac_c_werror_flag"
12958                          || test ! -s conftest.err'
12959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12960   (eval $ac_try) 2>&5
12961   ac_status=$?
12962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12963   (exit $ac_status); }; } &&
12964          { ac_try='test -s conftest.$ac_objext'
12965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12966   (eval $ac_try) 2>&5
12967   ac_status=$?
12968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12969   (exit $ac_status); }; }; then
12970   ac_cv_member_krb5_ticket_client=yes
12971 else
12972   echo "$as_me: failed program was:" >&5
12973 sed 's/^/| /' conftest.$ac_ext >&5
12974
12975 cat >conftest.$ac_ext <<_ACEOF
12976 /* confdefs.h.  */
12977 _ACEOF
12978 cat confdefs.h >>conftest.$ac_ext
12979 cat >>conftest.$ac_ext <<_ACEOF
12980 /* end confdefs.h.  */
12981 #include <krb5.h>
12982
12983 int
12984 main ()
12985 {
12986 static krb5_ticket ac_aggr;
12987 if (sizeof ac_aggr.client)
12988 return 0;
12989   ;
12990   return 0;
12991 }
12992 _ACEOF
12993 rm -f conftest.$ac_objext
12994 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12995   (eval $ac_compile) 2>conftest.er1
12996   ac_status=$?
12997   grep -v '^ *+' conftest.er1 >conftest.err
12998   rm -f conftest.er1
12999   cat conftest.err >&5
13000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13001   (exit $ac_status); } &&
13002          { ac_try='test -z "$ac_c_werror_flag"
13003                          || test ! -s conftest.err'
13004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13005   (eval $ac_try) 2>&5
13006   ac_status=$?
13007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13008   (exit $ac_status); }; } &&
13009          { ac_try='test -s conftest.$ac_objext'
13010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13011   (eval $ac_try) 2>&5
13012   ac_status=$?
13013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13014   (exit $ac_status); }; }; then
13015   ac_cv_member_krb5_ticket_client=yes
13016 else
13017   echo "$as_me: failed program was:" >&5
13018 sed 's/^/| /' conftest.$ac_ext >&5
13019
13020 ac_cv_member_krb5_ticket_client=no
13021 fi
13022 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13023 fi
13024 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13025 fi
13026 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13027 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13028 if test $ac_cv_member_krb5_ticket_client = yes; then
13029
13030 cat >>confdefs.h <<_ACEOF
13031 #define HAVE_KRB5_TICKET_CLIENT 1
13032 _ACEOF
13033
13034
13035 else
13036   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13037 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13038    { (exit 1); exit 1; }; }
13039 fi
13040
13041 fi
13042
13043   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13044 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13045 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13046   echo $ECHO_N "(cached) $ECHO_C" >&6
13047 else
13048   cat >conftest.$ac_ext <<_ACEOF
13049 /* confdefs.h.  */
13050 _ACEOF
13051 cat confdefs.h >>conftest.$ac_ext
13052 cat >>conftest.$ac_ext <<_ACEOF
13053 /* end confdefs.h.  */
13054 #include <krb5.h>
13055
13056 int
13057 main ()
13058 {
13059 static krb5_error ac_aggr;
13060 if (ac_aggr.text.data)
13061 return 0;
13062   ;
13063   return 0;
13064 }
13065 _ACEOF
13066 rm -f conftest.$ac_objext
13067 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13068   (eval $ac_compile) 2>conftest.er1
13069   ac_status=$?
13070   grep -v '^ *+' conftest.er1 >conftest.err
13071   rm -f conftest.er1
13072   cat conftest.err >&5
13073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13074   (exit $ac_status); } &&
13075          { ac_try='test -z "$ac_c_werror_flag"
13076                          || test ! -s conftest.err'
13077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13078   (eval $ac_try) 2>&5
13079   ac_status=$?
13080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13081   (exit $ac_status); }; } &&
13082          { ac_try='test -s conftest.$ac_objext'
13083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13084   (eval $ac_try) 2>&5
13085   ac_status=$?
13086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13087   (exit $ac_status); }; }; then
13088   ac_cv_member_krb5_error_text_data=yes
13089 else
13090   echo "$as_me: failed program was:" >&5
13091 sed 's/^/| /' conftest.$ac_ext >&5
13092
13093 cat >conftest.$ac_ext <<_ACEOF
13094 /* confdefs.h.  */
13095 _ACEOF
13096 cat confdefs.h >>conftest.$ac_ext
13097 cat >>conftest.$ac_ext <<_ACEOF
13098 /* end confdefs.h.  */
13099 #include <krb5.h>
13100
13101 int
13102 main ()
13103 {
13104 static krb5_error ac_aggr;
13105 if (sizeof ac_aggr.text.data)
13106 return 0;
13107   ;
13108   return 0;
13109 }
13110 _ACEOF
13111 rm -f conftest.$ac_objext
13112 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13113   (eval $ac_compile) 2>conftest.er1
13114   ac_status=$?
13115   grep -v '^ *+' conftest.er1 >conftest.err
13116   rm -f conftest.er1
13117   cat conftest.err >&5
13118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13119   (exit $ac_status); } &&
13120          { ac_try='test -z "$ac_c_werror_flag"
13121                          || test ! -s conftest.err'
13122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13123   (eval $ac_try) 2>&5
13124   ac_status=$?
13125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13126   (exit $ac_status); }; } &&
13127          { ac_try='test -s conftest.$ac_objext'
13128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13129   (eval $ac_try) 2>&5
13130   ac_status=$?
13131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13132   (exit $ac_status); }; }; then
13133   ac_cv_member_krb5_error_text_data=yes
13134 else
13135   echo "$as_me: failed program was:" >&5
13136 sed 's/^/| /' conftest.$ac_ext >&5
13137
13138 ac_cv_member_krb5_error_text_data=no
13139 fi
13140 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13141 fi
13142 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13143 fi
13144 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13145 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13146 if test $ac_cv_member_krb5_error_text_data = yes; then
13147
13148 cat >>confdefs.h <<_ACEOF
13149 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13150 _ACEOF
13151
13152
13153 else
13154   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13155 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13156 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13157   echo $ECHO_N "(cached) $ECHO_C" >&6
13158 else
13159   cat >conftest.$ac_ext <<_ACEOF
13160 /* confdefs.h.  */
13161 _ACEOF
13162 cat confdefs.h >>conftest.$ac_ext
13163 cat >>conftest.$ac_ext <<_ACEOF
13164 /* end confdefs.h.  */
13165 #include <krb5.h>
13166
13167 int
13168 main ()
13169 {
13170 static krb5_error ac_aggr;
13171 if (ac_aggr.e_data)
13172 return 0;
13173   ;
13174   return 0;
13175 }
13176 _ACEOF
13177 rm -f conftest.$ac_objext
13178 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13179   (eval $ac_compile) 2>conftest.er1
13180   ac_status=$?
13181   grep -v '^ *+' conftest.er1 >conftest.err
13182   rm -f conftest.er1
13183   cat conftest.err >&5
13184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13185   (exit $ac_status); } &&
13186          { ac_try='test -z "$ac_c_werror_flag"
13187                          || test ! -s conftest.err'
13188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13189   (eval $ac_try) 2>&5
13190   ac_status=$?
13191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13192   (exit $ac_status); }; } &&
13193          { ac_try='test -s conftest.$ac_objext'
13194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13195   (eval $ac_try) 2>&5
13196   ac_status=$?
13197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13198   (exit $ac_status); }; }; then
13199   ac_cv_member_krb5_error_e_data=yes
13200 else
13201   echo "$as_me: failed program was:" >&5
13202 sed 's/^/| /' conftest.$ac_ext >&5
13203
13204 cat >conftest.$ac_ext <<_ACEOF
13205 /* confdefs.h.  */
13206 _ACEOF
13207 cat confdefs.h >>conftest.$ac_ext
13208 cat >>conftest.$ac_ext <<_ACEOF
13209 /* end confdefs.h.  */
13210 #include <krb5.h>
13211
13212 int
13213 main ()
13214 {
13215 static krb5_error ac_aggr;
13216 if (sizeof ac_aggr.e_data)
13217 return 0;
13218   ;
13219   return 0;
13220 }
13221 _ACEOF
13222 rm -f conftest.$ac_objext
13223 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13224   (eval $ac_compile) 2>conftest.er1
13225   ac_status=$?
13226   grep -v '^ *+' conftest.er1 >conftest.err
13227   rm -f conftest.er1
13228   cat conftest.err >&5
13229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13230   (exit $ac_status); } &&
13231          { ac_try='test -z "$ac_c_werror_flag"
13232                          || test ! -s conftest.err'
13233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13234   (eval $ac_try) 2>&5
13235   ac_status=$?
13236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13237   (exit $ac_status); }; } &&
13238          { ac_try='test -s conftest.$ac_objext'
13239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13240   (eval $ac_try) 2>&5
13241   ac_status=$?
13242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13243   (exit $ac_status); }; }; then
13244   ac_cv_member_krb5_error_e_data=yes
13245 else
13246   echo "$as_me: failed program was:" >&5
13247 sed 's/^/| /' conftest.$ac_ext >&5
13248
13249 ac_cv_member_krb5_error_e_data=no
13250 fi
13251 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13252 fi
13253 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13254 fi
13255 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13256 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13257 if test $ac_cv_member_krb5_error_e_data = yes; then
13258
13259 cat >>confdefs.h <<_ACEOF
13260 #define HAVE_KRB5_ERROR_E_DATA 1
13261 _ACEOF
13262
13263
13264 else
13265   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13266 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13267    { (exit 1); exit 1; }; }
13268 fi
13269
13270 fi
13271
13272 fi
13273
13274 # This is probably only present on Darwin, but may as well check always
13275 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
13276 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
13277 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
13278   echo $ECHO_N "(cached) $ECHO_C" >&6
13279 else
13280   cat >conftest.$ac_ext <<_ACEOF
13281 /* confdefs.h.  */
13282 _ACEOF
13283 cat confdefs.h >>conftest.$ac_ext
13284 cat >>conftest.$ac_ext <<_ACEOF
13285 /* end confdefs.h.  */
13286 #include <fcntl.h>
13287
13288 int
13289 main ()
13290 {
13291 #ifndef F_FULLFSYNC
13292   char *p = (char *) F_FULLFSYNC;
13293 #endif
13294
13295   ;
13296   return 0;
13297 }
13298 _ACEOF
13299 rm -f conftest.$ac_objext
13300 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13301   (eval $ac_compile) 2>conftest.er1
13302   ac_status=$?
13303   grep -v '^ *+' conftest.er1 >conftest.err
13304   rm -f conftest.er1
13305   cat conftest.err >&5
13306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13307   (exit $ac_status); } &&
13308          { ac_try='test -z "$ac_c_werror_flag"
13309                          || test ! -s conftest.err'
13310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13311   (eval $ac_try) 2>&5
13312   ac_status=$?
13313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13314   (exit $ac_status); }; } &&
13315          { ac_try='test -s conftest.$ac_objext'
13316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13317   (eval $ac_try) 2>&5
13318   ac_status=$?
13319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13320   (exit $ac_status); }; }; then
13321   ac_cv_have_decl_F_FULLFSYNC=yes
13322 else
13323   echo "$as_me: failed program was:" >&5
13324 sed 's/^/| /' conftest.$ac_ext >&5
13325
13326 ac_cv_have_decl_F_FULLFSYNC=no
13327 fi
13328 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13329 fi
13330 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
13331 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
13332 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
13333
13334 cat >>confdefs.h <<_ACEOF
13335 #define HAVE_DECL_F_FULLFSYNC 1
13336 _ACEOF
13337
13338
13339 else
13340   cat >>confdefs.h <<_ACEOF
13341 #define HAVE_DECL_F_FULLFSYNC 0
13342 _ACEOF
13343
13344
13345 fi
13346
13347
13348
13349 ##
13350 ## Functions, global variables
13351 ##
13352
13353 echo "$as_me:$LINENO: checking for int timezone" >&5
13354 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13355 if test "${pgac_cv_var_int_timezone+set}" = set; then
13356   echo $ECHO_N "(cached) $ECHO_C" >&6
13357 else
13358   cat >conftest.$ac_ext <<_ACEOF
13359 /* confdefs.h.  */
13360 _ACEOF
13361 cat confdefs.h >>conftest.$ac_ext
13362 cat >>conftest.$ac_ext <<_ACEOF
13363 /* end confdefs.h.  */
13364 #include <time.h>
13365 int res;
13366 int
13367 main ()
13368 {
13369 #ifndef __CYGWIN__
13370 res = timezone / 60;
13371 #else
13372 res = _timezone / 60;
13373 #endif
13374   ;
13375   return 0;
13376 }
13377 _ACEOF
13378 rm -f conftest.$ac_objext conftest$ac_exeext
13379 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13380   (eval $ac_link) 2>conftest.er1
13381   ac_status=$?
13382   grep -v '^ *+' conftest.er1 >conftest.err
13383   rm -f conftest.er1
13384   cat conftest.err >&5
13385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13386   (exit $ac_status); } &&
13387          { ac_try='test -z "$ac_c_werror_flag"
13388                          || test ! -s conftest.err'
13389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13390   (eval $ac_try) 2>&5
13391   ac_status=$?
13392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13393   (exit $ac_status); }; } &&
13394          { ac_try='test -s conftest$ac_exeext'
13395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13396   (eval $ac_try) 2>&5
13397   ac_status=$?
13398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399   (exit $ac_status); }; }; then
13400   pgac_cv_var_int_timezone=yes
13401 else
13402   echo "$as_me: failed program was:" >&5
13403 sed 's/^/| /' conftest.$ac_ext >&5
13404
13405 pgac_cv_var_int_timezone=no
13406 fi
13407 rm -f conftest.err conftest.$ac_objext \
13408       conftest$ac_exeext conftest.$ac_ext
13409 fi
13410 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13411 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13412 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13413
13414 cat >>confdefs.h <<\_ACEOF
13415 #define HAVE_INT_TIMEZONE
13416 _ACEOF
13417
13418 fi
13419 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13420 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13421  if test "${ac_cv_func_accept_return+set}" = set; then
13422   echo $ECHO_N "(cached) $ECHO_C" >&6
13423 else
13424    if test "${ac_cv_func_accept_arg1+set}" = set; then
13425   echo $ECHO_N "(cached) $ECHO_C" >&6
13426 else
13427     if test "${ac_cv_func_accept_arg2+set}" = set; then
13428   echo $ECHO_N "(cached) $ECHO_C" >&6
13429 else
13430      if test "${ac_cv_func_accept_arg3+set}" = set; then
13431   echo $ECHO_N "(cached) $ECHO_C" >&6
13432 else
13433       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13434       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13435        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13436         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13437          cat >conftest.$ac_ext <<_ACEOF
13438 /* confdefs.h.  */
13439 _ACEOF
13440 cat confdefs.h >>conftest.$ac_ext
13441 cat >>conftest.$ac_ext <<_ACEOF
13442 /* end confdefs.h.  */
13443 #ifdef HAVE_SYS_TYPES_H
13444 #include <sys/types.h>
13445 #endif
13446 #ifdef HAVE_SYS_SOCKET_H
13447 #include <sys/socket.h>
13448 #endif
13449 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13450 int
13451 main ()
13452 {
13453
13454   ;
13455   return 0;
13456 }
13457 _ACEOF
13458 rm -f conftest.$ac_objext
13459 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13460   (eval $ac_compile) 2>conftest.er1
13461   ac_status=$?
13462   grep -v '^ *+' conftest.er1 >conftest.err
13463   rm -f conftest.er1
13464   cat conftest.err >&5
13465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13466   (exit $ac_status); } &&
13467          { ac_try='test -z "$ac_c_werror_flag"
13468                          || test ! -s conftest.err'
13469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13470   (eval $ac_try) 2>&5
13471   ac_status=$?
13472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473   (exit $ac_status); }; } &&
13474          { ac_try='test -s conftest.$ac_objext'
13475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13476   (eval $ac_try) 2>&5
13477   ac_status=$?
13478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13479   (exit $ac_status); }; }; then
13480   ac_not_found=no; break 4
13481 else
13482   echo "$as_me: failed program was:" >&5
13483 sed 's/^/| /' conftest.$ac_ext >&5
13484
13485 ac_not_found=yes
13486 fi
13487 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13488        done
13489       done
13490      done
13491     done
13492     if test "$ac_not_found" = yes; then
13493       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13494 echo "$as_me: error: could not determine argument types" >&2;}
13495    { (exit 1); exit 1; }; }
13496     fi
13497     if test "$ac_cv_func_accept_arg3" = "void"; then
13498       ac_cv_func_accept_arg3=int
13499     fi
13500
13501 fi
13502
13503 fi
13504
13505 fi
13506
13507 fi
13508  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
13509 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13510
13511 cat >>confdefs.h <<_ACEOF
13512 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13513 _ACEOF
13514
13515
13516 cat >>confdefs.h <<_ACEOF
13517 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13518 _ACEOF
13519
13520
13521 cat >>confdefs.h <<_ACEOF
13522 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13523 _ACEOF
13524
13525
13526 cat >>confdefs.h <<_ACEOF
13527 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13528 _ACEOF
13529
13530
13531 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13532 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13533 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13534   echo $ECHO_N "(cached) $ECHO_C" >&6
13535 else
13536   cat >conftest.$ac_ext <<_ACEOF
13537 /* confdefs.h.  */
13538 _ACEOF
13539 cat confdefs.h >>conftest.$ac_ext
13540 cat >>conftest.$ac_ext <<_ACEOF
13541 /* end confdefs.h.  */
13542 #include <sys/time.h>
13543 int
13544 main ()
13545 {
13546 struct timeval *tp;
13547 struct timezone *tzp;
13548 gettimeofday(tp,tzp);
13549   ;
13550   return 0;
13551 }
13552 _ACEOF
13553 rm -f conftest.$ac_objext
13554 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13555   (eval $ac_compile) 2>conftest.er1
13556   ac_status=$?
13557   grep -v '^ *+' conftest.er1 >conftest.err
13558   rm -f conftest.er1
13559   cat conftest.err >&5
13560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561   (exit $ac_status); } &&
13562          { ac_try='test -z "$ac_c_werror_flag"
13563                          || test ! -s conftest.err'
13564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13565   (eval $ac_try) 2>&5
13566   ac_status=$?
13567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13568   (exit $ac_status); }; } &&
13569          { ac_try='test -s conftest.$ac_objext'
13570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13571   (eval $ac_try) 2>&5
13572   ac_status=$?
13573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574   (exit $ac_status); }; }; then
13575   pgac_cv_func_gettimeofday_1arg=no
13576 else
13577   echo "$as_me: failed program was:" >&5
13578 sed 's/^/| /' conftest.$ac_ext >&5
13579
13580 pgac_cv_func_gettimeofday_1arg=yes
13581 fi
13582 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13583 fi
13584 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13585 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13586 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13587
13588 cat >>confdefs.h <<\_ACEOF
13589 #define GETTIMEOFDAY_1ARG
13590 _ACEOF
13591
13592 fi
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13616 do
13617 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13618 echo "$as_me:$LINENO: checking for $ac_func" >&5
13619 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13620 if eval "test \"\${$as_ac_var+set}\" = set"; then
13621   echo $ECHO_N "(cached) $ECHO_C" >&6
13622 else
13623   cat >conftest.$ac_ext <<_ACEOF
13624 /* confdefs.h.  */
13625 _ACEOF
13626 cat confdefs.h >>conftest.$ac_ext
13627 cat >>conftest.$ac_ext <<_ACEOF
13628 /* end confdefs.h.  */
13629 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13630    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13631 #define $ac_func innocuous_$ac_func
13632
13633 /* System header to define __stub macros and hopefully few prototypes,
13634     which can conflict with char $ac_func (); below.
13635     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13636     <limits.h> exists even on freestanding compilers.  */
13637
13638 #ifdef __STDC__
13639 # include <limits.h>
13640 #else
13641 # include <assert.h>
13642 #endif
13643
13644 #undef $ac_func
13645
13646 /* Override any gcc2 internal prototype to avoid an error.  */
13647 #ifdef __cplusplus
13648 extern "C"
13649 {
13650 #endif
13651 /* We use char because int might match the return type of a gcc2
13652    builtin and then its argument prototype would still apply.  */
13653 char $ac_func ();
13654 /* The GNU C library defines this for functions which it implements
13655     to always fail with ENOSYS.  Some functions are actually named
13656     something starting with __ and the normal name is an alias.  */
13657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13658 choke me
13659 #else
13660 char (*f) () = $ac_func;
13661 #endif
13662 #ifdef __cplusplus
13663 }
13664 #endif
13665
13666 int
13667 main ()
13668 {
13669 return f != $ac_func;
13670   ;
13671   return 0;
13672 }
13673 _ACEOF
13674 rm -f conftest.$ac_objext conftest$ac_exeext
13675 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13676   (eval $ac_link) 2>conftest.er1
13677   ac_status=$?
13678   grep -v '^ *+' conftest.er1 >conftest.err
13679   rm -f conftest.er1
13680   cat conftest.err >&5
13681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13682   (exit $ac_status); } &&
13683          { ac_try='test -z "$ac_c_werror_flag"
13684                          || test ! -s conftest.err'
13685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13686   (eval $ac_try) 2>&5
13687   ac_status=$?
13688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13689   (exit $ac_status); }; } &&
13690          { ac_try='test -s conftest$ac_exeext'
13691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13692   (eval $ac_try) 2>&5
13693   ac_status=$?
13694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13695   (exit $ac_status); }; }; then
13696   eval "$as_ac_var=yes"
13697 else
13698   echo "$as_me: failed program was:" >&5
13699 sed 's/^/| /' conftest.$ac_ext >&5
13700
13701 eval "$as_ac_var=no"
13702 fi
13703 rm -f conftest.err conftest.$ac_objext \
13704       conftest$ac_exeext conftest.$ac_ext
13705 fi
13706 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13707 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13708 if test `eval echo '${'$as_ac_var'}'` = yes; then
13709   cat >>confdefs.h <<_ACEOF
13710 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13711 _ACEOF
13712
13713 fi
13714 done
13715
13716
13717 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13718 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13719 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13720   echo $ECHO_N "(cached) $ECHO_C" >&6
13721 else
13722   cat >conftest.$ac_ext <<_ACEOF
13723 /* confdefs.h.  */
13724 _ACEOF
13725 cat confdefs.h >>conftest.$ac_ext
13726 cat >>conftest.$ac_ext <<_ACEOF
13727 /* end confdefs.h.  */
13728 #include <unistd.h>
13729
13730 int
13731 main ()
13732 {
13733 #ifndef fdatasync
13734   char *p = (char *) fdatasync;
13735 #endif
13736
13737   ;
13738   return 0;
13739 }
13740 _ACEOF
13741 rm -f conftest.$ac_objext
13742 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13743   (eval $ac_compile) 2>conftest.er1
13744   ac_status=$?
13745   grep -v '^ *+' conftest.er1 >conftest.err
13746   rm -f conftest.er1
13747   cat conftest.err >&5
13748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749   (exit $ac_status); } &&
13750          { ac_try='test -z "$ac_c_werror_flag"
13751                          || test ! -s conftest.err'
13752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13753   (eval $ac_try) 2>&5
13754   ac_status=$?
13755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13756   (exit $ac_status); }; } &&
13757          { ac_try='test -s conftest.$ac_objext'
13758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13759   (eval $ac_try) 2>&5
13760   ac_status=$?
13761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13762   (exit $ac_status); }; }; then
13763   ac_cv_have_decl_fdatasync=yes
13764 else
13765   echo "$as_me: failed program was:" >&5
13766 sed 's/^/| /' conftest.$ac_ext >&5
13767
13768 ac_cv_have_decl_fdatasync=no
13769 fi
13770 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13771 fi
13772 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13773 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13774 if test $ac_cv_have_decl_fdatasync = yes; then
13775
13776 cat >>confdefs.h <<_ACEOF
13777 #define HAVE_DECL_FDATASYNC 1
13778 _ACEOF
13779
13780
13781 else
13782   cat >>confdefs.h <<_ACEOF
13783 #define HAVE_DECL_FDATASYNC 0
13784 _ACEOF
13785
13786
13787 fi
13788
13789
13790 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13791 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13792 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13793   echo $ECHO_N "(cached) $ECHO_C" >&6
13794 else
13795   cat >conftest.$ac_ext <<_ACEOF
13796 /* confdefs.h.  */
13797 _ACEOF
13798 cat confdefs.h >>conftest.$ac_ext
13799 cat >>conftest.$ac_ext <<_ACEOF
13800 /* end confdefs.h.  */
13801 #include <fcntl.h>
13802
13803 int
13804 main ()
13805 {
13806 #ifndef posix_fadvise
13807   char *p = (char *) posix_fadvise;
13808 #endif
13809
13810   ;
13811   return 0;
13812 }
13813 _ACEOF
13814 rm -f conftest.$ac_objext
13815 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13816   (eval $ac_compile) 2>conftest.er1
13817   ac_status=$?
13818   grep -v '^ *+' conftest.er1 >conftest.err
13819   rm -f conftest.er1
13820   cat conftest.err >&5
13821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13822   (exit $ac_status); } &&
13823          { ac_try='test -z "$ac_c_werror_flag"
13824                          || test ! -s conftest.err'
13825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13826   (eval $ac_try) 2>&5
13827   ac_status=$?
13828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13829   (exit $ac_status); }; } &&
13830          { ac_try='test -s conftest.$ac_objext'
13831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13832   (eval $ac_try) 2>&5
13833   ac_status=$?
13834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13835   (exit $ac_status); }; }; then
13836   ac_cv_have_decl_posix_fadvise=yes
13837 else
13838   echo "$as_me: failed program was:" >&5
13839 sed 's/^/| /' conftest.$ac_ext >&5
13840
13841 ac_cv_have_decl_posix_fadvise=no
13842 fi
13843 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13844 fi
13845 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
13846 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
13847 if test $ac_cv_have_decl_posix_fadvise = yes; then
13848
13849 cat >>confdefs.h <<_ACEOF
13850 #define HAVE_DECL_POSIX_FADVISE 1
13851 _ACEOF
13852
13853
13854 else
13855   cat >>confdefs.h <<_ACEOF
13856 #define HAVE_DECL_POSIX_FADVISE 0
13857 _ACEOF
13858
13859
13860 fi
13861
13862
13863
13864 HAVE_IPV6=no
13865 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13866 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13867 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13868   echo $ECHO_N "(cached) $ECHO_C" >&6
13869 else
13870   cat >conftest.$ac_ext <<_ACEOF
13871 /* confdefs.h.  */
13872 _ACEOF
13873 cat confdefs.h >>conftest.$ac_ext
13874 cat >>conftest.$ac_ext <<_ACEOF
13875 /* end confdefs.h.  */
13876 $ac_includes_default
13877 #include <netinet/in.h>
13878
13879 int
13880 main ()
13881 {
13882 if ((struct sockaddr_in6 *) 0)
13883   return 0;
13884 if (sizeof (struct sockaddr_in6))
13885   return 0;
13886   ;
13887   return 0;
13888 }
13889 _ACEOF
13890 rm -f conftest.$ac_objext
13891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13892   (eval $ac_compile) 2>conftest.er1
13893   ac_status=$?
13894   grep -v '^ *+' conftest.er1 >conftest.err
13895   rm -f conftest.er1
13896   cat conftest.err >&5
13897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13898   (exit $ac_status); } &&
13899          { ac_try='test -z "$ac_c_werror_flag"
13900                          || test ! -s conftest.err'
13901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13902   (eval $ac_try) 2>&5
13903   ac_status=$?
13904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13905   (exit $ac_status); }; } &&
13906          { ac_try='test -s conftest.$ac_objext'
13907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13908   (eval $ac_try) 2>&5
13909   ac_status=$?
13910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13911   (exit $ac_status); }; }; then
13912   ac_cv_type_struct_sockaddr_in6=yes
13913 else
13914   echo "$as_me: failed program was:" >&5
13915 sed 's/^/| /' conftest.$ac_ext >&5
13916
13917 ac_cv_type_struct_sockaddr_in6=no
13918 fi
13919 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13920 fi
13921 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13922 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13923 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13924
13925 cat >>confdefs.h <<\_ACEOF
13926 #define HAVE_IPV6 1
13927 _ACEOF
13928
13929          HAVE_IPV6=yes
13930 fi
13931
13932
13933
13934 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13935 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13936 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13937   echo $ECHO_N "(cached) $ECHO_C" >&6
13938 else
13939   cat >conftest.$ac_ext <<_ACEOF
13940 /* confdefs.h.  */
13941 _ACEOF
13942 cat confdefs.h >>conftest.$ac_ext
13943 cat >>conftest.$ac_ext <<_ACEOF
13944 /* end confdefs.h.  */
13945 #include <machine/vmparam.h>
13946 #include <sys/exec.h>
13947
13948 int
13949 main ()
13950 {
13951 PS_STRINGS->ps_nargvstr = 1;
13952 PS_STRINGS->ps_argvstr = "foo";
13953   ;
13954   return 0;
13955 }
13956 _ACEOF
13957 rm -f conftest.$ac_objext conftest$ac_exeext
13958 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13959   (eval $ac_link) 2>conftest.er1
13960   ac_status=$?
13961   grep -v '^ *+' conftest.er1 >conftest.err
13962   rm -f conftest.er1
13963   cat conftest.err >&5
13964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13965   (exit $ac_status); } &&
13966          { ac_try='test -z "$ac_c_werror_flag"
13967                          || test ! -s conftest.err'
13968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13969   (eval $ac_try) 2>&5
13970   ac_status=$?
13971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13972   (exit $ac_status); }; } &&
13973          { ac_try='test -s conftest$ac_exeext'
13974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13975   (eval $ac_try) 2>&5
13976   ac_status=$?
13977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13978   (exit $ac_status); }; }; then
13979   pgac_cv_var_PS_STRINGS=yes
13980 else
13981   echo "$as_me: failed program was:" >&5
13982 sed 's/^/| /' conftest.$ac_ext >&5
13983
13984 pgac_cv_var_PS_STRINGS=no
13985 fi
13986 rm -f conftest.err conftest.$ac_objext \
13987       conftest$ac_exeext conftest.$ac_ext
13988 fi
13989 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13990 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13991 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13992
13993 cat >>confdefs.h <<\_ACEOF
13994 #define HAVE_PS_STRINGS
13995 _ACEOF
13996
13997 fi
13998
13999
14000 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
14001 # is missing.  Yes, there are machines that have only one.  We may
14002 # also decide to use snprintf.c if snprintf() is present but does not
14003 # have all the features we need --- see below.
14004
14005 if test "$PORTNAME" = "win32"; then
14006   # Win32 gets snprintf.c built unconditionally.
14007   #
14008   # To properly translate all NLS languages strings, we must support the
14009   # *printf() %$ format, which allows *printf() arguments to be selected
14010   # by position in the translated string.
14011   #
14012   # libintl versions < 0.13 use the native *printf() functions, and Win32
14013   # *printf() doesn't understand %$, so we must use our /port versions,
14014   # which do understand %$. libintl versions >= 0.13 include their own
14015   # *printf versions on Win32.  The libintl 0.13 release note text is:
14016   #
14017   #   C format strings with positions, as they arise when a translator
14018   #   needs to reorder a sentence, are now supported on all platforms.
14019   #   On those few platforms (NetBSD and Woe32) for which the native
14020   #   printf()/fprintf()/... functions don't support such format
14021   #   strings, replacements are provided through <libintl.h>.
14022   #
14023   # We could use libintl >= 0.13's *printf() if we were sure that we had
14024   # a litint >= 0.13 at runtime, but seeing that there is no clean way
14025   # to guarantee that, it is best to just use our own, so we are sure to
14026   # get %$ support. In include/port.h we disable the *printf() macros
14027   # that might have been defined by libintl.
14028   #
14029   # We do this unconditionally whether NLS is used or not so we are sure
14030   # that all Win32 libraries and binaries behave the same.
14031   pgac_need_repl_snprintf=yes
14032 else
14033   pgac_need_repl_snprintf=no
14034
14035 for ac_func in snprintf
14036 do
14037 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14038 echo "$as_me:$LINENO: checking for $ac_func" >&5
14039 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14040 if eval "test \"\${$as_ac_var+set}\" = set"; then
14041   echo $ECHO_N "(cached) $ECHO_C" >&6
14042 else
14043   cat >conftest.$ac_ext <<_ACEOF
14044 /* confdefs.h.  */
14045 _ACEOF
14046 cat confdefs.h >>conftest.$ac_ext
14047 cat >>conftest.$ac_ext <<_ACEOF
14048 /* end confdefs.h.  */
14049 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14050    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14051 #define $ac_func innocuous_$ac_func
14052
14053 /* System header to define __stub macros and hopefully few prototypes,
14054     which can conflict with char $ac_func (); below.
14055     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14056     <limits.h> exists even on freestanding compilers.  */
14057
14058 #ifdef __STDC__
14059 # include <limits.h>
14060 #else
14061 # include <assert.h>
14062 #endif
14063
14064 #undef $ac_func
14065
14066 /* Override any gcc2 internal prototype to avoid an error.  */
14067 #ifdef __cplusplus
14068 extern "C"
14069 {
14070 #endif
14071 /* We use char because int might match the return type of a gcc2
14072    builtin and then its argument prototype would still apply.  */
14073 char $ac_func ();
14074 /* The GNU C library defines this for functions which it implements
14075     to always fail with ENOSYS.  Some functions are actually named
14076     something starting with __ and the normal name is an alias.  */
14077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14078 choke me
14079 #else
14080 char (*f) () = $ac_func;
14081 #endif
14082 #ifdef __cplusplus
14083 }
14084 #endif
14085
14086 int
14087 main ()
14088 {
14089 return f != $ac_func;
14090   ;
14091   return 0;
14092 }
14093 _ACEOF
14094 rm -f conftest.$ac_objext conftest$ac_exeext
14095 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14096   (eval $ac_link) 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_exeext'
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   eval "$as_ac_var=yes"
14117 else
14118   echo "$as_me: failed program was:" >&5
14119 sed 's/^/| /' conftest.$ac_ext >&5
14120
14121 eval "$as_ac_var=no"
14122 fi
14123 rm -f conftest.err conftest.$ac_objext \
14124       conftest$ac_exeext conftest.$ac_ext
14125 fi
14126 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14127 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14128 if test `eval echo '${'$as_ac_var'}'` = yes; then
14129   cat >>confdefs.h <<_ACEOF
14130 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14131 _ACEOF
14132
14133 else
14134   pgac_need_repl_snprintf=yes
14135 fi
14136 done
14137
14138
14139 for ac_func in vsnprintf
14140 do
14141 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14142 echo "$as_me:$LINENO: checking for $ac_func" >&5
14143 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14144 if eval "test \"\${$as_ac_var+set}\" = set"; then
14145   echo $ECHO_N "(cached) $ECHO_C" >&6
14146 else
14147   cat >conftest.$ac_ext <<_ACEOF
14148 /* confdefs.h.  */
14149 _ACEOF
14150 cat confdefs.h >>conftest.$ac_ext
14151 cat >>conftest.$ac_ext <<_ACEOF
14152 /* end confdefs.h.  */
14153 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14154    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14155 #define $ac_func innocuous_$ac_func
14156
14157 /* System header to define __stub macros and hopefully few prototypes,
14158     which can conflict with char $ac_func (); below.
14159     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14160     <limits.h> exists even on freestanding compilers.  */
14161
14162 #ifdef __STDC__
14163 # include <limits.h>
14164 #else
14165 # include <assert.h>
14166 #endif
14167
14168 #undef $ac_func
14169
14170 /* Override any gcc2 internal prototype to avoid an error.  */
14171 #ifdef __cplusplus
14172 extern "C"
14173 {
14174 #endif
14175 /* We use char because int might match the return type of a gcc2
14176    builtin and then its argument prototype would still apply.  */
14177 char $ac_func ();
14178 /* The GNU C library defines this for functions which it implements
14179     to always fail with ENOSYS.  Some functions are actually named
14180     something starting with __ and the normal name is an alias.  */
14181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14182 choke me
14183 #else
14184 char (*f) () = $ac_func;
14185 #endif
14186 #ifdef __cplusplus
14187 }
14188 #endif
14189
14190 int
14191 main ()
14192 {
14193 return f != $ac_func;
14194   ;
14195   return 0;
14196 }
14197 _ACEOF
14198 rm -f conftest.$ac_objext conftest$ac_exeext
14199 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14200   (eval $ac_link) 2>conftest.er1
14201   ac_status=$?
14202   grep -v '^ *+' conftest.er1 >conftest.err
14203   rm -f conftest.er1
14204   cat conftest.err >&5
14205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14206   (exit $ac_status); } &&
14207          { ac_try='test -z "$ac_c_werror_flag"
14208                          || test ! -s conftest.err'
14209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14210   (eval $ac_try) 2>&5
14211   ac_status=$?
14212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14213   (exit $ac_status); }; } &&
14214          { ac_try='test -s conftest$ac_exeext'
14215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14216   (eval $ac_try) 2>&5
14217   ac_status=$?
14218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14219   (exit $ac_status); }; }; then
14220   eval "$as_ac_var=yes"
14221 else
14222   echo "$as_me: failed program was:" >&5
14223 sed 's/^/| /' conftest.$ac_ext >&5
14224
14225 eval "$as_ac_var=no"
14226 fi
14227 rm -f conftest.err conftest.$ac_objext \
14228       conftest$ac_exeext conftest.$ac_ext
14229 fi
14230 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14231 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14232 if test `eval echo '${'$as_ac_var'}'` = yes; then
14233   cat >>confdefs.h <<_ACEOF
14234 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14235 _ACEOF
14236
14237 else
14238   pgac_need_repl_snprintf=yes
14239 fi
14240 done
14241
14242 fi
14243
14244
14245 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14246 # include/c.h will provide declarations.  Note this is a separate test
14247 # from whether the functions exist in the C library --- there are
14248 # systems that have the functions but don't bother to declare them :-(
14249
14250 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14251 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14252 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14253   echo $ECHO_N "(cached) $ECHO_C" >&6
14254 else
14255   cat >conftest.$ac_ext <<_ACEOF
14256 /* confdefs.h.  */
14257 _ACEOF
14258 cat confdefs.h >>conftest.$ac_ext
14259 cat >>conftest.$ac_ext <<_ACEOF
14260 /* end confdefs.h.  */
14261 $ac_includes_default
14262 int
14263 main ()
14264 {
14265 #ifndef snprintf
14266   char *p = (char *) snprintf;
14267 #endif
14268
14269   ;
14270   return 0;
14271 }
14272 _ACEOF
14273 rm -f conftest.$ac_objext
14274 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14275   (eval $ac_compile) 2>conftest.er1
14276   ac_status=$?
14277   grep -v '^ *+' conftest.er1 >conftest.err
14278   rm -f conftest.er1
14279   cat conftest.err >&5
14280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14281   (exit $ac_status); } &&
14282          { ac_try='test -z "$ac_c_werror_flag"
14283                          || test ! -s conftest.err'
14284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14285   (eval $ac_try) 2>&5
14286   ac_status=$?
14287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288   (exit $ac_status); }; } &&
14289          { ac_try='test -s conftest.$ac_objext'
14290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14291   (eval $ac_try) 2>&5
14292   ac_status=$?
14293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14294   (exit $ac_status); }; }; then
14295   ac_cv_have_decl_snprintf=yes
14296 else
14297   echo "$as_me: failed program was:" >&5
14298 sed 's/^/| /' conftest.$ac_ext >&5
14299
14300 ac_cv_have_decl_snprintf=no
14301 fi
14302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14303 fi
14304 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14305 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14306 if test $ac_cv_have_decl_snprintf = yes; then
14307
14308 cat >>confdefs.h <<_ACEOF
14309 #define HAVE_DECL_SNPRINTF 1
14310 _ACEOF
14311
14312
14313 else
14314   cat >>confdefs.h <<_ACEOF
14315 #define HAVE_DECL_SNPRINTF 0
14316 _ACEOF
14317
14318
14319 fi
14320 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14321 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14322 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14323   echo $ECHO_N "(cached) $ECHO_C" >&6
14324 else
14325   cat >conftest.$ac_ext <<_ACEOF
14326 /* confdefs.h.  */
14327 _ACEOF
14328 cat confdefs.h >>conftest.$ac_ext
14329 cat >>conftest.$ac_ext <<_ACEOF
14330 /* end confdefs.h.  */
14331 $ac_includes_default
14332 int
14333 main ()
14334 {
14335 #ifndef vsnprintf
14336   char *p = (char *) vsnprintf;
14337 #endif
14338
14339   ;
14340   return 0;
14341 }
14342 _ACEOF
14343 rm -f conftest.$ac_objext
14344 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14345   (eval $ac_compile) 2>conftest.er1
14346   ac_status=$?
14347   grep -v '^ *+' conftest.er1 >conftest.err
14348   rm -f conftest.er1
14349   cat conftest.err >&5
14350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14351   (exit $ac_status); } &&
14352          { ac_try='test -z "$ac_c_werror_flag"
14353                          || test ! -s conftest.err'
14354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14355   (eval $ac_try) 2>&5
14356   ac_status=$?
14357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14358   (exit $ac_status); }; } &&
14359          { ac_try='test -s conftest.$ac_objext'
14360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14361   (eval $ac_try) 2>&5
14362   ac_status=$?
14363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14364   (exit $ac_status); }; }; then
14365   ac_cv_have_decl_vsnprintf=yes
14366 else
14367   echo "$as_me: failed program was:" >&5
14368 sed 's/^/| /' conftest.$ac_ext >&5
14369
14370 ac_cv_have_decl_vsnprintf=no
14371 fi
14372 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14373 fi
14374 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14375 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14376 if test $ac_cv_have_decl_vsnprintf = yes; then
14377
14378 cat >>confdefs.h <<_ACEOF
14379 #define HAVE_DECL_VSNPRINTF 1
14380 _ACEOF
14381
14382
14383 else
14384   cat >>confdefs.h <<_ACEOF
14385 #define HAVE_DECL_VSNPRINTF 0
14386 _ACEOF
14387
14388
14389 fi
14390
14391
14392
14393
14394 echo "$as_me:$LINENO: checking for isinf" >&5
14395 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14396 if test "${ac_cv_func_isinf+set}" = set; then
14397   echo $ECHO_N "(cached) $ECHO_C" >&6
14398 else
14399   cat >conftest.$ac_ext <<_ACEOF
14400 /* confdefs.h.  */
14401 _ACEOF
14402 cat confdefs.h >>conftest.$ac_ext
14403 cat >>conftest.$ac_ext <<_ACEOF
14404 /* end confdefs.h.  */
14405
14406 #include <math.h>
14407 double glob_double;
14408
14409 int
14410 main ()
14411 {
14412 return isinf(glob_double) ? 0 : 1;
14413   ;
14414   return 0;
14415 }
14416 _ACEOF
14417 rm -f conftest.$ac_objext conftest$ac_exeext
14418 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14419   (eval $ac_link) 2>conftest.er1
14420   ac_status=$?
14421   grep -v '^ *+' conftest.er1 >conftest.err
14422   rm -f conftest.er1
14423   cat conftest.err >&5
14424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14425   (exit $ac_status); } &&
14426          { ac_try='test -z "$ac_c_werror_flag"
14427                          || test ! -s conftest.err'
14428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14429   (eval $ac_try) 2>&5
14430   ac_status=$?
14431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14432   (exit $ac_status); }; } &&
14433          { ac_try='test -s conftest$ac_exeext'
14434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14435   (eval $ac_try) 2>&5
14436   ac_status=$?
14437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14438   (exit $ac_status); }; }; then
14439   ac_cv_func_isinf=yes
14440 else
14441   echo "$as_me: failed program was:" >&5
14442 sed 's/^/| /' conftest.$ac_ext >&5
14443
14444 ac_cv_func_isinf=no
14445 fi
14446 rm -f conftest.err conftest.$ac_objext \
14447       conftest$ac_exeext conftest.$ac_ext
14448 fi
14449 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14450 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14451
14452 if test $ac_cv_func_isinf = yes ; then
14453
14454 cat >>confdefs.h <<\_ACEOF
14455 #define HAVE_ISINF 1
14456 _ACEOF
14457
14458 else
14459   case $LIBOBJS in
14460     "isinf.$ac_objext"   | \
14461   *" isinf.$ac_objext"   | \
14462     "isinf.$ac_objext "* | \
14463   *" isinf.$ac_objext "* ) ;;
14464   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14465 esac
14466
14467   # Look for a way to implement a substitute for isinf()
14468
14469
14470
14471
14472 for ac_func in fpclass fp_class fp_class_d class
14473 do
14474 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14475 echo "$as_me:$LINENO: checking for $ac_func" >&5
14476 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14477 if eval "test \"\${$as_ac_var+set}\" = set"; then
14478   echo $ECHO_N "(cached) $ECHO_C" >&6
14479 else
14480   cat >conftest.$ac_ext <<_ACEOF
14481 /* confdefs.h.  */
14482 _ACEOF
14483 cat confdefs.h >>conftest.$ac_ext
14484 cat >>conftest.$ac_ext <<_ACEOF
14485 /* end confdefs.h.  */
14486 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14487    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14488 #define $ac_func innocuous_$ac_func
14489
14490 /* System header to define __stub macros and hopefully few prototypes,
14491     which can conflict with char $ac_func (); below.
14492     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14493     <limits.h> exists even on freestanding compilers.  */
14494
14495 #ifdef __STDC__
14496 # include <limits.h>
14497 #else
14498 # include <assert.h>
14499 #endif
14500
14501 #undef $ac_func
14502
14503 /* Override any gcc2 internal prototype to avoid an error.  */
14504 #ifdef __cplusplus
14505 extern "C"
14506 {
14507 #endif
14508 /* We use char because int might match the return type of a gcc2
14509    builtin and then its argument prototype would still apply.  */
14510 char $ac_func ();
14511 /* The GNU C library defines this for functions which it implements
14512     to always fail with ENOSYS.  Some functions are actually named
14513     something starting with __ and the normal name is an alias.  */
14514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14515 choke me
14516 #else
14517 char (*f) () = $ac_func;
14518 #endif
14519 #ifdef __cplusplus
14520 }
14521 #endif
14522
14523 int
14524 main ()
14525 {
14526 return f != $ac_func;
14527   ;
14528   return 0;
14529 }
14530 _ACEOF
14531 rm -f conftest.$ac_objext conftest$ac_exeext
14532 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14533   (eval $ac_link) 2>conftest.er1
14534   ac_status=$?
14535   grep -v '^ *+' conftest.er1 >conftest.err
14536   rm -f conftest.er1
14537   cat conftest.err >&5
14538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14539   (exit $ac_status); } &&
14540          { ac_try='test -z "$ac_c_werror_flag"
14541                          || test ! -s conftest.err'
14542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14543   (eval $ac_try) 2>&5
14544   ac_status=$?
14545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14546   (exit $ac_status); }; } &&
14547          { ac_try='test -s conftest$ac_exeext'
14548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14549   (eval $ac_try) 2>&5
14550   ac_status=$?
14551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552   (exit $ac_status); }; }; then
14553   eval "$as_ac_var=yes"
14554 else
14555   echo "$as_me: failed program was:" >&5
14556 sed 's/^/| /' conftest.$ac_ext >&5
14557
14558 eval "$as_ac_var=no"
14559 fi
14560 rm -f conftest.err conftest.$ac_objext \
14561       conftest$ac_exeext conftest.$ac_ext
14562 fi
14563 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14564 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14565 if test `eval echo '${'$as_ac_var'}'` = yes; then
14566   cat >>confdefs.h <<_ACEOF
14567 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14568 _ACEOF
14569  break
14570 fi
14571 done
14572
14573 fi
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14589 do
14590 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14591 echo "$as_me:$LINENO: checking for $ac_func" >&5
14592 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14593 if eval "test \"\${$as_ac_var+set}\" = set"; then
14594   echo $ECHO_N "(cached) $ECHO_C" >&6
14595 else
14596   cat >conftest.$ac_ext <<_ACEOF
14597 /* confdefs.h.  */
14598 _ACEOF
14599 cat confdefs.h >>conftest.$ac_ext
14600 cat >>conftest.$ac_ext <<_ACEOF
14601 /* end confdefs.h.  */
14602 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14603    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14604 #define $ac_func innocuous_$ac_func
14605
14606 /* System header to define __stub macros and hopefully few prototypes,
14607     which can conflict with char $ac_func (); below.
14608     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14609     <limits.h> exists even on freestanding compilers.  */
14610
14611 #ifdef __STDC__
14612 # include <limits.h>
14613 #else
14614 # include <assert.h>
14615 #endif
14616
14617 #undef $ac_func
14618
14619 /* Override any gcc2 internal prototype to avoid an error.  */
14620 #ifdef __cplusplus
14621 extern "C"
14622 {
14623 #endif
14624 /* We use char because int might match the return type of a gcc2
14625    builtin and then its argument prototype would still apply.  */
14626 char $ac_func ();
14627 /* The GNU C library defines this for functions which it implements
14628     to always fail with ENOSYS.  Some functions are actually named
14629     something starting with __ and the normal name is an alias.  */
14630 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14631 choke me
14632 #else
14633 char (*f) () = $ac_func;
14634 #endif
14635 #ifdef __cplusplus
14636 }
14637 #endif
14638
14639 int
14640 main ()
14641 {
14642 return f != $ac_func;
14643   ;
14644   return 0;
14645 }
14646 _ACEOF
14647 rm -f conftest.$ac_objext conftest$ac_exeext
14648 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14649   (eval $ac_link) 2>conftest.er1
14650   ac_status=$?
14651   grep -v '^ *+' conftest.er1 >conftest.err
14652   rm -f conftest.er1
14653   cat conftest.err >&5
14654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14655   (exit $ac_status); } &&
14656          { ac_try='test -z "$ac_c_werror_flag"
14657                          || test ! -s conftest.err'
14658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14659   (eval $ac_try) 2>&5
14660   ac_status=$?
14661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14662   (exit $ac_status); }; } &&
14663          { ac_try='test -s conftest$ac_exeext'
14664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14665   (eval $ac_try) 2>&5
14666   ac_status=$?
14667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668   (exit $ac_status); }; }; then
14669   eval "$as_ac_var=yes"
14670 else
14671   echo "$as_me: failed program was:" >&5
14672 sed 's/^/| /' conftest.$ac_ext >&5
14673
14674 eval "$as_ac_var=no"
14675 fi
14676 rm -f conftest.err conftest.$ac_objext \
14677       conftest$ac_exeext conftest.$ac_ext
14678 fi
14679 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14680 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14681 if test `eval echo '${'$as_ac_var'}'` = yes; then
14682   cat >>confdefs.h <<_ACEOF
14683 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14684 _ACEOF
14685
14686 else
14687   case $LIBOBJS in
14688     "$ac_func.$ac_objext"   | \
14689   *" $ac_func.$ac_objext"   | \
14690     "$ac_func.$ac_objext "* | \
14691   *" $ac_func.$ac_objext "* ) ;;
14692   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14693 esac
14694
14695 fi
14696 done
14697
14698
14699
14700 # System's version of getaddrinfo(), if any, may be used only if we found
14701 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14702 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14703 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14704 # because we want to use our own getaddrinfo.c on Windows anyway.)
14705 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14706
14707 for ac_func in getaddrinfo
14708 do
14709 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14710 echo "$as_me:$LINENO: checking for $ac_func" >&5
14711 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14712 if eval "test \"\${$as_ac_var+set}\" = set"; then
14713   echo $ECHO_N "(cached) $ECHO_C" >&6
14714 else
14715   cat >conftest.$ac_ext <<_ACEOF
14716 /* confdefs.h.  */
14717 _ACEOF
14718 cat confdefs.h >>conftest.$ac_ext
14719 cat >>conftest.$ac_ext <<_ACEOF
14720 /* end confdefs.h.  */
14721 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14722    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14723 #define $ac_func innocuous_$ac_func
14724
14725 /* System header to define __stub macros and hopefully few prototypes,
14726     which can conflict with char $ac_func (); below.
14727     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14728     <limits.h> exists even on freestanding compilers.  */
14729
14730 #ifdef __STDC__
14731 # include <limits.h>
14732 #else
14733 # include <assert.h>
14734 #endif
14735
14736 #undef $ac_func
14737
14738 /* Override any gcc2 internal prototype to avoid an error.  */
14739 #ifdef __cplusplus
14740 extern "C"
14741 {
14742 #endif
14743 /* We use char because int might match the return type of a gcc2
14744    builtin and then its argument prototype would still apply.  */
14745 char $ac_func ();
14746 /* The GNU C library defines this for functions which it implements
14747     to always fail with ENOSYS.  Some functions are actually named
14748     something starting with __ and the normal name is an alias.  */
14749 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14750 choke me
14751 #else
14752 char (*f) () = $ac_func;
14753 #endif
14754 #ifdef __cplusplus
14755 }
14756 #endif
14757
14758 int
14759 main ()
14760 {
14761 return f != $ac_func;
14762   ;
14763   return 0;
14764 }
14765 _ACEOF
14766 rm -f conftest.$ac_objext conftest$ac_exeext
14767 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14768   (eval $ac_link) 2>conftest.er1
14769   ac_status=$?
14770   grep -v '^ *+' conftest.er1 >conftest.err
14771   rm -f conftest.er1
14772   cat conftest.err >&5
14773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14774   (exit $ac_status); } &&
14775          { ac_try='test -z "$ac_c_werror_flag"
14776                          || test ! -s conftest.err'
14777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14778   (eval $ac_try) 2>&5
14779   ac_status=$?
14780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14781   (exit $ac_status); }; } &&
14782          { ac_try='test -s conftest$ac_exeext'
14783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14784   (eval $ac_try) 2>&5
14785   ac_status=$?
14786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14787   (exit $ac_status); }; }; then
14788   eval "$as_ac_var=yes"
14789 else
14790   echo "$as_me: failed program was:" >&5
14791 sed 's/^/| /' conftest.$ac_ext >&5
14792
14793 eval "$as_ac_var=no"
14794 fi
14795 rm -f conftest.err conftest.$ac_objext \
14796       conftest$ac_exeext conftest.$ac_ext
14797 fi
14798 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14799 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14800 if test `eval echo '${'$as_ac_var'}'` = yes; then
14801   cat >>confdefs.h <<_ACEOF
14802 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14803 _ACEOF
14804
14805 else
14806   case $LIBOBJS in
14807     "$ac_func.$ac_objext"   | \
14808   *" $ac_func.$ac_objext"   | \
14809     "$ac_func.$ac_objext "* | \
14810   *" $ac_func.$ac_objext "* ) ;;
14811   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14812 esac
14813
14814 fi
14815 done
14816
14817
14818 else
14819   case $LIBOBJS in
14820     "getaddrinfo.$ac_objext"   | \
14821   *" getaddrinfo.$ac_objext"   | \
14822     "getaddrinfo.$ac_objext "* | \
14823   *" getaddrinfo.$ac_objext "* ) ;;
14824   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14825 esac
14826
14827 fi
14828
14829 # similarly, use system's getopt_long() only if system provides struct option.
14830 if test x"$ac_cv_type_struct_option" = xyes ; then
14831
14832 for ac_func in getopt_long
14833 do
14834 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14835 echo "$as_me:$LINENO: checking for $ac_func" >&5
14836 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14837 if eval "test \"\${$as_ac_var+set}\" = set"; then
14838   echo $ECHO_N "(cached) $ECHO_C" >&6
14839 else
14840   cat >conftest.$ac_ext <<_ACEOF
14841 /* confdefs.h.  */
14842 _ACEOF
14843 cat confdefs.h >>conftest.$ac_ext
14844 cat >>conftest.$ac_ext <<_ACEOF
14845 /* end confdefs.h.  */
14846 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14847    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14848 #define $ac_func innocuous_$ac_func
14849
14850 /* System header to define __stub macros and hopefully few prototypes,
14851     which can conflict with char $ac_func (); below.
14852     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14853     <limits.h> exists even on freestanding compilers.  */
14854
14855 #ifdef __STDC__
14856 # include <limits.h>
14857 #else
14858 # include <assert.h>
14859 #endif
14860
14861 #undef $ac_func
14862
14863 /* Override any gcc2 internal prototype to avoid an error.  */
14864 #ifdef __cplusplus
14865 extern "C"
14866 {
14867 #endif
14868 /* We use char because int might match the return type of a gcc2
14869    builtin and then its argument prototype would still apply.  */
14870 char $ac_func ();
14871 /* The GNU C library defines this for functions which it implements
14872     to always fail with ENOSYS.  Some functions are actually named
14873     something starting with __ and the normal name is an alias.  */
14874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14875 choke me
14876 #else
14877 char (*f) () = $ac_func;
14878 #endif
14879 #ifdef __cplusplus
14880 }
14881 #endif
14882
14883 int
14884 main ()
14885 {
14886 return f != $ac_func;
14887   ;
14888   return 0;
14889 }
14890 _ACEOF
14891 rm -f conftest.$ac_objext conftest$ac_exeext
14892 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14893   (eval $ac_link) 2>conftest.er1
14894   ac_status=$?
14895   grep -v '^ *+' conftest.er1 >conftest.err
14896   rm -f conftest.er1
14897   cat conftest.err >&5
14898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14899   (exit $ac_status); } &&
14900          { ac_try='test -z "$ac_c_werror_flag"
14901                          || test ! -s conftest.err'
14902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14903   (eval $ac_try) 2>&5
14904   ac_status=$?
14905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906   (exit $ac_status); }; } &&
14907          { ac_try='test -s conftest$ac_exeext'
14908   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14909   (eval $ac_try) 2>&5
14910   ac_status=$?
14911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912   (exit $ac_status); }; }; then
14913   eval "$as_ac_var=yes"
14914 else
14915   echo "$as_me: failed program was:" >&5
14916 sed 's/^/| /' conftest.$ac_ext >&5
14917
14918 eval "$as_ac_var=no"
14919 fi
14920 rm -f conftest.err conftest.$ac_objext \
14921       conftest$ac_exeext conftest.$ac_ext
14922 fi
14923 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14924 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14925 if test `eval echo '${'$as_ac_var'}'` = yes; then
14926   cat >>confdefs.h <<_ACEOF
14927 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14928 _ACEOF
14929
14930 else
14931   case $LIBOBJS in
14932     "$ac_func.$ac_objext"   | \
14933   *" $ac_func.$ac_objext"   | \
14934     "$ac_func.$ac_objext "* | \
14935   *" $ac_func.$ac_objext "* ) ;;
14936   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14937 esac
14938
14939 fi
14940 done
14941
14942
14943 else
14944   case $LIBOBJS in
14945     "getopt_long.$ac_objext"   | \
14946   *" getopt_long.$ac_objext"   | \
14947     "getopt_long.$ac_objext "* | \
14948   *" getopt_long.$ac_objext "* ) ;;
14949   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14950 esac
14951
14952 fi
14953
14954 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14955 # We override the previous test that said fseeko/ftello didn't exist
14956 # OS tests are also done in include/c.h and port/fseeko.c
14957 case $host_os in bsdi*|netbsd*)
14958 ac_cv_func_fseeko=yes
14959 esac
14960
14961 # Solaris has a very slow qsort in certain cases, so we replace it:
14962 #   http://forum.sun.com/thread.jspa?forumID=4&threadID=7231
14963 # Supposedly it is fixed in Solaris, but not sure which version, and
14964 # no confirmed testing.  2005-12-16
14965 if test "$PORTNAME" = "solaris"; then
14966 case $LIBOBJS in
14967     "qsort.$ac_objext"   | \
14968   *" qsort.$ac_objext"   | \
14969     "qsort.$ac_objext "* | \
14970   *" qsort.$ac_objext "* ) ;;
14971   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
14972 esac
14973
14974 fi
14975
14976 # Win32 support
14977 if test "$PORTNAME" = "win32"; then
14978 case $LIBOBJS in
14979     "gettimeofday.$ac_objext"   | \
14980   *" gettimeofday.$ac_objext"   | \
14981     "gettimeofday.$ac_objext "* | \
14982   *" gettimeofday.$ac_objext "* ) ;;
14983   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14984 esac
14985
14986 case $LIBOBJS in
14987     "kill.$ac_objext"   | \
14988   *" kill.$ac_objext"   | \
14989     "kill.$ac_objext "* | \
14990   *" kill.$ac_objext "* ) ;;
14991   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14992 esac
14993
14994 case $LIBOBJS in
14995     "open.$ac_objext"   | \
14996   *" open.$ac_objext"   | \
14997     "open.$ac_objext "* | \
14998   *" open.$ac_objext "* ) ;;
14999   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
15000 esac
15001
15002 case $LIBOBJS in
15003     "rand.$ac_objext"   | \
15004   *" rand.$ac_objext"   | \
15005     "rand.$ac_objext "* | \
15006   *" rand.$ac_objext "* ) ;;
15007   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
15008 esac
15009
15010 case $LIBOBJS in
15011     "win32error.$ac_objext"   | \
15012   *" win32error.$ac_objext"   | \
15013     "win32error.$ac_objext "* | \
15014   *" win32error.$ac_objext "* ) ;;
15015   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
15016 esac
15017
15018
15019 cat >>confdefs.h <<\_ACEOF
15020 #define HAVE_SYMLINK 1
15021 _ACEOF
15022
15023 fi
15024
15025 if test "$with_readline" = yes; then
15026   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
15027 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
15028 cat >conftest.$ac_ext <<_ACEOF
15029 /* confdefs.h.  */
15030 _ACEOF
15031 cat confdefs.h >>conftest.$ac_ext
15032 cat >>conftest.$ac_ext <<_ACEOF
15033 /* end confdefs.h.  */
15034 #include <stdio.h>
15035 #ifdef HAVE_READLINE_READLINE_H
15036 # include <readline/readline.h>
15037 #elif defined(HAVE_READLINE_H)
15038 # include <readline.h>
15039 #endif
15040
15041 int
15042 main ()
15043 {
15044 rl_completion_append_character = 'x';
15045   ;
15046   return 0;
15047 }
15048 _ACEOF
15049 rm -f conftest.$ac_objext conftest$ac_exeext
15050 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15051   (eval $ac_link) 2>conftest.er1
15052   ac_status=$?
15053   grep -v '^ *+' conftest.er1 >conftest.err
15054   rm -f conftest.er1
15055   cat conftest.err >&5
15056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15057   (exit $ac_status); } &&
15058          { ac_try='test -z "$ac_c_werror_flag"
15059                          || test ! -s conftest.err'
15060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15061   (eval $ac_try) 2>&5
15062   ac_status=$?
15063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15064   (exit $ac_status); }; } &&
15065          { ac_try='test -s conftest$ac_exeext'
15066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15067   (eval $ac_try) 2>&5
15068   ac_status=$?
15069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15070   (exit $ac_status); }; }; then
15071   echo "$as_me:$LINENO: result: yes" >&5
15072 echo "${ECHO_T}yes" >&6
15073
15074 cat >>confdefs.h <<\_ACEOF
15075 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15076 _ACEOF
15077
15078 else
15079   echo "$as_me: failed program was:" >&5
15080 sed 's/^/| /' conftest.$ac_ext >&5
15081
15082 echo "$as_me:$LINENO: result: no" >&5
15083 echo "${ECHO_T}no" >&6
15084 fi
15085 rm -f conftest.err conftest.$ac_objext \
15086       conftest$ac_exeext conftest.$ac_ext
15087
15088
15089 for ac_func in rl_completion_matches rl_filename_completion_function
15090 do
15091 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15092 echo "$as_me:$LINENO: checking for $ac_func" >&5
15093 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15094 if eval "test \"\${$as_ac_var+set}\" = set"; then
15095   echo $ECHO_N "(cached) $ECHO_C" >&6
15096 else
15097   cat >conftest.$ac_ext <<_ACEOF
15098 /* confdefs.h.  */
15099 _ACEOF
15100 cat confdefs.h >>conftest.$ac_ext
15101 cat >>conftest.$ac_ext <<_ACEOF
15102 /* end confdefs.h.  */
15103 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15104    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15105 #define $ac_func innocuous_$ac_func
15106
15107 /* System header to define __stub macros and hopefully few prototypes,
15108     which can conflict with char $ac_func (); below.
15109     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15110     <limits.h> exists even on freestanding compilers.  */
15111
15112 #ifdef __STDC__
15113 # include <limits.h>
15114 #else
15115 # include <assert.h>
15116 #endif
15117
15118 #undef $ac_func
15119
15120 /* Override any gcc2 internal prototype to avoid an error.  */
15121 #ifdef __cplusplus
15122 extern "C"
15123 {
15124 #endif
15125 /* We use char because int might match the return type of a gcc2
15126    builtin and then its argument prototype would still apply.  */
15127 char $ac_func ();
15128 /* The GNU C library defines this for functions which it implements
15129     to always fail with ENOSYS.  Some functions are actually named
15130     something starting with __ and the normal name is an alias.  */
15131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15132 choke me
15133 #else
15134 char (*f) () = $ac_func;
15135 #endif
15136 #ifdef __cplusplus
15137 }
15138 #endif
15139
15140 int
15141 main ()
15142 {
15143 return f != $ac_func;
15144   ;
15145   return 0;
15146 }
15147 _ACEOF
15148 rm -f conftest.$ac_objext conftest$ac_exeext
15149 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15150   (eval $ac_link) 2>conftest.er1
15151   ac_status=$?
15152   grep -v '^ *+' conftest.er1 >conftest.err
15153   rm -f conftest.er1
15154   cat conftest.err >&5
15155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15156   (exit $ac_status); } &&
15157          { ac_try='test -z "$ac_c_werror_flag"
15158                          || test ! -s conftest.err'
15159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15160   (eval $ac_try) 2>&5
15161   ac_status=$?
15162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15163   (exit $ac_status); }; } &&
15164          { ac_try='test -s conftest$ac_exeext'
15165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15166   (eval $ac_try) 2>&5
15167   ac_status=$?
15168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169   (exit $ac_status); }; }; then
15170   eval "$as_ac_var=yes"
15171 else
15172   echo "$as_me: failed program was:" >&5
15173 sed 's/^/| /' conftest.$ac_ext >&5
15174
15175 eval "$as_ac_var=no"
15176 fi
15177 rm -f conftest.err conftest.$ac_objext \
15178       conftest$ac_exeext conftest.$ac_ext
15179 fi
15180 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15181 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15182 if test `eval echo '${'$as_ac_var'}'` = yes; then
15183   cat >>confdefs.h <<_ACEOF
15184 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15185 _ACEOF
15186
15187 fi
15188 done
15189
15190
15191 for ac_func in replace_history_entry
15192 do
15193 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15194 echo "$as_me:$LINENO: checking for $ac_func" >&5
15195 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15196 if eval "test \"\${$as_ac_var+set}\" = set"; then
15197   echo $ECHO_N "(cached) $ECHO_C" >&6
15198 else
15199   cat >conftest.$ac_ext <<_ACEOF
15200 /* confdefs.h.  */
15201 _ACEOF
15202 cat confdefs.h >>conftest.$ac_ext
15203 cat >>conftest.$ac_ext <<_ACEOF
15204 /* end confdefs.h.  */
15205 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15206    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15207 #define $ac_func innocuous_$ac_func
15208
15209 /* System header to define __stub macros and hopefully few prototypes,
15210     which can conflict with char $ac_func (); below.
15211     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15212     <limits.h> exists even on freestanding compilers.  */
15213
15214 #ifdef __STDC__
15215 # include <limits.h>
15216 #else
15217 # include <assert.h>
15218 #endif
15219
15220 #undef $ac_func
15221
15222 /* Override any gcc2 internal prototype to avoid an error.  */
15223 #ifdef __cplusplus
15224 extern "C"
15225 {
15226 #endif
15227 /* We use char because int might match the return type of a gcc2
15228    builtin and then its argument prototype would still apply.  */
15229 char $ac_func ();
15230 /* The GNU C library defines this for functions which it implements
15231     to always fail with ENOSYS.  Some functions are actually named
15232     something starting with __ and the normal name is an alias.  */
15233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15234 choke me
15235 #else
15236 char (*f) () = $ac_func;
15237 #endif
15238 #ifdef __cplusplus
15239 }
15240 #endif
15241
15242 int
15243 main ()
15244 {
15245 return f != $ac_func;
15246   ;
15247   return 0;
15248 }
15249 _ACEOF
15250 rm -f conftest.$ac_objext conftest$ac_exeext
15251 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15252   (eval $ac_link) 2>conftest.er1
15253   ac_status=$?
15254   grep -v '^ *+' conftest.er1 >conftest.err
15255   rm -f conftest.er1
15256   cat conftest.err >&5
15257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15258   (exit $ac_status); } &&
15259          { ac_try='test -z "$ac_c_werror_flag"
15260                          || test ! -s conftest.err'
15261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15262   (eval $ac_try) 2>&5
15263   ac_status=$?
15264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15265   (exit $ac_status); }; } &&
15266          { ac_try='test -s conftest$ac_exeext'
15267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15268   (eval $ac_try) 2>&5
15269   ac_status=$?
15270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15271   (exit $ac_status); }; }; then
15272   eval "$as_ac_var=yes"
15273 else
15274   echo "$as_me: failed program was:" >&5
15275 sed 's/^/| /' conftest.$ac_ext >&5
15276
15277 eval "$as_ac_var=no"
15278 fi
15279 rm -f conftest.err conftest.$ac_objext \
15280       conftest$ac_exeext conftest.$ac_ext
15281 fi
15282 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15283 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15284 if test `eval echo '${'$as_ac_var'}'` = yes; then
15285   cat >>confdefs.h <<_ACEOF
15286 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15287 _ACEOF
15288
15289 fi
15290 done
15291
15292 fi
15293
15294
15295 echo "$as_me:$LINENO: checking for finite" >&5
15296 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15297 cat >conftest.$ac_ext <<_ACEOF
15298 /* confdefs.h.  */
15299 _ACEOF
15300 cat confdefs.h >>conftest.$ac_ext
15301 cat >>conftest.$ac_ext <<_ACEOF
15302 /* end confdefs.h.  */
15303
15304 #include <math.h>
15305 double glob_double;
15306
15307 int
15308 main ()
15309 {
15310 return finite(glob_double) ? 0 : 1;
15311   ;
15312   return 0;
15313 }
15314 _ACEOF
15315 rm -f conftest.$ac_objext conftest$ac_exeext
15316 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15317   (eval $ac_link) 2>conftest.er1
15318   ac_status=$?
15319   grep -v '^ *+' conftest.er1 >conftest.err
15320   rm -f conftest.er1
15321   cat conftest.err >&5
15322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15323   (exit $ac_status); } &&
15324          { ac_try='test -z "$ac_c_werror_flag"
15325                          || test ! -s conftest.err'
15326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15327   (eval $ac_try) 2>&5
15328   ac_status=$?
15329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15330   (exit $ac_status); }; } &&
15331          { ac_try='test -s conftest$ac_exeext'
15332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15333   (eval $ac_try) 2>&5
15334   ac_status=$?
15335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336   (exit $ac_status); }; }; then
15337
15338 cat >>confdefs.h <<\_ACEOF
15339 #define HAVE_FINITE 1
15340 _ACEOF
15341
15342 echo "$as_me:$LINENO: result: yes" >&5
15343 echo "${ECHO_T}yes" >&6
15344 else
15345   echo "$as_me: failed program was:" >&5
15346 sed 's/^/| /' conftest.$ac_ext >&5
15347
15348 echo "$as_me:$LINENO: result: no" >&5
15349 echo "${ECHO_T}no" >&6
15350 fi
15351 rm -f conftest.err conftest.$ac_objext \
15352       conftest$ac_exeext conftest.$ac_ext
15353
15354 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15355 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15356 cat >conftest.$ac_ext <<_ACEOF
15357 /* confdefs.h.  */
15358 _ACEOF
15359 cat confdefs.h >>conftest.$ac_ext
15360 cat >>conftest.$ac_ext <<_ACEOF
15361 /* end confdefs.h.  */
15362 #include <setjmp.h>
15363 int
15364 main ()
15365 {
15366 sigjmp_buf x; sigsetjmp(x, 1);
15367   ;
15368   return 0;
15369 }
15370 _ACEOF
15371 rm -f conftest.$ac_objext conftest$ac_exeext
15372 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15373   (eval $ac_link) 2>conftest.er1
15374   ac_status=$?
15375   grep -v '^ *+' conftest.er1 >conftest.err
15376   rm -f conftest.er1
15377   cat conftest.err >&5
15378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15379   (exit $ac_status); } &&
15380          { ac_try='test -z "$ac_c_werror_flag"
15381                          || test ! -s conftest.err'
15382   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15383   (eval $ac_try) 2>&5
15384   ac_status=$?
15385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15386   (exit $ac_status); }; } &&
15387          { ac_try='test -s conftest$ac_exeext'
15388   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15389   (eval $ac_try) 2>&5
15390   ac_status=$?
15391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392   (exit $ac_status); }; }; then
15393
15394 cat >>confdefs.h <<\_ACEOF
15395 #define HAVE_SIGSETJMP 1
15396 _ACEOF
15397
15398 echo "$as_me:$LINENO: result: yes" >&5
15399 echo "${ECHO_T}yes" >&6
15400 else
15401   echo "$as_me: failed program was:" >&5
15402 sed 's/^/| /' conftest.$ac_ext >&5
15403
15404 echo "$as_me:$LINENO: result: no" >&5
15405 echo "${ECHO_T}no" >&6
15406 fi
15407 rm -f conftest.err conftest.$ac_objext \
15408       conftest$ac_exeext conftest.$ac_ext
15409
15410 echo "$as_me:$LINENO: checking for syslog" >&5
15411 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15412 if test "${ac_cv_func_syslog+set}" = set; then
15413   echo $ECHO_N "(cached) $ECHO_C" >&6
15414 else
15415   cat >conftest.$ac_ext <<_ACEOF
15416 /* confdefs.h.  */
15417 _ACEOF
15418 cat confdefs.h >>conftest.$ac_ext
15419 cat >>conftest.$ac_ext <<_ACEOF
15420 /* end confdefs.h.  */
15421 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15422    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15423 #define syslog innocuous_syslog
15424
15425 /* System header to define __stub macros and hopefully few prototypes,
15426     which can conflict with char syslog (); below.
15427     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15428     <limits.h> exists even on freestanding compilers.  */
15429
15430 #ifdef __STDC__
15431 # include <limits.h>
15432 #else
15433 # include <assert.h>
15434 #endif
15435
15436 #undef syslog
15437
15438 /* Override any gcc2 internal prototype to avoid an error.  */
15439 #ifdef __cplusplus
15440 extern "C"
15441 {
15442 #endif
15443 /* We use char because int might match the return type of a gcc2
15444    builtin and then its argument prototype would still apply.  */
15445 char syslog ();
15446 /* The GNU C library defines this for functions which it implements
15447     to always fail with ENOSYS.  Some functions are actually named
15448     something starting with __ and the normal name is an alias.  */
15449 #if defined (__stub_syslog) || defined (__stub___syslog)
15450 choke me
15451 #else
15452 char (*f) () = syslog;
15453 #endif
15454 #ifdef __cplusplus
15455 }
15456 #endif
15457
15458 int
15459 main ()
15460 {
15461 return f != syslog;
15462   ;
15463   return 0;
15464 }
15465 _ACEOF
15466 rm -f conftest.$ac_objext conftest$ac_exeext
15467 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15468   (eval $ac_link) 2>conftest.er1
15469   ac_status=$?
15470   grep -v '^ *+' conftest.er1 >conftest.err
15471   rm -f conftest.er1
15472   cat conftest.err >&5
15473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15474   (exit $ac_status); } &&
15475          { ac_try='test -z "$ac_c_werror_flag"
15476                          || test ! -s conftest.err'
15477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15478   (eval $ac_try) 2>&5
15479   ac_status=$?
15480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15481   (exit $ac_status); }; } &&
15482          { ac_try='test -s conftest$ac_exeext'
15483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15484   (eval $ac_try) 2>&5
15485   ac_status=$?
15486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15487   (exit $ac_status); }; }; then
15488   ac_cv_func_syslog=yes
15489 else
15490   echo "$as_me: failed program was:" >&5
15491 sed 's/^/| /' conftest.$ac_ext >&5
15492
15493 ac_cv_func_syslog=no
15494 fi
15495 rm -f conftest.err conftest.$ac_objext \
15496       conftest$ac_exeext conftest.$ac_ext
15497 fi
15498 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15499 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15500 if test $ac_cv_func_syslog = yes; then
15501   if test "${ac_cv_header_syslog_h+set}" = set; then
15502   echo "$as_me:$LINENO: checking for syslog.h" >&5
15503 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15504 if test "${ac_cv_header_syslog_h+set}" = set; then
15505   echo $ECHO_N "(cached) $ECHO_C" >&6
15506 fi
15507 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15508 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15509 else
15510   # Is the header compilable?
15511 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15512 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15513 cat >conftest.$ac_ext <<_ACEOF
15514 /* confdefs.h.  */
15515 _ACEOF
15516 cat confdefs.h >>conftest.$ac_ext
15517 cat >>conftest.$ac_ext <<_ACEOF
15518 /* end confdefs.h.  */
15519 $ac_includes_default
15520 #include <syslog.h>
15521 _ACEOF
15522 rm -f conftest.$ac_objext
15523 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15524   (eval $ac_compile) 2>conftest.er1
15525   ac_status=$?
15526   grep -v '^ *+' conftest.er1 >conftest.err
15527   rm -f conftest.er1
15528   cat conftest.err >&5
15529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530   (exit $ac_status); } &&
15531          { ac_try='test -z "$ac_c_werror_flag"
15532                          || test ! -s conftest.err'
15533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15534   (eval $ac_try) 2>&5
15535   ac_status=$?
15536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15537   (exit $ac_status); }; } &&
15538          { ac_try='test -s conftest.$ac_objext'
15539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15540   (eval $ac_try) 2>&5
15541   ac_status=$?
15542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15543   (exit $ac_status); }; }; then
15544   ac_header_compiler=yes
15545 else
15546   echo "$as_me: failed program was:" >&5
15547 sed 's/^/| /' conftest.$ac_ext >&5
15548
15549 ac_header_compiler=no
15550 fi
15551 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15552 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15553 echo "${ECHO_T}$ac_header_compiler" >&6
15554
15555 # Is the header present?
15556 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15557 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15558 cat >conftest.$ac_ext <<_ACEOF
15559 /* confdefs.h.  */
15560 _ACEOF
15561 cat confdefs.h >>conftest.$ac_ext
15562 cat >>conftest.$ac_ext <<_ACEOF
15563 /* end confdefs.h.  */
15564 #include <syslog.h>
15565 _ACEOF
15566 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15567   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15568   ac_status=$?
15569   grep -v '^ *+' conftest.er1 >conftest.err
15570   rm -f conftest.er1
15571   cat conftest.err >&5
15572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15573   (exit $ac_status); } >/dev/null; then
15574   if test -s conftest.err; then
15575     ac_cpp_err=$ac_c_preproc_warn_flag
15576     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15577   else
15578     ac_cpp_err=
15579   fi
15580 else
15581   ac_cpp_err=yes
15582 fi
15583 if test -z "$ac_cpp_err"; then
15584   ac_header_preproc=yes
15585 else
15586   echo "$as_me: failed program was:" >&5
15587 sed 's/^/| /' conftest.$ac_ext >&5
15588
15589   ac_header_preproc=no
15590 fi
15591 rm -f conftest.err conftest.$ac_ext
15592 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15593 echo "${ECHO_T}$ac_header_preproc" >&6
15594
15595 # So?  What about this header?
15596 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15597   yes:no: )
15598     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15599 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15600     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15601 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15602     ac_header_preproc=yes
15603     ;;
15604   no:yes:* )
15605     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15606 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15607     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15608 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15609     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15610 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15611     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15612 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15613     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15614 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15615     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15616 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15617     (
15618       cat <<\_ASBOX
15619 ## ---------------------------------------- ##
15620 ## Report this to pgsql-bugs@postgresql.org ##
15621 ## ---------------------------------------- ##
15622 _ASBOX
15623     ) |
15624       sed "s/^/$as_me: WARNING:     /" >&2
15625     ;;
15626 esac
15627 echo "$as_me:$LINENO: checking for syslog.h" >&5
15628 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15629 if test "${ac_cv_header_syslog_h+set}" = set; then
15630   echo $ECHO_N "(cached) $ECHO_C" >&6
15631 else
15632   ac_cv_header_syslog_h=$ac_header_preproc
15633 fi
15634 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15635 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15636
15637 fi
15638 if test $ac_cv_header_syslog_h = yes; then
15639
15640 cat >>confdefs.h <<\_ACEOF
15641 #define HAVE_SYSLOG 1
15642 _ACEOF
15643
15644 fi
15645
15646
15647 fi
15648
15649
15650 echo "$as_me:$LINENO: checking for optreset" >&5
15651 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15652 if test "${pgac_cv_var_int_optreset+set}" = set; then
15653   echo $ECHO_N "(cached) $ECHO_C" >&6
15654 else
15655   cat >conftest.$ac_ext <<_ACEOF
15656 /* confdefs.h.  */
15657 _ACEOF
15658 cat confdefs.h >>conftest.$ac_ext
15659 cat >>conftest.$ac_ext <<_ACEOF
15660 /* end confdefs.h.  */
15661 #include <unistd.h>
15662 int
15663 main ()
15664 {
15665 extern int optreset; optreset = 1;
15666   ;
15667   return 0;
15668 }
15669 _ACEOF
15670 rm -f conftest.$ac_objext conftest$ac_exeext
15671 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15672   (eval $ac_link) 2>conftest.er1
15673   ac_status=$?
15674   grep -v '^ *+' conftest.er1 >conftest.err
15675   rm -f conftest.er1
15676   cat conftest.err >&5
15677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15678   (exit $ac_status); } &&
15679          { ac_try='test -z "$ac_c_werror_flag"
15680                          || test ! -s conftest.err'
15681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15682   (eval $ac_try) 2>&5
15683   ac_status=$?
15684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685   (exit $ac_status); }; } &&
15686          { ac_try='test -s conftest$ac_exeext'
15687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15688   (eval $ac_try) 2>&5
15689   ac_status=$?
15690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691   (exit $ac_status); }; }; then
15692   pgac_cv_var_int_optreset=yes
15693 else
15694   echo "$as_me: failed program was:" >&5
15695 sed 's/^/| /' conftest.$ac_ext >&5
15696
15697 pgac_cv_var_int_optreset=no
15698 fi
15699 rm -f conftest.err conftest.$ac_objext \
15700       conftest$ac_exeext conftest.$ac_ext
15701 fi
15702 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15703 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15704 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15705
15706 cat >>confdefs.h <<\_ACEOF
15707 #define HAVE_INT_OPTRESET 1
15708 _ACEOF
15709
15710 fi
15711
15712
15713
15714 for ac_func in strtoll strtoq
15715 do
15716 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15717 echo "$as_me:$LINENO: checking for $ac_func" >&5
15718 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15719 if eval "test \"\${$as_ac_var+set}\" = set"; then
15720   echo $ECHO_N "(cached) $ECHO_C" >&6
15721 else
15722   cat >conftest.$ac_ext <<_ACEOF
15723 /* confdefs.h.  */
15724 _ACEOF
15725 cat confdefs.h >>conftest.$ac_ext
15726 cat >>conftest.$ac_ext <<_ACEOF
15727 /* end confdefs.h.  */
15728 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15729    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15730 #define $ac_func innocuous_$ac_func
15731
15732 /* System header to define __stub macros and hopefully few prototypes,
15733     which can conflict with char $ac_func (); below.
15734     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15735     <limits.h> exists even on freestanding compilers.  */
15736
15737 #ifdef __STDC__
15738 # include <limits.h>
15739 #else
15740 # include <assert.h>
15741 #endif
15742
15743 #undef $ac_func
15744
15745 /* Override any gcc2 internal prototype to avoid an error.  */
15746 #ifdef __cplusplus
15747 extern "C"
15748 {
15749 #endif
15750 /* We use char because int might match the return type of a gcc2
15751    builtin and then its argument prototype would still apply.  */
15752 char $ac_func ();
15753 /* The GNU C library defines this for functions which it implements
15754     to always fail with ENOSYS.  Some functions are actually named
15755     something starting with __ and the normal name is an alias.  */
15756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15757 choke me
15758 #else
15759 char (*f) () = $ac_func;
15760 #endif
15761 #ifdef __cplusplus
15762 }
15763 #endif
15764
15765 int
15766 main ()
15767 {
15768 return f != $ac_func;
15769   ;
15770   return 0;
15771 }
15772 _ACEOF
15773 rm -f conftest.$ac_objext conftest$ac_exeext
15774 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15775   (eval $ac_link) 2>conftest.er1
15776   ac_status=$?
15777   grep -v '^ *+' conftest.er1 >conftest.err
15778   rm -f conftest.er1
15779   cat conftest.err >&5
15780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15781   (exit $ac_status); } &&
15782          { ac_try='test -z "$ac_c_werror_flag"
15783                          || test ! -s conftest.err'
15784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15785   (eval $ac_try) 2>&5
15786   ac_status=$?
15787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15788   (exit $ac_status); }; } &&
15789          { ac_try='test -s conftest$ac_exeext'
15790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15791   (eval $ac_try) 2>&5
15792   ac_status=$?
15793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15794   (exit $ac_status); }; }; then
15795   eval "$as_ac_var=yes"
15796 else
15797   echo "$as_me: failed program was:" >&5
15798 sed 's/^/| /' conftest.$ac_ext >&5
15799
15800 eval "$as_ac_var=no"
15801 fi
15802 rm -f conftest.err conftest.$ac_objext \
15803       conftest$ac_exeext conftest.$ac_ext
15804 fi
15805 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15806 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15807 if test `eval echo '${'$as_ac_var'}'` = yes; then
15808   cat >>confdefs.h <<_ACEOF
15809 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15810 _ACEOF
15811  break
15812 fi
15813 done
15814
15815
15816
15817 for ac_func in strtoull strtouq
15818 do
15819 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15820 echo "$as_me:$LINENO: checking for $ac_func" >&5
15821 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15822 if eval "test \"\${$as_ac_var+set}\" = set"; then
15823   echo $ECHO_N "(cached) $ECHO_C" >&6
15824 else
15825   cat >conftest.$ac_ext <<_ACEOF
15826 /* confdefs.h.  */
15827 _ACEOF
15828 cat confdefs.h >>conftest.$ac_ext
15829 cat >>conftest.$ac_ext <<_ACEOF
15830 /* end confdefs.h.  */
15831 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15832    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15833 #define $ac_func innocuous_$ac_func
15834
15835 /* System header to define __stub macros and hopefully few prototypes,
15836     which can conflict with char $ac_func (); below.
15837     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15838     <limits.h> exists even on freestanding compilers.  */
15839
15840 #ifdef __STDC__
15841 # include <limits.h>
15842 #else
15843 # include <assert.h>
15844 #endif
15845
15846 #undef $ac_func
15847
15848 /* Override any gcc2 internal prototype to avoid an error.  */
15849 #ifdef __cplusplus
15850 extern "C"
15851 {
15852 #endif
15853 /* We use char because int might match the return type of a gcc2
15854    builtin and then its argument prototype would still apply.  */
15855 char $ac_func ();
15856 /* The GNU C library defines this for functions which it implements
15857     to always fail with ENOSYS.  Some functions are actually named
15858     something starting with __ and the normal name is an alias.  */
15859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15860 choke me
15861 #else
15862 char (*f) () = $ac_func;
15863 #endif
15864 #ifdef __cplusplus
15865 }
15866 #endif
15867
15868 int
15869 main ()
15870 {
15871 return f != $ac_func;
15872   ;
15873   return 0;
15874 }
15875 _ACEOF
15876 rm -f conftest.$ac_objext conftest$ac_exeext
15877 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15878   (eval $ac_link) 2>conftest.er1
15879   ac_status=$?
15880   grep -v '^ *+' conftest.er1 >conftest.err
15881   rm -f conftest.er1
15882   cat conftest.err >&5
15883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15884   (exit $ac_status); } &&
15885          { ac_try='test -z "$ac_c_werror_flag"
15886                          || test ! -s conftest.err'
15887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15888   (eval $ac_try) 2>&5
15889   ac_status=$?
15890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15891   (exit $ac_status); }; } &&
15892          { ac_try='test -s conftest$ac_exeext'
15893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15894   (eval $ac_try) 2>&5
15895   ac_status=$?
15896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15897   (exit $ac_status); }; }; then
15898   eval "$as_ac_var=yes"
15899 else
15900   echo "$as_me: failed program was:" >&5
15901 sed 's/^/| /' conftest.$ac_ext >&5
15902
15903 eval "$as_ac_var=no"
15904 fi
15905 rm -f conftest.err conftest.$ac_objext \
15906       conftest$ac_exeext conftest.$ac_ext
15907 fi
15908 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15909 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15910 if test `eval echo '${'$as_ac_var'}'` = yes; then
15911   cat >>confdefs.h <<_ACEOF
15912 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15913 _ACEOF
15914  break
15915 fi
15916 done
15917
15918
15919 # Check for one of atexit() or on_exit()
15920
15921 for ac_func in atexit
15922 do
15923 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15924 echo "$as_me:$LINENO: checking for $ac_func" >&5
15925 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15926 if eval "test \"\${$as_ac_var+set}\" = set"; then
15927   echo $ECHO_N "(cached) $ECHO_C" >&6
15928 else
15929   cat >conftest.$ac_ext <<_ACEOF
15930 /* confdefs.h.  */
15931 _ACEOF
15932 cat confdefs.h >>conftest.$ac_ext
15933 cat >>conftest.$ac_ext <<_ACEOF
15934 /* end confdefs.h.  */
15935 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15936    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15937 #define $ac_func innocuous_$ac_func
15938
15939 /* System header to define __stub macros and hopefully few prototypes,
15940     which can conflict with char $ac_func (); below.
15941     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15942     <limits.h> exists even on freestanding compilers.  */
15943
15944 #ifdef __STDC__
15945 # include <limits.h>
15946 #else
15947 # include <assert.h>
15948 #endif
15949
15950 #undef $ac_func
15951
15952 /* Override any gcc2 internal prototype to avoid an error.  */
15953 #ifdef __cplusplus
15954 extern "C"
15955 {
15956 #endif
15957 /* We use char because int might match the return type of a gcc2
15958    builtin and then its argument prototype would still apply.  */
15959 char $ac_func ();
15960 /* The GNU C library defines this for functions which it implements
15961     to always fail with ENOSYS.  Some functions are actually named
15962     something starting with __ and the normal name is an alias.  */
15963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15964 choke me
15965 #else
15966 char (*f) () = $ac_func;
15967 #endif
15968 #ifdef __cplusplus
15969 }
15970 #endif
15971
15972 int
15973 main ()
15974 {
15975 return f != $ac_func;
15976   ;
15977   return 0;
15978 }
15979 _ACEOF
15980 rm -f conftest.$ac_objext conftest$ac_exeext
15981 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15982   (eval $ac_link) 2>conftest.er1
15983   ac_status=$?
15984   grep -v '^ *+' conftest.er1 >conftest.err
15985   rm -f conftest.er1
15986   cat conftest.err >&5
15987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15988   (exit $ac_status); } &&
15989          { ac_try='test -z "$ac_c_werror_flag"
15990                          || test ! -s conftest.err'
15991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15992   (eval $ac_try) 2>&5
15993   ac_status=$?
15994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15995   (exit $ac_status); }; } &&
15996          { ac_try='test -s conftest$ac_exeext'
15997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15998   (eval $ac_try) 2>&5
15999   ac_status=$?
16000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16001   (exit $ac_status); }; }; then
16002   eval "$as_ac_var=yes"
16003 else
16004   echo "$as_me: failed program was:" >&5
16005 sed 's/^/| /' conftest.$ac_ext >&5
16006
16007 eval "$as_ac_var=no"
16008 fi
16009 rm -f conftest.err conftest.$ac_objext \
16010       conftest$ac_exeext conftest.$ac_ext
16011 fi
16012 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16013 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16014 if test `eval echo '${'$as_ac_var'}'` = yes; then
16015   cat >>confdefs.h <<_ACEOF
16016 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16017 _ACEOF
16018
16019 else
16020
16021 for ac_func in on_exit
16022 do
16023 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16024 echo "$as_me:$LINENO: checking for $ac_func" >&5
16025 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16026 if eval "test \"\${$as_ac_var+set}\" = set"; then
16027   echo $ECHO_N "(cached) $ECHO_C" >&6
16028 else
16029   cat >conftest.$ac_ext <<_ACEOF
16030 /* confdefs.h.  */
16031 _ACEOF
16032 cat confdefs.h >>conftest.$ac_ext
16033 cat >>conftest.$ac_ext <<_ACEOF
16034 /* end confdefs.h.  */
16035 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16036    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16037 #define $ac_func innocuous_$ac_func
16038
16039 /* System header to define __stub macros and hopefully few prototypes,
16040     which can conflict with char $ac_func (); below.
16041     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16042     <limits.h> exists even on freestanding compilers.  */
16043
16044 #ifdef __STDC__
16045 # include <limits.h>
16046 #else
16047 # include <assert.h>
16048 #endif
16049
16050 #undef $ac_func
16051
16052 /* Override any gcc2 internal prototype to avoid an error.  */
16053 #ifdef __cplusplus
16054 extern "C"
16055 {
16056 #endif
16057 /* We use char because int might match the return type of a gcc2
16058    builtin and then its argument prototype would still apply.  */
16059 char $ac_func ();
16060 /* The GNU C library defines this for functions which it implements
16061     to always fail with ENOSYS.  Some functions are actually named
16062     something starting with __ and the normal name is an alias.  */
16063 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16064 choke me
16065 #else
16066 char (*f) () = $ac_func;
16067 #endif
16068 #ifdef __cplusplus
16069 }
16070 #endif
16071
16072 int
16073 main ()
16074 {
16075 return f != $ac_func;
16076   ;
16077   return 0;
16078 }
16079 _ACEOF
16080 rm -f conftest.$ac_objext conftest$ac_exeext
16081 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16082   (eval $ac_link) 2>conftest.er1
16083   ac_status=$?
16084   grep -v '^ *+' conftest.er1 >conftest.err
16085   rm -f conftest.er1
16086   cat conftest.err >&5
16087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16088   (exit $ac_status); } &&
16089          { ac_try='test -z "$ac_c_werror_flag"
16090                          || test ! -s conftest.err'
16091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16092   (eval $ac_try) 2>&5
16093   ac_status=$?
16094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16095   (exit $ac_status); }; } &&
16096          { ac_try='test -s conftest$ac_exeext'
16097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16098   (eval $ac_try) 2>&5
16099   ac_status=$?
16100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16101   (exit $ac_status); }; }; then
16102   eval "$as_ac_var=yes"
16103 else
16104   echo "$as_me: failed program was:" >&5
16105 sed 's/^/| /' conftest.$ac_ext >&5
16106
16107 eval "$as_ac_var=no"
16108 fi
16109 rm -f conftest.err conftest.$ac_objext \
16110       conftest$ac_exeext conftest.$ac_ext
16111 fi
16112 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16113 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16114 if test `eval echo '${'$as_ac_var'}'` = yes; then
16115   cat >>confdefs.h <<_ACEOF
16116 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16117 _ACEOF
16118
16119 else
16120   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16121 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16122    { (exit 1); exit 1; }; }
16123 fi
16124 done
16125
16126 fi
16127 done
16128
16129
16130 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16131 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16132 if test "${ac_cv_sys_largefile_source+set}" = set; then
16133   echo $ECHO_N "(cached) $ECHO_C" >&6
16134 else
16135   while :; do
16136   ac_cv_sys_largefile_source=no
16137   cat >conftest.$ac_ext <<_ACEOF
16138 /* confdefs.h.  */
16139 _ACEOF
16140 cat confdefs.h >>conftest.$ac_ext
16141 cat >>conftest.$ac_ext <<_ACEOF
16142 /* end confdefs.h.  */
16143 #include <stdio.h>
16144 int
16145 main ()
16146 {
16147 return !fseeko;
16148   ;
16149   return 0;
16150 }
16151 _ACEOF
16152 rm -f conftest.$ac_objext
16153 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16154   (eval $ac_compile) 2>conftest.er1
16155   ac_status=$?
16156   grep -v '^ *+' conftest.er1 >conftest.err
16157   rm -f conftest.er1
16158   cat conftest.err >&5
16159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16160   (exit $ac_status); } &&
16161          { ac_try='test -z "$ac_c_werror_flag"
16162                          || test ! -s conftest.err'
16163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16164   (eval $ac_try) 2>&5
16165   ac_status=$?
16166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16167   (exit $ac_status); }; } &&
16168          { ac_try='test -s conftest.$ac_objext'
16169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16170   (eval $ac_try) 2>&5
16171   ac_status=$?
16172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16173   (exit $ac_status); }; }; then
16174   break
16175 else
16176   echo "$as_me: failed program was:" >&5
16177 sed 's/^/| /' conftest.$ac_ext >&5
16178
16179 fi
16180 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16181   cat >conftest.$ac_ext <<_ACEOF
16182 /* confdefs.h.  */
16183 _ACEOF
16184 cat confdefs.h >>conftest.$ac_ext
16185 cat >>conftest.$ac_ext <<_ACEOF
16186 /* end confdefs.h.  */
16187 #define _LARGEFILE_SOURCE 1
16188 #include <stdio.h>
16189 int
16190 main ()
16191 {
16192 return !fseeko;
16193   ;
16194   return 0;
16195 }
16196 _ACEOF
16197 rm -f conftest.$ac_objext
16198 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16199   (eval $ac_compile) 2>conftest.er1
16200   ac_status=$?
16201   grep -v '^ *+' conftest.er1 >conftest.err
16202   rm -f conftest.er1
16203   cat conftest.err >&5
16204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16205   (exit $ac_status); } &&
16206          { ac_try='test -z "$ac_c_werror_flag"
16207                          || test ! -s conftest.err'
16208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16209   (eval $ac_try) 2>&5
16210   ac_status=$?
16211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16212   (exit $ac_status); }; } &&
16213          { ac_try='test -s conftest.$ac_objext'
16214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16215   (eval $ac_try) 2>&5
16216   ac_status=$?
16217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16218   (exit $ac_status); }; }; then
16219   ac_cv_sys_largefile_source=1; break
16220 else
16221   echo "$as_me: failed program was:" >&5
16222 sed 's/^/| /' conftest.$ac_ext >&5
16223
16224 fi
16225 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16226   break
16227 done
16228 fi
16229 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16230 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16231 if test "$ac_cv_sys_largefile_source" != no; then
16232
16233 cat >>confdefs.h <<_ACEOF
16234 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16235 _ACEOF
16236
16237 fi
16238 rm -f conftest*
16239
16240 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16241 # in glibc 2.1.3, but that breaks too many other things.
16242 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16243 echo "$as_me:$LINENO: checking for fseeko" >&5
16244 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16245 if test "${ac_cv_func_fseeko+set}" = set; then
16246   echo $ECHO_N "(cached) $ECHO_C" >&6
16247 else
16248   cat >conftest.$ac_ext <<_ACEOF
16249 /* confdefs.h.  */
16250 _ACEOF
16251 cat confdefs.h >>conftest.$ac_ext
16252 cat >>conftest.$ac_ext <<_ACEOF
16253 /* end confdefs.h.  */
16254 #include <stdio.h>
16255 int
16256 main ()
16257 {
16258 return fseeko && fseeko (stdin, 0, 0);
16259   ;
16260   return 0;
16261 }
16262 _ACEOF
16263 rm -f conftest.$ac_objext conftest$ac_exeext
16264 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16265   (eval $ac_link) 2>conftest.er1
16266   ac_status=$?
16267   grep -v '^ *+' conftest.er1 >conftest.err
16268   rm -f conftest.er1
16269   cat conftest.err >&5
16270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16271   (exit $ac_status); } &&
16272          { ac_try='test -z "$ac_c_werror_flag"
16273                          || test ! -s conftest.err'
16274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16275   (eval $ac_try) 2>&5
16276   ac_status=$?
16277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16278   (exit $ac_status); }; } &&
16279          { ac_try='test -s conftest$ac_exeext'
16280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16281   (eval $ac_try) 2>&5
16282   ac_status=$?
16283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16284   (exit $ac_status); }; }; then
16285   ac_cv_func_fseeko=yes
16286 else
16287   echo "$as_me: failed program was:" >&5
16288 sed 's/^/| /' conftest.$ac_ext >&5
16289
16290 ac_cv_func_fseeko=no
16291 fi
16292 rm -f conftest.err conftest.$ac_objext \
16293       conftest$ac_exeext conftest.$ac_ext
16294 fi
16295 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16296 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16297 if test $ac_cv_func_fseeko = yes; then
16298
16299 cat >>confdefs.h <<\_ACEOF
16300 #define HAVE_FSEEKO 1
16301 _ACEOF
16302
16303 fi
16304
16305
16306 #
16307 # Pthreads
16308 #
16309 # For each platform, we need to know about any special compile and link
16310 # libraries, and whether the normal C function names are thread-safe.
16311 # See the comment at the top of src/port/thread.c for more information.
16312 #
16313 if test "$enable_thread_safety" = yes; then
16314
16315
16316
16317
16318 ac_ext=c
16319 ac_cpp='$CPP $CPPFLAGS'
16320 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16321 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16322 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16323
16324 acx_pthread_ok=no
16325
16326 # We used to check for pthread.h first, but this fails if pthread.h
16327 # requires special compiler flags (e.g. on True64 or Sequent).
16328 # It gets checked for in the link test anyway.
16329
16330 # First of all, check if the user has set any of the PTHREAD_LIBS,
16331 # etcetera environment variables, and if threads linking works using
16332 # them:
16333 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16334         save_CFLAGS="$CFLAGS"
16335         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16336         save_LIBS="$LIBS"
16337         LIBS="$PTHREAD_LIBS $LIBS"
16338         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16339 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16340         cat >conftest.$ac_ext <<_ACEOF
16341 /* confdefs.h.  */
16342 _ACEOF
16343 cat confdefs.h >>conftest.$ac_ext
16344 cat >>conftest.$ac_ext <<_ACEOF
16345 /* end confdefs.h.  */
16346
16347 /* Override any gcc2 internal prototype to avoid an error.  */
16348 #ifdef __cplusplus
16349 extern "C"
16350 #endif
16351 /* We use char because int might match the return type of a gcc2
16352    builtin and then its argument prototype would still apply.  */
16353 char pthread_join ();
16354 int
16355 main ()
16356 {
16357 pthread_join ();
16358   ;
16359   return 0;
16360 }
16361 _ACEOF
16362 rm -f conftest.$ac_objext conftest$ac_exeext
16363 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16364   (eval $ac_link) 2>conftest.er1
16365   ac_status=$?
16366   grep -v '^ *+' conftest.er1 >conftest.err
16367   rm -f conftest.er1
16368   cat conftest.err >&5
16369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16370   (exit $ac_status); } &&
16371          { ac_try='test -z "$ac_c_werror_flag"
16372                          || test ! -s conftest.err'
16373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16374   (eval $ac_try) 2>&5
16375   ac_status=$?
16376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16377   (exit $ac_status); }; } &&
16378          { ac_try='test -s conftest$ac_exeext'
16379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16380   (eval $ac_try) 2>&5
16381   ac_status=$?
16382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16383   (exit $ac_status); }; }; then
16384   acx_pthread_ok=yes
16385 else
16386   echo "$as_me: failed program was:" >&5
16387 sed 's/^/| /' conftest.$ac_ext >&5
16388
16389 fi
16390 rm -f conftest.err conftest.$ac_objext \
16391       conftest$ac_exeext conftest.$ac_ext
16392         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16393 echo "${ECHO_T}$acx_pthread_ok" >&6
16394         if test x"$acx_pthread_ok" = xno; then
16395                 PTHREAD_LIBS=""
16396                 PTHREAD_CFLAGS=""
16397         fi
16398         LIBS="$save_LIBS"
16399         CFLAGS="$save_CFLAGS"
16400 fi
16401
16402 # We must check for the threads library under a number of different
16403 # names; the ordering is very important because some systems
16404 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16405 # libraries is broken (non-POSIX).
16406
16407 # Create a list of thread flags to try.  Items starting with a "-" are
16408 # C compiler flags, and other items are library names, except for "none"
16409 # which indicates that we try without any flags at all, and "pthread-config"
16410 # which is a program returning the flags for the Pth emulation library.
16411
16412 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16413
16414 # The ordering *is* (sometimes) important.  Some notes on the
16415 # individual items follow:
16416
16417 # pthreads: AIX (must check this before -lpthread)
16418 # none: in case threads are in libc; should be tried before -Kthread and
16419 #       other compiler flags to prevent continual compiler warnings
16420 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16421 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16422 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16423 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16424 # -pthreads: Solaris/gcc
16425 # -mthreads: Mingw32/gcc, Lynx/gcc
16426 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16427 #      doesn't hurt to check since this sometimes defines pthreads too;
16428 #      also defines -D_REENTRANT)
16429 # pthread: Linux, etcetera
16430 # --thread-safe: KAI C++
16431 # pthread-config: use pthread-config program (for GNU Pth library)
16432
16433 case "${host_cpu}-${host_os}" in
16434         *solaris*)
16435
16436         # On Solaris (at least, for some versions), libc contains stubbed
16437         # (non-functional) versions of the pthreads routines, so link-based
16438         # tests will erroneously succeed.  (We need to link with -pthread or
16439         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16440         # a function called by this macro, so we could check for that, but
16441         # who knows whether they'll stub that too in a future libc.)  So,
16442         # we'll just look for -pthreads and -lpthread first:
16443
16444         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16445         ;;
16446 esac
16447
16448 if test x"$acx_pthread_ok" = xno; then
16449 for flag in $acx_pthread_flags; do
16450
16451         tryPTHREAD_CFLAGS=""
16452         tryPTHREAD_LIBS=""
16453         case $flag in
16454                 none)
16455                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16456 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16457                 ;;
16458
16459                 -*)
16460                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16461 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16462                 tryPTHREAD_CFLAGS="$flag"
16463                 ;;
16464
16465                 pthread-config)
16466                 # skip this if we already have flags defined, for PostgreSQL
16467                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16468                 # Extract the first word of "pthread-config", so it can be a program name with args.
16469 set dummy pthread-config; ac_word=$2
16470 echo "$as_me:$LINENO: checking for $ac_word" >&5
16471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16472 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16473   echo $ECHO_N "(cached) $ECHO_C" >&6
16474 else
16475   if test -n "$acx_pthread_config"; then
16476   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16477 else
16478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16479 for as_dir in $PATH
16480 do
16481   IFS=$as_save_IFS
16482   test -z "$as_dir" && as_dir=.
16483   for ac_exec_ext in '' $ac_executable_extensions; do
16484   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16485     ac_cv_prog_acx_pthread_config="yes"
16486     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16487     break 2
16488   fi
16489 done
16490 done
16491
16492   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16493 fi
16494 fi
16495 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16496 if test -n "$acx_pthread_config"; then
16497   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16498 echo "${ECHO_T}$acx_pthread_config" >&6
16499 else
16500   echo "$as_me:$LINENO: result: no" >&5
16501 echo "${ECHO_T}no" >&6
16502 fi
16503
16504                 if test x"$acx_pthread_config" = xno; then continue; fi
16505                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16506                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16507                 ;;
16508
16509                 *)
16510                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16511 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16512                 tryPTHREAD_LIBS="-l$flag"
16513                 ;;
16514         esac
16515
16516         save_LIBS="$LIBS"
16517         save_CFLAGS="$CFLAGS"
16518         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16519         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16520
16521         # Check for various functions.  We must include pthread.h,
16522         # since some functions may be macros.  (On the Sequent, we
16523         # need a special flag -Kthread to make this header compile.)
16524         # We check for pthread_join because it is in -lpthread on IRIX
16525         # while pthread_create is in libc.  We check for pthread_attr_init
16526         # due to DEC craziness with -lpthreads.  We check for
16527         # pthread_cleanup_push because it is one of the few pthread
16528         # functions on Solaris that doesn't have a non-functional libc stub.
16529         # We try pthread_create on general principles.
16530         cat >conftest.$ac_ext <<_ACEOF
16531 /* confdefs.h.  */
16532 _ACEOF
16533 cat confdefs.h >>conftest.$ac_ext
16534 cat >>conftest.$ac_ext <<_ACEOF
16535 /* end confdefs.h.  */
16536 #include <pthread.h>
16537 int
16538 main ()
16539 {
16540 pthread_t th; pthread_join(th, 0);
16541                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16542                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16543   ;
16544   return 0;
16545 }
16546 _ACEOF
16547 rm -f conftest.$ac_objext conftest$ac_exeext
16548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16549   (eval $ac_link) 2>conftest.er1
16550   ac_status=$?
16551   grep -v '^ *+' conftest.er1 >conftest.err
16552   rm -f conftest.er1
16553   cat conftest.err >&5
16554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16555   (exit $ac_status); } &&
16556          { ac_try='test -z "$ac_c_werror_flag"
16557                          || test ! -s conftest.err'
16558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16559   (eval $ac_try) 2>&5
16560   ac_status=$?
16561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16562   (exit $ac_status); }; } &&
16563          { ac_try='test -s conftest$ac_exeext'
16564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16565   (eval $ac_try) 2>&5
16566   ac_status=$?
16567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16568   (exit $ac_status); }; }; then
16569   acx_pthread_ok=yes
16570 else
16571   echo "$as_me: failed program was:" >&5
16572 sed 's/^/| /' conftest.$ac_ext >&5
16573
16574 acx_pthread_ok=no
16575 fi
16576 rm -f conftest.err conftest.$ac_objext \
16577       conftest$ac_exeext conftest.$ac_ext
16578
16579         if test "x$acx_pthread_ok" = xyes; then
16580             # Don't use options that are ignored by the compiler.
16581             # We find them by checking stderror.
16582             cat >conftest.$ac_ext <<_ACEOF
16583 int
16584 main (int argc, char **argv)
16585 {
16586   (void) argc;
16587   (void) argv;
16588   return 0;
16589 }
16590 _ACEOF
16591             rm -f conftest.$ac_objext conftest$ac_exeext
16592             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16593                 # we continue with more flags because Linux needs -lpthread
16594                 # for libpq builds on PostgreSQL.  The test above only
16595                 # tests for building binaries, not shared libraries.
16596                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16597                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16598             else   acx_pthread_ok=no
16599             fi
16600         fi
16601
16602         LIBS="$save_LIBS"
16603         CFLAGS="$save_CFLAGS"
16604
16605         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16606 echo "${ECHO_T}$acx_pthread_ok" >&6
16607 done
16608 fi
16609
16610 # Various other checks:
16611 if test "x$acx_pthread_ok" = xyes; then
16612         save_LIBS="$LIBS"
16613         LIBS="$PTHREAD_LIBS $LIBS"
16614         save_CFLAGS="$CFLAGS"
16615         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16616
16617         # Detect AIX lossage: threads are created detached by default
16618         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16619         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16620 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16621         cat >conftest.$ac_ext <<_ACEOF
16622 /* confdefs.h.  */
16623 _ACEOF
16624 cat confdefs.h >>conftest.$ac_ext
16625 cat >>conftest.$ac_ext <<_ACEOF
16626 /* end confdefs.h.  */
16627 #include <pthread.h>
16628 int
16629 main ()
16630 {
16631 int attr=PTHREAD_CREATE_JOINABLE;
16632   ;
16633   return 0;
16634 }
16635 _ACEOF
16636 rm -f conftest.$ac_objext conftest$ac_exeext
16637 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16638   (eval $ac_link) 2>conftest.er1
16639   ac_status=$?
16640   grep -v '^ *+' conftest.er1 >conftest.err
16641   rm -f conftest.er1
16642   cat conftest.err >&5
16643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16644   (exit $ac_status); } &&
16645          { ac_try='test -z "$ac_c_werror_flag"
16646                          || test ! -s conftest.err'
16647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16648   (eval $ac_try) 2>&5
16649   ac_status=$?
16650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16651   (exit $ac_status); }; } &&
16652          { ac_try='test -s conftest$ac_exeext'
16653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16654   (eval $ac_try) 2>&5
16655   ac_status=$?
16656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16657   (exit $ac_status); }; }; then
16658   ok=PTHREAD_CREATE_JOINABLE
16659 else
16660   echo "$as_me: failed program was:" >&5
16661 sed 's/^/| /' conftest.$ac_ext >&5
16662
16663 ok=unknown
16664 fi
16665 rm -f conftest.err conftest.$ac_objext \
16666       conftest$ac_exeext conftest.$ac_ext
16667         if test x"$ok" = xunknown; then
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 int attr=PTHREAD_CREATE_UNDETACHED;
16679   ;
16680   return 0;
16681 }
16682 _ACEOF
16683 rm -f conftest.$ac_objext conftest$ac_exeext
16684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16685   (eval $ac_link) 2>conftest.er1
16686   ac_status=$?
16687   grep -v '^ *+' conftest.er1 >conftest.err
16688   rm -f conftest.er1
16689   cat conftest.err >&5
16690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16691   (exit $ac_status); } &&
16692          { ac_try='test -z "$ac_c_werror_flag"
16693                          || test ! -s conftest.err'
16694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16695   (eval $ac_try) 2>&5
16696   ac_status=$?
16697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16698   (exit $ac_status); }; } &&
16699          { ac_try='test -s conftest$ac_exeext'
16700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16701   (eval $ac_try) 2>&5
16702   ac_status=$?
16703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16704   (exit $ac_status); }; }; then
16705   ok=PTHREAD_CREATE_UNDETACHED
16706 else
16707   echo "$as_me: failed program was:" >&5
16708 sed 's/^/| /' conftest.$ac_ext >&5
16709
16710 ok=unknown
16711 fi
16712 rm -f conftest.err conftest.$ac_objext \
16713       conftest$ac_exeext conftest.$ac_ext
16714         fi
16715         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16716
16717 cat >>confdefs.h <<\_ACEOF
16718 #define PTHREAD_CREATE_JOINABLE $ok
16719 _ACEOF
16720
16721         fi
16722         echo "$as_me:$LINENO: result: ${ok}" >&5
16723 echo "${ECHO_T}${ok}" >&6
16724         if test x"$ok" = xunknown; then
16725                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16726 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16727         fi
16728
16729         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16730 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16731         flag=no
16732 # We always add these in PostgreSQL
16733 #       case "${host_cpu}-${host_os}" in
16734 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16735 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16736 #       esac
16737         echo "$as_me:$LINENO: result: ${flag}" >&5
16738 echo "${ECHO_T}${flag}" >&6
16739         if test "x$flag" != xno; then
16740                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16741         fi
16742
16743         LIBS="$save_LIBS"
16744         CFLAGS="$save_CFLAGS"
16745
16746 # Supporting cc_r would require a special CC in all places that
16747 # use libpq, and that is ugly, so we don't do it.  Users can still
16748 # define their compiler as cc_r to do thread builds of everything.
16749         # More AIX lossage: must compile with cc_r
16750         # Extract the first word of "cc_r", so it can be a program name with args.
16751 set dummy cc_r; ac_word=$2
16752 echo "$as_me:$LINENO: checking for $ac_word" >&5
16753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16754 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16755   echo $ECHO_N "(cached) $ECHO_C" >&6
16756 else
16757   if test -n "$PTHREAD_CC"; then
16758   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16759 else
16760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16761 for as_dir in $PATH
16762 do
16763   IFS=$as_save_IFS
16764   test -z "$as_dir" && as_dir=.
16765   for ac_exec_ext in '' $ac_executable_extensions; do
16766   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16767     ac_cv_prog_PTHREAD_CC="cc_r"
16768     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16769     break 2
16770   fi
16771 done
16772 done
16773
16774   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16775 fi
16776 fi
16777 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16778 if test -n "$PTHREAD_CC"; then
16779   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16780 echo "${ECHO_T}$PTHREAD_CC" >&6
16781 else
16782   echo "$as_me:$LINENO: result: no" >&5
16783 echo "${ECHO_T}no" >&6
16784 fi
16785
16786 else
16787         PTHREAD_CC="$CC"
16788 fi
16789
16790
16791
16792
16793
16794 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16795 if test x"$acx_pthread_ok" = xyes; then
16796
16797 cat >>confdefs.h <<\_ACEOF
16798 #define HAVE_PTHREAD 1
16799 _ACEOF
16800
16801         :
16802 else
16803         acx_pthread_ok=no
16804
16805 fi
16806 ac_ext=c
16807 ac_cpp='$CPP $CPPFLAGS'
16808 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16809 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16810 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16811
16812         # set thread flags
16813
16814 # Some platforms use these, so just defineed them.  They can't hurt if they
16815 # are not supported.
16816 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16817
16818
16819 # At this point, we don't want to muck with the compiler name for threading.
16820 # Let's see who fails, perhaps AIX.  2004-04-23
16821 if test "$PTHREAD_CC" != "$CC"; then
16822 { { echo "$as_me:$LINENO: error:
16823 PostgreSQL does not support platforms that require a special
16824 compiler binary for thread-safety.
16825 " >&5
16826 echo "$as_me: error:
16827 PostgreSQL does not support platforms that require a special
16828 compiler binary for thread-safety.
16829 " >&2;}
16830    { (exit 1); exit 1; }; }
16831 fi
16832
16833 if test "$THREAD_SUPPORT" = no; then
16834 { { echo "$as_me:$LINENO: error:
16835 Cannot enable threads on your platform.
16836 Your platform is known to not support thread-safe programs.
16837 For details, compile and run src/bin/pg_thread_test.
16838 " >&5
16839 echo "$as_me: error:
16840 Cannot enable threads on your platform.
16841 Your platform is known to not support thread-safe programs.
16842 For details, compile and run src/bin/pg_thread_test.
16843 " >&2;}
16844    { (exit 1); exit 1; }; }
16845 fi
16846
16847 # Check for *_r functions
16848 _CFLAGS="$CFLAGS"
16849 _LIBS="$LIBS"
16850 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16851 LIBS="$LIBS $PTHREAD_LIBS"
16852
16853 if test "${ac_cv_header_pthread_h+set}" = set; then
16854   echo "$as_me:$LINENO: checking for pthread.h" >&5
16855 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16856 if test "${ac_cv_header_pthread_h+set}" = set; then
16857   echo $ECHO_N "(cached) $ECHO_C" >&6
16858 fi
16859 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16860 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16861 else
16862   # Is the header compilable?
16863 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16864 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16865 cat >conftest.$ac_ext <<_ACEOF
16866 /* confdefs.h.  */
16867 _ACEOF
16868 cat confdefs.h >>conftest.$ac_ext
16869 cat >>conftest.$ac_ext <<_ACEOF
16870 /* end confdefs.h.  */
16871 $ac_includes_default
16872 #include <pthread.h>
16873 _ACEOF
16874 rm -f conftest.$ac_objext
16875 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16876   (eval $ac_compile) 2>conftest.er1
16877   ac_status=$?
16878   grep -v '^ *+' conftest.er1 >conftest.err
16879   rm -f conftest.er1
16880   cat conftest.err >&5
16881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16882   (exit $ac_status); } &&
16883          { ac_try='test -z "$ac_c_werror_flag"
16884                          || test ! -s conftest.err'
16885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16886   (eval $ac_try) 2>&5
16887   ac_status=$?
16888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16889   (exit $ac_status); }; } &&
16890          { ac_try='test -s conftest.$ac_objext'
16891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16892   (eval $ac_try) 2>&5
16893   ac_status=$?
16894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16895   (exit $ac_status); }; }; then
16896   ac_header_compiler=yes
16897 else
16898   echo "$as_me: failed program was:" >&5
16899 sed 's/^/| /' conftest.$ac_ext >&5
16900
16901 ac_header_compiler=no
16902 fi
16903 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16904 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16905 echo "${ECHO_T}$ac_header_compiler" >&6
16906
16907 # Is the header present?
16908 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16909 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16910 cat >conftest.$ac_ext <<_ACEOF
16911 /* confdefs.h.  */
16912 _ACEOF
16913 cat confdefs.h >>conftest.$ac_ext
16914 cat >>conftest.$ac_ext <<_ACEOF
16915 /* end confdefs.h.  */
16916 #include <pthread.h>
16917 _ACEOF
16918 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16919   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16920   ac_status=$?
16921   grep -v '^ *+' conftest.er1 >conftest.err
16922   rm -f conftest.er1
16923   cat conftest.err >&5
16924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16925   (exit $ac_status); } >/dev/null; then
16926   if test -s conftest.err; then
16927     ac_cpp_err=$ac_c_preproc_warn_flag
16928     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16929   else
16930     ac_cpp_err=
16931   fi
16932 else
16933   ac_cpp_err=yes
16934 fi
16935 if test -z "$ac_cpp_err"; then
16936   ac_header_preproc=yes
16937 else
16938   echo "$as_me: failed program was:" >&5
16939 sed 's/^/| /' conftest.$ac_ext >&5
16940
16941   ac_header_preproc=no
16942 fi
16943 rm -f conftest.err conftest.$ac_ext
16944 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16945 echo "${ECHO_T}$ac_header_preproc" >&6
16946
16947 # So?  What about this header?
16948 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16949   yes:no: )
16950     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16951 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16952     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16953 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16954     ac_header_preproc=yes
16955     ;;
16956   no:yes:* )
16957     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16958 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16959     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16960 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16961     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16962 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16963     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16964 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16965     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16966 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16967     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16968 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16969     (
16970       cat <<\_ASBOX
16971 ## ---------------------------------------- ##
16972 ## Report this to pgsql-bugs@postgresql.org ##
16973 ## ---------------------------------------- ##
16974 _ASBOX
16975     ) |
16976       sed "s/^/$as_me: WARNING:     /" >&2
16977     ;;
16978 esac
16979 echo "$as_me:$LINENO: checking for pthread.h" >&5
16980 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16981 if test "${ac_cv_header_pthread_h+set}" = set; then
16982   echo $ECHO_N "(cached) $ECHO_C" >&6
16983 else
16984   ac_cv_header_pthread_h=$ac_header_preproc
16985 fi
16986 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16987 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16988
16989 fi
16990 if test $ac_cv_header_pthread_h = yes; then
16991   :
16992 else
16993   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16994 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16995    { (exit 1); exit 1; }; }
16996 fi
16997
16998
16999
17000
17001
17002
17003 for ac_func in strerror_r getpwuid_r gethostbyname_r
17004 do
17005 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17006 echo "$as_me:$LINENO: checking for $ac_func" >&5
17007 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17008 if eval "test \"\${$as_ac_var+set}\" = set"; then
17009   echo $ECHO_N "(cached) $ECHO_C" >&6
17010 else
17011   cat >conftest.$ac_ext <<_ACEOF
17012 /* confdefs.h.  */
17013 _ACEOF
17014 cat confdefs.h >>conftest.$ac_ext
17015 cat >>conftest.$ac_ext <<_ACEOF
17016 /* end confdefs.h.  */
17017 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17018    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17019 #define $ac_func innocuous_$ac_func
17020
17021 /* System header to define __stub macros and hopefully few prototypes,
17022     which can conflict with char $ac_func (); below.
17023     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17024     <limits.h> exists even on freestanding compilers.  */
17025
17026 #ifdef __STDC__
17027 # include <limits.h>
17028 #else
17029 # include <assert.h>
17030 #endif
17031
17032 #undef $ac_func
17033
17034 /* Override any gcc2 internal prototype to avoid an error.  */
17035 #ifdef __cplusplus
17036 extern "C"
17037 {
17038 #endif
17039 /* We use char because int might match the return type of a gcc2
17040    builtin and then its argument prototype would still apply.  */
17041 char $ac_func ();
17042 /* The GNU C library defines this for functions which it implements
17043     to always fail with ENOSYS.  Some functions are actually named
17044     something starting with __ and the normal name is an alias.  */
17045 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17046 choke me
17047 #else
17048 char (*f) () = $ac_func;
17049 #endif
17050 #ifdef __cplusplus
17051 }
17052 #endif
17053
17054 int
17055 main ()
17056 {
17057 return f != $ac_func;
17058   ;
17059   return 0;
17060 }
17061 _ACEOF
17062 rm -f conftest.$ac_objext conftest$ac_exeext
17063 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17064   (eval $ac_link) 2>conftest.er1
17065   ac_status=$?
17066   grep -v '^ *+' conftest.er1 >conftest.err
17067   rm -f conftest.er1
17068   cat conftest.err >&5
17069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17070   (exit $ac_status); } &&
17071          { ac_try='test -z "$ac_c_werror_flag"
17072                          || test ! -s conftest.err'
17073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17074   (eval $ac_try) 2>&5
17075   ac_status=$?
17076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17077   (exit $ac_status); }; } &&
17078          { ac_try='test -s conftest$ac_exeext'
17079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17080   (eval $ac_try) 2>&5
17081   ac_status=$?
17082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17083   (exit $ac_status); }; }; then
17084   eval "$as_ac_var=yes"
17085 else
17086   echo "$as_me: failed program was:" >&5
17087 sed 's/^/| /' conftest.$ac_ext >&5
17088
17089 eval "$as_ac_var=no"
17090 fi
17091 rm -f conftest.err conftest.$ac_objext \
17092       conftest$ac_exeext conftest.$ac_ext
17093 fi
17094 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17095 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17096 if test `eval echo '${'$as_ac_var'}'` = yes; then
17097   cat >>confdefs.h <<_ACEOF
17098 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17099 _ACEOF
17100
17101 fi
17102 done
17103
17104
17105 # Do test here with the proper thread flags
17106 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17107 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17108 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17109   echo $ECHO_N "(cached) $ECHO_C" >&6
17110 else
17111   cat >conftest.$ac_ext <<_ACEOF
17112 /* confdefs.h.  */
17113 _ACEOF
17114 cat confdefs.h >>conftest.$ac_ext
17115 cat >>conftest.$ac_ext <<_ACEOF
17116 /* end confdefs.h.  */
17117 #include <sys/types.h>
17118 #include <pwd.h>
17119 int
17120 main ()
17121 {
17122 uid_t uid;
17123 struct passwd *space;
17124 char *buf;
17125 size_t bufsize;
17126 struct passwd **result;
17127 getpwuid_r(uid, space, buf, bufsize, result);
17128   ;
17129   return 0;
17130 }
17131 _ACEOF
17132 rm -f conftest.$ac_objext
17133 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17134   (eval $ac_compile) 2>conftest.er1
17135   ac_status=$?
17136   grep -v '^ *+' conftest.er1 >conftest.err
17137   rm -f conftest.er1
17138   cat conftest.err >&5
17139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17140   (exit $ac_status); } &&
17141          { ac_try='test -z "$ac_c_werror_flag"
17142                          || test ! -s conftest.err'
17143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17144   (eval $ac_try) 2>&5
17145   ac_status=$?
17146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17147   (exit $ac_status); }; } &&
17148          { ac_try='test -s conftest.$ac_objext'
17149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17150   (eval $ac_try) 2>&5
17151   ac_status=$?
17152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17153   (exit $ac_status); }; }; then
17154   pgac_func_getpwuid_r_5arg=yes
17155 else
17156   echo "$as_me: failed program was:" >&5
17157 sed 's/^/| /' conftest.$ac_ext >&5
17158
17159 pgac_func_getpwuid_r_5arg=no
17160 fi
17161 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17162 fi
17163 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17164 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17165 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17166
17167 cat >>confdefs.h <<\_ACEOF
17168 #define GETPWUID_R_5ARG
17169 _ACEOF
17170
17171 fi
17172
17173 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17174 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17175 if test "${pgac_func_strerror_r_int+set}" = set; then
17176   echo $ECHO_N "(cached) $ECHO_C" >&6
17177 else
17178   cat >conftest.$ac_ext <<_ACEOF
17179 /* confdefs.h.  */
17180 _ACEOF
17181 cat confdefs.h >>conftest.$ac_ext
17182 cat >>conftest.$ac_ext <<_ACEOF
17183 /* end confdefs.h.  */
17184 #include <string.h>
17185 int
17186 main ()
17187 {
17188 #ifndef _AIX
17189 int strerror_r(int, char *, size_t);
17190 #else
17191 /* Older AIX has 'int' for the third argument so we don't test the args. */
17192 int strerror_r();
17193 #endif
17194   ;
17195   return 0;
17196 }
17197 _ACEOF
17198 rm -f conftest.$ac_objext
17199 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17200   (eval $ac_compile) 2>conftest.er1
17201   ac_status=$?
17202   grep -v '^ *+' conftest.er1 >conftest.err
17203   rm -f conftest.er1
17204   cat conftest.err >&5
17205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17206   (exit $ac_status); } &&
17207          { ac_try='test -z "$ac_c_werror_flag"
17208                          || test ! -s conftest.err'
17209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17210   (eval $ac_try) 2>&5
17211   ac_status=$?
17212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17213   (exit $ac_status); }; } &&
17214          { ac_try='test -s conftest.$ac_objext'
17215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17216   (eval $ac_try) 2>&5
17217   ac_status=$?
17218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17219   (exit $ac_status); }; }; then
17220   pgac_func_strerror_r_int=yes
17221 else
17222   echo "$as_me: failed program was:" >&5
17223 sed 's/^/| /' conftest.$ac_ext >&5
17224
17225 pgac_func_strerror_r_int=no
17226 fi
17227 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17228 fi
17229 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17230 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17231 if test x"$pgac_func_strerror_r_int" = xyes ; then
17232
17233 cat >>confdefs.h <<\_ACEOF
17234 #define STRERROR_R_INT
17235 _ACEOF
17236
17237 fi
17238
17239
17240 CFLAGS="$_CFLAGS"
17241 LIBS="$_LIBS"
17242
17243 else
17244 # do not use values from template file
17245 PTHREAD_CFLAGS=
17246 PTHREAD_LIBS=
17247 fi
17248
17249
17250
17251
17252
17253 # This test makes sure that run tests work at all.  Sometimes a shared
17254 # library is found by the linker, but the runtime linker can't find it.
17255 # This check should come after all modifications of compiler or linker
17256 # variables, and before any other run tests.
17257 echo "$as_me:$LINENO: checking test program" >&5
17258 echo $ECHO_N "checking test program... $ECHO_C" >&6
17259 if test "$cross_compiling" = yes; then
17260   echo "$as_me:$LINENO: result: cross-compiling" >&5
17261 echo "${ECHO_T}cross-compiling" >&6
17262 else
17263   cat >conftest.$ac_ext <<_ACEOF
17264 /* confdefs.h.  */
17265 _ACEOF
17266 cat confdefs.h >>conftest.$ac_ext
17267 cat >>conftest.$ac_ext <<_ACEOF
17268 /* end confdefs.h.  */
17269 int main() { return 0; }
17270 _ACEOF
17271 rm -f conftest$ac_exeext
17272 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17273   (eval $ac_link) 2>&5
17274   ac_status=$?
17275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17276   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17278   (eval $ac_try) 2>&5
17279   ac_status=$?
17280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17281   (exit $ac_status); }; }; then
17282   echo "$as_me:$LINENO: result: ok" >&5
17283 echo "${ECHO_T}ok" >&6
17284 else
17285   echo "$as_me: program exited with status $ac_status" >&5
17286 echo "$as_me: failed program was:" >&5
17287 sed 's/^/| /' conftest.$ac_ext >&5
17288
17289 ( exit $ac_status )
17290 echo "$as_me:$LINENO: result: failed" >&5
17291 echo "${ECHO_T}failed" >&6
17292 { { echo "$as_me:$LINENO: error:
17293 *** Could not execute a simple test program.  This may be a problem
17294 *** related to locating shared libraries.  Check the file 'config.log'
17295 *** for the exact reason." >&5
17296 echo "$as_me: error:
17297 *** Could not execute a simple test program.  This may be a problem
17298 *** related to locating shared libraries.  Check the file 'config.log'
17299 *** for the exact reason." >&2;}
17300    { (exit 1); exit 1; }; }
17301 fi
17302 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17303 fi
17304
17305 # --------------------
17306 # Run tests below here
17307 # --------------------
17308
17309 # Force use of our snprintf if system's doesn't do arg control
17310 # See comment above at snprintf test for details.
17311 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17312   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17313 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17314 if test "${pgac_cv_printf_arg_control+set}" = set; then
17315   echo $ECHO_N "(cached) $ECHO_C" >&6
17316 else
17317   if test "$cross_compiling" = yes; then
17318   pgac_cv_printf_arg_control=cross
17319 else
17320   cat >conftest.$ac_ext <<_ACEOF
17321 /* confdefs.h.  */
17322 _ACEOF
17323 cat confdefs.h >>conftest.$ac_ext
17324 cat >>conftest.$ac_ext <<_ACEOF
17325 /* end confdefs.h.  */
17326 #include <stdio.h>
17327 #include <string.h>
17328
17329 int main()
17330 {
17331   char buf[100];
17332
17333   /* can it swap arguments? */
17334   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17335   if (strcmp(buf, "4 3") != 0)
17336     return 1;
17337   return 0;
17338 }
17339 _ACEOF
17340 rm -f conftest$ac_exeext
17341 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17342   (eval $ac_link) 2>&5
17343   ac_status=$?
17344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17345   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17347   (eval $ac_try) 2>&5
17348   ac_status=$?
17349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17350   (exit $ac_status); }; }; then
17351   pgac_cv_printf_arg_control=yes
17352 else
17353   echo "$as_me: program exited with status $ac_status" >&5
17354 echo "$as_me: failed program was:" >&5
17355 sed 's/^/| /' conftest.$ac_ext >&5
17356
17357 ( exit $ac_status )
17358 pgac_cv_printf_arg_control=no
17359 fi
17360 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17361 fi
17362
17363 fi
17364 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17365 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17366
17367   if test $pgac_cv_printf_arg_control != yes ; then
17368     pgac_need_repl_snprintf=yes
17369   fi
17370 fi
17371
17372
17373
17374 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17375 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17376 if test "${pgac_cv_type_long_int_64+set}" = set; then
17377   echo $ECHO_N "(cached) $ECHO_C" >&6
17378 else
17379   if test "$cross_compiling" = yes; then
17380   # If cross-compiling, check the size reported by the compiler and
17381 # trust that the arithmetic works.
17382 cat >conftest.$ac_ext <<_ACEOF
17383 /* confdefs.h.  */
17384 _ACEOF
17385 cat confdefs.h >>conftest.$ac_ext
17386 cat >>conftest.$ac_ext <<_ACEOF
17387 /* end confdefs.h.  */
17388
17389 int
17390 main ()
17391 {
17392 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17393 test_array [0] = 0
17394
17395   ;
17396   return 0;
17397 }
17398 _ACEOF
17399 rm -f conftest.$ac_objext
17400 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17401   (eval $ac_compile) 2>conftest.er1
17402   ac_status=$?
17403   grep -v '^ *+' conftest.er1 >conftest.err
17404   rm -f conftest.er1
17405   cat conftest.err >&5
17406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17407   (exit $ac_status); } &&
17408          { ac_try='test -z "$ac_c_werror_flag"
17409                          || test ! -s conftest.err'
17410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17411   (eval $ac_try) 2>&5
17412   ac_status=$?
17413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414   (exit $ac_status); }; } &&
17415          { ac_try='test -s conftest.$ac_objext'
17416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17417   (eval $ac_try) 2>&5
17418   ac_status=$?
17419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17420   (exit $ac_status); }; }; then
17421   pgac_cv_type_long_int_64=yes
17422 else
17423   echo "$as_me: failed program was:" >&5
17424 sed 's/^/| /' conftest.$ac_ext >&5
17425
17426 pgac_cv_type_long_int_64=no
17427 fi
17428 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17429 else
17430   cat >conftest.$ac_ext <<_ACEOF
17431 /* confdefs.h.  */
17432 _ACEOF
17433 cat confdefs.h >>conftest.$ac_ext
17434 cat >>conftest.$ac_ext <<_ACEOF
17435 /* end confdefs.h.  */
17436 typedef long int ac_int64;
17437
17438 /*
17439  * These are globals to discourage the compiler from folding all the
17440  * arithmetic tests down to compile-time constants.
17441  */
17442 ac_int64 a = 20000001;
17443 ac_int64 b = 40000005;
17444
17445 int does_int64_work()
17446 {
17447   ac_int64 c,d;
17448
17449   if (sizeof(ac_int64) != 8)
17450     return 0;                   /* definitely not the right size */
17451
17452   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17453   c = a * b;
17454   d = (c + b) / b;
17455   if (d != a+1)
17456     return 0;
17457   return 1;
17458 }
17459 main() {
17460   exit(! does_int64_work());
17461 }
17462 _ACEOF
17463 rm -f conftest$ac_exeext
17464 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17465   (eval $ac_link) 2>&5
17466   ac_status=$?
17467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17468   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17470   (eval $ac_try) 2>&5
17471   ac_status=$?
17472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17473   (exit $ac_status); }; }; then
17474   pgac_cv_type_long_int_64=yes
17475 else
17476   echo "$as_me: program exited with status $ac_status" >&5
17477 echo "$as_me: failed program was:" >&5
17478 sed 's/^/| /' conftest.$ac_ext >&5
17479
17480 ( exit $ac_status )
17481 pgac_cv_type_long_int_64=no
17482 fi
17483 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17484 fi
17485 fi
17486 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17487 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17488
17489 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17490 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17491
17492 cat >>confdefs.h <<\_ACEOF
17493 #define HAVE_LONG_INT_64
17494 _ACEOF
17495
17496 fi
17497
17498
17499 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17500   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17501 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17502 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17503   echo $ECHO_N "(cached) $ECHO_C" >&6
17504 else
17505   if test "$cross_compiling" = yes; then
17506   # If cross-compiling, check the size reported by the compiler and
17507 # trust that the arithmetic works.
17508 cat >conftest.$ac_ext <<_ACEOF
17509 /* confdefs.h.  */
17510 _ACEOF
17511 cat confdefs.h >>conftest.$ac_ext
17512 cat >>conftest.$ac_ext <<_ACEOF
17513 /* end confdefs.h.  */
17514
17515 int
17516 main ()
17517 {
17518 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17519 test_array [0] = 0
17520
17521   ;
17522   return 0;
17523 }
17524 _ACEOF
17525 rm -f conftest.$ac_objext
17526 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17527   (eval $ac_compile) 2>conftest.er1
17528   ac_status=$?
17529   grep -v '^ *+' conftest.er1 >conftest.err
17530   rm -f conftest.er1
17531   cat conftest.err >&5
17532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17533   (exit $ac_status); } &&
17534          { ac_try='test -z "$ac_c_werror_flag"
17535                          || test ! -s conftest.err'
17536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17537   (eval $ac_try) 2>&5
17538   ac_status=$?
17539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17540   (exit $ac_status); }; } &&
17541          { ac_try='test -s conftest.$ac_objext'
17542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17543   (eval $ac_try) 2>&5
17544   ac_status=$?
17545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17546   (exit $ac_status); }; }; then
17547   pgac_cv_type_long_long_int_64=yes
17548 else
17549   echo "$as_me: failed program was:" >&5
17550 sed 's/^/| /' conftest.$ac_ext >&5
17551
17552 pgac_cv_type_long_long_int_64=no
17553 fi
17554 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17555 else
17556   cat >conftest.$ac_ext <<_ACEOF
17557 /* confdefs.h.  */
17558 _ACEOF
17559 cat confdefs.h >>conftest.$ac_ext
17560 cat >>conftest.$ac_ext <<_ACEOF
17561 /* end confdefs.h.  */
17562 typedef long long int ac_int64;
17563
17564 /*
17565  * These are globals to discourage the compiler from folding all the
17566  * arithmetic tests down to compile-time constants.
17567  */
17568 ac_int64 a = 20000001;
17569 ac_int64 b = 40000005;
17570
17571 int does_int64_work()
17572 {
17573   ac_int64 c,d;
17574
17575   if (sizeof(ac_int64) != 8)
17576     return 0;                   /* definitely not the right size */
17577
17578   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17579   c = a * b;
17580   d = (c + b) / b;
17581   if (d != a+1)
17582     return 0;
17583   return 1;
17584 }
17585 main() {
17586   exit(! does_int64_work());
17587 }
17588 _ACEOF
17589 rm -f conftest$ac_exeext
17590 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17591   (eval $ac_link) 2>&5
17592   ac_status=$?
17593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17594   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17596   (eval $ac_try) 2>&5
17597   ac_status=$?
17598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17599   (exit $ac_status); }; }; then
17600   pgac_cv_type_long_long_int_64=yes
17601 else
17602   echo "$as_me: program exited with status $ac_status" >&5
17603 echo "$as_me: failed program was:" >&5
17604 sed 's/^/| /' conftest.$ac_ext >&5
17605
17606 ( exit $ac_status )
17607 pgac_cv_type_long_long_int_64=no
17608 fi
17609 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17610 fi
17611 fi
17612 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17613 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17614
17615 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17616 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17617
17618 cat >>confdefs.h <<\_ACEOF
17619 #define HAVE_LONG_LONG_INT_64
17620 _ACEOF
17621
17622 fi
17623
17624 fi
17625
17626
17627
17628 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17629   cat >conftest.$ac_ext <<_ACEOF
17630 /* confdefs.h.  */
17631 _ACEOF
17632 cat confdefs.h >>conftest.$ac_ext
17633 cat >>conftest.$ac_ext <<_ACEOF
17634 /* end confdefs.h.  */
17635
17636 #define INT64CONST(x)  x##LL
17637 long long int foo = INT64CONST(0x1234567890123456);
17638
17639 int
17640 main ()
17641 {
17642
17643   ;
17644   return 0;
17645 }
17646 _ACEOF
17647 rm -f conftest.$ac_objext
17648 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17649   (eval $ac_compile) 2>conftest.er1
17650   ac_status=$?
17651   grep -v '^ *+' conftest.er1 >conftest.err
17652   rm -f conftest.er1
17653   cat conftest.err >&5
17654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17655   (exit $ac_status); } &&
17656          { ac_try='test -z "$ac_c_werror_flag"
17657                          || test ! -s conftest.err'
17658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17659   (eval $ac_try) 2>&5
17660   ac_status=$?
17661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17662   (exit $ac_status); }; } &&
17663          { ac_try='test -s conftest.$ac_objext'
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
17670 cat >>confdefs.h <<\_ACEOF
17671 #define HAVE_LL_CONSTANTS 1
17672 _ACEOF
17673
17674 else
17675   echo "$as_me: failed program was:" >&5
17676 sed 's/^/| /' conftest.$ac_ext >&5
17677
17678 fi
17679 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17680 fi
17681
17682
17683 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17684 # we found we need to use "long long int", better check.  We cope with
17685 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17686 # work, fall back to our own snprintf emulation (which we know uses %lld).
17687
17688 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17689   if test $pgac_need_repl_snprintf = no; then
17690     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17691 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17692 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17693   echo $ECHO_N "(cached) $ECHO_C" >&6
17694 else
17695   for pgac_format in '%lld' '%qd' '%I64d'; do
17696 if test "$cross_compiling" = yes; then
17697   pgac_cv_snprintf_long_long_int_format=cross; break
17698 else
17699   cat >conftest.$ac_ext <<_ACEOF
17700 /* confdefs.h.  */
17701 _ACEOF
17702 cat confdefs.h >>conftest.$ac_ext
17703 cat >>conftest.$ac_ext <<_ACEOF
17704 /* end confdefs.h.  */
17705 #include <stdio.h>
17706 typedef long long int ac_int64;
17707 #define INT64_FORMAT "$pgac_format"
17708
17709 ac_int64 a = 20000001;
17710 ac_int64 b = 40000005;
17711
17712 int does_int64_snprintf_work()
17713 {
17714   ac_int64 c;
17715   char buf[100];
17716
17717   if (sizeof(ac_int64) != 8)
17718     return 0;                   /* doesn't look like the right size */
17719
17720   c = a * b;
17721   snprintf(buf, 100, INT64_FORMAT, c);
17722   if (strcmp(buf, "800000140000005") != 0)
17723     return 0;                   /* either multiply or snprintf is busted */
17724   return 1;
17725 }
17726 main() {
17727   exit(! does_int64_snprintf_work());
17728 }
17729 _ACEOF
17730 rm -f conftest$ac_exeext
17731 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17732   (eval $ac_link) 2>&5
17733   ac_status=$?
17734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17735   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17736   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17737   (eval $ac_try) 2>&5
17738   ac_status=$?
17739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17740   (exit $ac_status); }; }; then
17741   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17742 else
17743   echo "$as_me: program exited with status $ac_status" >&5
17744 echo "$as_me: failed program was:" >&5
17745 sed 's/^/| /' conftest.$ac_ext >&5
17746
17747 fi
17748 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17749 fi
17750 done
17751 fi
17752
17753 LONG_LONG_INT_FORMAT=''
17754
17755 case $pgac_cv_snprintf_long_long_int_format in
17756   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17757 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17758   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17759 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17760          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17761   *)     echo "$as_me:$LINENO: result: none" >&5
17762 echo "${ECHO_T}none" >&6;;
17763 esac
17764     if test "$LONG_LONG_INT_FORMAT" = ""; then
17765       # Force usage of our own snprintf, since system snprintf is broken
17766       pgac_need_repl_snprintf=yes
17767       LONG_LONG_INT_FORMAT='%lld'
17768     fi
17769   else
17770     # Here if we previously decided we needed to use our own snprintf
17771     LONG_LONG_INT_FORMAT='%lld'
17772   fi
17773   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17774   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17775   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17776 else
17777   # Here if we are not using 'long long int' at all
17778   INT64_FORMAT='"%ld"'
17779   UINT64_FORMAT='"%lu"'
17780 fi
17781
17782
17783 cat >>confdefs.h <<_ACEOF
17784 #define INT64_FORMAT $INT64_FORMAT
17785 _ACEOF
17786
17787
17788
17789 cat >>confdefs.h <<_ACEOF
17790 #define UINT64_FORMAT $UINT64_FORMAT
17791 _ACEOF
17792
17793
17794 # Now we have checked all the reasons to replace snprintf
17795 if test $pgac_need_repl_snprintf = yes; then
17796
17797 cat >>confdefs.h <<\_ACEOF
17798 #define USE_REPL_SNPRINTF 1
17799 _ACEOF
17800
17801   case $LIBOBJS in
17802     "snprintf.$ac_objext"   | \
17803   *" snprintf.$ac_objext"   | \
17804     "snprintf.$ac_objext "* | \
17805   *" snprintf.$ac_objext "* ) ;;
17806   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17807 esac
17808
17809 fi
17810
17811 # Need a #define for the size of Datum (unsigned long)
17812 echo "$as_me:$LINENO: checking for unsigned long" >&5
17813 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17814 if test "${ac_cv_type_unsigned_long+set}" = set; then
17815   echo $ECHO_N "(cached) $ECHO_C" >&6
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 $ac_includes_default
17824 int
17825 main ()
17826 {
17827 if ((unsigned long *) 0)
17828   return 0;
17829 if (sizeof (unsigned long))
17830   return 0;
17831   ;
17832   return 0;
17833 }
17834 _ACEOF
17835 rm -f conftest.$ac_objext
17836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17837   (eval $ac_compile) 2>conftest.er1
17838   ac_status=$?
17839   grep -v '^ *+' conftest.er1 >conftest.err
17840   rm -f conftest.er1
17841   cat conftest.err >&5
17842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17843   (exit $ac_status); } &&
17844          { ac_try='test -z "$ac_c_werror_flag"
17845                          || test ! -s conftest.err'
17846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17847   (eval $ac_try) 2>&5
17848   ac_status=$?
17849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17850   (exit $ac_status); }; } &&
17851          { ac_try='test -s conftest.$ac_objext'
17852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17853   (eval $ac_try) 2>&5
17854   ac_status=$?
17855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17856   (exit $ac_status); }; }; then
17857   ac_cv_type_unsigned_long=yes
17858 else
17859   echo "$as_me: failed program was:" >&5
17860 sed 's/^/| /' conftest.$ac_ext >&5
17861
17862 ac_cv_type_unsigned_long=no
17863 fi
17864 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17865 fi
17866 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
17867 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
17868
17869 echo "$as_me:$LINENO: checking size of unsigned long" >&5
17870 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
17871 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
17872   echo $ECHO_N "(cached) $ECHO_C" >&6
17873 else
17874   if test "$ac_cv_type_unsigned_long" = yes; then
17875   # The cast to unsigned long works around a bug in the HP C Compiler
17876   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17877   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17878   # This bug is HP SR number 8606223364.
17879   if test "$cross_compiling" = yes; then
17880   # Depending upon the size, compute the lo and hi bounds.
17881 cat >conftest.$ac_ext <<_ACEOF
17882 /* confdefs.h.  */
17883 _ACEOF
17884 cat confdefs.h >>conftest.$ac_ext
17885 cat >>conftest.$ac_ext <<_ACEOF
17886 /* end confdefs.h.  */
17887 $ac_includes_default
17888 int
17889 main ()
17890 {
17891 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
17892 test_array [0] = 0
17893
17894   ;
17895   return 0;
17896 }
17897 _ACEOF
17898 rm -f conftest.$ac_objext
17899 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17900   (eval $ac_compile) 2>conftest.er1
17901   ac_status=$?
17902   grep -v '^ *+' conftest.er1 >conftest.err
17903   rm -f conftest.er1
17904   cat conftest.err >&5
17905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17906   (exit $ac_status); } &&
17907          { ac_try='test -z "$ac_c_werror_flag"
17908                          || test ! -s conftest.err'
17909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17910   (eval $ac_try) 2>&5
17911   ac_status=$?
17912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17913   (exit $ac_status); }; } &&
17914          { ac_try='test -s conftest.$ac_objext'
17915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17916   (eval $ac_try) 2>&5
17917   ac_status=$?
17918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17919   (exit $ac_status); }; }; then
17920   ac_lo=0 ac_mid=0
17921   while :; do
17922     cat >conftest.$ac_ext <<_ACEOF
17923 /* confdefs.h.  */
17924 _ACEOF
17925 cat confdefs.h >>conftest.$ac_ext
17926 cat >>conftest.$ac_ext <<_ACEOF
17927 /* end confdefs.h.  */
17928 $ac_includes_default
17929 int
17930 main ()
17931 {
17932 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17933 test_array [0] = 0
17934
17935   ;
17936   return 0;
17937 }
17938 _ACEOF
17939 rm -f conftest.$ac_objext
17940 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17941   (eval $ac_compile) 2>conftest.er1
17942   ac_status=$?
17943   grep -v '^ *+' conftest.er1 >conftest.err
17944   rm -f conftest.er1
17945   cat conftest.err >&5
17946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17947   (exit $ac_status); } &&
17948          { ac_try='test -z "$ac_c_werror_flag"
17949                          || test ! -s conftest.err'
17950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17951   (eval $ac_try) 2>&5
17952   ac_status=$?
17953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17954   (exit $ac_status); }; } &&
17955          { ac_try='test -s conftest.$ac_objext'
17956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17957   (eval $ac_try) 2>&5
17958   ac_status=$?
17959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17960   (exit $ac_status); }; }; then
17961   ac_hi=$ac_mid; break
17962 else
17963   echo "$as_me: failed program was:" >&5
17964 sed 's/^/| /' conftest.$ac_ext >&5
17965
17966 ac_lo=`expr $ac_mid + 1`
17967                     if test $ac_lo -le $ac_mid; then
17968                       ac_lo= ac_hi=
17969                       break
17970                     fi
17971                     ac_mid=`expr 2 '*' $ac_mid + 1`
17972 fi
17973 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17974   done
17975 else
17976   echo "$as_me: failed program was:" >&5
17977 sed 's/^/| /' conftest.$ac_ext >&5
17978
17979 cat >conftest.$ac_ext <<_ACEOF
17980 /* confdefs.h.  */
17981 _ACEOF
17982 cat confdefs.h >>conftest.$ac_ext
17983 cat >>conftest.$ac_ext <<_ACEOF
17984 /* end confdefs.h.  */
17985 $ac_includes_default
17986 int
17987 main ()
17988 {
17989 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
17990 test_array [0] = 0
17991
17992   ;
17993   return 0;
17994 }
17995 _ACEOF
17996 rm -f conftest.$ac_objext
17997 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17998   (eval $ac_compile) 2>conftest.er1
17999   ac_status=$?
18000   grep -v '^ *+' conftest.er1 >conftest.err
18001   rm -f conftest.er1
18002   cat conftest.err >&5
18003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18004   (exit $ac_status); } &&
18005          { ac_try='test -z "$ac_c_werror_flag"
18006                          || test ! -s conftest.err'
18007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18008   (eval $ac_try) 2>&5
18009   ac_status=$?
18010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18011   (exit $ac_status); }; } &&
18012          { ac_try='test -s conftest.$ac_objext'
18013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18014   (eval $ac_try) 2>&5
18015   ac_status=$?
18016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18017   (exit $ac_status); }; }; then
18018   ac_hi=-1 ac_mid=-1
18019   while :; do
18020     cat >conftest.$ac_ext <<_ACEOF
18021 /* confdefs.h.  */
18022 _ACEOF
18023 cat confdefs.h >>conftest.$ac_ext
18024 cat >>conftest.$ac_ext <<_ACEOF
18025 /* end confdefs.h.  */
18026 $ac_includes_default
18027 int
18028 main ()
18029 {
18030 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18031 test_array [0] = 0
18032
18033   ;
18034   return 0;
18035 }
18036 _ACEOF
18037 rm -f conftest.$ac_objext
18038 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18039   (eval $ac_compile) 2>conftest.er1
18040   ac_status=$?
18041   grep -v '^ *+' conftest.er1 >conftest.err
18042   rm -f conftest.er1
18043   cat conftest.err >&5
18044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18045   (exit $ac_status); } &&
18046          { ac_try='test -z "$ac_c_werror_flag"
18047                          || test ! -s conftest.err'
18048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18049   (eval $ac_try) 2>&5
18050   ac_status=$?
18051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18052   (exit $ac_status); }; } &&
18053          { ac_try='test -s conftest.$ac_objext'
18054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18055   (eval $ac_try) 2>&5
18056   ac_status=$?
18057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18058   (exit $ac_status); }; }; then
18059   ac_lo=$ac_mid; break
18060 else
18061   echo "$as_me: failed program was:" >&5
18062 sed 's/^/| /' conftest.$ac_ext >&5
18063
18064 ac_hi=`expr '(' $ac_mid ')' - 1`
18065                        if test $ac_mid -le $ac_hi; then
18066                          ac_lo= ac_hi=
18067                          break
18068                        fi
18069                        ac_mid=`expr 2 '*' $ac_mid`
18070 fi
18071 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18072   done
18073 else
18074   echo "$as_me: failed program was:" >&5
18075 sed 's/^/| /' conftest.$ac_ext >&5
18076
18077 ac_lo= ac_hi=
18078 fi
18079 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18080 fi
18081 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18082 # Binary search between lo and hi bounds.
18083 while test "x$ac_lo" != "x$ac_hi"; do
18084   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18085   cat >conftest.$ac_ext <<_ACEOF
18086 /* confdefs.h.  */
18087 _ACEOF
18088 cat confdefs.h >>conftest.$ac_ext
18089 cat >>conftest.$ac_ext <<_ACEOF
18090 /* end confdefs.h.  */
18091 $ac_includes_default
18092 int
18093 main ()
18094 {
18095 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18096 test_array [0] = 0
18097
18098   ;
18099   return 0;
18100 }
18101 _ACEOF
18102 rm -f conftest.$ac_objext
18103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18104   (eval $ac_compile) 2>conftest.er1
18105   ac_status=$?
18106   grep -v '^ *+' conftest.er1 >conftest.err
18107   rm -f conftest.er1
18108   cat conftest.err >&5
18109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18110   (exit $ac_status); } &&
18111          { ac_try='test -z "$ac_c_werror_flag"
18112                          || test ! -s conftest.err'
18113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18114   (eval $ac_try) 2>&5
18115   ac_status=$?
18116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18117   (exit $ac_status); }; } &&
18118          { ac_try='test -s conftest.$ac_objext'
18119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18120   (eval $ac_try) 2>&5
18121   ac_status=$?
18122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18123   (exit $ac_status); }; }; then
18124   ac_hi=$ac_mid
18125 else
18126   echo "$as_me: failed program was:" >&5
18127 sed 's/^/| /' conftest.$ac_ext >&5
18128
18129 ac_lo=`expr '(' $ac_mid ')' + 1`
18130 fi
18131 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18132 done
18133 case $ac_lo in
18134 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18135 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18136 See \`config.log' for more details." >&5
18137 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18138 See \`config.log' for more details." >&2;}
18139    { (exit 1); exit 1; }; } ;;
18140 esac
18141 else
18142   if test "$cross_compiling" = yes; then
18143   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18144 See \`config.log' for more details." >&5
18145 echo "$as_me: error: cannot run test program while cross compiling
18146 See \`config.log' for more details." >&2;}
18147    { (exit 1); exit 1; }; }
18148 else
18149   cat >conftest.$ac_ext <<_ACEOF
18150 /* confdefs.h.  */
18151 _ACEOF
18152 cat confdefs.h >>conftest.$ac_ext
18153 cat >>conftest.$ac_ext <<_ACEOF
18154 /* end confdefs.h.  */
18155 $ac_includes_default
18156 long longval () { return (long) (sizeof (unsigned long)); }
18157 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18158 #include <stdio.h>
18159 #include <stdlib.h>
18160 int
18161 main ()
18162 {
18163
18164   FILE *f = fopen ("conftest.val", "w");
18165   if (! f)
18166     exit (1);
18167   if (((long) (sizeof (unsigned long))) < 0)
18168     {
18169       long i = longval ();
18170       if (i != ((long) (sizeof (unsigned long))))
18171         exit (1);
18172       fprintf (f, "%ld\n", i);
18173     }
18174   else
18175     {
18176       unsigned long i = ulongval ();
18177       if (i != ((long) (sizeof (unsigned long))))
18178         exit (1);
18179       fprintf (f, "%lu\n", i);
18180     }
18181   exit (ferror (f) || fclose (f) != 0);
18182
18183   ;
18184   return 0;
18185 }
18186 _ACEOF
18187 rm -f conftest$ac_exeext
18188 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18189   (eval $ac_link) 2>&5
18190   ac_status=$?
18191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18192   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18194   (eval $ac_try) 2>&5
18195   ac_status=$?
18196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18197   (exit $ac_status); }; }; then
18198   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18199 else
18200   echo "$as_me: program exited with status $ac_status" >&5
18201 echo "$as_me: failed program was:" >&5
18202 sed 's/^/| /' conftest.$ac_ext >&5
18203
18204 ( exit $ac_status )
18205 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18206 See \`config.log' for more details." >&5
18207 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18208 See \`config.log' for more details." >&2;}
18209    { (exit 1); exit 1; }; }
18210 fi
18211 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18212 fi
18213 fi
18214 rm -f conftest.val
18215 else
18216   ac_cv_sizeof_unsigned_long=0
18217 fi
18218 fi
18219 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18220 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18221 cat >>confdefs.h <<_ACEOF
18222 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18223 _ACEOF
18224
18225
18226
18227 # And one for the size of size_t (enables tweaks for > 32bit address space)
18228 echo "$as_me:$LINENO: checking for size_t" >&5
18229 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18230 if test "${ac_cv_type_size_t+set}" = set; then
18231   echo $ECHO_N "(cached) $ECHO_C" >&6
18232 else
18233   cat >conftest.$ac_ext <<_ACEOF
18234 /* confdefs.h.  */
18235 _ACEOF
18236 cat confdefs.h >>conftest.$ac_ext
18237 cat >>conftest.$ac_ext <<_ACEOF
18238 /* end confdefs.h.  */
18239 $ac_includes_default
18240 int
18241 main ()
18242 {
18243 if ((size_t *) 0)
18244   return 0;
18245 if (sizeof (size_t))
18246   return 0;
18247   ;
18248   return 0;
18249 }
18250 _ACEOF
18251 rm -f conftest.$ac_objext
18252 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18253   (eval $ac_compile) 2>conftest.er1
18254   ac_status=$?
18255   grep -v '^ *+' conftest.er1 >conftest.err
18256   rm -f conftest.er1
18257   cat conftest.err >&5
18258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18259   (exit $ac_status); } &&
18260          { ac_try='test -z "$ac_c_werror_flag"
18261                          || test ! -s conftest.err'
18262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18263   (eval $ac_try) 2>&5
18264   ac_status=$?
18265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18266   (exit $ac_status); }; } &&
18267          { ac_try='test -s conftest.$ac_objext'
18268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18269   (eval $ac_try) 2>&5
18270   ac_status=$?
18271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18272   (exit $ac_status); }; }; then
18273   ac_cv_type_size_t=yes
18274 else
18275   echo "$as_me: failed program was:" >&5
18276 sed 's/^/| /' conftest.$ac_ext >&5
18277
18278 ac_cv_type_size_t=no
18279 fi
18280 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18281 fi
18282 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18283 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18284
18285 echo "$as_me:$LINENO: checking size of size_t" >&5
18286 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18287 if test "${ac_cv_sizeof_size_t+set}" = set; then
18288   echo $ECHO_N "(cached) $ECHO_C" >&6
18289 else
18290   if test "$ac_cv_type_size_t" = yes; then
18291   # The cast to unsigned long works around a bug in the HP C Compiler
18292   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18293   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18294   # This bug is HP SR number 8606223364.
18295   if test "$cross_compiling" = yes; then
18296   # Depending upon the size, compute the lo and hi bounds.
18297 cat >conftest.$ac_ext <<_ACEOF
18298 /* confdefs.h.  */
18299 _ACEOF
18300 cat confdefs.h >>conftest.$ac_ext
18301 cat >>conftest.$ac_ext <<_ACEOF
18302 /* end confdefs.h.  */
18303 $ac_includes_default
18304 int
18305 main ()
18306 {
18307 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18308 test_array [0] = 0
18309
18310   ;
18311   return 0;
18312 }
18313 _ACEOF
18314 rm -f conftest.$ac_objext
18315 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18316   (eval $ac_compile) 2>conftest.er1
18317   ac_status=$?
18318   grep -v '^ *+' conftest.er1 >conftest.err
18319   rm -f conftest.er1
18320   cat conftest.err >&5
18321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18322   (exit $ac_status); } &&
18323          { ac_try='test -z "$ac_c_werror_flag"
18324                          || test ! -s conftest.err'
18325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18326   (eval $ac_try) 2>&5
18327   ac_status=$?
18328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18329   (exit $ac_status); }; } &&
18330          { ac_try='test -s conftest.$ac_objext'
18331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18332   (eval $ac_try) 2>&5
18333   ac_status=$?
18334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18335   (exit $ac_status); }; }; then
18336   ac_lo=0 ac_mid=0
18337   while :; do
18338     cat >conftest.$ac_ext <<_ACEOF
18339 /* confdefs.h.  */
18340 _ACEOF
18341 cat confdefs.h >>conftest.$ac_ext
18342 cat >>conftest.$ac_ext <<_ACEOF
18343 /* end confdefs.h.  */
18344 $ac_includes_default
18345 int
18346 main ()
18347 {
18348 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18349 test_array [0] = 0
18350
18351   ;
18352   return 0;
18353 }
18354 _ACEOF
18355 rm -f conftest.$ac_objext
18356 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18357   (eval $ac_compile) 2>conftest.er1
18358   ac_status=$?
18359   grep -v '^ *+' conftest.er1 >conftest.err
18360   rm -f conftest.er1
18361   cat conftest.err >&5
18362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18363   (exit $ac_status); } &&
18364          { ac_try='test -z "$ac_c_werror_flag"
18365                          || test ! -s conftest.err'
18366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18367   (eval $ac_try) 2>&5
18368   ac_status=$?
18369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18370   (exit $ac_status); }; } &&
18371          { ac_try='test -s conftest.$ac_objext'
18372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18373   (eval $ac_try) 2>&5
18374   ac_status=$?
18375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18376   (exit $ac_status); }; }; then
18377   ac_hi=$ac_mid; break
18378 else
18379   echo "$as_me: failed program was:" >&5
18380 sed 's/^/| /' conftest.$ac_ext >&5
18381
18382 ac_lo=`expr $ac_mid + 1`
18383                     if test $ac_lo -le $ac_mid; then
18384                       ac_lo= ac_hi=
18385                       break
18386                     fi
18387                     ac_mid=`expr 2 '*' $ac_mid + 1`
18388 fi
18389 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18390   done
18391 else
18392   echo "$as_me: failed program was:" >&5
18393 sed 's/^/| /' conftest.$ac_ext >&5
18394
18395 cat >conftest.$ac_ext <<_ACEOF
18396 /* confdefs.h.  */
18397 _ACEOF
18398 cat confdefs.h >>conftest.$ac_ext
18399 cat >>conftest.$ac_ext <<_ACEOF
18400 /* end confdefs.h.  */
18401 $ac_includes_default
18402 int
18403 main ()
18404 {
18405 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18406 test_array [0] = 0
18407
18408   ;
18409   return 0;
18410 }
18411 _ACEOF
18412 rm -f conftest.$ac_objext
18413 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18414   (eval $ac_compile) 2>conftest.er1
18415   ac_status=$?
18416   grep -v '^ *+' conftest.er1 >conftest.err
18417   rm -f conftest.er1
18418   cat conftest.err >&5
18419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18420   (exit $ac_status); } &&
18421          { ac_try='test -z "$ac_c_werror_flag"
18422                          || test ! -s conftest.err'
18423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18424   (eval $ac_try) 2>&5
18425   ac_status=$?
18426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18427   (exit $ac_status); }; } &&
18428          { ac_try='test -s conftest.$ac_objext'
18429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18430   (eval $ac_try) 2>&5
18431   ac_status=$?
18432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18433   (exit $ac_status); }; }; then
18434   ac_hi=-1 ac_mid=-1
18435   while :; do
18436     cat >conftest.$ac_ext <<_ACEOF
18437 /* confdefs.h.  */
18438 _ACEOF
18439 cat confdefs.h >>conftest.$ac_ext
18440 cat >>conftest.$ac_ext <<_ACEOF
18441 /* end confdefs.h.  */
18442 $ac_includes_default
18443 int
18444 main ()
18445 {
18446 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18447 test_array [0] = 0
18448
18449   ;
18450   return 0;
18451 }
18452 _ACEOF
18453 rm -f conftest.$ac_objext
18454 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18455   (eval $ac_compile) 2>conftest.er1
18456   ac_status=$?
18457   grep -v '^ *+' conftest.er1 >conftest.err
18458   rm -f conftest.er1
18459   cat conftest.err >&5
18460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18461   (exit $ac_status); } &&
18462          { ac_try='test -z "$ac_c_werror_flag"
18463                          || test ! -s conftest.err'
18464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18465   (eval $ac_try) 2>&5
18466   ac_status=$?
18467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18468   (exit $ac_status); }; } &&
18469          { ac_try='test -s conftest.$ac_objext'
18470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18471   (eval $ac_try) 2>&5
18472   ac_status=$?
18473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18474   (exit $ac_status); }; }; then
18475   ac_lo=$ac_mid; break
18476 else
18477   echo "$as_me: failed program was:" >&5
18478 sed 's/^/| /' conftest.$ac_ext >&5
18479
18480 ac_hi=`expr '(' $ac_mid ')' - 1`
18481                        if test $ac_mid -le $ac_hi; then
18482                          ac_lo= ac_hi=
18483                          break
18484                        fi
18485                        ac_mid=`expr 2 '*' $ac_mid`
18486 fi
18487 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18488   done
18489 else
18490   echo "$as_me: failed program was:" >&5
18491 sed 's/^/| /' conftest.$ac_ext >&5
18492
18493 ac_lo= ac_hi=
18494 fi
18495 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18496 fi
18497 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18498 # Binary search between lo and hi bounds.
18499 while test "x$ac_lo" != "x$ac_hi"; do
18500   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18501   cat >conftest.$ac_ext <<_ACEOF
18502 /* confdefs.h.  */
18503 _ACEOF
18504 cat confdefs.h >>conftest.$ac_ext
18505 cat >>conftest.$ac_ext <<_ACEOF
18506 /* end confdefs.h.  */
18507 $ac_includes_default
18508 int
18509 main ()
18510 {
18511 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18512 test_array [0] = 0
18513
18514   ;
18515   return 0;
18516 }
18517 _ACEOF
18518 rm -f conftest.$ac_objext
18519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18520   (eval $ac_compile) 2>conftest.er1
18521   ac_status=$?
18522   grep -v '^ *+' conftest.er1 >conftest.err
18523   rm -f conftest.er1
18524   cat conftest.err >&5
18525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18526   (exit $ac_status); } &&
18527          { ac_try='test -z "$ac_c_werror_flag"
18528                          || test ! -s conftest.err'
18529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18530   (eval $ac_try) 2>&5
18531   ac_status=$?
18532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18533   (exit $ac_status); }; } &&
18534          { ac_try='test -s conftest.$ac_objext'
18535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18536   (eval $ac_try) 2>&5
18537   ac_status=$?
18538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18539   (exit $ac_status); }; }; then
18540   ac_hi=$ac_mid
18541 else
18542   echo "$as_me: failed program was:" >&5
18543 sed 's/^/| /' conftest.$ac_ext >&5
18544
18545 ac_lo=`expr '(' $ac_mid ')' + 1`
18546 fi
18547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18548 done
18549 case $ac_lo in
18550 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18551 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18552 See \`config.log' for more details." >&5
18553 echo "$as_me: error: cannot compute sizeof (size_t), 77
18554 See \`config.log' for more details." >&2;}
18555    { (exit 1); exit 1; }; } ;;
18556 esac
18557 else
18558   if test "$cross_compiling" = yes; then
18559   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18560 See \`config.log' for more details." >&5
18561 echo "$as_me: error: cannot run test program while cross compiling
18562 See \`config.log' for more details." >&2;}
18563    { (exit 1); exit 1; }; }
18564 else
18565   cat >conftest.$ac_ext <<_ACEOF
18566 /* confdefs.h.  */
18567 _ACEOF
18568 cat confdefs.h >>conftest.$ac_ext
18569 cat >>conftest.$ac_ext <<_ACEOF
18570 /* end confdefs.h.  */
18571 $ac_includes_default
18572 long longval () { return (long) (sizeof (size_t)); }
18573 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18574 #include <stdio.h>
18575 #include <stdlib.h>
18576 int
18577 main ()
18578 {
18579
18580   FILE *f = fopen ("conftest.val", "w");
18581   if (! f)
18582     exit (1);
18583   if (((long) (sizeof (size_t))) < 0)
18584     {
18585       long i = longval ();
18586       if (i != ((long) (sizeof (size_t))))
18587         exit (1);
18588       fprintf (f, "%ld\n", i);
18589     }
18590   else
18591     {
18592       unsigned long i = ulongval ();
18593       if (i != ((long) (sizeof (size_t))))
18594         exit (1);
18595       fprintf (f, "%lu\n", i);
18596     }
18597   exit (ferror (f) || fclose (f) != 0);
18598
18599   ;
18600   return 0;
18601 }
18602 _ACEOF
18603 rm -f conftest$ac_exeext
18604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18605   (eval $ac_link) 2>&5
18606   ac_status=$?
18607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18608   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18610   (eval $ac_try) 2>&5
18611   ac_status=$?
18612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18613   (exit $ac_status); }; }; then
18614   ac_cv_sizeof_size_t=`cat conftest.val`
18615 else
18616   echo "$as_me: program exited with status $ac_status" >&5
18617 echo "$as_me: failed program was:" >&5
18618 sed 's/^/| /' conftest.$ac_ext >&5
18619
18620 ( exit $ac_status )
18621 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18622 See \`config.log' for more details." >&5
18623 echo "$as_me: error: cannot compute sizeof (size_t), 77
18624 See \`config.log' for more details." >&2;}
18625    { (exit 1); exit 1; }; }
18626 fi
18627 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18628 fi
18629 fi
18630 rm -f conftest.val
18631 else
18632   ac_cv_sizeof_size_t=0
18633 fi
18634 fi
18635 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18636 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18637 cat >>confdefs.h <<_ACEOF
18638 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18639 _ACEOF
18640
18641
18642
18643 # Determine memory alignment requirements for the basic C data types.
18644
18645 echo "$as_me:$LINENO: checking for short" >&5
18646 echo $ECHO_N "checking for short... $ECHO_C" >&6
18647 if test "${ac_cv_type_short+set}" = set; then
18648   echo $ECHO_N "(cached) $ECHO_C" >&6
18649 else
18650   cat >conftest.$ac_ext <<_ACEOF
18651 /* confdefs.h.  */
18652 _ACEOF
18653 cat confdefs.h >>conftest.$ac_ext
18654 cat >>conftest.$ac_ext <<_ACEOF
18655 /* end confdefs.h.  */
18656 $ac_includes_default
18657 int
18658 main ()
18659 {
18660 if ((short *) 0)
18661   return 0;
18662 if (sizeof (short))
18663   return 0;
18664   ;
18665   return 0;
18666 }
18667 _ACEOF
18668 rm -f conftest.$ac_objext
18669 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18670   (eval $ac_compile) 2>conftest.er1
18671   ac_status=$?
18672   grep -v '^ *+' conftest.er1 >conftest.err
18673   rm -f conftest.er1
18674   cat conftest.err >&5
18675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18676   (exit $ac_status); } &&
18677          { ac_try='test -z "$ac_c_werror_flag"
18678                          || test ! -s conftest.err'
18679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18680   (eval $ac_try) 2>&5
18681   ac_status=$?
18682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18683   (exit $ac_status); }; } &&
18684          { ac_try='test -s conftest.$ac_objext'
18685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18686   (eval $ac_try) 2>&5
18687   ac_status=$?
18688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18689   (exit $ac_status); }; }; then
18690   ac_cv_type_short=yes
18691 else
18692   echo "$as_me: failed program was:" >&5
18693 sed 's/^/| /' conftest.$ac_ext >&5
18694
18695 ac_cv_type_short=no
18696 fi
18697 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18698 fi
18699 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18700 echo "${ECHO_T}$ac_cv_type_short" >&6
18701
18702 echo "$as_me:$LINENO: checking alignment of short" >&5
18703 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18704 if test "${pgac_cv_alignof_short+set}" = set; then
18705   echo $ECHO_N "(cached) $ECHO_C" >&6
18706 else
18707   if test "$ac_cv_type_short" = yes; then
18708   if test "$cross_compiling" = yes; then
18709   # Depending upon the size, compute the lo and hi bounds.
18710 cat >conftest.$ac_ext <<_ACEOF
18711 /* confdefs.h.  */
18712 _ACEOF
18713 cat confdefs.h >>conftest.$ac_ext
18714 cat >>conftest.$ac_ext <<_ACEOF
18715 /* end confdefs.h.  */
18716 $ac_includes_default
18717 struct { char filler; short field; } pgac_struct;
18718 int
18719 main ()
18720 {
18721 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18722 test_array [0] = 0
18723
18724   ;
18725   return 0;
18726 }
18727 _ACEOF
18728 rm -f conftest.$ac_objext
18729 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18730   (eval $ac_compile) 2>conftest.er1
18731   ac_status=$?
18732   grep -v '^ *+' conftest.er1 >conftest.err
18733   rm -f conftest.er1
18734   cat conftest.err >&5
18735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18736   (exit $ac_status); } &&
18737          { ac_try='test -z "$ac_c_werror_flag"
18738                          || test ! -s conftest.err'
18739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18740   (eval $ac_try) 2>&5
18741   ac_status=$?
18742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18743   (exit $ac_status); }; } &&
18744          { ac_try='test -s conftest.$ac_objext'
18745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18746   (eval $ac_try) 2>&5
18747   ac_status=$?
18748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18749   (exit $ac_status); }; }; then
18750   ac_lo=0 ac_mid=0
18751   while :; do
18752     cat >conftest.$ac_ext <<_ACEOF
18753 /* confdefs.h.  */
18754 _ACEOF
18755 cat confdefs.h >>conftest.$ac_ext
18756 cat >>conftest.$ac_ext <<_ACEOF
18757 /* end confdefs.h.  */
18758 $ac_includes_default
18759 struct { char filler; short field; } pgac_struct;
18760 int
18761 main ()
18762 {
18763 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18764 test_array [0] = 0
18765
18766   ;
18767   return 0;
18768 }
18769 _ACEOF
18770 rm -f conftest.$ac_objext
18771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18772   (eval $ac_compile) 2>conftest.er1
18773   ac_status=$?
18774   grep -v '^ *+' conftest.er1 >conftest.err
18775   rm -f conftest.er1
18776   cat conftest.err >&5
18777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18778   (exit $ac_status); } &&
18779          { ac_try='test -z "$ac_c_werror_flag"
18780                          || test ! -s conftest.err'
18781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18782   (eval $ac_try) 2>&5
18783   ac_status=$?
18784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18785   (exit $ac_status); }; } &&
18786          { ac_try='test -s conftest.$ac_objext'
18787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18788   (eval $ac_try) 2>&5
18789   ac_status=$?
18790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18791   (exit $ac_status); }; }; then
18792   ac_hi=$ac_mid; break
18793 else
18794   echo "$as_me: failed program was:" >&5
18795 sed 's/^/| /' conftest.$ac_ext >&5
18796
18797 ac_lo=`expr $ac_mid + 1`
18798                     if test $ac_lo -le $ac_mid; then
18799                       ac_lo= ac_hi=
18800                       break
18801                     fi
18802                     ac_mid=`expr 2 '*' $ac_mid + 1`
18803 fi
18804 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18805   done
18806 else
18807   echo "$as_me: failed program was:" >&5
18808 sed 's/^/| /' conftest.$ac_ext >&5
18809
18810 cat >conftest.$ac_ext <<_ACEOF
18811 /* confdefs.h.  */
18812 _ACEOF
18813 cat confdefs.h >>conftest.$ac_ext
18814 cat >>conftest.$ac_ext <<_ACEOF
18815 /* end confdefs.h.  */
18816 $ac_includes_default
18817 struct { char filler; short field; } pgac_struct;
18818 int
18819 main ()
18820 {
18821 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18822 test_array [0] = 0
18823
18824   ;
18825   return 0;
18826 }
18827 _ACEOF
18828 rm -f conftest.$ac_objext
18829 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18830   (eval $ac_compile) 2>conftest.er1
18831   ac_status=$?
18832   grep -v '^ *+' conftest.er1 >conftest.err
18833   rm -f conftest.er1
18834   cat conftest.err >&5
18835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18836   (exit $ac_status); } &&
18837          { ac_try='test -z "$ac_c_werror_flag"
18838                          || test ! -s conftest.err'
18839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18840   (eval $ac_try) 2>&5
18841   ac_status=$?
18842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18843   (exit $ac_status); }; } &&
18844          { ac_try='test -s conftest.$ac_objext'
18845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18846   (eval $ac_try) 2>&5
18847   ac_status=$?
18848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18849   (exit $ac_status); }; }; then
18850   ac_hi=-1 ac_mid=-1
18851   while :; do
18852     cat >conftest.$ac_ext <<_ACEOF
18853 /* confdefs.h.  */
18854 _ACEOF
18855 cat confdefs.h >>conftest.$ac_ext
18856 cat >>conftest.$ac_ext <<_ACEOF
18857 /* end confdefs.h.  */
18858 $ac_includes_default
18859 struct { char filler; short field; } pgac_struct;
18860 int
18861 main ()
18862 {
18863 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18864 test_array [0] = 0
18865
18866   ;
18867   return 0;
18868 }
18869 _ACEOF
18870 rm -f conftest.$ac_objext
18871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18872   (eval $ac_compile) 2>conftest.er1
18873   ac_status=$?
18874   grep -v '^ *+' conftest.er1 >conftest.err
18875   rm -f conftest.er1
18876   cat conftest.err >&5
18877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18878   (exit $ac_status); } &&
18879          { ac_try='test -z "$ac_c_werror_flag"
18880                          || test ! -s conftest.err'
18881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18882   (eval $ac_try) 2>&5
18883   ac_status=$?
18884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18885   (exit $ac_status); }; } &&
18886          { ac_try='test -s conftest.$ac_objext'
18887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18888   (eval $ac_try) 2>&5
18889   ac_status=$?
18890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18891   (exit $ac_status); }; }; then
18892   ac_lo=$ac_mid; break
18893 else
18894   echo "$as_me: failed program was:" >&5
18895 sed 's/^/| /' conftest.$ac_ext >&5
18896
18897 ac_hi=`expr '(' $ac_mid ')' - 1`
18898                        if test $ac_mid -le $ac_hi; then
18899                          ac_lo= ac_hi=
18900                          break
18901                        fi
18902                        ac_mid=`expr 2 '*' $ac_mid`
18903 fi
18904 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18905   done
18906 else
18907   echo "$as_me: failed program was:" >&5
18908 sed 's/^/| /' conftest.$ac_ext >&5
18909
18910 ac_lo= ac_hi=
18911 fi
18912 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18913 fi
18914 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18915 # Binary search between lo and hi bounds.
18916 while test "x$ac_lo" != "x$ac_hi"; do
18917   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18918   cat >conftest.$ac_ext <<_ACEOF
18919 /* confdefs.h.  */
18920 _ACEOF
18921 cat confdefs.h >>conftest.$ac_ext
18922 cat >>conftest.$ac_ext <<_ACEOF
18923 /* end confdefs.h.  */
18924 $ac_includes_default
18925 struct { char filler; short field; } pgac_struct;
18926 int
18927 main ()
18928 {
18929 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18930 test_array [0] = 0
18931
18932   ;
18933   return 0;
18934 }
18935 _ACEOF
18936 rm -f conftest.$ac_objext
18937 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18938   (eval $ac_compile) 2>conftest.er1
18939   ac_status=$?
18940   grep -v '^ *+' conftest.er1 >conftest.err
18941   rm -f conftest.er1
18942   cat conftest.err >&5
18943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18944   (exit $ac_status); } &&
18945          { ac_try='test -z "$ac_c_werror_flag"
18946                          || test ! -s conftest.err'
18947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18948   (eval $ac_try) 2>&5
18949   ac_status=$?
18950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18951   (exit $ac_status); }; } &&
18952          { ac_try='test -s conftest.$ac_objext'
18953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18954   (eval $ac_try) 2>&5
18955   ac_status=$?
18956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18957   (exit $ac_status); }; }; then
18958   ac_hi=$ac_mid
18959 else
18960   echo "$as_me: failed program was:" >&5
18961 sed 's/^/| /' conftest.$ac_ext >&5
18962
18963 ac_lo=`expr '(' $ac_mid ')' + 1`
18964 fi
18965 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18966 done
18967 case $ac_lo in
18968 ?*) pgac_cv_alignof_short=$ac_lo;;
18969 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18970 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18971    { (exit 1); exit 1; }; } ;;
18972 esac
18973 else
18974   if test "$cross_compiling" = yes; then
18975   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18976 See \`config.log' for more details." >&5
18977 echo "$as_me: error: cannot run test program while cross compiling
18978 See \`config.log' for more details." >&2;}
18979    { (exit 1); exit 1; }; }
18980 else
18981   cat >conftest.$ac_ext <<_ACEOF
18982 /* confdefs.h.  */
18983 _ACEOF
18984 cat confdefs.h >>conftest.$ac_ext
18985 cat >>conftest.$ac_ext <<_ACEOF
18986 /* end confdefs.h.  */
18987 $ac_includes_default
18988 struct { char filler; short field; } pgac_struct;
18989 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18990 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18991 #include <stdio.h>
18992 #include <stdlib.h>
18993 int
18994 main ()
18995 {
18996
18997   FILE *f = fopen ("conftest.val", "w");
18998   if (! f)
18999     exit (1);
19000   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19001     {
19002       long i = longval ();
19003       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19004         exit (1);
19005       fprintf (f, "%ld\n", i);
19006     }
19007   else
19008     {
19009       unsigned long i = ulongval ();
19010       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19011         exit (1);
19012       fprintf (f, "%lu\n", i);
19013     }
19014   exit (ferror (f) || fclose (f) != 0);
19015
19016   ;
19017   return 0;
19018 }
19019 _ACEOF
19020 rm -f conftest$ac_exeext
19021 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19022   (eval $ac_link) 2>&5
19023   ac_status=$?
19024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19025   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19027   (eval $ac_try) 2>&5
19028   ac_status=$?
19029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19030   (exit $ac_status); }; }; then
19031   pgac_cv_alignof_short=`cat conftest.val`
19032 else
19033   echo "$as_me: program exited with status $ac_status" >&5
19034 echo "$as_me: failed program was:" >&5
19035 sed 's/^/| /' conftest.$ac_ext >&5
19036
19037 ( exit $ac_status )
19038 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19039 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19040    { (exit 1); exit 1; }; }
19041 fi
19042 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19043 fi
19044 fi
19045 rm -f conftest.val
19046 else
19047   pgac_cv_alignof_short=0
19048 fi
19049 fi
19050 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19051 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19052 cat >>confdefs.h <<_ACEOF
19053 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19054 _ACEOF
19055
19056
19057 echo "$as_me:$LINENO: checking for int" >&5
19058 echo $ECHO_N "checking for int... $ECHO_C" >&6
19059 if test "${ac_cv_type_int+set}" = set; then
19060   echo $ECHO_N "(cached) $ECHO_C" >&6
19061 else
19062   cat >conftest.$ac_ext <<_ACEOF
19063 /* confdefs.h.  */
19064 _ACEOF
19065 cat confdefs.h >>conftest.$ac_ext
19066 cat >>conftest.$ac_ext <<_ACEOF
19067 /* end confdefs.h.  */
19068 $ac_includes_default
19069 int
19070 main ()
19071 {
19072 if ((int *) 0)
19073   return 0;
19074 if (sizeof (int))
19075   return 0;
19076   ;
19077   return 0;
19078 }
19079 _ACEOF
19080 rm -f conftest.$ac_objext
19081 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19082   (eval $ac_compile) 2>conftest.er1
19083   ac_status=$?
19084   grep -v '^ *+' conftest.er1 >conftest.err
19085   rm -f conftest.er1
19086   cat conftest.err >&5
19087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19088   (exit $ac_status); } &&
19089          { ac_try='test -z "$ac_c_werror_flag"
19090                          || test ! -s conftest.err'
19091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19092   (eval $ac_try) 2>&5
19093   ac_status=$?
19094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19095   (exit $ac_status); }; } &&
19096          { ac_try='test -s conftest.$ac_objext'
19097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19098   (eval $ac_try) 2>&5
19099   ac_status=$?
19100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19101   (exit $ac_status); }; }; then
19102   ac_cv_type_int=yes
19103 else
19104   echo "$as_me: failed program was:" >&5
19105 sed 's/^/| /' conftest.$ac_ext >&5
19106
19107 ac_cv_type_int=no
19108 fi
19109 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19110 fi
19111 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19112 echo "${ECHO_T}$ac_cv_type_int" >&6
19113
19114 echo "$as_me:$LINENO: checking alignment of int" >&5
19115 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19116 if test "${pgac_cv_alignof_int+set}" = set; then
19117   echo $ECHO_N "(cached) $ECHO_C" >&6
19118 else
19119   if test "$ac_cv_type_int" = yes; then
19120   if test "$cross_compiling" = yes; then
19121   # Depending upon the size, compute the lo and hi bounds.
19122 cat >conftest.$ac_ext <<_ACEOF
19123 /* confdefs.h.  */
19124 _ACEOF
19125 cat confdefs.h >>conftest.$ac_ext
19126 cat >>conftest.$ac_ext <<_ACEOF
19127 /* end confdefs.h.  */
19128 $ac_includes_default
19129 struct { char filler; int field; } pgac_struct;
19130 int
19131 main ()
19132 {
19133 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19134 test_array [0] = 0
19135
19136   ;
19137   return 0;
19138 }
19139 _ACEOF
19140 rm -f conftest.$ac_objext
19141 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19142   (eval $ac_compile) 2>conftest.er1
19143   ac_status=$?
19144   grep -v '^ *+' conftest.er1 >conftest.err
19145   rm -f conftest.er1
19146   cat conftest.err >&5
19147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19148   (exit $ac_status); } &&
19149          { ac_try='test -z "$ac_c_werror_flag"
19150                          || test ! -s conftest.err'
19151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19152   (eval $ac_try) 2>&5
19153   ac_status=$?
19154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19155   (exit $ac_status); }; } &&
19156          { ac_try='test -s conftest.$ac_objext'
19157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19158   (eval $ac_try) 2>&5
19159   ac_status=$?
19160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19161   (exit $ac_status); }; }; then
19162   ac_lo=0 ac_mid=0
19163   while :; do
19164     cat >conftest.$ac_ext <<_ACEOF
19165 /* confdefs.h.  */
19166 _ACEOF
19167 cat confdefs.h >>conftest.$ac_ext
19168 cat >>conftest.$ac_ext <<_ACEOF
19169 /* end confdefs.h.  */
19170 $ac_includes_default
19171 struct { char filler; int field; } pgac_struct;
19172 int
19173 main ()
19174 {
19175 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19176 test_array [0] = 0
19177
19178   ;
19179   return 0;
19180 }
19181 _ACEOF
19182 rm -f conftest.$ac_objext
19183 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19184   (eval $ac_compile) 2>conftest.er1
19185   ac_status=$?
19186   grep -v '^ *+' conftest.er1 >conftest.err
19187   rm -f conftest.er1
19188   cat conftest.err >&5
19189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19190   (exit $ac_status); } &&
19191          { ac_try='test -z "$ac_c_werror_flag"
19192                          || test ! -s conftest.err'
19193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19194   (eval $ac_try) 2>&5
19195   ac_status=$?
19196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19197   (exit $ac_status); }; } &&
19198          { ac_try='test -s conftest.$ac_objext'
19199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19200   (eval $ac_try) 2>&5
19201   ac_status=$?
19202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19203   (exit $ac_status); }; }; then
19204   ac_hi=$ac_mid; break
19205 else
19206   echo "$as_me: failed program was:" >&5
19207 sed 's/^/| /' conftest.$ac_ext >&5
19208
19209 ac_lo=`expr $ac_mid + 1`
19210                     if test $ac_lo -le $ac_mid; then
19211                       ac_lo= ac_hi=
19212                       break
19213                     fi
19214                     ac_mid=`expr 2 '*' $ac_mid + 1`
19215 fi
19216 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19217   done
19218 else
19219   echo "$as_me: failed program was:" >&5
19220 sed 's/^/| /' conftest.$ac_ext >&5
19221
19222 cat >conftest.$ac_ext <<_ACEOF
19223 /* confdefs.h.  */
19224 _ACEOF
19225 cat confdefs.h >>conftest.$ac_ext
19226 cat >>conftest.$ac_ext <<_ACEOF
19227 /* end confdefs.h.  */
19228 $ac_includes_default
19229 struct { char filler; int field; } pgac_struct;
19230 int
19231 main ()
19232 {
19233 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19234 test_array [0] = 0
19235
19236   ;
19237   return 0;
19238 }
19239 _ACEOF
19240 rm -f conftest.$ac_objext
19241 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19242   (eval $ac_compile) 2>conftest.er1
19243   ac_status=$?
19244   grep -v '^ *+' conftest.er1 >conftest.err
19245   rm -f conftest.er1
19246   cat conftest.err >&5
19247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19248   (exit $ac_status); } &&
19249          { ac_try='test -z "$ac_c_werror_flag"
19250                          || test ! -s conftest.err'
19251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19252   (eval $ac_try) 2>&5
19253   ac_status=$?
19254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19255   (exit $ac_status); }; } &&
19256          { ac_try='test -s conftest.$ac_objext'
19257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19258   (eval $ac_try) 2>&5
19259   ac_status=$?
19260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19261   (exit $ac_status); }; }; then
19262   ac_hi=-1 ac_mid=-1
19263   while :; do
19264     cat >conftest.$ac_ext <<_ACEOF
19265 /* confdefs.h.  */
19266 _ACEOF
19267 cat confdefs.h >>conftest.$ac_ext
19268 cat >>conftest.$ac_ext <<_ACEOF
19269 /* end confdefs.h.  */
19270 $ac_includes_default
19271 struct { char filler; int field; } pgac_struct;
19272 int
19273 main ()
19274 {
19275 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19276 test_array [0] = 0
19277
19278   ;
19279   return 0;
19280 }
19281 _ACEOF
19282 rm -f conftest.$ac_objext
19283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19284   (eval $ac_compile) 2>conftest.er1
19285   ac_status=$?
19286   grep -v '^ *+' conftest.er1 >conftest.err
19287   rm -f conftest.er1
19288   cat conftest.err >&5
19289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19290   (exit $ac_status); } &&
19291          { ac_try='test -z "$ac_c_werror_flag"
19292                          || test ! -s conftest.err'
19293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19294   (eval $ac_try) 2>&5
19295   ac_status=$?
19296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19297   (exit $ac_status); }; } &&
19298          { ac_try='test -s conftest.$ac_objext'
19299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19300   (eval $ac_try) 2>&5
19301   ac_status=$?
19302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19303   (exit $ac_status); }; }; then
19304   ac_lo=$ac_mid; break
19305 else
19306   echo "$as_me: failed program was:" >&5
19307 sed 's/^/| /' conftest.$ac_ext >&5
19308
19309 ac_hi=`expr '(' $ac_mid ')' - 1`
19310                        if test $ac_mid -le $ac_hi; then
19311                          ac_lo= ac_hi=
19312                          break
19313                        fi
19314                        ac_mid=`expr 2 '*' $ac_mid`
19315 fi
19316 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19317   done
19318 else
19319   echo "$as_me: failed program was:" >&5
19320 sed 's/^/| /' conftest.$ac_ext >&5
19321
19322 ac_lo= ac_hi=
19323 fi
19324 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19325 fi
19326 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19327 # Binary search between lo and hi bounds.
19328 while test "x$ac_lo" != "x$ac_hi"; do
19329   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19330   cat >conftest.$ac_ext <<_ACEOF
19331 /* confdefs.h.  */
19332 _ACEOF
19333 cat confdefs.h >>conftest.$ac_ext
19334 cat >>conftest.$ac_ext <<_ACEOF
19335 /* end confdefs.h.  */
19336 $ac_includes_default
19337 struct { char filler; int field; } pgac_struct;
19338 int
19339 main ()
19340 {
19341 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19342 test_array [0] = 0
19343
19344   ;
19345   return 0;
19346 }
19347 _ACEOF
19348 rm -f conftest.$ac_objext
19349 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19350   (eval $ac_compile) 2>conftest.er1
19351   ac_status=$?
19352   grep -v '^ *+' conftest.er1 >conftest.err
19353   rm -f conftest.er1
19354   cat conftest.err >&5
19355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19356   (exit $ac_status); } &&
19357          { ac_try='test -z "$ac_c_werror_flag"
19358                          || test ! -s conftest.err'
19359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19360   (eval $ac_try) 2>&5
19361   ac_status=$?
19362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19363   (exit $ac_status); }; } &&
19364          { ac_try='test -s conftest.$ac_objext'
19365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19366   (eval $ac_try) 2>&5
19367   ac_status=$?
19368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19369   (exit $ac_status); }; }; then
19370   ac_hi=$ac_mid
19371 else
19372   echo "$as_me: failed program was:" >&5
19373 sed 's/^/| /' conftest.$ac_ext >&5
19374
19375 ac_lo=`expr '(' $ac_mid ')' + 1`
19376 fi
19377 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19378 done
19379 case $ac_lo in
19380 ?*) pgac_cv_alignof_int=$ac_lo;;
19381 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19382 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19383    { (exit 1); exit 1; }; } ;;
19384 esac
19385 else
19386   if test "$cross_compiling" = yes; then
19387   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19388 See \`config.log' for more details." >&5
19389 echo "$as_me: error: cannot run test program while cross compiling
19390 See \`config.log' for more details." >&2;}
19391    { (exit 1); exit 1; }; }
19392 else
19393   cat >conftest.$ac_ext <<_ACEOF
19394 /* confdefs.h.  */
19395 _ACEOF
19396 cat confdefs.h >>conftest.$ac_ext
19397 cat >>conftest.$ac_ext <<_ACEOF
19398 /* end confdefs.h.  */
19399 $ac_includes_default
19400 struct { char filler; int field; } pgac_struct;
19401 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19402 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19403 #include <stdio.h>
19404 #include <stdlib.h>
19405 int
19406 main ()
19407 {
19408
19409   FILE *f = fopen ("conftest.val", "w");
19410   if (! f)
19411     exit (1);
19412   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19413     {
19414       long i = longval ();
19415       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19416         exit (1);
19417       fprintf (f, "%ld\n", i);
19418     }
19419   else
19420     {
19421       unsigned long i = ulongval ();
19422       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19423         exit (1);
19424       fprintf (f, "%lu\n", i);
19425     }
19426   exit (ferror (f) || fclose (f) != 0);
19427
19428   ;
19429   return 0;
19430 }
19431 _ACEOF
19432 rm -f conftest$ac_exeext
19433 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19434   (eval $ac_link) 2>&5
19435   ac_status=$?
19436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19437   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19439   (eval $ac_try) 2>&5
19440   ac_status=$?
19441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19442   (exit $ac_status); }; }; then
19443   pgac_cv_alignof_int=`cat conftest.val`
19444 else
19445   echo "$as_me: program exited with status $ac_status" >&5
19446 echo "$as_me: failed program was:" >&5
19447 sed 's/^/| /' conftest.$ac_ext >&5
19448
19449 ( exit $ac_status )
19450 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19451 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19452    { (exit 1); exit 1; }; }
19453 fi
19454 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19455 fi
19456 fi
19457 rm -f conftest.val
19458 else
19459   pgac_cv_alignof_int=0
19460 fi
19461 fi
19462 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19463 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19464 cat >>confdefs.h <<_ACEOF
19465 #define ALIGNOF_INT $pgac_cv_alignof_int
19466 _ACEOF
19467
19468
19469 echo "$as_me:$LINENO: checking for long" >&5
19470 echo $ECHO_N "checking for long... $ECHO_C" >&6
19471 if test "${ac_cv_type_long+set}" = set; then
19472   echo $ECHO_N "(cached) $ECHO_C" >&6
19473 else
19474   cat >conftest.$ac_ext <<_ACEOF
19475 /* confdefs.h.  */
19476 _ACEOF
19477 cat confdefs.h >>conftest.$ac_ext
19478 cat >>conftest.$ac_ext <<_ACEOF
19479 /* end confdefs.h.  */
19480 $ac_includes_default
19481 int
19482 main ()
19483 {
19484 if ((long *) 0)
19485   return 0;
19486 if (sizeof (long))
19487   return 0;
19488   ;
19489   return 0;
19490 }
19491 _ACEOF
19492 rm -f conftest.$ac_objext
19493 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19494   (eval $ac_compile) 2>conftest.er1
19495   ac_status=$?
19496   grep -v '^ *+' conftest.er1 >conftest.err
19497   rm -f conftest.er1
19498   cat conftest.err >&5
19499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19500   (exit $ac_status); } &&
19501          { ac_try='test -z "$ac_c_werror_flag"
19502                          || test ! -s conftest.err'
19503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19504   (eval $ac_try) 2>&5
19505   ac_status=$?
19506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19507   (exit $ac_status); }; } &&
19508          { ac_try='test -s conftest.$ac_objext'
19509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19510   (eval $ac_try) 2>&5
19511   ac_status=$?
19512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19513   (exit $ac_status); }; }; then
19514   ac_cv_type_long=yes
19515 else
19516   echo "$as_me: failed program was:" >&5
19517 sed 's/^/| /' conftest.$ac_ext >&5
19518
19519 ac_cv_type_long=no
19520 fi
19521 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19522 fi
19523 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19524 echo "${ECHO_T}$ac_cv_type_long" >&6
19525
19526 echo "$as_me:$LINENO: checking alignment of long" >&5
19527 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19528 if test "${pgac_cv_alignof_long+set}" = set; then
19529   echo $ECHO_N "(cached) $ECHO_C" >&6
19530 else
19531   if test "$ac_cv_type_long" = yes; then
19532   if test "$cross_compiling" = yes; then
19533   # Depending upon the size, compute the lo and hi bounds.
19534 cat >conftest.$ac_ext <<_ACEOF
19535 /* confdefs.h.  */
19536 _ACEOF
19537 cat confdefs.h >>conftest.$ac_ext
19538 cat >>conftest.$ac_ext <<_ACEOF
19539 /* end confdefs.h.  */
19540 $ac_includes_default
19541 struct { char filler; long field; } pgac_struct;
19542 int
19543 main ()
19544 {
19545 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19546 test_array [0] = 0
19547
19548   ;
19549   return 0;
19550 }
19551 _ACEOF
19552 rm -f conftest.$ac_objext
19553 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19554   (eval $ac_compile) 2>conftest.er1
19555   ac_status=$?
19556   grep -v '^ *+' conftest.er1 >conftest.err
19557   rm -f conftest.er1
19558   cat conftest.err >&5
19559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19560   (exit $ac_status); } &&
19561          { ac_try='test -z "$ac_c_werror_flag"
19562                          || test ! -s conftest.err'
19563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19564   (eval $ac_try) 2>&5
19565   ac_status=$?
19566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19567   (exit $ac_status); }; } &&
19568          { ac_try='test -s conftest.$ac_objext'
19569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19570   (eval $ac_try) 2>&5
19571   ac_status=$?
19572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19573   (exit $ac_status); }; }; then
19574   ac_lo=0 ac_mid=0
19575   while :; do
19576     cat >conftest.$ac_ext <<_ACEOF
19577 /* confdefs.h.  */
19578 _ACEOF
19579 cat confdefs.h >>conftest.$ac_ext
19580 cat >>conftest.$ac_ext <<_ACEOF
19581 /* end confdefs.h.  */
19582 $ac_includes_default
19583 struct { char filler; long field; } pgac_struct;
19584 int
19585 main ()
19586 {
19587 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19588 test_array [0] = 0
19589
19590   ;
19591   return 0;
19592 }
19593 _ACEOF
19594 rm -f conftest.$ac_objext
19595 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19596   (eval $ac_compile) 2>conftest.er1
19597   ac_status=$?
19598   grep -v '^ *+' conftest.er1 >conftest.err
19599   rm -f conftest.er1
19600   cat conftest.err >&5
19601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19602   (exit $ac_status); } &&
19603          { ac_try='test -z "$ac_c_werror_flag"
19604                          || test ! -s conftest.err'
19605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19606   (eval $ac_try) 2>&5
19607   ac_status=$?
19608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19609   (exit $ac_status); }; } &&
19610          { ac_try='test -s conftest.$ac_objext'
19611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19612   (eval $ac_try) 2>&5
19613   ac_status=$?
19614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19615   (exit $ac_status); }; }; then
19616   ac_hi=$ac_mid; break
19617 else
19618   echo "$as_me: failed program was:" >&5
19619 sed 's/^/| /' conftest.$ac_ext >&5
19620
19621 ac_lo=`expr $ac_mid + 1`
19622                     if test $ac_lo -le $ac_mid; then
19623                       ac_lo= ac_hi=
19624                       break
19625                     fi
19626                     ac_mid=`expr 2 '*' $ac_mid + 1`
19627 fi
19628 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19629   done
19630 else
19631   echo "$as_me: failed program was:" >&5
19632 sed 's/^/| /' conftest.$ac_ext >&5
19633
19634 cat >conftest.$ac_ext <<_ACEOF
19635 /* confdefs.h.  */
19636 _ACEOF
19637 cat confdefs.h >>conftest.$ac_ext
19638 cat >>conftest.$ac_ext <<_ACEOF
19639 /* end confdefs.h.  */
19640 $ac_includes_default
19641 struct { char filler; long field; } pgac_struct;
19642 int
19643 main ()
19644 {
19645 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19646 test_array [0] = 0
19647
19648   ;
19649   return 0;
19650 }
19651 _ACEOF
19652 rm -f conftest.$ac_objext
19653 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19654   (eval $ac_compile) 2>conftest.er1
19655   ac_status=$?
19656   grep -v '^ *+' conftest.er1 >conftest.err
19657   rm -f conftest.er1
19658   cat conftest.err >&5
19659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19660   (exit $ac_status); } &&
19661          { ac_try='test -z "$ac_c_werror_flag"
19662                          || test ! -s conftest.err'
19663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19664   (eval $ac_try) 2>&5
19665   ac_status=$?
19666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19667   (exit $ac_status); }; } &&
19668          { ac_try='test -s conftest.$ac_objext'
19669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19670   (eval $ac_try) 2>&5
19671   ac_status=$?
19672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19673   (exit $ac_status); }; }; then
19674   ac_hi=-1 ac_mid=-1
19675   while :; do
19676     cat >conftest.$ac_ext <<_ACEOF
19677 /* confdefs.h.  */
19678 _ACEOF
19679 cat confdefs.h >>conftest.$ac_ext
19680 cat >>conftest.$ac_ext <<_ACEOF
19681 /* end confdefs.h.  */
19682 $ac_includes_default
19683 struct { char filler; long field; } pgac_struct;
19684 int
19685 main ()
19686 {
19687 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19688 test_array [0] = 0
19689
19690   ;
19691   return 0;
19692 }
19693 _ACEOF
19694 rm -f conftest.$ac_objext
19695 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19696   (eval $ac_compile) 2>conftest.er1
19697   ac_status=$?
19698   grep -v '^ *+' conftest.er1 >conftest.err
19699   rm -f conftest.er1
19700   cat conftest.err >&5
19701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19702   (exit $ac_status); } &&
19703          { ac_try='test -z "$ac_c_werror_flag"
19704                          || test ! -s conftest.err'
19705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19706   (eval $ac_try) 2>&5
19707   ac_status=$?
19708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19709   (exit $ac_status); }; } &&
19710          { ac_try='test -s conftest.$ac_objext'
19711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19712   (eval $ac_try) 2>&5
19713   ac_status=$?
19714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19715   (exit $ac_status); }; }; then
19716   ac_lo=$ac_mid; break
19717 else
19718   echo "$as_me: failed program was:" >&5
19719 sed 's/^/| /' conftest.$ac_ext >&5
19720
19721 ac_hi=`expr '(' $ac_mid ')' - 1`
19722                        if test $ac_mid -le $ac_hi; then
19723                          ac_lo= ac_hi=
19724                          break
19725                        fi
19726                        ac_mid=`expr 2 '*' $ac_mid`
19727 fi
19728 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19729   done
19730 else
19731   echo "$as_me: failed program was:" >&5
19732 sed 's/^/| /' conftest.$ac_ext >&5
19733
19734 ac_lo= ac_hi=
19735 fi
19736 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19737 fi
19738 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19739 # Binary search between lo and hi bounds.
19740 while test "x$ac_lo" != "x$ac_hi"; do
19741   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19742   cat >conftest.$ac_ext <<_ACEOF
19743 /* confdefs.h.  */
19744 _ACEOF
19745 cat confdefs.h >>conftest.$ac_ext
19746 cat >>conftest.$ac_ext <<_ACEOF
19747 /* end confdefs.h.  */
19748 $ac_includes_default
19749 struct { char filler; long field; } pgac_struct;
19750 int
19751 main ()
19752 {
19753 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19754 test_array [0] = 0
19755
19756   ;
19757   return 0;
19758 }
19759 _ACEOF
19760 rm -f conftest.$ac_objext
19761 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19762   (eval $ac_compile) 2>conftest.er1
19763   ac_status=$?
19764   grep -v '^ *+' conftest.er1 >conftest.err
19765   rm -f conftest.er1
19766   cat conftest.err >&5
19767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19768   (exit $ac_status); } &&
19769          { ac_try='test -z "$ac_c_werror_flag"
19770                          || test ! -s conftest.err'
19771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19772   (eval $ac_try) 2>&5
19773   ac_status=$?
19774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19775   (exit $ac_status); }; } &&
19776          { ac_try='test -s conftest.$ac_objext'
19777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19778   (eval $ac_try) 2>&5
19779   ac_status=$?
19780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19781   (exit $ac_status); }; }; then
19782   ac_hi=$ac_mid
19783 else
19784   echo "$as_me: failed program was:" >&5
19785 sed 's/^/| /' conftest.$ac_ext >&5
19786
19787 ac_lo=`expr '(' $ac_mid ')' + 1`
19788 fi
19789 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19790 done
19791 case $ac_lo in
19792 ?*) pgac_cv_alignof_long=$ac_lo;;
19793 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19794 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19795    { (exit 1); exit 1; }; } ;;
19796 esac
19797 else
19798   if test "$cross_compiling" = yes; then
19799   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19800 See \`config.log' for more details." >&5
19801 echo "$as_me: error: cannot run test program while cross compiling
19802 See \`config.log' for more details." >&2;}
19803    { (exit 1); exit 1; }; }
19804 else
19805   cat >conftest.$ac_ext <<_ACEOF
19806 /* confdefs.h.  */
19807 _ACEOF
19808 cat confdefs.h >>conftest.$ac_ext
19809 cat >>conftest.$ac_ext <<_ACEOF
19810 /* end confdefs.h.  */
19811 $ac_includes_default
19812 struct { char filler; long field; } pgac_struct;
19813 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19814 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19815 #include <stdio.h>
19816 #include <stdlib.h>
19817 int
19818 main ()
19819 {
19820
19821   FILE *f = fopen ("conftest.val", "w");
19822   if (! f)
19823     exit (1);
19824   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19825     {
19826       long i = longval ();
19827       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19828         exit (1);
19829       fprintf (f, "%ld\n", i);
19830     }
19831   else
19832     {
19833       unsigned long i = ulongval ();
19834       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19835         exit (1);
19836       fprintf (f, "%lu\n", i);
19837     }
19838   exit (ferror (f) || fclose (f) != 0);
19839
19840   ;
19841   return 0;
19842 }
19843 _ACEOF
19844 rm -f conftest$ac_exeext
19845 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19846   (eval $ac_link) 2>&5
19847   ac_status=$?
19848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19849   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19851   (eval $ac_try) 2>&5
19852   ac_status=$?
19853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19854   (exit $ac_status); }; }; then
19855   pgac_cv_alignof_long=`cat conftest.val`
19856 else
19857   echo "$as_me: program exited with status $ac_status" >&5
19858 echo "$as_me: failed program was:" >&5
19859 sed 's/^/| /' conftest.$ac_ext >&5
19860
19861 ( exit $ac_status )
19862 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19863 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19864    { (exit 1); exit 1; }; }
19865 fi
19866 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19867 fi
19868 fi
19869 rm -f conftest.val
19870 else
19871   pgac_cv_alignof_long=0
19872 fi
19873 fi
19874 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
19875 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
19876 cat >>confdefs.h <<_ACEOF
19877 #define ALIGNOF_LONG $pgac_cv_alignof_long
19878 _ACEOF
19879
19880
19881 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
19882   echo "$as_me:$LINENO: checking for long long int" >&5
19883 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
19884 if test "${ac_cv_type_long_long_int+set}" = set; then
19885   echo $ECHO_N "(cached) $ECHO_C" >&6
19886 else
19887   cat >conftest.$ac_ext <<_ACEOF
19888 /* confdefs.h.  */
19889 _ACEOF
19890 cat confdefs.h >>conftest.$ac_ext
19891 cat >>conftest.$ac_ext <<_ACEOF
19892 /* end confdefs.h.  */
19893 $ac_includes_default
19894 int
19895 main ()
19896 {
19897 if ((long long int *) 0)
19898   return 0;
19899 if (sizeof (long long int))
19900   return 0;
19901   ;
19902   return 0;
19903 }
19904 _ACEOF
19905 rm -f conftest.$ac_objext
19906 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19907   (eval $ac_compile) 2>conftest.er1
19908   ac_status=$?
19909   grep -v '^ *+' conftest.er1 >conftest.err
19910   rm -f conftest.er1
19911   cat conftest.err >&5
19912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19913   (exit $ac_status); } &&
19914          { ac_try='test -z "$ac_c_werror_flag"
19915                          || test ! -s conftest.err'
19916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19917   (eval $ac_try) 2>&5
19918   ac_status=$?
19919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19920   (exit $ac_status); }; } &&
19921          { ac_try='test -s conftest.$ac_objext'
19922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19923   (eval $ac_try) 2>&5
19924   ac_status=$?
19925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19926   (exit $ac_status); }; }; then
19927   ac_cv_type_long_long_int=yes
19928 else
19929   echo "$as_me: failed program was:" >&5
19930 sed 's/^/| /' conftest.$ac_ext >&5
19931
19932 ac_cv_type_long_long_int=no
19933 fi
19934 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19935 fi
19936 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
19937 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
19938
19939 echo "$as_me:$LINENO: checking alignment of long long int" >&5
19940 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
19941 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
19942   echo $ECHO_N "(cached) $ECHO_C" >&6
19943 else
19944   if test "$ac_cv_type_long_long_int" = yes; then
19945   if test "$cross_compiling" = yes; then
19946   # Depending upon the size, compute the lo and hi bounds.
19947 cat >conftest.$ac_ext <<_ACEOF
19948 /* confdefs.h.  */
19949 _ACEOF
19950 cat confdefs.h >>conftest.$ac_ext
19951 cat >>conftest.$ac_ext <<_ACEOF
19952 /* end confdefs.h.  */
19953 $ac_includes_default
19954 struct { char filler; long long int field; } pgac_struct;
19955 int
19956 main ()
19957 {
19958 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19959 test_array [0] = 0
19960
19961   ;
19962   return 0;
19963 }
19964 _ACEOF
19965 rm -f conftest.$ac_objext
19966 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19967   (eval $ac_compile) 2>conftest.er1
19968   ac_status=$?
19969   grep -v '^ *+' conftest.er1 >conftest.err
19970   rm -f conftest.er1
19971   cat conftest.err >&5
19972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19973   (exit $ac_status); } &&
19974          { ac_try='test -z "$ac_c_werror_flag"
19975                          || test ! -s conftest.err'
19976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19977   (eval $ac_try) 2>&5
19978   ac_status=$?
19979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19980   (exit $ac_status); }; } &&
19981          { ac_try='test -s conftest.$ac_objext'
19982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19983   (eval $ac_try) 2>&5
19984   ac_status=$?
19985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19986   (exit $ac_status); }; }; then
19987   ac_lo=0 ac_mid=0
19988   while :; do
19989     cat >conftest.$ac_ext <<_ACEOF
19990 /* confdefs.h.  */
19991 _ACEOF
19992 cat confdefs.h >>conftest.$ac_ext
19993 cat >>conftest.$ac_ext <<_ACEOF
19994 /* end confdefs.h.  */
19995 $ac_includes_default
19996 struct { char filler; long long int field; } pgac_struct;
19997 int
19998 main ()
19999 {
20000 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20001 test_array [0] = 0
20002
20003   ;
20004   return 0;
20005 }
20006 _ACEOF
20007 rm -f conftest.$ac_objext
20008 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20009   (eval $ac_compile) 2>conftest.er1
20010   ac_status=$?
20011   grep -v '^ *+' conftest.er1 >conftest.err
20012   rm -f conftest.er1
20013   cat conftest.err >&5
20014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20015   (exit $ac_status); } &&
20016          { ac_try='test -z "$ac_c_werror_flag"
20017                          || test ! -s conftest.err'
20018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20019   (eval $ac_try) 2>&5
20020   ac_status=$?
20021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20022   (exit $ac_status); }; } &&
20023          { ac_try='test -s conftest.$ac_objext'
20024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20025   (eval $ac_try) 2>&5
20026   ac_status=$?
20027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20028   (exit $ac_status); }; }; then
20029   ac_hi=$ac_mid; break
20030 else
20031   echo "$as_me: failed program was:" >&5
20032 sed 's/^/| /' conftest.$ac_ext >&5
20033
20034 ac_lo=`expr $ac_mid + 1`
20035                     if test $ac_lo -le $ac_mid; then
20036                       ac_lo= ac_hi=
20037                       break
20038                     fi
20039                     ac_mid=`expr 2 '*' $ac_mid + 1`
20040 fi
20041 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20042   done
20043 else
20044   echo "$as_me: failed program was:" >&5
20045 sed 's/^/| /' conftest.$ac_ext >&5
20046
20047 cat >conftest.$ac_ext <<_ACEOF
20048 /* confdefs.h.  */
20049 _ACEOF
20050 cat confdefs.h >>conftest.$ac_ext
20051 cat >>conftest.$ac_ext <<_ACEOF
20052 /* end confdefs.h.  */
20053 $ac_includes_default
20054 struct { char filler; long long int field; } pgac_struct;
20055 int
20056 main ()
20057 {
20058 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20059 test_array [0] = 0
20060
20061   ;
20062   return 0;
20063 }
20064 _ACEOF
20065 rm -f conftest.$ac_objext
20066 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20067   (eval $ac_compile) 2>conftest.er1
20068   ac_status=$?
20069   grep -v '^ *+' conftest.er1 >conftest.err
20070   rm -f conftest.er1
20071   cat conftest.err >&5
20072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20073   (exit $ac_status); } &&
20074          { ac_try='test -z "$ac_c_werror_flag"
20075                          || test ! -s conftest.err'
20076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20077   (eval $ac_try) 2>&5
20078   ac_status=$?
20079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20080   (exit $ac_status); }; } &&
20081          { ac_try='test -s conftest.$ac_objext'
20082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20083   (eval $ac_try) 2>&5
20084   ac_status=$?
20085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20086   (exit $ac_status); }; }; then
20087   ac_hi=-1 ac_mid=-1
20088   while :; do
20089     cat >conftest.$ac_ext <<_ACEOF
20090 /* confdefs.h.  */
20091 _ACEOF
20092 cat confdefs.h >>conftest.$ac_ext
20093 cat >>conftest.$ac_ext <<_ACEOF
20094 /* end confdefs.h.  */
20095 $ac_includes_default
20096 struct { char filler; long long int field; } pgac_struct;
20097 int
20098 main ()
20099 {
20100 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20101 test_array [0] = 0
20102
20103   ;
20104   return 0;
20105 }
20106 _ACEOF
20107 rm -f conftest.$ac_objext
20108 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20109   (eval $ac_compile) 2>conftest.er1
20110   ac_status=$?
20111   grep -v '^ *+' conftest.er1 >conftest.err
20112   rm -f conftest.er1
20113   cat conftest.err >&5
20114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20115   (exit $ac_status); } &&
20116          { ac_try='test -z "$ac_c_werror_flag"
20117                          || test ! -s conftest.err'
20118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20119   (eval $ac_try) 2>&5
20120   ac_status=$?
20121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20122   (exit $ac_status); }; } &&
20123          { ac_try='test -s conftest.$ac_objext'
20124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20125   (eval $ac_try) 2>&5
20126   ac_status=$?
20127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20128   (exit $ac_status); }; }; then
20129   ac_lo=$ac_mid; break
20130 else
20131   echo "$as_me: failed program was:" >&5
20132 sed 's/^/| /' conftest.$ac_ext >&5
20133
20134 ac_hi=`expr '(' $ac_mid ')' - 1`
20135                        if test $ac_mid -le $ac_hi; then
20136                          ac_lo= ac_hi=
20137                          break
20138                        fi
20139                        ac_mid=`expr 2 '*' $ac_mid`
20140 fi
20141 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20142   done
20143 else
20144   echo "$as_me: failed program was:" >&5
20145 sed 's/^/| /' conftest.$ac_ext >&5
20146
20147 ac_lo= ac_hi=
20148 fi
20149 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20150 fi
20151 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20152 # Binary search between lo and hi bounds.
20153 while test "x$ac_lo" != "x$ac_hi"; do
20154   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20155   cat >conftest.$ac_ext <<_ACEOF
20156 /* confdefs.h.  */
20157 _ACEOF
20158 cat confdefs.h >>conftest.$ac_ext
20159 cat >>conftest.$ac_ext <<_ACEOF
20160 /* end confdefs.h.  */
20161 $ac_includes_default
20162 struct { char filler; long long int field; } pgac_struct;
20163 int
20164 main ()
20165 {
20166 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20167 test_array [0] = 0
20168
20169   ;
20170   return 0;
20171 }
20172 _ACEOF
20173 rm -f conftest.$ac_objext
20174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20175   (eval $ac_compile) 2>conftest.er1
20176   ac_status=$?
20177   grep -v '^ *+' conftest.er1 >conftest.err
20178   rm -f conftest.er1
20179   cat conftest.err >&5
20180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20181   (exit $ac_status); } &&
20182          { ac_try='test -z "$ac_c_werror_flag"
20183                          || test ! -s conftest.err'
20184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20185   (eval $ac_try) 2>&5
20186   ac_status=$?
20187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20188   (exit $ac_status); }; } &&
20189          { ac_try='test -s conftest.$ac_objext'
20190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20191   (eval $ac_try) 2>&5
20192   ac_status=$?
20193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20194   (exit $ac_status); }; }; then
20195   ac_hi=$ac_mid
20196 else
20197   echo "$as_me: failed program was:" >&5
20198 sed 's/^/| /' conftest.$ac_ext >&5
20199
20200 ac_lo=`expr '(' $ac_mid ')' + 1`
20201 fi
20202 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20203 done
20204 case $ac_lo in
20205 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20206 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20207 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20208    { (exit 1); exit 1; }; } ;;
20209 esac
20210 else
20211   if test "$cross_compiling" = yes; then
20212   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20213 See \`config.log' for more details." >&5
20214 echo "$as_me: error: cannot run test program while cross compiling
20215 See \`config.log' for more details." >&2;}
20216    { (exit 1); exit 1; }; }
20217 else
20218   cat >conftest.$ac_ext <<_ACEOF
20219 /* confdefs.h.  */
20220 _ACEOF
20221 cat confdefs.h >>conftest.$ac_ext
20222 cat >>conftest.$ac_ext <<_ACEOF
20223 /* end confdefs.h.  */
20224 $ac_includes_default
20225 struct { char filler; long long int field; } pgac_struct;
20226 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20227 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20228 #include <stdio.h>
20229 #include <stdlib.h>
20230 int
20231 main ()
20232 {
20233
20234   FILE *f = fopen ("conftest.val", "w");
20235   if (! f)
20236     exit (1);
20237   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20238     {
20239       long i = longval ();
20240       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20241         exit (1);
20242       fprintf (f, "%ld\n", i);
20243     }
20244   else
20245     {
20246       unsigned long i = ulongval ();
20247       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20248         exit (1);
20249       fprintf (f, "%lu\n", i);
20250     }
20251   exit (ferror (f) || fclose (f) != 0);
20252
20253   ;
20254   return 0;
20255 }
20256 _ACEOF
20257 rm -f conftest$ac_exeext
20258 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20259   (eval $ac_link) 2>&5
20260   ac_status=$?
20261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20262   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20264   (eval $ac_try) 2>&5
20265   ac_status=$?
20266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20267   (exit $ac_status); }; }; then
20268   pgac_cv_alignof_long_long_int=`cat conftest.val`
20269 else
20270   echo "$as_me: program exited with status $ac_status" >&5
20271 echo "$as_me: failed program was:" >&5
20272 sed 's/^/| /' conftest.$ac_ext >&5
20273
20274 ( exit $ac_status )
20275 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20276 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20277    { (exit 1); exit 1; }; }
20278 fi
20279 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20280 fi
20281 fi
20282 rm -f conftest.val
20283 else
20284   pgac_cv_alignof_long_long_int=0
20285 fi
20286 fi
20287 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20288 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20289 cat >>confdefs.h <<_ACEOF
20290 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20291 _ACEOF
20292
20293
20294 fi
20295 echo "$as_me:$LINENO: checking for double" >&5
20296 echo $ECHO_N "checking for double... $ECHO_C" >&6
20297 if test "${ac_cv_type_double+set}" = set; then
20298   echo $ECHO_N "(cached) $ECHO_C" >&6
20299 else
20300   cat >conftest.$ac_ext <<_ACEOF
20301 /* confdefs.h.  */
20302 _ACEOF
20303 cat confdefs.h >>conftest.$ac_ext
20304 cat >>conftest.$ac_ext <<_ACEOF
20305 /* end confdefs.h.  */
20306 $ac_includes_default
20307 int
20308 main ()
20309 {
20310 if ((double *) 0)
20311   return 0;
20312 if (sizeof (double))
20313   return 0;
20314   ;
20315   return 0;
20316 }
20317 _ACEOF
20318 rm -f conftest.$ac_objext
20319 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20320   (eval $ac_compile) 2>conftest.er1
20321   ac_status=$?
20322   grep -v '^ *+' conftest.er1 >conftest.err
20323   rm -f conftest.er1
20324   cat conftest.err >&5
20325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20326   (exit $ac_status); } &&
20327          { ac_try='test -z "$ac_c_werror_flag"
20328                          || test ! -s conftest.err'
20329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20330   (eval $ac_try) 2>&5
20331   ac_status=$?
20332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20333   (exit $ac_status); }; } &&
20334          { ac_try='test -s conftest.$ac_objext'
20335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20336   (eval $ac_try) 2>&5
20337   ac_status=$?
20338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20339   (exit $ac_status); }; }; then
20340   ac_cv_type_double=yes
20341 else
20342   echo "$as_me: failed program was:" >&5
20343 sed 's/^/| /' conftest.$ac_ext >&5
20344
20345 ac_cv_type_double=no
20346 fi
20347 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20348 fi
20349 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20350 echo "${ECHO_T}$ac_cv_type_double" >&6
20351
20352 echo "$as_me:$LINENO: checking alignment of double" >&5
20353 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20354 if test "${pgac_cv_alignof_double+set}" = set; then
20355   echo $ECHO_N "(cached) $ECHO_C" >&6
20356 else
20357   if test "$ac_cv_type_double" = yes; then
20358   if test "$cross_compiling" = yes; then
20359   # Depending upon the size, compute the lo and hi bounds.
20360 cat >conftest.$ac_ext <<_ACEOF
20361 /* confdefs.h.  */
20362 _ACEOF
20363 cat confdefs.h >>conftest.$ac_ext
20364 cat >>conftest.$ac_ext <<_ACEOF
20365 /* end confdefs.h.  */
20366 $ac_includes_default
20367 struct { char filler; double field; } pgac_struct;
20368 int
20369 main ()
20370 {
20371 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20372 test_array [0] = 0
20373
20374   ;
20375   return 0;
20376 }
20377 _ACEOF
20378 rm -f conftest.$ac_objext
20379 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20380   (eval $ac_compile) 2>conftest.er1
20381   ac_status=$?
20382   grep -v '^ *+' conftest.er1 >conftest.err
20383   rm -f conftest.er1
20384   cat conftest.err >&5
20385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20386   (exit $ac_status); } &&
20387          { ac_try='test -z "$ac_c_werror_flag"
20388                          || test ! -s conftest.err'
20389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20390   (eval $ac_try) 2>&5
20391   ac_status=$?
20392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20393   (exit $ac_status); }; } &&
20394          { ac_try='test -s conftest.$ac_objext'
20395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20396   (eval $ac_try) 2>&5
20397   ac_status=$?
20398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20399   (exit $ac_status); }; }; then
20400   ac_lo=0 ac_mid=0
20401   while :; do
20402     cat >conftest.$ac_ext <<_ACEOF
20403 /* confdefs.h.  */
20404 _ACEOF
20405 cat confdefs.h >>conftest.$ac_ext
20406 cat >>conftest.$ac_ext <<_ACEOF
20407 /* end confdefs.h.  */
20408 $ac_includes_default
20409 struct { char filler; double field; } pgac_struct;
20410 int
20411 main ()
20412 {
20413 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20414 test_array [0] = 0
20415
20416   ;
20417   return 0;
20418 }
20419 _ACEOF
20420 rm -f conftest.$ac_objext
20421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20422   (eval $ac_compile) 2>conftest.er1
20423   ac_status=$?
20424   grep -v '^ *+' conftest.er1 >conftest.err
20425   rm -f conftest.er1
20426   cat conftest.err >&5
20427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20428   (exit $ac_status); } &&
20429          { ac_try='test -z "$ac_c_werror_flag"
20430                          || test ! -s conftest.err'
20431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20432   (eval $ac_try) 2>&5
20433   ac_status=$?
20434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20435   (exit $ac_status); }; } &&
20436          { ac_try='test -s conftest.$ac_objext'
20437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20438   (eval $ac_try) 2>&5
20439   ac_status=$?
20440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20441   (exit $ac_status); }; }; then
20442   ac_hi=$ac_mid; break
20443 else
20444   echo "$as_me: failed program was:" >&5
20445 sed 's/^/| /' conftest.$ac_ext >&5
20446
20447 ac_lo=`expr $ac_mid + 1`
20448                     if test $ac_lo -le $ac_mid; then
20449                       ac_lo= ac_hi=
20450                       break
20451                     fi
20452                     ac_mid=`expr 2 '*' $ac_mid + 1`
20453 fi
20454 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20455   done
20456 else
20457   echo "$as_me: failed program was:" >&5
20458 sed 's/^/| /' conftest.$ac_ext >&5
20459
20460 cat >conftest.$ac_ext <<_ACEOF
20461 /* confdefs.h.  */
20462 _ACEOF
20463 cat confdefs.h >>conftest.$ac_ext
20464 cat >>conftest.$ac_ext <<_ACEOF
20465 /* end confdefs.h.  */
20466 $ac_includes_default
20467 struct { char filler; double field; } pgac_struct;
20468 int
20469 main ()
20470 {
20471 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20472 test_array [0] = 0
20473
20474   ;
20475   return 0;
20476 }
20477 _ACEOF
20478 rm -f conftest.$ac_objext
20479 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20480   (eval $ac_compile) 2>conftest.er1
20481   ac_status=$?
20482   grep -v '^ *+' conftest.er1 >conftest.err
20483   rm -f conftest.er1
20484   cat conftest.err >&5
20485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20486   (exit $ac_status); } &&
20487          { ac_try='test -z "$ac_c_werror_flag"
20488                          || test ! -s conftest.err'
20489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20490   (eval $ac_try) 2>&5
20491   ac_status=$?
20492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20493   (exit $ac_status); }; } &&
20494          { ac_try='test -s conftest.$ac_objext'
20495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20496   (eval $ac_try) 2>&5
20497   ac_status=$?
20498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20499   (exit $ac_status); }; }; then
20500   ac_hi=-1 ac_mid=-1
20501   while :; do
20502     cat >conftest.$ac_ext <<_ACEOF
20503 /* confdefs.h.  */
20504 _ACEOF
20505 cat confdefs.h >>conftest.$ac_ext
20506 cat >>conftest.$ac_ext <<_ACEOF
20507 /* end confdefs.h.  */
20508 $ac_includes_default
20509 struct { char filler; double field; } pgac_struct;
20510 int
20511 main ()
20512 {
20513 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20514 test_array [0] = 0
20515
20516   ;
20517   return 0;
20518 }
20519 _ACEOF
20520 rm -f conftest.$ac_objext
20521 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20522   (eval $ac_compile) 2>conftest.er1
20523   ac_status=$?
20524   grep -v '^ *+' conftest.er1 >conftest.err
20525   rm -f conftest.er1
20526   cat conftest.err >&5
20527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20528   (exit $ac_status); } &&
20529          { ac_try='test -z "$ac_c_werror_flag"
20530                          || test ! -s conftest.err'
20531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20532   (eval $ac_try) 2>&5
20533   ac_status=$?
20534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20535   (exit $ac_status); }; } &&
20536          { ac_try='test -s conftest.$ac_objext'
20537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20538   (eval $ac_try) 2>&5
20539   ac_status=$?
20540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20541   (exit $ac_status); }; }; then
20542   ac_lo=$ac_mid; break
20543 else
20544   echo "$as_me: failed program was:" >&5
20545 sed 's/^/| /' conftest.$ac_ext >&5
20546
20547 ac_hi=`expr '(' $ac_mid ')' - 1`
20548                        if test $ac_mid -le $ac_hi; then
20549                          ac_lo= ac_hi=
20550                          break
20551                        fi
20552                        ac_mid=`expr 2 '*' $ac_mid`
20553 fi
20554 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20555   done
20556 else
20557   echo "$as_me: failed program was:" >&5
20558 sed 's/^/| /' conftest.$ac_ext >&5
20559
20560 ac_lo= ac_hi=
20561 fi
20562 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20563 fi
20564 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20565 # Binary search between lo and hi bounds.
20566 while test "x$ac_lo" != "x$ac_hi"; do
20567   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20568   cat >conftest.$ac_ext <<_ACEOF
20569 /* confdefs.h.  */
20570 _ACEOF
20571 cat confdefs.h >>conftest.$ac_ext
20572 cat >>conftest.$ac_ext <<_ACEOF
20573 /* end confdefs.h.  */
20574 $ac_includes_default
20575 struct { char filler; double field; } pgac_struct;
20576 int
20577 main ()
20578 {
20579 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20580 test_array [0] = 0
20581
20582   ;
20583   return 0;
20584 }
20585 _ACEOF
20586 rm -f conftest.$ac_objext
20587 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20588   (eval $ac_compile) 2>conftest.er1
20589   ac_status=$?
20590   grep -v '^ *+' conftest.er1 >conftest.err
20591   rm -f conftest.er1
20592   cat conftest.err >&5
20593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20594   (exit $ac_status); } &&
20595          { ac_try='test -z "$ac_c_werror_flag"
20596                          || test ! -s conftest.err'
20597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20598   (eval $ac_try) 2>&5
20599   ac_status=$?
20600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20601   (exit $ac_status); }; } &&
20602          { ac_try='test -s conftest.$ac_objext'
20603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20604   (eval $ac_try) 2>&5
20605   ac_status=$?
20606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20607   (exit $ac_status); }; }; then
20608   ac_hi=$ac_mid
20609 else
20610   echo "$as_me: failed program was:" >&5
20611 sed 's/^/| /' conftest.$ac_ext >&5
20612
20613 ac_lo=`expr '(' $ac_mid ')' + 1`
20614 fi
20615 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20616 done
20617 case $ac_lo in
20618 ?*) pgac_cv_alignof_double=$ac_lo;;
20619 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20620 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20621    { (exit 1); exit 1; }; } ;;
20622 esac
20623 else
20624   if test "$cross_compiling" = yes; then
20625   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20626 See \`config.log' for more details." >&5
20627 echo "$as_me: error: cannot run test program while cross compiling
20628 See \`config.log' for more details." >&2;}
20629    { (exit 1); exit 1; }; }
20630 else
20631   cat >conftest.$ac_ext <<_ACEOF
20632 /* confdefs.h.  */
20633 _ACEOF
20634 cat confdefs.h >>conftest.$ac_ext
20635 cat >>conftest.$ac_ext <<_ACEOF
20636 /* end confdefs.h.  */
20637 $ac_includes_default
20638 struct { char filler; double field; } pgac_struct;
20639 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20640 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20641 #include <stdio.h>
20642 #include <stdlib.h>
20643 int
20644 main ()
20645 {
20646
20647   FILE *f = fopen ("conftest.val", "w");
20648   if (! f)
20649     exit (1);
20650   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20651     {
20652       long i = longval ();
20653       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20654         exit (1);
20655       fprintf (f, "%ld\n", i);
20656     }
20657   else
20658     {
20659       unsigned long i = ulongval ();
20660       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20661         exit (1);
20662       fprintf (f, "%lu\n", i);
20663     }
20664   exit (ferror (f) || fclose (f) != 0);
20665
20666   ;
20667   return 0;
20668 }
20669 _ACEOF
20670 rm -f conftest$ac_exeext
20671 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20672   (eval $ac_link) 2>&5
20673   ac_status=$?
20674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20675   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20677   (eval $ac_try) 2>&5
20678   ac_status=$?
20679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20680   (exit $ac_status); }; }; then
20681   pgac_cv_alignof_double=`cat conftest.val`
20682 else
20683   echo "$as_me: program exited with status $ac_status" >&5
20684 echo "$as_me: failed program was:" >&5
20685 sed 's/^/| /' conftest.$ac_ext >&5
20686
20687 ( exit $ac_status )
20688 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20689 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20690    { (exit 1); exit 1; }; }
20691 fi
20692 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20693 fi
20694 fi
20695 rm -f conftest.val
20696 else
20697   pgac_cv_alignof_double=0
20698 fi
20699 fi
20700 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20701 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20702 cat >>confdefs.h <<_ACEOF
20703 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20704 _ACEOF
20705
20706
20707
20708 # Compute maximum alignment of any basic type.
20709 # We assume long's alignment is at least as strong as char, short, or int;
20710 # but we must check long long (if it exists) and double.
20711
20712 MAX_ALIGNOF=$pgac_cv_alignof_long
20713 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20714   MAX_ALIGNOF=$pgac_cv_alignof_double
20715 fi
20716 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20717   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20718 fi
20719
20720 cat >>confdefs.h <<_ACEOF
20721 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20722 _ACEOF
20723
20724
20725
20726 # Some platforms predefine the types int8, int16, etc.  Only check
20727 # a (hopefully) representative subset.
20728 echo "$as_me:$LINENO: checking for int8" >&5
20729 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20730 if test "${ac_cv_type_int8+set}" = set; then
20731   echo $ECHO_N "(cached) $ECHO_C" >&6
20732 else
20733   cat >conftest.$ac_ext <<_ACEOF
20734 /* confdefs.h.  */
20735 _ACEOF
20736 cat confdefs.h >>conftest.$ac_ext
20737 cat >>conftest.$ac_ext <<_ACEOF
20738 /* end confdefs.h.  */
20739 #include <stdio.h>
20740 #ifdef HAVE_SUPPORTDEFS_H
20741 #include <SupportDefs.h>
20742 #endif
20743
20744 int
20745 main ()
20746 {
20747 if ((int8 *) 0)
20748   return 0;
20749 if (sizeof (int8))
20750   return 0;
20751   ;
20752   return 0;
20753 }
20754 _ACEOF
20755 rm -f conftest.$ac_objext
20756 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20757   (eval $ac_compile) 2>conftest.er1
20758   ac_status=$?
20759   grep -v '^ *+' conftest.er1 >conftest.err
20760   rm -f conftest.er1
20761   cat conftest.err >&5
20762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20763   (exit $ac_status); } &&
20764          { ac_try='test -z "$ac_c_werror_flag"
20765                          || test ! -s conftest.err'
20766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20767   (eval $ac_try) 2>&5
20768   ac_status=$?
20769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20770   (exit $ac_status); }; } &&
20771          { ac_try='test -s conftest.$ac_objext'
20772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20773   (eval $ac_try) 2>&5
20774   ac_status=$?
20775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20776   (exit $ac_status); }; }; then
20777   ac_cv_type_int8=yes
20778 else
20779   echo "$as_me: failed program was:" >&5
20780 sed 's/^/| /' conftest.$ac_ext >&5
20781
20782 ac_cv_type_int8=no
20783 fi
20784 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20785 fi
20786 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20787 echo "${ECHO_T}$ac_cv_type_int8" >&6
20788 if test $ac_cv_type_int8 = yes; then
20789
20790 cat >>confdefs.h <<_ACEOF
20791 #define HAVE_INT8 1
20792 _ACEOF
20793
20794
20795 fi
20796 echo "$as_me:$LINENO: checking for uint8" >&5
20797 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20798 if test "${ac_cv_type_uint8+set}" = set; then
20799   echo $ECHO_N "(cached) $ECHO_C" >&6
20800 else
20801   cat >conftest.$ac_ext <<_ACEOF
20802 /* confdefs.h.  */
20803 _ACEOF
20804 cat confdefs.h >>conftest.$ac_ext
20805 cat >>conftest.$ac_ext <<_ACEOF
20806 /* end confdefs.h.  */
20807 #include <stdio.h>
20808 #ifdef HAVE_SUPPORTDEFS_H
20809 #include <SupportDefs.h>
20810 #endif
20811
20812 int
20813 main ()
20814 {
20815 if ((uint8 *) 0)
20816   return 0;
20817 if (sizeof (uint8))
20818   return 0;
20819   ;
20820   return 0;
20821 }
20822 _ACEOF
20823 rm -f conftest.$ac_objext
20824 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20825   (eval $ac_compile) 2>conftest.er1
20826   ac_status=$?
20827   grep -v '^ *+' conftest.er1 >conftest.err
20828   rm -f conftest.er1
20829   cat conftest.err >&5
20830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20831   (exit $ac_status); } &&
20832          { ac_try='test -z "$ac_c_werror_flag"
20833                          || test ! -s conftest.err'
20834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20835   (eval $ac_try) 2>&5
20836   ac_status=$?
20837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20838   (exit $ac_status); }; } &&
20839          { ac_try='test -s conftest.$ac_objext'
20840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20841   (eval $ac_try) 2>&5
20842   ac_status=$?
20843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20844   (exit $ac_status); }; }; then
20845   ac_cv_type_uint8=yes
20846 else
20847   echo "$as_me: failed program was:" >&5
20848 sed 's/^/| /' conftest.$ac_ext >&5
20849
20850 ac_cv_type_uint8=no
20851 fi
20852 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20853 fi
20854 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20855 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20856 if test $ac_cv_type_uint8 = yes; then
20857
20858 cat >>confdefs.h <<_ACEOF
20859 #define HAVE_UINT8 1
20860 _ACEOF
20861
20862
20863 fi
20864 echo "$as_me:$LINENO: checking for int64" >&5
20865 echo $ECHO_N "checking for int64... $ECHO_C" >&6
20866 if test "${ac_cv_type_int64+set}" = set; then
20867   echo $ECHO_N "(cached) $ECHO_C" >&6
20868 else
20869   cat >conftest.$ac_ext <<_ACEOF
20870 /* confdefs.h.  */
20871 _ACEOF
20872 cat confdefs.h >>conftest.$ac_ext
20873 cat >>conftest.$ac_ext <<_ACEOF
20874 /* end confdefs.h.  */
20875 #include <stdio.h>
20876 #ifdef HAVE_SUPPORTDEFS_H
20877 #include <SupportDefs.h>
20878 #endif
20879
20880 int
20881 main ()
20882 {
20883 if ((int64 *) 0)
20884   return 0;
20885 if (sizeof (int64))
20886   return 0;
20887   ;
20888   return 0;
20889 }
20890 _ACEOF
20891 rm -f conftest.$ac_objext
20892 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20893   (eval $ac_compile) 2>conftest.er1
20894   ac_status=$?
20895   grep -v '^ *+' conftest.er1 >conftest.err
20896   rm -f conftest.er1
20897   cat conftest.err >&5
20898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20899   (exit $ac_status); } &&
20900          { ac_try='test -z "$ac_c_werror_flag"
20901                          || test ! -s conftest.err'
20902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20903   (eval $ac_try) 2>&5
20904   ac_status=$?
20905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20906   (exit $ac_status); }; } &&
20907          { ac_try='test -s conftest.$ac_objext'
20908   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20909   (eval $ac_try) 2>&5
20910   ac_status=$?
20911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20912   (exit $ac_status); }; }; then
20913   ac_cv_type_int64=yes
20914 else
20915   echo "$as_me: failed program was:" >&5
20916 sed 's/^/| /' conftest.$ac_ext >&5
20917
20918 ac_cv_type_int64=no
20919 fi
20920 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20921 fi
20922 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
20923 echo "${ECHO_T}$ac_cv_type_int64" >&6
20924 if test $ac_cv_type_int64 = yes; then
20925
20926 cat >>confdefs.h <<_ACEOF
20927 #define HAVE_INT64 1
20928 _ACEOF
20929
20930
20931 fi
20932 echo "$as_me:$LINENO: checking for uint64" >&5
20933 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
20934 if test "${ac_cv_type_uint64+set}" = set; then
20935   echo $ECHO_N "(cached) $ECHO_C" >&6
20936 else
20937   cat >conftest.$ac_ext <<_ACEOF
20938 /* confdefs.h.  */
20939 _ACEOF
20940 cat confdefs.h >>conftest.$ac_ext
20941 cat >>conftest.$ac_ext <<_ACEOF
20942 /* end confdefs.h.  */
20943 #include <stdio.h>
20944 #ifdef HAVE_SUPPORTDEFS_H
20945 #include <SupportDefs.h>
20946 #endif
20947
20948 int
20949 main ()
20950 {
20951 if ((uint64 *) 0)
20952   return 0;
20953 if (sizeof (uint64))
20954   return 0;
20955   ;
20956   return 0;
20957 }
20958 _ACEOF
20959 rm -f conftest.$ac_objext
20960 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20961   (eval $ac_compile) 2>conftest.er1
20962   ac_status=$?
20963   grep -v '^ *+' conftest.er1 >conftest.err
20964   rm -f conftest.er1
20965   cat conftest.err >&5
20966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20967   (exit $ac_status); } &&
20968          { ac_try='test -z "$ac_c_werror_flag"
20969                          || test ! -s conftest.err'
20970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20971   (eval $ac_try) 2>&5
20972   ac_status=$?
20973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20974   (exit $ac_status); }; } &&
20975          { ac_try='test -s conftest.$ac_objext'
20976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20977   (eval $ac_try) 2>&5
20978   ac_status=$?
20979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20980   (exit $ac_status); }; }; then
20981   ac_cv_type_uint64=yes
20982 else
20983   echo "$as_me: failed program was:" >&5
20984 sed 's/^/| /' conftest.$ac_ext >&5
20985
20986 ac_cv_type_uint64=no
20987 fi
20988 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20989 fi
20990 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
20991 echo "${ECHO_T}$ac_cv_type_uint64" >&6
20992 if test $ac_cv_type_uint64 = yes; then
20993
20994 cat >>confdefs.h <<_ACEOF
20995 #define HAVE_UINT64 1
20996 _ACEOF
20997
20998
20999 fi
21000
21001
21002 # We also check for sig_atomic_t, which *should* be defined per ANSI
21003 # C, but is missing on some old platforms.
21004 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
21005 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
21006 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
21007   echo $ECHO_N "(cached) $ECHO_C" >&6
21008 else
21009   cat >conftest.$ac_ext <<_ACEOF
21010 /* confdefs.h.  */
21011 _ACEOF
21012 cat confdefs.h >>conftest.$ac_ext
21013 cat >>conftest.$ac_ext <<_ACEOF
21014 /* end confdefs.h.  */
21015 #include <signal.h>
21016
21017 int
21018 main ()
21019 {
21020 if ((sig_atomic_t *) 0)
21021   return 0;
21022 if (sizeof (sig_atomic_t))
21023   return 0;
21024   ;
21025   return 0;
21026 }
21027 _ACEOF
21028 rm -f conftest.$ac_objext
21029 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21030   (eval $ac_compile) 2>conftest.er1
21031   ac_status=$?
21032   grep -v '^ *+' conftest.er1 >conftest.err
21033   rm -f conftest.er1
21034   cat conftest.err >&5
21035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21036   (exit $ac_status); } &&
21037          { ac_try='test -z "$ac_c_werror_flag"
21038                          || test ! -s conftest.err'
21039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21040   (eval $ac_try) 2>&5
21041   ac_status=$?
21042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21043   (exit $ac_status); }; } &&
21044          { ac_try='test -s conftest.$ac_objext'
21045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21046   (eval $ac_try) 2>&5
21047   ac_status=$?
21048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21049   (exit $ac_status); }; }; then
21050   ac_cv_type_sig_atomic_t=yes
21051 else
21052   echo "$as_me: failed program was:" >&5
21053 sed 's/^/| /' conftest.$ac_ext >&5
21054
21055 ac_cv_type_sig_atomic_t=no
21056 fi
21057 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21058 fi
21059 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21060 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21061 if test $ac_cv_type_sig_atomic_t = yes; then
21062
21063 cat >>confdefs.h <<_ACEOF
21064 #define HAVE_SIG_ATOMIC_T 1
21065 _ACEOF
21066
21067
21068 fi
21069
21070
21071
21072 if test x"$template" != x"win32"
21073 then
21074 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21075 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21076 if test "${pgac_cv_func_posix_signals+set}" = set; then
21077   echo $ECHO_N "(cached) $ECHO_C" >&6
21078 else
21079   cat >conftest.$ac_ext <<_ACEOF
21080 /* confdefs.h.  */
21081 _ACEOF
21082 cat confdefs.h >>conftest.$ac_ext
21083 cat >>conftest.$ac_ext <<_ACEOF
21084 /* end confdefs.h.  */
21085 #include <signal.h>
21086
21087 int
21088 main ()
21089 {
21090 struct sigaction act, oact;
21091 sigemptyset(&act.sa_mask);
21092 act.sa_flags = SA_RESTART;
21093 sigaction(0, &act, &oact);
21094   ;
21095   return 0;
21096 }
21097 _ACEOF
21098 rm -f conftest.$ac_objext conftest$ac_exeext
21099 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21100   (eval $ac_link) 2>conftest.er1
21101   ac_status=$?
21102   grep -v '^ *+' conftest.er1 >conftest.err
21103   rm -f conftest.er1
21104   cat conftest.err >&5
21105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21106   (exit $ac_status); } &&
21107          { ac_try='test -z "$ac_c_werror_flag"
21108                          || test ! -s conftest.err'
21109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21110   (eval $ac_try) 2>&5
21111   ac_status=$?
21112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21113   (exit $ac_status); }; } &&
21114          { ac_try='test -s conftest$ac_exeext'
21115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21116   (eval $ac_try) 2>&5
21117   ac_status=$?
21118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21119   (exit $ac_status); }; }; then
21120   pgac_cv_func_posix_signals=yes
21121 else
21122   echo "$as_me: failed program was:" >&5
21123 sed 's/^/| /' conftest.$ac_ext >&5
21124
21125 pgac_cv_func_posix_signals=no
21126 fi
21127 rm -f conftest.err conftest.$ac_objext \
21128       conftest$ac_exeext conftest.$ac_ext
21129 fi
21130 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21131 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21132 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21133
21134 cat >>confdefs.h <<\_ACEOF
21135 #define HAVE_POSIX_SIGNALS
21136 _ACEOF
21137
21138 fi
21139 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21140
21141 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21142   { { echo "$as_me:$LINENO: error:
21143 *** Thread-safety requires POSIX signals, which are not supported by your
21144 *** operating system.
21145 " >&5
21146 echo "$as_me: error:
21147 *** Thread-safety requires POSIX signals, which are not supported by your
21148 *** operating system.
21149 " >&2;}
21150    { (exit 1); exit 1; }; }
21151 fi
21152 fi
21153
21154 if test $ac_cv_func_fseeko = yes; then
21155 # Check whether --enable-largefile or --disable-largefile was given.
21156 if test "${enable_largefile+set}" = set; then
21157   enableval="$enable_largefile"
21158
21159 fi;
21160 if test "$enable_largefile" != no; then
21161
21162   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21163 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21164 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21165   echo $ECHO_N "(cached) $ECHO_C" >&6
21166 else
21167   ac_cv_sys_largefile_CC=no
21168      if test "$GCC" != yes; then
21169        ac_save_CC=$CC
21170        while :; do
21171          # IRIX 6.2 and later do not support large files by default,
21172          # so use the C compiler's -n32 option if that helps.
21173          cat >conftest.$ac_ext <<_ACEOF
21174 /* confdefs.h.  */
21175 _ACEOF
21176 cat confdefs.h >>conftest.$ac_ext
21177 cat >>conftest.$ac_ext <<_ACEOF
21178 /* end confdefs.h.  */
21179 #include <sys/types.h>
21180  /* Check that off_t can represent 2**63 - 1 correctly.
21181     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21182     since some C++ compilers masquerading as C compilers
21183     incorrectly reject 9223372036854775807.  */
21184 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21185   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21186                        && LARGE_OFF_T % 2147483647 == 1)
21187                       ? 1 : -1];
21188 int
21189 main ()
21190 {
21191
21192   ;
21193   return 0;
21194 }
21195 _ACEOF
21196          rm -f conftest.$ac_objext
21197 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21198   (eval $ac_compile) 2>conftest.er1
21199   ac_status=$?
21200   grep -v '^ *+' conftest.er1 >conftest.err
21201   rm -f conftest.er1
21202   cat conftest.err >&5
21203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21204   (exit $ac_status); } &&
21205          { ac_try='test -z "$ac_c_werror_flag"
21206                          || test ! -s conftest.err'
21207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21208   (eval $ac_try) 2>&5
21209   ac_status=$?
21210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21211   (exit $ac_status); }; } &&
21212          { ac_try='test -s conftest.$ac_objext'
21213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21214   (eval $ac_try) 2>&5
21215   ac_status=$?
21216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21217   (exit $ac_status); }; }; then
21218   break
21219 else
21220   echo "$as_me: failed program was:" >&5
21221 sed 's/^/| /' conftest.$ac_ext >&5
21222
21223 fi
21224 rm -f conftest.err conftest.$ac_objext
21225          CC="$CC -n32"
21226          rm -f conftest.$ac_objext
21227 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21228   (eval $ac_compile) 2>conftest.er1
21229   ac_status=$?
21230   grep -v '^ *+' conftest.er1 >conftest.err
21231   rm -f conftest.er1
21232   cat conftest.err >&5
21233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21234   (exit $ac_status); } &&
21235          { ac_try='test -z "$ac_c_werror_flag"
21236                          || test ! -s conftest.err'
21237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21238   (eval $ac_try) 2>&5
21239   ac_status=$?
21240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21241   (exit $ac_status); }; } &&
21242          { ac_try='test -s conftest.$ac_objext'
21243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21244   (eval $ac_try) 2>&5
21245   ac_status=$?
21246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21247   (exit $ac_status); }; }; then
21248   ac_cv_sys_largefile_CC=' -n32'; break
21249 else
21250   echo "$as_me: failed program was:" >&5
21251 sed 's/^/| /' conftest.$ac_ext >&5
21252
21253 fi
21254 rm -f conftest.err conftest.$ac_objext
21255          break
21256        done
21257        CC=$ac_save_CC
21258        rm -f conftest.$ac_ext
21259     fi
21260 fi
21261 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21262 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21263   if test "$ac_cv_sys_largefile_CC" != no; then
21264     CC=$CC$ac_cv_sys_largefile_CC
21265   fi
21266
21267   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21268 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21269 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21270   echo $ECHO_N "(cached) $ECHO_C" >&6
21271 else
21272   while :; do
21273   ac_cv_sys_file_offset_bits=no
21274   cat >conftest.$ac_ext <<_ACEOF
21275 /* confdefs.h.  */
21276 _ACEOF
21277 cat confdefs.h >>conftest.$ac_ext
21278 cat >>conftest.$ac_ext <<_ACEOF
21279 /* end confdefs.h.  */
21280 #include <sys/types.h>
21281  /* Check that off_t can represent 2**63 - 1 correctly.
21282     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21283     since some C++ compilers masquerading as C compilers
21284     incorrectly reject 9223372036854775807.  */
21285 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21286   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21287                        && LARGE_OFF_T % 2147483647 == 1)
21288                       ? 1 : -1];
21289 int
21290 main ()
21291 {
21292
21293   ;
21294   return 0;
21295 }
21296 _ACEOF
21297 rm -f conftest.$ac_objext
21298 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21299   (eval $ac_compile) 2>conftest.er1
21300   ac_status=$?
21301   grep -v '^ *+' conftest.er1 >conftest.err
21302   rm -f conftest.er1
21303   cat conftest.err >&5
21304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21305   (exit $ac_status); } &&
21306          { ac_try='test -z "$ac_c_werror_flag"
21307                          || test ! -s conftest.err'
21308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21309   (eval $ac_try) 2>&5
21310   ac_status=$?
21311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21312   (exit $ac_status); }; } &&
21313          { ac_try='test -s conftest.$ac_objext'
21314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21315   (eval $ac_try) 2>&5
21316   ac_status=$?
21317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21318   (exit $ac_status); }; }; then
21319   break
21320 else
21321   echo "$as_me: failed program was:" >&5
21322 sed 's/^/| /' conftest.$ac_ext >&5
21323
21324 fi
21325 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21326   cat >conftest.$ac_ext <<_ACEOF
21327 /* confdefs.h.  */
21328 _ACEOF
21329 cat confdefs.h >>conftest.$ac_ext
21330 cat >>conftest.$ac_ext <<_ACEOF
21331 /* end confdefs.h.  */
21332 #define _FILE_OFFSET_BITS 64
21333 #include <sys/types.h>
21334  /* Check that off_t can represent 2**63 - 1 correctly.
21335     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21336     since some C++ compilers masquerading as C compilers
21337     incorrectly reject 9223372036854775807.  */
21338 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21339   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21340                        && LARGE_OFF_T % 2147483647 == 1)
21341                       ? 1 : -1];
21342 int
21343 main ()
21344 {
21345
21346   ;
21347   return 0;
21348 }
21349 _ACEOF
21350 rm -f conftest.$ac_objext
21351 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21352   (eval $ac_compile) 2>conftest.er1
21353   ac_status=$?
21354   grep -v '^ *+' conftest.er1 >conftest.err
21355   rm -f conftest.er1
21356   cat conftest.err >&5
21357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21358   (exit $ac_status); } &&
21359          { ac_try='test -z "$ac_c_werror_flag"
21360                          || test ! -s conftest.err'
21361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21362   (eval $ac_try) 2>&5
21363   ac_status=$?
21364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21365   (exit $ac_status); }; } &&
21366          { ac_try='test -s conftest.$ac_objext'
21367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21368   (eval $ac_try) 2>&5
21369   ac_status=$?
21370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21371   (exit $ac_status); }; }; then
21372   ac_cv_sys_file_offset_bits=64; break
21373 else
21374   echo "$as_me: failed program was:" >&5
21375 sed 's/^/| /' conftest.$ac_ext >&5
21376
21377 fi
21378 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21379   break
21380 done
21381 fi
21382 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21383 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21384 if test "$ac_cv_sys_file_offset_bits" != no; then
21385
21386 cat >>confdefs.h <<_ACEOF
21387 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21388 _ACEOF
21389
21390 fi
21391 rm -f conftest*
21392   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21393 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21394 if test "${ac_cv_sys_large_files+set}" = set; then
21395   echo $ECHO_N "(cached) $ECHO_C" >&6
21396 else
21397   while :; do
21398   ac_cv_sys_large_files=no
21399   cat >conftest.$ac_ext <<_ACEOF
21400 /* confdefs.h.  */
21401 _ACEOF
21402 cat confdefs.h >>conftest.$ac_ext
21403 cat >>conftest.$ac_ext <<_ACEOF
21404 /* end confdefs.h.  */
21405 #include <sys/types.h>
21406  /* Check that off_t can represent 2**63 - 1 correctly.
21407     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21408     since some C++ compilers masquerading as C compilers
21409     incorrectly reject 9223372036854775807.  */
21410 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21411   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21412                        && LARGE_OFF_T % 2147483647 == 1)
21413                       ? 1 : -1];
21414 int
21415 main ()
21416 {
21417
21418   ;
21419   return 0;
21420 }
21421 _ACEOF
21422 rm -f conftest.$ac_objext
21423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21424   (eval $ac_compile) 2>conftest.er1
21425   ac_status=$?
21426   grep -v '^ *+' conftest.er1 >conftest.err
21427   rm -f conftest.er1
21428   cat conftest.err >&5
21429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21430   (exit $ac_status); } &&
21431          { ac_try='test -z "$ac_c_werror_flag"
21432                          || test ! -s conftest.err'
21433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21434   (eval $ac_try) 2>&5
21435   ac_status=$?
21436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21437   (exit $ac_status); }; } &&
21438          { ac_try='test -s conftest.$ac_objext'
21439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21440   (eval $ac_try) 2>&5
21441   ac_status=$?
21442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21443   (exit $ac_status); }; }; then
21444   break
21445 else
21446   echo "$as_me: failed program was:" >&5
21447 sed 's/^/| /' conftest.$ac_ext >&5
21448
21449 fi
21450 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21451   cat >conftest.$ac_ext <<_ACEOF
21452 /* confdefs.h.  */
21453 _ACEOF
21454 cat confdefs.h >>conftest.$ac_ext
21455 cat >>conftest.$ac_ext <<_ACEOF
21456 /* end confdefs.h.  */
21457 #define _LARGE_FILES 1
21458 #include <sys/types.h>
21459  /* Check that off_t can represent 2**63 - 1 correctly.
21460     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21461     since some C++ compilers masquerading as C compilers
21462     incorrectly reject 9223372036854775807.  */
21463 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21464   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21465                        && LARGE_OFF_T % 2147483647 == 1)
21466                       ? 1 : -1];
21467 int
21468 main ()
21469 {
21470
21471   ;
21472   return 0;
21473 }
21474 _ACEOF
21475 rm -f conftest.$ac_objext
21476 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21477   (eval $ac_compile) 2>conftest.er1
21478   ac_status=$?
21479   grep -v '^ *+' conftest.er1 >conftest.err
21480   rm -f conftest.er1
21481   cat conftest.err >&5
21482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21483   (exit $ac_status); } &&
21484          { ac_try='test -z "$ac_c_werror_flag"
21485                          || test ! -s conftest.err'
21486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21487   (eval $ac_try) 2>&5
21488   ac_status=$?
21489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21490   (exit $ac_status); }; } &&
21491          { ac_try='test -s conftest.$ac_objext'
21492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21493   (eval $ac_try) 2>&5
21494   ac_status=$?
21495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21496   (exit $ac_status); }; }; then
21497   ac_cv_sys_large_files=1; break
21498 else
21499   echo "$as_me: failed program was:" >&5
21500 sed 's/^/| /' conftest.$ac_ext >&5
21501
21502 fi
21503 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21504   break
21505 done
21506 fi
21507 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21508 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21509 if test "$ac_cv_sys_large_files" != no; then
21510
21511 cat >>confdefs.h <<_ACEOF
21512 #define _LARGE_FILES $ac_cv_sys_large_files
21513 _ACEOF
21514
21515 fi
21516 rm -f conftest*
21517 fi
21518
21519 fi
21520
21521 # SunOS doesn't handle negative byte comparisons properly with +/- return
21522 echo "$as_me:$LINENO: checking for working memcmp" >&5
21523 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21524 if test "${ac_cv_func_memcmp_working+set}" = set; then
21525   echo $ECHO_N "(cached) $ECHO_C" >&6
21526 else
21527   if test "$cross_compiling" = yes; then
21528   ac_cv_func_memcmp_working=no
21529 else
21530   cat >conftest.$ac_ext <<_ACEOF
21531 /* confdefs.h.  */
21532 _ACEOF
21533 cat confdefs.h >>conftest.$ac_ext
21534 cat >>conftest.$ac_ext <<_ACEOF
21535 /* end confdefs.h.  */
21536 $ac_includes_default
21537 int
21538 main ()
21539 {
21540
21541   /* Some versions of memcmp are not 8-bit clean.  */
21542   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21543   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21544     exit (1);
21545
21546   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21547      or more and with at least one buffer not starting on a 4-byte boundary.
21548      William Lewis provided this test program.   */
21549   {
21550     char foo[21];
21551     char bar[21];
21552     int i;
21553     for (i = 0; i < 4; i++)
21554       {
21555         char *a = foo + i;
21556         char *b = bar + i;
21557         strcpy (a, "--------01111111");
21558         strcpy (b, "--------10000000");
21559         if (memcmp (a, b, 16) >= 0)
21560           exit (1);
21561       }
21562     exit (0);
21563   }
21564
21565   ;
21566   return 0;
21567 }
21568 _ACEOF
21569 rm -f conftest$ac_exeext
21570 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21571   (eval $ac_link) 2>&5
21572   ac_status=$?
21573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21574   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21576   (eval $ac_try) 2>&5
21577   ac_status=$?
21578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21579   (exit $ac_status); }; }; then
21580   ac_cv_func_memcmp_working=yes
21581 else
21582   echo "$as_me: program exited with status $ac_status" >&5
21583 echo "$as_me: failed program was:" >&5
21584 sed 's/^/| /' conftest.$ac_ext >&5
21585
21586 ( exit $ac_status )
21587 ac_cv_func_memcmp_working=no
21588 fi
21589 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21590 fi
21591 fi
21592 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21593 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21594 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21595     "memcmp.$ac_objext"   | \
21596   *" memcmp.$ac_objext"   | \
21597     "memcmp.$ac_objext "* | \
21598   *" memcmp.$ac_objext "* ) ;;
21599   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21600 esac
21601
21602
21603
21604
21605 # Select semaphore implementation type.
21606 if test "$PORTNAME" != "win32"; then
21607   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21608
21609 cat >>confdefs.h <<\_ACEOF
21610 #define USE_NAMED_POSIX_SEMAPHORES 1
21611 _ACEOF
21612
21613     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21614   else
21615     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21616
21617 cat >>confdefs.h <<\_ACEOF
21618 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21619 _ACEOF
21620
21621       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21622     else
21623
21624 cat >>confdefs.h <<\_ACEOF
21625 #define USE_SYSV_SEMAPHORES 1
21626 _ACEOF
21627
21628       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21629     fi
21630   fi
21631 else
21632
21633 cat >>confdefs.h <<\_ACEOF
21634 #define USE_WIN32_SEMAPHORES 1
21635 _ACEOF
21636
21637   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
21638 fi
21639
21640
21641 # Select shared-memory implementation type.
21642
21643 cat >>confdefs.h <<\_ACEOF
21644 #define USE_SYSV_SHARED_MEMORY 1
21645 _ACEOF
21646
21647 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21648
21649
21650 # If not set in template file, set bytes to use libc memset()
21651 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
21652   MEMSET_LOOP_LIMIT=1024
21653 fi
21654
21655 cat >>confdefs.h <<_ACEOF
21656 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
21657 _ACEOF
21658
21659
21660
21661 if test "$enable_nls" = yes ; then
21662
21663   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21664 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21665 if test "${ac_cv_search_gettext+set}" = set; then
21666   echo $ECHO_N "(cached) $ECHO_C" >&6
21667 else
21668   ac_func_search_save_LIBS=$LIBS
21669 ac_cv_search_gettext=no
21670 cat >conftest.$ac_ext <<_ACEOF
21671 /* confdefs.h.  */
21672 _ACEOF
21673 cat confdefs.h >>conftest.$ac_ext
21674 cat >>conftest.$ac_ext <<_ACEOF
21675 /* end confdefs.h.  */
21676
21677 /* Override any gcc2 internal prototype to avoid an error.  */
21678 #ifdef __cplusplus
21679 extern "C"
21680 #endif
21681 /* We use char because int might match the return type of a gcc2
21682    builtin and then its argument prototype would still apply.  */
21683 char gettext ();
21684 int
21685 main ()
21686 {
21687 gettext ();
21688   ;
21689   return 0;
21690 }
21691 _ACEOF
21692 rm -f conftest.$ac_objext conftest$ac_exeext
21693 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21694   (eval $ac_link) 2>conftest.er1
21695   ac_status=$?
21696   grep -v '^ *+' conftest.er1 >conftest.err
21697   rm -f conftest.er1
21698   cat conftest.err >&5
21699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21700   (exit $ac_status); } &&
21701          { ac_try='test -z "$ac_c_werror_flag"
21702                          || test ! -s conftest.err'
21703   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21704   (eval $ac_try) 2>&5
21705   ac_status=$?
21706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21707   (exit $ac_status); }; } &&
21708          { ac_try='test -s conftest$ac_exeext'
21709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21710   (eval $ac_try) 2>&5
21711   ac_status=$?
21712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21713   (exit $ac_status); }; }; then
21714   ac_cv_search_gettext="none required"
21715 else
21716   echo "$as_me: failed program was:" >&5
21717 sed 's/^/| /' conftest.$ac_ext >&5
21718
21719 fi
21720 rm -f conftest.err conftest.$ac_objext \
21721       conftest$ac_exeext conftest.$ac_ext
21722 if test "$ac_cv_search_gettext" = no; then
21723   for ac_lib in intl; do
21724     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21725     cat >conftest.$ac_ext <<_ACEOF
21726 /* confdefs.h.  */
21727 _ACEOF
21728 cat confdefs.h >>conftest.$ac_ext
21729 cat >>conftest.$ac_ext <<_ACEOF
21730 /* end confdefs.h.  */
21731
21732 /* Override any gcc2 internal prototype to avoid an error.  */
21733 #ifdef __cplusplus
21734 extern "C"
21735 #endif
21736 /* We use char because int might match the return type of a gcc2
21737    builtin and then its argument prototype would still apply.  */
21738 char gettext ();
21739 int
21740 main ()
21741 {
21742 gettext ();
21743   ;
21744   return 0;
21745 }
21746 _ACEOF
21747 rm -f conftest.$ac_objext conftest$ac_exeext
21748 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21749   (eval $ac_link) 2>conftest.er1
21750   ac_status=$?
21751   grep -v '^ *+' conftest.er1 >conftest.err
21752   rm -f conftest.er1
21753   cat conftest.err >&5
21754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21755   (exit $ac_status); } &&
21756          { ac_try='test -z "$ac_c_werror_flag"
21757                          || test ! -s conftest.err'
21758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21759   (eval $ac_try) 2>&5
21760   ac_status=$?
21761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21762   (exit $ac_status); }; } &&
21763          { ac_try='test -s conftest$ac_exeext'
21764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21765   (eval $ac_try) 2>&5
21766   ac_status=$?
21767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21768   (exit $ac_status); }; }; then
21769   ac_cv_search_gettext="-l$ac_lib"
21770 break
21771 else
21772   echo "$as_me: failed program was:" >&5
21773 sed 's/^/| /' conftest.$ac_ext >&5
21774
21775 fi
21776 rm -f conftest.err conftest.$ac_objext \
21777       conftest$ac_exeext conftest.$ac_ext
21778   done
21779 fi
21780 LIBS=$ac_func_search_save_LIBS
21781 fi
21782 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21783 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21784 if test "$ac_cv_search_gettext" != no; then
21785   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21786
21787 else
21788   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21789 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21790    { (exit 1); exit 1; }; }
21791 fi
21792
21793   if test "${ac_cv_header_libintl_h+set}" = set; then
21794   echo "$as_me:$LINENO: checking for libintl.h" >&5
21795 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21796 if test "${ac_cv_header_libintl_h+set}" = set; then
21797   echo $ECHO_N "(cached) $ECHO_C" >&6
21798 fi
21799 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21800 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21801 else
21802   # Is the header compilable?
21803 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21804 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21805 cat >conftest.$ac_ext <<_ACEOF
21806 /* confdefs.h.  */
21807 _ACEOF
21808 cat confdefs.h >>conftest.$ac_ext
21809 cat >>conftest.$ac_ext <<_ACEOF
21810 /* end confdefs.h.  */
21811 $ac_includes_default
21812 #include <libintl.h>
21813 _ACEOF
21814 rm -f conftest.$ac_objext
21815 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21816   (eval $ac_compile) 2>conftest.er1
21817   ac_status=$?
21818   grep -v '^ *+' conftest.er1 >conftest.err
21819   rm -f conftest.er1
21820   cat conftest.err >&5
21821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21822   (exit $ac_status); } &&
21823          { ac_try='test -z "$ac_c_werror_flag"
21824                          || test ! -s conftest.err'
21825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21826   (eval $ac_try) 2>&5
21827   ac_status=$?
21828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21829   (exit $ac_status); }; } &&
21830          { ac_try='test -s conftest.$ac_objext'
21831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21832   (eval $ac_try) 2>&5
21833   ac_status=$?
21834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21835   (exit $ac_status); }; }; then
21836   ac_header_compiler=yes
21837 else
21838   echo "$as_me: failed program was:" >&5
21839 sed 's/^/| /' conftest.$ac_ext >&5
21840
21841 ac_header_compiler=no
21842 fi
21843 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21844 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21845 echo "${ECHO_T}$ac_header_compiler" >&6
21846
21847 # Is the header present?
21848 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21849 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21850 cat >conftest.$ac_ext <<_ACEOF
21851 /* confdefs.h.  */
21852 _ACEOF
21853 cat confdefs.h >>conftest.$ac_ext
21854 cat >>conftest.$ac_ext <<_ACEOF
21855 /* end confdefs.h.  */
21856 #include <libintl.h>
21857 _ACEOF
21858 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21859   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21860   ac_status=$?
21861   grep -v '^ *+' conftest.er1 >conftest.err
21862   rm -f conftest.er1
21863   cat conftest.err >&5
21864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21865   (exit $ac_status); } >/dev/null; then
21866   if test -s conftest.err; then
21867     ac_cpp_err=$ac_c_preproc_warn_flag
21868     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21869   else
21870     ac_cpp_err=
21871   fi
21872 else
21873   ac_cpp_err=yes
21874 fi
21875 if test -z "$ac_cpp_err"; then
21876   ac_header_preproc=yes
21877 else
21878   echo "$as_me: failed program was:" >&5
21879 sed 's/^/| /' conftest.$ac_ext >&5
21880
21881   ac_header_preproc=no
21882 fi
21883 rm -f conftest.err conftest.$ac_ext
21884 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21885 echo "${ECHO_T}$ac_header_preproc" >&6
21886
21887 # So?  What about this header?
21888 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21889   yes:no: )
21890     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21891 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21892     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
21893 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
21894     ac_header_preproc=yes
21895     ;;
21896   no:yes:* )
21897     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
21898 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
21899     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
21900 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
21901     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
21902 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
21903     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
21904 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21905     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
21906 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
21907     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
21908 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
21909     (
21910       cat <<\_ASBOX
21911 ## ---------------------------------------- ##
21912 ## Report this to pgsql-bugs@postgresql.org ##
21913 ## ---------------------------------------- ##
21914 _ASBOX
21915     ) |
21916       sed "s/^/$as_me: WARNING:     /" >&2
21917     ;;
21918 esac
21919 echo "$as_me:$LINENO: checking for libintl.h" >&5
21920 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21921 if test "${ac_cv_header_libintl_h+set}" = set; then
21922   echo $ECHO_N "(cached) $ECHO_C" >&6
21923 else
21924   ac_cv_header_libintl_h=$ac_header_preproc
21925 fi
21926 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21927 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21928
21929 fi
21930 if test $ac_cv_header_libintl_h = yes; then
21931   :
21932 else
21933   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
21934 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
21935    { (exit 1); exit 1; }; }
21936 fi
21937
21938
21939   for ac_prog in msgfmt
21940 do
21941   # Extract the first word of "$ac_prog", so it can be a program name with args.
21942 set dummy $ac_prog; ac_word=$2
21943 echo "$as_me:$LINENO: checking for $ac_word" >&5
21944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21945 if test "${ac_cv_prog_MSGFMT+set}" = set; then
21946   echo $ECHO_N "(cached) $ECHO_C" >&6
21947 else
21948   if test -n "$MSGFMT"; then
21949   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
21950 else
21951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21952 for as_dir in $PATH
21953 do
21954   IFS=$as_save_IFS
21955   test -z "$as_dir" && as_dir=.
21956   for ac_exec_ext in '' $ac_executable_extensions; do
21957   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21958     ac_cv_prog_MSGFMT="$ac_prog"
21959     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21960     break 2
21961   fi
21962 done
21963 done
21964
21965 fi
21966 fi
21967 MSGFMT=$ac_cv_prog_MSGFMT
21968 if test -n "$MSGFMT"; then
21969   echo "$as_me:$LINENO: result: $MSGFMT" >&5
21970 echo "${ECHO_T}$MSGFMT" >&6
21971 else
21972   echo "$as_me:$LINENO: result: no" >&5
21973 echo "${ECHO_T}no" >&6
21974 fi
21975
21976   test -n "$MSGFMT" && break
21977 done
21978
21979   if test -z "$MSGFMT"; then
21980     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
21981 echo "$as_me: error: msgfmt is required for NLS" >&2;}
21982    { (exit 1); exit 1; }; }
21983   fi
21984   for ac_prog in msgmerge
21985 do
21986   # Extract the first word of "$ac_prog", so it can be a program name with args.
21987 set dummy $ac_prog; ac_word=$2
21988 echo "$as_me:$LINENO: checking for $ac_word" >&5
21989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21990 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
21991   echo $ECHO_N "(cached) $ECHO_C" >&6
21992 else
21993   if test -n "$MSGMERGE"; then
21994   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
21995 else
21996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21997 for as_dir in $PATH
21998 do
21999   IFS=$as_save_IFS
22000   test -z "$as_dir" && as_dir=.
22001   for ac_exec_ext in '' $ac_executable_extensions; do
22002   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22003     ac_cv_prog_MSGMERGE="$ac_prog"
22004     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22005     break 2
22006   fi
22007 done
22008 done
22009
22010 fi
22011 fi
22012 MSGMERGE=$ac_cv_prog_MSGMERGE
22013 if test -n "$MSGMERGE"; then
22014   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
22015 echo "${ECHO_T}$MSGMERGE" >&6
22016 else
22017   echo "$as_me:$LINENO: result: no" >&5
22018 echo "${ECHO_T}no" >&6
22019 fi
22020
22021   test -n "$MSGMERGE" && break
22022 done
22023
22024   for ac_prog in xgettext
22025 do
22026   # Extract the first word of "$ac_prog", so it can be a program name with args.
22027 set dummy $ac_prog; ac_word=$2
22028 echo "$as_me:$LINENO: checking for $ac_word" >&5
22029 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22030 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
22031   echo $ECHO_N "(cached) $ECHO_C" >&6
22032 else
22033   if test -n "$XGETTEXT"; then
22034   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
22035 else
22036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22037 for as_dir in $PATH
22038 do
22039   IFS=$as_save_IFS
22040   test -z "$as_dir" && as_dir=.
22041   for ac_exec_ext in '' $ac_executable_extensions; do
22042   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22043     ac_cv_prog_XGETTEXT="$ac_prog"
22044     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22045     break 2
22046   fi
22047 done
22048 done
22049
22050 fi
22051 fi
22052 XGETTEXT=$ac_cv_prog_XGETTEXT
22053 if test -n "$XGETTEXT"; then
22054   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
22055 echo "${ECHO_T}$XGETTEXT" >&6
22056 else
22057   echo "$as_me:$LINENO: result: no" >&5
22058 echo "${ECHO_T}no" >&6
22059 fi
22060
22061   test -n "$XGETTEXT" && break
22062 done
22063
22064
22065   # Note: share/locale is always the default, independent of $datadir
22066   localedir='${prefix}/share/locale'
22067
22068
22069 fi
22070
22071 # Check for Tcl configuration script tclConfig.sh
22072 if test "$with_tcl" = yes; then
22073     for ac_prog in tclsh tcl
22074 do
22075   # Extract the first word of "$ac_prog", so it can be a program name with args.
22076 set dummy $ac_prog; ac_word=$2
22077 echo "$as_me:$LINENO: checking for $ac_word" >&5
22078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22079 if test "${ac_cv_path_TCLSH+set}" = set; then
22080   echo $ECHO_N "(cached) $ECHO_C" >&6
22081 else
22082   case $TCLSH in
22083   [\\/]* | ?:[\\/]*)
22084   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22085   ;;
22086   *)
22087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22088 for as_dir in $PATH
22089 do
22090   IFS=$as_save_IFS
22091   test -z "$as_dir" && as_dir=.
22092   for ac_exec_ext in '' $ac_executable_extensions; do
22093   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22094     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22095     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22096     break 2
22097   fi
22098 done
22099 done
22100
22101   ;;
22102 esac
22103 fi
22104 TCLSH=$ac_cv_path_TCLSH
22105
22106 if test -n "$TCLSH"; then
22107   echo "$as_me:$LINENO: result: $TCLSH" >&5
22108 echo "${ECHO_T}$TCLSH" >&6
22109 else
22110   echo "$as_me:$LINENO: result: no" >&5
22111 echo "${ECHO_T}no" >&6
22112 fi
22113
22114   test -n "$TCLSH" && break
22115 done
22116
22117 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22118 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22119 # Let user override test
22120 if test -z "$TCL_CONFIG_SH"; then
22121     pgac_test_dirs="$with_tclconfig"
22122
22123     set X $pgac_test_dirs; shift
22124     if test $# -eq 0; then
22125         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22126 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22127    { (exit 1); exit 1; }; }
22128         set X `echo 'puts $auto_path' | $TCLSH`; shift
22129     fi
22130
22131     for pgac_dir do
22132         if test -r "$pgac_dir/tclConfig.sh"; then
22133             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22134             break
22135         fi
22136     done
22137 fi
22138
22139 if test -z "$TCL_CONFIG_SH"; then
22140     echo "$as_me:$LINENO: result: no" >&5
22141 echo "${ECHO_T}no" >&6
22142     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22143 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22144    { (exit 1); exit 1; }; }
22145 else
22146     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22147 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22148 fi
22149
22150
22151
22152     . "$TCL_CONFIG_SH"
22153 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22154 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22155 eval TCL_LIBS=\"$TCL_LIBS\"
22156 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22157 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22158
22159         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22160     ac_save_CPPFLAGS=$CPPFLAGS
22161     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22162     if test "${ac_cv_header_tcl_h+set}" = set; then
22163   echo "$as_me:$LINENO: checking for tcl.h" >&5
22164 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22165 if test "${ac_cv_header_tcl_h+set}" = set; then
22166   echo $ECHO_N "(cached) $ECHO_C" >&6
22167 fi
22168 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22169 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22170 else
22171   # Is the header compilable?
22172 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22173 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22174 cat >conftest.$ac_ext <<_ACEOF
22175 /* confdefs.h.  */
22176 _ACEOF
22177 cat confdefs.h >>conftest.$ac_ext
22178 cat >>conftest.$ac_ext <<_ACEOF
22179 /* end confdefs.h.  */
22180 $ac_includes_default
22181 #include <tcl.h>
22182 _ACEOF
22183 rm -f conftest.$ac_objext
22184 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22185   (eval $ac_compile) 2>conftest.er1
22186   ac_status=$?
22187   grep -v '^ *+' conftest.er1 >conftest.err
22188   rm -f conftest.er1
22189   cat conftest.err >&5
22190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22191   (exit $ac_status); } &&
22192          { ac_try='test -z "$ac_c_werror_flag"
22193                          || test ! -s conftest.err'
22194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22195   (eval $ac_try) 2>&5
22196   ac_status=$?
22197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22198   (exit $ac_status); }; } &&
22199          { ac_try='test -s conftest.$ac_objext'
22200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22201   (eval $ac_try) 2>&5
22202   ac_status=$?
22203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22204   (exit $ac_status); }; }; then
22205   ac_header_compiler=yes
22206 else
22207   echo "$as_me: failed program was:" >&5
22208 sed 's/^/| /' conftest.$ac_ext >&5
22209
22210 ac_header_compiler=no
22211 fi
22212 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22213 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22214 echo "${ECHO_T}$ac_header_compiler" >&6
22215
22216 # Is the header present?
22217 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22218 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22219 cat >conftest.$ac_ext <<_ACEOF
22220 /* confdefs.h.  */
22221 _ACEOF
22222 cat confdefs.h >>conftest.$ac_ext
22223 cat >>conftest.$ac_ext <<_ACEOF
22224 /* end confdefs.h.  */
22225 #include <tcl.h>
22226 _ACEOF
22227 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22228   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22229   ac_status=$?
22230   grep -v '^ *+' conftest.er1 >conftest.err
22231   rm -f conftest.er1
22232   cat conftest.err >&5
22233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22234   (exit $ac_status); } >/dev/null; then
22235   if test -s conftest.err; then
22236     ac_cpp_err=$ac_c_preproc_warn_flag
22237     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22238   else
22239     ac_cpp_err=
22240   fi
22241 else
22242   ac_cpp_err=yes
22243 fi
22244 if test -z "$ac_cpp_err"; then
22245   ac_header_preproc=yes
22246 else
22247   echo "$as_me: failed program was:" >&5
22248 sed 's/^/| /' conftest.$ac_ext >&5
22249
22250   ac_header_preproc=no
22251 fi
22252 rm -f conftest.err conftest.$ac_ext
22253 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22254 echo "${ECHO_T}$ac_header_preproc" >&6
22255
22256 # So?  What about this header?
22257 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22258   yes:no: )
22259     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22260 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22261     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22262 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22263     ac_header_preproc=yes
22264     ;;
22265   no:yes:* )
22266     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22267 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22268     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22269 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22270     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22271 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22272     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22273 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22274     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22275 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22276     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22277 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22278     (
22279       cat <<\_ASBOX
22280 ## ---------------------------------------- ##
22281 ## Report this to pgsql-bugs@postgresql.org ##
22282 ## ---------------------------------------- ##
22283 _ASBOX
22284     ) |
22285       sed "s/^/$as_me: WARNING:     /" >&2
22286     ;;
22287 esac
22288 echo "$as_me:$LINENO: checking for tcl.h" >&5
22289 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22290 if test "${ac_cv_header_tcl_h+set}" = set; then
22291   echo $ECHO_N "(cached) $ECHO_C" >&6
22292 else
22293   ac_cv_header_tcl_h=$ac_header_preproc
22294 fi
22295 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22296 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22297
22298 fi
22299 if test $ac_cv_header_tcl_h = yes; then
22300   :
22301 else
22302   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22303 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22304    { (exit 1); exit 1; }; }
22305 fi
22306
22307
22308     CPPFLAGS=$ac_save_CPPFLAGS
22309 fi
22310
22311 #
22312 # Check for DocBook and tools
22313 #
22314 for ac_prog in onsgmls nsgmls
22315 do
22316   # Extract the first word of "$ac_prog", so it can be a program name with args.
22317 set dummy $ac_prog; ac_word=$2
22318 echo "$as_me:$LINENO: checking for $ac_word" >&5
22319 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22320 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22321   echo $ECHO_N "(cached) $ECHO_C" >&6
22322 else
22323   if test -n "$NSGMLS"; then
22324   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22325 else
22326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22327 for as_dir in $PATH
22328 do
22329   IFS=$as_save_IFS
22330   test -z "$as_dir" && as_dir=.
22331   for ac_exec_ext in '' $ac_executable_extensions; do
22332   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22333     ac_cv_prog_NSGMLS="$ac_prog"
22334     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22335     break 2
22336   fi
22337 done
22338 done
22339
22340 fi
22341 fi
22342 NSGMLS=$ac_cv_prog_NSGMLS
22343 if test -n "$NSGMLS"; then
22344   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22345 echo "${ECHO_T}$NSGMLS" >&6
22346 else
22347   echo "$as_me:$LINENO: result: no" >&5
22348 echo "${ECHO_T}no" >&6
22349 fi
22350
22351   test -n "$NSGMLS" && break
22352 done
22353
22354 for ac_prog in openjade jade
22355 do
22356   # Extract the first word of "$ac_prog", so it can be a program name with args.
22357 set dummy $ac_prog; ac_word=$2
22358 echo "$as_me:$LINENO: checking for $ac_word" >&5
22359 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22360 if test "${ac_cv_prog_JADE+set}" = set; then
22361   echo $ECHO_N "(cached) $ECHO_C" >&6
22362 else
22363   if test -n "$JADE"; then
22364   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22365 else
22366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22367 for as_dir in $PATH
22368 do
22369   IFS=$as_save_IFS
22370   test -z "$as_dir" && as_dir=.
22371   for ac_exec_ext in '' $ac_executable_extensions; do
22372   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22373     ac_cv_prog_JADE="$ac_prog"
22374     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22375     break 2
22376   fi
22377 done
22378 done
22379
22380 fi
22381 fi
22382 JADE=$ac_cv_prog_JADE
22383 if test -n "$JADE"; then
22384   echo "$as_me:$LINENO: result: $JADE" >&5
22385 echo "${ECHO_T}$JADE" >&6
22386 else
22387   echo "$as_me:$LINENO: result: no" >&5
22388 echo "${ECHO_T}no" >&6
22389 fi
22390
22391   test -n "$JADE" && break
22392 done
22393
22394
22395 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22396 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22397 if test "${pgac_cv_check_docbook+set}" = set; then
22398   echo $ECHO_N "(cached) $ECHO_C" >&6
22399 else
22400   cat >conftest.sgml <<EOF
22401 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22402 <book>
22403  <title>test</title>
22404  <chapter>
22405   <title>random</title>
22406    <sect1>
22407     <title>testsect</title>
22408     <para>text</para>
22409   </sect1>
22410  </chapter>
22411 </book>
22412 EOF
22413
22414 pgac_cv_check_docbook=no
22415
22416 if test -n "$NSGMLS"; then
22417   $NSGMLS -s conftest.sgml 1>&5 2>&1
22418   if test $? -eq 0; then
22419     pgac_cv_check_docbook=yes
22420   fi
22421 fi
22422 rm -f conftest.sgml
22423 fi
22424 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22425 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22426
22427 have_docbook=$pgac_cv_check_docbook
22428
22429
22430 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22431 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22432 if test "${pgac_cv_path_stylesheets+set}" = set; then
22433   echo $ECHO_N "(cached) $ECHO_C" >&6
22434 else
22435   if test -n "$DOCBOOKSTYLE"; then
22436   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22437 else
22438   for pgac_prefix in /usr /usr/local /opt; do
22439     for pgac_infix in share lib; do
22440       for pgac_postfix in \
22441         sgml/stylesheets/nwalsh-modular \
22442         sgml/stylesheets/docbook \
22443                 sgml/docbook-dsssl \
22444         sgml/docbook/dsssl/modular \
22445         sgml/docbook/stylesheet/dsssl/modular \
22446         sgml/docbook/dsssl-stylesheets
22447       do
22448         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22449         if test -r "$pgac_candidate/html/docbook.dsl" \
22450            && test -r "$pgac_candidate/print/docbook.dsl"
22451         then
22452           pgac_cv_path_stylesheets=$pgac_candidate
22453           break 3
22454         fi
22455       done
22456     done
22457   done
22458 fi
22459 fi
22460
22461 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22462
22463 if test -n "$DOCBOOKSTYLE"; then
22464   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22465 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22466 else
22467   echo "$as_me:$LINENO: result: no" >&5
22468 echo "${ECHO_T}no" >&6
22469 fi
22470 if test -n "$DOCBOOKSTYLE"; then
22471   for ac_prog in collateindex.pl
22472 do
22473   # Extract the first word of "$ac_prog", so it can be a program name with args.
22474 set dummy $ac_prog; ac_word=$2
22475 echo "$as_me:$LINENO: checking for $ac_word" >&5
22476 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22477 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22478   echo $ECHO_N "(cached) $ECHO_C" >&6
22479 else
22480   case $COLLATEINDEX in
22481   [\\/]* | ?:[\\/]*)
22482   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22483   ;;
22484   *)
22485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22486 for as_dir in $DOCBOOKSTYLE/bin $PATH
22487 do
22488   IFS=$as_save_IFS
22489   test -z "$as_dir" && as_dir=.
22490   for ac_exec_ext in '' $ac_executable_extensions; do
22491   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22492     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22493     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22494     break 2
22495   fi
22496 done
22497 done
22498
22499   ;;
22500 esac
22501 fi
22502 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22503
22504 if test -n "$COLLATEINDEX"; then
22505   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22506 echo "${ECHO_T}$COLLATEINDEX" >&6
22507 else
22508   echo "$as_me:$LINENO: result: no" >&5
22509 echo "${ECHO_T}no" >&6
22510 fi
22511
22512   test -n "$COLLATEINDEX" && break
22513 done
22514
22515 else
22516   for ac_prog in collateindex.pl
22517 do
22518   # Extract the first word of "$ac_prog", so it can be a program name with args.
22519 set dummy $ac_prog; ac_word=$2
22520 echo "$as_me:$LINENO: checking for $ac_word" >&5
22521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22522 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22523   echo $ECHO_N "(cached) $ECHO_C" >&6
22524 else
22525   case $COLLATEINDEX in
22526   [\\/]* | ?:[\\/]*)
22527   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22528   ;;
22529   *)
22530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22531 for as_dir in $PATH
22532 do
22533   IFS=$as_save_IFS
22534   test -z "$as_dir" && as_dir=.
22535   for ac_exec_ext in '' $ac_executable_extensions; do
22536   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22537     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22538     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22539     break 2
22540   fi
22541 done
22542 done
22543
22544   ;;
22545 esac
22546 fi
22547 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22548
22549 if test -n "$COLLATEINDEX"; then
22550   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22551 echo "${ECHO_T}$COLLATEINDEX" >&6
22552 else
22553   echo "$as_me:$LINENO: result: no" >&5
22554 echo "${ECHO_T}no" >&6
22555 fi
22556
22557   test -n "$COLLATEINDEX" && break
22558 done
22559
22560 fi
22561 for ac_prog in sgmlspl
22562 do
22563   # Extract the first word of "$ac_prog", so it can be a program name with args.
22564 set dummy $ac_prog; ac_word=$2
22565 echo "$as_me:$LINENO: checking for $ac_word" >&5
22566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22567 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22568   echo $ECHO_N "(cached) $ECHO_C" >&6
22569 else
22570   if test -n "$SGMLSPL"; then
22571   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22572 else
22573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22574 for as_dir in $PATH
22575 do
22576   IFS=$as_save_IFS
22577   test -z "$as_dir" && as_dir=.
22578   for ac_exec_ext in '' $ac_executable_extensions; do
22579   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22580     ac_cv_prog_SGMLSPL="$ac_prog"
22581     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22582     break 2
22583   fi
22584 done
22585 done
22586
22587 fi
22588 fi
22589 SGMLSPL=$ac_cv_prog_SGMLSPL
22590 if test -n "$SGMLSPL"; then
22591   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22592 echo "${ECHO_T}$SGMLSPL" >&6
22593 else
22594   echo "$as_me:$LINENO: result: no" >&5
22595 echo "${ECHO_T}no" >&6
22596 fi
22597
22598   test -n "$SGMLSPL" && break
22599 done
22600
22601
22602 # Thread testing
22603
22604 # We have to run the thread test near the end so we have all our symbols
22605 # defined.  Cross compiling throws a warning.
22606 #
22607 if test "$enable_thread_safety_force" = yes; then
22608 if test x"$template" != x"win32"
22609 then
22610   { echo "$as_me:$LINENO: WARNING:
22611 *** Skipping thread test program.  --enable-thread-safety-force was used.
22612 *** Run the program in src/test/thread on the your machine and add
22613 proper locking function calls to your applications to guarantee thread
22614 safety.
22615 " >&5
22616 echo "$as_me: WARNING:
22617 *** Skipping thread test program.  --enable-thread-safety-force was used.
22618 *** Run the program in src/test/thread on the your machine and add
22619 proper locking function calls to your applications to guarantee thread
22620 safety.
22621 " >&2;}
22622 else
22623 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22624 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22625 fi
22626 elif test "$enable_thread_safety" = yes; then
22627 if test x"$template" != x"win32"
22628 then
22629 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22630 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22631
22632 _CFLAGS="$CFLAGS"
22633 _LIBS="$LIBS"
22634 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22635 LIBS="$LIBS $PTHREAD_LIBS"
22636 if test "$cross_compiling" = yes; then
22637   echo "$as_me:$LINENO: result: maybe" >&5
22638 echo "${ECHO_T}maybe" >&6
22639   { echo "$as_me:$LINENO: WARNING:
22640 *** Skipping thread test program because of cross-compile build.
22641 *** Run the program in src/test/thread on the target machine.
22642 " >&5
22643 echo "$as_me: WARNING:
22644 *** Skipping thread test program because of cross-compile build.
22645 *** Run the program in src/test/thread on the target machine.
22646 " >&2;}
22647 else
22648   cat >conftest.$ac_ext <<_ACEOF
22649 /* confdefs.h.  */
22650 _ACEOF
22651 cat confdefs.h >>conftest.$ac_ext
22652 cat >>conftest.$ac_ext <<_ACEOF
22653 /* end confdefs.h.  */
22654 #include "$srcdir/src/test/thread/thread_test.c"
22655 _ACEOF
22656 rm -f conftest$ac_exeext
22657 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22658   (eval $ac_link) 2>&5
22659   ac_status=$?
22660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22661   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22663   (eval $ac_try) 2>&5
22664   ac_status=$?
22665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22666   (exit $ac_status); }; }; then
22667   echo "$as_me:$LINENO: result: yes" >&5
22668 echo "${ECHO_T}yes" >&6
22669 else
22670   echo "$as_me: program exited with status $ac_status" >&5
22671 echo "$as_me: failed program was:" >&5
22672 sed 's/^/| /' conftest.$ac_ext >&5
22673
22674 ( exit $ac_status )
22675 echo "$as_me:$LINENO: result: no" >&5
22676 echo "${ECHO_T}no" >&6
22677   { { echo "$as_me:$LINENO: error:
22678 *** Thread test program failed.  Your platform is not thread-safe.
22679 *** Check the file 'config.log'for the exact reason.
22680 ***
22681 *** You can use the configure option --enable-thread-safety-force
22682 *** to force threads to be enabled.  However, you must then run
22683 *** the program in src/test/thread and add locking function calls
22684 *** to your applications to guarantee thread safety.
22685 " >&5
22686 echo "$as_me: error:
22687 *** Thread test program failed.  Your platform is not thread-safe.
22688 *** Check the file 'config.log'for the exact reason.
22689 ***
22690 *** You can use the configure option --enable-thread-safety-force
22691 *** to force threads to be enabled.  However, you must then run
22692 *** the program in src/test/thread and add locking function calls
22693 *** to your applications to guarantee thread safety.
22694 " >&2;}
22695    { (exit 1); exit 1; }; }
22696 fi
22697 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22698 fi
22699 CFLAGS="$_CFLAGS"
22700 LIBS="$_LIBS"
22701 else
22702 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22703 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22704 fi
22705 fi
22706
22707 # prepare build tree if outside source tree
22708 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22709 # Note 2: /bin/pwd might be better than shell's built-in at getting
22710 #         a symlink-free name.
22711 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22712   vpath_build=no
22713 else
22714   vpath_build=yes
22715   if test "$no_create" != yes; then
22716     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22717     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22718     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22719       || { { echo "$as_me:$LINENO: error: failed" >&5
22720 echo "$as_me: error: failed" >&2;}
22721    { (exit 1); exit 1; }; }
22722     echo "$as_me:$LINENO: result: done" >&5
22723 echo "${ECHO_T}done" >&6
22724   fi
22725 fi
22726
22727
22728
22729                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22730
22731
22732                                                             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}"
22733
22734
22735 if test "$PORTNAME" = "win32"; then
22736           ac_config_commands="$ac_config_commands check_win32_symlinks"
22737
22738 fi
22739
22740           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22741
22742
22743 #
22744 # Warn about unknown options
22745 #
22746
22747
22748   for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do
22749      case $var in
22750        with_template) ;;
22751 with_docdir) ;;
22752 with_includes) ;;
22753 with_libraries) ;;
22754 with_libs) ;;
22755 enable_integer_datetimes) ;;
22756 enable_nls) ;;
22757 with_pgport) ;;
22758 enable_shared) ;;
22759 enable_rpath) ;;
22760 enable_spinlocks) ;;
22761 enable_debug) ;;
22762 with_CC) ;;
22763 enable_depend) ;;
22764 enable_cassert) ;;
22765 enable_thread_safety) ;;
22766 enable_thread_safety_force) ;;
22767 with_tcl) ;;
22768 with_tclconfig) ;;
22769 with_perl) ;;
22770 with_python) ;;
22771 with_krb5) ;;
22772 with_krb_srvnam) ;;
22773 with_pam) ;;
22774 with_ldap) ;;
22775 with_bonjour) ;;
22776 with_openssl) ;;
22777 with_libedit_preferred) ;;
22778 with_readline) ;;
22779 with_zlib) ;;
22780
22781        with_gnu_ld) ;;
22782      *)
22783        echo -n "*** Option ignored: "
22784        echo $var | sed -e 's/\(^=*\)/--\1/;s/_/-/g'
22785        ;;
22786      esac
22787   done
22788
22789
22790 cat >confcache <<\_ACEOF
22791 # This file is a shell script that caches the results of configure
22792 # tests run on this system so they can be shared between configure
22793 # scripts and configure runs, see configure's option --config-cache.
22794 # It is not useful on other systems.  If it contains results you don't
22795 # want to keep, you may remove or edit it.
22796 #
22797 # config.status only pays attention to the cache file if you give it
22798 # the --recheck option to rerun configure.
22799 #
22800 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22801 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22802 # following values.
22803
22804 _ACEOF
22805
22806 # The following way of writing the cache mishandles newlines in values,
22807 # but we know of no workaround that is simple, portable, and efficient.
22808 # So, don't put newlines in cache variables' values.
22809 # Ultrix sh set writes to stderr and can't be redirected directly,
22810 # and sets the high bit in the cache file unless we assign to the vars.
22811 {
22812   (set) 2>&1 |
22813     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22814     *ac_space=\ *)
22815       # `set' does not quote correctly, so add quotes (double-quote
22816       # substitution turns \\\\ into \\, and sed turns \\ into \).
22817       sed -n \
22818         "s/'/'\\\\''/g;
22819           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22820       ;;
22821     *)
22822       # `set' quotes correctly as required by POSIX, so do not add quotes.
22823       sed -n \
22824         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22825       ;;
22826     esac;
22827 } |
22828   sed '
22829      t clear
22830      : clear
22831      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22832      t end
22833      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22834      : end' >>confcache
22835 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22836   if test -w $cache_file; then
22837     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22838     cat confcache >$cache_file
22839   else
22840     echo "not updating unwritable cache $cache_file"
22841   fi
22842 fi
22843 rm -f confcache
22844
22845 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22846 # Let make expand exec_prefix.
22847 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22848
22849 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22850 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22851 # trailing colons and then remove the whole line if VPATH becomes empty
22852 # (actually we leave an empty line to preserve line numbers).
22853 if test "x$srcdir" = x.; then
22854   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22855 s/:*\$(srcdir):*/:/;
22856 s/:*\${srcdir}:*/:/;
22857 s/:*@srcdir@:*/:/;
22858 s/^\([^=]*=[     ]*\):*/\1/;
22859 s/:*$//;
22860 s/^[^=]*=[       ]*$//;
22861 }'
22862 fi
22863
22864 DEFS=-DHAVE_CONFIG_H
22865
22866 ac_libobjs=
22867 ac_ltlibobjs=
22868 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22869   # 1. Remove the extension, and $U if already installed.
22870   ac_i=`echo "$ac_i" |
22871          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22872   # 2. Add them.
22873   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22874   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22875 done
22876 LIBOBJS=$ac_libobjs
22877
22878 LTLIBOBJS=$ac_ltlibobjs
22879
22880
22881
22882 : ${CONFIG_STATUS=./config.status}
22883 ac_clean_files_save=$ac_clean_files
22884 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22885 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22886 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22887 cat >$CONFIG_STATUS <<_ACEOF
22888 #! $SHELL
22889 # Generated by $as_me.
22890 # Run this file to recreate the current configuration.
22891 # Compiler output produced by configure, useful for debugging
22892 # configure, is in config.log if it exists.
22893
22894 debug=false
22895 ac_cs_recheck=false
22896 ac_cs_silent=false
22897 SHELL=\${CONFIG_SHELL-$SHELL}
22898 _ACEOF
22899
22900 cat >>$CONFIG_STATUS <<\_ACEOF
22901 ## --------------------- ##
22902 ## M4sh Initialization.  ##
22903 ## --------------------- ##
22904
22905 # Be Bourne compatible
22906 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22907   emulate sh
22908   NULLCMD=:
22909   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22910   # is contrary to our usage.  Disable this feature.
22911   alias -g '${1+"$@"}'='"$@"'
22912 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22913   set -o posix
22914 fi
22915 DUALCASE=1; export DUALCASE # for MKS sh
22916
22917 # Support unset when possible.
22918 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22919   as_unset=unset
22920 else
22921   as_unset=false
22922 fi
22923
22924
22925 # Work around bugs in pre-3.0 UWIN ksh.
22926 $as_unset ENV MAIL MAILPATH
22927 PS1='$ '
22928 PS2='> '
22929 PS4='+ '
22930
22931 # NLS nuisances.
22932 for as_var in \
22933   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22934   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22935   LC_TELEPHONE LC_TIME
22936 do
22937   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22938     eval $as_var=C; export $as_var
22939   else
22940     $as_unset $as_var
22941   fi
22942 done
22943
22944 # Required to use basename.
22945 if expr a : '\(a\)' >/dev/null 2>&1; then
22946   as_expr=expr
22947 else
22948   as_expr=false
22949 fi
22950
22951 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22952   as_basename=basename
22953 else
22954   as_basename=false
22955 fi
22956
22957
22958 # Name of the executable.
22959 as_me=`$as_basename "$0" ||
22960 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22961          X"$0" : 'X\(//\)$' \| \
22962          X"$0" : 'X\(/\)$' \| \
22963          .     : '\(.\)' 2>/dev/null ||
22964 echo X/"$0" |
22965     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22966           /^X\/\(\/\/\)$/{ s//\1/; q; }
22967           /^X\/\(\/\).*/{ s//\1/; q; }
22968           s/.*/./; q'`
22969
22970
22971 # PATH needs CR, and LINENO needs CR and PATH.
22972 # Avoid depending upon Character Ranges.
22973 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22974 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22975 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22976 as_cr_digits='0123456789'
22977 as_cr_alnum=$as_cr_Letters$as_cr_digits
22978
22979 # The user is always right.
22980 if test "${PATH_SEPARATOR+set}" != set; then
22981   echo "#! /bin/sh" >conf$$.sh
22982   echo  "exit 0"   >>conf$$.sh
22983   chmod +x conf$$.sh
22984   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22985     PATH_SEPARATOR=';'
22986   else
22987     PATH_SEPARATOR=:
22988   fi
22989   rm -f conf$$.sh
22990 fi
22991
22992
22993   as_lineno_1=$LINENO
22994   as_lineno_2=$LINENO
22995   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22996   test "x$as_lineno_1" != "x$as_lineno_2" &&
22997   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
22998   # Find who we are.  Look in the path if we contain no path at all
22999   # relative or not.
23000   case $0 in
23001     *[\\/]* ) as_myself=$0 ;;
23002     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23003 for as_dir in $PATH
23004 do
23005   IFS=$as_save_IFS
23006   test -z "$as_dir" && as_dir=.
23007   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23008 done
23009
23010        ;;
23011   esac
23012   # We did not find ourselves, most probably we were run as `sh COMMAND'
23013   # in which case we are not to be found in the path.
23014   if test "x$as_myself" = x; then
23015     as_myself=$0
23016   fi
23017   if test ! -f "$as_myself"; then
23018     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23019 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23020    { (exit 1); exit 1; }; }
23021   fi
23022   case $CONFIG_SHELL in
23023   '')
23024     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23025 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23026 do
23027   IFS=$as_save_IFS
23028   test -z "$as_dir" && as_dir=.
23029   for as_base in sh bash ksh sh5; do
23030          case $as_dir in
23031          /*)
23032            if ("$as_dir/$as_base" -c '
23033   as_lineno_1=$LINENO
23034   as_lineno_2=$LINENO
23035   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23036   test "x$as_lineno_1" != "x$as_lineno_2" &&
23037   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
23038              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23039              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23040              CONFIG_SHELL=$as_dir/$as_base
23041              export CONFIG_SHELL
23042              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23043            fi;;
23044          esac
23045        done
23046 done
23047 ;;
23048   esac
23049
23050   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23051   # uniformly replaced by the line number.  The first 'sed' inserts a
23052   # line-number line before each line; the second 'sed' does the real
23053   # work.  The second script uses 'N' to pair each line-number line
23054   # with the numbered line, and appends trailing '-' during
23055   # substitution so that $LINENO is not a special case at line end.
23056   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23057   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23058   sed '=' <$as_myself |
23059     sed '
23060       N
23061       s,$,-,
23062       : loop
23063       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23064       t loop
23065       s,-$,,
23066       s,^['$as_cr_digits']*\n,,
23067     ' >$as_me.lineno &&
23068   chmod +x $as_me.lineno ||
23069     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23070 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23071    { (exit 1); exit 1; }; }
23072
23073   # Don't try to exec as it changes $[0], causing all sort of problems
23074   # (the dirname of $[0] is not the place where we might find the
23075   # original and so on.  Autoconf is especially sensible to this).
23076   . ./$as_me.lineno
23077   # Exit status is that of the last command.
23078   exit
23079 }
23080
23081
23082 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23083   *c*,-n*) ECHO_N= ECHO_C='
23084 ' ECHO_T='      ' ;;
23085   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23086   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23087 esac
23088
23089 if expr a : '\(a\)' >/dev/null 2>&1; then
23090   as_expr=expr
23091 else
23092   as_expr=false
23093 fi
23094
23095 rm -f conf$$ conf$$.exe conf$$.file
23096 echo >conf$$.file
23097 if ln -s conf$$.file conf$$ 2>/dev/null; then
23098   # We could just check for DJGPP; but this test a) works b) is more generic
23099   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23100   if test -f conf$$.exe; then
23101     # Don't use ln at all; we don't have any links
23102     as_ln_s='cp -p'
23103   else
23104     as_ln_s='ln -s'
23105   fi
23106 elif ln conf$$.file conf$$ 2>/dev/null; then
23107   as_ln_s=ln
23108 else
23109   as_ln_s='cp -p'
23110 fi
23111 rm -f conf$$ conf$$.exe conf$$.file
23112
23113 if mkdir -p . 2>/dev/null; then
23114   as_mkdir_p=:
23115 else
23116   test -d ./-p && rmdir ./-p
23117   as_mkdir_p=false
23118 fi
23119
23120 as_executable_p="test -f"
23121
23122 # Sed expression to map a string onto a valid CPP name.
23123 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23124
23125 # Sed expression to map a string onto a valid variable name.
23126 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23127
23128
23129 # IFS
23130 # We need space, tab and new line, in precisely that order.
23131 as_nl='
23132 '
23133 IFS="   $as_nl"
23134
23135 # CDPATH.
23136 $as_unset CDPATH
23137
23138 exec 6>&1
23139
23140 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23141 # report actual input values of CONFIG_FILES etc. instead of their
23142 # values after options handling.  Logging --version etc. is OK.
23143 exec 5>>config.log
23144 {
23145   echo
23146   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23147 ## Running $as_me. ##
23148 _ASBOX
23149 } >&5
23150 cat >&5 <<_CSEOF
23151
23152 This file was extended by PostgreSQL $as_me 8.2devel, which was
23153 generated by GNU Autoconf 2.59.  Invocation command line was
23154
23155   CONFIG_FILES    = $CONFIG_FILES
23156   CONFIG_HEADERS  = $CONFIG_HEADERS
23157   CONFIG_LINKS    = $CONFIG_LINKS
23158   CONFIG_COMMANDS = $CONFIG_COMMANDS
23159   $ $0 $@
23160
23161 _CSEOF
23162 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23163 echo >&5
23164 _ACEOF
23165
23166 # Files that config.status was made for.
23167 if test -n "$ac_config_files"; then
23168   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23169 fi
23170
23171 if test -n "$ac_config_headers"; then
23172   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23173 fi
23174
23175 if test -n "$ac_config_links"; then
23176   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23177 fi
23178
23179 if test -n "$ac_config_commands"; then
23180   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23181 fi
23182
23183 cat >>$CONFIG_STATUS <<\_ACEOF
23184
23185 ac_cs_usage="\
23186 \`$as_me' instantiates files from templates according to the
23187 current configuration.
23188
23189 Usage: $0 [OPTIONS] [FILE]...
23190
23191   -h, --help       print this help, then exit
23192   -V, --version    print version number, then exit
23193   -q, --quiet      do not print progress messages
23194   -d, --debug      don't remove temporary files
23195       --recheck    update $as_me by reconfiguring in the same conditions
23196   --file=FILE[:TEMPLATE]
23197                    instantiate the configuration file FILE
23198   --header=FILE[:TEMPLATE]
23199                    instantiate the configuration header FILE
23200
23201 Configuration files:
23202 $config_files
23203
23204 Configuration headers:
23205 $config_headers
23206
23207 Configuration links:
23208 $config_links
23209
23210 Configuration commands:
23211 $config_commands
23212
23213 Report bugs to <bug-autoconf@gnu.org>."
23214 _ACEOF
23215
23216 cat >>$CONFIG_STATUS <<_ACEOF
23217 ac_cs_version="\\
23218 PostgreSQL config.status 8.2devel
23219 configured by $0, generated by GNU Autoconf 2.59,
23220   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23221
23222 Copyright (C) 2003 Free Software Foundation, Inc.
23223 This config.status script is free software; the Free Software Foundation
23224 gives unlimited permission to copy, distribute and modify it."
23225 srcdir=$srcdir
23226 _ACEOF
23227
23228 cat >>$CONFIG_STATUS <<\_ACEOF
23229 # If no file are specified by the user, then we need to provide default
23230 # value.  By we need to know if files were specified by the user.
23231 ac_need_defaults=:
23232 while test $# != 0
23233 do
23234   case $1 in
23235   --*=*)
23236     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23237     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23238     ac_shift=:
23239     ;;
23240   -*)
23241     ac_option=$1
23242     ac_optarg=$2
23243     ac_shift=shift
23244     ;;
23245   *) # This is not an option, so the user has probably given explicit
23246      # arguments.
23247      ac_option=$1
23248      ac_need_defaults=false;;
23249   esac
23250
23251   case $ac_option in
23252   # Handling of the options.
23253 _ACEOF
23254 cat >>$CONFIG_STATUS <<\_ACEOF
23255   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23256     ac_cs_recheck=: ;;
23257   --version | --vers* | -V )
23258     echo "$ac_cs_version"; exit 0 ;;
23259   --he | --h)
23260     # Conflict between --help and --header
23261     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23262 Try \`$0 --help' for more information." >&5
23263 echo "$as_me: error: ambiguous option: $1
23264 Try \`$0 --help' for more information." >&2;}
23265    { (exit 1); exit 1; }; };;
23266   --help | --hel | -h )
23267     echo "$ac_cs_usage"; exit 0 ;;
23268   --debug | --d* | -d )
23269     debug=: ;;
23270   --file | --fil | --fi | --f )
23271     $ac_shift
23272     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23273     ac_need_defaults=false;;
23274   --header | --heade | --head | --hea )
23275     $ac_shift
23276     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23277     ac_need_defaults=false;;
23278   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23279   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23280     ac_cs_silent=: ;;
23281
23282   # This is an error.
23283   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23284 Try \`$0 --help' for more information." >&5
23285 echo "$as_me: error: unrecognized option: $1
23286 Try \`$0 --help' for more information." >&2;}
23287    { (exit 1); exit 1; }; } ;;
23288
23289   *) ac_config_targets="$ac_config_targets $1" ;;
23290
23291   esac
23292   shift
23293 done
23294
23295 ac_configure_extra_args=
23296
23297 if $ac_cs_silent; then
23298   exec 6>/dev/null
23299   ac_configure_extra_args="$ac_configure_extra_args --silent"
23300 fi
23301
23302 _ACEOF
23303 cat >>$CONFIG_STATUS <<_ACEOF
23304 if \$ac_cs_recheck; then
23305   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23306   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23307 fi
23308
23309 _ACEOF
23310
23311
23312
23313
23314
23315 cat >>$CONFIG_STATUS <<\_ACEOF
23316 for ac_config_target in $ac_config_targets
23317 do
23318   case "$ac_config_target" in
23319   # Handling of arguments.
23320   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23321   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23322   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23323   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23324   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23325   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23326   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23327   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23328   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23329   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23330   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23331   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23332 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23333    { (exit 1); exit 1; }; };;
23334   esac
23335 done
23336
23337 # If the user did not use the arguments to specify the items to instantiate,
23338 # then the envvar interface is used.  Set only those that are not.
23339 # We use the long form for the default assignment because of an extremely
23340 # bizarre bug on SunOS 4.1.3.
23341 if $ac_need_defaults; then
23342   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23343   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23344   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23345   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23346 fi
23347
23348 # Have a temporary directory for convenience.  Make it in the build tree
23349 # simply because there is no reason to put it here, and in addition,
23350 # creating and moving files from /tmp can sometimes cause problems.
23351 # Create a temporary directory, and hook for its removal unless debugging.
23352 $debug ||
23353 {
23354   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23355   trap '{ (exit 1); exit 1; }' 1 2 13 15
23356 }
23357
23358 # Create a (secure) tmp directory for tmp files.
23359
23360 {
23361   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23362   test -n "$tmp" && test -d "$tmp"
23363 }  ||
23364 {
23365   tmp=./confstat$$-$RANDOM
23366   (umask 077 && mkdir $tmp)
23367 } ||
23368 {
23369    echo "$me: cannot create a temporary directory in ." >&2
23370    { (exit 1); exit 1; }
23371 }
23372
23373 _ACEOF
23374
23375 cat >>$CONFIG_STATUS <<_ACEOF
23376
23377 #
23378 # CONFIG_FILES section.
23379 #
23380
23381 # No need to generate the scripts if there are no CONFIG_FILES.
23382 # This happens for instance when ./config.status config.h
23383 if test -n "\$CONFIG_FILES"; then
23384   # Protect against being on the right side of a sed subst in config.status.
23385   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23386    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23387 s,@SHELL@,$SHELL,;t t
23388 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23389 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23390 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23391 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23392 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23393 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23394 s,@exec_prefix@,$exec_prefix,;t t
23395 s,@prefix@,$prefix,;t t
23396 s,@program_transform_name@,$program_transform_name,;t t
23397 s,@bindir@,$bindir,;t t
23398 s,@sbindir@,$sbindir,;t t
23399 s,@libexecdir@,$libexecdir,;t t
23400 s,@datadir@,$datadir,;t t
23401 s,@sysconfdir@,$sysconfdir,;t t
23402 s,@sharedstatedir@,$sharedstatedir,;t t
23403 s,@localstatedir@,$localstatedir,;t t
23404 s,@libdir@,$libdir,;t t
23405 s,@includedir@,$includedir,;t t
23406 s,@oldincludedir@,$oldincludedir,;t t
23407 s,@infodir@,$infodir,;t t
23408 s,@mandir@,$mandir,;t t
23409 s,@build_alias@,$build_alias,;t t
23410 s,@host_alias@,$host_alias,;t t
23411 s,@target_alias@,$target_alias,;t t
23412 s,@DEFS@,$DEFS,;t t
23413 s,@ECHO_C@,$ECHO_C,;t t
23414 s,@ECHO_N@,$ECHO_N,;t t
23415 s,@ECHO_T@,$ECHO_T,;t t
23416 s,@LIBS@,$LIBS,;t t
23417 s,@configure_args@,$configure_args,;t t
23418 s,@build@,$build,;t t
23419 s,@build_cpu@,$build_cpu,;t t
23420 s,@build_vendor@,$build_vendor,;t t
23421 s,@build_os@,$build_os,;t t
23422 s,@host@,$host,;t t
23423 s,@host_cpu@,$host_cpu,;t t
23424 s,@host_vendor@,$host_vendor,;t t
23425 s,@host_os@,$host_os,;t t
23426 s,@PORTNAME@,$PORTNAME,;t t
23427 s,@docdir@,$docdir,;t t
23428 s,@enable_nls@,$enable_nls,;t t
23429 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23430 s,@default_port@,$default_port,;t t
23431 s,@enable_shared@,$enable_shared,;t t
23432 s,@enable_rpath@,$enable_rpath,;t t
23433 s,@enable_debug@,$enable_debug,;t t
23434 s,@CC@,$CC,;t t
23435 s,@CFLAGS@,$CFLAGS,;t t
23436 s,@LDFLAGS@,$LDFLAGS,;t t
23437 s,@CPPFLAGS@,$CPPFLAGS,;t t
23438 s,@ac_ct_CC@,$ac_ct_CC,;t t
23439 s,@EXEEXT@,$EXEEXT,;t t
23440 s,@OBJEXT@,$OBJEXT,;t t
23441 s,@CPP@,$CPP,;t t
23442 s,@GCC@,$GCC,;t t
23443 s,@TAS@,$TAS,;t t
23444 s,@autodepend@,$autodepend,;t t
23445 s,@INCLUDES@,$INCLUDES,;t t
23446 s,@enable_thread_safety@,$enable_thread_safety,;t t
23447 s,@with_tcl@,$with_tcl,;t t
23448 s,@with_perl@,$with_perl,;t t
23449 s,@with_python@,$with_python,;t t
23450 s,@with_krb5@,$with_krb5,;t t
23451 s,@krb_srvtab@,$krb_srvtab,;t t
23452 s,@with_pam@,$with_pam,;t t
23453 s,@with_ldap@,$with_ldap,;t t
23454 s,@with_bonjour@,$with_bonjour,;t t
23455 s,@with_openssl@,$with_openssl,;t t
23456 s,@with_zlib@,$with_zlib,;t t
23457 s,@EGREP@,$EGREP,;t t
23458 s,@ELF_SYS@,$ELF_SYS,;t t
23459 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23460 s,@AWK@,$AWK,;t t
23461 s,@FLEX@,$FLEX,;t t
23462 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23463 s,@LN_S@,$LN_S,;t t
23464 s,@LD@,$LD,;t t
23465 s,@with_gnu_ld@,$with_gnu_ld,;t t
23466 s,@ld_R_works@,$ld_R_works,;t t
23467 s,@RANLIB@,$RANLIB,;t t
23468 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23469 s,@TAR@,$TAR,;t t
23470 s,@STRIP@,$STRIP,;t t
23471 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23472 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23473 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23474 s,@YACC@,$YACC,;t t
23475 s,@YFLAGS@,$YFLAGS,;t t
23476 s,@PERL@,$PERL,;t t
23477 s,@perl_archlibexp@,$perl_archlibexp,;t t
23478 s,@perl_privlibexp@,$perl_privlibexp,;t t
23479 s,@perl_useshrplib@,$perl_useshrplib,;t t
23480 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23481 s,@PYTHON@,$PYTHON,;t t
23482 s,@python_version@,$python_version,;t t
23483 s,@python_configdir@,$python_configdir,;t t
23484 s,@python_includespec@,$python_includespec,;t t
23485 s,@python_libdir@,$python_libdir,;t t
23486 s,@python_libspec@,$python_libspec,;t t
23487 s,@python_additional_libs@,$python_additional_libs,;t t
23488 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23489 s,@LIBOBJS@,$LIBOBJS,;t t
23490 s,@acx_pthread_config@,$acx_pthread_config,;t t
23491 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23492 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23493 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23494 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23495 s,@MSGFMT@,$MSGFMT,;t t
23496 s,@MSGMERGE@,$MSGMERGE,;t t
23497 s,@XGETTEXT@,$XGETTEXT,;t t
23498 s,@localedir@,$localedir,;t t
23499 s,@TCLSH@,$TCLSH,;t t
23500 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23501 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23502 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23503 s,@TCL_LIBS@,$TCL_LIBS,;t t
23504 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23505 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23506 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23507 s,@NSGMLS@,$NSGMLS,;t t
23508 s,@JADE@,$JADE,;t t
23509 s,@have_docbook@,$have_docbook,;t t
23510 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23511 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23512 s,@SGMLSPL@,$SGMLSPL,;t t
23513 s,@vpath_build@,$vpath_build,;t t
23514 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23515 CEOF
23516
23517 _ACEOF
23518
23519   cat >>$CONFIG_STATUS <<\_ACEOF
23520   # Split the substitutions into bite-sized pieces for seds with
23521   # small command number limits, like on Digital OSF/1 and HP-UX.
23522   ac_max_sed_lines=48
23523   ac_sed_frag=1 # Number of current file.
23524   ac_beg=1 # First line for current file.
23525   ac_end=$ac_max_sed_lines # Line after last line for current file.
23526   ac_more_lines=:
23527   ac_sed_cmds=
23528   while $ac_more_lines; do
23529     if test $ac_beg -gt 1; then
23530       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23531     else
23532       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23533     fi
23534     if test ! -s $tmp/subs.frag; then
23535       ac_more_lines=false
23536     else
23537       # The purpose of the label and of the branching condition is to
23538       # speed up the sed processing (if there are no `@' at all, there
23539       # is no need to browse any of the substitutions).
23540       # These are the two extra sed commands mentioned above.
23541       (echo ':t
23542   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23543       if test -z "$ac_sed_cmds"; then
23544         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23545       else
23546         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23547       fi
23548       ac_sed_frag=`expr $ac_sed_frag + 1`
23549       ac_beg=$ac_end
23550       ac_end=`expr $ac_end + $ac_max_sed_lines`
23551     fi
23552   done
23553   if test -z "$ac_sed_cmds"; then
23554     ac_sed_cmds=cat
23555   fi
23556 fi # test -n "$CONFIG_FILES"
23557
23558 _ACEOF
23559 cat >>$CONFIG_STATUS <<\_ACEOF
23560 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23561   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23562   case $ac_file in
23563   - | *:- | *:-:* ) # input from stdin
23564         cat >$tmp/stdin
23565         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23566         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23567   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23568         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23569   * )   ac_file_in=$ac_file.in ;;
23570   esac
23571
23572   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23573   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23574 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23575          X"$ac_file" : 'X\(//\)[^/]' \| \
23576          X"$ac_file" : 'X\(//\)$' \| \
23577          X"$ac_file" : 'X\(/\)' \| \
23578          .     : '\(.\)' 2>/dev/null ||
23579 echo X"$ac_file" |
23580     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23581           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23582           /^X\(\/\/\)$/{ s//\1/; q; }
23583           /^X\(\/\).*/{ s//\1/; q; }
23584           s/.*/./; q'`
23585   { if $as_mkdir_p; then
23586     mkdir -p "$ac_dir"
23587   else
23588     as_dir="$ac_dir"
23589     as_dirs=
23590     while test ! -d "$as_dir"; do
23591       as_dirs="$as_dir $as_dirs"
23592       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23593 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23594          X"$as_dir" : 'X\(//\)[^/]' \| \
23595          X"$as_dir" : 'X\(//\)$' \| \
23596          X"$as_dir" : 'X\(/\)' \| \
23597          .     : '\(.\)' 2>/dev/null ||
23598 echo X"$as_dir" |
23599     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23600           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23601           /^X\(\/\/\)$/{ s//\1/; q; }
23602           /^X\(\/\).*/{ s//\1/; q; }
23603           s/.*/./; q'`
23604     done
23605     test ! -n "$as_dirs" || mkdir $as_dirs
23606   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23607 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23608    { (exit 1); exit 1; }; }; }
23609
23610   ac_builddir=.
23611
23612 if test "$ac_dir" != .; then
23613   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23614   # A "../" for each directory in $ac_dir_suffix.
23615   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23616 else
23617   ac_dir_suffix= ac_top_builddir=
23618 fi
23619
23620 case $srcdir in
23621   .)  # No --srcdir option.  We are building in place.
23622     ac_srcdir=.
23623     if test -z "$ac_top_builddir"; then
23624        ac_top_srcdir=.
23625     else
23626        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23627     fi ;;
23628   [\\/]* | ?:[\\/]* )  # Absolute path.
23629     ac_srcdir=$srcdir$ac_dir_suffix;
23630     ac_top_srcdir=$srcdir ;;
23631   *) # Relative path.
23632     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23633     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23634 esac
23635
23636 # Do not use `cd foo && pwd` to compute absolute paths, because
23637 # the directories may not exist.
23638 case `pwd` in
23639 .) ac_abs_builddir="$ac_dir";;
23640 *)
23641   case "$ac_dir" in
23642   .) ac_abs_builddir=`pwd`;;
23643   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23644   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23645   esac;;
23646 esac
23647 case $ac_abs_builddir in
23648 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23649 *)
23650   case ${ac_top_builddir}. in
23651   .) ac_abs_top_builddir=$ac_abs_builddir;;
23652   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23653   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23654   esac;;
23655 esac
23656 case $ac_abs_builddir in
23657 .) ac_abs_srcdir=$ac_srcdir;;
23658 *)
23659   case $ac_srcdir in
23660   .) ac_abs_srcdir=$ac_abs_builddir;;
23661   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23662   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23663   esac;;
23664 esac
23665 case $ac_abs_builddir in
23666 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23667 *)
23668   case $ac_top_srcdir in
23669   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23670   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23671   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23672   esac;;
23673 esac
23674
23675
23676
23677   if test x"$ac_file" != x-; then
23678     { echo "$as_me:$LINENO: creating $ac_file" >&5
23679 echo "$as_me: creating $ac_file" >&6;}
23680     rm -f "$ac_file"
23681   fi
23682   # Let's still pretend it is `configure' which instantiates (i.e., don't
23683   # use $as_me), people would be surprised to read:
23684   #    /* config.h.  Generated by config.status.  */
23685   if test x"$ac_file" = x-; then
23686     configure_input=
23687   else
23688     configure_input="$ac_file.  "
23689   fi
23690   configure_input=$configure_input"Generated from `echo $ac_file_in |
23691                                      sed 's,.*/,,'` by configure."
23692
23693   # First look for the input files in the build tree, otherwise in the
23694   # src tree.
23695   ac_file_inputs=`IFS=:
23696     for f in $ac_file_in; do
23697       case $f in
23698       -) echo $tmp/stdin ;;
23699       [\\/$]*)
23700          # Absolute (can't be DOS-style, as IFS=:)
23701          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23702 echo "$as_me: error: cannot find input file: $f" >&2;}
23703    { (exit 1); exit 1; }; }
23704          echo "$f";;
23705       *) # Relative
23706          if test -f "$f"; then
23707            # Build tree
23708            echo "$f"
23709          elif test -f "$srcdir/$f"; then
23710            # Source tree
23711            echo "$srcdir/$f"
23712          else
23713            # /dev/null tree
23714            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23715 echo "$as_me: error: cannot find input file: $f" >&2;}
23716    { (exit 1); exit 1; }; }
23717          fi;;
23718       esac
23719     done` || { (exit 1); exit 1; }
23720 _ACEOF
23721 cat >>$CONFIG_STATUS <<_ACEOF
23722   sed "$ac_vpsub
23723 $extrasub
23724 _ACEOF
23725 cat >>$CONFIG_STATUS <<\_ACEOF
23726 :t
23727 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23728 s,@configure_input@,$configure_input,;t t
23729 s,@srcdir@,$ac_srcdir,;t t
23730 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23731 s,@top_srcdir@,$ac_top_srcdir,;t t
23732 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23733 s,@builddir@,$ac_builddir,;t t
23734 s,@abs_builddir@,$ac_abs_builddir,;t t
23735 s,@top_builddir@,$ac_top_builddir,;t t
23736 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23737 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23738   rm -f $tmp/stdin
23739   if test x"$ac_file" != x-; then
23740     mv $tmp/out $ac_file
23741   else
23742     cat $tmp/out
23743     rm -f $tmp/out
23744   fi
23745
23746 done
23747 _ACEOF
23748 cat >>$CONFIG_STATUS <<\_ACEOF
23749
23750 #
23751 # CONFIG_HEADER section.
23752 #
23753
23754 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23755 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23756 #
23757 # ac_d sets the value in "#define NAME VALUE" lines.
23758 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23759 ac_dB='[         ].*$,\1#\2'
23760 ac_dC=' '
23761 ac_dD=',;t'
23762 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23763 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23764 ac_uB='$,\1#\2define\3'
23765 ac_uC=' '
23766 ac_uD=',;t'
23767
23768 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23769   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23770   case $ac_file in
23771   - | *:- | *:-:* ) # input from stdin
23772         cat >$tmp/stdin
23773         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23774         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23775   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23776         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23777   * )   ac_file_in=$ac_file.in ;;
23778   esac
23779
23780   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23781 echo "$as_me: creating $ac_file" >&6;}
23782
23783   # First look for the input files in the build tree, otherwise in the
23784   # src tree.
23785   ac_file_inputs=`IFS=:
23786     for f in $ac_file_in; do
23787       case $f in
23788       -) echo $tmp/stdin ;;
23789       [\\/$]*)
23790          # Absolute (can't be DOS-style, as IFS=:)
23791          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23792 echo "$as_me: error: cannot find input file: $f" >&2;}
23793    { (exit 1); exit 1; }; }
23794          # Do quote $f, to prevent DOS paths from being IFS'd.
23795          echo "$f";;
23796       *) # Relative
23797          if test -f "$f"; then
23798            # Build tree
23799            echo "$f"
23800          elif test -f "$srcdir/$f"; then
23801            # Source tree
23802            echo "$srcdir/$f"
23803          else
23804            # /dev/null tree
23805            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23806 echo "$as_me: error: cannot find input file: $f" >&2;}
23807    { (exit 1); exit 1; }; }
23808          fi;;
23809       esac
23810     done` || { (exit 1); exit 1; }
23811   # Remove the trailing spaces.
23812   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23813
23814 _ACEOF
23815
23816 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23817 # `conftest.undefs', that substitutes the proper values into
23818 # config.h.in to produce config.h.  The first handles `#define'
23819 # templates, and the second `#undef' templates.
23820 # And first: Protect against being on the right side of a sed subst in
23821 # config.status.  Protect against being in an unquoted here document
23822 # in config.status.
23823 rm -f conftest.defines conftest.undefs
23824 # Using a here document instead of a string reduces the quoting nightmare.
23825 # Putting comments in sed scripts is not portable.
23826 #
23827 # `end' is used to avoid that the second main sed command (meant for
23828 # 0-ary CPP macros) applies to n-ary macro definitions.
23829 # See the Autoconf documentation for `clear'.
23830 cat >confdef2sed.sed <<\_ACEOF
23831 s/[\\&,]/\\&/g
23832 s,[\\$`],\\&,g
23833 t clear
23834 : clear
23835 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23836 t end
23837 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23838 : end
23839 _ACEOF
23840 # If some macros were called several times there might be several times
23841 # the same #defines, which is useless.  Nevertheless, we may not want to
23842 # sort them, since we want the *last* AC-DEFINE to be honored.
23843 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23844 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23845 rm -f confdef2sed.sed
23846
23847 # This sed command replaces #undef with comments.  This is necessary, for
23848 # example, in the case of _POSIX_SOURCE, which is predefined and required
23849 # on some systems where configure will not decide to define it.
23850 cat >>conftest.undefs <<\_ACEOF
23851 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23852 _ACEOF
23853
23854 # Break up conftest.defines because some shells have a limit on the size
23855 # of here documents, and old seds have small limits too (100 cmds).
23856 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23857 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23858 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23859 echo '  :' >>$CONFIG_STATUS
23860 rm -f conftest.tail
23861 while grep . conftest.defines >/dev/null
23862 do
23863   # Write a limited-size here document to $tmp/defines.sed.
23864   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23865   # Speed up: don't consider the non `#define' lines.
23866   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23867   # Work around the forget-to-reset-the-flag bug.
23868   echo 't clr' >>$CONFIG_STATUS
23869   echo ': clr' >>$CONFIG_STATUS
23870   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23871   echo 'CEOF
23872   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23873   rm -f $tmp/in
23874   mv $tmp/out $tmp/in
23875 ' >>$CONFIG_STATUS
23876   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23877   rm -f conftest.defines
23878   mv conftest.tail conftest.defines
23879 done
23880 rm -f conftest.defines
23881 echo '  fi # grep' >>$CONFIG_STATUS
23882 echo >>$CONFIG_STATUS
23883
23884 # Break up conftest.undefs because some shells have a limit on the size
23885 # of here documents, and old seds have small limits too (100 cmds).
23886 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23887 rm -f conftest.tail
23888 while grep . conftest.undefs >/dev/null
23889 do
23890   # Write a limited-size here document to $tmp/undefs.sed.
23891   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23892   # Speed up: don't consider the non `#undef'
23893   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23894   # Work around the forget-to-reset-the-flag bug.
23895   echo 't clr' >>$CONFIG_STATUS
23896   echo ': clr' >>$CONFIG_STATUS
23897   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23898   echo 'CEOF
23899   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23900   rm -f $tmp/in
23901   mv $tmp/out $tmp/in
23902 ' >>$CONFIG_STATUS
23903   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23904   rm -f conftest.undefs
23905   mv conftest.tail conftest.undefs
23906 done
23907 rm -f conftest.undefs
23908
23909 cat >>$CONFIG_STATUS <<\_ACEOF
23910   # Let's still pretend it is `configure' which instantiates (i.e., don't
23911   # use $as_me), people would be surprised to read:
23912   #    /* config.h.  Generated by config.status.  */
23913   if test x"$ac_file" = x-; then
23914     echo "/* Generated by configure.  */" >$tmp/config.h
23915   else
23916     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
23917   fi
23918   cat $tmp/in >>$tmp/config.h
23919   rm -f $tmp/in
23920   if test x"$ac_file" != x-; then
23921     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
23922       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23923 echo "$as_me: $ac_file is unchanged" >&6;}
23924     else
23925       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23926 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23927          X"$ac_file" : 'X\(//\)[^/]' \| \
23928          X"$ac_file" : 'X\(//\)$' \| \
23929          X"$ac_file" : 'X\(/\)' \| \
23930          .     : '\(.\)' 2>/dev/null ||
23931 echo X"$ac_file" |
23932     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23933           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23934           /^X\(\/\/\)$/{ s//\1/; q; }
23935           /^X\(\/\).*/{ s//\1/; q; }
23936           s/.*/./; q'`
23937       { if $as_mkdir_p; then
23938     mkdir -p "$ac_dir"
23939   else
23940     as_dir="$ac_dir"
23941     as_dirs=
23942     while test ! -d "$as_dir"; do
23943       as_dirs="$as_dir $as_dirs"
23944       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23945 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23946          X"$as_dir" : 'X\(//\)[^/]' \| \
23947          X"$as_dir" : 'X\(//\)$' \| \
23948          X"$as_dir" : 'X\(/\)' \| \
23949          .     : '\(.\)' 2>/dev/null ||
23950 echo X"$as_dir" |
23951     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23952           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23953           /^X\(\/\/\)$/{ s//\1/; q; }
23954           /^X\(\/\).*/{ s//\1/; q; }
23955           s/.*/./; q'`
23956     done
23957     test ! -n "$as_dirs" || mkdir $as_dirs
23958   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23959 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23960    { (exit 1); exit 1; }; }; }
23961
23962       rm -f $ac_file
23963       mv $tmp/config.h $ac_file
23964     fi
23965   else
23966     cat $tmp/config.h
23967     rm -f $tmp/config.h
23968   fi
23969   # Run the commands associated with the file.
23970   case $ac_file in
23971     src/include/pg_config.h )
23972 # Update timestamp for pg_config.h (see Makefile.global)
23973 echo >src/include/stamp-h
23974  ;;
23975   esac
23976 done
23977 _ACEOF
23978 cat >>$CONFIG_STATUS <<\_ACEOF
23979
23980 #
23981 # CONFIG_LINKS section.
23982 #
23983
23984 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23985   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23986   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23987
23988   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23989 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
23990
23991   if test ! -r $srcdir/$ac_source; then
23992     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23993 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23994    { (exit 1); exit 1; }; }
23995   fi
23996   rm -f $ac_dest
23997
23998   # Make relative symlinks.
23999   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
24000 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24001          X"$ac_dest" : 'X\(//\)[^/]' \| \
24002          X"$ac_dest" : 'X\(//\)$' \| \
24003          X"$ac_dest" : 'X\(/\)' \| \
24004          .     : '\(.\)' 2>/dev/null ||
24005 echo X"$ac_dest" |
24006     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24007           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24008           /^X\(\/\/\)$/{ s//\1/; q; }
24009           /^X\(\/\).*/{ s//\1/; q; }
24010           s/.*/./; q'`
24011   { if $as_mkdir_p; then
24012     mkdir -p "$ac_dest_dir"
24013   else
24014     as_dir="$ac_dest_dir"
24015     as_dirs=
24016     while test ! -d "$as_dir"; do
24017       as_dirs="$as_dir $as_dirs"
24018       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24019 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24020          X"$as_dir" : 'X\(//\)[^/]' \| \
24021          X"$as_dir" : 'X\(//\)$' \| \
24022          X"$as_dir" : 'X\(/\)' \| \
24023          .     : '\(.\)' 2>/dev/null ||
24024 echo X"$as_dir" |
24025     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24026           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24027           /^X\(\/\/\)$/{ s//\1/; q; }
24028           /^X\(\/\).*/{ s//\1/; q; }
24029           s/.*/./; q'`
24030     done
24031     test ! -n "$as_dirs" || mkdir $as_dirs
24032   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
24033 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
24034    { (exit 1); exit 1; }; }; }
24035
24036   ac_builddir=.
24037
24038 if test "$ac_dest_dir" != .; then
24039   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
24040   # A "../" for each directory in $ac_dir_suffix.
24041   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24042 else
24043   ac_dir_suffix= ac_top_builddir=
24044 fi
24045
24046 case $srcdir in
24047   .)  # No --srcdir option.  We are building in place.
24048     ac_srcdir=.
24049     if test -z "$ac_top_builddir"; then
24050        ac_top_srcdir=.
24051     else
24052        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24053     fi ;;
24054   [\\/]* | ?:[\\/]* )  # Absolute path.
24055     ac_srcdir=$srcdir$ac_dir_suffix;
24056     ac_top_srcdir=$srcdir ;;
24057   *) # Relative path.
24058     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24059     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24060 esac
24061
24062 # Do not use `cd foo && pwd` to compute absolute paths, because
24063 # the directories may not exist.
24064 case `pwd` in
24065 .) ac_abs_builddir="$ac_dest_dir";;
24066 *)
24067   case "$ac_dest_dir" in
24068   .) ac_abs_builddir=`pwd`;;
24069   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24070   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24071   esac;;
24072 esac
24073 case $ac_abs_builddir in
24074 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24075 *)
24076   case ${ac_top_builddir}. in
24077   .) ac_abs_top_builddir=$ac_abs_builddir;;
24078   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24079   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24080   esac;;
24081 esac
24082 case $ac_abs_builddir in
24083 .) ac_abs_srcdir=$ac_srcdir;;
24084 *)
24085   case $ac_srcdir in
24086   .) ac_abs_srcdir=$ac_abs_builddir;;
24087   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24088   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24089   esac;;
24090 esac
24091 case $ac_abs_builddir in
24092 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24093 *)
24094   case $ac_top_srcdir in
24095   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24096   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24097   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24098   esac;;
24099 esac
24100
24101
24102   case $srcdir in
24103   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24104       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24105   esac
24106
24107   # Try a symlink, then a hard link, then a copy.
24108   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24109     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24110     cp -p $srcdir/$ac_source $ac_dest ||
24111     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24112 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24113    { (exit 1); exit 1; }; }
24114 done
24115 _ACEOF
24116 cat >>$CONFIG_STATUS <<\_ACEOF
24117
24118 #
24119 # CONFIG_COMMANDS section.
24120 #
24121 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24122   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24123   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24124   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24125 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24126          X"$ac_dest" : 'X\(//\)[^/]' \| \
24127          X"$ac_dest" : 'X\(//\)$' \| \
24128          X"$ac_dest" : 'X\(/\)' \| \
24129          .     : '\(.\)' 2>/dev/null ||
24130 echo X"$ac_dest" |
24131     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24132           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24133           /^X\(\/\/\)$/{ s//\1/; q; }
24134           /^X\(\/\).*/{ s//\1/; q; }
24135           s/.*/./; q'`
24136   { if $as_mkdir_p; then
24137     mkdir -p "$ac_dir"
24138   else
24139     as_dir="$ac_dir"
24140     as_dirs=
24141     while test ! -d "$as_dir"; do
24142       as_dirs="$as_dir $as_dirs"
24143       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24144 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24145          X"$as_dir" : 'X\(//\)[^/]' \| \
24146          X"$as_dir" : 'X\(//\)$' \| \
24147          X"$as_dir" : 'X\(/\)' \| \
24148          .     : '\(.\)' 2>/dev/null ||
24149 echo X"$as_dir" |
24150     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24151           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24152           /^X\(\/\/\)$/{ s//\1/; q; }
24153           /^X\(\/\).*/{ s//\1/; q; }
24154           s/.*/./; q'`
24155     done
24156     test ! -n "$as_dirs" || mkdir $as_dirs
24157   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24158 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24159    { (exit 1); exit 1; }; }; }
24160
24161   ac_builddir=.
24162
24163 if test "$ac_dir" != .; then
24164   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24165   # A "../" for each directory in $ac_dir_suffix.
24166   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24167 else
24168   ac_dir_suffix= ac_top_builddir=
24169 fi
24170
24171 case $srcdir in
24172   .)  # No --srcdir option.  We are building in place.
24173     ac_srcdir=.
24174     if test -z "$ac_top_builddir"; then
24175        ac_top_srcdir=.
24176     else
24177        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24178     fi ;;
24179   [\\/]* | ?:[\\/]* )  # Absolute path.
24180     ac_srcdir=$srcdir$ac_dir_suffix;
24181     ac_top_srcdir=$srcdir ;;
24182   *) # Relative path.
24183     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24184     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24185 esac
24186
24187 # Do not use `cd foo && pwd` to compute absolute paths, because
24188 # the directories may not exist.
24189 case `pwd` in
24190 .) ac_abs_builddir="$ac_dir";;
24191 *)
24192   case "$ac_dir" in
24193   .) ac_abs_builddir=`pwd`;;
24194   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24195   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24196   esac;;
24197 esac
24198 case $ac_abs_builddir in
24199 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24200 *)
24201   case ${ac_top_builddir}. in
24202   .) ac_abs_top_builddir=$ac_abs_builddir;;
24203   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24204   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24205   esac;;
24206 esac
24207 case $ac_abs_builddir in
24208 .) ac_abs_srcdir=$ac_srcdir;;
24209 *)
24210   case $ac_srcdir in
24211   .) ac_abs_srcdir=$ac_abs_builddir;;
24212   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24213   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24214   esac;;
24215 esac
24216 case $ac_abs_builddir in
24217 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24218 *)
24219   case $ac_top_srcdir in
24220   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24221   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24222   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24223   esac;;
24224 esac
24225
24226
24227   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24228 echo "$as_me: executing $ac_dest commands" >&6;}
24229   case $ac_dest in
24230     check_win32_symlinks )
24231 # Links sometimes fail undetected on Mingw -
24232 # so here we detect it and warn the user
24233 for FILE in $CONFIG_LINKS
24234  do
24235         # test -e works for symlinks in the MinGW console
24236         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24237 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24238  done
24239  ;;
24240   esac
24241 done
24242 _ACEOF
24243
24244 cat >>$CONFIG_STATUS <<\_ACEOF
24245
24246 { (exit 0); exit 0; }
24247 _ACEOF
24248 chmod +x $CONFIG_STATUS
24249 ac_clean_files=$ac_clean_files_save
24250
24251
24252 # configure is writing to config.log, and then calls config.status.
24253 # config.status does its own redirection, appending to config.log.
24254 # Unfortunately, on DOS this fails, as config.log is still kept open
24255 # by configure, so config.status won't be able to write to it; its
24256 # output is simply discarded.  So we exec the FD to /dev/null,
24257 # effectively closing config.log, so it can be properly (re)opened and
24258 # appended to by config.status.  When coming back to configure, we
24259 # need to make the FD available again.
24260 if test "$no_create" != yes; then
24261   ac_cs_success=:
24262   ac_config_status_args=
24263   test "$silent" = yes &&
24264     ac_config_status_args="$ac_config_status_args --quiet"
24265   exec 5>/dev/null
24266   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24267   exec 5>>config.log
24268   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24269   # would make configure fail if this is the last instruction.
24270   $ac_cs_success || { (exit 1); exit 1; }
24271 fi
24272
24273