OSDN Git Service

Used autoconf 2.59 this time.
[pg-rex/syncrep.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.2devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 2003 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright (c) 1996-2006, PostgreSQL Global Development Group
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248 # Name of the host.
249 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
250 # so uname gets run too.
251 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252
253 exec 6>&1
254
255 #
256 # Initializations.
257 #
258 ac_default_prefix=/usr/local
259 ac_config_libobj_dir=.
260 cross_compiling=no
261 subdirs=
262 MFLAGS=
263 MAKEFLAGS=
264 SHELL=${CONFIG_SHELL-/bin/sh}
265
266 # Maximum number of lines to put in a shell here document.
267 # This variable seems obsolete.  It should probably be removed, and
268 # only ac_max_sed_lines should be used.
269 : ${ac_max_here_lines=38}
270
271 # Identity of this package.
272 PACKAGE_NAME='PostgreSQL'
273 PACKAGE_TARNAME='postgresql'
274 PACKAGE_VERSION='8.2devel'
275 PACKAGE_STRING='PostgreSQL 8.2devel'
276 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
277
278 ac_unique_file="src/backend/access/common/heaptuple.c"
279 ac_default_prefix=/usr/local/pgsql
280 # Factoring default headers for most tests.
281 ac_includes_default="\
282 #include <stdio.h>
283 #if HAVE_SYS_TYPES_H
284 # include <sys/types.h>
285 #endif
286 #if HAVE_SYS_STAT_H
287 # include <sys/stat.h>
288 #endif
289 #if STDC_HEADERS
290 # include <stdlib.h>
291 # include <stddef.h>
292 #else
293 # if HAVE_STDLIB_H
294 #  include <stdlib.h>
295 # endif
296 #endif
297 #if HAVE_STRING_H
298 # if !STDC_HEADERS && HAVE_MEMORY_H
299 #  include <memory.h>
300 # endif
301 # include <string.h>
302 #endif
303 #if HAVE_STRINGS_H
304 # include <strings.h>
305 #endif
306 #if HAVE_INTTYPES_H
307 # include <inttypes.h>
308 #else
309 # if HAVE_STDINT_H
310 #  include <stdint.h>
311 # endif
312 #endif
313 #if HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif"
316
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug 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 HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318 ac_subst_files=''
319
320 # Initialize some variables set by options.
321 ac_init_help=
322 ac_init_version=false
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 cache_file=/dev/null
326 exec_prefix=NONE
327 no_create=
328 no_recursion=
329 prefix=NONE
330 program_prefix=NONE
331 program_suffix=NONE
332 program_transform_name=s,x,x,
333 silent=
334 site=
335 srcdir=
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339
340 # Installation directory options.
341 # These are left unexpanded so users can "make install exec_prefix=/foo"
342 # and all the variables that are supposed to be based on exec_prefix
343 # by default will actually change.
344 # Use braces instead of parens because sh, perl, etc. also accept them.
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 ac_prev=
359 for ac_option
360 do
361   # If the previous option needs an argument, assign it.
362   if test -n "$ac_prev"; then
363     eval "$ac_prev=\$ac_option"
364     ac_prev=
365     continue
366   fi
367
368   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
369
370   # Accept the important Cygnus configure options, so we can diagnose typos.
371
372   case $ac_option in
373
374   -bindir | --bindir | --bindi | --bind | --bin | --bi)
375     ac_prev=bindir ;;
376   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
377     bindir=$ac_optarg ;;
378
379   -build | --build | --buil | --bui | --bu)
380     ac_prev=build_alias ;;
381   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
382     build_alias=$ac_optarg ;;
383
384   -cache-file | --cache-file | --cache-fil | --cache-fi \
385   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
386     ac_prev=cache_file ;;
387   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
388   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
389     cache_file=$ac_optarg ;;
390
391   --config-cache | -C)
392     cache_file=config.cache ;;
393
394   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
395     ac_prev=datadir ;;
396   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
397   | --da=*)
398     datadir=$ac_optarg ;;
399
400   -disable-* | --disable-*)
401     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
405    { (exit 1); exit 1; }; }
406     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
407     eval "enable_$ac_feature=no" ;;
408
409   -enable-* | --enable-*)
410     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
414    { (exit 1); exit 1; }; }
415     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
416     case $ac_option in
417       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418       *) ac_optarg=yes ;;
419     esac
420     eval "enable_$ac_feature='$ac_optarg'" ;;
421
422   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
423   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
424   | --exec | --exe | --ex)
425     ac_prev=exec_prefix ;;
426   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
427   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
428   | --exec=* | --exe=* | --ex=*)
429     exec_prefix=$ac_optarg ;;
430
431   -gas | --gas | --ga | --g)
432     # Obsolete; use --with-gas.
433     with_gas=yes ;;
434
435   -help | --help | --hel | --he | -h)
436     ac_init_help=long ;;
437   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
438     ac_init_help=recursive ;;
439   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
440     ac_init_help=short ;;
441
442   -host | --host | --hos | --ho)
443     ac_prev=host_alias ;;
444   -host=* | --host=* | --hos=* | --ho=*)
445     host_alias=$ac_optarg ;;
446
447   -includedir | --includedir | --includedi | --included | --include \
448   | --includ | --inclu | --incl | --inc)
449     ac_prev=includedir ;;
450   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
451   | --includ=* | --inclu=* | --incl=* | --inc=*)
452     includedir=$ac_optarg ;;
453
454   -infodir | --infodir | --infodi | --infod | --info | --inf)
455     ac_prev=infodir ;;
456   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
457     infodir=$ac_optarg ;;
458
459   -libdir | --libdir | --libdi | --libd)
460     ac_prev=libdir ;;
461   -libdir=* | --libdir=* | --libdi=* | --libd=*)
462     libdir=$ac_optarg ;;
463
464   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
465   | --libexe | --libex | --libe)
466     ac_prev=libexecdir ;;
467   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
468   | --libexe=* | --libex=* | --libe=*)
469     libexecdir=$ac_optarg ;;
470
471   -localstatedir | --localstatedir | --localstatedi | --localstated \
472   | --localstate | --localstat | --localsta | --localst \
473   | --locals | --local | --loca | --loc | --lo)
474     ac_prev=localstatedir ;;
475   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
476   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
477   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
478     localstatedir=$ac_optarg ;;
479
480   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
481     ac_prev=mandir ;;
482   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
483     mandir=$ac_optarg ;;
484
485   -nfp | --nfp | --nf)
486     # Obsolete; use --without-fp.
487     with_fp=no ;;
488
489   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
490   | --no-cr | --no-c | -n)
491     no_create=yes ;;
492
493   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
495     no_recursion=yes ;;
496
497   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
498   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
499   | --oldin | --oldi | --old | --ol | --o)
500     ac_prev=oldincludedir ;;
501   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
502   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
503   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
504     oldincludedir=$ac_optarg ;;
505
506   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
507     ac_prev=prefix ;;
508   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
509     prefix=$ac_optarg ;;
510
511   -program-prefix | --program-prefix | --program-prefi | --program-pref \
512   | --program-pre | --program-pr | --program-p)
513     ac_prev=program_prefix ;;
514   -program-prefix=* | --program-prefix=* | --program-prefi=* \
515   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
516     program_prefix=$ac_optarg ;;
517
518   -program-suffix | --program-suffix | --program-suffi | --program-suff \
519   | --program-suf | --program-su | --program-s)
520     ac_prev=program_suffix ;;
521   -program-suffix=* | --program-suffix=* | --program-suffi=* \
522   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
523     program_suffix=$ac_optarg ;;
524
525   -program-transform-name | --program-transform-name \
526   | --program-transform-nam | --program-transform-na \
527   | --program-transform-n | --program-transform- \
528   | --program-transform | --program-transfor \
529   | --program-transfo | --program-transf \
530   | --program-trans | --program-tran \
531   | --progr-tra | --program-tr | --program-t)
532     ac_prev=program_transform_name ;;
533   -program-transform-name=* | --program-transform-name=* \
534   | --program-transform-nam=* | --program-transform-na=* \
535   | --program-transform-n=* | --program-transform-=* \
536   | --program-transform=* | --program-transfor=* \
537   | --program-transfo=* | --program-transf=* \
538   | --program-trans=* | --program-tran=* \
539   | --progr-tra=* | --program-tr=* | --program-t=*)
540     program_transform_name=$ac_optarg ;;
541
542   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
543   | -silent | --silent | --silen | --sile | --sil)
544     silent=yes ;;
545
546   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
547     ac_prev=sbindir ;;
548   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
549   | --sbi=* | --sb=*)
550     sbindir=$ac_optarg ;;
551
552   -sharedstatedir | --sharedstatedir | --sharedstatedi \
553   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
554   | --sharedst | --shareds | --shared | --share | --shar \
555   | --sha | --sh)
556     ac_prev=sharedstatedir ;;
557   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
558   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
559   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
560   | --sha=* | --sh=*)
561     sharedstatedir=$ac_optarg ;;
562
563   -site | --site | --sit)
564     ac_prev=site ;;
565   -site=* | --site=* | --sit=*)
566     site=$ac_optarg ;;
567
568   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
569     ac_prev=srcdir ;;
570   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
571     srcdir=$ac_optarg ;;
572
573   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
574   | --syscon | --sysco | --sysc | --sys | --sy)
575     ac_prev=sysconfdir ;;
576   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
577   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
578     sysconfdir=$ac_optarg ;;
579
580   -target | --target | --targe | --targ | --tar | --ta | --t)
581     ac_prev=target_alias ;;
582   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
583     target_alias=$ac_optarg ;;
584
585   -v | -verbose | --verbose | --verbos | --verbo | --verb)
586     verbose=yes ;;
587
588   -version | --version | --versio | --versi | --vers | -V)
589     ac_init_version=: ;;
590
591   -with-* | --with-*)
592     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
593     # Reject names that are not valid shell variable names.
594     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
595       { echo "$as_me: error: invalid package name: $ac_package" >&2
596    { (exit 1); exit 1; }; }
597     ac_package=`echo $ac_package| sed 's/-/_/g'`
598     case $ac_option in
599       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
600       *) ac_optarg=yes ;;
601     esac
602     eval "with_$ac_package='$ac_optarg'" ;;
603
604   -without-* | --without-*)
605     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
606     # Reject names that are not valid shell variable names.
607     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
608       { echo "$as_me: error: invalid package name: $ac_package" >&2
609    { (exit 1); exit 1; }; }
610     ac_package=`echo $ac_package | sed 's/-/_/g'`
611     eval "with_$ac_package=no" ;;
612
613   --x)
614     # Obsolete; use --with-x.
615     with_x=yes ;;
616
617   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
618   | --x-incl | --x-inc | --x-in | --x-i)
619     ac_prev=x_includes ;;
620   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
621   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
622     x_includes=$ac_optarg ;;
623
624   -x-libraries | --x-libraries | --x-librarie | --x-librari \
625   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
626     ac_prev=x_libraries ;;
627   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
628   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
629     x_libraries=$ac_optarg ;;
630
631   -*) { echo "$as_me: error: unrecognized option: $ac_option
632 Try \`$0 --help' for more information." >&2
633    { (exit 1); exit 1; }; }
634     ;;
635
636   *=*)
637     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
638     # Reject names that are not valid shell variable names.
639     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
640       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
641    { (exit 1); exit 1; }; }
642     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
643     eval "$ac_envvar='$ac_optarg'"
644     export $ac_envvar ;;
645
646   *)
647     # FIXME: should be removed in autoconf 3.0.
648     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
649     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
650       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
651     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
652     ;;
653
654   esac
655 done
656
657 if test -n "$ac_prev"; then
658   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
659   { echo "$as_me: error: missing argument to $ac_option" >&2
660    { (exit 1); exit 1; }; }
661 fi
662
663 # Be sure to have absolute paths.
664 for ac_var in exec_prefix prefix
665 do
666   eval ac_val=$`echo $ac_var`
667   case $ac_val in
668     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
669     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
670    { (exit 1); exit 1; }; };;
671   esac
672 done
673
674 # Be sure to have absolute paths.
675 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
676               localstatedir libdir includedir oldincludedir infodir mandir
677 do
678   eval ac_val=$`echo $ac_var`
679   case $ac_val in
680     [\\/$]* | ?:[\\/]* ) ;;
681     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
682    { (exit 1); exit 1; }; };;
683   esac
684 done
685
686 # There might be people who depend on the old broken behavior: `$host'
687 # used to hold the argument of --host etc.
688 # FIXME: To remove some day.
689 build=$build_alias
690 host=$host_alias
691 target=$target_alias
692
693 # FIXME: To remove some day.
694 if test "x$host_alias" != x; then
695   if test "x$build_alias" = x; then
696     cross_compiling=maybe
697     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
698     If a cross compiler is detected then cross compile mode will be used." >&2
699   elif test "x$build_alias" != "x$host_alias"; then
700     cross_compiling=yes
701   fi
702 fi
703
704 ac_tool_prefix=
705 test -n "$host_alias" && ac_tool_prefix=$host_alias-
706
707 test "$silent" = yes && exec 6>/dev/null
708
709
710 # Find the source files, if location was not specified.
711 if test -z "$srcdir"; then
712   ac_srcdir_defaulted=yes
713   # Try the directory containing this script, then its parent.
714   ac_confdir=`(dirname "$0") 2>/dev/null ||
715 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
716          X"$0" : 'X\(//\)[^/]' \| \
717          X"$0" : 'X\(//\)$' \| \
718          X"$0" : 'X\(/\)' \| \
719          .     : '\(.\)' 2>/dev/null ||
720 echo X"$0" |
721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
722           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
723           /^X\(\/\/\)$/{ s//\1/; q; }
724           /^X\(\/\).*/{ s//\1/; q; }
725           s/.*/./; q'`
726   srcdir=$ac_confdir
727   if test ! -r $srcdir/$ac_unique_file; then
728     srcdir=..
729   fi
730 else
731   ac_srcdir_defaulted=no
732 fi
733 if test ! -r $srcdir/$ac_unique_file; then
734   if test "$ac_srcdir_defaulted" = yes; then
735     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
736    { (exit 1); exit 1; }; }
737   else
738     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
739    { (exit 1); exit 1; }; }
740   fi
741 fi
742 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
743   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
744    { (exit 1); exit 1; }; }
745 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
746 ac_env_build_alias_set=${build_alias+set}
747 ac_env_build_alias_value=$build_alias
748 ac_cv_env_build_alias_set=${build_alias+set}
749 ac_cv_env_build_alias_value=$build_alias
750 ac_env_host_alias_set=${host_alias+set}
751 ac_env_host_alias_value=$host_alias
752 ac_cv_env_host_alias_set=${host_alias+set}
753 ac_cv_env_host_alias_value=$host_alias
754 ac_env_target_alias_set=${target_alias+set}
755 ac_env_target_alias_value=$target_alias
756 ac_cv_env_target_alias_set=${target_alias+set}
757 ac_cv_env_target_alias_value=$target_alias
758 ac_env_CC_set=${CC+set}
759 ac_env_CC_value=$CC
760 ac_cv_env_CC_set=${CC+set}
761 ac_cv_env_CC_value=$CC
762 ac_env_CFLAGS_set=${CFLAGS+set}
763 ac_env_CFLAGS_value=$CFLAGS
764 ac_cv_env_CFLAGS_set=${CFLAGS+set}
765 ac_cv_env_CFLAGS_value=$CFLAGS
766 ac_env_LDFLAGS_set=${LDFLAGS+set}
767 ac_env_LDFLAGS_value=$LDFLAGS
768 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
769 ac_cv_env_LDFLAGS_value=$LDFLAGS
770 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
771 ac_env_CPPFLAGS_value=$CPPFLAGS
772 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
773 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
774 ac_env_CPP_set=${CPP+set}
775 ac_env_CPP_value=$CPP
776 ac_cv_env_CPP_set=${CPP+set}
777 ac_cv_env_CPP_value=$CPP
778 ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
779 ac_env_LDFLAGS_SL_value=$LDFLAGS_SL
780 ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
781 ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL
782 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
783 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
784 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
785 ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
786
787 #
788 # Report the --help message.
789 #
790 if test "$ac_init_help" = "long"; then
791   # Omit some internal or obsolete options to make the list less imposing.
792   # This message is too long to be a string in the A/UX 3.1 sh.
793   cat <<_ACEOF
794 \`configure' configures PostgreSQL 8.2devel to adapt to many kinds of systems.
795
796 Usage: $0 [OPTION]... [VAR=VALUE]...
797
798 To assign environment variables (e.g., CC, CFLAGS...), specify them as
799 VAR=VALUE.  See below for descriptions of some of the useful variables.
800
801 Defaults for the options are specified in brackets.
802
803 Configuration:
804   -h, --help              display this help and exit
805       --help=short        display options specific to this package
806       --help=recursive    display the short help of all the included packages
807   -V, --version           display version information and exit
808   -q, --quiet, --silent   do not print \`checking...' messages
809       --cache-file=FILE   cache test results in FILE [disabled]
810   -C, --config-cache      alias for \`--cache-file=config.cache'
811   -n, --no-create         do not create output files
812       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
813
814 _ACEOF
815
816   cat <<_ACEOF
817 Installation directories:
818   --prefix=PREFIX         install architecture-independent files in PREFIX
819                           [$ac_default_prefix]
820   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
821                           [PREFIX]
822
823 By default, \`make install' will install all the files in
824 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
825 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
826 for instance \`--prefix=\$HOME'.
827
828 For better control, use the options below.
829
830 Fine tuning of the installation directories:
831   --bindir=DIR           user executables [EPREFIX/bin]
832   --sbindir=DIR          system admin executables [EPREFIX/sbin]
833   --libexecdir=DIR       program executables [EPREFIX/libexec]
834   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
835   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
836   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
837   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
838   --libdir=DIR           object code libraries [EPREFIX/lib]
839   --includedir=DIR       C header files [PREFIX/include]
840   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
841   --infodir=DIR          info documentation [PREFIX/info]
842   --mandir=DIR           man documentation [PREFIX/man]
843 _ACEOF
844
845   cat <<\_ACEOF
846
847 System types:
848   --build=BUILD     configure for building on BUILD [guessed]
849   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
850 _ACEOF
851 fi
852
853 if test -n "$ac_init_help"; then
854   case $ac_init_help in
855      short | recursive ) echo "Configuration of PostgreSQL 8.2devel:";;
856    esac
857   cat <<\_ACEOF
858
859 Optional Features:
860   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
861   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
862   --enable-integer-datetimes  enable 64-bit integer date/time support
863   --enable-nls[=LANGUAGES]  enable Native Language Support
864   --disable-shared        do not build shared libraries
865   --disable-rpath         do not embed shared library search path in executables
866   --disable-spinlocks     do not use spinlocks
867   --enable-debug          build with debugging symbols (-g)
868   --enable-dtrace         build with DTrace support
869   --enable-depend         turn on automatic dependency tracking
870   --enable-cassert        enable assertion checks (for debugging)
871   --enable-thread-safety  make client libraries thread-safe
872   --enable-thread-safety-force  force thread-safety in spite of thread test failure
873   --disable-largefile     omit support for large files
874
875 Optional Packages:
876   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
877   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
878
879   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
880   --without-docdir        do not install the documentation
881   --with-includes=DIRS    look for additional header files in DIRS
882   --with-libraries=DIRS   look for additional libraries in DIRS
883   --with-libs=DIRS        alternative spelling of --with-libraries
884   --with-pgport=PORTNUM   change default port number [5432]
885   --with-tcl              build Tcl modules (PL/Tcl)
886   --with-tclconfig=DIR    tclConfig.sh is in DIR
887   --with-perl             build Perl modules (PL/Perl)
888   --with-python           build Python modules (PL/Python)
889   --with-krb5             build with Kerberos 5 support
890   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
891   --with-pam              build with PAM support
892   --with-ldap             build with LDAP support
893   --with-bonjour          build with Bonjour support
894   --with-openssl          build with OpenSSL support
895   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
896   --without-readline      do not use GNU Readline / BSD Libedit line editing
897   --without-zlib          do not use Zlib
898   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
899
900 Some influential environment variables:
901   CC          C compiler command
902   CFLAGS      C compiler flags
903   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
904               nonstandard directory <lib dir>
905   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
906               headers in a nonstandard directory <include dir>
907   CPP         C preprocessor
908   LDFLAGS_SL
909   DOCBOOKSTYLE
910               location of DocBook stylesheets
911
912 Use these variables to override the choices made by `configure' or to help
913 it to find libraries and programs with nonstandard names/locations.
914
915 Report bugs to <pgsql-bugs@postgresql.org>.
916 _ACEOF
917 fi
918
919 if test "$ac_init_help" = "recursive"; then
920   # If there are subdirs, report their specific --help.
921   ac_popdir=`pwd`
922   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
923     test -d $ac_dir || continue
924     ac_builddir=.
925
926 if test "$ac_dir" != .; then
927   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
928   # A "../" for each directory in $ac_dir_suffix.
929   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
930 else
931   ac_dir_suffix= ac_top_builddir=
932 fi
933
934 case $srcdir in
935   .)  # No --srcdir option.  We are building in place.
936     ac_srcdir=.
937     if test -z "$ac_top_builddir"; then
938        ac_top_srcdir=.
939     else
940        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
941     fi ;;
942   [\\/]* | ?:[\\/]* )  # Absolute path.
943     ac_srcdir=$srcdir$ac_dir_suffix;
944     ac_top_srcdir=$srcdir ;;
945   *) # Relative path.
946     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
947     ac_top_srcdir=$ac_top_builddir$srcdir ;;
948 esac
949
950 # Do not use `cd foo && pwd` to compute absolute paths, because
951 # the directories may not exist.
952 case `pwd` in
953 .) ac_abs_builddir="$ac_dir";;
954 *)
955   case "$ac_dir" in
956   .) ac_abs_builddir=`pwd`;;
957   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
958   *) ac_abs_builddir=`pwd`/"$ac_dir";;
959   esac;;
960 esac
961 case $ac_abs_builddir in
962 .) ac_abs_top_builddir=${ac_top_builddir}.;;
963 *)
964   case ${ac_top_builddir}. in
965   .) ac_abs_top_builddir=$ac_abs_builddir;;
966   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
967   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
968   esac;;
969 esac
970 case $ac_abs_builddir in
971 .) ac_abs_srcdir=$ac_srcdir;;
972 *)
973   case $ac_srcdir in
974   .) ac_abs_srcdir=$ac_abs_builddir;;
975   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
976   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
977   esac;;
978 esac
979 case $ac_abs_builddir in
980 .) ac_abs_top_srcdir=$ac_top_srcdir;;
981 *)
982   case $ac_top_srcdir in
983   .) ac_abs_top_srcdir=$ac_abs_builddir;;
984   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
985   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
986   esac;;
987 esac
988
989     cd $ac_dir
990     # Check for guested configure; otherwise get Cygnus style configure.
991     if test -f $ac_srcdir/configure.gnu; then
992       echo
993       $SHELL $ac_srcdir/configure.gnu  --help=recursive
994     elif test -f $ac_srcdir/configure; then
995       echo
996       $SHELL $ac_srcdir/configure  --help=recursive
997     elif test -f $ac_srcdir/configure.ac ||
998            test -f $ac_srcdir/configure.in; then
999       echo
1000       $ac_configure --help
1001     else
1002       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1003     fi
1004     cd "$ac_popdir"
1005   done
1006 fi
1007
1008 test -n "$ac_init_help" && exit 0
1009 if $ac_init_version; then
1010   cat <<\_ACEOF
1011 PostgreSQL configure 8.2devel
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.2devel, 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"                   || test ! -s conftest.err'
2423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2424   (eval $ac_try) 2>&5
2425   ac_status=$?
2426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427   (exit $ac_status); }; } &&
2428          { ac_try='test -s conftest.$ac_objext'
2429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2430   (eval $ac_try) 2>&5
2431   ac_status=$?
2432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2433   (exit $ac_status); }; }; then
2434   ac_compiler_gnu=yes
2435 else
2436   echo "$as_me: failed program was:" >&5
2437 sed 's/^/| /' conftest.$ac_ext >&5
2438
2439 ac_compiler_gnu=no
2440 fi
2441 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2442 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2443
2444 fi
2445 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2446 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2447 GCC=`test $ac_compiler_gnu = yes && echo yes`
2448 ac_test_CFLAGS=${CFLAGS+set}
2449 ac_save_CFLAGS=$CFLAGS
2450 CFLAGS="-g"
2451 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2452 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2453 if test "${ac_cv_prog_cc_g+set}" = set; then
2454   echo $ECHO_N "(cached) $ECHO_C" >&6
2455 else
2456   cat >conftest.$ac_ext <<_ACEOF
2457 /* confdefs.h.  */
2458 _ACEOF
2459 cat confdefs.h >>conftest.$ac_ext
2460 cat >>conftest.$ac_ext <<_ACEOF
2461 /* end confdefs.h.  */
2462
2463 int
2464 main ()
2465 {
2466
2467   ;
2468   return 0;
2469 }
2470 _ACEOF
2471 rm -f conftest.$ac_objext
2472 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2473   (eval $ac_compile) 2>conftest.er1
2474   ac_status=$?
2475   grep -v '^ *+' conftest.er1 >conftest.err
2476   rm -f conftest.er1
2477   cat conftest.err >&5
2478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2479   (exit $ac_status); } &&
2480          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
2481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2482   (eval $ac_try) 2>&5
2483   ac_status=$?
2484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2485   (exit $ac_status); }; } &&
2486          { ac_try='test -s conftest.$ac_objext'
2487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2488   (eval $ac_try) 2>&5
2489   ac_status=$?
2490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2491   (exit $ac_status); }; }; then
2492   ac_cv_prog_cc_g=yes
2493 else
2494   echo "$as_me: failed program was:" >&5
2495 sed 's/^/| /' conftest.$ac_ext >&5
2496
2497 ac_cv_prog_cc_g=no
2498 fi
2499 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2500 fi
2501 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2502 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2503 if test "$ac_test_CFLAGS" = set; then
2504   CFLAGS=$ac_save_CFLAGS
2505 elif test $ac_cv_prog_cc_g = yes; then
2506   if test "$GCC" = yes; then
2507     CFLAGS="-g -O2"
2508   else
2509     CFLAGS="-g"
2510   fi
2511 else
2512   if test "$GCC" = yes; then
2513     CFLAGS="-O2"
2514   else
2515     CFLAGS=
2516   fi
2517 fi
2518 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2519 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2520 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2521   echo $ECHO_N "(cached) $ECHO_C" >&6
2522 else
2523   ac_cv_prog_cc_stdc=no
2524 ac_save_CC=$CC
2525 cat >conftest.$ac_ext <<_ACEOF
2526 /* confdefs.h.  */
2527 _ACEOF
2528 cat confdefs.h >>conftest.$ac_ext
2529 cat >>conftest.$ac_ext <<_ACEOF
2530 /* end confdefs.h.  */
2531 #include <stdarg.h>
2532 #include <stdio.h>
2533 #include <sys/types.h>
2534 #include <sys/stat.h>
2535 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2536 struct buf { int x; };
2537 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2538 static char *e (p, i)
2539      char **p;
2540      int i;
2541 {
2542   return p[i];
2543 }
2544 static char *f (char * (*g) (char **, int), char **p, ...)
2545 {
2546   char *s;
2547   va_list v;
2548   va_start (v,p);
2549   s = g (p, va_arg (v,int));
2550   va_end (v);
2551   return s;
2552 }
2553
2554 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2555    function prototypes and stuff, but not '\xHH' hex character constants.
2556    These don't provoke an error unfortunately, instead are silently treated
2557    as 'x'.  The following induces an error, until -std1 is added to get
2558    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2559    array size at least.  It's necessary to write '\x00'==0 to get something
2560    that's true only with -std1.  */
2561 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2562
2563 int test (int i, double x);
2564 struct s1 {int (*f) (int a);};
2565 struct s2 {int (*f) (double a);};
2566 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2567 int argc;
2568 char **argv;
2569 int
2570 main ()
2571 {
2572 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2573   ;
2574   return 0;
2575 }
2576 _ACEOF
2577 # Don't try gcc -ansi; that turns off useful extensions and
2578 # breaks some systems' header files.
2579 # AIX                   -qlanglvl=ansi
2580 # Ultrix and OSF/1      -std1
2581 # HP-UX 10.20 and later -Ae
2582 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2583 # SVR4                  -Xc -D__EXTENSIONS__
2584 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2585 do
2586   CC="$ac_save_CC $ac_arg"
2587   rm -f conftest.$ac_objext
2588 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2589   (eval $ac_compile) 2>conftest.er1
2590   ac_status=$?
2591   grep -v '^ *+' conftest.er1 >conftest.err
2592   rm -f conftest.er1
2593   cat conftest.err >&5
2594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2595   (exit $ac_status); } &&
2596          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
2597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2598   (eval $ac_try) 2>&5
2599   ac_status=$?
2600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2601   (exit $ac_status); }; } &&
2602          { ac_try='test -s conftest.$ac_objext'
2603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2604   (eval $ac_try) 2>&5
2605   ac_status=$?
2606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2607   (exit $ac_status); }; }; then
2608   ac_cv_prog_cc_stdc=$ac_arg
2609 break
2610 else
2611   echo "$as_me: failed program was:" >&5
2612 sed 's/^/| /' conftest.$ac_ext >&5
2613
2614 fi
2615 rm -f conftest.err conftest.$ac_objext
2616 done
2617 rm -f conftest.$ac_ext conftest.$ac_objext
2618 CC=$ac_save_CC
2619
2620 fi
2621
2622 case "x$ac_cv_prog_cc_stdc" in
2623   x|xno)
2624     echo "$as_me:$LINENO: result: none needed" >&5
2625 echo "${ECHO_T}none needed" >&6 ;;
2626   *)
2627     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2628 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2629     CC="$CC $ac_cv_prog_cc_stdc" ;;
2630 esac
2631
2632 # Some people use a C++ compiler to compile C.  Since we use `exit',
2633 # in C++ we need to declare it.  In case someone uses the same compiler
2634 # for both compiling C and C++ we need to have the C++ compiler decide
2635 # the declaration of exit, since it's the most demanding environment.
2636 cat >conftest.$ac_ext <<_ACEOF
2637 #ifndef __cplusplus
2638   choke me
2639 #endif
2640 _ACEOF
2641 rm -f conftest.$ac_objext
2642 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2643   (eval $ac_compile) 2>conftest.er1
2644   ac_status=$?
2645   grep -v '^ *+' conftest.er1 >conftest.err
2646   rm -f conftest.er1
2647   cat conftest.err >&5
2648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2649   (exit $ac_status); } &&
2650          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
2651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2652   (eval $ac_try) 2>&5
2653   ac_status=$?
2654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655   (exit $ac_status); }; } &&
2656          { ac_try='test -s conftest.$ac_objext'
2657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2658   (eval $ac_try) 2>&5
2659   ac_status=$?
2660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661   (exit $ac_status); }; }; then
2662   for ac_declaration in \
2663    '' \
2664    'extern "C" void std::exit (int) throw (); using std::exit;' \
2665    'extern "C" void std::exit (int); using std::exit;' \
2666    'extern "C" void exit (int) throw ();' \
2667    'extern "C" void exit (int);' \
2668    'void exit (int);'
2669 do
2670   cat >conftest.$ac_ext <<_ACEOF
2671 /* confdefs.h.  */
2672 _ACEOF
2673 cat confdefs.h >>conftest.$ac_ext
2674 cat >>conftest.$ac_ext <<_ACEOF
2675 /* end confdefs.h.  */
2676 $ac_declaration
2677 #include <stdlib.h>
2678 int
2679 main ()
2680 {
2681 exit (42);
2682   ;
2683   return 0;
2684 }
2685 _ACEOF
2686 rm -f conftest.$ac_objext
2687 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2688   (eval $ac_compile) 2>conftest.er1
2689   ac_status=$?
2690   grep -v '^ *+' conftest.er1 >conftest.err
2691   rm -f conftest.er1
2692   cat conftest.err >&5
2693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2694   (exit $ac_status); } &&
2695          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
2696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2697   (eval $ac_try) 2>&5
2698   ac_status=$?
2699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2700   (exit $ac_status); }; } &&
2701          { ac_try='test -s conftest.$ac_objext'
2702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2703   (eval $ac_try) 2>&5
2704   ac_status=$?
2705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2706   (exit $ac_status); }; }; then
2707   :
2708 else
2709   echo "$as_me: failed program was:" >&5
2710 sed 's/^/| /' conftest.$ac_ext >&5
2711
2712 continue
2713 fi
2714 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2715   cat >conftest.$ac_ext <<_ACEOF
2716 /* confdefs.h.  */
2717 _ACEOF
2718 cat confdefs.h >>conftest.$ac_ext
2719 cat >>conftest.$ac_ext <<_ACEOF
2720 /* end confdefs.h.  */
2721 $ac_declaration
2722 int
2723 main ()
2724 {
2725 exit (42);
2726   ;
2727   return 0;
2728 }
2729 _ACEOF
2730 rm -f conftest.$ac_objext
2731 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2732   (eval $ac_compile) 2>conftest.er1
2733   ac_status=$?
2734   grep -v '^ *+' conftest.er1 >conftest.err
2735   rm -f conftest.er1
2736   cat conftest.err >&5
2737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2738   (exit $ac_status); } &&
2739          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
2740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2741   (eval $ac_try) 2>&5
2742   ac_status=$?
2743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2744   (exit $ac_status); }; } &&
2745          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
2751   break
2752 else
2753   echo "$as_me: failed program was:" >&5
2754 sed 's/^/| /' conftest.$ac_ext >&5
2755
2756 fi
2757 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2758 done
2759 rm -f conftest*
2760 if test -n "$ac_declaration"; then
2761   echo '#ifdef __cplusplus' >>confdefs.h
2762   echo $ac_declaration      >>confdefs.h
2763   echo '#endif'             >>confdefs.h
2764 fi
2765
2766 else
2767   echo "$as_me: failed program was:" >&5
2768 sed 's/^/| /' conftest.$ac_ext >&5
2769
2770 fi
2771 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2772 ac_ext=c
2773 ac_cpp='$CPP $CPPFLAGS'
2774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2777
2778
2779 unset CFLAGS
2780
2781 #
2782 # Read the template
2783 #
2784 . "$srcdir/src/template/$template" || exit
2785
2786 # CFLAGS are selected so:
2787 # If the user specifies something in the environment, that is used.
2788 # else:  If the template file set something, that is used.
2789 # else:  If the compiler is GCC, then we use -O2.
2790 # else:  If the compiler is something else, then we use -0.
2791
2792 if test "$ac_env_CFLAGS_set" = set; then
2793   CFLAGS=$ac_env_CFLAGS_value
2794 elif test "${CFLAGS+set}" = set; then
2795   : # (keep what template set)
2796 elif test "$GCC" = yes; then
2797   CFLAGS="-O2"
2798 else
2799   # if the user selected debug mode, don't use -O
2800   if test "$enable_debug" != yes; then
2801     CFLAGS="-O"
2802   fi
2803 fi
2804
2805 # Some versions of GCC support some additional useful warning flags.
2806 # Check whether they are supported, and add them to CFLAGS if so.
2807
2808 if test "$GCC" = yes; then
2809
2810 # ICC pretends to be GCC but it's lying; it doesn't support these options.
2811 # So we have to check if "GCC" is really ICC.
2812
2813 cat >conftest.$ac_ext <<_ACEOF
2814 /* confdefs.h.  */
2815 _ACEOF
2816 cat confdefs.h >>conftest.$ac_ext
2817 cat >>conftest.$ac_ext <<_ACEOF
2818 /* end confdefs.h.  */
2819
2820 int
2821 main ()
2822 {
2823 #ifndef __INTEL_COMPILER
2824 choke me
2825 #endif
2826   ;
2827   return 0;
2828 }
2829 _ACEOF
2830 rm -f conftest.$ac_objext
2831 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2832   (eval $ac_compile) 2>conftest.er1
2833   ac_status=$?
2834   grep -v '^ *+' conftest.er1 >conftest.err
2835   rm -f conftest.er1
2836   cat conftest.err >&5
2837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838   (exit $ac_status); } &&
2839          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
2840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2841   (eval $ac_try) 2>&5
2842   ac_status=$?
2843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2844   (exit $ac_status); }; } &&
2845          { ac_try='test -s conftest.$ac_objext'
2846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2847   (eval $ac_try) 2>&5
2848   ac_status=$?
2849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850   (exit $ac_status); }; }; then
2851   ICC=yes
2852 else
2853   echo "$as_me: failed program was:" >&5
2854 sed 's/^/| /' conftest.$ac_ext >&5
2855
2856 ICC=no
2857 fi
2858 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2859
2860   if test "$ICC" = no; then
2861     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2862
2863     echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2864 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2865 pgac_save_CFLAGS=$CFLAGS
2866 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2867 cat >conftest.$ac_ext <<_ACEOF
2868 /* confdefs.h.  */
2869 _ACEOF
2870 cat confdefs.h >>conftest.$ac_ext
2871 cat >>conftest.$ac_ext <<_ACEOF
2872 /* end confdefs.h.  */
2873
2874 int
2875 main ()
2876 {
2877
2878   ;
2879   return 0;
2880 }
2881 _ACEOF
2882 rm -f conftest.$ac_objext
2883 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2884   (eval $ac_compile) 2>conftest.er1
2885   ac_status=$?
2886   grep -v '^ *+' conftest.er1 >conftest.err
2887   rm -f conftest.er1
2888   cat conftest.err >&5
2889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2890   (exit $ac_status); } &&
2891          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
2892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2893   (eval $ac_try) 2>&5
2894   ac_status=$?
2895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2896   (exit $ac_status); }; } &&
2897          { ac_try='test -s conftest.$ac_objext'
2898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2899   (eval $ac_try) 2>&5
2900   ac_status=$?
2901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2902   (exit $ac_status); }; }; then
2903   echo "$as_me:$LINENO: result: yes" >&5
2904 echo "${ECHO_T}yes" >&6
2905 else
2906   echo "$as_me: failed program was:" >&5
2907 sed 's/^/| /' conftest.$ac_ext >&5
2908
2909 CFLAGS="$pgac_save_CFLAGS"
2910                     echo "$as_me:$LINENO: result: no" >&5
2911 echo "${ECHO_T}no" >&6
2912 fi
2913 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2914
2915     echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2916 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2917 pgac_save_CFLAGS=$CFLAGS
2918 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2919 cat >conftest.$ac_ext <<_ACEOF
2920 /* confdefs.h.  */
2921 _ACEOF
2922 cat confdefs.h >>conftest.$ac_ext
2923 cat >>conftest.$ac_ext <<_ACEOF
2924 /* end confdefs.h.  */
2925
2926 int
2927 main ()
2928 {
2929
2930   ;
2931   return 0;
2932 }
2933 _ACEOF
2934 rm -f conftest.$ac_objext
2935 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2936   (eval $ac_compile) 2>conftest.er1
2937   ac_status=$?
2938   grep -v '^ *+' conftest.er1 >conftest.err
2939   rm -f conftest.er1
2940   cat conftest.err >&5
2941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2942   (exit $ac_status); } &&
2943          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
2944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2945   (eval $ac_try) 2>&5
2946   ac_status=$?
2947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2948   (exit $ac_status); }; } &&
2949          { ac_try='test -s conftest.$ac_objext'
2950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2951   (eval $ac_try) 2>&5
2952   ac_status=$?
2953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2954   (exit $ac_status); }; }; then
2955   echo "$as_me:$LINENO: result: yes" >&5
2956 echo "${ECHO_T}yes" >&6
2957 else
2958   echo "$as_me: failed program was:" >&5
2959 sed 's/^/| /' conftest.$ac_ext >&5
2960
2961 CFLAGS="$pgac_save_CFLAGS"
2962                     echo "$as_me:$LINENO: result: no" >&5
2963 echo "${ECHO_T}no" >&6
2964 fi
2965 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2966
2967   else
2968     # Intel compiler has a bug/misoptimization in checking for
2969     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
2970     # CFLAGS.
2971     echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
2972 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6
2973 pgac_save_CFLAGS=$CFLAGS
2974 CFLAGS="$pgac_save_CFLAGS -mp1"
2975 cat >conftest.$ac_ext <<_ACEOF
2976 /* confdefs.h.  */
2977 _ACEOF
2978 cat confdefs.h >>conftest.$ac_ext
2979 cat >>conftest.$ac_ext <<_ACEOF
2980 /* end confdefs.h.  */
2981
2982 int
2983 main ()
2984 {
2985
2986   ;
2987   return 0;
2988 }
2989 _ACEOF
2990 rm -f conftest.$ac_objext
2991 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2992   (eval $ac_compile) 2>conftest.er1
2993   ac_status=$?
2994   grep -v '^ *+' conftest.er1 >conftest.err
2995   rm -f conftest.er1
2996   cat conftest.err >&5
2997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2998   (exit $ac_status); } &&
2999          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3001   (eval $ac_try) 2>&5
3002   ac_status=$?
3003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3004   (exit $ac_status); }; } &&
3005          { ac_try='test -s conftest.$ac_objext'
3006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3007   (eval $ac_try) 2>&5
3008   ac_status=$?
3009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3010   (exit $ac_status); }; }; then
3011   echo "$as_me:$LINENO: result: yes" >&5
3012 echo "${ECHO_T}yes" >&6
3013 else
3014   echo "$as_me: failed program was:" >&5
3015 sed 's/^/| /' conftest.$ac_ext >&5
3016
3017 CFLAGS="$pgac_save_CFLAGS"
3018                     echo "$as_me:$LINENO: result: no" >&5
3019 echo "${ECHO_T}no" >&6
3020 fi
3021 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3022
3023   fi
3024
3025   # Disable strict-aliasing rules; needed for gcc 3.3+
3026   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3027 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
3028 pgac_save_CFLAGS=$CFLAGS
3029 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3030 cat >conftest.$ac_ext <<_ACEOF
3031 /* confdefs.h.  */
3032 _ACEOF
3033 cat confdefs.h >>conftest.$ac_ext
3034 cat >>conftest.$ac_ext <<_ACEOF
3035 /* end confdefs.h.  */
3036
3037 int
3038 main ()
3039 {
3040
3041   ;
3042   return 0;
3043 }
3044 _ACEOF
3045 rm -f conftest.$ac_objext
3046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3047   (eval $ac_compile) 2>conftest.er1
3048   ac_status=$?
3049   grep -v '^ *+' conftest.er1 >conftest.err
3050   rm -f conftest.er1
3051   cat conftest.err >&5
3052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3053   (exit $ac_status); } &&
3054          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3056   (eval $ac_try) 2>&5
3057   ac_status=$?
3058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3059   (exit $ac_status); }; } &&
3060          { ac_try='test -s conftest.$ac_objext'
3061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3062   (eval $ac_try) 2>&5
3063   ac_status=$?
3064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3065   (exit $ac_status); }; }; then
3066   echo "$as_me:$LINENO: result: yes" >&5
3067 echo "${ECHO_T}yes" >&6
3068 else
3069   echo "$as_me: failed program was:" >&5
3070 sed 's/^/| /' conftest.$ac_ext >&5
3071
3072 CFLAGS="$pgac_save_CFLAGS"
3073                     echo "$as_me:$LINENO: result: no" >&5
3074 echo "${ECHO_T}no" >&6
3075 fi
3076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3077
3078 elif test x"${CC}" = x"xlc"; then
3079   # AIX xlc has to have strict aliasing turned off too
3080   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3081 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
3082 pgac_save_CFLAGS=$CFLAGS
3083 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3084 cat >conftest.$ac_ext <<_ACEOF
3085 /* confdefs.h.  */
3086 _ACEOF
3087 cat confdefs.h >>conftest.$ac_ext
3088 cat >>conftest.$ac_ext <<_ACEOF
3089 /* end confdefs.h.  */
3090
3091 int
3092 main ()
3093 {
3094
3095   ;
3096   return 0;
3097 }
3098 _ACEOF
3099 rm -f conftest.$ac_objext
3100 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3101   (eval $ac_compile) 2>conftest.er1
3102   ac_status=$?
3103   grep -v '^ *+' conftest.er1 >conftest.err
3104   rm -f conftest.er1
3105   cat conftest.err >&5
3106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3107   (exit $ac_status); } &&
3108          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3110   (eval $ac_try) 2>&5
3111   ac_status=$?
3112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3113   (exit $ac_status); }; } &&
3114          { ac_try='test -s conftest.$ac_objext'
3115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3116   (eval $ac_try) 2>&5
3117   ac_status=$?
3118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3119   (exit $ac_status); }; }; then
3120   echo "$as_me:$LINENO: result: yes" >&5
3121 echo "${ECHO_T}yes" >&6
3122 else
3123   echo "$as_me: failed program was:" >&5
3124 sed 's/^/| /' conftest.$ac_ext >&5
3125
3126 CFLAGS="$pgac_save_CFLAGS"
3127                     echo "$as_me:$LINENO: result: no" >&5
3128 echo "${ECHO_T}no" >&6
3129 fi
3130 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3131
3132 fi
3133
3134 # supply -g if --enable-debug
3135 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3136   CFLAGS="$CFLAGS -g"
3137 fi
3138
3139 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3140 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3141
3142 # We already have this in Makefile.win32, but configure needs it too
3143 if test "$PORTNAME" = "win32"; then
3144   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3145 fi
3146
3147 # Check if the compiler still works with the template settings
3148 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3149 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
3150 cat >conftest.$ac_ext <<_ACEOF
3151 /* confdefs.h.  */
3152 _ACEOF
3153 cat confdefs.h >>conftest.$ac_ext
3154 cat >>conftest.$ac_ext <<_ACEOF
3155 /* end confdefs.h.  */
3156
3157 int
3158 main ()
3159 {
3160 return 0;
3161   ;
3162   return 0;
3163 }
3164 _ACEOF
3165 rm -f conftest.$ac_objext conftest$ac_exeext
3166 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3167   (eval $ac_link) 2>conftest.er1
3168   ac_status=$?
3169   grep -v '^ *+' conftest.er1 >conftest.err
3170   rm -f conftest.er1
3171   cat conftest.err >&5
3172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3173   (exit $ac_status); } &&
3174          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3176   (eval $ac_try) 2>&5
3177   ac_status=$?
3178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3179   (exit $ac_status); }; } &&
3180          { ac_try='test -s conftest$ac_exeext'
3181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3182   (eval $ac_try) 2>&5
3183   ac_status=$?
3184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3185   (exit $ac_status); }; }; then
3186   echo "$as_me:$LINENO: result: yes" >&5
3187 echo "${ECHO_T}yes" >&6
3188 else
3189   echo "$as_me: failed program was:" >&5
3190 sed 's/^/| /' conftest.$ac_ext >&5
3191
3192 echo "$as_me:$LINENO: result: no" >&5
3193 echo "${ECHO_T}no" >&6
3194    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3195 echo "$as_me: error: cannot proceed" >&2;}
3196    { (exit 1); exit 1; }; }
3197 fi
3198 rm -f conftest.err conftest.$ac_objext \
3199       conftest$ac_exeext conftest.$ac_ext
3200
3201 # Defend against gcc -ffast-math
3202 if test "$GCC" = yes; then
3203 cat >conftest.$ac_ext <<_ACEOF
3204 /* confdefs.h.  */
3205 _ACEOF
3206 cat confdefs.h >>conftest.$ac_ext
3207 cat >>conftest.$ac_ext <<_ACEOF
3208 /* end confdefs.h.  */
3209
3210 int
3211 main ()
3212 {
3213 #ifdef __FAST_MATH__
3214 choke me
3215 #endif
3216   ;
3217   return 0;
3218 }
3219 _ACEOF
3220 rm -f conftest.$ac_objext
3221 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3222   (eval $ac_compile) 2>conftest.er1
3223   ac_status=$?
3224   grep -v '^ *+' conftest.er1 >conftest.err
3225   rm -f conftest.er1
3226   cat conftest.err >&5
3227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3228   (exit $ac_status); } &&
3229          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3231   (eval $ac_try) 2>&5
3232   ac_status=$?
3233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3234   (exit $ac_status); }; } &&
3235          { ac_try='test -s conftest.$ac_objext'
3236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3237   (eval $ac_try) 2>&5
3238   ac_status=$?
3239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3240   (exit $ac_status); }; }; then
3241   :
3242 else
3243   echo "$as_me: failed program was:" >&5
3244 sed 's/^/| /' conftest.$ac_ext >&5
3245
3246 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3247 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3248    { (exit 1); exit 1; }; }
3249 fi
3250 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3251 fi
3252
3253 ac_ext=c
3254 ac_cpp='$CPP $CPPFLAGS'
3255 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3256 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3257 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3258 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3259 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3260 # On Suns, sometimes $CPP names a directory.
3261 if test -n "$CPP" && test -d "$CPP"; then
3262   CPP=
3263 fi
3264 if test -z "$CPP"; then
3265   if test "${ac_cv_prog_CPP+set}" = set; then
3266   echo $ECHO_N "(cached) $ECHO_C" >&6
3267 else
3268       # Double quotes because CPP needs to be expanded
3269     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3270     do
3271       ac_preproc_ok=false
3272 for ac_c_preproc_warn_flag in '' yes
3273 do
3274   # Use a header file that comes with gcc, so configuring glibc
3275   # with a fresh cross-compiler works.
3276   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3277   # <limits.h> exists even on freestanding compilers.
3278   # On the NeXT, cc -E runs the code through the compiler's parser,
3279   # not just through cpp. "Syntax error" is here to catch this case.
3280   cat >conftest.$ac_ext <<_ACEOF
3281 /* confdefs.h.  */
3282 _ACEOF
3283 cat confdefs.h >>conftest.$ac_ext
3284 cat >>conftest.$ac_ext <<_ACEOF
3285 /* end confdefs.h.  */
3286 #ifdef __STDC__
3287 # include <limits.h>
3288 #else
3289 # include <assert.h>
3290 #endif
3291                      Syntax error
3292 _ACEOF
3293 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3295   ac_status=$?
3296   grep -v '^ *+' conftest.er1 >conftest.err
3297   rm -f conftest.er1
3298   cat conftest.err >&5
3299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3300   (exit $ac_status); } >/dev/null; then
3301   if test -s conftest.err; then
3302     ac_cpp_err=$ac_c_preproc_warn_flag
3303     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3304   else
3305     ac_cpp_err=
3306   fi
3307 else
3308   ac_cpp_err=yes
3309 fi
3310 if test -z "$ac_cpp_err"; then
3311   :
3312 else
3313   echo "$as_me: failed program was:" >&5
3314 sed 's/^/| /' conftest.$ac_ext >&5
3315
3316   # Broken: fails on valid input.
3317 continue
3318 fi
3319 rm -f conftest.err conftest.$ac_ext
3320
3321   # OK, works on sane cases.  Now check whether non-existent headers
3322   # can be detected and how.
3323   cat >conftest.$ac_ext <<_ACEOF
3324 /* confdefs.h.  */
3325 _ACEOF
3326 cat confdefs.h >>conftest.$ac_ext
3327 cat >>conftest.$ac_ext <<_ACEOF
3328 /* end confdefs.h.  */
3329 #include <ac_nonexistent.h>
3330 _ACEOF
3331 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3332   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3333   ac_status=$?
3334   grep -v '^ *+' conftest.er1 >conftest.err
3335   rm -f conftest.er1
3336   cat conftest.err >&5
3337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3338   (exit $ac_status); } >/dev/null; then
3339   if test -s conftest.err; then
3340     ac_cpp_err=$ac_c_preproc_warn_flag
3341     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3342   else
3343     ac_cpp_err=
3344   fi
3345 else
3346   ac_cpp_err=yes
3347 fi
3348 if test -z "$ac_cpp_err"; then
3349   # Broken: success on invalid input.
3350 continue
3351 else
3352   echo "$as_me: failed program was:" >&5
3353 sed 's/^/| /' conftest.$ac_ext >&5
3354
3355   # Passes both tests.
3356 ac_preproc_ok=:
3357 break
3358 fi
3359 rm -f conftest.err conftest.$ac_ext
3360
3361 done
3362 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3363 rm -f conftest.err conftest.$ac_ext
3364 if $ac_preproc_ok; then
3365   break
3366 fi
3367
3368     done
3369     ac_cv_prog_CPP=$CPP
3370
3371 fi
3372   CPP=$ac_cv_prog_CPP
3373 else
3374   ac_cv_prog_CPP=$CPP
3375 fi
3376 echo "$as_me:$LINENO: result: $CPP" >&5
3377 echo "${ECHO_T}$CPP" >&6
3378 ac_preproc_ok=false
3379 for ac_c_preproc_warn_flag in '' yes
3380 do
3381   # Use a header file that comes with gcc, so configuring glibc
3382   # with a fresh cross-compiler works.
3383   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3384   # <limits.h> exists even on freestanding compilers.
3385   # On the NeXT, cc -E runs the code through the compiler's parser,
3386   # not just through cpp. "Syntax error" is here to catch this case.
3387   cat >conftest.$ac_ext <<_ACEOF
3388 /* confdefs.h.  */
3389 _ACEOF
3390 cat confdefs.h >>conftest.$ac_ext
3391 cat >>conftest.$ac_ext <<_ACEOF
3392 /* end confdefs.h.  */
3393 #ifdef __STDC__
3394 # include <limits.h>
3395 #else
3396 # include <assert.h>
3397 #endif
3398                      Syntax error
3399 _ACEOF
3400 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3401   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3402   ac_status=$?
3403   grep -v '^ *+' conftest.er1 >conftest.err
3404   rm -f conftest.er1
3405   cat conftest.err >&5
3406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3407   (exit $ac_status); } >/dev/null; then
3408   if test -s conftest.err; then
3409     ac_cpp_err=$ac_c_preproc_warn_flag
3410     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3411   else
3412     ac_cpp_err=
3413   fi
3414 else
3415   ac_cpp_err=yes
3416 fi
3417 if test -z "$ac_cpp_err"; then
3418   :
3419 else
3420   echo "$as_me: failed program was:" >&5
3421 sed 's/^/| /' conftest.$ac_ext >&5
3422
3423   # Broken: fails on valid input.
3424 continue
3425 fi
3426 rm -f conftest.err conftest.$ac_ext
3427
3428   # OK, works on sane cases.  Now check whether non-existent headers
3429   # can be detected and how.
3430   cat >conftest.$ac_ext <<_ACEOF
3431 /* confdefs.h.  */
3432 _ACEOF
3433 cat confdefs.h >>conftest.$ac_ext
3434 cat >>conftest.$ac_ext <<_ACEOF
3435 /* end confdefs.h.  */
3436 #include <ac_nonexistent.h>
3437 _ACEOF
3438 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3439   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3440   ac_status=$?
3441   grep -v '^ *+' conftest.er1 >conftest.err
3442   rm -f conftest.er1
3443   cat conftest.err >&5
3444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3445   (exit $ac_status); } >/dev/null; then
3446   if test -s conftest.err; then
3447     ac_cpp_err=$ac_c_preproc_warn_flag
3448     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3449   else
3450     ac_cpp_err=
3451   fi
3452 else
3453   ac_cpp_err=yes
3454 fi
3455 if test -z "$ac_cpp_err"; then
3456   # Broken: success on invalid input.
3457 continue
3458 else
3459   echo "$as_me: failed program was:" >&5
3460 sed 's/^/| /' conftest.$ac_ext >&5
3461
3462   # Passes both tests.
3463 ac_preproc_ok=:
3464 break
3465 fi
3466 rm -f conftest.err conftest.$ac_ext
3467
3468 done
3469 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3470 rm -f conftest.err conftest.$ac_ext
3471 if $ac_preproc_ok; then
3472   :
3473 else
3474   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3475 See \`config.log' for more details." >&5
3476 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3477 See \`config.log' for more details." >&2;}
3478    { (exit 1); exit 1; }; }
3479 fi
3480
3481 ac_ext=c
3482 ac_cpp='$CPP $CPPFLAGS'
3483 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3484 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3485 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3486
3487
3488
3489 # Create compiler version string
3490 if test x"$GCC" = x"yes" ; then
3491   cc_string="GCC `${CC} --version | sed q`"
3492 else
3493   cc_string=$CC
3494 fi
3495
3496 cat >>confdefs.h <<_ACEOF
3497 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3498 _ACEOF
3499
3500
3501
3502 #
3503 # Set up TAS assembly code if needed; the template file has now had its
3504 # chance to request this.
3505 #
3506           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3507
3508
3509 if test "$need_tas" = yes ; then
3510   TAS=tas.o
3511 else
3512   TAS=""
3513 fi
3514
3515
3516
3517 #
3518 # Automatic dependency tracking
3519 #
3520
3521
3522
3523 # Check whether --enable-depend or --disable-depend was given.
3524 if test "${enable_depend+set}" = set; then
3525   enableval="$enable_depend"
3526
3527   case $enableval in
3528     yes)
3529       autodepend=yes
3530       ;;
3531     no)
3532       :
3533       ;;
3534     *)
3535       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3536 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3537    { (exit 1); exit 1; }; }
3538       ;;
3539   esac
3540
3541 else
3542   enable_depend=no
3543
3544 fi;
3545
3546
3547
3548
3549 #
3550 # Enable assert checks
3551 #
3552
3553
3554
3555 # Check whether --enable-cassert or --disable-cassert was given.
3556 if test "${enable_cassert+set}" = set; then
3557   enableval="$enable_cassert"
3558
3559   case $enableval in
3560     yes)
3561
3562 cat >>confdefs.h <<\_ACEOF
3563 #define USE_ASSERT_CHECKING 1
3564 _ACEOF
3565
3566       ;;
3567     no)
3568       :
3569       ;;
3570     *)
3571       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3572 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3573    { (exit 1); exit 1; }; }
3574       ;;
3575   esac
3576
3577 else
3578   enable_cassert=no
3579
3580 fi;
3581
3582
3583
3584 #
3585 # Include directories
3586 #
3587 ac_save_IFS=$IFS
3588 IFS="${IFS}${PATH_SEPARATOR}"
3589 # SRCH_INC comes from the template file
3590 for dir in $with_includes $SRCH_INC; do
3591   if test -d "$dir"; then
3592     INCLUDES="$INCLUDES -I$dir"
3593   else
3594     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3595 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3596   fi
3597 done
3598 IFS=$ac_save_IFS
3599
3600
3601
3602 #
3603 # Library directories
3604 #
3605 ac_save_IFS=$IFS
3606 IFS="${IFS}${PATH_SEPARATOR}"
3607 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3608 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3609   if test -d "$dir"; then
3610     LIBDIRS="$LIBDIRS -L$dir"
3611   else
3612     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3613 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3614   fi
3615 done
3616 IFS=$ac_save_IFS
3617
3618 #
3619 # Enable thread-safe client libraries
3620 #
3621 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3622 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3623
3624
3625
3626 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3627 if test "${enable_thread_safety+set}" = set; then
3628   enableval="$enable_thread_safety"
3629
3630   case $enableval in
3631     yes)
3632       :
3633       ;;
3634     no)
3635       :
3636       ;;
3637     *)
3638       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3639 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3640    { (exit 1); exit 1; }; }
3641       ;;
3642   esac
3643
3644 else
3645   enable_thread_safety=no
3646
3647 fi;
3648
3649
3650
3651
3652 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3653 if test "${enable_thread_safety_force+set}" = set; then
3654   enableval="$enable_thread_safety_force"
3655
3656   case $enableval in
3657     yes)
3658       :
3659       ;;
3660     no)
3661       :
3662       ;;
3663     *)
3664       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3665 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3666    { (exit 1); exit 1; }; }
3667       ;;
3668   esac
3669
3670 else
3671   enable_thread_safety_force=no
3672
3673 fi;
3674
3675 if test "$enable_thread_safety" = yes -o \
3676         "$enable_thread_safety_force" = yes; then
3677   enable_thread_safety="yes"    # for 'force'
3678
3679 cat >>confdefs.h <<\_ACEOF
3680 #define ENABLE_THREAD_SAFETY 1
3681 _ACEOF
3682
3683 fi
3684 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3685 echo "${ECHO_T}$enable_thread_safety" >&6
3686
3687
3688 #
3689 # Optionally build Tcl modules (PL/Tcl)
3690 #
3691 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3692 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3693
3694
3695
3696
3697 # Check whether --with-tcl or --without-tcl was given.
3698 if test "${with_tcl+set}" = set; then
3699   withval="$with_tcl"
3700
3701   case $withval in
3702     yes)
3703       :
3704       ;;
3705     no)
3706       :
3707       ;;
3708     *)
3709       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3710 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3711    { (exit 1); exit 1; }; }
3712       ;;
3713   esac
3714
3715 else
3716   with_tcl=no
3717
3718 fi;
3719
3720 echo "$as_me:$LINENO: result: $with_tcl" >&5
3721 echo "${ECHO_T}$with_tcl" >&6
3722
3723
3724 # We see if the path to the Tcl/Tk configuration scripts is specified.
3725 # This will override the use of tclsh to find the paths to search.
3726
3727
3728
3729
3730
3731 # Check whether --with-tclconfig or --without-tclconfig was given.
3732 if test "${with_tclconfig+set}" = set; then
3733   withval="$with_tclconfig"
3734
3735   case $withval in
3736     yes)
3737       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3738 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3739    { (exit 1); exit 1; }; }
3740       ;;
3741     no)
3742       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3743 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3744    { (exit 1); exit 1; }; }
3745       ;;
3746     *)
3747
3748       ;;
3749   esac
3750
3751 fi;
3752
3753
3754 #
3755 # Optionally build Perl modules (PL/Perl)
3756 #
3757 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3758 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3759
3760
3761
3762
3763 # Check whether --with-perl or --without-perl was given.
3764 if test "${with_perl+set}" = set; then
3765   withval="$with_perl"
3766
3767   case $withval in
3768     yes)
3769       :
3770       ;;
3771     no)
3772       :
3773       ;;
3774     *)
3775       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3776 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3777    { (exit 1); exit 1; }; }
3778       ;;
3779   esac
3780
3781 else
3782   with_perl=no
3783
3784 fi;
3785
3786 echo "$as_me:$LINENO: result: $with_perl" >&5
3787 echo "${ECHO_T}$with_perl" >&6
3788
3789
3790 #
3791 # Optionally build Python modules (PL/Python)
3792 #
3793 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3794 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3795
3796
3797
3798
3799 # Check whether --with-python or --without-python was given.
3800 if test "${with_python+set}" = set; then
3801   withval="$with_python"
3802
3803   case $withval in
3804     yes)
3805       :
3806       ;;
3807     no)
3808       :
3809       ;;
3810     *)
3811       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3812 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3813    { (exit 1); exit 1; }; }
3814       ;;
3815   esac
3816
3817 else
3818   with_python=no
3819
3820 fi;
3821
3822 echo "$as_me:$LINENO: result: $with_python" >&5
3823 echo "${ECHO_T}$with_python" >&6
3824
3825
3826 #
3827 # Kerberos 5
3828 #
3829 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3830 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3831
3832
3833
3834
3835 # Check whether --with-krb5 or --without-krb5 was given.
3836 if test "${with_krb5+set}" = set; then
3837   withval="$with_krb5"
3838
3839   case $withval in
3840     yes)
3841
3842
3843 cat >>confdefs.h <<\_ACEOF
3844 #define KRB5 1
3845 _ACEOF
3846
3847   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3848
3849       ;;
3850     no)
3851       :
3852       ;;
3853     *)
3854       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3855 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3856    { (exit 1); exit 1; }; }
3857       ;;
3858   esac
3859
3860 else
3861   with_krb5=no
3862
3863 fi;
3864
3865 echo "$as_me:$LINENO: result: $with_krb5" >&5
3866 echo "${ECHO_T}$with_krb5" >&6
3867
3868
3869
3870
3871
3872
3873 #
3874 # Kerberos configuration parameters
3875 #
3876
3877
3878
3879
3880 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3881 if test "${with_krb_srvnam+set}" = set; then
3882   withval="$with_krb_srvnam"
3883
3884   case $withval in
3885     yes)
3886       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3887 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3888    { (exit 1); exit 1; }; }
3889       ;;
3890     no)
3891       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3892 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3893    { (exit 1); exit 1; }; }
3894       ;;
3895     *)
3896
3897       ;;
3898   esac
3899
3900 else
3901   with_krb_srvnam="postgres"
3902 fi;
3903
3904
3905 cat >>confdefs.h <<_ACEOF
3906 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3907 _ACEOF
3908
3909
3910
3911 #
3912 # PAM
3913 #
3914 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3915 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3916
3917
3918
3919
3920 # Check whether --with-pam or --without-pam was given.
3921 if test "${with_pam+set}" = set; then
3922   withval="$with_pam"
3923
3924   case $withval in
3925     yes)
3926
3927 cat >>confdefs.h <<\_ACEOF
3928 #define USE_PAM 1
3929 _ACEOF
3930
3931       ;;
3932     no)
3933       :
3934       ;;
3935     *)
3936       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3937 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3938    { (exit 1); exit 1; }; }
3939       ;;
3940   esac
3941
3942 else
3943   with_pam=no
3944
3945 fi;
3946
3947 echo "$as_me:$LINENO: result: $with_pam" >&5
3948 echo "${ECHO_T}$with_pam" >&6
3949
3950
3951
3952 #
3953 # LDAP
3954 #
3955 echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
3956 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
3957
3958
3959
3960
3961 # Check whether --with-ldap or --without-ldap was given.
3962 if test "${with_ldap+set}" = set; then
3963   withval="$with_ldap"
3964
3965   case $withval in
3966     yes)
3967
3968 cat >>confdefs.h <<\_ACEOF
3969 #define USE_LDAP 1
3970 _ACEOF
3971
3972       ;;
3973     no)
3974       :
3975       ;;
3976     *)
3977       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
3978 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
3979    { (exit 1); exit 1; }; }
3980       ;;
3981   esac
3982
3983 else
3984   with_ldap=no
3985
3986 fi;
3987
3988 echo "$as_me:$LINENO: result: $with_ldap" >&5
3989 echo "${ECHO_T}$with_ldap" >&6
3990
3991
3992
3993 #
3994 # Bonjour
3995 #
3996 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
3997 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
3998
3999
4000
4001
4002 # Check whether --with-bonjour or --without-bonjour was given.
4003 if test "${with_bonjour+set}" = set; then
4004   withval="$with_bonjour"
4005
4006   case $withval in
4007     yes)
4008
4009 cat >>confdefs.h <<\_ACEOF
4010 #define USE_BONJOUR 1
4011 _ACEOF
4012
4013       ;;
4014     no)
4015       :
4016       ;;
4017     *)
4018       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4019 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4020    { (exit 1); exit 1; }; }
4021       ;;
4022   esac
4023
4024 else
4025   with_bonjour=no
4026
4027 fi;
4028
4029 echo "$as_me:$LINENO: result: $with_bonjour" >&5
4030 echo "${ECHO_T}$with_bonjour" >&6
4031
4032
4033
4034 #
4035 # OpenSSL
4036 #
4037 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4038 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
4039
4040
4041
4042
4043 # Check whether --with-openssl or --without-openssl was given.
4044 if test "${with_openssl+set}" = set; then
4045   withval="$with_openssl"
4046
4047   case $withval in
4048     yes)
4049
4050 cat >>confdefs.h <<\_ACEOF
4051 #define USE_SSL 1
4052 _ACEOF
4053
4054       ;;
4055     no)
4056       :
4057       ;;
4058     *)
4059       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4060 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4061    { (exit 1); exit 1; }; }
4062       ;;
4063   esac
4064
4065 else
4066   with_openssl=no
4067
4068 fi;
4069
4070 echo "$as_me:$LINENO: result: $with_openssl" >&5
4071 echo "${ECHO_T}$with_openssl" >&6
4072
4073
4074
4075 #
4076 # Prefer libedit
4077 #
4078
4079
4080
4081
4082 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
4083 if test "${with_libedit_preferred+set}" = set; then
4084   withval="$with_libedit_preferred"
4085
4086   case $withval in
4087     yes)
4088       :
4089       ;;
4090     no)
4091       :
4092       ;;
4093     *)
4094       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4095 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4096    { (exit 1); exit 1; }; }
4097       ;;
4098   esac
4099
4100 else
4101   with_libedit_preferred=no
4102
4103 fi;
4104
4105
4106
4107 #
4108 # Readline
4109 #
4110
4111
4112
4113
4114 # Check whether --with-readline or --without-readline was given.
4115 if test "${with_readline+set}" = set; then
4116   withval="$with_readline"
4117
4118   case $withval in
4119     yes)
4120       :
4121       ;;
4122     no)
4123       :
4124       ;;
4125     *)
4126       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4127 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4128    { (exit 1); exit 1; }; }
4129       ;;
4130   esac
4131
4132 else
4133   with_readline=yes
4134
4135 fi;
4136
4137 # readline on MinGW has problems with backslashes in psql and other bugs.
4138 # This is particularly a problem with non-US code pages.
4139 # Therefore disable its use until we understand the cause. 2004-07-20
4140 if test "$PORTNAME" = "win32"; then
4141   if test "$with_readline" = yes; then
4142     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4143 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4144     with_readline=no
4145   fi
4146 fi
4147
4148
4149 #
4150 # Zlib
4151 #
4152
4153
4154
4155
4156 # Check whether --with-zlib or --without-zlib was given.
4157 if test "${with_zlib+set}" = set; then
4158   withval="$with_zlib"
4159
4160   case $withval in
4161     yes)
4162       :
4163       ;;
4164     no)
4165       :
4166       ;;
4167     *)
4168       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
4169 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
4170    { (exit 1); exit 1; }; }
4171       ;;
4172   esac
4173
4174 else
4175   with_zlib=yes
4176
4177 fi;
4178
4179
4180
4181 #
4182 # Elf
4183 #
4184
4185 # Assume system is ELF if it predefines __ELF__ as 1,
4186 # otherwise believe host_os based default.
4187 case $host_os in
4188     freebsd1*|freebsd2*) elf=no;;
4189     freebsd3*|freebsd4*) elf=yes;;
4190 esac
4191
4192
4193 echo "$as_me:$LINENO: checking for egrep" >&5
4194 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4195 if test "${ac_cv_prog_egrep+set}" = set; then
4196   echo $ECHO_N "(cached) $ECHO_C" >&6
4197 else
4198   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4199     then ac_cv_prog_egrep='grep -E'
4200     else ac_cv_prog_egrep='egrep'
4201     fi
4202 fi
4203 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4204 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4205  EGREP=$ac_cv_prog_egrep
4206
4207
4208 cat >conftest.$ac_ext <<_ACEOF
4209 /* confdefs.h.  */
4210 _ACEOF
4211 cat confdefs.h >>conftest.$ac_ext
4212 cat >>conftest.$ac_ext <<_ACEOF
4213 /* end confdefs.h.  */
4214 #if __ELF__
4215   yes
4216 #endif
4217
4218 _ACEOF
4219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4220   $EGREP "yes" >/dev/null 2>&1; then
4221   ELF_SYS=true
4222 else
4223   if test "X$elf" = "Xyes" ; then
4224   ELF_SYS=true
4225 else
4226   ELF_SYS=
4227 fi
4228 fi
4229 rm -f conftest*
4230
4231
4232
4233 #
4234 # Assignments
4235 #
4236
4237 CPPFLAGS="$CPPFLAGS $INCLUDES"
4238 LDFLAGS="$LDFLAGS $LIBDIRS"
4239
4240 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4241 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4242 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4243 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4244
4245
4246
4247 for ac_prog in gawk mawk nawk awk
4248 do
4249   # Extract the first word of "$ac_prog", so it can be a program name with args.
4250 set dummy $ac_prog; ac_word=$2
4251 echo "$as_me:$LINENO: checking for $ac_word" >&5
4252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4253 if test "${ac_cv_prog_AWK+set}" = set; then
4254   echo $ECHO_N "(cached) $ECHO_C" >&6
4255 else
4256   if test -n "$AWK"; then
4257   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4258 else
4259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4260 for as_dir in $PATH
4261 do
4262   IFS=$as_save_IFS
4263   test -z "$as_dir" && as_dir=.
4264   for ac_exec_ext in '' $ac_executable_extensions; do
4265   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4266     ac_cv_prog_AWK="$ac_prog"
4267     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4268     break 2
4269   fi
4270 done
4271 done
4272
4273 fi
4274 fi
4275 AWK=$ac_cv_prog_AWK
4276 if test -n "$AWK"; then
4277   echo "$as_me:$LINENO: result: $AWK" >&5
4278 echo "${ECHO_T}$AWK" >&6
4279 else
4280   echo "$as_me:$LINENO: result: no" >&5
4281 echo "${ECHO_T}no" >&6
4282 fi
4283
4284   test -n "$AWK" && break
4285 done
4286
4287 echo "$as_me:$LINENO: checking for flex" >&5
4288 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4289 if test "${pgac_cv_path_flex+set}" = set; then
4290   echo $ECHO_N "(cached) $ECHO_C" >&6
4291 else
4292   # Let the user override the test
4293 if test -n "$FLEX"; then
4294   pgac_cv_path_flex=$FLEX
4295 else
4296   pgac_save_IFS=$IFS
4297   IFS=$PATH_SEPARATOR
4298   for pgac_dir in $PATH; do
4299     IFS=$pgac_save_IFS
4300     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4301       pgac_dir=`pwd`
4302     fi
4303     for pgac_prog in flex lex; do
4304       pgac_candidate="$pgac_dir/$pgac_prog"
4305       if test -f "$pgac_candidate" \
4306         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4307       then
4308         echo '%%'  > conftest.l
4309         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4310           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4311             pgac_broken_flex=$pgac_candidate
4312             continue
4313           fi
4314
4315           pgac_cv_path_flex=$pgac_candidate
4316           break 2
4317         fi
4318       fi
4319     done
4320   done
4321   rm -f conftest.l lex.yy.c
4322   : ${pgac_cv_path_flex=no}
4323 fi
4324
4325 fi
4326 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4327 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4328 if test x"$pgac_cv_path_flex" = x"no"; then
4329   if test -n "$pgac_broken_flex"; then
4330     { echo "$as_me:$LINENO: WARNING:
4331 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4332 *** should get version 2.5.4 or later." >&5
4333 echo "$as_me: WARNING:
4334 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4335 *** should get version 2.5.4 or later." >&2;}
4336   fi
4337
4338   { echo "$as_me:$LINENO: WARNING:
4339 *** Without Flex you will not be able to build PostgreSQL from CVS or
4340 *** change any of the scanner definition files.  You can obtain Flex from
4341 *** a GNU mirror site.  (If you are using the official distribution of
4342 *** PostgreSQL then you do not need to worry about this because the Flex
4343 *** output is pre-generated.)" >&5
4344 echo "$as_me: WARNING:
4345 *** Without Flex you will not be able to build PostgreSQL from CVS or
4346 *** change any of the scanner definition files.  You can obtain Flex from
4347 *** a GNU mirror site.  (If you are using the official distribution of
4348 *** PostgreSQL then you do not need to worry about this because the Flex
4349 *** output is pre-generated.)" >&2;}
4350 fi
4351
4352 if test x"$pgac_cv_path_flex" = x"no"; then
4353   FLEX=
4354 else
4355   FLEX=$pgac_cv_path_flex
4356 fi
4357
4358
4359
4360
4361 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4362 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4363 LN_S=$as_ln_s
4364 if test "$LN_S" = "ln -s"; then
4365   echo "$as_me:$LINENO: result: yes" >&5
4366 echo "${ECHO_T}yes" >&6
4367 else
4368   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4369 echo "${ECHO_T}no, using $LN_S" >&6
4370 fi
4371
4372
4373 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4374 if test "${with_gnu_ld+set}" = set; then
4375   withval="$with_gnu_ld"
4376   test "$withval" = no || with_gnu_ld=yes
4377 else
4378   with_gnu_ld=no
4379 fi;
4380 ac_prog=ld
4381 if test "$GCC" = yes; then
4382   # Check if gcc -print-prog-name=ld gives a path.
4383   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4384 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4385   case $host in
4386   *-*-mingw*)
4387     # gcc leaves a trailing carriage return which upsets mingw
4388     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4389   *)
4390     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4391   esac
4392   case "$ac_prog" in
4393     # Accept absolute paths.
4394     [\\/]* | [A-Za-z]:[\\/]*)
4395       re_direlt='/[^/][^/]*/\.\./'
4396       # Canonicalize the path of ld
4397       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4398       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4399         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4400       done
4401       test -z "$LD" && LD="$ac_prog"
4402       ;;
4403   "")
4404     # If it fails, then pretend we aren't using GCC.
4405     ac_prog=ld
4406     ;;
4407   *)
4408     # If it is relative, then search for the first ld in PATH.
4409     with_gnu_ld=unknown
4410     ;;
4411   esac
4412 elif test "$with_gnu_ld" = yes; then
4413   echo "$as_me:$LINENO: checking for GNU ld" >&5
4414 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4415 else
4416   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4417 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4418 fi
4419 if test "${ac_cv_path_LD+set}" = set; then
4420   echo $ECHO_N "(cached) $ECHO_C" >&6
4421 else
4422   if test -z "$LD"; then
4423   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4424   for ac_dir in $PATH; do
4425     test -z "$ac_dir" && ac_dir=.
4426     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4427       ac_cv_path_LD="$ac_dir/$ac_prog"
4428       # Check to see if the program is GNU ld.  I'd rather use --version,
4429       # but apparently some GNU ld's only accept -v.
4430       # Break only if it was the GNU/non-GNU ld that we prefer.
4431       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4432         test "$with_gnu_ld" != no && break
4433       else
4434         test "$with_gnu_ld" != yes && break
4435       fi
4436     fi
4437   done
4438   IFS="$ac_save_ifs"
4439 else
4440   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4441 fi
4442 fi
4443
4444 LD="$ac_cv_path_LD"
4445 if test -n "$LD"; then
4446   echo "$as_me:$LINENO: result: $LD" >&5
4447 echo "${ECHO_T}$LD" >&6
4448 else
4449   echo "$as_me:$LINENO: result: no" >&5
4450 echo "${ECHO_T}no" >&6
4451 fi
4452 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4453 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4454    { (exit 1); exit 1; }; }
4455 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4456 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4457 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4458   echo $ECHO_N "(cached) $ECHO_C" >&6
4459 else
4460   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4461 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4462   ac_cv_prog_gnu_ld=yes
4463 else
4464   ac_cv_prog_gnu_ld=no
4465 fi
4466 fi
4467 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4468 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4469 with_gnu_ld=$ac_cv_prog_gnu_ld
4470
4471
4472
4473
4474 case $host_os in sysv5*)
4475   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4476 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4477 if test "${pgac_cv_prog_ld_R+set}" = set; then
4478   echo $ECHO_N "(cached) $ECHO_C" >&6
4479 else
4480
4481     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4482     cat >conftest.$ac_ext <<_ACEOF
4483 /* confdefs.h.  */
4484 _ACEOF
4485 cat confdefs.h >>conftest.$ac_ext
4486 cat >>conftest.$ac_ext <<_ACEOF
4487 /* end confdefs.h.  */
4488
4489 int
4490 main ()
4491 {
4492
4493   ;
4494   return 0;
4495 }
4496 _ACEOF
4497 rm -f conftest.$ac_objext conftest$ac_exeext
4498 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4499   (eval $ac_link) 2>conftest.er1
4500   ac_status=$?
4501   grep -v '^ *+' conftest.er1 >conftest.err
4502   rm -f conftest.er1
4503   cat conftest.err >&5
4504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505   (exit $ac_status); } &&
4506          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
4507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4508   (eval $ac_try) 2>&5
4509   ac_status=$?
4510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4511   (exit $ac_status); }; } &&
4512          { ac_try='test -s conftest$ac_exeext'
4513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4514   (eval $ac_try) 2>&5
4515   ac_status=$?
4516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4517   (exit $ac_status); }; }; then
4518   pgac_cv_prog_ld_R=yes
4519 else
4520   echo "$as_me: failed program was:" >&5
4521 sed 's/^/| /' conftest.$ac_ext >&5
4522
4523 pgac_cv_prog_ld_R=no
4524 fi
4525 rm -f conftest.err conftest.$ac_objext \
4526       conftest$ac_exeext conftest.$ac_ext
4527     LDFLAGS=$pgac_save_LDFLAGS
4528
4529 fi
4530 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4531 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4532   ld_R_works=$pgac_cv_prog_ld_R
4533
4534 esac
4535 if test -n "$ac_tool_prefix"; then
4536   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4537 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4538 echo "$as_me:$LINENO: checking for $ac_word" >&5
4539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4540 if test "${ac_cv_prog_RANLIB+set}" = set; then
4541   echo $ECHO_N "(cached) $ECHO_C" >&6
4542 else
4543   if test -n "$RANLIB"; then
4544   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4545 else
4546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4547 for as_dir in $PATH
4548 do
4549   IFS=$as_save_IFS
4550   test -z "$as_dir" && as_dir=.
4551   for ac_exec_ext in '' $ac_executable_extensions; do
4552   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4553     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4554     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4555     break 2
4556   fi
4557 done
4558 done
4559
4560 fi
4561 fi
4562 RANLIB=$ac_cv_prog_RANLIB
4563 if test -n "$RANLIB"; then
4564   echo "$as_me:$LINENO: result: $RANLIB" >&5
4565 echo "${ECHO_T}$RANLIB" >&6
4566 else
4567   echo "$as_me:$LINENO: result: no" >&5
4568 echo "${ECHO_T}no" >&6
4569 fi
4570
4571 fi
4572 if test -z "$ac_cv_prog_RANLIB"; then
4573   ac_ct_RANLIB=$RANLIB
4574   # Extract the first word of "ranlib", so it can be a program name with args.
4575 set dummy ranlib; ac_word=$2
4576 echo "$as_me:$LINENO: checking for $ac_word" >&5
4577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4578 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4579   echo $ECHO_N "(cached) $ECHO_C" >&6
4580 else
4581   if test -n "$ac_ct_RANLIB"; then
4582   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4583 else
4584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4585 for as_dir in $PATH
4586 do
4587   IFS=$as_save_IFS
4588   test -z "$as_dir" && as_dir=.
4589   for ac_exec_ext in '' $ac_executable_extensions; do
4590   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4591     ac_cv_prog_ac_ct_RANLIB="ranlib"
4592     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4593     break 2
4594   fi
4595 done
4596 done
4597
4598   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4599 fi
4600 fi
4601 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4602 if test -n "$ac_ct_RANLIB"; then
4603   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4604 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4605 else
4606   echo "$as_me:$LINENO: result: no" >&5
4607 echo "${ECHO_T}no" >&6
4608 fi
4609
4610   RANLIB=$ac_ct_RANLIB
4611 else
4612   RANLIB="$ac_cv_prog_RANLIB"
4613 fi
4614
4615 # Extract the first word of "tar", so it can be a program name with args.
4616 set dummy tar; ac_word=$2
4617 echo "$as_me:$LINENO: checking for $ac_word" >&5
4618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4619 if test "${ac_cv_path_TAR+set}" = set; then
4620   echo $ECHO_N "(cached) $ECHO_C" >&6
4621 else
4622   case $TAR in
4623   [\\/]* | ?:[\\/]*)
4624   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4625   ;;
4626   *)
4627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4628 for as_dir in $PATH
4629 do
4630   IFS=$as_save_IFS
4631   test -z "$as_dir" && as_dir=.
4632   for ac_exec_ext in '' $ac_executable_extensions; do
4633   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4634     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4635     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4636     break 2
4637   fi
4638 done
4639 done
4640
4641   ;;
4642 esac
4643 fi
4644 TAR=$ac_cv_path_TAR
4645
4646 if test -n "$TAR"; then
4647   echo "$as_me:$LINENO: result: $TAR" >&5
4648 echo "${ECHO_T}$TAR" >&6
4649 else
4650   echo "$as_me:$LINENO: result: no" >&5
4651 echo "${ECHO_T}no" >&6
4652 fi
4653
4654
4655   if test -n "$ac_tool_prefix"; then
4656   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4657 set dummy ${ac_tool_prefix}strip; ac_word=$2
4658 echo "$as_me:$LINENO: checking for $ac_word" >&5
4659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4660 if test "${ac_cv_prog_STRIP+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   if test -n "$STRIP"; then
4664   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4665 else
4666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4667 for as_dir in $PATH
4668 do
4669   IFS=$as_save_IFS
4670   test -z "$as_dir" && as_dir=.
4671   for ac_exec_ext in '' $ac_executable_extensions; do
4672   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4673     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4674     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4675     break 2
4676   fi
4677 done
4678 done
4679
4680 fi
4681 fi
4682 STRIP=$ac_cv_prog_STRIP
4683 if test -n "$STRIP"; then
4684   echo "$as_me:$LINENO: result: $STRIP" >&5
4685 echo "${ECHO_T}$STRIP" >&6
4686 else
4687   echo "$as_me:$LINENO: result: no" >&5
4688 echo "${ECHO_T}no" >&6
4689 fi
4690
4691 fi
4692 if test -z "$ac_cv_prog_STRIP"; then
4693   ac_ct_STRIP=$STRIP
4694   # Extract the first word of "strip", so it can be a program name with args.
4695 set dummy strip; ac_word=$2
4696 echo "$as_me:$LINENO: checking for $ac_word" >&5
4697 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4698 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4699   echo $ECHO_N "(cached) $ECHO_C" >&6
4700 else
4701   if test -n "$ac_ct_STRIP"; then
4702   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4703 else
4704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4705 for as_dir in $PATH
4706 do
4707   IFS=$as_save_IFS
4708   test -z "$as_dir" && as_dir=.
4709   for ac_exec_ext in '' $ac_executable_extensions; do
4710   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4711     ac_cv_prog_ac_ct_STRIP="strip"
4712     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4713     break 2
4714   fi
4715 done
4716 done
4717
4718   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4719 fi
4720 fi
4721 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4722 if test -n "$ac_ct_STRIP"; then
4723   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4724 echo "${ECHO_T}$ac_ct_STRIP" >&6
4725 else
4726   echo "$as_me:$LINENO: result: no" >&5
4727 echo "${ECHO_T}no" >&6
4728 fi
4729
4730   STRIP=$ac_ct_STRIP
4731 else
4732   STRIP="$ac_cv_prog_STRIP"
4733 fi
4734
4735
4736   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4737 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4738   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4739     STRIP_STATIC_LIB="$STRIP -x"
4740     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4741     echo "$as_me:$LINENO: result: yes" >&5
4742 echo "${ECHO_T}yes" >&6
4743   else
4744     STRIP_STATIC_LIB=:
4745     STRIP_SHARED_LIB=:
4746     echo "$as_me:$LINENO: result: no" >&5
4747 echo "${ECHO_T}no" >&6
4748   fi
4749
4750
4751
4752
4753 for ac_prog in 'bison -y'
4754 do
4755   # Extract the first word of "$ac_prog", so it can be a program name with args.
4756 set dummy $ac_prog; ac_word=$2
4757 echo "$as_me:$LINENO: checking for $ac_word" >&5
4758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4759 if test "${ac_cv_prog_YACC+set}" = set; then
4760   echo $ECHO_N "(cached) $ECHO_C" >&6
4761 else
4762   if test -n "$YACC"; then
4763   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4764 else
4765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4766 for as_dir in $PATH
4767 do
4768   IFS=$as_save_IFS
4769   test -z "$as_dir" && as_dir=.
4770   for ac_exec_ext in '' $ac_executable_extensions; do
4771   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4772     ac_cv_prog_YACC="$ac_prog"
4773     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4774     break 2
4775   fi
4776 done
4777 done
4778
4779 fi
4780 fi
4781 YACC=$ac_cv_prog_YACC
4782 if test -n "$YACC"; then
4783   echo "$as_me:$LINENO: result: $YACC" >&5
4784 echo "${ECHO_T}$YACC" >&6
4785 else
4786   echo "$as_me:$LINENO: result: no" >&5
4787 echo "${ECHO_T}no" >&6
4788 fi
4789
4790   test -n "$YACC" && break
4791 done
4792
4793
4794 if test "$YACC"; then
4795   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4796     { echo "$as_me:$LINENO: WARNING:
4797 *** If you are going to modify the grammar files or build from CVS, the installed
4798 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4799 echo "$as_me: WARNING:
4800 *** If you are going to modify the grammar files or build from CVS, the installed
4801 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4802   fi
4803 fi
4804
4805 if test -z "$YACC"; then
4806   { echo "$as_me:$LINENO: WARNING:
4807 *** Without Bison you will not be able to build PostgreSQL from CVS or
4808 *** change any of the parser definition files.  You can obtain Bison from
4809 *** a GNU mirror site.  (If you are using the official distribution of
4810 *** PostgreSQL then you do not need to worry about this because the Bison
4811 *** output is pre-generated.)  To use a different yacc program (possible,
4812 *** but not recommended), set the environment variable YACC before running
4813 *** 'configure'." >&5
4814 echo "$as_me: WARNING:
4815 *** Without Bison you will not be able to build PostgreSQL from CVS or
4816 *** change any of the parser definition files.  You can obtain Bison from
4817 *** a GNU mirror site.  (If you are using the official distribution of
4818 *** PostgreSQL then you do not need to worry about this because the Bison
4819 *** output is pre-generated.)  To use a different yacc program (possible,
4820 *** but not recommended), set the environment variable YACC before running
4821 *** 'configure'." >&2;}
4822 fi
4823
4824
4825 # Extract the first word of "perl", so it can be a program name with args.
4826 set dummy perl; ac_word=$2
4827 echo "$as_me:$LINENO: checking for $ac_word" >&5
4828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4829 if test "${ac_cv_path_PERL+set}" = set; then
4830   echo $ECHO_N "(cached) $ECHO_C" >&6
4831 else
4832   case $PERL in
4833   [\\/]* | ?:[\\/]*)
4834   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4835   ;;
4836   *)
4837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838 for as_dir in $PATH
4839 do
4840   IFS=$as_save_IFS
4841   test -z "$as_dir" && as_dir=.
4842   for ac_exec_ext in '' $ac_executable_extensions; do
4843   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4844     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4845     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4846     break 2
4847   fi
4848 done
4849 done
4850
4851   ;;
4852 esac
4853 fi
4854 PERL=$ac_cv_path_PERL
4855
4856 if test -n "$PERL"; then
4857   echo "$as_me:$LINENO: result: $PERL" >&5
4858 echo "${ECHO_T}$PERL" >&6
4859 else
4860   echo "$as_me:$LINENO: result: no" >&5
4861 echo "${ECHO_T}no" >&6
4862 fi
4863
4864 if test "$with_perl" = yes; then
4865
4866 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4867 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4868 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4869 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4870 echo "${ECHO_T}$perl_archlibexp" >&6
4871 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4872 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4873 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4874 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4875 echo "${ECHO_T}$perl_privlibexp" >&6
4876 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4877 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4878 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4879 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4880 echo "${ECHO_T}$perl_useshrplib" >&6
4881
4882 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4883 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4884 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4885 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4886 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4887 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4888 echo "${ECHO_T}$perl_embed_ldflags" >&6
4889 fi
4890
4891 if test "$with_python" = yes; then
4892   # Extract the first word of "python", so it can be a program name with args.
4893 set dummy python; ac_word=$2
4894 echo "$as_me:$LINENO: checking for $ac_word" >&5
4895 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4896 if test "${ac_cv_path_PYTHON+set}" = set; then
4897   echo $ECHO_N "(cached) $ECHO_C" >&6
4898 else
4899   case $PYTHON in
4900   [\\/]* | ?:[\\/]*)
4901   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4902   ;;
4903   *)
4904   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905 for as_dir in $PATH
4906 do
4907   IFS=$as_save_IFS
4908   test -z "$as_dir" && as_dir=.
4909   for ac_exec_ext in '' $ac_executable_extensions; do
4910   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4911     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4912     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4913     break 2
4914   fi
4915 done
4916 done
4917
4918   ;;
4919 esac
4920 fi
4921 PYTHON=$ac_cv_path_PYTHON
4922
4923 if test -n "$PYTHON"; then
4924   echo "$as_me:$LINENO: result: $PYTHON" >&5
4925 echo "${ECHO_T}$PYTHON" >&6
4926 else
4927   echo "$as_me:$LINENO: result: no" >&5
4928 echo "${ECHO_T}no" >&6
4929 fi
4930
4931 if test x"$PYTHON" = x""; then
4932   { { echo "$as_me:$LINENO: error: Python not found" >&5
4933 echo "$as_me: error: Python not found" >&2;}
4934    { (exit 1); exit 1; }; }
4935 fi
4936
4937
4938 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4939 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4940 if "${PYTHON}" 2>&- -c 'import distutils'
4941 then
4942     echo "$as_me:$LINENO: result: yes" >&5
4943 echo "${ECHO_T}yes" >&6
4944 else
4945     echo "$as_me:$LINENO: result: no" >&5
4946 echo "${ECHO_T}no" >&6
4947     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4948 echo "$as_me: error: distutils module not found" >&2;}
4949    { (exit 1); exit 1; }; }
4950 fi
4951 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4952 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4953 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4954 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')"`
4955 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4956
4957 # This should be enough of a message.
4958 echo "$as_me:$LINENO: result: $python_configdir" >&5
4959 echo "${ECHO_T}$python_configdir" >&6
4960
4961
4962 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4963 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4964
4965 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4966 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4967 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4968 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4969
4970 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4971 then
4972         # New way: use the official shared library
4973         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4974         python_libspec="-L${python_libdir} -l${ldlibrary}"
4975 else
4976         # Old way: use libpython from python_configdir
4977         python_libdir="${python_configdir}"
4978         python_libspec="-L${python_libdir} -lpython${python_version}"
4979 fi
4980
4981 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4982
4983 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4984 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4985
4986
4987 # threaded python is not supported on bsd's
4988 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4989 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
4990 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
4991 if test "$pythreads" = "1"; then
4992   echo "$as_me:$LINENO: result: yes" >&5
4993 echo "${ECHO_T}yes" >&6
4994   case $host_os in
4995   openbsd*|freebsd4*)
4996     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
4997 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
4998    { (exit 1); exit 1; }; }
4999     ;;
5000   esac
5001 else
5002   echo "$as_me:$LINENO: result: no" >&5
5003 echo "${ECHO_T}no" >&6
5004 fi
5005
5006
5007 fi
5008
5009 # Supply a numeric version string for use by 3rd party add-ons
5010 # awk -F is a regex on some platforms, and not on others, so make "." a tab
5011 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
5012 tr '.' '        ' |
5013 $AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
5014
5015 cat >>confdefs.h <<_ACEOF
5016 #define PG_VERSION_NUM $PG_VERSION_NUM
5017 _ACEOF
5018
5019
5020 ##
5021 ## Libraries
5022 ##
5023
5024 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
5025 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
5026 if test "${ac_cv_search_setproctitle+set}" = set; then
5027   echo $ECHO_N "(cached) $ECHO_C" >&6
5028 else
5029   ac_func_search_save_LIBS=$LIBS
5030 ac_cv_search_setproctitle=no
5031 cat >conftest.$ac_ext <<_ACEOF
5032 /* confdefs.h.  */
5033 _ACEOF
5034 cat confdefs.h >>conftest.$ac_ext
5035 cat >>conftest.$ac_ext <<_ACEOF
5036 /* end confdefs.h.  */
5037
5038 /* Override any gcc2 internal prototype to avoid an error.  */
5039 #ifdef __cplusplus
5040 extern "C"
5041 #endif
5042 /* We use char because int might match the return type of a gcc2
5043    builtin and then its argument prototype would still apply.  */
5044 char setproctitle ();
5045 int
5046 main ()
5047 {
5048 setproctitle ();
5049   ;
5050   return 0;
5051 }
5052 _ACEOF
5053 rm -f conftest.$ac_objext conftest$ac_exeext
5054 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5055   (eval $ac_link) 2>conftest.er1
5056   ac_status=$?
5057   grep -v '^ *+' conftest.er1 >conftest.err
5058   rm -f conftest.er1
5059   cat conftest.err >&5
5060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5061   (exit $ac_status); } &&
5062          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5064   (eval $ac_try) 2>&5
5065   ac_status=$?
5066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5067   (exit $ac_status); }; } &&
5068          { ac_try='test -s conftest$ac_exeext'
5069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5070   (eval $ac_try) 2>&5
5071   ac_status=$?
5072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5073   (exit $ac_status); }; }; then
5074   ac_cv_search_setproctitle="none required"
5075 else
5076   echo "$as_me: failed program was:" >&5
5077 sed 's/^/| /' conftest.$ac_ext >&5
5078
5079 fi
5080 rm -f conftest.err conftest.$ac_objext \
5081       conftest$ac_exeext conftest.$ac_ext
5082 if test "$ac_cv_search_setproctitle" = no; then
5083   for ac_lib in util; do
5084     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5085     cat >conftest.$ac_ext <<_ACEOF
5086 /* confdefs.h.  */
5087 _ACEOF
5088 cat confdefs.h >>conftest.$ac_ext
5089 cat >>conftest.$ac_ext <<_ACEOF
5090 /* end confdefs.h.  */
5091
5092 /* Override any gcc2 internal prototype to avoid an error.  */
5093 #ifdef __cplusplus
5094 extern "C"
5095 #endif
5096 /* We use char because int might match the return type of a gcc2
5097    builtin and then its argument prototype would still apply.  */
5098 char setproctitle ();
5099 int
5100 main ()
5101 {
5102 setproctitle ();
5103   ;
5104   return 0;
5105 }
5106 _ACEOF
5107 rm -f conftest.$ac_objext conftest$ac_exeext
5108 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5109   (eval $ac_link) 2>conftest.er1
5110   ac_status=$?
5111   grep -v '^ *+' conftest.er1 >conftest.err
5112   rm -f conftest.er1
5113   cat conftest.err >&5
5114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115   (exit $ac_status); } &&
5116          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5118   (eval $ac_try) 2>&5
5119   ac_status=$?
5120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121   (exit $ac_status); }; } &&
5122          { ac_try='test -s conftest$ac_exeext'
5123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5124   (eval $ac_try) 2>&5
5125   ac_status=$?
5126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5127   (exit $ac_status); }; }; then
5128   ac_cv_search_setproctitle="-l$ac_lib"
5129 break
5130 else
5131   echo "$as_me: failed program was:" >&5
5132 sed 's/^/| /' conftest.$ac_ext >&5
5133
5134 fi
5135 rm -f conftest.err conftest.$ac_objext \
5136       conftest$ac_exeext conftest.$ac_ext
5137   done
5138 fi
5139 LIBS=$ac_func_search_save_LIBS
5140 fi
5141 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
5142 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
5143 if test "$ac_cv_search_setproctitle" != no; then
5144   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
5145
5146 fi
5147
5148 echo "$as_me:$LINENO: checking for library containing pow" >&5
5149 echo $ECHO_N "checking for library containing pow... $ECHO_C" >&6
5150 if test "${ac_cv_search_pow+set}" = set; then
5151   echo $ECHO_N "(cached) $ECHO_C" >&6
5152 else
5153   ac_func_search_save_LIBS=$LIBS
5154 ac_cv_search_pow=no
5155 cat >conftest.$ac_ext <<_ACEOF
5156 /* confdefs.h.  */
5157 _ACEOF
5158 cat confdefs.h >>conftest.$ac_ext
5159 cat >>conftest.$ac_ext <<_ACEOF
5160 /* end confdefs.h.  */
5161
5162 /* Override any gcc2 internal prototype to avoid an error.  */
5163 #ifdef __cplusplus
5164 extern "C"
5165 #endif
5166 /* We use char because int might match the return type of a gcc2
5167    builtin and then its argument prototype would still apply.  */
5168 char pow ();
5169 int
5170 main ()
5171 {
5172 pow ();
5173   ;
5174   return 0;
5175 }
5176 _ACEOF
5177 rm -f conftest.$ac_objext conftest$ac_exeext
5178 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5179   (eval $ac_link) 2>conftest.er1
5180   ac_status=$?
5181   grep -v '^ *+' conftest.er1 >conftest.err
5182   rm -f conftest.er1
5183   cat conftest.err >&5
5184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5185   (exit $ac_status); } &&
5186          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5188   (eval $ac_try) 2>&5
5189   ac_status=$?
5190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5191   (exit $ac_status); }; } &&
5192          { ac_try='test -s conftest$ac_exeext'
5193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5194   (eval $ac_try) 2>&5
5195   ac_status=$?
5196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5197   (exit $ac_status); }; }; then
5198   ac_cv_search_pow="none required"
5199 else
5200   echo "$as_me: failed program was:" >&5
5201 sed 's/^/| /' conftest.$ac_ext >&5
5202
5203 fi
5204 rm -f conftest.err conftest.$ac_objext \
5205       conftest$ac_exeext conftest.$ac_ext
5206 if test "$ac_cv_search_pow" = no; then
5207   for ac_lib in m; do
5208     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5209     cat >conftest.$ac_ext <<_ACEOF
5210 /* confdefs.h.  */
5211 _ACEOF
5212 cat confdefs.h >>conftest.$ac_ext
5213 cat >>conftest.$ac_ext <<_ACEOF
5214 /* end confdefs.h.  */
5215
5216 /* Override any gcc2 internal prototype to avoid an error.  */
5217 #ifdef __cplusplus
5218 extern "C"
5219 #endif
5220 /* We use char because int might match the return type of a gcc2
5221    builtin and then its argument prototype would still apply.  */
5222 char pow ();
5223 int
5224 main ()
5225 {
5226 pow ();
5227   ;
5228   return 0;
5229 }
5230 _ACEOF
5231 rm -f conftest.$ac_objext conftest$ac_exeext
5232 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5233   (eval $ac_link) 2>conftest.er1
5234   ac_status=$?
5235   grep -v '^ *+' conftest.er1 >conftest.err
5236   rm -f conftest.er1
5237   cat conftest.err >&5
5238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5239   (exit $ac_status); } &&
5240          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5242   (eval $ac_try) 2>&5
5243   ac_status=$?
5244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5245   (exit $ac_status); }; } &&
5246          { ac_try='test -s conftest$ac_exeext'
5247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5248   (eval $ac_try) 2>&5
5249   ac_status=$?
5250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5251   (exit $ac_status); }; }; then
5252   ac_cv_search_pow="-l$ac_lib"
5253 break
5254 else
5255   echo "$as_me: failed program was:" >&5
5256 sed 's/^/| /' conftest.$ac_ext >&5
5257
5258 fi
5259 rm -f conftest.err conftest.$ac_objext \
5260       conftest$ac_exeext conftest.$ac_ext
5261   done
5262 fi
5263 LIBS=$ac_func_search_save_LIBS
5264 fi
5265 echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
5266 echo "${ECHO_T}$ac_cv_search_pow" >&6
5267 if test "$ac_cv_search_pow" != no; then
5268   test "$ac_cv_search_pow" = "none required" || LIBS="$ac_cv_search_pow $LIBS"
5269
5270 fi
5271
5272 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5273 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5274 if test "${ac_cv_search_dlopen+set}" = set; then
5275   echo $ECHO_N "(cached) $ECHO_C" >&6
5276 else
5277   ac_func_search_save_LIBS=$LIBS
5278 ac_cv_search_dlopen=no
5279 cat >conftest.$ac_ext <<_ACEOF
5280 /* confdefs.h.  */
5281 _ACEOF
5282 cat confdefs.h >>conftest.$ac_ext
5283 cat >>conftest.$ac_ext <<_ACEOF
5284 /* end confdefs.h.  */
5285
5286 /* Override any gcc2 internal prototype to avoid an error.  */
5287 #ifdef __cplusplus
5288 extern "C"
5289 #endif
5290 /* We use char because int might match the return type of a gcc2
5291    builtin and then its argument prototype would still apply.  */
5292 char dlopen ();
5293 int
5294 main ()
5295 {
5296 dlopen ();
5297   ;
5298   return 0;
5299 }
5300 _ACEOF
5301 rm -f conftest.$ac_objext conftest$ac_exeext
5302 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5303   (eval $ac_link) 2>conftest.er1
5304   ac_status=$?
5305   grep -v '^ *+' conftest.er1 >conftest.err
5306   rm -f conftest.er1
5307   cat conftest.err >&5
5308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5309   (exit $ac_status); } &&
5310          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5312   (eval $ac_try) 2>&5
5313   ac_status=$?
5314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5315   (exit $ac_status); }; } &&
5316          { ac_try='test -s conftest$ac_exeext'
5317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5318   (eval $ac_try) 2>&5
5319   ac_status=$?
5320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5321   (exit $ac_status); }; }; then
5322   ac_cv_search_dlopen="none required"
5323 else
5324   echo "$as_me: failed program was:" >&5
5325 sed 's/^/| /' conftest.$ac_ext >&5
5326
5327 fi
5328 rm -f conftest.err conftest.$ac_objext \
5329       conftest$ac_exeext conftest.$ac_ext
5330 if test "$ac_cv_search_dlopen" = no; then
5331   for ac_lib in dl; do
5332     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5333     cat >conftest.$ac_ext <<_ACEOF
5334 /* confdefs.h.  */
5335 _ACEOF
5336 cat confdefs.h >>conftest.$ac_ext
5337 cat >>conftest.$ac_ext <<_ACEOF
5338 /* end confdefs.h.  */
5339
5340 /* Override any gcc2 internal prototype to avoid an error.  */
5341 #ifdef __cplusplus
5342 extern "C"
5343 #endif
5344 /* We use char because int might match the return type of a gcc2
5345    builtin and then its argument prototype would still apply.  */
5346 char dlopen ();
5347 int
5348 main ()
5349 {
5350 dlopen ();
5351   ;
5352   return 0;
5353 }
5354 _ACEOF
5355 rm -f conftest.$ac_objext conftest$ac_exeext
5356 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5357   (eval $ac_link) 2>conftest.er1
5358   ac_status=$?
5359   grep -v '^ *+' conftest.er1 >conftest.err
5360   rm -f conftest.er1
5361   cat conftest.err >&5
5362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5363   (exit $ac_status); } &&
5364          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5366   (eval $ac_try) 2>&5
5367   ac_status=$?
5368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5369   (exit $ac_status); }; } &&
5370          { ac_try='test -s conftest$ac_exeext'
5371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5372   (eval $ac_try) 2>&5
5373   ac_status=$?
5374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5375   (exit $ac_status); }; }; then
5376   ac_cv_search_dlopen="-l$ac_lib"
5377 break
5378 else
5379   echo "$as_me: failed program was:" >&5
5380 sed 's/^/| /' conftest.$ac_ext >&5
5381
5382 fi
5383 rm -f conftest.err conftest.$ac_objext \
5384       conftest$ac_exeext conftest.$ac_ext
5385   done
5386 fi
5387 LIBS=$ac_func_search_save_LIBS
5388 fi
5389 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5390 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5391 if test "$ac_cv_search_dlopen" != no; then
5392   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5393
5394 fi
5395
5396 echo "$as_me:$LINENO: checking for library containing socket" >&5
5397 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5398 if test "${ac_cv_search_socket+set}" = set; then
5399   echo $ECHO_N "(cached) $ECHO_C" >&6
5400 else
5401   ac_func_search_save_LIBS=$LIBS
5402 ac_cv_search_socket=no
5403 cat >conftest.$ac_ext <<_ACEOF
5404 /* confdefs.h.  */
5405 _ACEOF
5406 cat confdefs.h >>conftest.$ac_ext
5407 cat >>conftest.$ac_ext <<_ACEOF
5408 /* end confdefs.h.  */
5409
5410 /* Override any gcc2 internal prototype to avoid an error.  */
5411 #ifdef __cplusplus
5412 extern "C"
5413 #endif
5414 /* We use char because int might match the return type of a gcc2
5415    builtin and then its argument prototype would still apply.  */
5416 char socket ();
5417 int
5418 main ()
5419 {
5420 socket ();
5421   ;
5422   return 0;
5423 }
5424 _ACEOF
5425 rm -f conftest.$ac_objext conftest$ac_exeext
5426 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5427   (eval $ac_link) 2>conftest.er1
5428   ac_status=$?
5429   grep -v '^ *+' conftest.er1 >conftest.err
5430   rm -f conftest.er1
5431   cat conftest.err >&5
5432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5433   (exit $ac_status); } &&
5434          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5436   (eval $ac_try) 2>&5
5437   ac_status=$?
5438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5439   (exit $ac_status); }; } &&
5440          { ac_try='test -s conftest$ac_exeext'
5441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5442   (eval $ac_try) 2>&5
5443   ac_status=$?
5444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5445   (exit $ac_status); }; }; then
5446   ac_cv_search_socket="none required"
5447 else
5448   echo "$as_me: failed program was:" >&5
5449 sed 's/^/| /' conftest.$ac_ext >&5
5450
5451 fi
5452 rm -f conftest.err conftest.$ac_objext \
5453       conftest$ac_exeext conftest.$ac_ext
5454 if test "$ac_cv_search_socket" = no; then
5455   for ac_lib in socket wsock32; do
5456     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5457     cat >conftest.$ac_ext <<_ACEOF
5458 /* confdefs.h.  */
5459 _ACEOF
5460 cat confdefs.h >>conftest.$ac_ext
5461 cat >>conftest.$ac_ext <<_ACEOF
5462 /* end confdefs.h.  */
5463
5464 /* Override any gcc2 internal prototype to avoid an error.  */
5465 #ifdef __cplusplus
5466 extern "C"
5467 #endif
5468 /* We use char because int might match the return type of a gcc2
5469    builtin and then its argument prototype would still apply.  */
5470 char socket ();
5471 int
5472 main ()
5473 {
5474 socket ();
5475   ;
5476   return 0;
5477 }
5478 _ACEOF
5479 rm -f conftest.$ac_objext conftest$ac_exeext
5480 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5481   (eval $ac_link) 2>conftest.er1
5482   ac_status=$?
5483   grep -v '^ *+' conftest.er1 >conftest.err
5484   rm -f conftest.er1
5485   cat conftest.err >&5
5486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487   (exit $ac_status); } &&
5488          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5490   (eval $ac_try) 2>&5
5491   ac_status=$?
5492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493   (exit $ac_status); }; } &&
5494          { ac_try='test -s conftest$ac_exeext'
5495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5496   (eval $ac_try) 2>&5
5497   ac_status=$?
5498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499   (exit $ac_status); }; }; then
5500   ac_cv_search_socket="-l$ac_lib"
5501 break
5502 else
5503   echo "$as_me: failed program was:" >&5
5504 sed 's/^/| /' conftest.$ac_ext >&5
5505
5506 fi
5507 rm -f conftest.err conftest.$ac_objext \
5508       conftest$ac_exeext conftest.$ac_ext
5509   done
5510 fi
5511 LIBS=$ac_func_search_save_LIBS
5512 fi
5513 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5514 echo "${ECHO_T}$ac_cv_search_socket" >&6
5515 if test "$ac_cv_search_socket" != no; then
5516   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5517
5518 fi
5519
5520 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5521 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5522 if test "${ac_cv_search_shl_load+set}" = set; then
5523   echo $ECHO_N "(cached) $ECHO_C" >&6
5524 else
5525   ac_func_search_save_LIBS=$LIBS
5526 ac_cv_search_shl_load=no
5527 cat >conftest.$ac_ext <<_ACEOF
5528 /* confdefs.h.  */
5529 _ACEOF
5530 cat confdefs.h >>conftest.$ac_ext
5531 cat >>conftest.$ac_ext <<_ACEOF
5532 /* end confdefs.h.  */
5533
5534 /* Override any gcc2 internal prototype to avoid an error.  */
5535 #ifdef __cplusplus
5536 extern "C"
5537 #endif
5538 /* We use char because int might match the return type of a gcc2
5539    builtin and then its argument prototype would still apply.  */
5540 char shl_load ();
5541 int
5542 main ()
5543 {
5544 shl_load ();
5545   ;
5546   return 0;
5547 }
5548 _ACEOF
5549 rm -f conftest.$ac_objext conftest$ac_exeext
5550 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5551   (eval $ac_link) 2>conftest.er1
5552   ac_status=$?
5553   grep -v '^ *+' conftest.er1 >conftest.err
5554   rm -f conftest.er1
5555   cat conftest.err >&5
5556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5557   (exit $ac_status); } &&
5558          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5560   (eval $ac_try) 2>&5
5561   ac_status=$?
5562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5563   (exit $ac_status); }; } &&
5564          { ac_try='test -s conftest$ac_exeext'
5565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5566   (eval $ac_try) 2>&5
5567   ac_status=$?
5568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569   (exit $ac_status); }; }; then
5570   ac_cv_search_shl_load="none required"
5571 else
5572   echo "$as_me: failed program was:" >&5
5573 sed 's/^/| /' conftest.$ac_ext >&5
5574
5575 fi
5576 rm -f conftest.err conftest.$ac_objext \
5577       conftest$ac_exeext conftest.$ac_ext
5578 if test "$ac_cv_search_shl_load" = no; then
5579   for ac_lib in dld; do
5580     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5581     cat >conftest.$ac_ext <<_ACEOF
5582 /* confdefs.h.  */
5583 _ACEOF
5584 cat confdefs.h >>conftest.$ac_ext
5585 cat >>conftest.$ac_ext <<_ACEOF
5586 /* end confdefs.h.  */
5587
5588 /* Override any gcc2 internal prototype to avoid an error.  */
5589 #ifdef __cplusplus
5590 extern "C"
5591 #endif
5592 /* We use char because int might match the return type of a gcc2
5593    builtin and then its argument prototype would still apply.  */
5594 char shl_load ();
5595 int
5596 main ()
5597 {
5598 shl_load ();
5599   ;
5600   return 0;
5601 }
5602 _ACEOF
5603 rm -f conftest.$ac_objext conftest$ac_exeext
5604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5605   (eval $ac_link) 2>conftest.er1
5606   ac_status=$?
5607   grep -v '^ *+' conftest.er1 >conftest.err
5608   rm -f conftest.er1
5609   cat conftest.err >&5
5610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611   (exit $ac_status); } &&
5612          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5614   (eval $ac_try) 2>&5
5615   ac_status=$?
5616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5617   (exit $ac_status); }; } &&
5618          { ac_try='test -s conftest$ac_exeext'
5619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5620   (eval $ac_try) 2>&5
5621   ac_status=$?
5622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623   (exit $ac_status); }; }; then
5624   ac_cv_search_shl_load="-l$ac_lib"
5625 break
5626 else
5627   echo "$as_me: failed program was:" >&5
5628 sed 's/^/| /' conftest.$ac_ext >&5
5629
5630 fi
5631 rm -f conftest.err conftest.$ac_objext \
5632       conftest$ac_exeext conftest.$ac_ext
5633   done
5634 fi
5635 LIBS=$ac_func_search_save_LIBS
5636 fi
5637 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5638 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5639 if test "$ac_cv_search_shl_load" != no; then
5640   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5641
5642 fi
5643
5644 # We only use libld in port/dynloader/aix.c
5645 case $host_os in
5646      aix*)
5647         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5648 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5649 if test "${ac_cv_search_ldopen+set}" = set; then
5650   echo $ECHO_N "(cached) $ECHO_C" >&6
5651 else
5652   ac_func_search_save_LIBS=$LIBS
5653 ac_cv_search_ldopen=no
5654 cat >conftest.$ac_ext <<_ACEOF
5655 /* confdefs.h.  */
5656 _ACEOF
5657 cat confdefs.h >>conftest.$ac_ext
5658 cat >>conftest.$ac_ext <<_ACEOF
5659 /* end confdefs.h.  */
5660
5661 /* Override any gcc2 internal prototype to avoid an error.  */
5662 #ifdef __cplusplus
5663 extern "C"
5664 #endif
5665 /* We use char because int might match the return type of a gcc2
5666    builtin and then its argument prototype would still apply.  */
5667 char ldopen ();
5668 int
5669 main ()
5670 {
5671 ldopen ();
5672   ;
5673   return 0;
5674 }
5675 _ACEOF
5676 rm -f conftest.$ac_objext conftest$ac_exeext
5677 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5678   (eval $ac_link) 2>conftest.er1
5679   ac_status=$?
5680   grep -v '^ *+' conftest.er1 >conftest.err
5681   rm -f conftest.er1
5682   cat conftest.err >&5
5683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684   (exit $ac_status); } &&
5685          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5687   (eval $ac_try) 2>&5
5688   ac_status=$?
5689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690   (exit $ac_status); }; } &&
5691          { ac_try='test -s conftest$ac_exeext'
5692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5693   (eval $ac_try) 2>&5
5694   ac_status=$?
5695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696   (exit $ac_status); }; }; then
5697   ac_cv_search_ldopen="none required"
5698 else
5699   echo "$as_me: failed program was:" >&5
5700 sed 's/^/| /' conftest.$ac_ext >&5
5701
5702 fi
5703 rm -f conftest.err conftest.$ac_objext \
5704       conftest$ac_exeext conftest.$ac_ext
5705 if test "$ac_cv_search_ldopen" = no; then
5706   for ac_lib in ld; do
5707     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5708     cat >conftest.$ac_ext <<_ACEOF
5709 /* confdefs.h.  */
5710 _ACEOF
5711 cat confdefs.h >>conftest.$ac_ext
5712 cat >>conftest.$ac_ext <<_ACEOF
5713 /* end confdefs.h.  */
5714
5715 /* Override any gcc2 internal prototype to avoid an error.  */
5716 #ifdef __cplusplus
5717 extern "C"
5718 #endif
5719 /* We use char because int might match the return type of a gcc2
5720    builtin and then its argument prototype would still apply.  */
5721 char ldopen ();
5722 int
5723 main ()
5724 {
5725 ldopen ();
5726   ;
5727   return 0;
5728 }
5729 _ACEOF
5730 rm -f conftest.$ac_objext conftest$ac_exeext
5731 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5732   (eval $ac_link) 2>conftest.er1
5733   ac_status=$?
5734   grep -v '^ *+' conftest.er1 >conftest.err
5735   rm -f conftest.er1
5736   cat conftest.err >&5
5737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738   (exit $ac_status); } &&
5739          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5741   (eval $ac_try) 2>&5
5742   ac_status=$?
5743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744   (exit $ac_status); }; } &&
5745          { ac_try='test -s conftest$ac_exeext'
5746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5747   (eval $ac_try) 2>&5
5748   ac_status=$?
5749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750   (exit $ac_status); }; }; then
5751   ac_cv_search_ldopen="-l$ac_lib"
5752 break
5753 else
5754   echo "$as_me: failed program was:" >&5
5755 sed 's/^/| /' conftest.$ac_ext >&5
5756
5757 fi
5758 rm -f conftest.err conftest.$ac_objext \
5759       conftest$ac_exeext conftest.$ac_ext
5760   done
5761 fi
5762 LIBS=$ac_func_search_save_LIBS
5763 fi
5764 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5765 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5766 if test "$ac_cv_search_ldopen" != no; then
5767   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5768
5769 fi
5770
5771         ;;
5772 esac
5773 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5774 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5775 if test "${ac_cv_search_getopt_long+set}" = set; then
5776   echo $ECHO_N "(cached) $ECHO_C" >&6
5777 else
5778   ac_func_search_save_LIBS=$LIBS
5779 ac_cv_search_getopt_long=no
5780 cat >conftest.$ac_ext <<_ACEOF
5781 /* confdefs.h.  */
5782 _ACEOF
5783 cat confdefs.h >>conftest.$ac_ext
5784 cat >>conftest.$ac_ext <<_ACEOF
5785 /* end confdefs.h.  */
5786
5787 /* Override any gcc2 internal prototype to avoid an error.  */
5788 #ifdef __cplusplus
5789 extern "C"
5790 #endif
5791 /* We use char because int might match the return type of a gcc2
5792    builtin and then its argument prototype would still apply.  */
5793 char getopt_long ();
5794 int
5795 main ()
5796 {
5797 getopt_long ();
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext conftest$ac_exeext
5803 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5804   (eval $ac_link) 2>conftest.er1
5805   ac_status=$?
5806   grep -v '^ *+' conftest.er1 >conftest.err
5807   rm -f conftest.er1
5808   cat conftest.err >&5
5809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810   (exit $ac_status); } &&
5811          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5813   (eval $ac_try) 2>&5
5814   ac_status=$?
5815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816   (exit $ac_status); }; } &&
5817          { ac_try='test -s conftest$ac_exeext'
5818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819   (eval $ac_try) 2>&5
5820   ac_status=$?
5821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822   (exit $ac_status); }; }; then
5823   ac_cv_search_getopt_long="none required"
5824 else
5825   echo "$as_me: failed program was:" >&5
5826 sed 's/^/| /' conftest.$ac_ext >&5
5827
5828 fi
5829 rm -f conftest.err conftest.$ac_objext \
5830       conftest$ac_exeext conftest.$ac_ext
5831 if test "$ac_cv_search_getopt_long" = no; then
5832   for ac_lib in getopt gnugetopt; do
5833     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5834     cat >conftest.$ac_ext <<_ACEOF
5835 /* confdefs.h.  */
5836 _ACEOF
5837 cat confdefs.h >>conftest.$ac_ext
5838 cat >>conftest.$ac_ext <<_ACEOF
5839 /* end confdefs.h.  */
5840
5841 /* Override any gcc2 internal prototype to avoid an error.  */
5842 #ifdef __cplusplus
5843 extern "C"
5844 #endif
5845 /* We use char because int might match the return type of a gcc2
5846    builtin and then its argument prototype would still apply.  */
5847 char getopt_long ();
5848 int
5849 main ()
5850 {
5851 getopt_long ();
5852   ;
5853   return 0;
5854 }
5855 _ACEOF
5856 rm -f conftest.$ac_objext conftest$ac_exeext
5857 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5858   (eval $ac_link) 2>conftest.er1
5859   ac_status=$?
5860   grep -v '^ *+' conftest.er1 >conftest.err
5861   rm -f conftest.er1
5862   cat conftest.err >&5
5863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864   (exit $ac_status); } &&
5865          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5867   (eval $ac_try) 2>&5
5868   ac_status=$?
5869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870   (exit $ac_status); }; } &&
5871          { ac_try='test -s conftest$ac_exeext'
5872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5873   (eval $ac_try) 2>&5
5874   ac_status=$?
5875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5876   (exit $ac_status); }; }; then
5877   ac_cv_search_getopt_long="-l$ac_lib"
5878 break
5879 else
5880   echo "$as_me: failed program was:" >&5
5881 sed 's/^/| /' conftest.$ac_ext >&5
5882
5883 fi
5884 rm -f conftest.err conftest.$ac_objext \
5885       conftest$ac_exeext conftest.$ac_ext
5886   done
5887 fi
5888 LIBS=$ac_func_search_save_LIBS
5889 fi
5890 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5891 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5892 if test "$ac_cv_search_getopt_long" != no; then
5893   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5894
5895 fi
5896
5897 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5898 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5899 if test "${ac_cv_search_crypt+set}" = set; then
5900   echo $ECHO_N "(cached) $ECHO_C" >&6
5901 else
5902   ac_func_search_save_LIBS=$LIBS
5903 ac_cv_search_crypt=no
5904 cat >conftest.$ac_ext <<_ACEOF
5905 /* confdefs.h.  */
5906 _ACEOF
5907 cat confdefs.h >>conftest.$ac_ext
5908 cat >>conftest.$ac_ext <<_ACEOF
5909 /* end confdefs.h.  */
5910
5911 /* Override any gcc2 internal prototype to avoid an error.  */
5912 #ifdef __cplusplus
5913 extern "C"
5914 #endif
5915 /* We use char because int might match the return type of a gcc2
5916    builtin and then its argument prototype would still apply.  */
5917 char crypt ();
5918 int
5919 main ()
5920 {
5921 crypt ();
5922   ;
5923   return 0;
5924 }
5925 _ACEOF
5926 rm -f conftest.$ac_objext conftest$ac_exeext
5927 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5928   (eval $ac_link) 2>conftest.er1
5929   ac_status=$?
5930   grep -v '^ *+' conftest.er1 >conftest.err
5931   rm -f conftest.er1
5932   cat conftest.err >&5
5933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934   (exit $ac_status); } &&
5935          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5937   (eval $ac_try) 2>&5
5938   ac_status=$?
5939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940   (exit $ac_status); }; } &&
5941          { ac_try='test -s conftest$ac_exeext'
5942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5943   (eval $ac_try) 2>&5
5944   ac_status=$?
5945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946   (exit $ac_status); }; }; then
5947   ac_cv_search_crypt="none required"
5948 else
5949   echo "$as_me: failed program was:" >&5
5950 sed 's/^/| /' conftest.$ac_ext >&5
5951
5952 fi
5953 rm -f conftest.err conftest.$ac_objext \
5954       conftest$ac_exeext conftest.$ac_ext
5955 if test "$ac_cv_search_crypt" = no; then
5956   for ac_lib in crypt; do
5957     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5958     cat >conftest.$ac_ext <<_ACEOF
5959 /* confdefs.h.  */
5960 _ACEOF
5961 cat confdefs.h >>conftest.$ac_ext
5962 cat >>conftest.$ac_ext <<_ACEOF
5963 /* end confdefs.h.  */
5964
5965 /* Override any gcc2 internal prototype to avoid an error.  */
5966 #ifdef __cplusplus
5967 extern "C"
5968 #endif
5969 /* We use char because int might match the return type of a gcc2
5970    builtin and then its argument prototype would still apply.  */
5971 char crypt ();
5972 int
5973 main ()
5974 {
5975 crypt ();
5976   ;
5977   return 0;
5978 }
5979 _ACEOF
5980 rm -f conftest.$ac_objext conftest$ac_exeext
5981 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5982   (eval $ac_link) 2>conftest.er1
5983   ac_status=$?
5984   grep -v '^ *+' conftest.er1 >conftest.err
5985   rm -f conftest.er1
5986   cat conftest.err >&5
5987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5988   (exit $ac_status); } &&
5989          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5991   (eval $ac_try) 2>&5
5992   ac_status=$?
5993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5994   (exit $ac_status); }; } &&
5995          { ac_try='test -s conftest$ac_exeext'
5996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5997   (eval $ac_try) 2>&5
5998   ac_status=$?
5999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6000   (exit $ac_status); }; }; then
6001   ac_cv_search_crypt="-l$ac_lib"
6002 break
6003 else
6004   echo "$as_me: failed program was:" >&5
6005 sed 's/^/| /' conftest.$ac_ext >&5
6006
6007 fi
6008 rm -f conftest.err conftest.$ac_objext \
6009       conftest$ac_exeext conftest.$ac_ext
6010   done
6011 fi
6012 LIBS=$ac_func_search_save_LIBS
6013 fi
6014 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6015 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6016 if test "$ac_cv_search_crypt" != no; then
6017   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6018
6019 fi
6020
6021 # Solaris:
6022 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6023 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6024 if test "${ac_cv_search_fdatasync+set}" = set; then
6025   echo $ECHO_N "(cached) $ECHO_C" >&6
6026 else
6027   ac_func_search_save_LIBS=$LIBS
6028 ac_cv_search_fdatasync=no
6029 cat >conftest.$ac_ext <<_ACEOF
6030 /* confdefs.h.  */
6031 _ACEOF
6032 cat confdefs.h >>conftest.$ac_ext
6033 cat >>conftest.$ac_ext <<_ACEOF
6034 /* end confdefs.h.  */
6035
6036 /* Override any gcc2 internal prototype to avoid an error.  */
6037 #ifdef __cplusplus
6038 extern "C"
6039 #endif
6040 /* We use char because int might match the return type of a gcc2
6041    builtin and then its argument prototype would still apply.  */
6042 char fdatasync ();
6043 int
6044 main ()
6045 {
6046 fdatasync ();
6047   ;
6048   return 0;
6049 }
6050 _ACEOF
6051 rm -f conftest.$ac_objext conftest$ac_exeext
6052 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6053   (eval $ac_link) 2>conftest.er1
6054   ac_status=$?
6055   grep -v '^ *+' conftest.er1 >conftest.err
6056   rm -f conftest.er1
6057   cat conftest.err >&5
6058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6059   (exit $ac_status); } &&
6060          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6062   (eval $ac_try) 2>&5
6063   ac_status=$?
6064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6065   (exit $ac_status); }; } &&
6066          { ac_try='test -s conftest$ac_exeext'
6067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6068   (eval $ac_try) 2>&5
6069   ac_status=$?
6070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6071   (exit $ac_status); }; }; then
6072   ac_cv_search_fdatasync="none required"
6073 else
6074   echo "$as_me: failed program was:" >&5
6075 sed 's/^/| /' conftest.$ac_ext >&5
6076
6077 fi
6078 rm -f conftest.err conftest.$ac_objext \
6079       conftest$ac_exeext conftest.$ac_ext
6080 if test "$ac_cv_search_fdatasync" = no; then
6081   for ac_lib in rt posix4; do
6082     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6083     cat >conftest.$ac_ext <<_ACEOF
6084 /* confdefs.h.  */
6085 _ACEOF
6086 cat confdefs.h >>conftest.$ac_ext
6087 cat >>conftest.$ac_ext <<_ACEOF
6088 /* end confdefs.h.  */
6089
6090 /* Override any gcc2 internal prototype to avoid an error.  */
6091 #ifdef __cplusplus
6092 extern "C"
6093 #endif
6094 /* We use char because int might match the return type of a gcc2
6095    builtin and then its argument prototype would still apply.  */
6096 char fdatasync ();
6097 int
6098 main ()
6099 {
6100 fdatasync ();
6101   ;
6102   return 0;
6103 }
6104 _ACEOF
6105 rm -f conftest.$ac_objext conftest$ac_exeext
6106 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6107   (eval $ac_link) 2>conftest.er1
6108   ac_status=$?
6109   grep -v '^ *+' conftest.er1 >conftest.err
6110   rm -f conftest.er1
6111   cat conftest.err >&5
6112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6113   (exit $ac_status); } &&
6114          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6116   (eval $ac_try) 2>&5
6117   ac_status=$?
6118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6119   (exit $ac_status); }; } &&
6120          { ac_try='test -s conftest$ac_exeext'
6121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6122   (eval $ac_try) 2>&5
6123   ac_status=$?
6124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125   (exit $ac_status); }; }; then
6126   ac_cv_search_fdatasync="-l$ac_lib"
6127 break
6128 else
6129   echo "$as_me: failed program was:" >&5
6130 sed 's/^/| /' conftest.$ac_ext >&5
6131
6132 fi
6133 rm -f conftest.err conftest.$ac_objext \
6134       conftest$ac_exeext conftest.$ac_ext
6135   done
6136 fi
6137 LIBS=$ac_func_search_save_LIBS
6138 fi
6139 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6140 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6141 if test "$ac_cv_search_fdatasync" != no; then
6142   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6143
6144 fi
6145
6146 # Cygwin:
6147 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6148 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6149 if test "${ac_cv_search_shmget+set}" = set; then
6150   echo $ECHO_N "(cached) $ECHO_C" >&6
6151 else
6152   ac_func_search_save_LIBS=$LIBS
6153 ac_cv_search_shmget=no
6154 cat >conftest.$ac_ext <<_ACEOF
6155 /* confdefs.h.  */
6156 _ACEOF
6157 cat confdefs.h >>conftest.$ac_ext
6158 cat >>conftest.$ac_ext <<_ACEOF
6159 /* end confdefs.h.  */
6160
6161 /* Override any gcc2 internal prototype to avoid an error.  */
6162 #ifdef __cplusplus
6163 extern "C"
6164 #endif
6165 /* We use char because int might match the return type of a gcc2
6166    builtin and then its argument prototype would still apply.  */
6167 char shmget ();
6168 int
6169 main ()
6170 {
6171 shmget ();
6172   ;
6173   return 0;
6174 }
6175 _ACEOF
6176 rm -f conftest.$ac_objext conftest$ac_exeext
6177 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6178   (eval $ac_link) 2>conftest.er1
6179   ac_status=$?
6180   grep -v '^ *+' conftest.er1 >conftest.err
6181   rm -f conftest.er1
6182   cat conftest.err >&5
6183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184   (exit $ac_status); } &&
6185          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6187   (eval $ac_try) 2>&5
6188   ac_status=$?
6189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6190   (exit $ac_status); }; } &&
6191          { ac_try='test -s conftest$ac_exeext'
6192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6193   (eval $ac_try) 2>&5
6194   ac_status=$?
6195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6196   (exit $ac_status); }; }; then
6197   ac_cv_search_shmget="none required"
6198 else
6199   echo "$as_me: failed program was:" >&5
6200 sed 's/^/| /' conftest.$ac_ext >&5
6201
6202 fi
6203 rm -f conftest.err conftest.$ac_objext \
6204       conftest$ac_exeext conftest.$ac_ext
6205 if test "$ac_cv_search_shmget" = no; then
6206   for ac_lib in cygipc; do
6207     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6208     cat >conftest.$ac_ext <<_ACEOF
6209 /* confdefs.h.  */
6210 _ACEOF
6211 cat confdefs.h >>conftest.$ac_ext
6212 cat >>conftest.$ac_ext <<_ACEOF
6213 /* end confdefs.h.  */
6214
6215 /* Override any gcc2 internal prototype to avoid an error.  */
6216 #ifdef __cplusplus
6217 extern "C"
6218 #endif
6219 /* We use char because int might match the return type of a gcc2
6220    builtin and then its argument prototype would still apply.  */
6221 char shmget ();
6222 int
6223 main ()
6224 {
6225 shmget ();
6226   ;
6227   return 0;
6228 }
6229 _ACEOF
6230 rm -f conftest.$ac_objext conftest$ac_exeext
6231 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6232   (eval $ac_link) 2>conftest.er1
6233   ac_status=$?
6234   grep -v '^ *+' conftest.er1 >conftest.err
6235   rm -f conftest.er1
6236   cat conftest.err >&5
6237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238   (exit $ac_status); } &&
6239          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6241   (eval $ac_try) 2>&5
6242   ac_status=$?
6243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6244   (exit $ac_status); }; } &&
6245          { ac_try='test -s conftest$ac_exeext'
6246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6247   (eval $ac_try) 2>&5
6248   ac_status=$?
6249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6250   (exit $ac_status); }; }; then
6251   ac_cv_search_shmget="-l$ac_lib"
6252 break
6253 else
6254   echo "$as_me: failed program was:" >&5
6255 sed 's/^/| /' conftest.$ac_ext >&5
6256
6257 fi
6258 rm -f conftest.err conftest.$ac_objext \
6259       conftest$ac_exeext conftest.$ac_ext
6260   done
6261 fi
6262 LIBS=$ac_func_search_save_LIBS
6263 fi
6264 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6265 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6266 if test "$ac_cv_search_shmget" != no; then
6267   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6268
6269 fi
6270
6271
6272 if test "$with_readline" = yes; then
6273
6274
6275 if test "${pgac_cv_check_readline+set}" = set; then
6276   echo $ECHO_N "(cached) $ECHO_C" >&6
6277 else
6278   pgac_cv_check_readline=no
6279 pgac_save_LIBS=$LIBS
6280 if test x"$with_libedit_preferred" != x"yes"
6281 then    READLINE_ORDER="-lreadline -ledit"
6282 else    READLINE_ORDER="-ledit -lreadline"
6283 fi
6284 for pgac_rllib in $READLINE_ORDER ; do
6285   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6286 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6287   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6288     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6289     cat >conftest.$ac_ext <<_ACEOF
6290 /* confdefs.h.  */
6291 _ACEOF
6292 cat confdefs.h >>conftest.$ac_ext
6293 cat >>conftest.$ac_ext <<_ACEOF
6294 /* end confdefs.h.  */
6295
6296 /* Override any gcc2 internal prototype to avoid an error.  */
6297 #ifdef __cplusplus
6298 extern "C"
6299 #endif
6300 /* We use char because int might match the return type of a gcc2
6301    builtin and then its argument prototype would still apply.  */
6302 char readline ();
6303 int
6304 main ()
6305 {
6306 readline ();
6307   ;
6308   return 0;
6309 }
6310 _ACEOF
6311 rm -f conftest.$ac_objext conftest$ac_exeext
6312 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6313   (eval $ac_link) 2>conftest.er1
6314   ac_status=$?
6315   grep -v '^ *+' conftest.er1 >conftest.err
6316   rm -f conftest.er1
6317   cat conftest.err >&5
6318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6319   (exit $ac_status); } &&
6320          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6322   (eval $ac_try) 2>&5
6323   ac_status=$?
6324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6325   (exit $ac_status); }; } &&
6326          { ac_try='test -s conftest$ac_exeext'
6327   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6328   (eval $ac_try) 2>&5
6329   ac_status=$?
6330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331   (exit $ac_status); }; }; then
6332
6333       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6334       # recognize dependent libraries; assume curses is needed if we didn't
6335       # find any dependency.
6336       case $host_os in
6337         netbsd* | openbsd* | irix*)
6338           if test x"$pgac_lib" = x"" ; then
6339             pgac_lib=" -lcurses"
6340           fi ;;
6341       esac
6342
6343       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6344       break
6345
6346 else
6347   echo "$as_me: failed program was:" >&5
6348 sed 's/^/| /' conftest.$ac_ext >&5
6349
6350 fi
6351 rm -f conftest.err conftest.$ac_objext \
6352       conftest$ac_exeext conftest.$ac_ext
6353   done
6354   if test "$pgac_cv_check_readline" != no ; then
6355     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6356 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6357     break
6358   else
6359     echo "$as_me:$LINENO: result: no" >&5
6360 echo "${ECHO_T}no" >&6
6361   fi
6362 done
6363 LIBS=$pgac_save_LIBS
6364
6365 fi
6366
6367 if test "$pgac_cv_check_readline" != no ; then
6368   LIBS="$pgac_cv_check_readline $LIBS"
6369
6370 cat >>confdefs.h <<\_ACEOF
6371 #define HAVE_LIBREADLINE 1
6372 _ACEOF
6373
6374 fi
6375
6376
6377   if test x"$pgac_cv_check_readline" = x"no"; then
6378     { { echo "$as_me:$LINENO: error: readline library not found
6379 If you have readline already installed, see config.log for details on the
6380 failure.  It is possible the compiler isn't looking in the proper directory.
6381 Use --without-readline to disable readline support." >&5
6382 echo "$as_me: error: readline library not found
6383 If you have readline already installed, see config.log for details on the
6384 failure.  It is possible the compiler isn't looking in the proper directory.
6385 Use --without-readline to disable readline support." >&2;}
6386    { (exit 1); exit 1; }; }
6387   fi
6388 fi
6389
6390 if test "$with_zlib" = yes; then
6391
6392 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6393 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6394 if test "${ac_cv_lib_z_inflate+set}" = set; then
6395   echo $ECHO_N "(cached) $ECHO_C" >&6
6396 else
6397   ac_check_lib_save_LIBS=$LIBS
6398 LIBS="-lz  $LIBS"
6399 cat >conftest.$ac_ext <<_ACEOF
6400 /* confdefs.h.  */
6401 _ACEOF
6402 cat confdefs.h >>conftest.$ac_ext
6403 cat >>conftest.$ac_ext <<_ACEOF
6404 /* end confdefs.h.  */
6405
6406 /* Override any gcc2 internal prototype to avoid an error.  */
6407 #ifdef __cplusplus
6408 extern "C"
6409 #endif
6410 /* We use char because int might match the return type of a gcc2
6411    builtin and then its argument prototype would still apply.  */
6412 char inflate ();
6413 int
6414 main ()
6415 {
6416 inflate ();
6417   ;
6418   return 0;
6419 }
6420 _ACEOF
6421 rm -f conftest.$ac_objext conftest$ac_exeext
6422 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6423   (eval $ac_link) 2>conftest.er1
6424   ac_status=$?
6425   grep -v '^ *+' conftest.er1 >conftest.err
6426   rm -f conftest.er1
6427   cat conftest.err >&5
6428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6429   (exit $ac_status); } &&
6430          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6432   (eval $ac_try) 2>&5
6433   ac_status=$?
6434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6435   (exit $ac_status); }; } &&
6436          { ac_try='test -s conftest$ac_exeext'
6437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6438   (eval $ac_try) 2>&5
6439   ac_status=$?
6440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6441   (exit $ac_status); }; }; then
6442   ac_cv_lib_z_inflate=yes
6443 else
6444   echo "$as_me: failed program was:" >&5
6445 sed 's/^/| /' conftest.$ac_ext >&5
6446
6447 ac_cv_lib_z_inflate=no
6448 fi
6449 rm -f conftest.err conftest.$ac_objext \
6450       conftest$ac_exeext conftest.$ac_ext
6451 LIBS=$ac_check_lib_save_LIBS
6452 fi
6453 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6454 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6455 if test $ac_cv_lib_z_inflate = yes; then
6456   cat >>confdefs.h <<_ACEOF
6457 #define HAVE_LIBZ 1
6458 _ACEOF
6459
6460   LIBS="-lz $LIBS"
6461
6462 else
6463   { { echo "$as_me:$LINENO: error: zlib library not found
6464 If you have zlib already installed, see config.log for details on the
6465 failure.  It is possible the compiler isn't looking in the proper directory.
6466 Use --without-zlib to disable zlib support." >&5
6467 echo "$as_me: error: zlib library not found
6468 If you have zlib already installed, see config.log for details on the
6469 failure.  It is possible the compiler isn't looking in the proper directory.
6470 Use --without-zlib to disable zlib support." >&2;}
6471    { (exit 1); exit 1; }; }
6472 fi
6473
6474 fi
6475
6476 if test "$enable_spinlocks" = yes; then
6477
6478 cat >>confdefs.h <<\_ACEOF
6479 #define HAVE_SPINLOCKS 1
6480 _ACEOF
6481
6482 else
6483   { echo "$as_me:$LINENO: WARNING:
6484 *** Not using spinlocks will cause poor performance." >&5
6485 echo "$as_me: WARNING:
6486 *** Not using spinlocks will cause poor performance." >&2;}
6487 fi
6488
6489 if test "$with_krb5" = yes ; then
6490   if test "$PORTNAME" != "win32"; then
6491      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6492 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6493 if test "${ac_cv_search_com_err+set}" = set; then
6494   echo $ECHO_N "(cached) $ECHO_C" >&6
6495 else
6496   ac_func_search_save_LIBS=$LIBS
6497 ac_cv_search_com_err=no
6498 cat >conftest.$ac_ext <<_ACEOF
6499 /* confdefs.h.  */
6500 _ACEOF
6501 cat confdefs.h >>conftest.$ac_ext
6502 cat >>conftest.$ac_ext <<_ACEOF
6503 /* end confdefs.h.  */
6504
6505 /* Override any gcc2 internal prototype to avoid an error.  */
6506 #ifdef __cplusplus
6507 extern "C"
6508 #endif
6509 /* We use char because int might match the return type of a gcc2
6510    builtin and then its argument prototype would still apply.  */
6511 char com_err ();
6512 int
6513 main ()
6514 {
6515 com_err ();
6516   ;
6517   return 0;
6518 }
6519 _ACEOF
6520 rm -f conftest.$ac_objext conftest$ac_exeext
6521 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6522   (eval $ac_link) 2>conftest.er1
6523   ac_status=$?
6524   grep -v '^ *+' conftest.er1 >conftest.err
6525   rm -f conftest.er1
6526   cat conftest.err >&5
6527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6528   (exit $ac_status); } &&
6529          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6531   (eval $ac_try) 2>&5
6532   ac_status=$?
6533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534   (exit $ac_status); }; } &&
6535          { ac_try='test -s conftest$ac_exeext'
6536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6537   (eval $ac_try) 2>&5
6538   ac_status=$?
6539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540   (exit $ac_status); }; }; then
6541   ac_cv_search_com_err="none required"
6542 else
6543   echo "$as_me: failed program was:" >&5
6544 sed 's/^/| /' conftest.$ac_ext >&5
6545
6546 fi
6547 rm -f conftest.err conftest.$ac_objext \
6548       conftest$ac_exeext conftest.$ac_ext
6549 if test "$ac_cv_search_com_err" = no; then
6550   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6551     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6552     cat >conftest.$ac_ext <<_ACEOF
6553 /* confdefs.h.  */
6554 _ACEOF
6555 cat confdefs.h >>conftest.$ac_ext
6556 cat >>conftest.$ac_ext <<_ACEOF
6557 /* end confdefs.h.  */
6558
6559 /* Override any gcc2 internal prototype to avoid an error.  */
6560 #ifdef __cplusplus
6561 extern "C"
6562 #endif
6563 /* We use char because int might match the return type of a gcc2
6564    builtin and then its argument prototype would still apply.  */
6565 char com_err ();
6566 int
6567 main ()
6568 {
6569 com_err ();
6570   ;
6571   return 0;
6572 }
6573 _ACEOF
6574 rm -f conftest.$ac_objext conftest$ac_exeext
6575 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6576   (eval $ac_link) 2>conftest.er1
6577   ac_status=$?
6578   grep -v '^ *+' conftest.er1 >conftest.err
6579   rm -f conftest.er1
6580   cat conftest.err >&5
6581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582   (exit $ac_status); } &&
6583          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6585   (eval $ac_try) 2>&5
6586   ac_status=$?
6587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6588   (exit $ac_status); }; } &&
6589          { ac_try='test -s conftest$ac_exeext'
6590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6591   (eval $ac_try) 2>&5
6592   ac_status=$?
6593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6594   (exit $ac_status); }; }; then
6595   ac_cv_search_com_err="-l$ac_lib"
6596 break
6597 else
6598   echo "$as_me: failed program was:" >&5
6599 sed 's/^/| /' conftest.$ac_ext >&5
6600
6601 fi
6602 rm -f conftest.err conftest.$ac_objext \
6603       conftest$ac_exeext conftest.$ac_ext
6604   done
6605 fi
6606 LIBS=$ac_func_search_save_LIBS
6607 fi
6608 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6609 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6610 if test "$ac_cv_search_com_err" != no; then
6611   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6612
6613 else
6614   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6615 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6616    { (exit 1); exit 1; }; }
6617 fi
6618
6619      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6620 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6621 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6622   echo $ECHO_N "(cached) $ECHO_C" >&6
6623 else
6624   ac_func_search_save_LIBS=$LIBS
6625 ac_cv_search_krb5_sendauth=no
6626 cat >conftest.$ac_ext <<_ACEOF
6627 /* confdefs.h.  */
6628 _ACEOF
6629 cat confdefs.h >>conftest.$ac_ext
6630 cat >>conftest.$ac_ext <<_ACEOF
6631 /* end confdefs.h.  */
6632
6633 /* Override any gcc2 internal prototype to avoid an error.  */
6634 #ifdef __cplusplus
6635 extern "C"
6636 #endif
6637 /* We use char because int might match the return type of a gcc2
6638    builtin and then its argument prototype would still apply.  */
6639 char krb5_sendauth ();
6640 int
6641 main ()
6642 {
6643 krb5_sendauth ();
6644   ;
6645   return 0;
6646 }
6647 _ACEOF
6648 rm -f conftest.$ac_objext conftest$ac_exeext
6649 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6650   (eval $ac_link) 2>conftest.er1
6651   ac_status=$?
6652   grep -v '^ *+' conftest.er1 >conftest.err
6653   rm -f conftest.er1
6654   cat conftest.err >&5
6655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6656   (exit $ac_status); } &&
6657          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6659   (eval $ac_try) 2>&5
6660   ac_status=$?
6661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6662   (exit $ac_status); }; } &&
6663          { ac_try='test -s conftest$ac_exeext'
6664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6665   (eval $ac_try) 2>&5
6666   ac_status=$?
6667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6668   (exit $ac_status); }; }; then
6669   ac_cv_search_krb5_sendauth="none required"
6670 else
6671   echo "$as_me: failed program was:" >&5
6672 sed 's/^/| /' conftest.$ac_ext >&5
6673
6674 fi
6675 rm -f conftest.err conftest.$ac_objext \
6676       conftest$ac_exeext conftest.$ac_ext
6677 if test "$ac_cv_search_krb5_sendauth" = no; then
6678   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6679     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6680     cat >conftest.$ac_ext <<_ACEOF
6681 /* confdefs.h.  */
6682 _ACEOF
6683 cat confdefs.h >>conftest.$ac_ext
6684 cat >>conftest.$ac_ext <<_ACEOF
6685 /* end confdefs.h.  */
6686
6687 /* Override any gcc2 internal prototype to avoid an error.  */
6688 #ifdef __cplusplus
6689 extern "C"
6690 #endif
6691 /* We use char because int might match the return type of a gcc2
6692    builtin and then its argument prototype would still apply.  */
6693 char krb5_sendauth ();
6694 int
6695 main ()
6696 {
6697 krb5_sendauth ();
6698   ;
6699   return 0;
6700 }
6701 _ACEOF
6702 rm -f conftest.$ac_objext conftest$ac_exeext
6703 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6704   (eval $ac_link) 2>conftest.er1
6705   ac_status=$?
6706   grep -v '^ *+' conftest.er1 >conftest.err
6707   rm -f conftest.er1
6708   cat conftest.err >&5
6709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710   (exit $ac_status); } &&
6711          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6713   (eval $ac_try) 2>&5
6714   ac_status=$?
6715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6716   (exit $ac_status); }; } &&
6717          { ac_try='test -s conftest$ac_exeext'
6718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6719   (eval $ac_try) 2>&5
6720   ac_status=$?
6721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722   (exit $ac_status); }; }; then
6723   ac_cv_search_krb5_sendauth="-l$ac_lib"
6724 break
6725 else
6726   echo "$as_me: failed program was:" >&5
6727 sed 's/^/| /' conftest.$ac_ext >&5
6728
6729 fi
6730 rm -f conftest.err conftest.$ac_objext \
6731       conftest$ac_exeext conftest.$ac_ext
6732   done
6733 fi
6734 LIBS=$ac_func_search_save_LIBS
6735 fi
6736 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6737 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6738 if test "$ac_cv_search_krb5_sendauth" != no; then
6739   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6740
6741 else
6742   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6743 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6744    { (exit 1); exit 1; }; }
6745 fi
6746
6747   else
6748      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6749 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6750 if test "${ac_cv_search_com_err+set}" = set; then
6751   echo $ECHO_N "(cached) $ECHO_C" >&6
6752 else
6753   ac_func_search_save_LIBS=$LIBS
6754 ac_cv_search_com_err=no
6755 cat >conftest.$ac_ext <<_ACEOF
6756 /* confdefs.h.  */
6757 _ACEOF
6758 cat confdefs.h >>conftest.$ac_ext
6759 cat >>conftest.$ac_ext <<_ACEOF
6760 /* end confdefs.h.  */
6761
6762 /* Override any gcc2 internal prototype to avoid an error.  */
6763 #ifdef __cplusplus
6764 extern "C"
6765 #endif
6766 /* We use char because int might match the return type of a gcc2
6767    builtin and then its argument prototype would still apply.  */
6768 char com_err ();
6769 int
6770 main ()
6771 {
6772 com_err ();
6773   ;
6774   return 0;
6775 }
6776 _ACEOF
6777 rm -f conftest.$ac_objext conftest$ac_exeext
6778 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6779   (eval $ac_link) 2>conftest.er1
6780   ac_status=$?
6781   grep -v '^ *+' conftest.er1 >conftest.err
6782   rm -f conftest.er1
6783   cat conftest.err >&5
6784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6785   (exit $ac_status); } &&
6786          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6788   (eval $ac_try) 2>&5
6789   ac_status=$?
6790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6791   (exit $ac_status); }; } &&
6792          { ac_try='test -s conftest$ac_exeext'
6793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6794   (eval $ac_try) 2>&5
6795   ac_status=$?
6796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6797   (exit $ac_status); }; }; then
6798   ac_cv_search_com_err="none required"
6799 else
6800   echo "$as_me: failed program was:" >&5
6801 sed 's/^/| /' conftest.$ac_ext >&5
6802
6803 fi
6804 rm -f conftest.err conftest.$ac_objext \
6805       conftest$ac_exeext conftest.$ac_ext
6806 if test "$ac_cv_search_com_err" = no; then
6807   for ac_lib in 'comerr32 -lkrb5_32'; do
6808     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6809     cat >conftest.$ac_ext <<_ACEOF
6810 /* confdefs.h.  */
6811 _ACEOF
6812 cat confdefs.h >>conftest.$ac_ext
6813 cat >>conftest.$ac_ext <<_ACEOF
6814 /* end confdefs.h.  */
6815
6816 /* Override any gcc2 internal prototype to avoid an error.  */
6817 #ifdef __cplusplus
6818 extern "C"
6819 #endif
6820 /* We use char because int might match the return type of a gcc2
6821    builtin and then its argument prototype would still apply.  */
6822 char com_err ();
6823 int
6824 main ()
6825 {
6826 com_err ();
6827   ;
6828   return 0;
6829 }
6830 _ACEOF
6831 rm -f conftest.$ac_objext conftest$ac_exeext
6832 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6833   (eval $ac_link) 2>conftest.er1
6834   ac_status=$?
6835   grep -v '^ *+' conftest.er1 >conftest.err
6836   rm -f conftest.er1
6837   cat conftest.err >&5
6838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6839   (exit $ac_status); } &&
6840          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6842   (eval $ac_try) 2>&5
6843   ac_status=$?
6844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845   (exit $ac_status); }; } &&
6846          { ac_try='test -s conftest$ac_exeext'
6847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6848   (eval $ac_try) 2>&5
6849   ac_status=$?
6850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851   (exit $ac_status); }; }; then
6852   ac_cv_search_com_err="-l$ac_lib"
6853 break
6854 else
6855   echo "$as_me: failed program was:" >&5
6856 sed 's/^/| /' conftest.$ac_ext >&5
6857
6858 fi
6859 rm -f conftest.err conftest.$ac_objext \
6860       conftest$ac_exeext conftest.$ac_ext
6861   done
6862 fi
6863 LIBS=$ac_func_search_save_LIBS
6864 fi
6865 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6866 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6867 if test "$ac_cv_search_com_err" != no; then
6868   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6869
6870 else
6871   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6872 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6873    { (exit 1); exit 1; }; }
6874 fi
6875
6876   fi
6877 fi
6878
6879 if test "$with_openssl" = yes ; then
6880     if test "$PORTNAME" != "win32"; then
6881
6882 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6883 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6884 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6885   echo $ECHO_N "(cached) $ECHO_C" >&6
6886 else
6887   ac_check_lib_save_LIBS=$LIBS
6888 LIBS="-lcrypto  $LIBS"
6889 cat >conftest.$ac_ext <<_ACEOF
6890 /* confdefs.h.  */
6891 _ACEOF
6892 cat confdefs.h >>conftest.$ac_ext
6893 cat >>conftest.$ac_ext <<_ACEOF
6894 /* end confdefs.h.  */
6895
6896 /* Override any gcc2 internal prototype to avoid an error.  */
6897 #ifdef __cplusplus
6898 extern "C"
6899 #endif
6900 /* We use char because int might match the return type of a gcc2
6901    builtin and then its argument prototype would still apply.  */
6902 char CRYPTO_new_ex_data ();
6903 int
6904 main ()
6905 {
6906 CRYPTO_new_ex_data ();
6907   ;
6908   return 0;
6909 }
6910 _ACEOF
6911 rm -f conftest.$ac_objext conftest$ac_exeext
6912 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6913   (eval $ac_link) 2>conftest.er1
6914   ac_status=$?
6915   grep -v '^ *+' conftest.er1 >conftest.err
6916   rm -f conftest.er1
6917   cat conftest.err >&5
6918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6919   (exit $ac_status); } &&
6920          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6922   (eval $ac_try) 2>&5
6923   ac_status=$?
6924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925   (exit $ac_status); }; } &&
6926          { ac_try='test -s conftest$ac_exeext'
6927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6928   (eval $ac_try) 2>&5
6929   ac_status=$?
6930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6931   (exit $ac_status); }; }; then
6932   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6933 else
6934   echo "$as_me: failed program was:" >&5
6935 sed 's/^/| /' conftest.$ac_ext >&5
6936
6937 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6938 fi
6939 rm -f conftest.err conftest.$ac_objext \
6940       conftest$ac_exeext conftest.$ac_ext
6941 LIBS=$ac_check_lib_save_LIBS
6942 fi
6943 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6944 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6945 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6946   cat >>confdefs.h <<_ACEOF
6947 #define HAVE_LIBCRYPTO 1
6948 _ACEOF
6949
6950   LIBS="-lcrypto $LIBS"
6951
6952 else
6953   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
6954 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
6955    { (exit 1); exit 1; }; }
6956 fi
6957
6958
6959 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
6960 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
6961 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
6962   echo $ECHO_N "(cached) $ECHO_C" >&6
6963 else
6964   ac_check_lib_save_LIBS=$LIBS
6965 LIBS="-lssl  $LIBS"
6966 cat >conftest.$ac_ext <<_ACEOF
6967 /* confdefs.h.  */
6968 _ACEOF
6969 cat confdefs.h >>conftest.$ac_ext
6970 cat >>conftest.$ac_ext <<_ACEOF
6971 /* end confdefs.h.  */
6972
6973 /* Override any gcc2 internal prototype to avoid an error.  */
6974 #ifdef __cplusplus
6975 extern "C"
6976 #endif
6977 /* We use char because int might match the return type of a gcc2
6978    builtin and then its argument prototype would still apply.  */
6979 char SSL_library_init ();
6980 int
6981 main ()
6982 {
6983 SSL_library_init ();
6984   ;
6985   return 0;
6986 }
6987 _ACEOF
6988 rm -f conftest.$ac_objext conftest$ac_exeext
6989 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6990   (eval $ac_link) 2>conftest.er1
6991   ac_status=$?
6992   grep -v '^ *+' conftest.er1 >conftest.err
6993   rm -f conftest.er1
6994   cat conftest.err >&5
6995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6996   (exit $ac_status); } &&
6997          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
6998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6999   (eval $ac_try) 2>&5
7000   ac_status=$?
7001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7002   (exit $ac_status); }; } &&
7003          { ac_try='test -s conftest$ac_exeext'
7004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7005   (eval $ac_try) 2>&5
7006   ac_status=$?
7007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7008   (exit $ac_status); }; }; then
7009   ac_cv_lib_ssl_SSL_library_init=yes
7010 else
7011   echo "$as_me: failed program was:" >&5
7012 sed 's/^/| /' conftest.$ac_ext >&5
7013
7014 ac_cv_lib_ssl_SSL_library_init=no
7015 fi
7016 rm -f conftest.err conftest.$ac_objext \
7017       conftest$ac_exeext conftest.$ac_ext
7018 LIBS=$ac_check_lib_save_LIBS
7019 fi
7020 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7021 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7022 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7023   cat >>confdefs.h <<_ACEOF
7024 #define HAVE_LIBSSL 1
7025 _ACEOF
7026
7027   LIBS="-lssl $LIBS"
7028
7029 else
7030   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7031 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7032    { (exit 1); exit 1; }; }
7033 fi
7034
7035   else
7036
7037 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7038 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7039 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7040   echo $ECHO_N "(cached) $ECHO_C" >&6
7041 else
7042   ac_check_lib_save_LIBS=$LIBS
7043 LIBS="-leay32  $LIBS"
7044 cat >conftest.$ac_ext <<_ACEOF
7045 /* confdefs.h.  */
7046 _ACEOF
7047 cat confdefs.h >>conftest.$ac_ext
7048 cat >>conftest.$ac_ext <<_ACEOF
7049 /* end confdefs.h.  */
7050
7051 /* Override any gcc2 internal prototype to avoid an error.  */
7052 #ifdef __cplusplus
7053 extern "C"
7054 #endif
7055 /* We use char because int might match the return type of a gcc2
7056    builtin and then its argument prototype would still apply.  */
7057 char CRYPTO_new_ex_data ();
7058 int
7059 main ()
7060 {
7061 CRYPTO_new_ex_data ();
7062   ;
7063   return 0;
7064 }
7065 _ACEOF
7066 rm -f conftest.$ac_objext conftest$ac_exeext
7067 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7068   (eval $ac_link) 2>conftest.er1
7069   ac_status=$?
7070   grep -v '^ *+' conftest.er1 >conftest.err
7071   rm -f conftest.er1
7072   cat conftest.err >&5
7073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7074   (exit $ac_status); } &&
7075          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7077   (eval $ac_try) 2>&5
7078   ac_status=$?
7079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7080   (exit $ac_status); }; } &&
7081          { ac_try='test -s conftest$ac_exeext'
7082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7083   (eval $ac_try) 2>&5
7084   ac_status=$?
7085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7086   (exit $ac_status); }; }; then
7087   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7088 else
7089   echo "$as_me: failed program was:" >&5
7090 sed 's/^/| /' conftest.$ac_ext >&5
7091
7092 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7093 fi
7094 rm -f conftest.err conftest.$ac_objext \
7095       conftest$ac_exeext conftest.$ac_ext
7096 LIBS=$ac_check_lib_save_LIBS
7097 fi
7098 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7099 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7100 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7101   cat >>confdefs.h <<_ACEOF
7102 #define HAVE_LIBEAY32 1
7103 _ACEOF
7104
7105   LIBS="-leay32 $LIBS"
7106
7107 else
7108   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7109 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7110    { (exit 1); exit 1; }; }
7111 fi
7112
7113
7114 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7115 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7116 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7117   echo $ECHO_N "(cached) $ECHO_C" >&6
7118 else
7119   ac_check_lib_save_LIBS=$LIBS
7120 LIBS="-lssleay32  $LIBS"
7121 cat >conftest.$ac_ext <<_ACEOF
7122 /* confdefs.h.  */
7123 _ACEOF
7124 cat confdefs.h >>conftest.$ac_ext
7125 cat >>conftest.$ac_ext <<_ACEOF
7126 /* end confdefs.h.  */
7127
7128 /* Override any gcc2 internal prototype to avoid an error.  */
7129 #ifdef __cplusplus
7130 extern "C"
7131 #endif
7132 /* We use char because int might match the return type of a gcc2
7133    builtin and then its argument prototype would still apply.  */
7134 char SSL_library_init ();
7135 int
7136 main ()
7137 {
7138 SSL_library_init ();
7139   ;
7140   return 0;
7141 }
7142 _ACEOF
7143 rm -f conftest.$ac_objext conftest$ac_exeext
7144 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7145   (eval $ac_link) 2>conftest.er1
7146   ac_status=$?
7147   grep -v '^ *+' conftest.er1 >conftest.err
7148   rm -f conftest.er1
7149   cat conftest.err >&5
7150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7151   (exit $ac_status); } &&
7152          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7154   (eval $ac_try) 2>&5
7155   ac_status=$?
7156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7157   (exit $ac_status); }; } &&
7158          { ac_try='test -s conftest$ac_exeext'
7159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7160   (eval $ac_try) 2>&5
7161   ac_status=$?
7162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7163   (exit $ac_status); }; }; then
7164   ac_cv_lib_ssleay32_SSL_library_init=yes
7165 else
7166   echo "$as_me: failed program was:" >&5
7167 sed 's/^/| /' conftest.$ac_ext >&5
7168
7169 ac_cv_lib_ssleay32_SSL_library_init=no
7170 fi
7171 rm -f conftest.err conftest.$ac_objext \
7172       conftest$ac_exeext conftest.$ac_ext
7173 LIBS=$ac_check_lib_save_LIBS
7174 fi
7175 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7176 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7177 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7178   cat >>confdefs.h <<_ACEOF
7179 #define HAVE_LIBSSLEAY32 1
7180 _ACEOF
7181
7182   LIBS="-lssleay32 $LIBS"
7183
7184 else
7185   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7186 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7187    { (exit 1); exit 1; }; }
7188 fi
7189
7190   fi
7191 fi
7192
7193 if test "$with_pam" = yes ; then
7194
7195 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7196 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7197 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7198   echo $ECHO_N "(cached) $ECHO_C" >&6
7199 else
7200   ac_check_lib_save_LIBS=$LIBS
7201 LIBS="-lpam  $LIBS"
7202 cat >conftest.$ac_ext <<_ACEOF
7203 /* confdefs.h.  */
7204 _ACEOF
7205 cat confdefs.h >>conftest.$ac_ext
7206 cat >>conftest.$ac_ext <<_ACEOF
7207 /* end confdefs.h.  */
7208
7209 /* Override any gcc2 internal prototype to avoid an error.  */
7210 #ifdef __cplusplus
7211 extern "C"
7212 #endif
7213 /* We use char because int might match the return type of a gcc2
7214    builtin and then its argument prototype would still apply.  */
7215 char pam_start ();
7216 int
7217 main ()
7218 {
7219 pam_start ();
7220   ;
7221   return 0;
7222 }
7223 _ACEOF
7224 rm -f conftest.$ac_objext conftest$ac_exeext
7225 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7226   (eval $ac_link) 2>conftest.er1
7227   ac_status=$?
7228   grep -v '^ *+' conftest.er1 >conftest.err
7229   rm -f conftest.er1
7230   cat conftest.err >&5
7231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7232   (exit $ac_status); } &&
7233          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7235   (eval $ac_try) 2>&5
7236   ac_status=$?
7237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7238   (exit $ac_status); }; } &&
7239          { ac_try='test -s conftest$ac_exeext'
7240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7241   (eval $ac_try) 2>&5
7242   ac_status=$?
7243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7244   (exit $ac_status); }; }; then
7245   ac_cv_lib_pam_pam_start=yes
7246 else
7247   echo "$as_me: failed program was:" >&5
7248 sed 's/^/| /' conftest.$ac_ext >&5
7249
7250 ac_cv_lib_pam_pam_start=no
7251 fi
7252 rm -f conftest.err conftest.$ac_objext \
7253       conftest$ac_exeext conftest.$ac_ext
7254 LIBS=$ac_check_lib_save_LIBS
7255 fi
7256 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7257 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7258 if test $ac_cv_lib_pam_pam_start = yes; then
7259   cat >>confdefs.h <<_ACEOF
7260 #define HAVE_LIBPAM 1
7261 _ACEOF
7262
7263   LIBS="-lpam $LIBS"
7264
7265 else
7266   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7267 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7268    { (exit 1); exit 1; }; }
7269 fi
7270
7271 fi
7272
7273
7274 if test "$with_ldap" = yes ; then
7275   if test "$PORTNAME" != "win32"; then
7276
7277 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
7278 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
7279 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
7280   echo $ECHO_N "(cached) $ECHO_C" >&6
7281 else
7282   ac_check_lib_save_LIBS=$LIBS
7283 LIBS="-lldap  $LIBS"
7284 cat >conftest.$ac_ext <<_ACEOF
7285 /* confdefs.h.  */
7286 _ACEOF
7287 cat confdefs.h >>conftest.$ac_ext
7288 cat >>conftest.$ac_ext <<_ACEOF
7289 /* end confdefs.h.  */
7290
7291 /* Override any gcc2 internal prototype to avoid an error.  */
7292 #ifdef __cplusplus
7293 extern "C"
7294 #endif
7295 /* We use char because int might match the return type of a gcc2
7296    builtin and then its argument prototype would still apply.  */
7297 char ldap_bind ();
7298 int
7299 main ()
7300 {
7301 ldap_bind ();
7302   ;
7303   return 0;
7304 }
7305 _ACEOF
7306 rm -f conftest.$ac_objext conftest$ac_exeext
7307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7308   (eval $ac_link) 2>conftest.er1
7309   ac_status=$?
7310   grep -v '^ *+' conftest.er1 >conftest.err
7311   rm -f conftest.er1
7312   cat conftest.err >&5
7313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7314   (exit $ac_status); } &&
7315          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7317   (eval $ac_try) 2>&5
7318   ac_status=$?
7319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7320   (exit $ac_status); }; } &&
7321          { ac_try='test -s conftest$ac_exeext'
7322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7323   (eval $ac_try) 2>&5
7324   ac_status=$?
7325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7326   (exit $ac_status); }; }; then
7327   ac_cv_lib_ldap_ldap_bind=yes
7328 else
7329   echo "$as_me: failed program was:" >&5
7330 sed 's/^/| /' conftest.$ac_ext >&5
7331
7332 ac_cv_lib_ldap_ldap_bind=no
7333 fi
7334 rm -f conftest.err conftest.$ac_objext \
7335       conftest$ac_exeext conftest.$ac_ext
7336 LIBS=$ac_check_lib_save_LIBS
7337 fi
7338 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
7339 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
7340 if test $ac_cv_lib_ldap_ldap_bind = yes; then
7341   cat >>confdefs.h <<_ACEOF
7342 #define HAVE_LIBLDAP 1
7343 _ACEOF
7344
7345   LIBS="-lldap $LIBS"
7346
7347 else
7348   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
7349 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
7350    { (exit 1); exit 1; }; }
7351 fi
7352
7353   else
7354
7355 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
7356 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
7357 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
7358   echo $ECHO_N "(cached) $ECHO_C" >&6
7359 else
7360   ac_check_lib_save_LIBS=$LIBS
7361 LIBS="-lwldap32  $LIBS"
7362 cat >conftest.$ac_ext <<_ACEOF
7363 /* confdefs.h.  */
7364 _ACEOF
7365 cat confdefs.h >>conftest.$ac_ext
7366 cat >>conftest.$ac_ext <<_ACEOF
7367 /* end confdefs.h.  */
7368
7369 /* Override any gcc2 internal prototype to avoid an error.  */
7370 #ifdef __cplusplus
7371 extern "C"
7372 #endif
7373 /* We use char because int might match the return type of a gcc2
7374    builtin and then its argument prototype would still apply.  */
7375 char ldap_bind ();
7376 int
7377 main ()
7378 {
7379 ldap_bind ();
7380   ;
7381   return 0;
7382 }
7383 _ACEOF
7384 rm -f conftest.$ac_objext conftest$ac_exeext
7385 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7386   (eval $ac_link) 2>conftest.er1
7387   ac_status=$?
7388   grep -v '^ *+' conftest.er1 >conftest.err
7389   rm -f conftest.er1
7390   cat conftest.err >&5
7391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7392   (exit $ac_status); } &&
7393          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7395   (eval $ac_try) 2>&5
7396   ac_status=$?
7397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7398   (exit $ac_status); }; } &&
7399          { ac_try='test -s conftest$ac_exeext'
7400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7401   (eval $ac_try) 2>&5
7402   ac_status=$?
7403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7404   (exit $ac_status); }; }; then
7405   ac_cv_lib_wldap32_ldap_bind=yes
7406 else
7407   echo "$as_me: failed program was:" >&5
7408 sed 's/^/| /' conftest.$ac_ext >&5
7409
7410 ac_cv_lib_wldap32_ldap_bind=no
7411 fi
7412 rm -f conftest.err conftest.$ac_objext \
7413       conftest$ac_exeext conftest.$ac_ext
7414 LIBS=$ac_check_lib_save_LIBS
7415 fi
7416 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
7417 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
7418 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
7419   cat >>confdefs.h <<_ACEOF
7420 #define HAVE_LIBWLDAP32 1
7421 _ACEOF
7422
7423   LIBS="-lwldap32 $LIBS"
7424
7425 else
7426   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
7427 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
7428    { (exit 1); exit 1; }; }
7429 fi
7430
7431   fi
7432 fi
7433
7434 ##
7435 ## Header files
7436 ##
7437
7438 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7439 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7440 if test "${ac_cv_header_stdc+set}" = set; then
7441   echo $ECHO_N "(cached) $ECHO_C" >&6
7442 else
7443   cat >conftest.$ac_ext <<_ACEOF
7444 /* confdefs.h.  */
7445 _ACEOF
7446 cat confdefs.h >>conftest.$ac_ext
7447 cat >>conftest.$ac_ext <<_ACEOF
7448 /* end confdefs.h.  */
7449 #include <stdlib.h>
7450 #include <stdarg.h>
7451 #include <string.h>
7452 #include <float.h>
7453
7454 int
7455 main ()
7456 {
7457
7458   ;
7459   return 0;
7460 }
7461 _ACEOF
7462 rm -f conftest.$ac_objext
7463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7464   (eval $ac_compile) 2>conftest.er1
7465   ac_status=$?
7466   grep -v '^ *+' conftest.er1 >conftest.err
7467   rm -f conftest.er1
7468   cat conftest.err >&5
7469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7470   (exit $ac_status); } &&
7471          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7473   (eval $ac_try) 2>&5
7474   ac_status=$?
7475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7476   (exit $ac_status); }; } &&
7477          { ac_try='test -s conftest.$ac_objext'
7478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7479   (eval $ac_try) 2>&5
7480   ac_status=$?
7481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7482   (exit $ac_status); }; }; then
7483   ac_cv_header_stdc=yes
7484 else
7485   echo "$as_me: failed program was:" >&5
7486 sed 's/^/| /' conftest.$ac_ext >&5
7487
7488 ac_cv_header_stdc=no
7489 fi
7490 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7491
7492 if test $ac_cv_header_stdc = yes; then
7493   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7494   cat >conftest.$ac_ext <<_ACEOF
7495 /* confdefs.h.  */
7496 _ACEOF
7497 cat confdefs.h >>conftest.$ac_ext
7498 cat >>conftest.$ac_ext <<_ACEOF
7499 /* end confdefs.h.  */
7500 #include <string.h>
7501
7502 _ACEOF
7503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7504   $EGREP "memchr" >/dev/null 2>&1; then
7505   :
7506 else
7507   ac_cv_header_stdc=no
7508 fi
7509 rm -f conftest*
7510
7511 fi
7512
7513 if test $ac_cv_header_stdc = yes; then
7514   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7515   cat >conftest.$ac_ext <<_ACEOF
7516 /* confdefs.h.  */
7517 _ACEOF
7518 cat confdefs.h >>conftest.$ac_ext
7519 cat >>conftest.$ac_ext <<_ACEOF
7520 /* end confdefs.h.  */
7521 #include <stdlib.h>
7522
7523 _ACEOF
7524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7525   $EGREP "free" >/dev/null 2>&1; then
7526   :
7527 else
7528   ac_cv_header_stdc=no
7529 fi
7530 rm -f conftest*
7531
7532 fi
7533
7534 if test $ac_cv_header_stdc = yes; then
7535   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7536   if test "$cross_compiling" = yes; then
7537   :
7538 else
7539   cat >conftest.$ac_ext <<_ACEOF
7540 /* confdefs.h.  */
7541 _ACEOF
7542 cat confdefs.h >>conftest.$ac_ext
7543 cat >>conftest.$ac_ext <<_ACEOF
7544 /* end confdefs.h.  */
7545 #include <ctype.h>
7546 #if ((' ' & 0x0FF) == 0x020)
7547 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7548 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7549 #else
7550 # define ISLOWER(c) \
7551                    (('a' <= (c) && (c) <= 'i') \
7552                      || ('j' <= (c) && (c) <= 'r') \
7553                      || ('s' <= (c) && (c) <= 'z'))
7554 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7555 #endif
7556
7557 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7558 int
7559 main ()
7560 {
7561   int i;
7562   for (i = 0; i < 256; i++)
7563     if (XOR (islower (i), ISLOWER (i))
7564         || toupper (i) != TOUPPER (i))
7565       exit(2);
7566   exit (0);
7567 }
7568 _ACEOF
7569 rm -f conftest$ac_exeext
7570 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7571   (eval $ac_link) 2>&5
7572   ac_status=$?
7573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7574   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7576   (eval $ac_try) 2>&5
7577   ac_status=$?
7578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7579   (exit $ac_status); }; }; then
7580   :
7581 else
7582   echo "$as_me: program exited with status $ac_status" >&5
7583 echo "$as_me: failed program was:" >&5
7584 sed 's/^/| /' conftest.$ac_ext >&5
7585
7586 ( exit $ac_status )
7587 ac_cv_header_stdc=no
7588 fi
7589 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7590 fi
7591 fi
7592 fi
7593 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7594 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7595 if test $ac_cv_header_stdc = yes; then
7596
7597 cat >>confdefs.h <<\_ACEOF
7598 #define STDC_HEADERS 1
7599 _ACEOF
7600
7601 fi
7602
7603 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7614                   inttypes.h stdint.h unistd.h
7615 do
7616 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7617 echo "$as_me:$LINENO: checking for $ac_header" >&5
7618 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7620   echo $ECHO_N "(cached) $ECHO_C" >&6
7621 else
7622   cat >conftest.$ac_ext <<_ACEOF
7623 /* confdefs.h.  */
7624 _ACEOF
7625 cat confdefs.h >>conftest.$ac_ext
7626 cat >>conftest.$ac_ext <<_ACEOF
7627 /* end confdefs.h.  */
7628 $ac_includes_default
7629
7630 #include <$ac_header>
7631 _ACEOF
7632 rm -f conftest.$ac_objext
7633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7634   (eval $ac_compile) 2>conftest.er1
7635   ac_status=$?
7636   grep -v '^ *+' conftest.er1 >conftest.err
7637   rm -f conftest.er1
7638   cat conftest.err >&5
7639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7640   (exit $ac_status); } &&
7641          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7643   (eval $ac_try) 2>&5
7644   ac_status=$?
7645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7646   (exit $ac_status); }; } &&
7647          { ac_try='test -s conftest.$ac_objext'
7648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7649   (eval $ac_try) 2>&5
7650   ac_status=$?
7651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7652   (exit $ac_status); }; }; then
7653   eval "$as_ac_Header=yes"
7654 else
7655   echo "$as_me: failed program was:" >&5
7656 sed 's/^/| /' conftest.$ac_ext >&5
7657
7658 eval "$as_ac_Header=no"
7659 fi
7660 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7661 fi
7662 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7663 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7664 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7665   cat >>confdefs.h <<_ACEOF
7666 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7667 _ACEOF
7668
7669 fi
7670
7671 done
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699 for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
7700 do
7701 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7702 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7703   echo "$as_me:$LINENO: checking for $ac_header" >&5
7704 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7705 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7706   echo $ECHO_N "(cached) $ECHO_C" >&6
7707 fi
7708 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7709 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7710 else
7711   # Is the header compilable?
7712 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7713 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7714 cat >conftest.$ac_ext <<_ACEOF
7715 /* confdefs.h.  */
7716 _ACEOF
7717 cat confdefs.h >>conftest.$ac_ext
7718 cat >>conftest.$ac_ext <<_ACEOF
7719 /* end confdefs.h.  */
7720 $ac_includes_default
7721 #include <$ac_header>
7722 _ACEOF
7723 rm -f conftest.$ac_objext
7724 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7725   (eval $ac_compile) 2>conftest.er1
7726   ac_status=$?
7727   grep -v '^ *+' conftest.er1 >conftest.err
7728   rm -f conftest.er1
7729   cat conftest.err >&5
7730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7731   (exit $ac_status); } &&
7732          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7734   (eval $ac_try) 2>&5
7735   ac_status=$?
7736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7737   (exit $ac_status); }; } &&
7738          { ac_try='test -s conftest.$ac_objext'
7739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7740   (eval $ac_try) 2>&5
7741   ac_status=$?
7742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7743   (exit $ac_status); }; }; then
7744   ac_header_compiler=yes
7745 else
7746   echo "$as_me: failed program was:" >&5
7747 sed 's/^/| /' conftest.$ac_ext >&5
7748
7749 ac_header_compiler=no
7750 fi
7751 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7752 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7753 echo "${ECHO_T}$ac_header_compiler" >&6
7754
7755 # Is the header present?
7756 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7757 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7758 cat >conftest.$ac_ext <<_ACEOF
7759 /* confdefs.h.  */
7760 _ACEOF
7761 cat confdefs.h >>conftest.$ac_ext
7762 cat >>conftest.$ac_ext <<_ACEOF
7763 /* end confdefs.h.  */
7764 #include <$ac_header>
7765 _ACEOF
7766 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7767   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7768   ac_status=$?
7769   grep -v '^ *+' conftest.er1 >conftest.err
7770   rm -f conftest.er1
7771   cat conftest.err >&5
7772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7773   (exit $ac_status); } >/dev/null; then
7774   if test -s conftest.err; then
7775     ac_cpp_err=$ac_c_preproc_warn_flag
7776     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7777   else
7778     ac_cpp_err=
7779   fi
7780 else
7781   ac_cpp_err=yes
7782 fi
7783 if test -z "$ac_cpp_err"; then
7784   ac_header_preproc=yes
7785 else
7786   echo "$as_me: failed program was:" >&5
7787 sed 's/^/| /' conftest.$ac_ext >&5
7788
7789   ac_header_preproc=no
7790 fi
7791 rm -f conftest.err conftest.$ac_ext
7792 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7793 echo "${ECHO_T}$ac_header_preproc" >&6
7794
7795 # So?  What about this header?
7796 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7797   yes:no: )
7798     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7799 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7800     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7801 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7802     ac_header_preproc=yes
7803     ;;
7804   no:yes:* )
7805     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7806 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7807     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7808 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7809     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7810 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7811     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7812 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7813     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7814 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7815     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7816 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7817     (
7818       cat <<\_ASBOX
7819 ## ---------------------------------------- ##
7820 ## Report this to pgsql-bugs@postgresql.org ##
7821 ## ---------------------------------------- ##
7822 _ASBOX
7823     ) |
7824       sed "s/^/$as_me: WARNING:     /" >&2
7825     ;;
7826 esac
7827 echo "$as_me:$LINENO: checking for $ac_header" >&5
7828 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7829 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7830   echo $ECHO_N "(cached) $ECHO_C" >&6
7831 else
7832   eval "$as_ac_Header=\$ac_header_preproc"
7833 fi
7834 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7835 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7836
7837 fi
7838 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7839   cat >>confdefs.h <<_ACEOF
7840 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7841 _ACEOF
7842
7843 fi
7844
7845 done
7846
7847
7848 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7849 # netinet/in.h is included first.
7850
7851 for ac_header in netinet/in.h
7852 do
7853 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7854 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7855   echo "$as_me:$LINENO: checking for $ac_header" >&5
7856 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7857 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7858   echo $ECHO_N "(cached) $ECHO_C" >&6
7859 fi
7860 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7861 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7862 else
7863   # Is the header compilable?
7864 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7865 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7866 cat >conftest.$ac_ext <<_ACEOF
7867 /* confdefs.h.  */
7868 _ACEOF
7869 cat confdefs.h >>conftest.$ac_ext
7870 cat >>conftest.$ac_ext <<_ACEOF
7871 /* end confdefs.h.  */
7872 $ac_includes_default
7873 #include <$ac_header>
7874 _ACEOF
7875 rm -f conftest.$ac_objext
7876 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7877   (eval $ac_compile) 2>conftest.er1
7878   ac_status=$?
7879   grep -v '^ *+' conftest.er1 >conftest.err
7880   rm -f conftest.er1
7881   cat conftest.err >&5
7882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7883   (exit $ac_status); } &&
7884          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7886   (eval $ac_try) 2>&5
7887   ac_status=$?
7888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7889   (exit $ac_status); }; } &&
7890          { ac_try='test -s conftest.$ac_objext'
7891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7892   (eval $ac_try) 2>&5
7893   ac_status=$?
7894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895   (exit $ac_status); }; }; then
7896   ac_header_compiler=yes
7897 else
7898   echo "$as_me: failed program was:" >&5
7899 sed 's/^/| /' conftest.$ac_ext >&5
7900
7901 ac_header_compiler=no
7902 fi
7903 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7904 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7905 echo "${ECHO_T}$ac_header_compiler" >&6
7906
7907 # Is the header present?
7908 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7909 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7910 cat >conftest.$ac_ext <<_ACEOF
7911 /* confdefs.h.  */
7912 _ACEOF
7913 cat confdefs.h >>conftest.$ac_ext
7914 cat >>conftest.$ac_ext <<_ACEOF
7915 /* end confdefs.h.  */
7916 #include <$ac_header>
7917 _ACEOF
7918 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7919   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7920   ac_status=$?
7921   grep -v '^ *+' conftest.er1 >conftest.err
7922   rm -f conftest.er1
7923   cat conftest.err >&5
7924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7925   (exit $ac_status); } >/dev/null; then
7926   if test -s conftest.err; then
7927     ac_cpp_err=$ac_c_preproc_warn_flag
7928     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7929   else
7930     ac_cpp_err=
7931   fi
7932 else
7933   ac_cpp_err=yes
7934 fi
7935 if test -z "$ac_cpp_err"; then
7936   ac_header_preproc=yes
7937 else
7938   echo "$as_me: failed program was:" >&5
7939 sed 's/^/| /' conftest.$ac_ext >&5
7940
7941   ac_header_preproc=no
7942 fi
7943 rm -f conftest.err conftest.$ac_ext
7944 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7945 echo "${ECHO_T}$ac_header_preproc" >&6
7946
7947 # So?  What about this header?
7948 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7949   yes:no: )
7950     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7951 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7952     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7953 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7954     ac_header_preproc=yes
7955     ;;
7956   no:yes:* )
7957     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7958 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7959     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7960 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7961     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7962 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7963     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7964 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7965     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7966 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7967     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7968 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7969     (
7970       cat <<\_ASBOX
7971 ## ---------------------------------------- ##
7972 ## Report this to pgsql-bugs@postgresql.org ##
7973 ## ---------------------------------------- ##
7974 _ASBOX
7975     ) |
7976       sed "s/^/$as_me: WARNING:     /" >&2
7977     ;;
7978 esac
7979 echo "$as_me:$LINENO: checking for $ac_header" >&5
7980 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7981 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7982   echo $ECHO_N "(cached) $ECHO_C" >&6
7983 else
7984   eval "$as_ac_Header=\$ac_header_preproc"
7985 fi
7986 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7987 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7988
7989 fi
7990 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7991   cat >>confdefs.h <<_ACEOF
7992 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7993 _ACEOF
7994
7995 fi
7996
7997 done
7998
7999
8000 for ac_header in netinet/tcp.h
8001 do
8002 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8003 echo "$as_me:$LINENO: checking for $ac_header" >&5
8004 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8005 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8006   echo $ECHO_N "(cached) $ECHO_C" >&6
8007 else
8008   cat >conftest.$ac_ext <<_ACEOF
8009 /* confdefs.h.  */
8010 _ACEOF
8011 cat confdefs.h >>conftest.$ac_ext
8012 cat >>conftest.$ac_ext <<_ACEOF
8013 /* end confdefs.h.  */
8014 $ac_includes_default
8015 #ifdef HAVE_NETINET_IN_H
8016 #include <netinet/in.h>
8017 #endif
8018
8019
8020 #include <$ac_header>
8021 _ACEOF
8022 rm -f conftest.$ac_objext
8023 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8024   (eval $ac_compile) 2>conftest.er1
8025   ac_status=$?
8026   grep -v '^ *+' conftest.er1 >conftest.err
8027   rm -f conftest.er1
8028   cat conftest.err >&5
8029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8030   (exit $ac_status); } &&
8031          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8033   (eval $ac_try) 2>&5
8034   ac_status=$?
8035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8036   (exit $ac_status); }; } &&
8037          { ac_try='test -s conftest.$ac_objext'
8038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8039   (eval $ac_try) 2>&5
8040   ac_status=$?
8041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8042   (exit $ac_status); }; }; then
8043   eval "$as_ac_Header=yes"
8044 else
8045   echo "$as_me: failed program was:" >&5
8046 sed 's/^/| /' conftest.$ac_ext >&5
8047
8048 eval "$as_ac_Header=no"
8049 fi
8050 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8051 fi
8052 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8053 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8054 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8055   cat >>confdefs.h <<_ACEOF
8056 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8057 _ACEOF
8058
8059 fi
8060
8061 done
8062
8063
8064 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8065
8066 for ac_header in readline/readline.h
8067 do
8068 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8069 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8070   echo "$as_me:$LINENO: checking for $ac_header" >&5
8071 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8072 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8073   echo $ECHO_N "(cached) $ECHO_C" >&6
8074 fi
8075 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8076 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8077 else
8078   # Is the header compilable?
8079 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8080 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8081 cat >conftest.$ac_ext <<_ACEOF
8082 /* confdefs.h.  */
8083 _ACEOF
8084 cat confdefs.h >>conftest.$ac_ext
8085 cat >>conftest.$ac_ext <<_ACEOF
8086 /* end confdefs.h.  */
8087 $ac_includes_default
8088 #include <$ac_header>
8089 _ACEOF
8090 rm -f conftest.$ac_objext
8091 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8092   (eval $ac_compile) 2>conftest.er1
8093   ac_status=$?
8094   grep -v '^ *+' conftest.er1 >conftest.err
8095   rm -f conftest.er1
8096   cat conftest.err >&5
8097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098   (exit $ac_status); } &&
8099          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8101   (eval $ac_try) 2>&5
8102   ac_status=$?
8103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8104   (exit $ac_status); }; } &&
8105          { ac_try='test -s conftest.$ac_objext'
8106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8107   (eval $ac_try) 2>&5
8108   ac_status=$?
8109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8110   (exit $ac_status); }; }; then
8111   ac_header_compiler=yes
8112 else
8113   echo "$as_me: failed program was:" >&5
8114 sed 's/^/| /' conftest.$ac_ext >&5
8115
8116 ac_header_compiler=no
8117 fi
8118 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8119 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8120 echo "${ECHO_T}$ac_header_compiler" >&6
8121
8122 # Is the header present?
8123 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8124 echo $ECHO_N "checking $ac_header presence... $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 #include <$ac_header>
8132 _ACEOF
8133 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8135   ac_status=$?
8136   grep -v '^ *+' conftest.er1 >conftest.err
8137   rm -f conftest.er1
8138   cat conftest.err >&5
8139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8140   (exit $ac_status); } >/dev/null; then
8141   if test -s conftest.err; then
8142     ac_cpp_err=$ac_c_preproc_warn_flag
8143     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8144   else
8145     ac_cpp_err=
8146   fi
8147 else
8148   ac_cpp_err=yes
8149 fi
8150 if test -z "$ac_cpp_err"; then
8151   ac_header_preproc=yes
8152 else
8153   echo "$as_me: failed program was:" >&5
8154 sed 's/^/| /' conftest.$ac_ext >&5
8155
8156   ac_header_preproc=no
8157 fi
8158 rm -f conftest.err conftest.$ac_ext
8159 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8160 echo "${ECHO_T}$ac_header_preproc" >&6
8161
8162 # So?  What about this header?
8163 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8164   yes:no: )
8165     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8166 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8167     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8168 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8169     ac_header_preproc=yes
8170     ;;
8171   no:yes:* )
8172     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8173 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8174     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8175 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8176     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8177 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8178     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8179 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8180     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8181 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8182     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8183 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8184     (
8185       cat <<\_ASBOX
8186 ## ---------------------------------------- ##
8187 ## Report this to pgsql-bugs@postgresql.org ##
8188 ## ---------------------------------------- ##
8189 _ASBOX
8190     ) |
8191       sed "s/^/$as_me: WARNING:     /" >&2
8192     ;;
8193 esac
8194 echo "$as_me:$LINENO: checking for $ac_header" >&5
8195 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8196 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8197   echo $ECHO_N "(cached) $ECHO_C" >&6
8198 else
8199   eval "$as_ac_Header=\$ac_header_preproc"
8200 fi
8201 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8202 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8203
8204 fi
8205 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8206   cat >>confdefs.h <<_ACEOF
8207 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8208 _ACEOF
8209
8210 else
8211
8212 for ac_header in readline.h
8213 do
8214 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8215 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8216   echo "$as_me:$LINENO: checking for $ac_header" >&5
8217 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8218 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8219   echo $ECHO_N "(cached) $ECHO_C" >&6
8220 fi
8221 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8222 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8223 else
8224   # Is the header compilable?
8225 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8226 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8227 cat >conftest.$ac_ext <<_ACEOF
8228 /* confdefs.h.  */
8229 _ACEOF
8230 cat confdefs.h >>conftest.$ac_ext
8231 cat >>conftest.$ac_ext <<_ACEOF
8232 /* end confdefs.h.  */
8233 $ac_includes_default
8234 #include <$ac_header>
8235 _ACEOF
8236 rm -f conftest.$ac_objext
8237 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8238   (eval $ac_compile) 2>conftest.er1
8239   ac_status=$?
8240   grep -v '^ *+' conftest.er1 >conftest.err
8241   rm -f conftest.er1
8242   cat conftest.err >&5
8243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8244   (exit $ac_status); } &&
8245          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8247   (eval $ac_try) 2>&5
8248   ac_status=$?
8249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8250   (exit $ac_status); }; } &&
8251          { ac_try='test -s conftest.$ac_objext'
8252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8253   (eval $ac_try) 2>&5
8254   ac_status=$?
8255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256   (exit $ac_status); }; }; then
8257   ac_header_compiler=yes
8258 else
8259   echo "$as_me: failed program was:" >&5
8260 sed 's/^/| /' conftest.$ac_ext >&5
8261
8262 ac_header_compiler=no
8263 fi
8264 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8265 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8266 echo "${ECHO_T}$ac_header_compiler" >&6
8267
8268 # Is the header present?
8269 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8270 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8271 cat >conftest.$ac_ext <<_ACEOF
8272 /* confdefs.h.  */
8273 _ACEOF
8274 cat confdefs.h >>conftest.$ac_ext
8275 cat >>conftest.$ac_ext <<_ACEOF
8276 /* end confdefs.h.  */
8277 #include <$ac_header>
8278 _ACEOF
8279 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8280   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8281   ac_status=$?
8282   grep -v '^ *+' conftest.er1 >conftest.err
8283   rm -f conftest.er1
8284   cat conftest.err >&5
8285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8286   (exit $ac_status); } >/dev/null; then
8287   if test -s conftest.err; then
8288     ac_cpp_err=$ac_c_preproc_warn_flag
8289     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8290   else
8291     ac_cpp_err=
8292   fi
8293 else
8294   ac_cpp_err=yes
8295 fi
8296 if test -z "$ac_cpp_err"; then
8297   ac_header_preproc=yes
8298 else
8299   echo "$as_me: failed program was:" >&5
8300 sed 's/^/| /' conftest.$ac_ext >&5
8301
8302   ac_header_preproc=no
8303 fi
8304 rm -f conftest.err conftest.$ac_ext
8305 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8306 echo "${ECHO_T}$ac_header_preproc" >&6
8307
8308 # So?  What about this header?
8309 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8310   yes:no: )
8311     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8312 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8313     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8314 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8315     ac_header_preproc=yes
8316     ;;
8317   no:yes:* )
8318     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8319 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8320     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8321 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8322     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8323 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8324     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8325 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8326     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8327 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8328     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8329 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8330     (
8331       cat <<\_ASBOX
8332 ## ---------------------------------------- ##
8333 ## Report this to pgsql-bugs@postgresql.org ##
8334 ## ---------------------------------------- ##
8335 _ASBOX
8336     ) |
8337       sed "s/^/$as_me: WARNING:     /" >&2
8338     ;;
8339 esac
8340 echo "$as_me:$LINENO: checking for $ac_header" >&5
8341 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8342 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8343   echo $ECHO_N "(cached) $ECHO_C" >&6
8344 else
8345   eval "$as_ac_Header=\$ac_header_preproc"
8346 fi
8347 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8348 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8349
8350 fi
8351 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8352   cat >>confdefs.h <<_ACEOF
8353 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8354 _ACEOF
8355
8356 else
8357   { { echo "$as_me:$LINENO: error: readline header not found
8358 If you have readline already installed, see config.log for details on the
8359 failure.  It is possible the compiler isn't looking in the proper directory.
8360 Use --without-readline to disable readline support." >&5
8361 echo "$as_me: error: readline header not found
8362 If you have readline already installed, see config.log for details on the
8363 failure.  It is possible the compiler isn't looking in the proper directory.
8364 Use --without-readline to disable readline support." >&2;}
8365    { (exit 1); exit 1; }; }
8366 fi
8367
8368 done
8369
8370 fi
8371
8372 done
8373
8374
8375 for ac_header in readline/history.h
8376 do
8377 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8378 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8379   echo "$as_me:$LINENO: checking for $ac_header" >&5
8380 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8381 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8382   echo $ECHO_N "(cached) $ECHO_C" >&6
8383 fi
8384 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8385 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8386 else
8387   # Is the header compilable?
8388 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8389 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8390 cat >conftest.$ac_ext <<_ACEOF
8391 /* confdefs.h.  */
8392 _ACEOF
8393 cat confdefs.h >>conftest.$ac_ext
8394 cat >>conftest.$ac_ext <<_ACEOF
8395 /* end confdefs.h.  */
8396 $ac_includes_default
8397 #include <$ac_header>
8398 _ACEOF
8399 rm -f conftest.$ac_objext
8400 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8401   (eval $ac_compile) 2>conftest.er1
8402   ac_status=$?
8403   grep -v '^ *+' conftest.er1 >conftest.err
8404   rm -f conftest.er1
8405   cat conftest.err >&5
8406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8407   (exit $ac_status); } &&
8408          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8410   (eval $ac_try) 2>&5
8411   ac_status=$?
8412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8413   (exit $ac_status); }; } &&
8414          { ac_try='test -s conftest.$ac_objext'
8415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8416   (eval $ac_try) 2>&5
8417   ac_status=$?
8418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8419   (exit $ac_status); }; }; then
8420   ac_header_compiler=yes
8421 else
8422   echo "$as_me: failed program was:" >&5
8423 sed 's/^/| /' conftest.$ac_ext >&5
8424
8425 ac_header_compiler=no
8426 fi
8427 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8428 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8429 echo "${ECHO_T}$ac_header_compiler" >&6
8430
8431 # Is the header present?
8432 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8433 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8434 cat >conftest.$ac_ext <<_ACEOF
8435 /* confdefs.h.  */
8436 _ACEOF
8437 cat confdefs.h >>conftest.$ac_ext
8438 cat >>conftest.$ac_ext <<_ACEOF
8439 /* end confdefs.h.  */
8440 #include <$ac_header>
8441 _ACEOF
8442 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8443   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8444   ac_status=$?
8445   grep -v '^ *+' conftest.er1 >conftest.err
8446   rm -f conftest.er1
8447   cat conftest.err >&5
8448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8449   (exit $ac_status); } >/dev/null; then
8450   if test -s conftest.err; then
8451     ac_cpp_err=$ac_c_preproc_warn_flag
8452     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8453   else
8454     ac_cpp_err=
8455   fi
8456 else
8457   ac_cpp_err=yes
8458 fi
8459 if test -z "$ac_cpp_err"; then
8460   ac_header_preproc=yes
8461 else
8462   echo "$as_me: failed program was:" >&5
8463 sed 's/^/| /' conftest.$ac_ext >&5
8464
8465   ac_header_preproc=no
8466 fi
8467 rm -f conftest.err conftest.$ac_ext
8468 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8469 echo "${ECHO_T}$ac_header_preproc" >&6
8470
8471 # So?  What about this header?
8472 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8473   yes:no: )
8474     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8475 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8476     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8477 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8478     ac_header_preproc=yes
8479     ;;
8480   no:yes:* )
8481     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8482 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8483     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8484 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8485     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8486 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8487     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8488 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8489     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8490 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8491     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8492 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8493     (
8494       cat <<\_ASBOX
8495 ## ---------------------------------------- ##
8496 ## Report this to pgsql-bugs@postgresql.org ##
8497 ## ---------------------------------------- ##
8498 _ASBOX
8499     ) |
8500       sed "s/^/$as_me: WARNING:     /" >&2
8501     ;;
8502 esac
8503 echo "$as_me:$LINENO: checking for $ac_header" >&5
8504 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8505 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8506   echo $ECHO_N "(cached) $ECHO_C" >&6
8507 else
8508   eval "$as_ac_Header=\$ac_header_preproc"
8509 fi
8510 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8511 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8512
8513 fi
8514 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8515   cat >>confdefs.h <<_ACEOF
8516 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8517 _ACEOF
8518
8519 else
8520
8521 for ac_header in history.h
8522 do
8523 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8524 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8525   echo "$as_me:$LINENO: checking for $ac_header" >&5
8526 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8527 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8528   echo $ECHO_N "(cached) $ECHO_C" >&6
8529 fi
8530 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8531 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8532 else
8533   # Is the header compilable?
8534 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8535 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8536 cat >conftest.$ac_ext <<_ACEOF
8537 /* confdefs.h.  */
8538 _ACEOF
8539 cat confdefs.h >>conftest.$ac_ext
8540 cat >>conftest.$ac_ext <<_ACEOF
8541 /* end confdefs.h.  */
8542 $ac_includes_default
8543 #include <$ac_header>
8544 _ACEOF
8545 rm -f conftest.$ac_objext
8546 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8547   (eval $ac_compile) 2>conftest.er1
8548   ac_status=$?
8549   grep -v '^ *+' conftest.er1 >conftest.err
8550   rm -f conftest.er1
8551   cat conftest.err >&5
8552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8553   (exit $ac_status); } &&
8554          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8556   (eval $ac_try) 2>&5
8557   ac_status=$?
8558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8559   (exit $ac_status); }; } &&
8560          { ac_try='test -s conftest.$ac_objext'
8561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8562   (eval $ac_try) 2>&5
8563   ac_status=$?
8564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8565   (exit $ac_status); }; }; then
8566   ac_header_compiler=yes
8567 else
8568   echo "$as_me: failed program was:" >&5
8569 sed 's/^/| /' conftest.$ac_ext >&5
8570
8571 ac_header_compiler=no
8572 fi
8573 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8574 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8575 echo "${ECHO_T}$ac_header_compiler" >&6
8576
8577 # Is the header present?
8578 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8579 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8580 cat >conftest.$ac_ext <<_ACEOF
8581 /* confdefs.h.  */
8582 _ACEOF
8583 cat confdefs.h >>conftest.$ac_ext
8584 cat >>conftest.$ac_ext <<_ACEOF
8585 /* end confdefs.h.  */
8586 #include <$ac_header>
8587 _ACEOF
8588 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8589   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8590   ac_status=$?
8591   grep -v '^ *+' conftest.er1 >conftest.err
8592   rm -f conftest.er1
8593   cat conftest.err >&5
8594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8595   (exit $ac_status); } >/dev/null; then
8596   if test -s conftest.err; then
8597     ac_cpp_err=$ac_c_preproc_warn_flag
8598     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8599   else
8600     ac_cpp_err=
8601   fi
8602 else
8603   ac_cpp_err=yes
8604 fi
8605 if test -z "$ac_cpp_err"; then
8606   ac_header_preproc=yes
8607 else
8608   echo "$as_me: failed program was:" >&5
8609 sed 's/^/| /' conftest.$ac_ext >&5
8610
8611   ac_header_preproc=no
8612 fi
8613 rm -f conftest.err conftest.$ac_ext
8614 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8615 echo "${ECHO_T}$ac_header_preproc" >&6
8616
8617 # So?  What about this header?
8618 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8619   yes:no: )
8620     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8621 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8622     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8623 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8624     ac_header_preproc=yes
8625     ;;
8626   no:yes:* )
8627     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8628 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8629     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8630 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8631     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8632 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8633     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8634 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8635     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8636 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8637     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8638 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8639     (
8640       cat <<\_ASBOX
8641 ## ---------------------------------------- ##
8642 ## Report this to pgsql-bugs@postgresql.org ##
8643 ## ---------------------------------------- ##
8644 _ASBOX
8645     ) |
8646       sed "s/^/$as_me: WARNING:     /" >&2
8647     ;;
8648 esac
8649 echo "$as_me:$LINENO: checking for $ac_header" >&5
8650 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8651 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8652   echo $ECHO_N "(cached) $ECHO_C" >&6
8653 else
8654   eval "$as_ac_Header=\$ac_header_preproc"
8655 fi
8656 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8657 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8658
8659 fi
8660 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8661   cat >>confdefs.h <<_ACEOF
8662 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8663 _ACEOF
8664
8665 else
8666   { { echo "$as_me:$LINENO: error: history header not found
8667 If you have readline already installed, see config.log for details on the
8668 failure.  It is possible the compiler isn't looking in the proper directory.
8669 Use --without-readline to disable readline support." >&5
8670 echo "$as_me: error: history header not found
8671 If you have readline already installed, see config.log for details on the
8672 failure.  It is possible the compiler isn't looking in the proper directory.
8673 Use --without-readline to disable readline support." >&2;}
8674    { (exit 1); exit 1; }; }
8675 fi
8676
8677 done
8678
8679 fi
8680
8681 done
8682
8683 fi
8684
8685 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8686 # Some installations of libedit usurp /usr/include/readline/, which seems
8687 # bad practice, since in combined installations readline will have its headers
8688 # there.  We might have to resort to AC_EGREP checks to make sure we found
8689 # the proper header...
8690
8691 for ac_header in editline/readline.h
8692 do
8693 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8694 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8695   echo "$as_me:$LINENO: checking for $ac_header" >&5
8696 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8697 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8698   echo $ECHO_N "(cached) $ECHO_C" >&6
8699 fi
8700 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8701 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8702 else
8703   # Is the header compilable?
8704 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8705 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8706 cat >conftest.$ac_ext <<_ACEOF
8707 /* confdefs.h.  */
8708 _ACEOF
8709 cat confdefs.h >>conftest.$ac_ext
8710 cat >>conftest.$ac_ext <<_ACEOF
8711 /* end confdefs.h.  */
8712 $ac_includes_default
8713 #include <$ac_header>
8714 _ACEOF
8715 rm -f conftest.$ac_objext
8716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8717   (eval $ac_compile) 2>conftest.er1
8718   ac_status=$?
8719   grep -v '^ *+' conftest.er1 >conftest.err
8720   rm -f conftest.er1
8721   cat conftest.err >&5
8722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723   (exit $ac_status); } &&
8724          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8726   (eval $ac_try) 2>&5
8727   ac_status=$?
8728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729   (exit $ac_status); }; } &&
8730          { ac_try='test -s conftest.$ac_objext'
8731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8732   (eval $ac_try) 2>&5
8733   ac_status=$?
8734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8735   (exit $ac_status); }; }; then
8736   ac_header_compiler=yes
8737 else
8738   echo "$as_me: failed program was:" >&5
8739 sed 's/^/| /' conftest.$ac_ext >&5
8740
8741 ac_header_compiler=no
8742 fi
8743 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8744 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8745 echo "${ECHO_T}$ac_header_compiler" >&6
8746
8747 # Is the header present?
8748 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8749 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8750 cat >conftest.$ac_ext <<_ACEOF
8751 /* confdefs.h.  */
8752 _ACEOF
8753 cat confdefs.h >>conftest.$ac_ext
8754 cat >>conftest.$ac_ext <<_ACEOF
8755 /* end confdefs.h.  */
8756 #include <$ac_header>
8757 _ACEOF
8758 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8759   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8760   ac_status=$?
8761   grep -v '^ *+' conftest.er1 >conftest.err
8762   rm -f conftest.er1
8763   cat conftest.err >&5
8764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8765   (exit $ac_status); } >/dev/null; then
8766   if test -s conftest.err; then
8767     ac_cpp_err=$ac_c_preproc_warn_flag
8768     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8769   else
8770     ac_cpp_err=
8771   fi
8772 else
8773   ac_cpp_err=yes
8774 fi
8775 if test -z "$ac_cpp_err"; then
8776   ac_header_preproc=yes
8777 else
8778   echo "$as_me: failed program was:" >&5
8779 sed 's/^/| /' conftest.$ac_ext >&5
8780
8781   ac_header_preproc=no
8782 fi
8783 rm -f conftest.err conftest.$ac_ext
8784 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8785 echo "${ECHO_T}$ac_header_preproc" >&6
8786
8787 # So?  What about this header?
8788 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8789   yes:no: )
8790     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8791 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8792     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8793 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8794     ac_header_preproc=yes
8795     ;;
8796   no:yes:* )
8797     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8798 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8799     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8800 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8801     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8802 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8803     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8804 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8805     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8806 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8807     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8808 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8809     (
8810       cat <<\_ASBOX
8811 ## ---------------------------------------- ##
8812 ## Report this to pgsql-bugs@postgresql.org ##
8813 ## ---------------------------------------- ##
8814 _ASBOX
8815     ) |
8816       sed "s/^/$as_me: WARNING:     /" >&2
8817     ;;
8818 esac
8819 echo "$as_me:$LINENO: checking for $ac_header" >&5
8820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8821 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8822   echo $ECHO_N "(cached) $ECHO_C" >&6
8823 else
8824   eval "$as_ac_Header=\$ac_header_preproc"
8825 fi
8826 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8827 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8828
8829 fi
8830 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8831   cat >>confdefs.h <<_ACEOF
8832 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8833 _ACEOF
8834
8835 else
8836
8837 for ac_header in readline.h
8838 do
8839 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8840 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8841   echo "$as_me:$LINENO: checking for $ac_header" >&5
8842 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8843 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8844   echo $ECHO_N "(cached) $ECHO_C" >&6
8845 fi
8846 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8847 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8848 else
8849   # Is the header compilable?
8850 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8851 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8852 cat >conftest.$ac_ext <<_ACEOF
8853 /* confdefs.h.  */
8854 _ACEOF
8855 cat confdefs.h >>conftest.$ac_ext
8856 cat >>conftest.$ac_ext <<_ACEOF
8857 /* end confdefs.h.  */
8858 $ac_includes_default
8859 #include <$ac_header>
8860 _ACEOF
8861 rm -f conftest.$ac_objext
8862 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8863   (eval $ac_compile) 2>conftest.er1
8864   ac_status=$?
8865   grep -v '^ *+' conftest.er1 >conftest.err
8866   rm -f conftest.er1
8867   cat conftest.err >&5
8868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8869   (exit $ac_status); } &&
8870          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8872   (eval $ac_try) 2>&5
8873   ac_status=$?
8874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8875   (exit $ac_status); }; } &&
8876          { ac_try='test -s conftest.$ac_objext'
8877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8878   (eval $ac_try) 2>&5
8879   ac_status=$?
8880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8881   (exit $ac_status); }; }; then
8882   ac_header_compiler=yes
8883 else
8884   echo "$as_me: failed program was:" >&5
8885 sed 's/^/| /' conftest.$ac_ext >&5
8886
8887 ac_header_compiler=no
8888 fi
8889 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8890 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8891 echo "${ECHO_T}$ac_header_compiler" >&6
8892
8893 # Is the header present?
8894 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8895 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8896 cat >conftest.$ac_ext <<_ACEOF
8897 /* confdefs.h.  */
8898 _ACEOF
8899 cat confdefs.h >>conftest.$ac_ext
8900 cat >>conftest.$ac_ext <<_ACEOF
8901 /* end confdefs.h.  */
8902 #include <$ac_header>
8903 _ACEOF
8904 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8905   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8906   ac_status=$?
8907   grep -v '^ *+' conftest.er1 >conftest.err
8908   rm -f conftest.er1
8909   cat conftest.err >&5
8910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8911   (exit $ac_status); } >/dev/null; then
8912   if test -s conftest.err; then
8913     ac_cpp_err=$ac_c_preproc_warn_flag
8914     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8915   else
8916     ac_cpp_err=
8917   fi
8918 else
8919   ac_cpp_err=yes
8920 fi
8921 if test -z "$ac_cpp_err"; then
8922   ac_header_preproc=yes
8923 else
8924   echo "$as_me: failed program was:" >&5
8925 sed 's/^/| /' conftest.$ac_ext >&5
8926
8927   ac_header_preproc=no
8928 fi
8929 rm -f conftest.err conftest.$ac_ext
8930 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8931 echo "${ECHO_T}$ac_header_preproc" >&6
8932
8933 # So?  What about this header?
8934 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8935   yes:no: )
8936     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8937 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8938     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8939 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8940     ac_header_preproc=yes
8941     ;;
8942   no:yes:* )
8943     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8944 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8945     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8946 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8947     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8948 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8949     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8950 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8951     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8952 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8953     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8954 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8955     (
8956       cat <<\_ASBOX
8957 ## ---------------------------------------- ##
8958 ## Report this to pgsql-bugs@postgresql.org ##
8959 ## ---------------------------------------- ##
8960 _ASBOX
8961     ) |
8962       sed "s/^/$as_me: WARNING:     /" >&2
8963     ;;
8964 esac
8965 echo "$as_me:$LINENO: checking for $ac_header" >&5
8966 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8967 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8968   echo $ECHO_N "(cached) $ECHO_C" >&6
8969 else
8970   eval "$as_ac_Header=\$ac_header_preproc"
8971 fi
8972 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8973 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8974
8975 fi
8976 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8977   cat >>confdefs.h <<_ACEOF
8978 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8979 _ACEOF
8980
8981 else
8982
8983 for ac_header in readline/readline.h
8984 do
8985 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8986 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8987   echo "$as_me:$LINENO: checking for $ac_header" >&5
8988 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8989 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8990   echo $ECHO_N "(cached) $ECHO_C" >&6
8991 fi
8992 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8993 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8994 else
8995   # Is the header compilable?
8996 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8997 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8998 cat >conftest.$ac_ext <<_ACEOF
8999 /* confdefs.h.  */
9000 _ACEOF
9001 cat confdefs.h >>conftest.$ac_ext
9002 cat >>conftest.$ac_ext <<_ACEOF
9003 /* end confdefs.h.  */
9004 $ac_includes_default
9005 #include <$ac_header>
9006 _ACEOF
9007 rm -f conftest.$ac_objext
9008 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9009   (eval $ac_compile) 2>conftest.er1
9010   ac_status=$?
9011   grep -v '^ *+' conftest.er1 >conftest.err
9012   rm -f conftest.er1
9013   cat conftest.err >&5
9014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9015   (exit $ac_status); } &&
9016          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
9017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9018   (eval $ac_try) 2>&5
9019   ac_status=$?
9020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9021   (exit $ac_status); }; } &&
9022          { ac_try='test -s conftest.$ac_objext'
9023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9024   (eval $ac_try) 2>&5
9025   ac_status=$?
9026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9027   (exit $ac_status); }; }; then
9028   ac_header_compiler=yes
9029 else
9030   echo "$as_me: failed program was:" >&5
9031 sed 's/^/| /' conftest.$ac_ext >&5
9032
9033 ac_header_compiler=no
9034 fi
9035 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9036 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9037 echo "${ECHO_T}$ac_header_compiler" >&6
9038
9039 # Is the header present?
9040 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9041 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9042 cat >conftest.$ac_ext <<_ACEOF
9043 /* confdefs.h.  */
9044 _ACEOF
9045 cat confdefs.h >>conftest.$ac_ext
9046 cat >>conftest.$ac_ext <<_ACEOF
9047 /* end confdefs.h.  */
9048 #include <$ac_header>
9049 _ACEOF
9050 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9051   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9052   ac_status=$?
9053   grep -v '^ *+' conftest.er1 >conftest.err
9054   rm -f conftest.er1
9055   cat conftest.err >&5
9056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9057   (exit $ac_status); } >/dev/null; then
9058   if test -s conftest.err; then
9059     ac_cpp_err=$ac_c_preproc_warn_flag
9060     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9061   else
9062     ac_cpp_err=
9063   fi
9064 else
9065   ac_cpp_err=yes
9066 fi
9067 if test -z "$ac_cpp_err"; then
9068   ac_header_preproc=yes
9069 else
9070   echo "$as_me: failed program was:" >&5
9071 sed 's/^/| /' conftest.$ac_ext >&5
9072
9073   ac_header_preproc=no
9074 fi
9075 rm -f conftest.err conftest.$ac_ext
9076 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9077 echo "${ECHO_T}$ac_header_preproc" >&6
9078
9079 # So?  What about this header?
9080 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9081   yes:no: )
9082     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9083 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9084     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9085 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9086     ac_header_preproc=yes
9087     ;;
9088   no:yes:* )
9089     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9090 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9091     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9092 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9093     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9094 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9095     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9096 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9097     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9098 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9099     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9100 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9101     (
9102       cat <<\_ASBOX
9103 ## ---------------------------------------- ##
9104 ## Report this to pgsql-bugs@postgresql.org ##
9105 ## ---------------------------------------- ##
9106 _ASBOX
9107     ) |
9108       sed "s/^/$as_me: WARNING:     /" >&2
9109     ;;
9110 esac
9111 echo "$as_me:$LINENO: checking for $ac_header" >&5
9112 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9114   echo $ECHO_N "(cached) $ECHO_C" >&6
9115 else
9116   eval "$as_ac_Header=\$ac_header_preproc"
9117 fi
9118 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9119 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9120
9121 fi
9122 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9123   cat >>confdefs.h <<_ACEOF
9124 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9125 _ACEOF
9126
9127 else
9128   { { echo "$as_me:$LINENO: error: readline header not found
9129 If you have libedit already installed, see config.log for details on the
9130 failure.  It is possible the compiler isn't looking in the proper directory.
9131 Use --without-readline to disable libedit support." >&5
9132 echo "$as_me: error: readline header not found
9133 If you have libedit already installed, see config.log for details on the
9134 failure.  It is possible the compiler isn't looking in the proper directory.
9135 Use --without-readline to disable libedit support." >&2;}
9136    { (exit 1); exit 1; }; }
9137 fi
9138
9139 done
9140
9141 fi
9142
9143 done
9144
9145 fi
9146
9147 done
9148
9149
9150 for ac_header in editline/history.h
9151 do
9152 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9153 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9154   echo "$as_me:$LINENO: checking for $ac_header" >&5
9155 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9156 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9157   echo $ECHO_N "(cached) $ECHO_C" >&6
9158 fi
9159 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9160 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9161 else
9162   # Is the header compilable?
9163 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9164 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9165 cat >conftest.$ac_ext <<_ACEOF
9166 /* confdefs.h.  */
9167 _ACEOF
9168 cat confdefs.h >>conftest.$ac_ext
9169 cat >>conftest.$ac_ext <<_ACEOF
9170 /* end confdefs.h.  */
9171 $ac_includes_default
9172 #include <$ac_header>
9173 _ACEOF
9174 rm -f conftest.$ac_objext
9175 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9176   (eval $ac_compile) 2>conftest.er1
9177   ac_status=$?
9178   grep -v '^ *+' conftest.er1 >conftest.err
9179   rm -f conftest.er1
9180   cat conftest.err >&5
9181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9182   (exit $ac_status); } &&
9183          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
9184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9185   (eval $ac_try) 2>&5
9186   ac_status=$?
9187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9188   (exit $ac_status); }; } &&
9189          { ac_try='test -s conftest.$ac_objext'
9190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9191   (eval $ac_try) 2>&5
9192   ac_status=$?
9193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9194   (exit $ac_status); }; }; then
9195   ac_header_compiler=yes
9196 else
9197   echo "$as_me: failed program was:" >&5
9198 sed 's/^/| /' conftest.$ac_ext >&5
9199
9200 ac_header_compiler=no
9201 fi
9202 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9203 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9204 echo "${ECHO_T}$ac_header_compiler" >&6
9205
9206 # Is the header present?
9207 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9208 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9209 cat >conftest.$ac_ext <<_ACEOF
9210 /* confdefs.h.  */
9211 _ACEOF
9212 cat confdefs.h >>conftest.$ac_ext
9213 cat >>conftest.$ac_ext <<_ACEOF
9214 /* end confdefs.h.  */
9215 #include <$ac_header>
9216 _ACEOF
9217 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9218   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9219   ac_status=$?
9220   grep -v '^ *+' conftest.er1 >conftest.err
9221   rm -f conftest.er1
9222   cat conftest.err >&5
9223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9224   (exit $ac_status); } >/dev/null; then
9225   if test -s conftest.err; then
9226     ac_cpp_err=$ac_c_preproc_warn_flag
9227     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9228   else
9229     ac_cpp_err=
9230   fi
9231 else
9232   ac_cpp_err=yes
9233 fi
9234 if test -z "$ac_cpp_err"; then
9235   ac_header_preproc=yes
9236 else
9237   echo "$as_me: failed program was:" >&5
9238 sed 's/^/| /' conftest.$ac_ext >&5
9239
9240   ac_header_preproc=no
9241 fi
9242 rm -f conftest.err conftest.$ac_ext
9243 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9244 echo "${ECHO_T}$ac_header_preproc" >&6
9245
9246 # So?  What about this header?
9247 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9248   yes:no: )
9249     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9250 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9251     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9252 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9253     ac_header_preproc=yes
9254     ;;
9255   no:yes:* )
9256     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9257 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9258     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9259 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9260     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9261 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9262     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9263 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9264     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9265 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9266     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9267 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9268     (
9269       cat <<\_ASBOX
9270 ## ---------------------------------------- ##
9271 ## Report this to pgsql-bugs@postgresql.org ##
9272 ## ---------------------------------------- ##
9273 _ASBOX
9274     ) |
9275       sed "s/^/$as_me: WARNING:     /" >&2
9276     ;;
9277 esac
9278 echo "$as_me:$LINENO: checking for $ac_header" >&5
9279 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9280 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9281   echo $ECHO_N "(cached) $ECHO_C" >&6
9282 else
9283   eval "$as_ac_Header=\$ac_header_preproc"
9284 fi
9285 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9286 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9287
9288 fi
9289 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9290   cat >>confdefs.h <<_ACEOF
9291 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9292 _ACEOF
9293
9294 else
9295
9296 for ac_header in history.h
9297 do
9298 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9299 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9300   echo "$as_me:$LINENO: checking for $ac_header" >&5
9301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9302 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9303   echo $ECHO_N "(cached) $ECHO_C" >&6
9304 fi
9305 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9306 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9307 else
9308   # Is the header compilable?
9309 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9310 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9311 cat >conftest.$ac_ext <<_ACEOF
9312 /* confdefs.h.  */
9313 _ACEOF
9314 cat confdefs.h >>conftest.$ac_ext
9315 cat >>conftest.$ac_ext <<_ACEOF
9316 /* end confdefs.h.  */
9317 $ac_includes_default
9318 #include <$ac_header>
9319 _ACEOF
9320 rm -f conftest.$ac_objext
9321 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9322   (eval $ac_compile) 2>conftest.er1
9323   ac_status=$?
9324   grep -v '^ *+' conftest.er1 >conftest.err
9325   rm -f conftest.er1
9326   cat conftest.err >&5
9327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328   (exit $ac_status); } &&
9329          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
9330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9331   (eval $ac_try) 2>&5
9332   ac_status=$?
9333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9334   (exit $ac_status); }; } &&
9335          { ac_try='test -s conftest.$ac_objext'
9336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9337   (eval $ac_try) 2>&5
9338   ac_status=$?
9339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9340   (exit $ac_status); }; }; then
9341   ac_header_compiler=yes
9342 else
9343   echo "$as_me: failed program was:" >&5
9344 sed 's/^/| /' conftest.$ac_ext >&5
9345
9346 ac_header_compiler=no
9347 fi
9348 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9349 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9350 echo "${ECHO_T}$ac_header_compiler" >&6
9351
9352 # Is the header present?
9353 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9354 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9355 cat >conftest.$ac_ext <<_ACEOF
9356 /* confdefs.h.  */
9357 _ACEOF
9358 cat confdefs.h >>conftest.$ac_ext
9359 cat >>conftest.$ac_ext <<_ACEOF
9360 /* end confdefs.h.  */
9361 #include <$ac_header>
9362 _ACEOF
9363 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9364   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9365   ac_status=$?
9366   grep -v '^ *+' conftest.er1 >conftest.err
9367   rm -f conftest.er1
9368   cat conftest.err >&5
9369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9370   (exit $ac_status); } >/dev/null; then
9371   if test -s conftest.err; then
9372     ac_cpp_err=$ac_c_preproc_warn_flag
9373     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9374   else
9375     ac_cpp_err=
9376   fi
9377 else
9378   ac_cpp_err=yes
9379 fi
9380 if test -z "$ac_cpp_err"; then
9381   ac_header_preproc=yes
9382 else
9383   echo "$as_me: failed program was:" >&5
9384 sed 's/^/| /' conftest.$ac_ext >&5
9385
9386   ac_header_preproc=no
9387 fi
9388 rm -f conftest.err conftest.$ac_ext
9389 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9390 echo "${ECHO_T}$ac_header_preproc" >&6
9391
9392 # So?  What about this header?
9393 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9394   yes:no: )
9395     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9396 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9397     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9398 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9399     ac_header_preproc=yes
9400     ;;
9401   no:yes:* )
9402     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9403 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9404     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9405 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9406     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9407 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9408     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9409 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9410     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9411 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9412     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9413 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9414     (
9415       cat <<\_ASBOX
9416 ## ---------------------------------------- ##
9417 ## Report this to pgsql-bugs@postgresql.org ##
9418 ## ---------------------------------------- ##
9419 _ASBOX
9420     ) |
9421       sed "s/^/$as_me: WARNING:     /" >&2
9422     ;;
9423 esac
9424 echo "$as_me:$LINENO: checking for $ac_header" >&5
9425 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9426 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9427   echo $ECHO_N "(cached) $ECHO_C" >&6
9428 else
9429   eval "$as_ac_Header=\$ac_header_preproc"
9430 fi
9431 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9432 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9433
9434 fi
9435 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9436   cat >>confdefs.h <<_ACEOF
9437 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9438 _ACEOF
9439
9440 else
9441
9442 for ac_header in readline/history.h
9443 do
9444 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9445 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9446   echo "$as_me:$LINENO: checking for $ac_header" >&5
9447 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9448 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9449   echo $ECHO_N "(cached) $ECHO_C" >&6
9450 fi
9451 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9452 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9453 else
9454   # Is the header compilable?
9455 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9456 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9457 cat >conftest.$ac_ext <<_ACEOF
9458 /* confdefs.h.  */
9459 _ACEOF
9460 cat confdefs.h >>conftest.$ac_ext
9461 cat >>conftest.$ac_ext <<_ACEOF
9462 /* end confdefs.h.  */
9463 $ac_includes_default
9464 #include <$ac_header>
9465 _ACEOF
9466 rm -f conftest.$ac_objext
9467 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9468   (eval $ac_compile) 2>conftest.er1
9469   ac_status=$?
9470   grep -v '^ *+' conftest.er1 >conftest.err
9471   rm -f conftest.er1
9472   cat conftest.err >&5
9473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9474   (exit $ac_status); } &&
9475          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
9476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9477   (eval $ac_try) 2>&5
9478   ac_status=$?
9479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9480   (exit $ac_status); }; } &&
9481          { ac_try='test -s conftest.$ac_objext'
9482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9483   (eval $ac_try) 2>&5
9484   ac_status=$?
9485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9486   (exit $ac_status); }; }; then
9487   ac_header_compiler=yes
9488 else
9489   echo "$as_me: failed program was:" >&5
9490 sed 's/^/| /' conftest.$ac_ext >&5
9491
9492 ac_header_compiler=no
9493 fi
9494 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9495 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9496 echo "${ECHO_T}$ac_header_compiler" >&6
9497
9498 # Is the header present?
9499 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9500 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9501 cat >conftest.$ac_ext <<_ACEOF
9502 /* confdefs.h.  */
9503 _ACEOF
9504 cat confdefs.h >>conftest.$ac_ext
9505 cat >>conftest.$ac_ext <<_ACEOF
9506 /* end confdefs.h.  */
9507 #include <$ac_header>
9508 _ACEOF
9509 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9510   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9511   ac_status=$?
9512   grep -v '^ *+' conftest.er1 >conftest.err
9513   rm -f conftest.er1
9514   cat conftest.err >&5
9515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9516   (exit $ac_status); } >/dev/null; then
9517   if test -s conftest.err; then
9518     ac_cpp_err=$ac_c_preproc_warn_flag
9519     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9520   else
9521     ac_cpp_err=
9522   fi
9523 else
9524   ac_cpp_err=yes
9525 fi
9526 if test -z "$ac_cpp_err"; then
9527   ac_header_preproc=yes
9528 else
9529   echo "$as_me: failed program was:" >&5
9530 sed 's/^/| /' conftest.$ac_ext >&5
9531
9532   ac_header_preproc=no
9533 fi
9534 rm -f conftest.err conftest.$ac_ext
9535 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9536 echo "${ECHO_T}$ac_header_preproc" >&6
9537
9538 # So?  What about this header?
9539 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9540   yes:no: )
9541     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9542 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9543     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9544 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9545     ac_header_preproc=yes
9546     ;;
9547   no:yes:* )
9548     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9549 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9550     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9551 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9552     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9553 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9554     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9555 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9556     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9557 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9558     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9559 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9560     (
9561       cat <<\_ASBOX
9562 ## ---------------------------------------- ##
9563 ## Report this to pgsql-bugs@postgresql.org ##
9564 ## ---------------------------------------- ##
9565 _ASBOX
9566     ) |
9567       sed "s/^/$as_me: WARNING:     /" >&2
9568     ;;
9569 esac
9570 echo "$as_me:$LINENO: checking for $ac_header" >&5
9571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9573   echo $ECHO_N "(cached) $ECHO_C" >&6
9574 else
9575   eval "$as_ac_Header=\$ac_header_preproc"
9576 fi
9577 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9578 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9579
9580 fi
9581 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9582   cat >>confdefs.h <<_ACEOF
9583 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9584 _ACEOF
9585
9586 else
9587   { { echo "$as_me:$LINENO: error: history header not found
9588 If you have libedit already installed, see config.log for details on the
9589 failure.  It is possible the compiler isn't looking in the proper directory.
9590 Use --without-readline to disable libedit support." >&5
9591 echo "$as_me: error: history header not found
9592 If you have libedit already installed, see config.log for details on the
9593 failure.  It is possible the compiler isn't looking in the proper directory.
9594 Use --without-readline to disable libedit support." >&2;}
9595    { (exit 1); exit 1; }; }
9596 fi
9597
9598 done
9599
9600 fi
9601
9602 done
9603
9604 fi
9605
9606 done
9607
9608 fi
9609
9610 if test "$with_zlib" = yes; then
9611   if test "${ac_cv_header_zlib_h+set}" = set; then
9612   echo "$as_me:$LINENO: checking for zlib.h" >&5
9613 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9614 if test "${ac_cv_header_zlib_h+set}" = set; then
9615   echo $ECHO_N "(cached) $ECHO_C" >&6
9616 fi
9617 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9618 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9619 else
9620   # Is the header compilable?
9621 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9622 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9623 cat >conftest.$ac_ext <<_ACEOF
9624 /* confdefs.h.  */
9625 _ACEOF
9626 cat confdefs.h >>conftest.$ac_ext
9627 cat >>conftest.$ac_ext <<_ACEOF
9628 /* end confdefs.h.  */
9629 $ac_includes_default
9630 #include <zlib.h>
9631 _ACEOF
9632 rm -f conftest.$ac_objext
9633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9634   (eval $ac_compile) 2>conftest.er1
9635   ac_status=$?
9636   grep -v '^ *+' conftest.er1 >conftest.err
9637   rm -f conftest.er1
9638   cat conftest.err >&5
9639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9640   (exit $ac_status); } &&
9641          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
9642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9643   (eval $ac_try) 2>&5
9644   ac_status=$?
9645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646   (exit $ac_status); }; } &&
9647          { ac_try='test -s conftest.$ac_objext'
9648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9649   (eval $ac_try) 2>&5
9650   ac_status=$?
9651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9652   (exit $ac_status); }; }; then
9653   ac_header_compiler=yes
9654 else
9655   echo "$as_me: failed program was:" >&5
9656 sed 's/^/| /' conftest.$ac_ext >&5
9657
9658 ac_header_compiler=no
9659 fi
9660 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9661 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9662 echo "${ECHO_T}$ac_header_compiler" >&6
9663
9664 # Is the header present?
9665 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9666 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9667 cat >conftest.$ac_ext <<_ACEOF
9668 /* confdefs.h.  */
9669 _ACEOF
9670 cat confdefs.h >>conftest.$ac_ext
9671 cat >>conftest.$ac_ext <<_ACEOF
9672 /* end confdefs.h.  */
9673 #include <zlib.h>
9674 _ACEOF
9675 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9677   ac_status=$?
9678   grep -v '^ *+' conftest.er1 >conftest.err
9679   rm -f conftest.er1
9680   cat conftest.err >&5
9681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9682   (exit $ac_status); } >/dev/null; then
9683   if test -s conftest.err; then
9684     ac_cpp_err=$ac_c_preproc_warn_flag
9685     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9686   else
9687     ac_cpp_err=
9688   fi
9689 else
9690   ac_cpp_err=yes
9691 fi
9692 if test -z "$ac_cpp_err"; then
9693   ac_header_preproc=yes
9694 else
9695   echo "$as_me: failed program was:" >&5
9696 sed 's/^/| /' conftest.$ac_ext >&5
9697
9698   ac_header_preproc=no
9699 fi
9700 rm -f conftest.err conftest.$ac_ext
9701 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9702 echo "${ECHO_T}$ac_header_preproc" >&6
9703
9704 # So?  What about this header?
9705 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9706   yes:no: )
9707     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9708 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9709     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9710 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9711     ac_header_preproc=yes
9712     ;;
9713   no:yes:* )
9714     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9715 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9716     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9717 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9718     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9719 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9720     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9721 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9722     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9723 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9724     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9725 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9726     (
9727       cat <<\_ASBOX
9728 ## ---------------------------------------- ##
9729 ## Report this to pgsql-bugs@postgresql.org ##
9730 ## ---------------------------------------- ##
9731 _ASBOX
9732     ) |
9733       sed "s/^/$as_me: WARNING:     /" >&2
9734     ;;
9735 esac
9736 echo "$as_me:$LINENO: checking for zlib.h" >&5
9737 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9738 if test "${ac_cv_header_zlib_h+set}" = set; then
9739   echo $ECHO_N "(cached) $ECHO_C" >&6
9740 else
9741   ac_cv_header_zlib_h=$ac_header_preproc
9742 fi
9743 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9744 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9745
9746 fi
9747 if test $ac_cv_header_zlib_h = yes; then
9748   :
9749 else
9750   { { echo "$as_me:$LINENO: error: zlib header not found
9751 If you have zlib already installed, see config.log for details on the
9752 failure.  It is possible the compiler isn't looking in the proper directory.
9753 Use --without-zlib to disable zlib support." >&5
9754 echo "$as_me: error: zlib header not found
9755 If you have zlib already installed, see config.log for details on the
9756 failure.  It is possible the compiler isn't looking in the proper directory.
9757 Use --without-zlib to disable zlib support." >&2;}
9758    { (exit 1); exit 1; }; }
9759 fi
9760
9761
9762 fi
9763
9764 if test "$with_krb5" = yes ; then
9765   if test "${ac_cv_header_krb5_h+set}" = set; then
9766   echo "$as_me:$LINENO: checking for krb5.h" >&5
9767 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9768 if test "${ac_cv_header_krb5_h+set}" = set; then
9769   echo $ECHO_N "(cached) $ECHO_C" >&6
9770 fi
9771 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9772 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9773 else
9774   # Is the header compilable?
9775 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9776 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9777 cat >conftest.$ac_ext <<_ACEOF
9778 /* confdefs.h.  */
9779 _ACEOF
9780 cat confdefs.h >>conftest.$ac_ext
9781 cat >>conftest.$ac_ext <<_ACEOF
9782 /* end confdefs.h.  */
9783 $ac_includes_default
9784 #include <krb5.h>
9785 _ACEOF
9786 rm -f conftest.$ac_objext
9787 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9788   (eval $ac_compile) 2>conftest.er1
9789   ac_status=$?
9790   grep -v '^ *+' conftest.er1 >conftest.err
9791   rm -f conftest.er1
9792   cat conftest.err >&5
9793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9794   (exit $ac_status); } &&
9795          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
9796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9797   (eval $ac_try) 2>&5
9798   ac_status=$?
9799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9800   (exit $ac_status); }; } &&
9801          { ac_try='test -s conftest.$ac_objext'
9802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9803   (eval $ac_try) 2>&5
9804   ac_status=$?
9805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9806   (exit $ac_status); }; }; then
9807   ac_header_compiler=yes
9808 else
9809   echo "$as_me: failed program was:" >&5
9810 sed 's/^/| /' conftest.$ac_ext >&5
9811
9812 ac_header_compiler=no
9813 fi
9814 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9815 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9816 echo "${ECHO_T}$ac_header_compiler" >&6
9817
9818 # Is the header present?
9819 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9820 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9821 cat >conftest.$ac_ext <<_ACEOF
9822 /* confdefs.h.  */
9823 _ACEOF
9824 cat confdefs.h >>conftest.$ac_ext
9825 cat >>conftest.$ac_ext <<_ACEOF
9826 /* end confdefs.h.  */
9827 #include <krb5.h>
9828 _ACEOF
9829 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9830   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9831   ac_status=$?
9832   grep -v '^ *+' conftest.er1 >conftest.err
9833   rm -f conftest.er1
9834   cat conftest.err >&5
9835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9836   (exit $ac_status); } >/dev/null; then
9837   if test -s conftest.err; then
9838     ac_cpp_err=$ac_c_preproc_warn_flag
9839     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9840   else
9841     ac_cpp_err=
9842   fi
9843 else
9844   ac_cpp_err=yes
9845 fi
9846 if test -z "$ac_cpp_err"; then
9847   ac_header_preproc=yes
9848 else
9849   echo "$as_me: failed program was:" >&5
9850 sed 's/^/| /' conftest.$ac_ext >&5
9851
9852   ac_header_preproc=no
9853 fi
9854 rm -f conftest.err conftest.$ac_ext
9855 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9856 echo "${ECHO_T}$ac_header_preproc" >&6
9857
9858 # So?  What about this header?
9859 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9860   yes:no: )
9861     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9862 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9863     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9864 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9865     ac_header_preproc=yes
9866     ;;
9867   no:yes:* )
9868     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9869 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9870     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9871 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9872     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9873 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9874     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9875 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9876     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9877 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9878     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9879 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9880     (
9881       cat <<\_ASBOX
9882 ## ---------------------------------------- ##
9883 ## Report this to pgsql-bugs@postgresql.org ##
9884 ## ---------------------------------------- ##
9885 _ASBOX
9886     ) |
9887       sed "s/^/$as_me: WARNING:     /" >&2
9888     ;;
9889 esac
9890 echo "$as_me:$LINENO: checking for krb5.h" >&5
9891 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9892 if test "${ac_cv_header_krb5_h+set}" = set; then
9893   echo $ECHO_N "(cached) $ECHO_C" >&6
9894 else
9895   ac_cv_header_krb5_h=$ac_header_preproc
9896 fi
9897 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9898 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9899
9900 fi
9901 if test $ac_cv_header_krb5_h = yes; then
9902   :
9903 else
9904   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9905 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9906    { (exit 1); exit 1; }; }
9907 fi
9908
9909
9910 fi
9911
9912 if test "$with_openssl" = yes ; then
9913   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9914   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9915 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9916 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9917   echo $ECHO_N "(cached) $ECHO_C" >&6
9918 fi
9919 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9920 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9921 else
9922   # Is the header compilable?
9923 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9924 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9925 cat >conftest.$ac_ext <<_ACEOF
9926 /* confdefs.h.  */
9927 _ACEOF
9928 cat confdefs.h >>conftest.$ac_ext
9929 cat >>conftest.$ac_ext <<_ACEOF
9930 /* end confdefs.h.  */
9931 $ac_includes_default
9932 #include <openssl/ssl.h>
9933 _ACEOF
9934 rm -f conftest.$ac_objext
9935 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9936   (eval $ac_compile) 2>conftest.er1
9937   ac_status=$?
9938   grep -v '^ *+' conftest.er1 >conftest.err
9939   rm -f conftest.er1
9940   cat conftest.err >&5
9941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9942   (exit $ac_status); } &&
9943          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
9944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9945   (eval $ac_try) 2>&5
9946   ac_status=$?
9947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9948   (exit $ac_status); }; } &&
9949          { ac_try='test -s conftest.$ac_objext'
9950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9951   (eval $ac_try) 2>&5
9952   ac_status=$?
9953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9954   (exit $ac_status); }; }; then
9955   ac_header_compiler=yes
9956 else
9957   echo "$as_me: failed program was:" >&5
9958 sed 's/^/| /' conftest.$ac_ext >&5
9959
9960 ac_header_compiler=no
9961 fi
9962 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9963 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9964 echo "${ECHO_T}$ac_header_compiler" >&6
9965
9966 # Is the header present?
9967 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
9968 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
9969 cat >conftest.$ac_ext <<_ACEOF
9970 /* confdefs.h.  */
9971 _ACEOF
9972 cat confdefs.h >>conftest.$ac_ext
9973 cat >>conftest.$ac_ext <<_ACEOF
9974 /* end confdefs.h.  */
9975 #include <openssl/ssl.h>
9976 _ACEOF
9977 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9978   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9979   ac_status=$?
9980   grep -v '^ *+' conftest.er1 >conftest.err
9981   rm -f conftest.er1
9982   cat conftest.err >&5
9983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9984   (exit $ac_status); } >/dev/null; then
9985   if test -s conftest.err; then
9986     ac_cpp_err=$ac_c_preproc_warn_flag
9987     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9988   else
9989     ac_cpp_err=
9990   fi
9991 else
9992   ac_cpp_err=yes
9993 fi
9994 if test -z "$ac_cpp_err"; then
9995   ac_header_preproc=yes
9996 else
9997   echo "$as_me: failed program was:" >&5
9998 sed 's/^/| /' conftest.$ac_ext >&5
9999
10000   ac_header_preproc=no
10001 fi
10002 rm -f conftest.err conftest.$ac_ext
10003 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10004 echo "${ECHO_T}$ac_header_preproc" >&6
10005
10006 # So?  What about this header?
10007 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10008   yes:no: )
10009     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10010 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10011     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10012 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10013     ac_header_preproc=yes
10014     ;;
10015   no:yes:* )
10016     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10017 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10018     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10019 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10020     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10021 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10022     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10023 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10024     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10025 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10026     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10027 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10028     (
10029       cat <<\_ASBOX
10030 ## ---------------------------------------- ##
10031 ## Report this to pgsql-bugs@postgresql.org ##
10032 ## ---------------------------------------- ##
10033 _ASBOX
10034     ) |
10035       sed "s/^/$as_me: WARNING:     /" >&2
10036     ;;
10037 esac
10038 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10039 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10040 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10041   echo $ECHO_N "(cached) $ECHO_C" >&6
10042 else
10043   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10044 fi
10045 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10046 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10047
10048 fi
10049 if test $ac_cv_header_openssl_ssl_h = yes; then
10050   :
10051 else
10052   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10053 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10054    { (exit 1); exit 1; }; }
10055 fi
10056
10057
10058   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10059   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10060 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10061 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10062   echo $ECHO_N "(cached) $ECHO_C" >&6
10063 fi
10064 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10065 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10066 else
10067   # Is the header compilable?
10068 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10069 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10070 cat >conftest.$ac_ext <<_ACEOF
10071 /* confdefs.h.  */
10072 _ACEOF
10073 cat confdefs.h >>conftest.$ac_ext
10074 cat >>conftest.$ac_ext <<_ACEOF
10075 /* end confdefs.h.  */
10076 $ac_includes_default
10077 #include <openssl/err.h>
10078 _ACEOF
10079 rm -f conftest.$ac_objext
10080 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10081   (eval $ac_compile) 2>conftest.er1
10082   ac_status=$?
10083   grep -v '^ *+' conftest.er1 >conftest.err
10084   rm -f conftest.er1
10085   cat conftest.err >&5
10086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087   (exit $ac_status); } &&
10088          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
10089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090   (eval $ac_try) 2>&5
10091   ac_status=$?
10092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093   (exit $ac_status); }; } &&
10094          { ac_try='test -s conftest.$ac_objext'
10095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10096   (eval $ac_try) 2>&5
10097   ac_status=$?
10098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10099   (exit $ac_status); }; }; then
10100   ac_header_compiler=yes
10101 else
10102   echo "$as_me: failed program was:" >&5
10103 sed 's/^/| /' conftest.$ac_ext >&5
10104
10105 ac_header_compiler=no
10106 fi
10107 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10108 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10109 echo "${ECHO_T}$ac_header_compiler" >&6
10110
10111 # Is the header present?
10112 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10113 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10114 cat >conftest.$ac_ext <<_ACEOF
10115 /* confdefs.h.  */
10116 _ACEOF
10117 cat confdefs.h >>conftest.$ac_ext
10118 cat >>conftest.$ac_ext <<_ACEOF
10119 /* end confdefs.h.  */
10120 #include <openssl/err.h>
10121 _ACEOF
10122 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10123   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10124   ac_status=$?
10125   grep -v '^ *+' conftest.er1 >conftest.err
10126   rm -f conftest.er1
10127   cat conftest.err >&5
10128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10129   (exit $ac_status); } >/dev/null; then
10130   if test -s conftest.err; then
10131     ac_cpp_err=$ac_c_preproc_warn_flag
10132     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10133   else
10134     ac_cpp_err=
10135   fi
10136 else
10137   ac_cpp_err=yes
10138 fi
10139 if test -z "$ac_cpp_err"; then
10140   ac_header_preproc=yes
10141 else
10142   echo "$as_me: failed program was:" >&5
10143 sed 's/^/| /' conftest.$ac_ext >&5
10144
10145   ac_header_preproc=no
10146 fi
10147 rm -f conftest.err conftest.$ac_ext
10148 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10149 echo "${ECHO_T}$ac_header_preproc" >&6
10150
10151 # So?  What about this header?
10152 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10153   yes:no: )
10154     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10155 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10156     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10157 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10158     ac_header_preproc=yes
10159     ;;
10160   no:yes:* )
10161     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10162 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10163     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10164 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10165     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10166 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10167     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10168 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10169     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10170 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10171     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10172 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10173     (
10174       cat <<\_ASBOX
10175 ## ---------------------------------------- ##
10176 ## Report this to pgsql-bugs@postgresql.org ##
10177 ## ---------------------------------------- ##
10178 _ASBOX
10179     ) |
10180       sed "s/^/$as_me: WARNING:     /" >&2
10181     ;;
10182 esac
10183 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10184 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10185 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10186   echo $ECHO_N "(cached) $ECHO_C" >&6
10187 else
10188   ac_cv_header_openssl_err_h=$ac_header_preproc
10189 fi
10190 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10191 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10192
10193 fi
10194 if test $ac_cv_header_openssl_err_h = yes; then
10195   :
10196 else
10197   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10198 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10199    { (exit 1); exit 1; }; }
10200 fi
10201
10202
10203 fi
10204
10205 if test "$with_pam" = yes ; then
10206
10207 for ac_header in security/pam_appl.h
10208 do
10209 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10210 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10211   echo "$as_me:$LINENO: checking for $ac_header" >&5
10212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10214   echo $ECHO_N "(cached) $ECHO_C" >&6
10215 fi
10216 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10217 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10218 else
10219   # Is the header compilable?
10220 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10221 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10222 cat >conftest.$ac_ext <<_ACEOF
10223 /* confdefs.h.  */
10224 _ACEOF
10225 cat confdefs.h >>conftest.$ac_ext
10226 cat >>conftest.$ac_ext <<_ACEOF
10227 /* end confdefs.h.  */
10228 $ac_includes_default
10229 #include <$ac_header>
10230 _ACEOF
10231 rm -f conftest.$ac_objext
10232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10233   (eval $ac_compile) 2>conftest.er1
10234   ac_status=$?
10235   grep -v '^ *+' conftest.er1 >conftest.err
10236   rm -f conftest.er1
10237   cat conftest.err >&5
10238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10239   (exit $ac_status); } &&
10240          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
10241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10242   (eval $ac_try) 2>&5
10243   ac_status=$?
10244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10245   (exit $ac_status); }; } &&
10246          { ac_try='test -s conftest.$ac_objext'
10247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10248   (eval $ac_try) 2>&5
10249   ac_status=$?
10250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10251   (exit $ac_status); }; }; then
10252   ac_header_compiler=yes
10253 else
10254   echo "$as_me: failed program was:" >&5
10255 sed 's/^/| /' conftest.$ac_ext >&5
10256
10257 ac_header_compiler=no
10258 fi
10259 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10260 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10261 echo "${ECHO_T}$ac_header_compiler" >&6
10262
10263 # Is the header present?
10264 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10265 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10266 cat >conftest.$ac_ext <<_ACEOF
10267 /* confdefs.h.  */
10268 _ACEOF
10269 cat confdefs.h >>conftest.$ac_ext
10270 cat >>conftest.$ac_ext <<_ACEOF
10271 /* end confdefs.h.  */
10272 #include <$ac_header>
10273 _ACEOF
10274 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10275   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10276   ac_status=$?
10277   grep -v '^ *+' conftest.er1 >conftest.err
10278   rm -f conftest.er1
10279   cat conftest.err >&5
10280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10281   (exit $ac_status); } >/dev/null; then
10282   if test -s conftest.err; then
10283     ac_cpp_err=$ac_c_preproc_warn_flag
10284     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10285   else
10286     ac_cpp_err=
10287   fi
10288 else
10289   ac_cpp_err=yes
10290 fi
10291 if test -z "$ac_cpp_err"; then
10292   ac_header_preproc=yes
10293 else
10294   echo "$as_me: failed program was:" >&5
10295 sed 's/^/| /' conftest.$ac_ext >&5
10296
10297   ac_header_preproc=no
10298 fi
10299 rm -f conftest.err conftest.$ac_ext
10300 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10301 echo "${ECHO_T}$ac_header_preproc" >&6
10302
10303 # So?  What about this header?
10304 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10305   yes:no: )
10306     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10307 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10308     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10309 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10310     ac_header_preproc=yes
10311     ;;
10312   no:yes:* )
10313     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10314 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10315     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10316 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10317     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10318 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10319     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10320 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10321     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10322 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10323     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10324 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10325     (
10326       cat <<\_ASBOX
10327 ## ---------------------------------------- ##
10328 ## Report this to pgsql-bugs@postgresql.org ##
10329 ## ---------------------------------------- ##
10330 _ASBOX
10331     ) |
10332       sed "s/^/$as_me: WARNING:     /" >&2
10333     ;;
10334 esac
10335 echo "$as_me:$LINENO: checking for $ac_header" >&5
10336 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10337 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10338   echo $ECHO_N "(cached) $ECHO_C" >&6
10339 else
10340   eval "$as_ac_Header=\$ac_header_preproc"
10341 fi
10342 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10343 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10344
10345 fi
10346 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10347   cat >>confdefs.h <<_ACEOF
10348 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10349 _ACEOF
10350
10351 else
10352
10353 for ac_header in pam/pam_appl.h
10354 do
10355 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10356 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10357   echo "$as_me:$LINENO: checking for $ac_header" >&5
10358 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10359 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10360   echo $ECHO_N "(cached) $ECHO_C" >&6
10361 fi
10362 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10363 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10364 else
10365   # Is the header compilable?
10366 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10367 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10368 cat >conftest.$ac_ext <<_ACEOF
10369 /* confdefs.h.  */
10370 _ACEOF
10371 cat confdefs.h >>conftest.$ac_ext
10372 cat >>conftest.$ac_ext <<_ACEOF
10373 /* end confdefs.h.  */
10374 $ac_includes_default
10375 #include <$ac_header>
10376 _ACEOF
10377 rm -f conftest.$ac_objext
10378 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10379   (eval $ac_compile) 2>conftest.er1
10380   ac_status=$?
10381   grep -v '^ *+' conftest.er1 >conftest.err
10382   rm -f conftest.er1
10383   cat conftest.err >&5
10384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10385   (exit $ac_status); } &&
10386          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
10387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10388   (eval $ac_try) 2>&5
10389   ac_status=$?
10390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10391   (exit $ac_status); }; } &&
10392          { ac_try='test -s conftest.$ac_objext'
10393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10394   (eval $ac_try) 2>&5
10395   ac_status=$?
10396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10397   (exit $ac_status); }; }; then
10398   ac_header_compiler=yes
10399 else
10400   echo "$as_me: failed program was:" >&5
10401 sed 's/^/| /' conftest.$ac_ext >&5
10402
10403 ac_header_compiler=no
10404 fi
10405 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10406 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10407 echo "${ECHO_T}$ac_header_compiler" >&6
10408
10409 # Is the header present?
10410 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10411 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10412 cat >conftest.$ac_ext <<_ACEOF
10413 /* confdefs.h.  */
10414 _ACEOF
10415 cat confdefs.h >>conftest.$ac_ext
10416 cat >>conftest.$ac_ext <<_ACEOF
10417 /* end confdefs.h.  */
10418 #include <$ac_header>
10419 _ACEOF
10420 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10421   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10422   ac_status=$?
10423   grep -v '^ *+' conftest.er1 >conftest.err
10424   rm -f conftest.er1
10425   cat conftest.err >&5
10426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427   (exit $ac_status); } >/dev/null; then
10428   if test -s conftest.err; then
10429     ac_cpp_err=$ac_c_preproc_warn_flag
10430     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10431   else
10432     ac_cpp_err=
10433   fi
10434 else
10435   ac_cpp_err=yes
10436 fi
10437 if test -z "$ac_cpp_err"; then
10438   ac_header_preproc=yes
10439 else
10440   echo "$as_me: failed program was:" >&5
10441 sed 's/^/| /' conftest.$ac_ext >&5
10442
10443   ac_header_preproc=no
10444 fi
10445 rm -f conftest.err conftest.$ac_ext
10446 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10447 echo "${ECHO_T}$ac_header_preproc" >&6
10448
10449 # So?  What about this header?
10450 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10451   yes:no: )
10452     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10453 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10454     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10455 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10456     ac_header_preproc=yes
10457     ;;
10458   no:yes:* )
10459     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10460 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10461     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10462 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10463     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10464 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10465     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10466 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10467     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10468 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10469     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10470 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10471     (
10472       cat <<\_ASBOX
10473 ## ---------------------------------------- ##
10474 ## Report this to pgsql-bugs@postgresql.org ##
10475 ## ---------------------------------------- ##
10476 _ASBOX
10477     ) |
10478       sed "s/^/$as_me: WARNING:     /" >&2
10479     ;;
10480 esac
10481 echo "$as_me:$LINENO: checking for $ac_header" >&5
10482 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10483 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10484   echo $ECHO_N "(cached) $ECHO_C" >&6
10485 else
10486   eval "$as_ac_Header=\$ac_header_preproc"
10487 fi
10488 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10489 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10490
10491 fi
10492 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10493   cat >>confdefs.h <<_ACEOF
10494 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10495 _ACEOF
10496
10497 else
10498   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10499 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10500    { (exit 1); exit 1; }; }
10501 fi
10502
10503 done
10504
10505 fi
10506
10507 done
10508
10509 fi
10510
10511 if test "$with_ldap" = yes ; then
10512   if test "$PORTNAME" != "win32"; then
10513
10514 for ac_header in ldap.h
10515 do
10516 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10517 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10518   echo "$as_me:$LINENO: checking for $ac_header" >&5
10519 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10520 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10521   echo $ECHO_N "(cached) $ECHO_C" >&6
10522 fi
10523 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10524 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10525 else
10526   # Is the header compilable?
10527 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10528 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10529 cat >conftest.$ac_ext <<_ACEOF
10530 /* confdefs.h.  */
10531 _ACEOF
10532 cat confdefs.h >>conftest.$ac_ext
10533 cat >>conftest.$ac_ext <<_ACEOF
10534 /* end confdefs.h.  */
10535 $ac_includes_default
10536 #include <$ac_header>
10537 _ACEOF
10538 rm -f conftest.$ac_objext
10539 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10540   (eval $ac_compile) 2>conftest.er1
10541   ac_status=$?
10542   grep -v '^ *+' conftest.er1 >conftest.err
10543   rm -f conftest.er1
10544   cat conftest.err >&5
10545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10546   (exit $ac_status); } &&
10547          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
10548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10549   (eval $ac_try) 2>&5
10550   ac_status=$?
10551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10552   (exit $ac_status); }; } &&
10553          { ac_try='test -s conftest.$ac_objext'
10554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10555   (eval $ac_try) 2>&5
10556   ac_status=$?
10557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10558   (exit $ac_status); }; }; then
10559   ac_header_compiler=yes
10560 else
10561   echo "$as_me: failed program was:" >&5
10562 sed 's/^/| /' conftest.$ac_ext >&5
10563
10564 ac_header_compiler=no
10565 fi
10566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10567 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10568 echo "${ECHO_T}$ac_header_compiler" >&6
10569
10570 # Is the header present?
10571 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10572 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10573 cat >conftest.$ac_ext <<_ACEOF
10574 /* confdefs.h.  */
10575 _ACEOF
10576 cat confdefs.h >>conftest.$ac_ext
10577 cat >>conftest.$ac_ext <<_ACEOF
10578 /* end confdefs.h.  */
10579 #include <$ac_header>
10580 _ACEOF
10581 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10582   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10583   ac_status=$?
10584   grep -v '^ *+' conftest.er1 >conftest.err
10585   rm -f conftest.er1
10586   cat conftest.err >&5
10587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10588   (exit $ac_status); } >/dev/null; then
10589   if test -s conftest.err; then
10590     ac_cpp_err=$ac_c_preproc_warn_flag
10591     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10592   else
10593     ac_cpp_err=
10594   fi
10595 else
10596   ac_cpp_err=yes
10597 fi
10598 if test -z "$ac_cpp_err"; then
10599   ac_header_preproc=yes
10600 else
10601   echo "$as_me: failed program was:" >&5
10602 sed 's/^/| /' conftest.$ac_ext >&5
10603
10604   ac_header_preproc=no
10605 fi
10606 rm -f conftest.err conftest.$ac_ext
10607 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10608 echo "${ECHO_T}$ac_header_preproc" >&6
10609
10610 # So?  What about this header?
10611 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10612   yes:no: )
10613     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10614 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10615     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10616 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10617     ac_header_preproc=yes
10618     ;;
10619   no:yes:* )
10620     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10621 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10622     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10623 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10624     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10625 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10626     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10627 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10628     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10629 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10630     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10631 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10632     (
10633       cat <<\_ASBOX
10634 ## ---------------------------------------- ##
10635 ## Report this to pgsql-bugs@postgresql.org ##
10636 ## ---------------------------------------- ##
10637 _ASBOX
10638     ) |
10639       sed "s/^/$as_me: WARNING:     /" >&2
10640     ;;
10641 esac
10642 echo "$as_me:$LINENO: checking for $ac_header" >&5
10643 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10644 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10645   echo $ECHO_N "(cached) $ECHO_C" >&6
10646 else
10647   eval "$as_ac_Header=\$ac_header_preproc"
10648 fi
10649 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10650 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10651
10652 fi
10653 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10654   cat >>confdefs.h <<_ACEOF
10655 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10656 _ACEOF
10657
10658 else
10659   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
10660 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10661    { (exit 1); exit 1; }; }
10662 fi
10663
10664 done
10665
10666   else
10667
10668 for ac_header in winldap.h
10669 do
10670 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10671 echo "$as_me:$LINENO: checking for $ac_header" >&5
10672 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10673 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10674   echo $ECHO_N "(cached) $ECHO_C" >&6
10675 else
10676   cat >conftest.$ac_ext <<_ACEOF
10677 /* confdefs.h.  */
10678 _ACEOF
10679 cat confdefs.h >>conftest.$ac_ext
10680 cat >>conftest.$ac_ext <<_ACEOF
10681 /* end confdefs.h.  */
10682 $ac_includes_default
10683 #include <windows.h>
10684
10685
10686 #include <$ac_header>
10687 _ACEOF
10688 rm -f conftest.$ac_objext
10689 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10690   (eval $ac_compile) 2>conftest.er1
10691   ac_status=$?
10692   grep -v '^ *+' conftest.er1 >conftest.err
10693   rm -f conftest.er1
10694   cat conftest.err >&5
10695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10696   (exit $ac_status); } &&
10697          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
10698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10699   (eval $ac_try) 2>&5
10700   ac_status=$?
10701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10702   (exit $ac_status); }; } &&
10703          { ac_try='test -s conftest.$ac_objext'
10704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10705   (eval $ac_try) 2>&5
10706   ac_status=$?
10707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10708   (exit $ac_status); }; }; then
10709   eval "$as_ac_Header=yes"
10710 else
10711   echo "$as_me: failed program was:" >&5
10712 sed 's/^/| /' conftest.$ac_ext >&5
10713
10714 eval "$as_ac_Header=no"
10715 fi
10716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10717 fi
10718 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10719 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10720 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10721   cat >>confdefs.h <<_ACEOF
10722 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10723 _ACEOF
10724
10725 else
10726   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10727 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10728    { (exit 1); exit 1; }; }
10729 fi
10730
10731 done
10732
10733   fi
10734 fi
10735
10736 if test "$with_bonjour" = yes ; then
10737   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10738   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10739 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10740 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10741   echo $ECHO_N "(cached) $ECHO_C" >&6
10742 fi
10743 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10744 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10745 else
10746   # Is the header compilable?
10747 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10748 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10749 cat >conftest.$ac_ext <<_ACEOF
10750 /* confdefs.h.  */
10751 _ACEOF
10752 cat confdefs.h >>conftest.$ac_ext
10753 cat >>conftest.$ac_ext <<_ACEOF
10754 /* end confdefs.h.  */
10755 $ac_includes_default
10756 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10757 _ACEOF
10758 rm -f conftest.$ac_objext
10759 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10760   (eval $ac_compile) 2>conftest.er1
10761   ac_status=$?
10762   grep -v '^ *+' conftest.er1 >conftest.err
10763   rm -f conftest.er1
10764   cat conftest.err >&5
10765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10766   (exit $ac_status); } &&
10767          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
10768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10769   (eval $ac_try) 2>&5
10770   ac_status=$?
10771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10772   (exit $ac_status); }; } &&
10773          { ac_try='test -s conftest.$ac_objext'
10774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10775   (eval $ac_try) 2>&5
10776   ac_status=$?
10777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10778   (exit $ac_status); }; }; then
10779   ac_header_compiler=yes
10780 else
10781   echo "$as_me: failed program was:" >&5
10782 sed 's/^/| /' conftest.$ac_ext >&5
10783
10784 ac_header_compiler=no
10785 fi
10786 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10787 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10788 echo "${ECHO_T}$ac_header_compiler" >&6
10789
10790 # Is the header present?
10791 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10792 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10793 cat >conftest.$ac_ext <<_ACEOF
10794 /* confdefs.h.  */
10795 _ACEOF
10796 cat confdefs.h >>conftest.$ac_ext
10797 cat >>conftest.$ac_ext <<_ACEOF
10798 /* end confdefs.h.  */
10799 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10800 _ACEOF
10801 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10802   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10803   ac_status=$?
10804   grep -v '^ *+' conftest.er1 >conftest.err
10805   rm -f conftest.er1
10806   cat conftest.err >&5
10807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10808   (exit $ac_status); } >/dev/null; then
10809   if test -s conftest.err; then
10810     ac_cpp_err=$ac_c_preproc_warn_flag
10811     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10812   else
10813     ac_cpp_err=
10814   fi
10815 else
10816   ac_cpp_err=yes
10817 fi
10818 if test -z "$ac_cpp_err"; then
10819   ac_header_preproc=yes
10820 else
10821   echo "$as_me: failed program was:" >&5
10822 sed 's/^/| /' conftest.$ac_ext >&5
10823
10824   ac_header_preproc=no
10825 fi
10826 rm -f conftest.err conftest.$ac_ext
10827 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10828 echo "${ECHO_T}$ac_header_preproc" >&6
10829
10830 # So?  What about this header?
10831 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10832   yes:no: )
10833     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10834 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10835     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10836 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10837     ac_header_preproc=yes
10838     ;;
10839   no:yes:* )
10840     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10841 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10842     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10843 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10844     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10845 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10846     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10847 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10848     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10849 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10850     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10851 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10852     (
10853       cat <<\_ASBOX
10854 ## ---------------------------------------- ##
10855 ## Report this to pgsql-bugs@postgresql.org ##
10856 ## ---------------------------------------- ##
10857 _ASBOX
10858     ) |
10859       sed "s/^/$as_me: WARNING:     /" >&2
10860     ;;
10861 esac
10862 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10863 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10864 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10865   echo $ECHO_N "(cached) $ECHO_C" >&6
10866 else
10867   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10868 fi
10869 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10870 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10871
10872 fi
10873 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10874   :
10875 else
10876   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10877 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10878    { (exit 1); exit 1; }; }
10879 fi
10880
10881
10882 fi
10883
10884
10885 ##
10886 ## Types, structures, compiler characteristics
10887 ##
10888
10889  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10890 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10891 if test "${ac_cv_c_const+set}" = set; then
10892   echo $ECHO_N "(cached) $ECHO_C" >&6
10893 else
10894   cat >conftest.$ac_ext <<_ACEOF
10895 /* confdefs.h.  */
10896 _ACEOF
10897 cat confdefs.h >>conftest.$ac_ext
10898 cat >>conftest.$ac_ext <<_ACEOF
10899 /* end confdefs.h.  */
10900
10901 int
10902 main ()
10903 {
10904 /* FIXME: Include the comments suggested by Paul. */
10905 #ifndef __cplusplus
10906   /* Ultrix mips cc rejects this.  */
10907   typedef int charset[2];
10908   const charset x;
10909   /* SunOS 4.1.1 cc rejects this.  */
10910   char const *const *ccp;
10911   char **p;
10912   /* NEC SVR4.0.2 mips cc rejects this.  */
10913   struct point {int x, y;};
10914   static struct point const zero = {0,0};
10915   /* AIX XL C 1.02.0.0 rejects this.
10916      It does not let you subtract one const X* pointer from another in
10917      an arm of an if-expression whose if-part is not a constant
10918      expression */
10919   const char *g = "string";
10920   ccp = &g + (g ? g-g : 0);
10921   /* HPUX 7.0 cc rejects these. */
10922   ++ccp;
10923   p = (char**) ccp;
10924   ccp = (char const *const *) p;
10925   { /* SCO 3.2v4 cc rejects this.  */
10926     char *t;
10927     char const *s = 0 ? (char *) 0 : (char const *) 0;
10928
10929     *t++ = 0;
10930   }
10931   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10932     int x[] = {25, 17};
10933     const int *foo = &x[0];
10934     ++foo;
10935   }
10936   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10937     typedef const int *iptr;
10938     iptr p = 0;
10939     ++p;
10940   }
10941   { /* AIX XL C 1.02.0.0 rejects this saying
10942        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10943     struct s { int j; const int *ap[3]; };
10944     struct s *b; b->j = 5;
10945   }
10946   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10947     const int foo = 10;
10948   }
10949 #endif
10950
10951   ;
10952   return 0;
10953 }
10954 _ACEOF
10955 rm -f conftest.$ac_objext
10956 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10957   (eval $ac_compile) 2>conftest.er1
10958   ac_status=$?
10959   grep -v '^ *+' conftest.er1 >conftest.err
10960   rm -f conftest.er1
10961   cat conftest.err >&5
10962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10963   (exit $ac_status); } &&
10964          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
10965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10966   (eval $ac_try) 2>&5
10967   ac_status=$?
10968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10969   (exit $ac_status); }; } &&
10970          { ac_try='test -s conftest.$ac_objext'
10971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10972   (eval $ac_try) 2>&5
10973   ac_status=$?
10974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975   (exit $ac_status); }; }; then
10976   ac_cv_c_const=yes
10977 else
10978   echo "$as_me: failed program was:" >&5
10979 sed 's/^/| /' conftest.$ac_ext >&5
10980
10981 ac_cv_c_const=no
10982 fi
10983 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10984 fi
10985 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10986 echo "${ECHO_T}$ac_cv_c_const" >&6
10987 if test $ac_cv_c_const = no; then
10988
10989 cat >>confdefs.h <<\_ACEOF
10990 #define const
10991 _ACEOF
10992
10993 fi
10994
10995
10996 echo "$as_me:$LINENO: checking for inline" >&5
10997 echo $ECHO_N "checking for inline... $ECHO_C" >&6
10998 if test "${ac_cv_c_inline+set}" = set; then
10999   echo $ECHO_N "(cached) $ECHO_C" >&6
11000 else
11001   ac_cv_c_inline=no
11002 for ac_kw in inline __inline__ __inline; do
11003   cat >conftest.$ac_ext <<_ACEOF
11004 /* confdefs.h.  */
11005 _ACEOF
11006 cat confdefs.h >>conftest.$ac_ext
11007 cat >>conftest.$ac_ext <<_ACEOF
11008 /* end confdefs.h.  */
11009 #ifndef __cplusplus
11010 typedef int foo_t;
11011 static $ac_kw foo_t static_foo () {return 0; }
11012 $ac_kw int foo () {return 0; }
11013 #endif
11014
11015 _ACEOF
11016 rm -f conftest.$ac_objext
11017 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11018   (eval $ac_compile) 2>conftest.er1
11019   ac_status=$?
11020   grep -v '^ *+' conftest.er1 >conftest.err
11021   rm -f conftest.er1
11022   cat conftest.err >&5
11023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11024   (exit $ac_status); } &&
11025          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11027   (eval $ac_try) 2>&5
11028   ac_status=$?
11029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11030   (exit $ac_status); }; } &&
11031          { ac_try='test -s conftest.$ac_objext'
11032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11033   (eval $ac_try) 2>&5
11034   ac_status=$?
11035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11036   (exit $ac_status); }; }; then
11037   ac_cv_c_inline=$ac_kw; break
11038 else
11039   echo "$as_me: failed program was:" >&5
11040 sed 's/^/| /' conftest.$ac_ext >&5
11041
11042 fi
11043 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11044 done
11045
11046 fi
11047 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11048 echo "${ECHO_T}$ac_cv_c_inline" >&6
11049 case $ac_cv_c_inline in
11050   inline | yes) ;;
11051   no)
11052 cat >>confdefs.h <<\_ACEOF
11053 #define inline
11054 _ACEOF
11055  ;;
11056   *)  cat >>confdefs.h <<_ACEOF
11057 #define inline $ac_cv_c_inline
11058 _ACEOF
11059  ;;
11060 esac
11061
11062 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11063 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11064 if test "${ac_cv_c_stringize+set}" = set; then
11065   echo $ECHO_N "(cached) $ECHO_C" >&6
11066 else
11067   cat >conftest.$ac_ext <<_ACEOF
11068 /* confdefs.h.  */
11069 _ACEOF
11070 cat confdefs.h >>conftest.$ac_ext
11071 cat >>conftest.$ac_ext <<_ACEOF
11072 /* end confdefs.h.  */
11073 #define x(y) #y
11074
11075 char *s = x(teststring);
11076 _ACEOF
11077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11078   $EGREP "#teststring" >/dev/null 2>&1; then
11079   ac_cv_c_stringize=no
11080 else
11081   ac_cv_c_stringize=yes
11082 fi
11083 rm -f conftest*
11084
11085 fi
11086 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11087 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11088 if test $ac_cv_c_stringize = yes; then
11089
11090 cat >>confdefs.h <<\_ACEOF
11091 #define HAVE_STRINGIZE 1
11092 _ACEOF
11093
11094 fi
11095
11096 echo "$as_me:$LINENO: checking for signed types" >&5
11097 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11098 if test "${pgac_cv_c_signed+set}" = set; then
11099   echo $ECHO_N "(cached) $ECHO_C" >&6
11100 else
11101   cat >conftest.$ac_ext <<_ACEOF
11102 /* confdefs.h.  */
11103 _ACEOF
11104 cat confdefs.h >>conftest.$ac_ext
11105 cat >>conftest.$ac_ext <<_ACEOF
11106 /* end confdefs.h.  */
11107
11108 int
11109 main ()
11110 {
11111 signed char c; signed short s; signed int i;
11112   ;
11113   return 0;
11114 }
11115 _ACEOF
11116 rm -f conftest.$ac_objext
11117 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11118   (eval $ac_compile) 2>conftest.er1
11119   ac_status=$?
11120   grep -v '^ *+' conftest.er1 >conftest.err
11121   rm -f conftest.er1
11122   cat conftest.err >&5
11123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11124   (exit $ac_status); } &&
11125          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11127   (eval $ac_try) 2>&5
11128   ac_status=$?
11129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130   (exit $ac_status); }; } &&
11131          { ac_try='test -s conftest.$ac_objext'
11132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11133   (eval $ac_try) 2>&5
11134   ac_status=$?
11135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11136   (exit $ac_status); }; }; then
11137   pgac_cv_c_signed=yes
11138 else
11139   echo "$as_me: failed program was:" >&5
11140 sed 's/^/| /' conftest.$ac_ext >&5
11141
11142 pgac_cv_c_signed=no
11143 fi
11144 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11145 fi
11146 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11147 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11148 if test x"$pgac_cv_c_signed" = xno ; then
11149
11150 cat >>confdefs.h <<\_ACEOF
11151 #define signed
11152 _ACEOF
11153
11154 fi
11155 echo "$as_me:$LINENO: checking for working volatile" >&5
11156 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11157 if test "${ac_cv_c_volatile+set}" = set; then
11158   echo $ECHO_N "(cached) $ECHO_C" >&6
11159 else
11160   cat >conftest.$ac_ext <<_ACEOF
11161 /* confdefs.h.  */
11162 _ACEOF
11163 cat confdefs.h >>conftest.$ac_ext
11164 cat >>conftest.$ac_ext <<_ACEOF
11165 /* end confdefs.h.  */
11166
11167 int
11168 main ()
11169 {
11170
11171 volatile int x;
11172 int * volatile y;
11173   ;
11174   return 0;
11175 }
11176 _ACEOF
11177 rm -f conftest.$ac_objext
11178 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11179   (eval $ac_compile) 2>conftest.er1
11180   ac_status=$?
11181   grep -v '^ *+' conftest.er1 >conftest.err
11182   rm -f conftest.er1
11183   cat conftest.err >&5
11184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185   (exit $ac_status); } &&
11186          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11188   (eval $ac_try) 2>&5
11189   ac_status=$?
11190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191   (exit $ac_status); }; } &&
11192          { ac_try='test -s conftest.$ac_objext'
11193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11194   (eval $ac_try) 2>&5
11195   ac_status=$?
11196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11197   (exit $ac_status); }; }; then
11198   ac_cv_c_volatile=yes
11199 else
11200   echo "$as_me: failed program was:" >&5
11201 sed 's/^/| /' conftest.$ac_ext >&5
11202
11203 ac_cv_c_volatile=no
11204 fi
11205 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11206 fi
11207 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11208 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11209 if test $ac_cv_c_volatile = no; then
11210
11211 cat >>confdefs.h <<\_ACEOF
11212 #define volatile
11213 _ACEOF
11214
11215 fi
11216
11217 echo "$as_me:$LINENO: checking for __func__" >&5
11218 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11219 if test "${pgac_cv_funcname_func_support+set}" = set; then
11220   echo $ECHO_N "(cached) $ECHO_C" >&6
11221 else
11222   cat >conftest.$ac_ext <<_ACEOF
11223 /* confdefs.h.  */
11224 _ACEOF
11225 cat confdefs.h >>conftest.$ac_ext
11226 cat >>conftest.$ac_ext <<_ACEOF
11227 /* end confdefs.h.  */
11228 #include <stdio.h>
11229 int
11230 main ()
11231 {
11232 printf("%s\n", __func__);
11233   ;
11234   return 0;
11235 }
11236 _ACEOF
11237 rm -f conftest.$ac_objext
11238 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11239   (eval $ac_compile) 2>conftest.er1
11240   ac_status=$?
11241   grep -v '^ *+' conftest.er1 >conftest.err
11242   rm -f conftest.er1
11243   cat conftest.err >&5
11244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11245   (exit $ac_status); } &&
11246          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11248   (eval $ac_try) 2>&5
11249   ac_status=$?
11250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11251   (exit $ac_status); }; } &&
11252          { ac_try='test -s conftest.$ac_objext'
11253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11254   (eval $ac_try) 2>&5
11255   ac_status=$?
11256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11257   (exit $ac_status); }; }; then
11258   pgac_cv_funcname_func_support=yes
11259 else
11260   echo "$as_me: failed program was:" >&5
11261 sed 's/^/| /' conftest.$ac_ext >&5
11262
11263 pgac_cv_funcname_func_support=no
11264 fi
11265 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11266 fi
11267 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11268 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11269 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11270
11271 cat >>confdefs.h <<\_ACEOF
11272 #define HAVE_FUNCNAME__FUNC 1
11273 _ACEOF
11274
11275 else
11276 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11277 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11278 if test "${pgac_cv_funcname_function_support+set}" = set; then
11279   echo $ECHO_N "(cached) $ECHO_C" >&6
11280 else
11281   cat >conftest.$ac_ext <<_ACEOF
11282 /* confdefs.h.  */
11283 _ACEOF
11284 cat confdefs.h >>conftest.$ac_ext
11285 cat >>conftest.$ac_ext <<_ACEOF
11286 /* end confdefs.h.  */
11287 #include <stdio.h>
11288 int
11289 main ()
11290 {
11291 printf("%s\n", __FUNCTION__);
11292   ;
11293   return 0;
11294 }
11295 _ACEOF
11296 rm -f conftest.$ac_objext
11297 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11298   (eval $ac_compile) 2>conftest.er1
11299   ac_status=$?
11300   grep -v '^ *+' conftest.er1 >conftest.err
11301   rm -f conftest.er1
11302   cat conftest.err >&5
11303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11304   (exit $ac_status); } &&
11305          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11307   (eval $ac_try) 2>&5
11308   ac_status=$?
11309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11310   (exit $ac_status); }; } &&
11311          { ac_try='test -s conftest.$ac_objext'
11312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11313   (eval $ac_try) 2>&5
11314   ac_status=$?
11315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11316   (exit $ac_status); }; }; then
11317   pgac_cv_funcname_function_support=yes
11318 else
11319   echo "$as_me: failed program was:" >&5
11320 sed 's/^/| /' conftest.$ac_ext >&5
11321
11322 pgac_cv_funcname_function_support=no
11323 fi
11324 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11325 fi
11326 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11327 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11328 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11329
11330 cat >>confdefs.h <<\_ACEOF
11331 #define HAVE_FUNCNAME__FUNCTION 1
11332 _ACEOF
11333
11334 fi
11335 fi
11336 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11337 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11338 if test "${ac_cv_struct_tm+set}" = set; then
11339   echo $ECHO_N "(cached) $ECHO_C" >&6
11340 else
11341   cat >conftest.$ac_ext <<_ACEOF
11342 /* confdefs.h.  */
11343 _ACEOF
11344 cat confdefs.h >>conftest.$ac_ext
11345 cat >>conftest.$ac_ext <<_ACEOF
11346 /* end confdefs.h.  */
11347 #include <sys/types.h>
11348 #include <time.h>
11349
11350 int
11351 main ()
11352 {
11353 struct tm *tp; tp->tm_sec;
11354   ;
11355   return 0;
11356 }
11357 _ACEOF
11358 rm -f conftest.$ac_objext
11359 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11360   (eval $ac_compile) 2>conftest.er1
11361   ac_status=$?
11362   grep -v '^ *+' conftest.er1 >conftest.err
11363   rm -f conftest.er1
11364   cat conftest.err >&5
11365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11366   (exit $ac_status); } &&
11367          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11369   (eval $ac_try) 2>&5
11370   ac_status=$?
11371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11372   (exit $ac_status); }; } &&
11373          { ac_try='test -s conftest.$ac_objext'
11374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11375   (eval $ac_try) 2>&5
11376   ac_status=$?
11377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11378   (exit $ac_status); }; }; then
11379   ac_cv_struct_tm=time.h
11380 else
11381   echo "$as_me: failed program was:" >&5
11382 sed 's/^/| /' conftest.$ac_ext >&5
11383
11384 ac_cv_struct_tm=sys/time.h
11385 fi
11386 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11387 fi
11388 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11389 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11390 if test $ac_cv_struct_tm = sys/time.h; then
11391
11392 cat >>confdefs.h <<\_ACEOF
11393 #define TM_IN_SYS_TIME 1
11394 _ACEOF
11395
11396 fi
11397
11398 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11399 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11400 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11401   echo $ECHO_N "(cached) $ECHO_C" >&6
11402 else
11403   cat >conftest.$ac_ext <<_ACEOF
11404 /* confdefs.h.  */
11405 _ACEOF
11406 cat confdefs.h >>conftest.$ac_ext
11407 cat >>conftest.$ac_ext <<_ACEOF
11408 /* end confdefs.h.  */
11409 #include <sys/types.h>
11410 #include <$ac_cv_struct_tm>
11411
11412
11413 int
11414 main ()
11415 {
11416 static struct tm ac_aggr;
11417 if (ac_aggr.tm_zone)
11418 return 0;
11419   ;
11420   return 0;
11421 }
11422 _ACEOF
11423 rm -f conftest.$ac_objext
11424 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11425   (eval $ac_compile) 2>conftest.er1
11426   ac_status=$?
11427   grep -v '^ *+' conftest.er1 >conftest.err
11428   rm -f conftest.er1
11429   cat conftest.err >&5
11430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11431   (exit $ac_status); } &&
11432          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11434   (eval $ac_try) 2>&5
11435   ac_status=$?
11436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437   (exit $ac_status); }; } &&
11438          { ac_try='test -s conftest.$ac_objext'
11439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11440   (eval $ac_try) 2>&5
11441   ac_status=$?
11442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11443   (exit $ac_status); }; }; then
11444   ac_cv_member_struct_tm_tm_zone=yes
11445 else
11446   echo "$as_me: failed program was:" >&5
11447 sed 's/^/| /' conftest.$ac_ext >&5
11448
11449 cat >conftest.$ac_ext <<_ACEOF
11450 /* confdefs.h.  */
11451 _ACEOF
11452 cat confdefs.h >>conftest.$ac_ext
11453 cat >>conftest.$ac_ext <<_ACEOF
11454 /* end confdefs.h.  */
11455 #include <sys/types.h>
11456 #include <$ac_cv_struct_tm>
11457
11458
11459 int
11460 main ()
11461 {
11462 static struct tm ac_aggr;
11463 if (sizeof ac_aggr.tm_zone)
11464 return 0;
11465   ;
11466   return 0;
11467 }
11468 _ACEOF
11469 rm -f conftest.$ac_objext
11470 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11471   (eval $ac_compile) 2>conftest.er1
11472   ac_status=$?
11473   grep -v '^ *+' conftest.er1 >conftest.err
11474   rm -f conftest.er1
11475   cat conftest.err >&5
11476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11477   (exit $ac_status); } &&
11478          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11480   (eval $ac_try) 2>&5
11481   ac_status=$?
11482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11483   (exit $ac_status); }; } &&
11484          { ac_try='test -s conftest.$ac_objext'
11485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11486   (eval $ac_try) 2>&5
11487   ac_status=$?
11488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11489   (exit $ac_status); }; }; then
11490   ac_cv_member_struct_tm_tm_zone=yes
11491 else
11492   echo "$as_me: failed program was:" >&5
11493 sed 's/^/| /' conftest.$ac_ext >&5
11494
11495 ac_cv_member_struct_tm_tm_zone=no
11496 fi
11497 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11498 fi
11499 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11500 fi
11501 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11502 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11503 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11504
11505 cat >>confdefs.h <<_ACEOF
11506 #define HAVE_STRUCT_TM_TM_ZONE 1
11507 _ACEOF
11508
11509
11510 fi
11511
11512 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11513
11514 cat >>confdefs.h <<\_ACEOF
11515 #define HAVE_TM_ZONE 1
11516 _ACEOF
11517
11518 fi
11519 echo "$as_me:$LINENO: checking for tzname" >&5
11520 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11521 if test "${ac_cv_var_tzname+set}" = set; then
11522   echo $ECHO_N "(cached) $ECHO_C" >&6
11523 else
11524   cat >conftest.$ac_ext <<_ACEOF
11525 /* confdefs.h.  */
11526 _ACEOF
11527 cat confdefs.h >>conftest.$ac_ext
11528 cat >>conftest.$ac_ext <<_ACEOF
11529 /* end confdefs.h.  */
11530 #include <time.h>
11531 #ifndef tzname /* For SGI.  */
11532 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11533 #endif
11534
11535 int
11536 main ()
11537 {
11538 atoi(*tzname);
11539   ;
11540   return 0;
11541 }
11542 _ACEOF
11543 rm -f conftest.$ac_objext conftest$ac_exeext
11544 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11545   (eval $ac_link) 2>conftest.er1
11546   ac_status=$?
11547   grep -v '^ *+' conftest.er1 >conftest.err
11548   rm -f conftest.er1
11549   cat conftest.err >&5
11550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11551   (exit $ac_status); } &&
11552          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11554   (eval $ac_try) 2>&5
11555   ac_status=$?
11556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11557   (exit $ac_status); }; } &&
11558          { ac_try='test -s conftest$ac_exeext'
11559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11560   (eval $ac_try) 2>&5
11561   ac_status=$?
11562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11563   (exit $ac_status); }; }; then
11564   ac_cv_var_tzname=yes
11565 else
11566   echo "$as_me: failed program was:" >&5
11567 sed 's/^/| /' conftest.$ac_ext >&5
11568
11569 ac_cv_var_tzname=no
11570 fi
11571 rm -f conftest.err conftest.$ac_objext \
11572       conftest$ac_exeext conftest.$ac_ext
11573 fi
11574 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11575 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11576 if test $ac_cv_var_tzname = yes; then
11577
11578 cat >>confdefs.h <<\_ACEOF
11579 #define HAVE_TZNAME 1
11580 _ACEOF
11581
11582 fi
11583
11584 echo "$as_me:$LINENO: checking for union semun" >&5
11585 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11586 if test "${ac_cv_type_union_semun+set}" = set; then
11587   echo $ECHO_N "(cached) $ECHO_C" >&6
11588 else
11589   cat >conftest.$ac_ext <<_ACEOF
11590 /* confdefs.h.  */
11591 _ACEOF
11592 cat confdefs.h >>conftest.$ac_ext
11593 cat >>conftest.$ac_ext <<_ACEOF
11594 /* end confdefs.h.  */
11595 #include <sys/types.h>
11596 #include <sys/ipc.h>
11597 #include <sys/sem.h>
11598
11599 int
11600 main ()
11601 {
11602 if ((union semun *) 0)
11603   return 0;
11604 if (sizeof (union semun))
11605   return 0;
11606   ;
11607   return 0;
11608 }
11609 _ACEOF
11610 rm -f conftest.$ac_objext
11611 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11612   (eval $ac_compile) 2>conftest.er1
11613   ac_status=$?
11614   grep -v '^ *+' conftest.er1 >conftest.err
11615   rm -f conftest.er1
11616   cat conftest.err >&5
11617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11618   (exit $ac_status); } &&
11619          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11621   (eval $ac_try) 2>&5
11622   ac_status=$?
11623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11624   (exit $ac_status); }; } &&
11625          { ac_try='test -s conftest.$ac_objext'
11626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11627   (eval $ac_try) 2>&5
11628   ac_status=$?
11629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11630   (exit $ac_status); }; }; then
11631   ac_cv_type_union_semun=yes
11632 else
11633   echo "$as_me: failed program was:" >&5
11634 sed 's/^/| /' conftest.$ac_ext >&5
11635
11636 ac_cv_type_union_semun=no
11637 fi
11638 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11639 fi
11640 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11641 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11642 if test $ac_cv_type_union_semun = yes; then
11643
11644 cat >>confdefs.h <<_ACEOF
11645 #define HAVE_UNION_SEMUN 1
11646 _ACEOF
11647
11648
11649 fi
11650
11651 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11652 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11653 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11654   echo $ECHO_N "(cached) $ECHO_C" >&6
11655 else
11656   cat >conftest.$ac_ext <<_ACEOF
11657 /* confdefs.h.  */
11658 _ACEOF
11659 cat confdefs.h >>conftest.$ac_ext
11660 cat >>conftest.$ac_ext <<_ACEOF
11661 /* end confdefs.h.  */
11662 #include <sys/types.h>
11663 #ifdef HAVE_SYS_UN_H
11664 #include <sys/un.h>
11665 #endif
11666
11667
11668 int
11669 main ()
11670 {
11671 if ((struct sockaddr_un *) 0)
11672   return 0;
11673 if (sizeof (struct sockaddr_un))
11674   return 0;
11675   ;
11676   return 0;
11677 }
11678 _ACEOF
11679 rm -f conftest.$ac_objext
11680 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11681   (eval $ac_compile) 2>conftest.er1
11682   ac_status=$?
11683   grep -v '^ *+' conftest.er1 >conftest.err
11684   rm -f conftest.er1
11685   cat conftest.err >&5
11686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11687   (exit $ac_status); } &&
11688          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11690   (eval $ac_try) 2>&5
11691   ac_status=$?
11692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11693   (exit $ac_status); }; } &&
11694          { ac_try='test -s conftest.$ac_objext'
11695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11696   (eval $ac_try) 2>&5
11697   ac_status=$?
11698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11699   (exit $ac_status); }; }; then
11700   ac_cv_type_struct_sockaddr_un=yes
11701 else
11702   echo "$as_me: failed program was:" >&5
11703 sed 's/^/| /' conftest.$ac_ext >&5
11704
11705 ac_cv_type_struct_sockaddr_un=no
11706 fi
11707 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11708 fi
11709 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11710 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11711 if test $ac_cv_type_struct_sockaddr_un = yes; then
11712
11713 cat >>confdefs.h <<_ACEOF
11714 #define HAVE_STRUCT_SOCKADDR_UN 1
11715 _ACEOF
11716
11717
11718 cat >>confdefs.h <<\_ACEOF
11719 #define HAVE_UNIX_SOCKETS 1
11720 _ACEOF
11721
11722 fi
11723
11724 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11725 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11726 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11727   echo $ECHO_N "(cached) $ECHO_C" >&6
11728 else
11729   cat >conftest.$ac_ext <<_ACEOF
11730 /* confdefs.h.  */
11731 _ACEOF
11732 cat confdefs.h >>conftest.$ac_ext
11733 cat >>conftest.$ac_ext <<_ACEOF
11734 /* end confdefs.h.  */
11735 #include <sys/types.h>
11736 #ifdef HAVE_SYS_SOCKET_H
11737 #include <sys/socket.h>
11738 #endif
11739
11740
11741 int
11742 main ()
11743 {
11744 if ((struct sockaddr_storage *) 0)
11745   return 0;
11746 if (sizeof (struct sockaddr_storage))
11747   return 0;
11748   ;
11749   return 0;
11750 }
11751 _ACEOF
11752 rm -f conftest.$ac_objext
11753 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11754   (eval $ac_compile) 2>conftest.er1
11755   ac_status=$?
11756   grep -v '^ *+' conftest.er1 >conftest.err
11757   rm -f conftest.er1
11758   cat conftest.err >&5
11759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11760   (exit $ac_status); } &&
11761          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11763   (eval $ac_try) 2>&5
11764   ac_status=$?
11765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11766   (exit $ac_status); }; } &&
11767          { ac_try='test -s conftest.$ac_objext'
11768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11769   (eval $ac_try) 2>&5
11770   ac_status=$?
11771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772   (exit $ac_status); }; }; then
11773   ac_cv_type_struct_sockaddr_storage=yes
11774 else
11775   echo "$as_me: failed program was:" >&5
11776 sed 's/^/| /' conftest.$ac_ext >&5
11777
11778 ac_cv_type_struct_sockaddr_storage=no
11779 fi
11780 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11781 fi
11782 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11783 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11784 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11785
11786 cat >>confdefs.h <<_ACEOF
11787 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11788 _ACEOF
11789
11790
11791 fi
11792
11793 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11794 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11795 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11796   echo $ECHO_N "(cached) $ECHO_C" >&6
11797 else
11798   cat >conftest.$ac_ext <<_ACEOF
11799 /* confdefs.h.  */
11800 _ACEOF
11801 cat confdefs.h >>conftest.$ac_ext
11802 cat >>conftest.$ac_ext <<_ACEOF
11803 /* end confdefs.h.  */
11804 #include <sys/types.h>
11805 #ifdef HAVE_SYS_SOCKET_H
11806 #include <sys/socket.h>
11807 #endif
11808
11809
11810 int
11811 main ()
11812 {
11813 static struct sockaddr_storage ac_aggr;
11814 if (ac_aggr.ss_family)
11815 return 0;
11816   ;
11817   return 0;
11818 }
11819 _ACEOF
11820 rm -f conftest.$ac_objext
11821 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11822   (eval $ac_compile) 2>conftest.er1
11823   ac_status=$?
11824   grep -v '^ *+' conftest.er1 >conftest.err
11825   rm -f conftest.er1
11826   cat conftest.err >&5
11827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11828   (exit $ac_status); } &&
11829          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11831   (eval $ac_try) 2>&5
11832   ac_status=$?
11833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11834   (exit $ac_status); }; } &&
11835          { ac_try='test -s conftest.$ac_objext'
11836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11837   (eval $ac_try) 2>&5
11838   ac_status=$?
11839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11840   (exit $ac_status); }; }; then
11841   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11842 else
11843   echo "$as_me: failed program was:" >&5
11844 sed 's/^/| /' conftest.$ac_ext >&5
11845
11846 cat >conftest.$ac_ext <<_ACEOF
11847 /* confdefs.h.  */
11848 _ACEOF
11849 cat confdefs.h >>conftest.$ac_ext
11850 cat >>conftest.$ac_ext <<_ACEOF
11851 /* end confdefs.h.  */
11852 #include <sys/types.h>
11853 #ifdef HAVE_SYS_SOCKET_H
11854 #include <sys/socket.h>
11855 #endif
11856
11857
11858 int
11859 main ()
11860 {
11861 static struct sockaddr_storage ac_aggr;
11862 if (sizeof ac_aggr.ss_family)
11863 return 0;
11864   ;
11865   return 0;
11866 }
11867 _ACEOF
11868 rm -f conftest.$ac_objext
11869 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11870   (eval $ac_compile) 2>conftest.er1
11871   ac_status=$?
11872   grep -v '^ *+' conftest.er1 >conftest.err
11873   rm -f conftest.er1
11874   cat conftest.err >&5
11875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11876   (exit $ac_status); } &&
11877          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
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); }; } &&
11883          { ac_try='test -s conftest.$ac_objext'
11884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11885   (eval $ac_try) 2>&5
11886   ac_status=$?
11887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11888   (exit $ac_status); }; }; then
11889   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11890 else
11891   echo "$as_me: failed program was:" >&5
11892 sed 's/^/| /' conftest.$ac_ext >&5
11893
11894 ac_cv_member_struct_sockaddr_storage_ss_family=no
11895 fi
11896 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11897 fi
11898 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11899 fi
11900 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11901 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11902 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11903
11904 cat >>confdefs.h <<_ACEOF
11905 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11906 _ACEOF
11907
11908
11909 fi
11910 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11911 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11912 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11913   echo $ECHO_N "(cached) $ECHO_C" >&6
11914 else
11915   cat >conftest.$ac_ext <<_ACEOF
11916 /* confdefs.h.  */
11917 _ACEOF
11918 cat confdefs.h >>conftest.$ac_ext
11919 cat >>conftest.$ac_ext <<_ACEOF
11920 /* end confdefs.h.  */
11921 #include <sys/types.h>
11922 #ifdef HAVE_SYS_SOCKET_H
11923 #include <sys/socket.h>
11924 #endif
11925
11926
11927 int
11928 main ()
11929 {
11930 static struct sockaddr_storage ac_aggr;
11931 if (ac_aggr.__ss_family)
11932 return 0;
11933   ;
11934   return 0;
11935 }
11936 _ACEOF
11937 rm -f conftest.$ac_objext
11938 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11939   (eval $ac_compile) 2>conftest.er1
11940   ac_status=$?
11941   grep -v '^ *+' conftest.er1 >conftest.err
11942   rm -f conftest.er1
11943   cat conftest.err >&5
11944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11945   (exit $ac_status); } &&
11946          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11948   (eval $ac_try) 2>&5
11949   ac_status=$?
11950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11951   (exit $ac_status); }; } &&
11952          { ac_try='test -s conftest.$ac_objext'
11953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11954   (eval $ac_try) 2>&5
11955   ac_status=$?
11956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11957   (exit $ac_status); }; }; then
11958   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11959 else
11960   echo "$as_me: failed program was:" >&5
11961 sed 's/^/| /' conftest.$ac_ext >&5
11962
11963 cat >conftest.$ac_ext <<_ACEOF
11964 /* confdefs.h.  */
11965 _ACEOF
11966 cat confdefs.h >>conftest.$ac_ext
11967 cat >>conftest.$ac_ext <<_ACEOF
11968 /* end confdefs.h.  */
11969 #include <sys/types.h>
11970 #ifdef HAVE_SYS_SOCKET_H
11971 #include <sys/socket.h>
11972 #endif
11973
11974
11975 int
11976 main ()
11977 {
11978 static struct sockaddr_storage ac_aggr;
11979 if (sizeof ac_aggr.__ss_family)
11980 return 0;
11981   ;
11982   return 0;
11983 }
11984 _ACEOF
11985 rm -f conftest.$ac_objext
11986 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11987   (eval $ac_compile) 2>conftest.er1
11988   ac_status=$?
11989   grep -v '^ *+' conftest.er1 >conftest.err
11990   rm -f conftest.er1
11991   cat conftest.err >&5
11992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11993   (exit $ac_status); } &&
11994          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
11995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11996   (eval $ac_try) 2>&5
11997   ac_status=$?
11998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11999   (exit $ac_status); }; } &&
12000          { ac_try='test -s conftest.$ac_objext'
12001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12002   (eval $ac_try) 2>&5
12003   ac_status=$?
12004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12005   (exit $ac_status); }; }; then
12006   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12007 else
12008   echo "$as_me: failed program was:" >&5
12009 sed 's/^/| /' conftest.$ac_ext >&5
12010
12011 ac_cv_member_struct_sockaddr_storage___ss_family=no
12012 fi
12013 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12014 fi
12015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12016 fi
12017 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12018 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12019 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12020
12021 cat >>confdefs.h <<_ACEOF
12022 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12023 _ACEOF
12024
12025
12026 fi
12027 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12028 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12029 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12030   echo $ECHO_N "(cached) $ECHO_C" >&6
12031 else
12032   cat >conftest.$ac_ext <<_ACEOF
12033 /* confdefs.h.  */
12034 _ACEOF
12035 cat confdefs.h >>conftest.$ac_ext
12036 cat >>conftest.$ac_ext <<_ACEOF
12037 /* end confdefs.h.  */
12038 #include <sys/types.h>
12039 #ifdef HAVE_SYS_SOCKET_H
12040 #include <sys/socket.h>
12041 #endif
12042
12043
12044 int
12045 main ()
12046 {
12047 static struct sockaddr_storage ac_aggr;
12048 if (ac_aggr.ss_len)
12049 return 0;
12050   ;
12051   return 0;
12052 }
12053 _ACEOF
12054 rm -f conftest.$ac_objext
12055 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12056   (eval $ac_compile) 2>conftest.er1
12057   ac_status=$?
12058   grep -v '^ *+' conftest.er1 >conftest.err
12059   rm -f conftest.er1
12060   cat conftest.err >&5
12061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12062   (exit $ac_status); } &&
12063          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12065   (eval $ac_try) 2>&5
12066   ac_status=$?
12067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12068   (exit $ac_status); }; } &&
12069          { ac_try='test -s conftest.$ac_objext'
12070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12071   (eval $ac_try) 2>&5
12072   ac_status=$?
12073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12074   (exit $ac_status); }; }; then
12075   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12076 else
12077   echo "$as_me: failed program was:" >&5
12078 sed 's/^/| /' conftest.$ac_ext >&5
12079
12080 cat >conftest.$ac_ext <<_ACEOF
12081 /* confdefs.h.  */
12082 _ACEOF
12083 cat confdefs.h >>conftest.$ac_ext
12084 cat >>conftest.$ac_ext <<_ACEOF
12085 /* end confdefs.h.  */
12086 #include <sys/types.h>
12087 #ifdef HAVE_SYS_SOCKET_H
12088 #include <sys/socket.h>
12089 #endif
12090
12091
12092 int
12093 main ()
12094 {
12095 static struct sockaddr_storage ac_aggr;
12096 if (sizeof ac_aggr.ss_len)
12097 return 0;
12098   ;
12099   return 0;
12100 }
12101 _ACEOF
12102 rm -f conftest.$ac_objext
12103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12104   (eval $ac_compile) 2>conftest.er1
12105   ac_status=$?
12106   grep -v '^ *+' conftest.er1 >conftest.err
12107   rm -f conftest.er1
12108   cat conftest.err >&5
12109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110   (exit $ac_status); } &&
12111          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12113   (eval $ac_try) 2>&5
12114   ac_status=$?
12115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12116   (exit $ac_status); }; } &&
12117          { ac_try='test -s conftest.$ac_objext'
12118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12119   (eval $ac_try) 2>&5
12120   ac_status=$?
12121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122   (exit $ac_status); }; }; then
12123   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12124 else
12125   echo "$as_me: failed program was:" >&5
12126 sed 's/^/| /' conftest.$ac_ext >&5
12127
12128 ac_cv_member_struct_sockaddr_storage_ss_len=no
12129 fi
12130 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12131 fi
12132 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12133 fi
12134 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12135 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12136 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12137
12138 cat >>confdefs.h <<_ACEOF
12139 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12140 _ACEOF
12141
12142
12143 fi
12144 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12145 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12146 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12147   echo $ECHO_N "(cached) $ECHO_C" >&6
12148 else
12149   cat >conftest.$ac_ext <<_ACEOF
12150 /* confdefs.h.  */
12151 _ACEOF
12152 cat confdefs.h >>conftest.$ac_ext
12153 cat >>conftest.$ac_ext <<_ACEOF
12154 /* end confdefs.h.  */
12155 #include <sys/types.h>
12156 #ifdef HAVE_SYS_SOCKET_H
12157 #include <sys/socket.h>
12158 #endif
12159
12160
12161 int
12162 main ()
12163 {
12164 static struct sockaddr_storage ac_aggr;
12165 if (ac_aggr.__ss_len)
12166 return 0;
12167   ;
12168   return 0;
12169 }
12170 _ACEOF
12171 rm -f conftest.$ac_objext
12172 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12173   (eval $ac_compile) 2>conftest.er1
12174   ac_status=$?
12175   grep -v '^ *+' conftest.er1 >conftest.err
12176   rm -f conftest.er1
12177   cat conftest.err >&5
12178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12179   (exit $ac_status); } &&
12180          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12182   (eval $ac_try) 2>&5
12183   ac_status=$?
12184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12185   (exit $ac_status); }; } &&
12186          { ac_try='test -s conftest.$ac_objext'
12187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12188   (eval $ac_try) 2>&5
12189   ac_status=$?
12190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12191   (exit $ac_status); }; }; then
12192   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12193 else
12194   echo "$as_me: failed program was:" >&5
12195 sed 's/^/| /' conftest.$ac_ext >&5
12196
12197 cat >conftest.$ac_ext <<_ACEOF
12198 /* confdefs.h.  */
12199 _ACEOF
12200 cat confdefs.h >>conftest.$ac_ext
12201 cat >>conftest.$ac_ext <<_ACEOF
12202 /* end confdefs.h.  */
12203 #include <sys/types.h>
12204 #ifdef HAVE_SYS_SOCKET_H
12205 #include <sys/socket.h>
12206 #endif
12207
12208
12209 int
12210 main ()
12211 {
12212 static struct sockaddr_storage ac_aggr;
12213 if (sizeof ac_aggr.__ss_len)
12214 return 0;
12215   ;
12216   return 0;
12217 }
12218 _ACEOF
12219 rm -f conftest.$ac_objext
12220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12221   (eval $ac_compile) 2>conftest.er1
12222   ac_status=$?
12223   grep -v '^ *+' conftest.er1 >conftest.err
12224   rm -f conftest.er1
12225   cat conftest.err >&5
12226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12227   (exit $ac_status); } &&
12228          { ac_try='test -z "$ac_c_werror_flag"                   || 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_storage___ss_len=yes
12241 else
12242   echo "$as_me: failed program was:" >&5
12243 sed 's/^/| /' conftest.$ac_ext >&5
12244
12245 ac_cv_member_struct_sockaddr_storage___ss_len=no
12246 fi
12247 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12248 fi
12249 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12250 fi
12251 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12252 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12253 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12254
12255 cat >>confdefs.h <<_ACEOF
12256 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12257 _ACEOF
12258
12259
12260 fi
12261 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12262 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12263 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12264   echo $ECHO_N "(cached) $ECHO_C" >&6
12265 else
12266   cat >conftest.$ac_ext <<_ACEOF
12267 /* confdefs.h.  */
12268 _ACEOF
12269 cat confdefs.h >>conftest.$ac_ext
12270 cat >>conftest.$ac_ext <<_ACEOF
12271 /* end confdefs.h.  */
12272 #include <sys/types.h>
12273 #ifdef HAVE_SYS_SOCKET_H
12274 #include <sys/socket.h>
12275 #endif
12276
12277
12278 int
12279 main ()
12280 {
12281 static struct sockaddr ac_aggr;
12282 if (ac_aggr.sa_len)
12283 return 0;
12284   ;
12285   return 0;
12286 }
12287 _ACEOF
12288 rm -f conftest.$ac_objext
12289 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12290   (eval $ac_compile) 2>conftest.er1
12291   ac_status=$?
12292   grep -v '^ *+' conftest.er1 >conftest.err
12293   rm -f conftest.er1
12294   cat conftest.err >&5
12295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12296   (exit $ac_status); } &&
12297          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12299   (eval $ac_try) 2>&5
12300   ac_status=$?
12301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12302   (exit $ac_status); }; } &&
12303          { ac_try='test -s conftest.$ac_objext'
12304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12305   (eval $ac_try) 2>&5
12306   ac_status=$?
12307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308   (exit $ac_status); }; }; then
12309   ac_cv_member_struct_sockaddr_sa_len=yes
12310 else
12311   echo "$as_me: failed program was:" >&5
12312 sed 's/^/| /' conftest.$ac_ext >&5
12313
12314 cat >conftest.$ac_ext <<_ACEOF
12315 /* confdefs.h.  */
12316 _ACEOF
12317 cat confdefs.h >>conftest.$ac_ext
12318 cat >>conftest.$ac_ext <<_ACEOF
12319 /* end confdefs.h.  */
12320 #include <sys/types.h>
12321 #ifdef HAVE_SYS_SOCKET_H
12322 #include <sys/socket.h>
12323 #endif
12324
12325
12326 int
12327 main ()
12328 {
12329 static struct sockaddr ac_aggr;
12330 if (sizeof ac_aggr.sa_len)
12331 return 0;
12332   ;
12333   return 0;
12334 }
12335 _ACEOF
12336 rm -f conftest.$ac_objext
12337 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12338   (eval $ac_compile) 2>conftest.er1
12339   ac_status=$?
12340   grep -v '^ *+' conftest.er1 >conftest.err
12341   rm -f conftest.er1
12342   cat conftest.err >&5
12343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12344   (exit $ac_status); } &&
12345          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12347   (eval $ac_try) 2>&5
12348   ac_status=$?
12349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12350   (exit $ac_status); }; } &&
12351          { ac_try='test -s conftest.$ac_objext'
12352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12353   (eval $ac_try) 2>&5
12354   ac_status=$?
12355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356   (exit $ac_status); }; }; then
12357   ac_cv_member_struct_sockaddr_sa_len=yes
12358 else
12359   echo "$as_me: failed program was:" >&5
12360 sed 's/^/| /' conftest.$ac_ext >&5
12361
12362 ac_cv_member_struct_sockaddr_sa_len=no
12363 fi
12364 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12365 fi
12366 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12367 fi
12368 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12369 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12370 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12371
12372 cat >>confdefs.h <<_ACEOF
12373 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12374 _ACEOF
12375
12376
12377 fi
12378
12379 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12380 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12381 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12382   echo $ECHO_N "(cached) $ECHO_C" >&6
12383 else
12384   cat >conftest.$ac_ext <<_ACEOF
12385 /* confdefs.h.  */
12386 _ACEOF
12387 cat confdefs.h >>conftest.$ac_ext
12388 cat >>conftest.$ac_ext <<_ACEOF
12389 /* end confdefs.h.  */
12390 #include <sys/types.h>
12391 #include <sys/socket.h>
12392 #include <netdb.h>
12393
12394
12395 int
12396 main ()
12397 {
12398 if ((struct addrinfo *) 0)
12399   return 0;
12400 if (sizeof (struct addrinfo))
12401   return 0;
12402   ;
12403   return 0;
12404 }
12405 _ACEOF
12406 rm -f conftest.$ac_objext
12407 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12408   (eval $ac_compile) 2>conftest.er1
12409   ac_status=$?
12410   grep -v '^ *+' conftest.er1 >conftest.err
12411   rm -f conftest.er1
12412   cat conftest.err >&5
12413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12414   (exit $ac_status); } &&
12415          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12417   (eval $ac_try) 2>&5
12418   ac_status=$?
12419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12420   (exit $ac_status); }; } &&
12421          { ac_try='test -s conftest.$ac_objext'
12422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12423   (eval $ac_try) 2>&5
12424   ac_status=$?
12425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12426   (exit $ac_status); }; }; then
12427   ac_cv_type_struct_addrinfo=yes
12428 else
12429   echo "$as_me: failed program was:" >&5
12430 sed 's/^/| /' conftest.$ac_ext >&5
12431
12432 ac_cv_type_struct_addrinfo=no
12433 fi
12434 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12435 fi
12436 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12437 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12438 if test $ac_cv_type_struct_addrinfo = yes; then
12439
12440 cat >>confdefs.h <<_ACEOF
12441 #define HAVE_STRUCT_ADDRINFO 1
12442 _ACEOF
12443
12444
12445 fi
12446
12447
12448 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12449 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12450 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12451   echo $ECHO_N "(cached) $ECHO_C" >&6
12452 else
12453   cat >conftest.$ac_ext <<_ACEOF
12454 /* confdefs.h.  */
12455 _ACEOF
12456 cat confdefs.h >>conftest.$ac_ext
12457 cat >>conftest.$ac_ext <<_ACEOF
12458 /* end confdefs.h.  */
12459 #include <sys/param.h>
12460 #include <sys/types.h>
12461 #include <sys/socket.h>
12462 #include <sys/ucred.h>
12463
12464 int
12465 main ()
12466 {
12467 if ((struct cmsgcred *) 0)
12468   return 0;
12469 if (sizeof (struct cmsgcred))
12470   return 0;
12471   ;
12472   return 0;
12473 }
12474 _ACEOF
12475 rm -f conftest.$ac_objext
12476 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12477   (eval $ac_compile) 2>conftest.er1
12478   ac_status=$?
12479   grep -v '^ *+' conftest.er1 >conftest.err
12480   rm -f conftest.er1
12481   cat conftest.err >&5
12482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12483   (exit $ac_status); } &&
12484          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12486   (eval $ac_try) 2>&5
12487   ac_status=$?
12488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12489   (exit $ac_status); }; } &&
12490          { ac_try='test -s conftest.$ac_objext'
12491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12492   (eval $ac_try) 2>&5
12493   ac_status=$?
12494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495   (exit $ac_status); }; }; then
12496   ac_cv_type_struct_cmsgcred=yes
12497 else
12498   echo "$as_me: failed program was:" >&5
12499 sed 's/^/| /' conftest.$ac_ext >&5
12500
12501 ac_cv_type_struct_cmsgcred=no
12502 fi
12503 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12504 fi
12505 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12506 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12507 if test $ac_cv_type_struct_cmsgcred = yes; then
12508
12509 cat >>confdefs.h <<_ACEOF
12510 #define HAVE_STRUCT_CMSGCRED 1
12511 _ACEOF
12512
12513
12514 fi
12515 echo "$as_me:$LINENO: checking for struct fcred" >&5
12516 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12517 if test "${ac_cv_type_struct_fcred+set}" = set; then
12518   echo $ECHO_N "(cached) $ECHO_C" >&6
12519 else
12520   cat >conftest.$ac_ext <<_ACEOF
12521 /* confdefs.h.  */
12522 _ACEOF
12523 cat confdefs.h >>conftest.$ac_ext
12524 cat >>conftest.$ac_ext <<_ACEOF
12525 /* end confdefs.h.  */
12526 #include <sys/param.h>
12527 #include <sys/types.h>
12528 #include <sys/socket.h>
12529 #include <sys/ucred.h>
12530
12531 int
12532 main ()
12533 {
12534 if ((struct fcred *) 0)
12535   return 0;
12536 if (sizeof (struct fcred))
12537   return 0;
12538   ;
12539   return 0;
12540 }
12541 _ACEOF
12542 rm -f conftest.$ac_objext
12543 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12544   (eval $ac_compile) 2>conftest.er1
12545   ac_status=$?
12546   grep -v '^ *+' conftest.er1 >conftest.err
12547   rm -f conftest.er1
12548   cat conftest.err >&5
12549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12550   (exit $ac_status); } &&
12551          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12553   (eval $ac_try) 2>&5
12554   ac_status=$?
12555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12556   (exit $ac_status); }; } &&
12557          { ac_try='test -s conftest.$ac_objext'
12558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12559   (eval $ac_try) 2>&5
12560   ac_status=$?
12561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12562   (exit $ac_status); }; }; then
12563   ac_cv_type_struct_fcred=yes
12564 else
12565   echo "$as_me: failed program was:" >&5
12566 sed 's/^/| /' conftest.$ac_ext >&5
12567
12568 ac_cv_type_struct_fcred=no
12569 fi
12570 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12571 fi
12572 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12573 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12574 if test $ac_cv_type_struct_fcred = yes; then
12575
12576 cat >>confdefs.h <<_ACEOF
12577 #define HAVE_STRUCT_FCRED 1
12578 _ACEOF
12579
12580
12581 fi
12582 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12583 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12584 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12585   echo $ECHO_N "(cached) $ECHO_C" >&6
12586 else
12587   cat >conftest.$ac_ext <<_ACEOF
12588 /* confdefs.h.  */
12589 _ACEOF
12590 cat confdefs.h >>conftest.$ac_ext
12591 cat >>conftest.$ac_ext <<_ACEOF
12592 /* end confdefs.h.  */
12593 #include <sys/param.h>
12594 #include <sys/types.h>
12595 #include <sys/socket.h>
12596 #include <sys/ucred.h>
12597
12598 int
12599 main ()
12600 {
12601 if ((struct sockcred *) 0)
12602   return 0;
12603 if (sizeof (struct sockcred))
12604   return 0;
12605   ;
12606   return 0;
12607 }
12608 _ACEOF
12609 rm -f conftest.$ac_objext
12610 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12611   (eval $ac_compile) 2>conftest.er1
12612   ac_status=$?
12613   grep -v '^ *+' conftest.er1 >conftest.err
12614   rm -f conftest.er1
12615   cat conftest.err >&5
12616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12617   (exit $ac_status); } &&
12618          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12620   (eval $ac_try) 2>&5
12621   ac_status=$?
12622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623   (exit $ac_status); }; } &&
12624          { ac_try='test -s conftest.$ac_objext'
12625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12626   (eval $ac_try) 2>&5
12627   ac_status=$?
12628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12629   (exit $ac_status); }; }; then
12630   ac_cv_type_struct_sockcred=yes
12631 else
12632   echo "$as_me: failed program was:" >&5
12633 sed 's/^/| /' conftest.$ac_ext >&5
12634
12635 ac_cv_type_struct_sockcred=no
12636 fi
12637 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12638 fi
12639 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12640 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12641 if test $ac_cv_type_struct_sockcred = yes; then
12642
12643 cat >>confdefs.h <<_ACEOF
12644 #define HAVE_STRUCT_SOCKCRED 1
12645 _ACEOF
12646
12647
12648 fi
12649
12650
12651 echo "$as_me:$LINENO: checking for struct option" >&5
12652 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12653 if test "${ac_cv_type_struct_option+set}" = set; then
12654   echo $ECHO_N "(cached) $ECHO_C" >&6
12655 else
12656   cat >conftest.$ac_ext <<_ACEOF
12657 /* confdefs.h.  */
12658 _ACEOF
12659 cat confdefs.h >>conftest.$ac_ext
12660 cat >>conftest.$ac_ext <<_ACEOF
12661 /* end confdefs.h.  */
12662 #ifdef HAVE_GETOPT_H
12663 #include <getopt.h>
12664 #endif
12665
12666 int
12667 main ()
12668 {
12669 if ((struct option *) 0)
12670   return 0;
12671 if (sizeof (struct option))
12672   return 0;
12673   ;
12674   return 0;
12675 }
12676 _ACEOF
12677 rm -f conftest.$ac_objext
12678 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12679   (eval $ac_compile) 2>conftest.er1
12680   ac_status=$?
12681   grep -v '^ *+' conftest.er1 >conftest.err
12682   rm -f conftest.er1
12683   cat conftest.err >&5
12684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12685   (exit $ac_status); } &&
12686          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12688   (eval $ac_try) 2>&5
12689   ac_status=$?
12690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691   (exit $ac_status); }; } &&
12692          { ac_try='test -s conftest.$ac_objext'
12693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12694   (eval $ac_try) 2>&5
12695   ac_status=$?
12696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12697   (exit $ac_status); }; }; then
12698   ac_cv_type_struct_option=yes
12699 else
12700   echo "$as_me: failed program was:" >&5
12701 sed 's/^/| /' conftest.$ac_ext >&5
12702
12703 ac_cv_type_struct_option=no
12704 fi
12705 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12706 fi
12707 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12708 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12709 if test $ac_cv_type_struct_option = yes; then
12710
12711 cat >>confdefs.h <<_ACEOF
12712 #define HAVE_STRUCT_OPTION 1
12713 _ACEOF
12714
12715
12716 fi
12717
12718
12719 if test "$with_zlib" = yes; then
12720   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12721   # did not).  While we could work around the lack of z_streamp, it
12722   # seems unwise to encourage people to use such old zlib versions...
12723   echo "$as_me:$LINENO: checking for z_streamp" >&5
12724 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12725 if test "${ac_cv_type_z_streamp+set}" = set; then
12726   echo $ECHO_N "(cached) $ECHO_C" >&6
12727 else
12728   cat >conftest.$ac_ext <<_ACEOF
12729 /* confdefs.h.  */
12730 _ACEOF
12731 cat confdefs.h >>conftest.$ac_ext
12732 cat >>conftest.$ac_ext <<_ACEOF
12733 /* end confdefs.h.  */
12734 #include <zlib.h>
12735
12736 int
12737 main ()
12738 {
12739 if ((z_streamp *) 0)
12740   return 0;
12741 if (sizeof (z_streamp))
12742   return 0;
12743   ;
12744   return 0;
12745 }
12746 _ACEOF
12747 rm -f conftest.$ac_objext
12748 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12749   (eval $ac_compile) 2>conftest.er1
12750   ac_status=$?
12751   grep -v '^ *+' conftest.er1 >conftest.err
12752   rm -f conftest.er1
12753   cat conftest.err >&5
12754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12755   (exit $ac_status); } &&
12756          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12758   (eval $ac_try) 2>&5
12759   ac_status=$?
12760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12761   (exit $ac_status); }; } &&
12762          { ac_try='test -s conftest.$ac_objext'
12763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12764   (eval $ac_try) 2>&5
12765   ac_status=$?
12766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12767   (exit $ac_status); }; }; then
12768   ac_cv_type_z_streamp=yes
12769 else
12770   echo "$as_me: failed program was:" >&5
12771 sed 's/^/| /' conftest.$ac_ext >&5
12772
12773 ac_cv_type_z_streamp=no
12774 fi
12775 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12776 fi
12777 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12778 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12779 if test $ac_cv_type_z_streamp = yes; then
12780   :
12781 else
12782   { { echo "$as_me:$LINENO: error: zlib version is too old
12783 Use --without-zlib to disable zlib support." >&5
12784 echo "$as_me: error: zlib version is too old
12785 Use --without-zlib to disable zlib support." >&2;}
12786    { (exit 1); exit 1; }; }
12787 fi
12788
12789 fi
12790
12791 if test "$with_krb5" = yes; then
12792 # Check for differences between MIT and Heimdal (KTH) releases
12793   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12794 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12795 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12796   echo $ECHO_N "(cached) $ECHO_C" >&6
12797 else
12798   cat >conftest.$ac_ext <<_ACEOF
12799 /* confdefs.h.  */
12800 _ACEOF
12801 cat confdefs.h >>conftest.$ac_ext
12802 cat >>conftest.$ac_ext <<_ACEOF
12803 /* end confdefs.h.  */
12804 #include <krb5.h>
12805
12806 int
12807 main ()
12808 {
12809 static krb5_ticket ac_aggr;
12810 if (ac_aggr.enc_part2)
12811 return 0;
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 rm -f conftest.$ac_objext
12817 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12818   (eval $ac_compile) 2>conftest.er1
12819   ac_status=$?
12820   grep -v '^ *+' conftest.er1 >conftest.err
12821   rm -f conftest.er1
12822   cat conftest.err >&5
12823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12824   (exit $ac_status); } &&
12825          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12827   (eval $ac_try) 2>&5
12828   ac_status=$?
12829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12830   (exit $ac_status); }; } &&
12831          { ac_try='test -s conftest.$ac_objext'
12832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12833   (eval $ac_try) 2>&5
12834   ac_status=$?
12835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12836   (exit $ac_status); }; }; then
12837   ac_cv_member_krb5_ticket_enc_part2=yes
12838 else
12839   echo "$as_me: failed program was:" >&5
12840 sed 's/^/| /' conftest.$ac_ext >&5
12841
12842 cat >conftest.$ac_ext <<_ACEOF
12843 /* confdefs.h.  */
12844 _ACEOF
12845 cat confdefs.h >>conftest.$ac_ext
12846 cat >>conftest.$ac_ext <<_ACEOF
12847 /* end confdefs.h.  */
12848 #include <krb5.h>
12849
12850 int
12851 main ()
12852 {
12853 static krb5_ticket ac_aggr;
12854 if (sizeof ac_aggr.enc_part2)
12855 return 0;
12856   ;
12857   return 0;
12858 }
12859 _ACEOF
12860 rm -f conftest.$ac_objext
12861 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12862   (eval $ac_compile) 2>conftest.er1
12863   ac_status=$?
12864   grep -v '^ *+' conftest.er1 >conftest.err
12865   rm -f conftest.er1
12866   cat conftest.err >&5
12867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868   (exit $ac_status); } &&
12869          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12871   (eval $ac_try) 2>&5
12872   ac_status=$?
12873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12874   (exit $ac_status); }; } &&
12875          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
12881   ac_cv_member_krb5_ticket_enc_part2=yes
12882 else
12883   echo "$as_me: failed program was:" >&5
12884 sed 's/^/| /' conftest.$ac_ext >&5
12885
12886 ac_cv_member_krb5_ticket_enc_part2=no
12887 fi
12888 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12889 fi
12890 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12891 fi
12892 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12893 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12894 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12895
12896 cat >>confdefs.h <<_ACEOF
12897 #define HAVE_KRB5_TICKET_ENC_PART2 1
12898 _ACEOF
12899
12900
12901 else
12902   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12903 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12904 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12905   echo $ECHO_N "(cached) $ECHO_C" >&6
12906 else
12907   cat >conftest.$ac_ext <<_ACEOF
12908 /* confdefs.h.  */
12909 _ACEOF
12910 cat confdefs.h >>conftest.$ac_ext
12911 cat >>conftest.$ac_ext <<_ACEOF
12912 /* end confdefs.h.  */
12913 #include <krb5.h>
12914
12915 int
12916 main ()
12917 {
12918 static krb5_ticket ac_aggr;
12919 if (ac_aggr.client)
12920 return 0;
12921   ;
12922   return 0;
12923 }
12924 _ACEOF
12925 rm -f conftest.$ac_objext
12926 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12927   (eval $ac_compile) 2>conftest.er1
12928   ac_status=$?
12929   grep -v '^ *+' conftest.er1 >conftest.err
12930   rm -f conftest.er1
12931   cat conftest.err >&5
12932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12933   (exit $ac_status); } &&
12934          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12936   (eval $ac_try) 2>&5
12937   ac_status=$?
12938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12939   (exit $ac_status); }; } &&
12940          { ac_try='test -s conftest.$ac_objext'
12941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12942   (eval $ac_try) 2>&5
12943   ac_status=$?
12944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12945   (exit $ac_status); }; }; then
12946   ac_cv_member_krb5_ticket_client=yes
12947 else
12948   echo "$as_me: failed program was:" >&5
12949 sed 's/^/| /' conftest.$ac_ext >&5
12950
12951 cat >conftest.$ac_ext <<_ACEOF
12952 /* confdefs.h.  */
12953 _ACEOF
12954 cat confdefs.h >>conftest.$ac_ext
12955 cat >>conftest.$ac_ext <<_ACEOF
12956 /* end confdefs.h.  */
12957 #include <krb5.h>
12958
12959 int
12960 main ()
12961 {
12962 static krb5_ticket ac_aggr;
12963 if (sizeof ac_aggr.client)
12964 return 0;
12965   ;
12966   return 0;
12967 }
12968 _ACEOF
12969 rm -f conftest.$ac_objext
12970 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12971   (eval $ac_compile) 2>conftest.er1
12972   ac_status=$?
12973   grep -v '^ *+' conftest.er1 >conftest.err
12974   rm -f conftest.er1
12975   cat conftest.err >&5
12976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12977   (exit $ac_status); } &&
12978          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
12979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12980   (eval $ac_try) 2>&5
12981   ac_status=$?
12982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12983   (exit $ac_status); }; } &&
12984          { ac_try='test -s conftest.$ac_objext'
12985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12986   (eval $ac_try) 2>&5
12987   ac_status=$?
12988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12989   (exit $ac_status); }; }; then
12990   ac_cv_member_krb5_ticket_client=yes
12991 else
12992   echo "$as_me: failed program was:" >&5
12993 sed 's/^/| /' conftest.$ac_ext >&5
12994
12995 ac_cv_member_krb5_ticket_client=no
12996 fi
12997 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12998 fi
12999 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13000 fi
13001 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13002 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13003 if test $ac_cv_member_krb5_ticket_client = yes; then
13004
13005 cat >>confdefs.h <<_ACEOF
13006 #define HAVE_KRB5_TICKET_CLIENT 1
13007 _ACEOF
13008
13009
13010 else
13011   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13012 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13013    { (exit 1); exit 1; }; }
13014 fi
13015
13016 fi
13017
13018   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13019 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13020 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13021   echo $ECHO_N "(cached) $ECHO_C" >&6
13022 else
13023   cat >conftest.$ac_ext <<_ACEOF
13024 /* confdefs.h.  */
13025 _ACEOF
13026 cat confdefs.h >>conftest.$ac_ext
13027 cat >>conftest.$ac_ext <<_ACEOF
13028 /* end confdefs.h.  */
13029 #include <krb5.h>
13030
13031 int
13032 main ()
13033 {
13034 static krb5_error ac_aggr;
13035 if (ac_aggr.text.data)
13036 return 0;
13037   ;
13038   return 0;
13039 }
13040 _ACEOF
13041 rm -f conftest.$ac_objext
13042 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13043   (eval $ac_compile) 2>conftest.er1
13044   ac_status=$?
13045   grep -v '^ *+' conftest.er1 >conftest.err
13046   rm -f conftest.er1
13047   cat conftest.err >&5
13048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13049   (exit $ac_status); } &&
13050          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13052   (eval $ac_try) 2>&5
13053   ac_status=$?
13054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13055   (exit $ac_status); }; } &&
13056          { ac_try='test -s conftest.$ac_objext'
13057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13058   (eval $ac_try) 2>&5
13059   ac_status=$?
13060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13061   (exit $ac_status); }; }; then
13062   ac_cv_member_krb5_error_text_data=yes
13063 else
13064   echo "$as_me: failed program was:" >&5
13065 sed 's/^/| /' conftest.$ac_ext >&5
13066
13067 cat >conftest.$ac_ext <<_ACEOF
13068 /* confdefs.h.  */
13069 _ACEOF
13070 cat confdefs.h >>conftest.$ac_ext
13071 cat >>conftest.$ac_ext <<_ACEOF
13072 /* end confdefs.h.  */
13073 #include <krb5.h>
13074
13075 int
13076 main ()
13077 {
13078 static krb5_error ac_aggr;
13079 if (sizeof ac_aggr.text.data)
13080 return 0;
13081   ;
13082   return 0;
13083 }
13084 _ACEOF
13085 rm -f conftest.$ac_objext
13086 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13087   (eval $ac_compile) 2>conftest.er1
13088   ac_status=$?
13089   grep -v '^ *+' conftest.er1 >conftest.err
13090   rm -f conftest.er1
13091   cat conftest.err >&5
13092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13093   (exit $ac_status); } &&
13094          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13096   (eval $ac_try) 2>&5
13097   ac_status=$?
13098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099   (exit $ac_status); }; } &&
13100          { ac_try='test -s conftest.$ac_objext'
13101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13102   (eval $ac_try) 2>&5
13103   ac_status=$?
13104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13105   (exit $ac_status); }; }; then
13106   ac_cv_member_krb5_error_text_data=yes
13107 else
13108   echo "$as_me: failed program was:" >&5
13109 sed 's/^/| /' conftest.$ac_ext >&5
13110
13111 ac_cv_member_krb5_error_text_data=no
13112 fi
13113 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13114 fi
13115 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13116 fi
13117 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13118 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13119 if test $ac_cv_member_krb5_error_text_data = yes; then
13120
13121 cat >>confdefs.h <<_ACEOF
13122 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13123 _ACEOF
13124
13125
13126 else
13127   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13128 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13129 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13130   echo $ECHO_N "(cached) $ECHO_C" >&6
13131 else
13132   cat >conftest.$ac_ext <<_ACEOF
13133 /* confdefs.h.  */
13134 _ACEOF
13135 cat confdefs.h >>conftest.$ac_ext
13136 cat >>conftest.$ac_ext <<_ACEOF
13137 /* end confdefs.h.  */
13138 #include <krb5.h>
13139
13140 int
13141 main ()
13142 {
13143 static krb5_error ac_aggr;
13144 if (ac_aggr.e_data)
13145 return 0;
13146   ;
13147   return 0;
13148 }
13149 _ACEOF
13150 rm -f conftest.$ac_objext
13151 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13152   (eval $ac_compile) 2>conftest.er1
13153   ac_status=$?
13154   grep -v '^ *+' conftest.er1 >conftest.err
13155   rm -f conftest.er1
13156   cat conftest.err >&5
13157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13158   (exit $ac_status); } &&
13159          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13161   (eval $ac_try) 2>&5
13162   ac_status=$?
13163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13164   (exit $ac_status); }; } &&
13165          { ac_try='test -s conftest.$ac_objext'
13166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13167   (eval $ac_try) 2>&5
13168   ac_status=$?
13169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13170   (exit $ac_status); }; }; then
13171   ac_cv_member_krb5_error_e_data=yes
13172 else
13173   echo "$as_me: failed program was:" >&5
13174 sed 's/^/| /' conftest.$ac_ext >&5
13175
13176 cat >conftest.$ac_ext <<_ACEOF
13177 /* confdefs.h.  */
13178 _ACEOF
13179 cat confdefs.h >>conftest.$ac_ext
13180 cat >>conftest.$ac_ext <<_ACEOF
13181 /* end confdefs.h.  */
13182 #include <krb5.h>
13183
13184 int
13185 main ()
13186 {
13187 static krb5_error ac_aggr;
13188 if (sizeof ac_aggr.e_data)
13189 return 0;
13190   ;
13191   return 0;
13192 }
13193 _ACEOF
13194 rm -f conftest.$ac_objext
13195 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13196   (eval $ac_compile) 2>conftest.er1
13197   ac_status=$?
13198   grep -v '^ *+' conftest.er1 >conftest.err
13199   rm -f conftest.er1
13200   cat conftest.err >&5
13201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13202   (exit $ac_status); } &&
13203          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13205   (eval $ac_try) 2>&5
13206   ac_status=$?
13207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13208   (exit $ac_status); }; } &&
13209          { ac_try='test -s conftest.$ac_objext'
13210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13211   (eval $ac_try) 2>&5
13212   ac_status=$?
13213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214   (exit $ac_status); }; }; then
13215   ac_cv_member_krb5_error_e_data=yes
13216 else
13217   echo "$as_me: failed program was:" >&5
13218 sed 's/^/| /' conftest.$ac_ext >&5
13219
13220 ac_cv_member_krb5_error_e_data=no
13221 fi
13222 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13223 fi
13224 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13225 fi
13226 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13227 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13228 if test $ac_cv_member_krb5_error_e_data = yes; then
13229
13230 cat >>confdefs.h <<_ACEOF
13231 #define HAVE_KRB5_ERROR_E_DATA 1
13232 _ACEOF
13233
13234
13235 else
13236   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13237 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13238    { (exit 1); exit 1; }; }
13239 fi
13240
13241 fi
13242
13243 fi
13244
13245 # This is probably only present on Darwin, but may as well check always
13246 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
13247 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
13248 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
13249   echo $ECHO_N "(cached) $ECHO_C" >&6
13250 else
13251   cat >conftest.$ac_ext <<_ACEOF
13252 /* confdefs.h.  */
13253 _ACEOF
13254 cat confdefs.h >>conftest.$ac_ext
13255 cat >>conftest.$ac_ext <<_ACEOF
13256 /* end confdefs.h.  */
13257 #include <fcntl.h>
13258
13259 int
13260 main ()
13261 {
13262 #ifndef F_FULLFSYNC
13263   char *p = (char *) F_FULLFSYNC;
13264 #endif
13265
13266   ;
13267   return 0;
13268 }
13269 _ACEOF
13270 rm -f conftest.$ac_objext
13271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13272   (eval $ac_compile) 2>conftest.er1
13273   ac_status=$?
13274   grep -v '^ *+' conftest.er1 >conftest.err
13275   rm -f conftest.er1
13276   cat conftest.err >&5
13277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278   (exit $ac_status); } &&
13279          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13281   (eval $ac_try) 2>&5
13282   ac_status=$?
13283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13284   (exit $ac_status); }; } &&
13285          { ac_try='test -s conftest.$ac_objext'
13286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13287   (eval $ac_try) 2>&5
13288   ac_status=$?
13289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13290   (exit $ac_status); }; }; then
13291   ac_cv_have_decl_F_FULLFSYNC=yes
13292 else
13293   echo "$as_me: failed program was:" >&5
13294 sed 's/^/| /' conftest.$ac_ext >&5
13295
13296 ac_cv_have_decl_F_FULLFSYNC=no
13297 fi
13298 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13299 fi
13300 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
13301 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
13302 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
13303
13304 cat >>confdefs.h <<_ACEOF
13305 #define HAVE_DECL_F_FULLFSYNC 1
13306 _ACEOF
13307
13308
13309 else
13310   cat >>confdefs.h <<_ACEOF
13311 #define HAVE_DECL_F_FULLFSYNC 0
13312 _ACEOF
13313
13314
13315 fi
13316
13317
13318
13319 ##
13320 ## Functions, global variables
13321 ##
13322
13323 echo "$as_me:$LINENO: checking for int timezone" >&5
13324 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13325 if test "${pgac_cv_var_int_timezone+set}" = set; then
13326   echo $ECHO_N "(cached) $ECHO_C" >&6
13327 else
13328   cat >conftest.$ac_ext <<_ACEOF
13329 /* confdefs.h.  */
13330 _ACEOF
13331 cat confdefs.h >>conftest.$ac_ext
13332 cat >>conftest.$ac_ext <<_ACEOF
13333 /* end confdefs.h.  */
13334 #include <time.h>
13335 int res;
13336 int
13337 main ()
13338 {
13339 #ifndef __CYGWIN__
13340 res = timezone / 60;
13341 #else
13342 res = _timezone / 60;
13343 #endif
13344   ;
13345   return 0;
13346 }
13347 _ACEOF
13348 rm -f conftest.$ac_objext conftest$ac_exeext
13349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13350   (eval $ac_link) 2>conftest.er1
13351   ac_status=$?
13352   grep -v '^ *+' conftest.er1 >conftest.err
13353   rm -f conftest.er1
13354   cat conftest.err >&5
13355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13356   (exit $ac_status); } &&
13357          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13359   (eval $ac_try) 2>&5
13360   ac_status=$?
13361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13362   (exit $ac_status); }; } &&
13363          { ac_try='test -s conftest$ac_exeext'
13364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13365   (eval $ac_try) 2>&5
13366   ac_status=$?
13367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13368   (exit $ac_status); }; }; then
13369   pgac_cv_var_int_timezone=yes
13370 else
13371   echo "$as_me: failed program was:" >&5
13372 sed 's/^/| /' conftest.$ac_ext >&5
13373
13374 pgac_cv_var_int_timezone=no
13375 fi
13376 rm -f conftest.err conftest.$ac_objext \
13377       conftest$ac_exeext conftest.$ac_ext
13378 fi
13379 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13380 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13381 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13382
13383 cat >>confdefs.h <<\_ACEOF
13384 #define HAVE_INT_TIMEZONE
13385 _ACEOF
13386
13387 fi
13388 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13389 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13390  if test "${ac_cv_func_accept_return+set}" = set; then
13391   echo $ECHO_N "(cached) $ECHO_C" >&6
13392 else
13393    if test "${ac_cv_func_accept_arg1+set}" = set; then
13394   echo $ECHO_N "(cached) $ECHO_C" >&6
13395 else
13396     if test "${ac_cv_func_accept_arg2+set}" = set; then
13397   echo $ECHO_N "(cached) $ECHO_C" >&6
13398 else
13399      if test "${ac_cv_func_accept_arg3+set}" = set; then
13400   echo $ECHO_N "(cached) $ECHO_C" >&6
13401 else
13402       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13403       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13404        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13405         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13406          cat >conftest.$ac_ext <<_ACEOF
13407 /* confdefs.h.  */
13408 _ACEOF
13409 cat confdefs.h >>conftest.$ac_ext
13410 cat >>conftest.$ac_ext <<_ACEOF
13411 /* end confdefs.h.  */
13412 #ifdef HAVE_SYS_TYPES_H
13413 #include <sys/types.h>
13414 #endif
13415 #ifdef HAVE_SYS_SOCKET_H
13416 #include <sys/socket.h>
13417 #endif
13418 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13419 int
13420 main ()
13421 {
13422
13423   ;
13424   return 0;
13425 }
13426 _ACEOF
13427 rm -f conftest.$ac_objext
13428 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13429   (eval $ac_compile) 2>conftest.er1
13430   ac_status=$?
13431   grep -v '^ *+' conftest.er1 >conftest.err
13432   rm -f conftest.er1
13433   cat conftest.err >&5
13434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435   (exit $ac_status); } &&
13436          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13438   (eval $ac_try) 2>&5
13439   ac_status=$?
13440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13441   (exit $ac_status); }; } &&
13442          { ac_try='test -s conftest.$ac_objext'
13443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13444   (eval $ac_try) 2>&5
13445   ac_status=$?
13446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13447   (exit $ac_status); }; }; then
13448   ac_not_found=no; break 4
13449 else
13450   echo "$as_me: failed program was:" >&5
13451 sed 's/^/| /' conftest.$ac_ext >&5
13452
13453 ac_not_found=yes
13454 fi
13455 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13456        done
13457       done
13458      done
13459     done
13460     if test "$ac_not_found" = yes; then
13461       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13462 echo "$as_me: error: could not determine argument types" >&2;}
13463    { (exit 1); exit 1; }; }
13464     fi
13465     if test "$ac_cv_func_accept_arg3" = "void"; then
13466       ac_cv_func_accept_arg3=int
13467     fi
13468
13469 fi
13470
13471 fi
13472
13473 fi
13474
13475 fi
13476  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
13477 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13478
13479 cat >>confdefs.h <<_ACEOF
13480 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13481 _ACEOF
13482
13483
13484 cat >>confdefs.h <<_ACEOF
13485 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13486 _ACEOF
13487
13488
13489 cat >>confdefs.h <<_ACEOF
13490 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13491 _ACEOF
13492
13493
13494 cat >>confdefs.h <<_ACEOF
13495 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13496 _ACEOF
13497
13498
13499 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13500 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13501 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13502   echo $ECHO_N "(cached) $ECHO_C" >&6
13503 else
13504   cat >conftest.$ac_ext <<_ACEOF
13505 /* confdefs.h.  */
13506 _ACEOF
13507 cat confdefs.h >>conftest.$ac_ext
13508 cat >>conftest.$ac_ext <<_ACEOF
13509 /* end confdefs.h.  */
13510 #include <sys/time.h>
13511 int
13512 main ()
13513 {
13514 struct timeval *tp;
13515 struct timezone *tzp;
13516 gettimeofday(tp,tzp);
13517   ;
13518   return 0;
13519 }
13520 _ACEOF
13521 rm -f conftest.$ac_objext
13522 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13523   (eval $ac_compile) 2>conftest.er1
13524   ac_status=$?
13525   grep -v '^ *+' conftest.er1 >conftest.err
13526   rm -f conftest.er1
13527   cat conftest.err >&5
13528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13529   (exit $ac_status); } &&
13530          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13532   (eval $ac_try) 2>&5
13533   ac_status=$?
13534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13535   (exit $ac_status); }; } &&
13536          { ac_try='test -s conftest.$ac_objext'
13537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13538   (eval $ac_try) 2>&5
13539   ac_status=$?
13540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13541   (exit $ac_status); }; }; then
13542   pgac_cv_func_gettimeofday_1arg=no
13543 else
13544   echo "$as_me: failed program was:" >&5
13545 sed 's/^/| /' conftest.$ac_ext >&5
13546
13547 pgac_cv_func_gettimeofday_1arg=yes
13548 fi
13549 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13550 fi
13551 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13552 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13553 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13554
13555 cat >>confdefs.h <<\_ACEOF
13556 #define GETTIMEOFDAY_1ARG
13557 _ACEOF
13558
13559 fi
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13583 do
13584 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13585 echo "$as_me:$LINENO: checking for $ac_func" >&5
13586 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13587 if eval "test \"\${$as_ac_var+set}\" = set"; then
13588   echo $ECHO_N "(cached) $ECHO_C" >&6
13589 else
13590   cat >conftest.$ac_ext <<_ACEOF
13591 /* confdefs.h.  */
13592 _ACEOF
13593 cat confdefs.h >>conftest.$ac_ext
13594 cat >>conftest.$ac_ext <<_ACEOF
13595 /* end confdefs.h.  */
13596 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13597    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13598 #define $ac_func innocuous_$ac_func
13599
13600 /* System header to define __stub macros and hopefully few prototypes,
13601     which can conflict with char $ac_func (); below.
13602     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13603     <limits.h> exists even on freestanding compilers.  */
13604
13605 #ifdef __STDC__
13606 # include <limits.h>
13607 #else
13608 # include <assert.h>
13609 #endif
13610
13611 #undef $ac_func
13612
13613 /* Override any gcc2 internal prototype to avoid an error.  */
13614 #ifdef __cplusplus
13615 extern "C"
13616 {
13617 #endif
13618 /* We use char because int might match the return type of a gcc2
13619    builtin and then its argument prototype would still apply.  */
13620 char $ac_func ();
13621 /* The GNU C library defines this for functions which it implements
13622     to always fail with ENOSYS.  Some functions are actually named
13623     something starting with __ and the normal name is an alias.  */
13624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13625 choke me
13626 #else
13627 char (*f) () = $ac_func;
13628 #endif
13629 #ifdef __cplusplus
13630 }
13631 #endif
13632
13633 int
13634 main ()
13635 {
13636 return f != $ac_func;
13637   ;
13638   return 0;
13639 }
13640 _ACEOF
13641 rm -f conftest.$ac_objext conftest$ac_exeext
13642 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13643   (eval $ac_link) 2>conftest.er1
13644   ac_status=$?
13645   grep -v '^ *+' conftest.er1 >conftest.err
13646   rm -f conftest.er1
13647   cat conftest.err >&5
13648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13649   (exit $ac_status); } &&
13650          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13652   (eval $ac_try) 2>&5
13653   ac_status=$?
13654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13655   (exit $ac_status); }; } &&
13656          { ac_try='test -s conftest$ac_exeext'
13657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13658   (eval $ac_try) 2>&5
13659   ac_status=$?
13660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661   (exit $ac_status); }; }; then
13662   eval "$as_ac_var=yes"
13663 else
13664   echo "$as_me: failed program was:" >&5
13665 sed 's/^/| /' conftest.$ac_ext >&5
13666
13667 eval "$as_ac_var=no"
13668 fi
13669 rm -f conftest.err conftest.$ac_objext \
13670       conftest$ac_exeext conftest.$ac_ext
13671 fi
13672 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13673 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13674 if test `eval echo '${'$as_ac_var'}'` = yes; then
13675   cat >>confdefs.h <<_ACEOF
13676 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13677 _ACEOF
13678
13679 fi
13680 done
13681
13682
13683 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13684 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13685 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13686   echo $ECHO_N "(cached) $ECHO_C" >&6
13687 else
13688   cat >conftest.$ac_ext <<_ACEOF
13689 /* confdefs.h.  */
13690 _ACEOF
13691 cat confdefs.h >>conftest.$ac_ext
13692 cat >>conftest.$ac_ext <<_ACEOF
13693 /* end confdefs.h.  */
13694 #include <unistd.h>
13695
13696 int
13697 main ()
13698 {
13699 #ifndef fdatasync
13700   char *p = (char *) fdatasync;
13701 #endif
13702
13703   ;
13704   return 0;
13705 }
13706 _ACEOF
13707 rm -f conftest.$ac_objext
13708 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13709   (eval $ac_compile) 2>conftest.er1
13710   ac_status=$?
13711   grep -v '^ *+' conftest.er1 >conftest.err
13712   rm -f conftest.er1
13713   cat conftest.err >&5
13714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13715   (exit $ac_status); } &&
13716          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13718   (eval $ac_try) 2>&5
13719   ac_status=$?
13720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13721   (exit $ac_status); }; } &&
13722          { ac_try='test -s conftest.$ac_objext'
13723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13724   (eval $ac_try) 2>&5
13725   ac_status=$?
13726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13727   (exit $ac_status); }; }; then
13728   ac_cv_have_decl_fdatasync=yes
13729 else
13730   echo "$as_me: failed program was:" >&5
13731 sed 's/^/| /' conftest.$ac_ext >&5
13732
13733 ac_cv_have_decl_fdatasync=no
13734 fi
13735 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13736 fi
13737 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13738 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13739 if test $ac_cv_have_decl_fdatasync = yes; then
13740
13741 cat >>confdefs.h <<_ACEOF
13742 #define HAVE_DECL_FDATASYNC 1
13743 _ACEOF
13744
13745
13746 else
13747   cat >>confdefs.h <<_ACEOF
13748 #define HAVE_DECL_FDATASYNC 0
13749 _ACEOF
13750
13751
13752 fi
13753
13754
13755 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13756 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13757 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13758   echo $ECHO_N "(cached) $ECHO_C" >&6
13759 else
13760   cat >conftest.$ac_ext <<_ACEOF
13761 /* confdefs.h.  */
13762 _ACEOF
13763 cat confdefs.h >>conftest.$ac_ext
13764 cat >>conftest.$ac_ext <<_ACEOF
13765 /* end confdefs.h.  */
13766 #include <fcntl.h>
13767
13768 int
13769 main ()
13770 {
13771 #ifndef posix_fadvise
13772   char *p = (char *) posix_fadvise;
13773 #endif
13774
13775   ;
13776   return 0;
13777 }
13778 _ACEOF
13779 rm -f conftest.$ac_objext
13780 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13781   (eval $ac_compile) 2>conftest.er1
13782   ac_status=$?
13783   grep -v '^ *+' conftest.er1 >conftest.err
13784   rm -f conftest.er1
13785   cat conftest.err >&5
13786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13787   (exit $ac_status); } &&
13788          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13790   (eval $ac_try) 2>&5
13791   ac_status=$?
13792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13793   (exit $ac_status); }; } &&
13794          { ac_try='test -s conftest.$ac_objext'
13795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13796   (eval $ac_try) 2>&5
13797   ac_status=$?
13798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13799   (exit $ac_status); }; }; then
13800   ac_cv_have_decl_posix_fadvise=yes
13801 else
13802   echo "$as_me: failed program was:" >&5
13803 sed 's/^/| /' conftest.$ac_ext >&5
13804
13805 ac_cv_have_decl_posix_fadvise=no
13806 fi
13807 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13808 fi
13809 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
13810 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
13811 if test $ac_cv_have_decl_posix_fadvise = yes; then
13812
13813 cat >>confdefs.h <<_ACEOF
13814 #define HAVE_DECL_POSIX_FADVISE 1
13815 _ACEOF
13816
13817
13818 else
13819   cat >>confdefs.h <<_ACEOF
13820 #define HAVE_DECL_POSIX_FADVISE 0
13821 _ACEOF
13822
13823
13824 fi
13825
13826
13827
13828 HAVE_IPV6=no
13829 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13830 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13831 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13832   echo $ECHO_N "(cached) $ECHO_C" >&6
13833 else
13834   cat >conftest.$ac_ext <<_ACEOF
13835 /* confdefs.h.  */
13836 _ACEOF
13837 cat confdefs.h >>conftest.$ac_ext
13838 cat >>conftest.$ac_ext <<_ACEOF
13839 /* end confdefs.h.  */
13840 $ac_includes_default
13841 #include <netinet/in.h>
13842
13843 int
13844 main ()
13845 {
13846 if ((struct sockaddr_in6 *) 0)
13847   return 0;
13848 if (sizeof (struct sockaddr_in6))
13849   return 0;
13850   ;
13851   return 0;
13852 }
13853 _ACEOF
13854 rm -f conftest.$ac_objext
13855 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13856   (eval $ac_compile) 2>conftest.er1
13857   ac_status=$?
13858   grep -v '^ *+' conftest.er1 >conftest.err
13859   rm -f conftest.er1
13860   cat conftest.err >&5
13861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13862   (exit $ac_status); } &&
13863          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13865   (eval $ac_try) 2>&5
13866   ac_status=$?
13867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13868   (exit $ac_status); }; } &&
13869          { ac_try='test -s conftest.$ac_objext'
13870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13871   (eval $ac_try) 2>&5
13872   ac_status=$?
13873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13874   (exit $ac_status); }; }; then
13875   ac_cv_type_struct_sockaddr_in6=yes
13876 else
13877   echo "$as_me: failed program was:" >&5
13878 sed 's/^/| /' conftest.$ac_ext >&5
13879
13880 ac_cv_type_struct_sockaddr_in6=no
13881 fi
13882 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13883 fi
13884 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13885 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13886 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13887
13888 cat >>confdefs.h <<\_ACEOF
13889 #define HAVE_IPV6 1
13890 _ACEOF
13891
13892          HAVE_IPV6=yes
13893 fi
13894
13895
13896
13897 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13898 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13899 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13900   echo $ECHO_N "(cached) $ECHO_C" >&6
13901 else
13902   cat >conftest.$ac_ext <<_ACEOF
13903 /* confdefs.h.  */
13904 _ACEOF
13905 cat confdefs.h >>conftest.$ac_ext
13906 cat >>conftest.$ac_ext <<_ACEOF
13907 /* end confdefs.h.  */
13908 #include <machine/vmparam.h>
13909 #include <sys/exec.h>
13910
13911 int
13912 main ()
13913 {
13914 PS_STRINGS->ps_nargvstr = 1;
13915 PS_STRINGS->ps_argvstr = "foo";
13916   ;
13917   return 0;
13918 }
13919 _ACEOF
13920 rm -f conftest.$ac_objext conftest$ac_exeext
13921 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13922   (eval $ac_link) 2>conftest.er1
13923   ac_status=$?
13924   grep -v '^ *+' conftest.er1 >conftest.err
13925   rm -f conftest.er1
13926   cat conftest.err >&5
13927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13928   (exit $ac_status); } &&
13929          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
13930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13931   (eval $ac_try) 2>&5
13932   ac_status=$?
13933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13934   (exit $ac_status); }; } &&
13935          { ac_try='test -s conftest$ac_exeext'
13936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13937   (eval $ac_try) 2>&5
13938   ac_status=$?
13939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13940   (exit $ac_status); }; }; then
13941   pgac_cv_var_PS_STRINGS=yes
13942 else
13943   echo "$as_me: failed program was:" >&5
13944 sed 's/^/| /' conftest.$ac_ext >&5
13945
13946 pgac_cv_var_PS_STRINGS=no
13947 fi
13948 rm -f conftest.err conftest.$ac_objext \
13949       conftest$ac_exeext conftest.$ac_ext
13950 fi
13951 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13952 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13953 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13954
13955 cat >>confdefs.h <<\_ACEOF
13956 #define HAVE_PS_STRINGS
13957 _ACEOF
13958
13959 fi
13960
13961
13962 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13963 # is missing.  Yes, there are machines that have only one.  We may
13964 # also decide to use snprintf.c if snprintf() is present but does not
13965 # have all the features we need --- see below.
13966
13967 if test "$PORTNAME" = "win32"; then
13968   # Win32 gets snprintf.c built unconditionally.
13969   #
13970   # To properly translate all NLS languages strings, we must support the
13971   # *printf() %$ format, which allows *printf() arguments to be selected
13972   # by position in the translated string.
13973   #
13974   # libintl versions < 0.13 use the native *printf() functions, and Win32
13975   # *printf() doesn't understand %$, so we must use our /port versions,
13976   # which do understand %$. libintl versions >= 0.13 include their own
13977   # *printf versions on Win32.  The libintl 0.13 release note text is:
13978   #
13979   #   C format strings with positions, as they arise when a translator
13980   #   needs to reorder a sentence, are now supported on all platforms.
13981   #   On those few platforms (NetBSD and Woe32) for which the native
13982   #   printf()/fprintf()/... functions don't support such format
13983   #   strings, replacements are provided through <libintl.h>.
13984   #
13985   # We could use libintl >= 0.13's *printf() if we were sure that we had
13986   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13987   # to guarantee that, it is best to just use our own, so we are sure to
13988   # get %$ support. In include/port.h we disable the *printf() macros
13989   # that might have been defined by libintl.
13990   #
13991   # We do this unconditionally whether NLS is used or not so we are sure
13992   # that all Win32 libraries and binaries behave the same.
13993   pgac_need_repl_snprintf=yes
13994 else
13995   pgac_need_repl_snprintf=no
13996
13997 for ac_func in snprintf
13998 do
13999 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14000 echo "$as_me:$LINENO: checking for $ac_func" >&5
14001 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14002 if eval "test \"\${$as_ac_var+set}\" = set"; then
14003   echo $ECHO_N "(cached) $ECHO_C" >&6
14004 else
14005   cat >conftest.$ac_ext <<_ACEOF
14006 /* confdefs.h.  */
14007 _ACEOF
14008 cat confdefs.h >>conftest.$ac_ext
14009 cat >>conftest.$ac_ext <<_ACEOF
14010 /* end confdefs.h.  */
14011 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14012    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14013 #define $ac_func innocuous_$ac_func
14014
14015 /* System header to define __stub macros and hopefully few prototypes,
14016     which can conflict with char $ac_func (); below.
14017     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14018     <limits.h> exists even on freestanding compilers.  */
14019
14020 #ifdef __STDC__
14021 # include <limits.h>
14022 #else
14023 # include <assert.h>
14024 #endif
14025
14026 #undef $ac_func
14027
14028 /* Override any gcc2 internal prototype to avoid an error.  */
14029 #ifdef __cplusplus
14030 extern "C"
14031 {
14032 #endif
14033 /* We use char because int might match the return type of a gcc2
14034    builtin and then its argument prototype would still apply.  */
14035 char $ac_func ();
14036 /* The GNU C library defines this for functions which it implements
14037     to always fail with ENOSYS.  Some functions are actually named
14038     something starting with __ and the normal name is an alias.  */
14039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14040 choke me
14041 #else
14042 char (*f) () = $ac_func;
14043 #endif
14044 #ifdef __cplusplus
14045 }
14046 #endif
14047
14048 int
14049 main ()
14050 {
14051 return f != $ac_func;
14052   ;
14053   return 0;
14054 }
14055 _ACEOF
14056 rm -f conftest.$ac_objext conftest$ac_exeext
14057 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14058   (eval $ac_link) 2>conftest.er1
14059   ac_status=$?
14060   grep -v '^ *+' conftest.er1 >conftest.err
14061   rm -f conftest.er1
14062   cat conftest.err >&5
14063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064   (exit $ac_status); } &&
14065          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
14066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14067   (eval $ac_try) 2>&5
14068   ac_status=$?
14069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14070   (exit $ac_status); }; } &&
14071          { ac_try='test -s conftest$ac_exeext'
14072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14073   (eval $ac_try) 2>&5
14074   ac_status=$?
14075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14076   (exit $ac_status); }; }; then
14077   eval "$as_ac_var=yes"
14078 else
14079   echo "$as_me: failed program was:" >&5
14080 sed 's/^/| /' conftest.$ac_ext >&5
14081
14082 eval "$as_ac_var=no"
14083 fi
14084 rm -f conftest.err conftest.$ac_objext \
14085       conftest$ac_exeext conftest.$ac_ext
14086 fi
14087 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14088 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14089 if test `eval echo '${'$as_ac_var'}'` = yes; then
14090   cat >>confdefs.h <<_ACEOF
14091 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14092 _ACEOF
14093
14094 else
14095   pgac_need_repl_snprintf=yes
14096 fi
14097 done
14098
14099
14100 for ac_func in vsnprintf
14101 do
14102 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14103 echo "$as_me:$LINENO: checking for $ac_func" >&5
14104 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14105 if eval "test \"\${$as_ac_var+set}\" = set"; then
14106   echo $ECHO_N "(cached) $ECHO_C" >&6
14107 else
14108   cat >conftest.$ac_ext <<_ACEOF
14109 /* confdefs.h.  */
14110 _ACEOF
14111 cat confdefs.h >>conftest.$ac_ext
14112 cat >>conftest.$ac_ext <<_ACEOF
14113 /* end confdefs.h.  */
14114 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14115    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14116 #define $ac_func innocuous_$ac_func
14117
14118 /* System header to define __stub macros and hopefully few prototypes,
14119     which can conflict with char $ac_func (); below.
14120     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14121     <limits.h> exists even on freestanding compilers.  */
14122
14123 #ifdef __STDC__
14124 # include <limits.h>
14125 #else
14126 # include <assert.h>
14127 #endif
14128
14129 #undef $ac_func
14130
14131 /* Override any gcc2 internal prototype to avoid an error.  */
14132 #ifdef __cplusplus
14133 extern "C"
14134 {
14135 #endif
14136 /* We use char because int might match the return type of a gcc2
14137    builtin and then its argument prototype would still apply.  */
14138 char $ac_func ();
14139 /* The GNU C library defines this for functions which it implements
14140     to always fail with ENOSYS.  Some functions are actually named
14141     something starting with __ and the normal name is an alias.  */
14142 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14143 choke me
14144 #else
14145 char (*f) () = $ac_func;
14146 #endif
14147 #ifdef __cplusplus
14148 }
14149 #endif
14150
14151 int
14152 main ()
14153 {
14154 return f != $ac_func;
14155   ;
14156   return 0;
14157 }
14158 _ACEOF
14159 rm -f conftest.$ac_objext conftest$ac_exeext
14160 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14161   (eval $ac_link) 2>conftest.er1
14162   ac_status=$?
14163   grep -v '^ *+' conftest.er1 >conftest.err
14164   rm -f conftest.er1
14165   cat conftest.err >&5
14166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14167   (exit $ac_status); } &&
14168          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
14169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14170   (eval $ac_try) 2>&5
14171   ac_status=$?
14172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14173   (exit $ac_status); }; } &&
14174          { ac_try='test -s conftest$ac_exeext'
14175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14176   (eval $ac_try) 2>&5
14177   ac_status=$?
14178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14179   (exit $ac_status); }; }; then
14180   eval "$as_ac_var=yes"
14181 else
14182   echo "$as_me: failed program was:" >&5
14183 sed 's/^/| /' conftest.$ac_ext >&5
14184
14185 eval "$as_ac_var=no"
14186 fi
14187 rm -f conftest.err conftest.$ac_objext \
14188       conftest$ac_exeext conftest.$ac_ext
14189 fi
14190 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14191 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14192 if test `eval echo '${'$as_ac_var'}'` = yes; then
14193   cat >>confdefs.h <<_ACEOF
14194 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14195 _ACEOF
14196
14197 else
14198   pgac_need_repl_snprintf=yes
14199 fi
14200 done
14201
14202 fi
14203
14204
14205 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14206 # include/c.h will provide declarations.  Note this is a separate test
14207 # from whether the functions exist in the C library --- there are
14208 # systems that have the functions but don't bother to declare them :-(
14209
14210 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14211 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14212 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14213   echo $ECHO_N "(cached) $ECHO_C" >&6
14214 else
14215   cat >conftest.$ac_ext <<_ACEOF
14216 /* confdefs.h.  */
14217 _ACEOF
14218 cat confdefs.h >>conftest.$ac_ext
14219 cat >>conftest.$ac_ext <<_ACEOF
14220 /* end confdefs.h.  */
14221 $ac_includes_default
14222 int
14223 main ()
14224 {
14225 #ifndef snprintf
14226   char *p = (char *) snprintf;
14227 #endif
14228
14229   ;
14230   return 0;
14231 }
14232 _ACEOF
14233 rm -f conftest.$ac_objext
14234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14235   (eval $ac_compile) 2>conftest.er1
14236   ac_status=$?
14237   grep -v '^ *+' conftest.er1 >conftest.err
14238   rm -f conftest.er1
14239   cat conftest.err >&5
14240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14241   (exit $ac_status); } &&
14242          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
14243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14244   (eval $ac_try) 2>&5
14245   ac_status=$?
14246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14247   (exit $ac_status); }; } &&
14248          { ac_try='test -s conftest.$ac_objext'
14249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14250   (eval $ac_try) 2>&5
14251   ac_status=$?
14252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14253   (exit $ac_status); }; }; then
14254   ac_cv_have_decl_snprintf=yes
14255 else
14256   echo "$as_me: failed program was:" >&5
14257 sed 's/^/| /' conftest.$ac_ext >&5
14258
14259 ac_cv_have_decl_snprintf=no
14260 fi
14261 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14262 fi
14263 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14264 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14265 if test $ac_cv_have_decl_snprintf = yes; then
14266
14267 cat >>confdefs.h <<_ACEOF
14268 #define HAVE_DECL_SNPRINTF 1
14269 _ACEOF
14270
14271
14272 else
14273   cat >>confdefs.h <<_ACEOF
14274 #define HAVE_DECL_SNPRINTF 0
14275 _ACEOF
14276
14277
14278 fi
14279 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14280 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14281 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14282   echo $ECHO_N "(cached) $ECHO_C" >&6
14283 else
14284   cat >conftest.$ac_ext <<_ACEOF
14285 /* confdefs.h.  */
14286 _ACEOF
14287 cat confdefs.h >>conftest.$ac_ext
14288 cat >>conftest.$ac_ext <<_ACEOF
14289 /* end confdefs.h.  */
14290 $ac_includes_default
14291 int
14292 main ()
14293 {
14294 #ifndef vsnprintf
14295   char *p = (char *) vsnprintf;
14296 #endif
14297
14298   ;
14299   return 0;
14300 }
14301 _ACEOF
14302 rm -f conftest.$ac_objext
14303 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14304   (eval $ac_compile) 2>conftest.er1
14305   ac_status=$?
14306   grep -v '^ *+' conftest.er1 >conftest.err
14307   rm -f conftest.er1
14308   cat conftest.err >&5
14309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310   (exit $ac_status); } &&
14311          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
14312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14313   (eval $ac_try) 2>&5
14314   ac_status=$?
14315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14316   (exit $ac_status); }; } &&
14317          { ac_try='test -s conftest.$ac_objext'
14318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14319   (eval $ac_try) 2>&5
14320   ac_status=$?
14321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14322   (exit $ac_status); }; }; then
14323   ac_cv_have_decl_vsnprintf=yes
14324 else
14325   echo "$as_me: failed program was:" >&5
14326 sed 's/^/| /' conftest.$ac_ext >&5
14327
14328 ac_cv_have_decl_vsnprintf=no
14329 fi
14330 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14331 fi
14332 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14333 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14334 if test $ac_cv_have_decl_vsnprintf = yes; then
14335
14336 cat >>confdefs.h <<_ACEOF
14337 #define HAVE_DECL_VSNPRINTF 1
14338 _ACEOF
14339
14340
14341 else
14342   cat >>confdefs.h <<_ACEOF
14343 #define HAVE_DECL_VSNPRINTF 0
14344 _ACEOF
14345
14346
14347 fi
14348
14349
14350
14351
14352 echo "$as_me:$LINENO: checking for isinf" >&5
14353 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14354 if test "${ac_cv_func_isinf+set}" = set; then
14355   echo $ECHO_N "(cached) $ECHO_C" >&6
14356 else
14357   cat >conftest.$ac_ext <<_ACEOF
14358 /* confdefs.h.  */
14359 _ACEOF
14360 cat confdefs.h >>conftest.$ac_ext
14361 cat >>conftest.$ac_ext <<_ACEOF
14362 /* end confdefs.h.  */
14363
14364 #include <math.h>
14365 double glob_double;
14366
14367 int
14368 main ()
14369 {
14370 return isinf(glob_double) ? 0 : 1;
14371   ;
14372   return 0;
14373 }
14374 _ACEOF
14375 rm -f conftest.$ac_objext conftest$ac_exeext
14376 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14377   (eval $ac_link) 2>conftest.er1
14378   ac_status=$?
14379   grep -v '^ *+' conftest.er1 >conftest.err
14380   rm -f conftest.er1
14381   cat conftest.err >&5
14382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14383   (exit $ac_status); } &&
14384          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
14385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14386   (eval $ac_try) 2>&5
14387   ac_status=$?
14388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14389   (exit $ac_status); }; } &&
14390          { ac_try='test -s conftest$ac_exeext'
14391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14392   (eval $ac_try) 2>&5
14393   ac_status=$?
14394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14395   (exit $ac_status); }; }; then
14396   ac_cv_func_isinf=yes
14397 else
14398   echo "$as_me: failed program was:" >&5
14399 sed 's/^/| /' conftest.$ac_ext >&5
14400
14401 ac_cv_func_isinf=no
14402 fi
14403 rm -f conftest.err conftest.$ac_objext \
14404       conftest$ac_exeext conftest.$ac_ext
14405 fi
14406 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14407 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14408
14409 if test $ac_cv_func_isinf = yes ; then
14410
14411 cat >>confdefs.h <<\_ACEOF
14412 #define HAVE_ISINF 1
14413 _ACEOF
14414
14415 else
14416   case $LIBOBJS in
14417     "isinf.$ac_objext"   | \
14418   *" isinf.$ac_objext"   | \
14419     "isinf.$ac_objext "* | \
14420   *" isinf.$ac_objext "* ) ;;
14421   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14422 esac
14423
14424   # Look for a way to implement a substitute for isinf()
14425
14426
14427
14428
14429 for ac_func in fpclass fp_class fp_class_d class
14430 do
14431 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14432 echo "$as_me:$LINENO: checking for $ac_func" >&5
14433 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14434 if eval "test \"\${$as_ac_var+set}\" = set"; then
14435   echo $ECHO_N "(cached) $ECHO_C" >&6
14436 else
14437   cat >conftest.$ac_ext <<_ACEOF
14438 /* confdefs.h.  */
14439 _ACEOF
14440 cat confdefs.h >>conftest.$ac_ext
14441 cat >>conftest.$ac_ext <<_ACEOF
14442 /* end confdefs.h.  */
14443 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14444    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14445 #define $ac_func innocuous_$ac_func
14446
14447 /* System header to define __stub macros and hopefully few prototypes,
14448     which can conflict with char $ac_func (); below.
14449     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14450     <limits.h> exists even on freestanding compilers.  */
14451
14452 #ifdef __STDC__
14453 # include <limits.h>
14454 #else
14455 # include <assert.h>
14456 #endif
14457
14458 #undef $ac_func
14459
14460 /* Override any gcc2 internal prototype to avoid an error.  */
14461 #ifdef __cplusplus
14462 extern "C"
14463 {
14464 #endif
14465 /* We use char because int might match the return type of a gcc2
14466    builtin and then its argument prototype would still apply.  */
14467 char $ac_func ();
14468 /* The GNU C library defines this for functions which it implements
14469     to always fail with ENOSYS.  Some functions are actually named
14470     something starting with __ and the normal name is an alias.  */
14471 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14472 choke me
14473 #else
14474 char (*f) () = $ac_func;
14475 #endif
14476 #ifdef __cplusplus
14477 }
14478 #endif
14479
14480 int
14481 main ()
14482 {
14483 return f != $ac_func;
14484   ;
14485   return 0;
14486 }
14487 _ACEOF
14488 rm -f conftest.$ac_objext conftest$ac_exeext
14489 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14490   (eval $ac_link) 2>conftest.er1
14491   ac_status=$?
14492   grep -v '^ *+' conftest.er1 >conftest.err
14493   rm -f conftest.er1
14494   cat conftest.err >&5
14495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14496   (exit $ac_status); } &&
14497          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
14498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14499   (eval $ac_try) 2>&5
14500   ac_status=$?
14501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14502   (exit $ac_status); }; } &&
14503          { ac_try='test -s conftest$ac_exeext'
14504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14505   (eval $ac_try) 2>&5
14506   ac_status=$?
14507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14508   (exit $ac_status); }; }; then
14509   eval "$as_ac_var=yes"
14510 else
14511   echo "$as_me: failed program was:" >&5
14512 sed 's/^/| /' conftest.$ac_ext >&5
14513
14514 eval "$as_ac_var=no"
14515 fi
14516 rm -f conftest.err conftest.$ac_objext \
14517       conftest$ac_exeext conftest.$ac_ext
14518 fi
14519 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14520 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14521 if test `eval echo '${'$as_ac_var'}'` = yes; then
14522   cat >>confdefs.h <<_ACEOF
14523 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14524 _ACEOF
14525  break
14526 fi
14527 done
14528
14529 fi
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14545 do
14546 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14547 echo "$as_me:$LINENO: checking for $ac_func" >&5
14548 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14549 if eval "test \"\${$as_ac_var+set}\" = set"; then
14550   echo $ECHO_N "(cached) $ECHO_C" >&6
14551 else
14552   cat >conftest.$ac_ext <<_ACEOF
14553 /* confdefs.h.  */
14554 _ACEOF
14555 cat confdefs.h >>conftest.$ac_ext
14556 cat >>conftest.$ac_ext <<_ACEOF
14557 /* end confdefs.h.  */
14558 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14559    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14560 #define $ac_func innocuous_$ac_func
14561
14562 /* System header to define __stub macros and hopefully few prototypes,
14563     which can conflict with char $ac_func (); below.
14564     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14565     <limits.h> exists even on freestanding compilers.  */
14566
14567 #ifdef __STDC__
14568 # include <limits.h>
14569 #else
14570 # include <assert.h>
14571 #endif
14572
14573 #undef $ac_func
14574
14575 /* Override any gcc2 internal prototype to avoid an error.  */
14576 #ifdef __cplusplus
14577 extern "C"
14578 {
14579 #endif
14580 /* We use char because int might match the return type of a gcc2
14581    builtin and then its argument prototype would still apply.  */
14582 char $ac_func ();
14583 /* The GNU C library defines this for functions which it implements
14584     to always fail with ENOSYS.  Some functions are actually named
14585     something starting with __ and the normal name is an alias.  */
14586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14587 choke me
14588 #else
14589 char (*f) () = $ac_func;
14590 #endif
14591 #ifdef __cplusplus
14592 }
14593 #endif
14594
14595 int
14596 main ()
14597 {
14598 return f != $ac_func;
14599   ;
14600   return 0;
14601 }
14602 _ACEOF
14603 rm -f conftest.$ac_objext conftest$ac_exeext
14604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14605   (eval $ac_link) 2>conftest.er1
14606   ac_status=$?
14607   grep -v '^ *+' conftest.er1 >conftest.err
14608   rm -f conftest.er1
14609   cat conftest.err >&5
14610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14611   (exit $ac_status); } &&
14612          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
14613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14614   (eval $ac_try) 2>&5
14615   ac_status=$?
14616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617   (exit $ac_status); }; } &&
14618          { ac_try='test -s conftest$ac_exeext'
14619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14620   (eval $ac_try) 2>&5
14621   ac_status=$?
14622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14623   (exit $ac_status); }; }; then
14624   eval "$as_ac_var=yes"
14625 else
14626   echo "$as_me: failed program was:" >&5
14627 sed 's/^/| /' conftest.$ac_ext >&5
14628
14629 eval "$as_ac_var=no"
14630 fi
14631 rm -f conftest.err conftest.$ac_objext \
14632       conftest$ac_exeext conftest.$ac_ext
14633 fi
14634 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14635 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14636 if test `eval echo '${'$as_ac_var'}'` = yes; then
14637   cat >>confdefs.h <<_ACEOF
14638 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14639 _ACEOF
14640
14641 else
14642   case $LIBOBJS in
14643     "$ac_func.$ac_objext"   | \
14644   *" $ac_func.$ac_objext"   | \
14645     "$ac_func.$ac_objext "* | \
14646   *" $ac_func.$ac_objext "* ) ;;
14647   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14648 esac
14649
14650 fi
14651 done
14652
14653
14654
14655 # System's version of getaddrinfo(), if any, may be used only if we found
14656 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14657 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14658 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14659 # because we want to use our own getaddrinfo.c on Windows anyway.)
14660 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14661
14662 for ac_func in getaddrinfo
14663 do
14664 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14665 echo "$as_me:$LINENO: checking for $ac_func" >&5
14666 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14667 if eval "test \"\${$as_ac_var+set}\" = set"; then
14668   echo $ECHO_N "(cached) $ECHO_C" >&6
14669 else
14670   cat >conftest.$ac_ext <<_ACEOF
14671 /* confdefs.h.  */
14672 _ACEOF
14673 cat confdefs.h >>conftest.$ac_ext
14674 cat >>conftest.$ac_ext <<_ACEOF
14675 /* end confdefs.h.  */
14676 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14677    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14678 #define $ac_func innocuous_$ac_func
14679
14680 /* System header to define __stub macros and hopefully few prototypes,
14681     which can conflict with char $ac_func (); below.
14682     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14683     <limits.h> exists even on freestanding compilers.  */
14684
14685 #ifdef __STDC__
14686 # include <limits.h>
14687 #else
14688 # include <assert.h>
14689 #endif
14690
14691 #undef $ac_func
14692
14693 /* Override any gcc2 internal prototype to avoid an error.  */
14694 #ifdef __cplusplus
14695 extern "C"
14696 {
14697 #endif
14698 /* We use char because int might match the return type of a gcc2
14699    builtin and then its argument prototype would still apply.  */
14700 char $ac_func ();
14701 /* The GNU C library defines this for functions which it implements
14702     to always fail with ENOSYS.  Some functions are actually named
14703     something starting with __ and the normal name is an alias.  */
14704 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14705 choke me
14706 #else
14707 char (*f) () = $ac_func;
14708 #endif
14709 #ifdef __cplusplus
14710 }
14711 #endif
14712
14713 int
14714 main ()
14715 {
14716 return f != $ac_func;
14717   ;
14718   return 0;
14719 }
14720 _ACEOF
14721 rm -f conftest.$ac_objext conftest$ac_exeext
14722 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14723   (eval $ac_link) 2>conftest.er1
14724   ac_status=$?
14725   grep -v '^ *+' conftest.er1 >conftest.err
14726   rm -f conftest.er1
14727   cat conftest.err >&5
14728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14729   (exit $ac_status); } &&
14730          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
14731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14732   (eval $ac_try) 2>&5
14733   ac_status=$?
14734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735   (exit $ac_status); }; } &&
14736          { ac_try='test -s conftest$ac_exeext'
14737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14738   (eval $ac_try) 2>&5
14739   ac_status=$?
14740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14741   (exit $ac_status); }; }; then
14742   eval "$as_ac_var=yes"
14743 else
14744   echo "$as_me: failed program was:" >&5
14745 sed 's/^/| /' conftest.$ac_ext >&5
14746
14747 eval "$as_ac_var=no"
14748 fi
14749 rm -f conftest.err conftest.$ac_objext \
14750       conftest$ac_exeext conftest.$ac_ext
14751 fi
14752 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14753 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14754 if test `eval echo '${'$as_ac_var'}'` = yes; then
14755   cat >>confdefs.h <<_ACEOF
14756 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14757 _ACEOF
14758
14759 else
14760   case $LIBOBJS in
14761     "$ac_func.$ac_objext"   | \
14762   *" $ac_func.$ac_objext"   | \
14763     "$ac_func.$ac_objext "* | \
14764   *" $ac_func.$ac_objext "* ) ;;
14765   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14766 esac
14767
14768 fi
14769 done
14770
14771
14772 else
14773   case $LIBOBJS in
14774     "getaddrinfo.$ac_objext"   | \
14775   *" getaddrinfo.$ac_objext"   | \
14776     "getaddrinfo.$ac_objext "* | \
14777   *" getaddrinfo.$ac_objext "* ) ;;
14778   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14779 esac
14780
14781 fi
14782
14783 # similarly, use system's getopt_long() only if system provides struct option.
14784 if test x"$ac_cv_type_struct_option" = xyes ; then
14785
14786 for ac_func in getopt_long
14787 do
14788 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14789 echo "$as_me:$LINENO: checking for $ac_func" >&5
14790 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14791 if eval "test \"\${$as_ac_var+set}\" = set"; then
14792   echo $ECHO_N "(cached) $ECHO_C" >&6
14793 else
14794   cat >conftest.$ac_ext <<_ACEOF
14795 /* confdefs.h.  */
14796 _ACEOF
14797 cat confdefs.h >>conftest.$ac_ext
14798 cat >>conftest.$ac_ext <<_ACEOF
14799 /* end confdefs.h.  */
14800 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14801    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14802 #define $ac_func innocuous_$ac_func
14803
14804 /* System header to define __stub macros and hopefully few prototypes,
14805     which can conflict with char $ac_func (); below.
14806     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14807     <limits.h> exists even on freestanding compilers.  */
14808
14809 #ifdef __STDC__
14810 # include <limits.h>
14811 #else
14812 # include <assert.h>
14813 #endif
14814
14815 #undef $ac_func
14816
14817 /* Override any gcc2 internal prototype to avoid an error.  */
14818 #ifdef __cplusplus
14819 extern "C"
14820 {
14821 #endif
14822 /* We use char because int might match the return type of a gcc2
14823    builtin and then its argument prototype would still apply.  */
14824 char $ac_func ();
14825 /* The GNU C library defines this for functions which it implements
14826     to always fail with ENOSYS.  Some functions are actually named
14827     something starting with __ and the normal name is an alias.  */
14828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14829 choke me
14830 #else
14831 char (*f) () = $ac_func;
14832 #endif
14833 #ifdef __cplusplus
14834 }
14835 #endif
14836
14837 int
14838 main ()
14839 {
14840 return f != $ac_func;
14841   ;
14842   return 0;
14843 }
14844 _ACEOF
14845 rm -f conftest.$ac_objext conftest$ac_exeext
14846 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14847   (eval $ac_link) 2>conftest.er1
14848   ac_status=$?
14849   grep -v '^ *+' conftest.er1 >conftest.err
14850   rm -f conftest.er1
14851   cat conftest.err >&5
14852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853   (exit $ac_status); } &&
14854          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
14855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14856   (eval $ac_try) 2>&5
14857   ac_status=$?
14858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859   (exit $ac_status); }; } &&
14860          { ac_try='test -s conftest$ac_exeext'
14861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14862   (eval $ac_try) 2>&5
14863   ac_status=$?
14864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14865   (exit $ac_status); }; }; then
14866   eval "$as_ac_var=yes"
14867 else
14868   echo "$as_me: failed program was:" >&5
14869 sed 's/^/| /' conftest.$ac_ext >&5
14870
14871 eval "$as_ac_var=no"
14872 fi
14873 rm -f conftest.err conftest.$ac_objext \
14874       conftest$ac_exeext conftest.$ac_ext
14875 fi
14876 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14877 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14878 if test `eval echo '${'$as_ac_var'}'` = yes; then
14879   cat >>confdefs.h <<_ACEOF
14880 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14881 _ACEOF
14882
14883 else
14884   case $LIBOBJS in
14885     "$ac_func.$ac_objext"   | \
14886   *" $ac_func.$ac_objext"   | \
14887     "$ac_func.$ac_objext "* | \
14888   *" $ac_func.$ac_objext "* ) ;;
14889   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14890 esac
14891
14892 fi
14893 done
14894
14895
14896 else
14897   case $LIBOBJS in
14898     "getopt_long.$ac_objext"   | \
14899   *" getopt_long.$ac_objext"   | \
14900     "getopt_long.$ac_objext "* | \
14901   *" getopt_long.$ac_objext "* ) ;;
14902   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14903 esac
14904
14905 fi
14906
14907 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14908 # We override the previous test that said fseeko/ftello didn't exist
14909 # OS tests are also done in include/c.h and port/fseeko.c
14910 case $host_os in bsdi*|netbsd*)
14911 ac_cv_func_fseeko=yes
14912 esac
14913
14914 # Solaris has a very slow qsort in certain cases, so we replace it:
14915 #   http://forum.sun.com/thread.jspa?forumID=4&threadID=7231
14916 # Supposedly it is fixed in Solaris, but not sure which version, and
14917 # no confirmed testing.  2005-12-16
14918 if test "$PORTNAME" = "solaris"; then
14919 case $LIBOBJS in
14920     "qsort.$ac_objext"   | \
14921   *" qsort.$ac_objext"   | \
14922     "qsort.$ac_objext "* | \
14923   *" qsort.$ac_objext "* ) ;;
14924   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
14925 esac
14926
14927 fi
14928
14929 # Win32 support
14930 if test "$PORTNAME" = "win32"; then
14931 case $LIBOBJS in
14932     "gettimeofday.$ac_objext"   | \
14933   *" gettimeofday.$ac_objext"   | \
14934     "gettimeofday.$ac_objext "* | \
14935   *" gettimeofday.$ac_objext "* ) ;;
14936   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14937 esac
14938
14939 case $LIBOBJS in
14940     "kill.$ac_objext"   | \
14941   *" kill.$ac_objext"   | \
14942     "kill.$ac_objext "* | \
14943   *" kill.$ac_objext "* ) ;;
14944   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14945 esac
14946
14947 case $LIBOBJS in
14948     "open.$ac_objext"   | \
14949   *" open.$ac_objext"   | \
14950     "open.$ac_objext "* | \
14951   *" open.$ac_objext "* ) ;;
14952   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14953 esac
14954
14955 case $LIBOBJS in
14956     "rand.$ac_objext"   | \
14957   *" rand.$ac_objext"   | \
14958     "rand.$ac_objext "* | \
14959   *" rand.$ac_objext "* ) ;;
14960   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14961 esac
14962
14963 case $LIBOBJS in
14964     "win32error.$ac_objext"   | \
14965   *" win32error.$ac_objext"   | \
14966     "win32error.$ac_objext "* | \
14967   *" win32error.$ac_objext "* ) ;;
14968   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
14969 esac
14970
14971
14972 cat >>confdefs.h <<\_ACEOF
14973 #define HAVE_SYMLINK 1
14974 _ACEOF
14975
14976 fi
14977
14978 if test "$with_readline" = yes; then
14979   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
14980 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
14981 cat >conftest.$ac_ext <<_ACEOF
14982 /* confdefs.h.  */
14983 _ACEOF
14984 cat confdefs.h >>conftest.$ac_ext
14985 cat >>conftest.$ac_ext <<_ACEOF
14986 /* end confdefs.h.  */
14987 #include <stdio.h>
14988 #ifdef HAVE_READLINE_READLINE_H
14989 # include <readline/readline.h>
14990 #elif defined(HAVE_READLINE_H)
14991 # include <readline.h>
14992 #endif
14993
14994 int
14995 main ()
14996 {
14997 rl_completion_append_character = 'x';
14998   ;
14999   return 0;
15000 }
15001 _ACEOF
15002 rm -f conftest.$ac_objext conftest$ac_exeext
15003 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15004   (eval $ac_link) 2>conftest.er1
15005   ac_status=$?
15006   grep -v '^ *+' conftest.er1 >conftest.err
15007   rm -f conftest.er1
15008   cat conftest.err >&5
15009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15010   (exit $ac_status); } &&
15011          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15013   (eval $ac_try) 2>&5
15014   ac_status=$?
15015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15016   (exit $ac_status); }; } &&
15017          { ac_try='test -s conftest$ac_exeext'
15018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15019   (eval $ac_try) 2>&5
15020   ac_status=$?
15021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15022   (exit $ac_status); }; }; then
15023   echo "$as_me:$LINENO: result: yes" >&5
15024 echo "${ECHO_T}yes" >&6
15025
15026 cat >>confdefs.h <<\_ACEOF
15027 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15028 _ACEOF
15029
15030 else
15031   echo "$as_me: failed program was:" >&5
15032 sed 's/^/| /' conftest.$ac_ext >&5
15033
15034 echo "$as_me:$LINENO: result: no" >&5
15035 echo "${ECHO_T}no" >&6
15036 fi
15037 rm -f conftest.err conftest.$ac_objext \
15038       conftest$ac_exeext conftest.$ac_ext
15039
15040
15041 for ac_func in rl_completion_matches rl_filename_completion_function
15042 do
15043 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15044 echo "$as_me:$LINENO: checking for $ac_func" >&5
15045 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15046 if eval "test \"\${$as_ac_var+set}\" = set"; then
15047   echo $ECHO_N "(cached) $ECHO_C" >&6
15048 else
15049   cat >conftest.$ac_ext <<_ACEOF
15050 /* confdefs.h.  */
15051 _ACEOF
15052 cat confdefs.h >>conftest.$ac_ext
15053 cat >>conftest.$ac_ext <<_ACEOF
15054 /* end confdefs.h.  */
15055 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15056    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15057 #define $ac_func innocuous_$ac_func
15058
15059 /* System header to define __stub macros and hopefully few prototypes,
15060     which can conflict with char $ac_func (); below.
15061     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15062     <limits.h> exists even on freestanding compilers.  */
15063
15064 #ifdef __STDC__
15065 # include <limits.h>
15066 #else
15067 # include <assert.h>
15068 #endif
15069
15070 #undef $ac_func
15071
15072 /* Override any gcc2 internal prototype to avoid an error.  */
15073 #ifdef __cplusplus
15074 extern "C"
15075 {
15076 #endif
15077 /* We use char because int might match the return type of a gcc2
15078    builtin and then its argument prototype would still apply.  */
15079 char $ac_func ();
15080 /* The GNU C library defines this for functions which it implements
15081     to always fail with ENOSYS.  Some functions are actually named
15082     something starting with __ and the normal name is an alias.  */
15083 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15084 choke me
15085 #else
15086 char (*f) () = $ac_func;
15087 #endif
15088 #ifdef __cplusplus
15089 }
15090 #endif
15091
15092 int
15093 main ()
15094 {
15095 return f != $ac_func;
15096   ;
15097   return 0;
15098 }
15099 _ACEOF
15100 rm -f conftest.$ac_objext conftest$ac_exeext
15101 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15102   (eval $ac_link) 2>conftest.er1
15103   ac_status=$?
15104   grep -v '^ *+' conftest.er1 >conftest.err
15105   rm -f conftest.er1
15106   cat conftest.err >&5
15107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15108   (exit $ac_status); } &&
15109          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15111   (eval $ac_try) 2>&5
15112   ac_status=$?
15113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15114   (exit $ac_status); }; } &&
15115          { ac_try='test -s conftest$ac_exeext'
15116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15117   (eval $ac_try) 2>&5
15118   ac_status=$?
15119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120   (exit $ac_status); }; }; then
15121   eval "$as_ac_var=yes"
15122 else
15123   echo "$as_me: failed program was:" >&5
15124 sed 's/^/| /' conftest.$ac_ext >&5
15125
15126 eval "$as_ac_var=no"
15127 fi
15128 rm -f conftest.err conftest.$ac_objext \
15129       conftest$ac_exeext conftest.$ac_ext
15130 fi
15131 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15132 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15133 if test `eval echo '${'$as_ac_var'}'` = yes; then
15134   cat >>confdefs.h <<_ACEOF
15135 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15136 _ACEOF
15137
15138 fi
15139 done
15140
15141
15142 for ac_func in replace_history_entry
15143 do
15144 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15145 echo "$as_me:$LINENO: checking for $ac_func" >&5
15146 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15147 if eval "test \"\${$as_ac_var+set}\" = set"; then
15148   echo $ECHO_N "(cached) $ECHO_C" >&6
15149 else
15150   cat >conftest.$ac_ext <<_ACEOF
15151 /* confdefs.h.  */
15152 _ACEOF
15153 cat confdefs.h >>conftest.$ac_ext
15154 cat >>conftest.$ac_ext <<_ACEOF
15155 /* end confdefs.h.  */
15156 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15157    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15158 #define $ac_func innocuous_$ac_func
15159
15160 /* System header to define __stub macros and hopefully few prototypes,
15161     which can conflict with char $ac_func (); below.
15162     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15163     <limits.h> exists even on freestanding compilers.  */
15164
15165 #ifdef __STDC__
15166 # include <limits.h>
15167 #else
15168 # include <assert.h>
15169 #endif
15170
15171 #undef $ac_func
15172
15173 /* Override any gcc2 internal prototype to avoid an error.  */
15174 #ifdef __cplusplus
15175 extern "C"
15176 {
15177 #endif
15178 /* We use char because int might match the return type of a gcc2
15179    builtin and then its argument prototype would still apply.  */
15180 char $ac_func ();
15181 /* The GNU C library defines this for functions which it implements
15182     to always fail with ENOSYS.  Some functions are actually named
15183     something starting with __ and the normal name is an alias.  */
15184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15185 choke me
15186 #else
15187 char (*f) () = $ac_func;
15188 #endif
15189 #ifdef __cplusplus
15190 }
15191 #endif
15192
15193 int
15194 main ()
15195 {
15196 return f != $ac_func;
15197   ;
15198   return 0;
15199 }
15200 _ACEOF
15201 rm -f conftest.$ac_objext conftest$ac_exeext
15202 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15203   (eval $ac_link) 2>conftest.er1
15204   ac_status=$?
15205   grep -v '^ *+' conftest.er1 >conftest.err
15206   rm -f conftest.er1
15207   cat conftest.err >&5
15208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15209   (exit $ac_status); } &&
15210          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15212   (eval $ac_try) 2>&5
15213   ac_status=$?
15214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15215   (exit $ac_status); }; } &&
15216          { ac_try='test -s conftest$ac_exeext'
15217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15218   (eval $ac_try) 2>&5
15219   ac_status=$?
15220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15221   (exit $ac_status); }; }; then
15222   eval "$as_ac_var=yes"
15223 else
15224   echo "$as_me: failed program was:" >&5
15225 sed 's/^/| /' conftest.$ac_ext >&5
15226
15227 eval "$as_ac_var=no"
15228 fi
15229 rm -f conftest.err conftest.$ac_objext \
15230       conftest$ac_exeext conftest.$ac_ext
15231 fi
15232 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15233 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15234 if test `eval echo '${'$as_ac_var'}'` = yes; then
15235   cat >>confdefs.h <<_ACEOF
15236 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15237 _ACEOF
15238
15239 fi
15240 done
15241
15242 fi
15243
15244
15245 echo "$as_me:$LINENO: checking for finite" >&5
15246 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15247 cat >conftest.$ac_ext <<_ACEOF
15248 /* confdefs.h.  */
15249 _ACEOF
15250 cat confdefs.h >>conftest.$ac_ext
15251 cat >>conftest.$ac_ext <<_ACEOF
15252 /* end confdefs.h.  */
15253
15254 #include <math.h>
15255 double glob_double;
15256
15257 int
15258 main ()
15259 {
15260 return finite(glob_double) ? 0 : 1;
15261   ;
15262   return 0;
15263 }
15264 _ACEOF
15265 rm -f conftest.$ac_objext conftest$ac_exeext
15266 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15267   (eval $ac_link) 2>conftest.er1
15268   ac_status=$?
15269   grep -v '^ *+' conftest.er1 >conftest.err
15270   rm -f conftest.er1
15271   cat conftest.err >&5
15272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15273   (exit $ac_status); } &&
15274          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15276   (eval $ac_try) 2>&5
15277   ac_status=$?
15278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15279   (exit $ac_status); }; } &&
15280          { ac_try='test -s conftest$ac_exeext'
15281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15282   (eval $ac_try) 2>&5
15283   ac_status=$?
15284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15285   (exit $ac_status); }; }; then
15286
15287 cat >>confdefs.h <<\_ACEOF
15288 #define HAVE_FINITE 1
15289 _ACEOF
15290
15291 echo "$as_me:$LINENO: result: yes" >&5
15292 echo "${ECHO_T}yes" >&6
15293 else
15294   echo "$as_me: failed program was:" >&5
15295 sed 's/^/| /' conftest.$ac_ext >&5
15296
15297 echo "$as_me:$LINENO: result: no" >&5
15298 echo "${ECHO_T}no" >&6
15299 fi
15300 rm -f conftest.err conftest.$ac_objext \
15301       conftest$ac_exeext conftest.$ac_ext
15302
15303 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15304 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15305 cat >conftest.$ac_ext <<_ACEOF
15306 /* confdefs.h.  */
15307 _ACEOF
15308 cat confdefs.h >>conftest.$ac_ext
15309 cat >>conftest.$ac_ext <<_ACEOF
15310 /* end confdefs.h.  */
15311 #include <setjmp.h>
15312 int
15313 main ()
15314 {
15315 sigjmp_buf x; sigsetjmp(x, 1);
15316   ;
15317   return 0;
15318 }
15319 _ACEOF
15320 rm -f conftest.$ac_objext conftest$ac_exeext
15321 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15322   (eval $ac_link) 2>conftest.er1
15323   ac_status=$?
15324   grep -v '^ *+' conftest.er1 >conftest.err
15325   rm -f conftest.er1
15326   cat conftest.err >&5
15327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328   (exit $ac_status); } &&
15329          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15331   (eval $ac_try) 2>&5
15332   ac_status=$?
15333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15334   (exit $ac_status); }; } &&
15335          { ac_try='test -s conftest$ac_exeext'
15336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15337   (eval $ac_try) 2>&5
15338   ac_status=$?
15339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15340   (exit $ac_status); }; }; then
15341
15342 cat >>confdefs.h <<\_ACEOF
15343 #define HAVE_SIGSETJMP 1
15344 _ACEOF
15345
15346 echo "$as_me:$LINENO: result: yes" >&5
15347 echo "${ECHO_T}yes" >&6
15348 else
15349   echo "$as_me: failed program was:" >&5
15350 sed 's/^/| /' conftest.$ac_ext >&5
15351
15352 echo "$as_me:$LINENO: result: no" >&5
15353 echo "${ECHO_T}no" >&6
15354 fi
15355 rm -f conftest.err conftest.$ac_objext \
15356       conftest$ac_exeext conftest.$ac_ext
15357
15358 echo "$as_me:$LINENO: checking for syslog" >&5
15359 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15360 if test "${ac_cv_func_syslog+set}" = set; then
15361   echo $ECHO_N "(cached) $ECHO_C" >&6
15362 else
15363   cat >conftest.$ac_ext <<_ACEOF
15364 /* confdefs.h.  */
15365 _ACEOF
15366 cat confdefs.h >>conftest.$ac_ext
15367 cat >>conftest.$ac_ext <<_ACEOF
15368 /* end confdefs.h.  */
15369 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15370    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15371 #define syslog innocuous_syslog
15372
15373 /* System header to define __stub macros and hopefully few prototypes,
15374     which can conflict with char syslog (); below.
15375     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15376     <limits.h> exists even on freestanding compilers.  */
15377
15378 #ifdef __STDC__
15379 # include <limits.h>
15380 #else
15381 # include <assert.h>
15382 #endif
15383
15384 #undef syslog
15385
15386 /* Override any gcc2 internal prototype to avoid an error.  */
15387 #ifdef __cplusplus
15388 extern "C"
15389 {
15390 #endif
15391 /* We use char because int might match the return type of a gcc2
15392    builtin and then its argument prototype would still apply.  */
15393 char syslog ();
15394 /* The GNU C library defines this for functions which it implements
15395     to always fail with ENOSYS.  Some functions are actually named
15396     something starting with __ and the normal name is an alias.  */
15397 #if defined (__stub_syslog) || defined (__stub___syslog)
15398 choke me
15399 #else
15400 char (*f) () = syslog;
15401 #endif
15402 #ifdef __cplusplus
15403 }
15404 #endif
15405
15406 int
15407 main ()
15408 {
15409 return f != syslog;
15410   ;
15411   return 0;
15412 }
15413 _ACEOF
15414 rm -f conftest.$ac_objext conftest$ac_exeext
15415 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15416   (eval $ac_link) 2>conftest.er1
15417   ac_status=$?
15418   grep -v '^ *+' conftest.er1 >conftest.err
15419   rm -f conftest.er1
15420   cat conftest.err >&5
15421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15422   (exit $ac_status); } &&
15423          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15425   (eval $ac_try) 2>&5
15426   ac_status=$?
15427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15428   (exit $ac_status); }; } &&
15429          { ac_try='test -s conftest$ac_exeext'
15430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15431   (eval $ac_try) 2>&5
15432   ac_status=$?
15433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15434   (exit $ac_status); }; }; then
15435   ac_cv_func_syslog=yes
15436 else
15437   echo "$as_me: failed program was:" >&5
15438 sed 's/^/| /' conftest.$ac_ext >&5
15439
15440 ac_cv_func_syslog=no
15441 fi
15442 rm -f conftest.err conftest.$ac_objext \
15443       conftest$ac_exeext conftest.$ac_ext
15444 fi
15445 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15446 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15447 if test $ac_cv_func_syslog = yes; then
15448   if test "${ac_cv_header_syslog_h+set}" = set; then
15449   echo "$as_me:$LINENO: checking for syslog.h" >&5
15450 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15451 if test "${ac_cv_header_syslog_h+set}" = set; then
15452   echo $ECHO_N "(cached) $ECHO_C" >&6
15453 fi
15454 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15455 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15456 else
15457   # Is the header compilable?
15458 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15459 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15460 cat >conftest.$ac_ext <<_ACEOF
15461 /* confdefs.h.  */
15462 _ACEOF
15463 cat confdefs.h >>conftest.$ac_ext
15464 cat >>conftest.$ac_ext <<_ACEOF
15465 /* end confdefs.h.  */
15466 $ac_includes_default
15467 #include <syslog.h>
15468 _ACEOF
15469 rm -f conftest.$ac_objext
15470 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15471   (eval $ac_compile) 2>conftest.er1
15472   ac_status=$?
15473   grep -v '^ *+' conftest.er1 >conftest.err
15474   rm -f conftest.er1
15475   cat conftest.err >&5
15476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477   (exit $ac_status); } &&
15478          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15480   (eval $ac_try) 2>&5
15481   ac_status=$?
15482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483   (exit $ac_status); }; } &&
15484          { ac_try='test -s conftest.$ac_objext'
15485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15486   (eval $ac_try) 2>&5
15487   ac_status=$?
15488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15489   (exit $ac_status); }; }; then
15490   ac_header_compiler=yes
15491 else
15492   echo "$as_me: failed program was:" >&5
15493 sed 's/^/| /' conftest.$ac_ext >&5
15494
15495 ac_header_compiler=no
15496 fi
15497 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15498 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15499 echo "${ECHO_T}$ac_header_compiler" >&6
15500
15501 # Is the header present?
15502 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15503 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15504 cat >conftest.$ac_ext <<_ACEOF
15505 /* confdefs.h.  */
15506 _ACEOF
15507 cat confdefs.h >>conftest.$ac_ext
15508 cat >>conftest.$ac_ext <<_ACEOF
15509 /* end confdefs.h.  */
15510 #include <syslog.h>
15511 _ACEOF
15512 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15513   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15514   ac_status=$?
15515   grep -v '^ *+' conftest.er1 >conftest.err
15516   rm -f conftest.er1
15517   cat conftest.err >&5
15518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519   (exit $ac_status); } >/dev/null; then
15520   if test -s conftest.err; then
15521     ac_cpp_err=$ac_c_preproc_warn_flag
15522     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15523   else
15524     ac_cpp_err=
15525   fi
15526 else
15527   ac_cpp_err=yes
15528 fi
15529 if test -z "$ac_cpp_err"; then
15530   ac_header_preproc=yes
15531 else
15532   echo "$as_me: failed program was:" >&5
15533 sed 's/^/| /' conftest.$ac_ext >&5
15534
15535   ac_header_preproc=no
15536 fi
15537 rm -f conftest.err conftest.$ac_ext
15538 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15539 echo "${ECHO_T}$ac_header_preproc" >&6
15540
15541 # So?  What about this header?
15542 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15543   yes:no: )
15544     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15545 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15546     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15547 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15548     ac_header_preproc=yes
15549     ;;
15550   no:yes:* )
15551     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15552 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15553     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15554 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15555     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15556 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15557     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15558 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15559     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15560 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15561     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15562 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15563     (
15564       cat <<\_ASBOX
15565 ## ---------------------------------------- ##
15566 ## Report this to pgsql-bugs@postgresql.org ##
15567 ## ---------------------------------------- ##
15568 _ASBOX
15569     ) |
15570       sed "s/^/$as_me: WARNING:     /" >&2
15571     ;;
15572 esac
15573 echo "$as_me:$LINENO: checking for syslog.h" >&5
15574 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15575 if test "${ac_cv_header_syslog_h+set}" = set; then
15576   echo $ECHO_N "(cached) $ECHO_C" >&6
15577 else
15578   ac_cv_header_syslog_h=$ac_header_preproc
15579 fi
15580 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15581 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15582
15583 fi
15584 if test $ac_cv_header_syslog_h = yes; then
15585
15586 cat >>confdefs.h <<\_ACEOF
15587 #define HAVE_SYSLOG 1
15588 _ACEOF
15589
15590 fi
15591
15592
15593 fi
15594
15595
15596 echo "$as_me:$LINENO: checking for optreset" >&5
15597 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15598 if test "${pgac_cv_var_int_optreset+set}" = set; then
15599   echo $ECHO_N "(cached) $ECHO_C" >&6
15600 else
15601   cat >conftest.$ac_ext <<_ACEOF
15602 /* confdefs.h.  */
15603 _ACEOF
15604 cat confdefs.h >>conftest.$ac_ext
15605 cat >>conftest.$ac_ext <<_ACEOF
15606 /* end confdefs.h.  */
15607 #include <unistd.h>
15608 int
15609 main ()
15610 {
15611 extern int optreset; optreset = 1;
15612   ;
15613   return 0;
15614 }
15615 _ACEOF
15616 rm -f conftest.$ac_objext conftest$ac_exeext
15617 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15618   (eval $ac_link) 2>conftest.er1
15619   ac_status=$?
15620   grep -v '^ *+' conftest.er1 >conftest.err
15621   rm -f conftest.er1
15622   cat conftest.err >&5
15623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15624   (exit $ac_status); } &&
15625          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15627   (eval $ac_try) 2>&5
15628   ac_status=$?
15629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15630   (exit $ac_status); }; } &&
15631          { ac_try='test -s conftest$ac_exeext'
15632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15633   (eval $ac_try) 2>&5
15634   ac_status=$?
15635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15636   (exit $ac_status); }; }; then
15637   pgac_cv_var_int_optreset=yes
15638 else
15639   echo "$as_me: failed program was:" >&5
15640 sed 's/^/| /' conftest.$ac_ext >&5
15641
15642 pgac_cv_var_int_optreset=no
15643 fi
15644 rm -f conftest.err conftest.$ac_objext \
15645       conftest$ac_exeext conftest.$ac_ext
15646 fi
15647 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15648 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15649 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15650
15651 cat >>confdefs.h <<\_ACEOF
15652 #define HAVE_INT_OPTRESET 1
15653 _ACEOF
15654
15655 fi
15656
15657
15658
15659 for ac_func in strtoll strtoq
15660 do
15661 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15662 echo "$as_me:$LINENO: checking for $ac_func" >&5
15663 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15664 if eval "test \"\${$as_ac_var+set}\" = set"; then
15665   echo $ECHO_N "(cached) $ECHO_C" >&6
15666 else
15667   cat >conftest.$ac_ext <<_ACEOF
15668 /* confdefs.h.  */
15669 _ACEOF
15670 cat confdefs.h >>conftest.$ac_ext
15671 cat >>conftest.$ac_ext <<_ACEOF
15672 /* end confdefs.h.  */
15673 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15674    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15675 #define $ac_func innocuous_$ac_func
15676
15677 /* System header to define __stub macros and hopefully few prototypes,
15678     which can conflict with char $ac_func (); below.
15679     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15680     <limits.h> exists even on freestanding compilers.  */
15681
15682 #ifdef __STDC__
15683 # include <limits.h>
15684 #else
15685 # include <assert.h>
15686 #endif
15687
15688 #undef $ac_func
15689
15690 /* Override any gcc2 internal prototype to avoid an error.  */
15691 #ifdef __cplusplus
15692 extern "C"
15693 {
15694 #endif
15695 /* We use char because int might match the return type of a gcc2
15696    builtin and then its argument prototype would still apply.  */
15697 char $ac_func ();
15698 /* The GNU C library defines this for functions which it implements
15699     to always fail with ENOSYS.  Some functions are actually named
15700     something starting with __ and the normal name is an alias.  */
15701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15702 choke me
15703 #else
15704 char (*f) () = $ac_func;
15705 #endif
15706 #ifdef __cplusplus
15707 }
15708 #endif
15709
15710 int
15711 main ()
15712 {
15713 return f != $ac_func;
15714   ;
15715   return 0;
15716 }
15717 _ACEOF
15718 rm -f conftest.$ac_objext conftest$ac_exeext
15719 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15720   (eval $ac_link) 2>conftest.er1
15721   ac_status=$?
15722   grep -v '^ *+' conftest.er1 >conftest.err
15723   rm -f conftest.er1
15724   cat conftest.err >&5
15725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15726   (exit $ac_status); } &&
15727          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15729   (eval $ac_try) 2>&5
15730   ac_status=$?
15731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15732   (exit $ac_status); }; } &&
15733          { ac_try='test -s conftest$ac_exeext'
15734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15735   (eval $ac_try) 2>&5
15736   ac_status=$?
15737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15738   (exit $ac_status); }; }; then
15739   eval "$as_ac_var=yes"
15740 else
15741   echo "$as_me: failed program was:" >&5
15742 sed 's/^/| /' conftest.$ac_ext >&5
15743
15744 eval "$as_ac_var=no"
15745 fi
15746 rm -f conftest.err conftest.$ac_objext \
15747       conftest$ac_exeext conftest.$ac_ext
15748 fi
15749 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15750 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15751 if test `eval echo '${'$as_ac_var'}'` = yes; then
15752   cat >>confdefs.h <<_ACEOF
15753 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15754 _ACEOF
15755  break
15756 fi
15757 done
15758
15759
15760
15761 for ac_func in strtoull strtouq
15762 do
15763 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15764 echo "$as_me:$LINENO: checking for $ac_func" >&5
15765 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15766 if eval "test \"\${$as_ac_var+set}\" = set"; then
15767   echo $ECHO_N "(cached) $ECHO_C" >&6
15768 else
15769   cat >conftest.$ac_ext <<_ACEOF
15770 /* confdefs.h.  */
15771 _ACEOF
15772 cat confdefs.h >>conftest.$ac_ext
15773 cat >>conftest.$ac_ext <<_ACEOF
15774 /* end confdefs.h.  */
15775 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15776    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15777 #define $ac_func innocuous_$ac_func
15778
15779 /* System header to define __stub macros and hopefully few prototypes,
15780     which can conflict with char $ac_func (); below.
15781     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15782     <limits.h> exists even on freestanding compilers.  */
15783
15784 #ifdef __STDC__
15785 # include <limits.h>
15786 #else
15787 # include <assert.h>
15788 #endif
15789
15790 #undef $ac_func
15791
15792 /* Override any gcc2 internal prototype to avoid an error.  */
15793 #ifdef __cplusplus
15794 extern "C"
15795 {
15796 #endif
15797 /* We use char because int might match the return type of a gcc2
15798    builtin and then its argument prototype would still apply.  */
15799 char $ac_func ();
15800 /* The GNU C library defines this for functions which it implements
15801     to always fail with ENOSYS.  Some functions are actually named
15802     something starting with __ and the normal name is an alias.  */
15803 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15804 choke me
15805 #else
15806 char (*f) () = $ac_func;
15807 #endif
15808 #ifdef __cplusplus
15809 }
15810 #endif
15811
15812 int
15813 main ()
15814 {
15815 return f != $ac_func;
15816   ;
15817   return 0;
15818 }
15819 _ACEOF
15820 rm -f conftest.$ac_objext conftest$ac_exeext
15821 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15822   (eval $ac_link) 2>conftest.er1
15823   ac_status=$?
15824   grep -v '^ *+' conftest.er1 >conftest.err
15825   rm -f conftest.er1
15826   cat conftest.err >&5
15827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15828   (exit $ac_status); } &&
15829          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15831   (eval $ac_try) 2>&5
15832   ac_status=$?
15833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15834   (exit $ac_status); }; } &&
15835          { ac_try='test -s conftest$ac_exeext'
15836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15837   (eval $ac_try) 2>&5
15838   ac_status=$?
15839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15840   (exit $ac_status); }; }; then
15841   eval "$as_ac_var=yes"
15842 else
15843   echo "$as_me: failed program was:" >&5
15844 sed 's/^/| /' conftest.$ac_ext >&5
15845
15846 eval "$as_ac_var=no"
15847 fi
15848 rm -f conftest.err conftest.$ac_objext \
15849       conftest$ac_exeext conftest.$ac_ext
15850 fi
15851 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15852 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15853 if test `eval echo '${'$as_ac_var'}'` = yes; then
15854   cat >>confdefs.h <<_ACEOF
15855 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15856 _ACEOF
15857  break
15858 fi
15859 done
15860
15861
15862 # Check for one of atexit() or on_exit()
15863
15864 for ac_func in atexit
15865 do
15866 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15867 echo "$as_me:$LINENO: checking for $ac_func" >&5
15868 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15869 if eval "test \"\${$as_ac_var+set}\" = set"; then
15870   echo $ECHO_N "(cached) $ECHO_C" >&6
15871 else
15872   cat >conftest.$ac_ext <<_ACEOF
15873 /* confdefs.h.  */
15874 _ACEOF
15875 cat confdefs.h >>conftest.$ac_ext
15876 cat >>conftest.$ac_ext <<_ACEOF
15877 /* end confdefs.h.  */
15878 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15879    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15880 #define $ac_func innocuous_$ac_func
15881
15882 /* System header to define __stub macros and hopefully few prototypes,
15883     which can conflict with char $ac_func (); below.
15884     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15885     <limits.h> exists even on freestanding compilers.  */
15886
15887 #ifdef __STDC__
15888 # include <limits.h>
15889 #else
15890 # include <assert.h>
15891 #endif
15892
15893 #undef $ac_func
15894
15895 /* Override any gcc2 internal prototype to avoid an error.  */
15896 #ifdef __cplusplus
15897 extern "C"
15898 {
15899 #endif
15900 /* We use char because int might match the return type of a gcc2
15901    builtin and then its argument prototype would still apply.  */
15902 char $ac_func ();
15903 /* The GNU C library defines this for functions which it implements
15904     to always fail with ENOSYS.  Some functions are actually named
15905     something starting with __ and the normal name is an alias.  */
15906 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15907 choke me
15908 #else
15909 char (*f) () = $ac_func;
15910 #endif
15911 #ifdef __cplusplus
15912 }
15913 #endif
15914
15915 int
15916 main ()
15917 {
15918 return f != $ac_func;
15919   ;
15920   return 0;
15921 }
15922 _ACEOF
15923 rm -f conftest.$ac_objext conftest$ac_exeext
15924 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15925   (eval $ac_link) 2>conftest.er1
15926   ac_status=$?
15927   grep -v '^ *+' conftest.er1 >conftest.err
15928   rm -f conftest.er1
15929   cat conftest.err >&5
15930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15931   (exit $ac_status); } &&
15932          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
15933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15934   (eval $ac_try) 2>&5
15935   ac_status=$?
15936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15937   (exit $ac_status); }; } &&
15938          { ac_try='test -s conftest$ac_exeext'
15939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15940   (eval $ac_try) 2>&5
15941   ac_status=$?
15942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15943   (exit $ac_status); }; }; then
15944   eval "$as_ac_var=yes"
15945 else
15946   echo "$as_me: failed program was:" >&5
15947 sed 's/^/| /' conftest.$ac_ext >&5
15948
15949 eval "$as_ac_var=no"
15950 fi
15951 rm -f conftest.err conftest.$ac_objext \
15952       conftest$ac_exeext conftest.$ac_ext
15953 fi
15954 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15955 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15956 if test `eval echo '${'$as_ac_var'}'` = yes; then
15957   cat >>confdefs.h <<_ACEOF
15958 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15959 _ACEOF
15960
15961 else
15962
15963 for ac_func in on_exit
15964 do
15965 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15966 echo "$as_me:$LINENO: checking for $ac_func" >&5
15967 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15968 if eval "test \"\${$as_ac_var+set}\" = set"; then
15969   echo $ECHO_N "(cached) $ECHO_C" >&6
15970 else
15971   cat >conftest.$ac_ext <<_ACEOF
15972 /* confdefs.h.  */
15973 _ACEOF
15974 cat confdefs.h >>conftest.$ac_ext
15975 cat >>conftest.$ac_ext <<_ACEOF
15976 /* end confdefs.h.  */
15977 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15978    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15979 #define $ac_func innocuous_$ac_func
15980
15981 /* System header to define __stub macros and hopefully few prototypes,
15982     which can conflict with char $ac_func (); below.
15983     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15984     <limits.h> exists even on freestanding compilers.  */
15985
15986 #ifdef __STDC__
15987 # include <limits.h>
15988 #else
15989 # include <assert.h>
15990 #endif
15991
15992 #undef $ac_func
15993
15994 /* Override any gcc2 internal prototype to avoid an error.  */
15995 #ifdef __cplusplus
15996 extern "C"
15997 {
15998 #endif
15999 /* We use char because int might match the return type of a gcc2
16000    builtin and then its argument prototype would still apply.  */
16001 char $ac_func ();
16002 /* The GNU C library defines this for functions which it implements
16003     to always fail with ENOSYS.  Some functions are actually named
16004     something starting with __ and the normal name is an alias.  */
16005 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16006 choke me
16007 #else
16008 char (*f) () = $ac_func;
16009 #endif
16010 #ifdef __cplusplus
16011 }
16012 #endif
16013
16014 int
16015 main ()
16016 {
16017 return f != $ac_func;
16018   ;
16019   return 0;
16020 }
16021 _ACEOF
16022 rm -f conftest.$ac_objext conftest$ac_exeext
16023 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16024   (eval $ac_link) 2>conftest.er1
16025   ac_status=$?
16026   grep -v '^ *+' conftest.er1 >conftest.err
16027   rm -f conftest.er1
16028   cat conftest.err >&5
16029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16030   (exit $ac_status); } &&
16031          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
16032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16033   (eval $ac_try) 2>&5
16034   ac_status=$?
16035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036   (exit $ac_status); }; } &&
16037          { ac_try='test -s conftest$ac_exeext'
16038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16039   (eval $ac_try) 2>&5
16040   ac_status=$?
16041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16042   (exit $ac_status); }; }; then
16043   eval "$as_ac_var=yes"
16044 else
16045   echo "$as_me: failed program was:" >&5
16046 sed 's/^/| /' conftest.$ac_ext >&5
16047
16048 eval "$as_ac_var=no"
16049 fi
16050 rm -f conftest.err conftest.$ac_objext \
16051       conftest$ac_exeext conftest.$ac_ext
16052 fi
16053 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16054 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16055 if test `eval echo '${'$as_ac_var'}'` = yes; then
16056   cat >>confdefs.h <<_ACEOF
16057 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16058 _ACEOF
16059
16060 else
16061   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16062 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16063    { (exit 1); exit 1; }; }
16064 fi
16065 done
16066
16067 fi
16068 done
16069
16070
16071 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16072 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16073 if test "${ac_cv_sys_largefile_source+set}" = set; then
16074   echo $ECHO_N "(cached) $ECHO_C" >&6
16075 else
16076   while :; do
16077   ac_cv_sys_largefile_source=no
16078   cat >conftest.$ac_ext <<_ACEOF
16079 /* confdefs.h.  */
16080 _ACEOF
16081 cat confdefs.h >>conftest.$ac_ext
16082 cat >>conftest.$ac_ext <<_ACEOF
16083 /* end confdefs.h.  */
16084 #include <stdio.h>
16085 int
16086 main ()
16087 {
16088 return !fseeko;
16089   ;
16090   return 0;
16091 }
16092 _ACEOF
16093 rm -f conftest.$ac_objext
16094 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16095   (eval $ac_compile) 2>conftest.er1
16096   ac_status=$?
16097   grep -v '^ *+' conftest.er1 >conftest.err
16098   rm -f conftest.er1
16099   cat conftest.err >&5
16100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16101   (exit $ac_status); } &&
16102          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
16103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16104   (eval $ac_try) 2>&5
16105   ac_status=$?
16106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16107   (exit $ac_status); }; } &&
16108          { ac_try='test -s conftest.$ac_objext'
16109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16110   (eval $ac_try) 2>&5
16111   ac_status=$?
16112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16113   (exit $ac_status); }; }; then
16114   break
16115 else
16116   echo "$as_me: failed program was:" >&5
16117 sed 's/^/| /' conftest.$ac_ext >&5
16118
16119 fi
16120 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16121   cat >conftest.$ac_ext <<_ACEOF
16122 /* confdefs.h.  */
16123 _ACEOF
16124 cat confdefs.h >>conftest.$ac_ext
16125 cat >>conftest.$ac_ext <<_ACEOF
16126 /* end confdefs.h.  */
16127 #define _LARGEFILE_SOURCE 1
16128 #include <stdio.h>
16129 int
16130 main ()
16131 {
16132 return !fseeko;
16133   ;
16134   return 0;
16135 }
16136 _ACEOF
16137 rm -f conftest.$ac_objext
16138 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16139   (eval $ac_compile) 2>conftest.er1
16140   ac_status=$?
16141   grep -v '^ *+' conftest.er1 >conftest.err
16142   rm -f conftest.er1
16143   cat conftest.err >&5
16144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16145   (exit $ac_status); } &&
16146          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
16147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16148   (eval $ac_try) 2>&5
16149   ac_status=$?
16150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16151   (exit $ac_status); }; } &&
16152          { ac_try='test -s conftest.$ac_objext'
16153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16154   (eval $ac_try) 2>&5
16155   ac_status=$?
16156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16157   (exit $ac_status); }; }; then
16158   ac_cv_sys_largefile_source=1; break
16159 else
16160   echo "$as_me: failed program was:" >&5
16161 sed 's/^/| /' conftest.$ac_ext >&5
16162
16163 fi
16164 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16165   break
16166 done
16167 fi
16168 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16169 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16170 if test "$ac_cv_sys_largefile_source" != no; then
16171
16172 cat >>confdefs.h <<_ACEOF
16173 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16174 _ACEOF
16175
16176 fi
16177 rm -f conftest*
16178
16179 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16180 # in glibc 2.1.3, but that breaks too many other things.
16181 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16182 echo "$as_me:$LINENO: checking for fseeko" >&5
16183 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16184 if test "${ac_cv_func_fseeko+set}" = set; then
16185   echo $ECHO_N "(cached) $ECHO_C" >&6
16186 else
16187   cat >conftest.$ac_ext <<_ACEOF
16188 /* confdefs.h.  */
16189 _ACEOF
16190 cat confdefs.h >>conftest.$ac_ext
16191 cat >>conftest.$ac_ext <<_ACEOF
16192 /* end confdefs.h.  */
16193 #include <stdio.h>
16194 int
16195 main ()
16196 {
16197 return fseeko && fseeko (stdin, 0, 0);
16198   ;
16199   return 0;
16200 }
16201 _ACEOF
16202 rm -f conftest.$ac_objext conftest$ac_exeext
16203 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16204   (eval $ac_link) 2>conftest.er1
16205   ac_status=$?
16206   grep -v '^ *+' conftest.er1 >conftest.err
16207   rm -f conftest.er1
16208   cat conftest.err >&5
16209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210   (exit $ac_status); } &&
16211          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
16212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16213   (eval $ac_try) 2>&5
16214   ac_status=$?
16215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216   (exit $ac_status); }; } &&
16217          { ac_try='test -s conftest$ac_exeext'
16218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16219   (eval $ac_try) 2>&5
16220   ac_status=$?
16221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16222   (exit $ac_status); }; }; then
16223   ac_cv_func_fseeko=yes
16224 else
16225   echo "$as_me: failed program was:" >&5
16226 sed 's/^/| /' conftest.$ac_ext >&5
16227
16228 ac_cv_func_fseeko=no
16229 fi
16230 rm -f conftest.err conftest.$ac_objext \
16231       conftest$ac_exeext conftest.$ac_ext
16232 fi
16233 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16234 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16235 if test $ac_cv_func_fseeko = yes; then
16236
16237 cat >>confdefs.h <<\_ACEOF
16238 #define HAVE_FSEEKO 1
16239 _ACEOF
16240
16241 fi
16242
16243
16244 #
16245 # Pthreads
16246 #
16247 # For each platform, we need to know about any special compile and link
16248 # libraries, and whether the normal C function names are thread-safe.
16249 # See the comment at the top of src/port/thread.c for more information.
16250 #
16251 if test "$enable_thread_safety" = yes; then
16252
16253
16254
16255
16256 ac_ext=c
16257 ac_cpp='$CPP $CPPFLAGS'
16258 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16259 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16260 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16261
16262 acx_pthread_ok=no
16263
16264 # We used to check for pthread.h first, but this fails if pthread.h
16265 # requires special compiler flags (e.g. on True64 or Sequent).
16266 # It gets checked for in the link test anyway.
16267
16268 # First of all, check if the user has set any of the PTHREAD_LIBS,
16269 # etcetera environment variables, and if threads linking works using
16270 # them:
16271 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16272         save_CFLAGS="$CFLAGS"
16273         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16274         save_LIBS="$LIBS"
16275         LIBS="$PTHREAD_LIBS $LIBS"
16276         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16277 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16278         cat >conftest.$ac_ext <<_ACEOF
16279 /* confdefs.h.  */
16280 _ACEOF
16281 cat confdefs.h >>conftest.$ac_ext
16282 cat >>conftest.$ac_ext <<_ACEOF
16283 /* end confdefs.h.  */
16284
16285 /* Override any gcc2 internal prototype to avoid an error.  */
16286 #ifdef __cplusplus
16287 extern "C"
16288 #endif
16289 /* We use char because int might match the return type of a gcc2
16290    builtin and then its argument prototype would still apply.  */
16291 char pthread_join ();
16292 int
16293 main ()
16294 {
16295 pthread_join ();
16296   ;
16297   return 0;
16298 }
16299 _ACEOF
16300 rm -f conftest.$ac_objext conftest$ac_exeext
16301 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16302   (eval $ac_link) 2>conftest.er1
16303   ac_status=$?
16304   grep -v '^ *+' conftest.er1 >conftest.err
16305   rm -f conftest.er1
16306   cat conftest.err >&5
16307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16308   (exit $ac_status); } &&
16309          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
16310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16311   (eval $ac_try) 2>&5
16312   ac_status=$?
16313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16314   (exit $ac_status); }; } &&
16315          { ac_try='test -s conftest$ac_exeext'
16316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16317   (eval $ac_try) 2>&5
16318   ac_status=$?
16319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320   (exit $ac_status); }; }; then
16321   acx_pthread_ok=yes
16322 else
16323   echo "$as_me: failed program was:" >&5
16324 sed 's/^/| /' conftest.$ac_ext >&5
16325
16326 fi
16327 rm -f conftest.err conftest.$ac_objext \
16328       conftest$ac_exeext conftest.$ac_ext
16329         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16330 echo "${ECHO_T}$acx_pthread_ok" >&6
16331         if test x"$acx_pthread_ok" = xno; then
16332                 PTHREAD_LIBS=""
16333                 PTHREAD_CFLAGS=""
16334         fi
16335         LIBS="$save_LIBS"
16336         CFLAGS="$save_CFLAGS"
16337 fi
16338
16339 # We must check for the threads library under a number of different
16340 # names; the ordering is very important because some systems
16341 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16342 # libraries is broken (non-POSIX).
16343
16344 # Create a list of thread flags to try.  Items starting with a "-" are
16345 # C compiler flags, and other items are library names, except for "none"
16346 # which indicates that we try without any flags at all, and "pthread-config"
16347 # which is a program returning the flags for the Pth emulation library.
16348
16349 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16350
16351 # The ordering *is* (sometimes) important.  Some notes on the
16352 # individual items follow:
16353
16354 # pthreads: AIX (must check this before -lpthread)
16355 # none: in case threads are in libc; should be tried before -Kthread and
16356 #       other compiler flags to prevent continual compiler warnings
16357 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16358 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16359 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16360 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16361 # -pthreads: Solaris/gcc
16362 # -mthreads: Mingw32/gcc, Lynx/gcc
16363 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16364 #      doesn't hurt to check since this sometimes defines pthreads too;
16365 #      also defines -D_REENTRANT)
16366 # pthread: Linux, etcetera
16367 # --thread-safe: KAI C++
16368 # pthread-config: use pthread-config program (for GNU Pth library)
16369
16370 case "${host_cpu}-${host_os}" in
16371         *solaris*)
16372
16373         # On Solaris (at least, for some versions), libc contains stubbed
16374         # (non-functional) versions of the pthreads routines, so link-based
16375         # tests will erroneously succeed.  (We need to link with -pthread or
16376         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16377         # a function called by this macro, so we could check for that, but
16378         # who knows whether they'll stub that too in a future libc.)  So,
16379         # we'll just look for -pthreads and -lpthread first:
16380
16381         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16382         ;;
16383 esac
16384
16385 if test x"$acx_pthread_ok" = xno; then
16386 for flag in $acx_pthread_flags; do
16387
16388         tryPTHREAD_CFLAGS=""
16389         tryPTHREAD_LIBS=""
16390         case $flag in
16391                 none)
16392                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16393 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16394                 ;;
16395
16396                 -*)
16397                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16398 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16399                 tryPTHREAD_CFLAGS="$flag"
16400                 ;;
16401
16402                 pthread-config)
16403                 # skip this if we already have flags defined, for PostgreSQL
16404                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16405                 # Extract the first word of "pthread-config", so it can be a program name with args.
16406 set dummy pthread-config; ac_word=$2
16407 echo "$as_me:$LINENO: checking for $ac_word" >&5
16408 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16409 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16410   echo $ECHO_N "(cached) $ECHO_C" >&6
16411 else
16412   if test -n "$acx_pthread_config"; then
16413   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16414 else
16415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16416 for as_dir in $PATH
16417 do
16418   IFS=$as_save_IFS
16419   test -z "$as_dir" && as_dir=.
16420   for ac_exec_ext in '' $ac_executable_extensions; do
16421   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16422     ac_cv_prog_acx_pthread_config="yes"
16423     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16424     break 2
16425   fi
16426 done
16427 done
16428
16429   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16430 fi
16431 fi
16432 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16433 if test -n "$acx_pthread_config"; then
16434   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16435 echo "${ECHO_T}$acx_pthread_config" >&6
16436 else
16437   echo "$as_me:$LINENO: result: no" >&5
16438 echo "${ECHO_T}no" >&6
16439 fi
16440
16441                 if test x"$acx_pthread_config" = xno; then continue; fi
16442                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16443                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16444                 ;;
16445
16446                 *)
16447                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16448 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16449                 tryPTHREAD_LIBS="-l$flag"
16450                 ;;
16451         esac
16452
16453         save_LIBS="$LIBS"
16454         save_CFLAGS="$CFLAGS"
16455         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16456         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16457
16458         # Check for various functions.  We must include pthread.h,
16459         # since some functions may be macros.  (On the Sequent, we
16460         # need a special flag -Kthread to make this header compile.)
16461         # We check for pthread_join because it is in -lpthread on IRIX
16462         # while pthread_create is in libc.  We check for pthread_attr_init
16463         # due to DEC craziness with -lpthreads.  We check for
16464         # pthread_cleanup_push because it is one of the few pthread
16465         # functions on Solaris that doesn't have a non-functional libc stub.
16466         # We try pthread_create on general principles.
16467         cat >conftest.$ac_ext <<_ACEOF
16468 /* confdefs.h.  */
16469 _ACEOF
16470 cat confdefs.h >>conftest.$ac_ext
16471 cat >>conftest.$ac_ext <<_ACEOF
16472 /* end confdefs.h.  */
16473 #include <pthread.h>
16474 int
16475 main ()
16476 {
16477 pthread_t th; pthread_join(th, 0);
16478                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16479                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16480   ;
16481   return 0;
16482 }
16483 _ACEOF
16484 rm -f conftest.$ac_objext conftest$ac_exeext
16485 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16486   (eval $ac_link) 2>conftest.er1
16487   ac_status=$?
16488   grep -v '^ *+' conftest.er1 >conftest.err
16489   rm -f conftest.er1
16490   cat conftest.err >&5
16491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16492   (exit $ac_status); } &&
16493          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
16494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16495   (eval $ac_try) 2>&5
16496   ac_status=$?
16497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16498   (exit $ac_status); }; } &&
16499          { ac_try='test -s conftest$ac_exeext'
16500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16501   (eval $ac_try) 2>&5
16502   ac_status=$?
16503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16504   (exit $ac_status); }; }; then
16505   acx_pthread_ok=yes
16506 else
16507   echo "$as_me: failed program was:" >&5
16508 sed 's/^/| /' conftest.$ac_ext >&5
16509
16510 acx_pthread_ok=no
16511 fi
16512 rm -f conftest.err conftest.$ac_objext \
16513       conftest$ac_exeext conftest.$ac_ext
16514
16515         if test "x$acx_pthread_ok" = xyes; then
16516             # Don't use options that are ignored by the compiler.
16517             # We find them by checking stderror.
16518             cat >conftest.$ac_ext <<_ACEOF
16519 int
16520 main (int argc, char **argv)
16521 {
16522   (void) argc;
16523   (void) argv;
16524   return 0;
16525 }
16526 _ACEOF
16527             rm -f conftest.$ac_objext conftest$ac_exeext
16528             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16529                 # we continue with more flags because Linux needs -lpthread
16530                 # for libpq builds on PostgreSQL.  The test above only
16531                 # tests for building binaries, not shared libraries.
16532                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16533                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16534             else   acx_pthread_ok=no
16535             fi
16536         fi
16537
16538         LIBS="$save_LIBS"
16539         CFLAGS="$save_CFLAGS"
16540
16541         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16542 echo "${ECHO_T}$acx_pthread_ok" >&6
16543 done
16544 fi
16545
16546 # Various other checks:
16547 if test "x$acx_pthread_ok" = xyes; then
16548         save_LIBS="$LIBS"
16549         LIBS="$PTHREAD_LIBS $LIBS"
16550         save_CFLAGS="$CFLAGS"
16551         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16552
16553         # Detect AIX lossage: threads are created detached by default
16554         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16555         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16556 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16557         cat >conftest.$ac_ext <<_ACEOF
16558 /* confdefs.h.  */
16559 _ACEOF
16560 cat confdefs.h >>conftest.$ac_ext
16561 cat >>conftest.$ac_ext <<_ACEOF
16562 /* end confdefs.h.  */
16563 #include <pthread.h>
16564 int
16565 main ()
16566 {
16567 int attr=PTHREAD_CREATE_JOINABLE;
16568   ;
16569   return 0;
16570 }
16571 _ACEOF
16572 rm -f conftest.$ac_objext conftest$ac_exeext
16573 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16574   (eval $ac_link) 2>conftest.er1
16575   ac_status=$?
16576   grep -v '^ *+' conftest.er1 >conftest.err
16577   rm -f conftest.er1
16578   cat conftest.err >&5
16579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16580   (exit $ac_status); } &&
16581          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
16582   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16583   (eval $ac_try) 2>&5
16584   ac_status=$?
16585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16586   (exit $ac_status); }; } &&
16587          { ac_try='test -s conftest$ac_exeext'
16588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16589   (eval $ac_try) 2>&5
16590   ac_status=$?
16591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16592   (exit $ac_status); }; }; then
16593   ok=PTHREAD_CREATE_JOINABLE
16594 else
16595   echo "$as_me: failed program was:" >&5
16596 sed 's/^/| /' conftest.$ac_ext >&5
16597
16598 ok=unknown
16599 fi
16600 rm -f conftest.err conftest.$ac_objext \
16601       conftest$ac_exeext conftest.$ac_ext
16602         if test x"$ok" = xunknown; then
16603                 cat >conftest.$ac_ext <<_ACEOF
16604 /* confdefs.h.  */
16605 _ACEOF
16606 cat confdefs.h >>conftest.$ac_ext
16607 cat >>conftest.$ac_ext <<_ACEOF
16608 /* end confdefs.h.  */
16609 #include <pthread.h>
16610 int
16611 main ()
16612 {
16613 int attr=PTHREAD_CREATE_UNDETACHED;
16614   ;
16615   return 0;
16616 }
16617 _ACEOF
16618 rm -f conftest.$ac_objext conftest$ac_exeext
16619 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16620   (eval $ac_link) 2>conftest.er1
16621   ac_status=$?
16622   grep -v '^ *+' conftest.er1 >conftest.err
16623   rm -f conftest.er1
16624   cat conftest.err >&5
16625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16626   (exit $ac_status); } &&
16627          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
16628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16629   (eval $ac_try) 2>&5
16630   ac_status=$?
16631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16632   (exit $ac_status); }; } &&
16633          { ac_try='test -s conftest$ac_exeext'
16634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16635   (eval $ac_try) 2>&5
16636   ac_status=$?
16637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16638   (exit $ac_status); }; }; then
16639   ok=PTHREAD_CREATE_UNDETACHED
16640 else
16641   echo "$as_me: failed program was:" >&5
16642 sed 's/^/| /' conftest.$ac_ext >&5
16643
16644 ok=unknown
16645 fi
16646 rm -f conftest.err conftest.$ac_objext \
16647       conftest$ac_exeext conftest.$ac_ext
16648         fi
16649         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16650
16651 cat >>confdefs.h <<\_ACEOF
16652 #define PTHREAD_CREATE_JOINABLE $ok
16653 _ACEOF
16654
16655         fi
16656         echo "$as_me:$LINENO: result: ${ok}" >&5
16657 echo "${ECHO_T}${ok}" >&6
16658         if test x"$ok" = xunknown; then
16659                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16660 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16661         fi
16662
16663         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16664 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16665         flag=no
16666 # We always add these in PostgreSQL
16667 #       case "${host_cpu}-${host_os}" in
16668 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16669 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16670 #       esac
16671         echo "$as_me:$LINENO: result: ${flag}" >&5
16672 echo "${ECHO_T}${flag}" >&6
16673         if test "x$flag" != xno; then
16674                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16675         fi
16676
16677         LIBS="$save_LIBS"
16678         CFLAGS="$save_CFLAGS"
16679
16680 # Supporting cc_r would require a special CC in all places that
16681 # use libpq, and that is ugly, so we don't do it.  Users can still
16682 # define their compiler as cc_r to do thread builds of everything.
16683         # More AIX lossage: must compile with cc_r
16684         # Extract the first word of "cc_r", so it can be a program name with args.
16685 set dummy cc_r; ac_word=$2
16686 echo "$as_me:$LINENO: checking for $ac_word" >&5
16687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16688 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16689   echo $ECHO_N "(cached) $ECHO_C" >&6
16690 else
16691   if test -n "$PTHREAD_CC"; then
16692   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16693 else
16694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16695 for as_dir in $PATH
16696 do
16697   IFS=$as_save_IFS
16698   test -z "$as_dir" && as_dir=.
16699   for ac_exec_ext in '' $ac_executable_extensions; do
16700   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16701     ac_cv_prog_PTHREAD_CC="cc_r"
16702     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16703     break 2
16704   fi
16705 done
16706 done
16707
16708   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16709 fi
16710 fi
16711 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16712 if test -n "$PTHREAD_CC"; then
16713   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16714 echo "${ECHO_T}$PTHREAD_CC" >&6
16715 else
16716   echo "$as_me:$LINENO: result: no" >&5
16717 echo "${ECHO_T}no" >&6
16718 fi
16719
16720 else
16721         PTHREAD_CC="$CC"
16722 fi
16723
16724
16725
16726
16727
16728 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16729 if test x"$acx_pthread_ok" = xyes; then
16730
16731 cat >>confdefs.h <<\_ACEOF
16732 #define HAVE_PTHREAD 1
16733 _ACEOF
16734
16735         :
16736 else
16737         acx_pthread_ok=no
16738
16739 fi
16740 ac_ext=c
16741 ac_cpp='$CPP $CPPFLAGS'
16742 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16743 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16744 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16745
16746         # set thread flags
16747
16748 # Some platforms use these, so just defineed them.  They can't hurt if they
16749 # are not supported.
16750 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16751
16752
16753 # At this point, we don't want to muck with the compiler name for threading.
16754 # Let's see who fails, perhaps AIX.  2004-04-23
16755 if test "$PTHREAD_CC" != "$CC"; then
16756 { { echo "$as_me:$LINENO: error:
16757 PostgreSQL does not support platforms that require a special
16758 compiler binary for thread-safety.
16759 " >&5
16760 echo "$as_me: error:
16761 PostgreSQL does not support platforms that require a special
16762 compiler binary for thread-safety.
16763 " >&2;}
16764    { (exit 1); exit 1; }; }
16765 fi
16766
16767 if test "$THREAD_SUPPORT" = no; then
16768 { { echo "$as_me:$LINENO: error:
16769 Cannot enable threads on your platform.
16770 Your platform is known to not support thread-safe programs.
16771 For details, compile and run src/bin/pg_thread_test.
16772 " >&5
16773 echo "$as_me: error:
16774 Cannot enable threads on your platform.
16775 Your platform is known to not support thread-safe programs.
16776 For details, compile and run src/bin/pg_thread_test.
16777 " >&2;}
16778    { (exit 1); exit 1; }; }
16779 fi
16780
16781 # Check for *_r functions
16782 _CFLAGS="$CFLAGS"
16783 _LIBS="$LIBS"
16784 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16785 LIBS="$LIBS $PTHREAD_LIBS"
16786
16787 if test "${ac_cv_header_pthread_h+set}" = set; then
16788   echo "$as_me:$LINENO: checking for pthread.h" >&5
16789 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16790 if test "${ac_cv_header_pthread_h+set}" = set; then
16791   echo $ECHO_N "(cached) $ECHO_C" >&6
16792 fi
16793 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16794 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16795 else
16796   # Is the header compilable?
16797 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16798 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16799 cat >conftest.$ac_ext <<_ACEOF
16800 /* confdefs.h.  */
16801 _ACEOF
16802 cat confdefs.h >>conftest.$ac_ext
16803 cat >>conftest.$ac_ext <<_ACEOF
16804 /* end confdefs.h.  */
16805 $ac_includes_default
16806 #include <pthread.h>
16807 _ACEOF
16808 rm -f conftest.$ac_objext
16809 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16810   (eval $ac_compile) 2>conftest.er1
16811   ac_status=$?
16812   grep -v '^ *+' conftest.er1 >conftest.err
16813   rm -f conftest.er1
16814   cat conftest.err >&5
16815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16816   (exit $ac_status); } &&
16817          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
16818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16819   (eval $ac_try) 2>&5
16820   ac_status=$?
16821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16822   (exit $ac_status); }; } &&
16823          { ac_try='test -s conftest.$ac_objext'
16824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16825   (eval $ac_try) 2>&5
16826   ac_status=$?
16827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828   (exit $ac_status); }; }; then
16829   ac_header_compiler=yes
16830 else
16831   echo "$as_me: failed program was:" >&5
16832 sed 's/^/| /' conftest.$ac_ext >&5
16833
16834 ac_header_compiler=no
16835 fi
16836 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16837 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16838 echo "${ECHO_T}$ac_header_compiler" >&6
16839
16840 # Is the header present?
16841 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16842 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16843 cat >conftest.$ac_ext <<_ACEOF
16844 /* confdefs.h.  */
16845 _ACEOF
16846 cat confdefs.h >>conftest.$ac_ext
16847 cat >>conftest.$ac_ext <<_ACEOF
16848 /* end confdefs.h.  */
16849 #include <pthread.h>
16850 _ACEOF
16851 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16852   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16853   ac_status=$?
16854   grep -v '^ *+' conftest.er1 >conftest.err
16855   rm -f conftest.er1
16856   cat conftest.err >&5
16857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16858   (exit $ac_status); } >/dev/null; then
16859   if test -s conftest.err; then
16860     ac_cpp_err=$ac_c_preproc_warn_flag
16861     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16862   else
16863     ac_cpp_err=
16864   fi
16865 else
16866   ac_cpp_err=yes
16867 fi
16868 if test -z "$ac_cpp_err"; then
16869   ac_header_preproc=yes
16870 else
16871   echo "$as_me: failed program was:" >&5
16872 sed 's/^/| /' conftest.$ac_ext >&5
16873
16874   ac_header_preproc=no
16875 fi
16876 rm -f conftest.err conftest.$ac_ext
16877 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16878 echo "${ECHO_T}$ac_header_preproc" >&6
16879
16880 # So?  What about this header?
16881 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16882   yes:no: )
16883     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16884 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16885     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16886 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16887     ac_header_preproc=yes
16888     ;;
16889   no:yes:* )
16890     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16891 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16892     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16893 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16894     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16895 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16896     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16897 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16898     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16899 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16900     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16901 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16902     (
16903       cat <<\_ASBOX
16904 ## ---------------------------------------- ##
16905 ## Report this to pgsql-bugs@postgresql.org ##
16906 ## ---------------------------------------- ##
16907 _ASBOX
16908     ) |
16909       sed "s/^/$as_me: WARNING:     /" >&2
16910     ;;
16911 esac
16912 echo "$as_me:$LINENO: checking for pthread.h" >&5
16913 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16914 if test "${ac_cv_header_pthread_h+set}" = set; then
16915   echo $ECHO_N "(cached) $ECHO_C" >&6
16916 else
16917   ac_cv_header_pthread_h=$ac_header_preproc
16918 fi
16919 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16920 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16921
16922 fi
16923 if test $ac_cv_header_pthread_h = yes; then
16924   :
16925 else
16926   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16927 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16928    { (exit 1); exit 1; }; }
16929 fi
16930
16931
16932
16933
16934
16935
16936 for ac_func in strerror_r getpwuid_r gethostbyname_r
16937 do
16938 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16939 echo "$as_me:$LINENO: checking for $ac_func" >&5
16940 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16941 if eval "test \"\${$as_ac_var+set}\" = set"; then
16942   echo $ECHO_N "(cached) $ECHO_C" >&6
16943 else
16944   cat >conftest.$ac_ext <<_ACEOF
16945 /* confdefs.h.  */
16946 _ACEOF
16947 cat confdefs.h >>conftest.$ac_ext
16948 cat >>conftest.$ac_ext <<_ACEOF
16949 /* end confdefs.h.  */
16950 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16951    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16952 #define $ac_func innocuous_$ac_func
16953
16954 /* System header to define __stub macros and hopefully few prototypes,
16955     which can conflict with char $ac_func (); below.
16956     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16957     <limits.h> exists even on freestanding compilers.  */
16958
16959 #ifdef __STDC__
16960 # include <limits.h>
16961 #else
16962 # include <assert.h>
16963 #endif
16964
16965 #undef $ac_func
16966
16967 /* Override any gcc2 internal prototype to avoid an error.  */
16968 #ifdef __cplusplus
16969 extern "C"
16970 {
16971 #endif
16972 /* We use char because int might match the return type of a gcc2
16973    builtin and then its argument prototype would still apply.  */
16974 char $ac_func ();
16975 /* The GNU C library defines this for functions which it implements
16976     to always fail with ENOSYS.  Some functions are actually named
16977     something starting with __ and the normal name is an alias.  */
16978 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16979 choke me
16980 #else
16981 char (*f) () = $ac_func;
16982 #endif
16983 #ifdef __cplusplus
16984 }
16985 #endif
16986
16987 int
16988 main ()
16989 {
16990 return f != $ac_func;
16991   ;
16992   return 0;
16993 }
16994 _ACEOF
16995 rm -f conftest.$ac_objext conftest$ac_exeext
16996 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16997   (eval $ac_link) 2>conftest.er1
16998   ac_status=$?
16999   grep -v '^ *+' conftest.er1 >conftest.err
17000   rm -f conftest.er1
17001   cat conftest.err >&5
17002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17003   (exit $ac_status); } &&
17004          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17006   (eval $ac_try) 2>&5
17007   ac_status=$?
17008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17009   (exit $ac_status); }; } &&
17010          { ac_try='test -s conftest$ac_exeext'
17011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17012   (eval $ac_try) 2>&5
17013   ac_status=$?
17014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17015   (exit $ac_status); }; }; then
17016   eval "$as_ac_var=yes"
17017 else
17018   echo "$as_me: failed program was:" >&5
17019 sed 's/^/| /' conftest.$ac_ext >&5
17020
17021 eval "$as_ac_var=no"
17022 fi
17023 rm -f conftest.err conftest.$ac_objext \
17024       conftest$ac_exeext conftest.$ac_ext
17025 fi
17026 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17027 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17028 if test `eval echo '${'$as_ac_var'}'` = yes; then
17029   cat >>confdefs.h <<_ACEOF
17030 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17031 _ACEOF
17032
17033 fi
17034 done
17035
17036
17037 # Do test here with the proper thread flags
17038 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17039 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17040 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17041   echo $ECHO_N "(cached) $ECHO_C" >&6
17042 else
17043   cat >conftest.$ac_ext <<_ACEOF
17044 /* confdefs.h.  */
17045 _ACEOF
17046 cat confdefs.h >>conftest.$ac_ext
17047 cat >>conftest.$ac_ext <<_ACEOF
17048 /* end confdefs.h.  */
17049 #include <sys/types.h>
17050 #include <pwd.h>
17051 int
17052 main ()
17053 {
17054 uid_t uid;
17055 struct passwd *space;
17056 char *buf;
17057 size_t bufsize;
17058 struct passwd **result;
17059 getpwuid_r(uid, space, buf, bufsize, result);
17060   ;
17061   return 0;
17062 }
17063 _ACEOF
17064 rm -f conftest.$ac_objext
17065 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17066   (eval $ac_compile) 2>conftest.er1
17067   ac_status=$?
17068   grep -v '^ *+' conftest.er1 >conftest.err
17069   rm -f conftest.er1
17070   cat conftest.err >&5
17071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17072   (exit $ac_status); } &&
17073          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17075   (eval $ac_try) 2>&5
17076   ac_status=$?
17077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17078   (exit $ac_status); }; } &&
17079          { ac_try='test -s conftest.$ac_objext'
17080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17081   (eval $ac_try) 2>&5
17082   ac_status=$?
17083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17084   (exit $ac_status); }; }; then
17085   pgac_func_getpwuid_r_5arg=yes
17086 else
17087   echo "$as_me: failed program was:" >&5
17088 sed 's/^/| /' conftest.$ac_ext >&5
17089
17090 pgac_func_getpwuid_r_5arg=no
17091 fi
17092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17093 fi
17094 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17095 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17096 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17097
17098 cat >>confdefs.h <<\_ACEOF
17099 #define GETPWUID_R_5ARG
17100 _ACEOF
17101
17102 fi
17103
17104 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17105 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17106 if test "${pgac_func_strerror_r_int+set}" = set; then
17107   echo $ECHO_N "(cached) $ECHO_C" >&6
17108 else
17109   cat >conftest.$ac_ext <<_ACEOF
17110 /* confdefs.h.  */
17111 _ACEOF
17112 cat confdefs.h >>conftest.$ac_ext
17113 cat >>conftest.$ac_ext <<_ACEOF
17114 /* end confdefs.h.  */
17115 #include <string.h>
17116 int
17117 main ()
17118 {
17119 #ifndef _AIX
17120 int strerror_r(int, char *, size_t);
17121 #else
17122 /* Older AIX has 'int' for the third argument so we don't test the args. */
17123 int strerror_r();
17124 #endif
17125   ;
17126   return 0;
17127 }
17128 _ACEOF
17129 rm -f conftest.$ac_objext
17130 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17131   (eval $ac_compile) 2>conftest.er1
17132   ac_status=$?
17133   grep -v '^ *+' conftest.er1 >conftest.err
17134   rm -f conftest.er1
17135   cat conftest.err >&5
17136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17137   (exit $ac_status); } &&
17138          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17140   (eval $ac_try) 2>&5
17141   ac_status=$?
17142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17143   (exit $ac_status); }; } &&
17144          { ac_try='test -s conftest.$ac_objext'
17145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17146   (eval $ac_try) 2>&5
17147   ac_status=$?
17148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17149   (exit $ac_status); }; }; then
17150   pgac_func_strerror_r_int=yes
17151 else
17152   echo "$as_me: failed program was:" >&5
17153 sed 's/^/| /' conftest.$ac_ext >&5
17154
17155 pgac_func_strerror_r_int=no
17156 fi
17157 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17158 fi
17159 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17160 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17161 if test x"$pgac_func_strerror_r_int" = xyes ; then
17162
17163 cat >>confdefs.h <<\_ACEOF
17164 #define STRERROR_R_INT
17165 _ACEOF
17166
17167 fi
17168
17169
17170 # this will link libpq against libldap_r
17171 if test "$with_ldap" = yes ; then
17172   if test "$PORTNAME" != "win32"; then
17173
17174 echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
17175 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6
17176 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
17177   echo $ECHO_N "(cached) $ECHO_C" >&6
17178 else
17179   ac_check_lib_save_LIBS=$LIBS
17180 LIBS="-lldap_r  $LIBS"
17181 cat >conftest.$ac_ext <<_ACEOF
17182 /* confdefs.h.  */
17183 _ACEOF
17184 cat confdefs.h >>conftest.$ac_ext
17185 cat >>conftest.$ac_ext <<_ACEOF
17186 /* end confdefs.h.  */
17187
17188 /* Override any gcc2 internal prototype to avoid an error.  */
17189 #ifdef __cplusplus
17190 extern "C"
17191 #endif
17192 /* We use char because int might match the return type of a gcc2
17193    builtin and then its argument prototype would still apply.  */
17194 char ldap_simple_bind ();
17195 int
17196 main ()
17197 {
17198 ldap_simple_bind ();
17199   ;
17200   return 0;
17201 }
17202 _ACEOF
17203 rm -f conftest.$ac_objext conftest$ac_exeext
17204 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17205   (eval $ac_link) 2>conftest.er1
17206   ac_status=$?
17207   grep -v '^ *+' conftest.er1 >conftest.err
17208   rm -f conftest.er1
17209   cat conftest.err >&5
17210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17211   (exit $ac_status); } &&
17212          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17214   (eval $ac_try) 2>&5
17215   ac_status=$?
17216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17217   (exit $ac_status); }; } &&
17218          { ac_try='test -s conftest$ac_exeext'
17219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17220   (eval $ac_try) 2>&5
17221   ac_status=$?
17222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17223   (exit $ac_status); }; }; then
17224   ac_cv_lib_ldap_r_ldap_simple_bind=yes
17225 else
17226   echo "$as_me: failed program was:" >&5
17227 sed 's/^/| /' conftest.$ac_ext >&5
17228
17229 ac_cv_lib_ldap_r_ldap_simple_bind=no
17230 fi
17231 rm -f conftest.err conftest.$ac_objext \
17232       conftest$ac_exeext conftest.$ac_ext
17233 LIBS=$ac_check_lib_save_LIBS
17234 fi
17235 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
17236 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6
17237 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
17238   cat >>confdefs.h <<_ACEOF
17239 #define HAVE_LIBLDAP_R 1
17240 _ACEOF
17241
17242   LIBS="-lldap_r $LIBS"
17243
17244 else
17245   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
17246 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
17247    { (exit 1); exit 1; }; }
17248 fi
17249
17250     PTHREAD_LIBS="$PTHREAD_LIBS -lldap_r"
17251   fi
17252 fi
17253
17254 CFLAGS="$_CFLAGS"
17255 LIBS="$_LIBS"
17256
17257 else
17258 # do not use values from template file
17259 PTHREAD_CFLAGS=
17260 PTHREAD_LIBS=
17261 fi
17262
17263
17264
17265
17266
17267 # This test makes sure that run tests work at all.  Sometimes a shared
17268 # library is found by the linker, but the runtime linker can't find it.
17269 # This check should come after all modifications of compiler or linker
17270 # variables, and before any other run tests.
17271 echo "$as_me:$LINENO: checking test program" >&5
17272 echo $ECHO_N "checking test program... $ECHO_C" >&6
17273 if test "$cross_compiling" = yes; then
17274   echo "$as_me:$LINENO: result: cross-compiling" >&5
17275 echo "${ECHO_T}cross-compiling" >&6
17276 else
17277   cat >conftest.$ac_ext <<_ACEOF
17278 /* confdefs.h.  */
17279 _ACEOF
17280 cat confdefs.h >>conftest.$ac_ext
17281 cat >>conftest.$ac_ext <<_ACEOF
17282 /* end confdefs.h.  */
17283 int main() { return 0; }
17284 _ACEOF
17285 rm -f conftest$ac_exeext
17286 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17287   (eval $ac_link) 2>&5
17288   ac_status=$?
17289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17290   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17292   (eval $ac_try) 2>&5
17293   ac_status=$?
17294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17295   (exit $ac_status); }; }; then
17296   echo "$as_me:$LINENO: result: ok" >&5
17297 echo "${ECHO_T}ok" >&6
17298 else
17299   echo "$as_me: program exited with status $ac_status" >&5
17300 echo "$as_me: failed program was:" >&5
17301 sed 's/^/| /' conftest.$ac_ext >&5
17302
17303 ( exit $ac_status )
17304 echo "$as_me:$LINENO: result: failed" >&5
17305 echo "${ECHO_T}failed" >&6
17306 { { echo "$as_me:$LINENO: error:
17307 *** Could not execute a simple test program.  This may be a problem
17308 *** related to locating shared libraries.  Check the file 'config.log'
17309 *** for the exact reason." >&5
17310 echo "$as_me: error:
17311 *** Could not execute a simple test program.  This may be a problem
17312 *** related to locating shared libraries.  Check the file 'config.log'
17313 *** for the exact reason." >&2;}
17314    { (exit 1); exit 1; }; }
17315 fi
17316 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17317 fi
17318
17319 # --------------------
17320 # Run tests below here
17321 # --------------------
17322
17323 # Force use of our snprintf if system's doesn't do arg control
17324 # See comment above at snprintf test for details.
17325 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17326   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17327 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17328 if test "${pgac_cv_printf_arg_control+set}" = set; then
17329   echo $ECHO_N "(cached) $ECHO_C" >&6
17330 else
17331   if test "$cross_compiling" = yes; then
17332   pgac_cv_printf_arg_control=cross
17333 else
17334   cat >conftest.$ac_ext <<_ACEOF
17335 /* confdefs.h.  */
17336 _ACEOF
17337 cat confdefs.h >>conftest.$ac_ext
17338 cat >>conftest.$ac_ext <<_ACEOF
17339 /* end confdefs.h.  */
17340 #include <stdio.h>
17341 #include <string.h>
17342
17343 int main()
17344 {
17345   char buf[100];
17346
17347   /* can it swap arguments? */
17348   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17349   if (strcmp(buf, "4 3") != 0)
17350     return 1;
17351   return 0;
17352 }
17353 _ACEOF
17354 rm -f conftest$ac_exeext
17355 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17356   (eval $ac_link) 2>&5
17357   ac_status=$?
17358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17359   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17361   (eval $ac_try) 2>&5
17362   ac_status=$?
17363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17364   (exit $ac_status); }; }; then
17365   pgac_cv_printf_arg_control=yes
17366 else
17367   echo "$as_me: program exited with status $ac_status" >&5
17368 echo "$as_me: failed program was:" >&5
17369 sed 's/^/| /' conftest.$ac_ext >&5
17370
17371 ( exit $ac_status )
17372 pgac_cv_printf_arg_control=no
17373 fi
17374 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17375 fi
17376
17377 fi
17378 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17379 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17380
17381   if test $pgac_cv_printf_arg_control != yes ; then
17382     pgac_need_repl_snprintf=yes
17383   fi
17384 fi
17385
17386
17387
17388 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17389 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17390 if test "${pgac_cv_type_long_int_64+set}" = set; then
17391   echo $ECHO_N "(cached) $ECHO_C" >&6
17392 else
17393   if test "$cross_compiling" = yes; then
17394   # If cross-compiling, check the size reported by the compiler and
17395 # trust that the arithmetic works.
17396 cat >conftest.$ac_ext <<_ACEOF
17397 /* confdefs.h.  */
17398 _ACEOF
17399 cat confdefs.h >>conftest.$ac_ext
17400 cat >>conftest.$ac_ext <<_ACEOF
17401 /* end confdefs.h.  */
17402
17403 int
17404 main ()
17405 {
17406 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17407 test_array [0] = 0
17408
17409   ;
17410   return 0;
17411 }
17412 _ACEOF
17413 rm -f conftest.$ac_objext
17414 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17415   (eval $ac_compile) 2>conftest.er1
17416   ac_status=$?
17417   grep -v '^ *+' conftest.er1 >conftest.err
17418   rm -f conftest.er1
17419   cat conftest.err >&5
17420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17421   (exit $ac_status); } &&
17422          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17424   (eval $ac_try) 2>&5
17425   ac_status=$?
17426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17427   (exit $ac_status); }; } &&
17428          { ac_try='test -s conftest.$ac_objext'
17429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17430   (eval $ac_try) 2>&5
17431   ac_status=$?
17432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17433   (exit $ac_status); }; }; then
17434   pgac_cv_type_long_int_64=yes
17435 else
17436   echo "$as_me: failed program was:" >&5
17437 sed 's/^/| /' conftest.$ac_ext >&5
17438
17439 pgac_cv_type_long_int_64=no
17440 fi
17441 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17442 else
17443   cat >conftest.$ac_ext <<_ACEOF
17444 /* confdefs.h.  */
17445 _ACEOF
17446 cat confdefs.h >>conftest.$ac_ext
17447 cat >>conftest.$ac_ext <<_ACEOF
17448 /* end confdefs.h.  */
17449 typedef long int ac_int64;
17450
17451 /*
17452  * These are globals to discourage the compiler from folding all the
17453  * arithmetic tests down to compile-time constants.
17454  */
17455 ac_int64 a = 20000001;
17456 ac_int64 b = 40000005;
17457
17458 int does_int64_work()
17459 {
17460   ac_int64 c,d;
17461
17462   if (sizeof(ac_int64) != 8)
17463     return 0;                   /* definitely not the right size */
17464
17465   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17466   c = a * b;
17467   d = (c + b) / b;
17468   if (d != a+1)
17469     return 0;
17470   return 1;
17471 }
17472 main() {
17473   exit(! does_int64_work());
17474 }
17475 _ACEOF
17476 rm -f conftest$ac_exeext
17477 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17478   (eval $ac_link) 2>&5
17479   ac_status=$?
17480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17481   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17483   (eval $ac_try) 2>&5
17484   ac_status=$?
17485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17486   (exit $ac_status); }; }; then
17487   pgac_cv_type_long_int_64=yes
17488 else
17489   echo "$as_me: program exited with status $ac_status" >&5
17490 echo "$as_me: failed program was:" >&5
17491 sed 's/^/| /' conftest.$ac_ext >&5
17492
17493 ( exit $ac_status )
17494 pgac_cv_type_long_int_64=no
17495 fi
17496 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17497 fi
17498 fi
17499 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17500 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17501
17502 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17503 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17504
17505 cat >>confdefs.h <<\_ACEOF
17506 #define HAVE_LONG_INT_64
17507 _ACEOF
17508
17509 fi
17510
17511
17512 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17513   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17514 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17515 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17516   echo $ECHO_N "(cached) $ECHO_C" >&6
17517 else
17518   if test "$cross_compiling" = yes; then
17519   # If cross-compiling, check the size reported by the compiler and
17520 # trust that the arithmetic works.
17521 cat >conftest.$ac_ext <<_ACEOF
17522 /* confdefs.h.  */
17523 _ACEOF
17524 cat confdefs.h >>conftest.$ac_ext
17525 cat >>conftest.$ac_ext <<_ACEOF
17526 /* end confdefs.h.  */
17527
17528 int
17529 main ()
17530 {
17531 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17532 test_array [0] = 0
17533
17534   ;
17535   return 0;
17536 }
17537 _ACEOF
17538 rm -f conftest.$ac_objext
17539 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17540   (eval $ac_compile) 2>conftest.er1
17541   ac_status=$?
17542   grep -v '^ *+' conftest.er1 >conftest.err
17543   rm -f conftest.er1
17544   cat conftest.err >&5
17545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17546   (exit $ac_status); } &&
17547          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17549   (eval $ac_try) 2>&5
17550   ac_status=$?
17551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17552   (exit $ac_status); }; } &&
17553          { ac_try='test -s conftest.$ac_objext'
17554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17555   (eval $ac_try) 2>&5
17556   ac_status=$?
17557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17558   (exit $ac_status); }; }; then
17559   pgac_cv_type_long_long_int_64=yes
17560 else
17561   echo "$as_me: failed program was:" >&5
17562 sed 's/^/| /' conftest.$ac_ext >&5
17563
17564 pgac_cv_type_long_long_int_64=no
17565 fi
17566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17567 else
17568   cat >conftest.$ac_ext <<_ACEOF
17569 /* confdefs.h.  */
17570 _ACEOF
17571 cat confdefs.h >>conftest.$ac_ext
17572 cat >>conftest.$ac_ext <<_ACEOF
17573 /* end confdefs.h.  */
17574 typedef long long int ac_int64;
17575
17576 /*
17577  * These are globals to discourage the compiler from folding all the
17578  * arithmetic tests down to compile-time constants.
17579  */
17580 ac_int64 a = 20000001;
17581 ac_int64 b = 40000005;
17582
17583 int does_int64_work()
17584 {
17585   ac_int64 c,d;
17586
17587   if (sizeof(ac_int64) != 8)
17588     return 0;                   /* definitely not the right size */
17589
17590   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17591   c = a * b;
17592   d = (c + b) / b;
17593   if (d != a+1)
17594     return 0;
17595   return 1;
17596 }
17597 main() {
17598   exit(! does_int64_work());
17599 }
17600 _ACEOF
17601 rm -f conftest$ac_exeext
17602 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17603   (eval $ac_link) 2>&5
17604   ac_status=$?
17605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17606   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17608   (eval $ac_try) 2>&5
17609   ac_status=$?
17610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17611   (exit $ac_status); }; }; then
17612   pgac_cv_type_long_long_int_64=yes
17613 else
17614   echo "$as_me: program exited with status $ac_status" >&5
17615 echo "$as_me: failed program was:" >&5
17616 sed 's/^/| /' conftest.$ac_ext >&5
17617
17618 ( exit $ac_status )
17619 pgac_cv_type_long_long_int_64=no
17620 fi
17621 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17622 fi
17623 fi
17624 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17625 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17626
17627 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17628 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17629
17630 cat >>confdefs.h <<\_ACEOF
17631 #define HAVE_LONG_LONG_INT_64
17632 _ACEOF
17633
17634 fi
17635
17636 fi
17637
17638
17639
17640 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17641   cat >conftest.$ac_ext <<_ACEOF
17642 /* confdefs.h.  */
17643 _ACEOF
17644 cat confdefs.h >>conftest.$ac_ext
17645 cat >>conftest.$ac_ext <<_ACEOF
17646 /* end confdefs.h.  */
17647
17648 #define INT64CONST(x)  x##LL
17649 long long int foo = INT64CONST(0x1234567890123456);
17650
17651 int
17652 main ()
17653 {
17654
17655   ;
17656   return 0;
17657 }
17658 _ACEOF
17659 rm -f conftest.$ac_objext
17660 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17661   (eval $ac_compile) 2>conftest.er1
17662   ac_status=$?
17663   grep -v '^ *+' conftest.er1 >conftest.err
17664   rm -f conftest.er1
17665   cat conftest.err >&5
17666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17667   (exit $ac_status); } &&
17668          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17670   (eval $ac_try) 2>&5
17671   ac_status=$?
17672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17673   (exit $ac_status); }; } &&
17674          { ac_try='test -s conftest.$ac_objext'
17675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17676   (eval $ac_try) 2>&5
17677   ac_status=$?
17678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17679   (exit $ac_status); }; }; then
17680
17681 cat >>confdefs.h <<\_ACEOF
17682 #define HAVE_LL_CONSTANTS 1
17683 _ACEOF
17684
17685 else
17686   echo "$as_me: failed program was:" >&5
17687 sed 's/^/| /' conftest.$ac_ext >&5
17688
17689 fi
17690 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17691 fi
17692
17693
17694 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17695 # we found we need to use "long long int", better check.  We cope with
17696 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17697 # work, fall back to our own snprintf emulation (which we know uses %lld).
17698
17699 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17700   if test $pgac_need_repl_snprintf = no; then
17701     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17702 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17703 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17704   echo $ECHO_N "(cached) $ECHO_C" >&6
17705 else
17706   for pgac_format in '%lld' '%qd' '%I64d'; do
17707 if test "$cross_compiling" = yes; then
17708   pgac_cv_snprintf_long_long_int_format=cross; break
17709 else
17710   cat >conftest.$ac_ext <<_ACEOF
17711 /* confdefs.h.  */
17712 _ACEOF
17713 cat confdefs.h >>conftest.$ac_ext
17714 cat >>conftest.$ac_ext <<_ACEOF
17715 /* end confdefs.h.  */
17716 #include <stdio.h>
17717 typedef long long int ac_int64;
17718 #define INT64_FORMAT "$pgac_format"
17719
17720 ac_int64 a = 20000001;
17721 ac_int64 b = 40000005;
17722
17723 int does_int64_snprintf_work()
17724 {
17725   ac_int64 c;
17726   char buf[100];
17727
17728   if (sizeof(ac_int64) != 8)
17729     return 0;                   /* doesn't look like the right size */
17730
17731   c = a * b;
17732   snprintf(buf, 100, INT64_FORMAT, c);
17733   if (strcmp(buf, "800000140000005") != 0)
17734     return 0;                   /* either multiply or snprintf is busted */
17735   return 1;
17736 }
17737 main() {
17738   exit(! does_int64_snprintf_work());
17739 }
17740 _ACEOF
17741 rm -f conftest$ac_exeext
17742 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17743   (eval $ac_link) 2>&5
17744   ac_status=$?
17745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17746   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17748   (eval $ac_try) 2>&5
17749   ac_status=$?
17750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17751   (exit $ac_status); }; }; then
17752   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17753 else
17754   echo "$as_me: program exited with status $ac_status" >&5
17755 echo "$as_me: failed program was:" >&5
17756 sed 's/^/| /' conftest.$ac_ext >&5
17757
17758 fi
17759 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17760 fi
17761 done
17762 fi
17763
17764 LONG_LONG_INT_FORMAT=''
17765
17766 case $pgac_cv_snprintf_long_long_int_format in
17767   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17768 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17769   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17770 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17771          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17772   *)     echo "$as_me:$LINENO: result: none" >&5
17773 echo "${ECHO_T}none" >&6;;
17774 esac
17775     if test "$LONG_LONG_INT_FORMAT" = ""; then
17776       # Force usage of our own snprintf, since system snprintf is broken
17777       pgac_need_repl_snprintf=yes
17778       LONG_LONG_INT_FORMAT='%lld'
17779     fi
17780   else
17781     # Here if we previously decided we needed to use our own snprintf
17782     LONG_LONG_INT_FORMAT='%lld'
17783   fi
17784   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17785   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17786   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17787 else
17788   # Here if we are not using 'long long int' at all
17789   INT64_FORMAT='"%ld"'
17790   UINT64_FORMAT='"%lu"'
17791 fi
17792
17793
17794 cat >>confdefs.h <<_ACEOF
17795 #define INT64_FORMAT $INT64_FORMAT
17796 _ACEOF
17797
17798
17799
17800 cat >>confdefs.h <<_ACEOF
17801 #define UINT64_FORMAT $UINT64_FORMAT
17802 _ACEOF
17803
17804
17805 # Now we have checked all the reasons to replace snprintf
17806 if test $pgac_need_repl_snprintf = yes; then
17807
17808 cat >>confdefs.h <<\_ACEOF
17809 #define USE_REPL_SNPRINTF 1
17810 _ACEOF
17811
17812   case $LIBOBJS in
17813     "snprintf.$ac_objext"   | \
17814   *" snprintf.$ac_objext"   | \
17815     "snprintf.$ac_objext "* | \
17816   *" snprintf.$ac_objext "* ) ;;
17817   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17818 esac
17819
17820 fi
17821
17822 # Need a #define for the size of Datum (unsigned long)
17823 echo "$as_me:$LINENO: checking for unsigned long" >&5
17824 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17825 if test "${ac_cv_type_unsigned_long+set}" = set; then
17826   echo $ECHO_N "(cached) $ECHO_C" >&6
17827 else
17828   cat >conftest.$ac_ext <<_ACEOF
17829 /* confdefs.h.  */
17830 _ACEOF
17831 cat confdefs.h >>conftest.$ac_ext
17832 cat >>conftest.$ac_ext <<_ACEOF
17833 /* end confdefs.h.  */
17834 $ac_includes_default
17835 int
17836 main ()
17837 {
17838 if ((unsigned long *) 0)
17839   return 0;
17840 if (sizeof (unsigned long))
17841   return 0;
17842   ;
17843   return 0;
17844 }
17845 _ACEOF
17846 rm -f conftest.$ac_objext
17847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17848   (eval $ac_compile) 2>conftest.er1
17849   ac_status=$?
17850   grep -v '^ *+' conftest.er1 >conftest.err
17851   rm -f conftest.er1
17852   cat conftest.err >&5
17853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17854   (exit $ac_status); } &&
17855          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17857   (eval $ac_try) 2>&5
17858   ac_status=$?
17859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17860   (exit $ac_status); }; } &&
17861          { ac_try='test -s conftest.$ac_objext'
17862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17863   (eval $ac_try) 2>&5
17864   ac_status=$?
17865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17866   (exit $ac_status); }; }; then
17867   ac_cv_type_unsigned_long=yes
17868 else
17869   echo "$as_me: failed program was:" >&5
17870 sed 's/^/| /' conftest.$ac_ext >&5
17871
17872 ac_cv_type_unsigned_long=no
17873 fi
17874 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17875 fi
17876 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
17877 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
17878
17879 echo "$as_me:$LINENO: checking size of unsigned long" >&5
17880 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
17881 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
17882   echo $ECHO_N "(cached) $ECHO_C" >&6
17883 else
17884   if test "$ac_cv_type_unsigned_long" = yes; then
17885   # The cast to unsigned long works around a bug in the HP C Compiler
17886   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17887   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17888   # This bug is HP SR number 8606223364.
17889   if test "$cross_compiling" = yes; then
17890   # Depending upon the size, compute the lo and hi bounds.
17891 cat >conftest.$ac_ext <<_ACEOF
17892 /* confdefs.h.  */
17893 _ACEOF
17894 cat confdefs.h >>conftest.$ac_ext
17895 cat >>conftest.$ac_ext <<_ACEOF
17896 /* end confdefs.h.  */
17897 $ac_includes_default
17898 int
17899 main ()
17900 {
17901 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
17902 test_array [0] = 0
17903
17904   ;
17905   return 0;
17906 }
17907 _ACEOF
17908 rm -f conftest.$ac_objext
17909 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17910   (eval $ac_compile) 2>conftest.er1
17911   ac_status=$?
17912   grep -v '^ *+' conftest.er1 >conftest.err
17913   rm -f conftest.er1
17914   cat conftest.err >&5
17915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17916   (exit $ac_status); } &&
17917          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17919   (eval $ac_try) 2>&5
17920   ac_status=$?
17921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17922   (exit $ac_status); }; } &&
17923          { ac_try='test -s conftest.$ac_objext'
17924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17925   (eval $ac_try) 2>&5
17926   ac_status=$?
17927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17928   (exit $ac_status); }; }; then
17929   ac_lo=0 ac_mid=0
17930   while :; do
17931     cat >conftest.$ac_ext <<_ACEOF
17932 /* confdefs.h.  */
17933 _ACEOF
17934 cat confdefs.h >>conftest.$ac_ext
17935 cat >>conftest.$ac_ext <<_ACEOF
17936 /* end confdefs.h.  */
17937 $ac_includes_default
17938 int
17939 main ()
17940 {
17941 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17942 test_array [0] = 0
17943
17944   ;
17945   return 0;
17946 }
17947 _ACEOF
17948 rm -f conftest.$ac_objext
17949 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17950   (eval $ac_compile) 2>conftest.er1
17951   ac_status=$?
17952   grep -v '^ *+' conftest.er1 >conftest.err
17953   rm -f conftest.er1
17954   cat conftest.err >&5
17955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17956   (exit $ac_status); } &&
17957          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
17958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17959   (eval $ac_try) 2>&5
17960   ac_status=$?
17961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17962   (exit $ac_status); }; } &&
17963          { ac_try='test -s conftest.$ac_objext'
17964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17965   (eval $ac_try) 2>&5
17966   ac_status=$?
17967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17968   (exit $ac_status); }; }; then
17969   ac_hi=$ac_mid; break
17970 else
17971   echo "$as_me: failed program was:" >&5
17972 sed 's/^/| /' conftest.$ac_ext >&5
17973
17974 ac_lo=`expr $ac_mid + 1`
17975                     if test $ac_lo -le $ac_mid; then
17976                       ac_lo= ac_hi=
17977                       break
17978                     fi
17979                     ac_mid=`expr 2 '*' $ac_mid + 1`
17980 fi
17981 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17982   done
17983 else
17984   echo "$as_me: failed program was:" >&5
17985 sed 's/^/| /' conftest.$ac_ext >&5
17986
17987 cat >conftest.$ac_ext <<_ACEOF
17988 /* confdefs.h.  */
17989 _ACEOF
17990 cat confdefs.h >>conftest.$ac_ext
17991 cat >>conftest.$ac_ext <<_ACEOF
17992 /* end confdefs.h.  */
17993 $ac_includes_default
17994 int
17995 main ()
17996 {
17997 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
17998 test_array [0] = 0
17999
18000   ;
18001   return 0;
18002 }
18003 _ACEOF
18004 rm -f conftest.$ac_objext
18005 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18006   (eval $ac_compile) 2>conftest.er1
18007   ac_status=$?
18008   grep -v '^ *+' conftest.er1 >conftest.err
18009   rm -f conftest.er1
18010   cat conftest.err >&5
18011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18012   (exit $ac_status); } &&
18013          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18015   (eval $ac_try) 2>&5
18016   ac_status=$?
18017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18018   (exit $ac_status); }; } &&
18019          { ac_try='test -s conftest.$ac_objext'
18020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18021   (eval $ac_try) 2>&5
18022   ac_status=$?
18023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18024   (exit $ac_status); }; }; then
18025   ac_hi=-1 ac_mid=-1
18026   while :; do
18027     cat >conftest.$ac_ext <<_ACEOF
18028 /* confdefs.h.  */
18029 _ACEOF
18030 cat confdefs.h >>conftest.$ac_ext
18031 cat >>conftest.$ac_ext <<_ACEOF
18032 /* end confdefs.h.  */
18033 $ac_includes_default
18034 int
18035 main ()
18036 {
18037 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18038 test_array [0] = 0
18039
18040   ;
18041   return 0;
18042 }
18043 _ACEOF
18044 rm -f conftest.$ac_objext
18045 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18046   (eval $ac_compile) 2>conftest.er1
18047   ac_status=$?
18048   grep -v '^ *+' conftest.er1 >conftest.err
18049   rm -f conftest.er1
18050   cat conftest.err >&5
18051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18052   (exit $ac_status); } &&
18053          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18055   (eval $ac_try) 2>&5
18056   ac_status=$?
18057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18058   (exit $ac_status); }; } &&
18059          { ac_try='test -s conftest.$ac_objext'
18060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18061   (eval $ac_try) 2>&5
18062   ac_status=$?
18063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18064   (exit $ac_status); }; }; then
18065   ac_lo=$ac_mid; break
18066 else
18067   echo "$as_me: failed program was:" >&5
18068 sed 's/^/| /' conftest.$ac_ext >&5
18069
18070 ac_hi=`expr '(' $ac_mid ')' - 1`
18071                        if test $ac_mid -le $ac_hi; then
18072                          ac_lo= ac_hi=
18073                          break
18074                        fi
18075                        ac_mid=`expr 2 '*' $ac_mid`
18076 fi
18077 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18078   done
18079 else
18080   echo "$as_me: failed program was:" >&5
18081 sed 's/^/| /' conftest.$ac_ext >&5
18082
18083 ac_lo= ac_hi=
18084 fi
18085 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18086 fi
18087 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18088 # Binary search between lo and hi bounds.
18089 while test "x$ac_lo" != "x$ac_hi"; do
18090   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18091   cat >conftest.$ac_ext <<_ACEOF
18092 /* confdefs.h.  */
18093 _ACEOF
18094 cat confdefs.h >>conftest.$ac_ext
18095 cat >>conftest.$ac_ext <<_ACEOF
18096 /* end confdefs.h.  */
18097 $ac_includes_default
18098 int
18099 main ()
18100 {
18101 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18102 test_array [0] = 0
18103
18104   ;
18105   return 0;
18106 }
18107 _ACEOF
18108 rm -f conftest.$ac_objext
18109 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18110   (eval $ac_compile) 2>conftest.er1
18111   ac_status=$?
18112   grep -v '^ *+' conftest.er1 >conftest.err
18113   rm -f conftest.er1
18114   cat conftest.err >&5
18115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18116   (exit $ac_status); } &&
18117          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18119   (eval $ac_try) 2>&5
18120   ac_status=$?
18121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18122   (exit $ac_status); }; } &&
18123          { ac_try='test -s conftest.$ac_objext'
18124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18125   (eval $ac_try) 2>&5
18126   ac_status=$?
18127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18128   (exit $ac_status); }; }; then
18129   ac_hi=$ac_mid
18130 else
18131   echo "$as_me: failed program was:" >&5
18132 sed 's/^/| /' conftest.$ac_ext >&5
18133
18134 ac_lo=`expr '(' $ac_mid ')' + 1`
18135 fi
18136 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18137 done
18138 case $ac_lo in
18139 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18140 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18141 See \`config.log' for more details." >&5
18142 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18143 See \`config.log' for more details." >&2;}
18144    { (exit 1); exit 1; }; } ;;
18145 esac
18146 else
18147   if test "$cross_compiling" = yes; then
18148   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
18149 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
18150    { (exit 1); exit 1; }; }
18151 else
18152   cat >conftest.$ac_ext <<_ACEOF
18153 /* confdefs.h.  */
18154 _ACEOF
18155 cat confdefs.h >>conftest.$ac_ext
18156 cat >>conftest.$ac_ext <<_ACEOF
18157 /* end confdefs.h.  */
18158 $ac_includes_default
18159 long longval () { return (long) (sizeof (unsigned long)); }
18160 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18161 #include <stdio.h>
18162 #include <stdlib.h>
18163 int
18164 main ()
18165 {
18166
18167   FILE *f = fopen ("conftest.val", "w");
18168   if (! f)
18169     exit (1);
18170   if (((long) (sizeof (unsigned long))) < 0)
18171     {
18172       long i = longval ();
18173       if (i != ((long) (sizeof (unsigned long))))
18174         exit (1);
18175       fprintf (f, "%ld\n", i);
18176     }
18177   else
18178     {
18179       unsigned long i = ulongval ();
18180       if (i != ((long) (sizeof (unsigned long))))
18181         exit (1);
18182       fprintf (f, "%lu\n", i);
18183     }
18184   exit (ferror (f) || fclose (f) != 0);
18185
18186   ;
18187   return 0;
18188 }
18189 _ACEOF
18190 rm -f conftest$ac_exeext
18191 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18192   (eval $ac_link) 2>&5
18193   ac_status=$?
18194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18195   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18197   (eval $ac_try) 2>&5
18198   ac_status=$?
18199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18200   (exit $ac_status); }; }; then
18201   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18202 else
18203   echo "$as_me: program exited with status $ac_status" >&5
18204 echo "$as_me: failed program was:" >&5
18205 sed 's/^/| /' conftest.$ac_ext >&5
18206
18207 ( exit $ac_status )
18208 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18209 See \`config.log' for more details." >&5
18210 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18211 See \`config.log' for more details." >&2;}
18212    { (exit 1); exit 1; }; }
18213 fi
18214 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18215 fi
18216 fi
18217 rm -f conftest.val
18218 else
18219   ac_cv_sizeof_unsigned_long=0
18220 fi
18221 fi
18222 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18223 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18224 cat >>confdefs.h <<_ACEOF
18225 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18226 _ACEOF
18227
18228
18229
18230 # And one for the size of size_t (enables tweaks for > 32bit address space)
18231 echo "$as_me:$LINENO: checking for size_t" >&5
18232 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18233 if test "${ac_cv_type_size_t+set}" = set; then
18234   echo $ECHO_N "(cached) $ECHO_C" >&6
18235 else
18236   cat >conftest.$ac_ext <<_ACEOF
18237 /* confdefs.h.  */
18238 _ACEOF
18239 cat confdefs.h >>conftest.$ac_ext
18240 cat >>conftest.$ac_ext <<_ACEOF
18241 /* end confdefs.h.  */
18242 $ac_includes_default
18243 int
18244 main ()
18245 {
18246 if ((size_t *) 0)
18247   return 0;
18248 if (sizeof (size_t))
18249   return 0;
18250   ;
18251   return 0;
18252 }
18253 _ACEOF
18254 rm -f conftest.$ac_objext
18255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18256   (eval $ac_compile) 2>conftest.er1
18257   ac_status=$?
18258   grep -v '^ *+' conftest.er1 >conftest.err
18259   rm -f conftest.er1
18260   cat conftest.err >&5
18261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18262   (exit $ac_status); } &&
18263          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18265   (eval $ac_try) 2>&5
18266   ac_status=$?
18267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18268   (exit $ac_status); }; } &&
18269          { ac_try='test -s conftest.$ac_objext'
18270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18271   (eval $ac_try) 2>&5
18272   ac_status=$?
18273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18274   (exit $ac_status); }; }; then
18275   ac_cv_type_size_t=yes
18276 else
18277   echo "$as_me: failed program was:" >&5
18278 sed 's/^/| /' conftest.$ac_ext >&5
18279
18280 ac_cv_type_size_t=no
18281 fi
18282 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18283 fi
18284 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18285 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18286
18287 echo "$as_me:$LINENO: checking size of size_t" >&5
18288 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18289 if test "${ac_cv_sizeof_size_t+set}" = set; then
18290   echo $ECHO_N "(cached) $ECHO_C" >&6
18291 else
18292   if test "$ac_cv_type_size_t" = yes; then
18293   # The cast to unsigned long works around a bug in the HP C Compiler
18294   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18295   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18296   # This bug is HP SR number 8606223364.
18297   if test "$cross_compiling" = yes; then
18298   # Depending upon the size, compute the lo and hi bounds.
18299 cat >conftest.$ac_ext <<_ACEOF
18300 /* confdefs.h.  */
18301 _ACEOF
18302 cat confdefs.h >>conftest.$ac_ext
18303 cat >>conftest.$ac_ext <<_ACEOF
18304 /* end confdefs.h.  */
18305 $ac_includes_default
18306 int
18307 main ()
18308 {
18309 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18310 test_array [0] = 0
18311
18312   ;
18313   return 0;
18314 }
18315 _ACEOF
18316 rm -f conftest.$ac_objext
18317 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18318   (eval $ac_compile) 2>conftest.er1
18319   ac_status=$?
18320   grep -v '^ *+' conftest.er1 >conftest.err
18321   rm -f conftest.er1
18322   cat conftest.err >&5
18323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18324   (exit $ac_status); } &&
18325          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18327   (eval $ac_try) 2>&5
18328   ac_status=$?
18329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18330   (exit $ac_status); }; } &&
18331          { ac_try='test -s conftest.$ac_objext'
18332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18333   (eval $ac_try) 2>&5
18334   ac_status=$?
18335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18336   (exit $ac_status); }; }; then
18337   ac_lo=0 ac_mid=0
18338   while :; do
18339     cat >conftest.$ac_ext <<_ACEOF
18340 /* confdefs.h.  */
18341 _ACEOF
18342 cat confdefs.h >>conftest.$ac_ext
18343 cat >>conftest.$ac_ext <<_ACEOF
18344 /* end confdefs.h.  */
18345 $ac_includes_default
18346 int
18347 main ()
18348 {
18349 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18350 test_array [0] = 0
18351
18352   ;
18353   return 0;
18354 }
18355 _ACEOF
18356 rm -f conftest.$ac_objext
18357 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18358   (eval $ac_compile) 2>conftest.er1
18359   ac_status=$?
18360   grep -v '^ *+' conftest.er1 >conftest.err
18361   rm -f conftest.er1
18362   cat conftest.err >&5
18363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18364   (exit $ac_status); } &&
18365          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18367   (eval $ac_try) 2>&5
18368   ac_status=$?
18369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18370   (exit $ac_status); }; } &&
18371          { ac_try='test -s conftest.$ac_objext'
18372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18373   (eval $ac_try) 2>&5
18374   ac_status=$?
18375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18376   (exit $ac_status); }; }; then
18377   ac_hi=$ac_mid; break
18378 else
18379   echo "$as_me: failed program was:" >&5
18380 sed 's/^/| /' conftest.$ac_ext >&5
18381
18382 ac_lo=`expr $ac_mid + 1`
18383                     if test $ac_lo -le $ac_mid; then
18384                       ac_lo= ac_hi=
18385                       break
18386                     fi
18387                     ac_mid=`expr 2 '*' $ac_mid + 1`
18388 fi
18389 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18390   done
18391 else
18392   echo "$as_me: failed program was:" >&5
18393 sed 's/^/| /' conftest.$ac_ext >&5
18394
18395 cat >conftest.$ac_ext <<_ACEOF
18396 /* confdefs.h.  */
18397 _ACEOF
18398 cat confdefs.h >>conftest.$ac_ext
18399 cat >>conftest.$ac_ext <<_ACEOF
18400 /* end confdefs.h.  */
18401 $ac_includes_default
18402 int
18403 main ()
18404 {
18405 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18406 test_array [0] = 0
18407
18408   ;
18409   return 0;
18410 }
18411 _ACEOF
18412 rm -f conftest.$ac_objext
18413 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18414   (eval $ac_compile) 2>conftest.er1
18415   ac_status=$?
18416   grep -v '^ *+' conftest.er1 >conftest.err
18417   rm -f conftest.er1
18418   cat conftest.err >&5
18419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18420   (exit $ac_status); } &&
18421          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18423   (eval $ac_try) 2>&5
18424   ac_status=$?
18425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18426   (exit $ac_status); }; } &&
18427          { ac_try='test -s conftest.$ac_objext'
18428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18429   (eval $ac_try) 2>&5
18430   ac_status=$?
18431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18432   (exit $ac_status); }; }; then
18433   ac_hi=-1 ac_mid=-1
18434   while :; do
18435     cat >conftest.$ac_ext <<_ACEOF
18436 /* confdefs.h.  */
18437 _ACEOF
18438 cat confdefs.h >>conftest.$ac_ext
18439 cat >>conftest.$ac_ext <<_ACEOF
18440 /* end confdefs.h.  */
18441 $ac_includes_default
18442 int
18443 main ()
18444 {
18445 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18446 test_array [0] = 0
18447
18448   ;
18449   return 0;
18450 }
18451 _ACEOF
18452 rm -f conftest.$ac_objext
18453 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18454   (eval $ac_compile) 2>conftest.er1
18455   ac_status=$?
18456   grep -v '^ *+' conftest.er1 >conftest.err
18457   rm -f conftest.er1
18458   cat conftest.err >&5
18459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18460   (exit $ac_status); } &&
18461          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18463   (eval $ac_try) 2>&5
18464   ac_status=$?
18465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18466   (exit $ac_status); }; } &&
18467          { ac_try='test -s conftest.$ac_objext'
18468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18469   (eval $ac_try) 2>&5
18470   ac_status=$?
18471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18472   (exit $ac_status); }; }; then
18473   ac_lo=$ac_mid; break
18474 else
18475   echo "$as_me: failed program was:" >&5
18476 sed 's/^/| /' conftest.$ac_ext >&5
18477
18478 ac_hi=`expr '(' $ac_mid ')' - 1`
18479                        if test $ac_mid -le $ac_hi; then
18480                          ac_lo= ac_hi=
18481                          break
18482                        fi
18483                        ac_mid=`expr 2 '*' $ac_mid`
18484 fi
18485 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18486   done
18487 else
18488   echo "$as_me: failed program was:" >&5
18489 sed 's/^/| /' conftest.$ac_ext >&5
18490
18491 ac_lo= ac_hi=
18492 fi
18493 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18494 fi
18495 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18496 # Binary search between lo and hi bounds.
18497 while test "x$ac_lo" != "x$ac_hi"; do
18498   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18499   cat >conftest.$ac_ext <<_ACEOF
18500 /* confdefs.h.  */
18501 _ACEOF
18502 cat confdefs.h >>conftest.$ac_ext
18503 cat >>conftest.$ac_ext <<_ACEOF
18504 /* end confdefs.h.  */
18505 $ac_includes_default
18506 int
18507 main ()
18508 {
18509 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18510 test_array [0] = 0
18511
18512   ;
18513   return 0;
18514 }
18515 _ACEOF
18516 rm -f conftest.$ac_objext
18517 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18518   (eval $ac_compile) 2>conftest.er1
18519   ac_status=$?
18520   grep -v '^ *+' conftest.er1 >conftest.err
18521   rm -f conftest.er1
18522   cat conftest.err >&5
18523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18524   (exit $ac_status); } &&
18525          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18527   (eval $ac_try) 2>&5
18528   ac_status=$?
18529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18530   (exit $ac_status); }; } &&
18531          { ac_try='test -s conftest.$ac_objext'
18532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18533   (eval $ac_try) 2>&5
18534   ac_status=$?
18535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18536   (exit $ac_status); }; }; then
18537   ac_hi=$ac_mid
18538 else
18539   echo "$as_me: failed program was:" >&5
18540 sed 's/^/| /' conftest.$ac_ext >&5
18541
18542 ac_lo=`expr '(' $ac_mid ')' + 1`
18543 fi
18544 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18545 done
18546 case $ac_lo in
18547 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18548 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18549 See \`config.log' for more details." >&5
18550 echo "$as_me: error: cannot compute sizeof (size_t), 77
18551 See \`config.log' for more details." >&2;}
18552    { (exit 1); exit 1; }; } ;;
18553 esac
18554 else
18555   if test "$cross_compiling" = yes; then
18556   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
18557 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
18558    { (exit 1); exit 1; }; }
18559 else
18560   cat >conftest.$ac_ext <<_ACEOF
18561 /* confdefs.h.  */
18562 _ACEOF
18563 cat confdefs.h >>conftest.$ac_ext
18564 cat >>conftest.$ac_ext <<_ACEOF
18565 /* end confdefs.h.  */
18566 $ac_includes_default
18567 long longval () { return (long) (sizeof (size_t)); }
18568 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18569 #include <stdio.h>
18570 #include <stdlib.h>
18571 int
18572 main ()
18573 {
18574
18575   FILE *f = fopen ("conftest.val", "w");
18576   if (! f)
18577     exit (1);
18578   if (((long) (sizeof (size_t))) < 0)
18579     {
18580       long i = longval ();
18581       if (i != ((long) (sizeof (size_t))))
18582         exit (1);
18583       fprintf (f, "%ld\n", i);
18584     }
18585   else
18586     {
18587       unsigned long i = ulongval ();
18588       if (i != ((long) (sizeof (size_t))))
18589         exit (1);
18590       fprintf (f, "%lu\n", i);
18591     }
18592   exit (ferror (f) || fclose (f) != 0);
18593
18594   ;
18595   return 0;
18596 }
18597 _ACEOF
18598 rm -f conftest$ac_exeext
18599 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18600   (eval $ac_link) 2>&5
18601   ac_status=$?
18602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18603   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18604   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18605   (eval $ac_try) 2>&5
18606   ac_status=$?
18607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18608   (exit $ac_status); }; }; then
18609   ac_cv_sizeof_size_t=`cat conftest.val`
18610 else
18611   echo "$as_me: program exited with status $ac_status" >&5
18612 echo "$as_me: failed program was:" >&5
18613 sed 's/^/| /' conftest.$ac_ext >&5
18614
18615 ( exit $ac_status )
18616 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18617 See \`config.log' for more details." >&5
18618 echo "$as_me: error: cannot compute sizeof (size_t), 77
18619 See \`config.log' for more details." >&2;}
18620    { (exit 1); exit 1; }; }
18621 fi
18622 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18623 fi
18624 fi
18625 rm -f conftest.val
18626 else
18627   ac_cv_sizeof_size_t=0
18628 fi
18629 fi
18630 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18631 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18632 cat >>confdefs.h <<_ACEOF
18633 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18634 _ACEOF
18635
18636
18637
18638 # Determine memory alignment requirements for the basic C data types.
18639
18640 echo "$as_me:$LINENO: checking for short" >&5
18641 echo $ECHO_N "checking for short... $ECHO_C" >&6
18642 if test "${ac_cv_type_short+set}" = set; then
18643   echo $ECHO_N "(cached) $ECHO_C" >&6
18644 else
18645   cat >conftest.$ac_ext <<_ACEOF
18646 /* confdefs.h.  */
18647 _ACEOF
18648 cat confdefs.h >>conftest.$ac_ext
18649 cat >>conftest.$ac_ext <<_ACEOF
18650 /* end confdefs.h.  */
18651 $ac_includes_default
18652 int
18653 main ()
18654 {
18655 if ((short *) 0)
18656   return 0;
18657 if (sizeof (short))
18658   return 0;
18659   ;
18660   return 0;
18661 }
18662 _ACEOF
18663 rm -f conftest.$ac_objext
18664 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18665   (eval $ac_compile) 2>conftest.er1
18666   ac_status=$?
18667   grep -v '^ *+' conftest.er1 >conftest.err
18668   rm -f conftest.er1
18669   cat conftest.err >&5
18670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18671   (exit $ac_status); } &&
18672          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18674   (eval $ac_try) 2>&5
18675   ac_status=$?
18676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18677   (exit $ac_status); }; } &&
18678          { ac_try='test -s conftest.$ac_objext'
18679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18680   (eval $ac_try) 2>&5
18681   ac_status=$?
18682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18683   (exit $ac_status); }; }; then
18684   ac_cv_type_short=yes
18685 else
18686   echo "$as_me: failed program was:" >&5
18687 sed 's/^/| /' conftest.$ac_ext >&5
18688
18689 ac_cv_type_short=no
18690 fi
18691 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18692 fi
18693 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18694 echo "${ECHO_T}$ac_cv_type_short" >&6
18695
18696 echo "$as_me:$LINENO: checking alignment of short" >&5
18697 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18698 if test "${pgac_cv_alignof_short+set}" = set; then
18699   echo $ECHO_N "(cached) $ECHO_C" >&6
18700 else
18701   if test "$ac_cv_type_short" = yes; then
18702   if test "$cross_compiling" = yes; then
18703   # Depending upon the size, compute the lo and hi bounds.
18704 cat >conftest.$ac_ext <<_ACEOF
18705 /* confdefs.h.  */
18706 _ACEOF
18707 cat confdefs.h >>conftest.$ac_ext
18708 cat >>conftest.$ac_ext <<_ACEOF
18709 /* end confdefs.h.  */
18710 $ac_includes_default
18711 struct { char filler; short field; } pgac_struct;
18712 int
18713 main ()
18714 {
18715 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18716 test_array [0] = 0
18717
18718   ;
18719   return 0;
18720 }
18721 _ACEOF
18722 rm -f conftest.$ac_objext
18723 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18724   (eval $ac_compile) 2>conftest.er1
18725   ac_status=$?
18726   grep -v '^ *+' conftest.er1 >conftest.err
18727   rm -f conftest.er1
18728   cat conftest.err >&5
18729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18730   (exit $ac_status); } &&
18731          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18733   (eval $ac_try) 2>&5
18734   ac_status=$?
18735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18736   (exit $ac_status); }; } &&
18737          { ac_try='test -s conftest.$ac_objext'
18738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18739   (eval $ac_try) 2>&5
18740   ac_status=$?
18741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18742   (exit $ac_status); }; }; then
18743   ac_lo=0 ac_mid=0
18744   while :; do
18745     cat >conftest.$ac_ext <<_ACEOF
18746 /* confdefs.h.  */
18747 _ACEOF
18748 cat confdefs.h >>conftest.$ac_ext
18749 cat >>conftest.$ac_ext <<_ACEOF
18750 /* end confdefs.h.  */
18751 $ac_includes_default
18752 struct { char filler; short field; } pgac_struct;
18753 int
18754 main ()
18755 {
18756 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18757 test_array [0] = 0
18758
18759   ;
18760   return 0;
18761 }
18762 _ACEOF
18763 rm -f conftest.$ac_objext
18764 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18765   (eval $ac_compile) 2>conftest.er1
18766   ac_status=$?
18767   grep -v '^ *+' conftest.er1 >conftest.err
18768   rm -f conftest.er1
18769   cat conftest.err >&5
18770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18771   (exit $ac_status); } &&
18772          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18774   (eval $ac_try) 2>&5
18775   ac_status=$?
18776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18777   (exit $ac_status); }; } &&
18778          { ac_try='test -s conftest.$ac_objext'
18779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18780   (eval $ac_try) 2>&5
18781   ac_status=$?
18782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18783   (exit $ac_status); }; }; then
18784   ac_hi=$ac_mid; break
18785 else
18786   echo "$as_me: failed program was:" >&5
18787 sed 's/^/| /' conftest.$ac_ext >&5
18788
18789 ac_lo=`expr $ac_mid + 1`
18790                     if test $ac_lo -le $ac_mid; then
18791                       ac_lo= ac_hi=
18792                       break
18793                     fi
18794                     ac_mid=`expr 2 '*' $ac_mid + 1`
18795 fi
18796 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18797   done
18798 else
18799   echo "$as_me: failed program was:" >&5
18800 sed 's/^/| /' conftest.$ac_ext >&5
18801
18802 cat >conftest.$ac_ext <<_ACEOF
18803 /* confdefs.h.  */
18804 _ACEOF
18805 cat confdefs.h >>conftest.$ac_ext
18806 cat >>conftest.$ac_ext <<_ACEOF
18807 /* end confdefs.h.  */
18808 $ac_includes_default
18809 struct { char filler; short field; } pgac_struct;
18810 int
18811 main ()
18812 {
18813 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18814 test_array [0] = 0
18815
18816   ;
18817   return 0;
18818 }
18819 _ACEOF
18820 rm -f conftest.$ac_objext
18821 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18822   (eval $ac_compile) 2>conftest.er1
18823   ac_status=$?
18824   grep -v '^ *+' conftest.er1 >conftest.err
18825   rm -f conftest.er1
18826   cat conftest.err >&5
18827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18828   (exit $ac_status); } &&
18829          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18831   (eval $ac_try) 2>&5
18832   ac_status=$?
18833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18834   (exit $ac_status); }; } &&
18835          { ac_try='test -s conftest.$ac_objext'
18836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18837   (eval $ac_try) 2>&5
18838   ac_status=$?
18839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18840   (exit $ac_status); }; }; then
18841   ac_hi=-1 ac_mid=-1
18842   while :; do
18843     cat >conftest.$ac_ext <<_ACEOF
18844 /* confdefs.h.  */
18845 _ACEOF
18846 cat confdefs.h >>conftest.$ac_ext
18847 cat >>conftest.$ac_ext <<_ACEOF
18848 /* end confdefs.h.  */
18849 $ac_includes_default
18850 struct { char filler; short field; } pgac_struct;
18851 int
18852 main ()
18853 {
18854 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18855 test_array [0] = 0
18856
18857   ;
18858   return 0;
18859 }
18860 _ACEOF
18861 rm -f conftest.$ac_objext
18862 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18863   (eval $ac_compile) 2>conftest.er1
18864   ac_status=$?
18865   grep -v '^ *+' conftest.er1 >conftest.err
18866   rm -f conftest.er1
18867   cat conftest.err >&5
18868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18869   (exit $ac_status); } &&
18870          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18872   (eval $ac_try) 2>&5
18873   ac_status=$?
18874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18875   (exit $ac_status); }; } &&
18876          { ac_try='test -s conftest.$ac_objext'
18877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18878   (eval $ac_try) 2>&5
18879   ac_status=$?
18880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18881   (exit $ac_status); }; }; then
18882   ac_lo=$ac_mid; break
18883 else
18884   echo "$as_me: failed program was:" >&5
18885 sed 's/^/| /' conftest.$ac_ext >&5
18886
18887 ac_hi=`expr '(' $ac_mid ')' - 1`
18888                        if test $ac_mid -le $ac_hi; then
18889                          ac_lo= ac_hi=
18890                          break
18891                        fi
18892                        ac_mid=`expr 2 '*' $ac_mid`
18893 fi
18894 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18895   done
18896 else
18897   echo "$as_me: failed program was:" >&5
18898 sed 's/^/| /' conftest.$ac_ext >&5
18899
18900 ac_lo= ac_hi=
18901 fi
18902 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18903 fi
18904 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18905 # Binary search between lo and hi bounds.
18906 while test "x$ac_lo" != "x$ac_hi"; do
18907   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18908   cat >conftest.$ac_ext <<_ACEOF
18909 /* confdefs.h.  */
18910 _ACEOF
18911 cat confdefs.h >>conftest.$ac_ext
18912 cat >>conftest.$ac_ext <<_ACEOF
18913 /* end confdefs.h.  */
18914 $ac_includes_default
18915 struct { char filler; short field; } pgac_struct;
18916 int
18917 main ()
18918 {
18919 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18920 test_array [0] = 0
18921
18922   ;
18923   return 0;
18924 }
18925 _ACEOF
18926 rm -f conftest.$ac_objext
18927 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18928   (eval $ac_compile) 2>conftest.er1
18929   ac_status=$?
18930   grep -v '^ *+' conftest.er1 >conftest.err
18931   rm -f conftest.er1
18932   cat conftest.err >&5
18933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18934   (exit $ac_status); } &&
18935          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
18936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18937   (eval $ac_try) 2>&5
18938   ac_status=$?
18939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18940   (exit $ac_status); }; } &&
18941          { ac_try='test -s conftest.$ac_objext'
18942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18943   (eval $ac_try) 2>&5
18944   ac_status=$?
18945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18946   (exit $ac_status); }; }; then
18947   ac_hi=$ac_mid
18948 else
18949   echo "$as_me: failed program was:" >&5
18950 sed 's/^/| /' conftest.$ac_ext >&5
18951
18952 ac_lo=`expr '(' $ac_mid ')' + 1`
18953 fi
18954 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18955 done
18956 case $ac_lo in
18957 ?*) pgac_cv_alignof_short=$ac_lo;;
18958 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18959 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18960    { (exit 1); exit 1; }; } ;;
18961 esac
18962 else
18963   if test "$cross_compiling" = yes; then
18964   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
18965 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
18966    { (exit 1); exit 1; }; }
18967 else
18968   cat >conftest.$ac_ext <<_ACEOF
18969 /* confdefs.h.  */
18970 _ACEOF
18971 cat confdefs.h >>conftest.$ac_ext
18972 cat >>conftest.$ac_ext <<_ACEOF
18973 /* end confdefs.h.  */
18974 $ac_includes_default
18975 struct { char filler; short field; } pgac_struct;
18976 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18977 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18978 #include <stdio.h>
18979 #include <stdlib.h>
18980 int
18981 main ()
18982 {
18983
18984   FILE *f = fopen ("conftest.val", "w");
18985   if (! f)
18986     exit (1);
18987   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
18988     {
18989       long i = longval ();
18990       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18991         exit (1);
18992       fprintf (f, "%ld\n", i);
18993     }
18994   else
18995     {
18996       unsigned long i = ulongval ();
18997       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18998         exit (1);
18999       fprintf (f, "%lu\n", i);
19000     }
19001   exit (ferror (f) || fclose (f) != 0);
19002
19003   ;
19004   return 0;
19005 }
19006 _ACEOF
19007 rm -f conftest$ac_exeext
19008 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19009   (eval $ac_link) 2>&5
19010   ac_status=$?
19011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19012   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19014   (eval $ac_try) 2>&5
19015   ac_status=$?
19016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19017   (exit $ac_status); }; }; then
19018   pgac_cv_alignof_short=`cat conftest.val`
19019 else
19020   echo "$as_me: program exited with status $ac_status" >&5
19021 echo "$as_me: failed program was:" >&5
19022 sed 's/^/| /' conftest.$ac_ext >&5
19023
19024 ( exit $ac_status )
19025 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19026 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19027    { (exit 1); exit 1; }; }
19028 fi
19029 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19030 fi
19031 fi
19032 rm -f conftest.val
19033 else
19034   pgac_cv_alignof_short=0
19035 fi
19036 fi
19037 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19038 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19039 cat >>confdefs.h <<_ACEOF
19040 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19041 _ACEOF
19042
19043
19044 echo "$as_me:$LINENO: checking for int" >&5
19045 echo $ECHO_N "checking for int... $ECHO_C" >&6
19046 if test "${ac_cv_type_int+set}" = set; then
19047   echo $ECHO_N "(cached) $ECHO_C" >&6
19048 else
19049   cat >conftest.$ac_ext <<_ACEOF
19050 /* confdefs.h.  */
19051 _ACEOF
19052 cat confdefs.h >>conftest.$ac_ext
19053 cat >>conftest.$ac_ext <<_ACEOF
19054 /* end confdefs.h.  */
19055 $ac_includes_default
19056 int
19057 main ()
19058 {
19059 if ((int *) 0)
19060   return 0;
19061 if (sizeof (int))
19062   return 0;
19063   ;
19064   return 0;
19065 }
19066 _ACEOF
19067 rm -f conftest.$ac_objext
19068 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19069   (eval $ac_compile) 2>conftest.er1
19070   ac_status=$?
19071   grep -v '^ *+' conftest.er1 >conftest.err
19072   rm -f conftest.er1
19073   cat conftest.err >&5
19074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19075   (exit $ac_status); } &&
19076          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19078   (eval $ac_try) 2>&5
19079   ac_status=$?
19080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19081   (exit $ac_status); }; } &&
19082          { ac_try='test -s conftest.$ac_objext'
19083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19084   (eval $ac_try) 2>&5
19085   ac_status=$?
19086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19087   (exit $ac_status); }; }; then
19088   ac_cv_type_int=yes
19089 else
19090   echo "$as_me: failed program was:" >&5
19091 sed 's/^/| /' conftest.$ac_ext >&5
19092
19093 ac_cv_type_int=no
19094 fi
19095 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19096 fi
19097 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19098 echo "${ECHO_T}$ac_cv_type_int" >&6
19099
19100 echo "$as_me:$LINENO: checking alignment of int" >&5
19101 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19102 if test "${pgac_cv_alignof_int+set}" = set; then
19103   echo $ECHO_N "(cached) $ECHO_C" >&6
19104 else
19105   if test "$ac_cv_type_int" = yes; then
19106   if test "$cross_compiling" = yes; then
19107   # Depending upon the size, compute the lo and hi bounds.
19108 cat >conftest.$ac_ext <<_ACEOF
19109 /* confdefs.h.  */
19110 _ACEOF
19111 cat confdefs.h >>conftest.$ac_ext
19112 cat >>conftest.$ac_ext <<_ACEOF
19113 /* end confdefs.h.  */
19114 $ac_includes_default
19115 struct { char filler; int field; } pgac_struct;
19116 int
19117 main ()
19118 {
19119 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19120 test_array [0] = 0
19121
19122   ;
19123   return 0;
19124 }
19125 _ACEOF
19126 rm -f conftest.$ac_objext
19127 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19128   (eval $ac_compile) 2>conftest.er1
19129   ac_status=$?
19130   grep -v '^ *+' conftest.er1 >conftest.err
19131   rm -f conftest.er1
19132   cat conftest.err >&5
19133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19134   (exit $ac_status); } &&
19135          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19137   (eval $ac_try) 2>&5
19138   ac_status=$?
19139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19140   (exit $ac_status); }; } &&
19141          { ac_try='test -s conftest.$ac_objext'
19142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19143   (eval $ac_try) 2>&5
19144   ac_status=$?
19145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19146   (exit $ac_status); }; }; then
19147   ac_lo=0 ac_mid=0
19148   while :; do
19149     cat >conftest.$ac_ext <<_ACEOF
19150 /* confdefs.h.  */
19151 _ACEOF
19152 cat confdefs.h >>conftest.$ac_ext
19153 cat >>conftest.$ac_ext <<_ACEOF
19154 /* end confdefs.h.  */
19155 $ac_includes_default
19156 struct { char filler; int field; } pgac_struct;
19157 int
19158 main ()
19159 {
19160 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19161 test_array [0] = 0
19162
19163   ;
19164   return 0;
19165 }
19166 _ACEOF
19167 rm -f conftest.$ac_objext
19168 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19169   (eval $ac_compile) 2>conftest.er1
19170   ac_status=$?
19171   grep -v '^ *+' conftest.er1 >conftest.err
19172   rm -f conftest.er1
19173   cat conftest.err >&5
19174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19175   (exit $ac_status); } &&
19176          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19178   (eval $ac_try) 2>&5
19179   ac_status=$?
19180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19181   (exit $ac_status); }; } &&
19182          { ac_try='test -s conftest.$ac_objext'
19183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19184   (eval $ac_try) 2>&5
19185   ac_status=$?
19186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19187   (exit $ac_status); }; }; then
19188   ac_hi=$ac_mid; break
19189 else
19190   echo "$as_me: failed program was:" >&5
19191 sed 's/^/| /' conftest.$ac_ext >&5
19192
19193 ac_lo=`expr $ac_mid + 1`
19194                     if test $ac_lo -le $ac_mid; then
19195                       ac_lo= ac_hi=
19196                       break
19197                     fi
19198                     ac_mid=`expr 2 '*' $ac_mid + 1`
19199 fi
19200 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19201   done
19202 else
19203   echo "$as_me: failed program was:" >&5
19204 sed 's/^/| /' conftest.$ac_ext >&5
19205
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; int field; } pgac_struct;
19214 int
19215 main ()
19216 {
19217 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19218 test_array [0] = 0
19219
19220   ;
19221   return 0;
19222 }
19223 _ACEOF
19224 rm -f conftest.$ac_objext
19225 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19226   (eval $ac_compile) 2>conftest.er1
19227   ac_status=$?
19228   grep -v '^ *+' conftest.er1 >conftest.err
19229   rm -f conftest.er1
19230   cat conftest.err >&5
19231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19232   (exit $ac_status); } &&
19233          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19235   (eval $ac_try) 2>&5
19236   ac_status=$?
19237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19238   (exit $ac_status); }; } &&
19239          { ac_try='test -s conftest.$ac_objext'
19240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19241   (eval $ac_try) 2>&5
19242   ac_status=$?
19243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19244   (exit $ac_status); }; }; then
19245   ac_hi=-1 ac_mid=-1
19246   while :; do
19247     cat >conftest.$ac_ext <<_ACEOF
19248 /* confdefs.h.  */
19249 _ACEOF
19250 cat confdefs.h >>conftest.$ac_ext
19251 cat >>conftest.$ac_ext <<_ACEOF
19252 /* end confdefs.h.  */
19253 $ac_includes_default
19254 struct { char filler; int field; } pgac_struct;
19255 int
19256 main ()
19257 {
19258 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19259 test_array [0] = 0
19260
19261   ;
19262   return 0;
19263 }
19264 _ACEOF
19265 rm -f conftest.$ac_objext
19266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19267   (eval $ac_compile) 2>conftest.er1
19268   ac_status=$?
19269   grep -v '^ *+' conftest.er1 >conftest.err
19270   rm -f conftest.er1
19271   cat conftest.err >&5
19272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19273   (exit $ac_status); } &&
19274          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19276   (eval $ac_try) 2>&5
19277   ac_status=$?
19278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19279   (exit $ac_status); }; } &&
19280          { ac_try='test -s conftest.$ac_objext'
19281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19282   (eval $ac_try) 2>&5
19283   ac_status=$?
19284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19285   (exit $ac_status); }; }; then
19286   ac_lo=$ac_mid; break
19287 else
19288   echo "$as_me: failed program was:" >&5
19289 sed 's/^/| /' conftest.$ac_ext >&5
19290
19291 ac_hi=`expr '(' $ac_mid ')' - 1`
19292                        if test $ac_mid -le $ac_hi; then
19293                          ac_lo= ac_hi=
19294                          break
19295                        fi
19296                        ac_mid=`expr 2 '*' $ac_mid`
19297 fi
19298 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19299   done
19300 else
19301   echo "$as_me: failed program was:" >&5
19302 sed 's/^/| /' conftest.$ac_ext >&5
19303
19304 ac_lo= ac_hi=
19305 fi
19306 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19307 fi
19308 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19309 # Binary search between lo and hi bounds.
19310 while test "x$ac_lo" != "x$ac_hi"; do
19311   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19312   cat >conftest.$ac_ext <<_ACEOF
19313 /* confdefs.h.  */
19314 _ACEOF
19315 cat confdefs.h >>conftest.$ac_ext
19316 cat >>conftest.$ac_ext <<_ACEOF
19317 /* end confdefs.h.  */
19318 $ac_includes_default
19319 struct { char filler; int field; } pgac_struct;
19320 int
19321 main ()
19322 {
19323 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19324 test_array [0] = 0
19325
19326   ;
19327   return 0;
19328 }
19329 _ACEOF
19330 rm -f conftest.$ac_objext
19331 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19332   (eval $ac_compile) 2>conftest.er1
19333   ac_status=$?
19334   grep -v '^ *+' conftest.er1 >conftest.err
19335   rm -f conftest.er1
19336   cat conftest.err >&5
19337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19338   (exit $ac_status); } &&
19339          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19341   (eval $ac_try) 2>&5
19342   ac_status=$?
19343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19344   (exit $ac_status); }; } &&
19345          { ac_try='test -s conftest.$ac_objext'
19346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19347   (eval $ac_try) 2>&5
19348   ac_status=$?
19349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19350   (exit $ac_status); }; }; then
19351   ac_hi=$ac_mid
19352 else
19353   echo "$as_me: failed program was:" >&5
19354 sed 's/^/| /' conftest.$ac_ext >&5
19355
19356 ac_lo=`expr '(' $ac_mid ')' + 1`
19357 fi
19358 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19359 done
19360 case $ac_lo in
19361 ?*) pgac_cv_alignof_int=$ac_lo;;
19362 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19363 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19364    { (exit 1); exit 1; }; } ;;
19365 esac
19366 else
19367   if test "$cross_compiling" = yes; then
19368   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
19369 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
19370    { (exit 1); exit 1; }; }
19371 else
19372   cat >conftest.$ac_ext <<_ACEOF
19373 /* confdefs.h.  */
19374 _ACEOF
19375 cat confdefs.h >>conftest.$ac_ext
19376 cat >>conftest.$ac_ext <<_ACEOF
19377 /* end confdefs.h.  */
19378 $ac_includes_default
19379 struct { char filler; int field; } pgac_struct;
19380 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19381 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19382 #include <stdio.h>
19383 #include <stdlib.h>
19384 int
19385 main ()
19386 {
19387
19388   FILE *f = fopen ("conftest.val", "w");
19389   if (! f)
19390     exit (1);
19391   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19392     {
19393       long i = longval ();
19394       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19395         exit (1);
19396       fprintf (f, "%ld\n", i);
19397     }
19398   else
19399     {
19400       unsigned long i = ulongval ();
19401       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19402         exit (1);
19403       fprintf (f, "%lu\n", i);
19404     }
19405   exit (ferror (f) || fclose (f) != 0);
19406
19407   ;
19408   return 0;
19409 }
19410 _ACEOF
19411 rm -f conftest$ac_exeext
19412 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19413   (eval $ac_link) 2>&5
19414   ac_status=$?
19415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19416   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19418   (eval $ac_try) 2>&5
19419   ac_status=$?
19420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19421   (exit $ac_status); }; }; then
19422   pgac_cv_alignof_int=`cat conftest.val`
19423 else
19424   echo "$as_me: program exited with status $ac_status" >&5
19425 echo "$as_me: failed program was:" >&5
19426 sed 's/^/| /' conftest.$ac_ext >&5
19427
19428 ( exit $ac_status )
19429 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19430 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19431    { (exit 1); exit 1; }; }
19432 fi
19433 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19434 fi
19435 fi
19436 rm -f conftest.val
19437 else
19438   pgac_cv_alignof_int=0
19439 fi
19440 fi
19441 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19442 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19443 cat >>confdefs.h <<_ACEOF
19444 #define ALIGNOF_INT $pgac_cv_alignof_int
19445 _ACEOF
19446
19447
19448 echo "$as_me:$LINENO: checking for long" >&5
19449 echo $ECHO_N "checking for long... $ECHO_C" >&6
19450 if test "${ac_cv_type_long+set}" = set; then
19451   echo $ECHO_N "(cached) $ECHO_C" >&6
19452 else
19453   cat >conftest.$ac_ext <<_ACEOF
19454 /* confdefs.h.  */
19455 _ACEOF
19456 cat confdefs.h >>conftest.$ac_ext
19457 cat >>conftest.$ac_ext <<_ACEOF
19458 /* end confdefs.h.  */
19459 $ac_includes_default
19460 int
19461 main ()
19462 {
19463 if ((long *) 0)
19464   return 0;
19465 if (sizeof (long))
19466   return 0;
19467   ;
19468   return 0;
19469 }
19470 _ACEOF
19471 rm -f conftest.$ac_objext
19472 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19473   (eval $ac_compile) 2>conftest.er1
19474   ac_status=$?
19475   grep -v '^ *+' conftest.er1 >conftest.err
19476   rm -f conftest.er1
19477   cat conftest.err >&5
19478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19479   (exit $ac_status); } &&
19480          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19482   (eval $ac_try) 2>&5
19483   ac_status=$?
19484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19485   (exit $ac_status); }; } &&
19486          { ac_try='test -s conftest.$ac_objext'
19487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19488   (eval $ac_try) 2>&5
19489   ac_status=$?
19490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19491   (exit $ac_status); }; }; then
19492   ac_cv_type_long=yes
19493 else
19494   echo "$as_me: failed program was:" >&5
19495 sed 's/^/| /' conftest.$ac_ext >&5
19496
19497 ac_cv_type_long=no
19498 fi
19499 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19500 fi
19501 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19502 echo "${ECHO_T}$ac_cv_type_long" >&6
19503
19504 echo "$as_me:$LINENO: checking alignment of long" >&5
19505 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19506 if test "${pgac_cv_alignof_long+set}" = set; then
19507   echo $ECHO_N "(cached) $ECHO_C" >&6
19508 else
19509   if test "$ac_cv_type_long" = yes; then
19510   if test "$cross_compiling" = yes; then
19511   # Depending upon the size, compute the lo and hi bounds.
19512 cat >conftest.$ac_ext <<_ACEOF
19513 /* confdefs.h.  */
19514 _ACEOF
19515 cat confdefs.h >>conftest.$ac_ext
19516 cat >>conftest.$ac_ext <<_ACEOF
19517 /* end confdefs.h.  */
19518 $ac_includes_default
19519 struct { char filler; long field; } pgac_struct;
19520 int
19521 main ()
19522 {
19523 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19524 test_array [0] = 0
19525
19526   ;
19527   return 0;
19528 }
19529 _ACEOF
19530 rm -f conftest.$ac_objext
19531 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19532   (eval $ac_compile) 2>conftest.er1
19533   ac_status=$?
19534   grep -v '^ *+' conftest.er1 >conftest.err
19535   rm -f conftest.er1
19536   cat conftest.err >&5
19537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19538   (exit $ac_status); } &&
19539          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19541   (eval $ac_try) 2>&5
19542   ac_status=$?
19543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19544   (exit $ac_status); }; } &&
19545          { ac_try='test -s conftest.$ac_objext'
19546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19547   (eval $ac_try) 2>&5
19548   ac_status=$?
19549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19550   (exit $ac_status); }; }; then
19551   ac_lo=0 ac_mid=0
19552   while :; do
19553     cat >conftest.$ac_ext <<_ACEOF
19554 /* confdefs.h.  */
19555 _ACEOF
19556 cat confdefs.h >>conftest.$ac_ext
19557 cat >>conftest.$ac_ext <<_ACEOF
19558 /* end confdefs.h.  */
19559 $ac_includes_default
19560 struct { char filler; long field; } pgac_struct;
19561 int
19562 main ()
19563 {
19564 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19565 test_array [0] = 0
19566
19567   ;
19568   return 0;
19569 }
19570 _ACEOF
19571 rm -f conftest.$ac_objext
19572 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19573   (eval $ac_compile) 2>conftest.er1
19574   ac_status=$?
19575   grep -v '^ *+' conftest.er1 >conftest.err
19576   rm -f conftest.er1
19577   cat conftest.err >&5
19578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19579   (exit $ac_status); } &&
19580          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19582   (eval $ac_try) 2>&5
19583   ac_status=$?
19584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19585   (exit $ac_status); }; } &&
19586          { ac_try='test -s conftest.$ac_objext'
19587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19588   (eval $ac_try) 2>&5
19589   ac_status=$?
19590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19591   (exit $ac_status); }; }; then
19592   ac_hi=$ac_mid; break
19593 else
19594   echo "$as_me: failed program was:" >&5
19595 sed 's/^/| /' conftest.$ac_ext >&5
19596
19597 ac_lo=`expr $ac_mid + 1`
19598                     if test $ac_lo -le $ac_mid; then
19599                       ac_lo= ac_hi=
19600                       break
19601                     fi
19602                     ac_mid=`expr 2 '*' $ac_mid + 1`
19603 fi
19604 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19605   done
19606 else
19607   echo "$as_me: failed program was:" >&5
19608 sed 's/^/| /' conftest.$ac_ext >&5
19609
19610 cat >conftest.$ac_ext <<_ACEOF
19611 /* confdefs.h.  */
19612 _ACEOF
19613 cat confdefs.h >>conftest.$ac_ext
19614 cat >>conftest.$ac_ext <<_ACEOF
19615 /* end confdefs.h.  */
19616 $ac_includes_default
19617 struct { char filler; long field; } pgac_struct;
19618 int
19619 main ()
19620 {
19621 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19622 test_array [0] = 0
19623
19624   ;
19625   return 0;
19626 }
19627 _ACEOF
19628 rm -f conftest.$ac_objext
19629 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19630   (eval $ac_compile) 2>conftest.er1
19631   ac_status=$?
19632   grep -v '^ *+' conftest.er1 >conftest.err
19633   rm -f conftest.er1
19634   cat conftest.err >&5
19635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19636   (exit $ac_status); } &&
19637          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19639   (eval $ac_try) 2>&5
19640   ac_status=$?
19641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19642   (exit $ac_status); }; } &&
19643          { ac_try='test -s conftest.$ac_objext'
19644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19645   (eval $ac_try) 2>&5
19646   ac_status=$?
19647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19648   (exit $ac_status); }; }; then
19649   ac_hi=-1 ac_mid=-1
19650   while :; do
19651     cat >conftest.$ac_ext <<_ACEOF
19652 /* confdefs.h.  */
19653 _ACEOF
19654 cat confdefs.h >>conftest.$ac_ext
19655 cat >>conftest.$ac_ext <<_ACEOF
19656 /* end confdefs.h.  */
19657 $ac_includes_default
19658 struct { char filler; long field; } pgac_struct;
19659 int
19660 main ()
19661 {
19662 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19663 test_array [0] = 0
19664
19665   ;
19666   return 0;
19667 }
19668 _ACEOF
19669 rm -f conftest.$ac_objext
19670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19671   (eval $ac_compile) 2>conftest.er1
19672   ac_status=$?
19673   grep -v '^ *+' conftest.er1 >conftest.err
19674   rm -f conftest.er1
19675   cat conftest.err >&5
19676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19677   (exit $ac_status); } &&
19678          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19680   (eval $ac_try) 2>&5
19681   ac_status=$?
19682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19683   (exit $ac_status); }; } &&
19684          { ac_try='test -s conftest.$ac_objext'
19685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19686   (eval $ac_try) 2>&5
19687   ac_status=$?
19688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19689   (exit $ac_status); }; }; then
19690   ac_lo=$ac_mid; break
19691 else
19692   echo "$as_me: failed program was:" >&5
19693 sed 's/^/| /' conftest.$ac_ext >&5
19694
19695 ac_hi=`expr '(' $ac_mid ')' - 1`
19696                        if test $ac_mid -le $ac_hi; then
19697                          ac_lo= ac_hi=
19698                          break
19699                        fi
19700                        ac_mid=`expr 2 '*' $ac_mid`
19701 fi
19702 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19703   done
19704 else
19705   echo "$as_me: failed program was:" >&5
19706 sed 's/^/| /' conftest.$ac_ext >&5
19707
19708 ac_lo= ac_hi=
19709 fi
19710 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19711 fi
19712 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19713 # Binary search between lo and hi bounds.
19714 while test "x$ac_lo" != "x$ac_hi"; do
19715   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19716   cat >conftest.$ac_ext <<_ACEOF
19717 /* confdefs.h.  */
19718 _ACEOF
19719 cat confdefs.h >>conftest.$ac_ext
19720 cat >>conftest.$ac_ext <<_ACEOF
19721 /* end confdefs.h.  */
19722 $ac_includes_default
19723 struct { char filler; long field; } pgac_struct;
19724 int
19725 main ()
19726 {
19727 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19728 test_array [0] = 0
19729
19730   ;
19731   return 0;
19732 }
19733 _ACEOF
19734 rm -f conftest.$ac_objext
19735 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19736   (eval $ac_compile) 2>conftest.er1
19737   ac_status=$?
19738   grep -v '^ *+' conftest.er1 >conftest.err
19739   rm -f conftest.er1
19740   cat conftest.err >&5
19741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19742   (exit $ac_status); } &&
19743          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19745   (eval $ac_try) 2>&5
19746   ac_status=$?
19747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19748   (exit $ac_status); }; } &&
19749          { ac_try='test -s conftest.$ac_objext'
19750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19751   (eval $ac_try) 2>&5
19752   ac_status=$?
19753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19754   (exit $ac_status); }; }; then
19755   ac_hi=$ac_mid
19756 else
19757   echo "$as_me: failed program was:" >&5
19758 sed 's/^/| /' conftest.$ac_ext >&5
19759
19760 ac_lo=`expr '(' $ac_mid ')' + 1`
19761 fi
19762 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19763 done
19764 case $ac_lo in
19765 ?*) pgac_cv_alignof_long=$ac_lo;;
19766 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19767 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19768    { (exit 1); exit 1; }; } ;;
19769 esac
19770 else
19771   if test "$cross_compiling" = yes; then
19772   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
19773 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
19774    { (exit 1); exit 1; }; }
19775 else
19776   cat >conftest.$ac_ext <<_ACEOF
19777 /* confdefs.h.  */
19778 _ACEOF
19779 cat confdefs.h >>conftest.$ac_ext
19780 cat >>conftest.$ac_ext <<_ACEOF
19781 /* end confdefs.h.  */
19782 $ac_includes_default
19783 struct { char filler; long field; } pgac_struct;
19784 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19785 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19786 #include <stdio.h>
19787 #include <stdlib.h>
19788 int
19789 main ()
19790 {
19791
19792   FILE *f = fopen ("conftest.val", "w");
19793   if (! f)
19794     exit (1);
19795   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19796     {
19797       long i = longval ();
19798       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19799         exit (1);
19800       fprintf (f, "%ld\n", i);
19801     }
19802   else
19803     {
19804       unsigned long i = ulongval ();
19805       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19806         exit (1);
19807       fprintf (f, "%lu\n", i);
19808     }
19809   exit (ferror (f) || fclose (f) != 0);
19810
19811   ;
19812   return 0;
19813 }
19814 _ACEOF
19815 rm -f conftest$ac_exeext
19816 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19817   (eval $ac_link) 2>&5
19818   ac_status=$?
19819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19820   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19822   (eval $ac_try) 2>&5
19823   ac_status=$?
19824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19825   (exit $ac_status); }; }; then
19826   pgac_cv_alignof_long=`cat conftest.val`
19827 else
19828   echo "$as_me: program exited with status $ac_status" >&5
19829 echo "$as_me: failed program was:" >&5
19830 sed 's/^/| /' conftest.$ac_ext >&5
19831
19832 ( exit $ac_status )
19833 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19834 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19835    { (exit 1); exit 1; }; }
19836 fi
19837 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19838 fi
19839 fi
19840 rm -f conftest.val
19841 else
19842   pgac_cv_alignof_long=0
19843 fi
19844 fi
19845 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
19846 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
19847 cat >>confdefs.h <<_ACEOF
19848 #define ALIGNOF_LONG $pgac_cv_alignof_long
19849 _ACEOF
19850
19851
19852 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
19853   echo "$as_me:$LINENO: checking for long long int" >&5
19854 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
19855 if test "${ac_cv_type_long_long_int+set}" = set; then
19856   echo $ECHO_N "(cached) $ECHO_C" >&6
19857 else
19858   cat >conftest.$ac_ext <<_ACEOF
19859 /* confdefs.h.  */
19860 _ACEOF
19861 cat confdefs.h >>conftest.$ac_ext
19862 cat >>conftest.$ac_ext <<_ACEOF
19863 /* end confdefs.h.  */
19864 $ac_includes_default
19865 int
19866 main ()
19867 {
19868 if ((long long int *) 0)
19869   return 0;
19870 if (sizeof (long long int))
19871   return 0;
19872   ;
19873   return 0;
19874 }
19875 _ACEOF
19876 rm -f conftest.$ac_objext
19877 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19878   (eval $ac_compile) 2>conftest.er1
19879   ac_status=$?
19880   grep -v '^ *+' conftest.er1 >conftest.err
19881   rm -f conftest.er1
19882   cat conftest.err >&5
19883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19884   (exit $ac_status); } &&
19885          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19887   (eval $ac_try) 2>&5
19888   ac_status=$?
19889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19890   (exit $ac_status); }; } &&
19891          { ac_try='test -s conftest.$ac_objext'
19892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19893   (eval $ac_try) 2>&5
19894   ac_status=$?
19895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19896   (exit $ac_status); }; }; then
19897   ac_cv_type_long_long_int=yes
19898 else
19899   echo "$as_me: failed program was:" >&5
19900 sed 's/^/| /' conftest.$ac_ext >&5
19901
19902 ac_cv_type_long_long_int=no
19903 fi
19904 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19905 fi
19906 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
19907 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
19908
19909 echo "$as_me:$LINENO: checking alignment of long long int" >&5
19910 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
19911 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
19912   echo $ECHO_N "(cached) $ECHO_C" >&6
19913 else
19914   if test "$ac_cv_type_long_long_int" = yes; then
19915   if test "$cross_compiling" = yes; then
19916   # Depending upon the size, compute the lo and hi bounds.
19917 cat >conftest.$ac_ext <<_ACEOF
19918 /* confdefs.h.  */
19919 _ACEOF
19920 cat confdefs.h >>conftest.$ac_ext
19921 cat >>conftest.$ac_ext <<_ACEOF
19922 /* end confdefs.h.  */
19923 $ac_includes_default
19924 struct { char filler; long long int field; } pgac_struct;
19925 int
19926 main ()
19927 {
19928 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19929 test_array [0] = 0
19930
19931   ;
19932   return 0;
19933 }
19934 _ACEOF
19935 rm -f conftest.$ac_objext
19936 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19937   (eval $ac_compile) 2>conftest.er1
19938   ac_status=$?
19939   grep -v '^ *+' conftest.er1 >conftest.err
19940   rm -f conftest.er1
19941   cat conftest.err >&5
19942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19943   (exit $ac_status); } &&
19944          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19946   (eval $ac_try) 2>&5
19947   ac_status=$?
19948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19949   (exit $ac_status); }; } &&
19950          { ac_try='test -s conftest.$ac_objext'
19951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19952   (eval $ac_try) 2>&5
19953   ac_status=$?
19954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19955   (exit $ac_status); }; }; then
19956   ac_lo=0 ac_mid=0
19957   while :; do
19958     cat >conftest.$ac_ext <<_ACEOF
19959 /* confdefs.h.  */
19960 _ACEOF
19961 cat confdefs.h >>conftest.$ac_ext
19962 cat >>conftest.$ac_ext <<_ACEOF
19963 /* end confdefs.h.  */
19964 $ac_includes_default
19965 struct { char filler; long long int field; } pgac_struct;
19966 int
19967 main ()
19968 {
19969 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19970 test_array [0] = 0
19971
19972   ;
19973   return 0;
19974 }
19975 _ACEOF
19976 rm -f conftest.$ac_objext
19977 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19978   (eval $ac_compile) 2>conftest.er1
19979   ac_status=$?
19980   grep -v '^ *+' conftest.er1 >conftest.err
19981   rm -f conftest.er1
19982   cat conftest.err >&5
19983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19984   (exit $ac_status); } &&
19985          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
19986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19987   (eval $ac_try) 2>&5
19988   ac_status=$?
19989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19990   (exit $ac_status); }; } &&
19991          { ac_try='test -s conftest.$ac_objext'
19992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19993   (eval $ac_try) 2>&5
19994   ac_status=$?
19995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19996   (exit $ac_status); }; }; then
19997   ac_hi=$ac_mid; break
19998 else
19999   echo "$as_me: failed program was:" >&5
20000 sed 's/^/| /' conftest.$ac_ext >&5
20001
20002 ac_lo=`expr $ac_mid + 1`
20003                     if test $ac_lo -le $ac_mid; then
20004                       ac_lo= ac_hi=
20005                       break
20006                     fi
20007                     ac_mid=`expr 2 '*' $ac_mid + 1`
20008 fi
20009 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20010   done
20011 else
20012   echo "$as_me: failed program was:" >&5
20013 sed 's/^/| /' conftest.$ac_ext >&5
20014
20015 cat >conftest.$ac_ext <<_ACEOF
20016 /* confdefs.h.  */
20017 _ACEOF
20018 cat confdefs.h >>conftest.$ac_ext
20019 cat >>conftest.$ac_ext <<_ACEOF
20020 /* end confdefs.h.  */
20021 $ac_includes_default
20022 struct { char filler; long long int field; } pgac_struct;
20023 int
20024 main ()
20025 {
20026 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20027 test_array [0] = 0
20028
20029   ;
20030   return 0;
20031 }
20032 _ACEOF
20033 rm -f conftest.$ac_objext
20034 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20035   (eval $ac_compile) 2>conftest.er1
20036   ac_status=$?
20037   grep -v '^ *+' conftest.er1 >conftest.err
20038   rm -f conftest.er1
20039   cat conftest.err >&5
20040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20041   (exit $ac_status); } &&
20042          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20044   (eval $ac_try) 2>&5
20045   ac_status=$?
20046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20047   (exit $ac_status); }; } &&
20048          { ac_try='test -s conftest.$ac_objext'
20049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20050   (eval $ac_try) 2>&5
20051   ac_status=$?
20052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20053   (exit $ac_status); }; }; then
20054   ac_hi=-1 ac_mid=-1
20055   while :; do
20056     cat >conftest.$ac_ext <<_ACEOF
20057 /* confdefs.h.  */
20058 _ACEOF
20059 cat confdefs.h >>conftest.$ac_ext
20060 cat >>conftest.$ac_ext <<_ACEOF
20061 /* end confdefs.h.  */
20062 $ac_includes_default
20063 struct { char filler; long long int field; } pgac_struct;
20064 int
20065 main ()
20066 {
20067 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20068 test_array [0] = 0
20069
20070   ;
20071   return 0;
20072 }
20073 _ACEOF
20074 rm -f conftest.$ac_objext
20075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20076   (eval $ac_compile) 2>conftest.er1
20077   ac_status=$?
20078   grep -v '^ *+' conftest.er1 >conftest.err
20079   rm -f conftest.er1
20080   cat conftest.err >&5
20081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20082   (exit $ac_status); } &&
20083          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20085   (eval $ac_try) 2>&5
20086   ac_status=$?
20087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20088   (exit $ac_status); }; } &&
20089          { ac_try='test -s conftest.$ac_objext'
20090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20091   (eval $ac_try) 2>&5
20092   ac_status=$?
20093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20094   (exit $ac_status); }; }; then
20095   ac_lo=$ac_mid; break
20096 else
20097   echo "$as_me: failed program was:" >&5
20098 sed 's/^/| /' conftest.$ac_ext >&5
20099
20100 ac_hi=`expr '(' $ac_mid ')' - 1`
20101                        if test $ac_mid -le $ac_hi; then
20102                          ac_lo= ac_hi=
20103                          break
20104                        fi
20105                        ac_mid=`expr 2 '*' $ac_mid`
20106 fi
20107 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20108   done
20109 else
20110   echo "$as_me: failed program was:" >&5
20111 sed 's/^/| /' conftest.$ac_ext >&5
20112
20113 ac_lo= ac_hi=
20114 fi
20115 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20116 fi
20117 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20118 # Binary search between lo and hi bounds.
20119 while test "x$ac_lo" != "x$ac_hi"; do
20120   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20121   cat >conftest.$ac_ext <<_ACEOF
20122 /* confdefs.h.  */
20123 _ACEOF
20124 cat confdefs.h >>conftest.$ac_ext
20125 cat >>conftest.$ac_ext <<_ACEOF
20126 /* end confdefs.h.  */
20127 $ac_includes_default
20128 struct { char filler; long long int field; } pgac_struct;
20129 int
20130 main ()
20131 {
20132 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20133 test_array [0] = 0
20134
20135   ;
20136   return 0;
20137 }
20138 _ACEOF
20139 rm -f conftest.$ac_objext
20140 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20141   (eval $ac_compile) 2>conftest.er1
20142   ac_status=$?
20143   grep -v '^ *+' conftest.er1 >conftest.err
20144   rm -f conftest.er1
20145   cat conftest.err >&5
20146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20147   (exit $ac_status); } &&
20148          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20150   (eval $ac_try) 2>&5
20151   ac_status=$?
20152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20153   (exit $ac_status); }; } &&
20154          { ac_try='test -s conftest.$ac_objext'
20155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20156   (eval $ac_try) 2>&5
20157   ac_status=$?
20158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20159   (exit $ac_status); }; }; then
20160   ac_hi=$ac_mid
20161 else
20162   echo "$as_me: failed program was:" >&5
20163 sed 's/^/| /' conftest.$ac_ext >&5
20164
20165 ac_lo=`expr '(' $ac_mid ')' + 1`
20166 fi
20167 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20168 done
20169 case $ac_lo in
20170 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20171 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20172 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20173    { (exit 1); exit 1; }; } ;;
20174 esac
20175 else
20176   if test "$cross_compiling" = yes; then
20177   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
20178 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
20179    { (exit 1); exit 1; }; }
20180 else
20181   cat >conftest.$ac_ext <<_ACEOF
20182 /* confdefs.h.  */
20183 _ACEOF
20184 cat confdefs.h >>conftest.$ac_ext
20185 cat >>conftest.$ac_ext <<_ACEOF
20186 /* end confdefs.h.  */
20187 $ac_includes_default
20188 struct { char filler; long long int field; } pgac_struct;
20189 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20190 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20191 #include <stdio.h>
20192 #include <stdlib.h>
20193 int
20194 main ()
20195 {
20196
20197   FILE *f = fopen ("conftest.val", "w");
20198   if (! f)
20199     exit (1);
20200   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20201     {
20202       long i = longval ();
20203       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20204         exit (1);
20205       fprintf (f, "%ld\n", i);
20206     }
20207   else
20208     {
20209       unsigned long i = ulongval ();
20210       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20211         exit (1);
20212       fprintf (f, "%lu\n", i);
20213     }
20214   exit (ferror (f) || fclose (f) != 0);
20215
20216   ;
20217   return 0;
20218 }
20219 _ACEOF
20220 rm -f conftest$ac_exeext
20221 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20222   (eval $ac_link) 2>&5
20223   ac_status=$?
20224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20225   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20227   (eval $ac_try) 2>&5
20228   ac_status=$?
20229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20230   (exit $ac_status); }; }; then
20231   pgac_cv_alignof_long_long_int=`cat conftest.val`
20232 else
20233   echo "$as_me: program exited with status $ac_status" >&5
20234 echo "$as_me: failed program was:" >&5
20235 sed 's/^/| /' conftest.$ac_ext >&5
20236
20237 ( exit $ac_status )
20238 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20239 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20240    { (exit 1); exit 1; }; }
20241 fi
20242 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20243 fi
20244 fi
20245 rm -f conftest.val
20246 else
20247   pgac_cv_alignof_long_long_int=0
20248 fi
20249 fi
20250 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20251 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20252 cat >>confdefs.h <<_ACEOF
20253 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20254 _ACEOF
20255
20256
20257 fi
20258 echo "$as_me:$LINENO: checking for double" >&5
20259 echo $ECHO_N "checking for double... $ECHO_C" >&6
20260 if test "${ac_cv_type_double+set}" = set; then
20261   echo $ECHO_N "(cached) $ECHO_C" >&6
20262 else
20263   cat >conftest.$ac_ext <<_ACEOF
20264 /* confdefs.h.  */
20265 _ACEOF
20266 cat confdefs.h >>conftest.$ac_ext
20267 cat >>conftest.$ac_ext <<_ACEOF
20268 /* end confdefs.h.  */
20269 $ac_includes_default
20270 int
20271 main ()
20272 {
20273 if ((double *) 0)
20274   return 0;
20275 if (sizeof (double))
20276   return 0;
20277   ;
20278   return 0;
20279 }
20280 _ACEOF
20281 rm -f conftest.$ac_objext
20282 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20283   (eval $ac_compile) 2>conftest.er1
20284   ac_status=$?
20285   grep -v '^ *+' conftest.er1 >conftest.err
20286   rm -f conftest.er1
20287   cat conftest.err >&5
20288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20289   (exit $ac_status); } &&
20290          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20292   (eval $ac_try) 2>&5
20293   ac_status=$?
20294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20295   (exit $ac_status); }; } &&
20296          { ac_try='test -s conftest.$ac_objext'
20297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20298   (eval $ac_try) 2>&5
20299   ac_status=$?
20300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20301   (exit $ac_status); }; }; then
20302   ac_cv_type_double=yes
20303 else
20304   echo "$as_me: failed program was:" >&5
20305 sed 's/^/| /' conftest.$ac_ext >&5
20306
20307 ac_cv_type_double=no
20308 fi
20309 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20310 fi
20311 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20312 echo "${ECHO_T}$ac_cv_type_double" >&6
20313
20314 echo "$as_me:$LINENO: checking alignment of double" >&5
20315 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20316 if test "${pgac_cv_alignof_double+set}" = set; then
20317   echo $ECHO_N "(cached) $ECHO_C" >&6
20318 else
20319   if test "$ac_cv_type_double" = yes; then
20320   if test "$cross_compiling" = yes; then
20321   # Depending upon the size, compute the lo and hi bounds.
20322 cat >conftest.$ac_ext <<_ACEOF
20323 /* confdefs.h.  */
20324 _ACEOF
20325 cat confdefs.h >>conftest.$ac_ext
20326 cat >>conftest.$ac_ext <<_ACEOF
20327 /* end confdefs.h.  */
20328 $ac_includes_default
20329 struct { char filler; double field; } pgac_struct;
20330 int
20331 main ()
20332 {
20333 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20334 test_array [0] = 0
20335
20336   ;
20337   return 0;
20338 }
20339 _ACEOF
20340 rm -f conftest.$ac_objext
20341 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20342   (eval $ac_compile) 2>conftest.er1
20343   ac_status=$?
20344   grep -v '^ *+' conftest.er1 >conftest.err
20345   rm -f conftest.er1
20346   cat conftest.err >&5
20347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20348   (exit $ac_status); } &&
20349          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20351   (eval $ac_try) 2>&5
20352   ac_status=$?
20353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20354   (exit $ac_status); }; } &&
20355          { ac_try='test -s conftest.$ac_objext'
20356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20357   (eval $ac_try) 2>&5
20358   ac_status=$?
20359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20360   (exit $ac_status); }; }; then
20361   ac_lo=0 ac_mid=0
20362   while :; do
20363     cat >conftest.$ac_ext <<_ACEOF
20364 /* confdefs.h.  */
20365 _ACEOF
20366 cat confdefs.h >>conftest.$ac_ext
20367 cat >>conftest.$ac_ext <<_ACEOF
20368 /* end confdefs.h.  */
20369 $ac_includes_default
20370 struct { char filler; double field; } pgac_struct;
20371 int
20372 main ()
20373 {
20374 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20375 test_array [0] = 0
20376
20377   ;
20378   return 0;
20379 }
20380 _ACEOF
20381 rm -f conftest.$ac_objext
20382 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20383   (eval $ac_compile) 2>conftest.er1
20384   ac_status=$?
20385   grep -v '^ *+' conftest.er1 >conftest.err
20386   rm -f conftest.er1
20387   cat conftest.err >&5
20388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20389   (exit $ac_status); } &&
20390          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20392   (eval $ac_try) 2>&5
20393   ac_status=$?
20394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20395   (exit $ac_status); }; } &&
20396          { ac_try='test -s conftest.$ac_objext'
20397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20398   (eval $ac_try) 2>&5
20399   ac_status=$?
20400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20401   (exit $ac_status); }; }; then
20402   ac_hi=$ac_mid; break
20403 else
20404   echo "$as_me: failed program was:" >&5
20405 sed 's/^/| /' conftest.$ac_ext >&5
20406
20407 ac_lo=`expr $ac_mid + 1`
20408                     if test $ac_lo -le $ac_mid; then
20409                       ac_lo= ac_hi=
20410                       break
20411                     fi
20412                     ac_mid=`expr 2 '*' $ac_mid + 1`
20413 fi
20414 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20415   done
20416 else
20417   echo "$as_me: failed program was:" >&5
20418 sed 's/^/| /' conftest.$ac_ext >&5
20419
20420 cat >conftest.$ac_ext <<_ACEOF
20421 /* confdefs.h.  */
20422 _ACEOF
20423 cat confdefs.h >>conftest.$ac_ext
20424 cat >>conftest.$ac_ext <<_ACEOF
20425 /* end confdefs.h.  */
20426 $ac_includes_default
20427 struct { char filler; double field; } pgac_struct;
20428 int
20429 main ()
20430 {
20431 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20432 test_array [0] = 0
20433
20434   ;
20435   return 0;
20436 }
20437 _ACEOF
20438 rm -f conftest.$ac_objext
20439 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20440   (eval $ac_compile) 2>conftest.er1
20441   ac_status=$?
20442   grep -v '^ *+' conftest.er1 >conftest.err
20443   rm -f conftest.er1
20444   cat conftest.err >&5
20445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20446   (exit $ac_status); } &&
20447          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20449   (eval $ac_try) 2>&5
20450   ac_status=$?
20451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20452   (exit $ac_status); }; } &&
20453          { ac_try='test -s conftest.$ac_objext'
20454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20455   (eval $ac_try) 2>&5
20456   ac_status=$?
20457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20458   (exit $ac_status); }; }; then
20459   ac_hi=-1 ac_mid=-1
20460   while :; do
20461     cat >conftest.$ac_ext <<_ACEOF
20462 /* confdefs.h.  */
20463 _ACEOF
20464 cat confdefs.h >>conftest.$ac_ext
20465 cat >>conftest.$ac_ext <<_ACEOF
20466 /* end confdefs.h.  */
20467 $ac_includes_default
20468 struct { char filler; double field; } pgac_struct;
20469 int
20470 main ()
20471 {
20472 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20473 test_array [0] = 0
20474
20475   ;
20476   return 0;
20477 }
20478 _ACEOF
20479 rm -f conftest.$ac_objext
20480 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20481   (eval $ac_compile) 2>conftest.er1
20482   ac_status=$?
20483   grep -v '^ *+' conftest.er1 >conftest.err
20484   rm -f conftest.er1
20485   cat conftest.err >&5
20486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20487   (exit $ac_status); } &&
20488          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20490   (eval $ac_try) 2>&5
20491   ac_status=$?
20492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20493   (exit $ac_status); }; } &&
20494          { ac_try='test -s conftest.$ac_objext'
20495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20496   (eval $ac_try) 2>&5
20497   ac_status=$?
20498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20499   (exit $ac_status); }; }; then
20500   ac_lo=$ac_mid; break
20501 else
20502   echo "$as_me: failed program was:" >&5
20503 sed 's/^/| /' conftest.$ac_ext >&5
20504
20505 ac_hi=`expr '(' $ac_mid ')' - 1`
20506                        if test $ac_mid -le $ac_hi; then
20507                          ac_lo= ac_hi=
20508                          break
20509                        fi
20510                        ac_mid=`expr 2 '*' $ac_mid`
20511 fi
20512 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20513   done
20514 else
20515   echo "$as_me: failed program was:" >&5
20516 sed 's/^/| /' conftest.$ac_ext >&5
20517
20518 ac_lo= ac_hi=
20519 fi
20520 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20521 fi
20522 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20523 # Binary search between lo and hi bounds.
20524 while test "x$ac_lo" != "x$ac_hi"; do
20525   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20526   cat >conftest.$ac_ext <<_ACEOF
20527 /* confdefs.h.  */
20528 _ACEOF
20529 cat confdefs.h >>conftest.$ac_ext
20530 cat >>conftest.$ac_ext <<_ACEOF
20531 /* end confdefs.h.  */
20532 $ac_includes_default
20533 struct { char filler; double field; } pgac_struct;
20534 int
20535 main ()
20536 {
20537 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20538 test_array [0] = 0
20539
20540   ;
20541   return 0;
20542 }
20543 _ACEOF
20544 rm -f conftest.$ac_objext
20545 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20546   (eval $ac_compile) 2>conftest.er1
20547   ac_status=$?
20548   grep -v '^ *+' conftest.er1 >conftest.err
20549   rm -f conftest.er1
20550   cat conftest.err >&5
20551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20552   (exit $ac_status); } &&
20553          { ac_try='test -z "$ac_c_werror_flag"                   || 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_hi=$ac_mid
20566 else
20567   echo "$as_me: failed program was:" >&5
20568 sed 's/^/| /' conftest.$ac_ext >&5
20569
20570 ac_lo=`expr '(' $ac_mid ')' + 1`
20571 fi
20572 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20573 done
20574 case $ac_lo in
20575 ?*) pgac_cv_alignof_double=$ac_lo;;
20576 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20577 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20578    { (exit 1); exit 1; }; } ;;
20579 esac
20580 else
20581   if test "$cross_compiling" = yes; then
20582   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
20583 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
20584    { (exit 1); exit 1; }; }
20585 else
20586   cat >conftest.$ac_ext <<_ACEOF
20587 /* confdefs.h.  */
20588 _ACEOF
20589 cat confdefs.h >>conftest.$ac_ext
20590 cat >>conftest.$ac_ext <<_ACEOF
20591 /* end confdefs.h.  */
20592 $ac_includes_default
20593 struct { char filler; double field; } pgac_struct;
20594 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20595 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20596 #include <stdio.h>
20597 #include <stdlib.h>
20598 int
20599 main ()
20600 {
20601
20602   FILE *f = fopen ("conftest.val", "w");
20603   if (! f)
20604     exit (1);
20605   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20606     {
20607       long i = longval ();
20608       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20609         exit (1);
20610       fprintf (f, "%ld\n", i);
20611     }
20612   else
20613     {
20614       unsigned long i = ulongval ();
20615       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20616         exit (1);
20617       fprintf (f, "%lu\n", i);
20618     }
20619   exit (ferror (f) || fclose (f) != 0);
20620
20621   ;
20622   return 0;
20623 }
20624 _ACEOF
20625 rm -f conftest$ac_exeext
20626 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20627   (eval $ac_link) 2>&5
20628   ac_status=$?
20629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20630   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20632   (eval $ac_try) 2>&5
20633   ac_status=$?
20634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20635   (exit $ac_status); }; }; then
20636   pgac_cv_alignof_double=`cat conftest.val`
20637 else
20638   echo "$as_me: program exited with status $ac_status" >&5
20639 echo "$as_me: failed program was:" >&5
20640 sed 's/^/| /' conftest.$ac_ext >&5
20641
20642 ( exit $ac_status )
20643 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20644 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20645    { (exit 1); exit 1; }; }
20646 fi
20647 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20648 fi
20649 fi
20650 rm -f conftest.val
20651 else
20652   pgac_cv_alignof_double=0
20653 fi
20654 fi
20655 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20656 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20657 cat >>confdefs.h <<_ACEOF
20658 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20659 _ACEOF
20660
20661
20662
20663 # Compute maximum alignment of any basic type.
20664 # We assume long's alignment is at least as strong as char, short, or int;
20665 # but we must check long long (if it exists) and double.
20666
20667 MAX_ALIGNOF=$pgac_cv_alignof_long
20668 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20669   MAX_ALIGNOF=$pgac_cv_alignof_double
20670 fi
20671 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20672   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20673 fi
20674
20675 cat >>confdefs.h <<_ACEOF
20676 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20677 _ACEOF
20678
20679
20680
20681 # Some platforms predefine the types int8, int16, etc.  Only check
20682 # a (hopefully) representative subset.
20683 echo "$as_me:$LINENO: checking for int8" >&5
20684 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20685 if test "${ac_cv_type_int8+set}" = set; then
20686   echo $ECHO_N "(cached) $ECHO_C" >&6
20687 else
20688   cat >conftest.$ac_ext <<_ACEOF
20689 /* confdefs.h.  */
20690 _ACEOF
20691 cat confdefs.h >>conftest.$ac_ext
20692 cat >>conftest.$ac_ext <<_ACEOF
20693 /* end confdefs.h.  */
20694 #include <stdio.h>
20695 #ifdef HAVE_SUPPORTDEFS_H
20696 #include <SupportDefs.h>
20697 #endif
20698
20699 int
20700 main ()
20701 {
20702 if ((int8 *) 0)
20703   return 0;
20704 if (sizeof (int8))
20705   return 0;
20706   ;
20707   return 0;
20708 }
20709 _ACEOF
20710 rm -f conftest.$ac_objext
20711 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20712   (eval $ac_compile) 2>conftest.er1
20713   ac_status=$?
20714   grep -v '^ *+' conftest.er1 >conftest.err
20715   rm -f conftest.er1
20716   cat conftest.err >&5
20717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20718   (exit $ac_status); } &&
20719          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
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); }; } &&
20725          { ac_try='test -s conftest.$ac_objext'
20726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20727   (eval $ac_try) 2>&5
20728   ac_status=$?
20729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20730   (exit $ac_status); }; }; then
20731   ac_cv_type_int8=yes
20732 else
20733   echo "$as_me: failed program was:" >&5
20734 sed 's/^/| /' conftest.$ac_ext >&5
20735
20736 ac_cv_type_int8=no
20737 fi
20738 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20739 fi
20740 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20741 echo "${ECHO_T}$ac_cv_type_int8" >&6
20742 if test $ac_cv_type_int8 = yes; then
20743
20744 cat >>confdefs.h <<_ACEOF
20745 #define HAVE_INT8 1
20746 _ACEOF
20747
20748
20749 fi
20750 echo "$as_me:$LINENO: checking for uint8" >&5
20751 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20752 if test "${ac_cv_type_uint8+set}" = set; then
20753   echo $ECHO_N "(cached) $ECHO_C" >&6
20754 else
20755   cat >conftest.$ac_ext <<_ACEOF
20756 /* confdefs.h.  */
20757 _ACEOF
20758 cat confdefs.h >>conftest.$ac_ext
20759 cat >>conftest.$ac_ext <<_ACEOF
20760 /* end confdefs.h.  */
20761 #include <stdio.h>
20762 #ifdef HAVE_SUPPORTDEFS_H
20763 #include <SupportDefs.h>
20764 #endif
20765
20766 int
20767 main ()
20768 {
20769 if ((uint8 *) 0)
20770   return 0;
20771 if (sizeof (uint8))
20772   return 0;
20773   ;
20774   return 0;
20775 }
20776 _ACEOF
20777 rm -f conftest.$ac_objext
20778 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20779   (eval $ac_compile) 2>conftest.er1
20780   ac_status=$?
20781   grep -v '^ *+' conftest.er1 >conftest.err
20782   rm -f conftest.er1
20783   cat conftest.err >&5
20784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20785   (exit $ac_status); } &&
20786          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20788   (eval $ac_try) 2>&5
20789   ac_status=$?
20790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20791   (exit $ac_status); }; } &&
20792          { ac_try='test -s conftest.$ac_objext'
20793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20794   (eval $ac_try) 2>&5
20795   ac_status=$?
20796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20797   (exit $ac_status); }; }; then
20798   ac_cv_type_uint8=yes
20799 else
20800   echo "$as_me: failed program was:" >&5
20801 sed 's/^/| /' conftest.$ac_ext >&5
20802
20803 ac_cv_type_uint8=no
20804 fi
20805 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20806 fi
20807 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20808 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20809 if test $ac_cv_type_uint8 = yes; then
20810
20811 cat >>confdefs.h <<_ACEOF
20812 #define HAVE_UINT8 1
20813 _ACEOF
20814
20815
20816 fi
20817 echo "$as_me:$LINENO: checking for int64" >&5
20818 echo $ECHO_N "checking for int64... $ECHO_C" >&6
20819 if test "${ac_cv_type_int64+set}" = set; then
20820   echo $ECHO_N "(cached) $ECHO_C" >&6
20821 else
20822   cat >conftest.$ac_ext <<_ACEOF
20823 /* confdefs.h.  */
20824 _ACEOF
20825 cat confdefs.h >>conftest.$ac_ext
20826 cat >>conftest.$ac_ext <<_ACEOF
20827 /* end confdefs.h.  */
20828 #include <stdio.h>
20829 #ifdef HAVE_SUPPORTDEFS_H
20830 #include <SupportDefs.h>
20831 #endif
20832
20833 int
20834 main ()
20835 {
20836 if ((int64 *) 0)
20837   return 0;
20838 if (sizeof (int64))
20839   return 0;
20840   ;
20841   return 0;
20842 }
20843 _ACEOF
20844 rm -f conftest.$ac_objext
20845 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20846   (eval $ac_compile) 2>conftest.er1
20847   ac_status=$?
20848   grep -v '^ *+' conftest.er1 >conftest.err
20849   rm -f conftest.er1
20850   cat conftest.err >&5
20851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20852   (exit $ac_status); } &&
20853          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20855   (eval $ac_try) 2>&5
20856   ac_status=$?
20857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20858   (exit $ac_status); }; } &&
20859          { ac_try='test -s conftest.$ac_objext'
20860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20861   (eval $ac_try) 2>&5
20862   ac_status=$?
20863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20864   (exit $ac_status); }; }; then
20865   ac_cv_type_int64=yes
20866 else
20867   echo "$as_me: failed program was:" >&5
20868 sed 's/^/| /' conftest.$ac_ext >&5
20869
20870 ac_cv_type_int64=no
20871 fi
20872 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20873 fi
20874 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
20875 echo "${ECHO_T}$ac_cv_type_int64" >&6
20876 if test $ac_cv_type_int64 = yes; then
20877
20878 cat >>confdefs.h <<_ACEOF
20879 #define HAVE_INT64 1
20880 _ACEOF
20881
20882
20883 fi
20884 echo "$as_me:$LINENO: checking for uint64" >&5
20885 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
20886 if test "${ac_cv_type_uint64+set}" = set; then
20887   echo $ECHO_N "(cached) $ECHO_C" >&6
20888 else
20889   cat >conftest.$ac_ext <<_ACEOF
20890 /* confdefs.h.  */
20891 _ACEOF
20892 cat confdefs.h >>conftest.$ac_ext
20893 cat >>conftest.$ac_ext <<_ACEOF
20894 /* end confdefs.h.  */
20895 #include <stdio.h>
20896 #ifdef HAVE_SUPPORTDEFS_H
20897 #include <SupportDefs.h>
20898 #endif
20899
20900 int
20901 main ()
20902 {
20903 if ((uint64 *) 0)
20904   return 0;
20905 if (sizeof (uint64))
20906   return 0;
20907   ;
20908   return 0;
20909 }
20910 _ACEOF
20911 rm -f conftest.$ac_objext
20912 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20913   (eval $ac_compile) 2>conftest.er1
20914   ac_status=$?
20915   grep -v '^ *+' conftest.er1 >conftest.err
20916   rm -f conftest.er1
20917   cat conftest.err >&5
20918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20919   (exit $ac_status); } &&
20920          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20922   (eval $ac_try) 2>&5
20923   ac_status=$?
20924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20925   (exit $ac_status); }; } &&
20926          { ac_try='test -s conftest.$ac_objext'
20927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20928   (eval $ac_try) 2>&5
20929   ac_status=$?
20930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20931   (exit $ac_status); }; }; then
20932   ac_cv_type_uint64=yes
20933 else
20934   echo "$as_me: failed program was:" >&5
20935 sed 's/^/| /' conftest.$ac_ext >&5
20936
20937 ac_cv_type_uint64=no
20938 fi
20939 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20940 fi
20941 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
20942 echo "${ECHO_T}$ac_cv_type_uint64" >&6
20943 if test $ac_cv_type_uint64 = yes; then
20944
20945 cat >>confdefs.h <<_ACEOF
20946 #define HAVE_UINT64 1
20947 _ACEOF
20948
20949
20950 fi
20951
20952
20953 # We also check for sig_atomic_t, which *should* be defined per ANSI
20954 # C, but is missing on some old platforms.
20955 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
20956 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
20957 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
20958   echo $ECHO_N "(cached) $ECHO_C" >&6
20959 else
20960   cat >conftest.$ac_ext <<_ACEOF
20961 /* confdefs.h.  */
20962 _ACEOF
20963 cat confdefs.h >>conftest.$ac_ext
20964 cat >>conftest.$ac_ext <<_ACEOF
20965 /* end confdefs.h.  */
20966 #include <signal.h>
20967
20968 int
20969 main ()
20970 {
20971 if ((sig_atomic_t *) 0)
20972   return 0;
20973 if (sizeof (sig_atomic_t))
20974   return 0;
20975   ;
20976   return 0;
20977 }
20978 _ACEOF
20979 rm -f conftest.$ac_objext
20980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20981   (eval $ac_compile) 2>conftest.er1
20982   ac_status=$?
20983   grep -v '^ *+' conftest.er1 >conftest.err
20984   rm -f conftest.er1
20985   cat conftest.err >&5
20986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20987   (exit $ac_status); } &&
20988          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
20989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20990   (eval $ac_try) 2>&5
20991   ac_status=$?
20992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20993   (exit $ac_status); }; } &&
20994          { ac_try='test -s conftest.$ac_objext'
20995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20996   (eval $ac_try) 2>&5
20997   ac_status=$?
20998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20999   (exit $ac_status); }; }; then
21000   ac_cv_type_sig_atomic_t=yes
21001 else
21002   echo "$as_me: failed program was:" >&5
21003 sed 's/^/| /' conftest.$ac_ext >&5
21004
21005 ac_cv_type_sig_atomic_t=no
21006 fi
21007 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21008 fi
21009 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21010 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21011 if test $ac_cv_type_sig_atomic_t = yes; then
21012
21013 cat >>confdefs.h <<_ACEOF
21014 #define HAVE_SIG_ATOMIC_T 1
21015 _ACEOF
21016
21017
21018 fi
21019
21020
21021
21022 if test x"$template" != x"win32"
21023 then
21024 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21025 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21026 if test "${pgac_cv_func_posix_signals+set}" = set; then
21027   echo $ECHO_N "(cached) $ECHO_C" >&6
21028 else
21029   cat >conftest.$ac_ext <<_ACEOF
21030 /* confdefs.h.  */
21031 _ACEOF
21032 cat confdefs.h >>conftest.$ac_ext
21033 cat >>conftest.$ac_ext <<_ACEOF
21034 /* end confdefs.h.  */
21035 #include <signal.h>
21036
21037 int
21038 main ()
21039 {
21040 struct sigaction act, oact;
21041 sigemptyset(&act.sa_mask);
21042 act.sa_flags = SA_RESTART;
21043 sigaction(0, &act, &oact);
21044   ;
21045   return 0;
21046 }
21047 _ACEOF
21048 rm -f conftest.$ac_objext conftest$ac_exeext
21049 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21050   (eval $ac_link) 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"                   || test ! -s conftest.err'
21058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21059   (eval $ac_try) 2>&5
21060   ac_status=$?
21061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21062   (exit $ac_status); }; } &&
21063          { ac_try='test -s conftest$ac_exeext'
21064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21065   (eval $ac_try) 2>&5
21066   ac_status=$?
21067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21068   (exit $ac_status); }; }; then
21069   pgac_cv_func_posix_signals=yes
21070 else
21071   echo "$as_me: failed program was:" >&5
21072 sed 's/^/| /' conftest.$ac_ext >&5
21073
21074 pgac_cv_func_posix_signals=no
21075 fi
21076 rm -f conftest.err conftest.$ac_objext \
21077       conftest$ac_exeext conftest.$ac_ext
21078 fi
21079 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21080 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21081 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21082
21083 cat >>confdefs.h <<\_ACEOF
21084 #define HAVE_POSIX_SIGNALS
21085 _ACEOF
21086
21087 fi
21088 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21089
21090 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21091   { { echo "$as_me:$LINENO: error:
21092 *** Thread-safety requires POSIX signals, which are not supported by your
21093 *** operating system.
21094 " >&5
21095 echo "$as_me: error:
21096 *** Thread-safety requires POSIX signals, which are not supported by your
21097 *** operating system.
21098 " >&2;}
21099    { (exit 1); exit 1; }; }
21100 fi
21101 fi
21102
21103 if test $ac_cv_func_fseeko = yes; then
21104 # Check whether --enable-largefile or --disable-largefile was given.
21105 if test "${enable_largefile+set}" = set; then
21106   enableval="$enable_largefile"
21107
21108 fi;
21109 if test "$enable_largefile" != no; then
21110
21111   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21112 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21113 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21114   echo $ECHO_N "(cached) $ECHO_C" >&6
21115 else
21116   ac_cv_sys_largefile_CC=no
21117      if test "$GCC" != yes; then
21118        ac_save_CC=$CC
21119        while :; do
21120          # IRIX 6.2 and later do not support large files by default,
21121          # so use the C compiler's -n32 option if that helps.
21122          cat >conftest.$ac_ext <<_ACEOF
21123 /* confdefs.h.  */
21124 _ACEOF
21125 cat confdefs.h >>conftest.$ac_ext
21126 cat >>conftest.$ac_ext <<_ACEOF
21127 /* end confdefs.h.  */
21128 #include <sys/types.h>
21129  /* Check that off_t can represent 2**63 - 1 correctly.
21130     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21131     since some C++ compilers masquerading as C compilers
21132     incorrectly reject 9223372036854775807.  */
21133 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21134   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21135                        && LARGE_OFF_T % 2147483647 == 1)
21136                       ? 1 : -1];
21137 int
21138 main ()
21139 {
21140
21141   ;
21142   return 0;
21143 }
21144 _ACEOF
21145          rm -f conftest.$ac_objext
21146 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21147   (eval $ac_compile) 2>conftest.er1
21148   ac_status=$?
21149   grep -v '^ *+' conftest.er1 >conftest.err
21150   rm -f conftest.er1
21151   cat conftest.err >&5
21152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21153   (exit $ac_status); } &&
21154          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
21155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21156   (eval $ac_try) 2>&5
21157   ac_status=$?
21158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21159   (exit $ac_status); }; } &&
21160          { ac_try='test -s conftest.$ac_objext'
21161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21162   (eval $ac_try) 2>&5
21163   ac_status=$?
21164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21165   (exit $ac_status); }; }; then
21166   break
21167 else
21168   echo "$as_me: failed program was:" >&5
21169 sed 's/^/| /' conftest.$ac_ext >&5
21170
21171 fi
21172 rm -f conftest.err conftest.$ac_objext
21173          CC="$CC -n32"
21174          rm -f conftest.$ac_objext
21175 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21176   (eval $ac_compile) 2>conftest.er1
21177   ac_status=$?
21178   grep -v '^ *+' conftest.er1 >conftest.err
21179   rm -f conftest.er1
21180   cat conftest.err >&5
21181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21182   (exit $ac_status); } &&
21183          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
21184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21185   (eval $ac_try) 2>&5
21186   ac_status=$?
21187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21188   (exit $ac_status); }; } &&
21189          { ac_try='test -s conftest.$ac_objext'
21190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21191   (eval $ac_try) 2>&5
21192   ac_status=$?
21193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21194   (exit $ac_status); }; }; then
21195   ac_cv_sys_largefile_CC=' -n32'; break
21196 else
21197   echo "$as_me: failed program was:" >&5
21198 sed 's/^/| /' conftest.$ac_ext >&5
21199
21200 fi
21201 rm -f conftest.err conftest.$ac_objext
21202          break
21203        done
21204        CC=$ac_save_CC
21205        rm -f conftest.$ac_ext
21206     fi
21207 fi
21208 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21209 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21210   if test "$ac_cv_sys_largefile_CC" != no; then
21211     CC=$CC$ac_cv_sys_largefile_CC
21212   fi
21213
21214   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21215 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21216 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21217   echo $ECHO_N "(cached) $ECHO_C" >&6
21218 else
21219   while :; do
21220   ac_cv_sys_file_offset_bits=no
21221   cat >conftest.$ac_ext <<_ACEOF
21222 /* confdefs.h.  */
21223 _ACEOF
21224 cat confdefs.h >>conftest.$ac_ext
21225 cat >>conftest.$ac_ext <<_ACEOF
21226 /* end confdefs.h.  */
21227 #include <sys/types.h>
21228  /* Check that off_t can represent 2**63 - 1 correctly.
21229     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21230     since some C++ compilers masquerading as C compilers
21231     incorrectly reject 9223372036854775807.  */
21232 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21233   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21234                        && LARGE_OFF_T % 2147483647 == 1)
21235                       ? 1 : -1];
21236 int
21237 main ()
21238 {
21239
21240   ;
21241   return 0;
21242 }
21243 _ACEOF
21244 rm -f conftest.$ac_objext
21245 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21246   (eval $ac_compile) 2>conftest.er1
21247   ac_status=$?
21248   grep -v '^ *+' conftest.er1 >conftest.err
21249   rm -f conftest.er1
21250   cat conftest.err >&5
21251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21252   (exit $ac_status); } &&
21253          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
21254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21255   (eval $ac_try) 2>&5
21256   ac_status=$?
21257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21258   (exit $ac_status); }; } &&
21259          { ac_try='test -s conftest.$ac_objext'
21260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21261   (eval $ac_try) 2>&5
21262   ac_status=$?
21263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21264   (exit $ac_status); }; }; then
21265   break
21266 else
21267   echo "$as_me: failed program was:" >&5
21268 sed 's/^/| /' conftest.$ac_ext >&5
21269
21270 fi
21271 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21272   cat >conftest.$ac_ext <<_ACEOF
21273 /* confdefs.h.  */
21274 _ACEOF
21275 cat confdefs.h >>conftest.$ac_ext
21276 cat >>conftest.$ac_ext <<_ACEOF
21277 /* end confdefs.h.  */
21278 #define _FILE_OFFSET_BITS 64
21279 #include <sys/types.h>
21280  /* Check that off_t can represent 2**63 - 1 correctly.
21281     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21282     since some C++ compilers masquerading as C compilers
21283     incorrectly reject 9223372036854775807.  */
21284 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21285   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21286                        && LARGE_OFF_T % 2147483647 == 1)
21287                       ? 1 : -1];
21288 int
21289 main ()
21290 {
21291
21292   ;
21293   return 0;
21294 }
21295 _ACEOF
21296 rm -f conftest.$ac_objext
21297 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21298   (eval $ac_compile) 2>conftest.er1
21299   ac_status=$?
21300   grep -v '^ *+' conftest.er1 >conftest.err
21301   rm -f conftest.er1
21302   cat conftest.err >&5
21303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21304   (exit $ac_status); } &&
21305          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
21306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21307   (eval $ac_try) 2>&5
21308   ac_status=$?
21309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21310   (exit $ac_status); }; } &&
21311          { ac_try='test -s conftest.$ac_objext'
21312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21313   (eval $ac_try) 2>&5
21314   ac_status=$?
21315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21316   (exit $ac_status); }; }; then
21317   ac_cv_sys_file_offset_bits=64; break
21318 else
21319   echo "$as_me: failed program was:" >&5
21320 sed 's/^/| /' conftest.$ac_ext >&5
21321
21322 fi
21323 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21324   break
21325 done
21326 fi
21327 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21328 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21329 if test "$ac_cv_sys_file_offset_bits" != no; then
21330
21331 cat >>confdefs.h <<_ACEOF
21332 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21333 _ACEOF
21334
21335 fi
21336 rm -f conftest*
21337   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21338 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21339 if test "${ac_cv_sys_large_files+set}" = set; then
21340   echo $ECHO_N "(cached) $ECHO_C" >&6
21341 else
21342   while :; do
21343   ac_cv_sys_large_files=no
21344   cat >conftest.$ac_ext <<_ACEOF
21345 /* confdefs.h.  */
21346 _ACEOF
21347 cat confdefs.h >>conftest.$ac_ext
21348 cat >>conftest.$ac_ext <<_ACEOF
21349 /* end confdefs.h.  */
21350 #include <sys/types.h>
21351  /* Check that off_t can represent 2**63 - 1 correctly.
21352     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21353     since some C++ compilers masquerading as C compilers
21354     incorrectly reject 9223372036854775807.  */
21355 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21356   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21357                        && LARGE_OFF_T % 2147483647 == 1)
21358                       ? 1 : -1];
21359 int
21360 main ()
21361 {
21362
21363   ;
21364   return 0;
21365 }
21366 _ACEOF
21367 rm -f conftest.$ac_objext
21368 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21369   (eval $ac_compile) 2>conftest.er1
21370   ac_status=$?
21371   grep -v '^ *+' conftest.er1 >conftest.err
21372   rm -f conftest.er1
21373   cat conftest.err >&5
21374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21375   (exit $ac_status); } &&
21376          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
21377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21378   (eval $ac_try) 2>&5
21379   ac_status=$?
21380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21381   (exit $ac_status); }; } &&
21382          { ac_try='test -s conftest.$ac_objext'
21383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21384   (eval $ac_try) 2>&5
21385   ac_status=$?
21386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21387   (exit $ac_status); }; }; then
21388   break
21389 else
21390   echo "$as_me: failed program was:" >&5
21391 sed 's/^/| /' conftest.$ac_ext >&5
21392
21393 fi
21394 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21395   cat >conftest.$ac_ext <<_ACEOF
21396 /* confdefs.h.  */
21397 _ACEOF
21398 cat confdefs.h >>conftest.$ac_ext
21399 cat >>conftest.$ac_ext <<_ACEOF
21400 /* end confdefs.h.  */
21401 #define _LARGE_FILES 1
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"                   || test ! -s conftest.err'
21429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21430   (eval $ac_try) 2>&5
21431   ac_status=$?
21432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21433   (exit $ac_status); }; } &&
21434          { ac_try='test -s conftest.$ac_objext'
21435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21436   (eval $ac_try) 2>&5
21437   ac_status=$?
21438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21439   (exit $ac_status); }; }; then
21440   ac_cv_sys_large_files=1; break
21441 else
21442   echo "$as_me: failed program was:" >&5
21443 sed 's/^/| /' conftest.$ac_ext >&5
21444
21445 fi
21446 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21447   break
21448 done
21449 fi
21450 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21451 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21452 if test "$ac_cv_sys_large_files" != no; then
21453
21454 cat >>confdefs.h <<_ACEOF
21455 #define _LARGE_FILES $ac_cv_sys_large_files
21456 _ACEOF
21457
21458 fi
21459 rm -f conftest*
21460 fi
21461
21462 fi
21463
21464 # SunOS doesn't handle negative byte comparisons properly with +/- return
21465 echo "$as_me:$LINENO: checking for working memcmp" >&5
21466 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21467 if test "${ac_cv_func_memcmp_working+set}" = set; then
21468   echo $ECHO_N "(cached) $ECHO_C" >&6
21469 else
21470   if test "$cross_compiling" = yes; then
21471   ac_cv_func_memcmp_working=no
21472 else
21473   cat >conftest.$ac_ext <<_ACEOF
21474 /* confdefs.h.  */
21475 _ACEOF
21476 cat confdefs.h >>conftest.$ac_ext
21477 cat >>conftest.$ac_ext <<_ACEOF
21478 /* end confdefs.h.  */
21479 $ac_includes_default
21480 int
21481 main ()
21482 {
21483
21484   /* Some versions of memcmp are not 8-bit clean.  */
21485   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21486   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21487     exit (1);
21488
21489   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21490      or more and with at least one buffer not starting on a 4-byte boundary.
21491      William Lewis provided this test program.   */
21492   {
21493     char foo[21];
21494     char bar[21];
21495     int i;
21496     for (i = 0; i < 4; i++)
21497       {
21498         char *a = foo + i;
21499         char *b = bar + i;
21500         strcpy (a, "--------01111111");
21501         strcpy (b, "--------10000000");
21502         if (memcmp (a, b, 16) >= 0)
21503           exit (1);
21504       }
21505     exit (0);
21506   }
21507
21508   ;
21509   return 0;
21510 }
21511 _ACEOF
21512 rm -f conftest$ac_exeext
21513 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21514   (eval $ac_link) 2>&5
21515   ac_status=$?
21516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21517   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21519   (eval $ac_try) 2>&5
21520   ac_status=$?
21521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21522   (exit $ac_status); }; }; then
21523   ac_cv_func_memcmp_working=yes
21524 else
21525   echo "$as_me: program exited with status $ac_status" >&5
21526 echo "$as_me: failed program was:" >&5
21527 sed 's/^/| /' conftest.$ac_ext >&5
21528
21529 ( exit $ac_status )
21530 ac_cv_func_memcmp_working=no
21531 fi
21532 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21533 fi
21534 fi
21535 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21536 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21537 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21538     "memcmp.$ac_objext"   | \
21539   *" memcmp.$ac_objext"   | \
21540     "memcmp.$ac_objext "* | \
21541   *" memcmp.$ac_objext "* ) ;;
21542   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21543 esac
21544
21545
21546
21547
21548 # Select semaphore implementation type.
21549 if test "$PORTNAME" != "win32"; then
21550   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21551
21552 cat >>confdefs.h <<\_ACEOF
21553 #define USE_NAMED_POSIX_SEMAPHORES 1
21554 _ACEOF
21555
21556     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21557   else
21558     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21559
21560 cat >>confdefs.h <<\_ACEOF
21561 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21562 _ACEOF
21563
21564       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21565     else
21566
21567 cat >>confdefs.h <<\_ACEOF
21568 #define USE_SYSV_SEMAPHORES 1
21569 _ACEOF
21570
21571       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21572     fi
21573   fi
21574 else
21575
21576 cat >>confdefs.h <<\_ACEOF
21577 #define USE_WIN32_SEMAPHORES 1
21578 _ACEOF
21579
21580   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
21581 fi
21582
21583
21584 # Select shared-memory implementation type.
21585
21586 cat >>confdefs.h <<\_ACEOF
21587 #define USE_SYSV_SHARED_MEMORY 1
21588 _ACEOF
21589
21590 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21591
21592
21593 # If not set in template file, set bytes to use libc memset()
21594 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
21595   MEMSET_LOOP_LIMIT=1024
21596 fi
21597
21598 cat >>confdefs.h <<_ACEOF
21599 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
21600 _ACEOF
21601
21602
21603
21604 if test "$enable_nls" = yes ; then
21605
21606   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21607 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21608 if test "${ac_cv_search_gettext+set}" = set; then
21609   echo $ECHO_N "(cached) $ECHO_C" >&6
21610 else
21611   ac_func_search_save_LIBS=$LIBS
21612 ac_cv_search_gettext=no
21613 cat >conftest.$ac_ext <<_ACEOF
21614 /* confdefs.h.  */
21615 _ACEOF
21616 cat confdefs.h >>conftest.$ac_ext
21617 cat >>conftest.$ac_ext <<_ACEOF
21618 /* end confdefs.h.  */
21619
21620 /* Override any gcc2 internal prototype to avoid an error.  */
21621 #ifdef __cplusplus
21622 extern "C"
21623 #endif
21624 /* We use char because int might match the return type of a gcc2
21625    builtin and then its argument prototype would still apply.  */
21626 char gettext ();
21627 int
21628 main ()
21629 {
21630 gettext ();
21631   ;
21632   return 0;
21633 }
21634 _ACEOF
21635 rm -f conftest.$ac_objext conftest$ac_exeext
21636 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21637   (eval $ac_link) 2>conftest.er1
21638   ac_status=$?
21639   grep -v '^ *+' conftest.er1 >conftest.err
21640   rm -f conftest.er1
21641   cat conftest.err >&5
21642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21643   (exit $ac_status); } &&
21644          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
21645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21646   (eval $ac_try) 2>&5
21647   ac_status=$?
21648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21649   (exit $ac_status); }; } &&
21650          { ac_try='test -s conftest$ac_exeext'
21651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21652   (eval $ac_try) 2>&5
21653   ac_status=$?
21654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21655   (exit $ac_status); }; }; then
21656   ac_cv_search_gettext="none required"
21657 else
21658   echo "$as_me: failed program was:" >&5
21659 sed 's/^/| /' conftest.$ac_ext >&5
21660
21661 fi
21662 rm -f conftest.err conftest.$ac_objext \
21663       conftest$ac_exeext conftest.$ac_ext
21664 if test "$ac_cv_search_gettext" = no; then
21665   for ac_lib in intl; do
21666     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21667     cat >conftest.$ac_ext <<_ACEOF
21668 /* confdefs.h.  */
21669 _ACEOF
21670 cat confdefs.h >>conftest.$ac_ext
21671 cat >>conftest.$ac_ext <<_ACEOF
21672 /* end confdefs.h.  */
21673
21674 /* Override any gcc2 internal prototype to avoid an error.  */
21675 #ifdef __cplusplus
21676 extern "C"
21677 #endif
21678 /* We use char because int might match the return type of a gcc2
21679    builtin and then its argument prototype would still apply.  */
21680 char gettext ();
21681 int
21682 main ()
21683 {
21684 gettext ();
21685   ;
21686   return 0;
21687 }
21688 _ACEOF
21689 rm -f conftest.$ac_objext conftest$ac_exeext
21690 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21691   (eval $ac_link) 2>conftest.er1
21692   ac_status=$?
21693   grep -v '^ *+' conftest.er1 >conftest.err
21694   rm -f conftest.er1
21695   cat conftest.err >&5
21696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21697   (exit $ac_status); } &&
21698          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
21699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21700   (eval $ac_try) 2>&5
21701   ac_status=$?
21702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21703   (exit $ac_status); }; } &&
21704          { ac_try='test -s conftest$ac_exeext'
21705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21706   (eval $ac_try) 2>&5
21707   ac_status=$?
21708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21709   (exit $ac_status); }; }; then
21710   ac_cv_search_gettext="-l$ac_lib"
21711 break
21712 else
21713   echo "$as_me: failed program was:" >&5
21714 sed 's/^/| /' conftest.$ac_ext >&5
21715
21716 fi
21717 rm -f conftest.err conftest.$ac_objext \
21718       conftest$ac_exeext conftest.$ac_ext
21719   done
21720 fi
21721 LIBS=$ac_func_search_save_LIBS
21722 fi
21723 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21724 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21725 if test "$ac_cv_search_gettext" != no; then
21726   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21727
21728 else
21729   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21730 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21731    { (exit 1); exit 1; }; }
21732 fi
21733
21734   if test "${ac_cv_header_libintl_h+set}" = set; then
21735   echo "$as_me:$LINENO: checking for libintl.h" >&5
21736 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21737 if test "${ac_cv_header_libintl_h+set}" = set; then
21738   echo $ECHO_N "(cached) $ECHO_C" >&6
21739 fi
21740 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21741 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21742 else
21743   # Is the header compilable?
21744 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21745 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21746 cat >conftest.$ac_ext <<_ACEOF
21747 /* confdefs.h.  */
21748 _ACEOF
21749 cat confdefs.h >>conftest.$ac_ext
21750 cat >>conftest.$ac_ext <<_ACEOF
21751 /* end confdefs.h.  */
21752 $ac_includes_default
21753 #include <libintl.h>
21754 _ACEOF
21755 rm -f conftest.$ac_objext
21756 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21757   (eval $ac_compile) 2>conftest.er1
21758   ac_status=$?
21759   grep -v '^ *+' conftest.er1 >conftest.err
21760   rm -f conftest.er1
21761   cat conftest.err >&5
21762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21763   (exit $ac_status); } &&
21764          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
21765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21766   (eval $ac_try) 2>&5
21767   ac_status=$?
21768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21769   (exit $ac_status); }; } &&
21770          { ac_try='test -s conftest.$ac_objext'
21771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21772   (eval $ac_try) 2>&5
21773   ac_status=$?
21774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21775   (exit $ac_status); }; }; then
21776   ac_header_compiler=yes
21777 else
21778   echo "$as_me: failed program was:" >&5
21779 sed 's/^/| /' conftest.$ac_ext >&5
21780
21781 ac_header_compiler=no
21782 fi
21783 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21784 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21785 echo "${ECHO_T}$ac_header_compiler" >&6
21786
21787 # Is the header present?
21788 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21789 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21790 cat >conftest.$ac_ext <<_ACEOF
21791 /* confdefs.h.  */
21792 _ACEOF
21793 cat confdefs.h >>conftest.$ac_ext
21794 cat >>conftest.$ac_ext <<_ACEOF
21795 /* end confdefs.h.  */
21796 #include <libintl.h>
21797 _ACEOF
21798 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21799   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21800   ac_status=$?
21801   grep -v '^ *+' conftest.er1 >conftest.err
21802   rm -f conftest.er1
21803   cat conftest.err >&5
21804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21805   (exit $ac_status); } >/dev/null; then
21806   if test -s conftest.err; then
21807     ac_cpp_err=$ac_c_preproc_warn_flag
21808     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21809   else
21810     ac_cpp_err=
21811   fi
21812 else
21813   ac_cpp_err=yes
21814 fi
21815 if test -z "$ac_cpp_err"; then
21816   ac_header_preproc=yes
21817 else
21818   echo "$as_me: failed program was:" >&5
21819 sed 's/^/| /' conftest.$ac_ext >&5
21820
21821   ac_header_preproc=no
21822 fi
21823 rm -f conftest.err conftest.$ac_ext
21824 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21825 echo "${ECHO_T}$ac_header_preproc" >&6
21826
21827 # So?  What about this header?
21828 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21829   yes:no: )
21830     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21831 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21832     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
21833 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
21834     ac_header_preproc=yes
21835     ;;
21836   no:yes:* )
21837     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
21838 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
21839     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
21840 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
21841     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
21842 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
21843     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
21844 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21845     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
21846 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
21847     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
21848 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
21849     (
21850       cat <<\_ASBOX
21851 ## ---------------------------------------- ##
21852 ## Report this to pgsql-bugs@postgresql.org ##
21853 ## ---------------------------------------- ##
21854 _ASBOX
21855     ) |
21856       sed "s/^/$as_me: WARNING:     /" >&2
21857     ;;
21858 esac
21859 echo "$as_me:$LINENO: checking for libintl.h" >&5
21860 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21861 if test "${ac_cv_header_libintl_h+set}" = set; then
21862   echo $ECHO_N "(cached) $ECHO_C" >&6
21863 else
21864   ac_cv_header_libintl_h=$ac_header_preproc
21865 fi
21866 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21867 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21868
21869 fi
21870 if test $ac_cv_header_libintl_h = yes; then
21871   :
21872 else
21873   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
21874 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
21875    { (exit 1); exit 1; }; }
21876 fi
21877
21878
21879   for ac_prog in msgfmt
21880 do
21881   # Extract the first word of "$ac_prog", so it can be a program name with args.
21882 set dummy $ac_prog; ac_word=$2
21883 echo "$as_me:$LINENO: checking for $ac_word" >&5
21884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21885 if test "${ac_cv_prog_MSGFMT+set}" = set; then
21886   echo $ECHO_N "(cached) $ECHO_C" >&6
21887 else
21888   if test -n "$MSGFMT"; then
21889   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
21890 else
21891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21892 for as_dir in $PATH
21893 do
21894   IFS=$as_save_IFS
21895   test -z "$as_dir" && as_dir=.
21896   for ac_exec_ext in '' $ac_executable_extensions; do
21897   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21898     ac_cv_prog_MSGFMT="$ac_prog"
21899     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21900     break 2
21901   fi
21902 done
21903 done
21904
21905 fi
21906 fi
21907 MSGFMT=$ac_cv_prog_MSGFMT
21908 if test -n "$MSGFMT"; then
21909   echo "$as_me:$LINENO: result: $MSGFMT" >&5
21910 echo "${ECHO_T}$MSGFMT" >&6
21911 else
21912   echo "$as_me:$LINENO: result: no" >&5
21913 echo "${ECHO_T}no" >&6
21914 fi
21915
21916   test -n "$MSGFMT" && break
21917 done
21918
21919   if test -z "$MSGFMT"; then
21920     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
21921 echo "$as_me: error: msgfmt is required for NLS" >&2;}
21922    { (exit 1); exit 1; }; }
21923   fi
21924   for ac_prog in msgmerge
21925 do
21926   # Extract the first word of "$ac_prog", so it can be a program name with args.
21927 set dummy $ac_prog; ac_word=$2
21928 echo "$as_me:$LINENO: checking for $ac_word" >&5
21929 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21930 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
21931   echo $ECHO_N "(cached) $ECHO_C" >&6
21932 else
21933   if test -n "$MSGMERGE"; then
21934   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
21935 else
21936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21937 for as_dir in $PATH
21938 do
21939   IFS=$as_save_IFS
21940   test -z "$as_dir" && as_dir=.
21941   for ac_exec_ext in '' $ac_executable_extensions; do
21942   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21943     ac_cv_prog_MSGMERGE="$ac_prog"
21944     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21945     break 2
21946   fi
21947 done
21948 done
21949
21950 fi
21951 fi
21952 MSGMERGE=$ac_cv_prog_MSGMERGE
21953 if test -n "$MSGMERGE"; then
21954   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
21955 echo "${ECHO_T}$MSGMERGE" >&6
21956 else
21957   echo "$as_me:$LINENO: result: no" >&5
21958 echo "${ECHO_T}no" >&6
21959 fi
21960
21961   test -n "$MSGMERGE" && break
21962 done
21963
21964   for ac_prog in xgettext
21965 do
21966   # Extract the first word of "$ac_prog", so it can be a program name with args.
21967 set dummy $ac_prog; ac_word=$2
21968 echo "$as_me:$LINENO: checking for $ac_word" >&5
21969 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21970 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
21971   echo $ECHO_N "(cached) $ECHO_C" >&6
21972 else
21973   if test -n "$XGETTEXT"; then
21974   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
21975 else
21976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21977 for as_dir in $PATH
21978 do
21979   IFS=$as_save_IFS
21980   test -z "$as_dir" && as_dir=.
21981   for ac_exec_ext in '' $ac_executable_extensions; do
21982   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21983     ac_cv_prog_XGETTEXT="$ac_prog"
21984     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21985     break 2
21986   fi
21987 done
21988 done
21989
21990 fi
21991 fi
21992 XGETTEXT=$ac_cv_prog_XGETTEXT
21993 if test -n "$XGETTEXT"; then
21994   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
21995 echo "${ECHO_T}$XGETTEXT" >&6
21996 else
21997   echo "$as_me:$LINENO: result: no" >&5
21998 echo "${ECHO_T}no" >&6
21999 fi
22000
22001   test -n "$XGETTEXT" && break
22002 done
22003
22004
22005   # Note: share/locale is always the default, independent of $datadir
22006   localedir='${prefix}/share/locale'
22007
22008
22009 fi
22010
22011 # Check for Tcl configuration script tclConfig.sh
22012 if test "$with_tcl" = yes; then
22013     for ac_prog in tclsh tcl
22014 do
22015   # Extract the first word of "$ac_prog", so it can be a program name with args.
22016 set dummy $ac_prog; ac_word=$2
22017 echo "$as_me:$LINENO: checking for $ac_word" >&5
22018 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22019 if test "${ac_cv_path_TCLSH+set}" = set; then
22020   echo $ECHO_N "(cached) $ECHO_C" >&6
22021 else
22022   case $TCLSH in
22023   [\\/]* | ?:[\\/]*)
22024   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22025   ;;
22026   *)
22027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22028 for as_dir in $PATH
22029 do
22030   IFS=$as_save_IFS
22031   test -z "$as_dir" && as_dir=.
22032   for ac_exec_ext in '' $ac_executable_extensions; do
22033   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22034     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22035     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22036     break 2
22037   fi
22038 done
22039 done
22040
22041   ;;
22042 esac
22043 fi
22044 TCLSH=$ac_cv_path_TCLSH
22045
22046 if test -n "$TCLSH"; then
22047   echo "$as_me:$LINENO: result: $TCLSH" >&5
22048 echo "${ECHO_T}$TCLSH" >&6
22049 else
22050   echo "$as_me:$LINENO: result: no" >&5
22051 echo "${ECHO_T}no" >&6
22052 fi
22053
22054   test -n "$TCLSH" && break
22055 done
22056
22057 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22058 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22059 # Let user override test
22060 if test -z "$TCL_CONFIG_SH"; then
22061     pgac_test_dirs="$with_tclconfig"
22062
22063     set X $pgac_test_dirs; shift
22064     if test $# -eq 0; then
22065         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22066 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22067    { (exit 1); exit 1; }; }
22068         set X `echo 'puts $auto_path' | $TCLSH`; shift
22069     fi
22070
22071     for pgac_dir do
22072         if test -r "$pgac_dir/tclConfig.sh"; then
22073             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22074             break
22075         fi
22076     done
22077 fi
22078
22079 if test -z "$TCL_CONFIG_SH"; then
22080     echo "$as_me:$LINENO: result: no" >&5
22081 echo "${ECHO_T}no" >&6
22082     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22083 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22084    { (exit 1); exit 1; }; }
22085 else
22086     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22087 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22088 fi
22089
22090
22091
22092     . "$TCL_CONFIG_SH"
22093 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22094 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22095 eval TCL_LIBS=\"$TCL_LIBS\"
22096 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22097 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22098
22099         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22100     ac_save_CPPFLAGS=$CPPFLAGS
22101     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22102     if test "${ac_cv_header_tcl_h+set}" = set; then
22103   echo "$as_me:$LINENO: checking for tcl.h" >&5
22104 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22105 if test "${ac_cv_header_tcl_h+set}" = set; then
22106   echo $ECHO_N "(cached) $ECHO_C" >&6
22107 fi
22108 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22109 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22110 else
22111   # Is the header compilable?
22112 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22113 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22114 cat >conftest.$ac_ext <<_ACEOF
22115 /* confdefs.h.  */
22116 _ACEOF
22117 cat confdefs.h >>conftest.$ac_ext
22118 cat >>conftest.$ac_ext <<_ACEOF
22119 /* end confdefs.h.  */
22120 $ac_includes_default
22121 #include <tcl.h>
22122 _ACEOF
22123 rm -f conftest.$ac_objext
22124 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22125   (eval $ac_compile) 2>conftest.er1
22126   ac_status=$?
22127   grep -v '^ *+' conftest.er1 >conftest.err
22128   rm -f conftest.er1
22129   cat conftest.err >&5
22130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22131   (exit $ac_status); } &&
22132          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
22133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22134   (eval $ac_try) 2>&5
22135   ac_status=$?
22136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22137   (exit $ac_status); }; } &&
22138          { ac_try='test -s conftest.$ac_objext'
22139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22140   (eval $ac_try) 2>&5
22141   ac_status=$?
22142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22143   (exit $ac_status); }; }; then
22144   ac_header_compiler=yes
22145 else
22146   echo "$as_me: failed program was:" >&5
22147 sed 's/^/| /' conftest.$ac_ext >&5
22148
22149 ac_header_compiler=no
22150 fi
22151 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22152 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22153 echo "${ECHO_T}$ac_header_compiler" >&6
22154
22155 # Is the header present?
22156 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22157 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22158 cat >conftest.$ac_ext <<_ACEOF
22159 /* confdefs.h.  */
22160 _ACEOF
22161 cat confdefs.h >>conftest.$ac_ext
22162 cat >>conftest.$ac_ext <<_ACEOF
22163 /* end confdefs.h.  */
22164 #include <tcl.h>
22165 _ACEOF
22166 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22168   ac_status=$?
22169   grep -v '^ *+' conftest.er1 >conftest.err
22170   rm -f conftest.er1
22171   cat conftest.err >&5
22172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22173   (exit $ac_status); } >/dev/null; then
22174   if test -s conftest.err; then
22175     ac_cpp_err=$ac_c_preproc_warn_flag
22176     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22177   else
22178     ac_cpp_err=
22179   fi
22180 else
22181   ac_cpp_err=yes
22182 fi
22183 if test -z "$ac_cpp_err"; then
22184   ac_header_preproc=yes
22185 else
22186   echo "$as_me: failed program was:" >&5
22187 sed 's/^/| /' conftest.$ac_ext >&5
22188
22189   ac_header_preproc=no
22190 fi
22191 rm -f conftest.err conftest.$ac_ext
22192 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22193 echo "${ECHO_T}$ac_header_preproc" >&6
22194
22195 # So?  What about this header?
22196 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22197   yes:no: )
22198     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22199 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22200     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22201 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22202     ac_header_preproc=yes
22203     ;;
22204   no:yes:* )
22205     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22206 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22207     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22208 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22209     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22210 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22211     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22212 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22213     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22214 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22215     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22216 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22217     (
22218       cat <<\_ASBOX
22219 ## ---------------------------------------- ##
22220 ## Report this to pgsql-bugs@postgresql.org ##
22221 ## ---------------------------------------- ##
22222 _ASBOX
22223     ) |
22224       sed "s/^/$as_me: WARNING:     /" >&2
22225     ;;
22226 esac
22227 echo "$as_me:$LINENO: checking for tcl.h" >&5
22228 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22229 if test "${ac_cv_header_tcl_h+set}" = set; then
22230   echo $ECHO_N "(cached) $ECHO_C" >&6
22231 else
22232   ac_cv_header_tcl_h=$ac_header_preproc
22233 fi
22234 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22235 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22236
22237 fi
22238 if test $ac_cv_header_tcl_h = yes; then
22239   :
22240 else
22241   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22242 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22243    { (exit 1); exit 1; }; }
22244 fi
22245
22246
22247     CPPFLAGS=$ac_save_CPPFLAGS
22248 fi
22249
22250 #
22251 # Check for DocBook and tools
22252 #
22253 for ac_prog in onsgmls nsgmls
22254 do
22255   # Extract the first word of "$ac_prog", so it can be a program name with args.
22256 set dummy $ac_prog; ac_word=$2
22257 echo "$as_me:$LINENO: checking for $ac_word" >&5
22258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22259 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22260   echo $ECHO_N "(cached) $ECHO_C" >&6
22261 else
22262   if test -n "$NSGMLS"; then
22263   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22264 else
22265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22266 for as_dir in $PATH
22267 do
22268   IFS=$as_save_IFS
22269   test -z "$as_dir" && as_dir=.
22270   for ac_exec_ext in '' $ac_executable_extensions; do
22271   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22272     ac_cv_prog_NSGMLS="$ac_prog"
22273     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22274     break 2
22275   fi
22276 done
22277 done
22278
22279 fi
22280 fi
22281 NSGMLS=$ac_cv_prog_NSGMLS
22282 if test -n "$NSGMLS"; then
22283   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22284 echo "${ECHO_T}$NSGMLS" >&6
22285 else
22286   echo "$as_me:$LINENO: result: no" >&5
22287 echo "${ECHO_T}no" >&6
22288 fi
22289
22290   test -n "$NSGMLS" && break
22291 done
22292
22293 for ac_prog in openjade jade
22294 do
22295   # Extract the first word of "$ac_prog", so it can be a program name with args.
22296 set dummy $ac_prog; ac_word=$2
22297 echo "$as_me:$LINENO: checking for $ac_word" >&5
22298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22299 if test "${ac_cv_prog_JADE+set}" = set; then
22300   echo $ECHO_N "(cached) $ECHO_C" >&6
22301 else
22302   if test -n "$JADE"; then
22303   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22304 else
22305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22306 for as_dir in $PATH
22307 do
22308   IFS=$as_save_IFS
22309   test -z "$as_dir" && as_dir=.
22310   for ac_exec_ext in '' $ac_executable_extensions; do
22311   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22312     ac_cv_prog_JADE="$ac_prog"
22313     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22314     break 2
22315   fi
22316 done
22317 done
22318
22319 fi
22320 fi
22321 JADE=$ac_cv_prog_JADE
22322 if test -n "$JADE"; then
22323   echo "$as_me:$LINENO: result: $JADE" >&5
22324 echo "${ECHO_T}$JADE" >&6
22325 else
22326   echo "$as_me:$LINENO: result: no" >&5
22327 echo "${ECHO_T}no" >&6
22328 fi
22329
22330   test -n "$JADE" && break
22331 done
22332
22333
22334 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22335 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22336 if test "${pgac_cv_check_docbook+set}" = set; then
22337   echo $ECHO_N "(cached) $ECHO_C" >&6
22338 else
22339   cat >conftest.sgml <<EOF
22340 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22341 <book>
22342  <title>test</title>
22343  <chapter>
22344   <title>random</title>
22345    <sect1>
22346     <title>testsect</title>
22347     <para>text</para>
22348   </sect1>
22349  </chapter>
22350 </book>
22351 EOF
22352
22353 pgac_cv_check_docbook=no
22354
22355 if test -n "$NSGMLS"; then
22356   $NSGMLS -s conftest.sgml 1>&5 2>&1
22357   if test $? -eq 0; then
22358     pgac_cv_check_docbook=yes
22359   fi
22360 fi
22361 rm -f conftest.sgml
22362 fi
22363 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22364 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22365
22366 have_docbook=$pgac_cv_check_docbook
22367
22368
22369 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22370 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22371 if test "${pgac_cv_path_stylesheets+set}" = set; then
22372   echo $ECHO_N "(cached) $ECHO_C" >&6
22373 else
22374   if test -n "$DOCBOOKSTYLE"; then
22375   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22376 else
22377   for pgac_prefix in /usr /usr/local /opt; do
22378     for pgac_infix in share lib; do
22379       for pgac_postfix in \
22380         sgml/stylesheets/nwalsh-modular \
22381         sgml/stylesheets/docbook \
22382                 sgml/docbook-dsssl \
22383         sgml/docbook/dsssl/modular \
22384         sgml/docbook/stylesheet/dsssl/modular \
22385         sgml/docbook/dsssl-stylesheets
22386       do
22387         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22388         if test -r "$pgac_candidate/html/docbook.dsl" \
22389            && test -r "$pgac_candidate/print/docbook.dsl"
22390         then
22391           pgac_cv_path_stylesheets=$pgac_candidate
22392           break 3
22393         fi
22394       done
22395     done
22396   done
22397 fi
22398 fi
22399
22400 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22401
22402 if test -n "$DOCBOOKSTYLE"; then
22403   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22404 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22405 else
22406   echo "$as_me:$LINENO: result: no" >&5
22407 echo "${ECHO_T}no" >&6
22408 fi
22409 if test -n "$DOCBOOKSTYLE"; then
22410   for ac_prog in collateindex.pl
22411 do
22412   # Extract the first word of "$ac_prog", so it can be a program name with args.
22413 set dummy $ac_prog; ac_word=$2
22414 echo "$as_me:$LINENO: checking for $ac_word" >&5
22415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22416 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22417   echo $ECHO_N "(cached) $ECHO_C" >&6
22418 else
22419   case $COLLATEINDEX in
22420   [\\/]* | ?:[\\/]*)
22421   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22422   ;;
22423   *)
22424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22425 for as_dir in $DOCBOOKSTYLE/bin $PATH
22426 do
22427   IFS=$as_save_IFS
22428   test -z "$as_dir" && as_dir=.
22429   for ac_exec_ext in '' $ac_executable_extensions; do
22430   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22431     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22432     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22433     break 2
22434   fi
22435 done
22436 done
22437
22438   ;;
22439 esac
22440 fi
22441 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22442
22443 if test -n "$COLLATEINDEX"; then
22444   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22445 echo "${ECHO_T}$COLLATEINDEX" >&6
22446 else
22447   echo "$as_me:$LINENO: result: no" >&5
22448 echo "${ECHO_T}no" >&6
22449 fi
22450
22451   test -n "$COLLATEINDEX" && break
22452 done
22453
22454 else
22455   for ac_prog in collateindex.pl
22456 do
22457   # Extract the first word of "$ac_prog", so it can be a program name with args.
22458 set dummy $ac_prog; ac_word=$2
22459 echo "$as_me:$LINENO: checking for $ac_word" >&5
22460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22461 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22462   echo $ECHO_N "(cached) $ECHO_C" >&6
22463 else
22464   case $COLLATEINDEX in
22465   [\\/]* | ?:[\\/]*)
22466   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22467   ;;
22468   *)
22469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22470 for as_dir in $PATH
22471 do
22472   IFS=$as_save_IFS
22473   test -z "$as_dir" && as_dir=.
22474   for ac_exec_ext in '' $ac_executable_extensions; do
22475   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22476     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22477     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22478     break 2
22479   fi
22480 done
22481 done
22482
22483   ;;
22484 esac
22485 fi
22486 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22487
22488 if test -n "$COLLATEINDEX"; then
22489   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22490 echo "${ECHO_T}$COLLATEINDEX" >&6
22491 else
22492   echo "$as_me:$LINENO: result: no" >&5
22493 echo "${ECHO_T}no" >&6
22494 fi
22495
22496   test -n "$COLLATEINDEX" && break
22497 done
22498
22499 fi
22500 for ac_prog in sgmlspl
22501 do
22502   # Extract the first word of "$ac_prog", so it can be a program name with args.
22503 set dummy $ac_prog; ac_word=$2
22504 echo "$as_me:$LINENO: checking for $ac_word" >&5
22505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22506 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22507   echo $ECHO_N "(cached) $ECHO_C" >&6
22508 else
22509   if test -n "$SGMLSPL"; then
22510   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22511 else
22512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22513 for as_dir in $PATH
22514 do
22515   IFS=$as_save_IFS
22516   test -z "$as_dir" && as_dir=.
22517   for ac_exec_ext in '' $ac_executable_extensions; do
22518   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22519     ac_cv_prog_SGMLSPL="$ac_prog"
22520     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22521     break 2
22522   fi
22523 done
22524 done
22525
22526 fi
22527 fi
22528 SGMLSPL=$ac_cv_prog_SGMLSPL
22529 if test -n "$SGMLSPL"; then
22530   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22531 echo "${ECHO_T}$SGMLSPL" >&6
22532 else
22533   echo "$as_me:$LINENO: result: no" >&5
22534 echo "${ECHO_T}no" >&6
22535 fi
22536
22537   test -n "$SGMLSPL" && break
22538 done
22539
22540
22541 # Thread testing
22542
22543 # We have to run the thread test near the end so we have all our symbols
22544 # defined.  Cross compiling throws a warning.
22545 #
22546 if test "$enable_thread_safety_force" = yes; then
22547 if test x"$template" != x"win32"
22548 then
22549   { echo "$as_me:$LINENO: WARNING:
22550 *** Skipping thread test program.  --enable-thread-safety-force was used.
22551 *** Run the program in src/test/thread on the your machine and add
22552 proper locking function calls to your applications to guarantee thread
22553 safety.
22554 " >&5
22555 echo "$as_me: WARNING:
22556 *** Skipping thread test program.  --enable-thread-safety-force was used.
22557 *** Run the program in src/test/thread on the your machine and add
22558 proper locking function calls to your applications to guarantee thread
22559 safety.
22560 " >&2;}
22561 else
22562 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22563 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22564 fi
22565 elif test "$enable_thread_safety" = yes; then
22566 if test x"$template" != x"win32"
22567 then
22568 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22569 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22570
22571 _CFLAGS="$CFLAGS"
22572 _LIBS="$LIBS"
22573 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22574 LIBS="$LIBS $PTHREAD_LIBS"
22575 if test "$cross_compiling" = yes; then
22576   echo "$as_me:$LINENO: result: maybe" >&5
22577 echo "${ECHO_T}maybe" >&6
22578   { echo "$as_me:$LINENO: WARNING:
22579 *** Skipping thread test program because of cross-compile build.
22580 *** Run the program in src/test/thread on the target machine.
22581 " >&5
22582 echo "$as_me: WARNING:
22583 *** Skipping thread test program because of cross-compile build.
22584 *** Run the program in src/test/thread on the target machine.
22585 " >&2;}
22586 else
22587   cat >conftest.$ac_ext <<_ACEOF
22588 /* confdefs.h.  */
22589 _ACEOF
22590 cat confdefs.h >>conftest.$ac_ext
22591 cat >>conftest.$ac_ext <<_ACEOF
22592 /* end confdefs.h.  */
22593 #include "$srcdir/src/test/thread/thread_test.c"
22594 _ACEOF
22595 rm -f conftest$ac_exeext
22596 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22597   (eval $ac_link) 2>&5
22598   ac_status=$?
22599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22600   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22602   (eval $ac_try) 2>&5
22603   ac_status=$?
22604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22605   (exit $ac_status); }; }; then
22606   echo "$as_me:$LINENO: result: yes" >&5
22607 echo "${ECHO_T}yes" >&6
22608 else
22609   echo "$as_me: program exited with status $ac_status" >&5
22610 echo "$as_me: failed program was:" >&5
22611 sed 's/^/| /' conftest.$ac_ext >&5
22612
22613 ( exit $ac_status )
22614 echo "$as_me:$LINENO: result: no" >&5
22615 echo "${ECHO_T}no" >&6
22616   { { echo "$as_me:$LINENO: error:
22617 *** Thread test program failed.  Your platform is not thread-safe.
22618 *** Check the file 'config.log'for the exact reason.
22619 ***
22620 *** You can use the configure option --enable-thread-safety-force
22621 *** to force threads to be enabled.  However, you must then run
22622 *** the program in src/test/thread and add locking function calls
22623 *** to your applications to guarantee thread safety.
22624 " >&5
22625 echo "$as_me: error:
22626 *** Thread test program failed.  Your platform is not thread-safe.
22627 *** Check the file 'config.log'for the exact reason.
22628 ***
22629 *** You can use the configure option --enable-thread-safety-force
22630 *** to force threads to be enabled.  However, you must then run
22631 *** the program in src/test/thread and add locking function calls
22632 *** to your applications to guarantee thread safety.
22633 " >&2;}
22634    { (exit 1); exit 1; }; }
22635 fi
22636 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22637 fi
22638 CFLAGS="$_CFLAGS"
22639 LIBS="$_LIBS"
22640 else
22641 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22642 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22643 fi
22644 fi
22645
22646 # prepare build tree if outside source tree
22647 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22648 # Note 2: /bin/pwd might be better than shell's built-in at getting
22649 #         a symlink-free name.
22650 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22651   vpath_build=no
22652 else
22653   vpath_build=yes
22654   if test "$no_create" != yes; then
22655     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22656     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22657     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22658       || { { echo "$as_me:$LINENO: error: failed" >&5
22659 echo "$as_me: error: failed" >&2;}
22660    { (exit 1); exit 1; }; }
22661     echo "$as_me:$LINENO: result: done" >&5
22662 echo "${ECHO_T}done" >&6
22663   fi
22664 fi
22665
22666
22667
22668                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22669
22670
22671                                                             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}"
22672
22673
22674 if test "$PORTNAME" = "win32"; then
22675           ac_config_commands="$ac_config_commands check_win32_symlinks"
22676
22677 fi
22678
22679           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22680
22681
22682           ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
22683
22684
22685
22686 #
22687 # Warn about unknown options
22688 #
22689
22690
22691   for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do
22692      case $var in
22693        with_template) ;;
22694 with_docdir) ;;
22695 with_includes) ;;
22696 with_libraries) ;;
22697 with_libs) ;;
22698 enable_integer_datetimes) ;;
22699 enable_nls) ;;
22700 with_pgport) ;;
22701 enable_shared) ;;
22702 enable_rpath) ;;
22703 enable_spinlocks) ;;
22704 enable_debug) ;;
22705 enable_dtrace) ;;
22706 with_CC) ;;
22707 enable_depend) ;;
22708 enable_cassert) ;;
22709 enable_thread_safety) ;;
22710 enable_thread_safety_force) ;;
22711 with_tcl) ;;
22712 with_tclconfig) ;;
22713 with_perl) ;;
22714 with_python) ;;
22715 with_krb5) ;;
22716 with_krb_srvnam) ;;
22717 with_pam) ;;
22718 with_ldap) ;;
22719 with_bonjour) ;;
22720 with_openssl) ;;
22721 with_libedit_preferred) ;;
22722 with_readline) ;;
22723 with_zlib) ;;
22724
22725        with_gnu_ld) ;;
22726      *)
22727        echo -n "*** Option ignored: "
22728        echo $var | sed -e 's/\(^=*\)/--\1/;s/_/-/g'
22729        ;;
22730      esac
22731   done
22732
22733
22734 cat >confcache <<\_ACEOF
22735 # This file is a shell script that caches the results of configure
22736 # tests run on this system so they can be shared between configure
22737 # scripts and configure runs, see configure's option --config-cache.
22738 # It is not useful on other systems.  If it contains results you don't
22739 # want to keep, you may remove or edit it.
22740 #
22741 # config.status only pays attention to the cache file if you give it
22742 # the --recheck option to rerun configure.
22743 #
22744 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22745 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22746 # following values.
22747
22748 _ACEOF
22749
22750 # The following way of writing the cache mishandles newlines in values,
22751 # but we know of no workaround that is simple, portable, and efficient.
22752 # So, don't put newlines in cache variables' values.
22753 # Ultrix sh set writes to stderr and can't be redirected directly,
22754 # and sets the high bit in the cache file unless we assign to the vars.
22755 {
22756   (set) 2>&1 |
22757     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22758     *ac_space=\ *)
22759       # `set' does not quote correctly, so add quotes (double-quote
22760       # substitution turns \\\\ into \\, and sed turns \\ into \).
22761       sed -n \
22762         "s/'/'\\\\''/g;
22763           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22764       ;;
22765     *)
22766       # `set' quotes correctly as required by POSIX, so do not add quotes.
22767       sed -n \
22768         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22769       ;;
22770     esac;
22771 } |
22772   sed '
22773      t clear
22774      : clear
22775      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22776      t end
22777      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22778      : end' >>confcache
22779 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22780   if test -w $cache_file; then
22781     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22782     cat confcache >$cache_file
22783   else
22784     echo "not updating unwritable cache $cache_file"
22785   fi
22786 fi
22787 rm -f confcache
22788
22789 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22790 # Let make expand exec_prefix.
22791 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22792
22793 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22794 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22795 # trailing colons and then remove the whole line if VPATH becomes empty
22796 # (actually we leave an empty line to preserve line numbers).
22797 if test "x$srcdir" = x.; then
22798   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22799 s/:*\$(srcdir):*/:/;
22800 s/:*\${srcdir}:*/:/;
22801 s/:*@srcdir@:*/:/;
22802 s/^\([^=]*=[     ]*\):*/\1/;
22803 s/:*$//;
22804 s/^[^=]*=[       ]*$//;
22805 }'
22806 fi
22807
22808 DEFS=-DHAVE_CONFIG_H
22809
22810 ac_libobjs=
22811 ac_ltlibobjs=
22812 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22813   # 1. Remove the extension, and $U if already installed.
22814   ac_i=`echo "$ac_i" |
22815          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22816   # 2. Add them.
22817   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22818   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22819 done
22820 LIBOBJS=$ac_libobjs
22821
22822 LTLIBOBJS=$ac_ltlibobjs
22823
22824
22825
22826 : ${CONFIG_STATUS=./config.status}
22827 ac_clean_files_save=$ac_clean_files
22828 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22829 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22830 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22831 cat >$CONFIG_STATUS <<_ACEOF
22832 #! $SHELL
22833 # Generated by $as_me.
22834 # Run this file to recreate the current configuration.
22835 # Compiler output produced by configure, useful for debugging
22836 # configure, is in config.log if it exists.
22837
22838 debug=false
22839 ac_cs_recheck=false
22840 ac_cs_silent=false
22841 SHELL=\${CONFIG_SHELL-$SHELL}
22842 _ACEOF
22843
22844 cat >>$CONFIG_STATUS <<\_ACEOF
22845 ## --------------------- ##
22846 ## M4sh Initialization.  ##
22847 ## --------------------- ##
22848
22849 # Be Bourne compatible
22850 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22851   emulate sh
22852   NULLCMD=:
22853   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22854   # is contrary to our usage.  Disable this feature.
22855   alias -g '${1+"$@"}'='"$@"'
22856 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22857   set -o posix
22858 fi
22859 DUALCASE=1; export DUALCASE # for MKS sh
22860
22861 # Support unset when possible.
22862 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22863   as_unset=unset
22864 else
22865   as_unset=false
22866 fi
22867
22868
22869 # Work around bugs in pre-3.0 UWIN ksh.
22870 $as_unset ENV MAIL MAILPATH
22871 PS1='$ '
22872 PS2='> '
22873 PS4='+ '
22874
22875 # NLS nuisances.
22876 for as_var in \
22877   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22878   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22879   LC_TELEPHONE LC_TIME
22880 do
22881   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22882     eval $as_var=C; export $as_var
22883   else
22884     $as_unset $as_var
22885   fi
22886 done
22887
22888 # Required to use basename.
22889 if expr a : '\(a\)' >/dev/null 2>&1; then
22890   as_expr=expr
22891 else
22892   as_expr=false
22893 fi
22894
22895 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22896   as_basename=basename
22897 else
22898   as_basename=false
22899 fi
22900
22901
22902 # Name of the executable.
22903 as_me=`$as_basename "$0" ||
22904 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22905          X"$0" : 'X\(//\)$' \| \
22906          X"$0" : 'X\(/\)$' \| \
22907          .     : '\(.\)' 2>/dev/null ||
22908 echo X/"$0" |
22909     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22910           /^X\/\(\/\/\)$/{ s//\1/; q; }
22911           /^X\/\(\/\).*/{ s//\1/; q; }
22912           s/.*/./; q'`
22913
22914
22915 # PATH needs CR, and LINENO needs CR and PATH.
22916 # Avoid depending upon Character Ranges.
22917 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22918 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22919 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22920 as_cr_digits='0123456789'
22921 as_cr_alnum=$as_cr_Letters$as_cr_digits
22922
22923 # The user is always right.
22924 if test "${PATH_SEPARATOR+set}" != set; then
22925   echo "#! /bin/sh" >conf$$.sh
22926   echo  "exit 0"   >>conf$$.sh
22927   chmod +x conf$$.sh
22928   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22929     PATH_SEPARATOR=';'
22930   else
22931     PATH_SEPARATOR=:
22932   fi
22933   rm -f conf$$.sh
22934 fi
22935
22936
22937   as_lineno_1=$LINENO
22938   as_lineno_2=$LINENO
22939   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22940   test "x$as_lineno_1" != "x$as_lineno_2" &&
22941   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
22942   # Find who we are.  Look in the path if we contain no path at all
22943   # relative or not.
22944   case $0 in
22945     *[\\/]* ) as_myself=$0 ;;
22946     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22947 for as_dir in $PATH
22948 do
22949   IFS=$as_save_IFS
22950   test -z "$as_dir" && as_dir=.
22951   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22952 done
22953
22954        ;;
22955   esac
22956   # We did not find ourselves, most probably we were run as `sh COMMAND'
22957   # in which case we are not to be found in the path.
22958   if test "x$as_myself" = x; then
22959     as_myself=$0
22960   fi
22961   if test ! -f "$as_myself"; then
22962     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22963 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22964    { (exit 1); exit 1; }; }
22965   fi
22966   case $CONFIG_SHELL in
22967   '')
22968     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22969 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22970 do
22971   IFS=$as_save_IFS
22972   test -z "$as_dir" && as_dir=.
22973   for as_base in sh bash ksh sh5; do
22974          case $as_dir in
22975          /*)
22976            if ("$as_dir/$as_base" -c '
22977   as_lineno_1=$LINENO
22978   as_lineno_2=$LINENO
22979   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22980   test "x$as_lineno_1" != "x$as_lineno_2" &&
22981   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
22982              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22983              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22984              CONFIG_SHELL=$as_dir/$as_base
22985              export CONFIG_SHELL
22986              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22987            fi;;
22988          esac
22989        done
22990 done
22991 ;;
22992   esac
22993
22994   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22995   # uniformly replaced by the line number.  The first 'sed' inserts a
22996   # line-number line before each line; the second 'sed' does the real
22997   # work.  The second script uses 'N' to pair each line-number line
22998   # with the numbered line, and appends trailing '-' during
22999   # substitution so that $LINENO is not a special case at line end.
23000   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23001   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23002   sed '=' <$as_myself |
23003     sed '
23004       N
23005       s,$,-,
23006       : loop
23007       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23008       t loop
23009       s,-$,,
23010       s,^['$as_cr_digits']*\n,,
23011     ' >$as_me.lineno &&
23012   chmod +x $as_me.lineno ||
23013     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23014 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23015    { (exit 1); exit 1; }; }
23016
23017   # Don't try to exec as it changes $[0], causing all sort of problems
23018   # (the dirname of $[0] is not the place where we might find the
23019   # original and so on.  Autoconf is especially sensible to this).
23020   . ./$as_me.lineno
23021   # Exit status is that of the last command.
23022   exit
23023 }
23024
23025
23026 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23027   *c*,-n*) ECHO_N= ECHO_C='
23028 ' ECHO_T='      ' ;;
23029   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23030   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23031 esac
23032
23033 if expr a : '\(a\)' >/dev/null 2>&1; then
23034   as_expr=expr
23035 else
23036   as_expr=false
23037 fi
23038
23039 rm -f conf$$ conf$$.exe conf$$.file
23040 echo >conf$$.file
23041 if ln -s conf$$.file conf$$ 2>/dev/null; then
23042   # We could just check for DJGPP; but this test a) works b) is more generic
23043   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23044   if test -f conf$$.exe; then
23045     # Don't use ln at all; we don't have any links
23046     as_ln_s='cp -p'
23047   else
23048     as_ln_s='ln -s'
23049   fi
23050 elif ln conf$$.file conf$$ 2>/dev/null; then
23051   as_ln_s=ln
23052 else
23053   as_ln_s='cp -p'
23054 fi
23055 rm -f conf$$ conf$$.exe conf$$.file
23056
23057 if mkdir -p . 2>/dev/null; then
23058   as_mkdir_p=:
23059 else
23060   test -d ./-p && rmdir ./-p
23061   as_mkdir_p=false
23062 fi
23063
23064 as_executable_p="test -f"
23065
23066 # Sed expression to map a string onto a valid CPP name.
23067 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23068
23069 # Sed expression to map a string onto a valid variable name.
23070 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23071
23072
23073 # IFS
23074 # We need space, tab and new line, in precisely that order.
23075 as_nl='
23076 '
23077 IFS="   $as_nl"
23078
23079 # CDPATH.
23080 $as_unset CDPATH
23081
23082 exec 6>&1
23083
23084 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23085 # report actual input values of CONFIG_FILES etc. instead of their
23086 # values after options handling.  Logging --version etc. is OK.
23087 exec 5>>config.log
23088 {
23089   echo
23090   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23091 ## Running $as_me. ##
23092 _ASBOX
23093 } >&5
23094 cat >&5 <<_CSEOF
23095
23096 This file was extended by PostgreSQL $as_me 8.2devel, which was
23097 generated by GNU Autoconf 2.59.  Invocation command line was
23098
23099   CONFIG_FILES    = $CONFIG_FILES
23100   CONFIG_HEADERS  = $CONFIG_HEADERS
23101   CONFIG_LINKS    = $CONFIG_LINKS
23102   CONFIG_COMMANDS = $CONFIG_COMMANDS
23103   $ $0 $@
23104
23105 _CSEOF
23106 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23107 echo >&5
23108 _ACEOF
23109
23110 # Files that config.status was made for.
23111 if test -n "$ac_config_files"; then
23112   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23113 fi
23114
23115 if test -n "$ac_config_headers"; then
23116   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23117 fi
23118
23119 if test -n "$ac_config_links"; then
23120   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23121 fi
23122
23123 if test -n "$ac_config_commands"; then
23124   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23125 fi
23126
23127 cat >>$CONFIG_STATUS <<\_ACEOF
23128
23129 ac_cs_usage="\
23130 \`$as_me' instantiates files from templates according to the
23131 current configuration.
23132
23133 Usage: $0 [OPTIONS] [FILE]...
23134
23135   -h, --help       print this help, then exit
23136   -V, --version    print version number, then exit
23137   -q, --quiet      do not print progress messages
23138   -d, --debug      don't remove temporary files
23139       --recheck    update $as_me by reconfiguring in the same conditions
23140   --file=FILE[:TEMPLATE]
23141                    instantiate the configuration file FILE
23142   --header=FILE[:TEMPLATE]
23143                    instantiate the configuration header FILE
23144
23145 Configuration files:
23146 $config_files
23147
23148 Configuration headers:
23149 $config_headers
23150
23151 Configuration links:
23152 $config_links
23153
23154 Configuration commands:
23155 $config_commands
23156
23157 Report bugs to <bug-autoconf@gnu.org>."
23158 _ACEOF
23159
23160 cat >>$CONFIG_STATUS <<_ACEOF
23161 ac_cs_version="\\
23162 PostgreSQL config.status 8.2devel
23163 configured by $0, generated by GNU Autoconf 2.59,
23164   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23165
23166 Copyright (C) 2003 Free Software Foundation, Inc.
23167 This config.status script is free software; the Free Software Foundation
23168 gives unlimited permission to copy, distribute and modify it."
23169 srcdir=$srcdir
23170 _ACEOF
23171
23172 cat >>$CONFIG_STATUS <<\_ACEOF
23173 # If no file are specified by the user, then we need to provide default
23174 # value.  By we need to know if files were specified by the user.
23175 ac_need_defaults=:
23176 while test $# != 0
23177 do
23178   case $1 in
23179   --*=*)
23180     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23181     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23182     ac_shift=:
23183     ;;
23184   -*)
23185     ac_option=$1
23186     ac_optarg=$2
23187     ac_shift=shift
23188     ;;
23189   *) # This is not an option, so the user has probably given explicit
23190      # arguments.
23191      ac_option=$1
23192      ac_need_defaults=false;;
23193   esac
23194
23195   case $ac_option in
23196   # Handling of the options.
23197 _ACEOF
23198 cat >>$CONFIG_STATUS <<\_ACEOF
23199   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23200     ac_cs_recheck=: ;;
23201   --version | --vers* | -V )
23202     echo "$ac_cs_version"; exit 0 ;;
23203   --he | --h)
23204     # Conflict between --help and --header
23205     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23206 Try \`$0 --help' for more information." >&5
23207 echo "$as_me: error: ambiguous option: $1
23208 Try \`$0 --help' for more information." >&2;}
23209    { (exit 1); exit 1; }; };;
23210   --help | --hel | -h )
23211     echo "$ac_cs_usage"; exit 0 ;;
23212   --debug | --d* | -d )
23213     debug=: ;;
23214   --file | --fil | --fi | --f )
23215     $ac_shift
23216     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23217     ac_need_defaults=false;;
23218   --header | --heade | --head | --hea )
23219     $ac_shift
23220     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23221     ac_need_defaults=false;;
23222   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23223   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23224     ac_cs_silent=: ;;
23225
23226   # This is an error.
23227   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23228 Try \`$0 --help' for more information." >&5
23229 echo "$as_me: error: unrecognized option: $1
23230 Try \`$0 --help' for more information." >&2;}
23231    { (exit 1); exit 1; }; } ;;
23232
23233   *) ac_config_targets="$ac_config_targets $1" ;;
23234
23235   esac
23236   shift
23237 done
23238
23239 ac_configure_extra_args=
23240
23241 if $ac_cs_silent; then
23242   exec 6>/dev/null
23243   ac_configure_extra_args="$ac_configure_extra_args --silent"
23244 fi
23245
23246 _ACEOF
23247 cat >>$CONFIG_STATUS <<_ACEOF
23248 if \$ac_cs_recheck; then
23249   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23250   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23251 fi
23252
23253 _ACEOF
23254
23255
23256
23257
23258
23259 cat >>$CONFIG_STATUS <<\_ACEOF
23260 for ac_config_target in $ac_config_targets
23261 do
23262   case "$ac_config_target" in
23263   # Handling of arguments.
23264   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23265   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23266   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23267   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23268   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23269   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23270   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23271   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23272   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23273   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23274   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23275   "src/interfaces/ecpg/include/ecpg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
23276   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23277 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23278    { (exit 1); exit 1; }; };;
23279   esac
23280 done
23281
23282 # If the user did not use the arguments to specify the items to instantiate,
23283 # then the envvar interface is used.  Set only those that are not.
23284 # We use the long form for the default assignment because of an extremely
23285 # bizarre bug on SunOS 4.1.3.
23286 if $ac_need_defaults; then
23287   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23288   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23289   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23290   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23291 fi
23292
23293 # Have a temporary directory for convenience.  Make it in the build tree
23294 # simply because there is no reason to put it here, and in addition,
23295 # creating and moving files from /tmp can sometimes cause problems.
23296 # Create a temporary directory, and hook for its removal unless debugging.
23297 $debug ||
23298 {
23299   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23300   trap '{ (exit 1); exit 1; }' 1 2 13 15
23301 }
23302
23303 # Create a (secure) tmp directory for tmp files.
23304
23305 {
23306   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23307   test -n "$tmp" && test -d "$tmp"
23308 }  ||
23309 {
23310   tmp=./confstat$$-$RANDOM
23311   (umask 077 && mkdir $tmp)
23312 } ||
23313 {
23314    echo "$me: cannot create a temporary directory in ." >&2
23315    { (exit 1); exit 1; }
23316 }
23317
23318 _ACEOF
23319
23320 cat >>$CONFIG_STATUS <<_ACEOF
23321
23322 #
23323 # CONFIG_FILES section.
23324 #
23325
23326 # No need to generate the scripts if there are no CONFIG_FILES.
23327 # This happens for instance when ./config.status config.h
23328 if test -n "\$CONFIG_FILES"; then
23329   # Protect against being on the right side of a sed subst in config.status.
23330   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23331    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23332 s,@SHELL@,$SHELL,;t t
23333 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23334 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23335 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23336 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23337 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23338 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23339 s,@exec_prefix@,$exec_prefix,;t t
23340 s,@prefix@,$prefix,;t t
23341 s,@program_transform_name@,$program_transform_name,;t t
23342 s,@bindir@,$bindir,;t t
23343 s,@sbindir@,$sbindir,;t t
23344 s,@libexecdir@,$libexecdir,;t t
23345 s,@datadir@,$datadir,;t t
23346 s,@sysconfdir@,$sysconfdir,;t t
23347 s,@sharedstatedir@,$sharedstatedir,;t t
23348 s,@localstatedir@,$localstatedir,;t t
23349 s,@libdir@,$libdir,;t t
23350 s,@includedir@,$includedir,;t t
23351 s,@oldincludedir@,$oldincludedir,;t t
23352 s,@infodir@,$infodir,;t t
23353 s,@mandir@,$mandir,;t t
23354 s,@build_alias@,$build_alias,;t t
23355 s,@host_alias@,$host_alias,;t t
23356 s,@target_alias@,$target_alias,;t t
23357 s,@DEFS@,$DEFS,;t t
23358 s,@ECHO_C@,$ECHO_C,;t t
23359 s,@ECHO_N@,$ECHO_N,;t t
23360 s,@ECHO_T@,$ECHO_T,;t t
23361 s,@LIBS@,$LIBS,;t t
23362 s,@configure_args@,$configure_args,;t t
23363 s,@build@,$build,;t t
23364 s,@build_cpu@,$build_cpu,;t t
23365 s,@build_vendor@,$build_vendor,;t t
23366 s,@build_os@,$build_os,;t t
23367 s,@host@,$host,;t t
23368 s,@host_cpu@,$host_cpu,;t t
23369 s,@host_vendor@,$host_vendor,;t t
23370 s,@host_os@,$host_os,;t t
23371 s,@PORTNAME@,$PORTNAME,;t t
23372 s,@docdir@,$docdir,;t t
23373 s,@enable_nls@,$enable_nls,;t t
23374 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23375 s,@default_port@,$default_port,;t t
23376 s,@enable_shared@,$enable_shared,;t t
23377 s,@enable_rpath@,$enable_rpath,;t t
23378 s,@enable_debug@,$enable_debug,;t t
23379 s,@DTRACE@,$DTRACE,;t t
23380 s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
23381 s,@enable_dtrace@,$enable_dtrace,;t t
23382 s,@CC@,$CC,;t t
23383 s,@CFLAGS@,$CFLAGS,;t t
23384 s,@LDFLAGS@,$LDFLAGS,;t t
23385 s,@CPPFLAGS@,$CPPFLAGS,;t t
23386 s,@ac_ct_CC@,$ac_ct_CC,;t t
23387 s,@EXEEXT@,$EXEEXT,;t t
23388 s,@OBJEXT@,$OBJEXT,;t t
23389 s,@CPP@,$CPP,;t t
23390 s,@GCC@,$GCC,;t t
23391 s,@TAS@,$TAS,;t t
23392 s,@autodepend@,$autodepend,;t t
23393 s,@INCLUDES@,$INCLUDES,;t t
23394 s,@enable_thread_safety@,$enable_thread_safety,;t t
23395 s,@with_tcl@,$with_tcl,;t t
23396 s,@with_perl@,$with_perl,;t t
23397 s,@with_python@,$with_python,;t t
23398 s,@with_krb5@,$with_krb5,;t t
23399 s,@krb_srvtab@,$krb_srvtab,;t t
23400 s,@with_pam@,$with_pam,;t t
23401 s,@with_ldap@,$with_ldap,;t t
23402 s,@with_bonjour@,$with_bonjour,;t t
23403 s,@with_openssl@,$with_openssl,;t t
23404 s,@with_zlib@,$with_zlib,;t t
23405 s,@EGREP@,$EGREP,;t t
23406 s,@ELF_SYS@,$ELF_SYS,;t t
23407 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23408 s,@AWK@,$AWK,;t t
23409 s,@FLEX@,$FLEX,;t t
23410 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23411 s,@LN_S@,$LN_S,;t t
23412 s,@LD@,$LD,;t t
23413 s,@with_gnu_ld@,$with_gnu_ld,;t t
23414 s,@ld_R_works@,$ld_R_works,;t t
23415 s,@RANLIB@,$RANLIB,;t t
23416 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23417 s,@TAR@,$TAR,;t t
23418 s,@STRIP@,$STRIP,;t t
23419 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23420 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23421 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23422 s,@YACC@,$YACC,;t t
23423 s,@YFLAGS@,$YFLAGS,;t t
23424 s,@PERL@,$PERL,;t t
23425 s,@perl_archlibexp@,$perl_archlibexp,;t t
23426 s,@perl_privlibexp@,$perl_privlibexp,;t t
23427 s,@perl_useshrplib@,$perl_useshrplib,;t t
23428 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23429 s,@PYTHON@,$PYTHON,;t t
23430 s,@python_version@,$python_version,;t t
23431 s,@python_configdir@,$python_configdir,;t t
23432 s,@python_includespec@,$python_includespec,;t t
23433 s,@python_libdir@,$python_libdir,;t t
23434 s,@python_libspec@,$python_libspec,;t t
23435 s,@python_additional_libs@,$python_additional_libs,;t t
23436 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23437 s,@LIBOBJS@,$LIBOBJS,;t t
23438 s,@acx_pthread_config@,$acx_pthread_config,;t t
23439 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23440 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23441 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23442 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23443 s,@MSGFMT@,$MSGFMT,;t t
23444 s,@MSGMERGE@,$MSGMERGE,;t t
23445 s,@XGETTEXT@,$XGETTEXT,;t t
23446 s,@localedir@,$localedir,;t t
23447 s,@TCLSH@,$TCLSH,;t t
23448 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23449 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23450 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23451 s,@TCL_LIBS@,$TCL_LIBS,;t t
23452 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23453 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23454 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23455 s,@NSGMLS@,$NSGMLS,;t t
23456 s,@JADE@,$JADE,;t t
23457 s,@have_docbook@,$have_docbook,;t t
23458 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23459 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23460 s,@SGMLSPL@,$SGMLSPL,;t t
23461 s,@vpath_build@,$vpath_build,;t t
23462 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23463 CEOF
23464
23465 _ACEOF
23466
23467   cat >>$CONFIG_STATUS <<\_ACEOF
23468   # Split the substitutions into bite-sized pieces for seds with
23469   # small command number limits, like on Digital OSF/1 and HP-UX.
23470   ac_max_sed_lines=48
23471   ac_sed_frag=1 # Number of current file.
23472   ac_beg=1 # First line for current file.
23473   ac_end=$ac_max_sed_lines # Line after last line for current file.
23474   ac_more_lines=:
23475   ac_sed_cmds=
23476   while $ac_more_lines; do
23477     if test $ac_beg -gt 1; then
23478       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23479     else
23480       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23481     fi
23482     if test ! -s $tmp/subs.frag; then
23483       ac_more_lines=false
23484     else
23485       # The purpose of the label and of the branching condition is to
23486       # speed up the sed processing (if there are no `@' at all, there
23487       # is no need to browse any of the substitutions).
23488       # These are the two extra sed commands mentioned above.
23489       (echo ':t
23490   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23491       if test -z "$ac_sed_cmds"; then
23492         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23493       else
23494         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23495       fi
23496       ac_sed_frag=`expr $ac_sed_frag + 1`
23497       ac_beg=$ac_end
23498       ac_end=`expr $ac_end + $ac_max_sed_lines`
23499     fi
23500   done
23501   if test -z "$ac_sed_cmds"; then
23502     ac_sed_cmds=cat
23503   fi
23504 fi # test -n "$CONFIG_FILES"
23505
23506 _ACEOF
23507 cat >>$CONFIG_STATUS <<\_ACEOF
23508 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23509   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23510   case $ac_file in
23511   - | *:- | *:-:* ) # input from stdin
23512         cat >$tmp/stdin
23513         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23514         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23515   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23516         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23517   * )   ac_file_in=$ac_file.in ;;
23518   esac
23519
23520   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23521   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23522 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23523          X"$ac_file" : 'X\(//\)[^/]' \| \
23524          X"$ac_file" : 'X\(//\)$' \| \
23525          X"$ac_file" : 'X\(/\)' \| \
23526          .     : '\(.\)' 2>/dev/null ||
23527 echo X"$ac_file" |
23528     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23529           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23530           /^X\(\/\/\)$/{ s//\1/; q; }
23531           /^X\(\/\).*/{ s//\1/; q; }
23532           s/.*/./; q'`
23533   { if $as_mkdir_p; then
23534     mkdir -p "$ac_dir"
23535   else
23536     as_dir="$ac_dir"
23537     as_dirs=
23538     while test ! -d "$as_dir"; do
23539       as_dirs="$as_dir $as_dirs"
23540       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23541 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23542          X"$as_dir" : 'X\(//\)[^/]' \| \
23543          X"$as_dir" : 'X\(//\)$' \| \
23544          X"$as_dir" : 'X\(/\)' \| \
23545          .     : '\(.\)' 2>/dev/null ||
23546 echo X"$as_dir" |
23547     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23548           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23549           /^X\(\/\/\)$/{ s//\1/; q; }
23550           /^X\(\/\).*/{ s//\1/; q; }
23551           s/.*/./; q'`
23552     done
23553     test ! -n "$as_dirs" || mkdir $as_dirs
23554   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23555 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23556    { (exit 1); exit 1; }; }; }
23557
23558   ac_builddir=.
23559
23560 if test "$ac_dir" != .; then
23561   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23562   # A "../" for each directory in $ac_dir_suffix.
23563   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23564 else
23565   ac_dir_suffix= ac_top_builddir=
23566 fi
23567
23568 case $srcdir in
23569   .)  # No --srcdir option.  We are building in place.
23570     ac_srcdir=.
23571     if test -z "$ac_top_builddir"; then
23572        ac_top_srcdir=.
23573     else
23574        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23575     fi ;;
23576   [\\/]* | ?:[\\/]* )  # Absolute path.
23577     ac_srcdir=$srcdir$ac_dir_suffix;
23578     ac_top_srcdir=$srcdir ;;
23579   *) # Relative path.
23580     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23581     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23582 esac
23583
23584 # Do not use `cd foo && pwd` to compute absolute paths, because
23585 # the directories may not exist.
23586 case `pwd` in
23587 .) ac_abs_builddir="$ac_dir";;
23588 *)
23589   case "$ac_dir" in
23590   .) ac_abs_builddir=`pwd`;;
23591   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23592   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23593   esac;;
23594 esac
23595 case $ac_abs_builddir in
23596 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23597 *)
23598   case ${ac_top_builddir}. in
23599   .) ac_abs_top_builddir=$ac_abs_builddir;;
23600   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23601   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23602   esac;;
23603 esac
23604 case $ac_abs_builddir in
23605 .) ac_abs_srcdir=$ac_srcdir;;
23606 *)
23607   case $ac_srcdir in
23608   .) ac_abs_srcdir=$ac_abs_builddir;;
23609   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23610   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23611   esac;;
23612 esac
23613 case $ac_abs_builddir in
23614 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23615 *)
23616   case $ac_top_srcdir in
23617   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23618   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23619   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23620   esac;;
23621 esac
23622
23623
23624
23625   # Let's still pretend it is `configure' which instantiates (i.e., don't
23626   # use $as_me), people would be surprised to read:
23627   #    /* config.h.  Generated by config.status.  */
23628   if test x"$ac_file" = x-; then
23629     configure_input=
23630   else
23631     configure_input="$ac_file.  "
23632   fi
23633   configure_input=$configure_input"Generated from `echo $ac_file_in |
23634                                      sed 's,.*/,,'` by configure."
23635
23636   # First look for the input files in the build tree, otherwise in the
23637   # src tree.
23638   ac_file_inputs=`IFS=:
23639     for f in $ac_file_in; do
23640       case $f in
23641       -) echo $tmp/stdin ;;
23642       [\\/$]*)
23643          # Absolute (can't be DOS-style, as IFS=:)
23644          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23645 echo "$as_me: error: cannot find input file: $f" >&2;}
23646    { (exit 1); exit 1; }; }
23647          echo "$f";;
23648       *) # Relative
23649          if test -f "$f"; then
23650            # Build tree
23651            echo "$f"
23652          elif test -f "$srcdir/$f"; then
23653            # Source tree
23654            echo "$srcdir/$f"
23655          else
23656            # /dev/null tree
23657            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23658 echo "$as_me: error: cannot find input file: $f" >&2;}
23659    { (exit 1); exit 1; }; }
23660          fi;;
23661       esac
23662     done` || { (exit 1); exit 1; }
23663
23664   if test x"$ac_file" != x-; then
23665     { echo "$as_me:$LINENO: creating $ac_file" >&5
23666 echo "$as_me: creating $ac_file" >&6;}
23667     rm -f "$ac_file"
23668   fi
23669 _ACEOF
23670 cat >>$CONFIG_STATUS <<_ACEOF
23671   sed "$ac_vpsub
23672 $extrasub
23673 _ACEOF
23674 cat >>$CONFIG_STATUS <<\_ACEOF
23675 :t
23676 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23677 s,@configure_input@,$configure_input,;t t
23678 s,@srcdir@,$ac_srcdir,;t t
23679 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23680 s,@top_srcdir@,$ac_top_srcdir,;t t
23681 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23682 s,@builddir@,$ac_builddir,;t t
23683 s,@abs_builddir@,$ac_abs_builddir,;t t
23684 s,@top_builddir@,$ac_top_builddir,;t t
23685 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23686 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23687   rm -f $tmp/stdin
23688   if test x"$ac_file" != x-; then
23689     mv $tmp/out $ac_file
23690   else
23691     cat $tmp/out
23692     rm -f $tmp/out
23693   fi
23694
23695 done
23696 _ACEOF
23697 cat >>$CONFIG_STATUS <<\_ACEOF
23698
23699 #
23700 # CONFIG_HEADER section.
23701 #
23702
23703 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23704 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23705 #
23706 # ac_d sets the value in "#define NAME VALUE" lines.
23707 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23708 ac_dB='[         ].*$,\1#\2'
23709 ac_dC=' '
23710 ac_dD=',;t'
23711 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23712 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23713 ac_uB='$,\1#\2define\3'
23714 ac_uC=' '
23715 ac_uD=',;t'
23716
23717 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23718   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23719   case $ac_file in
23720   - | *:- | *:-:* ) # input from stdin
23721         cat >$tmp/stdin
23722         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23723         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23724   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23725         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23726   * )   ac_file_in=$ac_file.in ;;
23727   esac
23728
23729   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23730 echo "$as_me: creating $ac_file" >&6;}
23731
23732   # First look for the input files in the build tree, otherwise in the
23733   # src tree.
23734   ac_file_inputs=`IFS=:
23735     for f in $ac_file_in; do
23736       case $f in
23737       -) echo $tmp/stdin ;;
23738       [\\/$]*)
23739          # Absolute (can't be DOS-style, as IFS=:)
23740          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23741 echo "$as_me: error: cannot find input file: $f" >&2;}
23742    { (exit 1); exit 1; }; }
23743          # Do quote $f, to prevent DOS paths from being IFS'd.
23744          echo "$f";;
23745       *) # Relative
23746          if test -f "$f"; then
23747            # Build tree
23748            echo "$f"
23749          elif test -f "$srcdir/$f"; then
23750            # Source tree
23751            echo "$srcdir/$f"
23752          else
23753            # /dev/null tree
23754            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23755 echo "$as_me: error: cannot find input file: $f" >&2;}
23756    { (exit 1); exit 1; }; }
23757          fi;;
23758       esac
23759     done` || { (exit 1); exit 1; }
23760   # Remove the trailing spaces.
23761   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23762
23763 _ACEOF
23764
23765 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23766 # `conftest.undefs', that substitutes the proper values into
23767 # config.h.in to produce config.h.  The first handles `#define'
23768 # templates, and the second `#undef' templates.
23769 # And first: Protect against being on the right side of a sed subst in
23770 # config.status.  Protect against being in an unquoted here document
23771 # in config.status.
23772 rm -f conftest.defines conftest.undefs
23773 # Using a here document instead of a string reduces the quoting nightmare.
23774 # Putting comments in sed scripts is not portable.
23775 #
23776 # `end' is used to avoid that the second main sed command (meant for
23777 # 0-ary CPP macros) applies to n-ary macro definitions.
23778 # See the Autoconf documentation for `clear'.
23779 cat >confdef2sed.sed <<\_ACEOF
23780 s/[\\&,]/\\&/g
23781 s,[\\$`],\\&,g
23782 t clear
23783 : clear
23784 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23785 t end
23786 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23787 : end
23788 _ACEOF
23789 # If some macros were called several times there might be several times
23790 # the same #defines, which is useless.  Nevertheless, we may not want to
23791 # sort them, since we want the *last* AC-DEFINE to be honored.
23792 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23793 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23794 rm -f confdef2sed.sed
23795
23796 # This sed command replaces #undef with comments.  This is necessary, for
23797 # example, in the case of _POSIX_SOURCE, which is predefined and required
23798 # on some systems where configure will not decide to define it.
23799 cat >>conftest.undefs <<\_ACEOF
23800 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23801 _ACEOF
23802
23803 # Break up conftest.defines because some shells have a limit on the size
23804 # of here documents, and old seds have small limits too (100 cmds).
23805 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23806 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23807 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23808 echo '  :' >>$CONFIG_STATUS
23809 rm -f conftest.tail
23810 while grep . conftest.defines >/dev/null
23811 do
23812   # Write a limited-size here document to $tmp/defines.sed.
23813   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23814   # Speed up: don't consider the non `#define' lines.
23815   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23816   # Work around the forget-to-reset-the-flag bug.
23817   echo 't clr' >>$CONFIG_STATUS
23818   echo ': clr' >>$CONFIG_STATUS
23819   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23820   echo 'CEOF
23821   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23822   rm -f $tmp/in
23823   mv $tmp/out $tmp/in
23824 ' >>$CONFIG_STATUS
23825   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23826   rm -f conftest.defines
23827   mv conftest.tail conftest.defines
23828 done
23829 rm -f conftest.defines
23830 echo '  fi # grep' >>$CONFIG_STATUS
23831 echo >>$CONFIG_STATUS
23832
23833 # Break up conftest.undefs because some shells have a limit on the size
23834 # of here documents, and old seds have small limits too (100 cmds).
23835 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23836 rm -f conftest.tail
23837 while grep . conftest.undefs >/dev/null
23838 do
23839   # Write a limited-size here document to $tmp/undefs.sed.
23840   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23841   # Speed up: don't consider the non `#undef'
23842   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23843   # Work around the forget-to-reset-the-flag bug.
23844   echo 't clr' >>$CONFIG_STATUS
23845   echo ': clr' >>$CONFIG_STATUS
23846   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23847   echo 'CEOF
23848   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23849   rm -f $tmp/in
23850   mv $tmp/out $tmp/in
23851 ' >>$CONFIG_STATUS
23852   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23853   rm -f conftest.undefs
23854   mv conftest.tail conftest.undefs
23855 done
23856 rm -f conftest.undefs
23857
23858 cat >>$CONFIG_STATUS <<\_ACEOF
23859   # Let's still pretend it is `configure' which instantiates (i.e., don't
23860   # use $as_me), people would be surprised to read:
23861   #    /* config.h.  Generated by config.status.  */
23862   if test x"$ac_file" = x-; then
23863     echo "/* Generated by configure.  */" >$tmp/config.h
23864   else
23865     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
23866   fi
23867   cat $tmp/in >>$tmp/config.h
23868   rm -f $tmp/in
23869   if test x"$ac_file" != x-; then
23870     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
23871       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23872 echo "$as_me: $ac_file is unchanged" >&6;}
23873     else
23874       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23875 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23876          X"$ac_file" : 'X\(//\)[^/]' \| \
23877          X"$ac_file" : 'X\(//\)$' \| \
23878          X"$ac_file" : 'X\(/\)' \| \
23879          .     : '\(.\)' 2>/dev/null ||
23880 echo X"$ac_file" |
23881     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23882           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23883           /^X\(\/\/\)$/{ s//\1/; q; }
23884           /^X\(\/\).*/{ s//\1/; q; }
23885           s/.*/./; q'`
23886       { if $as_mkdir_p; then
23887     mkdir -p "$ac_dir"
23888   else
23889     as_dir="$ac_dir"
23890     as_dirs=
23891     while test ! -d "$as_dir"; do
23892       as_dirs="$as_dir $as_dirs"
23893       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23894 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23895          X"$as_dir" : 'X\(//\)[^/]' \| \
23896          X"$as_dir" : 'X\(//\)$' \| \
23897          X"$as_dir" : 'X\(/\)' \| \
23898          .     : '\(.\)' 2>/dev/null ||
23899 echo X"$as_dir" |
23900     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23901           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23902           /^X\(\/\/\)$/{ s//\1/; q; }
23903           /^X\(\/\).*/{ s//\1/; q; }
23904           s/.*/./; q'`
23905     done
23906     test ! -n "$as_dirs" || mkdir $as_dirs
23907   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23908 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23909    { (exit 1); exit 1; }; }; }
23910
23911       rm -f $ac_file
23912       mv $tmp/config.h $ac_file
23913     fi
23914   else
23915     cat $tmp/config.h
23916     rm -f $tmp/config.h
23917   fi
23918   # Run the commands associated with the file.
23919   case $ac_file in
23920     src/include/pg_config.h )
23921 # Update timestamp for pg_config.h (see Makefile.global)
23922 echo >src/include/stamp-h
23923  ;;
23924   esac
23925 done
23926 _ACEOF
23927 cat >>$CONFIG_STATUS <<\_ACEOF
23928
23929 #
23930 # CONFIG_LINKS section.
23931 #
23932
23933 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23934   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23935   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23936
23937   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23938 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
23939
23940   if test ! -r $srcdir/$ac_source; then
23941     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23942 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23943    { (exit 1); exit 1; }; }
23944   fi
23945   rm -f $ac_dest
23946
23947   # Make relative symlinks.
23948   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
23949 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23950          X"$ac_dest" : 'X\(//\)[^/]' \| \
23951          X"$ac_dest" : 'X\(//\)$' \| \
23952          X"$ac_dest" : 'X\(/\)' \| \
23953          .     : '\(.\)' 2>/dev/null ||
23954 echo X"$ac_dest" |
23955     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23956           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23957           /^X\(\/\/\)$/{ s//\1/; q; }
23958           /^X\(\/\).*/{ s//\1/; q; }
23959           s/.*/./; q'`
23960   { if $as_mkdir_p; then
23961     mkdir -p "$ac_dest_dir"
23962   else
23963     as_dir="$ac_dest_dir"
23964     as_dirs=
23965     while test ! -d "$as_dir"; do
23966       as_dirs="$as_dir $as_dirs"
23967       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23968 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23969          X"$as_dir" : 'X\(//\)[^/]' \| \
23970          X"$as_dir" : 'X\(//\)$' \| \
23971          X"$as_dir" : 'X\(/\)' \| \
23972          .     : '\(.\)' 2>/dev/null ||
23973 echo X"$as_dir" |
23974     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23975           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23976           /^X\(\/\/\)$/{ s//\1/; q; }
23977           /^X\(\/\).*/{ s//\1/; q; }
23978           s/.*/./; q'`
23979     done
23980     test ! -n "$as_dirs" || mkdir $as_dirs
23981   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
23982 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
23983    { (exit 1); exit 1; }; }; }
23984
23985   ac_builddir=.
23986
23987 if test "$ac_dest_dir" != .; then
23988   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
23989   # A "../" for each directory in $ac_dir_suffix.
23990   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23991 else
23992   ac_dir_suffix= ac_top_builddir=
23993 fi
23994
23995 case $srcdir in
23996   .)  # No --srcdir option.  We are building in place.
23997     ac_srcdir=.
23998     if test -z "$ac_top_builddir"; then
23999        ac_top_srcdir=.
24000     else
24001        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24002     fi ;;
24003   [\\/]* | ?:[\\/]* )  # Absolute path.
24004     ac_srcdir=$srcdir$ac_dir_suffix;
24005     ac_top_srcdir=$srcdir ;;
24006   *) # Relative path.
24007     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24008     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24009 esac
24010
24011 # Do not use `cd foo && pwd` to compute absolute paths, because
24012 # the directories may not exist.
24013 case `pwd` in
24014 .) ac_abs_builddir="$ac_dest_dir";;
24015 *)
24016   case "$ac_dest_dir" in
24017   .) ac_abs_builddir=`pwd`;;
24018   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24019   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24020   esac;;
24021 esac
24022 case $ac_abs_builddir in
24023 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24024 *)
24025   case ${ac_top_builddir}. in
24026   .) ac_abs_top_builddir=$ac_abs_builddir;;
24027   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24028   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24029   esac;;
24030 esac
24031 case $ac_abs_builddir in
24032 .) ac_abs_srcdir=$ac_srcdir;;
24033 *)
24034   case $ac_srcdir in
24035   .) ac_abs_srcdir=$ac_abs_builddir;;
24036   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24037   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24038   esac;;
24039 esac
24040 case $ac_abs_builddir in
24041 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24042 *)
24043   case $ac_top_srcdir in
24044   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24045   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24046   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24047   esac;;
24048 esac
24049
24050
24051   case $srcdir in
24052   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24053       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24054   esac
24055
24056   # Try a symlink, then a hard link, then a copy.
24057   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24058     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24059     cp -p $srcdir/$ac_source $ac_dest ||
24060     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24061 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24062    { (exit 1); exit 1; }; }
24063 done
24064 _ACEOF
24065 cat >>$CONFIG_STATUS <<\_ACEOF
24066
24067 #
24068 # CONFIG_COMMANDS section.
24069 #
24070 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24071   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24072   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24073   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24074 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24075          X"$ac_dest" : 'X\(//\)[^/]' \| \
24076          X"$ac_dest" : 'X\(//\)$' \| \
24077          X"$ac_dest" : 'X\(/\)' \| \
24078          .     : '\(.\)' 2>/dev/null ||
24079 echo X"$ac_dest" |
24080     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24081           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24082           /^X\(\/\/\)$/{ s//\1/; q; }
24083           /^X\(\/\).*/{ s//\1/; q; }
24084           s/.*/./; q'`
24085   { if $as_mkdir_p; then
24086     mkdir -p "$ac_dir"
24087   else
24088     as_dir="$ac_dir"
24089     as_dirs=
24090     while test ! -d "$as_dir"; do
24091       as_dirs="$as_dir $as_dirs"
24092       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24093 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24094          X"$as_dir" : 'X\(//\)[^/]' \| \
24095          X"$as_dir" : 'X\(//\)$' \| \
24096          X"$as_dir" : 'X\(/\)' \| \
24097          .     : '\(.\)' 2>/dev/null ||
24098 echo X"$as_dir" |
24099     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24100           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24101           /^X\(\/\/\)$/{ s//\1/; q; }
24102           /^X\(\/\).*/{ s//\1/; q; }
24103           s/.*/./; q'`
24104     done
24105     test ! -n "$as_dirs" || mkdir $as_dirs
24106   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24107 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24108    { (exit 1); exit 1; }; }; }
24109
24110   ac_builddir=.
24111
24112 if test "$ac_dir" != .; then
24113   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24114   # A "../" for each directory in $ac_dir_suffix.
24115   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24116 else
24117   ac_dir_suffix= ac_top_builddir=
24118 fi
24119
24120 case $srcdir in
24121   .)  # No --srcdir option.  We are building in place.
24122     ac_srcdir=.
24123     if test -z "$ac_top_builddir"; then
24124        ac_top_srcdir=.
24125     else
24126        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24127     fi ;;
24128   [\\/]* | ?:[\\/]* )  # Absolute path.
24129     ac_srcdir=$srcdir$ac_dir_suffix;
24130     ac_top_srcdir=$srcdir ;;
24131   *) # Relative path.
24132     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24133     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24134 esac
24135
24136 # Do not use `cd foo && pwd` to compute absolute paths, because
24137 # the directories may not exist.
24138 case `pwd` in
24139 .) ac_abs_builddir="$ac_dir";;
24140 *)
24141   case "$ac_dir" in
24142   .) ac_abs_builddir=`pwd`;;
24143   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24144   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24145   esac;;
24146 esac
24147 case $ac_abs_builddir in
24148 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24149 *)
24150   case ${ac_top_builddir}. in
24151   .) ac_abs_top_builddir=$ac_abs_builddir;;
24152   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24153   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24154   esac;;
24155 esac
24156 case $ac_abs_builddir in
24157 .) ac_abs_srcdir=$ac_srcdir;;
24158 *)
24159   case $ac_srcdir in
24160   .) ac_abs_srcdir=$ac_abs_builddir;;
24161   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24162   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24163   esac;;
24164 esac
24165 case $ac_abs_builddir in
24166 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24167 *)
24168   case $ac_top_srcdir in
24169   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24170   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24171   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24172   esac;;
24173 esac
24174
24175
24176   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24177 echo "$as_me: executing $ac_dest commands" >&6;}
24178   case $ac_dest in
24179     check_win32_symlinks )
24180 # Links sometimes fail undetected on Mingw -
24181 # so here we detect it and warn the user
24182 for FILE in $CONFIG_LINKS
24183  do
24184         # test -e works for symlinks in the MinGW console
24185         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24186 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24187  done
24188  ;;
24189   esac
24190 done
24191 _ACEOF
24192
24193 cat >>$CONFIG_STATUS <<\_ACEOF
24194
24195 { (exit 0); exit 0; }
24196 _ACEOF
24197 chmod +x $CONFIG_STATUS
24198 ac_clean_files=$ac_clean_files_save
24199
24200
24201 # configure is writing to config.log, and then calls config.status.
24202 # config.status does its own redirection, appending to config.log.
24203 # Unfortunately, on DOS this fails, as config.log is still kept open
24204 # by configure, so config.status won't be able to write to it; its
24205 # output is simply discarded.  So we exec the FD to /dev/null,
24206 # effectively closing config.log, so it can be properly (re)opened and
24207 # appended to by config.status.  When coming back to configure, we
24208 # need to make the FD available again.
24209 if test "$no_create" != yes; then
24210   ac_cs_success=:
24211   ac_config_status_args=
24212   test "$silent" = yes &&
24213     ac_config_status_args="$ac_config_status_args --quiet"
24214   exec 5>/dev/null
24215   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24216   exec 5>>config.log
24217   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24218   # would make configure fail if this is the last instruction.
24219   $ac_cs_success || { (exit 1); exit 1; }
24220 fi
24221
24222