]> granicus.if.org Git - postgresql/blob - configure
Fixes for CREATE CONSTRAINT manual page.
[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.2beta1.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 2003 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright (c) 1996-2006, PostgreSQL Global Development Group
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248 # Name of the host.
249 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
250 # so uname gets run too.
251 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252
253 exec 6>&1
254
255 #
256 # Initializations.
257 #
258 ac_default_prefix=/usr/local
259 ac_config_libobj_dir=.
260 cross_compiling=no
261 subdirs=
262 MFLAGS=
263 MAKEFLAGS=
264 SHELL=${CONFIG_SHELL-/bin/sh}
265
266 # Maximum number of lines to put in a shell here document.
267 # This variable seems obsolete.  It should probably be removed, and
268 # only ac_max_sed_lines should be used.
269 : ${ac_max_here_lines=38}
270
271 # Identity of this package.
272 PACKAGE_NAME='PostgreSQL'
273 PACKAGE_TARNAME='postgresql'
274 PACKAGE_VERSION='8.2beta1'
275 PACKAGE_STRING='PostgreSQL 8.2beta1'
276 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
277
278 ac_unique_file="src/backend/access/common/heaptuple.c"
279 ac_default_prefix=/usr/local/pgsql
280 # Factoring default headers for most tests.
281 ac_includes_default="\
282 #include <stdio.h>
283 #if HAVE_SYS_TYPES_H
284 # include <sys/types.h>
285 #endif
286 #if HAVE_SYS_STAT_H
287 # include <sys/stat.h>
288 #endif
289 #if STDC_HEADERS
290 # include <stdlib.h>
291 # include <stddef.h>
292 #else
293 # if HAVE_STDLIB_H
294 #  include <stdlib.h>
295 # endif
296 #endif
297 #if HAVE_STRING_H
298 # if !STDC_HEADERS && HAVE_MEMORY_H
299 #  include <memory.h>
300 # endif
301 # include <string.h>
302 #endif
303 #if HAVE_STRINGS_H
304 # include <strings.h>
305 #endif
306 #if HAVE_INTTYPES_H
307 # include <inttypes.h>
308 #else
309 # if HAVE_STDINT_H
310 #  include <stdint.h>
311 # endif
312 #endif
313 #if HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif"
316
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318 ac_subst_files=''
319
320 # Initialize some variables set by options.
321 ac_init_help=
322 ac_init_version=false
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 cache_file=/dev/null
326 exec_prefix=NONE
327 no_create=
328 no_recursion=
329 prefix=NONE
330 program_prefix=NONE
331 program_suffix=NONE
332 program_transform_name=s,x,x,
333 silent=
334 site=
335 srcdir=
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339
340 # Installation directory options.
341 # These are left unexpanded so users can "make install exec_prefix=/foo"
342 # and all the variables that are supposed to be based on exec_prefix
343 # by default will actually change.
344 # Use braces instead of parens because sh, perl, etc. also accept them.
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 ac_prev=
359 for ac_option
360 do
361   # If the previous option needs an argument, assign it.
362   if test -n "$ac_prev"; then
363     eval "$ac_prev=\$ac_option"
364     ac_prev=
365     continue
366   fi
367
368   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
369
370   # Accept the important Cygnus configure options, so we can diagnose typos.
371
372   case $ac_option in
373
374   -bindir | --bindir | --bindi | --bind | --bin | --bi)
375     ac_prev=bindir ;;
376   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
377     bindir=$ac_optarg ;;
378
379   -build | --build | --buil | --bui | --bu)
380     ac_prev=build_alias ;;
381   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
382     build_alias=$ac_optarg ;;
383
384   -cache-file | --cache-file | --cache-fil | --cache-fi \
385   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
386     ac_prev=cache_file ;;
387   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
388   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
389     cache_file=$ac_optarg ;;
390
391   --config-cache | -C)
392     cache_file=config.cache ;;
393
394   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
395     ac_prev=datadir ;;
396   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
397   | --da=*)
398     datadir=$ac_optarg ;;
399
400   -disable-* | --disable-*)
401     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
405    { (exit 1); exit 1; }; }
406     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
407     eval "enable_$ac_feature=no" ;;
408
409   -enable-* | --enable-*)
410     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
414    { (exit 1); exit 1; }; }
415     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
416     case $ac_option in
417       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418       *) ac_optarg=yes ;;
419     esac
420     eval "enable_$ac_feature='$ac_optarg'" ;;
421
422   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
423   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
424   | --exec | --exe | --ex)
425     ac_prev=exec_prefix ;;
426   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
427   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
428   | --exec=* | --exe=* | --ex=*)
429     exec_prefix=$ac_optarg ;;
430
431   -gas | --gas | --ga | --g)
432     # Obsolete; use --with-gas.
433     with_gas=yes ;;
434
435   -help | --help | --hel | --he | -h)
436     ac_init_help=long ;;
437   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
438     ac_init_help=recursive ;;
439   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
440     ac_init_help=short ;;
441
442   -host | --host | --hos | --ho)
443     ac_prev=host_alias ;;
444   -host=* | --host=* | --hos=* | --ho=*)
445     host_alias=$ac_optarg ;;
446
447   -includedir | --includedir | --includedi | --included | --include \
448   | --includ | --inclu | --incl | --inc)
449     ac_prev=includedir ;;
450   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
451   | --includ=* | --inclu=* | --incl=* | --inc=*)
452     includedir=$ac_optarg ;;
453
454   -infodir | --infodir | --infodi | --infod | --info | --inf)
455     ac_prev=infodir ;;
456   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
457     infodir=$ac_optarg ;;
458
459   -libdir | --libdir | --libdi | --libd)
460     ac_prev=libdir ;;
461   -libdir=* | --libdir=* | --libdi=* | --libd=*)
462     libdir=$ac_optarg ;;
463
464   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
465   | --libexe | --libex | --libe)
466     ac_prev=libexecdir ;;
467   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
468   | --libexe=* | --libex=* | --libe=*)
469     libexecdir=$ac_optarg ;;
470
471   -localstatedir | --localstatedir | --localstatedi | --localstated \
472   | --localstate | --localstat | --localsta | --localst \
473   | --locals | --local | --loca | --loc | --lo)
474     ac_prev=localstatedir ;;
475   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
476   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
477   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
478     localstatedir=$ac_optarg ;;
479
480   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
481     ac_prev=mandir ;;
482   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
483     mandir=$ac_optarg ;;
484
485   -nfp | --nfp | --nf)
486     # Obsolete; use --without-fp.
487     with_fp=no ;;
488
489   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
490   | --no-cr | --no-c | -n)
491     no_create=yes ;;
492
493   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
495     no_recursion=yes ;;
496
497   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
498   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
499   | --oldin | --oldi | --old | --ol | --o)
500     ac_prev=oldincludedir ;;
501   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
502   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
503   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
504     oldincludedir=$ac_optarg ;;
505
506   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
507     ac_prev=prefix ;;
508   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
509     prefix=$ac_optarg ;;
510
511   -program-prefix | --program-prefix | --program-prefi | --program-pref \
512   | --program-pre | --program-pr | --program-p)
513     ac_prev=program_prefix ;;
514   -program-prefix=* | --program-prefix=* | --program-prefi=* \
515   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
516     program_prefix=$ac_optarg ;;
517
518   -program-suffix | --program-suffix | --program-suffi | --program-suff \
519   | --program-suf | --program-su | --program-s)
520     ac_prev=program_suffix ;;
521   -program-suffix=* | --program-suffix=* | --program-suffi=* \
522   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
523     program_suffix=$ac_optarg ;;
524
525   -program-transform-name | --program-transform-name \
526   | --program-transform-nam | --program-transform-na \
527   | --program-transform-n | --program-transform- \
528   | --program-transform | --program-transfor \
529   | --program-transfo | --program-transf \
530   | --program-trans | --program-tran \
531   | --progr-tra | --program-tr | --program-t)
532     ac_prev=program_transform_name ;;
533   -program-transform-name=* | --program-transform-name=* \
534   | --program-transform-nam=* | --program-transform-na=* \
535   | --program-transform-n=* | --program-transform-=* \
536   | --program-transform=* | --program-transfor=* \
537   | --program-transfo=* | --program-transf=* \
538   | --program-trans=* | --program-tran=* \
539   | --progr-tra=* | --program-tr=* | --program-t=*)
540     program_transform_name=$ac_optarg ;;
541
542   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
543   | -silent | --silent | --silen | --sile | --sil)
544     silent=yes ;;
545
546   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
547     ac_prev=sbindir ;;
548   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
549   | --sbi=* | --sb=*)
550     sbindir=$ac_optarg ;;
551
552   -sharedstatedir | --sharedstatedir | --sharedstatedi \
553   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
554   | --sharedst | --shareds | --shared | --share | --shar \
555   | --sha | --sh)
556     ac_prev=sharedstatedir ;;
557   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
558   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
559   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
560   | --sha=* | --sh=*)
561     sharedstatedir=$ac_optarg ;;
562
563   -site | --site | --sit)
564     ac_prev=site ;;
565   -site=* | --site=* | --sit=*)
566     site=$ac_optarg ;;
567
568   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
569     ac_prev=srcdir ;;
570   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
571     srcdir=$ac_optarg ;;
572
573   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
574   | --syscon | --sysco | --sysc | --sys | --sy)
575     ac_prev=sysconfdir ;;
576   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
577   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
578     sysconfdir=$ac_optarg ;;
579
580   -target | --target | --targe | --targ | --tar | --ta | --t)
581     ac_prev=target_alias ;;
582   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
583     target_alias=$ac_optarg ;;
584
585   -v | -verbose | --verbose | --verbos | --verbo | --verb)
586     verbose=yes ;;
587
588   -version | --version | --versio | --versi | --vers | -V)
589     ac_init_version=: ;;
590
591   -with-* | --with-*)
592     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
593     # Reject names that are not valid shell variable names.
594     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
595       { echo "$as_me: error: invalid package name: $ac_package" >&2
596    { (exit 1); exit 1; }; }
597     ac_package=`echo $ac_package| sed 's/-/_/g'`
598     case $ac_option in
599       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
600       *) ac_optarg=yes ;;
601     esac
602     eval "with_$ac_package='$ac_optarg'" ;;
603
604   -without-* | --without-*)
605     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
606     # Reject names that are not valid shell variable names.
607     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
608       { echo "$as_me: error: invalid package name: $ac_package" >&2
609    { (exit 1); exit 1; }; }
610     ac_package=`echo $ac_package | sed 's/-/_/g'`
611     eval "with_$ac_package=no" ;;
612
613   --x)
614     # Obsolete; use --with-x.
615     with_x=yes ;;
616
617   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
618   | --x-incl | --x-inc | --x-in | --x-i)
619     ac_prev=x_includes ;;
620   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
621   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
622     x_includes=$ac_optarg ;;
623
624   -x-libraries | --x-libraries | --x-librarie | --x-librari \
625   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
626     ac_prev=x_libraries ;;
627   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
628   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
629     x_libraries=$ac_optarg ;;
630
631   -*) { echo "$as_me: error: unrecognized option: $ac_option
632 Try \`$0 --help' for more information." >&2
633    { (exit 1); exit 1; }; }
634     ;;
635
636   *=*)
637     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
638     # Reject names that are not valid shell variable names.
639     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
640       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
641    { (exit 1); exit 1; }; }
642     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
643     eval "$ac_envvar='$ac_optarg'"
644     export $ac_envvar ;;
645
646   *)
647     # FIXME: should be removed in autoconf 3.0.
648     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
649     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
650       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
651     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
652     ;;
653
654   esac
655 done
656
657 if test -n "$ac_prev"; then
658   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
659   { echo "$as_me: error: missing argument to $ac_option" >&2
660    { (exit 1); exit 1; }; }
661 fi
662
663 # Be sure to have absolute paths.
664 for ac_var in exec_prefix prefix
665 do
666   eval ac_val=$`echo $ac_var`
667   case $ac_val in
668     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
669     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
670    { (exit 1); exit 1; }; };;
671   esac
672 done
673
674 # Be sure to have absolute paths.
675 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
676               localstatedir libdir includedir oldincludedir infodir mandir
677 do
678   eval ac_val=$`echo $ac_var`
679   case $ac_val in
680     [\\/$]* | ?:[\\/]* ) ;;
681     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
682    { (exit 1); exit 1; }; };;
683   esac
684 done
685
686 # There might be people who depend on the old broken behavior: `$host'
687 # used to hold the argument of --host etc.
688 # FIXME: To remove some day.
689 build=$build_alias
690 host=$host_alias
691 target=$target_alias
692
693 # FIXME: To remove some day.
694 if test "x$host_alias" != x; then
695   if test "x$build_alias" = x; then
696     cross_compiling=maybe
697     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
698     If a cross compiler is detected then cross compile mode will be used." >&2
699   elif test "x$build_alias" != "x$host_alias"; then
700     cross_compiling=yes
701   fi
702 fi
703
704 ac_tool_prefix=
705 test -n "$host_alias" && ac_tool_prefix=$host_alias-
706
707 test "$silent" = yes && exec 6>/dev/null
708
709
710 # Find the source files, if location was not specified.
711 if test -z "$srcdir"; then
712   ac_srcdir_defaulted=yes
713   # Try the directory containing this script, then its parent.
714   ac_confdir=`(dirname "$0") 2>/dev/null ||
715 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
716          X"$0" : 'X\(//\)[^/]' \| \
717          X"$0" : 'X\(//\)$' \| \
718          X"$0" : 'X\(/\)' \| \
719          .     : '\(.\)' 2>/dev/null ||
720 echo X"$0" |
721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
722           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
723           /^X\(\/\/\)$/{ s//\1/; q; }
724           /^X\(\/\).*/{ s//\1/; q; }
725           s/.*/./; q'`
726   srcdir=$ac_confdir
727   if test ! -r $srcdir/$ac_unique_file; then
728     srcdir=..
729   fi
730 else
731   ac_srcdir_defaulted=no
732 fi
733 if test ! -r $srcdir/$ac_unique_file; then
734   if test "$ac_srcdir_defaulted" = yes; then
735     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
736    { (exit 1); exit 1; }; }
737   else
738     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
739    { (exit 1); exit 1; }; }
740   fi
741 fi
742 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
743   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
744    { (exit 1); exit 1; }; }
745 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
746 ac_env_build_alias_set=${build_alias+set}
747 ac_env_build_alias_value=$build_alias
748 ac_cv_env_build_alias_set=${build_alias+set}
749 ac_cv_env_build_alias_value=$build_alias
750 ac_env_host_alias_set=${host_alias+set}
751 ac_env_host_alias_value=$host_alias
752 ac_cv_env_host_alias_set=${host_alias+set}
753 ac_cv_env_host_alias_value=$host_alias
754 ac_env_target_alias_set=${target_alias+set}
755 ac_env_target_alias_value=$target_alias
756 ac_cv_env_target_alias_set=${target_alias+set}
757 ac_cv_env_target_alias_value=$target_alias
758 ac_env_CC_set=${CC+set}
759 ac_env_CC_value=$CC
760 ac_cv_env_CC_set=${CC+set}
761 ac_cv_env_CC_value=$CC
762 ac_env_CFLAGS_set=${CFLAGS+set}
763 ac_env_CFLAGS_value=$CFLAGS
764 ac_cv_env_CFLAGS_set=${CFLAGS+set}
765 ac_cv_env_CFLAGS_value=$CFLAGS
766 ac_env_LDFLAGS_set=${LDFLAGS+set}
767 ac_env_LDFLAGS_value=$LDFLAGS
768 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
769 ac_cv_env_LDFLAGS_value=$LDFLAGS
770 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
771 ac_env_CPPFLAGS_value=$CPPFLAGS
772 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
773 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
774 ac_env_CPP_set=${CPP+set}
775 ac_env_CPP_value=$CPP
776 ac_cv_env_CPP_set=${CPP+set}
777 ac_cv_env_CPP_value=$CPP
778 ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
779 ac_env_LDFLAGS_SL_value=$LDFLAGS_SL
780 ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
781 ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL
782 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
783 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
784 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
785 ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
786
787 #
788 # Report the --help message.
789 #
790 if test "$ac_init_help" = "long"; then
791   # Omit some internal or obsolete options to make the list less imposing.
792   # This message is too long to be a string in the A/UX 3.1 sh.
793   cat <<_ACEOF
794 \`configure' configures PostgreSQL 8.2beta1 to adapt to many kinds of systems.
795
796 Usage: $0 [OPTION]... [VAR=VALUE]...
797
798 To assign environment variables (e.g., CC, CFLAGS...), specify them as
799 VAR=VALUE.  See below for descriptions of some of the useful variables.
800
801 Defaults for the options are specified in brackets.
802
803 Configuration:
804   -h, --help              display this help and exit
805       --help=short        display options specific to this package
806       --help=recursive    display the short help of all the included packages
807   -V, --version           display version information and exit
808   -q, --quiet, --silent   do not print \`checking...' messages
809       --cache-file=FILE   cache test results in FILE [disabled]
810   -C, --config-cache      alias for \`--cache-file=config.cache'
811   -n, --no-create         do not create output files
812       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
813
814 _ACEOF
815
816   cat <<_ACEOF
817 Installation directories:
818   --prefix=PREFIX         install architecture-independent files in PREFIX
819                           [$ac_default_prefix]
820   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
821                           [PREFIX]
822
823 By default, \`make install' will install all the files in
824 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
825 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
826 for instance \`--prefix=\$HOME'.
827
828 For better control, use the options below.
829
830 Fine tuning of the installation directories:
831   --bindir=DIR           user executables [EPREFIX/bin]
832   --sbindir=DIR          system admin executables [EPREFIX/sbin]
833   --libexecdir=DIR       program executables [EPREFIX/libexec]
834   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
835   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
836   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
837   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
838   --libdir=DIR           object code libraries [EPREFIX/lib]
839   --includedir=DIR       C header files [PREFIX/include]
840   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
841   --infodir=DIR          info documentation [PREFIX/info]
842   --mandir=DIR           man documentation [PREFIX/man]
843 _ACEOF
844
845   cat <<\_ACEOF
846
847 System types:
848   --build=BUILD     configure for building on BUILD [guessed]
849   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
850 _ACEOF
851 fi
852
853 if test -n "$ac_init_help"; then
854   case $ac_init_help in
855      short | recursive ) echo "Configuration of PostgreSQL 8.2beta1:";;
856    esac
857   cat <<\_ACEOF
858
859 Optional Features:
860   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
861   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
862   --enable-integer-datetimes  enable 64-bit integer date/time support
863   --enable-nls[=LANGUAGES]  enable Native Language Support
864   --disable-shared        do not build shared libraries
865   --disable-rpath         do not embed shared library search path in executables
866   --disable-spinlocks     do not use spinlocks
867   --enable-debug          build with debugging symbols (-g)
868   --enable-dtrace         build with DTrace support
869   --enable-depend         turn on automatic dependency tracking
870   --enable-cassert        enable assertion checks (for debugging)
871   --enable-thread-safety  make client libraries thread-safe
872   --enable-thread-safety-force  force thread-safety in spite of thread test failure
873   --disable-largefile     omit support for large files
874
875 Optional Packages:
876   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
877   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
878
879   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
880   --without-docdir        do not install the documentation
881   --with-includes=DIRS    look for additional header files in DIRS
882   --with-libraries=DIRS   look for additional libraries in DIRS
883   --with-libs=DIRS        alternative spelling of --with-libraries
884   --with-pgport=PORTNUM   change default port number [5432]
885   --with-tcl              build Tcl modules (PL/Tcl)
886   --with-tclconfig=DIR    tclConfig.sh is in DIR
887   --with-perl             build Perl modules (PL/Perl)
888   --with-python           build Python modules (PL/Python)
889   --with-krb5             build with Kerberos 5 support
890   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
891   --with-pam              build with PAM support
892   --with-ldap             build with LDAP support
893   --with-bonjour          build with Bonjour support
894   --with-openssl          build with OpenSSL support
895   --without-readline      do not use GNU Readline nor BSD Libedit for editing
896   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
897   --without-zlib          do not use Zlib
898   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
899
900 Some influential environment variables:
901   CC          C compiler command
902   CFLAGS      C compiler flags
903   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
904               nonstandard directory <lib dir>
905   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
906               headers in a nonstandard directory <include dir>
907   CPP         C preprocessor
908   LDFLAGS_SL
909   DOCBOOKSTYLE
910               location of DocBook stylesheets
911
912 Use these variables to override the choices made by `configure' or to help
913 it to find libraries and programs with nonstandard names/locations.
914
915 Report bugs to <pgsql-bugs@postgresql.org>.
916 _ACEOF
917 fi
918
919 if test "$ac_init_help" = "recursive"; then
920   # If there are subdirs, report their specific --help.
921   ac_popdir=`pwd`
922   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
923     test -d $ac_dir || continue
924     ac_builddir=.
925
926 if test "$ac_dir" != .; then
927   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
928   # A "../" for each directory in $ac_dir_suffix.
929   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
930 else
931   ac_dir_suffix= ac_top_builddir=
932 fi
933
934 case $srcdir in
935   .)  # No --srcdir option.  We are building in place.
936     ac_srcdir=.
937     if test -z "$ac_top_builddir"; then
938        ac_top_srcdir=.
939     else
940        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
941     fi ;;
942   [\\/]* | ?:[\\/]* )  # Absolute path.
943     ac_srcdir=$srcdir$ac_dir_suffix;
944     ac_top_srcdir=$srcdir ;;
945   *) # Relative path.
946     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
947     ac_top_srcdir=$ac_top_builddir$srcdir ;;
948 esac
949
950 # Do not use `cd foo && pwd` to compute absolute paths, because
951 # the directories may not exist.
952 case `pwd` in
953 .) ac_abs_builddir="$ac_dir";;
954 *)
955   case "$ac_dir" in
956   .) ac_abs_builddir=`pwd`;;
957   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
958   *) ac_abs_builddir=`pwd`/"$ac_dir";;
959   esac;;
960 esac
961 case $ac_abs_builddir in
962 .) ac_abs_top_builddir=${ac_top_builddir}.;;
963 *)
964   case ${ac_top_builddir}. in
965   .) ac_abs_top_builddir=$ac_abs_builddir;;
966   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
967   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
968   esac;;
969 esac
970 case $ac_abs_builddir in
971 .) ac_abs_srcdir=$ac_srcdir;;
972 *)
973   case $ac_srcdir in
974   .) ac_abs_srcdir=$ac_abs_builddir;;
975   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
976   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
977   esac;;
978 esac
979 case $ac_abs_builddir in
980 .) ac_abs_top_srcdir=$ac_top_srcdir;;
981 *)
982   case $ac_top_srcdir in
983   .) ac_abs_top_srcdir=$ac_abs_builddir;;
984   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
985   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
986   esac;;
987 esac
988
989     cd $ac_dir
990     # Check for guested configure; otherwise get Cygnus style configure.
991     if test -f $ac_srcdir/configure.gnu; then
992       echo
993       $SHELL $ac_srcdir/configure.gnu  --help=recursive
994     elif test -f $ac_srcdir/configure; then
995       echo
996       $SHELL $ac_srcdir/configure  --help=recursive
997     elif test -f $ac_srcdir/configure.ac ||
998            test -f $ac_srcdir/configure.in; then
999       echo
1000       $ac_configure --help
1001     else
1002       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1003     fi
1004     cd $ac_popdir
1005   done
1006 fi
1007
1008 test -n "$ac_init_help" && exit 0
1009 if $ac_init_version; then
1010   cat <<\_ACEOF
1011 PostgreSQL configure 8.2beta1
1012 generated by GNU Autoconf 2.59
1013
1014 Copyright (C) 2003 Free Software Foundation, Inc.
1015 This configure script is free software; the Free Software Foundation
1016 gives unlimited permission to copy, distribute and modify it.
1017
1018 Copyright (c) 1996-2006, PostgreSQL Global Development Group
1019 _ACEOF
1020   exit 0
1021 fi
1022 exec 5>config.log
1023 cat >&5 <<_ACEOF
1024 This file contains any messages produced by compilers while
1025 running configure, to aid debugging if configure makes a mistake.
1026
1027 It was created by PostgreSQL $as_me 8.2beta1, which was
1028 generated by GNU Autoconf 2.59.  Invocation command line was
1029
1030   $ $0 $@
1031
1032 _ACEOF
1033 {
1034 cat <<_ASUNAME
1035 ## --------- ##
1036 ## Platform. ##
1037 ## --------- ##
1038
1039 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1040 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1041 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1042 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1043 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1044
1045 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1046 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1047
1048 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1049 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1050 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1051 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1052 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1053 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1054 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1055
1056 _ASUNAME
1057
1058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1059 for as_dir in $PATH
1060 do
1061   IFS=$as_save_IFS
1062   test -z "$as_dir" && as_dir=.
1063   echo "PATH: $as_dir"
1064 done
1065
1066 } >&5
1067
1068 cat >&5 <<_ACEOF
1069
1070
1071 ## ----------- ##
1072 ## Core tests. ##
1073 ## ----------- ##
1074
1075 _ACEOF
1076
1077
1078 # Keep a trace of the command line.
1079 # Strip out --no-create and --no-recursion so they do not pile up.
1080 # Strip out --silent because we don't want to record it for future runs.
1081 # Also quote any args containing shell meta-characters.
1082 # Make two passes to allow for proper duplicate-argument suppression.
1083 ac_configure_args=
1084 ac_configure_args0=
1085 ac_configure_args1=
1086 ac_sep=
1087 ac_must_keep_next=false
1088 for ac_pass in 1 2
1089 do
1090   for ac_arg
1091   do
1092     case $ac_arg in
1093     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1094     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1095     | -silent | --silent | --silen | --sile | --sil)
1096       continue ;;
1097     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1098       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1099     esac
1100     case $ac_pass in
1101     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1102     2)
1103       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1104       if test $ac_must_keep_next = true; then
1105         ac_must_keep_next=false # Got value, back to normal.
1106       else
1107         case $ac_arg in
1108           *=* | --config-cache | -C | -disable-* | --disable-* \
1109           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1110           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1111           | -with-* | --with-* | -without-* | --without-* | --x)
1112             case "$ac_configure_args0 " in
1113               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1114             esac
1115             ;;
1116           -* ) ac_must_keep_next=true ;;
1117         esac
1118       fi
1119       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1120       # Get rid of the leading space.
1121       ac_sep=" "
1122       ;;
1123     esac
1124   done
1125 done
1126 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1127 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1128
1129 # When interrupted or exit'd, cleanup temporary files, and complete
1130 # config.log.  We remove comments because anyway the quotes in there
1131 # would cause problems or look ugly.
1132 # WARNING: Be sure not to use single quotes in there, as some shells,
1133 # such as our DU 5.0 friend, will then `close' the trap.
1134 trap 'exit_status=$?
1135   # Save into config.log some information that might help in debugging.
1136   {
1137     echo
1138
1139     cat <<\_ASBOX
1140 ## ---------------- ##
1141 ## Cache variables. ##
1142 ## ---------------- ##
1143 _ASBOX
1144     echo
1145     # The following way of writing the cache mishandles newlines in values,
1146 {
1147   (set) 2>&1 |
1148     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1149     *ac_space=\ *)
1150       sed -n \
1151         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1152           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1153       ;;
1154     *)
1155       sed -n \
1156         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1157       ;;
1158     esac;
1159 }
1160     echo
1161
1162     cat <<\_ASBOX
1163 ## ----------------- ##
1164 ## Output variables. ##
1165 ## ----------------- ##
1166 _ASBOX
1167     echo
1168     for ac_var in $ac_subst_vars
1169     do
1170       eval ac_val=$`echo $ac_var`
1171       echo "$ac_var='"'"'$ac_val'"'"'"
1172     done | sort
1173     echo
1174
1175     if test -n "$ac_subst_files"; then
1176       cat <<\_ASBOX
1177 ## ------------- ##
1178 ## Output files. ##
1179 ## ------------- ##
1180 _ASBOX
1181       echo
1182       for ac_var in $ac_subst_files
1183       do
1184         eval ac_val=$`echo $ac_var`
1185         echo "$ac_var='"'"'$ac_val'"'"'"
1186       done | sort
1187       echo
1188     fi
1189
1190     if test -s confdefs.h; then
1191       cat <<\_ASBOX
1192 ## ----------- ##
1193 ## confdefs.h. ##
1194 ## ----------- ##
1195 _ASBOX
1196       echo
1197       sed "/^$/d" confdefs.h | sort
1198       echo
1199     fi
1200     test "$ac_signal" != 0 &&
1201       echo "$as_me: caught signal $ac_signal"
1202     echo "$as_me: exit $exit_status"
1203   } >&5
1204   rm -f core *.core &&
1205   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1206     exit $exit_status
1207      ' 0
1208 for ac_signal in 1 2 13 15; do
1209   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1210 done
1211 ac_signal=0
1212
1213 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1214 rm -rf conftest* confdefs.h
1215 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1216 echo >confdefs.h
1217
1218 # Predefined preprocessor variables.
1219
1220 cat >>confdefs.h <<_ACEOF
1221 #define PACKAGE_NAME "$PACKAGE_NAME"
1222 _ACEOF
1223
1224
1225 cat >>confdefs.h <<_ACEOF
1226 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1227 _ACEOF
1228
1229
1230 cat >>confdefs.h <<_ACEOF
1231 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1232 _ACEOF
1233
1234
1235 cat >>confdefs.h <<_ACEOF
1236 #define PACKAGE_STRING "$PACKAGE_STRING"
1237 _ACEOF
1238
1239
1240 cat >>confdefs.h <<_ACEOF
1241 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1242 _ACEOF
1243
1244
1245 # Let the site file select an alternate cache file if it wants to.
1246 # Prefer explicitly selected file to automatically selected ones.
1247 if test -z "$CONFIG_SITE"; then
1248   if test "x$prefix" != xNONE; then
1249     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1250   else
1251     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1252   fi
1253 fi
1254 for ac_site_file in $CONFIG_SITE; do
1255   if test -r "$ac_site_file"; then
1256     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1257 echo "$as_me: loading site script $ac_site_file" >&6;}
1258     sed 's/^/| /' "$ac_site_file" >&5
1259     . "$ac_site_file"
1260   fi
1261 done
1262
1263 if test -r "$cache_file"; then
1264   # Some versions of bash will fail to source /dev/null (special
1265   # files actually), so we avoid doing that.
1266   if test -f "$cache_file"; then
1267     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1268 echo "$as_me: loading cache $cache_file" >&6;}
1269     case $cache_file in
1270       [\\/]* | ?:[\\/]* ) . $cache_file;;
1271       *)                      . ./$cache_file;;
1272     esac
1273   fi
1274 else
1275   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1276 echo "$as_me: creating cache $cache_file" >&6;}
1277   >$cache_file
1278 fi
1279
1280 # Check that the precious variables saved in the cache have kept the same
1281 # value.
1282 ac_cache_corrupted=false
1283 for ac_var in `(set) 2>&1 |
1284                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1285   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1286   eval ac_new_set=\$ac_env_${ac_var}_set
1287   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1288   eval ac_new_val="\$ac_env_${ac_var}_value"
1289   case $ac_old_set,$ac_new_set in
1290     set,)
1291       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1292 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1293       ac_cache_corrupted=: ;;
1294     ,set)
1295       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1296 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1297       ac_cache_corrupted=: ;;
1298     ,);;
1299     *)
1300       if test "x$ac_old_val" != "x$ac_new_val"; then
1301         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1302 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1303         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1304 echo "$as_me:   former value:  $ac_old_val" >&2;}
1305         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1306 echo "$as_me:   current value: $ac_new_val" >&2;}
1307         ac_cache_corrupted=:
1308       fi;;
1309   esac
1310   # Pass precious variables to config.status.
1311   if test "$ac_new_set" = set; then
1312     case $ac_new_val in
1313     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1314       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1315     *) ac_arg=$ac_var=$ac_new_val ;;
1316     esac
1317     case " $ac_configure_args " in
1318       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1319       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1320     esac
1321   fi
1322 done
1323 if $ac_cache_corrupted; then
1324   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1325 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1326   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1327 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1328    { (exit 1); exit 1; }; }
1329 fi
1330
1331 ac_ext=c
1332 ac_cpp='$CPP $CPPFLAGS'
1333 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1334 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1335 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367 ac_aux_dir=
1368 for ac_dir in config $srcdir/config; do
1369   if test -f $ac_dir/install-sh; then
1370     ac_aux_dir=$ac_dir
1371     ac_install_sh="$ac_aux_dir/install-sh -c"
1372     break
1373   elif test -f $ac_dir/install.sh; then
1374     ac_aux_dir=$ac_dir
1375     ac_install_sh="$ac_aux_dir/install.sh -c"
1376     break
1377   elif test -f $ac_dir/shtool; then
1378     ac_aux_dir=$ac_dir
1379     ac_install_sh="$ac_aux_dir/shtool install -c"
1380     break
1381   fi
1382 done
1383 if test -z "$ac_aux_dir"; then
1384   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1385 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1386    { (exit 1); exit 1; }; }
1387 fi
1388 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1389 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1390 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1391
1392
1393 configure_args=$ac_configure_args
1394
1395
1396
1397 cat >>confdefs.h <<_ACEOF
1398 #define PG_VERSION "$PACKAGE_VERSION"
1399 _ACEOF
1400
1401
1402 # Make sure we can run config.sub.
1403 $ac_config_sub sun4 >/dev/null 2>&1 ||
1404   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1405 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1406    { (exit 1); exit 1; }; }
1407
1408 echo "$as_me:$LINENO: checking build system type" >&5
1409 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1410 if test "${ac_cv_build+set}" = set; then
1411   echo $ECHO_N "(cached) $ECHO_C" >&6
1412 else
1413   ac_cv_build_alias=$build_alias
1414 test -z "$ac_cv_build_alias" &&
1415   ac_cv_build_alias=`$ac_config_guess`
1416 test -z "$ac_cv_build_alias" &&
1417   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1418 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1419    { (exit 1); exit 1; }; }
1420 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1421   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1422 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1423    { (exit 1); exit 1; }; }
1424
1425 fi
1426 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1427 echo "${ECHO_T}$ac_cv_build" >&6
1428 build=$ac_cv_build
1429 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1430 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1431 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1432
1433
1434 echo "$as_me:$LINENO: checking host system type" >&5
1435 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1436 if test "${ac_cv_host+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   ac_cv_host_alias=$host_alias
1440 test -z "$ac_cv_host_alias" &&
1441   ac_cv_host_alias=$ac_cv_build_alias
1442 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1443   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1444 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1445    { (exit 1); exit 1; }; }
1446
1447 fi
1448 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1449 echo "${ECHO_T}$ac_cv_host" >&6
1450 host=$ac_cv_host
1451 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1452 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1453 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1454
1455
1456
1457 template=
1458 echo "$as_me:$LINENO: checking which template to use" >&5
1459 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1460
1461
1462
1463
1464
1465 # Check whether --with-template or --without-template was given.
1466 if test "${with_template+set}" = set; then
1467   withval="$with_template"
1468
1469   case $withval in
1470     yes)
1471       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1472 echo "$as_me: error: argument required for --with-template option" >&2;}
1473    { (exit 1); exit 1; }; }
1474       ;;
1475     no)
1476       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1477 echo "$as_me: error: argument required for --with-template option" >&2;}
1478    { (exit 1); exit 1; }; }
1479       ;;
1480     *)
1481
1482   case $withval in
1483     list)   echo; ls "$srcdir/src/template"; exit;;
1484     *)      if test -f "$srcdir/src/template/$with_template" ; then
1485               template=$withval
1486             else
1487               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1488 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1489    { (exit 1); exit 1; }; }
1490             fi;;
1491   esac
1492
1493       ;;
1494   esac
1495
1496 else
1497
1498 # --with-template not given
1499
1500 case $host_os in
1501      aix*) template=aix ;;
1502     bsdi*) template=bsdi ;;
1503   cygwin*) template=cygwin ;;
1504   darwin*) template=darwin ;;
1505     dgux*) template=dgux ;;
1506  freebsd*) template=freebsd ;;
1507     hpux*) template=hpux ;;
1508     irix*) template=irix ;;
1509  linux*|gnu*|k*bsd*-gnu)
1510            template=linux ;;
1511    mingw*) template=win32 ;;
1512   netbsd*) template=netbsd ;;
1513 nextstep*) template=nextstep ;;
1514  openbsd*) template=openbsd ;;
1515      osf*) template=osf ;;
1516      sco*) template=sco ;;
1517  solaris*) template=solaris ;;
1518    sunos*) template=sunos4 ;;
1519  sysv4.2*)
1520         case $host_vendor in
1521           univel) template=univel ;;
1522         esac ;;
1523    sysv4*) template=svr4 ;;
1524    sysv5*) template=unixware ;;
1525   ultrix*) template=ultrix4 ;;
1526 esac
1527
1528   if test x"$template" = x"" ; then
1529     { { echo "$as_me:$LINENO: error:
1530 *******************************************************************
1531 PostgreSQL has apparently not been ported to your platform yet.
1532 To try a manual configuration, look into the src/template directory
1533 for a similar platform and use the '--with-template=' option.
1534
1535 Please also contact <pgsql-ports@postgresql.org> to see about
1536 rectifying this.  Include the above 'checking host system type...'
1537 line.
1538 *******************************************************************
1539 " >&5
1540 echo "$as_me: error:
1541 *******************************************************************
1542 PostgreSQL has apparently not been ported to your platform yet.
1543 To try a manual configuration, look into the src/template directory
1544 for a similar platform and use the '--with-template=' option.
1545
1546 Please also contact <pgsql-ports@postgresql.org> to see about
1547 rectifying this.  Include the above 'checking host system type...'
1548 line.
1549 *******************************************************************
1550 " >&2;}
1551    { (exit 1); exit 1; }; }
1552   fi
1553
1554
1555 fi;
1556
1557
1558 echo "$as_me:$LINENO: result: $template" >&5
1559 echo "${ECHO_T}$template" >&6
1560
1561 PORTNAME=$template
1562
1563
1564 # Initialize default assumption that we do not need separate assembly code
1565 # for TAS (test-and-set).  This can be overridden by the template file
1566 # when it's executed.
1567 need_tas=no
1568 tas_file=dummy.s
1569
1570
1571
1572 ##
1573 ## Command line options
1574 ##
1575
1576 #
1577 # Installation directory for documentation
1578 #
1579
1580
1581
1582
1583 # Check whether --with-docdir or --without-docdir was given.
1584 if test "${with_docdir+set}" = set; then
1585   withval="$with_docdir"
1586
1587   case $withval in
1588     yes)
1589       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1590 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1591    { (exit 1); exit 1; }; }
1592       ;;
1593     no)
1594       docdir=
1595       ;;
1596     *)
1597       docdir=$withval
1598       ;;
1599   esac
1600
1601 else
1602   docdir='${prefix}/doc'
1603 fi;
1604
1605
1606
1607
1608 #
1609 # Add non-standard directories to the include path
1610 #
1611
1612
1613
1614
1615 # Check whether --with-includes or --without-includes was given.
1616 if test "${with_includes+set}" = set; then
1617   withval="$with_includes"
1618
1619   case $withval in
1620     yes)
1621       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1622 echo "$as_me: error: argument required for --with-includes option" >&2;}
1623    { (exit 1); exit 1; }; }
1624       ;;
1625     no)
1626       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1627 echo "$as_me: error: argument required for --with-includes option" >&2;}
1628    { (exit 1); exit 1; }; }
1629       ;;
1630     *)
1631
1632       ;;
1633   esac
1634
1635 fi;
1636
1637
1638
1639 #
1640 # Add non-standard directories to the library search path
1641 #
1642
1643
1644
1645
1646 # Check whether --with-libraries or --without-libraries was given.
1647 if test "${with_libraries+set}" = set; then
1648   withval="$with_libraries"
1649
1650   case $withval in
1651     yes)
1652       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1653 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1654    { (exit 1); exit 1; }; }
1655       ;;
1656     no)
1657       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1658 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1659    { (exit 1); exit 1; }; }
1660       ;;
1661     *)
1662       LIBRARY_DIRS=$withval
1663       ;;
1664   esac
1665
1666 fi;
1667
1668
1669
1670
1671
1672
1673 # Check whether --with-libs or --without-libs was given.
1674 if test "${with_libs+set}" = set; then
1675   withval="$with_libs"
1676
1677   case $withval in
1678     yes)
1679       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1680 echo "$as_me: error: argument required for --with-libs option" >&2;}
1681    { (exit 1); exit 1; }; }
1682       ;;
1683     no)
1684       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1685 echo "$as_me: error: argument required for --with-libs option" >&2;}
1686    { (exit 1); exit 1; }; }
1687       ;;
1688     *)
1689       LIBRARY_DIRS=$withval
1690       ;;
1691   esac
1692
1693 fi;
1694
1695
1696
1697 #
1698 # 64-bit integer date/time storage (--enable-integer-datetimes)
1699 #
1700 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1701 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1702
1703
1704
1705 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1706 if test "${enable_integer_datetimes+set}" = set; then
1707   enableval="$enable_integer_datetimes"
1708
1709   case $enableval in
1710     yes)
1711
1712 cat >>confdefs.h <<\_ACEOF
1713 #define USE_INTEGER_DATETIMES 1
1714 _ACEOF
1715
1716       ;;
1717     no)
1718       :
1719       ;;
1720     *)
1721       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1722 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1723    { (exit 1); exit 1; }; }
1724       ;;
1725   esac
1726
1727 else
1728   enable_integer_datetimes=no
1729
1730 fi;
1731
1732 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1733 echo "${ECHO_T}$enable_integer_datetimes" >&6
1734
1735
1736 #
1737 # NLS
1738 #
1739 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1740 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1741
1742
1743
1744 # Check whether --enable-nls or --disable-nls was given.
1745 if test "${enable_nls+set}" = set; then
1746   enableval="$enable_nls"
1747
1748   case $enableval in
1749     yes)
1750       :
1751       ;;
1752     no)
1753       :
1754       ;;
1755     *)
1756       enable_nls=yes
1757 WANTED_LANGUAGES=$enableval
1758       ;;
1759   esac
1760
1761 else
1762   enable_nls=no
1763 fi;
1764
1765
1766 if test "$enable_nls" = yes; then
1767
1768 cat >>confdefs.h <<\_ACEOF
1769 #define ENABLE_NLS 1
1770 _ACEOF
1771
1772 fi
1773
1774 echo "$as_me:$LINENO: result: $enable_nls" >&5
1775 echo "${ECHO_T}$enable_nls" >&6
1776
1777
1778
1779 #
1780 # Default port number (--with-pgport), default 5432
1781 #
1782 echo "$as_me:$LINENO: checking for default port number" >&5
1783 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1784
1785
1786
1787
1788 # Check whether --with-pgport or --without-pgport was given.
1789 if test "${with_pgport+set}" = set; then
1790   withval="$with_pgport"
1791
1792   case $withval in
1793     yes)
1794       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1795 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1796    { (exit 1); exit 1; }; }
1797       ;;
1798     no)
1799       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1800 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1801    { (exit 1); exit 1; }; }
1802       ;;
1803     *)
1804       default_port=$withval
1805       ;;
1806   esac
1807
1808 else
1809   default_port=5432
1810 fi;
1811
1812 echo "$as_me:$LINENO: result: $default_port" >&5
1813 echo "${ECHO_T}$default_port" >&6
1814 # Need both of these because some places want an integer and some a string
1815
1816 cat >>confdefs.h <<_ACEOF
1817 #define DEF_PGPORT ${default_port}
1818 _ACEOF
1819
1820
1821 cat >>confdefs.h <<_ACEOF
1822 #define DEF_PGPORT_STR "${default_port}"
1823 _ACEOF
1824
1825
1826
1827 #
1828 # Option to disable shared libraries
1829 #
1830
1831
1832
1833 # Check whether --enable-shared or --disable-shared was given.
1834 if test "${enable_shared+set}" = set; then
1835   enableval="$enable_shared"
1836
1837   case $enableval in
1838     yes)
1839       :
1840       ;;
1841     no)
1842       :
1843       ;;
1844     *)
1845       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1846 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1847    { (exit 1); exit 1; }; }
1848       ;;
1849   esac
1850
1851 else
1852   enable_shared=yes
1853
1854 fi;
1855
1856
1857
1858 #
1859 # '-rpath'-like feature can be disabled
1860 #
1861
1862
1863
1864 # Check whether --enable-rpath or --disable-rpath was given.
1865 if test "${enable_rpath+set}" = set; then
1866   enableval="$enable_rpath"
1867
1868   case $enableval in
1869     yes)
1870       :
1871       ;;
1872     no)
1873       :
1874       ;;
1875     *)
1876       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1877 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1878    { (exit 1); exit 1; }; }
1879       ;;
1880   esac
1881
1882 else
1883   enable_rpath=yes
1884
1885 fi;
1886
1887
1888
1889 #
1890 # Spinlocks
1891 #
1892
1893
1894
1895 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1896 if test "${enable_spinlocks+set}" = set; then
1897   enableval="$enable_spinlocks"
1898
1899   case $enableval in
1900     yes)
1901       :
1902       ;;
1903     no)
1904       :
1905       ;;
1906     *)
1907       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1908 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1909    { (exit 1); exit 1; }; }
1910       ;;
1911   esac
1912
1913 else
1914   enable_spinlocks=yes
1915
1916 fi;
1917
1918
1919 #
1920 # --enable-debug adds -g to compiler flags
1921 #
1922
1923
1924
1925 # Check whether --enable-debug or --disable-debug was given.
1926 if test "${enable_debug+set}" = set; then
1927   enableval="$enable_debug"
1928
1929   case $enableval in
1930     yes)
1931       :
1932       ;;
1933     no)
1934       :
1935       ;;
1936     *)
1937       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1938 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1939    { (exit 1); exit 1; }; }
1940       ;;
1941   esac
1942
1943 else
1944   enable_debug=no
1945
1946 fi;
1947
1948
1949
1950 #
1951 # DTrace
1952 #
1953
1954
1955
1956 # Check whether --enable-dtrace or --disable-dtrace was given.
1957 if test "${enable_dtrace+set}" = set; then
1958   enableval="$enable_dtrace"
1959
1960   case $enableval in
1961     yes)
1962
1963 cat >>confdefs.h <<\_ACEOF
1964 #define ENABLE_DTRACE 1
1965 _ACEOF
1966
1967 for ac_prog in dtrace
1968 do
1969   # Extract the first word of "$ac_prog", so it can be a program name with args.
1970 set dummy $ac_prog; ac_word=$2
1971 echo "$as_me:$LINENO: checking for $ac_word" >&5
1972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1973 if test "${ac_cv_prog_DTRACE+set}" = set; then
1974   echo $ECHO_N "(cached) $ECHO_C" >&6
1975 else
1976   if test -n "$DTRACE"; then
1977   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
1978 else
1979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1980 for as_dir in $PATH
1981 do
1982   IFS=$as_save_IFS
1983   test -z "$as_dir" && as_dir=.
1984   for ac_exec_ext in '' $ac_executable_extensions; do
1985   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1986     ac_cv_prog_DTRACE="$ac_prog"
1987     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1988     break 2
1989   fi
1990 done
1991 done
1992
1993 fi
1994 fi
1995 DTRACE=$ac_cv_prog_DTRACE
1996 if test -n "$DTRACE"; then
1997   echo "$as_me:$LINENO: result: $DTRACE" >&5
1998 echo "${ECHO_T}$DTRACE" >&6
1999 else
2000   echo "$as_me:$LINENO: result: no" >&5
2001 echo "${ECHO_T}no" >&6
2002 fi
2003
2004   test -n "$DTRACE" && break
2005 done
2006
2007 if test -z "$DTRACE"; then
2008   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2009 echo "$as_me: error: dtrace not found" >&2;}
2010    { (exit 1); exit 1; }; }
2011 fi
2012
2013       ;;
2014     no)
2015       :
2016       ;;
2017     *)
2018       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2019 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2020    { (exit 1); exit 1; }; }
2021       ;;
2022   esac
2023
2024 else
2025   enable_dtrace=no
2026
2027 fi;
2028
2029
2030
2031 #
2032 # C compiler
2033 #
2034
2035 # For historical reasons you can also use --with-CC to specify the C compiler
2036 # to use, although the standard way to do this is to set the CC environment
2037 # variable.
2038
2039
2040
2041
2042 # Check whether --with-CC or --without-CC was given.
2043 if test "${with_CC+set}" = set; then
2044   withval="$with_CC"
2045
2046   case $withval in
2047     yes)
2048       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2049 echo "$as_me: error: argument required for --with-CC option" >&2;}
2050    { (exit 1); exit 1; }; }
2051       ;;
2052     no)
2053       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2054 echo "$as_me: error: argument required for --with-CC option" >&2;}
2055    { (exit 1); exit 1; }; }
2056       ;;
2057     *)
2058       CC=$with_CC
2059       ;;
2060   esac
2061
2062 fi;
2063
2064
2065 case $template in
2066   aix) pgac_cc_list="gcc xlc";;
2067  irix) pgac_cc_list="cc";; # no gcc
2068     *) pgac_cc_list="gcc cc";;
2069 esac
2070
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 if test -n "$ac_tool_prefix"; then
2077   for ac_prog in $pgac_cc_list
2078   do
2079     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2080 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2081 echo "$as_me:$LINENO: checking for $ac_word" >&5
2082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2083 if test "${ac_cv_prog_CC+set}" = set; then
2084   echo $ECHO_N "(cached) $ECHO_C" >&6
2085 else
2086   if test -n "$CC"; then
2087   ac_cv_prog_CC="$CC" # Let the user override the test.
2088 else
2089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2090 for as_dir in $PATH
2091 do
2092   IFS=$as_save_IFS
2093   test -z "$as_dir" && as_dir=.
2094   for ac_exec_ext in '' $ac_executable_extensions; do
2095   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2096     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2097     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2098     break 2
2099   fi
2100 done
2101 done
2102
2103 fi
2104 fi
2105 CC=$ac_cv_prog_CC
2106 if test -n "$CC"; then
2107   echo "$as_me:$LINENO: result: $CC" >&5
2108 echo "${ECHO_T}$CC" >&6
2109 else
2110   echo "$as_me:$LINENO: result: no" >&5
2111 echo "${ECHO_T}no" >&6
2112 fi
2113
2114     test -n "$CC" && break
2115   done
2116 fi
2117 if test -z "$CC"; then
2118   ac_ct_CC=$CC
2119   for ac_prog in $pgac_cc_list
2120 do
2121   # Extract the first word of "$ac_prog", so it can be a program name with args.
2122 set dummy $ac_prog; ac_word=$2
2123 echo "$as_me:$LINENO: checking for $ac_word" >&5
2124 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2125 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2126   echo $ECHO_N "(cached) $ECHO_C" >&6
2127 else
2128   if test -n "$ac_ct_CC"; then
2129   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2130 else
2131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2132 for as_dir in $PATH
2133 do
2134   IFS=$as_save_IFS
2135   test -z "$as_dir" && as_dir=.
2136   for ac_exec_ext in '' $ac_executable_extensions; do
2137   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2138     ac_cv_prog_ac_ct_CC="$ac_prog"
2139     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2140     break 2
2141   fi
2142 done
2143 done
2144
2145 fi
2146 fi
2147 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2148 if test -n "$ac_ct_CC"; then
2149   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2150 echo "${ECHO_T}$ac_ct_CC" >&6
2151 else
2152   echo "$as_me:$LINENO: result: no" >&5
2153 echo "${ECHO_T}no" >&6
2154 fi
2155
2156   test -n "$ac_ct_CC" && break
2157 done
2158
2159   CC=$ac_ct_CC
2160 fi
2161
2162
2163 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2164 See \`config.log' for more details." >&5
2165 echo "$as_me: error: no acceptable C compiler found in \$PATH
2166 See \`config.log' for more details." >&2;}
2167    { (exit 1); exit 1; }; }
2168
2169 # Provide some information about the compiler.
2170 echo "$as_me:$LINENO:" \
2171      "checking for C compiler version" >&5
2172 ac_compiler=`set X $ac_compile; echo $2`
2173 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2174   (eval $ac_compiler --version </dev/null >&5) 2>&5
2175   ac_status=$?
2176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2177   (exit $ac_status); }
2178 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2179   (eval $ac_compiler -v </dev/null >&5) 2>&5
2180   ac_status=$?
2181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182   (exit $ac_status); }
2183 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2184   (eval $ac_compiler -V </dev/null >&5) 2>&5
2185   ac_status=$?
2186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187   (exit $ac_status); }
2188
2189 cat >conftest.$ac_ext <<_ACEOF
2190 /* confdefs.h.  */
2191 _ACEOF
2192 cat confdefs.h >>conftest.$ac_ext
2193 cat >>conftest.$ac_ext <<_ACEOF
2194 /* end confdefs.h.  */
2195
2196 int
2197 main ()
2198 {
2199
2200   ;
2201   return 0;
2202 }
2203 _ACEOF
2204 ac_clean_files_save=$ac_clean_files
2205 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2206 # Try to create an executable without -o first, disregard a.out.
2207 # It will help us diagnose broken compilers, and finding out an intuition
2208 # of exeext.
2209 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2210 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2211 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2212 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2213   (eval $ac_link_default) 2>&5
2214   ac_status=$?
2215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2216   (exit $ac_status); }; then
2217   # Find the output, starting from the most likely.  This scheme is
2218 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2219 # resort.
2220
2221 # Be careful to initialize this variable, since it used to be cached.
2222 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2223 ac_cv_exeext=
2224 # b.out is created by i960 compilers.
2225 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2226 do
2227   test -f "$ac_file" || continue
2228   case $ac_file in
2229     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2230         ;;
2231     conftest.$ac_ext )
2232         # This is the source file.
2233         ;;
2234     [ab].out )
2235         # We found the default executable, but exeext='' is most
2236         # certainly right.
2237         break;;
2238     *.* )
2239         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2240         # FIXME: I believe we export ac_cv_exeext for Libtool,
2241         # but it would be cool to find out if it's true.  Does anybody
2242         # maintain Libtool? --akim.
2243         export ac_cv_exeext
2244         break;;
2245     * )
2246         break;;
2247   esac
2248 done
2249 else
2250   echo "$as_me: failed program was:" >&5
2251 sed 's/^/| /' conftest.$ac_ext >&5
2252
2253 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2254 See \`config.log' for more details." >&5
2255 echo "$as_me: error: C compiler cannot create executables
2256 See \`config.log' for more details." >&2;}
2257    { (exit 77); exit 77; }; }
2258 fi
2259
2260 ac_exeext=$ac_cv_exeext
2261 echo "$as_me:$LINENO: result: $ac_file" >&5
2262 echo "${ECHO_T}$ac_file" >&6
2263
2264 # Check the compiler produces executables we can run.  If not, either
2265 # the compiler is broken, or we cross compile.
2266 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2267 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2268 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2269 # If not cross compiling, check that we can run a simple program.
2270 if test "$cross_compiling" != yes; then
2271   if { ac_try='./$ac_file'
2272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2273   (eval $ac_try) 2>&5
2274   ac_status=$?
2275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2276   (exit $ac_status); }; }; then
2277     cross_compiling=no
2278   else
2279     if test "$cross_compiling" = maybe; then
2280         cross_compiling=yes
2281     else
2282         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2283 If you meant to cross compile, use \`--host'.
2284 See \`config.log' for more details." >&5
2285 echo "$as_me: error: cannot run C compiled programs.
2286 If you meant to cross compile, use \`--host'.
2287 See \`config.log' for more details." >&2;}
2288    { (exit 1); exit 1; }; }
2289     fi
2290   fi
2291 fi
2292 echo "$as_me:$LINENO: result: yes" >&5
2293 echo "${ECHO_T}yes" >&6
2294
2295 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2296 ac_clean_files=$ac_clean_files_save
2297 # Check the compiler produces executables we can run.  If not, either
2298 # the compiler is broken, or we cross compile.
2299 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2300 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2301 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2302 echo "${ECHO_T}$cross_compiling" >&6
2303
2304 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2305 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2306 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2307   (eval $ac_link) 2>&5
2308   ac_status=$?
2309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2310   (exit $ac_status); }; then
2311   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2312 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2313 # work properly (i.e., refer to `conftest.exe'), while it won't with
2314 # `rm'.
2315 for ac_file in conftest.exe conftest conftest.*; do
2316   test -f "$ac_file" || continue
2317   case $ac_file in
2318     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2319     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2320           export ac_cv_exeext
2321           break;;
2322     * ) break;;
2323   esac
2324 done
2325 else
2326   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2327 See \`config.log' for more details." >&5
2328 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2329 See \`config.log' for more details." >&2;}
2330    { (exit 1); exit 1; }; }
2331 fi
2332
2333 rm -f conftest$ac_cv_exeext
2334 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2335 echo "${ECHO_T}$ac_cv_exeext" >&6
2336
2337 rm -f conftest.$ac_ext
2338 EXEEXT=$ac_cv_exeext
2339 ac_exeext=$EXEEXT
2340 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2341 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2342 if test "${ac_cv_objext+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345   cat >conftest.$ac_ext <<_ACEOF
2346 /* confdefs.h.  */
2347 _ACEOF
2348 cat confdefs.h >>conftest.$ac_ext
2349 cat >>conftest.$ac_ext <<_ACEOF
2350 /* end confdefs.h.  */
2351
2352 int
2353 main ()
2354 {
2355
2356   ;
2357   return 0;
2358 }
2359 _ACEOF
2360 rm -f conftest.o conftest.obj
2361 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2362   (eval $ac_compile) 2>&5
2363   ac_status=$?
2364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2365   (exit $ac_status); }; then
2366   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2367   case $ac_file in
2368     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2369     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2370        break;;
2371   esac
2372 done
2373 else
2374   echo "$as_me: failed program was:" >&5
2375 sed 's/^/| /' conftest.$ac_ext >&5
2376
2377 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2378 See \`config.log' for more details." >&5
2379 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2380 See \`config.log' for more details." >&2;}
2381    { (exit 1); exit 1; }; }
2382 fi
2383
2384 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2385 fi
2386 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2387 echo "${ECHO_T}$ac_cv_objext" >&6
2388 OBJEXT=$ac_cv_objext
2389 ac_objext=$OBJEXT
2390 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2391 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2392 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2393   echo $ECHO_N "(cached) $ECHO_C" >&6
2394 else
2395   cat >conftest.$ac_ext <<_ACEOF
2396 /* confdefs.h.  */
2397 _ACEOF
2398 cat confdefs.h >>conftest.$ac_ext
2399 cat >>conftest.$ac_ext <<_ACEOF
2400 /* end confdefs.h.  */
2401
2402 int
2403 main ()
2404 {
2405 #ifndef __GNUC__
2406        choke me
2407 #endif
2408
2409   ;
2410   return 0;
2411 }
2412 _ACEOF
2413 rm -f conftest.$ac_objext
2414 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2415   (eval $ac_compile) 2>conftest.er1
2416   ac_status=$?
2417   grep -v '^ *+' conftest.er1 >conftest.err
2418   rm -f conftest.er1
2419   cat conftest.err >&5
2420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2421   (exit $ac_status); } &&
2422          { ac_try='test -z "$ac_c_werror_flag"
2423                          || test ! -s conftest.err'
2424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2425   (eval $ac_try) 2>&5
2426   ac_status=$?
2427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2428   (exit $ac_status); }; } &&
2429          { ac_try='test -s conftest.$ac_objext'
2430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2431   (eval $ac_try) 2>&5
2432   ac_status=$?
2433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2434   (exit $ac_status); }; }; then
2435   ac_compiler_gnu=yes
2436 else
2437   echo "$as_me: failed program was:" >&5
2438 sed 's/^/| /' conftest.$ac_ext >&5
2439
2440 ac_compiler_gnu=no
2441 fi
2442 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2443 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2444
2445 fi
2446 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2447 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2448 GCC=`test $ac_compiler_gnu = yes && echo yes`
2449 ac_test_CFLAGS=${CFLAGS+set}
2450 ac_save_CFLAGS=$CFLAGS
2451 CFLAGS="-g"
2452 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2453 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2454 if test "${ac_cv_prog_cc_g+set}" = set; then
2455   echo $ECHO_N "(cached) $ECHO_C" >&6
2456 else
2457   cat >conftest.$ac_ext <<_ACEOF
2458 /* confdefs.h.  */
2459 _ACEOF
2460 cat confdefs.h >>conftest.$ac_ext
2461 cat >>conftest.$ac_ext <<_ACEOF
2462 /* end confdefs.h.  */
2463
2464 int
2465 main ()
2466 {
2467
2468   ;
2469   return 0;
2470 }
2471 _ACEOF
2472 rm -f conftest.$ac_objext
2473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2474   (eval $ac_compile) 2>conftest.er1
2475   ac_status=$?
2476   grep -v '^ *+' conftest.er1 >conftest.err
2477   rm -f conftest.er1
2478   cat conftest.err >&5
2479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2480   (exit $ac_status); } &&
2481          { ac_try='test -z "$ac_c_werror_flag"
2482                          || test ! -s conftest.err'
2483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2484   (eval $ac_try) 2>&5
2485   ac_status=$?
2486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2487   (exit $ac_status); }; } &&
2488          { ac_try='test -s conftest.$ac_objext'
2489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2490   (eval $ac_try) 2>&5
2491   ac_status=$?
2492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2493   (exit $ac_status); }; }; then
2494   ac_cv_prog_cc_g=yes
2495 else
2496   echo "$as_me: failed program was:" >&5
2497 sed 's/^/| /' conftest.$ac_ext >&5
2498
2499 ac_cv_prog_cc_g=no
2500 fi
2501 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2502 fi
2503 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2504 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2505 if test "$ac_test_CFLAGS" = set; then
2506   CFLAGS=$ac_save_CFLAGS
2507 elif test $ac_cv_prog_cc_g = yes; then
2508   if test "$GCC" = yes; then
2509     CFLAGS="-g -O2"
2510   else
2511     CFLAGS="-g"
2512   fi
2513 else
2514   if test "$GCC" = yes; then
2515     CFLAGS="-O2"
2516   else
2517     CFLAGS=
2518   fi
2519 fi
2520 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2521 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2522 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2523   echo $ECHO_N "(cached) $ECHO_C" >&6
2524 else
2525   ac_cv_prog_cc_stdc=no
2526 ac_save_CC=$CC
2527 cat >conftest.$ac_ext <<_ACEOF
2528 /* confdefs.h.  */
2529 _ACEOF
2530 cat confdefs.h >>conftest.$ac_ext
2531 cat >>conftest.$ac_ext <<_ACEOF
2532 /* end confdefs.h.  */
2533 #include <stdarg.h>
2534 #include <stdio.h>
2535 #include <sys/types.h>
2536 #include <sys/stat.h>
2537 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2538 struct buf { int x; };
2539 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2540 static char *e (p, i)
2541      char **p;
2542      int i;
2543 {
2544   return p[i];
2545 }
2546 static char *f (char * (*g) (char **, int), char **p, ...)
2547 {
2548   char *s;
2549   va_list v;
2550   va_start (v,p);
2551   s = g (p, va_arg (v,int));
2552   va_end (v);
2553   return s;
2554 }
2555
2556 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2557    function prototypes and stuff, but not '\xHH' hex character constants.
2558    These don't provoke an error unfortunately, instead are silently treated
2559    as 'x'.  The following induces an error, until -std1 is added to get
2560    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2561    array size at least.  It's necessary to write '\x00'==0 to get something
2562    that's true only with -std1.  */
2563 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2564
2565 int test (int i, double x);
2566 struct s1 {int (*f) (int a);};
2567 struct s2 {int (*f) (double a);};
2568 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2569 int argc;
2570 char **argv;
2571 int
2572 main ()
2573 {
2574 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2575   ;
2576   return 0;
2577 }
2578 _ACEOF
2579 # Don't try gcc -ansi; that turns off useful extensions and
2580 # breaks some systems' header files.
2581 # AIX                   -qlanglvl=ansi
2582 # Ultrix and OSF/1      -std1
2583 # HP-UX 10.20 and later -Ae
2584 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2585 # SVR4                  -Xc -D__EXTENSIONS__
2586 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2587 do
2588   CC="$ac_save_CC $ac_arg"
2589   rm -f conftest.$ac_objext
2590 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2591   (eval $ac_compile) 2>conftest.er1
2592   ac_status=$?
2593   grep -v '^ *+' conftest.er1 >conftest.err
2594   rm -f conftest.er1
2595   cat conftest.err >&5
2596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2597   (exit $ac_status); } &&
2598          { ac_try='test -z "$ac_c_werror_flag"
2599                          || test ! -s conftest.err'
2600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2601   (eval $ac_try) 2>&5
2602   ac_status=$?
2603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2604   (exit $ac_status); }; } &&
2605          { ac_try='test -s conftest.$ac_objext'
2606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2607   (eval $ac_try) 2>&5
2608   ac_status=$?
2609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2610   (exit $ac_status); }; }; then
2611   ac_cv_prog_cc_stdc=$ac_arg
2612 break
2613 else
2614   echo "$as_me: failed program was:" >&5
2615 sed 's/^/| /' conftest.$ac_ext >&5
2616
2617 fi
2618 rm -f conftest.err conftest.$ac_objext
2619 done
2620 rm -f conftest.$ac_ext conftest.$ac_objext
2621 CC=$ac_save_CC
2622
2623 fi
2624
2625 case "x$ac_cv_prog_cc_stdc" in
2626   x|xno)
2627     echo "$as_me:$LINENO: result: none needed" >&5
2628 echo "${ECHO_T}none needed" >&6 ;;
2629   *)
2630     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2631 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2632     CC="$CC $ac_cv_prog_cc_stdc" ;;
2633 esac
2634
2635 # Some people use a C++ compiler to compile C.  Since we use `exit',
2636 # in C++ we need to declare it.  In case someone uses the same compiler
2637 # for both compiling C and C++ we need to have the C++ compiler decide
2638 # the declaration of exit, since it's the most demanding environment.
2639 cat >conftest.$ac_ext <<_ACEOF
2640 #ifndef __cplusplus
2641   choke me
2642 #endif
2643 _ACEOF
2644 rm -f conftest.$ac_objext
2645 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2646   (eval $ac_compile) 2>conftest.er1
2647   ac_status=$?
2648   grep -v '^ *+' conftest.er1 >conftest.err
2649   rm -f conftest.er1
2650   cat conftest.err >&5
2651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652   (exit $ac_status); } &&
2653          { ac_try='test -z "$ac_c_werror_flag"
2654                          || test ! -s conftest.err'
2655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2656   (eval $ac_try) 2>&5
2657   ac_status=$?
2658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2659   (exit $ac_status); }; } &&
2660          { ac_try='test -s conftest.$ac_objext'
2661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2662   (eval $ac_try) 2>&5
2663   ac_status=$?
2664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2665   (exit $ac_status); }; }; then
2666   for ac_declaration in \
2667    '' \
2668    'extern "C" void std::exit (int) throw (); using std::exit;' \
2669    'extern "C" void std::exit (int); using std::exit;' \
2670    'extern "C" void exit (int) throw ();' \
2671    'extern "C" void exit (int);' \
2672    'void exit (int);'
2673 do
2674   cat >conftest.$ac_ext <<_ACEOF
2675 /* confdefs.h.  */
2676 _ACEOF
2677 cat confdefs.h >>conftest.$ac_ext
2678 cat >>conftest.$ac_ext <<_ACEOF
2679 /* end confdefs.h.  */
2680 $ac_declaration
2681 #include <stdlib.h>
2682 int
2683 main ()
2684 {
2685 exit (42);
2686   ;
2687   return 0;
2688 }
2689 _ACEOF
2690 rm -f conftest.$ac_objext
2691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2692   (eval $ac_compile) 2>conftest.er1
2693   ac_status=$?
2694   grep -v '^ *+' conftest.er1 >conftest.err
2695   rm -f conftest.er1
2696   cat conftest.err >&5
2697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2698   (exit $ac_status); } &&
2699          { ac_try='test -z "$ac_c_werror_flag"
2700                          || test ! -s conftest.err'
2701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2702   (eval $ac_try) 2>&5
2703   ac_status=$?
2704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2705   (exit $ac_status); }; } &&
2706          { ac_try='test -s conftest.$ac_objext'
2707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2708   (eval $ac_try) 2>&5
2709   ac_status=$?
2710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2711   (exit $ac_status); }; }; then
2712   :
2713 else
2714   echo "$as_me: failed program was:" >&5
2715 sed 's/^/| /' conftest.$ac_ext >&5
2716
2717 continue
2718 fi
2719 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2720   cat >conftest.$ac_ext <<_ACEOF
2721 /* confdefs.h.  */
2722 _ACEOF
2723 cat confdefs.h >>conftest.$ac_ext
2724 cat >>conftest.$ac_ext <<_ACEOF
2725 /* end confdefs.h.  */
2726 $ac_declaration
2727 int
2728 main ()
2729 {
2730 exit (42);
2731   ;
2732   return 0;
2733 }
2734 _ACEOF
2735 rm -f conftest.$ac_objext
2736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2737   (eval $ac_compile) 2>conftest.er1
2738   ac_status=$?
2739   grep -v '^ *+' conftest.er1 >conftest.err
2740   rm -f conftest.er1
2741   cat conftest.err >&5
2742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2743   (exit $ac_status); } &&
2744          { ac_try='test -z "$ac_c_werror_flag"
2745                          || test ! -s conftest.err'
2746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2747   (eval $ac_try) 2>&5
2748   ac_status=$?
2749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2750   (exit $ac_status); }; } &&
2751          { ac_try='test -s conftest.$ac_objext'
2752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2753   (eval $ac_try) 2>&5
2754   ac_status=$?
2755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2756   (exit $ac_status); }; }; then
2757   break
2758 else
2759   echo "$as_me: failed program was:" >&5
2760 sed 's/^/| /' conftest.$ac_ext >&5
2761
2762 fi
2763 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2764 done
2765 rm -f conftest*
2766 if test -n "$ac_declaration"; then
2767   echo '#ifdef __cplusplus' >>confdefs.h
2768   echo $ac_declaration      >>confdefs.h
2769   echo '#endif'             >>confdefs.h
2770 fi
2771
2772 else
2773   echo "$as_me: failed program was:" >&5
2774 sed 's/^/| /' conftest.$ac_ext >&5
2775
2776 fi
2777 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783
2784
2785 unset CFLAGS
2786
2787 #
2788 # Read the template
2789 #
2790 . "$srcdir/src/template/$template" || exit
2791
2792 # CFLAGS are selected so:
2793 # If the user specifies something in the environment, that is used.
2794 # else:  If the template file set something, that is used.
2795 # else:  If the compiler is GCC, then we use -O2.
2796 # else:  If the compiler is something else, then we use -0.
2797
2798 if test "$ac_env_CFLAGS_set" = set; then
2799   CFLAGS=$ac_env_CFLAGS_value
2800 elif test "${CFLAGS+set}" = set; then
2801   : # (keep what template set)
2802 elif test "$GCC" = yes; then
2803   CFLAGS="-O2"
2804 else
2805   # if the user selected debug mode, don't use -O
2806   if test "$enable_debug" != yes; then
2807     CFLAGS="-O"
2808   fi
2809 fi
2810
2811 # Some versions of GCC support some additional useful warning flags.
2812 # Check whether they are supported, and add them to CFLAGS if so.
2813
2814 if test "$GCC" = yes; then
2815
2816 # ICC pretends to be GCC but it's lying; it doesn't support these options.
2817 # So we have to check if "GCC" is really ICC.
2818
2819 cat >conftest.$ac_ext <<_ACEOF
2820 /* confdefs.h.  */
2821 _ACEOF
2822 cat confdefs.h >>conftest.$ac_ext
2823 cat >>conftest.$ac_ext <<_ACEOF
2824 /* end confdefs.h.  */
2825
2826 int
2827 main ()
2828 {
2829 #ifndef __INTEL_COMPILER
2830 choke me
2831 #endif
2832   ;
2833   return 0;
2834 }
2835 _ACEOF
2836 rm -f conftest.$ac_objext
2837 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2838   (eval $ac_compile) 2>conftest.er1
2839   ac_status=$?
2840   grep -v '^ *+' conftest.er1 >conftest.err
2841   rm -f conftest.er1
2842   cat conftest.err >&5
2843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2844   (exit $ac_status); } &&
2845          { ac_try='test -z "$ac_c_werror_flag"
2846                          || test ! -s conftest.err'
2847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2848   (eval $ac_try) 2>&5
2849   ac_status=$?
2850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851   (exit $ac_status); }; } &&
2852          { ac_try='test -s conftest.$ac_objext'
2853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2854   (eval $ac_try) 2>&5
2855   ac_status=$?
2856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2857   (exit $ac_status); }; }; then
2858   ICC=yes
2859 else
2860   echo "$as_me: failed program was:" >&5
2861 sed 's/^/| /' conftest.$ac_ext >&5
2862
2863 ICC=no
2864 fi
2865 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2866
2867   if test "$ICC" = no; then
2868     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2869
2870     echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2871 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2872 pgac_save_CFLAGS=$CFLAGS
2873 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2874 cat >conftest.$ac_ext <<_ACEOF
2875 /* confdefs.h.  */
2876 _ACEOF
2877 cat confdefs.h >>conftest.$ac_ext
2878 cat >>conftest.$ac_ext <<_ACEOF
2879 /* end confdefs.h.  */
2880
2881 int
2882 main ()
2883 {
2884
2885   ;
2886   return 0;
2887 }
2888 _ACEOF
2889 rm -f conftest.$ac_objext
2890 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2891   (eval $ac_compile) 2>conftest.er1
2892   ac_status=$?
2893   grep -v '^ *+' conftest.er1 >conftest.err
2894   rm -f conftest.er1
2895   cat conftest.err >&5
2896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2897   (exit $ac_status); } &&
2898          { ac_try='test -z "$ac_c_werror_flag"
2899                          || test ! -s conftest.err'
2900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2901   (eval $ac_try) 2>&5
2902   ac_status=$?
2903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2904   (exit $ac_status); }; } &&
2905          { ac_try='test -s conftest.$ac_objext'
2906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2907   (eval $ac_try) 2>&5
2908   ac_status=$?
2909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2910   (exit $ac_status); }; }; then
2911   echo "$as_me:$LINENO: result: yes" >&5
2912 echo "${ECHO_T}yes" >&6
2913 else
2914   echo "$as_me: failed program was:" >&5
2915 sed 's/^/| /' conftest.$ac_ext >&5
2916
2917 CFLAGS="$pgac_save_CFLAGS"
2918                     echo "$as_me:$LINENO: result: no" >&5
2919 echo "${ECHO_T}no" >&6
2920 fi
2921 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2922
2923     echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2924 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2925 pgac_save_CFLAGS=$CFLAGS
2926 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2927 cat >conftest.$ac_ext <<_ACEOF
2928 /* confdefs.h.  */
2929 _ACEOF
2930 cat confdefs.h >>conftest.$ac_ext
2931 cat >>conftest.$ac_ext <<_ACEOF
2932 /* end confdefs.h.  */
2933
2934 int
2935 main ()
2936 {
2937
2938   ;
2939   return 0;
2940 }
2941 _ACEOF
2942 rm -f conftest.$ac_objext
2943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2944   (eval $ac_compile) 2>conftest.er1
2945   ac_status=$?
2946   grep -v '^ *+' conftest.er1 >conftest.err
2947   rm -f conftest.er1
2948   cat conftest.err >&5
2949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950   (exit $ac_status); } &&
2951          { ac_try='test -z "$ac_c_werror_flag"
2952                          || test ! -s conftest.err'
2953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2954   (eval $ac_try) 2>&5
2955   ac_status=$?
2956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957   (exit $ac_status); }; } &&
2958          { ac_try='test -s conftest.$ac_objext'
2959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2960   (eval $ac_try) 2>&5
2961   ac_status=$?
2962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2963   (exit $ac_status); }; }; then
2964   echo "$as_me:$LINENO: result: yes" >&5
2965 echo "${ECHO_T}yes" >&6
2966 else
2967   echo "$as_me: failed program was:" >&5
2968 sed 's/^/| /' conftest.$ac_ext >&5
2969
2970 CFLAGS="$pgac_save_CFLAGS"
2971                     echo "$as_me:$LINENO: result: no" >&5
2972 echo "${ECHO_T}no" >&6
2973 fi
2974 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2975
2976   else
2977     # Intel compiler has a bug/misoptimization in checking for
2978     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
2979     # CFLAGS.
2980     echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
2981 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6
2982 pgac_save_CFLAGS=$CFLAGS
2983 CFLAGS="$pgac_save_CFLAGS -mp1"
2984 cat >conftest.$ac_ext <<_ACEOF
2985 /* confdefs.h.  */
2986 _ACEOF
2987 cat confdefs.h >>conftest.$ac_ext
2988 cat >>conftest.$ac_ext <<_ACEOF
2989 /* end confdefs.h.  */
2990
2991 int
2992 main ()
2993 {
2994
2995   ;
2996   return 0;
2997 }
2998 _ACEOF
2999 rm -f conftest.$ac_objext
3000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3001   (eval $ac_compile) 2>conftest.er1
3002   ac_status=$?
3003   grep -v '^ *+' conftest.er1 >conftest.err
3004   rm -f conftest.er1
3005   cat conftest.err >&5
3006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3007   (exit $ac_status); } &&
3008          { ac_try='test -z "$ac_c_werror_flag"
3009                          || test ! -s conftest.err'
3010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3011   (eval $ac_try) 2>&5
3012   ac_status=$?
3013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3014   (exit $ac_status); }; } &&
3015          { ac_try='test -s conftest.$ac_objext'
3016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3017   (eval $ac_try) 2>&5
3018   ac_status=$?
3019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3020   (exit $ac_status); }; }; then
3021   echo "$as_me:$LINENO: result: yes" >&5
3022 echo "${ECHO_T}yes" >&6
3023 else
3024   echo "$as_me: failed program was:" >&5
3025 sed 's/^/| /' conftest.$ac_ext >&5
3026
3027 CFLAGS="$pgac_save_CFLAGS"
3028                     echo "$as_me:$LINENO: result: no" >&5
3029 echo "${ECHO_T}no" >&6
3030 fi
3031 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3032
3033   fi
3034
3035   # Disable strict-aliasing rules; needed for gcc 3.3+
3036   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3037 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
3038 pgac_save_CFLAGS=$CFLAGS
3039 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3040 cat >conftest.$ac_ext <<_ACEOF
3041 /* confdefs.h.  */
3042 _ACEOF
3043 cat confdefs.h >>conftest.$ac_ext
3044 cat >>conftest.$ac_ext <<_ACEOF
3045 /* end confdefs.h.  */
3046
3047 int
3048 main ()
3049 {
3050
3051   ;
3052   return 0;
3053 }
3054 _ACEOF
3055 rm -f conftest.$ac_objext
3056 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3057   (eval $ac_compile) 2>conftest.er1
3058   ac_status=$?
3059   grep -v '^ *+' conftest.er1 >conftest.err
3060   rm -f conftest.er1
3061   cat conftest.err >&5
3062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3063   (exit $ac_status); } &&
3064          { ac_try='test -z "$ac_c_werror_flag"
3065                          || test ! -s conftest.err'
3066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3067   (eval $ac_try) 2>&5
3068   ac_status=$?
3069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3070   (exit $ac_status); }; } &&
3071          { ac_try='test -s conftest.$ac_objext'
3072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3073   (eval $ac_try) 2>&5
3074   ac_status=$?
3075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3076   (exit $ac_status); }; }; then
3077   echo "$as_me:$LINENO: result: yes" >&5
3078 echo "${ECHO_T}yes" >&6
3079 else
3080   echo "$as_me: failed program was:" >&5
3081 sed 's/^/| /' conftest.$ac_ext >&5
3082
3083 CFLAGS="$pgac_save_CFLAGS"
3084                     echo "$as_me:$LINENO: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3086 fi
3087 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3088
3089 elif test x"${CC}" = x"xlc"; then
3090   # AIX xlc has to have strict aliasing turned off too
3091   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3092 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
3093 pgac_save_CFLAGS=$CFLAGS
3094 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3095 cat >conftest.$ac_ext <<_ACEOF
3096 /* confdefs.h.  */
3097 _ACEOF
3098 cat confdefs.h >>conftest.$ac_ext
3099 cat >>conftest.$ac_ext <<_ACEOF
3100 /* end confdefs.h.  */
3101
3102 int
3103 main ()
3104 {
3105
3106   ;
3107   return 0;
3108 }
3109 _ACEOF
3110 rm -f conftest.$ac_objext
3111 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3112   (eval $ac_compile) 2>conftest.er1
3113   ac_status=$?
3114   grep -v '^ *+' conftest.er1 >conftest.err
3115   rm -f conftest.er1
3116   cat conftest.err >&5
3117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3118   (exit $ac_status); } &&
3119          { ac_try='test -z "$ac_c_werror_flag"
3120                          || test ! -s conftest.err'
3121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3122   (eval $ac_try) 2>&5
3123   ac_status=$?
3124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3125   (exit $ac_status); }; } &&
3126          { ac_try='test -s conftest.$ac_objext'
3127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3128   (eval $ac_try) 2>&5
3129   ac_status=$?
3130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3131   (exit $ac_status); }; }; then
3132   echo "$as_me:$LINENO: result: yes" >&5
3133 echo "${ECHO_T}yes" >&6
3134 else
3135   echo "$as_me: failed program was:" >&5
3136 sed 's/^/| /' conftest.$ac_ext >&5
3137
3138 CFLAGS="$pgac_save_CFLAGS"
3139                     echo "$as_me:$LINENO: result: no" >&5
3140 echo "${ECHO_T}no" >&6
3141 fi
3142 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3143
3144 fi
3145
3146 # supply -g if --enable-debug
3147 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3148   CFLAGS="$CFLAGS -g"
3149 fi
3150
3151 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3152 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3153
3154 # We already have this in Makefile.win32, but configure needs it too
3155 if test "$PORTNAME" = "win32"; then
3156   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3157 fi
3158
3159 # Check if the compiler still works with the template settings
3160 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3161 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
3162 cat >conftest.$ac_ext <<_ACEOF
3163 /* confdefs.h.  */
3164 _ACEOF
3165 cat confdefs.h >>conftest.$ac_ext
3166 cat >>conftest.$ac_ext <<_ACEOF
3167 /* end confdefs.h.  */
3168
3169 int
3170 main ()
3171 {
3172 return 0;
3173   ;
3174   return 0;
3175 }
3176 _ACEOF
3177 rm -f conftest.$ac_objext conftest$ac_exeext
3178 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3179   (eval $ac_link) 2>conftest.er1
3180   ac_status=$?
3181   grep -v '^ *+' conftest.er1 >conftest.err
3182   rm -f conftest.er1
3183   cat conftest.err >&5
3184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3185   (exit $ac_status); } &&
3186          { ac_try='test -z "$ac_c_werror_flag"
3187                          || test ! -s conftest.err'
3188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3189   (eval $ac_try) 2>&5
3190   ac_status=$?
3191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3192   (exit $ac_status); }; } &&
3193          { ac_try='test -s conftest$ac_exeext'
3194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3195   (eval $ac_try) 2>&5
3196   ac_status=$?
3197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3198   (exit $ac_status); }; }; then
3199   echo "$as_me:$LINENO: result: yes" >&5
3200 echo "${ECHO_T}yes" >&6
3201 else
3202   echo "$as_me: failed program was:" >&5
3203 sed 's/^/| /' conftest.$ac_ext >&5
3204
3205 echo "$as_me:$LINENO: result: no" >&5
3206 echo "${ECHO_T}no" >&6
3207    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3208 echo "$as_me: error: cannot proceed" >&2;}
3209    { (exit 1); exit 1; }; }
3210 fi
3211 rm -f conftest.err conftest.$ac_objext \
3212       conftest$ac_exeext conftest.$ac_ext
3213
3214 # Defend against gcc -ffast-math
3215 if test "$GCC" = yes; then
3216 cat >conftest.$ac_ext <<_ACEOF
3217 /* confdefs.h.  */
3218 _ACEOF
3219 cat confdefs.h >>conftest.$ac_ext
3220 cat >>conftest.$ac_ext <<_ACEOF
3221 /* end confdefs.h.  */
3222
3223 int
3224 main ()
3225 {
3226 #ifdef __FAST_MATH__
3227 choke me
3228 #endif
3229   ;
3230   return 0;
3231 }
3232 _ACEOF
3233 rm -f conftest.$ac_objext
3234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3235   (eval $ac_compile) 2>conftest.er1
3236   ac_status=$?
3237   grep -v '^ *+' conftest.er1 >conftest.err
3238   rm -f conftest.er1
3239   cat conftest.err >&5
3240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3241   (exit $ac_status); } &&
3242          { ac_try='test -z "$ac_c_werror_flag"
3243                          || test ! -s conftest.err'
3244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3245   (eval $ac_try) 2>&5
3246   ac_status=$?
3247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3248   (exit $ac_status); }; } &&
3249          { ac_try='test -s conftest.$ac_objext'
3250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3251   (eval $ac_try) 2>&5
3252   ac_status=$?
3253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3254   (exit $ac_status); }; }; then
3255   :
3256 else
3257   echo "$as_me: failed program was:" >&5
3258 sed 's/^/| /' conftest.$ac_ext >&5
3259
3260 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3261 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3262    { (exit 1); exit 1; }; }
3263 fi
3264 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3265 fi
3266
3267 ac_ext=c
3268 ac_cpp='$CPP $CPPFLAGS'
3269 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3270 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3271 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3272 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3273 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3274 # On Suns, sometimes $CPP names a directory.
3275 if test -n "$CPP" && test -d "$CPP"; then
3276   CPP=
3277 fi
3278 if test -z "$CPP"; then
3279   if test "${ac_cv_prog_CPP+set}" = set; then
3280   echo $ECHO_N "(cached) $ECHO_C" >&6
3281 else
3282       # Double quotes because CPP needs to be expanded
3283     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3284     do
3285       ac_preproc_ok=false
3286 for ac_c_preproc_warn_flag in '' yes
3287 do
3288   # Use a header file that comes with gcc, so configuring glibc
3289   # with a fresh cross-compiler works.
3290   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3291   # <limits.h> exists even on freestanding compilers.
3292   # On the NeXT, cc -E runs the code through the compiler's parser,
3293   # not just through cpp. "Syntax error" is here to catch this case.
3294   cat >conftest.$ac_ext <<_ACEOF
3295 /* confdefs.h.  */
3296 _ACEOF
3297 cat confdefs.h >>conftest.$ac_ext
3298 cat >>conftest.$ac_ext <<_ACEOF
3299 /* end confdefs.h.  */
3300 #ifdef __STDC__
3301 # include <limits.h>
3302 #else
3303 # include <assert.h>
3304 #endif
3305                      Syntax error
3306 _ACEOF
3307 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3309   ac_status=$?
3310   grep -v '^ *+' conftest.er1 >conftest.err
3311   rm -f conftest.er1
3312   cat conftest.err >&5
3313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3314   (exit $ac_status); } >/dev/null; then
3315   if test -s conftest.err; then
3316     ac_cpp_err=$ac_c_preproc_warn_flag
3317     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3318   else
3319     ac_cpp_err=
3320   fi
3321 else
3322   ac_cpp_err=yes
3323 fi
3324 if test -z "$ac_cpp_err"; then
3325   :
3326 else
3327   echo "$as_me: failed program was:" >&5
3328 sed 's/^/| /' conftest.$ac_ext >&5
3329
3330   # Broken: fails on valid input.
3331 continue
3332 fi
3333 rm -f conftest.err conftest.$ac_ext
3334
3335   # OK, works on sane cases.  Now check whether non-existent headers
3336   # can be detected and how.
3337   cat >conftest.$ac_ext <<_ACEOF
3338 /* confdefs.h.  */
3339 _ACEOF
3340 cat confdefs.h >>conftest.$ac_ext
3341 cat >>conftest.$ac_ext <<_ACEOF
3342 /* end confdefs.h.  */
3343 #include <ac_nonexistent.h>
3344 _ACEOF
3345 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3347   ac_status=$?
3348   grep -v '^ *+' conftest.er1 >conftest.err
3349   rm -f conftest.er1
3350   cat conftest.err >&5
3351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3352   (exit $ac_status); } >/dev/null; then
3353   if test -s conftest.err; then
3354     ac_cpp_err=$ac_c_preproc_warn_flag
3355     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3356   else
3357     ac_cpp_err=
3358   fi
3359 else
3360   ac_cpp_err=yes
3361 fi
3362 if test -z "$ac_cpp_err"; then
3363   # Broken: success on invalid input.
3364 continue
3365 else
3366   echo "$as_me: failed program was:" >&5
3367 sed 's/^/| /' conftest.$ac_ext >&5
3368
3369   # Passes both tests.
3370 ac_preproc_ok=:
3371 break
3372 fi
3373 rm -f conftest.err conftest.$ac_ext
3374
3375 done
3376 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3377 rm -f conftest.err conftest.$ac_ext
3378 if $ac_preproc_ok; then
3379   break
3380 fi
3381
3382     done
3383     ac_cv_prog_CPP=$CPP
3384
3385 fi
3386   CPP=$ac_cv_prog_CPP
3387 else
3388   ac_cv_prog_CPP=$CPP
3389 fi
3390 echo "$as_me:$LINENO: result: $CPP" >&5
3391 echo "${ECHO_T}$CPP" >&6
3392 ac_preproc_ok=false
3393 for ac_c_preproc_warn_flag in '' yes
3394 do
3395   # Use a header file that comes with gcc, so configuring glibc
3396   # with a fresh cross-compiler works.
3397   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3398   # <limits.h> exists even on freestanding compilers.
3399   # On the NeXT, cc -E runs the code through the compiler's parser,
3400   # not just through cpp. "Syntax error" is here to catch this case.
3401   cat >conftest.$ac_ext <<_ACEOF
3402 /* confdefs.h.  */
3403 _ACEOF
3404 cat confdefs.h >>conftest.$ac_ext
3405 cat >>conftest.$ac_ext <<_ACEOF
3406 /* end confdefs.h.  */
3407 #ifdef __STDC__
3408 # include <limits.h>
3409 #else
3410 # include <assert.h>
3411 #endif
3412                      Syntax error
3413 _ACEOF
3414 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3415   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3416   ac_status=$?
3417   grep -v '^ *+' conftest.er1 >conftest.err
3418   rm -f conftest.er1
3419   cat conftest.err >&5
3420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3421   (exit $ac_status); } >/dev/null; then
3422   if test -s conftest.err; then
3423     ac_cpp_err=$ac_c_preproc_warn_flag
3424     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3425   else
3426     ac_cpp_err=
3427   fi
3428 else
3429   ac_cpp_err=yes
3430 fi
3431 if test -z "$ac_cpp_err"; then
3432   :
3433 else
3434   echo "$as_me: failed program was:" >&5
3435 sed 's/^/| /' conftest.$ac_ext >&5
3436
3437   # Broken: fails on valid input.
3438 continue
3439 fi
3440 rm -f conftest.err conftest.$ac_ext
3441
3442   # OK, works on sane cases.  Now check whether non-existent headers
3443   # can be detected and how.
3444   cat >conftest.$ac_ext <<_ACEOF
3445 /* confdefs.h.  */
3446 _ACEOF
3447 cat confdefs.h >>conftest.$ac_ext
3448 cat >>conftest.$ac_ext <<_ACEOF
3449 /* end confdefs.h.  */
3450 #include <ac_nonexistent.h>
3451 _ACEOF
3452 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3454   ac_status=$?
3455   grep -v '^ *+' conftest.er1 >conftest.err
3456   rm -f conftest.er1
3457   cat conftest.err >&5
3458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459   (exit $ac_status); } >/dev/null; then
3460   if test -s conftest.err; then
3461     ac_cpp_err=$ac_c_preproc_warn_flag
3462     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3463   else
3464     ac_cpp_err=
3465   fi
3466 else
3467   ac_cpp_err=yes
3468 fi
3469 if test -z "$ac_cpp_err"; then
3470   # Broken: success on invalid input.
3471 continue
3472 else
3473   echo "$as_me: failed program was:" >&5
3474 sed 's/^/| /' conftest.$ac_ext >&5
3475
3476   # Passes both tests.
3477 ac_preproc_ok=:
3478 break
3479 fi
3480 rm -f conftest.err conftest.$ac_ext
3481
3482 done
3483 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3484 rm -f conftest.err conftest.$ac_ext
3485 if $ac_preproc_ok; then
3486   :
3487 else
3488   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3489 See \`config.log' for more details." >&5
3490 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3491 See \`config.log' for more details." >&2;}
3492    { (exit 1); exit 1; }; }
3493 fi
3494
3495 ac_ext=c
3496 ac_cpp='$CPP $CPPFLAGS'
3497 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3498 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3499 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3500
3501
3502
3503 # Create compiler version string
3504 if test x"$GCC" = x"yes" ; then
3505   cc_string="GCC `${CC} --version | sed q`"
3506 else
3507   cc_string=$CC
3508 fi
3509
3510 cat >>confdefs.h <<_ACEOF
3511 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3512 _ACEOF
3513
3514
3515
3516 #
3517 # Set up TAS assembly code if needed; the template file has now had its
3518 # chance to request this.
3519 #
3520           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3521
3522
3523 if test "$need_tas" = yes ; then
3524   TAS=tas.o
3525 else
3526   TAS=""
3527 fi
3528
3529
3530
3531 #
3532 # Automatic dependency tracking
3533 #
3534
3535
3536
3537 # Check whether --enable-depend or --disable-depend was given.
3538 if test "${enable_depend+set}" = set; then
3539   enableval="$enable_depend"
3540
3541   case $enableval in
3542     yes)
3543       autodepend=yes
3544       ;;
3545     no)
3546       :
3547       ;;
3548     *)
3549       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3550 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3551    { (exit 1); exit 1; }; }
3552       ;;
3553   esac
3554
3555 else
3556   enable_depend=no
3557
3558 fi;
3559
3560
3561
3562
3563 #
3564 # Enable assert checks
3565 #
3566
3567
3568
3569 # Check whether --enable-cassert or --disable-cassert was given.
3570 if test "${enable_cassert+set}" = set; then
3571   enableval="$enable_cassert"
3572
3573   case $enableval in
3574     yes)
3575
3576 cat >>confdefs.h <<\_ACEOF
3577 #define USE_ASSERT_CHECKING 1
3578 _ACEOF
3579
3580       ;;
3581     no)
3582       :
3583       ;;
3584     *)
3585       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3586 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3587    { (exit 1); exit 1; }; }
3588       ;;
3589   esac
3590
3591 else
3592   enable_cassert=no
3593
3594 fi;
3595
3596
3597
3598 #
3599 # Include directories
3600 #
3601 ac_save_IFS=$IFS
3602 IFS="${IFS}${PATH_SEPARATOR}"
3603 # SRCH_INC comes from the template file
3604 for dir in $with_includes $SRCH_INC; do
3605   if test -d "$dir"; then
3606     INCLUDES="$INCLUDES -I$dir"
3607   else
3608     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3609 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3610   fi
3611 done
3612 IFS=$ac_save_IFS
3613
3614
3615
3616 #
3617 # Library directories
3618 #
3619 ac_save_IFS=$IFS
3620 IFS="${IFS}${PATH_SEPARATOR}"
3621 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3622 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3623   if test -d "$dir"; then
3624     LIBDIRS="$LIBDIRS -L$dir"
3625   else
3626     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3627 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3628   fi
3629 done
3630 IFS=$ac_save_IFS
3631
3632 #
3633 # Enable thread-safe client libraries
3634 #
3635 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3636 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3637
3638
3639
3640 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3641 if test "${enable_thread_safety+set}" = set; then
3642   enableval="$enable_thread_safety"
3643
3644   case $enableval in
3645     yes)
3646       :
3647       ;;
3648     no)
3649       :
3650       ;;
3651     *)
3652       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3653 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3654    { (exit 1); exit 1; }; }
3655       ;;
3656   esac
3657
3658 else
3659   enable_thread_safety=no
3660
3661 fi;
3662
3663
3664
3665
3666 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3667 if test "${enable_thread_safety_force+set}" = set; then
3668   enableval="$enable_thread_safety_force"
3669
3670   case $enableval in
3671     yes)
3672       :
3673       ;;
3674     no)
3675       :
3676       ;;
3677     *)
3678       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3679 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3680    { (exit 1); exit 1; }; }
3681       ;;
3682   esac
3683
3684 else
3685   enable_thread_safety_force=no
3686
3687 fi;
3688
3689 if test "$enable_thread_safety" = yes -o \
3690         "$enable_thread_safety_force" = yes; then
3691   enable_thread_safety="yes"    # for 'force'
3692
3693 cat >>confdefs.h <<\_ACEOF
3694 #define ENABLE_THREAD_SAFETY 1
3695 _ACEOF
3696
3697 fi
3698 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3699 echo "${ECHO_T}$enable_thread_safety" >&6
3700
3701
3702 #
3703 # Optionally build Tcl modules (PL/Tcl)
3704 #
3705 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3706 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3707
3708
3709
3710
3711 # Check whether --with-tcl or --without-tcl was given.
3712 if test "${with_tcl+set}" = set; then
3713   withval="$with_tcl"
3714
3715   case $withval in
3716     yes)
3717       :
3718       ;;
3719     no)
3720       :
3721       ;;
3722     *)
3723       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3724 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3725    { (exit 1); exit 1; }; }
3726       ;;
3727   esac
3728
3729 else
3730   with_tcl=no
3731
3732 fi;
3733
3734 echo "$as_me:$LINENO: result: $with_tcl" >&5
3735 echo "${ECHO_T}$with_tcl" >&6
3736
3737
3738 # We see if the path to the Tcl/Tk configuration scripts is specified.
3739 # This will override the use of tclsh to find the paths to search.
3740
3741
3742
3743
3744
3745 # Check whether --with-tclconfig or --without-tclconfig was given.
3746 if test "${with_tclconfig+set}" = set; then
3747   withval="$with_tclconfig"
3748
3749   case $withval in
3750     yes)
3751       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3752 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3753    { (exit 1); exit 1; }; }
3754       ;;
3755     no)
3756       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3757 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3758    { (exit 1); exit 1; }; }
3759       ;;
3760     *)
3761
3762       ;;
3763   esac
3764
3765 fi;
3766
3767
3768 #
3769 # Optionally build Perl modules (PL/Perl)
3770 #
3771 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3772 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3773
3774
3775
3776
3777 # Check whether --with-perl or --without-perl was given.
3778 if test "${with_perl+set}" = set; then
3779   withval="$with_perl"
3780
3781   case $withval in
3782     yes)
3783       :
3784       ;;
3785     no)
3786       :
3787       ;;
3788     *)
3789       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3790 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3791    { (exit 1); exit 1; }; }
3792       ;;
3793   esac
3794
3795 else
3796   with_perl=no
3797
3798 fi;
3799
3800 echo "$as_me:$LINENO: result: $with_perl" >&5
3801 echo "${ECHO_T}$with_perl" >&6
3802
3803
3804 #
3805 # Optionally build Python modules (PL/Python)
3806 #
3807 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3808 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3809
3810
3811
3812
3813 # Check whether --with-python or --without-python was given.
3814 if test "${with_python+set}" = set; then
3815   withval="$with_python"
3816
3817   case $withval in
3818     yes)
3819       :
3820       ;;
3821     no)
3822       :
3823       ;;
3824     *)
3825       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3826 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3827    { (exit 1); exit 1; }; }
3828       ;;
3829   esac
3830
3831 else
3832   with_python=no
3833
3834 fi;
3835
3836 echo "$as_me:$LINENO: result: $with_python" >&5
3837 echo "${ECHO_T}$with_python" >&6
3838
3839
3840 #
3841 # Kerberos 5
3842 #
3843 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3844 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3845
3846
3847
3848
3849 # Check whether --with-krb5 or --without-krb5 was given.
3850 if test "${with_krb5+set}" = set; then
3851   withval="$with_krb5"
3852
3853   case $withval in
3854     yes)
3855
3856
3857 cat >>confdefs.h <<\_ACEOF
3858 #define KRB5 1
3859 _ACEOF
3860
3861   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3862
3863       ;;
3864     no)
3865       :
3866       ;;
3867     *)
3868       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3869 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3870    { (exit 1); exit 1; }; }
3871       ;;
3872   esac
3873
3874 else
3875   with_krb5=no
3876
3877 fi;
3878
3879 echo "$as_me:$LINENO: result: $with_krb5" >&5
3880 echo "${ECHO_T}$with_krb5" >&6
3881
3882
3883
3884
3885
3886
3887 #
3888 # Kerberos configuration parameters
3889 #
3890
3891
3892
3893
3894 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3895 if test "${with_krb_srvnam+set}" = set; then
3896   withval="$with_krb_srvnam"
3897
3898   case $withval in
3899     yes)
3900       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3901 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3902    { (exit 1); exit 1; }; }
3903       ;;
3904     no)
3905       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3906 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3907    { (exit 1); exit 1; }; }
3908       ;;
3909     *)
3910
3911       ;;
3912   esac
3913
3914 else
3915   with_krb_srvnam="postgres"
3916 fi;
3917
3918
3919 cat >>confdefs.h <<_ACEOF
3920 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3921 _ACEOF
3922
3923
3924
3925 #
3926 # PAM
3927 #
3928 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3929 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3930
3931
3932
3933
3934 # Check whether --with-pam or --without-pam was given.
3935 if test "${with_pam+set}" = set; then
3936   withval="$with_pam"
3937
3938   case $withval in
3939     yes)
3940
3941 cat >>confdefs.h <<\_ACEOF
3942 #define USE_PAM 1
3943 _ACEOF
3944
3945       ;;
3946     no)
3947       :
3948       ;;
3949     *)
3950       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3951 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3952    { (exit 1); exit 1; }; }
3953       ;;
3954   esac
3955
3956 else
3957   with_pam=no
3958
3959 fi;
3960
3961 echo "$as_me:$LINENO: result: $with_pam" >&5
3962 echo "${ECHO_T}$with_pam" >&6
3963
3964
3965
3966 #
3967 # LDAP
3968 #
3969 echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
3970 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
3971
3972
3973
3974
3975 # Check whether --with-ldap or --without-ldap was given.
3976 if test "${with_ldap+set}" = set; then
3977   withval="$with_ldap"
3978
3979   case $withval in
3980     yes)
3981
3982 cat >>confdefs.h <<\_ACEOF
3983 #define USE_LDAP 1
3984 _ACEOF
3985
3986       ;;
3987     no)
3988       :
3989       ;;
3990     *)
3991       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
3992 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
3993    { (exit 1); exit 1; }; }
3994       ;;
3995   esac
3996
3997 else
3998   with_ldap=no
3999
4000 fi;
4001
4002 echo "$as_me:$LINENO: result: $with_ldap" >&5
4003 echo "${ECHO_T}$with_ldap" >&6
4004
4005
4006
4007 #
4008 # Bonjour
4009 #
4010 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
4011 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
4012
4013
4014
4015
4016 # Check whether --with-bonjour or --without-bonjour was given.
4017 if test "${with_bonjour+set}" = set; then
4018   withval="$with_bonjour"
4019
4020   case $withval in
4021     yes)
4022
4023 cat >>confdefs.h <<\_ACEOF
4024 #define USE_BONJOUR 1
4025 _ACEOF
4026
4027       ;;
4028     no)
4029       :
4030       ;;
4031     *)
4032       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4033 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4034    { (exit 1); exit 1; }; }
4035       ;;
4036   esac
4037
4038 else
4039   with_bonjour=no
4040
4041 fi;
4042
4043 echo "$as_me:$LINENO: result: $with_bonjour" >&5
4044 echo "${ECHO_T}$with_bonjour" >&6
4045
4046
4047
4048 #
4049 # OpenSSL
4050 #
4051 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4052 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
4053
4054
4055
4056
4057 # Check whether --with-openssl or --without-openssl was given.
4058 if test "${with_openssl+set}" = set; then
4059   withval="$with_openssl"
4060
4061   case $withval in
4062     yes)
4063
4064 cat >>confdefs.h <<\_ACEOF
4065 #define USE_SSL 1
4066 _ACEOF
4067
4068       ;;
4069     no)
4070       :
4071       ;;
4072     *)
4073       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4074 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4075    { (exit 1); exit 1; }; }
4076       ;;
4077   esac
4078
4079 else
4080   with_openssl=no
4081
4082 fi;
4083
4084 echo "$as_me:$LINENO: result: $with_openssl" >&5
4085 echo "${ECHO_T}$with_openssl" >&6
4086
4087
4088
4089 #
4090 # Readline
4091 #
4092
4093
4094
4095
4096 # Check whether --with-readline or --without-readline was given.
4097 if test "${with_readline+set}" = set; then
4098   withval="$with_readline"
4099
4100   case $withval in
4101     yes)
4102       :
4103       ;;
4104     no)
4105       :
4106       ;;
4107     *)
4108       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4109 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4110    { (exit 1); exit 1; }; }
4111       ;;
4112   esac
4113
4114 else
4115   with_readline=yes
4116
4117 fi;
4118
4119 # readline on MinGW has problems with backslashes in psql and other bugs.
4120 # This is particularly a problem with non-US code pages.
4121 # Therefore disable its use until we understand the cause. 2004-07-20
4122 if test "$PORTNAME" = "win32"; then
4123   if test "$with_readline" = yes; then
4124     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4125 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4126     with_readline=no
4127   fi
4128 fi
4129
4130
4131 #
4132 # Prefer libedit
4133 #
4134
4135
4136
4137
4138 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
4139 if test "${with_libedit_preferred+set}" = set; then
4140   withval="$with_libedit_preferred"
4141
4142   case $withval in
4143     yes)
4144       :
4145       ;;
4146     no)
4147       :
4148       ;;
4149     *)
4150       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4151 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4152    { (exit 1); exit 1; }; }
4153       ;;
4154   esac
4155
4156 else
4157   with_libedit_preferred=no
4158
4159 fi;
4160
4161
4162
4163 #
4164 # Zlib
4165 #
4166
4167
4168
4169
4170 # Check whether --with-zlib or --without-zlib was given.
4171 if test "${with_zlib+set}" = set; then
4172   withval="$with_zlib"
4173
4174   case $withval in
4175     yes)
4176       :
4177       ;;
4178     no)
4179       :
4180       ;;
4181     *)
4182       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
4183 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
4184    { (exit 1); exit 1; }; }
4185       ;;
4186   esac
4187
4188 else
4189   with_zlib=yes
4190
4191 fi;
4192
4193
4194
4195 #
4196 # Elf
4197 #
4198
4199 # Assume system is ELF if it predefines __ELF__ as 1,
4200 # otherwise believe host_os based default.
4201 case $host_os in
4202     freebsd1*|freebsd2*) elf=no;;
4203     freebsd3*|freebsd4*) elf=yes;;
4204 esac
4205
4206
4207 echo "$as_me:$LINENO: checking for egrep" >&5
4208 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4209 if test "${ac_cv_prog_egrep+set}" = set; then
4210   echo $ECHO_N "(cached) $ECHO_C" >&6
4211 else
4212   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4213     then ac_cv_prog_egrep='grep -E'
4214     else ac_cv_prog_egrep='egrep'
4215     fi
4216 fi
4217 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4218 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4219  EGREP=$ac_cv_prog_egrep
4220
4221
4222 cat >conftest.$ac_ext <<_ACEOF
4223 /* confdefs.h.  */
4224 _ACEOF
4225 cat confdefs.h >>conftest.$ac_ext
4226 cat >>conftest.$ac_ext <<_ACEOF
4227 /* end confdefs.h.  */
4228 #if __ELF__
4229   yes
4230 #endif
4231
4232 _ACEOF
4233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4234   $EGREP "yes" >/dev/null 2>&1; then
4235   ELF_SYS=true
4236 else
4237   if test "X$elf" = "Xyes" ; then
4238   ELF_SYS=true
4239 else
4240   ELF_SYS=
4241 fi
4242 fi
4243 rm -f conftest*
4244
4245
4246
4247 #
4248 # Assignments
4249 #
4250
4251 CPPFLAGS="$CPPFLAGS $INCLUDES"
4252 LDFLAGS="$LDFLAGS $LIBDIRS"
4253
4254 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4255 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4256 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4257 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4258
4259
4260
4261 for ac_prog in gawk mawk nawk awk
4262 do
4263   # Extract the first word of "$ac_prog", so it can be a program name with args.
4264 set dummy $ac_prog; ac_word=$2
4265 echo "$as_me:$LINENO: checking for $ac_word" >&5
4266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4267 if test "${ac_cv_prog_AWK+set}" = set; then
4268   echo $ECHO_N "(cached) $ECHO_C" >&6
4269 else
4270   if test -n "$AWK"; then
4271   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4272 else
4273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4274 for as_dir in $PATH
4275 do
4276   IFS=$as_save_IFS
4277   test -z "$as_dir" && as_dir=.
4278   for ac_exec_ext in '' $ac_executable_extensions; do
4279   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4280     ac_cv_prog_AWK="$ac_prog"
4281     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4282     break 2
4283   fi
4284 done
4285 done
4286
4287 fi
4288 fi
4289 AWK=$ac_cv_prog_AWK
4290 if test -n "$AWK"; then
4291   echo "$as_me:$LINENO: result: $AWK" >&5
4292 echo "${ECHO_T}$AWK" >&6
4293 else
4294   echo "$as_me:$LINENO: result: no" >&5
4295 echo "${ECHO_T}no" >&6
4296 fi
4297
4298   test -n "$AWK" && break
4299 done
4300
4301 echo "$as_me:$LINENO: checking for flex" >&5
4302 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4303 if test "${pgac_cv_path_flex+set}" = set; then
4304   echo $ECHO_N "(cached) $ECHO_C" >&6
4305 else
4306   # Let the user override the test
4307 if test -n "$FLEX"; then
4308   pgac_cv_path_flex=$FLEX
4309 else
4310   pgac_save_IFS=$IFS
4311   IFS=$PATH_SEPARATOR
4312   for pgac_dir in $PATH; do
4313     IFS=$pgac_save_IFS
4314     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4315       pgac_dir=`pwd`
4316     fi
4317     for pgac_prog in flex lex; do
4318       pgac_candidate="$pgac_dir/$pgac_prog"
4319       if test -f "$pgac_candidate" \
4320         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4321       then
4322         echo '%%'  > conftest.l
4323         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4324           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4325             pgac_broken_flex=$pgac_candidate
4326             continue
4327           fi
4328
4329           pgac_cv_path_flex=$pgac_candidate
4330           break 2
4331         fi
4332       fi
4333     done
4334   done
4335   rm -f conftest.l lex.yy.c
4336   : ${pgac_cv_path_flex=no}
4337 fi
4338
4339 fi
4340 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4341 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4342 if test x"$pgac_cv_path_flex" = x"no"; then
4343   if test -n "$pgac_broken_flex"; then
4344     { echo "$as_me:$LINENO: WARNING:
4345 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4346 *** should get version 2.5.4 or later." >&5
4347 echo "$as_me: WARNING:
4348 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4349 *** should get version 2.5.4 or later." >&2;}
4350   fi
4351
4352   { echo "$as_me:$LINENO: WARNING:
4353 *** Without Flex you will not be able to build PostgreSQL from CVS or
4354 *** change any of the scanner definition files.  You can obtain Flex from
4355 *** a GNU mirror site.  (If you are using the official distribution of
4356 *** PostgreSQL then you do not need to worry about this because the Flex
4357 *** output is pre-generated.)" >&5
4358 echo "$as_me: WARNING:
4359 *** Without Flex you will not be able to build PostgreSQL from CVS or
4360 *** change any of the scanner definition files.  You can obtain Flex from
4361 *** a GNU mirror site.  (If you are using the official distribution of
4362 *** PostgreSQL then you do not need to worry about this because the Flex
4363 *** output is pre-generated.)" >&2;}
4364 fi
4365
4366 if test x"$pgac_cv_path_flex" = x"no"; then
4367   FLEX=
4368 else
4369   FLEX=$pgac_cv_path_flex
4370 fi
4371
4372
4373
4374
4375 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4376 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4377 LN_S=$as_ln_s
4378 if test "$LN_S" = "ln -s"; then
4379   echo "$as_me:$LINENO: result: yes" >&5
4380 echo "${ECHO_T}yes" >&6
4381 else
4382   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4383 echo "${ECHO_T}no, using $LN_S" >&6
4384 fi
4385
4386
4387 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4388 if test "${with_gnu_ld+set}" = set; then
4389   withval="$with_gnu_ld"
4390   test "$withval" = no || with_gnu_ld=yes
4391 else
4392   with_gnu_ld=no
4393 fi;
4394 ac_prog=ld
4395 if test "$GCC" = yes; then
4396   # Check if gcc -print-prog-name=ld gives a path.
4397   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4398 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4399   case $host in
4400   *-*-mingw*)
4401     # gcc leaves a trailing carriage return which upsets mingw
4402     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4403   *)
4404     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4405   esac
4406   case "$ac_prog" in
4407     # Accept absolute paths.
4408     [\\/]* | [A-Za-z]:[\\/]*)
4409       re_direlt='/[^/][^/]*/\.\./'
4410       # Canonicalize the path of ld
4411       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4412       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4413         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4414       done
4415       test -z "$LD" && LD="$ac_prog"
4416       ;;
4417   "")
4418     # If it fails, then pretend we aren't using GCC.
4419     ac_prog=ld
4420     ;;
4421   *)
4422     # If it is relative, then search for the first ld in PATH.
4423     with_gnu_ld=unknown
4424     ;;
4425   esac
4426 elif test "$with_gnu_ld" = yes; then
4427   echo "$as_me:$LINENO: checking for GNU ld" >&5
4428 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4429 else
4430   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4431 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4432 fi
4433 if test "${ac_cv_path_LD+set}" = set; then
4434   echo $ECHO_N "(cached) $ECHO_C" >&6
4435 else
4436   if test -z "$LD"; then
4437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4438   for ac_dir in $PATH; do
4439     test -z "$ac_dir" && ac_dir=.
4440     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4441       ac_cv_path_LD="$ac_dir/$ac_prog"
4442       # Check to see if the program is GNU ld.  I'd rather use --version,
4443       # but apparently some GNU ld's only accept -v.
4444       # Break only if it was the GNU/non-GNU ld that we prefer.
4445       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4446         test "$with_gnu_ld" != no && break
4447       else
4448         test "$with_gnu_ld" != yes && break
4449       fi
4450     fi
4451   done
4452   IFS="$ac_save_ifs"
4453 else
4454   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4455 fi
4456 fi
4457
4458 LD="$ac_cv_path_LD"
4459 if test -n "$LD"; then
4460   echo "$as_me:$LINENO: result: $LD" >&5
4461 echo "${ECHO_T}$LD" >&6
4462 else
4463   echo "$as_me:$LINENO: result: no" >&5
4464 echo "${ECHO_T}no" >&6
4465 fi
4466 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4467 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4468    { (exit 1); exit 1; }; }
4469 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4470 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4471 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4475 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4476   ac_cv_prog_gnu_ld=yes
4477 else
4478   ac_cv_prog_gnu_ld=no
4479 fi
4480 fi
4481 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4482 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4483 with_gnu_ld=$ac_cv_prog_gnu_ld
4484
4485
4486
4487
4488 case $host_os in sysv5*)
4489   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4490 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4491 if test "${pgac_cv_prog_ld_R+set}" = set; then
4492   echo $ECHO_N "(cached) $ECHO_C" >&6
4493 else
4494
4495     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4496     cat >conftest.$ac_ext <<_ACEOF
4497 /* confdefs.h.  */
4498 _ACEOF
4499 cat confdefs.h >>conftest.$ac_ext
4500 cat >>conftest.$ac_ext <<_ACEOF
4501 /* end confdefs.h.  */
4502
4503 int
4504 main ()
4505 {
4506
4507   ;
4508   return 0;
4509 }
4510 _ACEOF
4511 rm -f conftest.$ac_objext conftest$ac_exeext
4512 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4513   (eval $ac_link) 2>conftest.er1
4514   ac_status=$?
4515   grep -v '^ *+' conftest.er1 >conftest.err
4516   rm -f conftest.er1
4517   cat conftest.err >&5
4518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4519   (exit $ac_status); } &&
4520          { ac_try='test -z "$ac_c_werror_flag"
4521                          || test ! -s conftest.err'
4522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4523   (eval $ac_try) 2>&5
4524   ac_status=$?
4525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4526   (exit $ac_status); }; } &&
4527          { ac_try='test -s conftest$ac_exeext'
4528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4529   (eval $ac_try) 2>&5
4530   ac_status=$?
4531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532   (exit $ac_status); }; }; then
4533   pgac_cv_prog_ld_R=yes
4534 else
4535   echo "$as_me: failed program was:" >&5
4536 sed 's/^/| /' conftest.$ac_ext >&5
4537
4538 pgac_cv_prog_ld_R=no
4539 fi
4540 rm -f conftest.err conftest.$ac_objext \
4541       conftest$ac_exeext conftest.$ac_ext
4542     LDFLAGS=$pgac_save_LDFLAGS
4543
4544 fi
4545 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4546 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4547   ld_R_works=$pgac_cv_prog_ld_R
4548
4549 esac
4550 if test -n "$ac_tool_prefix"; then
4551   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4552 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4553 echo "$as_me:$LINENO: checking for $ac_word" >&5
4554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4555 if test "${ac_cv_prog_RANLIB+set}" = set; then
4556   echo $ECHO_N "(cached) $ECHO_C" >&6
4557 else
4558   if test -n "$RANLIB"; then
4559   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4560 else
4561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4562 for as_dir in $PATH
4563 do
4564   IFS=$as_save_IFS
4565   test -z "$as_dir" && as_dir=.
4566   for ac_exec_ext in '' $ac_executable_extensions; do
4567   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4568     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4569     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4570     break 2
4571   fi
4572 done
4573 done
4574
4575 fi
4576 fi
4577 RANLIB=$ac_cv_prog_RANLIB
4578 if test -n "$RANLIB"; then
4579   echo "$as_me:$LINENO: result: $RANLIB" >&5
4580 echo "${ECHO_T}$RANLIB" >&6
4581 else
4582   echo "$as_me:$LINENO: result: no" >&5
4583 echo "${ECHO_T}no" >&6
4584 fi
4585
4586 fi
4587 if test -z "$ac_cv_prog_RANLIB"; then
4588   ac_ct_RANLIB=$RANLIB
4589   # Extract the first word of "ranlib", so it can be a program name with args.
4590 set dummy ranlib; ac_word=$2
4591 echo "$as_me:$LINENO: checking for $ac_word" >&5
4592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4593 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4594   echo $ECHO_N "(cached) $ECHO_C" >&6
4595 else
4596   if test -n "$ac_ct_RANLIB"; then
4597   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4598 else
4599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600 for as_dir in $PATH
4601 do
4602   IFS=$as_save_IFS
4603   test -z "$as_dir" && as_dir=.
4604   for ac_exec_ext in '' $ac_executable_extensions; do
4605   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4606     ac_cv_prog_ac_ct_RANLIB="ranlib"
4607     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4608     break 2
4609   fi
4610 done
4611 done
4612
4613   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4614 fi
4615 fi
4616 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4617 if test -n "$ac_ct_RANLIB"; then
4618   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4619 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4620 else
4621   echo "$as_me:$LINENO: result: no" >&5
4622 echo "${ECHO_T}no" >&6
4623 fi
4624
4625   RANLIB=$ac_ct_RANLIB
4626 else
4627   RANLIB="$ac_cv_prog_RANLIB"
4628 fi
4629
4630 # Extract the first word of "tar", so it can be a program name with args.
4631 set dummy tar; ac_word=$2
4632 echo "$as_me:$LINENO: checking for $ac_word" >&5
4633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4634 if test "${ac_cv_path_TAR+set}" = set; then
4635   echo $ECHO_N "(cached) $ECHO_C" >&6
4636 else
4637   case $TAR in
4638   [\\/]* | ?:[\\/]*)
4639   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4640   ;;
4641   *)
4642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643 for as_dir in $PATH
4644 do
4645   IFS=$as_save_IFS
4646   test -z "$as_dir" && as_dir=.
4647   for ac_exec_ext in '' $ac_executable_extensions; do
4648   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4649     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4650     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4651     break 2
4652   fi
4653 done
4654 done
4655
4656   ;;
4657 esac
4658 fi
4659 TAR=$ac_cv_path_TAR
4660
4661 if test -n "$TAR"; then
4662   echo "$as_me:$LINENO: result: $TAR" >&5
4663 echo "${ECHO_T}$TAR" >&6
4664 else
4665   echo "$as_me:$LINENO: result: no" >&5
4666 echo "${ECHO_T}no" >&6
4667 fi
4668
4669
4670   if test -n "$ac_tool_prefix"; then
4671   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4672 set dummy ${ac_tool_prefix}strip; ac_word=$2
4673 echo "$as_me:$LINENO: checking for $ac_word" >&5
4674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4675 if test "${ac_cv_prog_STRIP+set}" = set; then
4676   echo $ECHO_N "(cached) $ECHO_C" >&6
4677 else
4678   if test -n "$STRIP"; then
4679   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4680 else
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682 for as_dir in $PATH
4683 do
4684   IFS=$as_save_IFS
4685   test -z "$as_dir" && as_dir=.
4686   for ac_exec_ext in '' $ac_executable_extensions; do
4687   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4688     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4689     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4690     break 2
4691   fi
4692 done
4693 done
4694
4695 fi
4696 fi
4697 STRIP=$ac_cv_prog_STRIP
4698 if test -n "$STRIP"; then
4699   echo "$as_me:$LINENO: result: $STRIP" >&5
4700 echo "${ECHO_T}$STRIP" >&6
4701 else
4702   echo "$as_me:$LINENO: result: no" >&5
4703 echo "${ECHO_T}no" >&6
4704 fi
4705
4706 fi
4707 if test -z "$ac_cv_prog_STRIP"; then
4708   ac_ct_STRIP=$STRIP
4709   # Extract the first word of "strip", so it can be a program name with args.
4710 set dummy strip; ac_word=$2
4711 echo "$as_me:$LINENO: checking for $ac_word" >&5
4712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4713 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4714   echo $ECHO_N "(cached) $ECHO_C" >&6
4715 else
4716   if test -n "$ac_ct_STRIP"; then
4717   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4718 else
4719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720 for as_dir in $PATH
4721 do
4722   IFS=$as_save_IFS
4723   test -z "$as_dir" && as_dir=.
4724   for ac_exec_ext in '' $ac_executable_extensions; do
4725   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4726     ac_cv_prog_ac_ct_STRIP="strip"
4727     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4728     break 2
4729   fi
4730 done
4731 done
4732
4733   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4734 fi
4735 fi
4736 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4737 if test -n "$ac_ct_STRIP"; then
4738   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4739 echo "${ECHO_T}$ac_ct_STRIP" >&6
4740 else
4741   echo "$as_me:$LINENO: result: no" >&5
4742 echo "${ECHO_T}no" >&6
4743 fi
4744
4745   STRIP=$ac_ct_STRIP
4746 else
4747   STRIP="$ac_cv_prog_STRIP"
4748 fi
4749
4750
4751   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4752 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4753   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4754     STRIP_STATIC_LIB="$STRIP -x"
4755     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4756     echo "$as_me:$LINENO: result: yes" >&5
4757 echo "${ECHO_T}yes" >&6
4758   else
4759     STRIP_STATIC_LIB=:
4760     STRIP_SHARED_LIB=:
4761     echo "$as_me:$LINENO: result: no" >&5
4762 echo "${ECHO_T}no" >&6
4763   fi
4764
4765
4766
4767
4768 if test -z "$YACC"; then
4769   for ac_prog in 'bison -y'
4770 do
4771   # Extract the first word of "$ac_prog", so it can be a program name with args.
4772 set dummy $ac_prog; ac_word=$2
4773 echo "$as_me:$LINENO: checking for $ac_word" >&5
4774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4775 if test "${ac_cv_prog_YACC+set}" = set; then
4776   echo $ECHO_N "(cached) $ECHO_C" >&6
4777 else
4778   if test -n "$YACC"; then
4779   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4780 else
4781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782 for as_dir in $PATH
4783 do
4784   IFS=$as_save_IFS
4785   test -z "$as_dir" && as_dir=.
4786   for ac_exec_ext in '' $ac_executable_extensions; do
4787   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4788     ac_cv_prog_YACC="$ac_prog"
4789     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4790     break 2
4791   fi
4792 done
4793 done
4794
4795 fi
4796 fi
4797 YACC=$ac_cv_prog_YACC
4798 if test -n "$YACC"; then
4799   echo "$as_me:$LINENO: result: $YACC" >&5
4800 echo "${ECHO_T}$YACC" >&6
4801 else
4802   echo "$as_me:$LINENO: result: no" >&5
4803 echo "${ECHO_T}no" >&6
4804 fi
4805
4806   test -n "$YACC" && break
4807 done
4808
4809
4810   if test "$YACC"; then
4811     if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4812       { echo "$as_me:$LINENO: WARNING:
4813 *** The installed version of Bison is too old to use with PostgreSQL.
4814 *** Bison version 1.875 or later is required." >&5
4815 echo "$as_me: WARNING:
4816 *** The installed version of Bison is too old to use with PostgreSQL.
4817 *** Bison version 1.875 or later is required." >&2;}
4818       YACC=""
4819     fi
4820   fi
4821
4822   if test -z "$YACC"; then
4823     { echo "$as_me:$LINENO: WARNING:
4824 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4825 *** change any of the parser definition files.  You can obtain Bison from
4826 *** a GNU mirror site.  (If you are using the official distribution of
4827 *** PostgreSQL then you do not need to worry about this, because the Bison
4828 *** output is pre-generated.)  To use a different yacc program (possible,
4829 *** but not recommended), set the environment variable YACC before running
4830 *** 'configure'." >&5
4831 echo "$as_me: WARNING:
4832 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4833 *** change any of the parser definition files.  You can obtain Bison from
4834 *** a GNU mirror site.  (If you are using the official distribution of
4835 *** PostgreSQL then you do not need to worry about this, because the Bison
4836 *** output is pre-generated.)  To use a different yacc program (possible,
4837 *** but not recommended), set the environment variable YACC before running
4838 *** 'configure'." >&2;}
4839   fi
4840 fi
4841
4842
4843 # Extract the first word of "perl", so it can be a program name with args.
4844 set dummy perl; ac_word=$2
4845 echo "$as_me:$LINENO: checking for $ac_word" >&5
4846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4847 if test "${ac_cv_path_PERL+set}" = set; then
4848   echo $ECHO_N "(cached) $ECHO_C" >&6
4849 else
4850   case $PERL in
4851   [\\/]* | ?:[\\/]*)
4852   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4853   ;;
4854   *)
4855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856 for as_dir in $PATH
4857 do
4858   IFS=$as_save_IFS
4859   test -z "$as_dir" && as_dir=.
4860   for ac_exec_ext in '' $ac_executable_extensions; do
4861   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4862     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4863     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4864     break 2
4865   fi
4866 done
4867 done
4868
4869   ;;
4870 esac
4871 fi
4872 PERL=$ac_cv_path_PERL
4873
4874 if test -n "$PERL"; then
4875   echo "$as_me:$LINENO: result: $PERL" >&5
4876 echo "${ECHO_T}$PERL" >&6
4877 else
4878   echo "$as_me:$LINENO: result: no" >&5
4879 echo "${ECHO_T}no" >&6
4880 fi
4881
4882 if test "$with_perl" = yes; then
4883
4884 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4885 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4886 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4887 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4888 echo "${ECHO_T}$perl_archlibexp" >&6
4889 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4890 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4891 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4892 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4893 echo "${ECHO_T}$perl_privlibexp" >&6
4894 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4895 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4896 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4897 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4898 echo "${ECHO_T}$perl_useshrplib" >&6
4899
4900 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4901 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4902 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4903 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4904 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4905 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4906 echo "${ECHO_T}$perl_embed_ldflags" >&6
4907 fi
4908
4909 if test "$with_python" = yes; then
4910   # Extract the first word of "python", so it can be a program name with args.
4911 set dummy python; ac_word=$2
4912 echo "$as_me:$LINENO: checking for $ac_word" >&5
4913 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4914 if test "${ac_cv_path_PYTHON+set}" = set; then
4915   echo $ECHO_N "(cached) $ECHO_C" >&6
4916 else
4917   case $PYTHON in
4918   [\\/]* | ?:[\\/]*)
4919   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4920   ;;
4921   *)
4922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923 for as_dir in $PATH
4924 do
4925   IFS=$as_save_IFS
4926   test -z "$as_dir" && as_dir=.
4927   for ac_exec_ext in '' $ac_executable_extensions; do
4928   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4929     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4930     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4931     break 2
4932   fi
4933 done
4934 done
4935
4936   ;;
4937 esac
4938 fi
4939 PYTHON=$ac_cv_path_PYTHON
4940
4941 if test -n "$PYTHON"; then
4942   echo "$as_me:$LINENO: result: $PYTHON" >&5
4943 echo "${ECHO_T}$PYTHON" >&6
4944 else
4945   echo "$as_me:$LINENO: result: no" >&5
4946 echo "${ECHO_T}no" >&6
4947 fi
4948
4949 if test x"$PYTHON" = x""; then
4950   { { echo "$as_me:$LINENO: error: Python not found" >&5
4951 echo "$as_me: error: Python not found" >&2;}
4952    { (exit 1); exit 1; }; }
4953 fi
4954
4955
4956 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4957 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4958 if "${PYTHON}" 2>&- -c 'import distutils'
4959 then
4960     echo "$as_me:$LINENO: result: yes" >&5
4961 echo "${ECHO_T}yes" >&6
4962 else
4963     echo "$as_me:$LINENO: result: no" >&5
4964 echo "${ECHO_T}no" >&6
4965     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4966 echo "$as_me: error: distutils module not found" >&2;}
4967    { (exit 1); exit 1; }; }
4968 fi
4969 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4970 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4971 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4972 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')"`
4973 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4974
4975 # This should be enough of a message.
4976 echo "$as_me:$LINENO: result: $python_configdir" >&5
4977 echo "${ECHO_T}$python_configdir" >&6
4978
4979
4980 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4981 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4982
4983 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4984 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4985 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4986 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4987
4988 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4989 then
4990         # New way: use the official shared library
4991         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4992         python_libspec="-L${python_libdir} -l${ldlibrary}"
4993 else
4994         # Old way: use libpython from python_configdir
4995         python_libdir="${python_configdir}"
4996         python_libspec="-L${python_libdir} -lpython${python_version}"
4997 fi
4998
4999 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
5000
5001 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
5002 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
5003
5004
5005 # threaded python is not supported on bsd's
5006 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
5007 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
5008 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
5009 if test "$pythreads" = "1"; then
5010   echo "$as_me:$LINENO: result: yes" >&5
5011 echo "${ECHO_T}yes" >&6
5012   case $host_os in
5013   openbsd*|freebsd*)
5014     { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
5015 echo "$as_me: error: threaded Python not supported on this platform" >&2;}
5016    { (exit 1); exit 1; }; }
5017     ;;
5018   esac
5019 else
5020   echo "$as_me:$LINENO: result: no" >&5
5021 echo "${ECHO_T}no" >&6
5022 fi
5023
5024
5025 fi
5026
5027 # Supply a numeric version string for use by 3rd party add-ons
5028 # awk -F is a regex on some platforms, and not on others, so make "." a tab
5029 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
5030 tr '.' '        ' |
5031 $AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
5032
5033 cat >>confdefs.h <<_ACEOF
5034 #define PG_VERSION_NUM $PG_VERSION_NUM
5035 _ACEOF
5036
5037
5038 ##
5039 ## Libraries
5040 ##
5041
5042 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
5043 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
5044 if test "${ac_cv_search_setproctitle+set}" = set; then
5045   echo $ECHO_N "(cached) $ECHO_C" >&6
5046 else
5047   ac_func_search_save_LIBS=$LIBS
5048 ac_cv_search_setproctitle=no
5049 cat >conftest.$ac_ext <<_ACEOF
5050 /* confdefs.h.  */
5051 _ACEOF
5052 cat confdefs.h >>conftest.$ac_ext
5053 cat >>conftest.$ac_ext <<_ACEOF
5054 /* end confdefs.h.  */
5055
5056 /* Override any gcc2 internal prototype to avoid an error.  */
5057 #ifdef __cplusplus
5058 extern "C"
5059 #endif
5060 /* We use char because int might match the return type of a gcc2
5061    builtin and then its argument prototype would still apply.  */
5062 char setproctitle ();
5063 int
5064 main ()
5065 {
5066 setproctitle ();
5067   ;
5068   return 0;
5069 }
5070 _ACEOF
5071 rm -f conftest.$ac_objext conftest$ac_exeext
5072 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5073   (eval $ac_link) 2>conftest.er1
5074   ac_status=$?
5075   grep -v '^ *+' conftest.er1 >conftest.err
5076   rm -f conftest.er1
5077   cat conftest.err >&5
5078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5079   (exit $ac_status); } &&
5080          { ac_try='test -z "$ac_c_werror_flag"
5081                          || test ! -s conftest.err'
5082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5083   (eval $ac_try) 2>&5
5084   ac_status=$?
5085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086   (exit $ac_status); }; } &&
5087          { ac_try='test -s conftest$ac_exeext'
5088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5089   (eval $ac_try) 2>&5
5090   ac_status=$?
5091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5092   (exit $ac_status); }; }; then
5093   ac_cv_search_setproctitle="none required"
5094 else
5095   echo "$as_me: failed program was:" >&5
5096 sed 's/^/| /' conftest.$ac_ext >&5
5097
5098 fi
5099 rm -f conftest.err conftest.$ac_objext \
5100       conftest$ac_exeext conftest.$ac_ext
5101 if test "$ac_cv_search_setproctitle" = no; then
5102   for ac_lib in util; do
5103     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5104     cat >conftest.$ac_ext <<_ACEOF
5105 /* confdefs.h.  */
5106 _ACEOF
5107 cat confdefs.h >>conftest.$ac_ext
5108 cat >>conftest.$ac_ext <<_ACEOF
5109 /* end confdefs.h.  */
5110
5111 /* Override any gcc2 internal prototype to avoid an error.  */
5112 #ifdef __cplusplus
5113 extern "C"
5114 #endif
5115 /* We use char because int might match the return type of a gcc2
5116    builtin and then its argument prototype would still apply.  */
5117 char setproctitle ();
5118 int
5119 main ()
5120 {
5121 setproctitle ();
5122   ;
5123   return 0;
5124 }
5125 _ACEOF
5126 rm -f conftest.$ac_objext conftest$ac_exeext
5127 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5128   (eval $ac_link) 2>conftest.er1
5129   ac_status=$?
5130   grep -v '^ *+' conftest.er1 >conftest.err
5131   rm -f conftest.er1
5132   cat conftest.err >&5
5133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134   (exit $ac_status); } &&
5135          { ac_try='test -z "$ac_c_werror_flag"
5136                          || test ! -s conftest.err'
5137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5138   (eval $ac_try) 2>&5
5139   ac_status=$?
5140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141   (exit $ac_status); }; } &&
5142          { ac_try='test -s conftest$ac_exeext'
5143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5144   (eval $ac_try) 2>&5
5145   ac_status=$?
5146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147   (exit $ac_status); }; }; then
5148   ac_cv_search_setproctitle="-l$ac_lib"
5149 break
5150 else
5151   echo "$as_me: failed program was:" >&5
5152 sed 's/^/| /' conftest.$ac_ext >&5
5153
5154 fi
5155 rm -f conftest.err conftest.$ac_objext \
5156       conftest$ac_exeext conftest.$ac_ext
5157   done
5158 fi
5159 LIBS=$ac_func_search_save_LIBS
5160 fi
5161 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
5162 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
5163 if test "$ac_cv_search_setproctitle" != no; then
5164   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
5165
5166 fi
5167
5168 echo "$as_me:$LINENO: checking for library containing pow" >&5
5169 echo $ECHO_N "checking for library containing pow... $ECHO_C" >&6
5170 if test "${ac_cv_search_pow+set}" = set; then
5171   echo $ECHO_N "(cached) $ECHO_C" >&6
5172 else
5173   ac_func_search_save_LIBS=$LIBS
5174 ac_cv_search_pow=no
5175 cat >conftest.$ac_ext <<_ACEOF
5176 /* confdefs.h.  */
5177 _ACEOF
5178 cat confdefs.h >>conftest.$ac_ext
5179 cat >>conftest.$ac_ext <<_ACEOF
5180 /* end confdefs.h.  */
5181
5182 /* Override any gcc2 internal prototype to avoid an error.  */
5183 #ifdef __cplusplus
5184 extern "C"
5185 #endif
5186 /* We use char because int might match the return type of a gcc2
5187    builtin and then its argument prototype would still apply.  */
5188 char pow ();
5189 int
5190 main ()
5191 {
5192 pow ();
5193   ;
5194   return 0;
5195 }
5196 _ACEOF
5197 rm -f conftest.$ac_objext conftest$ac_exeext
5198 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5199   (eval $ac_link) 2>conftest.er1
5200   ac_status=$?
5201   grep -v '^ *+' conftest.er1 >conftest.err
5202   rm -f conftest.er1
5203   cat conftest.err >&5
5204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205   (exit $ac_status); } &&
5206          { ac_try='test -z "$ac_c_werror_flag"
5207                          || test ! -s conftest.err'
5208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5209   (eval $ac_try) 2>&5
5210   ac_status=$?
5211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5212   (exit $ac_status); }; } &&
5213          { ac_try='test -s conftest$ac_exeext'
5214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5215   (eval $ac_try) 2>&5
5216   ac_status=$?
5217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5218   (exit $ac_status); }; }; then
5219   ac_cv_search_pow="none required"
5220 else
5221   echo "$as_me: failed program was:" >&5
5222 sed 's/^/| /' conftest.$ac_ext >&5
5223
5224 fi
5225 rm -f conftest.err conftest.$ac_objext \
5226       conftest$ac_exeext conftest.$ac_ext
5227 if test "$ac_cv_search_pow" = no; then
5228   for ac_lib in m; do
5229     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5230     cat >conftest.$ac_ext <<_ACEOF
5231 /* confdefs.h.  */
5232 _ACEOF
5233 cat confdefs.h >>conftest.$ac_ext
5234 cat >>conftest.$ac_ext <<_ACEOF
5235 /* end confdefs.h.  */
5236
5237 /* Override any gcc2 internal prototype to avoid an error.  */
5238 #ifdef __cplusplus
5239 extern "C"
5240 #endif
5241 /* We use char because int might match the return type of a gcc2
5242    builtin and then its argument prototype would still apply.  */
5243 char pow ();
5244 int
5245 main ()
5246 {
5247 pow ();
5248   ;
5249   return 0;
5250 }
5251 _ACEOF
5252 rm -f conftest.$ac_objext conftest$ac_exeext
5253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5254   (eval $ac_link) 2>conftest.er1
5255   ac_status=$?
5256   grep -v '^ *+' conftest.er1 >conftest.err
5257   rm -f conftest.er1
5258   cat conftest.err >&5
5259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5260   (exit $ac_status); } &&
5261          { ac_try='test -z "$ac_c_werror_flag"
5262                          || test ! -s conftest.err'
5263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5264   (eval $ac_try) 2>&5
5265   ac_status=$?
5266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267   (exit $ac_status); }; } &&
5268          { ac_try='test -s conftest$ac_exeext'
5269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5270   (eval $ac_try) 2>&5
5271   ac_status=$?
5272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5273   (exit $ac_status); }; }; then
5274   ac_cv_search_pow="-l$ac_lib"
5275 break
5276 else
5277   echo "$as_me: failed program was:" >&5
5278 sed 's/^/| /' conftest.$ac_ext >&5
5279
5280 fi
5281 rm -f conftest.err conftest.$ac_objext \
5282       conftest$ac_exeext conftest.$ac_ext
5283   done
5284 fi
5285 LIBS=$ac_func_search_save_LIBS
5286 fi
5287 echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
5288 echo "${ECHO_T}$ac_cv_search_pow" >&6
5289 if test "$ac_cv_search_pow" != no; then
5290   test "$ac_cv_search_pow" = "none required" || LIBS="$ac_cv_search_pow $LIBS"
5291
5292 fi
5293
5294 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5295 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5296 if test "${ac_cv_search_dlopen+set}" = set; then
5297   echo $ECHO_N "(cached) $ECHO_C" >&6
5298 else
5299   ac_func_search_save_LIBS=$LIBS
5300 ac_cv_search_dlopen=no
5301 cat >conftest.$ac_ext <<_ACEOF
5302 /* confdefs.h.  */
5303 _ACEOF
5304 cat confdefs.h >>conftest.$ac_ext
5305 cat >>conftest.$ac_ext <<_ACEOF
5306 /* end confdefs.h.  */
5307
5308 /* Override any gcc2 internal prototype to avoid an error.  */
5309 #ifdef __cplusplus
5310 extern "C"
5311 #endif
5312 /* We use char because int might match the return type of a gcc2
5313    builtin and then its argument prototype would still apply.  */
5314 char dlopen ();
5315 int
5316 main ()
5317 {
5318 dlopen ();
5319   ;
5320   return 0;
5321 }
5322 _ACEOF
5323 rm -f conftest.$ac_objext conftest$ac_exeext
5324 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5325   (eval $ac_link) 2>conftest.er1
5326   ac_status=$?
5327   grep -v '^ *+' conftest.er1 >conftest.err
5328   rm -f conftest.er1
5329   cat conftest.err >&5
5330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5331   (exit $ac_status); } &&
5332          { ac_try='test -z "$ac_c_werror_flag"
5333                          || test ! -s conftest.err'
5334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5335   (eval $ac_try) 2>&5
5336   ac_status=$?
5337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338   (exit $ac_status); }; } &&
5339          { ac_try='test -s conftest$ac_exeext'
5340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341   (eval $ac_try) 2>&5
5342   ac_status=$?
5343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344   (exit $ac_status); }; }; then
5345   ac_cv_search_dlopen="none required"
5346 else
5347   echo "$as_me: failed program was:" >&5
5348 sed 's/^/| /' conftest.$ac_ext >&5
5349
5350 fi
5351 rm -f conftest.err conftest.$ac_objext \
5352       conftest$ac_exeext conftest.$ac_ext
5353 if test "$ac_cv_search_dlopen" = no; then
5354   for ac_lib in dl; do
5355     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5356     cat >conftest.$ac_ext <<_ACEOF
5357 /* confdefs.h.  */
5358 _ACEOF
5359 cat confdefs.h >>conftest.$ac_ext
5360 cat >>conftest.$ac_ext <<_ACEOF
5361 /* end confdefs.h.  */
5362
5363 /* Override any gcc2 internal prototype to avoid an error.  */
5364 #ifdef __cplusplus
5365 extern "C"
5366 #endif
5367 /* We use char because int might match the return type of a gcc2
5368    builtin and then its argument prototype would still apply.  */
5369 char dlopen ();
5370 int
5371 main ()
5372 {
5373 dlopen ();
5374   ;
5375   return 0;
5376 }
5377 _ACEOF
5378 rm -f conftest.$ac_objext conftest$ac_exeext
5379 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5380   (eval $ac_link) 2>conftest.er1
5381   ac_status=$?
5382   grep -v '^ *+' conftest.er1 >conftest.err
5383   rm -f conftest.er1
5384   cat conftest.err >&5
5385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5386   (exit $ac_status); } &&
5387          { ac_try='test -z "$ac_c_werror_flag"
5388                          || test ! -s conftest.err'
5389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5390   (eval $ac_try) 2>&5
5391   ac_status=$?
5392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5393   (exit $ac_status); }; } &&
5394          { ac_try='test -s conftest$ac_exeext'
5395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5396   (eval $ac_try) 2>&5
5397   ac_status=$?
5398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5399   (exit $ac_status); }; }; then
5400   ac_cv_search_dlopen="-l$ac_lib"
5401 break
5402 else
5403   echo "$as_me: failed program was:" >&5
5404 sed 's/^/| /' conftest.$ac_ext >&5
5405
5406 fi
5407 rm -f conftest.err conftest.$ac_objext \
5408       conftest$ac_exeext conftest.$ac_ext
5409   done
5410 fi
5411 LIBS=$ac_func_search_save_LIBS
5412 fi
5413 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5414 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5415 if test "$ac_cv_search_dlopen" != no; then
5416   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5417
5418 fi
5419
5420 echo "$as_me:$LINENO: checking for library containing socket" >&5
5421 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5422 if test "${ac_cv_search_socket+set}" = set; then
5423   echo $ECHO_N "(cached) $ECHO_C" >&6
5424 else
5425   ac_func_search_save_LIBS=$LIBS
5426 ac_cv_search_socket=no
5427 cat >conftest.$ac_ext <<_ACEOF
5428 /* confdefs.h.  */
5429 _ACEOF
5430 cat confdefs.h >>conftest.$ac_ext
5431 cat >>conftest.$ac_ext <<_ACEOF
5432 /* end confdefs.h.  */
5433
5434 /* Override any gcc2 internal prototype to avoid an error.  */
5435 #ifdef __cplusplus
5436 extern "C"
5437 #endif
5438 /* We use char because int might match the return type of a gcc2
5439    builtin and then its argument prototype would still apply.  */
5440 char socket ();
5441 int
5442 main ()
5443 {
5444 socket ();
5445   ;
5446   return 0;
5447 }
5448 _ACEOF
5449 rm -f conftest.$ac_objext conftest$ac_exeext
5450 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5451   (eval $ac_link) 2>conftest.er1
5452   ac_status=$?
5453   grep -v '^ *+' conftest.er1 >conftest.err
5454   rm -f conftest.er1
5455   cat conftest.err >&5
5456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5457   (exit $ac_status); } &&
5458          { ac_try='test -z "$ac_c_werror_flag"
5459                          || test ! -s conftest.err'
5460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5461   (eval $ac_try) 2>&5
5462   ac_status=$?
5463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464   (exit $ac_status); }; } &&
5465          { ac_try='test -s conftest$ac_exeext'
5466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5467   (eval $ac_try) 2>&5
5468   ac_status=$?
5469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470   (exit $ac_status); }; }; then
5471   ac_cv_search_socket="none required"
5472 else
5473   echo "$as_me: failed program was:" >&5
5474 sed 's/^/| /' conftest.$ac_ext >&5
5475
5476 fi
5477 rm -f conftest.err conftest.$ac_objext \
5478       conftest$ac_exeext conftest.$ac_ext
5479 if test "$ac_cv_search_socket" = no; then
5480   for ac_lib in socket wsock32; do
5481     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5482     cat >conftest.$ac_ext <<_ACEOF
5483 /* confdefs.h.  */
5484 _ACEOF
5485 cat confdefs.h >>conftest.$ac_ext
5486 cat >>conftest.$ac_ext <<_ACEOF
5487 /* end confdefs.h.  */
5488
5489 /* Override any gcc2 internal prototype to avoid an error.  */
5490 #ifdef __cplusplus
5491 extern "C"
5492 #endif
5493 /* We use char because int might match the return type of a gcc2
5494    builtin and then its argument prototype would still apply.  */
5495 char socket ();
5496 int
5497 main ()
5498 {
5499 socket ();
5500   ;
5501   return 0;
5502 }
5503 _ACEOF
5504 rm -f conftest.$ac_objext conftest$ac_exeext
5505 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5506   (eval $ac_link) 2>conftest.er1
5507   ac_status=$?
5508   grep -v '^ *+' conftest.er1 >conftest.err
5509   rm -f conftest.er1
5510   cat conftest.err >&5
5511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5512   (exit $ac_status); } &&
5513          { ac_try='test -z "$ac_c_werror_flag"
5514                          || test ! -s conftest.err'
5515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5516   (eval $ac_try) 2>&5
5517   ac_status=$?
5518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5519   (exit $ac_status); }; } &&
5520          { ac_try='test -s conftest$ac_exeext'
5521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5522   (eval $ac_try) 2>&5
5523   ac_status=$?
5524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525   (exit $ac_status); }; }; then
5526   ac_cv_search_socket="-l$ac_lib"
5527 break
5528 else
5529   echo "$as_me: failed program was:" >&5
5530 sed 's/^/| /' conftest.$ac_ext >&5
5531
5532 fi
5533 rm -f conftest.err conftest.$ac_objext \
5534       conftest$ac_exeext conftest.$ac_ext
5535   done
5536 fi
5537 LIBS=$ac_func_search_save_LIBS
5538 fi
5539 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5540 echo "${ECHO_T}$ac_cv_search_socket" >&6
5541 if test "$ac_cv_search_socket" != no; then
5542   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5543
5544 fi
5545
5546 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5547 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5548 if test "${ac_cv_search_shl_load+set}" = set; then
5549   echo $ECHO_N "(cached) $ECHO_C" >&6
5550 else
5551   ac_func_search_save_LIBS=$LIBS
5552 ac_cv_search_shl_load=no
5553 cat >conftest.$ac_ext <<_ACEOF
5554 /* confdefs.h.  */
5555 _ACEOF
5556 cat confdefs.h >>conftest.$ac_ext
5557 cat >>conftest.$ac_ext <<_ACEOF
5558 /* end confdefs.h.  */
5559
5560 /* Override any gcc2 internal prototype to avoid an error.  */
5561 #ifdef __cplusplus
5562 extern "C"
5563 #endif
5564 /* We use char because int might match the return type of a gcc2
5565    builtin and then its argument prototype would still apply.  */
5566 char shl_load ();
5567 int
5568 main ()
5569 {
5570 shl_load ();
5571   ;
5572   return 0;
5573 }
5574 _ACEOF
5575 rm -f conftest.$ac_objext conftest$ac_exeext
5576 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5577   (eval $ac_link) 2>conftest.er1
5578   ac_status=$?
5579   grep -v '^ *+' conftest.er1 >conftest.err
5580   rm -f conftest.er1
5581   cat conftest.err >&5
5582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5583   (exit $ac_status); } &&
5584          { ac_try='test -z "$ac_c_werror_flag"
5585                          || test ! -s conftest.err'
5586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5587   (eval $ac_try) 2>&5
5588   ac_status=$?
5589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5590   (exit $ac_status); }; } &&
5591          { ac_try='test -s conftest$ac_exeext'
5592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5593   (eval $ac_try) 2>&5
5594   ac_status=$?
5595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5596   (exit $ac_status); }; }; then
5597   ac_cv_search_shl_load="none required"
5598 else
5599   echo "$as_me: failed program was:" >&5
5600 sed 's/^/| /' conftest.$ac_ext >&5
5601
5602 fi
5603 rm -f conftest.err conftest.$ac_objext \
5604       conftest$ac_exeext conftest.$ac_ext
5605 if test "$ac_cv_search_shl_load" = no; then
5606   for ac_lib in dld; do
5607     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5608     cat >conftest.$ac_ext <<_ACEOF
5609 /* confdefs.h.  */
5610 _ACEOF
5611 cat confdefs.h >>conftest.$ac_ext
5612 cat >>conftest.$ac_ext <<_ACEOF
5613 /* end confdefs.h.  */
5614
5615 /* Override any gcc2 internal prototype to avoid an error.  */
5616 #ifdef __cplusplus
5617 extern "C"
5618 #endif
5619 /* We use char because int might match the return type of a gcc2
5620    builtin and then its argument prototype would still apply.  */
5621 char shl_load ();
5622 int
5623 main ()
5624 {
5625 shl_load ();
5626   ;
5627   return 0;
5628 }
5629 _ACEOF
5630 rm -f conftest.$ac_objext conftest$ac_exeext
5631 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5632   (eval $ac_link) 2>conftest.er1
5633   ac_status=$?
5634   grep -v '^ *+' conftest.er1 >conftest.err
5635   rm -f conftest.er1
5636   cat conftest.err >&5
5637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5638   (exit $ac_status); } &&
5639          { ac_try='test -z "$ac_c_werror_flag"
5640                          || test ! -s conftest.err'
5641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5642   (eval $ac_try) 2>&5
5643   ac_status=$?
5644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5645   (exit $ac_status); }; } &&
5646          { ac_try='test -s conftest$ac_exeext'
5647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5648   (eval $ac_try) 2>&5
5649   ac_status=$?
5650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651   (exit $ac_status); }; }; then
5652   ac_cv_search_shl_load="-l$ac_lib"
5653 break
5654 else
5655   echo "$as_me: failed program was:" >&5
5656 sed 's/^/| /' conftest.$ac_ext >&5
5657
5658 fi
5659 rm -f conftest.err conftest.$ac_objext \
5660       conftest$ac_exeext conftest.$ac_ext
5661   done
5662 fi
5663 LIBS=$ac_func_search_save_LIBS
5664 fi
5665 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5666 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5667 if test "$ac_cv_search_shl_load" != no; then
5668   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5669
5670 fi
5671
5672 # We only use libld in port/dynloader/aix.c
5673 case $host_os in
5674      aix*)
5675         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5676 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5677 if test "${ac_cv_search_ldopen+set}" = set; then
5678   echo $ECHO_N "(cached) $ECHO_C" >&6
5679 else
5680   ac_func_search_save_LIBS=$LIBS
5681 ac_cv_search_ldopen=no
5682 cat >conftest.$ac_ext <<_ACEOF
5683 /* confdefs.h.  */
5684 _ACEOF
5685 cat confdefs.h >>conftest.$ac_ext
5686 cat >>conftest.$ac_ext <<_ACEOF
5687 /* end confdefs.h.  */
5688
5689 /* Override any gcc2 internal prototype to avoid an error.  */
5690 #ifdef __cplusplus
5691 extern "C"
5692 #endif
5693 /* We use char because int might match the return type of a gcc2
5694    builtin and then its argument prototype would still apply.  */
5695 char ldopen ();
5696 int
5697 main ()
5698 {
5699 ldopen ();
5700   ;
5701   return 0;
5702 }
5703 _ACEOF
5704 rm -f conftest.$ac_objext conftest$ac_exeext
5705 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5706   (eval $ac_link) 2>conftest.er1
5707   ac_status=$?
5708   grep -v '^ *+' conftest.er1 >conftest.err
5709   rm -f conftest.er1
5710   cat conftest.err >&5
5711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712   (exit $ac_status); } &&
5713          { ac_try='test -z "$ac_c_werror_flag"
5714                          || test ! -s conftest.err'
5715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5716   (eval $ac_try) 2>&5
5717   ac_status=$?
5718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719   (exit $ac_status); }; } &&
5720          { ac_try='test -s conftest$ac_exeext'
5721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5722   (eval $ac_try) 2>&5
5723   ac_status=$?
5724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725   (exit $ac_status); }; }; then
5726   ac_cv_search_ldopen="none required"
5727 else
5728   echo "$as_me: failed program was:" >&5
5729 sed 's/^/| /' conftest.$ac_ext >&5
5730
5731 fi
5732 rm -f conftest.err conftest.$ac_objext \
5733       conftest$ac_exeext conftest.$ac_ext
5734 if test "$ac_cv_search_ldopen" = no; then
5735   for ac_lib in ld; do
5736     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5737     cat >conftest.$ac_ext <<_ACEOF
5738 /* confdefs.h.  */
5739 _ACEOF
5740 cat confdefs.h >>conftest.$ac_ext
5741 cat >>conftest.$ac_ext <<_ACEOF
5742 /* end confdefs.h.  */
5743
5744 /* Override any gcc2 internal prototype to avoid an error.  */
5745 #ifdef __cplusplus
5746 extern "C"
5747 #endif
5748 /* We use char because int might match the return type of a gcc2
5749    builtin and then its argument prototype would still apply.  */
5750 char ldopen ();
5751 int
5752 main ()
5753 {
5754 ldopen ();
5755   ;
5756   return 0;
5757 }
5758 _ACEOF
5759 rm -f conftest.$ac_objext conftest$ac_exeext
5760 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5761   (eval $ac_link) 2>conftest.er1
5762   ac_status=$?
5763   grep -v '^ *+' conftest.er1 >conftest.err
5764   rm -f conftest.er1
5765   cat conftest.err >&5
5766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5767   (exit $ac_status); } &&
5768          { ac_try='test -z "$ac_c_werror_flag"
5769                          || test ! -s conftest.err'
5770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5771   (eval $ac_try) 2>&5
5772   ac_status=$?
5773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5774   (exit $ac_status); }; } &&
5775          { ac_try='test -s conftest$ac_exeext'
5776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5777   (eval $ac_try) 2>&5
5778   ac_status=$?
5779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5780   (exit $ac_status); }; }; then
5781   ac_cv_search_ldopen="-l$ac_lib"
5782 break
5783 else
5784   echo "$as_me: failed program was:" >&5
5785 sed 's/^/| /' conftest.$ac_ext >&5
5786
5787 fi
5788 rm -f conftest.err conftest.$ac_objext \
5789       conftest$ac_exeext conftest.$ac_ext
5790   done
5791 fi
5792 LIBS=$ac_func_search_save_LIBS
5793 fi
5794 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5795 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5796 if test "$ac_cv_search_ldopen" != no; then
5797   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5798
5799 fi
5800
5801         ;;
5802 esac
5803 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5804 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5805 if test "${ac_cv_search_getopt_long+set}" = set; then
5806   echo $ECHO_N "(cached) $ECHO_C" >&6
5807 else
5808   ac_func_search_save_LIBS=$LIBS
5809 ac_cv_search_getopt_long=no
5810 cat >conftest.$ac_ext <<_ACEOF
5811 /* confdefs.h.  */
5812 _ACEOF
5813 cat confdefs.h >>conftest.$ac_ext
5814 cat >>conftest.$ac_ext <<_ACEOF
5815 /* end confdefs.h.  */
5816
5817 /* Override any gcc2 internal prototype to avoid an error.  */
5818 #ifdef __cplusplus
5819 extern "C"
5820 #endif
5821 /* We use char because int might match the return type of a gcc2
5822    builtin and then its argument prototype would still apply.  */
5823 char getopt_long ();
5824 int
5825 main ()
5826 {
5827 getopt_long ();
5828   ;
5829   return 0;
5830 }
5831 _ACEOF
5832 rm -f conftest.$ac_objext conftest$ac_exeext
5833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5834   (eval $ac_link) 2>conftest.er1
5835   ac_status=$?
5836   grep -v '^ *+' conftest.er1 >conftest.err
5837   rm -f conftest.er1
5838   cat conftest.err >&5
5839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5840   (exit $ac_status); } &&
5841          { ac_try='test -z "$ac_c_werror_flag"
5842                          || test ! -s conftest.err'
5843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5844   (eval $ac_try) 2>&5
5845   ac_status=$?
5846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5847   (exit $ac_status); }; } &&
5848          { ac_try='test -s conftest$ac_exeext'
5849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5850   (eval $ac_try) 2>&5
5851   ac_status=$?
5852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5853   (exit $ac_status); }; }; then
5854   ac_cv_search_getopt_long="none required"
5855 else
5856   echo "$as_me: failed program was:" >&5
5857 sed 's/^/| /' conftest.$ac_ext >&5
5858
5859 fi
5860 rm -f conftest.err conftest.$ac_objext \
5861       conftest$ac_exeext conftest.$ac_ext
5862 if test "$ac_cv_search_getopt_long" = no; then
5863   for ac_lib in getopt gnugetopt; do
5864     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5865     cat >conftest.$ac_ext <<_ACEOF
5866 /* confdefs.h.  */
5867 _ACEOF
5868 cat confdefs.h >>conftest.$ac_ext
5869 cat >>conftest.$ac_ext <<_ACEOF
5870 /* end confdefs.h.  */
5871
5872 /* Override any gcc2 internal prototype to avoid an error.  */
5873 #ifdef __cplusplus
5874 extern "C"
5875 #endif
5876 /* We use char because int might match the return type of a gcc2
5877    builtin and then its argument prototype would still apply.  */
5878 char getopt_long ();
5879 int
5880 main ()
5881 {
5882 getopt_long ();
5883   ;
5884   return 0;
5885 }
5886 _ACEOF
5887 rm -f conftest.$ac_objext conftest$ac_exeext
5888 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5889   (eval $ac_link) 2>conftest.er1
5890   ac_status=$?
5891   grep -v '^ *+' conftest.er1 >conftest.err
5892   rm -f conftest.er1
5893   cat conftest.err >&5
5894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895   (exit $ac_status); } &&
5896          { ac_try='test -z "$ac_c_werror_flag"
5897                          || test ! -s conftest.err'
5898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5899   (eval $ac_try) 2>&5
5900   ac_status=$?
5901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902   (exit $ac_status); }; } &&
5903          { ac_try='test -s conftest$ac_exeext'
5904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5905   (eval $ac_try) 2>&5
5906   ac_status=$?
5907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908   (exit $ac_status); }; }; then
5909   ac_cv_search_getopt_long="-l$ac_lib"
5910 break
5911 else
5912   echo "$as_me: failed program was:" >&5
5913 sed 's/^/| /' conftest.$ac_ext >&5
5914
5915 fi
5916 rm -f conftest.err conftest.$ac_objext \
5917       conftest$ac_exeext conftest.$ac_ext
5918   done
5919 fi
5920 LIBS=$ac_func_search_save_LIBS
5921 fi
5922 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5923 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5924 if test "$ac_cv_search_getopt_long" != no; then
5925   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5926
5927 fi
5928
5929 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5930 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5931 if test "${ac_cv_search_crypt+set}" = set; then
5932   echo $ECHO_N "(cached) $ECHO_C" >&6
5933 else
5934   ac_func_search_save_LIBS=$LIBS
5935 ac_cv_search_crypt=no
5936 cat >conftest.$ac_ext <<_ACEOF
5937 /* confdefs.h.  */
5938 _ACEOF
5939 cat confdefs.h >>conftest.$ac_ext
5940 cat >>conftest.$ac_ext <<_ACEOF
5941 /* end confdefs.h.  */
5942
5943 /* Override any gcc2 internal prototype to avoid an error.  */
5944 #ifdef __cplusplus
5945 extern "C"
5946 #endif
5947 /* We use char because int might match the return type of a gcc2
5948    builtin and then its argument prototype would still apply.  */
5949 char crypt ();
5950 int
5951 main ()
5952 {
5953 crypt ();
5954   ;
5955   return 0;
5956 }
5957 _ACEOF
5958 rm -f conftest.$ac_objext conftest$ac_exeext
5959 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5960   (eval $ac_link) 2>conftest.er1
5961   ac_status=$?
5962   grep -v '^ *+' conftest.er1 >conftest.err
5963   rm -f conftest.er1
5964   cat conftest.err >&5
5965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5966   (exit $ac_status); } &&
5967          { ac_try='test -z "$ac_c_werror_flag"
5968                          || test ! -s conftest.err'
5969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5970   (eval $ac_try) 2>&5
5971   ac_status=$?
5972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973   (exit $ac_status); }; } &&
5974          { ac_try='test -s conftest$ac_exeext'
5975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5976   (eval $ac_try) 2>&5
5977   ac_status=$?
5978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5979   (exit $ac_status); }; }; then
5980   ac_cv_search_crypt="none required"
5981 else
5982   echo "$as_me: failed program was:" >&5
5983 sed 's/^/| /' conftest.$ac_ext >&5
5984
5985 fi
5986 rm -f conftest.err conftest.$ac_objext \
5987       conftest$ac_exeext conftest.$ac_ext
5988 if test "$ac_cv_search_crypt" = no; then
5989   for ac_lib in crypt; do
5990     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5991     cat >conftest.$ac_ext <<_ACEOF
5992 /* confdefs.h.  */
5993 _ACEOF
5994 cat confdefs.h >>conftest.$ac_ext
5995 cat >>conftest.$ac_ext <<_ACEOF
5996 /* end confdefs.h.  */
5997
5998 /* Override any gcc2 internal prototype to avoid an error.  */
5999 #ifdef __cplusplus
6000 extern "C"
6001 #endif
6002 /* We use char because int might match the return type of a gcc2
6003    builtin and then its argument prototype would still apply.  */
6004 char crypt ();
6005 int
6006 main ()
6007 {
6008 crypt ();
6009   ;
6010   return 0;
6011 }
6012 _ACEOF
6013 rm -f conftest.$ac_objext conftest$ac_exeext
6014 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6015   (eval $ac_link) 2>conftest.er1
6016   ac_status=$?
6017   grep -v '^ *+' conftest.er1 >conftest.err
6018   rm -f conftest.er1
6019   cat conftest.err >&5
6020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021   (exit $ac_status); } &&
6022          { ac_try='test -z "$ac_c_werror_flag"
6023                          || test ! -s conftest.err'
6024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6025   (eval $ac_try) 2>&5
6026   ac_status=$?
6027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6028   (exit $ac_status); }; } &&
6029          { ac_try='test -s conftest$ac_exeext'
6030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6031   (eval $ac_try) 2>&5
6032   ac_status=$?
6033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6034   (exit $ac_status); }; }; then
6035   ac_cv_search_crypt="-l$ac_lib"
6036 break
6037 else
6038   echo "$as_me: failed program was:" >&5
6039 sed 's/^/| /' conftest.$ac_ext >&5
6040
6041 fi
6042 rm -f conftest.err conftest.$ac_objext \
6043       conftest$ac_exeext conftest.$ac_ext
6044   done
6045 fi
6046 LIBS=$ac_func_search_save_LIBS
6047 fi
6048 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6049 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6050 if test "$ac_cv_search_crypt" != no; then
6051   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6052
6053 fi
6054
6055 # Solaris:
6056 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6057 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6058 if test "${ac_cv_search_fdatasync+set}" = set; then
6059   echo $ECHO_N "(cached) $ECHO_C" >&6
6060 else
6061   ac_func_search_save_LIBS=$LIBS
6062 ac_cv_search_fdatasync=no
6063 cat >conftest.$ac_ext <<_ACEOF
6064 /* confdefs.h.  */
6065 _ACEOF
6066 cat confdefs.h >>conftest.$ac_ext
6067 cat >>conftest.$ac_ext <<_ACEOF
6068 /* end confdefs.h.  */
6069
6070 /* Override any gcc2 internal prototype to avoid an error.  */
6071 #ifdef __cplusplus
6072 extern "C"
6073 #endif
6074 /* We use char because int might match the return type of a gcc2
6075    builtin and then its argument prototype would still apply.  */
6076 char fdatasync ();
6077 int
6078 main ()
6079 {
6080 fdatasync ();
6081   ;
6082   return 0;
6083 }
6084 _ACEOF
6085 rm -f conftest.$ac_objext conftest$ac_exeext
6086 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6087   (eval $ac_link) 2>conftest.er1
6088   ac_status=$?
6089   grep -v '^ *+' conftest.er1 >conftest.err
6090   rm -f conftest.er1
6091   cat conftest.err >&5
6092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093   (exit $ac_status); } &&
6094          { ac_try='test -z "$ac_c_werror_flag"
6095                          || test ! -s conftest.err'
6096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6097   (eval $ac_try) 2>&5
6098   ac_status=$?
6099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6100   (exit $ac_status); }; } &&
6101          { ac_try='test -s conftest$ac_exeext'
6102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6103   (eval $ac_try) 2>&5
6104   ac_status=$?
6105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6106   (exit $ac_status); }; }; then
6107   ac_cv_search_fdatasync="none required"
6108 else
6109   echo "$as_me: failed program was:" >&5
6110 sed 's/^/| /' conftest.$ac_ext >&5
6111
6112 fi
6113 rm -f conftest.err conftest.$ac_objext \
6114       conftest$ac_exeext conftest.$ac_ext
6115 if test "$ac_cv_search_fdatasync" = no; then
6116   for ac_lib in rt posix4; do
6117     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6118     cat >conftest.$ac_ext <<_ACEOF
6119 /* confdefs.h.  */
6120 _ACEOF
6121 cat confdefs.h >>conftest.$ac_ext
6122 cat >>conftest.$ac_ext <<_ACEOF
6123 /* end confdefs.h.  */
6124
6125 /* Override any gcc2 internal prototype to avoid an error.  */
6126 #ifdef __cplusplus
6127 extern "C"
6128 #endif
6129 /* We use char because int might match the return type of a gcc2
6130    builtin and then its argument prototype would still apply.  */
6131 char fdatasync ();
6132 int
6133 main ()
6134 {
6135 fdatasync ();
6136   ;
6137   return 0;
6138 }
6139 _ACEOF
6140 rm -f conftest.$ac_objext conftest$ac_exeext
6141 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6142   (eval $ac_link) 2>conftest.er1
6143   ac_status=$?
6144   grep -v '^ *+' conftest.er1 >conftest.err
6145   rm -f conftest.er1
6146   cat conftest.err >&5
6147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6148   (exit $ac_status); } &&
6149          { ac_try='test -z "$ac_c_werror_flag"
6150                          || test ! -s conftest.err'
6151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6152   (eval $ac_try) 2>&5
6153   ac_status=$?
6154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6155   (exit $ac_status); }; } &&
6156          { ac_try='test -s conftest$ac_exeext'
6157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6158   (eval $ac_try) 2>&5
6159   ac_status=$?
6160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6161   (exit $ac_status); }; }; then
6162   ac_cv_search_fdatasync="-l$ac_lib"
6163 break
6164 else
6165   echo "$as_me: failed program was:" >&5
6166 sed 's/^/| /' conftest.$ac_ext >&5
6167
6168 fi
6169 rm -f conftest.err conftest.$ac_objext \
6170       conftest$ac_exeext conftest.$ac_ext
6171   done
6172 fi
6173 LIBS=$ac_func_search_save_LIBS
6174 fi
6175 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6176 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6177 if test "$ac_cv_search_fdatasync" != no; then
6178   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6179
6180 fi
6181
6182 # Cygwin:
6183 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6184 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6185 if test "${ac_cv_search_shmget+set}" = set; then
6186   echo $ECHO_N "(cached) $ECHO_C" >&6
6187 else
6188   ac_func_search_save_LIBS=$LIBS
6189 ac_cv_search_shmget=no
6190 cat >conftest.$ac_ext <<_ACEOF
6191 /* confdefs.h.  */
6192 _ACEOF
6193 cat confdefs.h >>conftest.$ac_ext
6194 cat >>conftest.$ac_ext <<_ACEOF
6195 /* end confdefs.h.  */
6196
6197 /* Override any gcc2 internal prototype to avoid an error.  */
6198 #ifdef __cplusplus
6199 extern "C"
6200 #endif
6201 /* We use char because int might match the return type of a gcc2
6202    builtin and then its argument prototype would still apply.  */
6203 char shmget ();
6204 int
6205 main ()
6206 {
6207 shmget ();
6208   ;
6209   return 0;
6210 }
6211 _ACEOF
6212 rm -f conftest.$ac_objext conftest$ac_exeext
6213 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6214   (eval $ac_link) 2>conftest.er1
6215   ac_status=$?
6216   grep -v '^ *+' conftest.er1 >conftest.err
6217   rm -f conftest.er1
6218   cat conftest.err >&5
6219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6220   (exit $ac_status); } &&
6221          { ac_try='test -z "$ac_c_werror_flag"
6222                          || test ! -s conftest.err'
6223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6224   (eval $ac_try) 2>&5
6225   ac_status=$?
6226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227   (exit $ac_status); }; } &&
6228          { ac_try='test -s conftest$ac_exeext'
6229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6230   (eval $ac_try) 2>&5
6231   ac_status=$?
6232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6233   (exit $ac_status); }; }; then
6234   ac_cv_search_shmget="none required"
6235 else
6236   echo "$as_me: failed program was:" >&5
6237 sed 's/^/| /' conftest.$ac_ext >&5
6238
6239 fi
6240 rm -f conftest.err conftest.$ac_objext \
6241       conftest$ac_exeext conftest.$ac_ext
6242 if test "$ac_cv_search_shmget" = no; then
6243   for ac_lib in cygipc; do
6244     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6245     cat >conftest.$ac_ext <<_ACEOF
6246 /* confdefs.h.  */
6247 _ACEOF
6248 cat confdefs.h >>conftest.$ac_ext
6249 cat >>conftest.$ac_ext <<_ACEOF
6250 /* end confdefs.h.  */
6251
6252 /* Override any gcc2 internal prototype to avoid an error.  */
6253 #ifdef __cplusplus
6254 extern "C"
6255 #endif
6256 /* We use char because int might match the return type of a gcc2
6257    builtin and then its argument prototype would still apply.  */
6258 char shmget ();
6259 int
6260 main ()
6261 {
6262 shmget ();
6263   ;
6264   return 0;
6265 }
6266 _ACEOF
6267 rm -f conftest.$ac_objext conftest$ac_exeext
6268 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6269   (eval $ac_link) 2>conftest.er1
6270   ac_status=$?
6271   grep -v '^ *+' conftest.er1 >conftest.err
6272   rm -f conftest.er1
6273   cat conftest.err >&5
6274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6275   (exit $ac_status); } &&
6276          { ac_try='test -z "$ac_c_werror_flag"
6277                          || test ! -s conftest.err'
6278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6279   (eval $ac_try) 2>&5
6280   ac_status=$?
6281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282   (exit $ac_status); }; } &&
6283          { ac_try='test -s conftest$ac_exeext'
6284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6285   (eval $ac_try) 2>&5
6286   ac_status=$?
6287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6288   (exit $ac_status); }; }; then
6289   ac_cv_search_shmget="-l$ac_lib"
6290 break
6291 else
6292   echo "$as_me: failed program was:" >&5
6293 sed 's/^/| /' conftest.$ac_ext >&5
6294
6295 fi
6296 rm -f conftest.err conftest.$ac_objext \
6297       conftest$ac_exeext conftest.$ac_ext
6298   done
6299 fi
6300 LIBS=$ac_func_search_save_LIBS
6301 fi
6302 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6303 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6304 if test "$ac_cv_search_shmget" != no; then
6305   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6306
6307 fi
6308
6309
6310 if test "$with_readline" = yes; then
6311
6312
6313 if test "${pgac_cv_check_readline+set}" = set; then
6314   echo $ECHO_N "(cached) $ECHO_C" >&6
6315 else
6316   pgac_cv_check_readline=no
6317 pgac_save_LIBS=$LIBS
6318 if test x"$with_libedit_preferred" != x"yes"
6319 then    READLINE_ORDER="-lreadline -ledit"
6320 else    READLINE_ORDER="-ledit -lreadline"
6321 fi
6322 for pgac_rllib in $READLINE_ORDER ; do
6323   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6324 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6325   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6326     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6327     cat >conftest.$ac_ext <<_ACEOF
6328 /* confdefs.h.  */
6329 _ACEOF
6330 cat confdefs.h >>conftest.$ac_ext
6331 cat >>conftest.$ac_ext <<_ACEOF
6332 /* end confdefs.h.  */
6333
6334 /* Override any gcc2 internal prototype to avoid an error.  */
6335 #ifdef __cplusplus
6336 extern "C"
6337 #endif
6338 /* We use char because int might match the return type of a gcc2
6339    builtin and then its argument prototype would still apply.  */
6340 char readline ();
6341 int
6342 main ()
6343 {
6344 readline ();
6345   ;
6346   return 0;
6347 }
6348 _ACEOF
6349 rm -f conftest.$ac_objext conftest$ac_exeext
6350 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6351   (eval $ac_link) 2>conftest.er1
6352   ac_status=$?
6353   grep -v '^ *+' conftest.er1 >conftest.err
6354   rm -f conftest.er1
6355   cat conftest.err >&5
6356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6357   (exit $ac_status); } &&
6358          { ac_try='test -z "$ac_c_werror_flag"
6359                          || test ! -s conftest.err'
6360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6361   (eval $ac_try) 2>&5
6362   ac_status=$?
6363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364   (exit $ac_status); }; } &&
6365          { ac_try='test -s conftest$ac_exeext'
6366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6367   (eval $ac_try) 2>&5
6368   ac_status=$?
6369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6370   (exit $ac_status); }; }; then
6371
6372       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6373       # recognize dependent libraries; assume curses is needed if we didn't
6374       # find any dependency.
6375       case $host_os in
6376         netbsd* | openbsd* | irix*)
6377           if test x"$pgac_lib" = x"" ; then
6378             pgac_lib=" -lcurses"
6379           fi ;;
6380       esac
6381
6382       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6383       break
6384
6385 else
6386   echo "$as_me: failed program was:" >&5
6387 sed 's/^/| /' conftest.$ac_ext >&5
6388
6389 fi
6390 rm -f conftest.err conftest.$ac_objext \
6391       conftest$ac_exeext conftest.$ac_ext
6392   done
6393   if test "$pgac_cv_check_readline" != no ; then
6394     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6395 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6396     break
6397   else
6398     echo "$as_me:$LINENO: result: no" >&5
6399 echo "${ECHO_T}no" >&6
6400   fi
6401 done
6402 LIBS=$pgac_save_LIBS
6403
6404 fi
6405
6406 if test "$pgac_cv_check_readline" != no ; then
6407   LIBS="$pgac_cv_check_readline $LIBS"
6408
6409 cat >>confdefs.h <<\_ACEOF
6410 #define HAVE_LIBREADLINE 1
6411 _ACEOF
6412
6413 fi
6414
6415
6416   if test x"$pgac_cv_check_readline" = x"no"; then
6417     { { echo "$as_me:$LINENO: error: readline library not found
6418 If you have readline already installed, see config.log for details on the
6419 failure.  It is possible the compiler isn't looking in the proper directory.
6420 Use --without-readline to disable readline support." >&5
6421 echo "$as_me: error: readline library not found
6422 If you have readline already installed, see config.log for details on the
6423 failure.  It is possible the compiler isn't looking in the proper directory.
6424 Use --without-readline to disable readline support." >&2;}
6425    { (exit 1); exit 1; }; }
6426   fi
6427 fi
6428
6429 if test "$with_zlib" = yes; then
6430
6431 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6432 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6433 if test "${ac_cv_lib_z_inflate+set}" = set; then
6434   echo $ECHO_N "(cached) $ECHO_C" >&6
6435 else
6436   ac_check_lib_save_LIBS=$LIBS
6437 LIBS="-lz  $LIBS"
6438 cat >conftest.$ac_ext <<_ACEOF
6439 /* confdefs.h.  */
6440 _ACEOF
6441 cat confdefs.h >>conftest.$ac_ext
6442 cat >>conftest.$ac_ext <<_ACEOF
6443 /* end confdefs.h.  */
6444
6445 /* Override any gcc2 internal prototype to avoid an error.  */
6446 #ifdef __cplusplus
6447 extern "C"
6448 #endif
6449 /* We use char because int might match the return type of a gcc2
6450    builtin and then its argument prototype would still apply.  */
6451 char inflate ();
6452 int
6453 main ()
6454 {
6455 inflate ();
6456   ;
6457   return 0;
6458 }
6459 _ACEOF
6460 rm -f conftest.$ac_objext conftest$ac_exeext
6461 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6462   (eval $ac_link) 2>conftest.er1
6463   ac_status=$?
6464   grep -v '^ *+' conftest.er1 >conftest.err
6465   rm -f conftest.er1
6466   cat conftest.err >&5
6467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6468   (exit $ac_status); } &&
6469          { ac_try='test -z "$ac_c_werror_flag"
6470                          || test ! -s conftest.err'
6471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6472   (eval $ac_try) 2>&5
6473   ac_status=$?
6474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6475   (exit $ac_status); }; } &&
6476          { ac_try='test -s conftest$ac_exeext'
6477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6478   (eval $ac_try) 2>&5
6479   ac_status=$?
6480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6481   (exit $ac_status); }; }; then
6482   ac_cv_lib_z_inflate=yes
6483 else
6484   echo "$as_me: failed program was:" >&5
6485 sed 's/^/| /' conftest.$ac_ext >&5
6486
6487 ac_cv_lib_z_inflate=no
6488 fi
6489 rm -f conftest.err conftest.$ac_objext \
6490       conftest$ac_exeext conftest.$ac_ext
6491 LIBS=$ac_check_lib_save_LIBS
6492 fi
6493 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6494 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6495 if test $ac_cv_lib_z_inflate = yes; then
6496   cat >>confdefs.h <<_ACEOF
6497 #define HAVE_LIBZ 1
6498 _ACEOF
6499
6500   LIBS="-lz $LIBS"
6501
6502 else
6503   { { echo "$as_me:$LINENO: error: zlib library not found
6504 If you have zlib already installed, see config.log for details on the
6505 failure.  It is possible the compiler isn't looking in the proper directory.
6506 Use --without-zlib to disable zlib support." >&5
6507 echo "$as_me: error: zlib library not found
6508 If you have zlib already installed, see config.log for details on the
6509 failure.  It is possible the compiler isn't looking in the proper directory.
6510 Use --without-zlib to disable zlib support." >&2;}
6511    { (exit 1); exit 1; }; }
6512 fi
6513
6514 fi
6515
6516 if test "$enable_spinlocks" = yes; then
6517
6518 cat >>confdefs.h <<\_ACEOF
6519 #define HAVE_SPINLOCKS 1
6520 _ACEOF
6521
6522 else
6523   { echo "$as_me:$LINENO: WARNING:
6524 *** Not using spinlocks will cause poor performance." >&5
6525 echo "$as_me: WARNING:
6526 *** Not using spinlocks will cause poor performance." >&2;}
6527 fi
6528
6529 if test "$with_krb5" = yes ; then
6530   if test "$PORTNAME" != "win32"; then
6531      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6532 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6533 if test "${ac_cv_search_com_err+set}" = set; then
6534   echo $ECHO_N "(cached) $ECHO_C" >&6
6535 else
6536   ac_func_search_save_LIBS=$LIBS
6537 ac_cv_search_com_err=no
6538 cat >conftest.$ac_ext <<_ACEOF
6539 /* confdefs.h.  */
6540 _ACEOF
6541 cat confdefs.h >>conftest.$ac_ext
6542 cat >>conftest.$ac_ext <<_ACEOF
6543 /* end confdefs.h.  */
6544
6545 /* Override any gcc2 internal prototype to avoid an error.  */
6546 #ifdef __cplusplus
6547 extern "C"
6548 #endif
6549 /* We use char because int might match the return type of a gcc2
6550    builtin and then its argument prototype would still apply.  */
6551 char com_err ();
6552 int
6553 main ()
6554 {
6555 com_err ();
6556   ;
6557   return 0;
6558 }
6559 _ACEOF
6560 rm -f conftest.$ac_objext conftest$ac_exeext
6561 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6562   (eval $ac_link) 2>conftest.er1
6563   ac_status=$?
6564   grep -v '^ *+' conftest.er1 >conftest.err
6565   rm -f conftest.er1
6566   cat conftest.err >&5
6567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568   (exit $ac_status); } &&
6569          { ac_try='test -z "$ac_c_werror_flag"
6570                          || test ! -s conftest.err'
6571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6572   (eval $ac_try) 2>&5
6573   ac_status=$?
6574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6575   (exit $ac_status); }; } &&
6576          { ac_try='test -s conftest$ac_exeext'
6577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6578   (eval $ac_try) 2>&5
6579   ac_status=$?
6580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6581   (exit $ac_status); }; }; then
6582   ac_cv_search_com_err="none required"
6583 else
6584   echo "$as_me: failed program was:" >&5
6585 sed 's/^/| /' conftest.$ac_ext >&5
6586
6587 fi
6588 rm -f conftest.err conftest.$ac_objext \
6589       conftest$ac_exeext conftest.$ac_ext
6590 if test "$ac_cv_search_com_err" = no; then
6591   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6592     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6593     cat >conftest.$ac_ext <<_ACEOF
6594 /* confdefs.h.  */
6595 _ACEOF
6596 cat confdefs.h >>conftest.$ac_ext
6597 cat >>conftest.$ac_ext <<_ACEOF
6598 /* end confdefs.h.  */
6599
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 #ifdef __cplusplus
6602 extern "C"
6603 #endif
6604 /* We use char because int might match the return type of a gcc2
6605    builtin and then its argument prototype would still apply.  */
6606 char com_err ();
6607 int
6608 main ()
6609 {
6610 com_err ();
6611   ;
6612   return 0;
6613 }
6614 _ACEOF
6615 rm -f conftest.$ac_objext conftest$ac_exeext
6616 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6617   (eval $ac_link) 2>conftest.er1
6618   ac_status=$?
6619   grep -v '^ *+' conftest.er1 >conftest.err
6620   rm -f conftest.er1
6621   cat conftest.err >&5
6622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623   (exit $ac_status); } &&
6624          { ac_try='test -z "$ac_c_werror_flag"
6625                          || test ! -s conftest.err'
6626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6627   (eval $ac_try) 2>&5
6628   ac_status=$?
6629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630   (exit $ac_status); }; } &&
6631          { ac_try='test -s conftest$ac_exeext'
6632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6633   (eval $ac_try) 2>&5
6634   ac_status=$?
6635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636   (exit $ac_status); }; }; then
6637   ac_cv_search_com_err="-l$ac_lib"
6638 break
6639 else
6640   echo "$as_me: failed program was:" >&5
6641 sed 's/^/| /' conftest.$ac_ext >&5
6642
6643 fi
6644 rm -f conftest.err conftest.$ac_objext \
6645       conftest$ac_exeext conftest.$ac_ext
6646   done
6647 fi
6648 LIBS=$ac_func_search_save_LIBS
6649 fi
6650 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6651 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6652 if test "$ac_cv_search_com_err" != no; then
6653   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6654
6655 else
6656   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6657 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6658    { (exit 1); exit 1; }; }
6659 fi
6660
6661      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6662 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6663 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6664   echo $ECHO_N "(cached) $ECHO_C" >&6
6665 else
6666   ac_func_search_save_LIBS=$LIBS
6667 ac_cv_search_krb5_sendauth=no
6668 cat >conftest.$ac_ext <<_ACEOF
6669 /* confdefs.h.  */
6670 _ACEOF
6671 cat confdefs.h >>conftest.$ac_ext
6672 cat >>conftest.$ac_ext <<_ACEOF
6673 /* end confdefs.h.  */
6674
6675 /* Override any gcc2 internal prototype to avoid an error.  */
6676 #ifdef __cplusplus
6677 extern "C"
6678 #endif
6679 /* We use char because int might match the return type of a gcc2
6680    builtin and then its argument prototype would still apply.  */
6681 char krb5_sendauth ();
6682 int
6683 main ()
6684 {
6685 krb5_sendauth ();
6686   ;
6687   return 0;
6688 }
6689 _ACEOF
6690 rm -f conftest.$ac_objext conftest$ac_exeext
6691 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6692   (eval $ac_link) 2>conftest.er1
6693   ac_status=$?
6694   grep -v '^ *+' conftest.er1 >conftest.err
6695   rm -f conftest.er1
6696   cat conftest.err >&5
6697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6698   (exit $ac_status); } &&
6699          { ac_try='test -z "$ac_c_werror_flag"
6700                          || test ! -s conftest.err'
6701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6702   (eval $ac_try) 2>&5
6703   ac_status=$?
6704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6705   (exit $ac_status); }; } &&
6706          { ac_try='test -s conftest$ac_exeext'
6707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6708   (eval $ac_try) 2>&5
6709   ac_status=$?
6710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6711   (exit $ac_status); }; }; then
6712   ac_cv_search_krb5_sendauth="none required"
6713 else
6714   echo "$as_me: failed program was:" >&5
6715 sed 's/^/| /' conftest.$ac_ext >&5
6716
6717 fi
6718 rm -f conftest.err conftest.$ac_objext \
6719       conftest$ac_exeext conftest.$ac_ext
6720 if test "$ac_cv_search_krb5_sendauth" = no; then
6721   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6722     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6723     cat >conftest.$ac_ext <<_ACEOF
6724 /* confdefs.h.  */
6725 _ACEOF
6726 cat confdefs.h >>conftest.$ac_ext
6727 cat >>conftest.$ac_ext <<_ACEOF
6728 /* end confdefs.h.  */
6729
6730 /* Override any gcc2 internal prototype to avoid an error.  */
6731 #ifdef __cplusplus
6732 extern "C"
6733 #endif
6734 /* We use char because int might match the return type of a gcc2
6735    builtin and then its argument prototype would still apply.  */
6736 char krb5_sendauth ();
6737 int
6738 main ()
6739 {
6740 krb5_sendauth ();
6741   ;
6742   return 0;
6743 }
6744 _ACEOF
6745 rm -f conftest.$ac_objext conftest$ac_exeext
6746 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6747   (eval $ac_link) 2>conftest.er1
6748   ac_status=$?
6749   grep -v '^ *+' conftest.er1 >conftest.err
6750   rm -f conftest.er1
6751   cat conftest.err >&5
6752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6753   (exit $ac_status); } &&
6754          { ac_try='test -z "$ac_c_werror_flag"
6755                          || test ! -s conftest.err'
6756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6757   (eval $ac_try) 2>&5
6758   ac_status=$?
6759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6760   (exit $ac_status); }; } &&
6761          { ac_try='test -s conftest$ac_exeext'
6762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6763   (eval $ac_try) 2>&5
6764   ac_status=$?
6765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766   (exit $ac_status); }; }; then
6767   ac_cv_search_krb5_sendauth="-l$ac_lib"
6768 break
6769 else
6770   echo "$as_me: failed program was:" >&5
6771 sed 's/^/| /' conftest.$ac_ext >&5
6772
6773 fi
6774 rm -f conftest.err conftest.$ac_objext \
6775       conftest$ac_exeext conftest.$ac_ext
6776   done
6777 fi
6778 LIBS=$ac_func_search_save_LIBS
6779 fi
6780 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6781 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6782 if test "$ac_cv_search_krb5_sendauth" != no; then
6783   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6784
6785 else
6786   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6787 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6788    { (exit 1); exit 1; }; }
6789 fi
6790
6791   else
6792      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6793 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6794 if test "${ac_cv_search_com_err+set}" = set; then
6795   echo $ECHO_N "(cached) $ECHO_C" >&6
6796 else
6797   ac_func_search_save_LIBS=$LIBS
6798 ac_cv_search_com_err=no
6799 cat >conftest.$ac_ext <<_ACEOF
6800 /* confdefs.h.  */
6801 _ACEOF
6802 cat confdefs.h >>conftest.$ac_ext
6803 cat >>conftest.$ac_ext <<_ACEOF
6804 /* end confdefs.h.  */
6805
6806 /* Override any gcc2 internal prototype to avoid an error.  */
6807 #ifdef __cplusplus
6808 extern "C"
6809 #endif
6810 /* We use char because int might match the return type of a gcc2
6811    builtin and then its argument prototype would still apply.  */
6812 char com_err ();
6813 int
6814 main ()
6815 {
6816 com_err ();
6817   ;
6818   return 0;
6819 }
6820 _ACEOF
6821 rm -f conftest.$ac_objext conftest$ac_exeext
6822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6823   (eval $ac_link) 2>conftest.er1
6824   ac_status=$?
6825   grep -v '^ *+' conftest.er1 >conftest.err
6826   rm -f conftest.er1
6827   cat conftest.err >&5
6828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6829   (exit $ac_status); } &&
6830          { ac_try='test -z "$ac_c_werror_flag"
6831                          || test ! -s conftest.err'
6832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6833   (eval $ac_try) 2>&5
6834   ac_status=$?
6835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836   (exit $ac_status); }; } &&
6837          { ac_try='test -s conftest$ac_exeext'
6838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6839   (eval $ac_try) 2>&5
6840   ac_status=$?
6841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6842   (exit $ac_status); }; }; then
6843   ac_cv_search_com_err="none required"
6844 else
6845   echo "$as_me: failed program was:" >&5
6846 sed 's/^/| /' conftest.$ac_ext >&5
6847
6848 fi
6849 rm -f conftest.err conftest.$ac_objext \
6850       conftest$ac_exeext conftest.$ac_ext
6851 if test "$ac_cv_search_com_err" = no; then
6852   for ac_lib in 'comerr32 -lkrb5_32'; do
6853     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6854     cat >conftest.$ac_ext <<_ACEOF
6855 /* confdefs.h.  */
6856 _ACEOF
6857 cat confdefs.h >>conftest.$ac_ext
6858 cat >>conftest.$ac_ext <<_ACEOF
6859 /* end confdefs.h.  */
6860
6861 /* Override any gcc2 internal prototype to avoid an error.  */
6862 #ifdef __cplusplus
6863 extern "C"
6864 #endif
6865 /* We use char because int might match the return type of a gcc2
6866    builtin and then its argument prototype would still apply.  */
6867 char com_err ();
6868 int
6869 main ()
6870 {
6871 com_err ();
6872   ;
6873   return 0;
6874 }
6875 _ACEOF
6876 rm -f conftest.$ac_objext conftest$ac_exeext
6877 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6878   (eval $ac_link) 2>conftest.er1
6879   ac_status=$?
6880   grep -v '^ *+' conftest.er1 >conftest.err
6881   rm -f conftest.er1
6882   cat conftest.err >&5
6883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884   (exit $ac_status); } &&
6885          { ac_try='test -z "$ac_c_werror_flag"
6886                          || test ! -s conftest.err'
6887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6888   (eval $ac_try) 2>&5
6889   ac_status=$?
6890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6891   (exit $ac_status); }; } &&
6892          { ac_try='test -s conftest$ac_exeext'
6893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6894   (eval $ac_try) 2>&5
6895   ac_status=$?
6896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6897   (exit $ac_status); }; }; then
6898   ac_cv_search_com_err="-l$ac_lib"
6899 break
6900 else
6901   echo "$as_me: failed program was:" >&5
6902 sed 's/^/| /' conftest.$ac_ext >&5
6903
6904 fi
6905 rm -f conftest.err conftest.$ac_objext \
6906       conftest$ac_exeext conftest.$ac_ext
6907   done
6908 fi
6909 LIBS=$ac_func_search_save_LIBS
6910 fi
6911 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6912 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6913 if test "$ac_cv_search_com_err" != no; then
6914   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6915
6916 else
6917   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6918 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6919    { (exit 1); exit 1; }; }
6920 fi
6921
6922   fi
6923 fi
6924
6925 if test "$with_openssl" = yes ; then
6926     if test "$PORTNAME" != "win32"; then
6927
6928 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6929 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6930 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6931   echo $ECHO_N "(cached) $ECHO_C" >&6
6932 else
6933   ac_check_lib_save_LIBS=$LIBS
6934 LIBS="-lcrypto  $LIBS"
6935 cat >conftest.$ac_ext <<_ACEOF
6936 /* confdefs.h.  */
6937 _ACEOF
6938 cat confdefs.h >>conftest.$ac_ext
6939 cat >>conftest.$ac_ext <<_ACEOF
6940 /* end confdefs.h.  */
6941
6942 /* Override any gcc2 internal prototype to avoid an error.  */
6943 #ifdef __cplusplus
6944 extern "C"
6945 #endif
6946 /* We use char because int might match the return type of a gcc2
6947    builtin and then its argument prototype would still apply.  */
6948 char CRYPTO_new_ex_data ();
6949 int
6950 main ()
6951 {
6952 CRYPTO_new_ex_data ();
6953   ;
6954   return 0;
6955 }
6956 _ACEOF
6957 rm -f conftest.$ac_objext conftest$ac_exeext
6958 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6959   (eval $ac_link) 2>conftest.er1
6960   ac_status=$?
6961   grep -v '^ *+' conftest.er1 >conftest.err
6962   rm -f conftest.er1
6963   cat conftest.err >&5
6964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6965   (exit $ac_status); } &&
6966          { ac_try='test -z "$ac_c_werror_flag"
6967                          || test ! -s conftest.err'
6968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6969   (eval $ac_try) 2>&5
6970   ac_status=$?
6971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6972   (exit $ac_status); }; } &&
6973          { ac_try='test -s conftest$ac_exeext'
6974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6975   (eval $ac_try) 2>&5
6976   ac_status=$?
6977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6978   (exit $ac_status); }; }; then
6979   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6980 else
6981   echo "$as_me: failed program was:" >&5
6982 sed 's/^/| /' conftest.$ac_ext >&5
6983
6984 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6985 fi
6986 rm -f conftest.err conftest.$ac_objext \
6987       conftest$ac_exeext conftest.$ac_ext
6988 LIBS=$ac_check_lib_save_LIBS
6989 fi
6990 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6991 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6992 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6993   cat >>confdefs.h <<_ACEOF
6994 #define HAVE_LIBCRYPTO 1
6995 _ACEOF
6996
6997   LIBS="-lcrypto $LIBS"
6998
6999 else
7000   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7001 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7002    { (exit 1); exit 1; }; }
7003 fi
7004
7005
7006 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7007 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7008 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7009   echo $ECHO_N "(cached) $ECHO_C" >&6
7010 else
7011   ac_check_lib_save_LIBS=$LIBS
7012 LIBS="-lssl  $LIBS"
7013 cat >conftest.$ac_ext <<_ACEOF
7014 /* confdefs.h.  */
7015 _ACEOF
7016 cat confdefs.h >>conftest.$ac_ext
7017 cat >>conftest.$ac_ext <<_ACEOF
7018 /* end confdefs.h.  */
7019
7020 /* Override any gcc2 internal prototype to avoid an error.  */
7021 #ifdef __cplusplus
7022 extern "C"
7023 #endif
7024 /* We use char because int might match the return type of a gcc2
7025    builtin and then its argument prototype would still apply.  */
7026 char SSL_library_init ();
7027 int
7028 main ()
7029 {
7030 SSL_library_init ();
7031   ;
7032   return 0;
7033 }
7034 _ACEOF
7035 rm -f conftest.$ac_objext conftest$ac_exeext
7036 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7037   (eval $ac_link) 2>conftest.er1
7038   ac_status=$?
7039   grep -v '^ *+' conftest.er1 >conftest.err
7040   rm -f conftest.er1
7041   cat conftest.err >&5
7042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043   (exit $ac_status); } &&
7044          { ac_try='test -z "$ac_c_werror_flag"
7045                          || test ! -s conftest.err'
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); }; } &&
7051          { ac_try='test -s conftest$ac_exeext'
7052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7053   (eval $ac_try) 2>&5
7054   ac_status=$?
7055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7056   (exit $ac_status); }; }; then
7057   ac_cv_lib_ssl_SSL_library_init=yes
7058 else
7059   echo "$as_me: failed program was:" >&5
7060 sed 's/^/| /' conftest.$ac_ext >&5
7061
7062 ac_cv_lib_ssl_SSL_library_init=no
7063 fi
7064 rm -f conftest.err conftest.$ac_objext \
7065       conftest$ac_exeext conftest.$ac_ext
7066 LIBS=$ac_check_lib_save_LIBS
7067 fi
7068 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7069 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7070 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7071   cat >>confdefs.h <<_ACEOF
7072 #define HAVE_LIBSSL 1
7073 _ACEOF
7074
7075   LIBS="-lssl $LIBS"
7076
7077 else
7078   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7079 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7080    { (exit 1); exit 1; }; }
7081 fi
7082
7083   else
7084
7085 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7086 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7087 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7088   echo $ECHO_N "(cached) $ECHO_C" >&6
7089 else
7090   ac_check_lib_save_LIBS=$LIBS
7091 LIBS="-leay32  $LIBS"
7092 cat >conftest.$ac_ext <<_ACEOF
7093 /* confdefs.h.  */
7094 _ACEOF
7095 cat confdefs.h >>conftest.$ac_ext
7096 cat >>conftest.$ac_ext <<_ACEOF
7097 /* end confdefs.h.  */
7098
7099 /* Override any gcc2 internal prototype to avoid an error.  */
7100 #ifdef __cplusplus
7101 extern "C"
7102 #endif
7103 /* We use char because int might match the return type of a gcc2
7104    builtin and then its argument prototype would still apply.  */
7105 char CRYPTO_new_ex_data ();
7106 int
7107 main ()
7108 {
7109 CRYPTO_new_ex_data ();
7110   ;
7111   return 0;
7112 }
7113 _ACEOF
7114 rm -f conftest.$ac_objext conftest$ac_exeext
7115 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7116   (eval $ac_link) 2>conftest.er1
7117   ac_status=$?
7118   grep -v '^ *+' conftest.er1 >conftest.err
7119   rm -f conftest.er1
7120   cat conftest.err >&5
7121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122   (exit $ac_status); } &&
7123          { ac_try='test -z "$ac_c_werror_flag"
7124                          || test ! -s conftest.err'
7125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7126   (eval $ac_try) 2>&5
7127   ac_status=$?
7128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7129   (exit $ac_status); }; } &&
7130          { ac_try='test -s conftest$ac_exeext'
7131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7132   (eval $ac_try) 2>&5
7133   ac_status=$?
7134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135   (exit $ac_status); }; }; then
7136   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7137 else
7138   echo "$as_me: failed program was:" >&5
7139 sed 's/^/| /' conftest.$ac_ext >&5
7140
7141 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7142 fi
7143 rm -f conftest.err conftest.$ac_objext \
7144       conftest$ac_exeext conftest.$ac_ext
7145 LIBS=$ac_check_lib_save_LIBS
7146 fi
7147 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7148 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7149 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7150   cat >>confdefs.h <<_ACEOF
7151 #define HAVE_LIBEAY32 1
7152 _ACEOF
7153
7154   LIBS="-leay32 $LIBS"
7155
7156 else
7157   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7158 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7159    { (exit 1); exit 1; }; }
7160 fi
7161
7162
7163 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7164 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7165 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7166   echo $ECHO_N "(cached) $ECHO_C" >&6
7167 else
7168   ac_check_lib_save_LIBS=$LIBS
7169 LIBS="-lssleay32  $LIBS"
7170 cat >conftest.$ac_ext <<_ACEOF
7171 /* confdefs.h.  */
7172 _ACEOF
7173 cat confdefs.h >>conftest.$ac_ext
7174 cat >>conftest.$ac_ext <<_ACEOF
7175 /* end confdefs.h.  */
7176
7177 /* Override any gcc2 internal prototype to avoid an error.  */
7178 #ifdef __cplusplus
7179 extern "C"
7180 #endif
7181 /* We use char because int might match the return type of a gcc2
7182    builtin and then its argument prototype would still apply.  */
7183 char SSL_library_init ();
7184 int
7185 main ()
7186 {
7187 SSL_library_init ();
7188   ;
7189   return 0;
7190 }
7191 _ACEOF
7192 rm -f conftest.$ac_objext conftest$ac_exeext
7193 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7194   (eval $ac_link) 2>conftest.er1
7195   ac_status=$?
7196   grep -v '^ *+' conftest.er1 >conftest.err
7197   rm -f conftest.er1
7198   cat conftest.err >&5
7199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200   (exit $ac_status); } &&
7201          { ac_try='test -z "$ac_c_werror_flag"
7202                          || test ! -s conftest.err'
7203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7204   (eval $ac_try) 2>&5
7205   ac_status=$?
7206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7207   (exit $ac_status); }; } &&
7208          { ac_try='test -s conftest$ac_exeext'
7209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7210   (eval $ac_try) 2>&5
7211   ac_status=$?
7212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213   (exit $ac_status); }; }; then
7214   ac_cv_lib_ssleay32_SSL_library_init=yes
7215 else
7216   echo "$as_me: failed program was:" >&5
7217 sed 's/^/| /' conftest.$ac_ext >&5
7218
7219 ac_cv_lib_ssleay32_SSL_library_init=no
7220 fi
7221 rm -f conftest.err conftest.$ac_objext \
7222       conftest$ac_exeext conftest.$ac_ext
7223 LIBS=$ac_check_lib_save_LIBS
7224 fi
7225 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7226 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7227 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7228   cat >>confdefs.h <<_ACEOF
7229 #define HAVE_LIBSSLEAY32 1
7230 _ACEOF
7231
7232   LIBS="-lssleay32 $LIBS"
7233
7234 else
7235   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7236 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7237    { (exit 1); exit 1; }; }
7238 fi
7239
7240   fi
7241 fi
7242
7243 if test "$with_pam" = yes ; then
7244
7245 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7246 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7247 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7248   echo $ECHO_N "(cached) $ECHO_C" >&6
7249 else
7250   ac_check_lib_save_LIBS=$LIBS
7251 LIBS="-lpam  $LIBS"
7252 cat >conftest.$ac_ext <<_ACEOF
7253 /* confdefs.h.  */
7254 _ACEOF
7255 cat confdefs.h >>conftest.$ac_ext
7256 cat >>conftest.$ac_ext <<_ACEOF
7257 /* end confdefs.h.  */
7258
7259 /* Override any gcc2 internal prototype to avoid an error.  */
7260 #ifdef __cplusplus
7261 extern "C"
7262 #endif
7263 /* We use char because int might match the return type of a gcc2
7264    builtin and then its argument prototype would still apply.  */
7265 char pam_start ();
7266 int
7267 main ()
7268 {
7269 pam_start ();
7270   ;
7271   return 0;
7272 }
7273 _ACEOF
7274 rm -f conftest.$ac_objext conftest$ac_exeext
7275 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7276   (eval $ac_link) 2>conftest.er1
7277   ac_status=$?
7278   grep -v '^ *+' conftest.er1 >conftest.err
7279   rm -f conftest.er1
7280   cat conftest.err >&5
7281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7282   (exit $ac_status); } &&
7283          { ac_try='test -z "$ac_c_werror_flag"
7284                          || test ! -s conftest.err'
7285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7286   (eval $ac_try) 2>&5
7287   ac_status=$?
7288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7289   (exit $ac_status); }; } &&
7290          { ac_try='test -s conftest$ac_exeext'
7291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7292   (eval $ac_try) 2>&5
7293   ac_status=$?
7294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7295   (exit $ac_status); }; }; then
7296   ac_cv_lib_pam_pam_start=yes
7297 else
7298   echo "$as_me: failed program was:" >&5
7299 sed 's/^/| /' conftest.$ac_ext >&5
7300
7301 ac_cv_lib_pam_pam_start=no
7302 fi
7303 rm -f conftest.err conftest.$ac_objext \
7304       conftest$ac_exeext conftest.$ac_ext
7305 LIBS=$ac_check_lib_save_LIBS
7306 fi
7307 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7308 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7309 if test $ac_cv_lib_pam_pam_start = yes; then
7310   cat >>confdefs.h <<_ACEOF
7311 #define HAVE_LIBPAM 1
7312 _ACEOF
7313
7314   LIBS="-lpam $LIBS"
7315
7316 else
7317   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7318 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7319    { (exit 1); exit 1; }; }
7320 fi
7321
7322 fi
7323
7324
7325 ##
7326 ## Header files
7327 ##
7328
7329 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7330 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7331 if test "${ac_cv_header_stdc+set}" = set; then
7332   echo $ECHO_N "(cached) $ECHO_C" >&6
7333 else
7334   cat >conftest.$ac_ext <<_ACEOF
7335 /* confdefs.h.  */
7336 _ACEOF
7337 cat confdefs.h >>conftest.$ac_ext
7338 cat >>conftest.$ac_ext <<_ACEOF
7339 /* end confdefs.h.  */
7340 #include <stdlib.h>
7341 #include <stdarg.h>
7342 #include <string.h>
7343 #include <float.h>
7344
7345 int
7346 main ()
7347 {
7348
7349   ;
7350   return 0;
7351 }
7352 _ACEOF
7353 rm -f conftest.$ac_objext
7354 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7355   (eval $ac_compile) 2>conftest.er1
7356   ac_status=$?
7357   grep -v '^ *+' conftest.er1 >conftest.err
7358   rm -f conftest.er1
7359   cat conftest.err >&5
7360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7361   (exit $ac_status); } &&
7362          { ac_try='test -z "$ac_c_werror_flag"
7363                          || test ! -s conftest.err'
7364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7365   (eval $ac_try) 2>&5
7366   ac_status=$?
7367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7368   (exit $ac_status); }; } &&
7369          { ac_try='test -s conftest.$ac_objext'
7370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7371   (eval $ac_try) 2>&5
7372   ac_status=$?
7373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374   (exit $ac_status); }; }; then
7375   ac_cv_header_stdc=yes
7376 else
7377   echo "$as_me: failed program was:" >&5
7378 sed 's/^/| /' conftest.$ac_ext >&5
7379
7380 ac_cv_header_stdc=no
7381 fi
7382 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7383
7384 if test $ac_cv_header_stdc = yes; then
7385   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7386   cat >conftest.$ac_ext <<_ACEOF
7387 /* confdefs.h.  */
7388 _ACEOF
7389 cat confdefs.h >>conftest.$ac_ext
7390 cat >>conftest.$ac_ext <<_ACEOF
7391 /* end confdefs.h.  */
7392 #include <string.h>
7393
7394 _ACEOF
7395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7396   $EGREP "memchr" >/dev/null 2>&1; then
7397   :
7398 else
7399   ac_cv_header_stdc=no
7400 fi
7401 rm -f conftest*
7402
7403 fi
7404
7405 if test $ac_cv_header_stdc = yes; then
7406   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7407   cat >conftest.$ac_ext <<_ACEOF
7408 /* confdefs.h.  */
7409 _ACEOF
7410 cat confdefs.h >>conftest.$ac_ext
7411 cat >>conftest.$ac_ext <<_ACEOF
7412 /* end confdefs.h.  */
7413 #include <stdlib.h>
7414
7415 _ACEOF
7416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7417   $EGREP "free" >/dev/null 2>&1; then
7418   :
7419 else
7420   ac_cv_header_stdc=no
7421 fi
7422 rm -f conftest*
7423
7424 fi
7425
7426 if test $ac_cv_header_stdc = yes; then
7427   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7428   if test "$cross_compiling" = yes; then
7429   :
7430 else
7431   cat >conftest.$ac_ext <<_ACEOF
7432 /* confdefs.h.  */
7433 _ACEOF
7434 cat confdefs.h >>conftest.$ac_ext
7435 cat >>conftest.$ac_ext <<_ACEOF
7436 /* end confdefs.h.  */
7437 #include <ctype.h>
7438 #if ((' ' & 0x0FF) == 0x020)
7439 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7440 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7441 #else
7442 # define ISLOWER(c) \
7443                    (('a' <= (c) && (c) <= 'i') \
7444                      || ('j' <= (c) && (c) <= 'r') \
7445                      || ('s' <= (c) && (c) <= 'z'))
7446 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7447 #endif
7448
7449 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7450 int
7451 main ()
7452 {
7453   int i;
7454   for (i = 0; i < 256; i++)
7455     if (XOR (islower (i), ISLOWER (i))
7456         || toupper (i) != TOUPPER (i))
7457       exit(2);
7458   exit (0);
7459 }
7460 _ACEOF
7461 rm -f conftest$ac_exeext
7462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7463   (eval $ac_link) 2>&5
7464   ac_status=$?
7465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7466   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7468   (eval $ac_try) 2>&5
7469   ac_status=$?
7470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7471   (exit $ac_status); }; }; then
7472   :
7473 else
7474   echo "$as_me: program exited with status $ac_status" >&5
7475 echo "$as_me: failed program was:" >&5
7476 sed 's/^/| /' conftest.$ac_ext >&5
7477
7478 ( exit $ac_status )
7479 ac_cv_header_stdc=no
7480 fi
7481 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7482 fi
7483 fi
7484 fi
7485 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7486 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7487 if test $ac_cv_header_stdc = yes; then
7488
7489 cat >>confdefs.h <<\_ACEOF
7490 #define STDC_HEADERS 1
7491 _ACEOF
7492
7493 fi
7494
7495 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7506                   inttypes.h stdint.h unistd.h
7507 do
7508 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7509 echo "$as_me:$LINENO: checking for $ac_header" >&5
7510 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7511 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7512   echo $ECHO_N "(cached) $ECHO_C" >&6
7513 else
7514   cat >conftest.$ac_ext <<_ACEOF
7515 /* confdefs.h.  */
7516 _ACEOF
7517 cat confdefs.h >>conftest.$ac_ext
7518 cat >>conftest.$ac_ext <<_ACEOF
7519 /* end confdefs.h.  */
7520 $ac_includes_default
7521
7522 #include <$ac_header>
7523 _ACEOF
7524 rm -f conftest.$ac_objext
7525 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7526   (eval $ac_compile) 2>conftest.er1
7527   ac_status=$?
7528   grep -v '^ *+' conftest.er1 >conftest.err
7529   rm -f conftest.er1
7530   cat conftest.err >&5
7531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7532   (exit $ac_status); } &&
7533          { ac_try='test -z "$ac_c_werror_flag"
7534                          || test ! -s conftest.err'
7535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7536   (eval $ac_try) 2>&5
7537   ac_status=$?
7538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539   (exit $ac_status); }; } &&
7540          { ac_try='test -s conftest.$ac_objext'
7541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7542   (eval $ac_try) 2>&5
7543   ac_status=$?
7544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545   (exit $ac_status); }; }; then
7546   eval "$as_ac_Header=yes"
7547 else
7548   echo "$as_me: failed program was:" >&5
7549 sed 's/^/| /' conftest.$ac_ext >&5
7550
7551 eval "$as_ac_Header=no"
7552 fi
7553 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7554 fi
7555 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7556 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7557 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7558   cat >>confdefs.h <<_ACEOF
7559 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7560 _ACEOF
7561
7562 fi
7563
7564 done
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593 for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
7594 do
7595 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7596 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7597   echo "$as_me:$LINENO: checking for $ac_header" >&5
7598 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7599 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7600   echo $ECHO_N "(cached) $ECHO_C" >&6
7601 fi
7602 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7603 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7604 else
7605   # Is the header compilable?
7606 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7607 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7608 cat >conftest.$ac_ext <<_ACEOF
7609 /* confdefs.h.  */
7610 _ACEOF
7611 cat confdefs.h >>conftest.$ac_ext
7612 cat >>conftest.$ac_ext <<_ACEOF
7613 /* end confdefs.h.  */
7614 $ac_includes_default
7615 #include <$ac_header>
7616 _ACEOF
7617 rm -f conftest.$ac_objext
7618 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7619   (eval $ac_compile) 2>conftest.er1
7620   ac_status=$?
7621   grep -v '^ *+' conftest.er1 >conftest.err
7622   rm -f conftest.er1
7623   cat conftest.err >&5
7624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625   (exit $ac_status); } &&
7626          { ac_try='test -z "$ac_c_werror_flag"
7627                          || test ! -s conftest.err'
7628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7629   (eval $ac_try) 2>&5
7630   ac_status=$?
7631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632   (exit $ac_status); }; } &&
7633          { ac_try='test -s conftest.$ac_objext'
7634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7635   (eval $ac_try) 2>&5
7636   ac_status=$?
7637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638   (exit $ac_status); }; }; then
7639   ac_header_compiler=yes
7640 else
7641   echo "$as_me: failed program was:" >&5
7642 sed 's/^/| /' conftest.$ac_ext >&5
7643
7644 ac_header_compiler=no
7645 fi
7646 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7647 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7648 echo "${ECHO_T}$ac_header_compiler" >&6
7649
7650 # Is the header present?
7651 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7652 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7653 cat >conftest.$ac_ext <<_ACEOF
7654 /* confdefs.h.  */
7655 _ACEOF
7656 cat confdefs.h >>conftest.$ac_ext
7657 cat >>conftest.$ac_ext <<_ACEOF
7658 /* end confdefs.h.  */
7659 #include <$ac_header>
7660 _ACEOF
7661 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7662   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7663   ac_status=$?
7664   grep -v '^ *+' conftest.er1 >conftest.err
7665   rm -f conftest.er1
7666   cat conftest.err >&5
7667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7668   (exit $ac_status); } >/dev/null; then
7669   if test -s conftest.err; then
7670     ac_cpp_err=$ac_c_preproc_warn_flag
7671     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7672   else
7673     ac_cpp_err=
7674   fi
7675 else
7676   ac_cpp_err=yes
7677 fi
7678 if test -z "$ac_cpp_err"; then
7679   ac_header_preproc=yes
7680 else
7681   echo "$as_me: failed program was:" >&5
7682 sed 's/^/| /' conftest.$ac_ext >&5
7683
7684   ac_header_preproc=no
7685 fi
7686 rm -f conftest.err conftest.$ac_ext
7687 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7688 echo "${ECHO_T}$ac_header_preproc" >&6
7689
7690 # So?  What about this header?
7691 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7692   yes:no: )
7693     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7694 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7695     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7696 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7697     ac_header_preproc=yes
7698     ;;
7699   no:yes:* )
7700     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7701 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7702     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7703 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7704     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7705 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7706     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7707 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7708     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7709 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7710     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7711 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7712     (
7713       cat <<\_ASBOX
7714 ## ---------------------------------------- ##
7715 ## Report this to pgsql-bugs@postgresql.org ##
7716 ## ---------------------------------------- ##
7717 _ASBOX
7718     ) |
7719       sed "s/^/$as_me: WARNING:     /" >&2
7720     ;;
7721 esac
7722 echo "$as_me:$LINENO: checking for $ac_header" >&5
7723 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7724 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7725   echo $ECHO_N "(cached) $ECHO_C" >&6
7726 else
7727   eval "$as_ac_Header=\$ac_header_preproc"
7728 fi
7729 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7730 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7731
7732 fi
7733 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7734   cat >>confdefs.h <<_ACEOF
7735 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7736 _ACEOF
7737
7738 fi
7739
7740 done
7741
7742
7743 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7744 # netinet/in.h is included first.
7745
7746 for ac_header in netinet/in.h
7747 do
7748 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7750   echo "$as_me:$LINENO: checking for $ac_header" >&5
7751 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7752 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7753   echo $ECHO_N "(cached) $ECHO_C" >&6
7754 fi
7755 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7756 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7757 else
7758   # Is the header compilable?
7759 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7760 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7761 cat >conftest.$ac_ext <<_ACEOF
7762 /* confdefs.h.  */
7763 _ACEOF
7764 cat confdefs.h >>conftest.$ac_ext
7765 cat >>conftest.$ac_ext <<_ACEOF
7766 /* end confdefs.h.  */
7767 $ac_includes_default
7768 #include <$ac_header>
7769 _ACEOF
7770 rm -f conftest.$ac_objext
7771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7772   (eval $ac_compile) 2>conftest.er1
7773   ac_status=$?
7774   grep -v '^ *+' conftest.er1 >conftest.err
7775   rm -f conftest.er1
7776   cat conftest.err >&5
7777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778   (exit $ac_status); } &&
7779          { ac_try='test -z "$ac_c_werror_flag"
7780                          || test ! -s conftest.err'
7781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7782   (eval $ac_try) 2>&5
7783   ac_status=$?
7784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7785   (exit $ac_status); }; } &&
7786          { ac_try='test -s conftest.$ac_objext'
7787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7788   (eval $ac_try) 2>&5
7789   ac_status=$?
7790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7791   (exit $ac_status); }; }; then
7792   ac_header_compiler=yes
7793 else
7794   echo "$as_me: failed program was:" >&5
7795 sed 's/^/| /' conftest.$ac_ext >&5
7796
7797 ac_header_compiler=no
7798 fi
7799 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7800 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7801 echo "${ECHO_T}$ac_header_compiler" >&6
7802
7803 # Is the header present?
7804 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7805 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7806 cat >conftest.$ac_ext <<_ACEOF
7807 /* confdefs.h.  */
7808 _ACEOF
7809 cat confdefs.h >>conftest.$ac_ext
7810 cat >>conftest.$ac_ext <<_ACEOF
7811 /* end confdefs.h.  */
7812 #include <$ac_header>
7813 _ACEOF
7814 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7815   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7816   ac_status=$?
7817   grep -v '^ *+' conftest.er1 >conftest.err
7818   rm -f conftest.er1
7819   cat conftest.err >&5
7820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7821   (exit $ac_status); } >/dev/null; then
7822   if test -s conftest.err; then
7823     ac_cpp_err=$ac_c_preproc_warn_flag
7824     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7825   else
7826     ac_cpp_err=
7827   fi
7828 else
7829   ac_cpp_err=yes
7830 fi
7831 if test -z "$ac_cpp_err"; then
7832   ac_header_preproc=yes
7833 else
7834   echo "$as_me: failed program was:" >&5
7835 sed 's/^/| /' conftest.$ac_ext >&5
7836
7837   ac_header_preproc=no
7838 fi
7839 rm -f conftest.err conftest.$ac_ext
7840 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7841 echo "${ECHO_T}$ac_header_preproc" >&6
7842
7843 # So?  What about this header?
7844 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7845   yes:no: )
7846     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7847 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7848     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7849 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7850     ac_header_preproc=yes
7851     ;;
7852   no:yes:* )
7853     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7854 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7855     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7856 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7857     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7858 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7859     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7860 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7861     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7862 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7863     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7864 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7865     (
7866       cat <<\_ASBOX
7867 ## ---------------------------------------- ##
7868 ## Report this to pgsql-bugs@postgresql.org ##
7869 ## ---------------------------------------- ##
7870 _ASBOX
7871     ) |
7872       sed "s/^/$as_me: WARNING:     /" >&2
7873     ;;
7874 esac
7875 echo "$as_me:$LINENO: checking for $ac_header" >&5
7876 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7877 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7878   echo $ECHO_N "(cached) $ECHO_C" >&6
7879 else
7880   eval "$as_ac_Header=\$ac_header_preproc"
7881 fi
7882 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7883 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7884
7885 fi
7886 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7887   cat >>confdefs.h <<_ACEOF
7888 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7889 _ACEOF
7890
7891 fi
7892
7893 done
7894
7895
7896 for ac_header in netinet/tcp.h
7897 do
7898 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7899 echo "$as_me:$LINENO: checking for $ac_header" >&5
7900 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7901 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7902   echo $ECHO_N "(cached) $ECHO_C" >&6
7903 else
7904   cat >conftest.$ac_ext <<_ACEOF
7905 /* confdefs.h.  */
7906 _ACEOF
7907 cat confdefs.h >>conftest.$ac_ext
7908 cat >>conftest.$ac_ext <<_ACEOF
7909 /* end confdefs.h.  */
7910 $ac_includes_default
7911 #ifdef HAVE_NETINET_IN_H
7912 #include <netinet/in.h>
7913 #endif
7914
7915
7916 #include <$ac_header>
7917 _ACEOF
7918 rm -f conftest.$ac_objext
7919 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7920   (eval $ac_compile) 2>conftest.er1
7921   ac_status=$?
7922   grep -v '^ *+' conftest.er1 >conftest.err
7923   rm -f conftest.er1
7924   cat conftest.err >&5
7925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7926   (exit $ac_status); } &&
7927          { ac_try='test -z "$ac_c_werror_flag"
7928                          || test ! -s conftest.err'
7929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7930   (eval $ac_try) 2>&5
7931   ac_status=$?
7932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7933   (exit $ac_status); }; } &&
7934          { ac_try='test -s conftest.$ac_objext'
7935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7936   (eval $ac_try) 2>&5
7937   ac_status=$?
7938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7939   (exit $ac_status); }; }; then
7940   eval "$as_ac_Header=yes"
7941 else
7942   echo "$as_me: failed program was:" >&5
7943 sed 's/^/| /' conftest.$ac_ext >&5
7944
7945 eval "$as_ac_Header=no"
7946 fi
7947 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7948 fi
7949 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7950 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7951 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7952   cat >>confdefs.h <<_ACEOF
7953 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7954 _ACEOF
7955
7956 fi
7957
7958 done
7959
7960
7961 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
7962
7963 for ac_header in readline/readline.h
7964 do
7965 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7966 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7967   echo "$as_me:$LINENO: checking for $ac_header" >&5
7968 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7970   echo $ECHO_N "(cached) $ECHO_C" >&6
7971 fi
7972 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7973 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7974 else
7975   # Is the header compilable?
7976 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7977 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7978 cat >conftest.$ac_ext <<_ACEOF
7979 /* confdefs.h.  */
7980 _ACEOF
7981 cat confdefs.h >>conftest.$ac_ext
7982 cat >>conftest.$ac_ext <<_ACEOF
7983 /* end confdefs.h.  */
7984 $ac_includes_default
7985 #include <$ac_header>
7986 _ACEOF
7987 rm -f conftest.$ac_objext
7988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7989   (eval $ac_compile) 2>conftest.er1
7990   ac_status=$?
7991   grep -v '^ *+' conftest.er1 >conftest.err
7992   rm -f conftest.er1
7993   cat conftest.err >&5
7994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7995   (exit $ac_status); } &&
7996          { ac_try='test -z "$ac_c_werror_flag"
7997                          || test ! -s conftest.err'
7998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7999   (eval $ac_try) 2>&5
8000   ac_status=$?
8001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8002   (exit $ac_status); }; } &&
8003          { ac_try='test -s conftest.$ac_objext'
8004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8005   (eval $ac_try) 2>&5
8006   ac_status=$?
8007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8008   (exit $ac_status); }; }; then
8009   ac_header_compiler=yes
8010 else
8011   echo "$as_me: failed program was:" >&5
8012 sed 's/^/| /' conftest.$ac_ext >&5
8013
8014 ac_header_compiler=no
8015 fi
8016 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8017 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8018 echo "${ECHO_T}$ac_header_compiler" >&6
8019
8020 # Is the header present?
8021 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8022 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8023 cat >conftest.$ac_ext <<_ACEOF
8024 /* confdefs.h.  */
8025 _ACEOF
8026 cat confdefs.h >>conftest.$ac_ext
8027 cat >>conftest.$ac_ext <<_ACEOF
8028 /* end confdefs.h.  */
8029 #include <$ac_header>
8030 _ACEOF
8031 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8032   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8033   ac_status=$?
8034   grep -v '^ *+' conftest.er1 >conftest.err
8035   rm -f conftest.er1
8036   cat conftest.err >&5
8037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8038   (exit $ac_status); } >/dev/null; then
8039   if test -s conftest.err; then
8040     ac_cpp_err=$ac_c_preproc_warn_flag
8041     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8042   else
8043     ac_cpp_err=
8044   fi
8045 else
8046   ac_cpp_err=yes
8047 fi
8048 if test -z "$ac_cpp_err"; then
8049   ac_header_preproc=yes
8050 else
8051   echo "$as_me: failed program was:" >&5
8052 sed 's/^/| /' conftest.$ac_ext >&5
8053
8054   ac_header_preproc=no
8055 fi
8056 rm -f conftest.err conftest.$ac_ext
8057 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8058 echo "${ECHO_T}$ac_header_preproc" >&6
8059
8060 # So?  What about this header?
8061 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8062   yes:no: )
8063     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8064 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8065     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8066 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8067     ac_header_preproc=yes
8068     ;;
8069   no:yes:* )
8070     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8071 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8072     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8073 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8074     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8075 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8076     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8077 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8078     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8079 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8080     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8081 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8082     (
8083       cat <<\_ASBOX
8084 ## ---------------------------------------- ##
8085 ## Report this to pgsql-bugs@postgresql.org ##
8086 ## ---------------------------------------- ##
8087 _ASBOX
8088     ) |
8089       sed "s/^/$as_me: WARNING:     /" >&2
8090     ;;
8091 esac
8092 echo "$as_me:$LINENO: checking for $ac_header" >&5
8093 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8094 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8095   echo $ECHO_N "(cached) $ECHO_C" >&6
8096 else
8097   eval "$as_ac_Header=\$ac_header_preproc"
8098 fi
8099 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8100 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8101
8102 fi
8103 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8104   cat >>confdefs.h <<_ACEOF
8105 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8106 _ACEOF
8107
8108 else
8109
8110 for ac_header in readline.h
8111 do
8112 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8114   echo "$as_me:$LINENO: checking for $ac_header" >&5
8115 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8116 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8117   echo $ECHO_N "(cached) $ECHO_C" >&6
8118 fi
8119 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8120 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8121 else
8122   # Is the header compilable?
8123 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8124 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8125 cat >conftest.$ac_ext <<_ACEOF
8126 /* confdefs.h.  */
8127 _ACEOF
8128 cat confdefs.h >>conftest.$ac_ext
8129 cat >>conftest.$ac_ext <<_ACEOF
8130 /* end confdefs.h.  */
8131 $ac_includes_default
8132 #include <$ac_header>
8133 _ACEOF
8134 rm -f conftest.$ac_objext
8135 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8136   (eval $ac_compile) 2>conftest.er1
8137   ac_status=$?
8138   grep -v '^ *+' conftest.er1 >conftest.err
8139   rm -f conftest.er1
8140   cat conftest.err >&5
8141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142   (exit $ac_status); } &&
8143          { ac_try='test -z "$ac_c_werror_flag"
8144                          || test ! -s conftest.err'
8145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8146   (eval $ac_try) 2>&5
8147   ac_status=$?
8148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149   (exit $ac_status); }; } &&
8150          { ac_try='test -s conftest.$ac_objext'
8151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8152   (eval $ac_try) 2>&5
8153   ac_status=$?
8154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155   (exit $ac_status); }; }; then
8156   ac_header_compiler=yes
8157 else
8158   echo "$as_me: failed program was:" >&5
8159 sed 's/^/| /' conftest.$ac_ext >&5
8160
8161 ac_header_compiler=no
8162 fi
8163 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8164 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8165 echo "${ECHO_T}$ac_header_compiler" >&6
8166
8167 # Is the header present?
8168 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8169 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8170 cat >conftest.$ac_ext <<_ACEOF
8171 /* confdefs.h.  */
8172 _ACEOF
8173 cat confdefs.h >>conftest.$ac_ext
8174 cat >>conftest.$ac_ext <<_ACEOF
8175 /* end confdefs.h.  */
8176 #include <$ac_header>
8177 _ACEOF
8178 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8180   ac_status=$?
8181   grep -v '^ *+' conftest.er1 >conftest.err
8182   rm -f conftest.er1
8183   cat conftest.err >&5
8184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8185   (exit $ac_status); } >/dev/null; then
8186   if test -s conftest.err; then
8187     ac_cpp_err=$ac_c_preproc_warn_flag
8188     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8189   else
8190     ac_cpp_err=
8191   fi
8192 else
8193   ac_cpp_err=yes
8194 fi
8195 if test -z "$ac_cpp_err"; then
8196   ac_header_preproc=yes
8197 else
8198   echo "$as_me: failed program was:" >&5
8199 sed 's/^/| /' conftest.$ac_ext >&5
8200
8201   ac_header_preproc=no
8202 fi
8203 rm -f conftest.err conftest.$ac_ext
8204 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8205 echo "${ECHO_T}$ac_header_preproc" >&6
8206
8207 # So?  What about this header?
8208 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8209   yes:no: )
8210     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8211 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8212     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8213 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8214     ac_header_preproc=yes
8215     ;;
8216   no:yes:* )
8217     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8218 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8219     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8220 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8221     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8222 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8223     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8224 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8225     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8226 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8227     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8228 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8229     (
8230       cat <<\_ASBOX
8231 ## ---------------------------------------- ##
8232 ## Report this to pgsql-bugs@postgresql.org ##
8233 ## ---------------------------------------- ##
8234 _ASBOX
8235     ) |
8236       sed "s/^/$as_me: WARNING:     /" >&2
8237     ;;
8238 esac
8239 echo "$as_me:$LINENO: checking for $ac_header" >&5
8240 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8241 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8242   echo $ECHO_N "(cached) $ECHO_C" >&6
8243 else
8244   eval "$as_ac_Header=\$ac_header_preproc"
8245 fi
8246 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8247 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8248
8249 fi
8250 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8251   cat >>confdefs.h <<_ACEOF
8252 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8253 _ACEOF
8254
8255 else
8256   { { echo "$as_me:$LINENO: error: readline header not found
8257 If you have readline already installed, see config.log for details on the
8258 failure.  It is possible the compiler isn't looking in the proper directory.
8259 Use --without-readline to disable readline support." >&5
8260 echo "$as_me: error: readline header not found
8261 If you have readline already installed, see config.log for details on the
8262 failure.  It is possible the compiler isn't looking in the proper directory.
8263 Use --without-readline to disable readline support." >&2;}
8264    { (exit 1); exit 1; }; }
8265 fi
8266
8267 done
8268
8269 fi
8270
8271 done
8272
8273
8274 for ac_header in readline/history.h
8275 do
8276 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8277 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8278   echo "$as_me:$LINENO: checking for $ac_header" >&5
8279 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8280 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8281   echo $ECHO_N "(cached) $ECHO_C" >&6
8282 fi
8283 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8284 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8285 else
8286   # Is the header compilable?
8287 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8288 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8289 cat >conftest.$ac_ext <<_ACEOF
8290 /* confdefs.h.  */
8291 _ACEOF
8292 cat confdefs.h >>conftest.$ac_ext
8293 cat >>conftest.$ac_ext <<_ACEOF
8294 /* end confdefs.h.  */
8295 $ac_includes_default
8296 #include <$ac_header>
8297 _ACEOF
8298 rm -f conftest.$ac_objext
8299 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8300   (eval $ac_compile) 2>conftest.er1
8301   ac_status=$?
8302   grep -v '^ *+' conftest.er1 >conftest.err
8303   rm -f conftest.er1
8304   cat conftest.err >&5
8305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8306   (exit $ac_status); } &&
8307          { ac_try='test -z "$ac_c_werror_flag"
8308                          || test ! -s conftest.err'
8309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8310   (eval $ac_try) 2>&5
8311   ac_status=$?
8312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8313   (exit $ac_status); }; } &&
8314          { ac_try='test -s conftest.$ac_objext'
8315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8316   (eval $ac_try) 2>&5
8317   ac_status=$?
8318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8319   (exit $ac_status); }; }; then
8320   ac_header_compiler=yes
8321 else
8322   echo "$as_me: failed program was:" >&5
8323 sed 's/^/| /' conftest.$ac_ext >&5
8324
8325 ac_header_compiler=no
8326 fi
8327 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8328 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8329 echo "${ECHO_T}$ac_header_compiler" >&6
8330
8331 # Is the header present?
8332 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8333 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8334 cat >conftest.$ac_ext <<_ACEOF
8335 /* confdefs.h.  */
8336 _ACEOF
8337 cat confdefs.h >>conftest.$ac_ext
8338 cat >>conftest.$ac_ext <<_ACEOF
8339 /* end confdefs.h.  */
8340 #include <$ac_header>
8341 _ACEOF
8342 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8343   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8344   ac_status=$?
8345   grep -v '^ *+' conftest.er1 >conftest.err
8346   rm -f conftest.er1
8347   cat conftest.err >&5
8348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349   (exit $ac_status); } >/dev/null; then
8350   if test -s conftest.err; then
8351     ac_cpp_err=$ac_c_preproc_warn_flag
8352     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8353   else
8354     ac_cpp_err=
8355   fi
8356 else
8357   ac_cpp_err=yes
8358 fi
8359 if test -z "$ac_cpp_err"; then
8360   ac_header_preproc=yes
8361 else
8362   echo "$as_me: failed program was:" >&5
8363 sed 's/^/| /' conftest.$ac_ext >&5
8364
8365   ac_header_preproc=no
8366 fi
8367 rm -f conftest.err conftest.$ac_ext
8368 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8369 echo "${ECHO_T}$ac_header_preproc" >&6
8370
8371 # So?  What about this header?
8372 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8373   yes:no: )
8374     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8375 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8376     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8377 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8378     ac_header_preproc=yes
8379     ;;
8380   no:yes:* )
8381     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8382 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8383     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8384 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8385     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8386 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8387     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8388 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8389     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8390 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8391     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8392 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8393     (
8394       cat <<\_ASBOX
8395 ## ---------------------------------------- ##
8396 ## Report this to pgsql-bugs@postgresql.org ##
8397 ## ---------------------------------------- ##
8398 _ASBOX
8399     ) |
8400       sed "s/^/$as_me: WARNING:     /" >&2
8401     ;;
8402 esac
8403 echo "$as_me:$LINENO: checking for $ac_header" >&5
8404 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8405 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8406   echo $ECHO_N "(cached) $ECHO_C" >&6
8407 else
8408   eval "$as_ac_Header=\$ac_header_preproc"
8409 fi
8410 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8411 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8412
8413 fi
8414 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8415   cat >>confdefs.h <<_ACEOF
8416 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8417 _ACEOF
8418
8419 else
8420
8421 for ac_header in history.h
8422 do
8423 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8424 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8425   echo "$as_me:$LINENO: checking for $ac_header" >&5
8426 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8427 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8428   echo $ECHO_N "(cached) $ECHO_C" >&6
8429 fi
8430 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8431 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8432 else
8433   # Is the header compilable?
8434 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8435 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8436 cat >conftest.$ac_ext <<_ACEOF
8437 /* confdefs.h.  */
8438 _ACEOF
8439 cat confdefs.h >>conftest.$ac_ext
8440 cat >>conftest.$ac_ext <<_ACEOF
8441 /* end confdefs.h.  */
8442 $ac_includes_default
8443 #include <$ac_header>
8444 _ACEOF
8445 rm -f conftest.$ac_objext
8446 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8447   (eval $ac_compile) 2>conftest.er1
8448   ac_status=$?
8449   grep -v '^ *+' conftest.er1 >conftest.err
8450   rm -f conftest.er1
8451   cat conftest.err >&5
8452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8453   (exit $ac_status); } &&
8454          { ac_try='test -z "$ac_c_werror_flag"
8455                          || test ! -s conftest.err'
8456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8457   (eval $ac_try) 2>&5
8458   ac_status=$?
8459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8460   (exit $ac_status); }; } &&
8461          { ac_try='test -s conftest.$ac_objext'
8462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8463   (eval $ac_try) 2>&5
8464   ac_status=$?
8465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466   (exit $ac_status); }; }; then
8467   ac_header_compiler=yes
8468 else
8469   echo "$as_me: failed program was:" >&5
8470 sed 's/^/| /' conftest.$ac_ext >&5
8471
8472 ac_header_compiler=no
8473 fi
8474 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8475 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8476 echo "${ECHO_T}$ac_header_compiler" >&6
8477
8478 # Is the header present?
8479 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8480 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8481 cat >conftest.$ac_ext <<_ACEOF
8482 /* confdefs.h.  */
8483 _ACEOF
8484 cat confdefs.h >>conftest.$ac_ext
8485 cat >>conftest.$ac_ext <<_ACEOF
8486 /* end confdefs.h.  */
8487 #include <$ac_header>
8488 _ACEOF
8489 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8490   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8491   ac_status=$?
8492   grep -v '^ *+' conftest.er1 >conftest.err
8493   rm -f conftest.er1
8494   cat conftest.err >&5
8495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496   (exit $ac_status); } >/dev/null; then
8497   if test -s conftest.err; then
8498     ac_cpp_err=$ac_c_preproc_warn_flag
8499     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8500   else
8501     ac_cpp_err=
8502   fi
8503 else
8504   ac_cpp_err=yes
8505 fi
8506 if test -z "$ac_cpp_err"; then
8507   ac_header_preproc=yes
8508 else
8509   echo "$as_me: failed program was:" >&5
8510 sed 's/^/| /' conftest.$ac_ext >&5
8511
8512   ac_header_preproc=no
8513 fi
8514 rm -f conftest.err conftest.$ac_ext
8515 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8516 echo "${ECHO_T}$ac_header_preproc" >&6
8517
8518 # So?  What about this header?
8519 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8520   yes:no: )
8521     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8522 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8523     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8524 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8525     ac_header_preproc=yes
8526     ;;
8527   no:yes:* )
8528     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8529 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8530     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8531 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8532     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8533 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8534     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8535 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8536     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8537 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8538     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8539 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8540     (
8541       cat <<\_ASBOX
8542 ## ---------------------------------------- ##
8543 ## Report this to pgsql-bugs@postgresql.org ##
8544 ## ---------------------------------------- ##
8545 _ASBOX
8546     ) |
8547       sed "s/^/$as_me: WARNING:     /" >&2
8548     ;;
8549 esac
8550 echo "$as_me:$LINENO: checking for $ac_header" >&5
8551 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8552 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8553   echo $ECHO_N "(cached) $ECHO_C" >&6
8554 else
8555   eval "$as_ac_Header=\$ac_header_preproc"
8556 fi
8557 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8558 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8559
8560 fi
8561 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8562   cat >>confdefs.h <<_ACEOF
8563 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8564 _ACEOF
8565
8566 else
8567   { { echo "$as_me:$LINENO: error: history header not found
8568 If you have readline already installed, see config.log for details on the
8569 failure.  It is possible the compiler isn't looking in the proper directory.
8570 Use --without-readline to disable readline support." >&5
8571 echo "$as_me: error: history header not found
8572 If you have readline already installed, see config.log for details on the
8573 failure.  It is possible the compiler isn't looking in the proper directory.
8574 Use --without-readline to disable readline support." >&2;}
8575    { (exit 1); exit 1; }; }
8576 fi
8577
8578 done
8579
8580 fi
8581
8582 done
8583
8584 fi
8585
8586 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8587 # Some installations of libedit usurp /usr/include/readline/, which seems
8588 # bad practice, since in combined installations readline will have its headers
8589 # there.  We might have to resort to AC_EGREP checks to make sure we found
8590 # the proper header...
8591
8592 for ac_header in editline/readline.h
8593 do
8594 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8596   echo "$as_me:$LINENO: checking for $ac_header" >&5
8597 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8598 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8599   echo $ECHO_N "(cached) $ECHO_C" >&6
8600 fi
8601 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8602 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8603 else
8604   # Is the header compilable?
8605 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8606 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8607 cat >conftest.$ac_ext <<_ACEOF
8608 /* confdefs.h.  */
8609 _ACEOF
8610 cat confdefs.h >>conftest.$ac_ext
8611 cat >>conftest.$ac_ext <<_ACEOF
8612 /* end confdefs.h.  */
8613 $ac_includes_default
8614 #include <$ac_header>
8615 _ACEOF
8616 rm -f conftest.$ac_objext
8617 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8618   (eval $ac_compile) 2>conftest.er1
8619   ac_status=$?
8620   grep -v '^ *+' conftest.er1 >conftest.err
8621   rm -f conftest.er1
8622   cat conftest.err >&5
8623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8624   (exit $ac_status); } &&
8625          { ac_try='test -z "$ac_c_werror_flag"
8626                          || test ! -s conftest.err'
8627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8628   (eval $ac_try) 2>&5
8629   ac_status=$?
8630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8631   (exit $ac_status); }; } &&
8632          { ac_try='test -s conftest.$ac_objext'
8633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8634   (eval $ac_try) 2>&5
8635   ac_status=$?
8636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8637   (exit $ac_status); }; }; then
8638   ac_header_compiler=yes
8639 else
8640   echo "$as_me: failed program was:" >&5
8641 sed 's/^/| /' conftest.$ac_ext >&5
8642
8643 ac_header_compiler=no
8644 fi
8645 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8646 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8647 echo "${ECHO_T}$ac_header_compiler" >&6
8648
8649 # Is the header present?
8650 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8651 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8652 cat >conftest.$ac_ext <<_ACEOF
8653 /* confdefs.h.  */
8654 _ACEOF
8655 cat confdefs.h >>conftest.$ac_ext
8656 cat >>conftest.$ac_ext <<_ACEOF
8657 /* end confdefs.h.  */
8658 #include <$ac_header>
8659 _ACEOF
8660 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8662   ac_status=$?
8663   grep -v '^ *+' conftest.er1 >conftest.err
8664   rm -f conftest.er1
8665   cat conftest.err >&5
8666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667   (exit $ac_status); } >/dev/null; then
8668   if test -s conftest.err; then
8669     ac_cpp_err=$ac_c_preproc_warn_flag
8670     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8671   else
8672     ac_cpp_err=
8673   fi
8674 else
8675   ac_cpp_err=yes
8676 fi
8677 if test -z "$ac_cpp_err"; then
8678   ac_header_preproc=yes
8679 else
8680   echo "$as_me: failed program was:" >&5
8681 sed 's/^/| /' conftest.$ac_ext >&5
8682
8683   ac_header_preproc=no
8684 fi
8685 rm -f conftest.err conftest.$ac_ext
8686 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8687 echo "${ECHO_T}$ac_header_preproc" >&6
8688
8689 # So?  What about this header?
8690 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8691   yes:no: )
8692     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8693 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8694     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8695 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8696     ac_header_preproc=yes
8697     ;;
8698   no:yes:* )
8699     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8700 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8701     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8702 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8703     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8704 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8705     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8706 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8707     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8708 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8709     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8710 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8711     (
8712       cat <<\_ASBOX
8713 ## ---------------------------------------- ##
8714 ## Report this to pgsql-bugs@postgresql.org ##
8715 ## ---------------------------------------- ##
8716 _ASBOX
8717     ) |
8718       sed "s/^/$as_me: WARNING:     /" >&2
8719     ;;
8720 esac
8721 echo "$as_me:$LINENO: checking for $ac_header" >&5
8722 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8723 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8724   echo $ECHO_N "(cached) $ECHO_C" >&6
8725 else
8726   eval "$as_ac_Header=\$ac_header_preproc"
8727 fi
8728 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8729 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8730
8731 fi
8732 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8733   cat >>confdefs.h <<_ACEOF
8734 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8735 _ACEOF
8736
8737 else
8738
8739 for ac_header in readline.h
8740 do
8741 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8742 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8743   echo "$as_me:$LINENO: checking for $ac_header" >&5
8744 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8745 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8746   echo $ECHO_N "(cached) $ECHO_C" >&6
8747 fi
8748 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8749 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8750 else
8751   # Is the header compilable?
8752 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8753 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8754 cat >conftest.$ac_ext <<_ACEOF
8755 /* confdefs.h.  */
8756 _ACEOF
8757 cat confdefs.h >>conftest.$ac_ext
8758 cat >>conftest.$ac_ext <<_ACEOF
8759 /* end confdefs.h.  */
8760 $ac_includes_default
8761 #include <$ac_header>
8762 _ACEOF
8763 rm -f conftest.$ac_objext
8764 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8765   (eval $ac_compile) 2>conftest.er1
8766   ac_status=$?
8767   grep -v '^ *+' conftest.er1 >conftest.err
8768   rm -f conftest.er1
8769   cat conftest.err >&5
8770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8771   (exit $ac_status); } &&
8772          { ac_try='test -z "$ac_c_werror_flag"
8773                          || test ! -s conftest.err'
8774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8775   (eval $ac_try) 2>&5
8776   ac_status=$?
8777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8778   (exit $ac_status); }; } &&
8779          { ac_try='test -s conftest.$ac_objext'
8780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8781   (eval $ac_try) 2>&5
8782   ac_status=$?
8783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8784   (exit $ac_status); }; }; then
8785   ac_header_compiler=yes
8786 else
8787   echo "$as_me: failed program was:" >&5
8788 sed 's/^/| /' conftest.$ac_ext >&5
8789
8790 ac_header_compiler=no
8791 fi
8792 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8793 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8794 echo "${ECHO_T}$ac_header_compiler" >&6
8795
8796 # Is the header present?
8797 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8798 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8799 cat >conftest.$ac_ext <<_ACEOF
8800 /* confdefs.h.  */
8801 _ACEOF
8802 cat confdefs.h >>conftest.$ac_ext
8803 cat >>conftest.$ac_ext <<_ACEOF
8804 /* end confdefs.h.  */
8805 #include <$ac_header>
8806 _ACEOF
8807 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8808   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8809   ac_status=$?
8810   grep -v '^ *+' conftest.er1 >conftest.err
8811   rm -f conftest.er1
8812   cat conftest.err >&5
8813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8814   (exit $ac_status); } >/dev/null; then
8815   if test -s conftest.err; then
8816     ac_cpp_err=$ac_c_preproc_warn_flag
8817     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8818   else
8819     ac_cpp_err=
8820   fi
8821 else
8822   ac_cpp_err=yes
8823 fi
8824 if test -z "$ac_cpp_err"; then
8825   ac_header_preproc=yes
8826 else
8827   echo "$as_me: failed program was:" >&5
8828 sed 's/^/| /' conftest.$ac_ext >&5
8829
8830   ac_header_preproc=no
8831 fi
8832 rm -f conftest.err conftest.$ac_ext
8833 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8834 echo "${ECHO_T}$ac_header_preproc" >&6
8835
8836 # So?  What about this header?
8837 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8838   yes:no: )
8839     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8840 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8841     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8842 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8843     ac_header_preproc=yes
8844     ;;
8845   no:yes:* )
8846     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8847 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8848     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8849 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8850     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8851 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8852     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8853 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8854     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8855 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8856     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8857 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8858     (
8859       cat <<\_ASBOX
8860 ## ---------------------------------------- ##
8861 ## Report this to pgsql-bugs@postgresql.org ##
8862 ## ---------------------------------------- ##
8863 _ASBOX
8864     ) |
8865       sed "s/^/$as_me: WARNING:     /" >&2
8866     ;;
8867 esac
8868 echo "$as_me:$LINENO: checking for $ac_header" >&5
8869 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8870 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8871   echo $ECHO_N "(cached) $ECHO_C" >&6
8872 else
8873   eval "$as_ac_Header=\$ac_header_preproc"
8874 fi
8875 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8876 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8877
8878 fi
8879 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8880   cat >>confdefs.h <<_ACEOF
8881 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8882 _ACEOF
8883
8884 else
8885
8886 for ac_header in readline/readline.h
8887 do
8888 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8889 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8890   echo "$as_me:$LINENO: checking for $ac_header" >&5
8891 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8892 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8893   echo $ECHO_N "(cached) $ECHO_C" >&6
8894 fi
8895 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8896 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8897 else
8898   # Is the header compilable?
8899 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8900 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8901 cat >conftest.$ac_ext <<_ACEOF
8902 /* confdefs.h.  */
8903 _ACEOF
8904 cat confdefs.h >>conftest.$ac_ext
8905 cat >>conftest.$ac_ext <<_ACEOF
8906 /* end confdefs.h.  */
8907 $ac_includes_default
8908 #include <$ac_header>
8909 _ACEOF
8910 rm -f conftest.$ac_objext
8911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8912   (eval $ac_compile) 2>conftest.er1
8913   ac_status=$?
8914   grep -v '^ *+' conftest.er1 >conftest.err
8915   rm -f conftest.er1
8916   cat conftest.err >&5
8917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918   (exit $ac_status); } &&
8919          { ac_try='test -z "$ac_c_werror_flag"
8920                          || test ! -s conftest.err'
8921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8922   (eval $ac_try) 2>&5
8923   ac_status=$?
8924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925   (exit $ac_status); }; } &&
8926          { ac_try='test -s conftest.$ac_objext'
8927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8928   (eval $ac_try) 2>&5
8929   ac_status=$?
8930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931   (exit $ac_status); }; }; then
8932   ac_header_compiler=yes
8933 else
8934   echo "$as_me: failed program was:" >&5
8935 sed 's/^/| /' conftest.$ac_ext >&5
8936
8937 ac_header_compiler=no
8938 fi
8939 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8940 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8941 echo "${ECHO_T}$ac_header_compiler" >&6
8942
8943 # Is the header present?
8944 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8945 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8946 cat >conftest.$ac_ext <<_ACEOF
8947 /* confdefs.h.  */
8948 _ACEOF
8949 cat confdefs.h >>conftest.$ac_ext
8950 cat >>conftest.$ac_ext <<_ACEOF
8951 /* end confdefs.h.  */
8952 #include <$ac_header>
8953 _ACEOF
8954 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8955   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8956   ac_status=$?
8957   grep -v '^ *+' conftest.er1 >conftest.err
8958   rm -f conftest.er1
8959   cat conftest.err >&5
8960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8961   (exit $ac_status); } >/dev/null; then
8962   if test -s conftest.err; then
8963     ac_cpp_err=$ac_c_preproc_warn_flag
8964     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8965   else
8966     ac_cpp_err=
8967   fi
8968 else
8969   ac_cpp_err=yes
8970 fi
8971 if test -z "$ac_cpp_err"; then
8972   ac_header_preproc=yes
8973 else
8974   echo "$as_me: failed program was:" >&5
8975 sed 's/^/| /' conftest.$ac_ext >&5
8976
8977   ac_header_preproc=no
8978 fi
8979 rm -f conftest.err conftest.$ac_ext
8980 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8981 echo "${ECHO_T}$ac_header_preproc" >&6
8982
8983 # So?  What about this header?
8984 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8985   yes:no: )
8986     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8987 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8988     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8989 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8990     ac_header_preproc=yes
8991     ;;
8992   no:yes:* )
8993     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8994 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8995     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8996 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8997     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8998 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8999     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9000 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9001     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9002 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9003     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9004 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9005     (
9006       cat <<\_ASBOX
9007 ## ---------------------------------------- ##
9008 ## Report this to pgsql-bugs@postgresql.org ##
9009 ## ---------------------------------------- ##
9010 _ASBOX
9011     ) |
9012       sed "s/^/$as_me: WARNING:     /" >&2
9013     ;;
9014 esac
9015 echo "$as_me:$LINENO: checking for $ac_header" >&5
9016 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9017 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9018   echo $ECHO_N "(cached) $ECHO_C" >&6
9019 else
9020   eval "$as_ac_Header=\$ac_header_preproc"
9021 fi
9022 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9023 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9024
9025 fi
9026 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9027   cat >>confdefs.h <<_ACEOF
9028 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9029 _ACEOF
9030
9031 else
9032   { { echo "$as_me:$LINENO: error: readline header not found
9033 If you have libedit already installed, see config.log for details on the
9034 failure.  It is possible the compiler isn't looking in the proper directory.
9035 Use --without-readline to disable libedit support." >&5
9036 echo "$as_me: error: readline header not found
9037 If you have libedit already installed, see config.log for details on the
9038 failure.  It is possible the compiler isn't looking in the proper directory.
9039 Use --without-readline to disable libedit support." >&2;}
9040    { (exit 1); exit 1; }; }
9041 fi
9042
9043 done
9044
9045 fi
9046
9047 done
9048
9049 fi
9050
9051 done
9052
9053 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9054 # not be there at all.  Hence, don't complain if not found.  We must check
9055 # though, since in yet other versions it is an independent header.
9056
9057 for ac_header in editline/history.h
9058 do
9059 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9060 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9061   echo "$as_me:$LINENO: checking for $ac_header" >&5
9062 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9063 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9064   echo $ECHO_N "(cached) $ECHO_C" >&6
9065 fi
9066 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9067 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9068 else
9069   # Is the header compilable?
9070 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9071 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9072 cat >conftest.$ac_ext <<_ACEOF
9073 /* confdefs.h.  */
9074 _ACEOF
9075 cat confdefs.h >>conftest.$ac_ext
9076 cat >>conftest.$ac_ext <<_ACEOF
9077 /* end confdefs.h.  */
9078 $ac_includes_default
9079 #include <$ac_header>
9080 _ACEOF
9081 rm -f conftest.$ac_objext
9082 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9083   (eval $ac_compile) 2>conftest.er1
9084   ac_status=$?
9085   grep -v '^ *+' conftest.er1 >conftest.err
9086   rm -f conftest.er1
9087   cat conftest.err >&5
9088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9089   (exit $ac_status); } &&
9090          { ac_try='test -z "$ac_c_werror_flag"
9091                          || test ! -s conftest.err'
9092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9093   (eval $ac_try) 2>&5
9094   ac_status=$?
9095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9096   (exit $ac_status); }; } &&
9097          { ac_try='test -s conftest.$ac_objext'
9098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9099   (eval $ac_try) 2>&5
9100   ac_status=$?
9101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9102   (exit $ac_status); }; }; then
9103   ac_header_compiler=yes
9104 else
9105   echo "$as_me: failed program was:" >&5
9106 sed 's/^/| /' conftest.$ac_ext >&5
9107
9108 ac_header_compiler=no
9109 fi
9110 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9111 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9112 echo "${ECHO_T}$ac_header_compiler" >&6
9113
9114 # Is the header present?
9115 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9116 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9117 cat >conftest.$ac_ext <<_ACEOF
9118 /* confdefs.h.  */
9119 _ACEOF
9120 cat confdefs.h >>conftest.$ac_ext
9121 cat >>conftest.$ac_ext <<_ACEOF
9122 /* end confdefs.h.  */
9123 #include <$ac_header>
9124 _ACEOF
9125 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9126   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9127   ac_status=$?
9128   grep -v '^ *+' conftest.er1 >conftest.err
9129   rm -f conftest.er1
9130   cat conftest.err >&5
9131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9132   (exit $ac_status); } >/dev/null; then
9133   if test -s conftest.err; then
9134     ac_cpp_err=$ac_c_preproc_warn_flag
9135     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9136   else
9137     ac_cpp_err=
9138   fi
9139 else
9140   ac_cpp_err=yes
9141 fi
9142 if test -z "$ac_cpp_err"; then
9143   ac_header_preproc=yes
9144 else
9145   echo "$as_me: failed program was:" >&5
9146 sed 's/^/| /' conftest.$ac_ext >&5
9147
9148   ac_header_preproc=no
9149 fi
9150 rm -f conftest.err conftest.$ac_ext
9151 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9152 echo "${ECHO_T}$ac_header_preproc" >&6
9153
9154 # So?  What about this header?
9155 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9156   yes:no: )
9157     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9158 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9159     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9160 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9161     ac_header_preproc=yes
9162     ;;
9163   no:yes:* )
9164     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9165 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9166     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9167 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9168     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9169 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9170     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9171 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9172     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9173 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9174     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9175 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9176     (
9177       cat <<\_ASBOX
9178 ## ---------------------------------------- ##
9179 ## Report this to pgsql-bugs@postgresql.org ##
9180 ## ---------------------------------------- ##
9181 _ASBOX
9182     ) |
9183       sed "s/^/$as_me: WARNING:     /" >&2
9184     ;;
9185 esac
9186 echo "$as_me:$LINENO: checking for $ac_header" >&5
9187 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9189   echo $ECHO_N "(cached) $ECHO_C" >&6
9190 else
9191   eval "$as_ac_Header=\$ac_header_preproc"
9192 fi
9193 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9194 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9195
9196 fi
9197 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9198   cat >>confdefs.h <<_ACEOF
9199 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9200 _ACEOF
9201
9202 else
9203
9204 for ac_header in history.h
9205 do
9206 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9207 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9208   echo "$as_me:$LINENO: checking for $ac_header" >&5
9209 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9210 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9211   echo $ECHO_N "(cached) $ECHO_C" >&6
9212 fi
9213 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9214 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9215 else
9216   # Is the header compilable?
9217 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9218 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9219 cat >conftest.$ac_ext <<_ACEOF
9220 /* confdefs.h.  */
9221 _ACEOF
9222 cat confdefs.h >>conftest.$ac_ext
9223 cat >>conftest.$ac_ext <<_ACEOF
9224 /* end confdefs.h.  */
9225 $ac_includes_default
9226 #include <$ac_header>
9227 _ACEOF
9228 rm -f conftest.$ac_objext
9229 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9230   (eval $ac_compile) 2>conftest.er1
9231   ac_status=$?
9232   grep -v '^ *+' conftest.er1 >conftest.err
9233   rm -f conftest.er1
9234   cat conftest.err >&5
9235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236   (exit $ac_status); } &&
9237          { ac_try='test -z "$ac_c_werror_flag"
9238                          || test ! -s conftest.err'
9239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9240   (eval $ac_try) 2>&5
9241   ac_status=$?
9242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243   (exit $ac_status); }; } &&
9244          { ac_try='test -s conftest.$ac_objext'
9245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9246   (eval $ac_try) 2>&5
9247   ac_status=$?
9248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9249   (exit $ac_status); }; }; then
9250   ac_header_compiler=yes
9251 else
9252   echo "$as_me: failed program was:" >&5
9253 sed 's/^/| /' conftest.$ac_ext >&5
9254
9255 ac_header_compiler=no
9256 fi
9257 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9258 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9259 echo "${ECHO_T}$ac_header_compiler" >&6
9260
9261 # Is the header present?
9262 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9263 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9264 cat >conftest.$ac_ext <<_ACEOF
9265 /* confdefs.h.  */
9266 _ACEOF
9267 cat confdefs.h >>conftest.$ac_ext
9268 cat >>conftest.$ac_ext <<_ACEOF
9269 /* end confdefs.h.  */
9270 #include <$ac_header>
9271 _ACEOF
9272 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9273   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9274   ac_status=$?
9275   grep -v '^ *+' conftest.er1 >conftest.err
9276   rm -f conftest.er1
9277   cat conftest.err >&5
9278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9279   (exit $ac_status); } >/dev/null; then
9280   if test -s conftest.err; then
9281     ac_cpp_err=$ac_c_preproc_warn_flag
9282     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9283   else
9284     ac_cpp_err=
9285   fi
9286 else
9287   ac_cpp_err=yes
9288 fi
9289 if test -z "$ac_cpp_err"; then
9290   ac_header_preproc=yes
9291 else
9292   echo "$as_me: failed program was:" >&5
9293 sed 's/^/| /' conftest.$ac_ext >&5
9294
9295   ac_header_preproc=no
9296 fi
9297 rm -f conftest.err conftest.$ac_ext
9298 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9299 echo "${ECHO_T}$ac_header_preproc" >&6
9300
9301 # So?  What about this header?
9302 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9303   yes:no: )
9304     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9305 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9306     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9307 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9308     ac_header_preproc=yes
9309     ;;
9310   no:yes:* )
9311     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9312 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9313     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9314 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9315     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9316 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9317     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9318 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9319     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9320 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9321     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9322 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9323     (
9324       cat <<\_ASBOX
9325 ## ---------------------------------------- ##
9326 ## Report this to pgsql-bugs@postgresql.org ##
9327 ## ---------------------------------------- ##
9328 _ASBOX
9329     ) |
9330       sed "s/^/$as_me: WARNING:     /" >&2
9331     ;;
9332 esac
9333 echo "$as_me:$LINENO: checking for $ac_header" >&5
9334 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9335 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9336   echo $ECHO_N "(cached) $ECHO_C" >&6
9337 else
9338   eval "$as_ac_Header=\$ac_header_preproc"
9339 fi
9340 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9341 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9342
9343 fi
9344 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9345   cat >>confdefs.h <<_ACEOF
9346 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9347 _ACEOF
9348
9349 else
9350
9351 for ac_header in readline/history.h
9352 do
9353 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9354 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9355   echo "$as_me:$LINENO: checking for $ac_header" >&5
9356 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9357 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9358   echo $ECHO_N "(cached) $ECHO_C" >&6
9359 fi
9360 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9362 else
9363   # Is the header compilable?
9364 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9365 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9366 cat >conftest.$ac_ext <<_ACEOF
9367 /* confdefs.h.  */
9368 _ACEOF
9369 cat confdefs.h >>conftest.$ac_ext
9370 cat >>conftest.$ac_ext <<_ACEOF
9371 /* end confdefs.h.  */
9372 $ac_includes_default
9373 #include <$ac_header>
9374 _ACEOF
9375 rm -f conftest.$ac_objext
9376 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9377   (eval $ac_compile) 2>conftest.er1
9378   ac_status=$?
9379   grep -v '^ *+' conftest.er1 >conftest.err
9380   rm -f conftest.er1
9381   cat conftest.err >&5
9382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9383   (exit $ac_status); } &&
9384          { ac_try='test -z "$ac_c_werror_flag"
9385                          || test ! -s conftest.err'
9386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9387   (eval $ac_try) 2>&5
9388   ac_status=$?
9389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9390   (exit $ac_status); }; } &&
9391          { ac_try='test -s conftest.$ac_objext'
9392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9393   (eval $ac_try) 2>&5
9394   ac_status=$?
9395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9396   (exit $ac_status); }; }; then
9397   ac_header_compiler=yes
9398 else
9399   echo "$as_me: failed program was:" >&5
9400 sed 's/^/| /' conftest.$ac_ext >&5
9401
9402 ac_header_compiler=no
9403 fi
9404 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9405 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9406 echo "${ECHO_T}$ac_header_compiler" >&6
9407
9408 # Is the header present?
9409 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9410 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9411 cat >conftest.$ac_ext <<_ACEOF
9412 /* confdefs.h.  */
9413 _ACEOF
9414 cat confdefs.h >>conftest.$ac_ext
9415 cat >>conftest.$ac_ext <<_ACEOF
9416 /* end confdefs.h.  */
9417 #include <$ac_header>
9418 _ACEOF
9419 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9420   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9421   ac_status=$?
9422   grep -v '^ *+' conftest.er1 >conftest.err
9423   rm -f conftest.er1
9424   cat conftest.err >&5
9425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9426   (exit $ac_status); } >/dev/null; then
9427   if test -s conftest.err; then
9428     ac_cpp_err=$ac_c_preproc_warn_flag
9429     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9430   else
9431     ac_cpp_err=
9432   fi
9433 else
9434   ac_cpp_err=yes
9435 fi
9436 if test -z "$ac_cpp_err"; then
9437   ac_header_preproc=yes
9438 else
9439   echo "$as_me: failed program was:" >&5
9440 sed 's/^/| /' conftest.$ac_ext >&5
9441
9442   ac_header_preproc=no
9443 fi
9444 rm -f conftest.err conftest.$ac_ext
9445 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9446 echo "${ECHO_T}$ac_header_preproc" >&6
9447
9448 # So?  What about this header?
9449 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9450   yes:no: )
9451     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9452 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9453     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9454 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9455     ac_header_preproc=yes
9456     ;;
9457   no:yes:* )
9458     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9459 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9460     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9461 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9462     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9463 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9464     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9465 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9466     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9467 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9468     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9469 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9470     (
9471       cat <<\_ASBOX
9472 ## ---------------------------------------- ##
9473 ## Report this to pgsql-bugs@postgresql.org ##
9474 ## ---------------------------------------- ##
9475 _ASBOX
9476     ) |
9477       sed "s/^/$as_me: WARNING:     /" >&2
9478     ;;
9479 esac
9480 echo "$as_me:$LINENO: checking for $ac_header" >&5
9481 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9483   echo $ECHO_N "(cached) $ECHO_C" >&6
9484 else
9485   eval "$as_ac_Header=\$ac_header_preproc"
9486 fi
9487 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9488 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9489
9490 fi
9491 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9492   cat >>confdefs.h <<_ACEOF
9493 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9494 _ACEOF
9495
9496 fi
9497
9498 done
9499
9500 fi
9501
9502 done
9503
9504 fi
9505
9506 done
9507
9508 fi
9509
9510 if test "$with_zlib" = yes; then
9511   if test "${ac_cv_header_zlib_h+set}" = set; then
9512   echo "$as_me:$LINENO: checking for zlib.h" >&5
9513 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9514 if test "${ac_cv_header_zlib_h+set}" = set; then
9515   echo $ECHO_N "(cached) $ECHO_C" >&6
9516 fi
9517 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9518 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9519 else
9520   # Is the header compilable?
9521 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9522 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9523 cat >conftest.$ac_ext <<_ACEOF
9524 /* confdefs.h.  */
9525 _ACEOF
9526 cat confdefs.h >>conftest.$ac_ext
9527 cat >>conftest.$ac_ext <<_ACEOF
9528 /* end confdefs.h.  */
9529 $ac_includes_default
9530 #include <zlib.h>
9531 _ACEOF
9532 rm -f conftest.$ac_objext
9533 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9534   (eval $ac_compile) 2>conftest.er1
9535   ac_status=$?
9536   grep -v '^ *+' conftest.er1 >conftest.err
9537   rm -f conftest.er1
9538   cat conftest.err >&5
9539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9540   (exit $ac_status); } &&
9541          { ac_try='test -z "$ac_c_werror_flag"
9542                          || test ! -s conftest.err'
9543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9544   (eval $ac_try) 2>&5
9545   ac_status=$?
9546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547   (exit $ac_status); }; } &&
9548          { ac_try='test -s conftest.$ac_objext'
9549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9550   (eval $ac_try) 2>&5
9551   ac_status=$?
9552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9553   (exit $ac_status); }; }; then
9554   ac_header_compiler=yes
9555 else
9556   echo "$as_me: failed program was:" >&5
9557 sed 's/^/| /' conftest.$ac_ext >&5
9558
9559 ac_header_compiler=no
9560 fi
9561 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9562 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9563 echo "${ECHO_T}$ac_header_compiler" >&6
9564
9565 # Is the header present?
9566 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9567 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9568 cat >conftest.$ac_ext <<_ACEOF
9569 /* confdefs.h.  */
9570 _ACEOF
9571 cat confdefs.h >>conftest.$ac_ext
9572 cat >>conftest.$ac_ext <<_ACEOF
9573 /* end confdefs.h.  */
9574 #include <zlib.h>
9575 _ACEOF
9576 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9577   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9578   ac_status=$?
9579   grep -v '^ *+' conftest.er1 >conftest.err
9580   rm -f conftest.er1
9581   cat conftest.err >&5
9582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9583   (exit $ac_status); } >/dev/null; then
9584   if test -s conftest.err; then
9585     ac_cpp_err=$ac_c_preproc_warn_flag
9586     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9587   else
9588     ac_cpp_err=
9589   fi
9590 else
9591   ac_cpp_err=yes
9592 fi
9593 if test -z "$ac_cpp_err"; then
9594   ac_header_preproc=yes
9595 else
9596   echo "$as_me: failed program was:" >&5
9597 sed 's/^/| /' conftest.$ac_ext >&5
9598
9599   ac_header_preproc=no
9600 fi
9601 rm -f conftest.err conftest.$ac_ext
9602 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9603 echo "${ECHO_T}$ac_header_preproc" >&6
9604
9605 # So?  What about this header?
9606 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9607   yes:no: )
9608     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9609 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9610     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9611 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9612     ac_header_preproc=yes
9613     ;;
9614   no:yes:* )
9615     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9616 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9617     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9618 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9619     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9620 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9621     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9622 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9623     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9624 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9625     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9626 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9627     (
9628       cat <<\_ASBOX
9629 ## ---------------------------------------- ##
9630 ## Report this to pgsql-bugs@postgresql.org ##
9631 ## ---------------------------------------- ##
9632 _ASBOX
9633     ) |
9634       sed "s/^/$as_me: WARNING:     /" >&2
9635     ;;
9636 esac
9637 echo "$as_me:$LINENO: checking for zlib.h" >&5
9638 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9639 if test "${ac_cv_header_zlib_h+set}" = set; then
9640   echo $ECHO_N "(cached) $ECHO_C" >&6
9641 else
9642   ac_cv_header_zlib_h=$ac_header_preproc
9643 fi
9644 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9645 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9646
9647 fi
9648 if test $ac_cv_header_zlib_h = yes; then
9649   :
9650 else
9651   { { echo "$as_me:$LINENO: error: zlib header not found
9652 If you have zlib already installed, see config.log for details on the
9653 failure.  It is possible the compiler isn't looking in the proper directory.
9654 Use --without-zlib to disable zlib support." >&5
9655 echo "$as_me: error: zlib header not found
9656 If you have zlib already installed, see config.log for details on the
9657 failure.  It is possible the compiler isn't looking in the proper directory.
9658 Use --without-zlib to disable zlib support." >&2;}
9659    { (exit 1); exit 1; }; }
9660 fi
9661
9662
9663 fi
9664
9665 if test "$with_krb5" = yes ; then
9666   if test "${ac_cv_header_krb5_h+set}" = set; then
9667   echo "$as_me:$LINENO: checking for krb5.h" >&5
9668 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9669 if test "${ac_cv_header_krb5_h+set}" = set; then
9670   echo $ECHO_N "(cached) $ECHO_C" >&6
9671 fi
9672 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9673 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9674 else
9675   # Is the header compilable?
9676 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9677 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9678 cat >conftest.$ac_ext <<_ACEOF
9679 /* confdefs.h.  */
9680 _ACEOF
9681 cat confdefs.h >>conftest.$ac_ext
9682 cat >>conftest.$ac_ext <<_ACEOF
9683 /* end confdefs.h.  */
9684 $ac_includes_default
9685 #include <krb5.h>
9686 _ACEOF
9687 rm -f conftest.$ac_objext
9688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9689   (eval $ac_compile) 2>conftest.er1
9690   ac_status=$?
9691   grep -v '^ *+' conftest.er1 >conftest.err
9692   rm -f conftest.er1
9693   cat conftest.err >&5
9694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9695   (exit $ac_status); } &&
9696          { ac_try='test -z "$ac_c_werror_flag"
9697                          || test ! -s conftest.err'
9698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9699   (eval $ac_try) 2>&5
9700   ac_status=$?
9701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9702   (exit $ac_status); }; } &&
9703          { ac_try='test -s conftest.$ac_objext'
9704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9705   (eval $ac_try) 2>&5
9706   ac_status=$?
9707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708   (exit $ac_status); }; }; then
9709   ac_header_compiler=yes
9710 else
9711   echo "$as_me: failed program was:" >&5
9712 sed 's/^/| /' conftest.$ac_ext >&5
9713
9714 ac_header_compiler=no
9715 fi
9716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9717 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9718 echo "${ECHO_T}$ac_header_compiler" >&6
9719
9720 # Is the header present?
9721 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9722 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9723 cat >conftest.$ac_ext <<_ACEOF
9724 /* confdefs.h.  */
9725 _ACEOF
9726 cat confdefs.h >>conftest.$ac_ext
9727 cat >>conftest.$ac_ext <<_ACEOF
9728 /* end confdefs.h.  */
9729 #include <krb5.h>
9730 _ACEOF
9731 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9733   ac_status=$?
9734   grep -v '^ *+' conftest.er1 >conftest.err
9735   rm -f conftest.er1
9736   cat conftest.err >&5
9737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9738   (exit $ac_status); } >/dev/null; then
9739   if test -s conftest.err; then
9740     ac_cpp_err=$ac_c_preproc_warn_flag
9741     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9742   else
9743     ac_cpp_err=
9744   fi
9745 else
9746   ac_cpp_err=yes
9747 fi
9748 if test -z "$ac_cpp_err"; then
9749   ac_header_preproc=yes
9750 else
9751   echo "$as_me: failed program was:" >&5
9752 sed 's/^/| /' conftest.$ac_ext >&5
9753
9754   ac_header_preproc=no
9755 fi
9756 rm -f conftest.err conftest.$ac_ext
9757 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9758 echo "${ECHO_T}$ac_header_preproc" >&6
9759
9760 # So?  What about this header?
9761 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9762   yes:no: )
9763     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9764 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9765     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9766 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9767     ac_header_preproc=yes
9768     ;;
9769   no:yes:* )
9770     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9771 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9772     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9773 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9774     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9775 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9776     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9777 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9778     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9779 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9780     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9781 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9782     (
9783       cat <<\_ASBOX
9784 ## ---------------------------------------- ##
9785 ## Report this to pgsql-bugs@postgresql.org ##
9786 ## ---------------------------------------- ##
9787 _ASBOX
9788     ) |
9789       sed "s/^/$as_me: WARNING:     /" >&2
9790     ;;
9791 esac
9792 echo "$as_me:$LINENO: checking for krb5.h" >&5
9793 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9794 if test "${ac_cv_header_krb5_h+set}" = set; then
9795   echo $ECHO_N "(cached) $ECHO_C" >&6
9796 else
9797   ac_cv_header_krb5_h=$ac_header_preproc
9798 fi
9799 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9800 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9801
9802 fi
9803 if test $ac_cv_header_krb5_h = yes; then
9804   :
9805 else
9806   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9807 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9808    { (exit 1); exit 1; }; }
9809 fi
9810
9811
9812 fi
9813
9814 if test "$with_openssl" = yes ; then
9815   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9816   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9817 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9818 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9819   echo $ECHO_N "(cached) $ECHO_C" >&6
9820 fi
9821 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9822 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9823 else
9824   # Is the header compilable?
9825 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9826 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9827 cat >conftest.$ac_ext <<_ACEOF
9828 /* confdefs.h.  */
9829 _ACEOF
9830 cat confdefs.h >>conftest.$ac_ext
9831 cat >>conftest.$ac_ext <<_ACEOF
9832 /* end confdefs.h.  */
9833 $ac_includes_default
9834 #include <openssl/ssl.h>
9835 _ACEOF
9836 rm -f conftest.$ac_objext
9837 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9838   (eval $ac_compile) 2>conftest.er1
9839   ac_status=$?
9840   grep -v '^ *+' conftest.er1 >conftest.err
9841   rm -f conftest.er1
9842   cat conftest.err >&5
9843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844   (exit $ac_status); } &&
9845          { ac_try='test -z "$ac_c_werror_flag"
9846                          || test ! -s conftest.err'
9847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9848   (eval $ac_try) 2>&5
9849   ac_status=$?
9850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9851   (exit $ac_status); }; } &&
9852          { ac_try='test -s conftest.$ac_objext'
9853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9854   (eval $ac_try) 2>&5
9855   ac_status=$?
9856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9857   (exit $ac_status); }; }; then
9858   ac_header_compiler=yes
9859 else
9860   echo "$as_me: failed program was:" >&5
9861 sed 's/^/| /' conftest.$ac_ext >&5
9862
9863 ac_header_compiler=no
9864 fi
9865 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9866 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9867 echo "${ECHO_T}$ac_header_compiler" >&6
9868
9869 # Is the header present?
9870 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
9871 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
9872 cat >conftest.$ac_ext <<_ACEOF
9873 /* confdefs.h.  */
9874 _ACEOF
9875 cat confdefs.h >>conftest.$ac_ext
9876 cat >>conftest.$ac_ext <<_ACEOF
9877 /* end confdefs.h.  */
9878 #include <openssl/ssl.h>
9879 _ACEOF
9880 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9881   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9882   ac_status=$?
9883   grep -v '^ *+' conftest.er1 >conftest.err
9884   rm -f conftest.er1
9885   cat conftest.err >&5
9886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9887   (exit $ac_status); } >/dev/null; then
9888   if test -s conftest.err; then
9889     ac_cpp_err=$ac_c_preproc_warn_flag
9890     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9891   else
9892     ac_cpp_err=
9893   fi
9894 else
9895   ac_cpp_err=yes
9896 fi
9897 if test -z "$ac_cpp_err"; then
9898   ac_header_preproc=yes
9899 else
9900   echo "$as_me: failed program was:" >&5
9901 sed 's/^/| /' conftest.$ac_ext >&5
9902
9903   ac_header_preproc=no
9904 fi
9905 rm -f conftest.err conftest.$ac_ext
9906 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9907 echo "${ECHO_T}$ac_header_preproc" >&6
9908
9909 # So?  What about this header?
9910 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9911   yes:no: )
9912     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9913 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9914     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
9915 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
9916     ac_header_preproc=yes
9917     ;;
9918   no:yes:* )
9919     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
9920 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
9921     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
9922 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
9923     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
9924 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
9925     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
9926 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9927     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
9928 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
9929     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
9930 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
9931     (
9932       cat <<\_ASBOX
9933 ## ---------------------------------------- ##
9934 ## Report this to pgsql-bugs@postgresql.org ##
9935 ## ---------------------------------------- ##
9936 _ASBOX
9937     ) |
9938       sed "s/^/$as_me: WARNING:     /" >&2
9939     ;;
9940 esac
9941 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9942 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9943 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9944   echo $ECHO_N "(cached) $ECHO_C" >&6
9945 else
9946   ac_cv_header_openssl_ssl_h=$ac_header_preproc
9947 fi
9948 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9949 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9950
9951 fi
9952 if test $ac_cv_header_openssl_ssl_h = yes; then
9953   :
9954 else
9955   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
9956 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
9957    { (exit 1); exit 1; }; }
9958 fi
9959
9960
9961   if test "${ac_cv_header_openssl_err_h+set}" = set; then
9962   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
9963 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
9964 if test "${ac_cv_header_openssl_err_h+set}" = set; then
9965   echo $ECHO_N "(cached) $ECHO_C" >&6
9966 fi
9967 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
9968 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
9969 else
9970   # Is the header compilable?
9971 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
9972 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
9973 cat >conftest.$ac_ext <<_ACEOF
9974 /* confdefs.h.  */
9975 _ACEOF
9976 cat confdefs.h >>conftest.$ac_ext
9977 cat >>conftest.$ac_ext <<_ACEOF
9978 /* end confdefs.h.  */
9979 $ac_includes_default
9980 #include <openssl/err.h>
9981 _ACEOF
9982 rm -f conftest.$ac_objext
9983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9984   (eval $ac_compile) 2>conftest.er1
9985   ac_status=$?
9986   grep -v '^ *+' conftest.er1 >conftest.err
9987   rm -f conftest.er1
9988   cat conftest.err >&5
9989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9990   (exit $ac_status); } &&
9991          { ac_try='test -z "$ac_c_werror_flag"
9992                          || test ! -s conftest.err'
9993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9994   (eval $ac_try) 2>&5
9995   ac_status=$?
9996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9997   (exit $ac_status); }; } &&
9998          { ac_try='test -s conftest.$ac_objext'
9999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10000   (eval $ac_try) 2>&5
10001   ac_status=$?
10002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003   (exit $ac_status); }; }; then
10004   ac_header_compiler=yes
10005 else
10006   echo "$as_me: failed program was:" >&5
10007 sed 's/^/| /' conftest.$ac_ext >&5
10008
10009 ac_header_compiler=no
10010 fi
10011 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10012 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10013 echo "${ECHO_T}$ac_header_compiler" >&6
10014
10015 # Is the header present?
10016 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10017 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10018 cat >conftest.$ac_ext <<_ACEOF
10019 /* confdefs.h.  */
10020 _ACEOF
10021 cat confdefs.h >>conftest.$ac_ext
10022 cat >>conftest.$ac_ext <<_ACEOF
10023 /* end confdefs.h.  */
10024 #include <openssl/err.h>
10025 _ACEOF
10026 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10027   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10028   ac_status=$?
10029   grep -v '^ *+' conftest.er1 >conftest.err
10030   rm -f conftest.er1
10031   cat conftest.err >&5
10032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10033   (exit $ac_status); } >/dev/null; then
10034   if test -s conftest.err; then
10035     ac_cpp_err=$ac_c_preproc_warn_flag
10036     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10037   else
10038     ac_cpp_err=
10039   fi
10040 else
10041   ac_cpp_err=yes
10042 fi
10043 if test -z "$ac_cpp_err"; then
10044   ac_header_preproc=yes
10045 else
10046   echo "$as_me: failed program was:" >&5
10047 sed 's/^/| /' conftest.$ac_ext >&5
10048
10049   ac_header_preproc=no
10050 fi
10051 rm -f conftest.err conftest.$ac_ext
10052 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10053 echo "${ECHO_T}$ac_header_preproc" >&6
10054
10055 # So?  What about this header?
10056 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10057   yes:no: )
10058     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10059 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10060     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10061 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10062     ac_header_preproc=yes
10063     ;;
10064   no:yes:* )
10065     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10066 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10067     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10068 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10069     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10070 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10071     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10072 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10073     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10074 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10075     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10076 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10077     (
10078       cat <<\_ASBOX
10079 ## ---------------------------------------- ##
10080 ## Report this to pgsql-bugs@postgresql.org ##
10081 ## ---------------------------------------- ##
10082 _ASBOX
10083     ) |
10084       sed "s/^/$as_me: WARNING:     /" >&2
10085     ;;
10086 esac
10087 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10088 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10089 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10090   echo $ECHO_N "(cached) $ECHO_C" >&6
10091 else
10092   ac_cv_header_openssl_err_h=$ac_header_preproc
10093 fi
10094 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10095 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10096
10097 fi
10098 if test $ac_cv_header_openssl_err_h = yes; then
10099   :
10100 else
10101   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10102 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10103    { (exit 1); exit 1; }; }
10104 fi
10105
10106
10107 fi
10108
10109 if test "$with_pam" = yes ; then
10110
10111 for ac_header in security/pam_appl.h
10112 do
10113 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10114 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10115   echo "$as_me:$LINENO: checking for $ac_header" >&5
10116 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10117 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10118   echo $ECHO_N "(cached) $ECHO_C" >&6
10119 fi
10120 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10121 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10122 else
10123   # Is the header compilable?
10124 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10125 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10126 cat >conftest.$ac_ext <<_ACEOF
10127 /* confdefs.h.  */
10128 _ACEOF
10129 cat confdefs.h >>conftest.$ac_ext
10130 cat >>conftest.$ac_ext <<_ACEOF
10131 /* end confdefs.h.  */
10132 $ac_includes_default
10133 #include <$ac_header>
10134 _ACEOF
10135 rm -f conftest.$ac_objext
10136 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10137   (eval $ac_compile) 2>conftest.er1
10138   ac_status=$?
10139   grep -v '^ *+' conftest.er1 >conftest.err
10140   rm -f conftest.er1
10141   cat conftest.err >&5
10142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10143   (exit $ac_status); } &&
10144          { ac_try='test -z "$ac_c_werror_flag"
10145                          || test ! -s conftest.err'
10146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10147   (eval $ac_try) 2>&5
10148   ac_status=$?
10149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10150   (exit $ac_status); }; } &&
10151          { ac_try='test -s conftest.$ac_objext'
10152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10153   (eval $ac_try) 2>&5
10154   ac_status=$?
10155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10156   (exit $ac_status); }; }; then
10157   ac_header_compiler=yes
10158 else
10159   echo "$as_me: failed program was:" >&5
10160 sed 's/^/| /' conftest.$ac_ext >&5
10161
10162 ac_header_compiler=no
10163 fi
10164 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10165 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10166 echo "${ECHO_T}$ac_header_compiler" >&6
10167
10168 # Is the header present?
10169 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10170 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10171 cat >conftest.$ac_ext <<_ACEOF
10172 /* confdefs.h.  */
10173 _ACEOF
10174 cat confdefs.h >>conftest.$ac_ext
10175 cat >>conftest.$ac_ext <<_ACEOF
10176 /* end confdefs.h.  */
10177 #include <$ac_header>
10178 _ACEOF
10179 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10181   ac_status=$?
10182   grep -v '^ *+' conftest.er1 >conftest.err
10183   rm -f conftest.er1
10184   cat conftest.err >&5
10185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186   (exit $ac_status); } >/dev/null; then
10187   if test -s conftest.err; then
10188     ac_cpp_err=$ac_c_preproc_warn_flag
10189     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10190   else
10191     ac_cpp_err=
10192   fi
10193 else
10194   ac_cpp_err=yes
10195 fi
10196 if test -z "$ac_cpp_err"; then
10197   ac_header_preproc=yes
10198 else
10199   echo "$as_me: failed program was:" >&5
10200 sed 's/^/| /' conftest.$ac_ext >&5
10201
10202   ac_header_preproc=no
10203 fi
10204 rm -f conftest.err conftest.$ac_ext
10205 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10206 echo "${ECHO_T}$ac_header_preproc" >&6
10207
10208 # So?  What about this header?
10209 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10210   yes:no: )
10211     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10212 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10213     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10214 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10215     ac_header_preproc=yes
10216     ;;
10217   no:yes:* )
10218     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10219 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10220     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10221 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10222     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10223 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10224     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10225 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10226     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10227 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10228     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10229 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10230     (
10231       cat <<\_ASBOX
10232 ## ---------------------------------------- ##
10233 ## Report this to pgsql-bugs@postgresql.org ##
10234 ## ---------------------------------------- ##
10235 _ASBOX
10236     ) |
10237       sed "s/^/$as_me: WARNING:     /" >&2
10238     ;;
10239 esac
10240 echo "$as_me:$LINENO: checking for $ac_header" >&5
10241 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10242 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10243   echo $ECHO_N "(cached) $ECHO_C" >&6
10244 else
10245   eval "$as_ac_Header=\$ac_header_preproc"
10246 fi
10247 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10248 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10249
10250 fi
10251 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10252   cat >>confdefs.h <<_ACEOF
10253 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10254 _ACEOF
10255
10256 else
10257
10258 for ac_header in pam/pam_appl.h
10259 do
10260 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10262   echo "$as_me:$LINENO: checking for $ac_header" >&5
10263 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10264 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10265   echo $ECHO_N "(cached) $ECHO_C" >&6
10266 fi
10267 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10268 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10269 else
10270   # Is the header compilable?
10271 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10272 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10273 cat >conftest.$ac_ext <<_ACEOF
10274 /* confdefs.h.  */
10275 _ACEOF
10276 cat confdefs.h >>conftest.$ac_ext
10277 cat >>conftest.$ac_ext <<_ACEOF
10278 /* end confdefs.h.  */
10279 $ac_includes_default
10280 #include <$ac_header>
10281 _ACEOF
10282 rm -f conftest.$ac_objext
10283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10284   (eval $ac_compile) 2>conftest.er1
10285   ac_status=$?
10286   grep -v '^ *+' conftest.er1 >conftest.err
10287   rm -f conftest.er1
10288   cat conftest.err >&5
10289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10290   (exit $ac_status); } &&
10291          { ac_try='test -z "$ac_c_werror_flag"
10292                          || test ! -s conftest.err'
10293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10294   (eval $ac_try) 2>&5
10295   ac_status=$?
10296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297   (exit $ac_status); }; } &&
10298          { ac_try='test -s conftest.$ac_objext'
10299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10300   (eval $ac_try) 2>&5
10301   ac_status=$?
10302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10303   (exit $ac_status); }; }; then
10304   ac_header_compiler=yes
10305 else
10306   echo "$as_me: failed program was:" >&5
10307 sed 's/^/| /' conftest.$ac_ext >&5
10308
10309 ac_header_compiler=no
10310 fi
10311 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10312 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10313 echo "${ECHO_T}$ac_header_compiler" >&6
10314
10315 # Is the header present?
10316 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10317 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10318 cat >conftest.$ac_ext <<_ACEOF
10319 /* confdefs.h.  */
10320 _ACEOF
10321 cat confdefs.h >>conftest.$ac_ext
10322 cat >>conftest.$ac_ext <<_ACEOF
10323 /* end confdefs.h.  */
10324 #include <$ac_header>
10325 _ACEOF
10326 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10327   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10328   ac_status=$?
10329   grep -v '^ *+' conftest.er1 >conftest.err
10330   rm -f conftest.er1
10331   cat conftest.err >&5
10332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10333   (exit $ac_status); } >/dev/null; then
10334   if test -s conftest.err; then
10335     ac_cpp_err=$ac_c_preproc_warn_flag
10336     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10337   else
10338     ac_cpp_err=
10339   fi
10340 else
10341   ac_cpp_err=yes
10342 fi
10343 if test -z "$ac_cpp_err"; then
10344   ac_header_preproc=yes
10345 else
10346   echo "$as_me: failed program was:" >&5
10347 sed 's/^/| /' conftest.$ac_ext >&5
10348
10349   ac_header_preproc=no
10350 fi
10351 rm -f conftest.err conftest.$ac_ext
10352 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10353 echo "${ECHO_T}$ac_header_preproc" >&6
10354
10355 # So?  What about this header?
10356 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10357   yes:no: )
10358     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10359 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10360     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10361 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10362     ac_header_preproc=yes
10363     ;;
10364   no:yes:* )
10365     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10366 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10367     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10368 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10369     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10370 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10371     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10372 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10373     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10374 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10375     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10376 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10377     (
10378       cat <<\_ASBOX
10379 ## ---------------------------------------- ##
10380 ## Report this to pgsql-bugs@postgresql.org ##
10381 ## ---------------------------------------- ##
10382 _ASBOX
10383     ) |
10384       sed "s/^/$as_me: WARNING:     /" >&2
10385     ;;
10386 esac
10387 echo "$as_me:$LINENO: checking for $ac_header" >&5
10388 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10389 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10390   echo $ECHO_N "(cached) $ECHO_C" >&6
10391 else
10392   eval "$as_ac_Header=\$ac_header_preproc"
10393 fi
10394 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10395 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10396
10397 fi
10398 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10399   cat >>confdefs.h <<_ACEOF
10400 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10401 _ACEOF
10402
10403 else
10404   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10405 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10406    { (exit 1); exit 1; }; }
10407 fi
10408
10409 done
10410
10411 fi
10412
10413 done
10414
10415 fi
10416
10417 if test "$with_ldap" = yes ; then
10418   if test "$PORTNAME" != "win32"; then
10419
10420 for ac_header in ldap.h
10421 do
10422 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10423 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10424   echo "$as_me:$LINENO: checking for $ac_header" >&5
10425 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10426 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10427   echo $ECHO_N "(cached) $ECHO_C" >&6
10428 fi
10429 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10431 else
10432   # Is the header compilable?
10433 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10434 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10435 cat >conftest.$ac_ext <<_ACEOF
10436 /* confdefs.h.  */
10437 _ACEOF
10438 cat confdefs.h >>conftest.$ac_ext
10439 cat >>conftest.$ac_ext <<_ACEOF
10440 /* end confdefs.h.  */
10441 $ac_includes_default
10442 #include <$ac_header>
10443 _ACEOF
10444 rm -f conftest.$ac_objext
10445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10446   (eval $ac_compile) 2>conftest.er1
10447   ac_status=$?
10448   grep -v '^ *+' conftest.er1 >conftest.err
10449   rm -f conftest.er1
10450   cat conftest.err >&5
10451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10452   (exit $ac_status); } &&
10453          { ac_try='test -z "$ac_c_werror_flag"
10454                          || test ! -s conftest.err'
10455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10456   (eval $ac_try) 2>&5
10457   ac_status=$?
10458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10459   (exit $ac_status); }; } &&
10460          { ac_try='test -s conftest.$ac_objext'
10461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10462   (eval $ac_try) 2>&5
10463   ac_status=$?
10464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10465   (exit $ac_status); }; }; then
10466   ac_header_compiler=yes
10467 else
10468   echo "$as_me: failed program was:" >&5
10469 sed 's/^/| /' conftest.$ac_ext >&5
10470
10471 ac_header_compiler=no
10472 fi
10473 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10474 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10475 echo "${ECHO_T}$ac_header_compiler" >&6
10476
10477 # Is the header present?
10478 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10479 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10480 cat >conftest.$ac_ext <<_ACEOF
10481 /* confdefs.h.  */
10482 _ACEOF
10483 cat confdefs.h >>conftest.$ac_ext
10484 cat >>conftest.$ac_ext <<_ACEOF
10485 /* end confdefs.h.  */
10486 #include <$ac_header>
10487 _ACEOF
10488 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10490   ac_status=$?
10491   grep -v '^ *+' conftest.er1 >conftest.err
10492   rm -f conftest.er1
10493   cat conftest.err >&5
10494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10495   (exit $ac_status); } >/dev/null; then
10496   if test -s conftest.err; then
10497     ac_cpp_err=$ac_c_preproc_warn_flag
10498     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10499   else
10500     ac_cpp_err=
10501   fi
10502 else
10503   ac_cpp_err=yes
10504 fi
10505 if test -z "$ac_cpp_err"; then
10506   ac_header_preproc=yes
10507 else
10508   echo "$as_me: failed program was:" >&5
10509 sed 's/^/| /' conftest.$ac_ext >&5
10510
10511   ac_header_preproc=no
10512 fi
10513 rm -f conftest.err conftest.$ac_ext
10514 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10515 echo "${ECHO_T}$ac_header_preproc" >&6
10516
10517 # So?  What about this header?
10518 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10519   yes:no: )
10520     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10521 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10522     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10523 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10524     ac_header_preproc=yes
10525     ;;
10526   no:yes:* )
10527     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10528 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10529     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10530 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10531     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10532 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10533     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10534 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10535     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10536 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10537     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10538 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10539     (
10540       cat <<\_ASBOX
10541 ## ---------------------------------------- ##
10542 ## Report this to pgsql-bugs@postgresql.org ##
10543 ## ---------------------------------------- ##
10544 _ASBOX
10545     ) |
10546       sed "s/^/$as_me: WARNING:     /" >&2
10547     ;;
10548 esac
10549 echo "$as_me:$LINENO: checking for $ac_header" >&5
10550 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10551 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10552   echo $ECHO_N "(cached) $ECHO_C" >&6
10553 else
10554   eval "$as_ac_Header=\$ac_header_preproc"
10555 fi
10556 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10557 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10558
10559 fi
10560 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10561   cat >>confdefs.h <<_ACEOF
10562 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10563 _ACEOF
10564
10565 else
10566   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
10567 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10568    { (exit 1); exit 1; }; }
10569 fi
10570
10571 done
10572
10573   else
10574
10575 for ac_header in winldap.h
10576 do
10577 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10578 echo "$as_me:$LINENO: checking for $ac_header" >&5
10579 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10580 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10581   echo $ECHO_N "(cached) $ECHO_C" >&6
10582 else
10583   cat >conftest.$ac_ext <<_ACEOF
10584 /* confdefs.h.  */
10585 _ACEOF
10586 cat confdefs.h >>conftest.$ac_ext
10587 cat >>conftest.$ac_ext <<_ACEOF
10588 /* end confdefs.h.  */
10589 $ac_includes_default
10590 #include <windows.h>
10591
10592
10593 #include <$ac_header>
10594 _ACEOF
10595 rm -f conftest.$ac_objext
10596 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10597   (eval $ac_compile) 2>conftest.er1
10598   ac_status=$?
10599   grep -v '^ *+' conftest.er1 >conftest.err
10600   rm -f conftest.er1
10601   cat conftest.err >&5
10602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10603   (exit $ac_status); } &&
10604          { ac_try='test -z "$ac_c_werror_flag"
10605                          || test ! -s conftest.err'
10606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10607   (eval $ac_try) 2>&5
10608   ac_status=$?
10609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10610   (exit $ac_status); }; } &&
10611          { ac_try='test -s conftest.$ac_objext'
10612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10613   (eval $ac_try) 2>&5
10614   ac_status=$?
10615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10616   (exit $ac_status); }; }; then
10617   eval "$as_ac_Header=yes"
10618 else
10619   echo "$as_me: failed program was:" >&5
10620 sed 's/^/| /' conftest.$ac_ext >&5
10621
10622 eval "$as_ac_Header=no"
10623 fi
10624 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10625 fi
10626 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10627 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10628 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10629   cat >>confdefs.h <<_ACEOF
10630 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10631 _ACEOF
10632
10633 else
10634   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10635 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10636    { (exit 1); exit 1; }; }
10637 fi
10638
10639 done
10640
10641   fi
10642 fi
10643
10644 if test "$with_bonjour" = yes ; then
10645   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10646   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10647 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10648 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10649   echo $ECHO_N "(cached) $ECHO_C" >&6
10650 fi
10651 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10652 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10653 else
10654   # Is the header compilable?
10655 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10656 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10657 cat >conftest.$ac_ext <<_ACEOF
10658 /* confdefs.h.  */
10659 _ACEOF
10660 cat confdefs.h >>conftest.$ac_ext
10661 cat >>conftest.$ac_ext <<_ACEOF
10662 /* end confdefs.h.  */
10663 $ac_includes_default
10664 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10665 _ACEOF
10666 rm -f conftest.$ac_objext
10667 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10668   (eval $ac_compile) 2>conftest.er1
10669   ac_status=$?
10670   grep -v '^ *+' conftest.er1 >conftest.err
10671   rm -f conftest.er1
10672   cat conftest.err >&5
10673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10674   (exit $ac_status); } &&
10675          { ac_try='test -z "$ac_c_werror_flag"
10676                          || test ! -s conftest.err'
10677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10678   (eval $ac_try) 2>&5
10679   ac_status=$?
10680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10681   (exit $ac_status); }; } &&
10682          { ac_try='test -s conftest.$ac_objext'
10683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10684   (eval $ac_try) 2>&5
10685   ac_status=$?
10686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10687   (exit $ac_status); }; }; then
10688   ac_header_compiler=yes
10689 else
10690   echo "$as_me: failed program was:" >&5
10691 sed 's/^/| /' conftest.$ac_ext >&5
10692
10693 ac_header_compiler=no
10694 fi
10695 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10696 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10697 echo "${ECHO_T}$ac_header_compiler" >&6
10698
10699 # Is the header present?
10700 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10701 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10702 cat >conftest.$ac_ext <<_ACEOF
10703 /* confdefs.h.  */
10704 _ACEOF
10705 cat confdefs.h >>conftest.$ac_ext
10706 cat >>conftest.$ac_ext <<_ACEOF
10707 /* end confdefs.h.  */
10708 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10709 _ACEOF
10710 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10711   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10712   ac_status=$?
10713   grep -v '^ *+' conftest.er1 >conftest.err
10714   rm -f conftest.er1
10715   cat conftest.err >&5
10716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10717   (exit $ac_status); } >/dev/null; then
10718   if test -s conftest.err; then
10719     ac_cpp_err=$ac_c_preproc_warn_flag
10720     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10721   else
10722     ac_cpp_err=
10723   fi
10724 else
10725   ac_cpp_err=yes
10726 fi
10727 if test -z "$ac_cpp_err"; then
10728   ac_header_preproc=yes
10729 else
10730   echo "$as_me: failed program was:" >&5
10731 sed 's/^/| /' conftest.$ac_ext >&5
10732
10733   ac_header_preproc=no
10734 fi
10735 rm -f conftest.err conftest.$ac_ext
10736 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10737 echo "${ECHO_T}$ac_header_preproc" >&6
10738
10739 # So?  What about this header?
10740 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10741   yes:no: )
10742     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10743 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10744     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10745 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10746     ac_header_preproc=yes
10747     ;;
10748   no:yes:* )
10749     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10750 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10751     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10752 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10753     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10754 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10755     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10756 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10757     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10758 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10759     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10760 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10761     (
10762       cat <<\_ASBOX
10763 ## ---------------------------------------- ##
10764 ## Report this to pgsql-bugs@postgresql.org ##
10765 ## ---------------------------------------- ##
10766 _ASBOX
10767     ) |
10768       sed "s/^/$as_me: WARNING:     /" >&2
10769     ;;
10770 esac
10771 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10772 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10773 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10774   echo $ECHO_N "(cached) $ECHO_C" >&6
10775 else
10776   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10777 fi
10778 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10779 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10780
10781 fi
10782 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10783   :
10784 else
10785   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10786 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10787    { (exit 1); exit 1; }; }
10788 fi
10789
10790
10791 fi
10792
10793
10794 ##
10795 ## Types, structures, compiler characteristics
10796 ##
10797
10798  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10799 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10800 if test "${ac_cv_c_const+set}" = set; then
10801   echo $ECHO_N "(cached) $ECHO_C" >&6
10802 else
10803   cat >conftest.$ac_ext <<_ACEOF
10804 /* confdefs.h.  */
10805 _ACEOF
10806 cat confdefs.h >>conftest.$ac_ext
10807 cat >>conftest.$ac_ext <<_ACEOF
10808 /* end confdefs.h.  */
10809
10810 int
10811 main ()
10812 {
10813 /* FIXME: Include the comments suggested by Paul. */
10814 #ifndef __cplusplus
10815   /* Ultrix mips cc rejects this.  */
10816   typedef int charset[2];
10817   const charset x;
10818   /* SunOS 4.1.1 cc rejects this.  */
10819   char const *const *ccp;
10820   char **p;
10821   /* NEC SVR4.0.2 mips cc rejects this.  */
10822   struct point {int x, y;};
10823   static struct point const zero = {0,0};
10824   /* AIX XL C 1.02.0.0 rejects this.
10825      It does not let you subtract one const X* pointer from another in
10826      an arm of an if-expression whose if-part is not a constant
10827      expression */
10828   const char *g = "string";
10829   ccp = &g + (g ? g-g : 0);
10830   /* HPUX 7.0 cc rejects these. */
10831   ++ccp;
10832   p = (char**) ccp;
10833   ccp = (char const *const *) p;
10834   { /* SCO 3.2v4 cc rejects this.  */
10835     char *t;
10836     char const *s = 0 ? (char *) 0 : (char const *) 0;
10837
10838     *t++ = 0;
10839   }
10840   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10841     int x[] = {25, 17};
10842     const int *foo = &x[0];
10843     ++foo;
10844   }
10845   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10846     typedef const int *iptr;
10847     iptr p = 0;
10848     ++p;
10849   }
10850   { /* AIX XL C 1.02.0.0 rejects this saying
10851        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10852     struct s { int j; const int *ap[3]; };
10853     struct s *b; b->j = 5;
10854   }
10855   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10856     const int foo = 10;
10857   }
10858 #endif
10859
10860   ;
10861   return 0;
10862 }
10863 _ACEOF
10864 rm -f conftest.$ac_objext
10865 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10866   (eval $ac_compile) 2>conftest.er1
10867   ac_status=$?
10868   grep -v '^ *+' conftest.er1 >conftest.err
10869   rm -f conftest.er1
10870   cat conftest.err >&5
10871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10872   (exit $ac_status); } &&
10873          { ac_try='test -z "$ac_c_werror_flag"
10874                          || test ! -s conftest.err'
10875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10876   (eval $ac_try) 2>&5
10877   ac_status=$?
10878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10879   (exit $ac_status); }; } &&
10880          { ac_try='test -s conftest.$ac_objext'
10881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10882   (eval $ac_try) 2>&5
10883   ac_status=$?
10884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10885   (exit $ac_status); }; }; then
10886   ac_cv_c_const=yes
10887 else
10888   echo "$as_me: failed program was:" >&5
10889 sed 's/^/| /' conftest.$ac_ext >&5
10890
10891 ac_cv_c_const=no
10892 fi
10893 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10894 fi
10895 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10896 echo "${ECHO_T}$ac_cv_c_const" >&6
10897 if test $ac_cv_c_const = no; then
10898
10899 cat >>confdefs.h <<\_ACEOF
10900 #define const
10901 _ACEOF
10902
10903 fi
10904
10905
10906 echo "$as_me:$LINENO: checking for inline" >&5
10907 echo $ECHO_N "checking for inline... $ECHO_C" >&6
10908 if test "${ac_cv_c_inline+set}" = set; then
10909   echo $ECHO_N "(cached) $ECHO_C" >&6
10910 else
10911   ac_cv_c_inline=no
10912 for ac_kw in inline __inline__ __inline; do
10913   cat >conftest.$ac_ext <<_ACEOF
10914 /* confdefs.h.  */
10915 _ACEOF
10916 cat confdefs.h >>conftest.$ac_ext
10917 cat >>conftest.$ac_ext <<_ACEOF
10918 /* end confdefs.h.  */
10919 #ifndef __cplusplus
10920 typedef int foo_t;
10921 static $ac_kw foo_t static_foo () {return 0; }
10922 $ac_kw int foo () {return 0; }
10923 #endif
10924
10925 _ACEOF
10926 rm -f conftest.$ac_objext
10927 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10928   (eval $ac_compile) 2>conftest.er1
10929   ac_status=$?
10930   grep -v '^ *+' conftest.er1 >conftest.err
10931   rm -f conftest.er1
10932   cat conftest.err >&5
10933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10934   (exit $ac_status); } &&
10935          { ac_try='test -z "$ac_c_werror_flag"
10936                          || test ! -s conftest.err'
10937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10938   (eval $ac_try) 2>&5
10939   ac_status=$?
10940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10941   (exit $ac_status); }; } &&
10942          { ac_try='test -s conftest.$ac_objext'
10943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10944   (eval $ac_try) 2>&5
10945   ac_status=$?
10946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10947   (exit $ac_status); }; }; then
10948   ac_cv_c_inline=$ac_kw; break
10949 else
10950   echo "$as_me: failed program was:" >&5
10951 sed 's/^/| /' conftest.$ac_ext >&5
10952
10953 fi
10954 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10955 done
10956
10957 fi
10958 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
10959 echo "${ECHO_T}$ac_cv_c_inline" >&6
10960 case $ac_cv_c_inline in
10961   inline | yes) ;;
10962   no)
10963 cat >>confdefs.h <<\_ACEOF
10964 #define inline
10965 _ACEOF
10966  ;;
10967   *)  cat >>confdefs.h <<_ACEOF
10968 #define inline $ac_cv_c_inline
10969 _ACEOF
10970  ;;
10971 esac
10972
10973 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
10974 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
10975 if test "${ac_cv_c_stringize+set}" = set; then
10976   echo $ECHO_N "(cached) $ECHO_C" >&6
10977 else
10978   cat >conftest.$ac_ext <<_ACEOF
10979 /* confdefs.h.  */
10980 _ACEOF
10981 cat confdefs.h >>conftest.$ac_ext
10982 cat >>conftest.$ac_ext <<_ACEOF
10983 /* end confdefs.h.  */
10984 #define x(y) #y
10985
10986 char *s = x(teststring);
10987 _ACEOF
10988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10989   $EGREP "#teststring" >/dev/null 2>&1; then
10990   ac_cv_c_stringize=no
10991 else
10992   ac_cv_c_stringize=yes
10993 fi
10994 rm -f conftest*
10995
10996 fi
10997 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
10998 echo "${ECHO_T}$ac_cv_c_stringize" >&6
10999 if test $ac_cv_c_stringize = yes; then
11000
11001 cat >>confdefs.h <<\_ACEOF
11002 #define HAVE_STRINGIZE 1
11003 _ACEOF
11004
11005 fi
11006
11007 echo "$as_me:$LINENO: checking for signed types" >&5
11008 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11009 if test "${pgac_cv_c_signed+set}" = set; then
11010   echo $ECHO_N "(cached) $ECHO_C" >&6
11011 else
11012   cat >conftest.$ac_ext <<_ACEOF
11013 /* confdefs.h.  */
11014 _ACEOF
11015 cat confdefs.h >>conftest.$ac_ext
11016 cat >>conftest.$ac_ext <<_ACEOF
11017 /* end confdefs.h.  */
11018
11019 int
11020 main ()
11021 {
11022 signed char c; signed short s; signed int i;
11023   ;
11024   return 0;
11025 }
11026 _ACEOF
11027 rm -f conftest.$ac_objext
11028 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11029   (eval $ac_compile) 2>conftest.er1
11030   ac_status=$?
11031   grep -v '^ *+' conftest.er1 >conftest.err
11032   rm -f conftest.er1
11033   cat conftest.err >&5
11034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11035   (exit $ac_status); } &&
11036          { ac_try='test -z "$ac_c_werror_flag"
11037                          || test ! -s conftest.err'
11038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11039   (eval $ac_try) 2>&5
11040   ac_status=$?
11041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11042   (exit $ac_status); }; } &&
11043          { ac_try='test -s conftest.$ac_objext'
11044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11045   (eval $ac_try) 2>&5
11046   ac_status=$?
11047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11048   (exit $ac_status); }; }; then
11049   pgac_cv_c_signed=yes
11050 else
11051   echo "$as_me: failed program was:" >&5
11052 sed 's/^/| /' conftest.$ac_ext >&5
11053
11054 pgac_cv_c_signed=no
11055 fi
11056 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11057 fi
11058 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11059 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11060 if test x"$pgac_cv_c_signed" = xno ; then
11061
11062 cat >>confdefs.h <<\_ACEOF
11063 #define signed
11064 _ACEOF
11065
11066 fi
11067 echo "$as_me:$LINENO: checking for working volatile" >&5
11068 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11069 if test "${ac_cv_c_volatile+set}" = set; then
11070   echo $ECHO_N "(cached) $ECHO_C" >&6
11071 else
11072   cat >conftest.$ac_ext <<_ACEOF
11073 /* confdefs.h.  */
11074 _ACEOF
11075 cat confdefs.h >>conftest.$ac_ext
11076 cat >>conftest.$ac_ext <<_ACEOF
11077 /* end confdefs.h.  */
11078
11079 int
11080 main ()
11081 {
11082
11083 volatile int x;
11084 int * volatile y;
11085   ;
11086   return 0;
11087 }
11088 _ACEOF
11089 rm -f conftest.$ac_objext
11090 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11091   (eval $ac_compile) 2>conftest.er1
11092   ac_status=$?
11093   grep -v '^ *+' conftest.er1 >conftest.err
11094   rm -f conftest.er1
11095   cat conftest.err >&5
11096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11097   (exit $ac_status); } &&
11098          { ac_try='test -z "$ac_c_werror_flag"
11099                          || test ! -s conftest.err'
11100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11101   (eval $ac_try) 2>&5
11102   ac_status=$?
11103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11104   (exit $ac_status); }; } &&
11105          { ac_try='test -s conftest.$ac_objext'
11106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11107   (eval $ac_try) 2>&5
11108   ac_status=$?
11109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11110   (exit $ac_status); }; }; then
11111   ac_cv_c_volatile=yes
11112 else
11113   echo "$as_me: failed program was:" >&5
11114 sed 's/^/| /' conftest.$ac_ext >&5
11115
11116 ac_cv_c_volatile=no
11117 fi
11118 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11119 fi
11120 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11121 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11122 if test $ac_cv_c_volatile = no; then
11123
11124 cat >>confdefs.h <<\_ACEOF
11125 #define volatile
11126 _ACEOF
11127
11128 fi
11129
11130 echo "$as_me:$LINENO: checking for __func__" >&5
11131 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11132 if test "${pgac_cv_funcname_func_support+set}" = set; then
11133   echo $ECHO_N "(cached) $ECHO_C" >&6
11134 else
11135   cat >conftest.$ac_ext <<_ACEOF
11136 /* confdefs.h.  */
11137 _ACEOF
11138 cat confdefs.h >>conftest.$ac_ext
11139 cat >>conftest.$ac_ext <<_ACEOF
11140 /* end confdefs.h.  */
11141 #include <stdio.h>
11142 int
11143 main ()
11144 {
11145 printf("%s\n", __func__);
11146   ;
11147   return 0;
11148 }
11149 _ACEOF
11150 rm -f conftest.$ac_objext
11151 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11152   (eval $ac_compile) 2>conftest.er1
11153   ac_status=$?
11154   grep -v '^ *+' conftest.er1 >conftest.err
11155   rm -f conftest.er1
11156   cat conftest.err >&5
11157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11158   (exit $ac_status); } &&
11159          { ac_try='test -z "$ac_c_werror_flag"
11160                          || test ! -s conftest.err'
11161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11162   (eval $ac_try) 2>&5
11163   ac_status=$?
11164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11165   (exit $ac_status); }; } &&
11166          { ac_try='test -s conftest.$ac_objext'
11167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11168   (eval $ac_try) 2>&5
11169   ac_status=$?
11170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11171   (exit $ac_status); }; }; then
11172   pgac_cv_funcname_func_support=yes
11173 else
11174   echo "$as_me: failed program was:" >&5
11175 sed 's/^/| /' conftest.$ac_ext >&5
11176
11177 pgac_cv_funcname_func_support=no
11178 fi
11179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11180 fi
11181 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11182 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11183 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11184
11185 cat >>confdefs.h <<\_ACEOF
11186 #define HAVE_FUNCNAME__FUNC 1
11187 _ACEOF
11188
11189 else
11190 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11191 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11192 if test "${pgac_cv_funcname_function_support+set}" = set; then
11193   echo $ECHO_N "(cached) $ECHO_C" >&6
11194 else
11195   cat >conftest.$ac_ext <<_ACEOF
11196 /* confdefs.h.  */
11197 _ACEOF
11198 cat confdefs.h >>conftest.$ac_ext
11199 cat >>conftest.$ac_ext <<_ACEOF
11200 /* end confdefs.h.  */
11201 #include <stdio.h>
11202 int
11203 main ()
11204 {
11205 printf("%s\n", __FUNCTION__);
11206   ;
11207   return 0;
11208 }
11209 _ACEOF
11210 rm -f conftest.$ac_objext
11211 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11212   (eval $ac_compile) 2>conftest.er1
11213   ac_status=$?
11214   grep -v '^ *+' conftest.er1 >conftest.err
11215   rm -f conftest.er1
11216   cat conftest.err >&5
11217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11218   (exit $ac_status); } &&
11219          { ac_try='test -z "$ac_c_werror_flag"
11220                          || test ! -s conftest.err'
11221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11222   (eval $ac_try) 2>&5
11223   ac_status=$?
11224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11225   (exit $ac_status); }; } &&
11226          { ac_try='test -s conftest.$ac_objext'
11227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11228   (eval $ac_try) 2>&5
11229   ac_status=$?
11230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11231   (exit $ac_status); }; }; then
11232   pgac_cv_funcname_function_support=yes
11233 else
11234   echo "$as_me: failed program was:" >&5
11235 sed 's/^/| /' conftest.$ac_ext >&5
11236
11237 pgac_cv_funcname_function_support=no
11238 fi
11239 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11240 fi
11241 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11242 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11243 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11244
11245 cat >>confdefs.h <<\_ACEOF
11246 #define HAVE_FUNCNAME__FUNCTION 1
11247 _ACEOF
11248
11249 fi
11250 fi
11251 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11252 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11253 if test "${ac_cv_struct_tm+set}" = set; then
11254   echo $ECHO_N "(cached) $ECHO_C" >&6
11255 else
11256   cat >conftest.$ac_ext <<_ACEOF
11257 /* confdefs.h.  */
11258 _ACEOF
11259 cat confdefs.h >>conftest.$ac_ext
11260 cat >>conftest.$ac_ext <<_ACEOF
11261 /* end confdefs.h.  */
11262 #include <sys/types.h>
11263 #include <time.h>
11264
11265 int
11266 main ()
11267 {
11268 struct tm *tp; tp->tm_sec;
11269   ;
11270   return 0;
11271 }
11272 _ACEOF
11273 rm -f conftest.$ac_objext
11274 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11275   (eval $ac_compile) 2>conftest.er1
11276   ac_status=$?
11277   grep -v '^ *+' conftest.er1 >conftest.err
11278   rm -f conftest.er1
11279   cat conftest.err >&5
11280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281   (exit $ac_status); } &&
11282          { ac_try='test -z "$ac_c_werror_flag"
11283                          || test ! -s conftest.err'
11284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11285   (eval $ac_try) 2>&5
11286   ac_status=$?
11287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11288   (exit $ac_status); }; } &&
11289          { ac_try='test -s conftest.$ac_objext'
11290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11291   (eval $ac_try) 2>&5
11292   ac_status=$?
11293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11294   (exit $ac_status); }; }; then
11295   ac_cv_struct_tm=time.h
11296 else
11297   echo "$as_me: failed program was:" >&5
11298 sed 's/^/| /' conftest.$ac_ext >&5
11299
11300 ac_cv_struct_tm=sys/time.h
11301 fi
11302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11303 fi
11304 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11305 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11306 if test $ac_cv_struct_tm = sys/time.h; then
11307
11308 cat >>confdefs.h <<\_ACEOF
11309 #define TM_IN_SYS_TIME 1
11310 _ACEOF
11311
11312 fi
11313
11314 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11315 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11316 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11317   echo $ECHO_N "(cached) $ECHO_C" >&6
11318 else
11319   cat >conftest.$ac_ext <<_ACEOF
11320 /* confdefs.h.  */
11321 _ACEOF
11322 cat confdefs.h >>conftest.$ac_ext
11323 cat >>conftest.$ac_ext <<_ACEOF
11324 /* end confdefs.h.  */
11325 #include <sys/types.h>
11326 #include <$ac_cv_struct_tm>
11327
11328
11329 int
11330 main ()
11331 {
11332 static struct tm ac_aggr;
11333 if (ac_aggr.tm_zone)
11334 return 0;
11335   ;
11336   return 0;
11337 }
11338 _ACEOF
11339 rm -f conftest.$ac_objext
11340 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11341   (eval $ac_compile) 2>conftest.er1
11342   ac_status=$?
11343   grep -v '^ *+' conftest.er1 >conftest.err
11344   rm -f conftest.er1
11345   cat conftest.err >&5
11346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11347   (exit $ac_status); } &&
11348          { ac_try='test -z "$ac_c_werror_flag"
11349                          || test ! -s conftest.err'
11350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11351   (eval $ac_try) 2>&5
11352   ac_status=$?
11353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11354   (exit $ac_status); }; } &&
11355          { ac_try='test -s conftest.$ac_objext'
11356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11357   (eval $ac_try) 2>&5
11358   ac_status=$?
11359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11360   (exit $ac_status); }; }; then
11361   ac_cv_member_struct_tm_tm_zone=yes
11362 else
11363   echo "$as_me: failed program was:" >&5
11364 sed 's/^/| /' conftest.$ac_ext >&5
11365
11366 cat >conftest.$ac_ext <<_ACEOF
11367 /* confdefs.h.  */
11368 _ACEOF
11369 cat confdefs.h >>conftest.$ac_ext
11370 cat >>conftest.$ac_ext <<_ACEOF
11371 /* end confdefs.h.  */
11372 #include <sys/types.h>
11373 #include <$ac_cv_struct_tm>
11374
11375
11376 int
11377 main ()
11378 {
11379 static struct tm ac_aggr;
11380 if (sizeof ac_aggr.tm_zone)
11381 return 0;
11382   ;
11383   return 0;
11384 }
11385 _ACEOF
11386 rm -f conftest.$ac_objext
11387 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11388   (eval $ac_compile) 2>conftest.er1
11389   ac_status=$?
11390   grep -v '^ *+' conftest.er1 >conftest.err
11391   rm -f conftest.er1
11392   cat conftest.err >&5
11393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394   (exit $ac_status); } &&
11395          { ac_try='test -z "$ac_c_werror_flag"
11396                          || test ! -s conftest.err'
11397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11398   (eval $ac_try) 2>&5
11399   ac_status=$?
11400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11401   (exit $ac_status); }; } &&
11402          { ac_try='test -s conftest.$ac_objext'
11403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11404   (eval $ac_try) 2>&5
11405   ac_status=$?
11406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11407   (exit $ac_status); }; }; then
11408   ac_cv_member_struct_tm_tm_zone=yes
11409 else
11410   echo "$as_me: failed program was:" >&5
11411 sed 's/^/| /' conftest.$ac_ext >&5
11412
11413 ac_cv_member_struct_tm_tm_zone=no
11414 fi
11415 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11416 fi
11417 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11418 fi
11419 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11420 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11421 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11422
11423 cat >>confdefs.h <<_ACEOF
11424 #define HAVE_STRUCT_TM_TM_ZONE 1
11425 _ACEOF
11426
11427
11428 fi
11429
11430 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11431
11432 cat >>confdefs.h <<\_ACEOF
11433 #define HAVE_TM_ZONE 1
11434 _ACEOF
11435
11436 fi
11437 echo "$as_me:$LINENO: checking for tzname" >&5
11438 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11439 if test "${ac_cv_var_tzname+set}" = set; then
11440   echo $ECHO_N "(cached) $ECHO_C" >&6
11441 else
11442   cat >conftest.$ac_ext <<_ACEOF
11443 /* confdefs.h.  */
11444 _ACEOF
11445 cat confdefs.h >>conftest.$ac_ext
11446 cat >>conftest.$ac_ext <<_ACEOF
11447 /* end confdefs.h.  */
11448 #include <time.h>
11449 #ifndef tzname /* For SGI.  */
11450 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11451 #endif
11452
11453 int
11454 main ()
11455 {
11456 atoi(*tzname);
11457   ;
11458   return 0;
11459 }
11460 _ACEOF
11461 rm -f conftest.$ac_objext conftest$ac_exeext
11462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11463   (eval $ac_link) 2>conftest.er1
11464   ac_status=$?
11465   grep -v '^ *+' conftest.er1 >conftest.err
11466   rm -f conftest.er1
11467   cat conftest.err >&5
11468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469   (exit $ac_status); } &&
11470          { ac_try='test -z "$ac_c_werror_flag"
11471                          || test ! -s conftest.err'
11472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11473   (eval $ac_try) 2>&5
11474   ac_status=$?
11475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476   (exit $ac_status); }; } &&
11477          { ac_try='test -s conftest$ac_exeext'
11478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11479   (eval $ac_try) 2>&5
11480   ac_status=$?
11481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482   (exit $ac_status); }; }; then
11483   ac_cv_var_tzname=yes
11484 else
11485   echo "$as_me: failed program was:" >&5
11486 sed 's/^/| /' conftest.$ac_ext >&5
11487
11488 ac_cv_var_tzname=no
11489 fi
11490 rm -f conftest.err conftest.$ac_objext \
11491       conftest$ac_exeext conftest.$ac_ext
11492 fi
11493 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11494 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11495 if test $ac_cv_var_tzname = yes; then
11496
11497 cat >>confdefs.h <<\_ACEOF
11498 #define HAVE_TZNAME 1
11499 _ACEOF
11500
11501 fi
11502
11503 echo "$as_me:$LINENO: checking for union semun" >&5
11504 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11505 if test "${ac_cv_type_union_semun+set}" = set; then
11506   echo $ECHO_N "(cached) $ECHO_C" >&6
11507 else
11508   cat >conftest.$ac_ext <<_ACEOF
11509 /* confdefs.h.  */
11510 _ACEOF
11511 cat confdefs.h >>conftest.$ac_ext
11512 cat >>conftest.$ac_ext <<_ACEOF
11513 /* end confdefs.h.  */
11514 #include <sys/types.h>
11515 #include <sys/ipc.h>
11516 #include <sys/sem.h>
11517
11518 int
11519 main ()
11520 {
11521 if ((union semun *) 0)
11522   return 0;
11523 if (sizeof (union semun))
11524   return 0;
11525   ;
11526   return 0;
11527 }
11528 _ACEOF
11529 rm -f conftest.$ac_objext
11530 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11531   (eval $ac_compile) 2>conftest.er1
11532   ac_status=$?
11533   grep -v '^ *+' conftest.er1 >conftest.err
11534   rm -f conftest.er1
11535   cat conftest.err >&5
11536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11537   (exit $ac_status); } &&
11538          { ac_try='test -z "$ac_c_werror_flag"
11539                          || test ! -s conftest.err'
11540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11541   (eval $ac_try) 2>&5
11542   ac_status=$?
11543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11544   (exit $ac_status); }; } &&
11545          { ac_try='test -s conftest.$ac_objext'
11546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11547   (eval $ac_try) 2>&5
11548   ac_status=$?
11549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550   (exit $ac_status); }; }; then
11551   ac_cv_type_union_semun=yes
11552 else
11553   echo "$as_me: failed program was:" >&5
11554 sed 's/^/| /' conftest.$ac_ext >&5
11555
11556 ac_cv_type_union_semun=no
11557 fi
11558 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11559 fi
11560 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11561 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11562 if test $ac_cv_type_union_semun = yes; then
11563
11564 cat >>confdefs.h <<_ACEOF
11565 #define HAVE_UNION_SEMUN 1
11566 _ACEOF
11567
11568
11569 fi
11570
11571 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11572 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11573 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11574   echo $ECHO_N "(cached) $ECHO_C" >&6
11575 else
11576   cat >conftest.$ac_ext <<_ACEOF
11577 /* confdefs.h.  */
11578 _ACEOF
11579 cat confdefs.h >>conftest.$ac_ext
11580 cat >>conftest.$ac_ext <<_ACEOF
11581 /* end confdefs.h.  */
11582 #include <sys/types.h>
11583 #ifdef HAVE_SYS_UN_H
11584 #include <sys/un.h>
11585 #endif
11586
11587
11588 int
11589 main ()
11590 {
11591 if ((struct sockaddr_un *) 0)
11592   return 0;
11593 if (sizeof (struct sockaddr_un))
11594   return 0;
11595   ;
11596   return 0;
11597 }
11598 _ACEOF
11599 rm -f conftest.$ac_objext
11600 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11601   (eval $ac_compile) 2>conftest.er1
11602   ac_status=$?
11603   grep -v '^ *+' conftest.er1 >conftest.err
11604   rm -f conftest.er1
11605   cat conftest.err >&5
11606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607   (exit $ac_status); } &&
11608          { ac_try='test -z "$ac_c_werror_flag"
11609                          || test ! -s conftest.err'
11610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11611   (eval $ac_try) 2>&5
11612   ac_status=$?
11613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11614   (exit $ac_status); }; } &&
11615          { ac_try='test -s conftest.$ac_objext'
11616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11617   (eval $ac_try) 2>&5
11618   ac_status=$?
11619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620   (exit $ac_status); }; }; then
11621   ac_cv_type_struct_sockaddr_un=yes
11622 else
11623   echo "$as_me: failed program was:" >&5
11624 sed 's/^/| /' conftest.$ac_ext >&5
11625
11626 ac_cv_type_struct_sockaddr_un=no
11627 fi
11628 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11629 fi
11630 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11631 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11632 if test $ac_cv_type_struct_sockaddr_un = yes; then
11633
11634 cat >>confdefs.h <<_ACEOF
11635 #define HAVE_STRUCT_SOCKADDR_UN 1
11636 _ACEOF
11637
11638
11639 cat >>confdefs.h <<\_ACEOF
11640 #define HAVE_UNIX_SOCKETS 1
11641 _ACEOF
11642
11643 fi
11644
11645 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11646 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11647 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11648   echo $ECHO_N "(cached) $ECHO_C" >&6
11649 else
11650   cat >conftest.$ac_ext <<_ACEOF
11651 /* confdefs.h.  */
11652 _ACEOF
11653 cat confdefs.h >>conftest.$ac_ext
11654 cat >>conftest.$ac_ext <<_ACEOF
11655 /* end confdefs.h.  */
11656 #include <sys/types.h>
11657 #ifdef HAVE_SYS_SOCKET_H
11658 #include <sys/socket.h>
11659 #endif
11660
11661
11662 int
11663 main ()
11664 {
11665 if ((struct sockaddr_storage *) 0)
11666   return 0;
11667 if (sizeof (struct sockaddr_storage))
11668   return 0;
11669   ;
11670   return 0;
11671 }
11672 _ACEOF
11673 rm -f conftest.$ac_objext
11674 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11675   (eval $ac_compile) 2>conftest.er1
11676   ac_status=$?
11677   grep -v '^ *+' conftest.er1 >conftest.err
11678   rm -f conftest.er1
11679   cat conftest.err >&5
11680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11681   (exit $ac_status); } &&
11682          { ac_try='test -z "$ac_c_werror_flag"
11683                          || test ! -s conftest.err'
11684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11685   (eval $ac_try) 2>&5
11686   ac_status=$?
11687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11688   (exit $ac_status); }; } &&
11689          { ac_try='test -s conftest.$ac_objext'
11690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11691   (eval $ac_try) 2>&5
11692   ac_status=$?
11693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11694   (exit $ac_status); }; }; then
11695   ac_cv_type_struct_sockaddr_storage=yes
11696 else
11697   echo "$as_me: failed program was:" >&5
11698 sed 's/^/| /' conftest.$ac_ext >&5
11699
11700 ac_cv_type_struct_sockaddr_storage=no
11701 fi
11702 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11703 fi
11704 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11705 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11706 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11707
11708 cat >>confdefs.h <<_ACEOF
11709 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11710 _ACEOF
11711
11712
11713 fi
11714
11715 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11716 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11717 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11718   echo $ECHO_N "(cached) $ECHO_C" >&6
11719 else
11720   cat >conftest.$ac_ext <<_ACEOF
11721 /* confdefs.h.  */
11722 _ACEOF
11723 cat confdefs.h >>conftest.$ac_ext
11724 cat >>conftest.$ac_ext <<_ACEOF
11725 /* end confdefs.h.  */
11726 #include <sys/types.h>
11727 #ifdef HAVE_SYS_SOCKET_H
11728 #include <sys/socket.h>
11729 #endif
11730
11731
11732 int
11733 main ()
11734 {
11735 static struct sockaddr_storage ac_aggr;
11736 if (ac_aggr.ss_family)
11737 return 0;
11738   ;
11739   return 0;
11740 }
11741 _ACEOF
11742 rm -f conftest.$ac_objext
11743 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11744   (eval $ac_compile) 2>conftest.er1
11745   ac_status=$?
11746   grep -v '^ *+' conftest.er1 >conftest.err
11747   rm -f conftest.er1
11748   cat conftest.err >&5
11749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750   (exit $ac_status); } &&
11751          { ac_try='test -z "$ac_c_werror_flag"
11752                          || test ! -s conftest.err'
11753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11754   (eval $ac_try) 2>&5
11755   ac_status=$?
11756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11757   (exit $ac_status); }; } &&
11758          { ac_try='test -s conftest.$ac_objext'
11759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11760   (eval $ac_try) 2>&5
11761   ac_status=$?
11762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763   (exit $ac_status); }; }; then
11764   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11765 else
11766   echo "$as_me: failed program was:" >&5
11767 sed 's/^/| /' conftest.$ac_ext >&5
11768
11769 cat >conftest.$ac_ext <<_ACEOF
11770 /* confdefs.h.  */
11771 _ACEOF
11772 cat confdefs.h >>conftest.$ac_ext
11773 cat >>conftest.$ac_ext <<_ACEOF
11774 /* end confdefs.h.  */
11775 #include <sys/types.h>
11776 #ifdef HAVE_SYS_SOCKET_H
11777 #include <sys/socket.h>
11778 #endif
11779
11780
11781 int
11782 main ()
11783 {
11784 static struct sockaddr_storage ac_aggr;
11785 if (sizeof ac_aggr.ss_family)
11786 return 0;
11787   ;
11788   return 0;
11789 }
11790 _ACEOF
11791 rm -f conftest.$ac_objext
11792 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11793   (eval $ac_compile) 2>conftest.er1
11794   ac_status=$?
11795   grep -v '^ *+' conftest.er1 >conftest.err
11796   rm -f conftest.er1
11797   cat conftest.err >&5
11798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11799   (exit $ac_status); } &&
11800          { ac_try='test -z "$ac_c_werror_flag"
11801                          || test ! -s conftest.err'
11802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11803   (eval $ac_try) 2>&5
11804   ac_status=$?
11805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11806   (exit $ac_status); }; } &&
11807          { ac_try='test -s conftest.$ac_objext'
11808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11809   (eval $ac_try) 2>&5
11810   ac_status=$?
11811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812   (exit $ac_status); }; }; then
11813   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11814 else
11815   echo "$as_me: failed program was:" >&5
11816 sed 's/^/| /' conftest.$ac_ext >&5
11817
11818 ac_cv_member_struct_sockaddr_storage_ss_family=no
11819 fi
11820 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11821 fi
11822 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11823 fi
11824 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11825 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11826 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11827
11828 cat >>confdefs.h <<_ACEOF
11829 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11830 _ACEOF
11831
11832
11833 fi
11834 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11835 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11836 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11837   echo $ECHO_N "(cached) $ECHO_C" >&6
11838 else
11839   cat >conftest.$ac_ext <<_ACEOF
11840 /* confdefs.h.  */
11841 _ACEOF
11842 cat confdefs.h >>conftest.$ac_ext
11843 cat >>conftest.$ac_ext <<_ACEOF
11844 /* end confdefs.h.  */
11845 #include <sys/types.h>
11846 #ifdef HAVE_SYS_SOCKET_H
11847 #include <sys/socket.h>
11848 #endif
11849
11850
11851 int
11852 main ()
11853 {
11854 static struct sockaddr_storage ac_aggr;
11855 if (ac_aggr.__ss_family)
11856 return 0;
11857   ;
11858   return 0;
11859 }
11860 _ACEOF
11861 rm -f conftest.$ac_objext
11862 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11863   (eval $ac_compile) 2>conftest.er1
11864   ac_status=$?
11865   grep -v '^ *+' conftest.er1 >conftest.err
11866   rm -f conftest.er1
11867   cat conftest.err >&5
11868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11869   (exit $ac_status); } &&
11870          { ac_try='test -z "$ac_c_werror_flag"
11871                          || test ! -s conftest.err'
11872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11873   (eval $ac_try) 2>&5
11874   ac_status=$?
11875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11876   (exit $ac_status); }; } &&
11877          { ac_try='test -s conftest.$ac_objext'
11878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11879   (eval $ac_try) 2>&5
11880   ac_status=$?
11881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11882   (exit $ac_status); }; }; then
11883   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11884 else
11885   echo "$as_me: failed program was:" >&5
11886 sed 's/^/| /' conftest.$ac_ext >&5
11887
11888 cat >conftest.$ac_ext <<_ACEOF
11889 /* confdefs.h.  */
11890 _ACEOF
11891 cat confdefs.h >>conftest.$ac_ext
11892 cat >>conftest.$ac_ext <<_ACEOF
11893 /* end confdefs.h.  */
11894 #include <sys/types.h>
11895 #ifdef HAVE_SYS_SOCKET_H
11896 #include <sys/socket.h>
11897 #endif
11898
11899
11900 int
11901 main ()
11902 {
11903 static struct sockaddr_storage ac_aggr;
11904 if (sizeof ac_aggr.__ss_family)
11905 return 0;
11906   ;
11907   return 0;
11908 }
11909 _ACEOF
11910 rm -f conftest.$ac_objext
11911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11912   (eval $ac_compile) 2>conftest.er1
11913   ac_status=$?
11914   grep -v '^ *+' conftest.er1 >conftest.err
11915   rm -f conftest.er1
11916   cat conftest.err >&5
11917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918   (exit $ac_status); } &&
11919          { ac_try='test -z "$ac_c_werror_flag"
11920                          || test ! -s conftest.err'
11921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11922   (eval $ac_try) 2>&5
11923   ac_status=$?
11924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11925   (exit $ac_status); }; } &&
11926          { ac_try='test -s conftest.$ac_objext'
11927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11928   (eval $ac_try) 2>&5
11929   ac_status=$?
11930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11931   (exit $ac_status); }; }; then
11932   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11933 else
11934   echo "$as_me: failed program was:" >&5
11935 sed 's/^/| /' conftest.$ac_ext >&5
11936
11937 ac_cv_member_struct_sockaddr_storage___ss_family=no
11938 fi
11939 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11940 fi
11941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11942 fi
11943 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
11944 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
11945 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
11946
11947 cat >>confdefs.h <<_ACEOF
11948 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11949 _ACEOF
11950
11951
11952 fi
11953 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
11954 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
11955 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
11956   echo $ECHO_N "(cached) $ECHO_C" >&6
11957 else
11958   cat >conftest.$ac_ext <<_ACEOF
11959 /* confdefs.h.  */
11960 _ACEOF
11961 cat confdefs.h >>conftest.$ac_ext
11962 cat >>conftest.$ac_ext <<_ACEOF
11963 /* end confdefs.h.  */
11964 #include <sys/types.h>
11965 #ifdef HAVE_SYS_SOCKET_H
11966 #include <sys/socket.h>
11967 #endif
11968
11969
11970 int
11971 main ()
11972 {
11973 static struct sockaddr_storage ac_aggr;
11974 if (ac_aggr.ss_len)
11975 return 0;
11976   ;
11977   return 0;
11978 }
11979 _ACEOF
11980 rm -f conftest.$ac_objext
11981 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11982   (eval $ac_compile) 2>conftest.er1
11983   ac_status=$?
11984   grep -v '^ *+' conftest.er1 >conftest.err
11985   rm -f conftest.er1
11986   cat conftest.err >&5
11987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11988   (exit $ac_status); } &&
11989          { ac_try='test -z "$ac_c_werror_flag"
11990                          || test ! -s conftest.err'
11991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11992   (eval $ac_try) 2>&5
11993   ac_status=$?
11994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11995   (exit $ac_status); }; } &&
11996          { ac_try='test -s conftest.$ac_objext'
11997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11998   (eval $ac_try) 2>&5
11999   ac_status=$?
12000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12001   (exit $ac_status); }; }; then
12002   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12003 else
12004   echo "$as_me: failed program was:" >&5
12005 sed 's/^/| /' conftest.$ac_ext >&5
12006
12007 cat >conftest.$ac_ext <<_ACEOF
12008 /* confdefs.h.  */
12009 _ACEOF
12010 cat confdefs.h >>conftest.$ac_ext
12011 cat >>conftest.$ac_ext <<_ACEOF
12012 /* end confdefs.h.  */
12013 #include <sys/types.h>
12014 #ifdef HAVE_SYS_SOCKET_H
12015 #include <sys/socket.h>
12016 #endif
12017
12018
12019 int
12020 main ()
12021 {
12022 static struct sockaddr_storage ac_aggr;
12023 if (sizeof ac_aggr.ss_len)
12024 return 0;
12025   ;
12026   return 0;
12027 }
12028 _ACEOF
12029 rm -f conftest.$ac_objext
12030 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12031   (eval $ac_compile) 2>conftest.er1
12032   ac_status=$?
12033   grep -v '^ *+' conftest.er1 >conftest.err
12034   rm -f conftest.er1
12035   cat conftest.err >&5
12036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12037   (exit $ac_status); } &&
12038          { ac_try='test -z "$ac_c_werror_flag"
12039                          || test ! -s conftest.err'
12040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12041   (eval $ac_try) 2>&5
12042   ac_status=$?
12043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12044   (exit $ac_status); }; } &&
12045          { ac_try='test -s conftest.$ac_objext'
12046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12047   (eval $ac_try) 2>&5
12048   ac_status=$?
12049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050   (exit $ac_status); }; }; then
12051   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12052 else
12053   echo "$as_me: failed program was:" >&5
12054 sed 's/^/| /' conftest.$ac_ext >&5
12055
12056 ac_cv_member_struct_sockaddr_storage_ss_len=no
12057 fi
12058 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12059 fi
12060 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12061 fi
12062 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12063 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12064 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12065
12066 cat >>confdefs.h <<_ACEOF
12067 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12068 _ACEOF
12069
12070
12071 fi
12072 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12073 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12074 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12075   echo $ECHO_N "(cached) $ECHO_C" >&6
12076 else
12077   cat >conftest.$ac_ext <<_ACEOF
12078 /* confdefs.h.  */
12079 _ACEOF
12080 cat confdefs.h >>conftest.$ac_ext
12081 cat >>conftest.$ac_ext <<_ACEOF
12082 /* end confdefs.h.  */
12083 #include <sys/types.h>
12084 #ifdef HAVE_SYS_SOCKET_H
12085 #include <sys/socket.h>
12086 #endif
12087
12088
12089 int
12090 main ()
12091 {
12092 static struct sockaddr_storage ac_aggr;
12093 if (ac_aggr.__ss_len)
12094 return 0;
12095   ;
12096   return 0;
12097 }
12098 _ACEOF
12099 rm -f conftest.$ac_objext
12100 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12101   (eval $ac_compile) 2>conftest.er1
12102   ac_status=$?
12103   grep -v '^ *+' conftest.er1 >conftest.err
12104   rm -f conftest.er1
12105   cat conftest.err >&5
12106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12107   (exit $ac_status); } &&
12108          { ac_try='test -z "$ac_c_werror_flag"
12109                          || test ! -s conftest.err'
12110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12111   (eval $ac_try) 2>&5
12112   ac_status=$?
12113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12114   (exit $ac_status); }; } &&
12115          { ac_try='test -s conftest.$ac_objext'
12116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12117   (eval $ac_try) 2>&5
12118   ac_status=$?
12119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120   (exit $ac_status); }; }; then
12121   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12122 else
12123   echo "$as_me: failed program was:" >&5
12124 sed 's/^/| /' conftest.$ac_ext >&5
12125
12126 cat >conftest.$ac_ext <<_ACEOF
12127 /* confdefs.h.  */
12128 _ACEOF
12129 cat confdefs.h >>conftest.$ac_ext
12130 cat >>conftest.$ac_ext <<_ACEOF
12131 /* end confdefs.h.  */
12132 #include <sys/types.h>
12133 #ifdef HAVE_SYS_SOCKET_H
12134 #include <sys/socket.h>
12135 #endif
12136
12137
12138 int
12139 main ()
12140 {
12141 static struct sockaddr_storage ac_aggr;
12142 if (sizeof ac_aggr.__ss_len)
12143 return 0;
12144   ;
12145   return 0;
12146 }
12147 _ACEOF
12148 rm -f conftest.$ac_objext
12149 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12150   (eval $ac_compile) 2>conftest.er1
12151   ac_status=$?
12152   grep -v '^ *+' conftest.er1 >conftest.err
12153   rm -f conftest.er1
12154   cat conftest.err >&5
12155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12156   (exit $ac_status); } &&
12157          { ac_try='test -z "$ac_c_werror_flag"
12158                          || test ! -s conftest.err'
12159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12160   (eval $ac_try) 2>&5
12161   ac_status=$?
12162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12163   (exit $ac_status); }; } &&
12164          { ac_try='test -s conftest.$ac_objext'
12165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12166   (eval $ac_try) 2>&5
12167   ac_status=$?
12168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12169   (exit $ac_status); }; }; then
12170   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12171 else
12172   echo "$as_me: failed program was:" >&5
12173 sed 's/^/| /' conftest.$ac_ext >&5
12174
12175 ac_cv_member_struct_sockaddr_storage___ss_len=no
12176 fi
12177 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12178 fi
12179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12180 fi
12181 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12182 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12183 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12184
12185 cat >>confdefs.h <<_ACEOF
12186 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12187 _ACEOF
12188
12189
12190 fi
12191 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12192 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12193 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12194   echo $ECHO_N "(cached) $ECHO_C" >&6
12195 else
12196   cat >conftest.$ac_ext <<_ACEOF
12197 /* confdefs.h.  */
12198 _ACEOF
12199 cat confdefs.h >>conftest.$ac_ext
12200 cat >>conftest.$ac_ext <<_ACEOF
12201 /* end confdefs.h.  */
12202 #include <sys/types.h>
12203 #ifdef HAVE_SYS_SOCKET_H
12204 #include <sys/socket.h>
12205 #endif
12206
12207
12208 int
12209 main ()
12210 {
12211 static struct sockaddr ac_aggr;
12212 if (ac_aggr.sa_len)
12213 return 0;
12214   ;
12215   return 0;
12216 }
12217 _ACEOF
12218 rm -f conftest.$ac_objext
12219 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12220   (eval $ac_compile) 2>conftest.er1
12221   ac_status=$?
12222   grep -v '^ *+' conftest.er1 >conftest.err
12223   rm -f conftest.er1
12224   cat conftest.err >&5
12225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12226   (exit $ac_status); } &&
12227          { ac_try='test -z "$ac_c_werror_flag"
12228                          || test ! -s conftest.err'
12229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12230   (eval $ac_try) 2>&5
12231   ac_status=$?
12232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12233   (exit $ac_status); }; } &&
12234          { ac_try='test -s conftest.$ac_objext'
12235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12236   (eval $ac_try) 2>&5
12237   ac_status=$?
12238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12239   (exit $ac_status); }; }; then
12240   ac_cv_member_struct_sockaddr_sa_len=yes
12241 else
12242   echo "$as_me: failed program was:" >&5
12243 sed 's/^/| /' conftest.$ac_ext >&5
12244
12245 cat >conftest.$ac_ext <<_ACEOF
12246 /* confdefs.h.  */
12247 _ACEOF
12248 cat confdefs.h >>conftest.$ac_ext
12249 cat >>conftest.$ac_ext <<_ACEOF
12250 /* end confdefs.h.  */
12251 #include <sys/types.h>
12252 #ifdef HAVE_SYS_SOCKET_H
12253 #include <sys/socket.h>
12254 #endif
12255
12256
12257 int
12258 main ()
12259 {
12260 static struct sockaddr ac_aggr;
12261 if (sizeof ac_aggr.sa_len)
12262 return 0;
12263   ;
12264   return 0;
12265 }
12266 _ACEOF
12267 rm -f conftest.$ac_objext
12268 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12269   (eval $ac_compile) 2>conftest.er1
12270   ac_status=$?
12271   grep -v '^ *+' conftest.er1 >conftest.err
12272   rm -f conftest.er1
12273   cat conftest.err >&5
12274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12275   (exit $ac_status); } &&
12276          { ac_try='test -z "$ac_c_werror_flag"
12277                          || test ! -s conftest.err'
12278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12279   (eval $ac_try) 2>&5
12280   ac_status=$?
12281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12282   (exit $ac_status); }; } &&
12283          { ac_try='test -s conftest.$ac_objext'
12284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12285   (eval $ac_try) 2>&5
12286   ac_status=$?
12287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12288   (exit $ac_status); }; }; then
12289   ac_cv_member_struct_sockaddr_sa_len=yes
12290 else
12291   echo "$as_me: failed program was:" >&5
12292 sed 's/^/| /' conftest.$ac_ext >&5
12293
12294 ac_cv_member_struct_sockaddr_sa_len=no
12295 fi
12296 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12297 fi
12298 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12299 fi
12300 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12301 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12302 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12303
12304 cat >>confdefs.h <<_ACEOF
12305 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12306 _ACEOF
12307
12308
12309 fi
12310
12311 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12312 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12313 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12314   echo $ECHO_N "(cached) $ECHO_C" >&6
12315 else
12316   cat >conftest.$ac_ext <<_ACEOF
12317 /* confdefs.h.  */
12318 _ACEOF
12319 cat confdefs.h >>conftest.$ac_ext
12320 cat >>conftest.$ac_ext <<_ACEOF
12321 /* end confdefs.h.  */
12322 #include <sys/types.h>
12323 #include <sys/socket.h>
12324 #include <netdb.h>
12325
12326
12327 int
12328 main ()
12329 {
12330 if ((struct addrinfo *) 0)
12331   return 0;
12332 if (sizeof (struct addrinfo))
12333   return 0;
12334   ;
12335   return 0;
12336 }
12337 _ACEOF
12338 rm -f conftest.$ac_objext
12339 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12340   (eval $ac_compile) 2>conftest.er1
12341   ac_status=$?
12342   grep -v '^ *+' conftest.er1 >conftest.err
12343   rm -f conftest.er1
12344   cat conftest.err >&5
12345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12346   (exit $ac_status); } &&
12347          { ac_try='test -z "$ac_c_werror_flag"
12348                          || test ! -s conftest.err'
12349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12350   (eval $ac_try) 2>&5
12351   ac_status=$?
12352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12353   (exit $ac_status); }; } &&
12354          { ac_try='test -s conftest.$ac_objext'
12355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12356   (eval $ac_try) 2>&5
12357   ac_status=$?
12358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12359   (exit $ac_status); }; }; then
12360   ac_cv_type_struct_addrinfo=yes
12361 else
12362   echo "$as_me: failed program was:" >&5
12363 sed 's/^/| /' conftest.$ac_ext >&5
12364
12365 ac_cv_type_struct_addrinfo=no
12366 fi
12367 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12368 fi
12369 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12370 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12371 if test $ac_cv_type_struct_addrinfo = yes; then
12372
12373 cat >>confdefs.h <<_ACEOF
12374 #define HAVE_STRUCT_ADDRINFO 1
12375 _ACEOF
12376
12377
12378 fi
12379
12380
12381 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12382 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12383 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12384   echo $ECHO_N "(cached) $ECHO_C" >&6
12385 else
12386   cat >conftest.$ac_ext <<_ACEOF
12387 /* confdefs.h.  */
12388 _ACEOF
12389 cat confdefs.h >>conftest.$ac_ext
12390 cat >>conftest.$ac_ext <<_ACEOF
12391 /* end confdefs.h.  */
12392 #include <sys/param.h>
12393 #include <sys/types.h>
12394 #include <sys/socket.h>
12395 #include <sys/ucred.h>
12396
12397 int
12398 main ()
12399 {
12400 if ((struct cmsgcred *) 0)
12401   return 0;
12402 if (sizeof (struct cmsgcred))
12403   return 0;
12404   ;
12405   return 0;
12406 }
12407 _ACEOF
12408 rm -f conftest.$ac_objext
12409 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12410   (eval $ac_compile) 2>conftest.er1
12411   ac_status=$?
12412   grep -v '^ *+' conftest.er1 >conftest.err
12413   rm -f conftest.er1
12414   cat conftest.err >&5
12415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12416   (exit $ac_status); } &&
12417          { ac_try='test -z "$ac_c_werror_flag"
12418                          || test ! -s conftest.err'
12419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12420   (eval $ac_try) 2>&5
12421   ac_status=$?
12422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12423   (exit $ac_status); }; } &&
12424          { ac_try='test -s conftest.$ac_objext'
12425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12426   (eval $ac_try) 2>&5
12427   ac_status=$?
12428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12429   (exit $ac_status); }; }; then
12430   ac_cv_type_struct_cmsgcred=yes
12431 else
12432   echo "$as_me: failed program was:" >&5
12433 sed 's/^/| /' conftest.$ac_ext >&5
12434
12435 ac_cv_type_struct_cmsgcred=no
12436 fi
12437 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12438 fi
12439 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12440 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12441 if test $ac_cv_type_struct_cmsgcred = yes; then
12442
12443 cat >>confdefs.h <<_ACEOF
12444 #define HAVE_STRUCT_CMSGCRED 1
12445 _ACEOF
12446
12447
12448 fi
12449 echo "$as_me:$LINENO: checking for struct fcred" >&5
12450 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12451 if test "${ac_cv_type_struct_fcred+set}" = set; then
12452   echo $ECHO_N "(cached) $ECHO_C" >&6
12453 else
12454   cat >conftest.$ac_ext <<_ACEOF
12455 /* confdefs.h.  */
12456 _ACEOF
12457 cat confdefs.h >>conftest.$ac_ext
12458 cat >>conftest.$ac_ext <<_ACEOF
12459 /* end confdefs.h.  */
12460 #include <sys/param.h>
12461 #include <sys/types.h>
12462 #include <sys/socket.h>
12463 #include <sys/ucred.h>
12464
12465 int
12466 main ()
12467 {
12468 if ((struct fcred *) 0)
12469   return 0;
12470 if (sizeof (struct fcred))
12471   return 0;
12472   ;
12473   return 0;
12474 }
12475 _ACEOF
12476 rm -f conftest.$ac_objext
12477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12478   (eval $ac_compile) 2>conftest.er1
12479   ac_status=$?
12480   grep -v '^ *+' conftest.er1 >conftest.err
12481   rm -f conftest.er1
12482   cat conftest.err >&5
12483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12484   (exit $ac_status); } &&
12485          { ac_try='test -z "$ac_c_werror_flag"
12486                          || test ! -s conftest.err'
12487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12488   (eval $ac_try) 2>&5
12489   ac_status=$?
12490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12491   (exit $ac_status); }; } &&
12492          { ac_try='test -s conftest.$ac_objext'
12493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12494   (eval $ac_try) 2>&5
12495   ac_status=$?
12496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497   (exit $ac_status); }; }; then
12498   ac_cv_type_struct_fcred=yes
12499 else
12500   echo "$as_me: failed program was:" >&5
12501 sed 's/^/| /' conftest.$ac_ext >&5
12502
12503 ac_cv_type_struct_fcred=no
12504 fi
12505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12506 fi
12507 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12508 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12509 if test $ac_cv_type_struct_fcred = yes; then
12510
12511 cat >>confdefs.h <<_ACEOF
12512 #define HAVE_STRUCT_FCRED 1
12513 _ACEOF
12514
12515
12516 fi
12517 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12518 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12519 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12520   echo $ECHO_N "(cached) $ECHO_C" >&6
12521 else
12522   cat >conftest.$ac_ext <<_ACEOF
12523 /* confdefs.h.  */
12524 _ACEOF
12525 cat confdefs.h >>conftest.$ac_ext
12526 cat >>conftest.$ac_ext <<_ACEOF
12527 /* end confdefs.h.  */
12528 #include <sys/param.h>
12529 #include <sys/types.h>
12530 #include <sys/socket.h>
12531 #include <sys/ucred.h>
12532
12533 int
12534 main ()
12535 {
12536 if ((struct sockcred *) 0)
12537   return 0;
12538 if (sizeof (struct sockcred))
12539   return 0;
12540   ;
12541   return 0;
12542 }
12543 _ACEOF
12544 rm -f conftest.$ac_objext
12545 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12546   (eval $ac_compile) 2>conftest.er1
12547   ac_status=$?
12548   grep -v '^ *+' conftest.er1 >conftest.err
12549   rm -f conftest.er1
12550   cat conftest.err >&5
12551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552   (exit $ac_status); } &&
12553          { ac_try='test -z "$ac_c_werror_flag"
12554                          || test ! -s conftest.err'
12555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556   (eval $ac_try) 2>&5
12557   ac_status=$?
12558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559   (exit $ac_status); }; } &&
12560          { ac_try='test -s conftest.$ac_objext'
12561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12562   (eval $ac_try) 2>&5
12563   ac_status=$?
12564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565   (exit $ac_status); }; }; then
12566   ac_cv_type_struct_sockcred=yes
12567 else
12568   echo "$as_me: failed program was:" >&5
12569 sed 's/^/| /' conftest.$ac_ext >&5
12570
12571 ac_cv_type_struct_sockcred=no
12572 fi
12573 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12574 fi
12575 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12576 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12577 if test $ac_cv_type_struct_sockcred = yes; then
12578
12579 cat >>confdefs.h <<_ACEOF
12580 #define HAVE_STRUCT_SOCKCRED 1
12581 _ACEOF
12582
12583
12584 fi
12585
12586
12587 echo "$as_me:$LINENO: checking for struct option" >&5
12588 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12589 if test "${ac_cv_type_struct_option+set}" = set; then
12590   echo $ECHO_N "(cached) $ECHO_C" >&6
12591 else
12592   cat >conftest.$ac_ext <<_ACEOF
12593 /* confdefs.h.  */
12594 _ACEOF
12595 cat confdefs.h >>conftest.$ac_ext
12596 cat >>conftest.$ac_ext <<_ACEOF
12597 /* end confdefs.h.  */
12598 #ifdef HAVE_GETOPT_H
12599 #include <getopt.h>
12600 #endif
12601
12602 int
12603 main ()
12604 {
12605 if ((struct option *) 0)
12606   return 0;
12607 if (sizeof (struct option))
12608   return 0;
12609   ;
12610   return 0;
12611 }
12612 _ACEOF
12613 rm -f conftest.$ac_objext
12614 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12615   (eval $ac_compile) 2>conftest.er1
12616   ac_status=$?
12617   grep -v '^ *+' conftest.er1 >conftest.err
12618   rm -f conftest.er1
12619   cat conftest.err >&5
12620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12621   (exit $ac_status); } &&
12622          { ac_try='test -z "$ac_c_werror_flag"
12623                          || test ! -s conftest.err'
12624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12625   (eval $ac_try) 2>&5
12626   ac_status=$?
12627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12628   (exit $ac_status); }; } &&
12629          { ac_try='test -s conftest.$ac_objext'
12630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12631   (eval $ac_try) 2>&5
12632   ac_status=$?
12633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12634   (exit $ac_status); }; }; then
12635   ac_cv_type_struct_option=yes
12636 else
12637   echo "$as_me: failed program was:" >&5
12638 sed 's/^/| /' conftest.$ac_ext >&5
12639
12640 ac_cv_type_struct_option=no
12641 fi
12642 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12643 fi
12644 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12645 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12646 if test $ac_cv_type_struct_option = yes; then
12647
12648 cat >>confdefs.h <<_ACEOF
12649 #define HAVE_STRUCT_OPTION 1
12650 _ACEOF
12651
12652
12653 fi
12654
12655
12656 if test "$with_zlib" = yes; then
12657   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12658   # did not).  While we could work around the lack of z_streamp, it
12659   # seems unwise to encourage people to use such old zlib versions...
12660   echo "$as_me:$LINENO: checking for z_streamp" >&5
12661 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12662 if test "${ac_cv_type_z_streamp+set}" = set; then
12663   echo $ECHO_N "(cached) $ECHO_C" >&6
12664 else
12665   cat >conftest.$ac_ext <<_ACEOF
12666 /* confdefs.h.  */
12667 _ACEOF
12668 cat confdefs.h >>conftest.$ac_ext
12669 cat >>conftest.$ac_ext <<_ACEOF
12670 /* end confdefs.h.  */
12671 #include <zlib.h>
12672
12673 int
12674 main ()
12675 {
12676 if ((z_streamp *) 0)
12677   return 0;
12678 if (sizeof (z_streamp))
12679   return 0;
12680   ;
12681   return 0;
12682 }
12683 _ACEOF
12684 rm -f conftest.$ac_objext
12685 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12686   (eval $ac_compile) 2>conftest.er1
12687   ac_status=$?
12688   grep -v '^ *+' conftest.er1 >conftest.err
12689   rm -f conftest.er1
12690   cat conftest.err >&5
12691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12692   (exit $ac_status); } &&
12693          { ac_try='test -z "$ac_c_werror_flag"
12694                          || test ! -s conftest.err'
12695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12696   (eval $ac_try) 2>&5
12697   ac_status=$?
12698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12699   (exit $ac_status); }; } &&
12700          { ac_try='test -s conftest.$ac_objext'
12701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12702   (eval $ac_try) 2>&5
12703   ac_status=$?
12704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705   (exit $ac_status); }; }; then
12706   ac_cv_type_z_streamp=yes
12707 else
12708   echo "$as_me: failed program was:" >&5
12709 sed 's/^/| /' conftest.$ac_ext >&5
12710
12711 ac_cv_type_z_streamp=no
12712 fi
12713 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12714 fi
12715 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12716 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12717 if test $ac_cv_type_z_streamp = yes; then
12718   :
12719 else
12720   { { echo "$as_me:$LINENO: error: zlib version is too old
12721 Use --without-zlib to disable zlib support." >&5
12722 echo "$as_me: error: zlib version is too old
12723 Use --without-zlib to disable zlib support." >&2;}
12724    { (exit 1); exit 1; }; }
12725 fi
12726
12727 fi
12728
12729 if test "$with_krb5" = yes; then
12730 # Check for differences between MIT and Heimdal (KTH) releases
12731   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12732 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12733 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12734   echo $ECHO_N "(cached) $ECHO_C" >&6
12735 else
12736   cat >conftest.$ac_ext <<_ACEOF
12737 /* confdefs.h.  */
12738 _ACEOF
12739 cat confdefs.h >>conftest.$ac_ext
12740 cat >>conftest.$ac_ext <<_ACEOF
12741 /* end confdefs.h.  */
12742 #include <krb5.h>
12743
12744 int
12745 main ()
12746 {
12747 static krb5_ticket ac_aggr;
12748 if (ac_aggr.enc_part2)
12749 return 0;
12750   ;
12751   return 0;
12752 }
12753 _ACEOF
12754 rm -f conftest.$ac_objext
12755 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12756   (eval $ac_compile) 2>conftest.er1
12757   ac_status=$?
12758   grep -v '^ *+' conftest.er1 >conftest.err
12759   rm -f conftest.er1
12760   cat conftest.err >&5
12761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12762   (exit $ac_status); } &&
12763          { ac_try='test -z "$ac_c_werror_flag"
12764                          || test ! -s conftest.err'
12765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12766   (eval $ac_try) 2>&5
12767   ac_status=$?
12768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12769   (exit $ac_status); }; } &&
12770          { ac_try='test -s conftest.$ac_objext'
12771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12772   (eval $ac_try) 2>&5
12773   ac_status=$?
12774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12775   (exit $ac_status); }; }; then
12776   ac_cv_member_krb5_ticket_enc_part2=yes
12777 else
12778   echo "$as_me: failed program was:" >&5
12779 sed 's/^/| /' conftest.$ac_ext >&5
12780
12781 cat >conftest.$ac_ext <<_ACEOF
12782 /* confdefs.h.  */
12783 _ACEOF
12784 cat confdefs.h >>conftest.$ac_ext
12785 cat >>conftest.$ac_ext <<_ACEOF
12786 /* end confdefs.h.  */
12787 #include <krb5.h>
12788
12789 int
12790 main ()
12791 {
12792 static krb5_ticket ac_aggr;
12793 if (sizeof ac_aggr.enc_part2)
12794 return 0;
12795   ;
12796   return 0;
12797 }
12798 _ACEOF
12799 rm -f conftest.$ac_objext
12800 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12801   (eval $ac_compile) 2>conftest.er1
12802   ac_status=$?
12803   grep -v '^ *+' conftest.er1 >conftest.err
12804   rm -f conftest.er1
12805   cat conftest.err >&5
12806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12807   (exit $ac_status); } &&
12808          { ac_try='test -z "$ac_c_werror_flag"
12809                          || test ! -s conftest.err'
12810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12811   (eval $ac_try) 2>&5
12812   ac_status=$?
12813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12814   (exit $ac_status); }; } &&
12815          { ac_try='test -s conftest.$ac_objext'
12816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12817   (eval $ac_try) 2>&5
12818   ac_status=$?
12819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12820   (exit $ac_status); }; }; then
12821   ac_cv_member_krb5_ticket_enc_part2=yes
12822 else
12823   echo "$as_me: failed program was:" >&5
12824 sed 's/^/| /' conftest.$ac_ext >&5
12825
12826 ac_cv_member_krb5_ticket_enc_part2=no
12827 fi
12828 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12829 fi
12830 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12831 fi
12832 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12833 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12834 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12835
12836 cat >>confdefs.h <<_ACEOF
12837 #define HAVE_KRB5_TICKET_ENC_PART2 1
12838 _ACEOF
12839
12840
12841 else
12842   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12843 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12844 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12845   echo $ECHO_N "(cached) $ECHO_C" >&6
12846 else
12847   cat >conftest.$ac_ext <<_ACEOF
12848 /* confdefs.h.  */
12849 _ACEOF
12850 cat confdefs.h >>conftest.$ac_ext
12851 cat >>conftest.$ac_ext <<_ACEOF
12852 /* end confdefs.h.  */
12853 #include <krb5.h>
12854
12855 int
12856 main ()
12857 {
12858 static krb5_ticket ac_aggr;
12859 if (ac_aggr.client)
12860 return 0;
12861   ;
12862   return 0;
12863 }
12864 _ACEOF
12865 rm -f conftest.$ac_objext
12866 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12867   (eval $ac_compile) 2>conftest.er1
12868   ac_status=$?
12869   grep -v '^ *+' conftest.er1 >conftest.err
12870   rm -f conftest.er1
12871   cat conftest.err >&5
12872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12873   (exit $ac_status); } &&
12874          { ac_try='test -z "$ac_c_werror_flag"
12875                          || test ! -s conftest.err'
12876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12877   (eval $ac_try) 2>&5
12878   ac_status=$?
12879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12880   (exit $ac_status); }; } &&
12881          { ac_try='test -s conftest.$ac_objext'
12882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12883   (eval $ac_try) 2>&5
12884   ac_status=$?
12885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12886   (exit $ac_status); }; }; then
12887   ac_cv_member_krb5_ticket_client=yes
12888 else
12889   echo "$as_me: failed program was:" >&5
12890 sed 's/^/| /' conftest.$ac_ext >&5
12891
12892 cat >conftest.$ac_ext <<_ACEOF
12893 /* confdefs.h.  */
12894 _ACEOF
12895 cat confdefs.h >>conftest.$ac_ext
12896 cat >>conftest.$ac_ext <<_ACEOF
12897 /* end confdefs.h.  */
12898 #include <krb5.h>
12899
12900 int
12901 main ()
12902 {
12903 static krb5_ticket ac_aggr;
12904 if (sizeof ac_aggr.client)
12905 return 0;
12906   ;
12907   return 0;
12908 }
12909 _ACEOF
12910 rm -f conftest.$ac_objext
12911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12912   (eval $ac_compile) 2>conftest.er1
12913   ac_status=$?
12914   grep -v '^ *+' conftest.er1 >conftest.err
12915   rm -f conftest.er1
12916   cat conftest.err >&5
12917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12918   (exit $ac_status); } &&
12919          { ac_try='test -z "$ac_c_werror_flag"
12920                          || test ! -s conftest.err'
12921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12922   (eval $ac_try) 2>&5
12923   ac_status=$?
12924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12925   (exit $ac_status); }; } &&
12926          { ac_try='test -s conftest.$ac_objext'
12927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12928   (eval $ac_try) 2>&5
12929   ac_status=$?
12930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12931   (exit $ac_status); }; }; then
12932   ac_cv_member_krb5_ticket_client=yes
12933 else
12934   echo "$as_me: failed program was:" >&5
12935 sed 's/^/| /' conftest.$ac_ext >&5
12936
12937 ac_cv_member_krb5_ticket_client=no
12938 fi
12939 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12940 fi
12941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12942 fi
12943 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
12944 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
12945 if test $ac_cv_member_krb5_ticket_client = yes; then
12946
12947 cat >>confdefs.h <<_ACEOF
12948 #define HAVE_KRB5_TICKET_CLIENT 1
12949 _ACEOF
12950
12951
12952 else
12953   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
12954 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
12955    { (exit 1); exit 1; }; }
12956 fi
12957
12958 fi
12959
12960   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
12961 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
12962 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
12963   echo $ECHO_N "(cached) $ECHO_C" >&6
12964 else
12965   cat >conftest.$ac_ext <<_ACEOF
12966 /* confdefs.h.  */
12967 _ACEOF
12968 cat confdefs.h >>conftest.$ac_ext
12969 cat >>conftest.$ac_ext <<_ACEOF
12970 /* end confdefs.h.  */
12971 #include <krb5.h>
12972
12973 int
12974 main ()
12975 {
12976 static krb5_error ac_aggr;
12977 if (ac_aggr.text.data)
12978 return 0;
12979   ;
12980   return 0;
12981 }
12982 _ACEOF
12983 rm -f conftest.$ac_objext
12984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12985   (eval $ac_compile) 2>conftest.er1
12986   ac_status=$?
12987   grep -v '^ *+' conftest.er1 >conftest.err
12988   rm -f conftest.er1
12989   cat conftest.err >&5
12990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12991   (exit $ac_status); } &&
12992          { ac_try='test -z "$ac_c_werror_flag"
12993                          || test ! -s conftest.err'
12994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12995   (eval $ac_try) 2>&5
12996   ac_status=$?
12997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998   (exit $ac_status); }; } &&
12999          { ac_try='test -s conftest.$ac_objext'
13000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13001   (eval $ac_try) 2>&5
13002   ac_status=$?
13003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13004   (exit $ac_status); }; }; then
13005   ac_cv_member_krb5_error_text_data=yes
13006 else
13007   echo "$as_me: failed program was:" >&5
13008 sed 's/^/| /' conftest.$ac_ext >&5
13009
13010 cat >conftest.$ac_ext <<_ACEOF
13011 /* confdefs.h.  */
13012 _ACEOF
13013 cat confdefs.h >>conftest.$ac_ext
13014 cat >>conftest.$ac_ext <<_ACEOF
13015 /* end confdefs.h.  */
13016 #include <krb5.h>
13017
13018 int
13019 main ()
13020 {
13021 static krb5_error ac_aggr;
13022 if (sizeof ac_aggr.text.data)
13023 return 0;
13024   ;
13025   return 0;
13026 }
13027 _ACEOF
13028 rm -f conftest.$ac_objext
13029 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13030   (eval $ac_compile) 2>conftest.er1
13031   ac_status=$?
13032   grep -v '^ *+' conftest.er1 >conftest.err
13033   rm -f conftest.er1
13034   cat conftest.err >&5
13035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036   (exit $ac_status); } &&
13037          { ac_try='test -z "$ac_c_werror_flag"
13038                          || test ! -s conftest.err'
13039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13040   (eval $ac_try) 2>&5
13041   ac_status=$?
13042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13043   (exit $ac_status); }; } &&
13044          { ac_try='test -s conftest.$ac_objext'
13045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13046   (eval $ac_try) 2>&5
13047   ac_status=$?
13048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13049   (exit $ac_status); }; }; then
13050   ac_cv_member_krb5_error_text_data=yes
13051 else
13052   echo "$as_me: failed program was:" >&5
13053 sed 's/^/| /' conftest.$ac_ext >&5
13054
13055 ac_cv_member_krb5_error_text_data=no
13056 fi
13057 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13058 fi
13059 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13060 fi
13061 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13062 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13063 if test $ac_cv_member_krb5_error_text_data = yes; then
13064
13065 cat >>confdefs.h <<_ACEOF
13066 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13067 _ACEOF
13068
13069
13070 else
13071   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13072 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13073 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076   cat >conftest.$ac_ext <<_ACEOF
13077 /* confdefs.h.  */
13078 _ACEOF
13079 cat confdefs.h >>conftest.$ac_ext
13080 cat >>conftest.$ac_ext <<_ACEOF
13081 /* end confdefs.h.  */
13082 #include <krb5.h>
13083
13084 int
13085 main ()
13086 {
13087 static krb5_error ac_aggr;
13088 if (ac_aggr.e_data)
13089 return 0;
13090   ;
13091   return 0;
13092 }
13093 _ACEOF
13094 rm -f conftest.$ac_objext
13095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13096   (eval $ac_compile) 2>conftest.er1
13097   ac_status=$?
13098   grep -v '^ *+' conftest.er1 >conftest.err
13099   rm -f conftest.er1
13100   cat conftest.err >&5
13101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102   (exit $ac_status); } &&
13103          { ac_try='test -z "$ac_c_werror_flag"
13104                          || test ! -s conftest.err'
13105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13106   (eval $ac_try) 2>&5
13107   ac_status=$?
13108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13109   (exit $ac_status); }; } &&
13110          { ac_try='test -s conftest.$ac_objext'
13111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13112   (eval $ac_try) 2>&5
13113   ac_status=$?
13114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13115   (exit $ac_status); }; }; then
13116   ac_cv_member_krb5_error_e_data=yes
13117 else
13118   echo "$as_me: failed program was:" >&5
13119 sed 's/^/| /' conftest.$ac_ext >&5
13120
13121 cat >conftest.$ac_ext <<_ACEOF
13122 /* confdefs.h.  */
13123 _ACEOF
13124 cat confdefs.h >>conftest.$ac_ext
13125 cat >>conftest.$ac_ext <<_ACEOF
13126 /* end confdefs.h.  */
13127 #include <krb5.h>
13128
13129 int
13130 main ()
13131 {
13132 static krb5_error ac_aggr;
13133 if (sizeof ac_aggr.e_data)
13134 return 0;
13135   ;
13136   return 0;
13137 }
13138 _ACEOF
13139 rm -f conftest.$ac_objext
13140 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13141   (eval $ac_compile) 2>conftest.er1
13142   ac_status=$?
13143   grep -v '^ *+' conftest.er1 >conftest.err
13144   rm -f conftest.er1
13145   cat conftest.err >&5
13146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13147   (exit $ac_status); } &&
13148          { ac_try='test -z "$ac_c_werror_flag"
13149                          || test ! -s conftest.err'
13150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13151   (eval $ac_try) 2>&5
13152   ac_status=$?
13153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13154   (exit $ac_status); }; } &&
13155          { ac_try='test -s conftest.$ac_objext'
13156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13157   (eval $ac_try) 2>&5
13158   ac_status=$?
13159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13160   (exit $ac_status); }; }; then
13161   ac_cv_member_krb5_error_e_data=yes
13162 else
13163   echo "$as_me: failed program was:" >&5
13164 sed 's/^/| /' conftest.$ac_ext >&5
13165
13166 ac_cv_member_krb5_error_e_data=no
13167 fi
13168 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13169 fi
13170 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13171 fi
13172 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13173 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13174 if test $ac_cv_member_krb5_error_e_data = yes; then
13175
13176 cat >>confdefs.h <<_ACEOF
13177 #define HAVE_KRB5_ERROR_E_DATA 1
13178 _ACEOF
13179
13180
13181 else
13182   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13183 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13184    { (exit 1); exit 1; }; }
13185 fi
13186
13187 fi
13188
13189 fi
13190
13191
13192 ##
13193 ## Functions, global variables
13194 ##
13195
13196 echo "$as_me:$LINENO: checking for int timezone" >&5
13197 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13198 if test "${pgac_cv_var_int_timezone+set}" = set; then
13199   echo $ECHO_N "(cached) $ECHO_C" >&6
13200 else
13201   cat >conftest.$ac_ext <<_ACEOF
13202 /* confdefs.h.  */
13203 _ACEOF
13204 cat confdefs.h >>conftest.$ac_ext
13205 cat >>conftest.$ac_ext <<_ACEOF
13206 /* end confdefs.h.  */
13207 #include <time.h>
13208 int res;
13209 int
13210 main ()
13211 {
13212 #ifndef __CYGWIN__
13213 res = timezone / 60;
13214 #else
13215 res = _timezone / 60;
13216 #endif
13217   ;
13218   return 0;
13219 }
13220 _ACEOF
13221 rm -f conftest.$ac_objext conftest$ac_exeext
13222 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13223   (eval $ac_link) 2>conftest.er1
13224   ac_status=$?
13225   grep -v '^ *+' conftest.er1 >conftest.err
13226   rm -f conftest.er1
13227   cat conftest.err >&5
13228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13229   (exit $ac_status); } &&
13230          { ac_try='test -z "$ac_c_werror_flag"
13231                          || test ! -s conftest.err'
13232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13233   (eval $ac_try) 2>&5
13234   ac_status=$?
13235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13236   (exit $ac_status); }; } &&
13237          { ac_try='test -s conftest$ac_exeext'
13238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13239   (eval $ac_try) 2>&5
13240   ac_status=$?
13241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242   (exit $ac_status); }; }; then
13243   pgac_cv_var_int_timezone=yes
13244 else
13245   echo "$as_me: failed program was:" >&5
13246 sed 's/^/| /' conftest.$ac_ext >&5
13247
13248 pgac_cv_var_int_timezone=no
13249 fi
13250 rm -f conftest.err conftest.$ac_objext \
13251       conftest$ac_exeext conftest.$ac_ext
13252 fi
13253 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13254 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13255 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13256
13257 cat >>confdefs.h <<\_ACEOF
13258 #define HAVE_INT_TIMEZONE
13259 _ACEOF
13260
13261 fi
13262 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13263 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13264  if test "${ac_cv_func_accept_return+set}" = set; then
13265   echo $ECHO_N "(cached) $ECHO_C" >&6
13266 else
13267    if test "${ac_cv_func_accept_arg1+set}" = set; then
13268   echo $ECHO_N "(cached) $ECHO_C" >&6
13269 else
13270     if test "${ac_cv_func_accept_arg2+set}" = set; then
13271   echo $ECHO_N "(cached) $ECHO_C" >&6
13272 else
13273      if test "${ac_cv_func_accept_arg3+set}" = set; then
13274   echo $ECHO_N "(cached) $ECHO_C" >&6
13275 else
13276       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13277       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13278        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13279         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
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 #ifdef HAVE_SYS_TYPES_H
13287 #include <sys/types.h>
13288 #endif
13289 #ifdef HAVE_SYS_SOCKET_H
13290 #include <sys/socket.h>
13291 #endif
13292 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13293 int
13294 main ()
13295 {
13296
13297   ;
13298   return 0;
13299 }
13300 _ACEOF
13301 rm -f conftest.$ac_objext
13302 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13303   (eval $ac_compile) 2>conftest.er1
13304   ac_status=$?
13305   grep -v '^ *+' conftest.er1 >conftest.err
13306   rm -f conftest.er1
13307   cat conftest.err >&5
13308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13309   (exit $ac_status); } &&
13310          { ac_try='test -z "$ac_c_werror_flag"
13311                          || test ! -s conftest.err'
13312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13313   (eval $ac_try) 2>&5
13314   ac_status=$?
13315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13316   (exit $ac_status); }; } &&
13317          { ac_try='test -s conftest.$ac_objext'
13318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13319   (eval $ac_try) 2>&5
13320   ac_status=$?
13321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13322   (exit $ac_status); }; }; then
13323   ac_not_found=no; break 4
13324 else
13325   echo "$as_me: failed program was:" >&5
13326 sed 's/^/| /' conftest.$ac_ext >&5
13327
13328 ac_not_found=yes
13329 fi
13330 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13331        done
13332       done
13333      done
13334     done
13335     if test "$ac_not_found" = yes; then
13336       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13337 echo "$as_me: error: could not determine argument types" >&2;}
13338    { (exit 1); exit 1; }; }
13339     fi
13340     if test "$ac_cv_func_accept_arg3" = "void"; then
13341       ac_cv_func_accept_arg3=int
13342     fi
13343
13344 fi
13345
13346 fi
13347
13348 fi
13349
13350 fi
13351  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
13352 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13353
13354 cat >>confdefs.h <<_ACEOF
13355 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13356 _ACEOF
13357
13358
13359 cat >>confdefs.h <<_ACEOF
13360 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13361 _ACEOF
13362
13363
13364 cat >>confdefs.h <<_ACEOF
13365 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13366 _ACEOF
13367
13368
13369 cat >>confdefs.h <<_ACEOF
13370 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13371 _ACEOF
13372
13373
13374 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13375 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13376 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13377   echo $ECHO_N "(cached) $ECHO_C" >&6
13378 else
13379   cat >conftest.$ac_ext <<_ACEOF
13380 /* confdefs.h.  */
13381 _ACEOF
13382 cat confdefs.h >>conftest.$ac_ext
13383 cat >>conftest.$ac_ext <<_ACEOF
13384 /* end confdefs.h.  */
13385 #include <sys/time.h>
13386 int
13387 main ()
13388 {
13389 struct timeval *tp;
13390 struct timezone *tzp;
13391 gettimeofday(tp,tzp);
13392   ;
13393   return 0;
13394 }
13395 _ACEOF
13396 rm -f conftest.$ac_objext
13397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13398   (eval $ac_compile) 2>conftest.er1
13399   ac_status=$?
13400   grep -v '^ *+' conftest.er1 >conftest.err
13401   rm -f conftest.er1
13402   cat conftest.err >&5
13403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404   (exit $ac_status); } &&
13405          { ac_try='test -z "$ac_c_werror_flag"
13406                          || test ! -s conftest.err'
13407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13408   (eval $ac_try) 2>&5
13409   ac_status=$?
13410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13411   (exit $ac_status); }; } &&
13412          { ac_try='test -s conftest.$ac_objext'
13413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13414   (eval $ac_try) 2>&5
13415   ac_status=$?
13416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13417   (exit $ac_status); }; }; then
13418   pgac_cv_func_gettimeofday_1arg=no
13419 else
13420   echo "$as_me: failed program was:" >&5
13421 sed 's/^/| /' conftest.$ac_ext >&5
13422
13423 pgac_cv_func_gettimeofday_1arg=yes
13424 fi
13425 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13426 fi
13427 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13428 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13429 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13430
13431 cat >>confdefs.h <<\_ACEOF
13432 #define GETTIMEOFDAY_1ARG
13433 _ACEOF
13434
13435 fi
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459 for ac_func in cbrt dlopen fcvt fdatasync getpeereid getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13460 do
13461 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13462 echo "$as_me:$LINENO: checking for $ac_func" >&5
13463 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13464 if eval "test \"\${$as_ac_var+set}\" = set"; then
13465   echo $ECHO_N "(cached) $ECHO_C" >&6
13466 else
13467   cat >conftest.$ac_ext <<_ACEOF
13468 /* confdefs.h.  */
13469 _ACEOF
13470 cat confdefs.h >>conftest.$ac_ext
13471 cat >>conftest.$ac_ext <<_ACEOF
13472 /* end confdefs.h.  */
13473 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13474    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13475 #define $ac_func innocuous_$ac_func
13476
13477 /* System header to define __stub macros and hopefully few prototypes,
13478     which can conflict with char $ac_func (); below.
13479     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13480     <limits.h> exists even on freestanding compilers.  */
13481
13482 #ifdef __STDC__
13483 # include <limits.h>
13484 #else
13485 # include <assert.h>
13486 #endif
13487
13488 #undef $ac_func
13489
13490 /* Override any gcc2 internal prototype to avoid an error.  */
13491 #ifdef __cplusplus
13492 extern "C"
13493 {
13494 #endif
13495 /* We use char because int might match the return type of a gcc2
13496    builtin and then its argument prototype would still apply.  */
13497 char $ac_func ();
13498 /* The GNU C library defines this for functions which it implements
13499     to always fail with ENOSYS.  Some functions are actually named
13500     something starting with __ and the normal name is an alias.  */
13501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13502 choke me
13503 #else
13504 char (*f) () = $ac_func;
13505 #endif
13506 #ifdef __cplusplus
13507 }
13508 #endif
13509
13510 int
13511 main ()
13512 {
13513 return f != $ac_func;
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 rm -f conftest.$ac_objext conftest$ac_exeext
13519 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13520   (eval $ac_link) 2>conftest.er1
13521   ac_status=$?
13522   grep -v '^ *+' conftest.er1 >conftest.err
13523   rm -f conftest.er1
13524   cat conftest.err >&5
13525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13526   (exit $ac_status); } &&
13527          { ac_try='test -z "$ac_c_werror_flag"
13528                          || test ! -s conftest.err'
13529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13530   (eval $ac_try) 2>&5
13531   ac_status=$?
13532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13533   (exit $ac_status); }; } &&
13534          { ac_try='test -s conftest$ac_exeext'
13535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13536   (eval $ac_try) 2>&5
13537   ac_status=$?
13538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13539   (exit $ac_status); }; }; then
13540   eval "$as_ac_var=yes"
13541 else
13542   echo "$as_me: failed program was:" >&5
13543 sed 's/^/| /' conftest.$ac_ext >&5
13544
13545 eval "$as_ac_var=no"
13546 fi
13547 rm -f conftest.err conftest.$ac_objext \
13548       conftest$ac_exeext conftest.$ac_ext
13549 fi
13550 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13551 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13552 if test `eval echo '${'$as_ac_var'}'` = yes; then
13553   cat >>confdefs.h <<_ACEOF
13554 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13555 _ACEOF
13556
13557 fi
13558 done
13559
13560
13561 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13562 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13563 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13564   echo $ECHO_N "(cached) $ECHO_C" >&6
13565 else
13566   cat >conftest.$ac_ext <<_ACEOF
13567 /* confdefs.h.  */
13568 _ACEOF
13569 cat confdefs.h >>conftest.$ac_ext
13570 cat >>conftest.$ac_ext <<_ACEOF
13571 /* end confdefs.h.  */
13572 #include <unistd.h>
13573
13574 int
13575 main ()
13576 {
13577 #ifndef fdatasync
13578   char *p = (char *) fdatasync;
13579 #endif
13580
13581   ;
13582   return 0;
13583 }
13584 _ACEOF
13585 rm -f conftest.$ac_objext
13586 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13587   (eval $ac_compile) 2>conftest.er1
13588   ac_status=$?
13589   grep -v '^ *+' conftest.er1 >conftest.err
13590   rm -f conftest.er1
13591   cat conftest.err >&5
13592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13593   (exit $ac_status); } &&
13594          { ac_try='test -z "$ac_c_werror_flag"
13595                          || test ! -s conftest.err'
13596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13597   (eval $ac_try) 2>&5
13598   ac_status=$?
13599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13600   (exit $ac_status); }; } &&
13601          { ac_try='test -s conftest.$ac_objext'
13602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13603   (eval $ac_try) 2>&5
13604   ac_status=$?
13605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13606   (exit $ac_status); }; }; then
13607   ac_cv_have_decl_fdatasync=yes
13608 else
13609   echo "$as_me: failed program was:" >&5
13610 sed 's/^/| /' conftest.$ac_ext >&5
13611
13612 ac_cv_have_decl_fdatasync=no
13613 fi
13614 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13615 fi
13616 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13617 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13618 if test $ac_cv_have_decl_fdatasync = yes; then
13619
13620 cat >>confdefs.h <<_ACEOF
13621 #define HAVE_DECL_FDATASYNC 1
13622 _ACEOF
13623
13624
13625 else
13626   cat >>confdefs.h <<_ACEOF
13627 #define HAVE_DECL_FDATASYNC 0
13628 _ACEOF
13629
13630
13631 fi
13632
13633
13634 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13635 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13636 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13637   echo $ECHO_N "(cached) $ECHO_C" >&6
13638 else
13639   cat >conftest.$ac_ext <<_ACEOF
13640 /* confdefs.h.  */
13641 _ACEOF
13642 cat confdefs.h >>conftest.$ac_ext
13643 cat >>conftest.$ac_ext <<_ACEOF
13644 /* end confdefs.h.  */
13645 #include <fcntl.h>
13646
13647 int
13648 main ()
13649 {
13650 #ifndef posix_fadvise
13651   char *p = (char *) posix_fadvise;
13652 #endif
13653
13654   ;
13655   return 0;
13656 }
13657 _ACEOF
13658 rm -f conftest.$ac_objext
13659 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13660   (eval $ac_compile) 2>conftest.er1
13661   ac_status=$?
13662   grep -v '^ *+' conftest.er1 >conftest.err
13663   rm -f conftest.er1
13664   cat conftest.err >&5
13665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13666   (exit $ac_status); } &&
13667          { ac_try='test -z "$ac_c_werror_flag"
13668                          || test ! -s conftest.err'
13669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13670   (eval $ac_try) 2>&5
13671   ac_status=$?
13672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13673   (exit $ac_status); }; } &&
13674          { ac_try='test -s conftest.$ac_objext'
13675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13676   (eval $ac_try) 2>&5
13677   ac_status=$?
13678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679   (exit $ac_status); }; }; then
13680   ac_cv_have_decl_posix_fadvise=yes
13681 else
13682   echo "$as_me: failed program was:" >&5
13683 sed 's/^/| /' conftest.$ac_ext >&5
13684
13685 ac_cv_have_decl_posix_fadvise=no
13686 fi
13687 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13688 fi
13689 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
13690 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
13691 if test $ac_cv_have_decl_posix_fadvise = yes; then
13692
13693 cat >>confdefs.h <<_ACEOF
13694 #define HAVE_DECL_POSIX_FADVISE 1
13695 _ACEOF
13696
13697
13698 else
13699   cat >>confdefs.h <<_ACEOF
13700 #define HAVE_DECL_POSIX_FADVISE 0
13701 _ACEOF
13702
13703
13704 fi
13705
13706
13707 echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
13708 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6
13709 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
13710   echo $ECHO_N "(cached) $ECHO_C" >&6
13711 else
13712   cat >conftest.$ac_ext <<_ACEOF
13713 /* confdefs.h.  */
13714 _ACEOF
13715 cat confdefs.h >>conftest.$ac_ext
13716 cat >>conftest.$ac_ext <<_ACEOF
13717 /* end confdefs.h.  */
13718 $ac_includes_default
13719 int
13720 main ()
13721 {
13722 #ifndef strlcpy
13723   char *p = (char *) strlcpy;
13724 #endif
13725
13726   ;
13727   return 0;
13728 }
13729 _ACEOF
13730 rm -f conftest.$ac_objext
13731 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13732   (eval $ac_compile) 2>conftest.er1
13733   ac_status=$?
13734   grep -v '^ *+' conftest.er1 >conftest.err
13735   rm -f conftest.er1
13736   cat conftest.err >&5
13737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13738   (exit $ac_status); } &&
13739          { ac_try='test -z "$ac_c_werror_flag"
13740                          || test ! -s conftest.err'
13741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13742   (eval $ac_try) 2>&5
13743   ac_status=$?
13744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13745   (exit $ac_status); }; } &&
13746          { ac_try='test -s conftest.$ac_objext'
13747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13748   (eval $ac_try) 2>&5
13749   ac_status=$?
13750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13751   (exit $ac_status); }; }; then
13752   ac_cv_have_decl_strlcpy=yes
13753 else
13754   echo "$as_me: failed program was:" >&5
13755 sed 's/^/| /' conftest.$ac_ext >&5
13756
13757 ac_cv_have_decl_strlcpy=no
13758 fi
13759 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13760 fi
13761 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
13762 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6
13763 if test $ac_cv_have_decl_strlcpy = yes; then
13764
13765 cat >>confdefs.h <<_ACEOF
13766 #define HAVE_DECL_STRLCPY 1
13767 _ACEOF
13768
13769
13770 else
13771   cat >>confdefs.h <<_ACEOF
13772 #define HAVE_DECL_STRLCPY 0
13773 _ACEOF
13774
13775
13776 fi
13777
13778
13779 # This is probably only present on Darwin, but may as well check always
13780 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
13781 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
13782 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
13783   echo $ECHO_N "(cached) $ECHO_C" >&6
13784 else
13785   cat >conftest.$ac_ext <<_ACEOF
13786 /* confdefs.h.  */
13787 _ACEOF
13788 cat confdefs.h >>conftest.$ac_ext
13789 cat >>conftest.$ac_ext <<_ACEOF
13790 /* end confdefs.h.  */
13791 #include <fcntl.h>
13792
13793 int
13794 main ()
13795 {
13796 #ifndef F_FULLFSYNC
13797   char *p = (char *) F_FULLFSYNC;
13798 #endif
13799
13800   ;
13801   return 0;
13802 }
13803 _ACEOF
13804 rm -f conftest.$ac_objext
13805 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13806   (eval $ac_compile) 2>conftest.er1
13807   ac_status=$?
13808   grep -v '^ *+' conftest.er1 >conftest.err
13809   rm -f conftest.er1
13810   cat conftest.err >&5
13811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13812   (exit $ac_status); } &&
13813          { ac_try='test -z "$ac_c_werror_flag"
13814                          || test ! -s conftest.err'
13815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13816   (eval $ac_try) 2>&5
13817   ac_status=$?
13818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13819   (exit $ac_status); }; } &&
13820          { ac_try='test -s conftest.$ac_objext'
13821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13822   (eval $ac_try) 2>&5
13823   ac_status=$?
13824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13825   (exit $ac_status); }; }; then
13826   ac_cv_have_decl_F_FULLFSYNC=yes
13827 else
13828   echo "$as_me: failed program was:" >&5
13829 sed 's/^/| /' conftest.$ac_ext >&5
13830
13831 ac_cv_have_decl_F_FULLFSYNC=no
13832 fi
13833 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13834 fi
13835 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
13836 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
13837 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
13838
13839 cat >>confdefs.h <<_ACEOF
13840 #define HAVE_DECL_F_FULLFSYNC 1
13841 _ACEOF
13842
13843
13844 else
13845   cat >>confdefs.h <<_ACEOF
13846 #define HAVE_DECL_F_FULLFSYNC 0
13847 _ACEOF
13848
13849
13850 fi
13851
13852
13853
13854 HAVE_IPV6=no
13855 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13856 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13857 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13858   echo $ECHO_N "(cached) $ECHO_C" >&6
13859 else
13860   cat >conftest.$ac_ext <<_ACEOF
13861 /* confdefs.h.  */
13862 _ACEOF
13863 cat confdefs.h >>conftest.$ac_ext
13864 cat >>conftest.$ac_ext <<_ACEOF
13865 /* end confdefs.h.  */
13866 $ac_includes_default
13867 #include <netinet/in.h>
13868
13869 int
13870 main ()
13871 {
13872 if ((struct sockaddr_in6 *) 0)
13873   return 0;
13874 if (sizeof (struct sockaddr_in6))
13875   return 0;
13876   ;
13877   return 0;
13878 }
13879 _ACEOF
13880 rm -f conftest.$ac_objext
13881 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13882   (eval $ac_compile) 2>conftest.er1
13883   ac_status=$?
13884   grep -v '^ *+' conftest.er1 >conftest.err
13885   rm -f conftest.er1
13886   cat conftest.err >&5
13887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13888   (exit $ac_status); } &&
13889          { ac_try='test -z "$ac_c_werror_flag"
13890                          || test ! -s conftest.err'
13891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13892   (eval $ac_try) 2>&5
13893   ac_status=$?
13894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13895   (exit $ac_status); }; } &&
13896          { ac_try='test -s conftest.$ac_objext'
13897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13898   (eval $ac_try) 2>&5
13899   ac_status=$?
13900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13901   (exit $ac_status); }; }; then
13902   ac_cv_type_struct_sockaddr_in6=yes
13903 else
13904   echo "$as_me: failed program was:" >&5
13905 sed 's/^/| /' conftest.$ac_ext >&5
13906
13907 ac_cv_type_struct_sockaddr_in6=no
13908 fi
13909 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13910 fi
13911 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13912 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13913 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13914
13915 cat >>confdefs.h <<\_ACEOF
13916 #define HAVE_IPV6 1
13917 _ACEOF
13918
13919          HAVE_IPV6=yes
13920 fi
13921
13922
13923
13924 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13925 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13926 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13927   echo $ECHO_N "(cached) $ECHO_C" >&6
13928 else
13929   cat >conftest.$ac_ext <<_ACEOF
13930 /* confdefs.h.  */
13931 _ACEOF
13932 cat confdefs.h >>conftest.$ac_ext
13933 cat >>conftest.$ac_ext <<_ACEOF
13934 /* end confdefs.h.  */
13935 #include <machine/vmparam.h>
13936 #include <sys/exec.h>
13937
13938 int
13939 main ()
13940 {
13941 PS_STRINGS->ps_nargvstr = 1;
13942 PS_STRINGS->ps_argvstr = "foo";
13943   ;
13944   return 0;
13945 }
13946 _ACEOF
13947 rm -f conftest.$ac_objext conftest$ac_exeext
13948 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13949   (eval $ac_link) 2>conftest.er1
13950   ac_status=$?
13951   grep -v '^ *+' conftest.er1 >conftest.err
13952   rm -f conftest.er1
13953   cat conftest.err >&5
13954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13955   (exit $ac_status); } &&
13956          { ac_try='test -z "$ac_c_werror_flag"
13957                          || test ! -s conftest.err'
13958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13959   (eval $ac_try) 2>&5
13960   ac_status=$?
13961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13962   (exit $ac_status); }; } &&
13963          { ac_try='test -s conftest$ac_exeext'
13964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13965   (eval $ac_try) 2>&5
13966   ac_status=$?
13967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968   (exit $ac_status); }; }; then
13969   pgac_cv_var_PS_STRINGS=yes
13970 else
13971   echo "$as_me: failed program was:" >&5
13972 sed 's/^/| /' conftest.$ac_ext >&5
13973
13974 pgac_cv_var_PS_STRINGS=no
13975 fi
13976 rm -f conftest.err conftest.$ac_objext \
13977       conftest$ac_exeext conftest.$ac_ext
13978 fi
13979 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13980 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13981 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13982
13983 cat >>confdefs.h <<\_ACEOF
13984 #define HAVE_PS_STRINGS
13985 _ACEOF
13986
13987 fi
13988
13989
13990 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13991 # is missing.  Yes, there are machines that have only one.  We may
13992 # also decide to use snprintf.c if snprintf() is present but does not
13993 # have all the features we need --- see below.
13994
13995 if test "$PORTNAME" = "win32"; then
13996   # Win32 gets snprintf.c built unconditionally.
13997   #
13998   # To properly translate all NLS languages strings, we must support the
13999   # *printf() %$ format, which allows *printf() arguments to be selected
14000   # by position in the translated string.
14001   #
14002   # libintl versions < 0.13 use the native *printf() functions, and Win32
14003   # *printf() doesn't understand %$, so we must use our /port versions,
14004   # which do understand %$. libintl versions >= 0.13 include their own
14005   # *printf versions on Win32.  The libintl 0.13 release note text is:
14006   #
14007   #   C format strings with positions, as they arise when a translator
14008   #   needs to reorder a sentence, are now supported on all platforms.
14009   #   On those few platforms (NetBSD and Woe32) for which the native
14010   #   printf()/fprintf()/... functions don't support such format
14011   #   strings, replacements are provided through <libintl.h>.
14012   #
14013   # We could use libintl >= 0.13's *printf() if we were sure that we had
14014   # a litint >= 0.13 at runtime, but seeing that there is no clean way
14015   # to guarantee that, it is best to just use our own, so we are sure to
14016   # get %$ support. In include/port.h we disable the *printf() macros
14017   # that might have been defined by libintl.
14018   #
14019   # We do this unconditionally whether NLS is used or not so we are sure
14020   # that all Win32 libraries and binaries behave the same.
14021   pgac_need_repl_snprintf=yes
14022 else
14023   pgac_need_repl_snprintf=no
14024
14025 for ac_func in snprintf
14026 do
14027 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14028 echo "$as_me:$LINENO: checking for $ac_func" >&5
14029 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14030 if eval "test \"\${$as_ac_var+set}\" = set"; then
14031   echo $ECHO_N "(cached) $ECHO_C" >&6
14032 else
14033   cat >conftest.$ac_ext <<_ACEOF
14034 /* confdefs.h.  */
14035 _ACEOF
14036 cat confdefs.h >>conftest.$ac_ext
14037 cat >>conftest.$ac_ext <<_ACEOF
14038 /* end confdefs.h.  */
14039 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14040    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14041 #define $ac_func innocuous_$ac_func
14042
14043 /* System header to define __stub macros and hopefully few prototypes,
14044     which can conflict with char $ac_func (); below.
14045     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14046     <limits.h> exists even on freestanding compilers.  */
14047
14048 #ifdef __STDC__
14049 # include <limits.h>
14050 #else
14051 # include <assert.h>
14052 #endif
14053
14054 #undef $ac_func
14055
14056 /* Override any gcc2 internal prototype to avoid an error.  */
14057 #ifdef __cplusplus
14058 extern "C"
14059 {
14060 #endif
14061 /* We use char because int might match the return type of a gcc2
14062    builtin and then its argument prototype would still apply.  */
14063 char $ac_func ();
14064 /* The GNU C library defines this for functions which it implements
14065     to always fail with ENOSYS.  Some functions are actually named
14066     something starting with __ and the normal name is an alias.  */
14067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14068 choke me
14069 #else
14070 char (*f) () = $ac_func;
14071 #endif
14072 #ifdef __cplusplus
14073 }
14074 #endif
14075
14076 int
14077 main ()
14078 {
14079 return f != $ac_func;
14080   ;
14081   return 0;
14082 }
14083 _ACEOF
14084 rm -f conftest.$ac_objext conftest$ac_exeext
14085 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14086   (eval $ac_link) 2>conftest.er1
14087   ac_status=$?
14088   grep -v '^ *+' conftest.er1 >conftest.err
14089   rm -f conftest.er1
14090   cat conftest.err >&5
14091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092   (exit $ac_status); } &&
14093          { ac_try='test -z "$ac_c_werror_flag"
14094                          || test ! -s conftest.err'
14095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14096   (eval $ac_try) 2>&5
14097   ac_status=$?
14098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14099   (exit $ac_status); }; } &&
14100          { ac_try='test -s conftest$ac_exeext'
14101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14102   (eval $ac_try) 2>&5
14103   ac_status=$?
14104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14105   (exit $ac_status); }; }; then
14106   eval "$as_ac_var=yes"
14107 else
14108   echo "$as_me: failed program was:" >&5
14109 sed 's/^/| /' conftest.$ac_ext >&5
14110
14111 eval "$as_ac_var=no"
14112 fi
14113 rm -f conftest.err conftest.$ac_objext \
14114       conftest$ac_exeext conftest.$ac_ext
14115 fi
14116 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14117 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14118 if test `eval echo '${'$as_ac_var'}'` = yes; then
14119   cat >>confdefs.h <<_ACEOF
14120 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14121 _ACEOF
14122
14123 else
14124   pgac_need_repl_snprintf=yes
14125 fi
14126 done
14127
14128
14129 for ac_func in vsnprintf
14130 do
14131 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14132 echo "$as_me:$LINENO: checking for $ac_func" >&5
14133 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14134 if eval "test \"\${$as_ac_var+set}\" = set"; then
14135   echo $ECHO_N "(cached) $ECHO_C" >&6
14136 else
14137   cat >conftest.$ac_ext <<_ACEOF
14138 /* confdefs.h.  */
14139 _ACEOF
14140 cat confdefs.h >>conftest.$ac_ext
14141 cat >>conftest.$ac_ext <<_ACEOF
14142 /* end confdefs.h.  */
14143 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14144    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14145 #define $ac_func innocuous_$ac_func
14146
14147 /* System header to define __stub macros and hopefully few prototypes,
14148     which can conflict with char $ac_func (); below.
14149     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14150     <limits.h> exists even on freestanding compilers.  */
14151
14152 #ifdef __STDC__
14153 # include <limits.h>
14154 #else
14155 # include <assert.h>
14156 #endif
14157
14158 #undef $ac_func
14159
14160 /* Override any gcc2 internal prototype to avoid an error.  */
14161 #ifdef __cplusplus
14162 extern "C"
14163 {
14164 #endif
14165 /* We use char because int might match the return type of a gcc2
14166    builtin and then its argument prototype would still apply.  */
14167 char $ac_func ();
14168 /* The GNU C library defines this for functions which it implements
14169     to always fail with ENOSYS.  Some functions are actually named
14170     something starting with __ and the normal name is an alias.  */
14171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14172 choke me
14173 #else
14174 char (*f) () = $ac_func;
14175 #endif
14176 #ifdef __cplusplus
14177 }
14178 #endif
14179
14180 int
14181 main ()
14182 {
14183 return f != $ac_func;
14184   ;
14185   return 0;
14186 }
14187 _ACEOF
14188 rm -f conftest.$ac_objext conftest$ac_exeext
14189 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14190   (eval $ac_link) 2>conftest.er1
14191   ac_status=$?
14192   grep -v '^ *+' conftest.er1 >conftest.err
14193   rm -f conftest.er1
14194   cat conftest.err >&5
14195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14196   (exit $ac_status); } &&
14197          { ac_try='test -z "$ac_c_werror_flag"
14198                          || test ! -s conftest.err'
14199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14200   (eval $ac_try) 2>&5
14201   ac_status=$?
14202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203   (exit $ac_status); }; } &&
14204          { ac_try='test -s conftest$ac_exeext'
14205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14206   (eval $ac_try) 2>&5
14207   ac_status=$?
14208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209   (exit $ac_status); }; }; then
14210   eval "$as_ac_var=yes"
14211 else
14212   echo "$as_me: failed program was:" >&5
14213 sed 's/^/| /' conftest.$ac_ext >&5
14214
14215 eval "$as_ac_var=no"
14216 fi
14217 rm -f conftest.err conftest.$ac_objext \
14218       conftest$ac_exeext conftest.$ac_ext
14219 fi
14220 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14221 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14222 if test `eval echo '${'$as_ac_var'}'` = yes; then
14223   cat >>confdefs.h <<_ACEOF
14224 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14225 _ACEOF
14226
14227 else
14228   pgac_need_repl_snprintf=yes
14229 fi
14230 done
14231
14232 fi
14233
14234
14235 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14236 # include/c.h will provide declarations.  Note this is a separate test
14237 # from whether the functions exist in the C library --- there are
14238 # systems that have the functions but don't bother to declare them :-(
14239
14240 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14241 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14242 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14243   echo $ECHO_N "(cached) $ECHO_C" >&6
14244 else
14245   cat >conftest.$ac_ext <<_ACEOF
14246 /* confdefs.h.  */
14247 _ACEOF
14248 cat confdefs.h >>conftest.$ac_ext
14249 cat >>conftest.$ac_ext <<_ACEOF
14250 /* end confdefs.h.  */
14251 $ac_includes_default
14252 int
14253 main ()
14254 {
14255 #ifndef snprintf
14256   char *p = (char *) snprintf;
14257 #endif
14258
14259   ;
14260   return 0;
14261 }
14262 _ACEOF
14263 rm -f conftest.$ac_objext
14264 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14265   (eval $ac_compile) 2>conftest.er1
14266   ac_status=$?
14267   grep -v '^ *+' conftest.er1 >conftest.err
14268   rm -f conftest.er1
14269   cat conftest.err >&5
14270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14271   (exit $ac_status); } &&
14272          { ac_try='test -z "$ac_c_werror_flag"
14273                          || test ! -s conftest.err'
14274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14275   (eval $ac_try) 2>&5
14276   ac_status=$?
14277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14278   (exit $ac_status); }; } &&
14279          { ac_try='test -s conftest.$ac_objext'
14280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14281   (eval $ac_try) 2>&5
14282   ac_status=$?
14283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14284   (exit $ac_status); }; }; then
14285   ac_cv_have_decl_snprintf=yes
14286 else
14287   echo "$as_me: failed program was:" >&5
14288 sed 's/^/| /' conftest.$ac_ext >&5
14289
14290 ac_cv_have_decl_snprintf=no
14291 fi
14292 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14293 fi
14294 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14295 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14296 if test $ac_cv_have_decl_snprintf = yes; then
14297
14298 cat >>confdefs.h <<_ACEOF
14299 #define HAVE_DECL_SNPRINTF 1
14300 _ACEOF
14301
14302
14303 else
14304   cat >>confdefs.h <<_ACEOF
14305 #define HAVE_DECL_SNPRINTF 0
14306 _ACEOF
14307
14308
14309 fi
14310 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14311 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14312 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14313   echo $ECHO_N "(cached) $ECHO_C" >&6
14314 else
14315   cat >conftest.$ac_ext <<_ACEOF
14316 /* confdefs.h.  */
14317 _ACEOF
14318 cat confdefs.h >>conftest.$ac_ext
14319 cat >>conftest.$ac_ext <<_ACEOF
14320 /* end confdefs.h.  */
14321 $ac_includes_default
14322 int
14323 main ()
14324 {
14325 #ifndef vsnprintf
14326   char *p = (char *) vsnprintf;
14327 #endif
14328
14329   ;
14330   return 0;
14331 }
14332 _ACEOF
14333 rm -f conftest.$ac_objext
14334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14335   (eval $ac_compile) 2>conftest.er1
14336   ac_status=$?
14337   grep -v '^ *+' conftest.er1 >conftest.err
14338   rm -f conftest.er1
14339   cat conftest.err >&5
14340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341   (exit $ac_status); } &&
14342          { ac_try='test -z "$ac_c_werror_flag"
14343                          || test ! -s conftest.err'
14344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14345   (eval $ac_try) 2>&5
14346   ac_status=$?
14347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14348   (exit $ac_status); }; } &&
14349          { ac_try='test -s conftest.$ac_objext'
14350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14351   (eval $ac_try) 2>&5
14352   ac_status=$?
14353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354   (exit $ac_status); }; }; then
14355   ac_cv_have_decl_vsnprintf=yes
14356 else
14357   echo "$as_me: failed program was:" >&5
14358 sed 's/^/| /' conftest.$ac_ext >&5
14359
14360 ac_cv_have_decl_vsnprintf=no
14361 fi
14362 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14363 fi
14364 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14365 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14366 if test $ac_cv_have_decl_vsnprintf = yes; then
14367
14368 cat >>confdefs.h <<_ACEOF
14369 #define HAVE_DECL_VSNPRINTF 1
14370 _ACEOF
14371
14372
14373 else
14374   cat >>confdefs.h <<_ACEOF
14375 #define HAVE_DECL_VSNPRINTF 0
14376 _ACEOF
14377
14378
14379 fi
14380
14381
14382
14383
14384 echo "$as_me:$LINENO: checking for isinf" >&5
14385 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14386 if test "${ac_cv_func_isinf+set}" = set; then
14387   echo $ECHO_N "(cached) $ECHO_C" >&6
14388 else
14389   cat >conftest.$ac_ext <<_ACEOF
14390 /* confdefs.h.  */
14391 _ACEOF
14392 cat confdefs.h >>conftest.$ac_ext
14393 cat >>conftest.$ac_ext <<_ACEOF
14394 /* end confdefs.h.  */
14395
14396 #include <math.h>
14397 double glob_double;
14398
14399 int
14400 main ()
14401 {
14402 return isinf(glob_double) ? 0 : 1;
14403   ;
14404   return 0;
14405 }
14406 _ACEOF
14407 rm -f conftest.$ac_objext conftest$ac_exeext
14408 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14409   (eval $ac_link) 2>conftest.er1
14410   ac_status=$?
14411   grep -v '^ *+' conftest.er1 >conftest.err
14412   rm -f conftest.er1
14413   cat conftest.err >&5
14414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14415   (exit $ac_status); } &&
14416          { ac_try='test -z "$ac_c_werror_flag"
14417                          || test ! -s conftest.err'
14418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14419   (eval $ac_try) 2>&5
14420   ac_status=$?
14421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422   (exit $ac_status); }; } &&
14423          { ac_try='test -s conftest$ac_exeext'
14424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14425   (eval $ac_try) 2>&5
14426   ac_status=$?
14427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14428   (exit $ac_status); }; }; then
14429   ac_cv_func_isinf=yes
14430 else
14431   echo "$as_me: failed program was:" >&5
14432 sed 's/^/| /' conftest.$ac_ext >&5
14433
14434 ac_cv_func_isinf=no
14435 fi
14436 rm -f conftest.err conftest.$ac_objext \
14437       conftest$ac_exeext conftest.$ac_ext
14438 fi
14439 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14440 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14441
14442 if test $ac_cv_func_isinf = yes ; then
14443
14444 cat >>confdefs.h <<\_ACEOF
14445 #define HAVE_ISINF 1
14446 _ACEOF
14447
14448 else
14449   case $LIBOBJS in
14450     "isinf.$ac_objext"   | \
14451   *" isinf.$ac_objext"   | \
14452     "isinf.$ac_objext "* | \
14453   *" isinf.$ac_objext "* ) ;;
14454   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14455 esac
14456
14457   # Look for a way to implement a substitute for isinf()
14458
14459
14460
14461
14462 for ac_func in fpclass fp_class fp_class_d class
14463 do
14464 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14465 echo "$as_me:$LINENO: checking for $ac_func" >&5
14466 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14467 if eval "test \"\${$as_ac_var+set}\" = set"; then
14468   echo $ECHO_N "(cached) $ECHO_C" >&6
14469 else
14470   cat >conftest.$ac_ext <<_ACEOF
14471 /* confdefs.h.  */
14472 _ACEOF
14473 cat confdefs.h >>conftest.$ac_ext
14474 cat >>conftest.$ac_ext <<_ACEOF
14475 /* end confdefs.h.  */
14476 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14477    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14478 #define $ac_func innocuous_$ac_func
14479
14480 /* System header to define __stub macros and hopefully few prototypes,
14481     which can conflict with char $ac_func (); below.
14482     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14483     <limits.h> exists even on freestanding compilers.  */
14484
14485 #ifdef __STDC__
14486 # include <limits.h>
14487 #else
14488 # include <assert.h>
14489 #endif
14490
14491 #undef $ac_func
14492
14493 /* Override any gcc2 internal prototype to avoid an error.  */
14494 #ifdef __cplusplus
14495 extern "C"
14496 {
14497 #endif
14498 /* We use char because int might match the return type of a gcc2
14499    builtin and then its argument prototype would still apply.  */
14500 char $ac_func ();
14501 /* The GNU C library defines this for functions which it implements
14502     to always fail with ENOSYS.  Some functions are actually named
14503     something starting with __ and the normal name is an alias.  */
14504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14505 choke me
14506 #else
14507 char (*f) () = $ac_func;
14508 #endif
14509 #ifdef __cplusplus
14510 }
14511 #endif
14512
14513 int
14514 main ()
14515 {
14516 return f != $ac_func;
14517   ;
14518   return 0;
14519 }
14520 _ACEOF
14521 rm -f conftest.$ac_objext conftest$ac_exeext
14522 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14523   (eval $ac_link) 2>conftest.er1
14524   ac_status=$?
14525   grep -v '^ *+' conftest.er1 >conftest.err
14526   rm -f conftest.er1
14527   cat conftest.err >&5
14528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14529   (exit $ac_status); } &&
14530          { ac_try='test -z "$ac_c_werror_flag"
14531                          || test ! -s conftest.err'
14532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14533   (eval $ac_try) 2>&5
14534   ac_status=$?
14535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14536   (exit $ac_status); }; } &&
14537          { ac_try='test -s conftest$ac_exeext'
14538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14539   (eval $ac_try) 2>&5
14540   ac_status=$?
14541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14542   (exit $ac_status); }; }; then
14543   eval "$as_ac_var=yes"
14544 else
14545   echo "$as_me: failed program was:" >&5
14546 sed 's/^/| /' conftest.$ac_ext >&5
14547
14548 eval "$as_ac_var=no"
14549 fi
14550 rm -f conftest.err conftest.$ac_objext \
14551       conftest$ac_exeext conftest.$ac_ext
14552 fi
14553 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14554 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14555 if test `eval echo '${'$as_ac_var'}'` = yes; then
14556   cat >>confdefs.h <<_ACEOF
14557 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14558 _ACEOF
14559  break
14560 fi
14561 done
14562
14563 fi
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strlcpy strtol strtoul unsetenv
14580 do
14581 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14582 echo "$as_me:$LINENO: checking for $ac_func" >&5
14583 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14584 if eval "test \"\${$as_ac_var+set}\" = set"; then
14585   echo $ECHO_N "(cached) $ECHO_C" >&6
14586 else
14587   cat >conftest.$ac_ext <<_ACEOF
14588 /* confdefs.h.  */
14589 _ACEOF
14590 cat confdefs.h >>conftest.$ac_ext
14591 cat >>conftest.$ac_ext <<_ACEOF
14592 /* end confdefs.h.  */
14593 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14594    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14595 #define $ac_func innocuous_$ac_func
14596
14597 /* System header to define __stub macros and hopefully few prototypes,
14598     which can conflict with char $ac_func (); below.
14599     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14600     <limits.h> exists even on freestanding compilers.  */
14601
14602 #ifdef __STDC__
14603 # include <limits.h>
14604 #else
14605 # include <assert.h>
14606 #endif
14607
14608 #undef $ac_func
14609
14610 /* Override any gcc2 internal prototype to avoid an error.  */
14611 #ifdef __cplusplus
14612 extern "C"
14613 {
14614 #endif
14615 /* We use char because int might match the return type of a gcc2
14616    builtin and then its argument prototype would still apply.  */
14617 char $ac_func ();
14618 /* The GNU C library defines this for functions which it implements
14619     to always fail with ENOSYS.  Some functions are actually named
14620     something starting with __ and the normal name is an alias.  */
14621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14622 choke me
14623 #else
14624 char (*f) () = $ac_func;
14625 #endif
14626 #ifdef __cplusplus
14627 }
14628 #endif
14629
14630 int
14631 main ()
14632 {
14633 return f != $ac_func;
14634   ;
14635   return 0;
14636 }
14637 _ACEOF
14638 rm -f conftest.$ac_objext conftest$ac_exeext
14639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14640   (eval $ac_link) 2>conftest.er1
14641   ac_status=$?
14642   grep -v '^ *+' conftest.er1 >conftest.err
14643   rm -f conftest.er1
14644   cat conftest.err >&5
14645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14646   (exit $ac_status); } &&
14647          { ac_try='test -z "$ac_c_werror_flag"
14648                          || test ! -s conftest.err'
14649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14650   (eval $ac_try) 2>&5
14651   ac_status=$?
14652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14653   (exit $ac_status); }; } &&
14654          { ac_try='test -s conftest$ac_exeext'
14655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14656   (eval $ac_try) 2>&5
14657   ac_status=$?
14658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14659   (exit $ac_status); }; }; then
14660   eval "$as_ac_var=yes"
14661 else
14662   echo "$as_me: failed program was:" >&5
14663 sed 's/^/| /' conftest.$ac_ext >&5
14664
14665 eval "$as_ac_var=no"
14666 fi
14667 rm -f conftest.err conftest.$ac_objext \
14668       conftest$ac_exeext conftest.$ac_ext
14669 fi
14670 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14671 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14672 if test `eval echo '${'$as_ac_var'}'` = yes; then
14673   cat >>confdefs.h <<_ACEOF
14674 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14675 _ACEOF
14676
14677 else
14678   case $LIBOBJS in
14679     "$ac_func.$ac_objext"   | \
14680   *" $ac_func.$ac_objext"   | \
14681     "$ac_func.$ac_objext "* | \
14682   *" $ac_func.$ac_objext "* ) ;;
14683   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14684 esac
14685
14686 fi
14687 done
14688
14689
14690
14691 # System's version of getaddrinfo(), if any, may be used only if we found
14692 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14693 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14694 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14695 # because we want to use our own getaddrinfo.c on Windows anyway.)
14696 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14697
14698 for ac_func in getaddrinfo
14699 do
14700 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14701 echo "$as_me:$LINENO: checking for $ac_func" >&5
14702 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14703 if eval "test \"\${$as_ac_var+set}\" = set"; then
14704   echo $ECHO_N "(cached) $ECHO_C" >&6
14705 else
14706   cat >conftest.$ac_ext <<_ACEOF
14707 /* confdefs.h.  */
14708 _ACEOF
14709 cat confdefs.h >>conftest.$ac_ext
14710 cat >>conftest.$ac_ext <<_ACEOF
14711 /* end confdefs.h.  */
14712 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14713    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14714 #define $ac_func innocuous_$ac_func
14715
14716 /* System header to define __stub macros and hopefully few prototypes,
14717     which can conflict with char $ac_func (); below.
14718     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14719     <limits.h> exists even on freestanding compilers.  */
14720
14721 #ifdef __STDC__
14722 # include <limits.h>
14723 #else
14724 # include <assert.h>
14725 #endif
14726
14727 #undef $ac_func
14728
14729 /* Override any gcc2 internal prototype to avoid an error.  */
14730 #ifdef __cplusplus
14731 extern "C"
14732 {
14733 #endif
14734 /* We use char because int might match the return type of a gcc2
14735    builtin and then its argument prototype would still apply.  */
14736 char $ac_func ();
14737 /* The GNU C library defines this for functions which it implements
14738     to always fail with ENOSYS.  Some functions are actually named
14739     something starting with __ and the normal name is an alias.  */
14740 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14741 choke me
14742 #else
14743 char (*f) () = $ac_func;
14744 #endif
14745 #ifdef __cplusplus
14746 }
14747 #endif
14748
14749 int
14750 main ()
14751 {
14752 return f != $ac_func;
14753   ;
14754   return 0;
14755 }
14756 _ACEOF
14757 rm -f conftest.$ac_objext conftest$ac_exeext
14758 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14759   (eval $ac_link) 2>conftest.er1
14760   ac_status=$?
14761   grep -v '^ *+' conftest.er1 >conftest.err
14762   rm -f conftest.er1
14763   cat conftest.err >&5
14764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14765   (exit $ac_status); } &&
14766          { ac_try='test -z "$ac_c_werror_flag"
14767                          || test ! -s conftest.err'
14768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14769   (eval $ac_try) 2>&5
14770   ac_status=$?
14771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772   (exit $ac_status); }; } &&
14773          { ac_try='test -s conftest$ac_exeext'
14774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14775   (eval $ac_try) 2>&5
14776   ac_status=$?
14777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14778   (exit $ac_status); }; }; then
14779   eval "$as_ac_var=yes"
14780 else
14781   echo "$as_me: failed program was:" >&5
14782 sed 's/^/| /' conftest.$ac_ext >&5
14783
14784 eval "$as_ac_var=no"
14785 fi
14786 rm -f conftest.err conftest.$ac_objext \
14787       conftest$ac_exeext conftest.$ac_ext
14788 fi
14789 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14790 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14791 if test `eval echo '${'$as_ac_var'}'` = yes; then
14792   cat >>confdefs.h <<_ACEOF
14793 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14794 _ACEOF
14795
14796 else
14797   case $LIBOBJS in
14798     "$ac_func.$ac_objext"   | \
14799   *" $ac_func.$ac_objext"   | \
14800     "$ac_func.$ac_objext "* | \
14801   *" $ac_func.$ac_objext "* ) ;;
14802   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14803 esac
14804
14805 fi
14806 done
14807
14808
14809 else
14810   case $LIBOBJS in
14811     "getaddrinfo.$ac_objext"   | \
14812   *" getaddrinfo.$ac_objext"   | \
14813     "getaddrinfo.$ac_objext "* | \
14814   *" getaddrinfo.$ac_objext "* ) ;;
14815   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14816 esac
14817
14818 fi
14819
14820 # similarly, use system's getopt_long() only if system provides struct option.
14821 if test x"$ac_cv_type_struct_option" = xyes ; then
14822
14823 for ac_func in getopt_long
14824 do
14825 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14826 echo "$as_me:$LINENO: checking for $ac_func" >&5
14827 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14828 if eval "test \"\${$as_ac_var+set}\" = set"; then
14829   echo $ECHO_N "(cached) $ECHO_C" >&6
14830 else
14831   cat >conftest.$ac_ext <<_ACEOF
14832 /* confdefs.h.  */
14833 _ACEOF
14834 cat confdefs.h >>conftest.$ac_ext
14835 cat >>conftest.$ac_ext <<_ACEOF
14836 /* end confdefs.h.  */
14837 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14838    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14839 #define $ac_func innocuous_$ac_func
14840
14841 /* System header to define __stub macros and hopefully few prototypes,
14842     which can conflict with char $ac_func (); below.
14843     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14844     <limits.h> exists even on freestanding compilers.  */
14845
14846 #ifdef __STDC__
14847 # include <limits.h>
14848 #else
14849 # include <assert.h>
14850 #endif
14851
14852 #undef $ac_func
14853
14854 /* Override any gcc2 internal prototype to avoid an error.  */
14855 #ifdef __cplusplus
14856 extern "C"
14857 {
14858 #endif
14859 /* We use char because int might match the return type of a gcc2
14860    builtin and then its argument prototype would still apply.  */
14861 char $ac_func ();
14862 /* The GNU C library defines this for functions which it implements
14863     to always fail with ENOSYS.  Some functions are actually named
14864     something starting with __ and the normal name is an alias.  */
14865 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14866 choke me
14867 #else
14868 char (*f) () = $ac_func;
14869 #endif
14870 #ifdef __cplusplus
14871 }
14872 #endif
14873
14874 int
14875 main ()
14876 {
14877 return f != $ac_func;
14878   ;
14879   return 0;
14880 }
14881 _ACEOF
14882 rm -f conftest.$ac_objext conftest$ac_exeext
14883 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14884   (eval $ac_link) 2>conftest.er1
14885   ac_status=$?
14886   grep -v '^ *+' conftest.er1 >conftest.err
14887   rm -f conftest.er1
14888   cat conftest.err >&5
14889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14890   (exit $ac_status); } &&
14891          { ac_try='test -z "$ac_c_werror_flag"
14892                          || test ! -s conftest.err'
14893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14894   (eval $ac_try) 2>&5
14895   ac_status=$?
14896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14897   (exit $ac_status); }; } &&
14898          { ac_try='test -s conftest$ac_exeext'
14899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14900   (eval $ac_try) 2>&5
14901   ac_status=$?
14902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14903   (exit $ac_status); }; }; then
14904   eval "$as_ac_var=yes"
14905 else
14906   echo "$as_me: failed program was:" >&5
14907 sed 's/^/| /' conftest.$ac_ext >&5
14908
14909 eval "$as_ac_var=no"
14910 fi
14911 rm -f conftest.err conftest.$ac_objext \
14912       conftest$ac_exeext conftest.$ac_ext
14913 fi
14914 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14915 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14916 if test `eval echo '${'$as_ac_var'}'` = yes; then
14917   cat >>confdefs.h <<_ACEOF
14918 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14919 _ACEOF
14920
14921 else
14922   case $LIBOBJS in
14923     "$ac_func.$ac_objext"   | \
14924   *" $ac_func.$ac_objext"   | \
14925     "$ac_func.$ac_objext "* | \
14926   *" $ac_func.$ac_objext "* ) ;;
14927   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14928 esac
14929
14930 fi
14931 done
14932
14933
14934 else
14935   case $LIBOBJS in
14936     "getopt_long.$ac_objext"   | \
14937   *" getopt_long.$ac_objext"   | \
14938     "getopt_long.$ac_objext "* | \
14939   *" getopt_long.$ac_objext "* ) ;;
14940   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14941 esac
14942
14943 fi
14944
14945 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14946 # We override the previous test that said fseeko/ftello didn't exist
14947 # OS tests are also done in include/c.h and port/fseeko.c
14948 case $host_os in bsdi*|netbsd*)
14949 ac_cv_func_fseeko=yes
14950 esac
14951
14952 # Win32 support
14953 if test "$PORTNAME" = "win32"; then
14954 case $LIBOBJS in
14955     "gettimeofday.$ac_objext"   | \
14956   *" gettimeofday.$ac_objext"   | \
14957     "gettimeofday.$ac_objext "* | \
14958   *" gettimeofday.$ac_objext "* ) ;;
14959   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14960 esac
14961
14962 case $LIBOBJS in
14963     "kill.$ac_objext"   | \
14964   *" kill.$ac_objext"   | \
14965     "kill.$ac_objext "* | \
14966   *" kill.$ac_objext "* ) ;;
14967   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14968 esac
14969
14970 case $LIBOBJS in
14971     "open.$ac_objext"   | \
14972   *" open.$ac_objext"   | \
14973     "open.$ac_objext "* | \
14974   *" open.$ac_objext "* ) ;;
14975   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14976 esac
14977
14978 case $LIBOBJS in
14979     "rand.$ac_objext"   | \
14980   *" rand.$ac_objext"   | \
14981     "rand.$ac_objext "* | \
14982   *" rand.$ac_objext "* ) ;;
14983   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14984 esac
14985
14986 case $LIBOBJS in
14987     "win32error.$ac_objext"   | \
14988   *" win32error.$ac_objext"   | \
14989     "win32error.$ac_objext "* | \
14990   *" win32error.$ac_objext "* ) ;;
14991   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
14992 esac
14993
14994
14995 cat >>confdefs.h <<\_ACEOF
14996 #define HAVE_SYMLINK 1
14997 _ACEOF
14998
14999 fi
15000
15001 if test "$with_readline" = yes; then
15002   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
15003 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
15004 cat >conftest.$ac_ext <<_ACEOF
15005 /* confdefs.h.  */
15006 _ACEOF
15007 cat confdefs.h >>conftest.$ac_ext
15008 cat >>conftest.$ac_ext <<_ACEOF
15009 /* end confdefs.h.  */
15010 #include <stdio.h>
15011 #ifdef HAVE_READLINE_READLINE_H
15012 # include <readline/readline.h>
15013 #elif defined(HAVE_READLINE_H)
15014 # include <readline.h>
15015 #endif
15016
15017 int
15018 main ()
15019 {
15020 rl_completion_append_character = 'x';
15021   ;
15022   return 0;
15023 }
15024 _ACEOF
15025 rm -f conftest.$ac_objext conftest$ac_exeext
15026 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15027   (eval $ac_link) 2>conftest.er1
15028   ac_status=$?
15029   grep -v '^ *+' conftest.er1 >conftest.err
15030   rm -f conftest.er1
15031   cat conftest.err >&5
15032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033   (exit $ac_status); } &&
15034          { ac_try='test -z "$ac_c_werror_flag"
15035                          || test ! -s conftest.err'
15036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15037   (eval $ac_try) 2>&5
15038   ac_status=$?
15039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15040   (exit $ac_status); }; } &&
15041          { ac_try='test -s conftest$ac_exeext'
15042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15043   (eval $ac_try) 2>&5
15044   ac_status=$?
15045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15046   (exit $ac_status); }; }; then
15047   echo "$as_me:$LINENO: result: yes" >&5
15048 echo "${ECHO_T}yes" >&6
15049
15050 cat >>confdefs.h <<\_ACEOF
15051 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15052 _ACEOF
15053
15054 else
15055   echo "$as_me: failed program was:" >&5
15056 sed 's/^/| /' conftest.$ac_ext >&5
15057
15058 echo "$as_me:$LINENO: result: no" >&5
15059 echo "${ECHO_T}no" >&6
15060 fi
15061 rm -f conftest.err conftest.$ac_objext \
15062       conftest$ac_exeext conftest.$ac_ext
15063
15064
15065 for ac_func in rl_completion_matches rl_filename_completion_function
15066 do
15067 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15068 echo "$as_me:$LINENO: checking for $ac_func" >&5
15069 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15070 if eval "test \"\${$as_ac_var+set}\" = set"; then
15071   echo $ECHO_N "(cached) $ECHO_C" >&6
15072 else
15073   cat >conftest.$ac_ext <<_ACEOF
15074 /* confdefs.h.  */
15075 _ACEOF
15076 cat confdefs.h >>conftest.$ac_ext
15077 cat >>conftest.$ac_ext <<_ACEOF
15078 /* end confdefs.h.  */
15079 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15080    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15081 #define $ac_func innocuous_$ac_func
15082
15083 /* System header to define __stub macros and hopefully few prototypes,
15084     which can conflict with char $ac_func (); below.
15085     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15086     <limits.h> exists even on freestanding compilers.  */
15087
15088 #ifdef __STDC__
15089 # include <limits.h>
15090 #else
15091 # include <assert.h>
15092 #endif
15093
15094 #undef $ac_func
15095
15096 /* Override any gcc2 internal prototype to avoid an error.  */
15097 #ifdef __cplusplus
15098 extern "C"
15099 {
15100 #endif
15101 /* We use char because int might match the return type of a gcc2
15102    builtin and then its argument prototype would still apply.  */
15103 char $ac_func ();
15104 /* The GNU C library defines this for functions which it implements
15105     to always fail with ENOSYS.  Some functions are actually named
15106     something starting with __ and the normal name is an alias.  */
15107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15108 choke me
15109 #else
15110 char (*f) () = $ac_func;
15111 #endif
15112 #ifdef __cplusplus
15113 }
15114 #endif
15115
15116 int
15117 main ()
15118 {
15119 return f != $ac_func;
15120   ;
15121   return 0;
15122 }
15123 _ACEOF
15124 rm -f conftest.$ac_objext conftest$ac_exeext
15125 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15126   (eval $ac_link) 2>conftest.er1
15127   ac_status=$?
15128   grep -v '^ *+' conftest.er1 >conftest.err
15129   rm -f conftest.er1
15130   cat conftest.err >&5
15131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15132   (exit $ac_status); } &&
15133          { ac_try='test -z "$ac_c_werror_flag"
15134                          || test ! -s conftest.err'
15135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15136   (eval $ac_try) 2>&5
15137   ac_status=$?
15138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139   (exit $ac_status); }; } &&
15140          { ac_try='test -s conftest$ac_exeext'
15141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15142   (eval $ac_try) 2>&5
15143   ac_status=$?
15144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145   (exit $ac_status); }; }; then
15146   eval "$as_ac_var=yes"
15147 else
15148   echo "$as_me: failed program was:" >&5
15149 sed 's/^/| /' conftest.$ac_ext >&5
15150
15151 eval "$as_ac_var=no"
15152 fi
15153 rm -f conftest.err conftest.$ac_objext \
15154       conftest$ac_exeext conftest.$ac_ext
15155 fi
15156 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15157 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15158 if test `eval echo '${'$as_ac_var'}'` = yes; then
15159   cat >>confdefs.h <<_ACEOF
15160 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15161 _ACEOF
15162
15163 fi
15164 done
15165
15166
15167 for ac_func in replace_history_entry
15168 do
15169 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15170 echo "$as_me:$LINENO: checking for $ac_func" >&5
15171 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15172 if eval "test \"\${$as_ac_var+set}\" = set"; then
15173   echo $ECHO_N "(cached) $ECHO_C" >&6
15174 else
15175   cat >conftest.$ac_ext <<_ACEOF
15176 /* confdefs.h.  */
15177 _ACEOF
15178 cat confdefs.h >>conftest.$ac_ext
15179 cat >>conftest.$ac_ext <<_ACEOF
15180 /* end confdefs.h.  */
15181 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15182    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15183 #define $ac_func innocuous_$ac_func
15184
15185 /* System header to define __stub macros and hopefully few prototypes,
15186     which can conflict with char $ac_func (); below.
15187     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15188     <limits.h> exists even on freestanding compilers.  */
15189
15190 #ifdef __STDC__
15191 # include <limits.h>
15192 #else
15193 # include <assert.h>
15194 #endif
15195
15196 #undef $ac_func
15197
15198 /* Override any gcc2 internal prototype to avoid an error.  */
15199 #ifdef __cplusplus
15200 extern "C"
15201 {
15202 #endif
15203 /* We use char because int might match the return type of a gcc2
15204    builtin and then its argument prototype would still apply.  */
15205 char $ac_func ();
15206 /* The GNU C library defines this for functions which it implements
15207     to always fail with ENOSYS.  Some functions are actually named
15208     something starting with __ and the normal name is an alias.  */
15209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15210 choke me
15211 #else
15212 char (*f) () = $ac_func;
15213 #endif
15214 #ifdef __cplusplus
15215 }
15216 #endif
15217
15218 int
15219 main ()
15220 {
15221 return f != $ac_func;
15222   ;
15223   return 0;
15224 }
15225 _ACEOF
15226 rm -f conftest.$ac_objext conftest$ac_exeext
15227 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15228   (eval $ac_link) 2>conftest.er1
15229   ac_status=$?
15230   grep -v '^ *+' conftest.er1 >conftest.err
15231   rm -f conftest.er1
15232   cat conftest.err >&5
15233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15234   (exit $ac_status); } &&
15235          { ac_try='test -z "$ac_c_werror_flag"
15236                          || test ! -s conftest.err'
15237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15238   (eval $ac_try) 2>&5
15239   ac_status=$?
15240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15241   (exit $ac_status); }; } &&
15242          { ac_try='test -s conftest$ac_exeext'
15243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15244   (eval $ac_try) 2>&5
15245   ac_status=$?
15246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15247   (exit $ac_status); }; }; then
15248   eval "$as_ac_var=yes"
15249 else
15250   echo "$as_me: failed program was:" >&5
15251 sed 's/^/| /' conftest.$ac_ext >&5
15252
15253 eval "$as_ac_var=no"
15254 fi
15255 rm -f conftest.err conftest.$ac_objext \
15256       conftest$ac_exeext conftest.$ac_ext
15257 fi
15258 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15259 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15260 if test `eval echo '${'$as_ac_var'}'` = yes; then
15261   cat >>confdefs.h <<_ACEOF
15262 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15263 _ACEOF
15264
15265 fi
15266 done
15267
15268 fi
15269
15270
15271 echo "$as_me:$LINENO: checking for finite" >&5
15272 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15273 cat >conftest.$ac_ext <<_ACEOF
15274 /* confdefs.h.  */
15275 _ACEOF
15276 cat confdefs.h >>conftest.$ac_ext
15277 cat >>conftest.$ac_ext <<_ACEOF
15278 /* end confdefs.h.  */
15279
15280 #include <math.h>
15281 double glob_double;
15282
15283 int
15284 main ()
15285 {
15286 return finite(glob_double) ? 0 : 1;
15287   ;
15288   return 0;
15289 }
15290 _ACEOF
15291 rm -f conftest.$ac_objext conftest$ac_exeext
15292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15293   (eval $ac_link) 2>conftest.er1
15294   ac_status=$?
15295   grep -v '^ *+' conftest.er1 >conftest.err
15296   rm -f conftest.er1
15297   cat conftest.err >&5
15298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15299   (exit $ac_status); } &&
15300          { ac_try='test -z "$ac_c_werror_flag"
15301                          || test ! -s conftest.err'
15302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15303   (eval $ac_try) 2>&5
15304   ac_status=$?
15305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15306   (exit $ac_status); }; } &&
15307          { ac_try='test -s conftest$ac_exeext'
15308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15309   (eval $ac_try) 2>&5
15310   ac_status=$?
15311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15312   (exit $ac_status); }; }; then
15313
15314 cat >>confdefs.h <<\_ACEOF
15315 #define HAVE_FINITE 1
15316 _ACEOF
15317
15318 echo "$as_me:$LINENO: result: yes" >&5
15319 echo "${ECHO_T}yes" >&6
15320 else
15321   echo "$as_me: failed program was:" >&5
15322 sed 's/^/| /' conftest.$ac_ext >&5
15323
15324 echo "$as_me:$LINENO: result: no" >&5
15325 echo "${ECHO_T}no" >&6
15326 fi
15327 rm -f conftest.err conftest.$ac_objext \
15328       conftest$ac_exeext conftest.$ac_ext
15329
15330 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15331 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15332 cat >conftest.$ac_ext <<_ACEOF
15333 /* confdefs.h.  */
15334 _ACEOF
15335 cat confdefs.h >>conftest.$ac_ext
15336 cat >>conftest.$ac_ext <<_ACEOF
15337 /* end confdefs.h.  */
15338 #include <setjmp.h>
15339 int
15340 main ()
15341 {
15342 sigjmp_buf x; sigsetjmp(x, 1);
15343   ;
15344   return 0;
15345 }
15346 _ACEOF
15347 rm -f conftest.$ac_objext conftest$ac_exeext
15348 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15349   (eval $ac_link) 2>conftest.er1
15350   ac_status=$?
15351   grep -v '^ *+' conftest.er1 >conftest.err
15352   rm -f conftest.er1
15353   cat conftest.err >&5
15354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15355   (exit $ac_status); } &&
15356          { ac_try='test -z "$ac_c_werror_flag"
15357                          || test ! -s conftest.err'
15358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15359   (eval $ac_try) 2>&5
15360   ac_status=$?
15361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15362   (exit $ac_status); }; } &&
15363          { ac_try='test -s conftest$ac_exeext'
15364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15365   (eval $ac_try) 2>&5
15366   ac_status=$?
15367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15368   (exit $ac_status); }; }; then
15369
15370 cat >>confdefs.h <<\_ACEOF
15371 #define HAVE_SIGSETJMP 1
15372 _ACEOF
15373
15374 echo "$as_me:$LINENO: result: yes" >&5
15375 echo "${ECHO_T}yes" >&6
15376 else
15377   echo "$as_me: failed program was:" >&5
15378 sed 's/^/| /' conftest.$ac_ext >&5
15379
15380 echo "$as_me:$LINENO: result: no" >&5
15381 echo "${ECHO_T}no" >&6
15382 fi
15383 rm -f conftest.err conftest.$ac_objext \
15384       conftest$ac_exeext conftest.$ac_ext
15385
15386 echo "$as_me:$LINENO: checking for syslog" >&5
15387 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15388 if test "${ac_cv_func_syslog+set}" = set; then
15389   echo $ECHO_N "(cached) $ECHO_C" >&6
15390 else
15391   cat >conftest.$ac_ext <<_ACEOF
15392 /* confdefs.h.  */
15393 _ACEOF
15394 cat confdefs.h >>conftest.$ac_ext
15395 cat >>conftest.$ac_ext <<_ACEOF
15396 /* end confdefs.h.  */
15397 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15398    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15399 #define syslog innocuous_syslog
15400
15401 /* System header to define __stub macros and hopefully few prototypes,
15402     which can conflict with char syslog (); below.
15403     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15404     <limits.h> exists even on freestanding compilers.  */
15405
15406 #ifdef __STDC__
15407 # include <limits.h>
15408 #else
15409 # include <assert.h>
15410 #endif
15411
15412 #undef syslog
15413
15414 /* Override any gcc2 internal prototype to avoid an error.  */
15415 #ifdef __cplusplus
15416 extern "C"
15417 {
15418 #endif
15419 /* We use char because int might match the return type of a gcc2
15420    builtin and then its argument prototype would still apply.  */
15421 char syslog ();
15422 /* The GNU C library defines this for functions which it implements
15423     to always fail with ENOSYS.  Some functions are actually named
15424     something starting with __ and the normal name is an alias.  */
15425 #if defined (__stub_syslog) || defined (__stub___syslog)
15426 choke me
15427 #else
15428 char (*f) () = syslog;
15429 #endif
15430 #ifdef __cplusplus
15431 }
15432 #endif
15433
15434 int
15435 main ()
15436 {
15437 return f != syslog;
15438   ;
15439   return 0;
15440 }
15441 _ACEOF
15442 rm -f conftest.$ac_objext conftest$ac_exeext
15443 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15444   (eval $ac_link) 2>conftest.er1
15445   ac_status=$?
15446   grep -v '^ *+' conftest.er1 >conftest.err
15447   rm -f conftest.er1
15448   cat conftest.err >&5
15449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15450   (exit $ac_status); } &&
15451          { ac_try='test -z "$ac_c_werror_flag"
15452                          || test ! -s conftest.err'
15453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15454   (eval $ac_try) 2>&5
15455   ac_status=$?
15456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15457   (exit $ac_status); }; } &&
15458          { ac_try='test -s conftest$ac_exeext'
15459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15460   (eval $ac_try) 2>&5
15461   ac_status=$?
15462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15463   (exit $ac_status); }; }; then
15464   ac_cv_func_syslog=yes
15465 else
15466   echo "$as_me: failed program was:" >&5
15467 sed 's/^/| /' conftest.$ac_ext >&5
15468
15469 ac_cv_func_syslog=no
15470 fi
15471 rm -f conftest.err conftest.$ac_objext \
15472       conftest$ac_exeext conftest.$ac_ext
15473 fi
15474 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15475 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15476 if test $ac_cv_func_syslog = yes; then
15477   if test "${ac_cv_header_syslog_h+set}" = set; then
15478   echo "$as_me:$LINENO: checking for syslog.h" >&5
15479 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15480 if test "${ac_cv_header_syslog_h+set}" = set; then
15481   echo $ECHO_N "(cached) $ECHO_C" >&6
15482 fi
15483 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15484 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15485 else
15486   # Is the header compilable?
15487 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15488 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15489 cat >conftest.$ac_ext <<_ACEOF
15490 /* confdefs.h.  */
15491 _ACEOF
15492 cat confdefs.h >>conftest.$ac_ext
15493 cat >>conftest.$ac_ext <<_ACEOF
15494 /* end confdefs.h.  */
15495 $ac_includes_default
15496 #include <syslog.h>
15497 _ACEOF
15498 rm -f conftest.$ac_objext
15499 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15500   (eval $ac_compile) 2>conftest.er1
15501   ac_status=$?
15502   grep -v '^ *+' conftest.er1 >conftest.err
15503   rm -f conftest.er1
15504   cat conftest.err >&5
15505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15506   (exit $ac_status); } &&
15507          { ac_try='test -z "$ac_c_werror_flag"
15508                          || test ! -s conftest.err'
15509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15510   (eval $ac_try) 2>&5
15511   ac_status=$?
15512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513   (exit $ac_status); }; } &&
15514          { ac_try='test -s conftest.$ac_objext'
15515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516   (eval $ac_try) 2>&5
15517   ac_status=$?
15518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519   (exit $ac_status); }; }; then
15520   ac_header_compiler=yes
15521 else
15522   echo "$as_me: failed program was:" >&5
15523 sed 's/^/| /' conftest.$ac_ext >&5
15524
15525 ac_header_compiler=no
15526 fi
15527 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15528 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15529 echo "${ECHO_T}$ac_header_compiler" >&6
15530
15531 # Is the header present?
15532 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15533 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15534 cat >conftest.$ac_ext <<_ACEOF
15535 /* confdefs.h.  */
15536 _ACEOF
15537 cat confdefs.h >>conftest.$ac_ext
15538 cat >>conftest.$ac_ext <<_ACEOF
15539 /* end confdefs.h.  */
15540 #include <syslog.h>
15541 _ACEOF
15542 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15543   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15544   ac_status=$?
15545   grep -v '^ *+' conftest.er1 >conftest.err
15546   rm -f conftest.er1
15547   cat conftest.err >&5
15548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549   (exit $ac_status); } >/dev/null; then
15550   if test -s conftest.err; then
15551     ac_cpp_err=$ac_c_preproc_warn_flag
15552     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15553   else
15554     ac_cpp_err=
15555   fi
15556 else
15557   ac_cpp_err=yes
15558 fi
15559 if test -z "$ac_cpp_err"; then
15560   ac_header_preproc=yes
15561 else
15562   echo "$as_me: failed program was:" >&5
15563 sed 's/^/| /' conftest.$ac_ext >&5
15564
15565   ac_header_preproc=no
15566 fi
15567 rm -f conftest.err conftest.$ac_ext
15568 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15569 echo "${ECHO_T}$ac_header_preproc" >&6
15570
15571 # So?  What about this header?
15572 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15573   yes:no: )
15574     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15575 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15576     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15577 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15578     ac_header_preproc=yes
15579     ;;
15580   no:yes:* )
15581     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15582 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15583     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15584 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15585     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15586 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15587     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15588 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15589     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15590 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15591     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15592 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15593     (
15594       cat <<\_ASBOX
15595 ## ---------------------------------------- ##
15596 ## Report this to pgsql-bugs@postgresql.org ##
15597 ## ---------------------------------------- ##
15598 _ASBOX
15599     ) |
15600       sed "s/^/$as_me: WARNING:     /" >&2
15601     ;;
15602 esac
15603 echo "$as_me:$LINENO: checking for syslog.h" >&5
15604 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15605 if test "${ac_cv_header_syslog_h+set}" = set; then
15606   echo $ECHO_N "(cached) $ECHO_C" >&6
15607 else
15608   ac_cv_header_syslog_h=$ac_header_preproc
15609 fi
15610 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15611 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15612
15613 fi
15614 if test $ac_cv_header_syslog_h = yes; then
15615
15616 cat >>confdefs.h <<\_ACEOF
15617 #define HAVE_SYSLOG 1
15618 _ACEOF
15619
15620 fi
15621
15622
15623 fi
15624
15625
15626 echo "$as_me:$LINENO: checking for optreset" >&5
15627 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15628 if test "${pgac_cv_var_int_optreset+set}" = set; then
15629   echo $ECHO_N "(cached) $ECHO_C" >&6
15630 else
15631   cat >conftest.$ac_ext <<_ACEOF
15632 /* confdefs.h.  */
15633 _ACEOF
15634 cat confdefs.h >>conftest.$ac_ext
15635 cat >>conftest.$ac_ext <<_ACEOF
15636 /* end confdefs.h.  */
15637 #include <unistd.h>
15638 int
15639 main ()
15640 {
15641 extern int optreset; optreset = 1;
15642   ;
15643   return 0;
15644 }
15645 _ACEOF
15646 rm -f conftest.$ac_objext conftest$ac_exeext
15647 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15648   (eval $ac_link) 2>conftest.er1
15649   ac_status=$?
15650   grep -v '^ *+' conftest.er1 >conftest.err
15651   rm -f conftest.er1
15652   cat conftest.err >&5
15653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15654   (exit $ac_status); } &&
15655          { ac_try='test -z "$ac_c_werror_flag"
15656                          || test ! -s conftest.err'
15657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15658   (eval $ac_try) 2>&5
15659   ac_status=$?
15660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15661   (exit $ac_status); }; } &&
15662          { ac_try='test -s conftest$ac_exeext'
15663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15664   (eval $ac_try) 2>&5
15665   ac_status=$?
15666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15667   (exit $ac_status); }; }; then
15668   pgac_cv_var_int_optreset=yes
15669 else
15670   echo "$as_me: failed program was:" >&5
15671 sed 's/^/| /' conftest.$ac_ext >&5
15672
15673 pgac_cv_var_int_optreset=no
15674 fi
15675 rm -f conftest.err conftest.$ac_objext \
15676       conftest$ac_exeext conftest.$ac_ext
15677 fi
15678 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15679 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15680 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15681
15682 cat >>confdefs.h <<\_ACEOF
15683 #define HAVE_INT_OPTRESET 1
15684 _ACEOF
15685
15686 fi
15687
15688
15689
15690 for ac_func in strtoll strtoq
15691 do
15692 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15693 echo "$as_me:$LINENO: checking for $ac_func" >&5
15694 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15695 if eval "test \"\${$as_ac_var+set}\" = set"; then
15696   echo $ECHO_N "(cached) $ECHO_C" >&6
15697 else
15698   cat >conftest.$ac_ext <<_ACEOF
15699 /* confdefs.h.  */
15700 _ACEOF
15701 cat confdefs.h >>conftest.$ac_ext
15702 cat >>conftest.$ac_ext <<_ACEOF
15703 /* end confdefs.h.  */
15704 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15705    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15706 #define $ac_func innocuous_$ac_func
15707
15708 /* System header to define __stub macros and hopefully few prototypes,
15709     which can conflict with char $ac_func (); below.
15710     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15711     <limits.h> exists even on freestanding compilers.  */
15712
15713 #ifdef __STDC__
15714 # include <limits.h>
15715 #else
15716 # include <assert.h>
15717 #endif
15718
15719 #undef $ac_func
15720
15721 /* Override any gcc2 internal prototype to avoid an error.  */
15722 #ifdef __cplusplus
15723 extern "C"
15724 {
15725 #endif
15726 /* We use char because int might match the return type of a gcc2
15727    builtin and then its argument prototype would still apply.  */
15728 char $ac_func ();
15729 /* The GNU C library defines this for functions which it implements
15730     to always fail with ENOSYS.  Some functions are actually named
15731     something starting with __ and the normal name is an alias.  */
15732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15733 choke me
15734 #else
15735 char (*f) () = $ac_func;
15736 #endif
15737 #ifdef __cplusplus
15738 }
15739 #endif
15740
15741 int
15742 main ()
15743 {
15744 return f != $ac_func;
15745   ;
15746   return 0;
15747 }
15748 _ACEOF
15749 rm -f conftest.$ac_objext conftest$ac_exeext
15750 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15751   (eval $ac_link) 2>conftest.er1
15752   ac_status=$?
15753   grep -v '^ *+' conftest.er1 >conftest.err
15754   rm -f conftest.er1
15755   cat conftest.err >&5
15756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15757   (exit $ac_status); } &&
15758          { ac_try='test -z "$ac_c_werror_flag"
15759                          || test ! -s conftest.err'
15760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15761   (eval $ac_try) 2>&5
15762   ac_status=$?
15763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764   (exit $ac_status); }; } &&
15765          { ac_try='test -s conftest$ac_exeext'
15766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15767   (eval $ac_try) 2>&5
15768   ac_status=$?
15769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15770   (exit $ac_status); }; }; then
15771   eval "$as_ac_var=yes"
15772 else
15773   echo "$as_me: failed program was:" >&5
15774 sed 's/^/| /' conftest.$ac_ext >&5
15775
15776 eval "$as_ac_var=no"
15777 fi
15778 rm -f conftest.err conftest.$ac_objext \
15779       conftest$ac_exeext conftest.$ac_ext
15780 fi
15781 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15782 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15783 if test `eval echo '${'$as_ac_var'}'` = yes; then
15784   cat >>confdefs.h <<_ACEOF
15785 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15786 _ACEOF
15787  break
15788 fi
15789 done
15790
15791
15792
15793 for ac_func in strtoull strtouq
15794 do
15795 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15796 echo "$as_me:$LINENO: checking for $ac_func" >&5
15797 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15798 if eval "test \"\${$as_ac_var+set}\" = set"; then
15799   echo $ECHO_N "(cached) $ECHO_C" >&6
15800 else
15801   cat >conftest.$ac_ext <<_ACEOF
15802 /* confdefs.h.  */
15803 _ACEOF
15804 cat confdefs.h >>conftest.$ac_ext
15805 cat >>conftest.$ac_ext <<_ACEOF
15806 /* end confdefs.h.  */
15807 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15808    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15809 #define $ac_func innocuous_$ac_func
15810
15811 /* System header to define __stub macros and hopefully few prototypes,
15812     which can conflict with char $ac_func (); below.
15813     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15814     <limits.h> exists even on freestanding compilers.  */
15815
15816 #ifdef __STDC__
15817 # include <limits.h>
15818 #else
15819 # include <assert.h>
15820 #endif
15821
15822 #undef $ac_func
15823
15824 /* Override any gcc2 internal prototype to avoid an error.  */
15825 #ifdef __cplusplus
15826 extern "C"
15827 {
15828 #endif
15829 /* We use char because int might match the return type of a gcc2
15830    builtin and then its argument prototype would still apply.  */
15831 char $ac_func ();
15832 /* The GNU C library defines this for functions which it implements
15833     to always fail with ENOSYS.  Some functions are actually named
15834     something starting with __ and the normal name is an alias.  */
15835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15836 choke me
15837 #else
15838 char (*f) () = $ac_func;
15839 #endif
15840 #ifdef __cplusplus
15841 }
15842 #endif
15843
15844 int
15845 main ()
15846 {
15847 return f != $ac_func;
15848   ;
15849   return 0;
15850 }
15851 _ACEOF
15852 rm -f conftest.$ac_objext conftest$ac_exeext
15853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15854   (eval $ac_link) 2>conftest.er1
15855   ac_status=$?
15856   grep -v '^ *+' conftest.er1 >conftest.err
15857   rm -f conftest.er1
15858   cat conftest.err >&5
15859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15860   (exit $ac_status); } &&
15861          { ac_try='test -z "$ac_c_werror_flag"
15862                          || test ! -s conftest.err'
15863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15864   (eval $ac_try) 2>&5
15865   ac_status=$?
15866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15867   (exit $ac_status); }; } &&
15868          { ac_try='test -s conftest$ac_exeext'
15869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15870   (eval $ac_try) 2>&5
15871   ac_status=$?
15872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15873   (exit $ac_status); }; }; then
15874   eval "$as_ac_var=yes"
15875 else
15876   echo "$as_me: failed program was:" >&5
15877 sed 's/^/| /' conftest.$ac_ext >&5
15878
15879 eval "$as_ac_var=no"
15880 fi
15881 rm -f conftest.err conftest.$ac_objext \
15882       conftest$ac_exeext conftest.$ac_ext
15883 fi
15884 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15885 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15886 if test `eval echo '${'$as_ac_var'}'` = yes; then
15887   cat >>confdefs.h <<_ACEOF
15888 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15889 _ACEOF
15890  break
15891 fi
15892 done
15893
15894
15895 # Check for one of atexit() or on_exit()
15896
15897 for ac_func in atexit
15898 do
15899 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15900 echo "$as_me:$LINENO: checking for $ac_func" >&5
15901 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15902 if eval "test \"\${$as_ac_var+set}\" = set"; then
15903   echo $ECHO_N "(cached) $ECHO_C" >&6
15904 else
15905   cat >conftest.$ac_ext <<_ACEOF
15906 /* confdefs.h.  */
15907 _ACEOF
15908 cat confdefs.h >>conftest.$ac_ext
15909 cat >>conftest.$ac_ext <<_ACEOF
15910 /* end confdefs.h.  */
15911 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15912    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15913 #define $ac_func innocuous_$ac_func
15914
15915 /* System header to define __stub macros and hopefully few prototypes,
15916     which can conflict with char $ac_func (); below.
15917     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15918     <limits.h> exists even on freestanding compilers.  */
15919
15920 #ifdef __STDC__
15921 # include <limits.h>
15922 #else
15923 # include <assert.h>
15924 #endif
15925
15926 #undef $ac_func
15927
15928 /* Override any gcc2 internal prototype to avoid an error.  */
15929 #ifdef __cplusplus
15930 extern "C"
15931 {
15932 #endif
15933 /* We use char because int might match the return type of a gcc2
15934    builtin and then its argument prototype would still apply.  */
15935 char $ac_func ();
15936 /* The GNU C library defines this for functions which it implements
15937     to always fail with ENOSYS.  Some functions are actually named
15938     something starting with __ and the normal name is an alias.  */
15939 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15940 choke me
15941 #else
15942 char (*f) () = $ac_func;
15943 #endif
15944 #ifdef __cplusplus
15945 }
15946 #endif
15947
15948 int
15949 main ()
15950 {
15951 return f != $ac_func;
15952   ;
15953   return 0;
15954 }
15955 _ACEOF
15956 rm -f conftest.$ac_objext conftest$ac_exeext
15957 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15958   (eval $ac_link) 2>conftest.er1
15959   ac_status=$?
15960   grep -v '^ *+' conftest.er1 >conftest.err
15961   rm -f conftest.er1
15962   cat conftest.err >&5
15963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964   (exit $ac_status); } &&
15965          { ac_try='test -z "$ac_c_werror_flag"
15966                          || test ! -s conftest.err'
15967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15968   (eval $ac_try) 2>&5
15969   ac_status=$?
15970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15971   (exit $ac_status); }; } &&
15972          { ac_try='test -s conftest$ac_exeext'
15973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15974   (eval $ac_try) 2>&5
15975   ac_status=$?
15976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15977   (exit $ac_status); }; }; then
15978   eval "$as_ac_var=yes"
15979 else
15980   echo "$as_me: failed program was:" >&5
15981 sed 's/^/| /' conftest.$ac_ext >&5
15982
15983 eval "$as_ac_var=no"
15984 fi
15985 rm -f conftest.err conftest.$ac_objext \
15986       conftest$ac_exeext conftest.$ac_ext
15987 fi
15988 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15989 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15990 if test `eval echo '${'$as_ac_var'}'` = yes; then
15991   cat >>confdefs.h <<_ACEOF
15992 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15993 _ACEOF
15994
15995 else
15996
15997 for ac_func in on_exit
15998 do
15999 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16000 echo "$as_me:$LINENO: checking for $ac_func" >&5
16001 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16002 if eval "test \"\${$as_ac_var+set}\" = set"; then
16003   echo $ECHO_N "(cached) $ECHO_C" >&6
16004 else
16005   cat >conftest.$ac_ext <<_ACEOF
16006 /* confdefs.h.  */
16007 _ACEOF
16008 cat confdefs.h >>conftest.$ac_ext
16009 cat >>conftest.$ac_ext <<_ACEOF
16010 /* end confdefs.h.  */
16011 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16012    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16013 #define $ac_func innocuous_$ac_func
16014
16015 /* System header to define __stub macros and hopefully few prototypes,
16016     which can conflict with char $ac_func (); below.
16017     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16018     <limits.h> exists even on freestanding compilers.  */
16019
16020 #ifdef __STDC__
16021 # include <limits.h>
16022 #else
16023 # include <assert.h>
16024 #endif
16025
16026 #undef $ac_func
16027
16028 /* Override any gcc2 internal prototype to avoid an error.  */
16029 #ifdef __cplusplus
16030 extern "C"
16031 {
16032 #endif
16033 /* We use char because int might match the return type of a gcc2
16034    builtin and then its argument prototype would still apply.  */
16035 char $ac_func ();
16036 /* The GNU C library defines this for functions which it implements
16037     to always fail with ENOSYS.  Some functions are actually named
16038     something starting with __ and the normal name is an alias.  */
16039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16040 choke me
16041 #else
16042 char (*f) () = $ac_func;
16043 #endif
16044 #ifdef __cplusplus
16045 }
16046 #endif
16047
16048 int
16049 main ()
16050 {
16051 return f != $ac_func;
16052   ;
16053   return 0;
16054 }
16055 _ACEOF
16056 rm -f conftest.$ac_objext conftest$ac_exeext
16057 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16058   (eval $ac_link) 2>conftest.er1
16059   ac_status=$?
16060   grep -v '^ *+' conftest.er1 >conftest.err
16061   rm -f conftest.er1
16062   cat conftest.err >&5
16063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16064   (exit $ac_status); } &&
16065          { ac_try='test -z "$ac_c_werror_flag"
16066                          || test ! -s conftest.err'
16067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16068   (eval $ac_try) 2>&5
16069   ac_status=$?
16070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16071   (exit $ac_status); }; } &&
16072          { ac_try='test -s conftest$ac_exeext'
16073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16074   (eval $ac_try) 2>&5
16075   ac_status=$?
16076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16077   (exit $ac_status); }; }; then
16078   eval "$as_ac_var=yes"
16079 else
16080   echo "$as_me: failed program was:" >&5
16081 sed 's/^/| /' conftest.$ac_ext >&5
16082
16083 eval "$as_ac_var=no"
16084 fi
16085 rm -f conftest.err conftest.$ac_objext \
16086       conftest$ac_exeext conftest.$ac_ext
16087 fi
16088 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16089 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16090 if test `eval echo '${'$as_ac_var'}'` = yes; then
16091   cat >>confdefs.h <<_ACEOF
16092 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16093 _ACEOF
16094
16095 else
16096   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16097 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16098    { (exit 1); exit 1; }; }
16099 fi
16100 done
16101
16102 fi
16103 done
16104
16105
16106 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16107 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16108 if test "${ac_cv_sys_largefile_source+set}" = set; then
16109   echo $ECHO_N "(cached) $ECHO_C" >&6
16110 else
16111   while :; do
16112   ac_cv_sys_largefile_source=no
16113   cat >conftest.$ac_ext <<_ACEOF
16114 /* confdefs.h.  */
16115 _ACEOF
16116 cat confdefs.h >>conftest.$ac_ext
16117 cat >>conftest.$ac_ext <<_ACEOF
16118 /* end confdefs.h.  */
16119 #include <stdio.h>
16120 int
16121 main ()
16122 {
16123 return !fseeko;
16124   ;
16125   return 0;
16126 }
16127 _ACEOF
16128 rm -f conftest.$ac_objext
16129 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16130   (eval $ac_compile) 2>conftest.er1
16131   ac_status=$?
16132   grep -v '^ *+' conftest.er1 >conftest.err
16133   rm -f conftest.er1
16134   cat conftest.err >&5
16135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136   (exit $ac_status); } &&
16137          { ac_try='test -z "$ac_c_werror_flag"
16138                          || test ! -s conftest.err'
16139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16140   (eval $ac_try) 2>&5
16141   ac_status=$?
16142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16143   (exit $ac_status); }; } &&
16144          { ac_try='test -s conftest.$ac_objext'
16145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16146   (eval $ac_try) 2>&5
16147   ac_status=$?
16148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16149   (exit $ac_status); }; }; then
16150   break
16151 else
16152   echo "$as_me: failed program was:" >&5
16153 sed 's/^/| /' conftest.$ac_ext >&5
16154
16155 fi
16156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16157   cat >conftest.$ac_ext <<_ACEOF
16158 /* confdefs.h.  */
16159 _ACEOF
16160 cat confdefs.h >>conftest.$ac_ext
16161 cat >>conftest.$ac_ext <<_ACEOF
16162 /* end confdefs.h.  */
16163 #define _LARGEFILE_SOURCE 1
16164 #include <stdio.h>
16165 int
16166 main ()
16167 {
16168 return !fseeko;
16169   ;
16170   return 0;
16171 }
16172 _ACEOF
16173 rm -f conftest.$ac_objext
16174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16175   (eval $ac_compile) 2>conftest.er1
16176   ac_status=$?
16177   grep -v '^ *+' conftest.er1 >conftest.err
16178   rm -f conftest.er1
16179   cat conftest.err >&5
16180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16181   (exit $ac_status); } &&
16182          { ac_try='test -z "$ac_c_werror_flag"
16183                          || test ! -s conftest.err'
16184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16185   (eval $ac_try) 2>&5
16186   ac_status=$?
16187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16188   (exit $ac_status); }; } &&
16189          { ac_try='test -s conftest.$ac_objext'
16190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16191   (eval $ac_try) 2>&5
16192   ac_status=$?
16193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16194   (exit $ac_status); }; }; then
16195   ac_cv_sys_largefile_source=1; break
16196 else
16197   echo "$as_me: failed program was:" >&5
16198 sed 's/^/| /' conftest.$ac_ext >&5
16199
16200 fi
16201 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16202   break
16203 done
16204 fi
16205 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16206 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16207 if test "$ac_cv_sys_largefile_source" != no; then
16208
16209 cat >>confdefs.h <<_ACEOF
16210 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16211 _ACEOF
16212
16213 fi
16214 rm -f conftest*
16215
16216 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16217 # in glibc 2.1.3, but that breaks too many other things.
16218 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16219 echo "$as_me:$LINENO: checking for fseeko" >&5
16220 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16221 if test "${ac_cv_func_fseeko+set}" = set; then
16222   echo $ECHO_N "(cached) $ECHO_C" >&6
16223 else
16224   cat >conftest.$ac_ext <<_ACEOF
16225 /* confdefs.h.  */
16226 _ACEOF
16227 cat confdefs.h >>conftest.$ac_ext
16228 cat >>conftest.$ac_ext <<_ACEOF
16229 /* end confdefs.h.  */
16230 #include <stdio.h>
16231 int
16232 main ()
16233 {
16234 return fseeko && fseeko (stdin, 0, 0);
16235   ;
16236   return 0;
16237 }
16238 _ACEOF
16239 rm -f conftest.$ac_objext conftest$ac_exeext
16240 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16241   (eval $ac_link) 2>conftest.er1
16242   ac_status=$?
16243   grep -v '^ *+' conftest.er1 >conftest.err
16244   rm -f conftest.er1
16245   cat conftest.err >&5
16246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16247   (exit $ac_status); } &&
16248          { ac_try='test -z "$ac_c_werror_flag"
16249                          || test ! -s conftest.err'
16250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16251   (eval $ac_try) 2>&5
16252   ac_status=$?
16253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16254   (exit $ac_status); }; } &&
16255          { ac_try='test -s conftest$ac_exeext'
16256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16257   (eval $ac_try) 2>&5
16258   ac_status=$?
16259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16260   (exit $ac_status); }; }; then
16261   ac_cv_func_fseeko=yes
16262 else
16263   echo "$as_me: failed program was:" >&5
16264 sed 's/^/| /' conftest.$ac_ext >&5
16265
16266 ac_cv_func_fseeko=no
16267 fi
16268 rm -f conftest.err conftest.$ac_objext \
16269       conftest$ac_exeext conftest.$ac_ext
16270 fi
16271 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16272 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16273 if test $ac_cv_func_fseeko = yes; then
16274
16275 cat >>confdefs.h <<\_ACEOF
16276 #define HAVE_FSEEKO 1
16277 _ACEOF
16278
16279 fi
16280
16281
16282 #
16283 # Pthreads
16284 #
16285 # For each platform, we need to know about any special compile and link
16286 # libraries, and whether the normal C function names are thread-safe.
16287 # See the comment at the top of src/port/thread.c for more information.
16288 #
16289 if test "$enable_thread_safety" = yes; then
16290
16291
16292
16293
16294 ac_ext=c
16295 ac_cpp='$CPP $CPPFLAGS'
16296 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16297 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16298 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16299
16300 acx_pthread_ok=no
16301
16302 # We used to check for pthread.h first, but this fails if pthread.h
16303 # requires special compiler flags (e.g. on True64 or Sequent).
16304 # It gets checked for in the link test anyway.
16305
16306 # First of all, check if the user has set any of the PTHREAD_LIBS,
16307 # etcetera environment variables, and if threads linking works using
16308 # them:
16309 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16310         save_CFLAGS="$CFLAGS"
16311         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16312         save_LIBS="$LIBS"
16313         LIBS="$PTHREAD_LIBS $LIBS"
16314         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16315 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16316         cat >conftest.$ac_ext <<_ACEOF
16317 /* confdefs.h.  */
16318 _ACEOF
16319 cat confdefs.h >>conftest.$ac_ext
16320 cat >>conftest.$ac_ext <<_ACEOF
16321 /* end confdefs.h.  */
16322
16323 /* Override any gcc2 internal prototype to avoid an error.  */
16324 #ifdef __cplusplus
16325 extern "C"
16326 #endif
16327 /* We use char because int might match the return type of a gcc2
16328    builtin and then its argument prototype would still apply.  */
16329 char pthread_join ();
16330 int
16331 main ()
16332 {
16333 pthread_join ();
16334   ;
16335   return 0;
16336 }
16337 _ACEOF
16338 rm -f conftest.$ac_objext conftest$ac_exeext
16339 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16340   (eval $ac_link) 2>conftest.er1
16341   ac_status=$?
16342   grep -v '^ *+' conftest.er1 >conftest.err
16343   rm -f conftest.er1
16344   cat conftest.err >&5
16345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16346   (exit $ac_status); } &&
16347          { ac_try='test -z "$ac_c_werror_flag"
16348                          || test ! -s conftest.err'
16349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16350   (eval $ac_try) 2>&5
16351   ac_status=$?
16352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16353   (exit $ac_status); }; } &&
16354          { ac_try='test -s conftest$ac_exeext'
16355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16356   (eval $ac_try) 2>&5
16357   ac_status=$?
16358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16359   (exit $ac_status); }; }; then
16360   acx_pthread_ok=yes
16361 else
16362   echo "$as_me: failed program was:" >&5
16363 sed 's/^/| /' conftest.$ac_ext >&5
16364
16365 fi
16366 rm -f conftest.err conftest.$ac_objext \
16367       conftest$ac_exeext conftest.$ac_ext
16368         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16369 echo "${ECHO_T}$acx_pthread_ok" >&6
16370         if test x"$acx_pthread_ok" = xno; then
16371                 PTHREAD_LIBS=""
16372                 PTHREAD_CFLAGS=""
16373         fi
16374         LIBS="$save_LIBS"
16375         CFLAGS="$save_CFLAGS"
16376 fi
16377
16378 # We must check for the threads library under a number of different
16379 # names; the ordering is very important because some systems
16380 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16381 # libraries is broken (non-POSIX).
16382
16383 # Create a list of thread flags to try.  Items starting with a "-" are
16384 # C compiler flags, and other items are library names, except for "none"
16385 # which indicates that we try without any flags at all, and "pthread-config"
16386 # which is a program returning the flags for the Pth emulation library.
16387
16388 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16389
16390 # The ordering *is* (sometimes) important.  Some notes on the
16391 # individual items follow:
16392
16393 # pthreads: AIX (must check this before -lpthread)
16394 # none: in case threads are in libc; should be tried before -Kthread and
16395 #       other compiler flags to prevent continual compiler warnings
16396 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16397 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16398 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16399 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16400 # -pthreads: Solaris/gcc
16401 # -mthreads: Mingw32/gcc, Lynx/gcc
16402 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16403 #      doesn't hurt to check since this sometimes defines pthreads too;
16404 #      also defines -D_REENTRANT)
16405 # pthread: Linux, etcetera
16406 # --thread-safe: KAI C++
16407 # pthread-config: use pthread-config program (for GNU Pth library)
16408
16409 case "${host_cpu}-${host_os}" in
16410         *solaris*)
16411
16412         # On Solaris (at least, for some versions), libc contains stubbed
16413         # (non-functional) versions of the pthreads routines, so link-based
16414         # tests will erroneously succeed.  (We need to link with -pthread or
16415         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16416         # a function called by this macro, so we could check for that, but
16417         # who knows whether they'll stub that too in a future libc.)  So,
16418         # we'll just look for -pthreads and -lpthread first:
16419
16420         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16421         ;;
16422 esac
16423
16424 if test x"$acx_pthread_ok" = xno; then
16425 for flag in $acx_pthread_flags; do
16426
16427         tryPTHREAD_CFLAGS=""
16428         tryPTHREAD_LIBS=""
16429         case $flag in
16430                 none)
16431                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16432 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16433                 ;;
16434
16435                 -*)
16436                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16437 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16438                 tryPTHREAD_CFLAGS="$flag"
16439                 ;;
16440
16441                 pthread-config)
16442                 # skip this if we already have flags defined, for PostgreSQL
16443                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16444                 # Extract the first word of "pthread-config", so it can be a program name with args.
16445 set dummy pthread-config; ac_word=$2
16446 echo "$as_me:$LINENO: checking for $ac_word" >&5
16447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16448 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16449   echo $ECHO_N "(cached) $ECHO_C" >&6
16450 else
16451   if test -n "$acx_pthread_config"; then
16452   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16453 else
16454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16455 for as_dir in $PATH
16456 do
16457   IFS=$as_save_IFS
16458   test -z "$as_dir" && as_dir=.
16459   for ac_exec_ext in '' $ac_executable_extensions; do
16460   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16461     ac_cv_prog_acx_pthread_config="yes"
16462     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16463     break 2
16464   fi
16465 done
16466 done
16467
16468   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16469 fi
16470 fi
16471 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16472 if test -n "$acx_pthread_config"; then
16473   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16474 echo "${ECHO_T}$acx_pthread_config" >&6
16475 else
16476   echo "$as_me:$LINENO: result: no" >&5
16477 echo "${ECHO_T}no" >&6
16478 fi
16479
16480                 if test x"$acx_pthread_config" = xno; then continue; fi
16481                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16482                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16483                 ;;
16484
16485                 *)
16486                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16487 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16488                 tryPTHREAD_LIBS="-l$flag"
16489                 ;;
16490         esac
16491
16492         save_LIBS="$LIBS"
16493         save_CFLAGS="$CFLAGS"
16494         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16495         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16496
16497         # Check for various functions.  We must include pthread.h,
16498         # since some functions may be macros.  (On the Sequent, we
16499         # need a special flag -Kthread to make this header compile.)
16500         # We check for pthread_join because it is in -lpthread on IRIX
16501         # while pthread_create is in libc.  We check for pthread_attr_init
16502         # due to DEC craziness with -lpthreads.  We check for
16503         # pthread_cleanup_push because it is one of the few pthread
16504         # functions on Solaris that doesn't have a non-functional libc stub.
16505         # We try pthread_create on general principles.
16506         cat >conftest.$ac_ext <<_ACEOF
16507 /* confdefs.h.  */
16508 _ACEOF
16509 cat confdefs.h >>conftest.$ac_ext
16510 cat >>conftest.$ac_ext <<_ACEOF
16511 /* end confdefs.h.  */
16512 #include <pthread.h>
16513 int
16514 main ()
16515 {
16516 pthread_t th; pthread_join(th, 0);
16517                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16518                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16519   ;
16520   return 0;
16521 }
16522 _ACEOF
16523 rm -f conftest.$ac_objext conftest$ac_exeext
16524 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16525   (eval $ac_link) 2>conftest.er1
16526   ac_status=$?
16527   grep -v '^ *+' conftest.er1 >conftest.err
16528   rm -f conftest.er1
16529   cat conftest.err >&5
16530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16531   (exit $ac_status); } &&
16532          { ac_try='test -z "$ac_c_werror_flag"
16533                          || test ! -s conftest.err'
16534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16535   (eval $ac_try) 2>&5
16536   ac_status=$?
16537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16538   (exit $ac_status); }; } &&
16539          { ac_try='test -s conftest$ac_exeext'
16540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16541   (eval $ac_try) 2>&5
16542   ac_status=$?
16543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16544   (exit $ac_status); }; }; then
16545   acx_pthread_ok=yes
16546 else
16547   echo "$as_me: failed program was:" >&5
16548 sed 's/^/| /' conftest.$ac_ext >&5
16549
16550 acx_pthread_ok=no
16551 fi
16552 rm -f conftest.err conftest.$ac_objext \
16553       conftest$ac_exeext conftest.$ac_ext
16554
16555         if test "x$acx_pthread_ok" = xyes; then
16556             # Don't use options that are ignored by the compiler.
16557             # We find them by checking stderror.
16558             cat >conftest.$ac_ext <<_ACEOF
16559 int
16560 main (int argc, char **argv)
16561 {
16562   (void) argc;
16563   (void) argv;
16564   return 0;
16565 }
16566 _ACEOF
16567             rm -f conftest.$ac_objext conftest$ac_exeext
16568             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16569                 # we continue with more flags because Linux needs -lpthread
16570                 # for libpq builds on PostgreSQL.  The test above only
16571                 # tests for building binaries, not shared libraries.
16572                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16573                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16574             else   acx_pthread_ok=no
16575             fi
16576         fi
16577
16578         LIBS="$save_LIBS"
16579         CFLAGS="$save_CFLAGS"
16580
16581         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16582 echo "${ECHO_T}$acx_pthread_ok" >&6
16583 done
16584 fi
16585
16586 # Various other checks:
16587 if test "x$acx_pthread_ok" = xyes; then
16588         save_LIBS="$LIBS"
16589         LIBS="$PTHREAD_LIBS $LIBS"
16590         save_CFLAGS="$CFLAGS"
16591         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16592
16593         # Detect AIX lossage: threads are created detached by default
16594         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16595         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16596 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16597         cat >conftest.$ac_ext <<_ACEOF
16598 /* confdefs.h.  */
16599 _ACEOF
16600 cat confdefs.h >>conftest.$ac_ext
16601 cat >>conftest.$ac_ext <<_ACEOF
16602 /* end confdefs.h.  */
16603 #include <pthread.h>
16604 int
16605 main ()
16606 {
16607 int attr=PTHREAD_CREATE_JOINABLE;
16608   ;
16609   return 0;
16610 }
16611 _ACEOF
16612 rm -f conftest.$ac_objext conftest$ac_exeext
16613 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16614   (eval $ac_link) 2>conftest.er1
16615   ac_status=$?
16616   grep -v '^ *+' conftest.er1 >conftest.err
16617   rm -f conftest.er1
16618   cat conftest.err >&5
16619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16620   (exit $ac_status); } &&
16621          { ac_try='test -z "$ac_c_werror_flag"
16622                          || test ! -s conftest.err'
16623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16624   (eval $ac_try) 2>&5
16625   ac_status=$?
16626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16627   (exit $ac_status); }; } &&
16628          { ac_try='test -s conftest$ac_exeext'
16629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16630   (eval $ac_try) 2>&5
16631   ac_status=$?
16632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16633   (exit $ac_status); }; }; then
16634   ok=PTHREAD_CREATE_JOINABLE
16635 else
16636   echo "$as_me: failed program was:" >&5
16637 sed 's/^/| /' conftest.$ac_ext >&5
16638
16639 ok=unknown
16640 fi
16641 rm -f conftest.err conftest.$ac_objext \
16642       conftest$ac_exeext conftest.$ac_ext
16643         if test x"$ok" = xunknown; then
16644                 cat >conftest.$ac_ext <<_ACEOF
16645 /* confdefs.h.  */
16646 _ACEOF
16647 cat confdefs.h >>conftest.$ac_ext
16648 cat >>conftest.$ac_ext <<_ACEOF
16649 /* end confdefs.h.  */
16650 #include <pthread.h>
16651 int
16652 main ()
16653 {
16654 int attr=PTHREAD_CREATE_UNDETACHED;
16655   ;
16656   return 0;
16657 }
16658 _ACEOF
16659 rm -f conftest.$ac_objext conftest$ac_exeext
16660 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16661   (eval $ac_link) 2>conftest.er1
16662   ac_status=$?
16663   grep -v '^ *+' conftest.er1 >conftest.err
16664   rm -f conftest.er1
16665   cat conftest.err >&5
16666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16667   (exit $ac_status); } &&
16668          { ac_try='test -z "$ac_c_werror_flag"
16669                          || test ! -s conftest.err'
16670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16671   (eval $ac_try) 2>&5
16672   ac_status=$?
16673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16674   (exit $ac_status); }; } &&
16675          { ac_try='test -s conftest$ac_exeext'
16676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16677   (eval $ac_try) 2>&5
16678   ac_status=$?
16679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16680   (exit $ac_status); }; }; then
16681   ok=PTHREAD_CREATE_UNDETACHED
16682 else
16683   echo "$as_me: failed program was:" >&5
16684 sed 's/^/| /' conftest.$ac_ext >&5
16685
16686 ok=unknown
16687 fi
16688 rm -f conftest.err conftest.$ac_objext \
16689       conftest$ac_exeext conftest.$ac_ext
16690         fi
16691         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16692
16693 cat >>confdefs.h <<\_ACEOF
16694 #define PTHREAD_CREATE_JOINABLE $ok
16695 _ACEOF
16696
16697         fi
16698         echo "$as_me:$LINENO: result: ${ok}" >&5
16699 echo "${ECHO_T}${ok}" >&6
16700         if test x"$ok" = xunknown; then
16701                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16702 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16703         fi
16704
16705         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16706 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16707         flag=no
16708 # We always add these in PostgreSQL
16709 #       case "${host_cpu}-${host_os}" in
16710 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16711 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16712 #       esac
16713         echo "$as_me:$LINENO: result: ${flag}" >&5
16714 echo "${ECHO_T}${flag}" >&6
16715         if test "x$flag" != xno; then
16716                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16717         fi
16718
16719         LIBS="$save_LIBS"
16720         CFLAGS="$save_CFLAGS"
16721
16722 # Supporting cc_r would require a special CC in all places that
16723 # use libpq, and that is ugly, so we don't do it.  Users can still
16724 # define their compiler as cc_r to do thread builds of everything.
16725         # More AIX lossage: must compile with cc_r
16726         # Extract the first word of "cc_r", so it can be a program name with args.
16727 set dummy cc_r; ac_word=$2
16728 echo "$as_me:$LINENO: checking for $ac_word" >&5
16729 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16730 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16731   echo $ECHO_N "(cached) $ECHO_C" >&6
16732 else
16733   if test -n "$PTHREAD_CC"; then
16734   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16735 else
16736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16737 for as_dir in $PATH
16738 do
16739   IFS=$as_save_IFS
16740   test -z "$as_dir" && as_dir=.
16741   for ac_exec_ext in '' $ac_executable_extensions; do
16742   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16743     ac_cv_prog_PTHREAD_CC="cc_r"
16744     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16745     break 2
16746   fi
16747 done
16748 done
16749
16750   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16751 fi
16752 fi
16753 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16754 if test -n "$PTHREAD_CC"; then
16755   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16756 echo "${ECHO_T}$PTHREAD_CC" >&6
16757 else
16758   echo "$as_me:$LINENO: result: no" >&5
16759 echo "${ECHO_T}no" >&6
16760 fi
16761
16762 else
16763         PTHREAD_CC="$CC"
16764 fi
16765
16766
16767
16768
16769
16770 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16771 if test x"$acx_pthread_ok" = xyes; then
16772
16773 cat >>confdefs.h <<\_ACEOF
16774 #define HAVE_PTHREAD 1
16775 _ACEOF
16776
16777         :
16778 else
16779         acx_pthread_ok=no
16780
16781 fi
16782 ac_ext=c
16783 ac_cpp='$CPP $CPPFLAGS'
16784 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16785 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16786 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16787
16788         # set thread flags
16789
16790 # Some platforms use these, so just defineed them.  They can't hurt if they
16791 # are not supported.
16792 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16793
16794
16795 # At this point, we don't want to muck with the compiler name for threading.
16796 # Let's see who fails, perhaps AIX.  2004-04-23
16797 if test "$PTHREAD_CC" != "$CC"; then
16798 { { echo "$as_me:$LINENO: error:
16799 PostgreSQL does not support platforms that require a special compiler
16800 for thread safety." >&5
16801 echo "$as_me: error:
16802 PostgreSQL does not support platforms that require a special compiler
16803 for thread safety." >&2;}
16804    { (exit 1); exit 1; }; }
16805 fi
16806
16807 if test "$THREAD_SUPPORT" = no; then
16808 { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
16809 This platform is known to not support thread-safe programs.  For details,
16810 compile and run src/bin/pg_thread_test." >&5
16811 echo "$as_me: error: cannot enable threads on this platform
16812 This platform is known to not support thread-safe programs.  For details,
16813 compile and run src/bin/pg_thread_test." >&2;}
16814    { (exit 1); exit 1; }; }
16815 fi
16816
16817 # Check for *_r functions
16818 _CFLAGS="$CFLAGS"
16819 _LIBS="$LIBS"
16820 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16821 LIBS="$LIBS $PTHREAD_LIBS"
16822
16823 if test "${ac_cv_header_pthread_h+set}" = set; then
16824   echo "$as_me:$LINENO: checking for pthread.h" >&5
16825 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16826 if test "${ac_cv_header_pthread_h+set}" = set; then
16827   echo $ECHO_N "(cached) $ECHO_C" >&6
16828 fi
16829 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16830 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16831 else
16832   # Is the header compilable?
16833 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16834 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16835 cat >conftest.$ac_ext <<_ACEOF
16836 /* confdefs.h.  */
16837 _ACEOF
16838 cat confdefs.h >>conftest.$ac_ext
16839 cat >>conftest.$ac_ext <<_ACEOF
16840 /* end confdefs.h.  */
16841 $ac_includes_default
16842 #include <pthread.h>
16843 _ACEOF
16844 rm -f conftest.$ac_objext
16845 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16846   (eval $ac_compile) 2>conftest.er1
16847   ac_status=$?
16848   grep -v '^ *+' conftest.er1 >conftest.err
16849   rm -f conftest.er1
16850   cat conftest.err >&5
16851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16852   (exit $ac_status); } &&
16853          { ac_try='test -z "$ac_c_werror_flag"
16854                          || test ! -s conftest.err'
16855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16856   (eval $ac_try) 2>&5
16857   ac_status=$?
16858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16859   (exit $ac_status); }; } &&
16860          { ac_try='test -s conftest.$ac_objext'
16861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16862   (eval $ac_try) 2>&5
16863   ac_status=$?
16864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16865   (exit $ac_status); }; }; then
16866   ac_header_compiler=yes
16867 else
16868   echo "$as_me: failed program was:" >&5
16869 sed 's/^/| /' conftest.$ac_ext >&5
16870
16871 ac_header_compiler=no
16872 fi
16873 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16874 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16875 echo "${ECHO_T}$ac_header_compiler" >&6
16876
16877 # Is the header present?
16878 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16879 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16880 cat >conftest.$ac_ext <<_ACEOF
16881 /* confdefs.h.  */
16882 _ACEOF
16883 cat confdefs.h >>conftest.$ac_ext
16884 cat >>conftest.$ac_ext <<_ACEOF
16885 /* end confdefs.h.  */
16886 #include <pthread.h>
16887 _ACEOF
16888 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16889   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16890   ac_status=$?
16891   grep -v '^ *+' conftest.er1 >conftest.err
16892   rm -f conftest.er1
16893   cat conftest.err >&5
16894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16895   (exit $ac_status); } >/dev/null; then
16896   if test -s conftest.err; then
16897     ac_cpp_err=$ac_c_preproc_warn_flag
16898     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16899   else
16900     ac_cpp_err=
16901   fi
16902 else
16903   ac_cpp_err=yes
16904 fi
16905 if test -z "$ac_cpp_err"; then
16906   ac_header_preproc=yes
16907 else
16908   echo "$as_me: failed program was:" >&5
16909 sed 's/^/| /' conftest.$ac_ext >&5
16910
16911   ac_header_preproc=no
16912 fi
16913 rm -f conftest.err conftest.$ac_ext
16914 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16915 echo "${ECHO_T}$ac_header_preproc" >&6
16916
16917 # So?  What about this header?
16918 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16919   yes:no: )
16920     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16921 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16922     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16923 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16924     ac_header_preproc=yes
16925     ;;
16926   no:yes:* )
16927     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16928 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16929     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16930 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16931     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16932 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16933     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16934 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16935     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16936 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16937     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16938 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16939     (
16940       cat <<\_ASBOX
16941 ## ---------------------------------------- ##
16942 ## Report this to pgsql-bugs@postgresql.org ##
16943 ## ---------------------------------------- ##
16944 _ASBOX
16945     ) |
16946       sed "s/^/$as_me: WARNING:     /" >&2
16947     ;;
16948 esac
16949 echo "$as_me:$LINENO: checking for pthread.h" >&5
16950 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16951 if test "${ac_cv_header_pthread_h+set}" = set; then
16952   echo $ECHO_N "(cached) $ECHO_C" >&6
16953 else
16954   ac_cv_header_pthread_h=$ac_header_preproc
16955 fi
16956 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16957 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16958
16959 fi
16960 if test $ac_cv_header_pthread_h = yes; then
16961   :
16962 else
16963   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16964 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16965    { (exit 1); exit 1; }; }
16966 fi
16967
16968
16969
16970
16971
16972
16973 for ac_func in strerror_r getpwuid_r gethostbyname_r
16974 do
16975 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16976 echo "$as_me:$LINENO: checking for $ac_func" >&5
16977 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16978 if eval "test \"\${$as_ac_var+set}\" = set"; then
16979   echo $ECHO_N "(cached) $ECHO_C" >&6
16980 else
16981   cat >conftest.$ac_ext <<_ACEOF
16982 /* confdefs.h.  */
16983 _ACEOF
16984 cat confdefs.h >>conftest.$ac_ext
16985 cat >>conftest.$ac_ext <<_ACEOF
16986 /* end confdefs.h.  */
16987 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16988    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16989 #define $ac_func innocuous_$ac_func
16990
16991 /* System header to define __stub macros and hopefully few prototypes,
16992     which can conflict with char $ac_func (); below.
16993     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16994     <limits.h> exists even on freestanding compilers.  */
16995
16996 #ifdef __STDC__
16997 # include <limits.h>
16998 #else
16999 # include <assert.h>
17000 #endif
17001
17002 #undef $ac_func
17003
17004 /* Override any gcc2 internal prototype to avoid an error.  */
17005 #ifdef __cplusplus
17006 extern "C"
17007 {
17008 #endif
17009 /* We use char because int might match the return type of a gcc2
17010    builtin and then its argument prototype would still apply.  */
17011 char $ac_func ();
17012 /* The GNU C library defines this for functions which it implements
17013     to always fail with ENOSYS.  Some functions are actually named
17014     something starting with __ and the normal name is an alias.  */
17015 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17016 choke me
17017 #else
17018 char (*f) () = $ac_func;
17019 #endif
17020 #ifdef __cplusplus
17021 }
17022 #endif
17023
17024 int
17025 main ()
17026 {
17027 return f != $ac_func;
17028   ;
17029   return 0;
17030 }
17031 _ACEOF
17032 rm -f conftest.$ac_objext conftest$ac_exeext
17033 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17034   (eval $ac_link) 2>conftest.er1
17035   ac_status=$?
17036   grep -v '^ *+' conftest.er1 >conftest.err
17037   rm -f conftest.er1
17038   cat conftest.err >&5
17039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17040   (exit $ac_status); } &&
17041          { ac_try='test -z "$ac_c_werror_flag"
17042                          || test ! -s conftest.err'
17043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17044   (eval $ac_try) 2>&5
17045   ac_status=$?
17046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17047   (exit $ac_status); }; } &&
17048          { ac_try='test -s conftest$ac_exeext'
17049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17050   (eval $ac_try) 2>&5
17051   ac_status=$?
17052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17053   (exit $ac_status); }; }; then
17054   eval "$as_ac_var=yes"
17055 else
17056   echo "$as_me: failed program was:" >&5
17057 sed 's/^/| /' conftest.$ac_ext >&5
17058
17059 eval "$as_ac_var=no"
17060 fi
17061 rm -f conftest.err conftest.$ac_objext \
17062       conftest$ac_exeext conftest.$ac_ext
17063 fi
17064 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17065 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17066 if test `eval echo '${'$as_ac_var'}'` = yes; then
17067   cat >>confdefs.h <<_ACEOF
17068 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17069 _ACEOF
17070
17071 fi
17072 done
17073
17074
17075 # Do test here with the proper thread flags
17076 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17077 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17078 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17079   echo $ECHO_N "(cached) $ECHO_C" >&6
17080 else
17081   cat >conftest.$ac_ext <<_ACEOF
17082 /* confdefs.h.  */
17083 _ACEOF
17084 cat confdefs.h >>conftest.$ac_ext
17085 cat >>conftest.$ac_ext <<_ACEOF
17086 /* end confdefs.h.  */
17087 #include <sys/types.h>
17088 #include <pwd.h>
17089 int
17090 main ()
17091 {
17092 uid_t uid;
17093 struct passwd *space;
17094 char *buf;
17095 size_t bufsize;
17096 struct passwd **result;
17097 getpwuid_r(uid, space, buf, bufsize, result);
17098   ;
17099   return 0;
17100 }
17101 _ACEOF
17102 rm -f conftest.$ac_objext
17103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17104   (eval $ac_compile) 2>conftest.er1
17105   ac_status=$?
17106   grep -v '^ *+' conftest.er1 >conftest.err
17107   rm -f conftest.er1
17108   cat conftest.err >&5
17109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17110   (exit $ac_status); } &&
17111          { ac_try='test -z "$ac_c_werror_flag"
17112                          || test ! -s conftest.err'
17113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17114   (eval $ac_try) 2>&5
17115   ac_status=$?
17116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17117   (exit $ac_status); }; } &&
17118          { ac_try='test -s conftest.$ac_objext'
17119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17120   (eval $ac_try) 2>&5
17121   ac_status=$?
17122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17123   (exit $ac_status); }; }; then
17124   pgac_func_getpwuid_r_5arg=yes
17125 else
17126   echo "$as_me: failed program was:" >&5
17127 sed 's/^/| /' conftest.$ac_ext >&5
17128
17129 pgac_func_getpwuid_r_5arg=no
17130 fi
17131 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17132 fi
17133 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17134 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17135 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17136
17137 cat >>confdefs.h <<\_ACEOF
17138 #define GETPWUID_R_5ARG
17139 _ACEOF
17140
17141 fi
17142
17143 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17144 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17145 if test "${pgac_func_strerror_r_int+set}" = set; then
17146   echo $ECHO_N "(cached) $ECHO_C" >&6
17147 else
17148   cat >conftest.$ac_ext <<_ACEOF
17149 /* confdefs.h.  */
17150 _ACEOF
17151 cat confdefs.h >>conftest.$ac_ext
17152 cat >>conftest.$ac_ext <<_ACEOF
17153 /* end confdefs.h.  */
17154 #include <string.h>
17155 int
17156 main ()
17157 {
17158 #ifndef _AIX
17159 int strerror_r(int, char *, size_t);
17160 #else
17161 /* Older AIX has 'int' for the third argument so we don't test the args. */
17162 int strerror_r();
17163 #endif
17164   ;
17165   return 0;
17166 }
17167 _ACEOF
17168 rm -f conftest.$ac_objext
17169 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17170   (eval $ac_compile) 2>conftest.er1
17171   ac_status=$?
17172   grep -v '^ *+' conftest.er1 >conftest.err
17173   rm -f conftest.er1
17174   cat conftest.err >&5
17175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17176   (exit $ac_status); } &&
17177          { ac_try='test -z "$ac_c_werror_flag"
17178                          || test ! -s conftest.err'
17179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17180   (eval $ac_try) 2>&5
17181   ac_status=$?
17182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17183   (exit $ac_status); }; } &&
17184          { ac_try='test -s conftest.$ac_objext'
17185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17186   (eval $ac_try) 2>&5
17187   ac_status=$?
17188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17189   (exit $ac_status); }; }; then
17190   pgac_func_strerror_r_int=yes
17191 else
17192   echo "$as_me: failed program was:" >&5
17193 sed 's/^/| /' conftest.$ac_ext >&5
17194
17195 pgac_func_strerror_r_int=no
17196 fi
17197 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17198 fi
17199 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17200 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17201 if test x"$pgac_func_strerror_r_int" = xyes ; then
17202
17203 cat >>confdefs.h <<\_ACEOF
17204 #define STRERROR_R_INT
17205 _ACEOF
17206
17207 fi
17208
17209
17210 CFLAGS="$_CFLAGS"
17211 LIBS="$_LIBS"
17212
17213 else
17214 # do not use values from template file
17215 PTHREAD_CFLAGS=
17216 PTHREAD_LIBS=
17217 fi
17218
17219
17220
17221
17222
17223 # We can test for libldap_r only after we know PTHREAD_LIBS
17224 if test "$with_ldap" = yes ; then
17225   _LIBS="$LIBS"
17226   if test "$PORTNAME" != "win32"; then
17227
17228 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
17229 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
17230 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
17231   echo $ECHO_N "(cached) $ECHO_C" >&6
17232 else
17233   ac_check_lib_save_LIBS=$LIBS
17234 LIBS="-lldap  $LIBS"
17235 cat >conftest.$ac_ext <<_ACEOF
17236 /* confdefs.h.  */
17237 _ACEOF
17238 cat confdefs.h >>conftest.$ac_ext
17239 cat >>conftest.$ac_ext <<_ACEOF
17240 /* end confdefs.h.  */
17241
17242 /* Override any gcc2 internal prototype to avoid an error.  */
17243 #ifdef __cplusplus
17244 extern "C"
17245 #endif
17246 /* We use char because int might match the return type of a gcc2
17247    builtin and then its argument prototype would still apply.  */
17248 char ldap_bind ();
17249 int
17250 main ()
17251 {
17252 ldap_bind ();
17253   ;
17254   return 0;
17255 }
17256 _ACEOF
17257 rm -f conftest.$ac_objext conftest$ac_exeext
17258 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17259   (eval $ac_link) 2>conftest.er1
17260   ac_status=$?
17261   grep -v '^ *+' conftest.er1 >conftest.err
17262   rm -f conftest.er1
17263   cat conftest.err >&5
17264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265   (exit $ac_status); } &&
17266          { ac_try='test -z "$ac_c_werror_flag"
17267                          || test ! -s conftest.err'
17268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17269   (eval $ac_try) 2>&5
17270   ac_status=$?
17271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17272   (exit $ac_status); }; } &&
17273          { ac_try='test -s conftest$ac_exeext'
17274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17275   (eval $ac_try) 2>&5
17276   ac_status=$?
17277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17278   (exit $ac_status); }; }; then
17279   ac_cv_lib_ldap_ldap_bind=yes
17280 else
17281   echo "$as_me: failed program was:" >&5
17282 sed 's/^/| /' conftest.$ac_ext >&5
17283
17284 ac_cv_lib_ldap_ldap_bind=no
17285 fi
17286 rm -f conftest.err conftest.$ac_objext \
17287       conftest$ac_exeext conftest.$ac_ext
17288 LIBS=$ac_check_lib_save_LIBS
17289 fi
17290 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
17291 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
17292 if test $ac_cv_lib_ldap_ldap_bind = yes; then
17293   cat >>confdefs.h <<_ACEOF
17294 #define HAVE_LIBLDAP 1
17295 _ACEOF
17296
17297   LIBS="-lldap $LIBS"
17298
17299 else
17300   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
17301 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
17302    { (exit 1); exit 1; }; }
17303 fi
17304
17305     LDAP_LIBS_BE="-lldap"
17306     if test "$enable_thread_safety" = yes; then
17307       # on some platforms ldap_r fails to link without PTHREAD_LIBS
17308
17309 echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
17310 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6
17311 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
17312   echo $ECHO_N "(cached) $ECHO_C" >&6
17313 else
17314   ac_check_lib_save_LIBS=$LIBS
17315 LIBS="-lldap_r $PTHREAD_LIBS $LIBS"
17316 cat >conftest.$ac_ext <<_ACEOF
17317 /* confdefs.h.  */
17318 _ACEOF
17319 cat confdefs.h >>conftest.$ac_ext
17320 cat >>conftest.$ac_ext <<_ACEOF
17321 /* end confdefs.h.  */
17322
17323 /* Override any gcc2 internal prototype to avoid an error.  */
17324 #ifdef __cplusplus
17325 extern "C"
17326 #endif
17327 /* We use char because int might match the return type of a gcc2
17328    builtin and then its argument prototype would still apply.  */
17329 char ldap_simple_bind ();
17330 int
17331 main ()
17332 {
17333 ldap_simple_bind ();
17334   ;
17335   return 0;
17336 }
17337 _ACEOF
17338 rm -f conftest.$ac_objext conftest$ac_exeext
17339 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17340   (eval $ac_link) 2>conftest.er1
17341   ac_status=$?
17342   grep -v '^ *+' conftest.er1 >conftest.err
17343   rm -f conftest.er1
17344   cat conftest.err >&5
17345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17346   (exit $ac_status); } &&
17347          { ac_try='test -z "$ac_c_werror_flag"
17348                          || test ! -s conftest.err'
17349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17350   (eval $ac_try) 2>&5
17351   ac_status=$?
17352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17353   (exit $ac_status); }; } &&
17354          { ac_try='test -s conftest$ac_exeext'
17355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17356   (eval $ac_try) 2>&5
17357   ac_status=$?
17358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17359   (exit $ac_status); }; }; then
17360   ac_cv_lib_ldap_r_ldap_simple_bind=yes
17361 else
17362   echo "$as_me: failed program was:" >&5
17363 sed 's/^/| /' conftest.$ac_ext >&5
17364
17365 ac_cv_lib_ldap_r_ldap_simple_bind=no
17366 fi
17367 rm -f conftest.err conftest.$ac_objext \
17368       conftest$ac_exeext conftest.$ac_ext
17369 LIBS=$ac_check_lib_save_LIBS
17370 fi
17371 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
17372 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6
17373 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
17374   cat >>confdefs.h <<_ACEOF
17375 #define HAVE_LIBLDAP_R 1
17376 _ACEOF
17377
17378   LIBS="-lldap_r $LIBS"
17379
17380 else
17381   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
17382 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
17383    { (exit 1); exit 1; }; }
17384 fi
17385
17386       LDAP_LIBS_FE="-lldap_r"
17387     else
17388       LDAP_LIBS_FE="-lldap"
17389     fi
17390   else
17391
17392 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
17393 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
17394 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
17395   echo $ECHO_N "(cached) $ECHO_C" >&6
17396 else
17397   ac_check_lib_save_LIBS=$LIBS
17398 LIBS="-lwldap32  $LIBS"
17399 cat >conftest.$ac_ext <<_ACEOF
17400 /* confdefs.h.  */
17401 _ACEOF
17402 cat confdefs.h >>conftest.$ac_ext
17403 cat >>conftest.$ac_ext <<_ACEOF
17404 /* end confdefs.h.  */
17405
17406 /* Override any gcc2 internal prototype to avoid an error.  */
17407 #ifdef __cplusplus
17408 extern "C"
17409 #endif
17410 /* We use char because int might match the return type of a gcc2
17411    builtin and then its argument prototype would still apply.  */
17412 char ldap_bind ();
17413 int
17414 main ()
17415 {
17416 ldap_bind ();
17417   ;
17418   return 0;
17419 }
17420 _ACEOF
17421 rm -f conftest.$ac_objext conftest$ac_exeext
17422 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17423   (eval $ac_link) 2>conftest.er1
17424   ac_status=$?
17425   grep -v '^ *+' conftest.er1 >conftest.err
17426   rm -f conftest.er1
17427   cat conftest.err >&5
17428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17429   (exit $ac_status); } &&
17430          { ac_try='test -z "$ac_c_werror_flag"
17431                          || test ! -s conftest.err'
17432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17433   (eval $ac_try) 2>&5
17434   ac_status=$?
17435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436   (exit $ac_status); }; } &&
17437          { ac_try='test -s conftest$ac_exeext'
17438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17439   (eval $ac_try) 2>&5
17440   ac_status=$?
17441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442   (exit $ac_status); }; }; then
17443   ac_cv_lib_wldap32_ldap_bind=yes
17444 else
17445   echo "$as_me: failed program was:" >&5
17446 sed 's/^/| /' conftest.$ac_ext >&5
17447
17448 ac_cv_lib_wldap32_ldap_bind=no
17449 fi
17450 rm -f conftest.err conftest.$ac_objext \
17451       conftest$ac_exeext conftest.$ac_ext
17452 LIBS=$ac_check_lib_save_LIBS
17453 fi
17454 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
17455 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
17456 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
17457   cat >>confdefs.h <<_ACEOF
17458 #define HAVE_LIBWLDAP32 1
17459 _ACEOF
17460
17461   LIBS="-lwldap32 $LIBS"
17462
17463 else
17464   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
17465 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
17466    { (exit 1); exit 1; }; }
17467 fi
17468
17469     LDAP_LIBS_FE="-lwldap32"
17470     LDAP_LIBS_BE="-lwldap32"
17471   fi
17472   LIBS="$_LIBS"
17473 fi
17474
17475
17476
17477
17478 # This test makes sure that run tests work at all.  Sometimes a shared
17479 # library is found by the linker, but the runtime linker can't find it.
17480 # This check should come after all modifications of compiler or linker
17481 # variables, and before any other run tests.
17482 echo "$as_me:$LINENO: checking test program" >&5
17483 echo $ECHO_N "checking test program... $ECHO_C" >&6
17484 if test "$cross_compiling" = yes; then
17485   echo "$as_me:$LINENO: result: cross-compiling" >&5
17486 echo "${ECHO_T}cross-compiling" >&6
17487 else
17488   cat >conftest.$ac_ext <<_ACEOF
17489 /* confdefs.h.  */
17490 _ACEOF
17491 cat confdefs.h >>conftest.$ac_ext
17492 cat >>conftest.$ac_ext <<_ACEOF
17493 /* end confdefs.h.  */
17494 int main() { return 0; }
17495 _ACEOF
17496 rm -f conftest$ac_exeext
17497 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17498   (eval $ac_link) 2>&5
17499   ac_status=$?
17500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17501   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17503   (eval $ac_try) 2>&5
17504   ac_status=$?
17505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17506   (exit $ac_status); }; }; then
17507   echo "$as_me:$LINENO: result: ok" >&5
17508 echo "${ECHO_T}ok" >&6
17509 else
17510   echo "$as_me: program exited with status $ac_status" >&5
17511 echo "$as_me: failed program was:" >&5
17512 sed 's/^/| /' conftest.$ac_ext >&5
17513
17514 ( exit $ac_status )
17515 echo "$as_me:$LINENO: result: failed" >&5
17516 echo "${ECHO_T}failed" >&6
17517 { { echo "$as_me:$LINENO: error:
17518 Could not execute a simple test program.  This may be a problem
17519 related to locating shared libraries.  Check the file 'config.log'
17520 for the exact reason." >&5
17521 echo "$as_me: error:
17522 Could not execute a simple test program.  This may be a problem
17523 related to locating shared libraries.  Check the file 'config.log'
17524 for the exact reason." >&2;}
17525    { (exit 1); exit 1; }; }
17526 fi
17527 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17528 fi
17529
17530 # --------------------
17531 # Run tests below here
17532 # --------------------
17533
17534 # Force use of our snprintf if system's doesn't do arg control
17535 # See comment above at snprintf test for details.
17536 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17537   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17538 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17539 if test "${pgac_cv_printf_arg_control+set}" = set; then
17540   echo $ECHO_N "(cached) $ECHO_C" >&6
17541 else
17542   if test "$cross_compiling" = yes; then
17543   pgac_cv_printf_arg_control=cross
17544 else
17545   cat >conftest.$ac_ext <<_ACEOF
17546 /* confdefs.h.  */
17547 _ACEOF
17548 cat confdefs.h >>conftest.$ac_ext
17549 cat >>conftest.$ac_ext <<_ACEOF
17550 /* end confdefs.h.  */
17551 #include <stdio.h>
17552 #include <string.h>
17553
17554 int main()
17555 {
17556   char buf[100];
17557
17558   /* can it swap arguments? */
17559   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17560   if (strcmp(buf, "4 3") != 0)
17561     return 1;
17562   return 0;
17563 }
17564 _ACEOF
17565 rm -f conftest$ac_exeext
17566 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17567   (eval $ac_link) 2>&5
17568   ac_status=$?
17569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17570   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17572   (eval $ac_try) 2>&5
17573   ac_status=$?
17574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17575   (exit $ac_status); }; }; then
17576   pgac_cv_printf_arg_control=yes
17577 else
17578   echo "$as_me: program exited with status $ac_status" >&5
17579 echo "$as_me: failed program was:" >&5
17580 sed 's/^/| /' conftest.$ac_ext >&5
17581
17582 ( exit $ac_status )
17583 pgac_cv_printf_arg_control=no
17584 fi
17585 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17586 fi
17587
17588 fi
17589 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17590 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17591
17592   if test $pgac_cv_printf_arg_control != yes ; then
17593     pgac_need_repl_snprintf=yes
17594   fi
17595 fi
17596
17597
17598
17599 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17600 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17601 if test "${pgac_cv_type_long_int_64+set}" = set; then
17602   echo $ECHO_N "(cached) $ECHO_C" >&6
17603 else
17604   if test "$cross_compiling" = yes; then
17605   # If cross-compiling, check the size reported by the compiler and
17606 # trust that the arithmetic works.
17607 cat >conftest.$ac_ext <<_ACEOF
17608 /* confdefs.h.  */
17609 _ACEOF
17610 cat confdefs.h >>conftest.$ac_ext
17611 cat >>conftest.$ac_ext <<_ACEOF
17612 /* end confdefs.h.  */
17613
17614 int
17615 main ()
17616 {
17617 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17618 test_array [0] = 0
17619
17620   ;
17621   return 0;
17622 }
17623 _ACEOF
17624 rm -f conftest.$ac_objext
17625 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17626   (eval $ac_compile) 2>conftest.er1
17627   ac_status=$?
17628   grep -v '^ *+' conftest.er1 >conftest.err
17629   rm -f conftest.er1
17630   cat conftest.err >&5
17631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17632   (exit $ac_status); } &&
17633          { ac_try='test -z "$ac_c_werror_flag"
17634                          || test ! -s conftest.err'
17635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17636   (eval $ac_try) 2>&5
17637   ac_status=$?
17638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17639   (exit $ac_status); }; } &&
17640          { ac_try='test -s conftest.$ac_objext'
17641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17642   (eval $ac_try) 2>&5
17643   ac_status=$?
17644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17645   (exit $ac_status); }; }; then
17646   pgac_cv_type_long_int_64=yes
17647 else
17648   echo "$as_me: failed program was:" >&5
17649 sed 's/^/| /' conftest.$ac_ext >&5
17650
17651 pgac_cv_type_long_int_64=no
17652 fi
17653 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17654 else
17655   cat >conftest.$ac_ext <<_ACEOF
17656 /* confdefs.h.  */
17657 _ACEOF
17658 cat confdefs.h >>conftest.$ac_ext
17659 cat >>conftest.$ac_ext <<_ACEOF
17660 /* end confdefs.h.  */
17661 typedef long int ac_int64;
17662
17663 /*
17664  * These are globals to discourage the compiler from folding all the
17665  * arithmetic tests down to compile-time constants.
17666  */
17667 ac_int64 a = 20000001;
17668 ac_int64 b = 40000005;
17669
17670 int does_int64_work()
17671 {
17672   ac_int64 c,d;
17673
17674   if (sizeof(ac_int64) != 8)
17675     return 0;                   /* definitely not the right size */
17676
17677   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17678   c = a * b;
17679   d = (c + b) / b;
17680   if (d != a+1)
17681     return 0;
17682   return 1;
17683 }
17684 main() {
17685   exit(! does_int64_work());
17686 }
17687 _ACEOF
17688 rm -f conftest$ac_exeext
17689 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17690   (eval $ac_link) 2>&5
17691   ac_status=$?
17692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17693   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17695   (eval $ac_try) 2>&5
17696   ac_status=$?
17697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17698   (exit $ac_status); }; }; then
17699   pgac_cv_type_long_int_64=yes
17700 else
17701   echo "$as_me: program exited with status $ac_status" >&5
17702 echo "$as_me: failed program was:" >&5
17703 sed 's/^/| /' conftest.$ac_ext >&5
17704
17705 ( exit $ac_status )
17706 pgac_cv_type_long_int_64=no
17707 fi
17708 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17709 fi
17710 fi
17711 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17712 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17713
17714 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17715 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17716
17717 cat >>confdefs.h <<\_ACEOF
17718 #define HAVE_LONG_INT_64
17719 _ACEOF
17720
17721 fi
17722
17723
17724 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17725   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17726 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17727 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17728   echo $ECHO_N "(cached) $ECHO_C" >&6
17729 else
17730   if test "$cross_compiling" = yes; then
17731   # If cross-compiling, check the size reported by the compiler and
17732 # trust that the arithmetic works.
17733 cat >conftest.$ac_ext <<_ACEOF
17734 /* confdefs.h.  */
17735 _ACEOF
17736 cat confdefs.h >>conftest.$ac_ext
17737 cat >>conftest.$ac_ext <<_ACEOF
17738 /* end confdefs.h.  */
17739
17740 int
17741 main ()
17742 {
17743 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17744 test_array [0] = 0
17745
17746   ;
17747   return 0;
17748 }
17749 _ACEOF
17750 rm -f conftest.$ac_objext
17751 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17752   (eval $ac_compile) 2>conftest.er1
17753   ac_status=$?
17754   grep -v '^ *+' conftest.er1 >conftest.err
17755   rm -f conftest.er1
17756   cat conftest.err >&5
17757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17758   (exit $ac_status); } &&
17759          { ac_try='test -z "$ac_c_werror_flag"
17760                          || test ! -s conftest.err'
17761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17762   (eval $ac_try) 2>&5
17763   ac_status=$?
17764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17765   (exit $ac_status); }; } &&
17766          { ac_try='test -s conftest.$ac_objext'
17767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17768   (eval $ac_try) 2>&5
17769   ac_status=$?
17770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17771   (exit $ac_status); }; }; then
17772   pgac_cv_type_long_long_int_64=yes
17773 else
17774   echo "$as_me: failed program was:" >&5
17775 sed 's/^/| /' conftest.$ac_ext >&5
17776
17777 pgac_cv_type_long_long_int_64=no
17778 fi
17779 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17780 else
17781   cat >conftest.$ac_ext <<_ACEOF
17782 /* confdefs.h.  */
17783 _ACEOF
17784 cat confdefs.h >>conftest.$ac_ext
17785 cat >>conftest.$ac_ext <<_ACEOF
17786 /* end confdefs.h.  */
17787 typedef long long int ac_int64;
17788
17789 /*
17790  * These are globals to discourage the compiler from folding all the
17791  * arithmetic tests down to compile-time constants.
17792  */
17793 ac_int64 a = 20000001;
17794 ac_int64 b = 40000005;
17795
17796 int does_int64_work()
17797 {
17798   ac_int64 c,d;
17799
17800   if (sizeof(ac_int64) != 8)
17801     return 0;                   /* definitely not the right size */
17802
17803   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17804   c = a * b;
17805   d = (c + b) / b;
17806   if (d != a+1)
17807     return 0;
17808   return 1;
17809 }
17810 main() {
17811   exit(! does_int64_work());
17812 }
17813 _ACEOF
17814 rm -f conftest$ac_exeext
17815 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17816   (eval $ac_link) 2>&5
17817   ac_status=$?
17818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17819   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17821   (eval $ac_try) 2>&5
17822   ac_status=$?
17823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17824   (exit $ac_status); }; }; then
17825   pgac_cv_type_long_long_int_64=yes
17826 else
17827   echo "$as_me: program exited with status $ac_status" >&5
17828 echo "$as_me: failed program was:" >&5
17829 sed 's/^/| /' conftest.$ac_ext >&5
17830
17831 ( exit $ac_status )
17832 pgac_cv_type_long_long_int_64=no
17833 fi
17834 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17835 fi
17836 fi
17837 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17838 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17839
17840 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17841 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17842
17843 cat >>confdefs.h <<\_ACEOF
17844 #define HAVE_LONG_LONG_INT_64
17845 _ACEOF
17846
17847 fi
17848
17849 fi
17850
17851
17852
17853 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17854   cat >conftest.$ac_ext <<_ACEOF
17855 /* confdefs.h.  */
17856 _ACEOF
17857 cat confdefs.h >>conftest.$ac_ext
17858 cat >>conftest.$ac_ext <<_ACEOF
17859 /* end confdefs.h.  */
17860
17861 #define INT64CONST(x)  x##LL
17862 long long int foo = INT64CONST(0x1234567890123456);
17863
17864 int
17865 main ()
17866 {
17867
17868   ;
17869   return 0;
17870 }
17871 _ACEOF
17872 rm -f conftest.$ac_objext
17873 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17874   (eval $ac_compile) 2>conftest.er1
17875   ac_status=$?
17876   grep -v '^ *+' conftest.er1 >conftest.err
17877   rm -f conftest.er1
17878   cat conftest.err >&5
17879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17880   (exit $ac_status); } &&
17881          { ac_try='test -z "$ac_c_werror_flag"
17882                          || test ! -s conftest.err'
17883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17884   (eval $ac_try) 2>&5
17885   ac_status=$?
17886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17887   (exit $ac_status); }; } &&
17888          { ac_try='test -s conftest.$ac_objext'
17889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17890   (eval $ac_try) 2>&5
17891   ac_status=$?
17892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17893   (exit $ac_status); }; }; then
17894
17895 cat >>confdefs.h <<\_ACEOF
17896 #define HAVE_LL_CONSTANTS 1
17897 _ACEOF
17898
17899 else
17900   echo "$as_me: failed program was:" >&5
17901 sed 's/^/| /' conftest.$ac_ext >&5
17902
17903 fi
17904 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17905 fi
17906
17907
17908 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17909 # we found we need to use "long long int", better check.  We cope with
17910 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17911 # work, fall back to our own snprintf emulation (which we know uses %lld).
17912
17913 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17914   if test $pgac_need_repl_snprintf = no; then
17915     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17916 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17917 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17918   echo $ECHO_N "(cached) $ECHO_C" >&6
17919 else
17920   for pgac_format in '%lld' '%qd' '%I64d'; do
17921 if test "$cross_compiling" = yes; then
17922   pgac_cv_snprintf_long_long_int_format=cross; break
17923 else
17924   cat >conftest.$ac_ext <<_ACEOF
17925 /* confdefs.h.  */
17926 _ACEOF
17927 cat confdefs.h >>conftest.$ac_ext
17928 cat >>conftest.$ac_ext <<_ACEOF
17929 /* end confdefs.h.  */
17930 #include <stdio.h>
17931 typedef long long int ac_int64;
17932 #define INT64_FORMAT "$pgac_format"
17933
17934 ac_int64 a = 20000001;
17935 ac_int64 b = 40000005;
17936
17937 int does_int64_snprintf_work()
17938 {
17939   ac_int64 c;
17940   char buf[100];
17941
17942   if (sizeof(ac_int64) != 8)
17943     return 0;                   /* doesn't look like the right size */
17944
17945   c = a * b;
17946   snprintf(buf, 100, INT64_FORMAT, c);
17947   if (strcmp(buf, "800000140000005") != 0)
17948     return 0;                   /* either multiply or snprintf is busted */
17949   return 1;
17950 }
17951 main() {
17952   exit(! does_int64_snprintf_work());
17953 }
17954 _ACEOF
17955 rm -f conftest$ac_exeext
17956 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17957   (eval $ac_link) 2>&5
17958   ac_status=$?
17959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17960   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17962   (eval $ac_try) 2>&5
17963   ac_status=$?
17964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17965   (exit $ac_status); }; }; then
17966   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17967 else
17968   echo "$as_me: program exited with status $ac_status" >&5
17969 echo "$as_me: failed program was:" >&5
17970 sed 's/^/| /' conftest.$ac_ext >&5
17971
17972 fi
17973 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17974 fi
17975 done
17976 fi
17977
17978 LONG_LONG_INT_FORMAT=''
17979
17980 case $pgac_cv_snprintf_long_long_int_format in
17981   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17982 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17983   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17984 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17985          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17986   *)     echo "$as_me:$LINENO: result: none" >&5
17987 echo "${ECHO_T}none" >&6;;
17988 esac
17989     if test "$LONG_LONG_INT_FORMAT" = ""; then
17990       # Force usage of our own snprintf, since system snprintf is broken
17991       pgac_need_repl_snprintf=yes
17992       LONG_LONG_INT_FORMAT='%lld'
17993     fi
17994   else
17995     # Here if we previously decided we needed to use our own snprintf
17996     LONG_LONG_INT_FORMAT='%lld'
17997   fi
17998   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17999   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
18000   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
18001 else
18002   # Here if we are not using 'long long int' at all
18003   INT64_FORMAT='"%ld"'
18004   UINT64_FORMAT='"%lu"'
18005 fi
18006
18007
18008 cat >>confdefs.h <<_ACEOF
18009 #define INT64_FORMAT $INT64_FORMAT
18010 _ACEOF
18011
18012
18013
18014 cat >>confdefs.h <<_ACEOF
18015 #define UINT64_FORMAT $UINT64_FORMAT
18016 _ACEOF
18017
18018
18019 # Now we have checked all the reasons to replace snprintf
18020 if test $pgac_need_repl_snprintf = yes; then
18021
18022 cat >>confdefs.h <<\_ACEOF
18023 #define USE_REPL_SNPRINTF 1
18024 _ACEOF
18025
18026   case $LIBOBJS in
18027     "snprintf.$ac_objext"   | \
18028   *" snprintf.$ac_objext"   | \
18029     "snprintf.$ac_objext "* | \
18030   *" snprintf.$ac_objext "* ) ;;
18031   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
18032 esac
18033
18034 fi
18035
18036 # Need a #define for the size of Datum (unsigned long)
18037 echo "$as_me:$LINENO: checking for unsigned long" >&5
18038 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
18039 if test "${ac_cv_type_unsigned_long+set}" = set; then
18040   echo $ECHO_N "(cached) $ECHO_C" >&6
18041 else
18042   cat >conftest.$ac_ext <<_ACEOF
18043 /* confdefs.h.  */
18044 _ACEOF
18045 cat confdefs.h >>conftest.$ac_ext
18046 cat >>conftest.$ac_ext <<_ACEOF
18047 /* end confdefs.h.  */
18048 $ac_includes_default
18049 int
18050 main ()
18051 {
18052 if ((unsigned long *) 0)
18053   return 0;
18054 if (sizeof (unsigned long))
18055   return 0;
18056   ;
18057   return 0;
18058 }
18059 _ACEOF
18060 rm -f conftest.$ac_objext
18061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18062   (eval $ac_compile) 2>conftest.er1
18063   ac_status=$?
18064   grep -v '^ *+' conftest.er1 >conftest.err
18065   rm -f conftest.er1
18066   cat conftest.err >&5
18067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068   (exit $ac_status); } &&
18069          { ac_try='test -z "$ac_c_werror_flag"
18070                          || test ! -s conftest.err'
18071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18072   (eval $ac_try) 2>&5
18073   ac_status=$?
18074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18075   (exit $ac_status); }; } &&
18076          { ac_try='test -s conftest.$ac_objext'
18077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18078   (eval $ac_try) 2>&5
18079   ac_status=$?
18080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18081   (exit $ac_status); }; }; then
18082   ac_cv_type_unsigned_long=yes
18083 else
18084   echo "$as_me: failed program was:" >&5
18085 sed 's/^/| /' conftest.$ac_ext >&5
18086
18087 ac_cv_type_unsigned_long=no
18088 fi
18089 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18090 fi
18091 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
18092 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
18093
18094 echo "$as_me:$LINENO: checking size of unsigned long" >&5
18095 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
18096 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
18097   echo $ECHO_N "(cached) $ECHO_C" >&6
18098 else
18099   if test "$ac_cv_type_unsigned_long" = yes; then
18100   # The cast to unsigned long works around a bug in the HP C Compiler
18101   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18102   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18103   # This bug is HP SR number 8606223364.
18104   if test "$cross_compiling" = yes; then
18105   # Depending upon the size, compute the lo and hi bounds.
18106 cat >conftest.$ac_ext <<_ACEOF
18107 /* confdefs.h.  */
18108 _ACEOF
18109 cat confdefs.h >>conftest.$ac_ext
18110 cat >>conftest.$ac_ext <<_ACEOF
18111 /* end confdefs.h.  */
18112 $ac_includes_default
18113 int
18114 main ()
18115 {
18116 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
18117 test_array [0] = 0
18118
18119   ;
18120   return 0;
18121 }
18122 _ACEOF
18123 rm -f conftest.$ac_objext
18124 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18125   (eval $ac_compile) 2>conftest.er1
18126   ac_status=$?
18127   grep -v '^ *+' conftest.er1 >conftest.err
18128   rm -f conftest.er1
18129   cat conftest.err >&5
18130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18131   (exit $ac_status); } &&
18132          { ac_try='test -z "$ac_c_werror_flag"
18133                          || test ! -s conftest.err'
18134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18135   (eval $ac_try) 2>&5
18136   ac_status=$?
18137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18138   (exit $ac_status); }; } &&
18139          { ac_try='test -s conftest.$ac_objext'
18140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18141   (eval $ac_try) 2>&5
18142   ac_status=$?
18143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18144   (exit $ac_status); }; }; then
18145   ac_lo=0 ac_mid=0
18146   while :; do
18147     cat >conftest.$ac_ext <<_ACEOF
18148 /* confdefs.h.  */
18149 _ACEOF
18150 cat confdefs.h >>conftest.$ac_ext
18151 cat >>conftest.$ac_ext <<_ACEOF
18152 /* end confdefs.h.  */
18153 $ac_includes_default
18154 int
18155 main ()
18156 {
18157 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18158 test_array [0] = 0
18159
18160   ;
18161   return 0;
18162 }
18163 _ACEOF
18164 rm -f conftest.$ac_objext
18165 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18166   (eval $ac_compile) 2>conftest.er1
18167   ac_status=$?
18168   grep -v '^ *+' conftest.er1 >conftest.err
18169   rm -f conftest.er1
18170   cat conftest.err >&5
18171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18172   (exit $ac_status); } &&
18173          { ac_try='test -z "$ac_c_werror_flag"
18174                          || test ! -s conftest.err'
18175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18176   (eval $ac_try) 2>&5
18177   ac_status=$?
18178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18179   (exit $ac_status); }; } &&
18180          { ac_try='test -s conftest.$ac_objext'
18181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18182   (eval $ac_try) 2>&5
18183   ac_status=$?
18184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18185   (exit $ac_status); }; }; then
18186   ac_hi=$ac_mid; break
18187 else
18188   echo "$as_me: failed program was:" >&5
18189 sed 's/^/| /' conftest.$ac_ext >&5
18190
18191 ac_lo=`expr $ac_mid + 1`
18192                     if test $ac_lo -le $ac_mid; then
18193                       ac_lo= ac_hi=
18194                       break
18195                     fi
18196                     ac_mid=`expr 2 '*' $ac_mid + 1`
18197 fi
18198 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18199   done
18200 else
18201   echo "$as_me: failed program was:" >&5
18202 sed 's/^/| /' conftest.$ac_ext >&5
18203
18204 cat >conftest.$ac_ext <<_ACEOF
18205 /* confdefs.h.  */
18206 _ACEOF
18207 cat confdefs.h >>conftest.$ac_ext
18208 cat >>conftest.$ac_ext <<_ACEOF
18209 /* end confdefs.h.  */
18210 $ac_includes_default
18211 int
18212 main ()
18213 {
18214 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
18215 test_array [0] = 0
18216
18217   ;
18218   return 0;
18219 }
18220 _ACEOF
18221 rm -f conftest.$ac_objext
18222 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18223   (eval $ac_compile) 2>conftest.er1
18224   ac_status=$?
18225   grep -v '^ *+' conftest.er1 >conftest.err
18226   rm -f conftest.er1
18227   cat conftest.err >&5
18228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18229   (exit $ac_status); } &&
18230          { ac_try='test -z "$ac_c_werror_flag"
18231                          || test ! -s conftest.err'
18232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18233   (eval $ac_try) 2>&5
18234   ac_status=$?
18235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18236   (exit $ac_status); }; } &&
18237          { ac_try='test -s conftest.$ac_objext'
18238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18239   (eval $ac_try) 2>&5
18240   ac_status=$?
18241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18242   (exit $ac_status); }; }; then
18243   ac_hi=-1 ac_mid=-1
18244   while :; do
18245     cat >conftest.$ac_ext <<_ACEOF
18246 /* confdefs.h.  */
18247 _ACEOF
18248 cat confdefs.h >>conftest.$ac_ext
18249 cat >>conftest.$ac_ext <<_ACEOF
18250 /* end confdefs.h.  */
18251 $ac_includes_default
18252 int
18253 main ()
18254 {
18255 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18256 test_array [0] = 0
18257
18258   ;
18259   return 0;
18260 }
18261 _ACEOF
18262 rm -f conftest.$ac_objext
18263 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18264   (eval $ac_compile) 2>conftest.er1
18265   ac_status=$?
18266   grep -v '^ *+' conftest.er1 >conftest.err
18267   rm -f conftest.er1
18268   cat conftest.err >&5
18269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18270   (exit $ac_status); } &&
18271          { ac_try='test -z "$ac_c_werror_flag"
18272                          || test ! -s conftest.err'
18273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18274   (eval $ac_try) 2>&5
18275   ac_status=$?
18276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18277   (exit $ac_status); }; } &&
18278          { ac_try='test -s conftest.$ac_objext'
18279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18280   (eval $ac_try) 2>&5
18281   ac_status=$?
18282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18283   (exit $ac_status); }; }; then
18284   ac_lo=$ac_mid; break
18285 else
18286   echo "$as_me: failed program was:" >&5
18287 sed 's/^/| /' conftest.$ac_ext >&5
18288
18289 ac_hi=`expr '(' $ac_mid ')' - 1`
18290                        if test $ac_mid -le $ac_hi; then
18291                          ac_lo= ac_hi=
18292                          break
18293                        fi
18294                        ac_mid=`expr 2 '*' $ac_mid`
18295 fi
18296 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18297   done
18298 else
18299   echo "$as_me: failed program was:" >&5
18300 sed 's/^/| /' conftest.$ac_ext >&5
18301
18302 ac_lo= ac_hi=
18303 fi
18304 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18305 fi
18306 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18307 # Binary search between lo and hi bounds.
18308 while test "x$ac_lo" != "x$ac_hi"; do
18309   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18310   cat >conftest.$ac_ext <<_ACEOF
18311 /* confdefs.h.  */
18312 _ACEOF
18313 cat confdefs.h >>conftest.$ac_ext
18314 cat >>conftest.$ac_ext <<_ACEOF
18315 /* end confdefs.h.  */
18316 $ac_includes_default
18317 int
18318 main ()
18319 {
18320 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18321 test_array [0] = 0
18322
18323   ;
18324   return 0;
18325 }
18326 _ACEOF
18327 rm -f conftest.$ac_objext
18328 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18329   (eval $ac_compile) 2>conftest.er1
18330   ac_status=$?
18331   grep -v '^ *+' conftest.er1 >conftest.err
18332   rm -f conftest.er1
18333   cat conftest.err >&5
18334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18335   (exit $ac_status); } &&
18336          { ac_try='test -z "$ac_c_werror_flag"
18337                          || test ! -s conftest.err'
18338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18339   (eval $ac_try) 2>&5
18340   ac_status=$?
18341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18342   (exit $ac_status); }; } &&
18343          { ac_try='test -s conftest.$ac_objext'
18344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18345   (eval $ac_try) 2>&5
18346   ac_status=$?
18347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18348   (exit $ac_status); }; }; then
18349   ac_hi=$ac_mid
18350 else
18351   echo "$as_me: failed program was:" >&5
18352 sed 's/^/| /' conftest.$ac_ext >&5
18353
18354 ac_lo=`expr '(' $ac_mid ')' + 1`
18355 fi
18356 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18357 done
18358 case $ac_lo in
18359 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18360 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18361 See \`config.log' for more details." >&5
18362 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18363 See \`config.log' for more details." >&2;}
18364    { (exit 1); exit 1; }; } ;;
18365 esac
18366 else
18367   if test "$cross_compiling" = yes; then
18368   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18369 See \`config.log' for more details." >&5
18370 echo "$as_me: error: cannot run test program while cross compiling
18371 See \`config.log' for more details." >&2;}
18372    { (exit 1); exit 1; }; }
18373 else
18374   cat >conftest.$ac_ext <<_ACEOF
18375 /* confdefs.h.  */
18376 _ACEOF
18377 cat confdefs.h >>conftest.$ac_ext
18378 cat >>conftest.$ac_ext <<_ACEOF
18379 /* end confdefs.h.  */
18380 $ac_includes_default
18381 long longval () { return (long) (sizeof (unsigned long)); }
18382 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18383 #include <stdio.h>
18384 #include <stdlib.h>
18385 int
18386 main ()
18387 {
18388
18389   FILE *f = fopen ("conftest.val", "w");
18390   if (! f)
18391     exit (1);
18392   if (((long) (sizeof (unsigned long))) < 0)
18393     {
18394       long i = longval ();
18395       if (i != ((long) (sizeof (unsigned long))))
18396         exit (1);
18397       fprintf (f, "%ld\n", i);
18398     }
18399   else
18400     {
18401       unsigned long i = ulongval ();
18402       if (i != ((long) (sizeof (unsigned long))))
18403         exit (1);
18404       fprintf (f, "%lu\n", i);
18405     }
18406   exit (ferror (f) || fclose (f) != 0);
18407
18408   ;
18409   return 0;
18410 }
18411 _ACEOF
18412 rm -f conftest$ac_exeext
18413 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18414   (eval $ac_link) 2>&5
18415   ac_status=$?
18416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18417   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18419   (eval $ac_try) 2>&5
18420   ac_status=$?
18421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18422   (exit $ac_status); }; }; then
18423   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18424 else
18425   echo "$as_me: program exited with status $ac_status" >&5
18426 echo "$as_me: failed program was:" >&5
18427 sed 's/^/| /' conftest.$ac_ext >&5
18428
18429 ( exit $ac_status )
18430 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18431 See \`config.log' for more details." >&5
18432 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18433 See \`config.log' for more details." >&2;}
18434    { (exit 1); exit 1; }; }
18435 fi
18436 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18437 fi
18438 fi
18439 rm -f conftest.val
18440 else
18441   ac_cv_sizeof_unsigned_long=0
18442 fi
18443 fi
18444 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18445 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18446 cat >>confdefs.h <<_ACEOF
18447 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18448 _ACEOF
18449
18450
18451
18452 # And one for the size of size_t (enables tweaks for > 32bit address space)
18453 echo "$as_me:$LINENO: checking for size_t" >&5
18454 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18455 if test "${ac_cv_type_size_t+set}" = set; then
18456   echo $ECHO_N "(cached) $ECHO_C" >&6
18457 else
18458   cat >conftest.$ac_ext <<_ACEOF
18459 /* confdefs.h.  */
18460 _ACEOF
18461 cat confdefs.h >>conftest.$ac_ext
18462 cat >>conftest.$ac_ext <<_ACEOF
18463 /* end confdefs.h.  */
18464 $ac_includes_default
18465 int
18466 main ()
18467 {
18468 if ((size_t *) 0)
18469   return 0;
18470 if (sizeof (size_t))
18471   return 0;
18472   ;
18473   return 0;
18474 }
18475 _ACEOF
18476 rm -f conftest.$ac_objext
18477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18478   (eval $ac_compile) 2>conftest.er1
18479   ac_status=$?
18480   grep -v '^ *+' conftest.er1 >conftest.err
18481   rm -f conftest.er1
18482   cat conftest.err >&5
18483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18484   (exit $ac_status); } &&
18485          { ac_try='test -z "$ac_c_werror_flag"
18486                          || test ! -s conftest.err'
18487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18488   (eval $ac_try) 2>&5
18489   ac_status=$?
18490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18491   (exit $ac_status); }; } &&
18492          { ac_try='test -s conftest.$ac_objext'
18493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18494   (eval $ac_try) 2>&5
18495   ac_status=$?
18496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18497   (exit $ac_status); }; }; then
18498   ac_cv_type_size_t=yes
18499 else
18500   echo "$as_me: failed program was:" >&5
18501 sed 's/^/| /' conftest.$ac_ext >&5
18502
18503 ac_cv_type_size_t=no
18504 fi
18505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18506 fi
18507 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18508 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18509
18510 echo "$as_me:$LINENO: checking size of size_t" >&5
18511 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18512 if test "${ac_cv_sizeof_size_t+set}" = set; then
18513   echo $ECHO_N "(cached) $ECHO_C" >&6
18514 else
18515   if test "$ac_cv_type_size_t" = yes; then
18516   # The cast to unsigned long works around a bug in the HP C Compiler
18517   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18518   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18519   # This bug is HP SR number 8606223364.
18520   if test "$cross_compiling" = yes; then
18521   # Depending upon the size, compute the lo and hi bounds.
18522 cat >conftest.$ac_ext <<_ACEOF
18523 /* confdefs.h.  */
18524 _ACEOF
18525 cat confdefs.h >>conftest.$ac_ext
18526 cat >>conftest.$ac_ext <<_ACEOF
18527 /* end confdefs.h.  */
18528 $ac_includes_default
18529 int
18530 main ()
18531 {
18532 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18533 test_array [0] = 0
18534
18535   ;
18536   return 0;
18537 }
18538 _ACEOF
18539 rm -f conftest.$ac_objext
18540 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18541   (eval $ac_compile) 2>conftest.er1
18542   ac_status=$?
18543   grep -v '^ *+' conftest.er1 >conftest.err
18544   rm -f conftest.er1
18545   cat conftest.err >&5
18546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18547   (exit $ac_status); } &&
18548          { ac_try='test -z "$ac_c_werror_flag"
18549                          || test ! -s conftest.err'
18550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18551   (eval $ac_try) 2>&5
18552   ac_status=$?
18553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18554   (exit $ac_status); }; } &&
18555          { ac_try='test -s conftest.$ac_objext'
18556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18557   (eval $ac_try) 2>&5
18558   ac_status=$?
18559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18560   (exit $ac_status); }; }; then
18561   ac_lo=0 ac_mid=0
18562   while :; do
18563     cat >conftest.$ac_ext <<_ACEOF
18564 /* confdefs.h.  */
18565 _ACEOF
18566 cat confdefs.h >>conftest.$ac_ext
18567 cat >>conftest.$ac_ext <<_ACEOF
18568 /* end confdefs.h.  */
18569 $ac_includes_default
18570 int
18571 main ()
18572 {
18573 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18574 test_array [0] = 0
18575
18576   ;
18577   return 0;
18578 }
18579 _ACEOF
18580 rm -f conftest.$ac_objext
18581 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18582   (eval $ac_compile) 2>conftest.er1
18583   ac_status=$?
18584   grep -v '^ *+' conftest.er1 >conftest.err
18585   rm -f conftest.er1
18586   cat conftest.err >&5
18587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18588   (exit $ac_status); } &&
18589          { ac_try='test -z "$ac_c_werror_flag"
18590                          || test ! -s conftest.err'
18591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18592   (eval $ac_try) 2>&5
18593   ac_status=$?
18594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18595   (exit $ac_status); }; } &&
18596          { ac_try='test -s conftest.$ac_objext'
18597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18598   (eval $ac_try) 2>&5
18599   ac_status=$?
18600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18601   (exit $ac_status); }; }; then
18602   ac_hi=$ac_mid; break
18603 else
18604   echo "$as_me: failed program was:" >&5
18605 sed 's/^/| /' conftest.$ac_ext >&5
18606
18607 ac_lo=`expr $ac_mid + 1`
18608                     if test $ac_lo -le $ac_mid; then
18609                       ac_lo= ac_hi=
18610                       break
18611                     fi
18612                     ac_mid=`expr 2 '*' $ac_mid + 1`
18613 fi
18614 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18615   done
18616 else
18617   echo "$as_me: failed program was:" >&5
18618 sed 's/^/| /' conftest.$ac_ext >&5
18619
18620 cat >conftest.$ac_ext <<_ACEOF
18621 /* confdefs.h.  */
18622 _ACEOF
18623 cat confdefs.h >>conftest.$ac_ext
18624 cat >>conftest.$ac_ext <<_ACEOF
18625 /* end confdefs.h.  */
18626 $ac_includes_default
18627 int
18628 main ()
18629 {
18630 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18631 test_array [0] = 0
18632
18633   ;
18634   return 0;
18635 }
18636 _ACEOF
18637 rm -f conftest.$ac_objext
18638 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18639   (eval $ac_compile) 2>conftest.er1
18640   ac_status=$?
18641   grep -v '^ *+' conftest.er1 >conftest.err
18642   rm -f conftest.er1
18643   cat conftest.err >&5
18644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18645   (exit $ac_status); } &&
18646          { ac_try='test -z "$ac_c_werror_flag"
18647                          || test ! -s conftest.err'
18648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18649   (eval $ac_try) 2>&5
18650   ac_status=$?
18651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18652   (exit $ac_status); }; } &&
18653          { ac_try='test -s conftest.$ac_objext'
18654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18655   (eval $ac_try) 2>&5
18656   ac_status=$?
18657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18658   (exit $ac_status); }; }; then
18659   ac_hi=-1 ac_mid=-1
18660   while :; do
18661     cat >conftest.$ac_ext <<_ACEOF
18662 /* confdefs.h.  */
18663 _ACEOF
18664 cat confdefs.h >>conftest.$ac_ext
18665 cat >>conftest.$ac_ext <<_ACEOF
18666 /* end confdefs.h.  */
18667 $ac_includes_default
18668 int
18669 main ()
18670 {
18671 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18672 test_array [0] = 0
18673
18674   ;
18675   return 0;
18676 }
18677 _ACEOF
18678 rm -f conftest.$ac_objext
18679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18680   (eval $ac_compile) 2>conftest.er1
18681   ac_status=$?
18682   grep -v '^ *+' conftest.er1 >conftest.err
18683   rm -f conftest.er1
18684   cat conftest.err >&5
18685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18686   (exit $ac_status); } &&
18687          { ac_try='test -z "$ac_c_werror_flag"
18688                          || test ! -s conftest.err'
18689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18690   (eval $ac_try) 2>&5
18691   ac_status=$?
18692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18693   (exit $ac_status); }; } &&
18694          { ac_try='test -s conftest.$ac_objext'
18695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18696   (eval $ac_try) 2>&5
18697   ac_status=$?
18698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18699   (exit $ac_status); }; }; then
18700   ac_lo=$ac_mid; break
18701 else
18702   echo "$as_me: failed program was:" >&5
18703 sed 's/^/| /' conftest.$ac_ext >&5
18704
18705 ac_hi=`expr '(' $ac_mid ')' - 1`
18706                        if test $ac_mid -le $ac_hi; then
18707                          ac_lo= ac_hi=
18708                          break
18709                        fi
18710                        ac_mid=`expr 2 '*' $ac_mid`
18711 fi
18712 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18713   done
18714 else
18715   echo "$as_me: failed program was:" >&5
18716 sed 's/^/| /' conftest.$ac_ext >&5
18717
18718 ac_lo= ac_hi=
18719 fi
18720 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18721 fi
18722 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18723 # Binary search between lo and hi bounds.
18724 while test "x$ac_lo" != "x$ac_hi"; do
18725   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18726   cat >conftest.$ac_ext <<_ACEOF
18727 /* confdefs.h.  */
18728 _ACEOF
18729 cat confdefs.h >>conftest.$ac_ext
18730 cat >>conftest.$ac_ext <<_ACEOF
18731 /* end confdefs.h.  */
18732 $ac_includes_default
18733 int
18734 main ()
18735 {
18736 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18737 test_array [0] = 0
18738
18739   ;
18740   return 0;
18741 }
18742 _ACEOF
18743 rm -f conftest.$ac_objext
18744 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18745   (eval $ac_compile) 2>conftest.er1
18746   ac_status=$?
18747   grep -v '^ *+' conftest.er1 >conftest.err
18748   rm -f conftest.er1
18749   cat conftest.err >&5
18750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18751   (exit $ac_status); } &&
18752          { ac_try='test -z "$ac_c_werror_flag"
18753                          || test ! -s conftest.err'
18754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18755   (eval $ac_try) 2>&5
18756   ac_status=$?
18757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18758   (exit $ac_status); }; } &&
18759          { ac_try='test -s conftest.$ac_objext'
18760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18761   (eval $ac_try) 2>&5
18762   ac_status=$?
18763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18764   (exit $ac_status); }; }; then
18765   ac_hi=$ac_mid
18766 else
18767   echo "$as_me: failed program was:" >&5
18768 sed 's/^/| /' conftest.$ac_ext >&5
18769
18770 ac_lo=`expr '(' $ac_mid ')' + 1`
18771 fi
18772 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18773 done
18774 case $ac_lo in
18775 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18776 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18777 See \`config.log' for more details." >&5
18778 echo "$as_me: error: cannot compute sizeof (size_t), 77
18779 See \`config.log' for more details." >&2;}
18780    { (exit 1); exit 1; }; } ;;
18781 esac
18782 else
18783   if test "$cross_compiling" = yes; then
18784   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18785 See \`config.log' for more details." >&5
18786 echo "$as_me: error: cannot run test program while cross compiling
18787 See \`config.log' for more details." >&2;}
18788    { (exit 1); exit 1; }; }
18789 else
18790   cat >conftest.$ac_ext <<_ACEOF
18791 /* confdefs.h.  */
18792 _ACEOF
18793 cat confdefs.h >>conftest.$ac_ext
18794 cat >>conftest.$ac_ext <<_ACEOF
18795 /* end confdefs.h.  */
18796 $ac_includes_default
18797 long longval () { return (long) (sizeof (size_t)); }
18798 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18799 #include <stdio.h>
18800 #include <stdlib.h>
18801 int
18802 main ()
18803 {
18804
18805   FILE *f = fopen ("conftest.val", "w");
18806   if (! f)
18807     exit (1);
18808   if (((long) (sizeof (size_t))) < 0)
18809     {
18810       long i = longval ();
18811       if (i != ((long) (sizeof (size_t))))
18812         exit (1);
18813       fprintf (f, "%ld\n", i);
18814     }
18815   else
18816     {
18817       unsigned long i = ulongval ();
18818       if (i != ((long) (sizeof (size_t))))
18819         exit (1);
18820       fprintf (f, "%lu\n", i);
18821     }
18822   exit (ferror (f) || fclose (f) != 0);
18823
18824   ;
18825   return 0;
18826 }
18827 _ACEOF
18828 rm -f conftest$ac_exeext
18829 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18830   (eval $ac_link) 2>&5
18831   ac_status=$?
18832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18833   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18835   (eval $ac_try) 2>&5
18836   ac_status=$?
18837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18838   (exit $ac_status); }; }; then
18839   ac_cv_sizeof_size_t=`cat conftest.val`
18840 else
18841   echo "$as_me: program exited with status $ac_status" >&5
18842 echo "$as_me: failed program was:" >&5
18843 sed 's/^/| /' conftest.$ac_ext >&5
18844
18845 ( exit $ac_status )
18846 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18847 See \`config.log' for more details." >&5
18848 echo "$as_me: error: cannot compute sizeof (size_t), 77
18849 See \`config.log' for more details." >&2;}
18850    { (exit 1); exit 1; }; }
18851 fi
18852 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18853 fi
18854 fi
18855 rm -f conftest.val
18856 else
18857   ac_cv_sizeof_size_t=0
18858 fi
18859 fi
18860 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18861 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18862 cat >>confdefs.h <<_ACEOF
18863 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18864 _ACEOF
18865
18866
18867
18868 # Determine memory alignment requirements for the basic C data types.
18869
18870 echo "$as_me:$LINENO: checking for short" >&5
18871 echo $ECHO_N "checking for short... $ECHO_C" >&6
18872 if test "${ac_cv_type_short+set}" = set; then
18873   echo $ECHO_N "(cached) $ECHO_C" >&6
18874 else
18875   cat >conftest.$ac_ext <<_ACEOF
18876 /* confdefs.h.  */
18877 _ACEOF
18878 cat confdefs.h >>conftest.$ac_ext
18879 cat >>conftest.$ac_ext <<_ACEOF
18880 /* end confdefs.h.  */
18881 $ac_includes_default
18882 int
18883 main ()
18884 {
18885 if ((short *) 0)
18886   return 0;
18887 if (sizeof (short))
18888   return 0;
18889   ;
18890   return 0;
18891 }
18892 _ACEOF
18893 rm -f conftest.$ac_objext
18894 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18895   (eval $ac_compile) 2>conftest.er1
18896   ac_status=$?
18897   grep -v '^ *+' conftest.er1 >conftest.err
18898   rm -f conftest.er1
18899   cat conftest.err >&5
18900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18901   (exit $ac_status); } &&
18902          { ac_try='test -z "$ac_c_werror_flag"
18903                          || test ! -s conftest.err'
18904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18905   (eval $ac_try) 2>&5
18906   ac_status=$?
18907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18908   (exit $ac_status); }; } &&
18909          { ac_try='test -s conftest.$ac_objext'
18910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18911   (eval $ac_try) 2>&5
18912   ac_status=$?
18913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18914   (exit $ac_status); }; }; then
18915   ac_cv_type_short=yes
18916 else
18917   echo "$as_me: failed program was:" >&5
18918 sed 's/^/| /' conftest.$ac_ext >&5
18919
18920 ac_cv_type_short=no
18921 fi
18922 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18923 fi
18924 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18925 echo "${ECHO_T}$ac_cv_type_short" >&6
18926
18927 echo "$as_me:$LINENO: checking alignment of short" >&5
18928 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18929 if test "${pgac_cv_alignof_short+set}" = set; then
18930   echo $ECHO_N "(cached) $ECHO_C" >&6
18931 else
18932   if test "$ac_cv_type_short" = yes; then
18933   if test "$cross_compiling" = yes; then
18934   # Depending upon the size, compute the lo and hi bounds.
18935 cat >conftest.$ac_ext <<_ACEOF
18936 /* confdefs.h.  */
18937 _ACEOF
18938 cat confdefs.h >>conftest.$ac_ext
18939 cat >>conftest.$ac_ext <<_ACEOF
18940 /* end confdefs.h.  */
18941 $ac_includes_default
18942 struct { char filler; short field; } pgac_struct;
18943 int
18944 main ()
18945 {
18946 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18947 test_array [0] = 0
18948
18949   ;
18950   return 0;
18951 }
18952 _ACEOF
18953 rm -f conftest.$ac_objext
18954 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18955   (eval $ac_compile) 2>conftest.er1
18956   ac_status=$?
18957   grep -v '^ *+' conftest.er1 >conftest.err
18958   rm -f conftest.er1
18959   cat conftest.err >&5
18960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18961   (exit $ac_status); } &&
18962          { ac_try='test -z "$ac_c_werror_flag"
18963                          || test ! -s conftest.err'
18964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18965   (eval $ac_try) 2>&5
18966   ac_status=$?
18967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18968   (exit $ac_status); }; } &&
18969          { ac_try='test -s conftest.$ac_objext'
18970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18971   (eval $ac_try) 2>&5
18972   ac_status=$?
18973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18974   (exit $ac_status); }; }; then
18975   ac_lo=0 ac_mid=0
18976   while :; do
18977     cat >conftest.$ac_ext <<_ACEOF
18978 /* confdefs.h.  */
18979 _ACEOF
18980 cat confdefs.h >>conftest.$ac_ext
18981 cat >>conftest.$ac_ext <<_ACEOF
18982 /* end confdefs.h.  */
18983 $ac_includes_default
18984 struct { char filler; short field; } pgac_struct;
18985 int
18986 main ()
18987 {
18988 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18989 test_array [0] = 0
18990
18991   ;
18992   return 0;
18993 }
18994 _ACEOF
18995 rm -f conftest.$ac_objext
18996 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18997   (eval $ac_compile) 2>conftest.er1
18998   ac_status=$?
18999   grep -v '^ *+' conftest.er1 >conftest.err
19000   rm -f conftest.er1
19001   cat conftest.err >&5
19002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19003   (exit $ac_status); } &&
19004          { ac_try='test -z "$ac_c_werror_flag"
19005                          || test ! -s conftest.err'
19006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19007   (eval $ac_try) 2>&5
19008   ac_status=$?
19009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19010   (exit $ac_status); }; } &&
19011          { ac_try='test -s conftest.$ac_objext'
19012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19013   (eval $ac_try) 2>&5
19014   ac_status=$?
19015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19016   (exit $ac_status); }; }; then
19017   ac_hi=$ac_mid; break
19018 else
19019   echo "$as_me: failed program was:" >&5
19020 sed 's/^/| /' conftest.$ac_ext >&5
19021
19022 ac_lo=`expr $ac_mid + 1`
19023                     if test $ac_lo -le $ac_mid; then
19024                       ac_lo= ac_hi=
19025                       break
19026                     fi
19027                     ac_mid=`expr 2 '*' $ac_mid + 1`
19028 fi
19029 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19030   done
19031 else
19032   echo "$as_me: failed program was:" >&5
19033 sed 's/^/| /' conftest.$ac_ext >&5
19034
19035 cat >conftest.$ac_ext <<_ACEOF
19036 /* confdefs.h.  */
19037 _ACEOF
19038 cat confdefs.h >>conftest.$ac_ext
19039 cat >>conftest.$ac_ext <<_ACEOF
19040 /* end confdefs.h.  */
19041 $ac_includes_default
19042 struct { char filler; short field; } pgac_struct;
19043 int
19044 main ()
19045 {
19046 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19047 test_array [0] = 0
19048
19049   ;
19050   return 0;
19051 }
19052 _ACEOF
19053 rm -f conftest.$ac_objext
19054 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19055   (eval $ac_compile) 2>conftest.er1
19056   ac_status=$?
19057   grep -v '^ *+' conftest.er1 >conftest.err
19058   rm -f conftest.er1
19059   cat conftest.err >&5
19060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19061   (exit $ac_status); } &&
19062          { ac_try='test -z "$ac_c_werror_flag"
19063                          || test ! -s conftest.err'
19064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19065   (eval $ac_try) 2>&5
19066   ac_status=$?
19067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19068   (exit $ac_status); }; } &&
19069          { ac_try='test -s conftest.$ac_objext'
19070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19071   (eval $ac_try) 2>&5
19072   ac_status=$?
19073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19074   (exit $ac_status); }; }; then
19075   ac_hi=-1 ac_mid=-1
19076   while :; do
19077     cat >conftest.$ac_ext <<_ACEOF
19078 /* confdefs.h.  */
19079 _ACEOF
19080 cat confdefs.h >>conftest.$ac_ext
19081 cat >>conftest.$ac_ext <<_ACEOF
19082 /* end confdefs.h.  */
19083 $ac_includes_default
19084 struct { char filler; short field; } pgac_struct;
19085 int
19086 main ()
19087 {
19088 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19089 test_array [0] = 0
19090
19091   ;
19092   return 0;
19093 }
19094 _ACEOF
19095 rm -f conftest.$ac_objext
19096 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19097   (eval $ac_compile) 2>conftest.er1
19098   ac_status=$?
19099   grep -v '^ *+' conftest.er1 >conftest.err
19100   rm -f conftest.er1
19101   cat conftest.err >&5
19102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19103   (exit $ac_status); } &&
19104          { ac_try='test -z "$ac_c_werror_flag"
19105                          || test ! -s conftest.err'
19106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19107   (eval $ac_try) 2>&5
19108   ac_status=$?
19109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19110   (exit $ac_status); }; } &&
19111          { ac_try='test -s conftest.$ac_objext'
19112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19113   (eval $ac_try) 2>&5
19114   ac_status=$?
19115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19116   (exit $ac_status); }; }; then
19117   ac_lo=$ac_mid; break
19118 else
19119   echo "$as_me: failed program was:" >&5
19120 sed 's/^/| /' conftest.$ac_ext >&5
19121
19122 ac_hi=`expr '(' $ac_mid ')' - 1`
19123                        if test $ac_mid -le $ac_hi; then
19124                          ac_lo= ac_hi=
19125                          break
19126                        fi
19127                        ac_mid=`expr 2 '*' $ac_mid`
19128 fi
19129 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19130   done
19131 else
19132   echo "$as_me: failed program was:" >&5
19133 sed 's/^/| /' conftest.$ac_ext >&5
19134
19135 ac_lo= ac_hi=
19136 fi
19137 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19138 fi
19139 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19140 # Binary search between lo and hi bounds.
19141 while test "x$ac_lo" != "x$ac_hi"; do
19142   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19143   cat >conftest.$ac_ext <<_ACEOF
19144 /* confdefs.h.  */
19145 _ACEOF
19146 cat confdefs.h >>conftest.$ac_ext
19147 cat >>conftest.$ac_ext <<_ACEOF
19148 /* end confdefs.h.  */
19149 $ac_includes_default
19150 struct { char filler; short field; } pgac_struct;
19151 int
19152 main ()
19153 {
19154 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19155 test_array [0] = 0
19156
19157   ;
19158   return 0;
19159 }
19160 _ACEOF
19161 rm -f conftest.$ac_objext
19162 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19163   (eval $ac_compile) 2>conftest.er1
19164   ac_status=$?
19165   grep -v '^ *+' conftest.er1 >conftest.err
19166   rm -f conftest.er1
19167   cat conftest.err >&5
19168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19169   (exit $ac_status); } &&
19170          { ac_try='test -z "$ac_c_werror_flag"
19171                          || test ! -s conftest.err'
19172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19173   (eval $ac_try) 2>&5
19174   ac_status=$?
19175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19176   (exit $ac_status); }; } &&
19177          { ac_try='test -s conftest.$ac_objext'
19178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19179   (eval $ac_try) 2>&5
19180   ac_status=$?
19181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19182   (exit $ac_status); }; }; then
19183   ac_hi=$ac_mid
19184 else
19185   echo "$as_me: failed program was:" >&5
19186 sed 's/^/| /' conftest.$ac_ext >&5
19187
19188 ac_lo=`expr '(' $ac_mid ')' + 1`
19189 fi
19190 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19191 done
19192 case $ac_lo in
19193 ?*) pgac_cv_alignof_short=$ac_lo;;
19194 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19195 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19196    { (exit 1); exit 1; }; } ;;
19197 esac
19198 else
19199   if test "$cross_compiling" = yes; then
19200   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19201 See \`config.log' for more details." >&5
19202 echo "$as_me: error: cannot run test program while cross compiling
19203 See \`config.log' for more details." >&2;}
19204    { (exit 1); exit 1; }; }
19205 else
19206   cat >conftest.$ac_ext <<_ACEOF
19207 /* confdefs.h.  */
19208 _ACEOF
19209 cat confdefs.h >>conftest.$ac_ext
19210 cat >>conftest.$ac_ext <<_ACEOF
19211 /* end confdefs.h.  */
19212 $ac_includes_default
19213 struct { char filler; short field; } pgac_struct;
19214 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19215 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19216 #include <stdio.h>
19217 #include <stdlib.h>
19218 int
19219 main ()
19220 {
19221
19222   FILE *f = fopen ("conftest.val", "w");
19223   if (! f)
19224     exit (1);
19225   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19226     {
19227       long i = longval ();
19228       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19229         exit (1);
19230       fprintf (f, "%ld\n", i);
19231     }
19232   else
19233     {
19234       unsigned long i = ulongval ();
19235       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19236         exit (1);
19237       fprintf (f, "%lu\n", i);
19238     }
19239   exit (ferror (f) || fclose (f) != 0);
19240
19241   ;
19242   return 0;
19243 }
19244 _ACEOF
19245 rm -f conftest$ac_exeext
19246 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19247   (eval $ac_link) 2>&5
19248   ac_status=$?
19249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19250   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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); }; }; then
19256   pgac_cv_alignof_short=`cat conftest.val`
19257 else
19258   echo "$as_me: program exited with status $ac_status" >&5
19259 echo "$as_me: failed program was:" >&5
19260 sed 's/^/| /' conftest.$ac_ext >&5
19261
19262 ( exit $ac_status )
19263 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19264 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19265    { (exit 1); exit 1; }; }
19266 fi
19267 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19268 fi
19269 fi
19270 rm -f conftest.val
19271 else
19272   pgac_cv_alignof_short=0
19273 fi
19274 fi
19275 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19276 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19277 cat >>confdefs.h <<_ACEOF
19278 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19279 _ACEOF
19280
19281
19282 echo "$as_me:$LINENO: checking for int" >&5
19283 echo $ECHO_N "checking for int... $ECHO_C" >&6
19284 if test "${ac_cv_type_int+set}" = set; then
19285   echo $ECHO_N "(cached) $ECHO_C" >&6
19286 else
19287   cat >conftest.$ac_ext <<_ACEOF
19288 /* confdefs.h.  */
19289 _ACEOF
19290 cat confdefs.h >>conftest.$ac_ext
19291 cat >>conftest.$ac_ext <<_ACEOF
19292 /* end confdefs.h.  */
19293 $ac_includes_default
19294 int
19295 main ()
19296 {
19297 if ((int *) 0)
19298   return 0;
19299 if (sizeof (int))
19300   return 0;
19301   ;
19302   return 0;
19303 }
19304 _ACEOF
19305 rm -f conftest.$ac_objext
19306 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19307   (eval $ac_compile) 2>conftest.er1
19308   ac_status=$?
19309   grep -v '^ *+' conftest.er1 >conftest.err
19310   rm -f conftest.er1
19311   cat conftest.err >&5
19312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19313   (exit $ac_status); } &&
19314          { ac_try='test -z "$ac_c_werror_flag"
19315                          || test ! -s conftest.err'
19316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19317   (eval $ac_try) 2>&5
19318   ac_status=$?
19319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19320   (exit $ac_status); }; } &&
19321          { ac_try='test -s conftest.$ac_objext'
19322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19323   (eval $ac_try) 2>&5
19324   ac_status=$?
19325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19326   (exit $ac_status); }; }; then
19327   ac_cv_type_int=yes
19328 else
19329   echo "$as_me: failed program was:" >&5
19330 sed 's/^/| /' conftest.$ac_ext >&5
19331
19332 ac_cv_type_int=no
19333 fi
19334 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19335 fi
19336 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19337 echo "${ECHO_T}$ac_cv_type_int" >&6
19338
19339 echo "$as_me:$LINENO: checking alignment of int" >&5
19340 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19341 if test "${pgac_cv_alignof_int+set}" = set; then
19342   echo $ECHO_N "(cached) $ECHO_C" >&6
19343 else
19344   if test "$ac_cv_type_int" = yes; then
19345   if test "$cross_compiling" = yes; then
19346   # Depending upon the size, compute the lo and hi bounds.
19347 cat >conftest.$ac_ext <<_ACEOF
19348 /* confdefs.h.  */
19349 _ACEOF
19350 cat confdefs.h >>conftest.$ac_ext
19351 cat >>conftest.$ac_ext <<_ACEOF
19352 /* end confdefs.h.  */
19353 $ac_includes_default
19354 struct { char filler; int field; } pgac_struct;
19355 int
19356 main ()
19357 {
19358 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19359 test_array [0] = 0
19360
19361   ;
19362   return 0;
19363 }
19364 _ACEOF
19365 rm -f conftest.$ac_objext
19366 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19367   (eval $ac_compile) 2>conftest.er1
19368   ac_status=$?
19369   grep -v '^ *+' conftest.er1 >conftest.err
19370   rm -f conftest.er1
19371   cat conftest.err >&5
19372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19373   (exit $ac_status); } &&
19374          { ac_try='test -z "$ac_c_werror_flag"
19375                          || test ! -s conftest.err'
19376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19377   (eval $ac_try) 2>&5
19378   ac_status=$?
19379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19380   (exit $ac_status); }; } &&
19381          { ac_try='test -s conftest.$ac_objext'
19382   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19383   (eval $ac_try) 2>&5
19384   ac_status=$?
19385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19386   (exit $ac_status); }; }; then
19387   ac_lo=0 ac_mid=0
19388   while :; do
19389     cat >conftest.$ac_ext <<_ACEOF
19390 /* confdefs.h.  */
19391 _ACEOF
19392 cat confdefs.h >>conftest.$ac_ext
19393 cat >>conftest.$ac_ext <<_ACEOF
19394 /* end confdefs.h.  */
19395 $ac_includes_default
19396 struct { char filler; int field; } pgac_struct;
19397 int
19398 main ()
19399 {
19400 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19401 test_array [0] = 0
19402
19403   ;
19404   return 0;
19405 }
19406 _ACEOF
19407 rm -f conftest.$ac_objext
19408 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19409   (eval $ac_compile) 2>conftest.er1
19410   ac_status=$?
19411   grep -v '^ *+' conftest.er1 >conftest.err
19412   rm -f conftest.er1
19413   cat conftest.err >&5
19414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19415   (exit $ac_status); } &&
19416          { ac_try='test -z "$ac_c_werror_flag"
19417                          || test ! -s conftest.err'
19418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19419   (eval $ac_try) 2>&5
19420   ac_status=$?
19421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19422   (exit $ac_status); }; } &&
19423          { ac_try='test -s conftest.$ac_objext'
19424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19425   (eval $ac_try) 2>&5
19426   ac_status=$?
19427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19428   (exit $ac_status); }; }; then
19429   ac_hi=$ac_mid; break
19430 else
19431   echo "$as_me: failed program was:" >&5
19432 sed 's/^/| /' conftest.$ac_ext >&5
19433
19434 ac_lo=`expr $ac_mid + 1`
19435                     if test $ac_lo -le $ac_mid; then
19436                       ac_lo= ac_hi=
19437                       break
19438                     fi
19439                     ac_mid=`expr 2 '*' $ac_mid + 1`
19440 fi
19441 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19442   done
19443 else
19444   echo "$as_me: failed program was:" >&5
19445 sed 's/^/| /' conftest.$ac_ext >&5
19446
19447 cat >conftest.$ac_ext <<_ACEOF
19448 /* confdefs.h.  */
19449 _ACEOF
19450 cat confdefs.h >>conftest.$ac_ext
19451 cat >>conftest.$ac_ext <<_ACEOF
19452 /* end confdefs.h.  */
19453 $ac_includes_default
19454 struct { char filler; int field; } pgac_struct;
19455 int
19456 main ()
19457 {
19458 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19459 test_array [0] = 0
19460
19461   ;
19462   return 0;
19463 }
19464 _ACEOF
19465 rm -f conftest.$ac_objext
19466 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19467   (eval $ac_compile) 2>conftest.er1
19468   ac_status=$?
19469   grep -v '^ *+' conftest.er1 >conftest.err
19470   rm -f conftest.er1
19471   cat conftest.err >&5
19472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19473   (exit $ac_status); } &&
19474          { ac_try='test -z "$ac_c_werror_flag"
19475                          || test ! -s conftest.err'
19476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19477   (eval $ac_try) 2>&5
19478   ac_status=$?
19479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19480   (exit $ac_status); }; } &&
19481          { ac_try='test -s conftest.$ac_objext'
19482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19483   (eval $ac_try) 2>&5
19484   ac_status=$?
19485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19486   (exit $ac_status); }; }; then
19487   ac_hi=-1 ac_mid=-1
19488   while :; do
19489     cat >conftest.$ac_ext <<_ACEOF
19490 /* confdefs.h.  */
19491 _ACEOF
19492 cat confdefs.h >>conftest.$ac_ext
19493 cat >>conftest.$ac_ext <<_ACEOF
19494 /* end confdefs.h.  */
19495 $ac_includes_default
19496 struct { char filler; int field; } pgac_struct;
19497 int
19498 main ()
19499 {
19500 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19501 test_array [0] = 0
19502
19503   ;
19504   return 0;
19505 }
19506 _ACEOF
19507 rm -f conftest.$ac_objext
19508 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19509   (eval $ac_compile) 2>conftest.er1
19510   ac_status=$?
19511   grep -v '^ *+' conftest.er1 >conftest.err
19512   rm -f conftest.er1
19513   cat conftest.err >&5
19514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19515   (exit $ac_status); } &&
19516          { ac_try='test -z "$ac_c_werror_flag"
19517                          || test ! -s conftest.err'
19518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19519   (eval $ac_try) 2>&5
19520   ac_status=$?
19521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19522   (exit $ac_status); }; } &&
19523          { ac_try='test -s conftest.$ac_objext'
19524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19525   (eval $ac_try) 2>&5
19526   ac_status=$?
19527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19528   (exit $ac_status); }; }; then
19529   ac_lo=$ac_mid; break
19530 else
19531   echo "$as_me: failed program was:" >&5
19532 sed 's/^/| /' conftest.$ac_ext >&5
19533
19534 ac_hi=`expr '(' $ac_mid ')' - 1`
19535                        if test $ac_mid -le $ac_hi; then
19536                          ac_lo= ac_hi=
19537                          break
19538                        fi
19539                        ac_mid=`expr 2 '*' $ac_mid`
19540 fi
19541 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19542   done
19543 else
19544   echo "$as_me: failed program was:" >&5
19545 sed 's/^/| /' conftest.$ac_ext >&5
19546
19547 ac_lo= ac_hi=
19548 fi
19549 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19550 fi
19551 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19552 # Binary search between lo and hi bounds.
19553 while test "x$ac_lo" != "x$ac_hi"; do
19554   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19555   cat >conftest.$ac_ext <<_ACEOF
19556 /* confdefs.h.  */
19557 _ACEOF
19558 cat confdefs.h >>conftest.$ac_ext
19559 cat >>conftest.$ac_ext <<_ACEOF
19560 /* end confdefs.h.  */
19561 $ac_includes_default
19562 struct { char filler; int field; } pgac_struct;
19563 int
19564 main ()
19565 {
19566 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19567 test_array [0] = 0
19568
19569   ;
19570   return 0;
19571 }
19572 _ACEOF
19573 rm -f conftest.$ac_objext
19574 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19575   (eval $ac_compile) 2>conftest.er1
19576   ac_status=$?
19577   grep -v '^ *+' conftest.er1 >conftest.err
19578   rm -f conftest.er1
19579   cat conftest.err >&5
19580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19581   (exit $ac_status); } &&
19582          { ac_try='test -z "$ac_c_werror_flag"
19583                          || test ! -s conftest.err'
19584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19585   (eval $ac_try) 2>&5
19586   ac_status=$?
19587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19588   (exit $ac_status); }; } &&
19589          { ac_try='test -s conftest.$ac_objext'
19590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19591   (eval $ac_try) 2>&5
19592   ac_status=$?
19593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19594   (exit $ac_status); }; }; then
19595   ac_hi=$ac_mid
19596 else
19597   echo "$as_me: failed program was:" >&5
19598 sed 's/^/| /' conftest.$ac_ext >&5
19599
19600 ac_lo=`expr '(' $ac_mid ')' + 1`
19601 fi
19602 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19603 done
19604 case $ac_lo in
19605 ?*) pgac_cv_alignof_int=$ac_lo;;
19606 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19607 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19608    { (exit 1); exit 1; }; } ;;
19609 esac
19610 else
19611   if test "$cross_compiling" = yes; then
19612   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19613 See \`config.log' for more details." >&5
19614 echo "$as_me: error: cannot run test program while cross compiling
19615 See \`config.log' for more details." >&2;}
19616    { (exit 1); exit 1; }; }
19617 else
19618   cat >conftest.$ac_ext <<_ACEOF
19619 /* confdefs.h.  */
19620 _ACEOF
19621 cat confdefs.h >>conftest.$ac_ext
19622 cat >>conftest.$ac_ext <<_ACEOF
19623 /* end confdefs.h.  */
19624 $ac_includes_default
19625 struct { char filler; int field; } pgac_struct;
19626 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19627 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19628 #include <stdio.h>
19629 #include <stdlib.h>
19630 int
19631 main ()
19632 {
19633
19634   FILE *f = fopen ("conftest.val", "w");
19635   if (! f)
19636     exit (1);
19637   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19638     {
19639       long i = longval ();
19640       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19641         exit (1);
19642       fprintf (f, "%ld\n", i);
19643     }
19644   else
19645     {
19646       unsigned long i = ulongval ();
19647       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19648         exit (1);
19649       fprintf (f, "%lu\n", i);
19650     }
19651   exit (ferror (f) || fclose (f) != 0);
19652
19653   ;
19654   return 0;
19655 }
19656 _ACEOF
19657 rm -f conftest$ac_exeext
19658 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19659   (eval $ac_link) 2>&5
19660   ac_status=$?
19661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19662   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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); }; }; then
19668   pgac_cv_alignof_int=`cat conftest.val`
19669 else
19670   echo "$as_me: program exited with status $ac_status" >&5
19671 echo "$as_me: failed program was:" >&5
19672 sed 's/^/| /' conftest.$ac_ext >&5
19673
19674 ( exit $ac_status )
19675 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19676 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19677    { (exit 1); exit 1; }; }
19678 fi
19679 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19680 fi
19681 fi
19682 rm -f conftest.val
19683 else
19684   pgac_cv_alignof_int=0
19685 fi
19686 fi
19687 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19688 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19689 cat >>confdefs.h <<_ACEOF
19690 #define ALIGNOF_INT $pgac_cv_alignof_int
19691 _ACEOF
19692
19693
19694 echo "$as_me:$LINENO: checking for long" >&5
19695 echo $ECHO_N "checking for long... $ECHO_C" >&6
19696 if test "${ac_cv_type_long+set}" = set; then
19697   echo $ECHO_N "(cached) $ECHO_C" >&6
19698 else
19699   cat >conftest.$ac_ext <<_ACEOF
19700 /* confdefs.h.  */
19701 _ACEOF
19702 cat confdefs.h >>conftest.$ac_ext
19703 cat >>conftest.$ac_ext <<_ACEOF
19704 /* end confdefs.h.  */
19705 $ac_includes_default
19706 int
19707 main ()
19708 {
19709 if ((long *) 0)
19710   return 0;
19711 if (sizeof (long))
19712   return 0;
19713   ;
19714   return 0;
19715 }
19716 _ACEOF
19717 rm -f conftest.$ac_objext
19718 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19719   (eval $ac_compile) 2>conftest.er1
19720   ac_status=$?
19721   grep -v '^ *+' conftest.er1 >conftest.err
19722   rm -f conftest.er1
19723   cat conftest.err >&5
19724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19725   (exit $ac_status); } &&
19726          { ac_try='test -z "$ac_c_werror_flag"
19727                          || test ! -s conftest.err'
19728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19729   (eval $ac_try) 2>&5
19730   ac_status=$?
19731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19732   (exit $ac_status); }; } &&
19733          { ac_try='test -s conftest.$ac_objext'
19734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19735   (eval $ac_try) 2>&5
19736   ac_status=$?
19737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19738   (exit $ac_status); }; }; then
19739   ac_cv_type_long=yes
19740 else
19741   echo "$as_me: failed program was:" >&5
19742 sed 's/^/| /' conftest.$ac_ext >&5
19743
19744 ac_cv_type_long=no
19745 fi
19746 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19747 fi
19748 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19749 echo "${ECHO_T}$ac_cv_type_long" >&6
19750
19751 echo "$as_me:$LINENO: checking alignment of long" >&5
19752 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19753 if test "${pgac_cv_alignof_long+set}" = set; then
19754   echo $ECHO_N "(cached) $ECHO_C" >&6
19755 else
19756   if test "$ac_cv_type_long" = yes; then
19757   if test "$cross_compiling" = yes; then
19758   # Depending upon the size, compute the lo and hi bounds.
19759 cat >conftest.$ac_ext <<_ACEOF
19760 /* confdefs.h.  */
19761 _ACEOF
19762 cat confdefs.h >>conftest.$ac_ext
19763 cat >>conftest.$ac_ext <<_ACEOF
19764 /* end confdefs.h.  */
19765 $ac_includes_default
19766 struct { char filler; long field; } pgac_struct;
19767 int
19768 main ()
19769 {
19770 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19771 test_array [0] = 0
19772
19773   ;
19774   return 0;
19775 }
19776 _ACEOF
19777 rm -f conftest.$ac_objext
19778 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19779   (eval $ac_compile) 2>conftest.er1
19780   ac_status=$?
19781   grep -v '^ *+' conftest.er1 >conftest.err
19782   rm -f conftest.er1
19783   cat conftest.err >&5
19784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19785   (exit $ac_status); } &&
19786          { ac_try='test -z "$ac_c_werror_flag"
19787                          || test ! -s conftest.err'
19788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19789   (eval $ac_try) 2>&5
19790   ac_status=$?
19791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19792   (exit $ac_status); }; } &&
19793          { ac_try='test -s conftest.$ac_objext'
19794   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19795   (eval $ac_try) 2>&5
19796   ac_status=$?
19797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19798   (exit $ac_status); }; }; then
19799   ac_lo=0 ac_mid=0
19800   while :; do
19801     cat >conftest.$ac_ext <<_ACEOF
19802 /* confdefs.h.  */
19803 _ACEOF
19804 cat confdefs.h >>conftest.$ac_ext
19805 cat >>conftest.$ac_ext <<_ACEOF
19806 /* end confdefs.h.  */
19807 $ac_includes_default
19808 struct { char filler; long field; } pgac_struct;
19809 int
19810 main ()
19811 {
19812 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19813 test_array [0] = 0
19814
19815   ;
19816   return 0;
19817 }
19818 _ACEOF
19819 rm -f conftest.$ac_objext
19820 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19821   (eval $ac_compile) 2>conftest.er1
19822   ac_status=$?
19823   grep -v '^ *+' conftest.er1 >conftest.err
19824   rm -f conftest.er1
19825   cat conftest.err >&5
19826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19827   (exit $ac_status); } &&
19828          { ac_try='test -z "$ac_c_werror_flag"
19829                          || test ! -s conftest.err'
19830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19831   (eval $ac_try) 2>&5
19832   ac_status=$?
19833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19834   (exit $ac_status); }; } &&
19835          { ac_try='test -s conftest.$ac_objext'
19836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19837   (eval $ac_try) 2>&5
19838   ac_status=$?
19839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19840   (exit $ac_status); }; }; then
19841   ac_hi=$ac_mid; break
19842 else
19843   echo "$as_me: failed program was:" >&5
19844 sed 's/^/| /' conftest.$ac_ext >&5
19845
19846 ac_lo=`expr $ac_mid + 1`
19847                     if test $ac_lo -le $ac_mid; then
19848                       ac_lo= ac_hi=
19849                       break
19850                     fi
19851                     ac_mid=`expr 2 '*' $ac_mid + 1`
19852 fi
19853 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19854   done
19855 else
19856   echo "$as_me: failed program was:" >&5
19857 sed 's/^/| /' conftest.$ac_ext >&5
19858
19859 cat >conftest.$ac_ext <<_ACEOF
19860 /* confdefs.h.  */
19861 _ACEOF
19862 cat confdefs.h >>conftest.$ac_ext
19863 cat >>conftest.$ac_ext <<_ACEOF
19864 /* end confdefs.h.  */
19865 $ac_includes_default
19866 struct { char filler; long field; } pgac_struct;
19867 int
19868 main ()
19869 {
19870 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19871 test_array [0] = 0
19872
19873   ;
19874   return 0;
19875 }
19876 _ACEOF
19877 rm -f conftest.$ac_objext
19878 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19879   (eval $ac_compile) 2>conftest.er1
19880   ac_status=$?
19881   grep -v '^ *+' conftest.er1 >conftest.err
19882   rm -f conftest.er1
19883   cat conftest.err >&5
19884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19885   (exit $ac_status); } &&
19886          { ac_try='test -z "$ac_c_werror_flag"
19887                          || test ! -s conftest.err'
19888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19889   (eval $ac_try) 2>&5
19890   ac_status=$?
19891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19892   (exit $ac_status); }; } &&
19893          { ac_try='test -s conftest.$ac_objext'
19894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19895   (eval $ac_try) 2>&5
19896   ac_status=$?
19897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19898   (exit $ac_status); }; }; then
19899   ac_hi=-1 ac_mid=-1
19900   while :; do
19901     cat >conftest.$ac_ext <<_ACEOF
19902 /* confdefs.h.  */
19903 _ACEOF
19904 cat confdefs.h >>conftest.$ac_ext
19905 cat >>conftest.$ac_ext <<_ACEOF
19906 /* end confdefs.h.  */
19907 $ac_includes_default
19908 struct { char filler; long field; } pgac_struct;
19909 int
19910 main ()
19911 {
19912 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19913 test_array [0] = 0
19914
19915   ;
19916   return 0;
19917 }
19918 _ACEOF
19919 rm -f conftest.$ac_objext
19920 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19921   (eval $ac_compile) 2>conftest.er1
19922   ac_status=$?
19923   grep -v '^ *+' conftest.er1 >conftest.err
19924   rm -f conftest.er1
19925   cat conftest.err >&5
19926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19927   (exit $ac_status); } &&
19928          { ac_try='test -z "$ac_c_werror_flag"
19929                          || test ! -s conftest.err'
19930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19931   (eval $ac_try) 2>&5
19932   ac_status=$?
19933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19934   (exit $ac_status); }; } &&
19935          { ac_try='test -s conftest.$ac_objext'
19936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19937   (eval $ac_try) 2>&5
19938   ac_status=$?
19939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19940   (exit $ac_status); }; }; then
19941   ac_lo=$ac_mid; break
19942 else
19943   echo "$as_me: failed program was:" >&5
19944 sed 's/^/| /' conftest.$ac_ext >&5
19945
19946 ac_hi=`expr '(' $ac_mid ')' - 1`
19947                        if test $ac_mid -le $ac_hi; then
19948                          ac_lo= ac_hi=
19949                          break
19950                        fi
19951                        ac_mid=`expr 2 '*' $ac_mid`
19952 fi
19953 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19954   done
19955 else
19956   echo "$as_me: failed program was:" >&5
19957 sed 's/^/| /' conftest.$ac_ext >&5
19958
19959 ac_lo= ac_hi=
19960 fi
19961 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19962 fi
19963 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19964 # Binary search between lo and hi bounds.
19965 while test "x$ac_lo" != "x$ac_hi"; do
19966   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19967   cat >conftest.$ac_ext <<_ACEOF
19968 /* confdefs.h.  */
19969 _ACEOF
19970 cat confdefs.h >>conftest.$ac_ext
19971 cat >>conftest.$ac_ext <<_ACEOF
19972 /* end confdefs.h.  */
19973 $ac_includes_default
19974 struct { char filler; long field; } pgac_struct;
19975 int
19976 main ()
19977 {
19978 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19979 test_array [0] = 0
19980
19981   ;
19982   return 0;
19983 }
19984 _ACEOF
19985 rm -f conftest.$ac_objext
19986 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19987   (eval $ac_compile) 2>conftest.er1
19988   ac_status=$?
19989   grep -v '^ *+' conftest.er1 >conftest.err
19990   rm -f conftest.er1
19991   cat conftest.err >&5
19992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19993   (exit $ac_status); } &&
19994          { ac_try='test -z "$ac_c_werror_flag"
19995                          || test ! -s conftest.err'
19996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19997   (eval $ac_try) 2>&5
19998   ac_status=$?
19999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20000   (exit $ac_status); }; } &&
20001          { ac_try='test -s conftest.$ac_objext'
20002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20003   (eval $ac_try) 2>&5
20004   ac_status=$?
20005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20006   (exit $ac_status); }; }; then
20007   ac_hi=$ac_mid
20008 else
20009   echo "$as_me: failed program was:" >&5
20010 sed 's/^/| /' conftest.$ac_ext >&5
20011
20012 ac_lo=`expr '(' $ac_mid ')' + 1`
20013 fi
20014 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20015 done
20016 case $ac_lo in
20017 ?*) pgac_cv_alignof_long=$ac_lo;;
20018 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20019 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20020    { (exit 1); exit 1; }; } ;;
20021 esac
20022 else
20023   if test "$cross_compiling" = yes; then
20024   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20025 See \`config.log' for more details." >&5
20026 echo "$as_me: error: cannot run test program while cross compiling
20027 See \`config.log' for more details." >&2;}
20028    { (exit 1); exit 1; }; }
20029 else
20030   cat >conftest.$ac_ext <<_ACEOF
20031 /* confdefs.h.  */
20032 _ACEOF
20033 cat confdefs.h >>conftest.$ac_ext
20034 cat >>conftest.$ac_ext <<_ACEOF
20035 /* end confdefs.h.  */
20036 $ac_includes_default
20037 struct { char filler; long field; } pgac_struct;
20038 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20039 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20040 #include <stdio.h>
20041 #include <stdlib.h>
20042 int
20043 main ()
20044 {
20045
20046   FILE *f = fopen ("conftest.val", "w");
20047   if (! f)
20048     exit (1);
20049   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20050     {
20051       long i = longval ();
20052       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20053         exit (1);
20054       fprintf (f, "%ld\n", i);
20055     }
20056   else
20057     {
20058       unsigned long i = ulongval ();
20059       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20060         exit (1);
20061       fprintf (f, "%lu\n", i);
20062     }
20063   exit (ferror (f) || fclose (f) != 0);
20064
20065   ;
20066   return 0;
20067 }
20068 _ACEOF
20069 rm -f conftest$ac_exeext
20070 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20071   (eval $ac_link) 2>&5
20072   ac_status=$?
20073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20074   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20076   (eval $ac_try) 2>&5
20077   ac_status=$?
20078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20079   (exit $ac_status); }; }; then
20080   pgac_cv_alignof_long=`cat conftest.val`
20081 else
20082   echo "$as_me: program exited with status $ac_status" >&5
20083 echo "$as_me: failed program was:" >&5
20084 sed 's/^/| /' conftest.$ac_ext >&5
20085
20086 ( exit $ac_status )
20087 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20088 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20089    { (exit 1); exit 1; }; }
20090 fi
20091 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20092 fi
20093 fi
20094 rm -f conftest.val
20095 else
20096   pgac_cv_alignof_long=0
20097 fi
20098 fi
20099 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
20100 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
20101 cat >>confdefs.h <<_ACEOF
20102 #define ALIGNOF_LONG $pgac_cv_alignof_long
20103 _ACEOF
20104
20105
20106 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
20107   echo "$as_me:$LINENO: checking for long long int" >&5
20108 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
20109 if test "${ac_cv_type_long_long_int+set}" = set; then
20110   echo $ECHO_N "(cached) $ECHO_C" >&6
20111 else
20112   cat >conftest.$ac_ext <<_ACEOF
20113 /* confdefs.h.  */
20114 _ACEOF
20115 cat confdefs.h >>conftest.$ac_ext
20116 cat >>conftest.$ac_ext <<_ACEOF
20117 /* end confdefs.h.  */
20118 $ac_includes_default
20119 int
20120 main ()
20121 {
20122 if ((long long int *) 0)
20123   return 0;
20124 if (sizeof (long long int))
20125   return 0;
20126   ;
20127   return 0;
20128 }
20129 _ACEOF
20130 rm -f conftest.$ac_objext
20131 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20132   (eval $ac_compile) 2>conftest.er1
20133   ac_status=$?
20134   grep -v '^ *+' conftest.er1 >conftest.err
20135   rm -f conftest.er1
20136   cat conftest.err >&5
20137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20138   (exit $ac_status); } &&
20139          { ac_try='test -z "$ac_c_werror_flag"
20140                          || test ! -s conftest.err'
20141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20142   (eval $ac_try) 2>&5
20143   ac_status=$?
20144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20145   (exit $ac_status); }; } &&
20146          { ac_try='test -s conftest.$ac_objext'
20147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20148   (eval $ac_try) 2>&5
20149   ac_status=$?
20150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20151   (exit $ac_status); }; }; then
20152   ac_cv_type_long_long_int=yes
20153 else
20154   echo "$as_me: failed program was:" >&5
20155 sed 's/^/| /' conftest.$ac_ext >&5
20156
20157 ac_cv_type_long_long_int=no
20158 fi
20159 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20160 fi
20161 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
20162 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
20163
20164 echo "$as_me:$LINENO: checking alignment of long long int" >&5
20165 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
20166 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
20167   echo $ECHO_N "(cached) $ECHO_C" >&6
20168 else
20169   if test "$ac_cv_type_long_long_int" = yes; then
20170   if test "$cross_compiling" = yes; then
20171   # Depending upon the size, compute the lo and hi bounds.
20172 cat >conftest.$ac_ext <<_ACEOF
20173 /* confdefs.h.  */
20174 _ACEOF
20175 cat confdefs.h >>conftest.$ac_ext
20176 cat >>conftest.$ac_ext <<_ACEOF
20177 /* end confdefs.h.  */
20178 $ac_includes_default
20179 struct { char filler; long long int field; } pgac_struct;
20180 int
20181 main ()
20182 {
20183 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20184 test_array [0] = 0
20185
20186   ;
20187   return 0;
20188 }
20189 _ACEOF
20190 rm -f conftest.$ac_objext
20191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20192   (eval $ac_compile) 2>conftest.er1
20193   ac_status=$?
20194   grep -v '^ *+' conftest.er1 >conftest.err
20195   rm -f conftest.er1
20196   cat conftest.err >&5
20197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20198   (exit $ac_status); } &&
20199          { ac_try='test -z "$ac_c_werror_flag"
20200                          || test ! -s conftest.err'
20201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20202   (eval $ac_try) 2>&5
20203   ac_status=$?
20204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20205   (exit $ac_status); }; } &&
20206          { ac_try='test -s conftest.$ac_objext'
20207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20208   (eval $ac_try) 2>&5
20209   ac_status=$?
20210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20211   (exit $ac_status); }; }; then
20212   ac_lo=0 ac_mid=0
20213   while :; do
20214     cat >conftest.$ac_ext <<_ACEOF
20215 /* confdefs.h.  */
20216 _ACEOF
20217 cat confdefs.h >>conftest.$ac_ext
20218 cat >>conftest.$ac_ext <<_ACEOF
20219 /* end confdefs.h.  */
20220 $ac_includes_default
20221 struct { char filler; long long int field; } pgac_struct;
20222 int
20223 main ()
20224 {
20225 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20226 test_array [0] = 0
20227
20228   ;
20229   return 0;
20230 }
20231 _ACEOF
20232 rm -f conftest.$ac_objext
20233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20234   (eval $ac_compile) 2>conftest.er1
20235   ac_status=$?
20236   grep -v '^ *+' conftest.er1 >conftest.err
20237   rm -f conftest.er1
20238   cat conftest.err >&5
20239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20240   (exit $ac_status); } &&
20241          { ac_try='test -z "$ac_c_werror_flag"
20242                          || test ! -s conftest.err'
20243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20244   (eval $ac_try) 2>&5
20245   ac_status=$?
20246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20247   (exit $ac_status); }; } &&
20248          { ac_try='test -s conftest.$ac_objext'
20249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20250   (eval $ac_try) 2>&5
20251   ac_status=$?
20252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20253   (exit $ac_status); }; }; then
20254   ac_hi=$ac_mid; break
20255 else
20256   echo "$as_me: failed program was:" >&5
20257 sed 's/^/| /' conftest.$ac_ext >&5
20258
20259 ac_lo=`expr $ac_mid + 1`
20260                     if test $ac_lo -le $ac_mid; then
20261                       ac_lo= ac_hi=
20262                       break
20263                     fi
20264                     ac_mid=`expr 2 '*' $ac_mid + 1`
20265 fi
20266 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20267   done
20268 else
20269   echo "$as_me: failed program was:" >&5
20270 sed 's/^/| /' conftest.$ac_ext >&5
20271
20272 cat >conftest.$ac_ext <<_ACEOF
20273 /* confdefs.h.  */
20274 _ACEOF
20275 cat confdefs.h >>conftest.$ac_ext
20276 cat >>conftest.$ac_ext <<_ACEOF
20277 /* end confdefs.h.  */
20278 $ac_includes_default
20279 struct { char filler; long long int field; } pgac_struct;
20280 int
20281 main ()
20282 {
20283 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20284 test_array [0] = 0
20285
20286   ;
20287   return 0;
20288 }
20289 _ACEOF
20290 rm -f conftest.$ac_objext
20291 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20292   (eval $ac_compile) 2>conftest.er1
20293   ac_status=$?
20294   grep -v '^ *+' conftest.er1 >conftest.err
20295   rm -f conftest.er1
20296   cat conftest.err >&5
20297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20298   (exit $ac_status); } &&
20299          { ac_try='test -z "$ac_c_werror_flag"
20300                          || test ! -s conftest.err'
20301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20302   (eval $ac_try) 2>&5
20303   ac_status=$?
20304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20305   (exit $ac_status); }; } &&
20306          { ac_try='test -s conftest.$ac_objext'
20307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20308   (eval $ac_try) 2>&5
20309   ac_status=$?
20310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20311   (exit $ac_status); }; }; then
20312   ac_hi=-1 ac_mid=-1
20313   while :; do
20314     cat >conftest.$ac_ext <<_ACEOF
20315 /* confdefs.h.  */
20316 _ACEOF
20317 cat confdefs.h >>conftest.$ac_ext
20318 cat >>conftest.$ac_ext <<_ACEOF
20319 /* end confdefs.h.  */
20320 $ac_includes_default
20321 struct { char filler; long long int field; } pgac_struct;
20322 int
20323 main ()
20324 {
20325 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20326 test_array [0] = 0
20327
20328   ;
20329   return 0;
20330 }
20331 _ACEOF
20332 rm -f conftest.$ac_objext
20333 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20334   (eval $ac_compile) 2>conftest.er1
20335   ac_status=$?
20336   grep -v '^ *+' conftest.er1 >conftest.err
20337   rm -f conftest.er1
20338   cat conftest.err >&5
20339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20340   (exit $ac_status); } &&
20341          { ac_try='test -z "$ac_c_werror_flag"
20342                          || test ! -s conftest.err'
20343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20344   (eval $ac_try) 2>&5
20345   ac_status=$?
20346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20347   (exit $ac_status); }; } &&
20348          { ac_try='test -s conftest.$ac_objext'
20349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20350   (eval $ac_try) 2>&5
20351   ac_status=$?
20352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20353   (exit $ac_status); }; }; then
20354   ac_lo=$ac_mid; break
20355 else
20356   echo "$as_me: failed program was:" >&5
20357 sed 's/^/| /' conftest.$ac_ext >&5
20358
20359 ac_hi=`expr '(' $ac_mid ')' - 1`
20360                        if test $ac_mid -le $ac_hi; then
20361                          ac_lo= ac_hi=
20362                          break
20363                        fi
20364                        ac_mid=`expr 2 '*' $ac_mid`
20365 fi
20366 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20367   done
20368 else
20369   echo "$as_me: failed program was:" >&5
20370 sed 's/^/| /' conftest.$ac_ext >&5
20371
20372 ac_lo= ac_hi=
20373 fi
20374 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20375 fi
20376 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20377 # Binary search between lo and hi bounds.
20378 while test "x$ac_lo" != "x$ac_hi"; do
20379   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20380   cat >conftest.$ac_ext <<_ACEOF
20381 /* confdefs.h.  */
20382 _ACEOF
20383 cat confdefs.h >>conftest.$ac_ext
20384 cat >>conftest.$ac_ext <<_ACEOF
20385 /* end confdefs.h.  */
20386 $ac_includes_default
20387 struct { char filler; long long int field; } pgac_struct;
20388 int
20389 main ()
20390 {
20391 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20392 test_array [0] = 0
20393
20394   ;
20395   return 0;
20396 }
20397 _ACEOF
20398 rm -f conftest.$ac_objext
20399 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20400   (eval $ac_compile) 2>conftest.er1
20401   ac_status=$?
20402   grep -v '^ *+' conftest.er1 >conftest.err
20403   rm -f conftest.er1
20404   cat conftest.err >&5
20405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20406   (exit $ac_status); } &&
20407          { ac_try='test -z "$ac_c_werror_flag"
20408                          || test ! -s conftest.err'
20409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20410   (eval $ac_try) 2>&5
20411   ac_status=$?
20412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20413   (exit $ac_status); }; } &&
20414          { ac_try='test -s conftest.$ac_objext'
20415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20416   (eval $ac_try) 2>&5
20417   ac_status=$?
20418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20419   (exit $ac_status); }; }; then
20420   ac_hi=$ac_mid
20421 else
20422   echo "$as_me: failed program was:" >&5
20423 sed 's/^/| /' conftest.$ac_ext >&5
20424
20425 ac_lo=`expr '(' $ac_mid ')' + 1`
20426 fi
20427 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20428 done
20429 case $ac_lo in
20430 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20431 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20432 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20433    { (exit 1); exit 1; }; } ;;
20434 esac
20435 else
20436   if test "$cross_compiling" = yes; then
20437   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20438 See \`config.log' for more details." >&5
20439 echo "$as_me: error: cannot run test program while cross compiling
20440 See \`config.log' for more details." >&2;}
20441    { (exit 1); exit 1; }; }
20442 else
20443   cat >conftest.$ac_ext <<_ACEOF
20444 /* confdefs.h.  */
20445 _ACEOF
20446 cat confdefs.h >>conftest.$ac_ext
20447 cat >>conftest.$ac_ext <<_ACEOF
20448 /* end confdefs.h.  */
20449 $ac_includes_default
20450 struct { char filler; long long int field; } pgac_struct;
20451 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20452 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20453 #include <stdio.h>
20454 #include <stdlib.h>
20455 int
20456 main ()
20457 {
20458
20459   FILE *f = fopen ("conftest.val", "w");
20460   if (! f)
20461     exit (1);
20462   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20463     {
20464       long i = longval ();
20465       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20466         exit (1);
20467       fprintf (f, "%ld\n", i);
20468     }
20469   else
20470     {
20471       unsigned long i = ulongval ();
20472       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20473         exit (1);
20474       fprintf (f, "%lu\n", i);
20475     }
20476   exit (ferror (f) || fclose (f) != 0);
20477
20478   ;
20479   return 0;
20480 }
20481 _ACEOF
20482 rm -f conftest$ac_exeext
20483 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20484   (eval $ac_link) 2>&5
20485   ac_status=$?
20486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20487   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20489   (eval $ac_try) 2>&5
20490   ac_status=$?
20491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20492   (exit $ac_status); }; }; then
20493   pgac_cv_alignof_long_long_int=`cat conftest.val`
20494 else
20495   echo "$as_me: program exited with status $ac_status" >&5
20496 echo "$as_me: failed program was:" >&5
20497 sed 's/^/| /' conftest.$ac_ext >&5
20498
20499 ( exit $ac_status )
20500 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20501 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20502    { (exit 1); exit 1; }; }
20503 fi
20504 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20505 fi
20506 fi
20507 rm -f conftest.val
20508 else
20509   pgac_cv_alignof_long_long_int=0
20510 fi
20511 fi
20512 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20513 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20514 cat >>confdefs.h <<_ACEOF
20515 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20516 _ACEOF
20517
20518
20519 fi
20520 echo "$as_me:$LINENO: checking for double" >&5
20521 echo $ECHO_N "checking for double... $ECHO_C" >&6
20522 if test "${ac_cv_type_double+set}" = set; then
20523   echo $ECHO_N "(cached) $ECHO_C" >&6
20524 else
20525   cat >conftest.$ac_ext <<_ACEOF
20526 /* confdefs.h.  */
20527 _ACEOF
20528 cat confdefs.h >>conftest.$ac_ext
20529 cat >>conftest.$ac_ext <<_ACEOF
20530 /* end confdefs.h.  */
20531 $ac_includes_default
20532 int
20533 main ()
20534 {
20535 if ((double *) 0)
20536   return 0;
20537 if (sizeof (double))
20538   return 0;
20539   ;
20540   return 0;
20541 }
20542 _ACEOF
20543 rm -f conftest.$ac_objext
20544 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20545   (eval $ac_compile) 2>conftest.er1
20546   ac_status=$?
20547   grep -v '^ *+' conftest.er1 >conftest.err
20548   rm -f conftest.er1
20549   cat conftest.err >&5
20550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20551   (exit $ac_status); } &&
20552          { ac_try='test -z "$ac_c_werror_flag"
20553                          || test ! -s conftest.err'
20554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20555   (eval $ac_try) 2>&5
20556   ac_status=$?
20557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20558   (exit $ac_status); }; } &&
20559          { ac_try='test -s conftest.$ac_objext'
20560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20561   (eval $ac_try) 2>&5
20562   ac_status=$?
20563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20564   (exit $ac_status); }; }; then
20565   ac_cv_type_double=yes
20566 else
20567   echo "$as_me: failed program was:" >&5
20568 sed 's/^/| /' conftest.$ac_ext >&5
20569
20570 ac_cv_type_double=no
20571 fi
20572 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20573 fi
20574 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20575 echo "${ECHO_T}$ac_cv_type_double" >&6
20576
20577 echo "$as_me:$LINENO: checking alignment of double" >&5
20578 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20579 if test "${pgac_cv_alignof_double+set}" = set; then
20580   echo $ECHO_N "(cached) $ECHO_C" >&6
20581 else
20582   if test "$ac_cv_type_double" = yes; then
20583   if test "$cross_compiling" = yes; then
20584   # Depending upon the size, compute the lo and hi bounds.
20585 cat >conftest.$ac_ext <<_ACEOF
20586 /* confdefs.h.  */
20587 _ACEOF
20588 cat confdefs.h >>conftest.$ac_ext
20589 cat >>conftest.$ac_ext <<_ACEOF
20590 /* end confdefs.h.  */
20591 $ac_includes_default
20592 struct { char filler; double field; } pgac_struct;
20593 int
20594 main ()
20595 {
20596 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20597 test_array [0] = 0
20598
20599   ;
20600   return 0;
20601 }
20602 _ACEOF
20603 rm -f conftest.$ac_objext
20604 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20605   (eval $ac_compile) 2>conftest.er1
20606   ac_status=$?
20607   grep -v '^ *+' conftest.er1 >conftest.err
20608   rm -f conftest.er1
20609   cat conftest.err >&5
20610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20611   (exit $ac_status); } &&
20612          { ac_try='test -z "$ac_c_werror_flag"
20613                          || test ! -s conftest.err'
20614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20615   (eval $ac_try) 2>&5
20616   ac_status=$?
20617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20618   (exit $ac_status); }; } &&
20619          { ac_try='test -s conftest.$ac_objext'
20620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20621   (eval $ac_try) 2>&5
20622   ac_status=$?
20623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20624   (exit $ac_status); }; }; then
20625   ac_lo=0 ac_mid=0
20626   while :; do
20627     cat >conftest.$ac_ext <<_ACEOF
20628 /* confdefs.h.  */
20629 _ACEOF
20630 cat confdefs.h >>conftest.$ac_ext
20631 cat >>conftest.$ac_ext <<_ACEOF
20632 /* end confdefs.h.  */
20633 $ac_includes_default
20634 struct { char filler; double field; } pgac_struct;
20635 int
20636 main ()
20637 {
20638 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20639 test_array [0] = 0
20640
20641   ;
20642   return 0;
20643 }
20644 _ACEOF
20645 rm -f conftest.$ac_objext
20646 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20647   (eval $ac_compile) 2>conftest.er1
20648   ac_status=$?
20649   grep -v '^ *+' conftest.er1 >conftest.err
20650   rm -f conftest.er1
20651   cat conftest.err >&5
20652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20653   (exit $ac_status); } &&
20654          { ac_try='test -z "$ac_c_werror_flag"
20655                          || test ! -s conftest.err'
20656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20657   (eval $ac_try) 2>&5
20658   ac_status=$?
20659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20660   (exit $ac_status); }; } &&
20661          { ac_try='test -s conftest.$ac_objext'
20662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20663   (eval $ac_try) 2>&5
20664   ac_status=$?
20665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20666   (exit $ac_status); }; }; then
20667   ac_hi=$ac_mid; break
20668 else
20669   echo "$as_me: failed program was:" >&5
20670 sed 's/^/| /' conftest.$ac_ext >&5
20671
20672 ac_lo=`expr $ac_mid + 1`
20673                     if test $ac_lo -le $ac_mid; then
20674                       ac_lo= ac_hi=
20675                       break
20676                     fi
20677                     ac_mid=`expr 2 '*' $ac_mid + 1`
20678 fi
20679 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20680   done
20681 else
20682   echo "$as_me: failed program was:" >&5
20683 sed 's/^/| /' conftest.$ac_ext >&5
20684
20685 cat >conftest.$ac_ext <<_ACEOF
20686 /* confdefs.h.  */
20687 _ACEOF
20688 cat confdefs.h >>conftest.$ac_ext
20689 cat >>conftest.$ac_ext <<_ACEOF
20690 /* end confdefs.h.  */
20691 $ac_includes_default
20692 struct { char filler; double field; } pgac_struct;
20693 int
20694 main ()
20695 {
20696 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20697 test_array [0] = 0
20698
20699   ;
20700   return 0;
20701 }
20702 _ACEOF
20703 rm -f conftest.$ac_objext
20704 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20705   (eval $ac_compile) 2>conftest.er1
20706   ac_status=$?
20707   grep -v '^ *+' conftest.er1 >conftest.err
20708   rm -f conftest.er1
20709   cat conftest.err >&5
20710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20711   (exit $ac_status); } &&
20712          { ac_try='test -z "$ac_c_werror_flag"
20713                          || test ! -s conftest.err'
20714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20715   (eval $ac_try) 2>&5
20716   ac_status=$?
20717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20718   (exit $ac_status); }; } &&
20719          { ac_try='test -s conftest.$ac_objext'
20720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20721   (eval $ac_try) 2>&5
20722   ac_status=$?
20723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20724   (exit $ac_status); }; }; then
20725   ac_hi=-1 ac_mid=-1
20726   while :; do
20727     cat >conftest.$ac_ext <<_ACEOF
20728 /* confdefs.h.  */
20729 _ACEOF
20730 cat confdefs.h >>conftest.$ac_ext
20731 cat >>conftest.$ac_ext <<_ACEOF
20732 /* end confdefs.h.  */
20733 $ac_includes_default
20734 struct { char filler; double field; } pgac_struct;
20735 int
20736 main ()
20737 {
20738 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20739 test_array [0] = 0
20740
20741   ;
20742   return 0;
20743 }
20744 _ACEOF
20745 rm -f conftest.$ac_objext
20746 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20747   (eval $ac_compile) 2>conftest.er1
20748   ac_status=$?
20749   grep -v '^ *+' conftest.er1 >conftest.err
20750   rm -f conftest.er1
20751   cat conftest.err >&5
20752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20753   (exit $ac_status); } &&
20754          { ac_try='test -z "$ac_c_werror_flag"
20755                          || test ! -s conftest.err'
20756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20757   (eval $ac_try) 2>&5
20758   ac_status=$?
20759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20760   (exit $ac_status); }; } &&
20761          { ac_try='test -s conftest.$ac_objext'
20762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20763   (eval $ac_try) 2>&5
20764   ac_status=$?
20765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20766   (exit $ac_status); }; }; then
20767   ac_lo=$ac_mid; break
20768 else
20769   echo "$as_me: failed program was:" >&5
20770 sed 's/^/| /' conftest.$ac_ext >&5
20771
20772 ac_hi=`expr '(' $ac_mid ')' - 1`
20773                        if test $ac_mid -le $ac_hi; then
20774                          ac_lo= ac_hi=
20775                          break
20776                        fi
20777                        ac_mid=`expr 2 '*' $ac_mid`
20778 fi
20779 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20780   done
20781 else
20782   echo "$as_me: failed program was:" >&5
20783 sed 's/^/| /' conftest.$ac_ext >&5
20784
20785 ac_lo= ac_hi=
20786 fi
20787 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20788 fi
20789 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20790 # Binary search between lo and hi bounds.
20791 while test "x$ac_lo" != "x$ac_hi"; do
20792   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20793   cat >conftest.$ac_ext <<_ACEOF
20794 /* confdefs.h.  */
20795 _ACEOF
20796 cat confdefs.h >>conftest.$ac_ext
20797 cat >>conftest.$ac_ext <<_ACEOF
20798 /* end confdefs.h.  */
20799 $ac_includes_default
20800 struct { char filler; double field; } pgac_struct;
20801 int
20802 main ()
20803 {
20804 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20805 test_array [0] = 0
20806
20807   ;
20808   return 0;
20809 }
20810 _ACEOF
20811 rm -f conftest.$ac_objext
20812 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20813   (eval $ac_compile) 2>conftest.er1
20814   ac_status=$?
20815   grep -v '^ *+' conftest.er1 >conftest.err
20816   rm -f conftest.er1
20817   cat conftest.err >&5
20818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20819   (exit $ac_status); } &&
20820          { ac_try='test -z "$ac_c_werror_flag"
20821                          || test ! -s conftest.err'
20822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20823   (eval $ac_try) 2>&5
20824   ac_status=$?
20825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20826   (exit $ac_status); }; } &&
20827          { ac_try='test -s conftest.$ac_objext'
20828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20829   (eval $ac_try) 2>&5
20830   ac_status=$?
20831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20832   (exit $ac_status); }; }; then
20833   ac_hi=$ac_mid
20834 else
20835   echo "$as_me: failed program was:" >&5
20836 sed 's/^/| /' conftest.$ac_ext >&5
20837
20838 ac_lo=`expr '(' $ac_mid ')' + 1`
20839 fi
20840 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20841 done
20842 case $ac_lo in
20843 ?*) pgac_cv_alignof_double=$ac_lo;;
20844 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20845 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20846    { (exit 1); exit 1; }; } ;;
20847 esac
20848 else
20849   if test "$cross_compiling" = yes; then
20850   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20851 See \`config.log' for more details." >&5
20852 echo "$as_me: error: cannot run test program while cross compiling
20853 See \`config.log' for more details." >&2;}
20854    { (exit 1); exit 1; }; }
20855 else
20856   cat >conftest.$ac_ext <<_ACEOF
20857 /* confdefs.h.  */
20858 _ACEOF
20859 cat confdefs.h >>conftest.$ac_ext
20860 cat >>conftest.$ac_ext <<_ACEOF
20861 /* end confdefs.h.  */
20862 $ac_includes_default
20863 struct { char filler; double field; } pgac_struct;
20864 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20865 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20866 #include <stdio.h>
20867 #include <stdlib.h>
20868 int
20869 main ()
20870 {
20871
20872   FILE *f = fopen ("conftest.val", "w");
20873   if (! f)
20874     exit (1);
20875   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20876     {
20877       long i = longval ();
20878       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20879         exit (1);
20880       fprintf (f, "%ld\n", i);
20881     }
20882   else
20883     {
20884       unsigned long i = ulongval ();
20885       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20886         exit (1);
20887       fprintf (f, "%lu\n", i);
20888     }
20889   exit (ferror (f) || fclose (f) != 0);
20890
20891   ;
20892   return 0;
20893 }
20894 _ACEOF
20895 rm -f conftest$ac_exeext
20896 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20897   (eval $ac_link) 2>&5
20898   ac_status=$?
20899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20900   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20902   (eval $ac_try) 2>&5
20903   ac_status=$?
20904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20905   (exit $ac_status); }; }; then
20906   pgac_cv_alignof_double=`cat conftest.val`
20907 else
20908   echo "$as_me: program exited with status $ac_status" >&5
20909 echo "$as_me: failed program was:" >&5
20910 sed 's/^/| /' conftest.$ac_ext >&5
20911
20912 ( exit $ac_status )
20913 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20914 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20915    { (exit 1); exit 1; }; }
20916 fi
20917 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20918 fi
20919 fi
20920 rm -f conftest.val
20921 else
20922   pgac_cv_alignof_double=0
20923 fi
20924 fi
20925 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20926 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20927 cat >>confdefs.h <<_ACEOF
20928 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20929 _ACEOF
20930
20931
20932
20933 # Compute maximum alignment of any basic type.
20934 # We assume long's alignment is at least as strong as char, short, or int;
20935 # but we must check long long (if it exists) and double.
20936
20937 MAX_ALIGNOF=$pgac_cv_alignof_long
20938 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20939   MAX_ALIGNOF=$pgac_cv_alignof_double
20940 fi
20941 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20942   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20943 fi
20944
20945 cat >>confdefs.h <<_ACEOF
20946 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20947 _ACEOF
20948
20949
20950
20951 # Some platforms predefine the types int8, int16, etc.  Only check
20952 # a (hopefully) representative subset.
20953 echo "$as_me:$LINENO: checking for int8" >&5
20954 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20955 if test "${ac_cv_type_int8+set}" = set; then
20956   echo $ECHO_N "(cached) $ECHO_C" >&6
20957 else
20958   cat >conftest.$ac_ext <<_ACEOF
20959 /* confdefs.h.  */
20960 _ACEOF
20961 cat confdefs.h >>conftest.$ac_ext
20962 cat >>conftest.$ac_ext <<_ACEOF
20963 /* end confdefs.h.  */
20964 #include <stdio.h>
20965 #ifdef HAVE_SUPPORTDEFS_H
20966 #include <SupportDefs.h>
20967 #endif
20968
20969 int
20970 main ()
20971 {
20972 if ((int8 *) 0)
20973   return 0;
20974 if (sizeof (int8))
20975   return 0;
20976   ;
20977   return 0;
20978 }
20979 _ACEOF
20980 rm -f conftest.$ac_objext
20981 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20982   (eval $ac_compile) 2>conftest.er1
20983   ac_status=$?
20984   grep -v '^ *+' conftest.er1 >conftest.err
20985   rm -f conftest.er1
20986   cat conftest.err >&5
20987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20988   (exit $ac_status); } &&
20989          { ac_try='test -z "$ac_c_werror_flag"
20990                          || test ! -s conftest.err'
20991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20992   (eval $ac_try) 2>&5
20993   ac_status=$?
20994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20995   (exit $ac_status); }; } &&
20996          { ac_try='test -s conftest.$ac_objext'
20997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20998   (eval $ac_try) 2>&5
20999   ac_status=$?
21000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21001   (exit $ac_status); }; }; then
21002   ac_cv_type_int8=yes
21003 else
21004   echo "$as_me: failed program was:" >&5
21005 sed 's/^/| /' conftest.$ac_ext >&5
21006
21007 ac_cv_type_int8=no
21008 fi
21009 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21010 fi
21011 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
21012 echo "${ECHO_T}$ac_cv_type_int8" >&6
21013 if test $ac_cv_type_int8 = yes; then
21014
21015 cat >>confdefs.h <<_ACEOF
21016 #define HAVE_INT8 1
21017 _ACEOF
21018
21019
21020 fi
21021 echo "$as_me:$LINENO: checking for uint8" >&5
21022 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
21023 if test "${ac_cv_type_uint8+set}" = set; then
21024   echo $ECHO_N "(cached) $ECHO_C" >&6
21025 else
21026   cat >conftest.$ac_ext <<_ACEOF
21027 /* confdefs.h.  */
21028 _ACEOF
21029 cat confdefs.h >>conftest.$ac_ext
21030 cat >>conftest.$ac_ext <<_ACEOF
21031 /* end confdefs.h.  */
21032 #include <stdio.h>
21033 #ifdef HAVE_SUPPORTDEFS_H
21034 #include <SupportDefs.h>
21035 #endif
21036
21037 int
21038 main ()
21039 {
21040 if ((uint8 *) 0)
21041   return 0;
21042 if (sizeof (uint8))
21043   return 0;
21044   ;
21045   return 0;
21046 }
21047 _ACEOF
21048 rm -f conftest.$ac_objext
21049 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21050   (eval $ac_compile) 2>conftest.er1
21051   ac_status=$?
21052   grep -v '^ *+' conftest.er1 >conftest.err
21053   rm -f conftest.er1
21054   cat conftest.err >&5
21055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21056   (exit $ac_status); } &&
21057          { ac_try='test -z "$ac_c_werror_flag"
21058                          || test ! -s conftest.err'
21059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21060   (eval $ac_try) 2>&5
21061   ac_status=$?
21062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21063   (exit $ac_status); }; } &&
21064          { ac_try='test -s conftest.$ac_objext'
21065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21066   (eval $ac_try) 2>&5
21067   ac_status=$?
21068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21069   (exit $ac_status); }; }; then
21070   ac_cv_type_uint8=yes
21071 else
21072   echo "$as_me: failed program was:" >&5
21073 sed 's/^/| /' conftest.$ac_ext >&5
21074
21075 ac_cv_type_uint8=no
21076 fi
21077 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21078 fi
21079 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
21080 echo "${ECHO_T}$ac_cv_type_uint8" >&6
21081 if test $ac_cv_type_uint8 = yes; then
21082
21083 cat >>confdefs.h <<_ACEOF
21084 #define HAVE_UINT8 1
21085 _ACEOF
21086
21087
21088 fi
21089 echo "$as_me:$LINENO: checking for int64" >&5
21090 echo $ECHO_N "checking for int64... $ECHO_C" >&6
21091 if test "${ac_cv_type_int64+set}" = set; then
21092   echo $ECHO_N "(cached) $ECHO_C" >&6
21093 else
21094   cat >conftest.$ac_ext <<_ACEOF
21095 /* confdefs.h.  */
21096 _ACEOF
21097 cat confdefs.h >>conftest.$ac_ext
21098 cat >>conftest.$ac_ext <<_ACEOF
21099 /* end confdefs.h.  */
21100 #include <stdio.h>
21101 #ifdef HAVE_SUPPORTDEFS_H
21102 #include <SupportDefs.h>
21103 #endif
21104
21105 int
21106 main ()
21107 {
21108 if ((int64 *) 0)
21109   return 0;
21110 if (sizeof (int64))
21111   return 0;
21112   ;
21113   return 0;
21114 }
21115 _ACEOF
21116 rm -f conftest.$ac_objext
21117 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21118   (eval $ac_compile) 2>conftest.er1
21119   ac_status=$?
21120   grep -v '^ *+' conftest.er1 >conftest.err
21121   rm -f conftest.er1
21122   cat conftest.err >&5
21123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21124   (exit $ac_status); } &&
21125          { ac_try='test -z "$ac_c_werror_flag"
21126                          || test ! -s conftest.err'
21127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21128   (eval $ac_try) 2>&5
21129   ac_status=$?
21130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21131   (exit $ac_status); }; } &&
21132          { ac_try='test -s conftest.$ac_objext'
21133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21134   (eval $ac_try) 2>&5
21135   ac_status=$?
21136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21137   (exit $ac_status); }; }; then
21138   ac_cv_type_int64=yes
21139 else
21140   echo "$as_me: failed program was:" >&5
21141 sed 's/^/| /' conftest.$ac_ext >&5
21142
21143 ac_cv_type_int64=no
21144 fi
21145 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21146 fi
21147 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
21148 echo "${ECHO_T}$ac_cv_type_int64" >&6
21149 if test $ac_cv_type_int64 = yes; then
21150
21151 cat >>confdefs.h <<_ACEOF
21152 #define HAVE_INT64 1
21153 _ACEOF
21154
21155
21156 fi
21157 echo "$as_me:$LINENO: checking for uint64" >&5
21158 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
21159 if test "${ac_cv_type_uint64+set}" = set; then
21160   echo $ECHO_N "(cached) $ECHO_C" >&6
21161 else
21162   cat >conftest.$ac_ext <<_ACEOF
21163 /* confdefs.h.  */
21164 _ACEOF
21165 cat confdefs.h >>conftest.$ac_ext
21166 cat >>conftest.$ac_ext <<_ACEOF
21167 /* end confdefs.h.  */
21168 #include <stdio.h>
21169 #ifdef HAVE_SUPPORTDEFS_H
21170 #include <SupportDefs.h>
21171 #endif
21172
21173 int
21174 main ()
21175 {
21176 if ((uint64 *) 0)
21177   return 0;
21178 if (sizeof (uint64))
21179   return 0;
21180   ;
21181   return 0;
21182 }
21183 _ACEOF
21184 rm -f conftest.$ac_objext
21185 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21186   (eval $ac_compile) 2>conftest.er1
21187   ac_status=$?
21188   grep -v '^ *+' conftest.er1 >conftest.err
21189   rm -f conftest.er1
21190   cat conftest.err >&5
21191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21192   (exit $ac_status); } &&
21193          { ac_try='test -z "$ac_c_werror_flag"
21194                          || test ! -s conftest.err'
21195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21196   (eval $ac_try) 2>&5
21197   ac_status=$?
21198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21199   (exit $ac_status); }; } &&
21200          { ac_try='test -s conftest.$ac_objext'
21201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21202   (eval $ac_try) 2>&5
21203   ac_status=$?
21204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21205   (exit $ac_status); }; }; then
21206   ac_cv_type_uint64=yes
21207 else
21208   echo "$as_me: failed program was:" >&5
21209 sed 's/^/| /' conftest.$ac_ext >&5
21210
21211 ac_cv_type_uint64=no
21212 fi
21213 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21214 fi
21215 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
21216 echo "${ECHO_T}$ac_cv_type_uint64" >&6
21217 if test $ac_cv_type_uint64 = yes; then
21218
21219 cat >>confdefs.h <<_ACEOF
21220 #define HAVE_UINT64 1
21221 _ACEOF
21222
21223
21224 fi
21225
21226
21227 # We also check for sig_atomic_t, which *should* be defined per ANSI
21228 # C, but is missing on some old platforms.
21229 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
21230 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
21231 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
21232   echo $ECHO_N "(cached) $ECHO_C" >&6
21233 else
21234   cat >conftest.$ac_ext <<_ACEOF
21235 /* confdefs.h.  */
21236 _ACEOF
21237 cat confdefs.h >>conftest.$ac_ext
21238 cat >>conftest.$ac_ext <<_ACEOF
21239 /* end confdefs.h.  */
21240 #include <signal.h>
21241
21242 int
21243 main ()
21244 {
21245 if ((sig_atomic_t *) 0)
21246   return 0;
21247 if (sizeof (sig_atomic_t))
21248   return 0;
21249   ;
21250   return 0;
21251 }
21252 _ACEOF
21253 rm -f conftest.$ac_objext
21254 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21255   (eval $ac_compile) 2>conftest.er1
21256   ac_status=$?
21257   grep -v '^ *+' conftest.er1 >conftest.err
21258   rm -f conftest.er1
21259   cat conftest.err >&5
21260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21261   (exit $ac_status); } &&
21262          { ac_try='test -z "$ac_c_werror_flag"
21263                          || test ! -s conftest.err'
21264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21265   (eval $ac_try) 2>&5
21266   ac_status=$?
21267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21268   (exit $ac_status); }; } &&
21269          { ac_try='test -s conftest.$ac_objext'
21270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21271   (eval $ac_try) 2>&5
21272   ac_status=$?
21273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21274   (exit $ac_status); }; }; then
21275   ac_cv_type_sig_atomic_t=yes
21276 else
21277   echo "$as_me: failed program was:" >&5
21278 sed 's/^/| /' conftest.$ac_ext >&5
21279
21280 ac_cv_type_sig_atomic_t=no
21281 fi
21282 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21283 fi
21284 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21285 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21286 if test $ac_cv_type_sig_atomic_t = yes; then
21287
21288 cat >>confdefs.h <<_ACEOF
21289 #define HAVE_SIG_ATOMIC_T 1
21290 _ACEOF
21291
21292
21293 fi
21294
21295
21296
21297 if test x"$template" != x"win32"
21298 then
21299 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21300 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21301 if test "${pgac_cv_func_posix_signals+set}" = set; then
21302   echo $ECHO_N "(cached) $ECHO_C" >&6
21303 else
21304   cat >conftest.$ac_ext <<_ACEOF
21305 /* confdefs.h.  */
21306 _ACEOF
21307 cat confdefs.h >>conftest.$ac_ext
21308 cat >>conftest.$ac_ext <<_ACEOF
21309 /* end confdefs.h.  */
21310 #include <signal.h>
21311
21312 int
21313 main ()
21314 {
21315 struct sigaction act, oact;
21316 sigemptyset(&act.sa_mask);
21317 act.sa_flags = SA_RESTART;
21318 sigaction(0, &act, &oact);
21319   ;
21320   return 0;
21321 }
21322 _ACEOF
21323 rm -f conftest.$ac_objext conftest$ac_exeext
21324 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21325   (eval $ac_link) 2>conftest.er1
21326   ac_status=$?
21327   grep -v '^ *+' conftest.er1 >conftest.err
21328   rm -f conftest.er1
21329   cat conftest.err >&5
21330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21331   (exit $ac_status); } &&
21332          { ac_try='test -z "$ac_c_werror_flag"
21333                          || test ! -s conftest.err'
21334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21335   (eval $ac_try) 2>&5
21336   ac_status=$?
21337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21338   (exit $ac_status); }; } &&
21339          { ac_try='test -s conftest$ac_exeext'
21340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21341   (eval $ac_try) 2>&5
21342   ac_status=$?
21343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21344   (exit $ac_status); }; }; then
21345   pgac_cv_func_posix_signals=yes
21346 else
21347   echo "$as_me: failed program was:" >&5
21348 sed 's/^/| /' conftest.$ac_ext >&5
21349
21350 pgac_cv_func_posix_signals=no
21351 fi
21352 rm -f conftest.err conftest.$ac_objext \
21353       conftest$ac_exeext conftest.$ac_ext
21354 fi
21355 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21356 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21357 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21358
21359 cat >>confdefs.h <<\_ACEOF
21360 #define HAVE_POSIX_SIGNALS
21361 _ACEOF
21362
21363 fi
21364 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21365
21366 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21367   { { echo "$as_me:$LINENO: error:
21368 Thread-safety requires POSIX signals, which are not supported by this
21369 operating system." >&5
21370 echo "$as_me: error:
21371 Thread-safety requires POSIX signals, which are not supported by this
21372 operating system." >&2;}
21373    { (exit 1); exit 1; }; }
21374 fi
21375 fi
21376
21377 if test $ac_cv_func_fseeko = yes; then
21378 # Check whether --enable-largefile or --disable-largefile was given.
21379 if test "${enable_largefile+set}" = set; then
21380   enableval="$enable_largefile"
21381
21382 fi;
21383 if test "$enable_largefile" != no; then
21384
21385   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21386 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21387 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21388   echo $ECHO_N "(cached) $ECHO_C" >&6
21389 else
21390   ac_cv_sys_largefile_CC=no
21391      if test "$GCC" != yes; then
21392        ac_save_CC=$CC
21393        while :; do
21394          # IRIX 6.2 and later do not support large files by default,
21395          # so use the C compiler's -n32 option if that helps.
21396          cat >conftest.$ac_ext <<_ACEOF
21397 /* confdefs.h.  */
21398 _ACEOF
21399 cat confdefs.h >>conftest.$ac_ext
21400 cat >>conftest.$ac_ext <<_ACEOF
21401 /* end confdefs.h.  */
21402 #include <sys/types.h>
21403  /* Check that off_t can represent 2**63 - 1 correctly.
21404     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21405     since some C++ compilers masquerading as C compilers
21406     incorrectly reject 9223372036854775807.  */
21407 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21408   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21409                        && LARGE_OFF_T % 2147483647 == 1)
21410                       ? 1 : -1];
21411 int
21412 main ()
21413 {
21414
21415   ;
21416   return 0;
21417 }
21418 _ACEOF
21419          rm -f conftest.$ac_objext
21420 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21421   (eval $ac_compile) 2>conftest.er1
21422   ac_status=$?
21423   grep -v '^ *+' conftest.er1 >conftest.err
21424   rm -f conftest.er1
21425   cat conftest.err >&5
21426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21427   (exit $ac_status); } &&
21428          { ac_try='test -z "$ac_c_werror_flag"
21429                          || test ! -s conftest.err'
21430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21431   (eval $ac_try) 2>&5
21432   ac_status=$?
21433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21434   (exit $ac_status); }; } &&
21435          { ac_try='test -s conftest.$ac_objext'
21436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21437   (eval $ac_try) 2>&5
21438   ac_status=$?
21439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21440   (exit $ac_status); }; }; then
21441   break
21442 else
21443   echo "$as_me: failed program was:" >&5
21444 sed 's/^/| /' conftest.$ac_ext >&5
21445
21446 fi
21447 rm -f conftest.err conftest.$ac_objext
21448          CC="$CC -n32"
21449          rm -f conftest.$ac_objext
21450 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21451   (eval $ac_compile) 2>conftest.er1
21452   ac_status=$?
21453   grep -v '^ *+' conftest.er1 >conftest.err
21454   rm -f conftest.er1
21455   cat conftest.err >&5
21456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21457   (exit $ac_status); } &&
21458          { ac_try='test -z "$ac_c_werror_flag"
21459                          || test ! -s conftest.err'
21460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21461   (eval $ac_try) 2>&5
21462   ac_status=$?
21463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21464   (exit $ac_status); }; } &&
21465          { ac_try='test -s conftest.$ac_objext'
21466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21467   (eval $ac_try) 2>&5
21468   ac_status=$?
21469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21470   (exit $ac_status); }; }; then
21471   ac_cv_sys_largefile_CC=' -n32'; break
21472 else
21473   echo "$as_me: failed program was:" >&5
21474 sed 's/^/| /' conftest.$ac_ext >&5
21475
21476 fi
21477 rm -f conftest.err conftest.$ac_objext
21478          break
21479        done
21480        CC=$ac_save_CC
21481        rm -f conftest.$ac_ext
21482     fi
21483 fi
21484 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21485 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21486   if test "$ac_cv_sys_largefile_CC" != no; then
21487     CC=$CC$ac_cv_sys_largefile_CC
21488   fi
21489
21490   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21491 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21492 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21493   echo $ECHO_N "(cached) $ECHO_C" >&6
21494 else
21495   while :; do
21496   ac_cv_sys_file_offset_bits=no
21497   cat >conftest.$ac_ext <<_ACEOF
21498 /* confdefs.h.  */
21499 _ACEOF
21500 cat confdefs.h >>conftest.$ac_ext
21501 cat >>conftest.$ac_ext <<_ACEOF
21502 /* end confdefs.h.  */
21503 #include <sys/types.h>
21504  /* Check that off_t can represent 2**63 - 1 correctly.
21505     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21506     since some C++ compilers masquerading as C compilers
21507     incorrectly reject 9223372036854775807.  */
21508 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21509   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21510                        && LARGE_OFF_T % 2147483647 == 1)
21511                       ? 1 : -1];
21512 int
21513 main ()
21514 {
21515
21516   ;
21517   return 0;
21518 }
21519 _ACEOF
21520 rm -f conftest.$ac_objext
21521 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21522   (eval $ac_compile) 2>conftest.er1
21523   ac_status=$?
21524   grep -v '^ *+' conftest.er1 >conftest.err
21525   rm -f conftest.er1
21526   cat conftest.err >&5
21527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21528   (exit $ac_status); } &&
21529          { ac_try='test -z "$ac_c_werror_flag"
21530                          || test ! -s conftest.err'
21531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21532   (eval $ac_try) 2>&5
21533   ac_status=$?
21534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21535   (exit $ac_status); }; } &&
21536          { ac_try='test -s conftest.$ac_objext'
21537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21538   (eval $ac_try) 2>&5
21539   ac_status=$?
21540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21541   (exit $ac_status); }; }; then
21542   break
21543 else
21544   echo "$as_me: failed program was:" >&5
21545 sed 's/^/| /' conftest.$ac_ext >&5
21546
21547 fi
21548 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21549   cat >conftest.$ac_ext <<_ACEOF
21550 /* confdefs.h.  */
21551 _ACEOF
21552 cat confdefs.h >>conftest.$ac_ext
21553 cat >>conftest.$ac_ext <<_ACEOF
21554 /* end confdefs.h.  */
21555 #define _FILE_OFFSET_BITS 64
21556 #include <sys/types.h>
21557  /* Check that off_t can represent 2**63 - 1 correctly.
21558     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21559     since some C++ compilers masquerading as C compilers
21560     incorrectly reject 9223372036854775807.  */
21561 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21562   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21563                        && LARGE_OFF_T % 2147483647 == 1)
21564                       ? 1 : -1];
21565 int
21566 main ()
21567 {
21568
21569   ;
21570   return 0;
21571 }
21572 _ACEOF
21573 rm -f conftest.$ac_objext
21574 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21575   (eval $ac_compile) 2>conftest.er1
21576   ac_status=$?
21577   grep -v '^ *+' conftest.er1 >conftest.err
21578   rm -f conftest.er1
21579   cat conftest.err >&5
21580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21581   (exit $ac_status); } &&
21582          { ac_try='test -z "$ac_c_werror_flag"
21583                          || test ! -s conftest.err'
21584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21585   (eval $ac_try) 2>&5
21586   ac_status=$?
21587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21588   (exit $ac_status); }; } &&
21589          { ac_try='test -s conftest.$ac_objext'
21590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21591   (eval $ac_try) 2>&5
21592   ac_status=$?
21593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21594   (exit $ac_status); }; }; then
21595   ac_cv_sys_file_offset_bits=64; break
21596 else
21597   echo "$as_me: failed program was:" >&5
21598 sed 's/^/| /' conftest.$ac_ext >&5
21599
21600 fi
21601 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21602   break
21603 done
21604 fi
21605 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21606 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21607 if test "$ac_cv_sys_file_offset_bits" != no; then
21608
21609 cat >>confdefs.h <<_ACEOF
21610 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21611 _ACEOF
21612
21613 fi
21614 rm -f conftest*
21615   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21616 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21617 if test "${ac_cv_sys_large_files+set}" = set; then
21618   echo $ECHO_N "(cached) $ECHO_C" >&6
21619 else
21620   while :; do
21621   ac_cv_sys_large_files=no
21622   cat >conftest.$ac_ext <<_ACEOF
21623 /* confdefs.h.  */
21624 _ACEOF
21625 cat confdefs.h >>conftest.$ac_ext
21626 cat >>conftest.$ac_ext <<_ACEOF
21627 /* end confdefs.h.  */
21628 #include <sys/types.h>
21629  /* Check that off_t can represent 2**63 - 1 correctly.
21630     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21631     since some C++ compilers masquerading as C compilers
21632     incorrectly reject 9223372036854775807.  */
21633 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21634   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21635                        && LARGE_OFF_T % 2147483647 == 1)
21636                       ? 1 : -1];
21637 int
21638 main ()
21639 {
21640
21641   ;
21642   return 0;
21643 }
21644 _ACEOF
21645 rm -f conftest.$ac_objext
21646 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21647   (eval $ac_compile) 2>conftest.er1
21648   ac_status=$?
21649   grep -v '^ *+' conftest.er1 >conftest.err
21650   rm -f conftest.er1
21651   cat conftest.err >&5
21652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21653   (exit $ac_status); } &&
21654          { ac_try='test -z "$ac_c_werror_flag"
21655                          || test ! -s conftest.err'
21656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21657   (eval $ac_try) 2>&5
21658   ac_status=$?
21659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21660   (exit $ac_status); }; } &&
21661          { ac_try='test -s conftest.$ac_objext'
21662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21663   (eval $ac_try) 2>&5
21664   ac_status=$?
21665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21666   (exit $ac_status); }; }; then
21667   break
21668 else
21669   echo "$as_me: failed program was:" >&5
21670 sed 's/^/| /' conftest.$ac_ext >&5
21671
21672 fi
21673 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21674   cat >conftest.$ac_ext <<_ACEOF
21675 /* confdefs.h.  */
21676 _ACEOF
21677 cat confdefs.h >>conftest.$ac_ext
21678 cat >>conftest.$ac_ext <<_ACEOF
21679 /* end confdefs.h.  */
21680 #define _LARGE_FILES 1
21681 #include <sys/types.h>
21682  /* Check that off_t can represent 2**63 - 1 correctly.
21683     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21684     since some C++ compilers masquerading as C compilers
21685     incorrectly reject 9223372036854775807.  */
21686 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21687   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21688                        && LARGE_OFF_T % 2147483647 == 1)
21689                       ? 1 : -1];
21690 int
21691 main ()
21692 {
21693
21694   ;
21695   return 0;
21696 }
21697 _ACEOF
21698 rm -f conftest.$ac_objext
21699 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21700   (eval $ac_compile) 2>conftest.er1
21701   ac_status=$?
21702   grep -v '^ *+' conftest.er1 >conftest.err
21703   rm -f conftest.er1
21704   cat conftest.err >&5
21705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21706   (exit $ac_status); } &&
21707          { ac_try='test -z "$ac_c_werror_flag"
21708                          || test ! -s conftest.err'
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); }; } &&
21714          { ac_try='test -s conftest.$ac_objext'
21715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21716   (eval $ac_try) 2>&5
21717   ac_status=$?
21718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21719   (exit $ac_status); }; }; then
21720   ac_cv_sys_large_files=1; break
21721 else
21722   echo "$as_me: failed program was:" >&5
21723 sed 's/^/| /' conftest.$ac_ext >&5
21724
21725 fi
21726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21727   break
21728 done
21729 fi
21730 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21731 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21732 if test "$ac_cv_sys_large_files" != no; then
21733
21734 cat >>confdefs.h <<_ACEOF
21735 #define _LARGE_FILES $ac_cv_sys_large_files
21736 _ACEOF
21737
21738 fi
21739 rm -f conftest*
21740 fi
21741
21742 fi
21743
21744 # SunOS doesn't handle negative byte comparisons properly with +/- return
21745 echo "$as_me:$LINENO: checking for working memcmp" >&5
21746 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21747 if test "${ac_cv_func_memcmp_working+set}" = set; then
21748   echo $ECHO_N "(cached) $ECHO_C" >&6
21749 else
21750   if test "$cross_compiling" = yes; then
21751   ac_cv_func_memcmp_working=no
21752 else
21753   cat >conftest.$ac_ext <<_ACEOF
21754 /* confdefs.h.  */
21755 _ACEOF
21756 cat confdefs.h >>conftest.$ac_ext
21757 cat >>conftest.$ac_ext <<_ACEOF
21758 /* end confdefs.h.  */
21759 $ac_includes_default
21760 int
21761 main ()
21762 {
21763
21764   /* Some versions of memcmp are not 8-bit clean.  */
21765   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21766   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21767     exit (1);
21768
21769   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21770      or more and with at least one buffer not starting on a 4-byte boundary.
21771      William Lewis provided this test program.   */
21772   {
21773     char foo[21];
21774     char bar[21];
21775     int i;
21776     for (i = 0; i < 4; i++)
21777       {
21778         char *a = foo + i;
21779         char *b = bar + i;
21780         strcpy (a, "--------01111111");
21781         strcpy (b, "--------10000000");
21782         if (memcmp (a, b, 16) >= 0)
21783           exit (1);
21784       }
21785     exit (0);
21786   }
21787
21788   ;
21789   return 0;
21790 }
21791 _ACEOF
21792 rm -f conftest$ac_exeext
21793 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21794   (eval $ac_link) 2>&5
21795   ac_status=$?
21796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21797   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21799   (eval $ac_try) 2>&5
21800   ac_status=$?
21801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21802   (exit $ac_status); }; }; then
21803   ac_cv_func_memcmp_working=yes
21804 else
21805   echo "$as_me: program exited with status $ac_status" >&5
21806 echo "$as_me: failed program was:" >&5
21807 sed 's/^/| /' conftest.$ac_ext >&5
21808
21809 ( exit $ac_status )
21810 ac_cv_func_memcmp_working=no
21811 fi
21812 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21813 fi
21814 fi
21815 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21816 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21817 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21818     "memcmp.$ac_objext"   | \
21819   *" memcmp.$ac_objext"   | \
21820     "memcmp.$ac_objext "* | \
21821   *" memcmp.$ac_objext "* ) ;;
21822   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21823 esac
21824
21825
21826
21827
21828 # Select semaphore implementation type.
21829 if test "$PORTNAME" != "win32"; then
21830   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21831
21832 cat >>confdefs.h <<\_ACEOF
21833 #define USE_NAMED_POSIX_SEMAPHORES 1
21834 _ACEOF
21835
21836     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21837   else
21838     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21839
21840 cat >>confdefs.h <<\_ACEOF
21841 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21842 _ACEOF
21843
21844       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21845     else
21846
21847 cat >>confdefs.h <<\_ACEOF
21848 #define USE_SYSV_SEMAPHORES 1
21849 _ACEOF
21850
21851       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21852     fi
21853   fi
21854 else
21855
21856 cat >>confdefs.h <<\_ACEOF
21857 #define USE_WIN32_SEMAPHORES 1
21858 _ACEOF
21859
21860   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
21861 fi
21862
21863
21864 # Select shared-memory implementation type.
21865
21866 cat >>confdefs.h <<\_ACEOF
21867 #define USE_SYSV_SHARED_MEMORY 1
21868 _ACEOF
21869
21870 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21871
21872
21873 # If not set in template file, set bytes to use libc memset()
21874 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
21875   MEMSET_LOOP_LIMIT=1024
21876 fi
21877
21878 cat >>confdefs.h <<_ACEOF
21879 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
21880 _ACEOF
21881
21882
21883
21884 if test "$enable_nls" = yes ; then
21885
21886   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21887 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21888 if test "${ac_cv_search_gettext+set}" = set; then
21889   echo $ECHO_N "(cached) $ECHO_C" >&6
21890 else
21891   ac_func_search_save_LIBS=$LIBS
21892 ac_cv_search_gettext=no
21893 cat >conftest.$ac_ext <<_ACEOF
21894 /* confdefs.h.  */
21895 _ACEOF
21896 cat confdefs.h >>conftest.$ac_ext
21897 cat >>conftest.$ac_ext <<_ACEOF
21898 /* end confdefs.h.  */
21899
21900 /* Override any gcc2 internal prototype to avoid an error.  */
21901 #ifdef __cplusplus
21902 extern "C"
21903 #endif
21904 /* We use char because int might match the return type of a gcc2
21905    builtin and then its argument prototype would still apply.  */
21906 char gettext ();
21907 int
21908 main ()
21909 {
21910 gettext ();
21911   ;
21912   return 0;
21913 }
21914 _ACEOF
21915 rm -f conftest.$ac_objext conftest$ac_exeext
21916 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21917   (eval $ac_link) 2>conftest.er1
21918   ac_status=$?
21919   grep -v '^ *+' conftest.er1 >conftest.err
21920   rm -f conftest.er1
21921   cat conftest.err >&5
21922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21923   (exit $ac_status); } &&
21924          { ac_try='test -z "$ac_c_werror_flag"
21925                          || test ! -s conftest.err'
21926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21927   (eval $ac_try) 2>&5
21928   ac_status=$?
21929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21930   (exit $ac_status); }; } &&
21931          { ac_try='test -s conftest$ac_exeext'
21932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21933   (eval $ac_try) 2>&5
21934   ac_status=$?
21935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21936   (exit $ac_status); }; }; then
21937   ac_cv_search_gettext="none required"
21938 else
21939   echo "$as_me: failed program was:" >&5
21940 sed 's/^/| /' conftest.$ac_ext >&5
21941
21942 fi
21943 rm -f conftest.err conftest.$ac_objext \
21944       conftest$ac_exeext conftest.$ac_ext
21945 if test "$ac_cv_search_gettext" = no; then
21946   for ac_lib in intl; do
21947     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21948     cat >conftest.$ac_ext <<_ACEOF
21949 /* confdefs.h.  */
21950 _ACEOF
21951 cat confdefs.h >>conftest.$ac_ext
21952 cat >>conftest.$ac_ext <<_ACEOF
21953 /* end confdefs.h.  */
21954
21955 /* Override any gcc2 internal prototype to avoid an error.  */
21956 #ifdef __cplusplus
21957 extern "C"
21958 #endif
21959 /* We use char because int might match the return type of a gcc2
21960    builtin and then its argument prototype would still apply.  */
21961 char gettext ();
21962 int
21963 main ()
21964 {
21965 gettext ();
21966   ;
21967   return 0;
21968 }
21969 _ACEOF
21970 rm -f conftest.$ac_objext conftest$ac_exeext
21971 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21972   (eval $ac_link) 2>conftest.er1
21973   ac_status=$?
21974   grep -v '^ *+' conftest.er1 >conftest.err
21975   rm -f conftest.er1
21976   cat conftest.err >&5
21977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21978   (exit $ac_status); } &&
21979          { ac_try='test -z "$ac_c_werror_flag"
21980                          || test ! -s conftest.err'
21981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21982   (eval $ac_try) 2>&5
21983   ac_status=$?
21984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21985   (exit $ac_status); }; } &&
21986          { ac_try='test -s conftest$ac_exeext'
21987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21988   (eval $ac_try) 2>&5
21989   ac_status=$?
21990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21991   (exit $ac_status); }; }; then
21992   ac_cv_search_gettext="-l$ac_lib"
21993 break
21994 else
21995   echo "$as_me: failed program was:" >&5
21996 sed 's/^/| /' conftest.$ac_ext >&5
21997
21998 fi
21999 rm -f conftest.err conftest.$ac_objext \
22000       conftest$ac_exeext conftest.$ac_ext
22001   done
22002 fi
22003 LIBS=$ac_func_search_save_LIBS
22004 fi
22005 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
22006 echo "${ECHO_T}$ac_cv_search_gettext" >&6
22007 if test "$ac_cv_search_gettext" != no; then
22008   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
22009
22010 else
22011   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
22012 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
22013    { (exit 1); exit 1; }; }
22014 fi
22015
22016   if test "${ac_cv_header_libintl_h+set}" = set; then
22017   echo "$as_me:$LINENO: checking for libintl.h" >&5
22018 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22019 if test "${ac_cv_header_libintl_h+set}" = set; then
22020   echo $ECHO_N "(cached) $ECHO_C" >&6
22021 fi
22022 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22023 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22024 else
22025   # Is the header compilable?
22026 echo "$as_me:$LINENO: checking libintl.h usability" >&5
22027 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
22028 cat >conftest.$ac_ext <<_ACEOF
22029 /* confdefs.h.  */
22030 _ACEOF
22031 cat confdefs.h >>conftest.$ac_ext
22032 cat >>conftest.$ac_ext <<_ACEOF
22033 /* end confdefs.h.  */
22034 $ac_includes_default
22035 #include <libintl.h>
22036 _ACEOF
22037 rm -f conftest.$ac_objext
22038 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22039   (eval $ac_compile) 2>conftest.er1
22040   ac_status=$?
22041   grep -v '^ *+' conftest.er1 >conftest.err
22042   rm -f conftest.er1
22043   cat conftest.err >&5
22044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22045   (exit $ac_status); } &&
22046          { ac_try='test -z "$ac_c_werror_flag"
22047                          || test ! -s conftest.err'
22048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22049   (eval $ac_try) 2>&5
22050   ac_status=$?
22051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22052   (exit $ac_status); }; } &&
22053          { ac_try='test -s conftest.$ac_objext'
22054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22055   (eval $ac_try) 2>&5
22056   ac_status=$?
22057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22058   (exit $ac_status); }; }; then
22059   ac_header_compiler=yes
22060 else
22061   echo "$as_me: failed program was:" >&5
22062 sed 's/^/| /' conftest.$ac_ext >&5
22063
22064 ac_header_compiler=no
22065 fi
22066 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22067 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22068 echo "${ECHO_T}$ac_header_compiler" >&6
22069
22070 # Is the header present?
22071 echo "$as_me:$LINENO: checking libintl.h presence" >&5
22072 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
22073 cat >conftest.$ac_ext <<_ACEOF
22074 /* confdefs.h.  */
22075 _ACEOF
22076 cat confdefs.h >>conftest.$ac_ext
22077 cat >>conftest.$ac_ext <<_ACEOF
22078 /* end confdefs.h.  */
22079 #include <libintl.h>
22080 _ACEOF
22081 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22082   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22083   ac_status=$?
22084   grep -v '^ *+' conftest.er1 >conftest.err
22085   rm -f conftest.er1
22086   cat conftest.err >&5
22087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22088   (exit $ac_status); } >/dev/null; then
22089   if test -s conftest.err; then
22090     ac_cpp_err=$ac_c_preproc_warn_flag
22091     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22092   else
22093     ac_cpp_err=
22094   fi
22095 else
22096   ac_cpp_err=yes
22097 fi
22098 if test -z "$ac_cpp_err"; then
22099   ac_header_preproc=yes
22100 else
22101   echo "$as_me: failed program was:" >&5
22102 sed 's/^/| /' conftest.$ac_ext >&5
22103
22104   ac_header_preproc=no
22105 fi
22106 rm -f conftest.err conftest.$ac_ext
22107 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22108 echo "${ECHO_T}$ac_header_preproc" >&6
22109
22110 # So?  What about this header?
22111 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22112   yes:no: )
22113     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22114 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22115     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
22116 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
22117     ac_header_preproc=yes
22118     ;;
22119   no:yes:* )
22120     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
22121 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
22122     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
22123 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
22124     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
22125 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
22126     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
22127 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22128     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
22129 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
22130     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
22131 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
22132     (
22133       cat <<\_ASBOX
22134 ## ---------------------------------------- ##
22135 ## Report this to pgsql-bugs@postgresql.org ##
22136 ## ---------------------------------------- ##
22137 _ASBOX
22138     ) |
22139       sed "s/^/$as_me: WARNING:     /" >&2
22140     ;;
22141 esac
22142 echo "$as_me:$LINENO: checking for libintl.h" >&5
22143 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22144 if test "${ac_cv_header_libintl_h+set}" = set; then
22145   echo $ECHO_N "(cached) $ECHO_C" >&6
22146 else
22147   ac_cv_header_libintl_h=$ac_header_preproc
22148 fi
22149 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22150 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22151
22152 fi
22153 if test $ac_cv_header_libintl_h = yes; then
22154   :
22155 else
22156   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
22157 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
22158    { (exit 1); exit 1; }; }
22159 fi
22160
22161
22162   for ac_prog in msgfmt
22163 do
22164   # Extract the first word of "$ac_prog", so it can be a program name with args.
22165 set dummy $ac_prog; ac_word=$2
22166 echo "$as_me:$LINENO: checking for $ac_word" >&5
22167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22168 if test "${ac_cv_prog_MSGFMT+set}" = set; then
22169   echo $ECHO_N "(cached) $ECHO_C" >&6
22170 else
22171   if test -n "$MSGFMT"; then
22172   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
22173 else
22174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22175 for as_dir in $PATH
22176 do
22177   IFS=$as_save_IFS
22178   test -z "$as_dir" && as_dir=.
22179   for ac_exec_ext in '' $ac_executable_extensions; do
22180   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22181     ac_cv_prog_MSGFMT="$ac_prog"
22182     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22183     break 2
22184   fi
22185 done
22186 done
22187
22188 fi
22189 fi
22190 MSGFMT=$ac_cv_prog_MSGFMT
22191 if test -n "$MSGFMT"; then
22192   echo "$as_me:$LINENO: result: $MSGFMT" >&5
22193 echo "${ECHO_T}$MSGFMT" >&6
22194 else
22195   echo "$as_me:$LINENO: result: no" >&5
22196 echo "${ECHO_T}no" >&6
22197 fi
22198
22199   test -n "$MSGFMT" && break
22200 done
22201
22202   if test -z "$MSGFMT"; then
22203     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
22204 echo "$as_me: error: msgfmt is required for NLS" >&2;}
22205    { (exit 1); exit 1; }; }
22206   fi
22207   for ac_prog in msgmerge
22208 do
22209   # Extract the first word of "$ac_prog", so it can be a program name with args.
22210 set dummy $ac_prog; ac_word=$2
22211 echo "$as_me:$LINENO: checking for $ac_word" >&5
22212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22213 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
22214   echo $ECHO_N "(cached) $ECHO_C" >&6
22215 else
22216   if test -n "$MSGMERGE"; then
22217   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
22218 else
22219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22220 for as_dir in $PATH
22221 do
22222   IFS=$as_save_IFS
22223   test -z "$as_dir" && as_dir=.
22224   for ac_exec_ext in '' $ac_executable_extensions; do
22225   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22226     ac_cv_prog_MSGMERGE="$ac_prog"
22227     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22228     break 2
22229   fi
22230 done
22231 done
22232
22233 fi
22234 fi
22235 MSGMERGE=$ac_cv_prog_MSGMERGE
22236 if test -n "$MSGMERGE"; then
22237   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
22238 echo "${ECHO_T}$MSGMERGE" >&6
22239 else
22240   echo "$as_me:$LINENO: result: no" >&5
22241 echo "${ECHO_T}no" >&6
22242 fi
22243
22244   test -n "$MSGMERGE" && break
22245 done
22246
22247   for ac_prog in xgettext
22248 do
22249   # Extract the first word of "$ac_prog", so it can be a program name with args.
22250 set dummy $ac_prog; ac_word=$2
22251 echo "$as_me:$LINENO: checking for $ac_word" >&5
22252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22253 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
22254   echo $ECHO_N "(cached) $ECHO_C" >&6
22255 else
22256   if test -n "$XGETTEXT"; then
22257   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
22258 else
22259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22260 for as_dir in $PATH
22261 do
22262   IFS=$as_save_IFS
22263   test -z "$as_dir" && as_dir=.
22264   for ac_exec_ext in '' $ac_executable_extensions; do
22265   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22266     ac_cv_prog_XGETTEXT="$ac_prog"
22267     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22268     break 2
22269   fi
22270 done
22271 done
22272
22273 fi
22274 fi
22275 XGETTEXT=$ac_cv_prog_XGETTEXT
22276 if test -n "$XGETTEXT"; then
22277   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
22278 echo "${ECHO_T}$XGETTEXT" >&6
22279 else
22280   echo "$as_me:$LINENO: result: no" >&5
22281 echo "${ECHO_T}no" >&6
22282 fi
22283
22284   test -n "$XGETTEXT" && break
22285 done
22286
22287
22288   # Note: share/locale is always the default, independent of $datadir
22289   localedir='${prefix}/share/locale'
22290
22291
22292 fi
22293
22294 # Check for Tcl configuration script tclConfig.sh
22295 if test "$with_tcl" = yes; then
22296     for ac_prog in tclsh tcl
22297 do
22298   # Extract the first word of "$ac_prog", so it can be a program name with args.
22299 set dummy $ac_prog; ac_word=$2
22300 echo "$as_me:$LINENO: checking for $ac_word" >&5
22301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22302 if test "${ac_cv_path_TCLSH+set}" = set; then
22303   echo $ECHO_N "(cached) $ECHO_C" >&6
22304 else
22305   case $TCLSH in
22306   [\\/]* | ?:[\\/]*)
22307   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22308   ;;
22309   *)
22310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22311 for as_dir in $PATH
22312 do
22313   IFS=$as_save_IFS
22314   test -z "$as_dir" && as_dir=.
22315   for ac_exec_ext in '' $ac_executable_extensions; do
22316   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22317     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22318     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22319     break 2
22320   fi
22321 done
22322 done
22323
22324   ;;
22325 esac
22326 fi
22327 TCLSH=$ac_cv_path_TCLSH
22328
22329 if test -n "$TCLSH"; then
22330   echo "$as_me:$LINENO: result: $TCLSH" >&5
22331 echo "${ECHO_T}$TCLSH" >&6
22332 else
22333   echo "$as_me:$LINENO: result: no" >&5
22334 echo "${ECHO_T}no" >&6
22335 fi
22336
22337   test -n "$TCLSH" && break
22338 done
22339
22340 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22341 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22342 # Let user override test
22343 if test -z "$TCL_CONFIG_SH"; then
22344     pgac_test_dirs="$with_tclconfig"
22345
22346     set X $pgac_test_dirs; shift
22347     if test $# -eq 0; then
22348         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22349 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22350    { (exit 1); exit 1; }; }
22351         set X `echo 'puts $auto_path' | $TCLSH`; shift
22352     fi
22353
22354     for pgac_dir do
22355         if test -r "$pgac_dir/tclConfig.sh"; then
22356             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22357             break
22358         fi
22359     done
22360 fi
22361
22362 if test -z "$TCL_CONFIG_SH"; then
22363     echo "$as_me:$LINENO: result: no" >&5
22364 echo "${ECHO_T}no" >&6
22365     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22366 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22367    { (exit 1); exit 1; }; }
22368 else
22369     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22370 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22371 fi
22372
22373
22374
22375     . "$TCL_CONFIG_SH"
22376 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22377 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22378 eval TCL_LIBS=\"$TCL_LIBS\"
22379 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22380 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22381
22382         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22383     ac_save_CPPFLAGS=$CPPFLAGS
22384     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22385     if test "${ac_cv_header_tcl_h+set}" = set; then
22386   echo "$as_me:$LINENO: checking for tcl.h" >&5
22387 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22388 if test "${ac_cv_header_tcl_h+set}" = set; then
22389   echo $ECHO_N "(cached) $ECHO_C" >&6
22390 fi
22391 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22392 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22393 else
22394   # Is the header compilable?
22395 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22396 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22397 cat >conftest.$ac_ext <<_ACEOF
22398 /* confdefs.h.  */
22399 _ACEOF
22400 cat confdefs.h >>conftest.$ac_ext
22401 cat >>conftest.$ac_ext <<_ACEOF
22402 /* end confdefs.h.  */
22403 $ac_includes_default
22404 #include <tcl.h>
22405 _ACEOF
22406 rm -f conftest.$ac_objext
22407 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22408   (eval $ac_compile) 2>conftest.er1
22409   ac_status=$?
22410   grep -v '^ *+' conftest.er1 >conftest.err
22411   rm -f conftest.er1
22412   cat conftest.err >&5
22413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22414   (exit $ac_status); } &&
22415          { ac_try='test -z "$ac_c_werror_flag"
22416                          || test ! -s conftest.err'
22417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22418   (eval $ac_try) 2>&5
22419   ac_status=$?
22420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22421   (exit $ac_status); }; } &&
22422          { ac_try='test -s conftest.$ac_objext'
22423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22424   (eval $ac_try) 2>&5
22425   ac_status=$?
22426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22427   (exit $ac_status); }; }; then
22428   ac_header_compiler=yes
22429 else
22430   echo "$as_me: failed program was:" >&5
22431 sed 's/^/| /' conftest.$ac_ext >&5
22432
22433 ac_header_compiler=no
22434 fi
22435 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22436 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22437 echo "${ECHO_T}$ac_header_compiler" >&6
22438
22439 # Is the header present?
22440 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22441 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22442 cat >conftest.$ac_ext <<_ACEOF
22443 /* confdefs.h.  */
22444 _ACEOF
22445 cat confdefs.h >>conftest.$ac_ext
22446 cat >>conftest.$ac_ext <<_ACEOF
22447 /* end confdefs.h.  */
22448 #include <tcl.h>
22449 _ACEOF
22450 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22451   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22452   ac_status=$?
22453   grep -v '^ *+' conftest.er1 >conftest.err
22454   rm -f conftest.er1
22455   cat conftest.err >&5
22456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22457   (exit $ac_status); } >/dev/null; then
22458   if test -s conftest.err; then
22459     ac_cpp_err=$ac_c_preproc_warn_flag
22460     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22461   else
22462     ac_cpp_err=
22463   fi
22464 else
22465   ac_cpp_err=yes
22466 fi
22467 if test -z "$ac_cpp_err"; then
22468   ac_header_preproc=yes
22469 else
22470   echo "$as_me: failed program was:" >&5
22471 sed 's/^/| /' conftest.$ac_ext >&5
22472
22473   ac_header_preproc=no
22474 fi
22475 rm -f conftest.err conftest.$ac_ext
22476 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22477 echo "${ECHO_T}$ac_header_preproc" >&6
22478
22479 # So?  What about this header?
22480 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22481   yes:no: )
22482     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22483 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22484     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22485 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22486     ac_header_preproc=yes
22487     ;;
22488   no:yes:* )
22489     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22490 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22491     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22492 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22493     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22494 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22495     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22496 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22497     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22498 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22499     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22500 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22501     (
22502       cat <<\_ASBOX
22503 ## ---------------------------------------- ##
22504 ## Report this to pgsql-bugs@postgresql.org ##
22505 ## ---------------------------------------- ##
22506 _ASBOX
22507     ) |
22508       sed "s/^/$as_me: WARNING:     /" >&2
22509     ;;
22510 esac
22511 echo "$as_me:$LINENO: checking for tcl.h" >&5
22512 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22513 if test "${ac_cv_header_tcl_h+set}" = set; then
22514   echo $ECHO_N "(cached) $ECHO_C" >&6
22515 else
22516   ac_cv_header_tcl_h=$ac_header_preproc
22517 fi
22518 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22519 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22520
22521 fi
22522 if test $ac_cv_header_tcl_h = yes; then
22523   :
22524 else
22525   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22526 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22527    { (exit 1); exit 1; }; }
22528 fi
22529
22530
22531     CPPFLAGS=$ac_save_CPPFLAGS
22532 fi
22533
22534 #
22535 # Check for DocBook and tools
22536 #
22537 for ac_prog in onsgmls nsgmls
22538 do
22539   # Extract the first word of "$ac_prog", so it can be a program name with args.
22540 set dummy $ac_prog; ac_word=$2
22541 echo "$as_me:$LINENO: checking for $ac_word" >&5
22542 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22543 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22544   echo $ECHO_N "(cached) $ECHO_C" >&6
22545 else
22546   if test -n "$NSGMLS"; then
22547   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22548 else
22549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22550 for as_dir in $PATH
22551 do
22552   IFS=$as_save_IFS
22553   test -z "$as_dir" && as_dir=.
22554   for ac_exec_ext in '' $ac_executable_extensions; do
22555   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22556     ac_cv_prog_NSGMLS="$ac_prog"
22557     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22558     break 2
22559   fi
22560 done
22561 done
22562
22563 fi
22564 fi
22565 NSGMLS=$ac_cv_prog_NSGMLS
22566 if test -n "$NSGMLS"; then
22567   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22568 echo "${ECHO_T}$NSGMLS" >&6
22569 else
22570   echo "$as_me:$LINENO: result: no" >&5
22571 echo "${ECHO_T}no" >&6
22572 fi
22573
22574   test -n "$NSGMLS" && break
22575 done
22576
22577 for ac_prog in openjade jade
22578 do
22579   # Extract the first word of "$ac_prog", so it can be a program name with args.
22580 set dummy $ac_prog; ac_word=$2
22581 echo "$as_me:$LINENO: checking for $ac_word" >&5
22582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22583 if test "${ac_cv_prog_JADE+set}" = set; then
22584   echo $ECHO_N "(cached) $ECHO_C" >&6
22585 else
22586   if test -n "$JADE"; then
22587   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22588 else
22589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22590 for as_dir in $PATH
22591 do
22592   IFS=$as_save_IFS
22593   test -z "$as_dir" && as_dir=.
22594   for ac_exec_ext in '' $ac_executable_extensions; do
22595   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22596     ac_cv_prog_JADE="$ac_prog"
22597     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22598     break 2
22599   fi
22600 done
22601 done
22602
22603 fi
22604 fi
22605 JADE=$ac_cv_prog_JADE
22606 if test -n "$JADE"; then
22607   echo "$as_me:$LINENO: result: $JADE" >&5
22608 echo "${ECHO_T}$JADE" >&6
22609 else
22610   echo "$as_me:$LINENO: result: no" >&5
22611 echo "${ECHO_T}no" >&6
22612 fi
22613
22614   test -n "$JADE" && break
22615 done
22616
22617
22618 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22619 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22620 if test "${pgac_cv_check_docbook+set}" = set; then
22621   echo $ECHO_N "(cached) $ECHO_C" >&6
22622 else
22623   cat >conftest.sgml <<EOF
22624 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22625 <book>
22626  <title>test</title>
22627  <chapter>
22628   <title>random</title>
22629    <sect1>
22630     <title>testsect</title>
22631     <para>text</para>
22632   </sect1>
22633  </chapter>
22634 </book>
22635 EOF
22636
22637 pgac_cv_check_docbook=no
22638
22639 if test -n "$NSGMLS"; then
22640   $NSGMLS -s conftest.sgml 1>&5 2>&1
22641   if test $? -eq 0; then
22642     pgac_cv_check_docbook=yes
22643   fi
22644 fi
22645 rm -f conftest.sgml
22646 fi
22647 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22648 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22649
22650 have_docbook=$pgac_cv_check_docbook
22651
22652
22653 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22654 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22655 if test "${pgac_cv_path_stylesheets+set}" = set; then
22656   echo $ECHO_N "(cached) $ECHO_C" >&6
22657 else
22658   if test -n "$DOCBOOKSTYLE"; then
22659   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22660 else
22661   for pgac_prefix in /usr /usr/local /opt; do
22662     for pgac_infix in share lib; do
22663       for pgac_postfix in \
22664         sgml/stylesheets/nwalsh-modular \
22665         sgml/stylesheets/docbook \
22666                 sgml/docbook-dsssl \
22667         sgml/docbook/dsssl/modular \
22668         sgml/docbook/stylesheet/dsssl/modular \
22669         sgml/docbook/dsssl-stylesheets
22670       do
22671         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22672         if test -r "$pgac_candidate/html/docbook.dsl" \
22673            && test -r "$pgac_candidate/print/docbook.dsl"
22674         then
22675           pgac_cv_path_stylesheets=$pgac_candidate
22676           break 3
22677         fi
22678       done
22679     done
22680   done
22681 fi
22682 fi
22683
22684 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22685
22686 if test -n "$DOCBOOKSTYLE"; then
22687   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22688 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22689 else
22690   echo "$as_me:$LINENO: result: no" >&5
22691 echo "${ECHO_T}no" >&6
22692 fi
22693 if test -n "$DOCBOOKSTYLE"; then
22694   for ac_prog in collateindex.pl
22695 do
22696   # Extract the first word of "$ac_prog", so it can be a program name with args.
22697 set dummy $ac_prog; ac_word=$2
22698 echo "$as_me:$LINENO: checking for $ac_word" >&5
22699 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22700 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22701   echo $ECHO_N "(cached) $ECHO_C" >&6
22702 else
22703   case $COLLATEINDEX in
22704   [\\/]* | ?:[\\/]*)
22705   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22706   ;;
22707   *)
22708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22709 for as_dir in $DOCBOOKSTYLE/bin $PATH
22710 do
22711   IFS=$as_save_IFS
22712   test -z "$as_dir" && as_dir=.
22713   for ac_exec_ext in '' $ac_executable_extensions; do
22714   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22715     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22716     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22717     break 2
22718   fi
22719 done
22720 done
22721
22722   ;;
22723 esac
22724 fi
22725 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22726
22727 if test -n "$COLLATEINDEX"; then
22728   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22729 echo "${ECHO_T}$COLLATEINDEX" >&6
22730 else
22731   echo "$as_me:$LINENO: result: no" >&5
22732 echo "${ECHO_T}no" >&6
22733 fi
22734
22735   test -n "$COLLATEINDEX" && break
22736 done
22737
22738 else
22739   for ac_prog in collateindex.pl
22740 do
22741   # Extract the first word of "$ac_prog", so it can be a program name with args.
22742 set dummy $ac_prog; ac_word=$2
22743 echo "$as_me:$LINENO: checking for $ac_word" >&5
22744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22745 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22746   echo $ECHO_N "(cached) $ECHO_C" >&6
22747 else
22748   case $COLLATEINDEX in
22749   [\\/]* | ?:[\\/]*)
22750   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22751   ;;
22752   *)
22753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22754 for as_dir in $PATH
22755 do
22756   IFS=$as_save_IFS
22757   test -z "$as_dir" && as_dir=.
22758   for ac_exec_ext in '' $ac_executable_extensions; do
22759   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22760     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22761     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22762     break 2
22763   fi
22764 done
22765 done
22766
22767   ;;
22768 esac
22769 fi
22770 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22771
22772 if test -n "$COLLATEINDEX"; then
22773   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22774 echo "${ECHO_T}$COLLATEINDEX" >&6
22775 else
22776   echo "$as_me:$LINENO: result: no" >&5
22777 echo "${ECHO_T}no" >&6
22778 fi
22779
22780   test -n "$COLLATEINDEX" && break
22781 done
22782
22783 fi
22784 for ac_prog in sgmlspl
22785 do
22786   # Extract the first word of "$ac_prog", so it can be a program name with args.
22787 set dummy $ac_prog; ac_word=$2
22788 echo "$as_me:$LINENO: checking for $ac_word" >&5
22789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22790 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22791   echo $ECHO_N "(cached) $ECHO_C" >&6
22792 else
22793   if test -n "$SGMLSPL"; then
22794   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22795 else
22796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22797 for as_dir in $PATH
22798 do
22799   IFS=$as_save_IFS
22800   test -z "$as_dir" && as_dir=.
22801   for ac_exec_ext in '' $ac_executable_extensions; do
22802   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22803     ac_cv_prog_SGMLSPL="$ac_prog"
22804     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22805     break 2
22806   fi
22807 done
22808 done
22809
22810 fi
22811 fi
22812 SGMLSPL=$ac_cv_prog_SGMLSPL
22813 if test -n "$SGMLSPL"; then
22814   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22815 echo "${ECHO_T}$SGMLSPL" >&6
22816 else
22817   echo "$as_me:$LINENO: result: no" >&5
22818 echo "${ECHO_T}no" >&6
22819 fi
22820
22821   test -n "$SGMLSPL" && break
22822 done
22823
22824
22825 # Thread testing
22826
22827 # We have to run the thread test near the end so we have all our symbols
22828 # defined.  Cross compiling throws a warning.
22829 #
22830 if test "$enable_thread_safety_force" = yes; then
22831 if test x"$template" != x"win32"
22832 then
22833   { echo "$as_me:$LINENO: WARNING:
22834 *** Skipping thread test program.  --enable-thread-safety-force was used.
22835 *** Run the program in src/test/thread on the your machine and add proper
22836 *** locking function calls to your applications to guarantee thread safety.
22837 " >&5
22838 echo "$as_me: WARNING:
22839 *** Skipping thread test program.  --enable-thread-safety-force was used.
22840 *** Run the program in src/test/thread on the your machine and add proper
22841 *** locking function calls to your applications to guarantee thread safety.
22842 " >&2;}
22843 else
22844 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
22845 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
22846 fi
22847 elif test "$enable_thread_safety" = yes; then
22848 if test x"$template" != x"win32"
22849 then
22850 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22851 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22852
22853 _CFLAGS="$CFLAGS"
22854 _LIBS="$LIBS"
22855 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22856 LIBS="$LIBS $PTHREAD_LIBS"
22857 if test "$cross_compiling" = yes; then
22858   echo "$as_me:$LINENO: result: maybe" >&5
22859 echo "${ECHO_T}maybe" >&6
22860   { echo "$as_me:$LINENO: WARNING:
22861 *** Skipping thread test program because of cross-compile build.
22862 *** Run the program in src/test/thread on the target machine.
22863 " >&5
22864 echo "$as_me: WARNING:
22865 *** Skipping thread test program because of cross-compile build.
22866 *** Run the program in src/test/thread on the target machine.
22867 " >&2;}
22868 else
22869   cat >conftest.$ac_ext <<_ACEOF
22870 /* confdefs.h.  */
22871 _ACEOF
22872 cat confdefs.h >>conftest.$ac_ext
22873 cat >>conftest.$ac_ext <<_ACEOF
22874 /* end confdefs.h.  */
22875 #include "$srcdir/src/test/thread/thread_test.c"
22876 _ACEOF
22877 rm -f conftest$ac_exeext
22878 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22879   (eval $ac_link) 2>&5
22880   ac_status=$?
22881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22882   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22884   (eval $ac_try) 2>&5
22885   ac_status=$?
22886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22887   (exit $ac_status); }; }; then
22888   echo "$as_me:$LINENO: result: yes" >&5
22889 echo "${ECHO_T}yes" >&6
22890 else
22891   echo "$as_me: program exited with status $ac_status" >&5
22892 echo "$as_me: failed program was:" >&5
22893 sed 's/^/| /' conftest.$ac_ext >&5
22894
22895 ( exit $ac_status )
22896 echo "$as_me:$LINENO: result: no" >&5
22897 echo "${ECHO_T}no" >&6
22898   { { echo "$as_me:$LINENO: error: thread test program failed
22899 This platform is not thread-safe.  Check the file 'config.log'for the
22900 exact reason.
22901
22902 You can use the configure option --enable-thread-safety-force to force
22903 threads to be enabled.  But you must then run the program in
22904 src/test/thread and add locking function calls to your applications to
22905 guarantee thread safety." >&5
22906 echo "$as_me: error: thread test program failed
22907 This platform is not thread-safe.  Check the file 'config.log'for the
22908 exact reason.
22909
22910 You can use the configure option --enable-thread-safety-force to force
22911 threads to be enabled.  But you must then run the program in
22912 src/test/thread and add locking function calls to your applications to
22913 guarantee thread safety." >&2;}
22914    { (exit 1); exit 1; }; }
22915 fi
22916 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22917 fi
22918 CFLAGS="$_CFLAGS"
22919 LIBS="$_LIBS"
22920 else
22921 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
22922 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
22923 fi
22924 fi
22925
22926 # prepare build tree if outside source tree
22927 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22928 # Note 2: /bin/pwd might be better than shell's built-in at getting
22929 #         a symlink-free name.
22930 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22931   vpath_build=no
22932 else
22933   vpath_build=yes
22934   if test "$no_create" != yes; then
22935     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22936     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22937     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22938       || { { echo "$as_me:$LINENO: error: failed" >&5
22939 echo "$as_me: error: failed" >&2;}
22940    { (exit 1); exit 1; }; }
22941     echo "$as_me:$LINENO: result: done" >&5
22942 echo "${ECHO_T}done" >&6
22943   fi
22944 fi
22945
22946
22947
22948                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22949
22950
22951                                                             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}"
22952
22953
22954 if test "$PORTNAME" = "win32"; then
22955           ac_config_commands="$ac_config_commands check_win32_symlinks"
22956
22957 fi
22958
22959           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22960
22961
22962           ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
22963
22964
22965
22966 #
22967 # Warn about unknown options
22968 #
22969
22970
22971   for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
22972     case $pgac_var in
22973       with_template) ;;
22974 with_docdir) ;;
22975 with_includes) ;;
22976 with_libraries) ;;
22977 with_libs) ;;
22978 enable_integer_datetimes) ;;
22979 enable_nls) ;;
22980 with_pgport) ;;
22981 enable_shared) ;;
22982 enable_rpath) ;;
22983 enable_spinlocks) ;;
22984 enable_debug) ;;
22985 enable_dtrace) ;;
22986 with_CC) ;;
22987 enable_depend) ;;
22988 enable_cassert) ;;
22989 enable_thread_safety) ;;
22990 enable_thread_safety_force) ;;
22991 with_tcl) ;;
22992 with_tclconfig) ;;
22993 with_perl) ;;
22994 with_python) ;;
22995 with_krb5) ;;
22996 with_krb_srvnam) ;;
22997 with_pam) ;;
22998 with_ldap) ;;
22999 with_bonjour) ;;
23000 with_openssl) ;;
23001 with_readline) ;;
23002 with_libedit_preferred) ;;
23003 with_zlib) ;;
23004
23005       with_gnu_ld) ;;
23006     *)
23007       pgac_txt=`echo $pgac_var | tr '_' '-'`
23008       { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
23009 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
23010       ;;
23011     esac
23012   done
23013
23014
23015 cat >confcache <<\_ACEOF
23016 # This file is a shell script that caches the results of configure
23017 # tests run on this system so they can be shared between configure
23018 # scripts and configure runs, see configure's option --config-cache.
23019 # It is not useful on other systems.  If it contains results you don't
23020 # want to keep, you may remove or edit it.
23021 #
23022 # config.status only pays attention to the cache file if you give it
23023 # the --recheck option to rerun configure.
23024 #
23025 # `ac_cv_env_foo' variables (set or unset) will be overridden when
23026 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23027 # following values.
23028
23029 _ACEOF
23030
23031 # The following way of writing the cache mishandles newlines in values,
23032 # but we know of no workaround that is simple, portable, and efficient.
23033 # So, don't put newlines in cache variables' values.
23034 # Ultrix sh set writes to stderr and can't be redirected directly,
23035 # and sets the high bit in the cache file unless we assign to the vars.
23036 {
23037   (set) 2>&1 |
23038     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23039     *ac_space=\ *)
23040       # `set' does not quote correctly, so add quotes (double-quote
23041       # substitution turns \\\\ into \\, and sed turns \\ into \).
23042       sed -n \
23043         "s/'/'\\\\''/g;
23044           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23045       ;;
23046     *)
23047       # `set' quotes correctly as required by POSIX, so do not add quotes.
23048       sed -n \
23049         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23050       ;;
23051     esac;
23052 } |
23053   sed '
23054      t clear
23055      : clear
23056      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23057      t end
23058      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23059      : end' >>confcache
23060 if diff $cache_file confcache >/dev/null 2>&1; then :; else
23061   if test -w $cache_file; then
23062     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23063     cat confcache >$cache_file
23064   else
23065     echo "not updating unwritable cache $cache_file"
23066   fi
23067 fi
23068 rm -f confcache
23069
23070 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23071 # Let make expand exec_prefix.
23072 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23073
23074 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23075 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23076 # trailing colons and then remove the whole line if VPATH becomes empty
23077 # (actually we leave an empty line to preserve line numbers).
23078 if test "x$srcdir" = x.; then
23079   ac_vpsub='/^[  ]*VPATH[        ]*=/{
23080 s/:*\$(srcdir):*/:/;
23081 s/:*\${srcdir}:*/:/;
23082 s/:*@srcdir@:*/:/;
23083 s/^\([^=]*=[     ]*\):*/\1/;
23084 s/:*$//;
23085 s/^[^=]*=[       ]*$//;
23086 }'
23087 fi
23088
23089 DEFS=-DHAVE_CONFIG_H
23090
23091 ac_libobjs=
23092 ac_ltlibobjs=
23093 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23094   # 1. Remove the extension, and $U if already installed.
23095   ac_i=`echo "$ac_i" |
23096          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
23097   # 2. Add them.
23098   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23099   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23100 done
23101 LIBOBJS=$ac_libobjs
23102
23103 LTLIBOBJS=$ac_ltlibobjs
23104
23105
23106
23107 : ${CONFIG_STATUS=./config.status}
23108 ac_clean_files_save=$ac_clean_files
23109 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23110 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23111 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23112 cat >$CONFIG_STATUS <<_ACEOF
23113 #! $SHELL
23114 # Generated by $as_me.
23115 # Run this file to recreate the current configuration.
23116 # Compiler output produced by configure, useful for debugging
23117 # configure, is in config.log if it exists.
23118
23119 debug=false
23120 ac_cs_recheck=false
23121 ac_cs_silent=false
23122 SHELL=\${CONFIG_SHELL-$SHELL}
23123 _ACEOF
23124
23125 cat >>$CONFIG_STATUS <<\_ACEOF
23126 ## --------------------- ##
23127 ## M4sh Initialization.  ##
23128 ## --------------------- ##
23129
23130 # Be Bourne compatible
23131 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23132   emulate sh
23133   NULLCMD=:
23134   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23135   # is contrary to our usage.  Disable this feature.
23136   alias -g '${1+"$@"}'='"$@"'
23137 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23138   set -o posix
23139 fi
23140 DUALCASE=1; export DUALCASE # for MKS sh
23141
23142 # Support unset when possible.
23143 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23144   as_unset=unset
23145 else
23146   as_unset=false
23147 fi
23148
23149
23150 # Work around bugs in pre-3.0 UWIN ksh.
23151 $as_unset ENV MAIL MAILPATH
23152 PS1='$ '
23153 PS2='> '
23154 PS4='+ '
23155
23156 # NLS nuisances.
23157 for as_var in \
23158   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23159   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23160   LC_TELEPHONE LC_TIME
23161 do
23162   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23163     eval $as_var=C; export $as_var
23164   else
23165     $as_unset $as_var
23166   fi
23167 done
23168
23169 # Required to use basename.
23170 if expr a : '\(a\)' >/dev/null 2>&1; then
23171   as_expr=expr
23172 else
23173   as_expr=false
23174 fi
23175
23176 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23177   as_basename=basename
23178 else
23179   as_basename=false
23180 fi
23181
23182
23183 # Name of the executable.
23184 as_me=`$as_basename "$0" ||
23185 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23186          X"$0" : 'X\(//\)$' \| \
23187          X"$0" : 'X\(/\)$' \| \
23188          .     : '\(.\)' 2>/dev/null ||
23189 echo X/"$0" |
23190     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23191           /^X\/\(\/\/\)$/{ s//\1/; q; }
23192           /^X\/\(\/\).*/{ s//\1/; q; }
23193           s/.*/./; q'`
23194
23195
23196 # PATH needs CR, and LINENO needs CR and PATH.
23197 # Avoid depending upon Character Ranges.
23198 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23199 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23200 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23201 as_cr_digits='0123456789'
23202 as_cr_alnum=$as_cr_Letters$as_cr_digits
23203
23204 # The user is always right.
23205 if test "${PATH_SEPARATOR+set}" != set; then
23206   echo "#! /bin/sh" >conf$$.sh
23207   echo  "exit 0"   >>conf$$.sh
23208   chmod +x conf$$.sh
23209   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23210     PATH_SEPARATOR=';'
23211   else
23212     PATH_SEPARATOR=:
23213   fi
23214   rm -f conf$$.sh
23215 fi
23216
23217
23218   as_lineno_1=$LINENO
23219   as_lineno_2=$LINENO
23220   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23221   test "x$as_lineno_1" != "x$as_lineno_2" &&
23222   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
23223   # Find who we are.  Look in the path if we contain no path at all
23224   # relative or not.
23225   case $0 in
23226     *[\\/]* ) as_myself=$0 ;;
23227     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23228 for as_dir in $PATH
23229 do
23230   IFS=$as_save_IFS
23231   test -z "$as_dir" && as_dir=.
23232   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23233 done
23234
23235        ;;
23236   esac
23237   # We did not find ourselves, most probably we were run as `sh COMMAND'
23238   # in which case we are not to be found in the path.
23239   if test "x$as_myself" = x; then
23240     as_myself=$0
23241   fi
23242   if test ! -f "$as_myself"; then
23243     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23244 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23245    { (exit 1); exit 1; }; }
23246   fi
23247   case $CONFIG_SHELL in
23248   '')
23249     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23250 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23251 do
23252   IFS=$as_save_IFS
23253   test -z "$as_dir" && as_dir=.
23254   for as_base in sh bash ksh sh5; do
23255          case $as_dir in
23256          /*)
23257            if ("$as_dir/$as_base" -c '
23258   as_lineno_1=$LINENO
23259   as_lineno_2=$LINENO
23260   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23261   test "x$as_lineno_1" != "x$as_lineno_2" &&
23262   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
23263              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23264              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23265              CONFIG_SHELL=$as_dir/$as_base
23266              export CONFIG_SHELL
23267              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23268            fi;;
23269          esac
23270        done
23271 done
23272 ;;
23273   esac
23274
23275   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23276   # uniformly replaced by the line number.  The first 'sed' inserts a
23277   # line-number line before each line; the second 'sed' does the real
23278   # work.  The second script uses 'N' to pair each line-number line
23279   # with the numbered line, and appends trailing '-' during
23280   # substitution so that $LINENO is not a special case at line end.
23281   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23282   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23283   sed '=' <$as_myself |
23284     sed '
23285       N
23286       s,$,-,
23287       : loop
23288       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23289       t loop
23290       s,-$,,
23291       s,^['$as_cr_digits']*\n,,
23292     ' >$as_me.lineno &&
23293   chmod +x $as_me.lineno ||
23294     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23295 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23296    { (exit 1); exit 1; }; }
23297
23298   # Don't try to exec as it changes $[0], causing all sort of problems
23299   # (the dirname of $[0] is not the place where we might find the
23300   # original and so on.  Autoconf is especially sensible to this).
23301   . ./$as_me.lineno
23302   # Exit status is that of the last command.
23303   exit
23304 }
23305
23306
23307 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23308   *c*,-n*) ECHO_N= ECHO_C='
23309 ' ECHO_T='      ' ;;
23310   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23311   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23312 esac
23313
23314 if expr a : '\(a\)' >/dev/null 2>&1; then
23315   as_expr=expr
23316 else
23317   as_expr=false
23318 fi
23319
23320 rm -f conf$$ conf$$.exe conf$$.file
23321 echo >conf$$.file
23322 if ln -s conf$$.file conf$$ 2>/dev/null; then
23323   # We could just check for DJGPP; but this test a) works b) is more generic
23324   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23325   if test -f conf$$.exe; then
23326     # Don't use ln at all; we don't have any links
23327     as_ln_s='cp -p'
23328   else
23329     as_ln_s='ln -s'
23330   fi
23331 elif ln conf$$.file conf$$ 2>/dev/null; then
23332   as_ln_s=ln
23333 else
23334   as_ln_s='cp -p'
23335 fi
23336 rm -f conf$$ conf$$.exe conf$$.file
23337
23338 if mkdir -p . 2>/dev/null; then
23339   as_mkdir_p=:
23340 else
23341   test -d ./-p && rmdir ./-p
23342   as_mkdir_p=false
23343 fi
23344
23345 as_executable_p="test -f"
23346
23347 # Sed expression to map a string onto a valid CPP name.
23348 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23349
23350 # Sed expression to map a string onto a valid variable name.
23351 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23352
23353
23354 # IFS
23355 # We need space, tab and new line, in precisely that order.
23356 as_nl='
23357 '
23358 IFS="   $as_nl"
23359
23360 # CDPATH.
23361 $as_unset CDPATH
23362
23363 exec 6>&1
23364
23365 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23366 # report actual input values of CONFIG_FILES etc. instead of their
23367 # values after options handling.  Logging --version etc. is OK.
23368 exec 5>>config.log
23369 {
23370   echo
23371   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23372 ## Running $as_me. ##
23373 _ASBOX
23374 } >&5
23375 cat >&5 <<_CSEOF
23376
23377 This file was extended by PostgreSQL $as_me 8.2beta1, which was
23378 generated by GNU Autoconf 2.59.  Invocation command line was
23379
23380   CONFIG_FILES    = $CONFIG_FILES
23381   CONFIG_HEADERS  = $CONFIG_HEADERS
23382   CONFIG_LINKS    = $CONFIG_LINKS
23383   CONFIG_COMMANDS = $CONFIG_COMMANDS
23384   $ $0 $@
23385
23386 _CSEOF
23387 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23388 echo >&5
23389 _ACEOF
23390
23391 # Files that config.status was made for.
23392 if test -n "$ac_config_files"; then
23393   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23394 fi
23395
23396 if test -n "$ac_config_headers"; then
23397   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23398 fi
23399
23400 if test -n "$ac_config_links"; then
23401   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23402 fi
23403
23404 if test -n "$ac_config_commands"; then
23405   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23406 fi
23407
23408 cat >>$CONFIG_STATUS <<\_ACEOF
23409
23410 ac_cs_usage="\
23411 \`$as_me' instantiates files from templates according to the
23412 current configuration.
23413
23414 Usage: $0 [OPTIONS] [FILE]...
23415
23416   -h, --help       print this help, then exit
23417   -V, --version    print version number, then exit
23418   -q, --quiet      do not print progress messages
23419   -d, --debug      don't remove temporary files
23420       --recheck    update $as_me by reconfiguring in the same conditions
23421   --file=FILE[:TEMPLATE]
23422                    instantiate the configuration file FILE
23423   --header=FILE[:TEMPLATE]
23424                    instantiate the configuration header FILE
23425
23426 Configuration files:
23427 $config_files
23428
23429 Configuration headers:
23430 $config_headers
23431
23432 Configuration links:
23433 $config_links
23434
23435 Configuration commands:
23436 $config_commands
23437
23438 Report bugs to <bug-autoconf@gnu.org>."
23439 _ACEOF
23440
23441 cat >>$CONFIG_STATUS <<_ACEOF
23442 ac_cs_version="\\
23443 PostgreSQL config.status 8.2beta1
23444 configured by $0, generated by GNU Autoconf 2.59,
23445   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23446
23447 Copyright (C) 2003 Free Software Foundation, Inc.
23448 This config.status script is free software; the Free Software Foundation
23449 gives unlimited permission to copy, distribute and modify it."
23450 srcdir=$srcdir
23451 _ACEOF
23452
23453 cat >>$CONFIG_STATUS <<\_ACEOF
23454 # If no file are specified by the user, then we need to provide default
23455 # value.  By we need to know if files were specified by the user.
23456 ac_need_defaults=:
23457 while test $# != 0
23458 do
23459   case $1 in
23460   --*=*)
23461     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23462     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23463     ac_shift=:
23464     ;;
23465   -*)
23466     ac_option=$1
23467     ac_optarg=$2
23468     ac_shift=shift
23469     ;;
23470   *) # This is not an option, so the user has probably given explicit
23471      # arguments.
23472      ac_option=$1
23473      ac_need_defaults=false;;
23474   esac
23475
23476   case $ac_option in
23477   # Handling of the options.
23478 _ACEOF
23479 cat >>$CONFIG_STATUS <<\_ACEOF
23480   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23481     ac_cs_recheck=: ;;
23482   --version | --vers* | -V )
23483     echo "$ac_cs_version"; exit 0 ;;
23484   --he | --h)
23485     # Conflict between --help and --header
23486     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23487 Try \`$0 --help' for more information." >&5
23488 echo "$as_me: error: ambiguous option: $1
23489 Try \`$0 --help' for more information." >&2;}
23490    { (exit 1); exit 1; }; };;
23491   --help | --hel | -h )
23492     echo "$ac_cs_usage"; exit 0 ;;
23493   --debug | --d* | -d )
23494     debug=: ;;
23495   --file | --fil | --fi | --f )
23496     $ac_shift
23497     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23498     ac_need_defaults=false;;
23499   --header | --heade | --head | --hea )
23500     $ac_shift
23501     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23502     ac_need_defaults=false;;
23503   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23504   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23505     ac_cs_silent=: ;;
23506
23507   # This is an error.
23508   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23509 Try \`$0 --help' for more information." >&5
23510 echo "$as_me: error: unrecognized option: $1
23511 Try \`$0 --help' for more information." >&2;}
23512    { (exit 1); exit 1; }; } ;;
23513
23514   *) ac_config_targets="$ac_config_targets $1" ;;
23515
23516   esac
23517   shift
23518 done
23519
23520 ac_configure_extra_args=
23521
23522 if $ac_cs_silent; then
23523   exec 6>/dev/null
23524   ac_configure_extra_args="$ac_configure_extra_args --silent"
23525 fi
23526
23527 _ACEOF
23528 cat >>$CONFIG_STATUS <<_ACEOF
23529 if \$ac_cs_recheck; then
23530   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23531   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23532 fi
23533
23534 _ACEOF
23535
23536
23537
23538
23539
23540 cat >>$CONFIG_STATUS <<\_ACEOF
23541 for ac_config_target in $ac_config_targets
23542 do
23543   case "$ac_config_target" in
23544   # Handling of arguments.
23545   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23546   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23547   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23548   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23549   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23550   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23551   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23552   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23553   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23554   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23555   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23556   "src/interfaces/ecpg/include/ecpg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
23557   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23558 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23559    { (exit 1); exit 1; }; };;
23560   esac
23561 done
23562
23563 # If the user did not use the arguments to specify the items to instantiate,
23564 # then the envvar interface is used.  Set only those that are not.
23565 # We use the long form for the default assignment because of an extremely
23566 # bizarre bug on SunOS 4.1.3.
23567 if $ac_need_defaults; then
23568   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23569   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23570   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23571   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23572 fi
23573
23574 # Have a temporary directory for convenience.  Make it in the build tree
23575 # simply because there is no reason to put it here, and in addition,
23576 # creating and moving files from /tmp can sometimes cause problems.
23577 # Create a temporary directory, and hook for its removal unless debugging.
23578 $debug ||
23579 {
23580   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23581   trap '{ (exit 1); exit 1; }' 1 2 13 15
23582 }
23583
23584 # Create a (secure) tmp directory for tmp files.
23585
23586 {
23587   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23588   test -n "$tmp" && test -d "$tmp"
23589 }  ||
23590 {
23591   tmp=./confstat$$-$RANDOM
23592   (umask 077 && mkdir $tmp)
23593 } ||
23594 {
23595    echo "$me: cannot create a temporary directory in ." >&2
23596    { (exit 1); exit 1; }
23597 }
23598
23599 _ACEOF
23600
23601 cat >>$CONFIG_STATUS <<_ACEOF
23602
23603 #
23604 # CONFIG_FILES section.
23605 #
23606
23607 # No need to generate the scripts if there are no CONFIG_FILES.
23608 # This happens for instance when ./config.status config.h
23609 if test -n "\$CONFIG_FILES"; then
23610   # Protect against being on the right side of a sed subst in config.status.
23611   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23612    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23613 s,@SHELL@,$SHELL,;t t
23614 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23615 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23616 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23617 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23618 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23619 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23620 s,@exec_prefix@,$exec_prefix,;t t
23621 s,@prefix@,$prefix,;t t
23622 s,@program_transform_name@,$program_transform_name,;t t
23623 s,@bindir@,$bindir,;t t
23624 s,@sbindir@,$sbindir,;t t
23625 s,@libexecdir@,$libexecdir,;t t
23626 s,@datadir@,$datadir,;t t
23627 s,@sysconfdir@,$sysconfdir,;t t
23628 s,@sharedstatedir@,$sharedstatedir,;t t
23629 s,@localstatedir@,$localstatedir,;t t
23630 s,@libdir@,$libdir,;t t
23631 s,@includedir@,$includedir,;t t
23632 s,@oldincludedir@,$oldincludedir,;t t
23633 s,@infodir@,$infodir,;t t
23634 s,@mandir@,$mandir,;t t
23635 s,@build_alias@,$build_alias,;t t
23636 s,@host_alias@,$host_alias,;t t
23637 s,@target_alias@,$target_alias,;t t
23638 s,@DEFS@,$DEFS,;t t
23639 s,@ECHO_C@,$ECHO_C,;t t
23640 s,@ECHO_N@,$ECHO_N,;t t
23641 s,@ECHO_T@,$ECHO_T,;t t
23642 s,@LIBS@,$LIBS,;t t
23643 s,@configure_args@,$configure_args,;t t
23644 s,@build@,$build,;t t
23645 s,@build_cpu@,$build_cpu,;t t
23646 s,@build_vendor@,$build_vendor,;t t
23647 s,@build_os@,$build_os,;t t
23648 s,@host@,$host,;t t
23649 s,@host_cpu@,$host_cpu,;t t
23650 s,@host_vendor@,$host_vendor,;t t
23651 s,@host_os@,$host_os,;t t
23652 s,@PORTNAME@,$PORTNAME,;t t
23653 s,@docdir@,$docdir,;t t
23654 s,@enable_nls@,$enable_nls,;t t
23655 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23656 s,@default_port@,$default_port,;t t
23657 s,@enable_shared@,$enable_shared,;t t
23658 s,@enable_rpath@,$enable_rpath,;t t
23659 s,@enable_debug@,$enable_debug,;t t
23660 s,@DTRACE@,$DTRACE,;t t
23661 s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
23662 s,@enable_dtrace@,$enable_dtrace,;t t
23663 s,@CC@,$CC,;t t
23664 s,@CFLAGS@,$CFLAGS,;t t
23665 s,@LDFLAGS@,$LDFLAGS,;t t
23666 s,@CPPFLAGS@,$CPPFLAGS,;t t
23667 s,@ac_ct_CC@,$ac_ct_CC,;t t
23668 s,@EXEEXT@,$EXEEXT,;t t
23669 s,@OBJEXT@,$OBJEXT,;t t
23670 s,@CPP@,$CPP,;t t
23671 s,@GCC@,$GCC,;t t
23672 s,@TAS@,$TAS,;t t
23673 s,@autodepend@,$autodepend,;t t
23674 s,@INCLUDES@,$INCLUDES,;t t
23675 s,@enable_thread_safety@,$enable_thread_safety,;t t
23676 s,@with_tcl@,$with_tcl,;t t
23677 s,@with_perl@,$with_perl,;t t
23678 s,@with_python@,$with_python,;t t
23679 s,@with_krb5@,$with_krb5,;t t
23680 s,@krb_srvtab@,$krb_srvtab,;t t
23681 s,@with_pam@,$with_pam,;t t
23682 s,@with_ldap@,$with_ldap,;t t
23683 s,@with_bonjour@,$with_bonjour,;t t
23684 s,@with_openssl@,$with_openssl,;t t
23685 s,@with_zlib@,$with_zlib,;t t
23686 s,@EGREP@,$EGREP,;t t
23687 s,@ELF_SYS@,$ELF_SYS,;t t
23688 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23689 s,@AWK@,$AWK,;t t
23690 s,@FLEX@,$FLEX,;t t
23691 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23692 s,@LN_S@,$LN_S,;t t
23693 s,@LD@,$LD,;t t
23694 s,@with_gnu_ld@,$with_gnu_ld,;t t
23695 s,@ld_R_works@,$ld_R_works,;t t
23696 s,@RANLIB@,$RANLIB,;t t
23697 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23698 s,@TAR@,$TAR,;t t
23699 s,@STRIP@,$STRIP,;t t
23700 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23701 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23702 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23703 s,@YACC@,$YACC,;t t
23704 s,@YFLAGS@,$YFLAGS,;t t
23705 s,@PERL@,$PERL,;t t
23706 s,@perl_archlibexp@,$perl_archlibexp,;t t
23707 s,@perl_privlibexp@,$perl_privlibexp,;t t
23708 s,@perl_useshrplib@,$perl_useshrplib,;t t
23709 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23710 s,@PYTHON@,$PYTHON,;t t
23711 s,@python_version@,$python_version,;t t
23712 s,@python_configdir@,$python_configdir,;t t
23713 s,@python_includespec@,$python_includespec,;t t
23714 s,@python_libdir@,$python_libdir,;t t
23715 s,@python_libspec@,$python_libspec,;t t
23716 s,@python_additional_libs@,$python_additional_libs,;t t
23717 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23718 s,@LIBOBJS@,$LIBOBJS,;t t
23719 s,@acx_pthread_config@,$acx_pthread_config,;t t
23720 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23721 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23722 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23723 s,@LDAP_LIBS_FE@,$LDAP_LIBS_FE,;t t
23724 s,@LDAP_LIBS_BE@,$LDAP_LIBS_BE,;t t
23725 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23726 s,@MSGFMT@,$MSGFMT,;t t
23727 s,@MSGMERGE@,$MSGMERGE,;t t
23728 s,@XGETTEXT@,$XGETTEXT,;t t
23729 s,@localedir@,$localedir,;t t
23730 s,@TCLSH@,$TCLSH,;t t
23731 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23732 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23733 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23734 s,@TCL_LIBS@,$TCL_LIBS,;t t
23735 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23736 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23737 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23738 s,@NSGMLS@,$NSGMLS,;t t
23739 s,@JADE@,$JADE,;t t
23740 s,@have_docbook@,$have_docbook,;t t
23741 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23742 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23743 s,@SGMLSPL@,$SGMLSPL,;t t
23744 s,@vpath_build@,$vpath_build,;t t
23745 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23746 CEOF
23747
23748 _ACEOF
23749
23750   cat >>$CONFIG_STATUS <<\_ACEOF
23751   # Split the substitutions into bite-sized pieces for seds with
23752   # small command number limits, like on Digital OSF/1 and HP-UX.
23753   ac_max_sed_lines=48
23754   ac_sed_frag=1 # Number of current file.
23755   ac_beg=1 # First line for current file.
23756   ac_end=$ac_max_sed_lines # Line after last line for current file.
23757   ac_more_lines=:
23758   ac_sed_cmds=
23759   while $ac_more_lines; do
23760     if test $ac_beg -gt 1; then
23761       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23762     else
23763       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23764     fi
23765     if test ! -s $tmp/subs.frag; then
23766       ac_more_lines=false
23767     else
23768       # The purpose of the label and of the branching condition is to
23769       # speed up the sed processing (if there are no `@' at all, there
23770       # is no need to browse any of the substitutions).
23771       # These are the two extra sed commands mentioned above.
23772       (echo ':t
23773   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23774       if test -z "$ac_sed_cmds"; then
23775         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23776       else
23777         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23778       fi
23779       ac_sed_frag=`expr $ac_sed_frag + 1`
23780       ac_beg=$ac_end
23781       ac_end=`expr $ac_end + $ac_max_sed_lines`
23782     fi
23783   done
23784   if test -z "$ac_sed_cmds"; then
23785     ac_sed_cmds=cat
23786   fi
23787 fi # test -n "$CONFIG_FILES"
23788
23789 _ACEOF
23790 cat >>$CONFIG_STATUS <<\_ACEOF
23791 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23792   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23793   case $ac_file in
23794   - | *:- | *:-:* ) # input from stdin
23795         cat >$tmp/stdin
23796         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23797         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23798   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23799         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23800   * )   ac_file_in=$ac_file.in ;;
23801   esac
23802
23803   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23804   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23805 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23806          X"$ac_file" : 'X\(//\)[^/]' \| \
23807          X"$ac_file" : 'X\(//\)$' \| \
23808          X"$ac_file" : 'X\(/\)' \| \
23809          .     : '\(.\)' 2>/dev/null ||
23810 echo X"$ac_file" |
23811     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23812           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23813           /^X\(\/\/\)$/{ s//\1/; q; }
23814           /^X\(\/\).*/{ s//\1/; q; }
23815           s/.*/./; q'`
23816   { if $as_mkdir_p; then
23817     mkdir -p "$ac_dir"
23818   else
23819     as_dir="$ac_dir"
23820     as_dirs=
23821     while test ! -d "$as_dir"; do
23822       as_dirs="$as_dir $as_dirs"
23823       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23824 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23825          X"$as_dir" : 'X\(//\)[^/]' \| \
23826          X"$as_dir" : 'X\(//\)$' \| \
23827          X"$as_dir" : 'X\(/\)' \| \
23828          .     : '\(.\)' 2>/dev/null ||
23829 echo X"$as_dir" |
23830     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23831           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23832           /^X\(\/\/\)$/{ s//\1/; q; }
23833           /^X\(\/\).*/{ s//\1/; q; }
23834           s/.*/./; q'`
23835     done
23836     test ! -n "$as_dirs" || mkdir $as_dirs
23837   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23838 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23839    { (exit 1); exit 1; }; }; }
23840
23841   ac_builddir=.
23842
23843 if test "$ac_dir" != .; then
23844   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23845   # A "../" for each directory in $ac_dir_suffix.
23846   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23847 else
23848   ac_dir_suffix= ac_top_builddir=
23849 fi
23850
23851 case $srcdir in
23852   .)  # No --srcdir option.  We are building in place.
23853     ac_srcdir=.
23854     if test -z "$ac_top_builddir"; then
23855        ac_top_srcdir=.
23856     else
23857        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23858     fi ;;
23859   [\\/]* | ?:[\\/]* )  # Absolute path.
23860     ac_srcdir=$srcdir$ac_dir_suffix;
23861     ac_top_srcdir=$srcdir ;;
23862   *) # Relative path.
23863     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23864     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23865 esac
23866
23867 # Do not use `cd foo && pwd` to compute absolute paths, because
23868 # the directories may not exist.
23869 case `pwd` in
23870 .) ac_abs_builddir="$ac_dir";;
23871 *)
23872   case "$ac_dir" in
23873   .) ac_abs_builddir=`pwd`;;
23874   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23875   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23876   esac;;
23877 esac
23878 case $ac_abs_builddir in
23879 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23880 *)
23881   case ${ac_top_builddir}. in
23882   .) ac_abs_top_builddir=$ac_abs_builddir;;
23883   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23884   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23885   esac;;
23886 esac
23887 case $ac_abs_builddir in
23888 .) ac_abs_srcdir=$ac_srcdir;;
23889 *)
23890   case $ac_srcdir in
23891   .) ac_abs_srcdir=$ac_abs_builddir;;
23892   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23893   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23894   esac;;
23895 esac
23896 case $ac_abs_builddir in
23897 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23898 *)
23899   case $ac_top_srcdir in
23900   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23901   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23902   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23903   esac;;
23904 esac
23905
23906
23907
23908   if test x"$ac_file" != x-; then
23909     { echo "$as_me:$LINENO: creating $ac_file" >&5
23910 echo "$as_me: creating $ac_file" >&6;}
23911     rm -f "$ac_file"
23912   fi
23913   # Let's still pretend it is `configure' which instantiates (i.e., don't
23914   # use $as_me), people would be surprised to read:
23915   #    /* config.h.  Generated by config.status.  */
23916   if test x"$ac_file" = x-; then
23917     configure_input=
23918   else
23919     configure_input="$ac_file.  "
23920   fi
23921   configure_input=$configure_input"Generated from `echo $ac_file_in |
23922                                      sed 's,.*/,,'` by configure."
23923
23924   # First look for the input files in the build tree, otherwise in the
23925   # src tree.
23926   ac_file_inputs=`IFS=:
23927     for f in $ac_file_in; do
23928       case $f in
23929       -) echo $tmp/stdin ;;
23930       [\\/$]*)
23931          # Absolute (can't be DOS-style, as IFS=:)
23932          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23933 echo "$as_me: error: cannot find input file: $f" >&2;}
23934    { (exit 1); exit 1; }; }
23935          echo "$f";;
23936       *) # Relative
23937          if test -f "$f"; then
23938            # Build tree
23939            echo "$f"
23940          elif test -f "$srcdir/$f"; then
23941            # Source tree
23942            echo "$srcdir/$f"
23943          else
23944            # /dev/null tree
23945            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23946 echo "$as_me: error: cannot find input file: $f" >&2;}
23947    { (exit 1); exit 1; }; }
23948          fi;;
23949       esac
23950     done` || { (exit 1); exit 1; }
23951 _ACEOF
23952 cat >>$CONFIG_STATUS <<_ACEOF
23953   sed "$ac_vpsub
23954 $extrasub
23955 _ACEOF
23956 cat >>$CONFIG_STATUS <<\_ACEOF
23957 :t
23958 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23959 s,@configure_input@,$configure_input,;t t
23960 s,@srcdir@,$ac_srcdir,;t t
23961 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23962 s,@top_srcdir@,$ac_top_srcdir,;t t
23963 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23964 s,@builddir@,$ac_builddir,;t t
23965 s,@abs_builddir@,$ac_abs_builddir,;t t
23966 s,@top_builddir@,$ac_top_builddir,;t t
23967 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23968 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23969   rm -f $tmp/stdin
23970   if test x"$ac_file" != x-; then
23971     mv $tmp/out $ac_file
23972   else
23973     cat $tmp/out
23974     rm -f $tmp/out
23975   fi
23976
23977 done
23978 _ACEOF
23979 cat >>$CONFIG_STATUS <<\_ACEOF
23980
23981 #
23982 # CONFIG_HEADER section.
23983 #
23984
23985 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23986 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23987 #
23988 # ac_d sets the value in "#define NAME VALUE" lines.
23989 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23990 ac_dB='[         ].*$,\1#\2'
23991 ac_dC=' '
23992 ac_dD=',;t'
23993 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23994 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23995 ac_uB='$,\1#\2define\3'
23996 ac_uC=' '
23997 ac_uD=',;t'
23998
23999 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24000   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24001   case $ac_file in
24002   - | *:- | *:-:* ) # input from stdin
24003         cat >$tmp/stdin
24004         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24005         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24006   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24007         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24008   * )   ac_file_in=$ac_file.in ;;
24009   esac
24010
24011   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
24012 echo "$as_me: creating $ac_file" >&6;}
24013
24014   # First look for the input files in the build tree, otherwise in the
24015   # src tree.
24016   ac_file_inputs=`IFS=:
24017     for f in $ac_file_in; do
24018       case $f in
24019       -) echo $tmp/stdin ;;
24020       [\\/$]*)
24021          # Absolute (can't be DOS-style, as IFS=:)
24022          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24023 echo "$as_me: error: cannot find input file: $f" >&2;}
24024    { (exit 1); exit 1; }; }
24025          # Do quote $f, to prevent DOS paths from being IFS'd.
24026          echo "$f";;
24027       *) # Relative
24028          if test -f "$f"; then
24029            # Build tree
24030            echo "$f"
24031          elif test -f "$srcdir/$f"; then
24032            # Source tree
24033            echo "$srcdir/$f"
24034          else
24035            # /dev/null tree
24036            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24037 echo "$as_me: error: cannot find input file: $f" >&2;}
24038    { (exit 1); exit 1; }; }
24039          fi;;
24040       esac
24041     done` || { (exit 1); exit 1; }
24042   # Remove the trailing spaces.
24043   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
24044
24045 _ACEOF
24046
24047 # Transform confdefs.h into two sed scripts, `conftest.defines' and
24048 # `conftest.undefs', that substitutes the proper values into
24049 # config.h.in to produce config.h.  The first handles `#define'
24050 # templates, and the second `#undef' templates.
24051 # And first: Protect against being on the right side of a sed subst in
24052 # config.status.  Protect against being in an unquoted here document
24053 # in config.status.
24054 rm -f conftest.defines conftest.undefs
24055 # Using a here document instead of a string reduces the quoting nightmare.
24056 # Putting comments in sed scripts is not portable.
24057 #
24058 # `end' is used to avoid that the second main sed command (meant for
24059 # 0-ary CPP macros) applies to n-ary macro definitions.
24060 # See the Autoconf documentation for `clear'.
24061 cat >confdef2sed.sed <<\_ACEOF
24062 s/[\\&,]/\\&/g
24063 s,[\\$`],\\&,g
24064 t clear
24065 : clear
24066 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
24067 t end
24068 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
24069 : end
24070 _ACEOF
24071 # If some macros were called several times there might be several times
24072 # the same #defines, which is useless.  Nevertheless, we may not want to
24073 # sort them, since we want the *last* AC-DEFINE to be honored.
24074 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24075 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24076 rm -f confdef2sed.sed
24077
24078 # This sed command replaces #undef with comments.  This is necessary, for
24079 # example, in the case of _POSIX_SOURCE, which is predefined and required
24080 # on some systems where configure will not decide to define it.
24081 cat >>conftest.undefs <<\_ACEOF
24082 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
24083 _ACEOF
24084
24085 # Break up conftest.defines because some shells have a limit on the size
24086 # of here documents, and old seds have small limits too (100 cmds).
24087 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
24088 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
24089 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24090 echo '  :' >>$CONFIG_STATUS
24091 rm -f conftest.tail
24092 while grep . conftest.defines >/dev/null
24093 do
24094   # Write a limited-size here document to $tmp/defines.sed.
24095   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24096   # Speed up: don't consider the non `#define' lines.
24097   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
24098   # Work around the forget-to-reset-the-flag bug.
24099   echo 't clr' >>$CONFIG_STATUS
24100   echo ': clr' >>$CONFIG_STATUS
24101   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24102   echo 'CEOF
24103   sed -f $tmp/defines.sed $tmp/in >$tmp/out
24104   rm -f $tmp/in
24105   mv $tmp/out $tmp/in
24106 ' >>$CONFIG_STATUS
24107   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24108   rm -f conftest.defines
24109   mv conftest.tail conftest.defines
24110 done
24111 rm -f conftest.defines
24112 echo '  fi # grep' >>$CONFIG_STATUS
24113 echo >>$CONFIG_STATUS
24114
24115 # Break up conftest.undefs because some shells have a limit on the size
24116 # of here documents, and old seds have small limits too (100 cmds).
24117 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
24118 rm -f conftest.tail
24119 while grep . conftest.undefs >/dev/null
24120 do
24121   # Write a limited-size here document to $tmp/undefs.sed.
24122   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24123   # Speed up: don't consider the non `#undef'
24124   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
24125   # Work around the forget-to-reset-the-flag bug.
24126   echo 't clr' >>$CONFIG_STATUS
24127   echo ': clr' >>$CONFIG_STATUS
24128   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
24129   echo 'CEOF
24130   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24131   rm -f $tmp/in
24132   mv $tmp/out $tmp/in
24133 ' >>$CONFIG_STATUS
24134   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24135   rm -f conftest.undefs
24136   mv conftest.tail conftest.undefs
24137 done
24138 rm -f conftest.undefs
24139
24140 cat >>$CONFIG_STATUS <<\_ACEOF
24141   # Let's still pretend it is `configure' which instantiates (i.e., don't
24142   # use $as_me), people would be surprised to read:
24143   #    /* config.h.  Generated by config.status.  */
24144   if test x"$ac_file" = x-; then
24145     echo "/* Generated by configure.  */" >$tmp/config.h
24146   else
24147     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
24148   fi
24149   cat $tmp/in >>$tmp/config.h
24150   rm -f $tmp/in
24151   if test x"$ac_file" != x-; then
24152     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
24153       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24154 echo "$as_me: $ac_file is unchanged" >&6;}
24155     else
24156       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24157 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24158          X"$ac_file" : 'X\(//\)[^/]' \| \
24159          X"$ac_file" : 'X\(//\)$' \| \
24160          X"$ac_file" : 'X\(/\)' \| \
24161          .     : '\(.\)' 2>/dev/null ||
24162 echo X"$ac_file" |
24163     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24164           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24165           /^X\(\/\/\)$/{ s//\1/; q; }
24166           /^X\(\/\).*/{ s//\1/; q; }
24167           s/.*/./; q'`
24168       { if $as_mkdir_p; then
24169     mkdir -p "$ac_dir"
24170   else
24171     as_dir="$ac_dir"
24172     as_dirs=
24173     while test ! -d "$as_dir"; do
24174       as_dirs="$as_dir $as_dirs"
24175       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24176 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24177          X"$as_dir" : 'X\(//\)[^/]' \| \
24178          X"$as_dir" : 'X\(//\)$' \| \
24179          X"$as_dir" : 'X\(/\)' \| \
24180          .     : '\(.\)' 2>/dev/null ||
24181 echo X"$as_dir" |
24182     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24183           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24184           /^X\(\/\/\)$/{ s//\1/; q; }
24185           /^X\(\/\).*/{ s//\1/; q; }
24186           s/.*/./; q'`
24187     done
24188     test ! -n "$as_dirs" || mkdir $as_dirs
24189   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24190 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24191    { (exit 1); exit 1; }; }; }
24192
24193       rm -f $ac_file
24194       mv $tmp/config.h $ac_file
24195     fi
24196   else
24197     cat $tmp/config.h
24198     rm -f $tmp/config.h
24199   fi
24200   # Run the commands associated with the file.
24201   case $ac_file in
24202     src/include/pg_config.h )
24203 # Update timestamp for pg_config.h (see Makefile.global)
24204 echo >src/include/stamp-h
24205  ;;
24206   esac
24207 done
24208 _ACEOF
24209 cat >>$CONFIG_STATUS <<\_ACEOF
24210
24211 #
24212 # CONFIG_LINKS section.
24213 #
24214
24215 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
24216   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24217   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24218
24219   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
24220 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
24221
24222   if test ! -r $srcdir/$ac_source; then
24223     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
24224 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
24225    { (exit 1); exit 1; }; }
24226   fi
24227   rm -f $ac_dest
24228
24229   # Make relative symlinks.
24230   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
24231 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24232          X"$ac_dest" : 'X\(//\)[^/]' \| \
24233          X"$ac_dest" : 'X\(//\)$' \| \
24234          X"$ac_dest" : 'X\(/\)' \| \
24235          .     : '\(.\)' 2>/dev/null ||
24236 echo X"$ac_dest" |
24237     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24238           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24239           /^X\(\/\/\)$/{ s//\1/; q; }
24240           /^X\(\/\).*/{ s//\1/; q; }
24241           s/.*/./; q'`
24242   { if $as_mkdir_p; then
24243     mkdir -p "$ac_dest_dir"
24244   else
24245     as_dir="$ac_dest_dir"
24246     as_dirs=
24247     while test ! -d "$as_dir"; do
24248       as_dirs="$as_dir $as_dirs"
24249       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24250 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24251          X"$as_dir" : 'X\(//\)[^/]' \| \
24252          X"$as_dir" : 'X\(//\)$' \| \
24253          X"$as_dir" : 'X\(/\)' \| \
24254          .     : '\(.\)' 2>/dev/null ||
24255 echo X"$as_dir" |
24256     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24257           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24258           /^X\(\/\/\)$/{ s//\1/; q; }
24259           /^X\(\/\).*/{ s//\1/; q; }
24260           s/.*/./; q'`
24261     done
24262     test ! -n "$as_dirs" || mkdir $as_dirs
24263   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
24264 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
24265    { (exit 1); exit 1; }; }; }
24266
24267   ac_builddir=.
24268
24269 if test "$ac_dest_dir" != .; then
24270   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
24271   # A "../" for each directory in $ac_dir_suffix.
24272   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24273 else
24274   ac_dir_suffix= ac_top_builddir=
24275 fi
24276
24277 case $srcdir in
24278   .)  # No --srcdir option.  We are building in place.
24279     ac_srcdir=.
24280     if test -z "$ac_top_builddir"; then
24281        ac_top_srcdir=.
24282     else
24283        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24284     fi ;;
24285   [\\/]* | ?:[\\/]* )  # Absolute path.
24286     ac_srcdir=$srcdir$ac_dir_suffix;
24287     ac_top_srcdir=$srcdir ;;
24288   *) # Relative path.
24289     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24290     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24291 esac
24292
24293 # Do not use `cd foo && pwd` to compute absolute paths, because
24294 # the directories may not exist.
24295 case `pwd` in
24296 .) ac_abs_builddir="$ac_dest_dir";;
24297 *)
24298   case "$ac_dest_dir" in
24299   .) ac_abs_builddir=`pwd`;;
24300   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24301   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24302   esac;;
24303 esac
24304 case $ac_abs_builddir in
24305 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24306 *)
24307   case ${ac_top_builddir}. in
24308   .) ac_abs_top_builddir=$ac_abs_builddir;;
24309   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24310   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24311   esac;;
24312 esac
24313 case $ac_abs_builddir in
24314 .) ac_abs_srcdir=$ac_srcdir;;
24315 *)
24316   case $ac_srcdir in
24317   .) ac_abs_srcdir=$ac_abs_builddir;;
24318   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24319   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24320   esac;;
24321 esac
24322 case $ac_abs_builddir in
24323 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24324 *)
24325   case $ac_top_srcdir in
24326   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24327   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24328   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24329   esac;;
24330 esac
24331
24332
24333   case $srcdir in
24334   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24335       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24336   esac
24337
24338   # Try a symlink, then a hard link, then a copy.
24339   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24340     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24341     cp -p $srcdir/$ac_source $ac_dest ||
24342     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24343 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24344    { (exit 1); exit 1; }; }
24345 done
24346 _ACEOF
24347 cat >>$CONFIG_STATUS <<\_ACEOF
24348
24349 #
24350 # CONFIG_COMMANDS section.
24351 #
24352 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24353   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24354   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24355   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24356 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24357          X"$ac_dest" : 'X\(//\)[^/]' \| \
24358          X"$ac_dest" : 'X\(//\)$' \| \
24359          X"$ac_dest" : 'X\(/\)' \| \
24360          .     : '\(.\)' 2>/dev/null ||
24361 echo X"$ac_dest" |
24362     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24363           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24364           /^X\(\/\/\)$/{ s//\1/; q; }
24365           /^X\(\/\).*/{ s//\1/; q; }
24366           s/.*/./; q'`
24367   { if $as_mkdir_p; then
24368     mkdir -p "$ac_dir"
24369   else
24370     as_dir="$ac_dir"
24371     as_dirs=
24372     while test ! -d "$as_dir"; do
24373       as_dirs="$as_dir $as_dirs"
24374       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24375 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24376          X"$as_dir" : 'X\(//\)[^/]' \| \
24377          X"$as_dir" : 'X\(//\)$' \| \
24378          X"$as_dir" : 'X\(/\)' \| \
24379          .     : '\(.\)' 2>/dev/null ||
24380 echo X"$as_dir" |
24381     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24382           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24383           /^X\(\/\/\)$/{ s//\1/; q; }
24384           /^X\(\/\).*/{ s//\1/; q; }
24385           s/.*/./; q'`
24386     done
24387     test ! -n "$as_dirs" || mkdir $as_dirs
24388   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24389 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24390    { (exit 1); exit 1; }; }; }
24391
24392   ac_builddir=.
24393
24394 if test "$ac_dir" != .; then
24395   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24396   # A "../" for each directory in $ac_dir_suffix.
24397   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24398 else
24399   ac_dir_suffix= ac_top_builddir=
24400 fi
24401
24402 case $srcdir in
24403   .)  # No --srcdir option.  We are building in place.
24404     ac_srcdir=.
24405     if test -z "$ac_top_builddir"; then
24406        ac_top_srcdir=.
24407     else
24408        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24409     fi ;;
24410   [\\/]* | ?:[\\/]* )  # Absolute path.
24411     ac_srcdir=$srcdir$ac_dir_suffix;
24412     ac_top_srcdir=$srcdir ;;
24413   *) # Relative path.
24414     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24415     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24416 esac
24417
24418 # Do not use `cd foo && pwd` to compute absolute paths, because
24419 # the directories may not exist.
24420 case `pwd` in
24421 .) ac_abs_builddir="$ac_dir";;
24422 *)
24423   case "$ac_dir" in
24424   .) ac_abs_builddir=`pwd`;;
24425   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24426   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24427   esac;;
24428 esac
24429 case $ac_abs_builddir in
24430 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24431 *)
24432   case ${ac_top_builddir}. in
24433   .) ac_abs_top_builddir=$ac_abs_builddir;;
24434   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24435   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24436   esac;;
24437 esac
24438 case $ac_abs_builddir in
24439 .) ac_abs_srcdir=$ac_srcdir;;
24440 *)
24441   case $ac_srcdir in
24442   .) ac_abs_srcdir=$ac_abs_builddir;;
24443   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24444   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24445   esac;;
24446 esac
24447 case $ac_abs_builddir in
24448 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24449 *)
24450   case $ac_top_srcdir in
24451   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24452   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24453   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24454   esac;;
24455 esac
24456
24457
24458   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24459 echo "$as_me: executing $ac_dest commands" >&6;}
24460   case $ac_dest in
24461     check_win32_symlinks )
24462 # Links sometimes fail undetected on Mingw -
24463 # so here we detect it and warn the user
24464 for FILE in $CONFIG_LINKS
24465  do
24466         # test -e works for symlinks in the MinGW console
24467         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
24468 echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
24469  done
24470  ;;
24471   esac
24472 done
24473 _ACEOF
24474
24475 cat >>$CONFIG_STATUS <<\_ACEOF
24476
24477 { (exit 0); exit 0; }
24478 _ACEOF
24479 chmod +x $CONFIG_STATUS
24480 ac_clean_files=$ac_clean_files_save
24481
24482
24483 # configure is writing to config.log, and then calls config.status.
24484 # config.status does its own redirection, appending to config.log.
24485 # Unfortunately, on DOS this fails, as config.log is still kept open
24486 # by configure, so config.status won't be able to write to it; its
24487 # output is simply discarded.  So we exec the FD to /dev/null,
24488 # effectively closing config.log, so it can be properly (re)opened and
24489 # appended to by config.status.  When coming back to configure, we
24490 # need to make the FD available again.
24491 if test "$no_create" != yes; then
24492   ac_cs_success=:
24493   ac_config_status_args=
24494   test "$silent" = yes &&
24495     ac_config_status_args="$ac_config_status_args --quiet"
24496   exec 5>/dev/null
24497   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24498   exec 5>>config.log
24499   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24500   # would make configure fail if this is the last instruction.
24501   $ac_cs_success || { (exit 1); exit 1; }
24502 fi
24503
24504