]> granicus.if.org Git - postgresql/blob - configure
Add URL for terminate backend test:
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.2devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 2003 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright (c) 1996-2006, PostgreSQL Global Development Group
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248 # Name of the host.
249 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
250 # so uname gets run too.
251 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252
253 exec 6>&1
254
255 #
256 # Initializations.
257 #
258 ac_default_prefix=/usr/local
259 ac_config_libobj_dir=.
260 cross_compiling=no
261 subdirs=
262 MFLAGS=
263 MAKEFLAGS=
264 SHELL=${CONFIG_SHELL-/bin/sh}
265
266 # Maximum number of lines to put in a shell here document.
267 # This variable seems obsolete.  It should probably be removed, and
268 # only ac_max_sed_lines should be used.
269 : ${ac_max_here_lines=38}
270
271 # Identity of this package.
272 PACKAGE_NAME='PostgreSQL'
273 PACKAGE_TARNAME='postgresql'
274 PACKAGE_VERSION='8.2devel'
275 PACKAGE_STRING='PostgreSQL 8.2devel'
276 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
277
278 ac_unique_file="src/backend/access/common/heaptuple.c"
279 ac_default_prefix=/usr/local/pgsql
280 # Factoring default headers for most tests.
281 ac_includes_default="\
282 #include <stdio.h>
283 #if HAVE_SYS_TYPES_H
284 # include <sys/types.h>
285 #endif
286 #if HAVE_SYS_STAT_H
287 # include <sys/stat.h>
288 #endif
289 #if STDC_HEADERS
290 # include <stdlib.h>
291 # include <stddef.h>
292 #else
293 # if HAVE_STDLIB_H
294 #  include <stdlib.h>
295 # endif
296 #endif
297 #if HAVE_STRING_H
298 # if !STDC_HEADERS && HAVE_MEMORY_H
299 #  include <memory.h>
300 # endif
301 # include <string.h>
302 #endif
303 #if HAVE_STRINGS_H
304 # include <strings.h>
305 #endif
306 #if HAVE_INTTYPES_H
307 # include <inttypes.h>
308 #else
309 # if HAVE_STDINT_H
310 #  include <stdint.h>
311 # endif
312 #endif
313 #if HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif"
316
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug 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
2008       ;;
2009     no)
2010       :
2011       ;;
2012     *)
2013       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2014 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2015    { (exit 1); exit 1; }; }
2016       ;;
2017   esac
2018
2019 else
2020   enable_dtrace=no
2021
2022 fi;
2023
2024
2025
2026 #
2027 # C compiler
2028 #
2029
2030 # For historical reasons you can also use --with-CC to specify the C compiler
2031 # to use, although the standard way to do this is to set the CC environment
2032 # variable.
2033
2034
2035
2036
2037 # Check whether --with-CC or --without-CC was given.
2038 if test "${with_CC+set}" = set; then
2039   withval="$with_CC"
2040
2041   case $withval in
2042     yes)
2043       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2044 echo "$as_me: error: argument required for --with-CC option" >&2;}
2045    { (exit 1); exit 1; }; }
2046       ;;
2047     no)
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     *)
2053       CC=$with_CC
2054       ;;
2055   esac
2056
2057 fi;
2058
2059
2060 case $template in
2061   aix) pgac_cc_list="gcc xlc";;
2062  irix) pgac_cc_list="cc";; # no gcc
2063     *) pgac_cc_list="gcc cc";;
2064 esac
2065
2066 ac_ext=c
2067 ac_cpp='$CPP $CPPFLAGS'
2068 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2069 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2070 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2071 if test -n "$ac_tool_prefix"; then
2072   for ac_prog in $pgac_cc_list
2073   do
2074     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2075 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2076 echo "$as_me:$LINENO: checking for $ac_word" >&5
2077 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2078 if test "${ac_cv_prog_CC+set}" = set; then
2079   echo $ECHO_N "(cached) $ECHO_C" >&6
2080 else
2081   if test -n "$CC"; then
2082   ac_cv_prog_CC="$CC" # Let the user override the test.
2083 else
2084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2085 for as_dir in $PATH
2086 do
2087   IFS=$as_save_IFS
2088   test -z "$as_dir" && as_dir=.
2089   for ac_exec_ext in '' $ac_executable_extensions; do
2090   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2091     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2092     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2093     break 2
2094   fi
2095 done
2096 done
2097
2098 fi
2099 fi
2100 CC=$ac_cv_prog_CC
2101 if test -n "$CC"; then
2102   echo "$as_me:$LINENO: result: $CC" >&5
2103 echo "${ECHO_T}$CC" >&6
2104 else
2105   echo "$as_me:$LINENO: result: no" >&5
2106 echo "${ECHO_T}no" >&6
2107 fi
2108
2109     test -n "$CC" && break
2110   done
2111 fi
2112 if test -z "$CC"; then
2113   ac_ct_CC=$CC
2114   for ac_prog in $pgac_cc_list
2115 do
2116   # Extract the first word of "$ac_prog", so it can be a program name with args.
2117 set dummy $ac_prog; ac_word=$2
2118 echo "$as_me:$LINENO: checking for $ac_word" >&5
2119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2120 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2121   echo $ECHO_N "(cached) $ECHO_C" >&6
2122 else
2123   if test -n "$ac_ct_CC"; then
2124   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2125 else
2126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2127 for as_dir in $PATH
2128 do
2129   IFS=$as_save_IFS
2130   test -z "$as_dir" && as_dir=.
2131   for ac_exec_ext in '' $ac_executable_extensions; do
2132   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2133     ac_cv_prog_ac_ct_CC="$ac_prog"
2134     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2135     break 2
2136   fi
2137 done
2138 done
2139
2140 fi
2141 fi
2142 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2143 if test -n "$ac_ct_CC"; then
2144   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2145 echo "${ECHO_T}$ac_ct_CC" >&6
2146 else
2147   echo "$as_me:$LINENO: result: no" >&5
2148 echo "${ECHO_T}no" >&6
2149 fi
2150
2151   test -n "$ac_ct_CC" && break
2152 done
2153
2154   CC=$ac_ct_CC
2155 fi
2156
2157
2158 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2159 See \`config.log' for more details." >&5
2160 echo "$as_me: error: no acceptable C compiler found in \$PATH
2161 See \`config.log' for more details." >&2;}
2162    { (exit 1); exit 1; }; }
2163
2164 # Provide some information about the compiler.
2165 echo "$as_me:$LINENO:" \
2166      "checking for C compiler version" >&5
2167 ac_compiler=`set X $ac_compile; echo $2`
2168 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2169   (eval $ac_compiler --version </dev/null >&5) 2>&5
2170   ac_status=$?
2171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2172   (exit $ac_status); }
2173 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2174   (eval $ac_compiler -v </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
2184 cat >conftest.$ac_ext <<_ACEOF
2185 /* confdefs.h.  */
2186 _ACEOF
2187 cat confdefs.h >>conftest.$ac_ext
2188 cat >>conftest.$ac_ext <<_ACEOF
2189 /* end confdefs.h.  */
2190
2191 int
2192 main ()
2193 {
2194
2195   ;
2196   return 0;
2197 }
2198 _ACEOF
2199 ac_clean_files_save=$ac_clean_files
2200 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2201 # Try to create an executable without -o first, disregard a.out.
2202 # It will help us diagnose broken compilers, and finding out an intuition
2203 # of exeext.
2204 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2205 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2206 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2207 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2208   (eval $ac_link_default) 2>&5
2209   ac_status=$?
2210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2211   (exit $ac_status); }; then
2212   # Find the output, starting from the most likely.  This scheme is
2213 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2214 # resort.
2215
2216 # Be careful to initialize this variable, since it used to be cached.
2217 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2218 ac_cv_exeext=
2219 # b.out is created by i960 compilers.
2220 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2221 do
2222   test -f "$ac_file" || continue
2223   case $ac_file in
2224     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2225         ;;
2226     conftest.$ac_ext )
2227         # This is the source file.
2228         ;;
2229     [ab].out )
2230         # We found the default executable, but exeext='' is most
2231         # certainly right.
2232         break;;
2233     *.* )
2234         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2235         # FIXME: I believe we export ac_cv_exeext for Libtool,
2236         # but it would be cool to find out if it's true.  Does anybody
2237         # maintain Libtool? --akim.
2238         export ac_cv_exeext
2239         break;;
2240     * )
2241         break;;
2242   esac
2243 done
2244 else
2245   echo "$as_me: failed program was:" >&5
2246 sed 's/^/| /' conftest.$ac_ext >&5
2247
2248 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2249 See \`config.log' for more details." >&5
2250 echo "$as_me: error: C compiler cannot create executables
2251 See \`config.log' for more details." >&2;}
2252    { (exit 77); exit 77; }; }
2253 fi
2254
2255 ac_exeext=$ac_cv_exeext
2256 echo "$as_me:$LINENO: result: $ac_file" >&5
2257 echo "${ECHO_T}$ac_file" >&6
2258
2259 # Check the compiler produces executables we can run.  If not, either
2260 # the compiler is broken, or we cross compile.
2261 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2262 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2263 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2264 # If not cross compiling, check that we can run a simple program.
2265 if test "$cross_compiling" != yes; then
2266   if { ac_try='./$ac_file'
2267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2268   (eval $ac_try) 2>&5
2269   ac_status=$?
2270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2271   (exit $ac_status); }; }; then
2272     cross_compiling=no
2273   else
2274     if test "$cross_compiling" = maybe; then
2275         cross_compiling=yes
2276     else
2277         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2278 If you meant to cross compile, use \`--host'.
2279 See \`config.log' for more details." >&5
2280 echo "$as_me: error: cannot run C compiled programs.
2281 If you meant to cross compile, use \`--host'.
2282 See \`config.log' for more details." >&2;}
2283    { (exit 1); exit 1; }; }
2284     fi
2285   fi
2286 fi
2287 echo "$as_me:$LINENO: result: yes" >&5
2288 echo "${ECHO_T}yes" >&6
2289
2290 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2291 ac_clean_files=$ac_clean_files_save
2292 # Check the compiler produces executables we can run.  If not, either
2293 # the compiler is broken, or we cross compile.
2294 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2295 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2296 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2297 echo "${ECHO_T}$cross_compiling" >&6
2298
2299 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2300 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2301 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2302   (eval $ac_link) 2>&5
2303   ac_status=$?
2304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2305   (exit $ac_status); }; then
2306   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2307 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2308 # work properly (i.e., refer to `conftest.exe'), while it won't with
2309 # `rm'.
2310 for ac_file in conftest.exe conftest conftest.*; do
2311   test -f "$ac_file" || continue
2312   case $ac_file in
2313     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2314     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2315           export ac_cv_exeext
2316           break;;
2317     * ) break;;
2318   esac
2319 done
2320 else
2321   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2322 See \`config.log' for more details." >&5
2323 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2324 See \`config.log' for more details." >&2;}
2325    { (exit 1); exit 1; }; }
2326 fi
2327
2328 rm -f conftest$ac_cv_exeext
2329 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2330 echo "${ECHO_T}$ac_cv_exeext" >&6
2331
2332 rm -f conftest.$ac_ext
2333 EXEEXT=$ac_cv_exeext
2334 ac_exeext=$EXEEXT
2335 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2336 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2337 if test "${ac_cv_objext+set}" = set; then
2338   echo $ECHO_N "(cached) $ECHO_C" >&6
2339 else
2340   cat >conftest.$ac_ext <<_ACEOF
2341 /* confdefs.h.  */
2342 _ACEOF
2343 cat confdefs.h >>conftest.$ac_ext
2344 cat >>conftest.$ac_ext <<_ACEOF
2345 /* end confdefs.h.  */
2346
2347 int
2348 main ()
2349 {
2350
2351   ;
2352   return 0;
2353 }
2354 _ACEOF
2355 rm -f conftest.o conftest.obj
2356 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2357   (eval $ac_compile) 2>&5
2358   ac_status=$?
2359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2360   (exit $ac_status); }; then
2361   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2362   case $ac_file in
2363     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2364     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2365        break;;
2366   esac
2367 done
2368 else
2369   echo "$as_me: failed program was:" >&5
2370 sed 's/^/| /' conftest.$ac_ext >&5
2371
2372 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2373 See \`config.log' for more details." >&5
2374 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2375 See \`config.log' for more details." >&2;}
2376    { (exit 1); exit 1; }; }
2377 fi
2378
2379 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2380 fi
2381 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2382 echo "${ECHO_T}$ac_cv_objext" >&6
2383 OBJEXT=$ac_cv_objext
2384 ac_objext=$OBJEXT
2385 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2386 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2387 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2388   echo $ECHO_N "(cached) $ECHO_C" >&6
2389 else
2390   cat >conftest.$ac_ext <<_ACEOF
2391 /* confdefs.h.  */
2392 _ACEOF
2393 cat confdefs.h >>conftest.$ac_ext
2394 cat >>conftest.$ac_ext <<_ACEOF
2395 /* end confdefs.h.  */
2396
2397 int
2398 main ()
2399 {
2400 #ifndef __GNUC__
2401        choke me
2402 #endif
2403
2404   ;
2405   return 0;
2406 }
2407 _ACEOF
2408 rm -f conftest.$ac_objext
2409 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2410   (eval $ac_compile) 2>conftest.er1
2411   ac_status=$?
2412   grep -v '^ *+' conftest.er1 >conftest.err
2413   rm -f conftest.er1
2414   cat conftest.err >&5
2415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2416   (exit $ac_status); } &&
2417          { ac_try='test -z "$ac_c_werror_flag"
2418                          || test ! -s conftest.err'
2419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2420   (eval $ac_try) 2>&5
2421   ac_status=$?
2422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2423   (exit $ac_status); }; } &&
2424          { ac_try='test -s conftest.$ac_objext'
2425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2426   (eval $ac_try) 2>&5
2427   ac_status=$?
2428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2429   (exit $ac_status); }; }; then
2430   ac_compiler_gnu=yes
2431 else
2432   echo "$as_me: failed program was:" >&5
2433 sed 's/^/| /' conftest.$ac_ext >&5
2434
2435 ac_compiler_gnu=no
2436 fi
2437 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2438 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2439
2440 fi
2441 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2442 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2443 GCC=`test $ac_compiler_gnu = yes && echo yes`
2444 ac_test_CFLAGS=${CFLAGS+set}
2445 ac_save_CFLAGS=$CFLAGS
2446 CFLAGS="-g"
2447 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2448 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2449 if test "${ac_cv_prog_cc_g+set}" = set; then
2450   echo $ECHO_N "(cached) $ECHO_C" >&6
2451 else
2452   cat >conftest.$ac_ext <<_ACEOF
2453 /* confdefs.h.  */
2454 _ACEOF
2455 cat confdefs.h >>conftest.$ac_ext
2456 cat >>conftest.$ac_ext <<_ACEOF
2457 /* end confdefs.h.  */
2458
2459 int
2460 main ()
2461 {
2462
2463   ;
2464   return 0;
2465 }
2466 _ACEOF
2467 rm -f conftest.$ac_objext
2468 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2469   (eval $ac_compile) 2>conftest.er1
2470   ac_status=$?
2471   grep -v '^ *+' conftest.er1 >conftest.err
2472   rm -f conftest.er1
2473   cat conftest.err >&5
2474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2475   (exit $ac_status); } &&
2476          { ac_try='test -z "$ac_c_werror_flag"
2477                          || test ! -s conftest.err'
2478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2479   (eval $ac_try) 2>&5
2480   ac_status=$?
2481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2482   (exit $ac_status); }; } &&
2483          { ac_try='test -s conftest.$ac_objext'
2484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2485   (eval $ac_try) 2>&5
2486   ac_status=$?
2487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2488   (exit $ac_status); }; }; then
2489   ac_cv_prog_cc_g=yes
2490 else
2491   echo "$as_me: failed program was:" >&5
2492 sed 's/^/| /' conftest.$ac_ext >&5
2493
2494 ac_cv_prog_cc_g=no
2495 fi
2496 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2497 fi
2498 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2499 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2500 if test "$ac_test_CFLAGS" = set; then
2501   CFLAGS=$ac_save_CFLAGS
2502 elif test $ac_cv_prog_cc_g = yes; then
2503   if test "$GCC" = yes; then
2504     CFLAGS="-g -O2"
2505   else
2506     CFLAGS="-g"
2507   fi
2508 else
2509   if test "$GCC" = yes; then
2510     CFLAGS="-O2"
2511   else
2512     CFLAGS=
2513   fi
2514 fi
2515 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2516 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2517 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2518   echo $ECHO_N "(cached) $ECHO_C" >&6
2519 else
2520   ac_cv_prog_cc_stdc=no
2521 ac_save_CC=$CC
2522 cat >conftest.$ac_ext <<_ACEOF
2523 /* confdefs.h.  */
2524 _ACEOF
2525 cat confdefs.h >>conftest.$ac_ext
2526 cat >>conftest.$ac_ext <<_ACEOF
2527 /* end confdefs.h.  */
2528 #include <stdarg.h>
2529 #include <stdio.h>
2530 #include <sys/types.h>
2531 #include <sys/stat.h>
2532 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2533 struct buf { int x; };
2534 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2535 static char *e (p, i)
2536      char **p;
2537      int i;
2538 {
2539   return p[i];
2540 }
2541 static char *f (char * (*g) (char **, int), char **p, ...)
2542 {
2543   char *s;
2544   va_list v;
2545   va_start (v,p);
2546   s = g (p, va_arg (v,int));
2547   va_end (v);
2548   return s;
2549 }
2550
2551 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2552    function prototypes and stuff, but not '\xHH' hex character constants.
2553    These don't provoke an error unfortunately, instead are silently treated
2554    as 'x'.  The following induces an error, until -std1 is added to get
2555    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2556    array size at least.  It's necessary to write '\x00'==0 to get something
2557    that's true only with -std1.  */
2558 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2559
2560 int test (int i, double x);
2561 struct s1 {int (*f) (int a);};
2562 struct s2 {int (*f) (double a);};
2563 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2564 int argc;
2565 char **argv;
2566 int
2567 main ()
2568 {
2569 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2570   ;
2571   return 0;
2572 }
2573 _ACEOF
2574 # Don't try gcc -ansi; that turns off useful extensions and
2575 # breaks some systems' header files.
2576 # AIX                   -qlanglvl=ansi
2577 # Ultrix and OSF/1      -std1
2578 # HP-UX 10.20 and later -Ae
2579 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2580 # SVR4                  -Xc -D__EXTENSIONS__
2581 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2582 do
2583   CC="$ac_save_CC $ac_arg"
2584   rm -f conftest.$ac_objext
2585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2586   (eval $ac_compile) 2>conftest.er1
2587   ac_status=$?
2588   grep -v '^ *+' conftest.er1 >conftest.err
2589   rm -f conftest.er1
2590   cat conftest.err >&5
2591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2592   (exit $ac_status); } &&
2593          { ac_try='test -z "$ac_c_werror_flag"
2594                          || test ! -s conftest.err'
2595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2596   (eval $ac_try) 2>&5
2597   ac_status=$?
2598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2599   (exit $ac_status); }; } &&
2600          { ac_try='test -s conftest.$ac_objext'
2601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2602   (eval $ac_try) 2>&5
2603   ac_status=$?
2604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2605   (exit $ac_status); }; }; then
2606   ac_cv_prog_cc_stdc=$ac_arg
2607 break
2608 else
2609   echo "$as_me: failed program was:" >&5
2610 sed 's/^/| /' conftest.$ac_ext >&5
2611
2612 fi
2613 rm -f conftest.err conftest.$ac_objext
2614 done
2615 rm -f conftest.$ac_ext conftest.$ac_objext
2616 CC=$ac_save_CC
2617
2618 fi
2619
2620 case "x$ac_cv_prog_cc_stdc" in
2621   x|xno)
2622     echo "$as_me:$LINENO: result: none needed" >&5
2623 echo "${ECHO_T}none needed" >&6 ;;
2624   *)
2625     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2626 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2627     CC="$CC $ac_cv_prog_cc_stdc" ;;
2628 esac
2629
2630 # Some people use a C++ compiler to compile C.  Since we use `exit',
2631 # in C++ we need to declare it.  In case someone uses the same compiler
2632 # for both compiling C and C++ we need to have the C++ compiler decide
2633 # the declaration of exit, since it's the most demanding environment.
2634 cat >conftest.$ac_ext <<_ACEOF
2635 #ifndef __cplusplus
2636   choke me
2637 #endif
2638 _ACEOF
2639 rm -f conftest.$ac_objext
2640 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2641   (eval $ac_compile) 2>conftest.er1
2642   ac_status=$?
2643   grep -v '^ *+' conftest.er1 >conftest.err
2644   rm -f conftest.er1
2645   cat conftest.err >&5
2646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2647   (exit $ac_status); } &&
2648          { ac_try='test -z "$ac_c_werror_flag"
2649                          || test ! -s conftest.err'
2650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2651   (eval $ac_try) 2>&5
2652   ac_status=$?
2653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2654   (exit $ac_status); }; } &&
2655          { ac_try='test -s conftest.$ac_objext'
2656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2657   (eval $ac_try) 2>&5
2658   ac_status=$?
2659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660   (exit $ac_status); }; }; then
2661   for ac_declaration in \
2662    '' \
2663    'extern "C" void std::exit (int) throw (); using std::exit;' \
2664    'extern "C" void std::exit (int); using std::exit;' \
2665    'extern "C" void exit (int) throw ();' \
2666    'extern "C" void exit (int);' \
2667    'void exit (int);'
2668 do
2669   cat >conftest.$ac_ext <<_ACEOF
2670 /* confdefs.h.  */
2671 _ACEOF
2672 cat confdefs.h >>conftest.$ac_ext
2673 cat >>conftest.$ac_ext <<_ACEOF
2674 /* end confdefs.h.  */
2675 $ac_declaration
2676 #include <stdlib.h>
2677 int
2678 main ()
2679 {
2680 exit (42);
2681   ;
2682   return 0;
2683 }
2684 _ACEOF
2685 rm -f conftest.$ac_objext
2686 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2687   (eval $ac_compile) 2>conftest.er1
2688   ac_status=$?
2689   grep -v '^ *+' conftest.er1 >conftest.err
2690   rm -f conftest.er1
2691   cat conftest.err >&5
2692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2693   (exit $ac_status); } &&
2694          { ac_try='test -z "$ac_c_werror_flag"
2695                          || 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"
2740                          || test ! -s conftest.err'
2741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2742   (eval $ac_try) 2>&5
2743   ac_status=$?
2744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2745   (exit $ac_status); }; } &&
2746          { ac_try='test -s conftest.$ac_objext'
2747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2748   (eval $ac_try) 2>&5
2749   ac_status=$?
2750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2751   (exit $ac_status); }; }; then
2752   break
2753 else
2754   echo "$as_me: failed program was:" >&5
2755 sed 's/^/| /' conftest.$ac_ext >&5
2756
2757 fi
2758 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2759 done
2760 rm -f conftest*
2761 if test -n "$ac_declaration"; then
2762   echo '#ifdef __cplusplus' >>confdefs.h
2763   echo $ac_declaration      >>confdefs.h
2764   echo '#endif'             >>confdefs.h
2765 fi
2766
2767 else
2768   echo "$as_me: failed program was:" >&5
2769 sed 's/^/| /' conftest.$ac_ext >&5
2770
2771 fi
2772 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2773 ac_ext=c
2774 ac_cpp='$CPP $CPPFLAGS'
2775 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2776 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2777 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2778
2779
2780 unset CFLAGS
2781
2782 #
2783 # Read the template
2784 #
2785 . "$srcdir/src/template/$template" || exit
2786
2787 # CFLAGS are selected so:
2788 # If the user specifies something in the environment, that is used.
2789 # else:  If the template file set something, that is used.
2790 # else:  If the compiler is GCC, then we use -O2.
2791 # else:  If the compiler is something else, then we use -0.
2792
2793 if test "$ac_env_CFLAGS_set" = set; then
2794   CFLAGS=$ac_env_CFLAGS_value
2795 elif test "${CFLAGS+set}" = set; then
2796   : # (keep what template set)
2797 elif test "$GCC" = yes; then
2798   CFLAGS="-O2"
2799 else
2800   # if the user selected debug mode, don't use -O
2801   if test "$enable_debug" != yes; then
2802     CFLAGS="-O"
2803   fi
2804 fi
2805
2806 # Some versions of GCC support some additional useful warning flags.
2807 # Check whether they are supported, and add them to CFLAGS if so.
2808
2809 if test "$GCC" = yes; then
2810
2811 # ICC pretends to be GCC but it's lying; it doesn't support these options.
2812 # So we have to check if "GCC" is really ICC.
2813
2814 cat >conftest.$ac_ext <<_ACEOF
2815 /* confdefs.h.  */
2816 _ACEOF
2817 cat confdefs.h >>conftest.$ac_ext
2818 cat >>conftest.$ac_ext <<_ACEOF
2819 /* end confdefs.h.  */
2820
2821 int
2822 main ()
2823 {
2824 #ifndef __INTEL_COMPILER
2825 choke me
2826 #endif
2827   ;
2828   return 0;
2829 }
2830 _ACEOF
2831 rm -f conftest.$ac_objext
2832 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2833   (eval $ac_compile) 2>conftest.er1
2834   ac_status=$?
2835   grep -v '^ *+' conftest.er1 >conftest.err
2836   rm -f conftest.er1
2837   cat conftest.err >&5
2838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2839   (exit $ac_status); } &&
2840          { ac_try='test -z "$ac_c_werror_flag"
2841                          || test ! -s conftest.err'
2842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2843   (eval $ac_try) 2>&5
2844   ac_status=$?
2845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2846   (exit $ac_status); }; } &&
2847          { ac_try='test -s conftest.$ac_objext'
2848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2849   (eval $ac_try) 2>&5
2850   ac_status=$?
2851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2852   (exit $ac_status); }; }; then
2853   ICC=yes
2854 else
2855   echo "$as_me: failed program was:" >&5
2856 sed 's/^/| /' conftest.$ac_ext >&5
2857
2858 ICC=no
2859 fi
2860 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2861
2862   if test "$ICC" = no; then
2863     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2864
2865     echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2866 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2867 pgac_save_CFLAGS=$CFLAGS
2868 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2869 cat >conftest.$ac_ext <<_ACEOF
2870 /* confdefs.h.  */
2871 _ACEOF
2872 cat confdefs.h >>conftest.$ac_ext
2873 cat >>conftest.$ac_ext <<_ACEOF
2874 /* end confdefs.h.  */
2875
2876 int
2877 main ()
2878 {
2879
2880   ;
2881   return 0;
2882 }
2883 _ACEOF
2884 rm -f conftest.$ac_objext
2885 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2886   (eval $ac_compile) 2>conftest.er1
2887   ac_status=$?
2888   grep -v '^ *+' conftest.er1 >conftest.err
2889   rm -f conftest.er1
2890   cat conftest.err >&5
2891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2892   (exit $ac_status); } &&
2893          { ac_try='test -z "$ac_c_werror_flag"
2894                          || test ! -s conftest.err'
2895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2896   (eval $ac_try) 2>&5
2897   ac_status=$?
2898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2899   (exit $ac_status); }; } &&
2900          { ac_try='test -s conftest.$ac_objext'
2901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2902   (eval $ac_try) 2>&5
2903   ac_status=$?
2904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2905   (exit $ac_status); }; }; then
2906   echo "$as_me:$LINENO: result: yes" >&5
2907 echo "${ECHO_T}yes" >&6
2908 else
2909   echo "$as_me: failed program was:" >&5
2910 sed 's/^/| /' conftest.$ac_ext >&5
2911
2912 CFLAGS="$pgac_save_CFLAGS"
2913                     echo "$as_me:$LINENO: result: no" >&5
2914 echo "${ECHO_T}no" >&6
2915 fi
2916 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2917
2918     echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2919 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2920 pgac_save_CFLAGS=$CFLAGS
2921 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2922 cat >conftest.$ac_ext <<_ACEOF
2923 /* confdefs.h.  */
2924 _ACEOF
2925 cat confdefs.h >>conftest.$ac_ext
2926 cat >>conftest.$ac_ext <<_ACEOF
2927 /* end confdefs.h.  */
2928
2929 int
2930 main ()
2931 {
2932
2933   ;
2934   return 0;
2935 }
2936 _ACEOF
2937 rm -f conftest.$ac_objext
2938 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2939   (eval $ac_compile) 2>conftest.er1
2940   ac_status=$?
2941   grep -v '^ *+' conftest.er1 >conftest.err
2942   rm -f conftest.er1
2943   cat conftest.err >&5
2944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2945   (exit $ac_status); } &&
2946          { ac_try='test -z "$ac_c_werror_flag"
2947                          || test ! -s conftest.err'
2948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2949   (eval $ac_try) 2>&5
2950   ac_status=$?
2951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2952   (exit $ac_status); }; } &&
2953          { ac_try='test -s conftest.$ac_objext'
2954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2955   (eval $ac_try) 2>&5
2956   ac_status=$?
2957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2958   (exit $ac_status); }; }; then
2959   echo "$as_me:$LINENO: result: yes" >&5
2960 echo "${ECHO_T}yes" >&6
2961 else
2962   echo "$as_me: failed program was:" >&5
2963 sed 's/^/| /' conftest.$ac_ext >&5
2964
2965 CFLAGS="$pgac_save_CFLAGS"
2966                     echo "$as_me:$LINENO: result: no" >&5
2967 echo "${ECHO_T}no" >&6
2968 fi
2969 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2970
2971   else
2972     # Intel compiler has a bug/misoptimization in checking for
2973     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
2974     # CFLAGS.
2975     echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
2976 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6
2977 pgac_save_CFLAGS=$CFLAGS
2978 CFLAGS="$pgac_save_CFLAGS -mp1"
2979 cat >conftest.$ac_ext <<_ACEOF
2980 /* confdefs.h.  */
2981 _ACEOF
2982 cat confdefs.h >>conftest.$ac_ext
2983 cat >>conftest.$ac_ext <<_ACEOF
2984 /* end confdefs.h.  */
2985
2986 int
2987 main ()
2988 {
2989
2990   ;
2991   return 0;
2992 }
2993 _ACEOF
2994 rm -f conftest.$ac_objext
2995 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2996   (eval $ac_compile) 2>conftest.er1
2997   ac_status=$?
2998   grep -v '^ *+' conftest.er1 >conftest.err
2999   rm -f conftest.er1
3000   cat conftest.err >&5
3001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3002   (exit $ac_status); } &&
3003          { ac_try='test -z "$ac_c_werror_flag"
3004                          || test ! -s conftest.err'
3005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3006   (eval $ac_try) 2>&5
3007   ac_status=$?
3008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3009   (exit $ac_status); }; } &&
3010          { ac_try='test -s conftest.$ac_objext'
3011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3012   (eval $ac_try) 2>&5
3013   ac_status=$?
3014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3015   (exit $ac_status); }; }; then
3016   echo "$as_me:$LINENO: result: yes" >&5
3017 echo "${ECHO_T}yes" >&6
3018 else
3019   echo "$as_me: failed program was:" >&5
3020 sed 's/^/| /' conftest.$ac_ext >&5
3021
3022 CFLAGS="$pgac_save_CFLAGS"
3023                     echo "$as_me:$LINENO: result: no" >&5
3024 echo "${ECHO_T}no" >&6
3025 fi
3026 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3027
3028   fi
3029
3030   # Disable strict-aliasing rules; needed for gcc 3.3+
3031   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3032 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
3033 pgac_save_CFLAGS=$CFLAGS
3034 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3035 cat >conftest.$ac_ext <<_ACEOF
3036 /* confdefs.h.  */
3037 _ACEOF
3038 cat confdefs.h >>conftest.$ac_ext
3039 cat >>conftest.$ac_ext <<_ACEOF
3040 /* end confdefs.h.  */
3041
3042 int
3043 main ()
3044 {
3045
3046   ;
3047   return 0;
3048 }
3049 _ACEOF
3050 rm -f conftest.$ac_objext
3051 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3052   (eval $ac_compile) 2>conftest.er1
3053   ac_status=$?
3054   grep -v '^ *+' conftest.er1 >conftest.err
3055   rm -f conftest.er1
3056   cat conftest.err >&5
3057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3058   (exit $ac_status); } &&
3059          { ac_try='test -z "$ac_c_werror_flag"
3060                          || test ! -s conftest.err'
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); }; } &&
3066          { ac_try='test -s conftest.$ac_objext'
3067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3068   (eval $ac_try) 2>&5
3069   ac_status=$?
3070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3071   (exit $ac_status); }; }; then
3072   echo "$as_me:$LINENO: result: yes" >&5
3073 echo "${ECHO_T}yes" >&6
3074 else
3075   echo "$as_me: failed program was:" >&5
3076 sed 's/^/| /' conftest.$ac_ext >&5
3077
3078 CFLAGS="$pgac_save_CFLAGS"
3079                     echo "$as_me:$LINENO: result: no" >&5
3080 echo "${ECHO_T}no" >&6
3081 fi
3082 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3083
3084 elif test ${CC} = "xlc"; then
3085   # AIX xlc has to have strict aliasing turned off too
3086   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3087 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
3088 pgac_save_CFLAGS=$CFLAGS
3089 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3090 cat >conftest.$ac_ext <<_ACEOF
3091 /* confdefs.h.  */
3092 _ACEOF
3093 cat confdefs.h >>conftest.$ac_ext
3094 cat >>conftest.$ac_ext <<_ACEOF
3095 /* end confdefs.h.  */
3096
3097 int
3098 main ()
3099 {
3100
3101   ;
3102   return 0;
3103 }
3104 _ACEOF
3105 rm -f conftest.$ac_objext
3106 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3107   (eval $ac_compile) 2>conftest.er1
3108   ac_status=$?
3109   grep -v '^ *+' conftest.er1 >conftest.err
3110   rm -f conftest.er1
3111   cat conftest.err >&5
3112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3113   (exit $ac_status); } &&
3114          { ac_try='test -z "$ac_c_werror_flag"
3115                          || test ! -s conftest.err'
3116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3117   (eval $ac_try) 2>&5
3118   ac_status=$?
3119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3120   (exit $ac_status); }; } &&
3121          { ac_try='test -s conftest.$ac_objext'
3122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3123   (eval $ac_try) 2>&5
3124   ac_status=$?
3125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3126   (exit $ac_status); }; }; then
3127   echo "$as_me:$LINENO: result: yes" >&5
3128 echo "${ECHO_T}yes" >&6
3129 else
3130   echo "$as_me: failed program was:" >&5
3131 sed 's/^/| /' conftest.$ac_ext >&5
3132
3133 CFLAGS="$pgac_save_CFLAGS"
3134                     echo "$as_me:$LINENO: result: no" >&5
3135 echo "${ECHO_T}no" >&6
3136 fi
3137 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3138
3139 fi
3140
3141 # supply -g if --enable-debug
3142 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3143   CFLAGS="$CFLAGS -g"
3144 fi
3145
3146 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3147 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3148
3149 # We already have this in Makefile.win32, but configure needs it too
3150 if test "$PORTNAME" = "win32"; then
3151   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3152 fi
3153
3154 # Check if the compiler still works with the template settings
3155 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3156 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
3157 cat >conftest.$ac_ext <<_ACEOF
3158 /* confdefs.h.  */
3159 _ACEOF
3160 cat confdefs.h >>conftest.$ac_ext
3161 cat >>conftest.$ac_ext <<_ACEOF
3162 /* end confdefs.h.  */
3163
3164 int
3165 main ()
3166 {
3167 return 0;
3168   ;
3169   return 0;
3170 }
3171 _ACEOF
3172 rm -f conftest.$ac_objext conftest$ac_exeext
3173 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3174   (eval $ac_link) 2>conftest.er1
3175   ac_status=$?
3176   grep -v '^ *+' conftest.er1 >conftest.err
3177   rm -f conftest.er1
3178   cat conftest.err >&5
3179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3180   (exit $ac_status); } &&
3181          { ac_try='test -z "$ac_c_werror_flag"
3182                          || test ! -s conftest.err'
3183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3184   (eval $ac_try) 2>&5
3185   ac_status=$?
3186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3187   (exit $ac_status); }; } &&
3188          { ac_try='test -s conftest$ac_exeext'
3189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3190   (eval $ac_try) 2>&5
3191   ac_status=$?
3192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3193   (exit $ac_status); }; }; then
3194   echo "$as_me:$LINENO: result: yes" >&5
3195 echo "${ECHO_T}yes" >&6
3196 else
3197   echo "$as_me: failed program was:" >&5
3198 sed 's/^/| /' conftest.$ac_ext >&5
3199
3200 echo "$as_me:$LINENO: result: no" >&5
3201 echo "${ECHO_T}no" >&6
3202    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3203 echo "$as_me: error: cannot proceed" >&2;}
3204    { (exit 1); exit 1; }; }
3205 fi
3206 rm -f conftest.err conftest.$ac_objext \
3207       conftest$ac_exeext conftest.$ac_ext
3208
3209 # Defend against gcc -ffast-math
3210 if test "$GCC" = yes; then
3211 cat >conftest.$ac_ext <<_ACEOF
3212 /* confdefs.h.  */
3213 _ACEOF
3214 cat confdefs.h >>conftest.$ac_ext
3215 cat >>conftest.$ac_ext <<_ACEOF
3216 /* end confdefs.h.  */
3217
3218 int
3219 main ()
3220 {
3221 #ifdef __FAST_MATH__
3222 choke me
3223 #endif
3224   ;
3225   return 0;
3226 }
3227 _ACEOF
3228 rm -f conftest.$ac_objext
3229 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3230   (eval $ac_compile) 2>conftest.er1
3231   ac_status=$?
3232   grep -v '^ *+' conftest.er1 >conftest.err
3233   rm -f conftest.er1
3234   cat conftest.err >&5
3235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3236   (exit $ac_status); } &&
3237          { ac_try='test -z "$ac_c_werror_flag"
3238                          || test ! -s conftest.err'
3239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3240   (eval $ac_try) 2>&5
3241   ac_status=$?
3242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3243   (exit $ac_status); }; } &&
3244          { ac_try='test -s conftest.$ac_objext'
3245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3246   (eval $ac_try) 2>&5
3247   ac_status=$?
3248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3249   (exit $ac_status); }; }; then
3250   :
3251 else
3252   echo "$as_me: failed program was:" >&5
3253 sed 's/^/| /' conftest.$ac_ext >&5
3254
3255 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3256 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3257    { (exit 1); exit 1; }; }
3258 fi
3259 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3260 fi
3261
3262 ac_ext=c
3263 ac_cpp='$CPP $CPPFLAGS'
3264 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3265 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3266 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3267 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3268 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3269 # On Suns, sometimes $CPP names a directory.
3270 if test -n "$CPP" && test -d "$CPP"; then
3271   CPP=
3272 fi
3273 if test -z "$CPP"; then
3274   if test "${ac_cv_prog_CPP+set}" = set; then
3275   echo $ECHO_N "(cached) $ECHO_C" >&6
3276 else
3277       # Double quotes because CPP needs to be expanded
3278     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3279     do
3280       ac_preproc_ok=false
3281 for ac_c_preproc_warn_flag in '' yes
3282 do
3283   # Use a header file that comes with gcc, so configuring glibc
3284   # with a fresh cross-compiler works.
3285   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3286   # <limits.h> exists even on freestanding compilers.
3287   # On the NeXT, cc -E runs the code through the compiler's parser,
3288   # not just through cpp. "Syntax error" is here to catch this case.
3289   cat >conftest.$ac_ext <<_ACEOF
3290 /* confdefs.h.  */
3291 _ACEOF
3292 cat confdefs.h >>conftest.$ac_ext
3293 cat >>conftest.$ac_ext <<_ACEOF
3294 /* end confdefs.h.  */
3295 #ifdef __STDC__
3296 # include <limits.h>
3297 #else
3298 # include <assert.h>
3299 #endif
3300                      Syntax error
3301 _ACEOF
3302 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3303   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3304   ac_status=$?
3305   grep -v '^ *+' conftest.er1 >conftest.err
3306   rm -f conftest.er1
3307   cat conftest.err >&5
3308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3309   (exit $ac_status); } >/dev/null; then
3310   if test -s conftest.err; then
3311     ac_cpp_err=$ac_c_preproc_warn_flag
3312     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3313   else
3314     ac_cpp_err=
3315   fi
3316 else
3317   ac_cpp_err=yes
3318 fi
3319 if test -z "$ac_cpp_err"; then
3320   :
3321 else
3322   echo "$as_me: failed program was:" >&5
3323 sed 's/^/| /' conftest.$ac_ext >&5
3324
3325   # Broken: fails on valid input.
3326 continue
3327 fi
3328 rm -f conftest.err conftest.$ac_ext
3329
3330   # OK, works on sane cases.  Now check whether non-existent headers
3331   # can be detected and how.
3332   cat >conftest.$ac_ext <<_ACEOF
3333 /* confdefs.h.  */
3334 _ACEOF
3335 cat confdefs.h >>conftest.$ac_ext
3336 cat >>conftest.$ac_ext <<_ACEOF
3337 /* end confdefs.h.  */
3338 #include <ac_nonexistent.h>
3339 _ACEOF
3340 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3341   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3342   ac_status=$?
3343   grep -v '^ *+' conftest.er1 >conftest.err
3344   rm -f conftest.er1
3345   cat conftest.err >&5
3346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3347   (exit $ac_status); } >/dev/null; then
3348   if test -s conftest.err; then
3349     ac_cpp_err=$ac_c_preproc_warn_flag
3350     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3351   else
3352     ac_cpp_err=
3353   fi
3354 else
3355   ac_cpp_err=yes
3356 fi
3357 if test -z "$ac_cpp_err"; then
3358   # Broken: success on invalid input.
3359 continue
3360 else
3361   echo "$as_me: failed program was:" >&5
3362 sed 's/^/| /' conftest.$ac_ext >&5
3363
3364   # Passes both tests.
3365 ac_preproc_ok=:
3366 break
3367 fi
3368 rm -f conftest.err conftest.$ac_ext
3369
3370 done
3371 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3372 rm -f conftest.err conftest.$ac_ext
3373 if $ac_preproc_ok; then
3374   break
3375 fi
3376
3377     done
3378     ac_cv_prog_CPP=$CPP
3379
3380 fi
3381   CPP=$ac_cv_prog_CPP
3382 else
3383   ac_cv_prog_CPP=$CPP
3384 fi
3385 echo "$as_me:$LINENO: result: $CPP" >&5
3386 echo "${ECHO_T}$CPP" >&6
3387 ac_preproc_ok=false
3388 for ac_c_preproc_warn_flag in '' yes
3389 do
3390   # Use a header file that comes with gcc, so configuring glibc
3391   # with a fresh cross-compiler works.
3392   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3393   # <limits.h> exists even on freestanding compilers.
3394   # On the NeXT, cc -E runs the code through the compiler's parser,
3395   # not just through cpp. "Syntax error" is here to catch this case.
3396   cat >conftest.$ac_ext <<_ACEOF
3397 /* confdefs.h.  */
3398 _ACEOF
3399 cat confdefs.h >>conftest.$ac_ext
3400 cat >>conftest.$ac_ext <<_ACEOF
3401 /* end confdefs.h.  */
3402 #ifdef __STDC__
3403 # include <limits.h>
3404 #else
3405 # include <assert.h>
3406 #endif
3407                      Syntax error
3408 _ACEOF
3409 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3410   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3411   ac_status=$?
3412   grep -v '^ *+' conftest.er1 >conftest.err
3413   rm -f conftest.er1
3414   cat conftest.err >&5
3415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3416   (exit $ac_status); } >/dev/null; then
3417   if test -s conftest.err; then
3418     ac_cpp_err=$ac_c_preproc_warn_flag
3419     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3420   else
3421     ac_cpp_err=
3422   fi
3423 else
3424   ac_cpp_err=yes
3425 fi
3426 if test -z "$ac_cpp_err"; then
3427   :
3428 else
3429   echo "$as_me: failed program was:" >&5
3430 sed 's/^/| /' conftest.$ac_ext >&5
3431
3432   # Broken: fails on valid input.
3433 continue
3434 fi
3435 rm -f conftest.err conftest.$ac_ext
3436
3437   # OK, works on sane cases.  Now check whether non-existent headers
3438   # can be detected and how.
3439   cat >conftest.$ac_ext <<_ACEOF
3440 /* confdefs.h.  */
3441 _ACEOF
3442 cat confdefs.h >>conftest.$ac_ext
3443 cat >>conftest.$ac_ext <<_ACEOF
3444 /* end confdefs.h.  */
3445 #include <ac_nonexistent.h>
3446 _ACEOF
3447 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3448   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3449   ac_status=$?
3450   grep -v '^ *+' conftest.er1 >conftest.err
3451   rm -f conftest.er1
3452   cat conftest.err >&5
3453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3454   (exit $ac_status); } >/dev/null; then
3455   if test -s conftest.err; then
3456     ac_cpp_err=$ac_c_preproc_warn_flag
3457     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3458   else
3459     ac_cpp_err=
3460   fi
3461 else
3462   ac_cpp_err=yes
3463 fi
3464 if test -z "$ac_cpp_err"; then
3465   # Broken: success on invalid input.
3466 continue
3467 else
3468   echo "$as_me: failed program was:" >&5
3469 sed 's/^/| /' conftest.$ac_ext >&5
3470
3471   # Passes both tests.
3472 ac_preproc_ok=:
3473 break
3474 fi
3475 rm -f conftest.err conftest.$ac_ext
3476
3477 done
3478 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3479 rm -f conftest.err conftest.$ac_ext
3480 if $ac_preproc_ok; then
3481   :
3482 else
3483   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3484 See \`config.log' for more details." >&5
3485 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3486 See \`config.log' for more details." >&2;}
3487    { (exit 1); exit 1; }; }
3488 fi
3489
3490 ac_ext=c
3491 ac_cpp='$CPP $CPPFLAGS'
3492 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3493 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3494 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3495
3496
3497
3498 # Create compiler version string
3499 if test x"$GCC" = x"yes" ; then
3500   cc_string="GCC `${CC} --version | sed q`"
3501 else
3502   cc_string=$CC
3503 fi
3504
3505 cat >>confdefs.h <<_ACEOF
3506 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3507 _ACEOF
3508
3509
3510
3511 #
3512 # Set up TAS assembly code if needed; the template file has now had its
3513 # chance to request this.
3514 #
3515           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3516
3517
3518 if test "$need_tas" = yes ; then
3519   TAS=tas.o
3520 else
3521   TAS=""
3522 fi
3523
3524
3525
3526 #
3527 # Automatic dependency tracking
3528 #
3529
3530
3531
3532 # Check whether --enable-depend or --disable-depend was given.
3533 if test "${enable_depend+set}" = set; then
3534   enableval="$enable_depend"
3535
3536   case $enableval in
3537     yes)
3538       autodepend=yes
3539       ;;
3540     no)
3541       :
3542       ;;
3543     *)
3544       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3545 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3546    { (exit 1); exit 1; }; }
3547       ;;
3548   esac
3549
3550 else
3551   enable_depend=no
3552
3553 fi;
3554
3555
3556
3557
3558 #
3559 # Enable assert checks
3560 #
3561
3562
3563
3564 # Check whether --enable-cassert or --disable-cassert was given.
3565 if test "${enable_cassert+set}" = set; then
3566   enableval="$enable_cassert"
3567
3568   case $enableval in
3569     yes)
3570
3571 cat >>confdefs.h <<\_ACEOF
3572 #define USE_ASSERT_CHECKING 1
3573 _ACEOF
3574
3575       ;;
3576     no)
3577       :
3578       ;;
3579     *)
3580       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3581 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3582    { (exit 1); exit 1; }; }
3583       ;;
3584   esac
3585
3586 else
3587   enable_cassert=no
3588
3589 fi;
3590
3591
3592
3593 #
3594 # Include directories
3595 #
3596 ac_save_IFS=$IFS
3597 IFS="${IFS}${PATH_SEPARATOR}"
3598 # SRCH_INC comes from the template file
3599 for dir in $with_includes $SRCH_INC; do
3600   if test -d "$dir"; then
3601     INCLUDES="$INCLUDES -I$dir"
3602   else
3603     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3604 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3605   fi
3606 done
3607 IFS=$ac_save_IFS
3608
3609
3610
3611 #
3612 # Library directories
3613 #
3614 ac_save_IFS=$IFS
3615 IFS="${IFS}${PATH_SEPARATOR}"
3616 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3617 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3618   if test -d "$dir"; then
3619     LIBDIRS="$LIBDIRS -L$dir"
3620   else
3621     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3622 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3623   fi
3624 done
3625 IFS=$ac_save_IFS
3626
3627 #
3628 # Enable thread-safe client libraries
3629 #
3630 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3631 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3632
3633
3634
3635 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3636 if test "${enable_thread_safety+set}" = set; then
3637   enableval="$enable_thread_safety"
3638
3639   case $enableval in
3640     yes)
3641       :
3642       ;;
3643     no)
3644       :
3645       ;;
3646     *)
3647       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3648 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3649    { (exit 1); exit 1; }; }
3650       ;;
3651   esac
3652
3653 else
3654   enable_thread_safety=no
3655
3656 fi;
3657
3658
3659
3660
3661 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3662 if test "${enable_thread_safety_force+set}" = set; then
3663   enableval="$enable_thread_safety_force"
3664
3665   case $enableval in
3666     yes)
3667       :
3668       ;;
3669     no)
3670       :
3671       ;;
3672     *)
3673       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3674 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3675    { (exit 1); exit 1; }; }
3676       ;;
3677   esac
3678
3679 else
3680   enable_thread_safety_force=no
3681
3682 fi;
3683
3684 if test "$enable_thread_safety" = yes -o \
3685         "$enable_thread_safety_force" = yes; then
3686   enable_thread_safety="yes"    # for 'force'
3687
3688 cat >>confdefs.h <<\_ACEOF
3689 #define ENABLE_THREAD_SAFETY 1
3690 _ACEOF
3691
3692 fi
3693 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3694 echo "${ECHO_T}$enable_thread_safety" >&6
3695
3696
3697 #
3698 # Optionally build Tcl modules (PL/Tcl)
3699 #
3700 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3701 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3702
3703
3704
3705
3706 # Check whether --with-tcl or --without-tcl was given.
3707 if test "${with_tcl+set}" = set; then
3708   withval="$with_tcl"
3709
3710   case $withval in
3711     yes)
3712       :
3713       ;;
3714     no)
3715       :
3716       ;;
3717     *)
3718       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3719 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3720    { (exit 1); exit 1; }; }
3721       ;;
3722   esac
3723
3724 else
3725   with_tcl=no
3726
3727 fi;
3728
3729 echo "$as_me:$LINENO: result: $with_tcl" >&5
3730 echo "${ECHO_T}$with_tcl" >&6
3731
3732
3733 # We see if the path to the Tcl/Tk configuration scripts is specified.
3734 # This will override the use of tclsh to find the paths to search.
3735
3736
3737
3738
3739
3740 # Check whether --with-tclconfig or --without-tclconfig was given.
3741 if test "${with_tclconfig+set}" = set; then
3742   withval="$with_tclconfig"
3743
3744   case $withval in
3745     yes)
3746       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3747 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3748    { (exit 1); exit 1; }; }
3749       ;;
3750     no)
3751       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3752 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3753    { (exit 1); exit 1; }; }
3754       ;;
3755     *)
3756
3757       ;;
3758   esac
3759
3760 fi;
3761
3762
3763 #
3764 # Optionally build Perl modules (PL/Perl)
3765 #
3766 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3767 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3768
3769
3770
3771
3772 # Check whether --with-perl or --without-perl was given.
3773 if test "${with_perl+set}" = set; then
3774   withval="$with_perl"
3775
3776   case $withval in
3777     yes)
3778       :
3779       ;;
3780     no)
3781       :
3782       ;;
3783     *)
3784       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3785 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3786    { (exit 1); exit 1; }; }
3787       ;;
3788   esac
3789
3790 else
3791   with_perl=no
3792
3793 fi;
3794
3795 echo "$as_me:$LINENO: result: $with_perl" >&5
3796 echo "${ECHO_T}$with_perl" >&6
3797
3798
3799 #
3800 # Optionally build Python modules (PL/Python)
3801 #
3802 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3803 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3804
3805
3806
3807
3808 # Check whether --with-python or --without-python was given.
3809 if test "${with_python+set}" = set; then
3810   withval="$with_python"
3811
3812   case $withval in
3813     yes)
3814       :
3815       ;;
3816     no)
3817       :
3818       ;;
3819     *)
3820       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3821 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3822    { (exit 1); exit 1; }; }
3823       ;;
3824   esac
3825
3826 else
3827   with_python=no
3828
3829 fi;
3830
3831 echo "$as_me:$LINENO: result: $with_python" >&5
3832 echo "${ECHO_T}$with_python" >&6
3833
3834
3835 #
3836 # Kerberos 5
3837 #
3838 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3839 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3840
3841
3842
3843
3844 # Check whether --with-krb5 or --without-krb5 was given.
3845 if test "${with_krb5+set}" = set; then
3846   withval="$with_krb5"
3847
3848   case $withval in
3849     yes)
3850
3851
3852 cat >>confdefs.h <<\_ACEOF
3853 #define KRB5 1
3854 _ACEOF
3855
3856   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3857
3858       ;;
3859     no)
3860       :
3861       ;;
3862     *)
3863       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3864 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3865    { (exit 1); exit 1; }; }
3866       ;;
3867   esac
3868
3869 else
3870   with_krb5=no
3871
3872 fi;
3873
3874 echo "$as_me:$LINENO: result: $with_krb5" >&5
3875 echo "${ECHO_T}$with_krb5" >&6
3876
3877
3878
3879
3880
3881
3882 #
3883 # Kerberos configuration parameters
3884 #
3885
3886
3887
3888
3889 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3890 if test "${with_krb_srvnam+set}" = set; then
3891   withval="$with_krb_srvnam"
3892
3893   case $withval in
3894     yes)
3895       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3896 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3897    { (exit 1); exit 1; }; }
3898       ;;
3899     no)
3900       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3901 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3902    { (exit 1); exit 1; }; }
3903       ;;
3904     *)
3905
3906       ;;
3907   esac
3908
3909 else
3910   with_krb_srvnam="postgres"
3911 fi;
3912
3913
3914 cat >>confdefs.h <<_ACEOF
3915 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3916 _ACEOF
3917
3918
3919
3920 #
3921 # PAM
3922 #
3923 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3924 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3925
3926
3927
3928
3929 # Check whether --with-pam or --without-pam was given.
3930 if test "${with_pam+set}" = set; then
3931   withval="$with_pam"
3932
3933   case $withval in
3934     yes)
3935
3936 cat >>confdefs.h <<\_ACEOF
3937 #define USE_PAM 1
3938 _ACEOF
3939
3940       ;;
3941     no)
3942       :
3943       ;;
3944     *)
3945       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3946 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3947    { (exit 1); exit 1; }; }
3948       ;;
3949   esac
3950
3951 else
3952   with_pam=no
3953
3954 fi;
3955
3956 echo "$as_me:$LINENO: result: $with_pam" >&5
3957 echo "${ECHO_T}$with_pam" >&6
3958
3959
3960
3961 #
3962 # LDAP
3963 #
3964 echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
3965 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
3966
3967
3968
3969
3970 # Check whether --with-ldap or --without-ldap was given.
3971 if test "${with_ldap+set}" = set; then
3972   withval="$with_ldap"
3973
3974   case $withval in
3975     yes)
3976
3977 cat >>confdefs.h <<\_ACEOF
3978 #define USE_LDAP 1
3979 _ACEOF
3980
3981       ;;
3982     no)
3983       :
3984       ;;
3985     *)
3986       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
3987 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
3988    { (exit 1); exit 1; }; }
3989       ;;
3990   esac
3991
3992 else
3993   with_ldap=no
3994
3995 fi;
3996
3997 echo "$as_me:$LINENO: result: $with_ldap" >&5
3998 echo "${ECHO_T}$with_ldap" >&6
3999
4000
4001
4002 #
4003 # Bonjour
4004 #
4005 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
4006 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
4007
4008
4009
4010
4011 # Check whether --with-bonjour or --without-bonjour was given.
4012 if test "${with_bonjour+set}" = set; then
4013   withval="$with_bonjour"
4014
4015   case $withval in
4016     yes)
4017
4018 cat >>confdefs.h <<\_ACEOF
4019 #define USE_BONJOUR 1
4020 _ACEOF
4021
4022       ;;
4023     no)
4024       :
4025       ;;
4026     *)
4027       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4028 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4029    { (exit 1); exit 1; }; }
4030       ;;
4031   esac
4032
4033 else
4034   with_bonjour=no
4035
4036 fi;
4037
4038 echo "$as_me:$LINENO: result: $with_bonjour" >&5
4039 echo "${ECHO_T}$with_bonjour" >&6
4040
4041
4042
4043 #
4044 # OpenSSL
4045 #
4046 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4047 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
4048
4049
4050
4051
4052 # Check whether --with-openssl or --without-openssl was given.
4053 if test "${with_openssl+set}" = set; then
4054   withval="$with_openssl"
4055
4056   case $withval in
4057     yes)
4058
4059 cat >>confdefs.h <<\_ACEOF
4060 #define USE_SSL 1
4061 _ACEOF
4062
4063       ;;
4064     no)
4065       :
4066       ;;
4067     *)
4068       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4069 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4070    { (exit 1); exit 1; }; }
4071       ;;
4072   esac
4073
4074 else
4075   with_openssl=no
4076
4077 fi;
4078
4079 echo "$as_me:$LINENO: result: $with_openssl" >&5
4080 echo "${ECHO_T}$with_openssl" >&6
4081
4082
4083
4084 #
4085 # Prefer libedit
4086 #
4087
4088
4089
4090
4091 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
4092 if test "${with_libedit_preferred+set}" = set; then
4093   withval="$with_libedit_preferred"
4094
4095   case $withval in
4096     yes)
4097       :
4098       ;;
4099     no)
4100       :
4101       ;;
4102     *)
4103       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4104 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4105    { (exit 1); exit 1; }; }
4106       ;;
4107   esac
4108
4109 else
4110   with_libedit_preferred=no
4111
4112 fi;
4113
4114
4115
4116 #
4117 # Readline
4118 #
4119
4120
4121
4122
4123 # Check whether --with-readline or --without-readline was given.
4124 if test "${with_readline+set}" = set; then
4125   withval="$with_readline"
4126
4127   case $withval in
4128     yes)
4129       :
4130       ;;
4131     no)
4132       :
4133       ;;
4134     *)
4135       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4136 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4137    { (exit 1); exit 1; }; }
4138       ;;
4139   esac
4140
4141 else
4142   with_readline=yes
4143
4144 fi;
4145
4146 # readline on MinGW has problems with backslashes in psql and other bugs.
4147 # This is particularly a problem with non-US code pages.
4148 # Therefore disable its use until we understand the cause. 2004-07-20
4149 if test "$PORTNAME" = "win32"; then
4150   if test "$with_readline" = yes; then
4151     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4152 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4153     with_readline=no
4154   fi
4155 fi
4156
4157
4158 #
4159 # Zlib
4160 #
4161
4162
4163
4164
4165 # Check whether --with-zlib or --without-zlib was given.
4166 if test "${with_zlib+set}" = set; then
4167   withval="$with_zlib"
4168
4169   case $withval in
4170     yes)
4171       :
4172       ;;
4173     no)
4174       :
4175       ;;
4176     *)
4177       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
4178 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
4179    { (exit 1); exit 1; }; }
4180       ;;
4181   esac
4182
4183 else
4184   with_zlib=yes
4185
4186 fi;
4187
4188
4189
4190 #
4191 # Elf
4192 #
4193
4194 # Assume system is ELF if it predefines __ELF__ as 1,
4195 # otherwise believe host_os based default.
4196 case $host_os in
4197     freebsd1*|freebsd2*) elf=no;;
4198     freebsd3*|freebsd4*) elf=yes;;
4199 esac
4200
4201
4202 echo "$as_me:$LINENO: checking for egrep" >&5
4203 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4204 if test "${ac_cv_prog_egrep+set}" = set; then
4205   echo $ECHO_N "(cached) $ECHO_C" >&6
4206 else
4207   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4208     then ac_cv_prog_egrep='grep -E'
4209     else ac_cv_prog_egrep='egrep'
4210     fi
4211 fi
4212 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4213 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4214  EGREP=$ac_cv_prog_egrep
4215
4216
4217 cat >conftest.$ac_ext <<_ACEOF
4218 /* confdefs.h.  */
4219 _ACEOF
4220 cat confdefs.h >>conftest.$ac_ext
4221 cat >>conftest.$ac_ext <<_ACEOF
4222 /* end confdefs.h.  */
4223 #if __ELF__
4224   yes
4225 #endif
4226
4227 _ACEOF
4228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4229   $EGREP "yes" >/dev/null 2>&1; then
4230   ELF_SYS=true
4231 else
4232   if test "X$elf" = "Xyes" ; then
4233   ELF_SYS=true
4234 else
4235   ELF_SYS=
4236 fi
4237 fi
4238 rm -f conftest*
4239
4240
4241
4242 #
4243 # Assignments
4244 #
4245
4246 CPPFLAGS="$CPPFLAGS $INCLUDES"
4247 LDFLAGS="$LDFLAGS $LIBDIRS"
4248
4249 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4250 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4251 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4252 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4253
4254
4255
4256 for ac_prog in gawk mawk nawk awk
4257 do
4258   # Extract the first word of "$ac_prog", so it can be a program name with args.
4259 set dummy $ac_prog; ac_word=$2
4260 echo "$as_me:$LINENO: checking for $ac_word" >&5
4261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4262 if test "${ac_cv_prog_AWK+set}" = set; then
4263   echo $ECHO_N "(cached) $ECHO_C" >&6
4264 else
4265   if test -n "$AWK"; then
4266   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4267 else
4268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269 for as_dir in $PATH
4270 do
4271   IFS=$as_save_IFS
4272   test -z "$as_dir" && as_dir=.
4273   for ac_exec_ext in '' $ac_executable_extensions; do
4274   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4275     ac_cv_prog_AWK="$ac_prog"
4276     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4277     break 2
4278   fi
4279 done
4280 done
4281
4282 fi
4283 fi
4284 AWK=$ac_cv_prog_AWK
4285 if test -n "$AWK"; then
4286   echo "$as_me:$LINENO: result: $AWK" >&5
4287 echo "${ECHO_T}$AWK" >&6
4288 else
4289   echo "$as_me:$LINENO: result: no" >&5
4290 echo "${ECHO_T}no" >&6
4291 fi
4292
4293   test -n "$AWK" && break
4294 done
4295
4296 echo "$as_me:$LINENO: checking for flex" >&5
4297 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4298 if test "${pgac_cv_path_flex+set}" = set; then
4299   echo $ECHO_N "(cached) $ECHO_C" >&6
4300 else
4301   # Let the user override the test
4302 if test -n "$FLEX"; then
4303   pgac_cv_path_flex=$FLEX
4304 else
4305   pgac_save_IFS=$IFS
4306   IFS=$PATH_SEPARATOR
4307   for pgac_dir in $PATH; do
4308     IFS=$pgac_save_IFS
4309     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4310       pgac_dir=`pwd`
4311     fi
4312     for pgac_prog in flex lex; do
4313       pgac_candidate="$pgac_dir/$pgac_prog"
4314       if test -f "$pgac_candidate" \
4315         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4316       then
4317         echo '%%'  > conftest.l
4318         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4319           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4320             pgac_broken_flex=$pgac_candidate
4321             continue
4322           fi
4323
4324           pgac_cv_path_flex=$pgac_candidate
4325           break 2
4326         fi
4327       fi
4328     done
4329   done
4330   rm -f conftest.l lex.yy.c
4331   : ${pgac_cv_path_flex=no}
4332 fi
4333
4334 fi
4335 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4336 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4337 if test x"$pgac_cv_path_flex" = x"no"; then
4338   if test -n "$pgac_broken_flex"; then
4339     { echo "$as_me:$LINENO: WARNING:
4340 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4341 *** should get version 2.5.4 or later." >&5
4342 echo "$as_me: WARNING:
4343 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4344 *** should get version 2.5.4 or later." >&2;}
4345   fi
4346
4347   { echo "$as_me:$LINENO: WARNING:
4348 *** Without Flex you will not be able to build PostgreSQL from CVS or
4349 *** change any of the scanner definition files.  You can obtain Flex from
4350 *** a GNU mirror site.  (If you are using the official distribution of
4351 *** PostgreSQL then you do not need to worry about this because the Flex
4352 *** output is pre-generated.)" >&5
4353 echo "$as_me: WARNING:
4354 *** Without Flex you will not be able to build PostgreSQL from CVS or
4355 *** change any of the scanner definition files.  You can obtain Flex from
4356 *** a GNU mirror site.  (If you are using the official distribution of
4357 *** PostgreSQL then you do not need to worry about this because the Flex
4358 *** output is pre-generated.)" >&2;}
4359 fi
4360
4361 if test x"$pgac_cv_path_flex" = x"no"; then
4362   FLEX=
4363 else
4364   FLEX=$pgac_cv_path_flex
4365 fi
4366
4367
4368
4369
4370 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4371 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4372 LN_S=$as_ln_s
4373 if test "$LN_S" = "ln -s"; then
4374   echo "$as_me:$LINENO: result: yes" >&5
4375 echo "${ECHO_T}yes" >&6
4376 else
4377   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4378 echo "${ECHO_T}no, using $LN_S" >&6
4379 fi
4380
4381
4382 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4383 if test "${with_gnu_ld+set}" = set; then
4384   withval="$with_gnu_ld"
4385   test "$withval" = no || with_gnu_ld=yes
4386 else
4387   with_gnu_ld=no
4388 fi;
4389 ac_prog=ld
4390 if test "$GCC" = yes; then
4391   # Check if gcc -print-prog-name=ld gives a path.
4392   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4393 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4394   case $host in
4395   *-*-mingw*)
4396     # gcc leaves a trailing carriage return which upsets mingw
4397     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4398   *)
4399     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4400   esac
4401   case "$ac_prog" in
4402     # Accept absolute paths.
4403     [\\/]* | [A-Za-z]:[\\/]*)
4404       re_direlt='/[^/][^/]*/\.\./'
4405       # Canonicalize the path of ld
4406       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4407       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4408         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4409       done
4410       test -z "$LD" && LD="$ac_prog"
4411       ;;
4412   "")
4413     # If it fails, then pretend we aren't using GCC.
4414     ac_prog=ld
4415     ;;
4416   *)
4417     # If it is relative, then search for the first ld in PATH.
4418     with_gnu_ld=unknown
4419     ;;
4420   esac
4421 elif test "$with_gnu_ld" = yes; then
4422   echo "$as_me:$LINENO: checking for GNU ld" >&5
4423 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4424 else
4425   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4426 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4427 fi
4428 if test "${ac_cv_path_LD+set}" = set; then
4429   echo $ECHO_N "(cached) $ECHO_C" >&6
4430 else
4431   if test -z "$LD"; then
4432   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4433   for ac_dir in $PATH; do
4434     test -z "$ac_dir" && ac_dir=.
4435     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4436       ac_cv_path_LD="$ac_dir/$ac_prog"
4437       # Check to see if the program is GNU ld.  I'd rather use --version,
4438       # but apparently some GNU ld's only accept -v.
4439       # Break only if it was the GNU/non-GNU ld that we prefer.
4440       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4441         test "$with_gnu_ld" != no && break
4442       else
4443         test "$with_gnu_ld" != yes && break
4444       fi
4445     fi
4446   done
4447   IFS="$ac_save_ifs"
4448 else
4449   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4450 fi
4451 fi
4452
4453 LD="$ac_cv_path_LD"
4454 if test -n "$LD"; then
4455   echo "$as_me:$LINENO: result: $LD" >&5
4456 echo "${ECHO_T}$LD" >&6
4457 else
4458   echo "$as_me:$LINENO: result: no" >&5
4459 echo "${ECHO_T}no" >&6
4460 fi
4461 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4462 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4463    { (exit 1); exit 1; }; }
4464 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4465 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4466 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4467   echo $ECHO_N "(cached) $ECHO_C" >&6
4468 else
4469   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4470 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4471   ac_cv_prog_gnu_ld=yes
4472 else
4473   ac_cv_prog_gnu_ld=no
4474 fi
4475 fi
4476 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4477 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4478 with_gnu_ld=$ac_cv_prog_gnu_ld
4479
4480
4481
4482
4483 case $host_os in sysv5*)
4484   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4485 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4486 if test "${pgac_cv_prog_ld_R+set}" = set; then
4487   echo $ECHO_N "(cached) $ECHO_C" >&6
4488 else
4489
4490     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4491     cat >conftest.$ac_ext <<_ACEOF
4492 /* confdefs.h.  */
4493 _ACEOF
4494 cat confdefs.h >>conftest.$ac_ext
4495 cat >>conftest.$ac_ext <<_ACEOF
4496 /* end confdefs.h.  */
4497
4498 int
4499 main ()
4500 {
4501
4502   ;
4503   return 0;
4504 }
4505 _ACEOF
4506 rm -f conftest.$ac_objext conftest$ac_exeext
4507 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4508   (eval $ac_link) 2>conftest.er1
4509   ac_status=$?
4510   grep -v '^ *+' conftest.er1 >conftest.err
4511   rm -f conftest.er1
4512   cat conftest.err >&5
4513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514   (exit $ac_status); } &&
4515          { ac_try='test -z "$ac_c_werror_flag"
4516                          || test ! -s conftest.err'
4517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4518   (eval $ac_try) 2>&5
4519   ac_status=$?
4520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4521   (exit $ac_status); }; } &&
4522          { ac_try='test -s conftest$ac_exeext'
4523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4524   (eval $ac_try) 2>&5
4525   ac_status=$?
4526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4527   (exit $ac_status); }; }; then
4528   pgac_cv_prog_ld_R=yes
4529 else
4530   echo "$as_me: failed program was:" >&5
4531 sed 's/^/| /' conftest.$ac_ext >&5
4532
4533 pgac_cv_prog_ld_R=no
4534 fi
4535 rm -f conftest.err conftest.$ac_objext \
4536       conftest$ac_exeext conftest.$ac_ext
4537     LDFLAGS=$pgac_save_LDFLAGS
4538
4539 fi
4540 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4541 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4542   ld_R_works=$pgac_cv_prog_ld_R
4543
4544 esac
4545 if test -n "$ac_tool_prefix"; then
4546   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4547 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4548 echo "$as_me:$LINENO: checking for $ac_word" >&5
4549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4550 if test "${ac_cv_prog_RANLIB+set}" = set; then
4551   echo $ECHO_N "(cached) $ECHO_C" >&6
4552 else
4553   if test -n "$RANLIB"; then
4554   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4555 else
4556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4557 for as_dir in $PATH
4558 do
4559   IFS=$as_save_IFS
4560   test -z "$as_dir" && as_dir=.
4561   for ac_exec_ext in '' $ac_executable_extensions; do
4562   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4563     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4564     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4565     break 2
4566   fi
4567 done
4568 done
4569
4570 fi
4571 fi
4572 RANLIB=$ac_cv_prog_RANLIB
4573 if test -n "$RANLIB"; then
4574   echo "$as_me:$LINENO: result: $RANLIB" >&5
4575 echo "${ECHO_T}$RANLIB" >&6
4576 else
4577   echo "$as_me:$LINENO: result: no" >&5
4578 echo "${ECHO_T}no" >&6
4579 fi
4580
4581 fi
4582 if test -z "$ac_cv_prog_RANLIB"; then
4583   ac_ct_RANLIB=$RANLIB
4584   # Extract the first word of "ranlib", so it can be a program name with args.
4585 set dummy ranlib; ac_word=$2
4586 echo "$as_me:$LINENO: checking for $ac_word" >&5
4587 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4588 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4589   echo $ECHO_N "(cached) $ECHO_C" >&6
4590 else
4591   if test -n "$ac_ct_RANLIB"; then
4592   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4593 else
4594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4595 for as_dir in $PATH
4596 do
4597   IFS=$as_save_IFS
4598   test -z "$as_dir" && as_dir=.
4599   for ac_exec_ext in '' $ac_executable_extensions; do
4600   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4601     ac_cv_prog_ac_ct_RANLIB="ranlib"
4602     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4603     break 2
4604   fi
4605 done
4606 done
4607
4608   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4609 fi
4610 fi
4611 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4612 if test -n "$ac_ct_RANLIB"; then
4613   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4614 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4615 else
4616   echo "$as_me:$LINENO: result: no" >&5
4617 echo "${ECHO_T}no" >&6
4618 fi
4619
4620   RANLIB=$ac_ct_RANLIB
4621 else
4622   RANLIB="$ac_cv_prog_RANLIB"
4623 fi
4624
4625 # Extract the first word of "tar", so it can be a program name with args.
4626 set dummy tar; ac_word=$2
4627 echo "$as_me:$LINENO: checking for $ac_word" >&5
4628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4629 if test "${ac_cv_path_TAR+set}" = set; then
4630   echo $ECHO_N "(cached) $ECHO_C" >&6
4631 else
4632   case $TAR in
4633   [\\/]* | ?:[\\/]*)
4634   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4635   ;;
4636   *)
4637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638 for as_dir in $PATH
4639 do
4640   IFS=$as_save_IFS
4641   test -z "$as_dir" && as_dir=.
4642   for ac_exec_ext in '' $ac_executable_extensions; do
4643   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4645     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4646     break 2
4647   fi
4648 done
4649 done
4650
4651   ;;
4652 esac
4653 fi
4654 TAR=$ac_cv_path_TAR
4655
4656 if test -n "$TAR"; then
4657   echo "$as_me:$LINENO: result: $TAR" >&5
4658 echo "${ECHO_T}$TAR" >&6
4659 else
4660   echo "$as_me:$LINENO: result: no" >&5
4661 echo "${ECHO_T}no" >&6
4662 fi
4663
4664
4665   if test -n "$ac_tool_prefix"; then
4666   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4667 set dummy ${ac_tool_prefix}strip; ac_word=$2
4668 echo "$as_me:$LINENO: checking for $ac_word" >&5
4669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4670 if test "${ac_cv_prog_STRIP+set}" = set; then
4671   echo $ECHO_N "(cached) $ECHO_C" >&6
4672 else
4673   if test -n "$STRIP"; then
4674   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4675 else
4676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677 for as_dir in $PATH
4678 do
4679   IFS=$as_save_IFS
4680   test -z "$as_dir" && as_dir=.
4681   for ac_exec_ext in '' $ac_executable_extensions; do
4682   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4683     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4684     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4685     break 2
4686   fi
4687 done
4688 done
4689
4690 fi
4691 fi
4692 STRIP=$ac_cv_prog_STRIP
4693 if test -n "$STRIP"; then
4694   echo "$as_me:$LINENO: result: $STRIP" >&5
4695 echo "${ECHO_T}$STRIP" >&6
4696 else
4697   echo "$as_me:$LINENO: result: no" >&5
4698 echo "${ECHO_T}no" >&6
4699 fi
4700
4701 fi
4702 if test -z "$ac_cv_prog_STRIP"; then
4703   ac_ct_STRIP=$STRIP
4704   # Extract the first word of "strip", so it can be a program name with args.
4705 set dummy strip; ac_word=$2
4706 echo "$as_me:$LINENO: checking for $ac_word" >&5
4707 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4708 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4709   echo $ECHO_N "(cached) $ECHO_C" >&6
4710 else
4711   if test -n "$ac_ct_STRIP"; then
4712   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4713 else
4714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4715 for as_dir in $PATH
4716 do
4717   IFS=$as_save_IFS
4718   test -z "$as_dir" && as_dir=.
4719   for ac_exec_ext in '' $ac_executable_extensions; do
4720   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4721     ac_cv_prog_ac_ct_STRIP="strip"
4722     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4723     break 2
4724   fi
4725 done
4726 done
4727
4728   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4729 fi
4730 fi
4731 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4732 if test -n "$ac_ct_STRIP"; then
4733   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4734 echo "${ECHO_T}$ac_ct_STRIP" >&6
4735 else
4736   echo "$as_me:$LINENO: result: no" >&5
4737 echo "${ECHO_T}no" >&6
4738 fi
4739
4740   STRIP=$ac_ct_STRIP
4741 else
4742   STRIP="$ac_cv_prog_STRIP"
4743 fi
4744
4745
4746   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4747 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4748   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4749     STRIP_STATIC_LIB="$STRIP -x"
4750     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4751     echo "$as_me:$LINENO: result: yes" >&5
4752 echo "${ECHO_T}yes" >&6
4753   else
4754     STRIP_STATIC_LIB=:
4755     STRIP_SHARED_LIB=:
4756     echo "$as_me:$LINENO: result: no" >&5
4757 echo "${ECHO_T}no" >&6
4758   fi
4759
4760
4761
4762
4763 for ac_prog in 'bison -y'
4764 do
4765   # Extract the first word of "$ac_prog", so it can be a program name with args.
4766 set dummy $ac_prog; ac_word=$2
4767 echo "$as_me:$LINENO: checking for $ac_word" >&5
4768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4769 if test "${ac_cv_prog_YACC+set}" = set; then
4770   echo $ECHO_N "(cached) $ECHO_C" >&6
4771 else
4772   if test -n "$YACC"; then
4773   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4774 else
4775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776 for as_dir in $PATH
4777 do
4778   IFS=$as_save_IFS
4779   test -z "$as_dir" && as_dir=.
4780   for ac_exec_ext in '' $ac_executable_extensions; do
4781   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4782     ac_cv_prog_YACC="$ac_prog"
4783     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4784     break 2
4785   fi
4786 done
4787 done
4788
4789 fi
4790 fi
4791 YACC=$ac_cv_prog_YACC
4792 if test -n "$YACC"; then
4793   echo "$as_me:$LINENO: result: $YACC" >&5
4794 echo "${ECHO_T}$YACC" >&6
4795 else
4796   echo "$as_me:$LINENO: result: no" >&5
4797 echo "${ECHO_T}no" >&6
4798 fi
4799
4800   test -n "$YACC" && break
4801 done
4802
4803
4804 if test "$YACC"; then
4805   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4806     { echo "$as_me:$LINENO: WARNING:
4807 *** If you are going to modify the grammar files or build from CVS, the installed
4808 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4809 echo "$as_me: WARNING:
4810 *** If you are going to modify the grammar files or build from CVS, the installed
4811 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4812   fi
4813 fi
4814
4815 if test -z "$YACC"; then
4816   { echo "$as_me:$LINENO: WARNING:
4817 *** Without Bison you will not be able to build PostgreSQL from CVS or
4818 *** change any of the parser definition files.  You can obtain Bison from
4819 *** a GNU mirror site.  (If you are using the official distribution of
4820 *** PostgreSQL then you do not need to worry about this because the Bison
4821 *** output is pre-generated.)  To use a different yacc program (possible,
4822 *** but not recommended), set the environment variable YACC before running
4823 *** 'configure'." >&5
4824 echo "$as_me: WARNING:
4825 *** Without Bison you will not be able to build PostgreSQL from CVS or
4826 *** change any of the parser definition files.  You can obtain Bison from
4827 *** a GNU mirror site.  (If you are using the official distribution of
4828 *** PostgreSQL then you do not need to worry about this because the Bison
4829 *** output is pre-generated.)  To use a different yacc program (possible,
4830 *** but not recommended), set the environment variable YACC before running
4831 *** 'configure'." >&2;}
4832 fi
4833
4834
4835 # Extract the first word of "perl", so it can be a program name with args.
4836 set dummy perl; ac_word=$2
4837 echo "$as_me:$LINENO: checking for $ac_word" >&5
4838 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4839 if test "${ac_cv_path_PERL+set}" = set; then
4840   echo $ECHO_N "(cached) $ECHO_C" >&6
4841 else
4842   case $PERL in
4843   [\\/]* | ?:[\\/]*)
4844   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4845   ;;
4846   *)
4847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4848 for as_dir in $PATH
4849 do
4850   IFS=$as_save_IFS
4851   test -z "$as_dir" && as_dir=.
4852   for ac_exec_ext in '' $ac_executable_extensions; do
4853   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4854     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4855     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4856     break 2
4857   fi
4858 done
4859 done
4860
4861   ;;
4862 esac
4863 fi
4864 PERL=$ac_cv_path_PERL
4865
4866 if test -n "$PERL"; then
4867   echo "$as_me:$LINENO: result: $PERL" >&5
4868 echo "${ECHO_T}$PERL" >&6
4869 else
4870   echo "$as_me:$LINENO: result: no" >&5
4871 echo "${ECHO_T}no" >&6
4872 fi
4873
4874 if test "$with_perl" = yes; then
4875
4876 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4877 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4878 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4879 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4880 echo "${ECHO_T}$perl_archlibexp" >&6
4881 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4882 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4883 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4884 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4885 echo "${ECHO_T}$perl_privlibexp" >&6
4886 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4887 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4888 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4889 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4890 echo "${ECHO_T}$perl_useshrplib" >&6
4891
4892 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4893 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4894 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4895 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4896 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4897 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4898 echo "${ECHO_T}$perl_embed_ldflags" >&6
4899 fi
4900
4901 if test "$with_python" = yes; then
4902   # Extract the first word of "python", so it can be a program name with args.
4903 set dummy python; ac_word=$2
4904 echo "$as_me:$LINENO: checking for $ac_word" >&5
4905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4906 if test "${ac_cv_path_PYTHON+set}" = set; then
4907   echo $ECHO_N "(cached) $ECHO_C" >&6
4908 else
4909   case $PYTHON in
4910   [\\/]* | ?:[\\/]*)
4911   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4912   ;;
4913   *)
4914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4915 for as_dir in $PATH
4916 do
4917   IFS=$as_save_IFS
4918   test -z "$as_dir" && as_dir=.
4919   for ac_exec_ext in '' $ac_executable_extensions; do
4920   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4921     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4922     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4923     break 2
4924   fi
4925 done
4926 done
4927
4928   ;;
4929 esac
4930 fi
4931 PYTHON=$ac_cv_path_PYTHON
4932
4933 if test -n "$PYTHON"; then
4934   echo "$as_me:$LINENO: result: $PYTHON" >&5
4935 echo "${ECHO_T}$PYTHON" >&6
4936 else
4937   echo "$as_me:$LINENO: result: no" >&5
4938 echo "${ECHO_T}no" >&6
4939 fi
4940
4941 if test x"$PYTHON" = x""; then
4942   { { echo "$as_me:$LINENO: error: Python not found" >&5
4943 echo "$as_me: error: Python not found" >&2;}
4944    { (exit 1); exit 1; }; }
4945 fi
4946
4947
4948 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4949 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4950 if "${PYTHON}" 2>&- -c 'import distutils'
4951 then
4952     echo "$as_me:$LINENO: result: yes" >&5
4953 echo "${ECHO_T}yes" >&6
4954 else
4955     echo "$as_me:$LINENO: result: no" >&5
4956 echo "${ECHO_T}no" >&6
4957     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4958 echo "$as_me: error: distutils module not found" >&2;}
4959    { (exit 1); exit 1; }; }
4960 fi
4961 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4962 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4963 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4964 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')"`
4965 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4966
4967 # This should be enough of a message.
4968 echo "$as_me:$LINENO: result: $python_configdir" >&5
4969 echo "${ECHO_T}$python_configdir" >&6
4970
4971
4972 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4973 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4974
4975 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4976 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4977 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4978 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4979
4980 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4981 then
4982         # New way: use the official shared library
4983         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4984         python_libspec="-L${python_libdir} -l${ldlibrary}"
4985 else
4986         # Old way: use libpython from python_configdir
4987         python_libdir="${python_configdir}"
4988         python_libspec="-L${python_libdir} -lpython${python_version}"
4989 fi
4990
4991 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4992
4993 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4994 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4995
4996
4997 # threaded python is not supported on bsd's
4998 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4999 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
5000 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
5001 if test "$pythreads" = "1"; then
5002   echo "$as_me:$LINENO: result: yes" >&5
5003 echo "${ECHO_T}yes" >&6
5004   case $host_os in
5005   openbsd*|freebsd4*)
5006     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
5007 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
5008    { (exit 1); exit 1; }; }
5009     ;;
5010   esac
5011 else
5012   echo "$as_me:$LINENO: result: no" >&5
5013 echo "${ECHO_T}no" >&6
5014 fi
5015
5016
5017 fi
5018
5019 # Supply a numeric version string for use by 3rd party add-ons
5020 # awk -F is a regex on some platforms, and not on others, so make "." a tab
5021 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
5022 tr '.' '        ' |
5023 $AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
5024
5025 cat >>confdefs.h <<_ACEOF
5026 #define PG_VERSION_NUM $PG_VERSION_NUM
5027 _ACEOF
5028
5029
5030 ##
5031 ## Libraries
5032 ##
5033
5034 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
5035 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
5036 if test "${ac_cv_search_setproctitle+set}" = set; then
5037   echo $ECHO_N "(cached) $ECHO_C" >&6
5038 else
5039   ac_func_search_save_LIBS=$LIBS
5040 ac_cv_search_setproctitle=no
5041 cat >conftest.$ac_ext <<_ACEOF
5042 /* confdefs.h.  */
5043 _ACEOF
5044 cat confdefs.h >>conftest.$ac_ext
5045 cat >>conftest.$ac_ext <<_ACEOF
5046 /* end confdefs.h.  */
5047
5048 /* Override any gcc2 internal prototype to avoid an error.  */
5049 #ifdef __cplusplus
5050 extern "C"
5051 #endif
5052 /* We use char because int might match the return type of a gcc2
5053    builtin and then its argument prototype would still apply.  */
5054 char setproctitle ();
5055 int
5056 main ()
5057 {
5058 setproctitle ();
5059   ;
5060   return 0;
5061 }
5062 _ACEOF
5063 rm -f conftest.$ac_objext conftest$ac_exeext
5064 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5065   (eval $ac_link) 2>conftest.er1
5066   ac_status=$?
5067   grep -v '^ *+' conftest.er1 >conftest.err
5068   rm -f conftest.er1
5069   cat conftest.err >&5
5070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5071   (exit $ac_status); } &&
5072          { ac_try='test -z "$ac_c_werror_flag"
5073                          || test ! -s conftest.err'
5074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5075   (eval $ac_try) 2>&5
5076   ac_status=$?
5077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078   (exit $ac_status); }; } &&
5079          { ac_try='test -s conftest$ac_exeext'
5080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5081   (eval $ac_try) 2>&5
5082   ac_status=$?
5083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084   (exit $ac_status); }; }; then
5085   ac_cv_search_setproctitle="none required"
5086 else
5087   echo "$as_me: failed program was:" >&5
5088 sed 's/^/| /' conftest.$ac_ext >&5
5089
5090 fi
5091 rm -f conftest.err conftest.$ac_objext \
5092       conftest$ac_exeext conftest.$ac_ext
5093 if test "$ac_cv_search_setproctitle" = no; then
5094   for ac_lib in util; do
5095     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5096     cat >conftest.$ac_ext <<_ACEOF
5097 /* confdefs.h.  */
5098 _ACEOF
5099 cat confdefs.h >>conftest.$ac_ext
5100 cat >>conftest.$ac_ext <<_ACEOF
5101 /* end confdefs.h.  */
5102
5103 /* Override any gcc2 internal prototype to avoid an error.  */
5104 #ifdef __cplusplus
5105 extern "C"
5106 #endif
5107 /* We use char because int might match the return type of a gcc2
5108    builtin and then its argument prototype would still apply.  */
5109 char setproctitle ();
5110 int
5111 main ()
5112 {
5113 setproctitle ();
5114   ;
5115   return 0;
5116 }
5117 _ACEOF
5118 rm -f conftest.$ac_objext conftest$ac_exeext
5119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5120   (eval $ac_link) 2>conftest.er1
5121   ac_status=$?
5122   grep -v '^ *+' conftest.er1 >conftest.err
5123   rm -f conftest.er1
5124   cat conftest.err >&5
5125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5126   (exit $ac_status); } &&
5127          { ac_try='test -z "$ac_c_werror_flag"
5128                          || test ! -s conftest.err'
5129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5130   (eval $ac_try) 2>&5
5131   ac_status=$?
5132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133   (exit $ac_status); }; } &&
5134          { ac_try='test -s conftest$ac_exeext'
5135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5136   (eval $ac_try) 2>&5
5137   ac_status=$?
5138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5139   (exit $ac_status); }; }; then
5140   ac_cv_search_setproctitle="-l$ac_lib"
5141 break
5142 else
5143   echo "$as_me: failed program was:" >&5
5144 sed 's/^/| /' conftest.$ac_ext >&5
5145
5146 fi
5147 rm -f conftest.err conftest.$ac_objext \
5148       conftest$ac_exeext conftest.$ac_ext
5149   done
5150 fi
5151 LIBS=$ac_func_search_save_LIBS
5152 fi
5153 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
5154 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
5155 if test "$ac_cv_search_setproctitle" != no; then
5156   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
5157
5158 fi
5159
5160 echo "$as_me:$LINENO: checking for library containing pow" >&5
5161 echo $ECHO_N "checking for library containing pow... $ECHO_C" >&6
5162 if test "${ac_cv_search_pow+set}" = set; then
5163   echo $ECHO_N "(cached) $ECHO_C" >&6
5164 else
5165   ac_func_search_save_LIBS=$LIBS
5166 ac_cv_search_pow=no
5167 cat >conftest.$ac_ext <<_ACEOF
5168 /* confdefs.h.  */
5169 _ACEOF
5170 cat confdefs.h >>conftest.$ac_ext
5171 cat >>conftest.$ac_ext <<_ACEOF
5172 /* end confdefs.h.  */
5173
5174 /* Override any gcc2 internal prototype to avoid an error.  */
5175 #ifdef __cplusplus
5176 extern "C"
5177 #endif
5178 /* We use char because int might match the return type of a gcc2
5179    builtin and then its argument prototype would still apply.  */
5180 char pow ();
5181 int
5182 main ()
5183 {
5184 pow ();
5185   ;
5186   return 0;
5187 }
5188 _ACEOF
5189 rm -f conftest.$ac_objext conftest$ac_exeext
5190 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5191   (eval $ac_link) 2>conftest.er1
5192   ac_status=$?
5193   grep -v '^ *+' conftest.er1 >conftest.err
5194   rm -f conftest.er1
5195   cat conftest.err >&5
5196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5197   (exit $ac_status); } &&
5198          { ac_try='test -z "$ac_c_werror_flag"
5199                          || test ! -s conftest.err'
5200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5201   (eval $ac_try) 2>&5
5202   ac_status=$?
5203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5204   (exit $ac_status); }; } &&
5205          { ac_try='test -s conftest$ac_exeext'
5206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5207   (eval $ac_try) 2>&5
5208   ac_status=$?
5209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5210   (exit $ac_status); }; }; then
5211   ac_cv_search_pow="none required"
5212 else
5213   echo "$as_me: failed program was:" >&5
5214 sed 's/^/| /' conftest.$ac_ext >&5
5215
5216 fi
5217 rm -f conftest.err conftest.$ac_objext \
5218       conftest$ac_exeext conftest.$ac_ext
5219 if test "$ac_cv_search_pow" = no; then
5220   for ac_lib in m; do
5221     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5222     cat >conftest.$ac_ext <<_ACEOF
5223 /* confdefs.h.  */
5224 _ACEOF
5225 cat confdefs.h >>conftest.$ac_ext
5226 cat >>conftest.$ac_ext <<_ACEOF
5227 /* end confdefs.h.  */
5228
5229 /* Override any gcc2 internal prototype to avoid an error.  */
5230 #ifdef __cplusplus
5231 extern "C"
5232 #endif
5233 /* We use char because int might match the return type of a gcc2
5234    builtin and then its argument prototype would still apply.  */
5235 char pow ();
5236 int
5237 main ()
5238 {
5239 pow ();
5240   ;
5241   return 0;
5242 }
5243 _ACEOF
5244 rm -f conftest.$ac_objext conftest$ac_exeext
5245 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5246   (eval $ac_link) 2>conftest.er1
5247   ac_status=$?
5248   grep -v '^ *+' conftest.er1 >conftest.err
5249   rm -f conftest.er1
5250   cat conftest.err >&5
5251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5252   (exit $ac_status); } &&
5253          { ac_try='test -z "$ac_c_werror_flag"
5254                          || test ! -s conftest.err'
5255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5256   (eval $ac_try) 2>&5
5257   ac_status=$?
5258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5259   (exit $ac_status); }; } &&
5260          { ac_try='test -s conftest$ac_exeext'
5261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5262   (eval $ac_try) 2>&5
5263   ac_status=$?
5264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5265   (exit $ac_status); }; }; then
5266   ac_cv_search_pow="-l$ac_lib"
5267 break
5268 else
5269   echo "$as_me: failed program was:" >&5
5270 sed 's/^/| /' conftest.$ac_ext >&5
5271
5272 fi
5273 rm -f conftest.err conftest.$ac_objext \
5274       conftest$ac_exeext conftest.$ac_ext
5275   done
5276 fi
5277 LIBS=$ac_func_search_save_LIBS
5278 fi
5279 echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
5280 echo "${ECHO_T}$ac_cv_search_pow" >&6
5281 if test "$ac_cv_search_pow" != no; then
5282   test "$ac_cv_search_pow" = "none required" || LIBS="$ac_cv_search_pow $LIBS"
5283
5284 fi
5285
5286 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5287 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5288 if test "${ac_cv_search_dlopen+set}" = set; then
5289   echo $ECHO_N "(cached) $ECHO_C" >&6
5290 else
5291   ac_func_search_save_LIBS=$LIBS
5292 ac_cv_search_dlopen=no
5293 cat >conftest.$ac_ext <<_ACEOF
5294 /* confdefs.h.  */
5295 _ACEOF
5296 cat confdefs.h >>conftest.$ac_ext
5297 cat >>conftest.$ac_ext <<_ACEOF
5298 /* end confdefs.h.  */
5299
5300 /* Override any gcc2 internal prototype to avoid an error.  */
5301 #ifdef __cplusplus
5302 extern "C"
5303 #endif
5304 /* We use char because int might match the return type of a gcc2
5305    builtin and then its argument prototype would still apply.  */
5306 char dlopen ();
5307 int
5308 main ()
5309 {
5310 dlopen ();
5311   ;
5312   return 0;
5313 }
5314 _ACEOF
5315 rm -f conftest.$ac_objext conftest$ac_exeext
5316 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5317   (eval $ac_link) 2>conftest.er1
5318   ac_status=$?
5319   grep -v '^ *+' conftest.er1 >conftest.err
5320   rm -f conftest.er1
5321   cat conftest.err >&5
5322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5323   (exit $ac_status); } &&
5324          { ac_try='test -z "$ac_c_werror_flag"
5325                          || test ! -s conftest.err'
5326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5327   (eval $ac_try) 2>&5
5328   ac_status=$?
5329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5330   (exit $ac_status); }; } &&
5331          { ac_try='test -s conftest$ac_exeext'
5332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5333   (eval $ac_try) 2>&5
5334   ac_status=$?
5335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5336   (exit $ac_status); }; }; then
5337   ac_cv_search_dlopen="none required"
5338 else
5339   echo "$as_me: failed program was:" >&5
5340 sed 's/^/| /' conftest.$ac_ext >&5
5341
5342 fi
5343 rm -f conftest.err conftest.$ac_objext \
5344       conftest$ac_exeext conftest.$ac_ext
5345 if test "$ac_cv_search_dlopen" = no; then
5346   for ac_lib in dl; do
5347     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5348     cat >conftest.$ac_ext <<_ACEOF
5349 /* confdefs.h.  */
5350 _ACEOF
5351 cat confdefs.h >>conftest.$ac_ext
5352 cat >>conftest.$ac_ext <<_ACEOF
5353 /* end confdefs.h.  */
5354
5355 /* Override any gcc2 internal prototype to avoid an error.  */
5356 #ifdef __cplusplus
5357 extern "C"
5358 #endif
5359 /* We use char because int might match the return type of a gcc2
5360    builtin and then its argument prototype would still apply.  */
5361 char dlopen ();
5362 int
5363 main ()
5364 {
5365 dlopen ();
5366   ;
5367   return 0;
5368 }
5369 _ACEOF
5370 rm -f conftest.$ac_objext conftest$ac_exeext
5371 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5372   (eval $ac_link) 2>conftest.er1
5373   ac_status=$?
5374   grep -v '^ *+' conftest.er1 >conftest.err
5375   rm -f conftest.er1
5376   cat conftest.err >&5
5377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5378   (exit $ac_status); } &&
5379          { ac_try='test -z "$ac_c_werror_flag"
5380                          || test ! -s conftest.err'
5381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5382   (eval $ac_try) 2>&5
5383   ac_status=$?
5384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5385   (exit $ac_status); }; } &&
5386          { ac_try='test -s conftest$ac_exeext'
5387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5388   (eval $ac_try) 2>&5
5389   ac_status=$?
5390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5391   (exit $ac_status); }; }; then
5392   ac_cv_search_dlopen="-l$ac_lib"
5393 break
5394 else
5395   echo "$as_me: failed program was:" >&5
5396 sed 's/^/| /' conftest.$ac_ext >&5
5397
5398 fi
5399 rm -f conftest.err conftest.$ac_objext \
5400       conftest$ac_exeext conftest.$ac_ext
5401   done
5402 fi
5403 LIBS=$ac_func_search_save_LIBS
5404 fi
5405 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5406 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5407 if test "$ac_cv_search_dlopen" != no; then
5408   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5409
5410 fi
5411
5412 echo "$as_me:$LINENO: checking for library containing socket" >&5
5413 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5414 if test "${ac_cv_search_socket+set}" = set; then
5415   echo $ECHO_N "(cached) $ECHO_C" >&6
5416 else
5417   ac_func_search_save_LIBS=$LIBS
5418 ac_cv_search_socket=no
5419 cat >conftest.$ac_ext <<_ACEOF
5420 /* confdefs.h.  */
5421 _ACEOF
5422 cat confdefs.h >>conftest.$ac_ext
5423 cat >>conftest.$ac_ext <<_ACEOF
5424 /* end confdefs.h.  */
5425
5426 /* Override any gcc2 internal prototype to avoid an error.  */
5427 #ifdef __cplusplus
5428 extern "C"
5429 #endif
5430 /* We use char because int might match the return type of a gcc2
5431    builtin and then its argument prototype would still apply.  */
5432 char socket ();
5433 int
5434 main ()
5435 {
5436 socket ();
5437   ;
5438   return 0;
5439 }
5440 _ACEOF
5441 rm -f conftest.$ac_objext conftest$ac_exeext
5442 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5443   (eval $ac_link) 2>conftest.er1
5444   ac_status=$?
5445   grep -v '^ *+' conftest.er1 >conftest.err
5446   rm -f conftest.er1
5447   cat conftest.err >&5
5448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5449   (exit $ac_status); } &&
5450          { ac_try='test -z "$ac_c_werror_flag"
5451                          || test ! -s conftest.err'
5452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5453   (eval $ac_try) 2>&5
5454   ac_status=$?
5455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5456   (exit $ac_status); }; } &&
5457          { ac_try='test -s conftest$ac_exeext'
5458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5459   (eval $ac_try) 2>&5
5460   ac_status=$?
5461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462   (exit $ac_status); }; }; then
5463   ac_cv_search_socket="none required"
5464 else
5465   echo "$as_me: failed program was:" >&5
5466 sed 's/^/| /' conftest.$ac_ext >&5
5467
5468 fi
5469 rm -f conftest.err conftest.$ac_objext \
5470       conftest$ac_exeext conftest.$ac_ext
5471 if test "$ac_cv_search_socket" = no; then
5472   for ac_lib in socket wsock32; do
5473     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5474     cat >conftest.$ac_ext <<_ACEOF
5475 /* confdefs.h.  */
5476 _ACEOF
5477 cat confdefs.h >>conftest.$ac_ext
5478 cat >>conftest.$ac_ext <<_ACEOF
5479 /* end confdefs.h.  */
5480
5481 /* Override any gcc2 internal prototype to avoid an error.  */
5482 #ifdef __cplusplus
5483 extern "C"
5484 #endif
5485 /* We use char because int might match the return type of a gcc2
5486    builtin and then its argument prototype would still apply.  */
5487 char socket ();
5488 int
5489 main ()
5490 {
5491 socket ();
5492   ;
5493   return 0;
5494 }
5495 _ACEOF
5496 rm -f conftest.$ac_objext conftest$ac_exeext
5497 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5498   (eval $ac_link) 2>conftest.er1
5499   ac_status=$?
5500   grep -v '^ *+' conftest.er1 >conftest.err
5501   rm -f conftest.er1
5502   cat conftest.err >&5
5503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5504   (exit $ac_status); } &&
5505          { ac_try='test -z "$ac_c_werror_flag"
5506                          || test ! -s conftest.err'
5507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5508   (eval $ac_try) 2>&5
5509   ac_status=$?
5510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5511   (exit $ac_status); }; } &&
5512          { ac_try='test -s conftest$ac_exeext'
5513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5514   (eval $ac_try) 2>&5
5515   ac_status=$?
5516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5517   (exit $ac_status); }; }; then
5518   ac_cv_search_socket="-l$ac_lib"
5519 break
5520 else
5521   echo "$as_me: failed program was:" >&5
5522 sed 's/^/| /' conftest.$ac_ext >&5
5523
5524 fi
5525 rm -f conftest.err conftest.$ac_objext \
5526       conftest$ac_exeext conftest.$ac_ext
5527   done
5528 fi
5529 LIBS=$ac_func_search_save_LIBS
5530 fi
5531 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5532 echo "${ECHO_T}$ac_cv_search_socket" >&6
5533 if test "$ac_cv_search_socket" != no; then
5534   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5535
5536 fi
5537
5538 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5539 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5540 if test "${ac_cv_search_shl_load+set}" = set; then
5541   echo $ECHO_N "(cached) $ECHO_C" >&6
5542 else
5543   ac_func_search_save_LIBS=$LIBS
5544 ac_cv_search_shl_load=no
5545 cat >conftest.$ac_ext <<_ACEOF
5546 /* confdefs.h.  */
5547 _ACEOF
5548 cat confdefs.h >>conftest.$ac_ext
5549 cat >>conftest.$ac_ext <<_ACEOF
5550 /* end confdefs.h.  */
5551
5552 /* Override any gcc2 internal prototype to avoid an error.  */
5553 #ifdef __cplusplus
5554 extern "C"
5555 #endif
5556 /* We use char because int might match the return type of a gcc2
5557    builtin and then its argument prototype would still apply.  */
5558 char shl_load ();
5559 int
5560 main ()
5561 {
5562 shl_load ();
5563   ;
5564   return 0;
5565 }
5566 _ACEOF
5567 rm -f conftest.$ac_objext conftest$ac_exeext
5568 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5569   (eval $ac_link) 2>conftest.er1
5570   ac_status=$?
5571   grep -v '^ *+' conftest.er1 >conftest.err
5572   rm -f conftest.er1
5573   cat conftest.err >&5
5574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575   (exit $ac_status); } &&
5576          { ac_try='test -z "$ac_c_werror_flag"
5577                          || test ! -s conftest.err'
5578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5579   (eval $ac_try) 2>&5
5580   ac_status=$?
5581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5582   (exit $ac_status); }; } &&
5583          { ac_try='test -s conftest$ac_exeext'
5584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5585   (eval $ac_try) 2>&5
5586   ac_status=$?
5587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5588   (exit $ac_status); }; }; then
5589   ac_cv_search_shl_load="none required"
5590 else
5591   echo "$as_me: failed program was:" >&5
5592 sed 's/^/| /' conftest.$ac_ext >&5
5593
5594 fi
5595 rm -f conftest.err conftest.$ac_objext \
5596       conftest$ac_exeext conftest.$ac_ext
5597 if test "$ac_cv_search_shl_load" = no; then
5598   for ac_lib in dld; do
5599     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5600     cat >conftest.$ac_ext <<_ACEOF
5601 /* confdefs.h.  */
5602 _ACEOF
5603 cat confdefs.h >>conftest.$ac_ext
5604 cat >>conftest.$ac_ext <<_ACEOF
5605 /* end confdefs.h.  */
5606
5607 /* Override any gcc2 internal prototype to avoid an error.  */
5608 #ifdef __cplusplus
5609 extern "C"
5610 #endif
5611 /* We use char because int might match the return type of a gcc2
5612    builtin and then its argument prototype would still apply.  */
5613 char shl_load ();
5614 int
5615 main ()
5616 {
5617 shl_load ();
5618   ;
5619   return 0;
5620 }
5621 _ACEOF
5622 rm -f conftest.$ac_objext conftest$ac_exeext
5623 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5624   (eval $ac_link) 2>conftest.er1
5625   ac_status=$?
5626   grep -v '^ *+' conftest.er1 >conftest.err
5627   rm -f conftest.er1
5628   cat conftest.err >&5
5629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5630   (exit $ac_status); } &&
5631          { ac_try='test -z "$ac_c_werror_flag"
5632                          || test ! -s conftest.err'
5633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5634   (eval $ac_try) 2>&5
5635   ac_status=$?
5636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5637   (exit $ac_status); }; } &&
5638          { ac_try='test -s conftest$ac_exeext'
5639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5640   (eval $ac_try) 2>&5
5641   ac_status=$?
5642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5643   (exit $ac_status); }; }; then
5644   ac_cv_search_shl_load="-l$ac_lib"
5645 break
5646 else
5647   echo "$as_me: failed program was:" >&5
5648 sed 's/^/| /' conftest.$ac_ext >&5
5649
5650 fi
5651 rm -f conftest.err conftest.$ac_objext \
5652       conftest$ac_exeext conftest.$ac_ext
5653   done
5654 fi
5655 LIBS=$ac_func_search_save_LIBS
5656 fi
5657 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5658 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5659 if test "$ac_cv_search_shl_load" != no; then
5660   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5661
5662 fi
5663
5664 # We only use libld in port/dynloader/aix.c
5665 case $host_os in
5666      aix*)
5667         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5668 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5669 if test "${ac_cv_search_ldopen+set}" = set; then
5670   echo $ECHO_N "(cached) $ECHO_C" >&6
5671 else
5672   ac_func_search_save_LIBS=$LIBS
5673 ac_cv_search_ldopen=no
5674 cat >conftest.$ac_ext <<_ACEOF
5675 /* confdefs.h.  */
5676 _ACEOF
5677 cat confdefs.h >>conftest.$ac_ext
5678 cat >>conftest.$ac_ext <<_ACEOF
5679 /* end confdefs.h.  */
5680
5681 /* Override any gcc2 internal prototype to avoid an error.  */
5682 #ifdef __cplusplus
5683 extern "C"
5684 #endif
5685 /* We use char because int might match the return type of a gcc2
5686    builtin and then its argument prototype would still apply.  */
5687 char ldopen ();
5688 int
5689 main ()
5690 {
5691 ldopen ();
5692   ;
5693   return 0;
5694 }
5695 _ACEOF
5696 rm -f conftest.$ac_objext conftest$ac_exeext
5697 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5698   (eval $ac_link) 2>conftest.er1
5699   ac_status=$?
5700   grep -v '^ *+' conftest.er1 >conftest.err
5701   rm -f conftest.er1
5702   cat conftest.err >&5
5703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5704   (exit $ac_status); } &&
5705          { ac_try='test -z "$ac_c_werror_flag"
5706                          || test ! -s conftest.err'
5707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5708   (eval $ac_try) 2>&5
5709   ac_status=$?
5710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5711   (exit $ac_status); }; } &&
5712          { ac_try='test -s conftest$ac_exeext'
5713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5714   (eval $ac_try) 2>&5
5715   ac_status=$?
5716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5717   (exit $ac_status); }; }; then
5718   ac_cv_search_ldopen="none required"
5719 else
5720   echo "$as_me: failed program was:" >&5
5721 sed 's/^/| /' conftest.$ac_ext >&5
5722
5723 fi
5724 rm -f conftest.err conftest.$ac_objext \
5725       conftest$ac_exeext conftest.$ac_ext
5726 if test "$ac_cv_search_ldopen" = no; then
5727   for ac_lib in ld; do
5728     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5729     cat >conftest.$ac_ext <<_ACEOF
5730 /* confdefs.h.  */
5731 _ACEOF
5732 cat confdefs.h >>conftest.$ac_ext
5733 cat >>conftest.$ac_ext <<_ACEOF
5734 /* end confdefs.h.  */
5735
5736 /* Override any gcc2 internal prototype to avoid an error.  */
5737 #ifdef __cplusplus
5738 extern "C"
5739 #endif
5740 /* We use char because int might match the return type of a gcc2
5741    builtin and then its argument prototype would still apply.  */
5742 char ldopen ();
5743 int
5744 main ()
5745 {
5746 ldopen ();
5747   ;
5748   return 0;
5749 }
5750 _ACEOF
5751 rm -f conftest.$ac_objext conftest$ac_exeext
5752 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5753   (eval $ac_link) 2>conftest.er1
5754   ac_status=$?
5755   grep -v '^ *+' conftest.er1 >conftest.err
5756   rm -f conftest.er1
5757   cat conftest.err >&5
5758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5759   (exit $ac_status); } &&
5760          { ac_try='test -z "$ac_c_werror_flag"
5761                          || test ! -s conftest.err'
5762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5763   (eval $ac_try) 2>&5
5764   ac_status=$?
5765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766   (exit $ac_status); }; } &&
5767          { ac_try='test -s conftest$ac_exeext'
5768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5769   (eval $ac_try) 2>&5
5770   ac_status=$?
5771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772   (exit $ac_status); }; }; then
5773   ac_cv_search_ldopen="-l$ac_lib"
5774 break
5775 else
5776   echo "$as_me: failed program was:" >&5
5777 sed 's/^/| /' conftest.$ac_ext >&5
5778
5779 fi
5780 rm -f conftest.err conftest.$ac_objext \
5781       conftest$ac_exeext conftest.$ac_ext
5782   done
5783 fi
5784 LIBS=$ac_func_search_save_LIBS
5785 fi
5786 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5787 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5788 if test "$ac_cv_search_ldopen" != no; then
5789   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5790
5791 fi
5792
5793         ;;
5794 esac
5795 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5796 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5797 if test "${ac_cv_search_getopt_long+set}" = set; then
5798   echo $ECHO_N "(cached) $ECHO_C" >&6
5799 else
5800   ac_func_search_save_LIBS=$LIBS
5801 ac_cv_search_getopt_long=no
5802 cat >conftest.$ac_ext <<_ACEOF
5803 /* confdefs.h.  */
5804 _ACEOF
5805 cat confdefs.h >>conftest.$ac_ext
5806 cat >>conftest.$ac_ext <<_ACEOF
5807 /* end confdefs.h.  */
5808
5809 /* Override any gcc2 internal prototype to avoid an error.  */
5810 #ifdef __cplusplus
5811 extern "C"
5812 #endif
5813 /* We use char because int might match the return type of a gcc2
5814    builtin and then its argument prototype would still apply.  */
5815 char getopt_long ();
5816 int
5817 main ()
5818 {
5819 getopt_long ();
5820   ;
5821   return 0;
5822 }
5823 _ACEOF
5824 rm -f conftest.$ac_objext conftest$ac_exeext
5825 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5826   (eval $ac_link) 2>conftest.er1
5827   ac_status=$?
5828   grep -v '^ *+' conftest.er1 >conftest.err
5829   rm -f conftest.er1
5830   cat conftest.err >&5
5831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832   (exit $ac_status); } &&
5833          { ac_try='test -z "$ac_c_werror_flag"
5834                          || test ! -s conftest.err'
5835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5836   (eval $ac_try) 2>&5
5837   ac_status=$?
5838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839   (exit $ac_status); }; } &&
5840          { ac_try='test -s conftest$ac_exeext'
5841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5842   (eval $ac_try) 2>&5
5843   ac_status=$?
5844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5845   (exit $ac_status); }; }; then
5846   ac_cv_search_getopt_long="none required"
5847 else
5848   echo "$as_me: failed program was:" >&5
5849 sed 's/^/| /' conftest.$ac_ext >&5
5850
5851 fi
5852 rm -f conftest.err conftest.$ac_objext \
5853       conftest$ac_exeext conftest.$ac_ext
5854 if test "$ac_cv_search_getopt_long" = no; then
5855   for ac_lib in getopt gnugetopt; do
5856     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5857     cat >conftest.$ac_ext <<_ACEOF
5858 /* confdefs.h.  */
5859 _ACEOF
5860 cat confdefs.h >>conftest.$ac_ext
5861 cat >>conftest.$ac_ext <<_ACEOF
5862 /* end confdefs.h.  */
5863
5864 /* Override any gcc2 internal prototype to avoid an error.  */
5865 #ifdef __cplusplus
5866 extern "C"
5867 #endif
5868 /* We use char because int might match the return type of a gcc2
5869    builtin and then its argument prototype would still apply.  */
5870 char getopt_long ();
5871 int
5872 main ()
5873 {
5874 getopt_long ();
5875   ;
5876   return 0;
5877 }
5878 _ACEOF
5879 rm -f conftest.$ac_objext conftest$ac_exeext
5880 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5881   (eval $ac_link) 2>conftest.er1
5882   ac_status=$?
5883   grep -v '^ *+' conftest.er1 >conftest.err
5884   rm -f conftest.er1
5885   cat conftest.err >&5
5886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887   (exit $ac_status); } &&
5888          { ac_try='test -z "$ac_c_werror_flag"
5889                          || test ! -s conftest.err'
5890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5891   (eval $ac_try) 2>&5
5892   ac_status=$?
5893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894   (exit $ac_status); }; } &&
5895          { ac_try='test -s conftest$ac_exeext'
5896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5897   (eval $ac_try) 2>&5
5898   ac_status=$?
5899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900   (exit $ac_status); }; }; then
5901   ac_cv_search_getopt_long="-l$ac_lib"
5902 break
5903 else
5904   echo "$as_me: failed program was:" >&5
5905 sed 's/^/| /' conftest.$ac_ext >&5
5906
5907 fi
5908 rm -f conftest.err conftest.$ac_objext \
5909       conftest$ac_exeext conftest.$ac_ext
5910   done
5911 fi
5912 LIBS=$ac_func_search_save_LIBS
5913 fi
5914 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5915 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5916 if test "$ac_cv_search_getopt_long" != no; then
5917   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5918
5919 fi
5920
5921 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5922 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5923 if test "${ac_cv_search_crypt+set}" = set; then
5924   echo $ECHO_N "(cached) $ECHO_C" >&6
5925 else
5926   ac_func_search_save_LIBS=$LIBS
5927 ac_cv_search_crypt=no
5928 cat >conftest.$ac_ext <<_ACEOF
5929 /* confdefs.h.  */
5930 _ACEOF
5931 cat confdefs.h >>conftest.$ac_ext
5932 cat >>conftest.$ac_ext <<_ACEOF
5933 /* end confdefs.h.  */
5934
5935 /* Override any gcc2 internal prototype to avoid an error.  */
5936 #ifdef __cplusplus
5937 extern "C"
5938 #endif
5939 /* We use char because int might match the return type of a gcc2
5940    builtin and then its argument prototype would still apply.  */
5941 char crypt ();
5942 int
5943 main ()
5944 {
5945 crypt ();
5946   ;
5947   return 0;
5948 }
5949 _ACEOF
5950 rm -f conftest.$ac_objext conftest$ac_exeext
5951 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5952   (eval $ac_link) 2>conftest.er1
5953   ac_status=$?
5954   grep -v '^ *+' conftest.er1 >conftest.err
5955   rm -f conftest.er1
5956   cat conftest.err >&5
5957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5958   (exit $ac_status); } &&
5959          { ac_try='test -z "$ac_c_werror_flag"
5960                          || test ! -s conftest.err'
5961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5962   (eval $ac_try) 2>&5
5963   ac_status=$?
5964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5965   (exit $ac_status); }; } &&
5966          { ac_try='test -s conftest$ac_exeext'
5967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5968   (eval $ac_try) 2>&5
5969   ac_status=$?
5970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5971   (exit $ac_status); }; }; then
5972   ac_cv_search_crypt="none required"
5973 else
5974   echo "$as_me: failed program was:" >&5
5975 sed 's/^/| /' conftest.$ac_ext >&5
5976
5977 fi
5978 rm -f conftest.err conftest.$ac_objext \
5979       conftest$ac_exeext conftest.$ac_ext
5980 if test "$ac_cv_search_crypt" = no; then
5981   for ac_lib in crypt; do
5982     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5983     cat >conftest.$ac_ext <<_ACEOF
5984 /* confdefs.h.  */
5985 _ACEOF
5986 cat confdefs.h >>conftest.$ac_ext
5987 cat >>conftest.$ac_ext <<_ACEOF
5988 /* end confdefs.h.  */
5989
5990 /* Override any gcc2 internal prototype to avoid an error.  */
5991 #ifdef __cplusplus
5992 extern "C"
5993 #endif
5994 /* We use char because int might match the return type of a gcc2
5995    builtin and then its argument prototype would still apply.  */
5996 char crypt ();
5997 int
5998 main ()
5999 {
6000 crypt ();
6001   ;
6002   return 0;
6003 }
6004 _ACEOF
6005 rm -f conftest.$ac_objext conftest$ac_exeext
6006 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6007   (eval $ac_link) 2>conftest.er1
6008   ac_status=$?
6009   grep -v '^ *+' conftest.er1 >conftest.err
6010   rm -f conftest.er1
6011   cat conftest.err >&5
6012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6013   (exit $ac_status); } &&
6014          { ac_try='test -z "$ac_c_werror_flag"
6015                          || test ! -s conftest.err'
6016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6017   (eval $ac_try) 2>&5
6018   ac_status=$?
6019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6020   (exit $ac_status); }; } &&
6021          { ac_try='test -s conftest$ac_exeext'
6022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6023   (eval $ac_try) 2>&5
6024   ac_status=$?
6025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6026   (exit $ac_status); }; }; then
6027   ac_cv_search_crypt="-l$ac_lib"
6028 break
6029 else
6030   echo "$as_me: failed program was:" >&5
6031 sed 's/^/| /' conftest.$ac_ext >&5
6032
6033 fi
6034 rm -f conftest.err conftest.$ac_objext \
6035       conftest$ac_exeext conftest.$ac_ext
6036   done
6037 fi
6038 LIBS=$ac_func_search_save_LIBS
6039 fi
6040 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6041 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6042 if test "$ac_cv_search_crypt" != no; then
6043   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6044
6045 fi
6046
6047 # Solaris:
6048 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6049 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6050 if test "${ac_cv_search_fdatasync+set}" = set; then
6051   echo $ECHO_N "(cached) $ECHO_C" >&6
6052 else
6053   ac_func_search_save_LIBS=$LIBS
6054 ac_cv_search_fdatasync=no
6055 cat >conftest.$ac_ext <<_ACEOF
6056 /* confdefs.h.  */
6057 _ACEOF
6058 cat confdefs.h >>conftest.$ac_ext
6059 cat >>conftest.$ac_ext <<_ACEOF
6060 /* end confdefs.h.  */
6061
6062 /* Override any gcc2 internal prototype to avoid an error.  */
6063 #ifdef __cplusplus
6064 extern "C"
6065 #endif
6066 /* We use char because int might match the return type of a gcc2
6067    builtin and then its argument prototype would still apply.  */
6068 char fdatasync ();
6069 int
6070 main ()
6071 {
6072 fdatasync ();
6073   ;
6074   return 0;
6075 }
6076 _ACEOF
6077 rm -f conftest.$ac_objext conftest$ac_exeext
6078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6079   (eval $ac_link) 2>conftest.er1
6080   ac_status=$?
6081   grep -v '^ *+' conftest.er1 >conftest.err
6082   rm -f conftest.er1
6083   cat conftest.err >&5
6084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6085   (exit $ac_status); } &&
6086          { ac_try='test -z "$ac_c_werror_flag"
6087                          || test ! -s conftest.err'
6088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6089   (eval $ac_try) 2>&5
6090   ac_status=$?
6091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6092   (exit $ac_status); }; } &&
6093          { ac_try='test -s conftest$ac_exeext'
6094   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6095   (eval $ac_try) 2>&5
6096   ac_status=$?
6097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6098   (exit $ac_status); }; }; then
6099   ac_cv_search_fdatasync="none required"
6100 else
6101   echo "$as_me: failed program was:" >&5
6102 sed 's/^/| /' conftest.$ac_ext >&5
6103
6104 fi
6105 rm -f conftest.err conftest.$ac_objext \
6106       conftest$ac_exeext conftest.$ac_ext
6107 if test "$ac_cv_search_fdatasync" = no; then
6108   for ac_lib in rt posix4; do
6109     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6110     cat >conftest.$ac_ext <<_ACEOF
6111 /* confdefs.h.  */
6112 _ACEOF
6113 cat confdefs.h >>conftest.$ac_ext
6114 cat >>conftest.$ac_ext <<_ACEOF
6115 /* end confdefs.h.  */
6116
6117 /* Override any gcc2 internal prototype to avoid an error.  */
6118 #ifdef __cplusplus
6119 extern "C"
6120 #endif
6121 /* We use char because int might match the return type of a gcc2
6122    builtin and then its argument prototype would still apply.  */
6123 char fdatasync ();
6124 int
6125 main ()
6126 {
6127 fdatasync ();
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 rm -f conftest.$ac_objext conftest$ac_exeext
6133 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6134   (eval $ac_link) 2>conftest.er1
6135   ac_status=$?
6136   grep -v '^ *+' conftest.er1 >conftest.err
6137   rm -f conftest.er1
6138   cat conftest.err >&5
6139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6140   (exit $ac_status); } &&
6141          { ac_try='test -z "$ac_c_werror_flag"
6142                          || test ! -s conftest.err'
6143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6144   (eval $ac_try) 2>&5
6145   ac_status=$?
6146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147   (exit $ac_status); }; } &&
6148          { ac_try='test -s conftest$ac_exeext'
6149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6150   (eval $ac_try) 2>&5
6151   ac_status=$?
6152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6153   (exit $ac_status); }; }; then
6154   ac_cv_search_fdatasync="-l$ac_lib"
6155 break
6156 else
6157   echo "$as_me: failed program was:" >&5
6158 sed 's/^/| /' conftest.$ac_ext >&5
6159
6160 fi
6161 rm -f conftest.err conftest.$ac_objext \
6162       conftest$ac_exeext conftest.$ac_ext
6163   done
6164 fi
6165 LIBS=$ac_func_search_save_LIBS
6166 fi
6167 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6168 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6169 if test "$ac_cv_search_fdatasync" != no; then
6170   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6171
6172 fi
6173
6174 # Cygwin:
6175 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6176 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6177 if test "${ac_cv_search_shmget+set}" = set; then
6178   echo $ECHO_N "(cached) $ECHO_C" >&6
6179 else
6180   ac_func_search_save_LIBS=$LIBS
6181 ac_cv_search_shmget=no
6182 cat >conftest.$ac_ext <<_ACEOF
6183 /* confdefs.h.  */
6184 _ACEOF
6185 cat confdefs.h >>conftest.$ac_ext
6186 cat >>conftest.$ac_ext <<_ACEOF
6187 /* end confdefs.h.  */
6188
6189 /* Override any gcc2 internal prototype to avoid an error.  */
6190 #ifdef __cplusplus
6191 extern "C"
6192 #endif
6193 /* We use char because int might match the return type of a gcc2
6194    builtin and then its argument prototype would still apply.  */
6195 char shmget ();
6196 int
6197 main ()
6198 {
6199 shmget ();
6200   ;
6201   return 0;
6202 }
6203 _ACEOF
6204 rm -f conftest.$ac_objext conftest$ac_exeext
6205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6206   (eval $ac_link) 2>conftest.er1
6207   ac_status=$?
6208   grep -v '^ *+' conftest.er1 >conftest.err
6209   rm -f conftest.er1
6210   cat conftest.err >&5
6211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6212   (exit $ac_status); } &&
6213          { ac_try='test -z "$ac_c_werror_flag"
6214                          || test ! -s conftest.err'
6215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6216   (eval $ac_try) 2>&5
6217   ac_status=$?
6218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6219   (exit $ac_status); }; } &&
6220          { ac_try='test -s conftest$ac_exeext'
6221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6222   (eval $ac_try) 2>&5
6223   ac_status=$?
6224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6225   (exit $ac_status); }; }; then
6226   ac_cv_search_shmget="none required"
6227 else
6228   echo "$as_me: failed program was:" >&5
6229 sed 's/^/| /' conftest.$ac_ext >&5
6230
6231 fi
6232 rm -f conftest.err conftest.$ac_objext \
6233       conftest$ac_exeext conftest.$ac_ext
6234 if test "$ac_cv_search_shmget" = no; then
6235   for ac_lib in cygipc; do
6236     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6237     cat >conftest.$ac_ext <<_ACEOF
6238 /* confdefs.h.  */
6239 _ACEOF
6240 cat confdefs.h >>conftest.$ac_ext
6241 cat >>conftest.$ac_ext <<_ACEOF
6242 /* end confdefs.h.  */
6243
6244 /* Override any gcc2 internal prototype to avoid an error.  */
6245 #ifdef __cplusplus
6246 extern "C"
6247 #endif
6248 /* We use char because int might match the return type of a gcc2
6249    builtin and then its argument prototype would still apply.  */
6250 char shmget ();
6251 int
6252 main ()
6253 {
6254 shmget ();
6255   ;
6256   return 0;
6257 }
6258 _ACEOF
6259 rm -f conftest.$ac_objext conftest$ac_exeext
6260 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6261   (eval $ac_link) 2>conftest.er1
6262   ac_status=$?
6263   grep -v '^ *+' conftest.er1 >conftest.err
6264   rm -f conftest.er1
6265   cat conftest.err >&5
6266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267   (exit $ac_status); } &&
6268          { ac_try='test -z "$ac_c_werror_flag"
6269                          || test ! -s conftest.err'
6270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6271   (eval $ac_try) 2>&5
6272   ac_status=$?
6273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274   (exit $ac_status); }; } &&
6275          { ac_try='test -s conftest$ac_exeext'
6276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6277   (eval $ac_try) 2>&5
6278   ac_status=$?
6279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6280   (exit $ac_status); }; }; then
6281   ac_cv_search_shmget="-l$ac_lib"
6282 break
6283 else
6284   echo "$as_me: failed program was:" >&5
6285 sed 's/^/| /' conftest.$ac_ext >&5
6286
6287 fi
6288 rm -f conftest.err conftest.$ac_objext \
6289       conftest$ac_exeext conftest.$ac_ext
6290   done
6291 fi
6292 LIBS=$ac_func_search_save_LIBS
6293 fi
6294 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6295 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6296 if test "$ac_cv_search_shmget" != no; then
6297   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6298
6299 fi
6300
6301
6302 if test "$with_readline" = yes; then
6303
6304
6305 if test "${pgac_cv_check_readline+set}" = set; then
6306   echo $ECHO_N "(cached) $ECHO_C" >&6
6307 else
6308   pgac_cv_check_readline=no
6309 pgac_save_LIBS=$LIBS
6310 if test x"$with_libedit_preferred" != x"yes"
6311 then    READLINE_ORDER="-lreadline -ledit"
6312 else    READLINE_ORDER="-ledit -lreadline"
6313 fi
6314 for pgac_rllib in $READLINE_ORDER ; do
6315   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6316 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6317   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6318     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6319     cat >conftest.$ac_ext <<_ACEOF
6320 /* confdefs.h.  */
6321 _ACEOF
6322 cat confdefs.h >>conftest.$ac_ext
6323 cat >>conftest.$ac_ext <<_ACEOF
6324 /* end confdefs.h.  */
6325
6326 /* Override any gcc2 internal prototype to avoid an error.  */
6327 #ifdef __cplusplus
6328 extern "C"
6329 #endif
6330 /* We use char because int might match the return type of a gcc2
6331    builtin and then its argument prototype would still apply.  */
6332 char readline ();
6333 int
6334 main ()
6335 {
6336 readline ();
6337   ;
6338   return 0;
6339 }
6340 _ACEOF
6341 rm -f conftest.$ac_objext conftest$ac_exeext
6342 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6343   (eval $ac_link) 2>conftest.er1
6344   ac_status=$?
6345   grep -v '^ *+' conftest.er1 >conftest.err
6346   rm -f conftest.er1
6347   cat conftest.err >&5
6348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6349   (exit $ac_status); } &&
6350          { ac_try='test -z "$ac_c_werror_flag"
6351                          || test ! -s conftest.err'
6352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6353   (eval $ac_try) 2>&5
6354   ac_status=$?
6355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6356   (exit $ac_status); }; } &&
6357          { ac_try='test -s conftest$ac_exeext'
6358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6359   (eval $ac_try) 2>&5
6360   ac_status=$?
6361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362   (exit $ac_status); }; }; then
6363
6364       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6365       # recognize dependent libraries; assume curses is needed if we didn't
6366       # find any dependency.
6367       case $host_os in
6368         netbsd* | openbsd* | irix*)
6369           if test x"$pgac_lib" = x"" ; then
6370             pgac_lib=" -lcurses"
6371           fi ;;
6372       esac
6373
6374       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6375       break
6376
6377 else
6378   echo "$as_me: failed program was:" >&5
6379 sed 's/^/| /' conftest.$ac_ext >&5
6380
6381 fi
6382 rm -f conftest.err conftest.$ac_objext \
6383       conftest$ac_exeext conftest.$ac_ext
6384   done
6385   if test "$pgac_cv_check_readline" != no ; then
6386     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6387 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6388     break
6389   else
6390     echo "$as_me:$LINENO: result: no" >&5
6391 echo "${ECHO_T}no" >&6
6392   fi
6393 done
6394 LIBS=$pgac_save_LIBS
6395
6396 fi
6397
6398 if test "$pgac_cv_check_readline" != no ; then
6399   LIBS="$pgac_cv_check_readline $LIBS"
6400
6401 cat >>confdefs.h <<\_ACEOF
6402 #define HAVE_LIBREADLINE 1
6403 _ACEOF
6404
6405 fi
6406
6407
6408   if test x"$pgac_cv_check_readline" = x"no"; then
6409     { { echo "$as_me:$LINENO: error: readline library not found
6410 If you have readline already installed, see config.log for details on the
6411 failure.  It is possible the compiler isn't looking in the proper directory.
6412 Use --without-readline to disable readline support." >&5
6413 echo "$as_me: error: readline library not found
6414 If you have readline already installed, see config.log for details on the
6415 failure.  It is possible the compiler isn't looking in the proper directory.
6416 Use --without-readline to disable readline support." >&2;}
6417    { (exit 1); exit 1; }; }
6418   fi
6419 fi
6420
6421 if test "$with_zlib" = yes; then
6422
6423 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6424 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6425 if test "${ac_cv_lib_z_inflate+set}" = set; then
6426   echo $ECHO_N "(cached) $ECHO_C" >&6
6427 else
6428   ac_check_lib_save_LIBS=$LIBS
6429 LIBS="-lz  $LIBS"
6430 cat >conftest.$ac_ext <<_ACEOF
6431 /* confdefs.h.  */
6432 _ACEOF
6433 cat confdefs.h >>conftest.$ac_ext
6434 cat >>conftest.$ac_ext <<_ACEOF
6435 /* end confdefs.h.  */
6436
6437 /* Override any gcc2 internal prototype to avoid an error.  */
6438 #ifdef __cplusplus
6439 extern "C"
6440 #endif
6441 /* We use char because int might match the return type of a gcc2
6442    builtin and then its argument prototype would still apply.  */
6443 char inflate ();
6444 int
6445 main ()
6446 {
6447 inflate ();
6448   ;
6449   return 0;
6450 }
6451 _ACEOF
6452 rm -f conftest.$ac_objext conftest$ac_exeext
6453 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6454   (eval $ac_link) 2>conftest.er1
6455   ac_status=$?
6456   grep -v '^ *+' conftest.er1 >conftest.err
6457   rm -f conftest.er1
6458   cat conftest.err >&5
6459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6460   (exit $ac_status); } &&
6461          { ac_try='test -z "$ac_c_werror_flag"
6462                          || test ! -s conftest.err'
6463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6464   (eval $ac_try) 2>&5
6465   ac_status=$?
6466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467   (exit $ac_status); }; } &&
6468          { ac_try='test -s conftest$ac_exeext'
6469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6470   (eval $ac_try) 2>&5
6471   ac_status=$?
6472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6473   (exit $ac_status); }; }; then
6474   ac_cv_lib_z_inflate=yes
6475 else
6476   echo "$as_me: failed program was:" >&5
6477 sed 's/^/| /' conftest.$ac_ext >&5
6478
6479 ac_cv_lib_z_inflate=no
6480 fi
6481 rm -f conftest.err conftest.$ac_objext \
6482       conftest$ac_exeext conftest.$ac_ext
6483 LIBS=$ac_check_lib_save_LIBS
6484 fi
6485 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6486 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6487 if test $ac_cv_lib_z_inflate = yes; then
6488   cat >>confdefs.h <<_ACEOF
6489 #define HAVE_LIBZ 1
6490 _ACEOF
6491
6492   LIBS="-lz $LIBS"
6493
6494 else
6495   { { echo "$as_me:$LINENO: error: zlib library not found
6496 If you have zlib already installed, see config.log for details on the
6497 failure.  It is possible the compiler isn't looking in the proper directory.
6498 Use --without-zlib to disable zlib support." >&5
6499 echo "$as_me: error: zlib library not found
6500 If you have zlib already installed, see config.log for details on the
6501 failure.  It is possible the compiler isn't looking in the proper directory.
6502 Use --without-zlib to disable zlib support." >&2;}
6503    { (exit 1); exit 1; }; }
6504 fi
6505
6506 fi
6507
6508 if test "$enable_spinlocks" = yes; then
6509
6510 cat >>confdefs.h <<\_ACEOF
6511 #define HAVE_SPINLOCKS 1
6512 _ACEOF
6513
6514 else
6515   { echo "$as_me:$LINENO: WARNING:
6516 *** Not using spinlocks will cause poor performance." >&5
6517 echo "$as_me: WARNING:
6518 *** Not using spinlocks will cause poor performance." >&2;}
6519 fi
6520
6521 if test "$with_krb5" = yes ; then
6522   if test "$PORTNAME" != "win32"; then
6523      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6524 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6525 if test "${ac_cv_search_com_err+set}" = set; then
6526   echo $ECHO_N "(cached) $ECHO_C" >&6
6527 else
6528   ac_func_search_save_LIBS=$LIBS
6529 ac_cv_search_com_err=no
6530 cat >conftest.$ac_ext <<_ACEOF
6531 /* confdefs.h.  */
6532 _ACEOF
6533 cat confdefs.h >>conftest.$ac_ext
6534 cat >>conftest.$ac_ext <<_ACEOF
6535 /* end confdefs.h.  */
6536
6537 /* Override any gcc2 internal prototype to avoid an error.  */
6538 #ifdef __cplusplus
6539 extern "C"
6540 #endif
6541 /* We use char because int might match the return type of a gcc2
6542    builtin and then its argument prototype would still apply.  */
6543 char com_err ();
6544 int
6545 main ()
6546 {
6547 com_err ();
6548   ;
6549   return 0;
6550 }
6551 _ACEOF
6552 rm -f conftest.$ac_objext conftest$ac_exeext
6553 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6554   (eval $ac_link) 2>conftest.er1
6555   ac_status=$?
6556   grep -v '^ *+' conftest.er1 >conftest.err
6557   rm -f conftest.er1
6558   cat conftest.err >&5
6559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6560   (exit $ac_status); } &&
6561          { ac_try='test -z "$ac_c_werror_flag"
6562                          || test ! -s conftest.err'
6563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6564   (eval $ac_try) 2>&5
6565   ac_status=$?
6566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567   (exit $ac_status); }; } &&
6568          { ac_try='test -s conftest$ac_exeext'
6569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6570   (eval $ac_try) 2>&5
6571   ac_status=$?
6572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6573   (exit $ac_status); }; }; then
6574   ac_cv_search_com_err="none required"
6575 else
6576   echo "$as_me: failed program was:" >&5
6577 sed 's/^/| /' conftest.$ac_ext >&5
6578
6579 fi
6580 rm -f conftest.err conftest.$ac_objext \
6581       conftest$ac_exeext conftest.$ac_ext
6582 if test "$ac_cv_search_com_err" = no; then
6583   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6584     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6585     cat >conftest.$ac_ext <<_ACEOF
6586 /* confdefs.h.  */
6587 _ACEOF
6588 cat confdefs.h >>conftest.$ac_ext
6589 cat >>conftest.$ac_ext <<_ACEOF
6590 /* end confdefs.h.  */
6591
6592 /* Override any gcc2 internal prototype to avoid an error.  */
6593 #ifdef __cplusplus
6594 extern "C"
6595 #endif
6596 /* We use char because int might match the return type of a gcc2
6597    builtin and then its argument prototype would still apply.  */
6598 char com_err ();
6599 int
6600 main ()
6601 {
6602 com_err ();
6603   ;
6604   return 0;
6605 }
6606 _ACEOF
6607 rm -f conftest.$ac_objext conftest$ac_exeext
6608 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6609   (eval $ac_link) 2>conftest.er1
6610   ac_status=$?
6611   grep -v '^ *+' conftest.er1 >conftest.err
6612   rm -f conftest.er1
6613   cat conftest.err >&5
6614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6615   (exit $ac_status); } &&
6616          { ac_try='test -z "$ac_c_werror_flag"
6617                          || test ! -s conftest.err'
6618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6619   (eval $ac_try) 2>&5
6620   ac_status=$?
6621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6622   (exit $ac_status); }; } &&
6623          { ac_try='test -s conftest$ac_exeext'
6624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6625   (eval $ac_try) 2>&5
6626   ac_status=$?
6627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6628   (exit $ac_status); }; }; then
6629   ac_cv_search_com_err="-l$ac_lib"
6630 break
6631 else
6632   echo "$as_me: failed program was:" >&5
6633 sed 's/^/| /' conftest.$ac_ext >&5
6634
6635 fi
6636 rm -f conftest.err conftest.$ac_objext \
6637       conftest$ac_exeext conftest.$ac_ext
6638   done
6639 fi
6640 LIBS=$ac_func_search_save_LIBS
6641 fi
6642 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6643 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6644 if test "$ac_cv_search_com_err" != no; then
6645   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6646
6647 else
6648   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6649 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6650    { (exit 1); exit 1; }; }
6651 fi
6652
6653      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6654 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6655 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6656   echo $ECHO_N "(cached) $ECHO_C" >&6
6657 else
6658   ac_func_search_save_LIBS=$LIBS
6659 ac_cv_search_krb5_sendauth=no
6660 cat >conftest.$ac_ext <<_ACEOF
6661 /* confdefs.h.  */
6662 _ACEOF
6663 cat confdefs.h >>conftest.$ac_ext
6664 cat >>conftest.$ac_ext <<_ACEOF
6665 /* end confdefs.h.  */
6666
6667 /* Override any gcc2 internal prototype to avoid an error.  */
6668 #ifdef __cplusplus
6669 extern "C"
6670 #endif
6671 /* We use char because int might match the return type of a gcc2
6672    builtin and then its argument prototype would still apply.  */
6673 char krb5_sendauth ();
6674 int
6675 main ()
6676 {
6677 krb5_sendauth ();
6678   ;
6679   return 0;
6680 }
6681 _ACEOF
6682 rm -f conftest.$ac_objext conftest$ac_exeext
6683 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6684   (eval $ac_link) 2>conftest.er1
6685   ac_status=$?
6686   grep -v '^ *+' conftest.er1 >conftest.err
6687   rm -f conftest.er1
6688   cat conftest.err >&5
6689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6690   (exit $ac_status); } &&
6691          { ac_try='test -z "$ac_c_werror_flag"
6692                          || test ! -s conftest.err'
6693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6694   (eval $ac_try) 2>&5
6695   ac_status=$?
6696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6697   (exit $ac_status); }; } &&
6698          { ac_try='test -s conftest$ac_exeext'
6699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6700   (eval $ac_try) 2>&5
6701   ac_status=$?
6702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6703   (exit $ac_status); }; }; then
6704   ac_cv_search_krb5_sendauth="none required"
6705 else
6706   echo "$as_me: failed program was:" >&5
6707 sed 's/^/| /' conftest.$ac_ext >&5
6708
6709 fi
6710 rm -f conftest.err conftest.$ac_objext \
6711       conftest$ac_exeext conftest.$ac_ext
6712 if test "$ac_cv_search_krb5_sendauth" = no; then
6713   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6714     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6715     cat >conftest.$ac_ext <<_ACEOF
6716 /* confdefs.h.  */
6717 _ACEOF
6718 cat confdefs.h >>conftest.$ac_ext
6719 cat >>conftest.$ac_ext <<_ACEOF
6720 /* end confdefs.h.  */
6721
6722 /* Override any gcc2 internal prototype to avoid an error.  */
6723 #ifdef __cplusplus
6724 extern "C"
6725 #endif
6726 /* We use char because int might match the return type of a gcc2
6727    builtin and then its argument prototype would still apply.  */
6728 char krb5_sendauth ();
6729 int
6730 main ()
6731 {
6732 krb5_sendauth ();
6733   ;
6734   return 0;
6735 }
6736 _ACEOF
6737 rm -f conftest.$ac_objext conftest$ac_exeext
6738 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6739   (eval $ac_link) 2>conftest.er1
6740   ac_status=$?
6741   grep -v '^ *+' conftest.er1 >conftest.err
6742   rm -f conftest.er1
6743   cat conftest.err >&5
6744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6745   (exit $ac_status); } &&
6746          { ac_try='test -z "$ac_c_werror_flag"
6747                          || test ! -s conftest.err'
6748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6749   (eval $ac_try) 2>&5
6750   ac_status=$?
6751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6752   (exit $ac_status); }; } &&
6753          { ac_try='test -s conftest$ac_exeext'
6754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6755   (eval $ac_try) 2>&5
6756   ac_status=$?
6757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6758   (exit $ac_status); }; }; then
6759   ac_cv_search_krb5_sendauth="-l$ac_lib"
6760 break
6761 else
6762   echo "$as_me: failed program was:" >&5
6763 sed 's/^/| /' conftest.$ac_ext >&5
6764
6765 fi
6766 rm -f conftest.err conftest.$ac_objext \
6767       conftest$ac_exeext conftest.$ac_ext
6768   done
6769 fi
6770 LIBS=$ac_func_search_save_LIBS
6771 fi
6772 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6773 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6774 if test "$ac_cv_search_krb5_sendauth" != no; then
6775   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6776
6777 else
6778   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6779 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6780    { (exit 1); exit 1; }; }
6781 fi
6782
6783   else
6784      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6785 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6786 if test "${ac_cv_search_com_err+set}" = set; then
6787   echo $ECHO_N "(cached) $ECHO_C" >&6
6788 else
6789   ac_func_search_save_LIBS=$LIBS
6790 ac_cv_search_com_err=no
6791 cat >conftest.$ac_ext <<_ACEOF
6792 /* confdefs.h.  */
6793 _ACEOF
6794 cat confdefs.h >>conftest.$ac_ext
6795 cat >>conftest.$ac_ext <<_ACEOF
6796 /* end confdefs.h.  */
6797
6798 /* Override any gcc2 internal prototype to avoid an error.  */
6799 #ifdef __cplusplus
6800 extern "C"
6801 #endif
6802 /* We use char because int might match the return type of a gcc2
6803    builtin and then its argument prototype would still apply.  */
6804 char com_err ();
6805 int
6806 main ()
6807 {
6808 com_err ();
6809   ;
6810   return 0;
6811 }
6812 _ACEOF
6813 rm -f conftest.$ac_objext conftest$ac_exeext
6814 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6815   (eval $ac_link) 2>conftest.er1
6816   ac_status=$?
6817   grep -v '^ *+' conftest.er1 >conftest.err
6818   rm -f conftest.er1
6819   cat conftest.err >&5
6820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6821   (exit $ac_status); } &&
6822          { ac_try='test -z "$ac_c_werror_flag"
6823                          || test ! -s conftest.err'
6824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6825   (eval $ac_try) 2>&5
6826   ac_status=$?
6827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6828   (exit $ac_status); }; } &&
6829          { ac_try='test -s conftest$ac_exeext'
6830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6831   (eval $ac_try) 2>&5
6832   ac_status=$?
6833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6834   (exit $ac_status); }; }; then
6835   ac_cv_search_com_err="none required"
6836 else
6837   echo "$as_me: failed program was:" >&5
6838 sed 's/^/| /' conftest.$ac_ext >&5
6839
6840 fi
6841 rm -f conftest.err conftest.$ac_objext \
6842       conftest$ac_exeext conftest.$ac_ext
6843 if test "$ac_cv_search_com_err" = no; then
6844   for ac_lib in 'comerr32 -lkrb5_32'; do
6845     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6846     cat >conftest.$ac_ext <<_ACEOF
6847 /* confdefs.h.  */
6848 _ACEOF
6849 cat confdefs.h >>conftest.$ac_ext
6850 cat >>conftest.$ac_ext <<_ACEOF
6851 /* end confdefs.h.  */
6852
6853 /* Override any gcc2 internal prototype to avoid an error.  */
6854 #ifdef __cplusplus
6855 extern "C"
6856 #endif
6857 /* We use char because int might match the return type of a gcc2
6858    builtin and then its argument prototype would still apply.  */
6859 char com_err ();
6860 int
6861 main ()
6862 {
6863 com_err ();
6864   ;
6865   return 0;
6866 }
6867 _ACEOF
6868 rm -f conftest.$ac_objext conftest$ac_exeext
6869 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6870   (eval $ac_link) 2>conftest.er1
6871   ac_status=$?
6872   grep -v '^ *+' conftest.er1 >conftest.err
6873   rm -f conftest.er1
6874   cat conftest.err >&5
6875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876   (exit $ac_status); } &&
6877          { ac_try='test -z "$ac_c_werror_flag"
6878                          || test ! -s conftest.err'
6879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6880   (eval $ac_try) 2>&5
6881   ac_status=$?
6882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6883   (exit $ac_status); }; } &&
6884          { ac_try='test -s conftest$ac_exeext'
6885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6886   (eval $ac_try) 2>&5
6887   ac_status=$?
6888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889   (exit $ac_status); }; }; then
6890   ac_cv_search_com_err="-l$ac_lib"
6891 break
6892 else
6893   echo "$as_me: failed program was:" >&5
6894 sed 's/^/| /' conftest.$ac_ext >&5
6895
6896 fi
6897 rm -f conftest.err conftest.$ac_objext \
6898       conftest$ac_exeext conftest.$ac_ext
6899   done
6900 fi
6901 LIBS=$ac_func_search_save_LIBS
6902 fi
6903 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6904 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6905 if test "$ac_cv_search_com_err" != no; then
6906   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6907
6908 else
6909   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6910 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6911    { (exit 1); exit 1; }; }
6912 fi
6913
6914   fi
6915 fi
6916
6917 if test "$with_openssl" = yes ; then
6918     if test "$PORTNAME" != "win32"; then
6919
6920 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6921 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6922 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6923   echo $ECHO_N "(cached) $ECHO_C" >&6
6924 else
6925   ac_check_lib_save_LIBS=$LIBS
6926 LIBS="-lcrypto  $LIBS"
6927 cat >conftest.$ac_ext <<_ACEOF
6928 /* confdefs.h.  */
6929 _ACEOF
6930 cat confdefs.h >>conftest.$ac_ext
6931 cat >>conftest.$ac_ext <<_ACEOF
6932 /* end confdefs.h.  */
6933
6934 /* Override any gcc2 internal prototype to avoid an error.  */
6935 #ifdef __cplusplus
6936 extern "C"
6937 #endif
6938 /* We use char because int might match the return type of a gcc2
6939    builtin and then its argument prototype would still apply.  */
6940 char CRYPTO_new_ex_data ();
6941 int
6942 main ()
6943 {
6944 CRYPTO_new_ex_data ();
6945   ;
6946   return 0;
6947 }
6948 _ACEOF
6949 rm -f conftest.$ac_objext conftest$ac_exeext
6950 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6951   (eval $ac_link) 2>conftest.er1
6952   ac_status=$?
6953   grep -v '^ *+' conftest.er1 >conftest.err
6954   rm -f conftest.er1
6955   cat conftest.err >&5
6956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957   (exit $ac_status); } &&
6958          { ac_try='test -z "$ac_c_werror_flag"
6959                          || test ! -s conftest.err'
6960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6961   (eval $ac_try) 2>&5
6962   ac_status=$?
6963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6964   (exit $ac_status); }; } &&
6965          { ac_try='test -s conftest$ac_exeext'
6966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6967   (eval $ac_try) 2>&5
6968   ac_status=$?
6969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6970   (exit $ac_status); }; }; then
6971   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6972 else
6973   echo "$as_me: failed program was:" >&5
6974 sed 's/^/| /' conftest.$ac_ext >&5
6975
6976 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6977 fi
6978 rm -f conftest.err conftest.$ac_objext \
6979       conftest$ac_exeext conftest.$ac_ext
6980 LIBS=$ac_check_lib_save_LIBS
6981 fi
6982 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6983 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6984 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6985   cat >>confdefs.h <<_ACEOF
6986 #define HAVE_LIBCRYPTO 1
6987 _ACEOF
6988
6989   LIBS="-lcrypto $LIBS"
6990
6991 else
6992   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
6993 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
6994    { (exit 1); exit 1; }; }
6995 fi
6996
6997
6998 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
6999 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7000 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7001   echo $ECHO_N "(cached) $ECHO_C" >&6
7002 else
7003   ac_check_lib_save_LIBS=$LIBS
7004 LIBS="-lssl  $LIBS"
7005 cat >conftest.$ac_ext <<_ACEOF
7006 /* confdefs.h.  */
7007 _ACEOF
7008 cat confdefs.h >>conftest.$ac_ext
7009 cat >>conftest.$ac_ext <<_ACEOF
7010 /* end confdefs.h.  */
7011
7012 /* Override any gcc2 internal prototype to avoid an error.  */
7013 #ifdef __cplusplus
7014 extern "C"
7015 #endif
7016 /* We use char because int might match the return type of a gcc2
7017    builtin and then its argument prototype would still apply.  */
7018 char SSL_library_init ();
7019 int
7020 main ()
7021 {
7022 SSL_library_init ();
7023   ;
7024   return 0;
7025 }
7026 _ACEOF
7027 rm -f conftest.$ac_objext conftest$ac_exeext
7028 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7029   (eval $ac_link) 2>conftest.er1
7030   ac_status=$?
7031   grep -v '^ *+' conftest.er1 >conftest.err
7032   rm -f conftest.er1
7033   cat conftest.err >&5
7034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7035   (exit $ac_status); } &&
7036          { ac_try='test -z "$ac_c_werror_flag"
7037                          || test ! -s conftest.err'
7038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7039   (eval $ac_try) 2>&5
7040   ac_status=$?
7041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7042   (exit $ac_status); }; } &&
7043          { ac_try='test -s conftest$ac_exeext'
7044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7045   (eval $ac_try) 2>&5
7046   ac_status=$?
7047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7048   (exit $ac_status); }; }; then
7049   ac_cv_lib_ssl_SSL_library_init=yes
7050 else
7051   echo "$as_me: failed program was:" >&5
7052 sed 's/^/| /' conftest.$ac_ext >&5
7053
7054 ac_cv_lib_ssl_SSL_library_init=no
7055 fi
7056 rm -f conftest.err conftest.$ac_objext \
7057       conftest$ac_exeext conftest.$ac_ext
7058 LIBS=$ac_check_lib_save_LIBS
7059 fi
7060 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7061 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7062 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7063   cat >>confdefs.h <<_ACEOF
7064 #define HAVE_LIBSSL 1
7065 _ACEOF
7066
7067   LIBS="-lssl $LIBS"
7068
7069 else
7070   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7071 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7072    { (exit 1); exit 1; }; }
7073 fi
7074
7075   else
7076
7077 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7078 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7079 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7080   echo $ECHO_N "(cached) $ECHO_C" >&6
7081 else
7082   ac_check_lib_save_LIBS=$LIBS
7083 LIBS="-leay32  $LIBS"
7084 cat >conftest.$ac_ext <<_ACEOF
7085 /* confdefs.h.  */
7086 _ACEOF
7087 cat confdefs.h >>conftest.$ac_ext
7088 cat >>conftest.$ac_ext <<_ACEOF
7089 /* end confdefs.h.  */
7090
7091 /* Override any gcc2 internal prototype to avoid an error.  */
7092 #ifdef __cplusplus
7093 extern "C"
7094 #endif
7095 /* We use char because int might match the return type of a gcc2
7096    builtin and then its argument prototype would still apply.  */
7097 char CRYPTO_new_ex_data ();
7098 int
7099 main ()
7100 {
7101 CRYPTO_new_ex_data ();
7102   ;
7103   return 0;
7104 }
7105 _ACEOF
7106 rm -f conftest.$ac_objext conftest$ac_exeext
7107 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7108   (eval $ac_link) 2>conftest.er1
7109   ac_status=$?
7110   grep -v '^ *+' conftest.er1 >conftest.err
7111   rm -f conftest.er1
7112   cat conftest.err >&5
7113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7114   (exit $ac_status); } &&
7115          { ac_try='test -z "$ac_c_werror_flag"
7116                          || test ! -s conftest.err'
7117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7118   (eval $ac_try) 2>&5
7119   ac_status=$?
7120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7121   (exit $ac_status); }; } &&
7122          { ac_try='test -s conftest$ac_exeext'
7123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7124   (eval $ac_try) 2>&5
7125   ac_status=$?
7126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7127   (exit $ac_status); }; }; then
7128   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7129 else
7130   echo "$as_me: failed program was:" >&5
7131 sed 's/^/| /' conftest.$ac_ext >&5
7132
7133 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7134 fi
7135 rm -f conftest.err conftest.$ac_objext \
7136       conftest$ac_exeext conftest.$ac_ext
7137 LIBS=$ac_check_lib_save_LIBS
7138 fi
7139 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7140 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7141 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7142   cat >>confdefs.h <<_ACEOF
7143 #define HAVE_LIBEAY32 1
7144 _ACEOF
7145
7146   LIBS="-leay32 $LIBS"
7147
7148 else
7149   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7150 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7151    { (exit 1); exit 1; }; }
7152 fi
7153
7154
7155 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7156 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7157 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7158   echo $ECHO_N "(cached) $ECHO_C" >&6
7159 else
7160   ac_check_lib_save_LIBS=$LIBS
7161 LIBS="-lssleay32  $LIBS"
7162 cat >conftest.$ac_ext <<_ACEOF
7163 /* confdefs.h.  */
7164 _ACEOF
7165 cat confdefs.h >>conftest.$ac_ext
7166 cat >>conftest.$ac_ext <<_ACEOF
7167 /* end confdefs.h.  */
7168
7169 /* Override any gcc2 internal prototype to avoid an error.  */
7170 #ifdef __cplusplus
7171 extern "C"
7172 #endif
7173 /* We use char because int might match the return type of a gcc2
7174    builtin and then its argument prototype would still apply.  */
7175 char SSL_library_init ();
7176 int
7177 main ()
7178 {
7179 SSL_library_init ();
7180   ;
7181   return 0;
7182 }
7183 _ACEOF
7184 rm -f conftest.$ac_objext conftest$ac_exeext
7185 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7186   (eval $ac_link) 2>conftest.er1
7187   ac_status=$?
7188   grep -v '^ *+' conftest.er1 >conftest.err
7189   rm -f conftest.er1
7190   cat conftest.err >&5
7191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7192   (exit $ac_status); } &&
7193          { ac_try='test -z "$ac_c_werror_flag"
7194                          || test ! -s conftest.err'
7195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7196   (eval $ac_try) 2>&5
7197   ac_status=$?
7198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7199   (exit $ac_status); }; } &&
7200          { ac_try='test -s conftest$ac_exeext'
7201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7202   (eval $ac_try) 2>&5
7203   ac_status=$?
7204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7205   (exit $ac_status); }; }; then
7206   ac_cv_lib_ssleay32_SSL_library_init=yes
7207 else
7208   echo "$as_me: failed program was:" >&5
7209 sed 's/^/| /' conftest.$ac_ext >&5
7210
7211 ac_cv_lib_ssleay32_SSL_library_init=no
7212 fi
7213 rm -f conftest.err conftest.$ac_objext \
7214       conftest$ac_exeext conftest.$ac_ext
7215 LIBS=$ac_check_lib_save_LIBS
7216 fi
7217 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7218 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7219 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7220   cat >>confdefs.h <<_ACEOF
7221 #define HAVE_LIBSSLEAY32 1
7222 _ACEOF
7223
7224   LIBS="-lssleay32 $LIBS"
7225
7226 else
7227   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7228 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7229    { (exit 1); exit 1; }; }
7230 fi
7231
7232   fi
7233 fi
7234
7235 if test "$with_pam" = yes ; then
7236
7237 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7238 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7239 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7240   echo $ECHO_N "(cached) $ECHO_C" >&6
7241 else
7242   ac_check_lib_save_LIBS=$LIBS
7243 LIBS="-lpam  $LIBS"
7244 cat >conftest.$ac_ext <<_ACEOF
7245 /* confdefs.h.  */
7246 _ACEOF
7247 cat confdefs.h >>conftest.$ac_ext
7248 cat >>conftest.$ac_ext <<_ACEOF
7249 /* end confdefs.h.  */
7250
7251 /* Override any gcc2 internal prototype to avoid an error.  */
7252 #ifdef __cplusplus
7253 extern "C"
7254 #endif
7255 /* We use char because int might match the return type of a gcc2
7256    builtin and then its argument prototype would still apply.  */
7257 char pam_start ();
7258 int
7259 main ()
7260 {
7261 pam_start ();
7262   ;
7263   return 0;
7264 }
7265 _ACEOF
7266 rm -f conftest.$ac_objext conftest$ac_exeext
7267 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7268   (eval $ac_link) 2>conftest.er1
7269   ac_status=$?
7270   grep -v '^ *+' conftest.er1 >conftest.err
7271   rm -f conftest.er1
7272   cat conftest.err >&5
7273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274   (exit $ac_status); } &&
7275          { ac_try='test -z "$ac_c_werror_flag"
7276                          || test ! -s conftest.err'
7277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7278   (eval $ac_try) 2>&5
7279   ac_status=$?
7280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7281   (exit $ac_status); }; } &&
7282          { ac_try='test -s conftest$ac_exeext'
7283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287   (exit $ac_status); }; }; then
7288   ac_cv_lib_pam_pam_start=yes
7289 else
7290   echo "$as_me: failed program was:" >&5
7291 sed 's/^/| /' conftest.$ac_ext >&5
7292
7293 ac_cv_lib_pam_pam_start=no
7294 fi
7295 rm -f conftest.err conftest.$ac_objext \
7296       conftest$ac_exeext conftest.$ac_ext
7297 LIBS=$ac_check_lib_save_LIBS
7298 fi
7299 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7300 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7301 if test $ac_cv_lib_pam_pam_start = yes; then
7302   cat >>confdefs.h <<_ACEOF
7303 #define HAVE_LIBPAM 1
7304 _ACEOF
7305
7306   LIBS="-lpam $LIBS"
7307
7308 else
7309   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7310 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7311    { (exit 1); exit 1; }; }
7312 fi
7313
7314 fi
7315
7316
7317 if test "$with_ldap" = yes ; then
7318   if test "$PORTNAME" != "win32"; then
7319
7320 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
7321 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
7322 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
7323   echo $ECHO_N "(cached) $ECHO_C" >&6
7324 else
7325   ac_check_lib_save_LIBS=$LIBS
7326 LIBS="-lldap  $LIBS"
7327 cat >conftest.$ac_ext <<_ACEOF
7328 /* confdefs.h.  */
7329 _ACEOF
7330 cat confdefs.h >>conftest.$ac_ext
7331 cat >>conftest.$ac_ext <<_ACEOF
7332 /* end confdefs.h.  */
7333
7334 /* Override any gcc2 internal prototype to avoid an error.  */
7335 #ifdef __cplusplus
7336 extern "C"
7337 #endif
7338 /* We use char because int might match the return type of a gcc2
7339    builtin and then its argument prototype would still apply.  */
7340 char ldap_bind ();
7341 int
7342 main ()
7343 {
7344 ldap_bind ();
7345   ;
7346   return 0;
7347 }
7348 _ACEOF
7349 rm -f conftest.$ac_objext conftest$ac_exeext
7350 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7351   (eval $ac_link) 2>conftest.er1
7352   ac_status=$?
7353   grep -v '^ *+' conftest.er1 >conftest.err
7354   rm -f conftest.er1
7355   cat conftest.err >&5
7356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7357   (exit $ac_status); } &&
7358          { ac_try='test -z "$ac_c_werror_flag"
7359                          || test ! -s conftest.err'
7360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7361   (eval $ac_try) 2>&5
7362   ac_status=$?
7363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7364   (exit $ac_status); }; } &&
7365          { ac_try='test -s conftest$ac_exeext'
7366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7367   (eval $ac_try) 2>&5
7368   ac_status=$?
7369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7370   (exit $ac_status); }; }; then
7371   ac_cv_lib_ldap_ldap_bind=yes
7372 else
7373   echo "$as_me: failed program was:" >&5
7374 sed 's/^/| /' conftest.$ac_ext >&5
7375
7376 ac_cv_lib_ldap_ldap_bind=no
7377 fi
7378 rm -f conftest.err conftest.$ac_objext \
7379       conftest$ac_exeext conftest.$ac_ext
7380 LIBS=$ac_check_lib_save_LIBS
7381 fi
7382 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
7383 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
7384 if test $ac_cv_lib_ldap_ldap_bind = yes; then
7385   cat >>confdefs.h <<_ACEOF
7386 #define HAVE_LIBLDAP 1
7387 _ACEOF
7388
7389   LIBS="-lldap $LIBS"
7390
7391 else
7392   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
7393 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
7394    { (exit 1); exit 1; }; }
7395 fi
7396
7397   else
7398
7399 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
7400 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
7401 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
7402   echo $ECHO_N "(cached) $ECHO_C" >&6
7403 else
7404   ac_check_lib_save_LIBS=$LIBS
7405 LIBS="-lwldap32  $LIBS"
7406 cat >conftest.$ac_ext <<_ACEOF
7407 /* confdefs.h.  */
7408 _ACEOF
7409 cat confdefs.h >>conftest.$ac_ext
7410 cat >>conftest.$ac_ext <<_ACEOF
7411 /* end confdefs.h.  */
7412
7413 /* Override any gcc2 internal prototype to avoid an error.  */
7414 #ifdef __cplusplus
7415 extern "C"
7416 #endif
7417 /* We use char because int might match the return type of a gcc2
7418    builtin and then its argument prototype would still apply.  */
7419 char ldap_bind ();
7420 int
7421 main ()
7422 {
7423 ldap_bind ();
7424   ;
7425   return 0;
7426 }
7427 _ACEOF
7428 rm -f conftest.$ac_objext conftest$ac_exeext
7429 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7430   (eval $ac_link) 2>conftest.er1
7431   ac_status=$?
7432   grep -v '^ *+' conftest.er1 >conftest.err
7433   rm -f conftest.er1
7434   cat conftest.err >&5
7435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7436   (exit $ac_status); } &&
7437          { ac_try='test -z "$ac_c_werror_flag"
7438                          || test ! -s conftest.err'
7439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7440   (eval $ac_try) 2>&5
7441   ac_status=$?
7442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7443   (exit $ac_status); }; } &&
7444          { ac_try='test -s conftest$ac_exeext'
7445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7446   (eval $ac_try) 2>&5
7447   ac_status=$?
7448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7449   (exit $ac_status); }; }; then
7450   ac_cv_lib_wldap32_ldap_bind=yes
7451 else
7452   echo "$as_me: failed program was:" >&5
7453 sed 's/^/| /' conftest.$ac_ext >&5
7454
7455 ac_cv_lib_wldap32_ldap_bind=no
7456 fi
7457 rm -f conftest.err conftest.$ac_objext \
7458       conftest$ac_exeext conftest.$ac_ext
7459 LIBS=$ac_check_lib_save_LIBS
7460 fi
7461 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
7462 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
7463 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
7464   cat >>confdefs.h <<_ACEOF
7465 #define HAVE_LIBWLDAP32 1
7466 _ACEOF
7467
7468   LIBS="-lwldap32 $LIBS"
7469
7470 else
7471   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
7472 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
7473    { (exit 1); exit 1; }; }
7474 fi
7475
7476   fi
7477 fi
7478
7479 ##
7480 ## Header files
7481 ##
7482
7483 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7484 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7485 if test "${ac_cv_header_stdc+set}" = set; then
7486   echo $ECHO_N "(cached) $ECHO_C" >&6
7487 else
7488   cat >conftest.$ac_ext <<_ACEOF
7489 /* confdefs.h.  */
7490 _ACEOF
7491 cat confdefs.h >>conftest.$ac_ext
7492 cat >>conftest.$ac_ext <<_ACEOF
7493 /* end confdefs.h.  */
7494 #include <stdlib.h>
7495 #include <stdarg.h>
7496 #include <string.h>
7497 #include <float.h>
7498
7499 int
7500 main ()
7501 {
7502
7503   ;
7504   return 0;
7505 }
7506 _ACEOF
7507 rm -f conftest.$ac_objext
7508 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7509   (eval $ac_compile) 2>conftest.er1
7510   ac_status=$?
7511   grep -v '^ *+' conftest.er1 >conftest.err
7512   rm -f conftest.er1
7513   cat conftest.err >&5
7514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7515   (exit $ac_status); } &&
7516          { ac_try='test -z "$ac_c_werror_flag"
7517                          || test ! -s conftest.err'
7518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7519   (eval $ac_try) 2>&5
7520   ac_status=$?
7521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522   (exit $ac_status); }; } &&
7523          { ac_try='test -s conftest.$ac_objext'
7524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7525   (eval $ac_try) 2>&5
7526   ac_status=$?
7527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7528   (exit $ac_status); }; }; then
7529   ac_cv_header_stdc=yes
7530 else
7531   echo "$as_me: failed program was:" >&5
7532 sed 's/^/| /' conftest.$ac_ext >&5
7533
7534 ac_cv_header_stdc=no
7535 fi
7536 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7537
7538 if test $ac_cv_header_stdc = yes; then
7539   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7540   cat >conftest.$ac_ext <<_ACEOF
7541 /* confdefs.h.  */
7542 _ACEOF
7543 cat confdefs.h >>conftest.$ac_ext
7544 cat >>conftest.$ac_ext <<_ACEOF
7545 /* end confdefs.h.  */
7546 #include <string.h>
7547
7548 _ACEOF
7549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7550   $EGREP "memchr" >/dev/null 2>&1; then
7551   :
7552 else
7553   ac_cv_header_stdc=no
7554 fi
7555 rm -f conftest*
7556
7557 fi
7558
7559 if test $ac_cv_header_stdc = yes; then
7560   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7561   cat >conftest.$ac_ext <<_ACEOF
7562 /* confdefs.h.  */
7563 _ACEOF
7564 cat confdefs.h >>conftest.$ac_ext
7565 cat >>conftest.$ac_ext <<_ACEOF
7566 /* end confdefs.h.  */
7567 #include <stdlib.h>
7568
7569 _ACEOF
7570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7571   $EGREP "free" >/dev/null 2>&1; then
7572   :
7573 else
7574   ac_cv_header_stdc=no
7575 fi
7576 rm -f conftest*
7577
7578 fi
7579
7580 if test $ac_cv_header_stdc = yes; then
7581   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7582   if test "$cross_compiling" = yes; then
7583   :
7584 else
7585   cat >conftest.$ac_ext <<_ACEOF
7586 /* confdefs.h.  */
7587 _ACEOF
7588 cat confdefs.h >>conftest.$ac_ext
7589 cat >>conftest.$ac_ext <<_ACEOF
7590 /* end confdefs.h.  */
7591 #include <ctype.h>
7592 #if ((' ' & 0x0FF) == 0x020)
7593 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7594 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7595 #else
7596 # define ISLOWER(c) \
7597                    (('a' <= (c) && (c) <= 'i') \
7598                      || ('j' <= (c) && (c) <= 'r') \
7599                      || ('s' <= (c) && (c) <= 'z'))
7600 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7601 #endif
7602
7603 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7604 int
7605 main ()
7606 {
7607   int i;
7608   for (i = 0; i < 256; i++)
7609     if (XOR (islower (i), ISLOWER (i))
7610         || toupper (i) != TOUPPER (i))
7611       exit(2);
7612   exit (0);
7613 }
7614 _ACEOF
7615 rm -f conftest$ac_exeext
7616 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7617   (eval $ac_link) 2>&5
7618   ac_status=$?
7619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7622   (eval $ac_try) 2>&5
7623   ac_status=$?
7624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625   (exit $ac_status); }; }; then
7626   :
7627 else
7628   echo "$as_me: program exited with status $ac_status" >&5
7629 echo "$as_me: failed program was:" >&5
7630 sed 's/^/| /' conftest.$ac_ext >&5
7631
7632 ( exit $ac_status )
7633 ac_cv_header_stdc=no
7634 fi
7635 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7636 fi
7637 fi
7638 fi
7639 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7640 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7641 if test $ac_cv_header_stdc = yes; then
7642
7643 cat >>confdefs.h <<\_ACEOF
7644 #define STDC_HEADERS 1
7645 _ACEOF
7646
7647 fi
7648
7649 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7660                   inttypes.h stdint.h unistd.h
7661 do
7662 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7663 echo "$as_me:$LINENO: checking for $ac_header" >&5
7664 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7665 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7666   echo $ECHO_N "(cached) $ECHO_C" >&6
7667 else
7668   cat >conftest.$ac_ext <<_ACEOF
7669 /* confdefs.h.  */
7670 _ACEOF
7671 cat confdefs.h >>conftest.$ac_ext
7672 cat >>conftest.$ac_ext <<_ACEOF
7673 /* end confdefs.h.  */
7674 $ac_includes_default
7675
7676 #include <$ac_header>
7677 _ACEOF
7678 rm -f conftest.$ac_objext
7679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7680   (eval $ac_compile) 2>conftest.er1
7681   ac_status=$?
7682   grep -v '^ *+' conftest.er1 >conftest.err
7683   rm -f conftest.er1
7684   cat conftest.err >&5
7685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686   (exit $ac_status); } &&
7687          { ac_try='test -z "$ac_c_werror_flag"
7688                          || test ! -s conftest.err'
7689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7690   (eval $ac_try) 2>&5
7691   ac_status=$?
7692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7693   (exit $ac_status); }; } &&
7694          { ac_try='test -s conftest.$ac_objext'
7695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7696   (eval $ac_try) 2>&5
7697   ac_status=$?
7698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7699   (exit $ac_status); }; }; then
7700   eval "$as_ac_Header=yes"
7701 else
7702   echo "$as_me: failed program was:" >&5
7703 sed 's/^/| /' conftest.$ac_ext >&5
7704
7705 eval "$as_ac_Header=no"
7706 fi
7707 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7708 fi
7709 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7710 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7711 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7712   cat >>confdefs.h <<_ACEOF
7713 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7714 _ACEOF
7715
7716 fi
7717
7718 done
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746 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
7747 do
7748 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7750   echo "$as_me:$LINENO: checking for $ac_header" >&5
7751 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7752 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7753   echo $ECHO_N "(cached) $ECHO_C" >&6
7754 fi
7755 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7756 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7757 else
7758   # Is the header compilable?
7759 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7760 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7761 cat >conftest.$ac_ext <<_ACEOF
7762 /* confdefs.h.  */
7763 _ACEOF
7764 cat confdefs.h >>conftest.$ac_ext
7765 cat >>conftest.$ac_ext <<_ACEOF
7766 /* end confdefs.h.  */
7767 $ac_includes_default
7768 #include <$ac_header>
7769 _ACEOF
7770 rm -f conftest.$ac_objext
7771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7772   (eval $ac_compile) 2>conftest.er1
7773   ac_status=$?
7774   grep -v '^ *+' conftest.er1 >conftest.err
7775   rm -f conftest.er1
7776   cat conftest.err >&5
7777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778   (exit $ac_status); } &&
7779          { ac_try='test -z "$ac_c_werror_flag"
7780                          || test ! -s conftest.err'
7781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7782   (eval $ac_try) 2>&5
7783   ac_status=$?
7784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7785   (exit $ac_status); }; } &&
7786          { ac_try='test -s conftest.$ac_objext'
7787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7788   (eval $ac_try) 2>&5
7789   ac_status=$?
7790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7791   (exit $ac_status); }; }; then
7792   ac_header_compiler=yes
7793 else
7794   echo "$as_me: failed program was:" >&5
7795 sed 's/^/| /' conftest.$ac_ext >&5
7796
7797 ac_header_compiler=no
7798 fi
7799 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7800 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7801 echo "${ECHO_T}$ac_header_compiler" >&6
7802
7803 # Is the header present?
7804 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7805 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7806 cat >conftest.$ac_ext <<_ACEOF
7807 /* confdefs.h.  */
7808 _ACEOF
7809 cat confdefs.h >>conftest.$ac_ext
7810 cat >>conftest.$ac_ext <<_ACEOF
7811 /* end confdefs.h.  */
7812 #include <$ac_header>
7813 _ACEOF
7814 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7815   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7816   ac_status=$?
7817   grep -v '^ *+' conftest.er1 >conftest.err
7818   rm -f conftest.er1
7819   cat conftest.err >&5
7820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7821   (exit $ac_status); } >/dev/null; then
7822   if test -s conftest.err; then
7823     ac_cpp_err=$ac_c_preproc_warn_flag
7824     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7825   else
7826     ac_cpp_err=
7827   fi
7828 else
7829   ac_cpp_err=yes
7830 fi
7831 if test -z "$ac_cpp_err"; then
7832   ac_header_preproc=yes
7833 else
7834   echo "$as_me: failed program was:" >&5
7835 sed 's/^/| /' conftest.$ac_ext >&5
7836
7837   ac_header_preproc=no
7838 fi
7839 rm -f conftest.err conftest.$ac_ext
7840 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7841 echo "${ECHO_T}$ac_header_preproc" >&6
7842
7843 # So?  What about this header?
7844 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7845   yes:no: )
7846     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7847 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7848     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7849 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7850     ac_header_preproc=yes
7851     ;;
7852   no:yes:* )
7853     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7854 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7855     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7856 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7857     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7858 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7859     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7860 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7861     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7862 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7863     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7864 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7865     (
7866       cat <<\_ASBOX
7867 ## ---------------------------------------- ##
7868 ## Report this to pgsql-bugs@postgresql.org ##
7869 ## ---------------------------------------- ##
7870 _ASBOX
7871     ) |
7872       sed "s/^/$as_me: WARNING:     /" >&2
7873     ;;
7874 esac
7875 echo "$as_me:$LINENO: checking for $ac_header" >&5
7876 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7877 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7878   echo $ECHO_N "(cached) $ECHO_C" >&6
7879 else
7880   eval "$as_ac_Header=\$ac_header_preproc"
7881 fi
7882 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7883 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7884
7885 fi
7886 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7887   cat >>confdefs.h <<_ACEOF
7888 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7889 _ACEOF
7890
7891 fi
7892
7893 done
7894
7895
7896 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7897 # netinet/in.h is included first.
7898
7899 for ac_header in netinet/in.h
7900 do
7901 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7902 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7903   echo "$as_me:$LINENO: checking for $ac_header" >&5
7904 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7905 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7906   echo $ECHO_N "(cached) $ECHO_C" >&6
7907 fi
7908 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7909 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7910 else
7911   # Is the header compilable?
7912 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7913 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7914 cat >conftest.$ac_ext <<_ACEOF
7915 /* confdefs.h.  */
7916 _ACEOF
7917 cat confdefs.h >>conftest.$ac_ext
7918 cat >>conftest.$ac_ext <<_ACEOF
7919 /* end confdefs.h.  */
7920 $ac_includes_default
7921 #include <$ac_header>
7922 _ACEOF
7923 rm -f conftest.$ac_objext
7924 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7925   (eval $ac_compile) 2>conftest.er1
7926   ac_status=$?
7927   grep -v '^ *+' conftest.er1 >conftest.err
7928   rm -f conftest.er1
7929   cat conftest.err >&5
7930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931   (exit $ac_status); } &&
7932          { ac_try='test -z "$ac_c_werror_flag"
7933                          || test ! -s conftest.err'
7934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7935   (eval $ac_try) 2>&5
7936   ac_status=$?
7937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938   (exit $ac_status); }; } &&
7939          { ac_try='test -s conftest.$ac_objext'
7940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7941   (eval $ac_try) 2>&5
7942   ac_status=$?
7943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7944   (exit $ac_status); }; }; then
7945   ac_header_compiler=yes
7946 else
7947   echo "$as_me: failed program was:" >&5
7948 sed 's/^/| /' conftest.$ac_ext >&5
7949
7950 ac_header_compiler=no
7951 fi
7952 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7953 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7954 echo "${ECHO_T}$ac_header_compiler" >&6
7955
7956 # Is the header present?
7957 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7958 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7959 cat >conftest.$ac_ext <<_ACEOF
7960 /* confdefs.h.  */
7961 _ACEOF
7962 cat confdefs.h >>conftest.$ac_ext
7963 cat >>conftest.$ac_ext <<_ACEOF
7964 /* end confdefs.h.  */
7965 #include <$ac_header>
7966 _ACEOF
7967 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7968   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7969   ac_status=$?
7970   grep -v '^ *+' conftest.er1 >conftest.err
7971   rm -f conftest.er1
7972   cat conftest.err >&5
7973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974   (exit $ac_status); } >/dev/null; then
7975   if test -s conftest.err; then
7976     ac_cpp_err=$ac_c_preproc_warn_flag
7977     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7978   else
7979     ac_cpp_err=
7980   fi
7981 else
7982   ac_cpp_err=yes
7983 fi
7984 if test -z "$ac_cpp_err"; then
7985   ac_header_preproc=yes
7986 else
7987   echo "$as_me: failed program was:" >&5
7988 sed 's/^/| /' conftest.$ac_ext >&5
7989
7990   ac_header_preproc=no
7991 fi
7992 rm -f conftest.err conftest.$ac_ext
7993 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7994 echo "${ECHO_T}$ac_header_preproc" >&6
7995
7996 # So?  What about this header?
7997 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7998   yes:no: )
7999     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8000 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8001     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8002 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8003     ac_header_preproc=yes
8004     ;;
8005   no:yes:* )
8006     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8007 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8008     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8009 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8010     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8011 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8012     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8013 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8014     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8015 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8016     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8017 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8018     (
8019       cat <<\_ASBOX
8020 ## ---------------------------------------- ##
8021 ## Report this to pgsql-bugs@postgresql.org ##
8022 ## ---------------------------------------- ##
8023 _ASBOX
8024     ) |
8025       sed "s/^/$as_me: WARNING:     /" >&2
8026     ;;
8027 esac
8028 echo "$as_me:$LINENO: checking for $ac_header" >&5
8029 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8030 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8031   echo $ECHO_N "(cached) $ECHO_C" >&6
8032 else
8033   eval "$as_ac_Header=\$ac_header_preproc"
8034 fi
8035 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8036 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8037
8038 fi
8039 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8040   cat >>confdefs.h <<_ACEOF
8041 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8042 _ACEOF
8043
8044 fi
8045
8046 done
8047
8048
8049 for ac_header in netinet/tcp.h
8050 do
8051 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8052 echo "$as_me:$LINENO: checking for $ac_header" >&5
8053 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8054 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8055   echo $ECHO_N "(cached) $ECHO_C" >&6
8056 else
8057   cat >conftest.$ac_ext <<_ACEOF
8058 /* confdefs.h.  */
8059 _ACEOF
8060 cat confdefs.h >>conftest.$ac_ext
8061 cat >>conftest.$ac_ext <<_ACEOF
8062 /* end confdefs.h.  */
8063 $ac_includes_default
8064 #ifdef HAVE_NETINET_IN_H
8065 #include <netinet/in.h>
8066 #endif
8067
8068
8069 #include <$ac_header>
8070 _ACEOF
8071 rm -f conftest.$ac_objext
8072 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8073   (eval $ac_compile) 2>conftest.er1
8074   ac_status=$?
8075   grep -v '^ *+' conftest.er1 >conftest.err
8076   rm -f conftest.er1
8077   cat conftest.err >&5
8078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8079   (exit $ac_status); } &&
8080          { ac_try='test -z "$ac_c_werror_flag"
8081                          || test ! -s conftest.err'
8082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8083   (eval $ac_try) 2>&5
8084   ac_status=$?
8085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086   (exit $ac_status); }; } &&
8087          { ac_try='test -s conftest.$ac_objext'
8088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8089   (eval $ac_try) 2>&5
8090   ac_status=$?
8091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092   (exit $ac_status); }; }; then
8093   eval "$as_ac_Header=yes"
8094 else
8095   echo "$as_me: failed program was:" >&5
8096 sed 's/^/| /' conftest.$ac_ext >&5
8097
8098 eval "$as_ac_Header=no"
8099 fi
8100 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8101 fi
8102 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8103 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8104 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8105   cat >>confdefs.h <<_ACEOF
8106 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8107 _ACEOF
8108
8109 fi
8110
8111 done
8112
8113
8114 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8115
8116 for ac_header in readline/readline.h
8117 do
8118 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8119 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8120   echo "$as_me:$LINENO: checking for $ac_header" >&5
8121 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8122 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8123   echo $ECHO_N "(cached) $ECHO_C" >&6
8124 fi
8125 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8126 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8127 else
8128   # Is the header compilable?
8129 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8130 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8131 cat >conftest.$ac_ext <<_ACEOF
8132 /* confdefs.h.  */
8133 _ACEOF
8134 cat confdefs.h >>conftest.$ac_ext
8135 cat >>conftest.$ac_ext <<_ACEOF
8136 /* end confdefs.h.  */
8137 $ac_includes_default
8138 #include <$ac_header>
8139 _ACEOF
8140 rm -f conftest.$ac_objext
8141 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8142   (eval $ac_compile) 2>conftest.er1
8143   ac_status=$?
8144   grep -v '^ *+' conftest.er1 >conftest.err
8145   rm -f conftest.er1
8146   cat conftest.err >&5
8147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148   (exit $ac_status); } &&
8149          { ac_try='test -z "$ac_c_werror_flag"
8150                          || test ! -s conftest.err'
8151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8152   (eval $ac_try) 2>&5
8153   ac_status=$?
8154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155   (exit $ac_status); }; } &&
8156          { ac_try='test -s conftest.$ac_objext'
8157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8158   (eval $ac_try) 2>&5
8159   ac_status=$?
8160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8161   (exit $ac_status); }; }; then
8162   ac_header_compiler=yes
8163 else
8164   echo "$as_me: failed program was:" >&5
8165 sed 's/^/| /' conftest.$ac_ext >&5
8166
8167 ac_header_compiler=no
8168 fi
8169 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8170 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8171 echo "${ECHO_T}$ac_header_compiler" >&6
8172
8173 # Is the header present?
8174 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8175 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8176 cat >conftest.$ac_ext <<_ACEOF
8177 /* confdefs.h.  */
8178 _ACEOF
8179 cat confdefs.h >>conftest.$ac_ext
8180 cat >>conftest.$ac_ext <<_ACEOF
8181 /* end confdefs.h.  */
8182 #include <$ac_header>
8183 _ACEOF
8184 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8185   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8186   ac_status=$?
8187   grep -v '^ *+' conftest.er1 >conftest.err
8188   rm -f conftest.er1
8189   cat conftest.err >&5
8190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8191   (exit $ac_status); } >/dev/null; then
8192   if test -s conftest.err; then
8193     ac_cpp_err=$ac_c_preproc_warn_flag
8194     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8195   else
8196     ac_cpp_err=
8197   fi
8198 else
8199   ac_cpp_err=yes
8200 fi
8201 if test -z "$ac_cpp_err"; then
8202   ac_header_preproc=yes
8203 else
8204   echo "$as_me: failed program was:" >&5
8205 sed 's/^/| /' conftest.$ac_ext >&5
8206
8207   ac_header_preproc=no
8208 fi
8209 rm -f conftest.err conftest.$ac_ext
8210 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8211 echo "${ECHO_T}$ac_header_preproc" >&6
8212
8213 # So?  What about this header?
8214 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8215   yes:no: )
8216     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8217 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8218     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8219 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8220     ac_header_preproc=yes
8221     ;;
8222   no:yes:* )
8223     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8224 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8225     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8226 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8227     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8228 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8229     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8230 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8231     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8232 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8233     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8234 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8235     (
8236       cat <<\_ASBOX
8237 ## ---------------------------------------- ##
8238 ## Report this to pgsql-bugs@postgresql.org ##
8239 ## ---------------------------------------- ##
8240 _ASBOX
8241     ) |
8242       sed "s/^/$as_me: WARNING:     /" >&2
8243     ;;
8244 esac
8245 echo "$as_me:$LINENO: checking for $ac_header" >&5
8246 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8247 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8248   echo $ECHO_N "(cached) $ECHO_C" >&6
8249 else
8250   eval "$as_ac_Header=\$ac_header_preproc"
8251 fi
8252 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8253 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8254
8255 fi
8256 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8257   cat >>confdefs.h <<_ACEOF
8258 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8259 _ACEOF
8260
8261 else
8262
8263 for ac_header in readline.h
8264 do
8265 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8266 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8267   echo "$as_me:$LINENO: checking for $ac_header" >&5
8268 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8269 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8270   echo $ECHO_N "(cached) $ECHO_C" >&6
8271 fi
8272 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8273 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8274 else
8275   # Is the header compilable?
8276 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8277 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8278 cat >conftest.$ac_ext <<_ACEOF
8279 /* confdefs.h.  */
8280 _ACEOF
8281 cat confdefs.h >>conftest.$ac_ext
8282 cat >>conftest.$ac_ext <<_ACEOF
8283 /* end confdefs.h.  */
8284 $ac_includes_default
8285 #include <$ac_header>
8286 _ACEOF
8287 rm -f conftest.$ac_objext
8288 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8289   (eval $ac_compile) 2>conftest.er1
8290   ac_status=$?
8291   grep -v '^ *+' conftest.er1 >conftest.err
8292   rm -f conftest.er1
8293   cat conftest.err >&5
8294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8295   (exit $ac_status); } &&
8296          { ac_try='test -z "$ac_c_werror_flag"
8297                          || test ! -s conftest.err'
8298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8299   (eval $ac_try) 2>&5
8300   ac_status=$?
8301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302   (exit $ac_status); }; } &&
8303          { ac_try='test -s conftest.$ac_objext'
8304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8305   (eval $ac_try) 2>&5
8306   ac_status=$?
8307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308   (exit $ac_status); }; }; then
8309   ac_header_compiler=yes
8310 else
8311   echo "$as_me: failed program was:" >&5
8312 sed 's/^/| /' conftest.$ac_ext >&5
8313
8314 ac_header_compiler=no
8315 fi
8316 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8317 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8318 echo "${ECHO_T}$ac_header_compiler" >&6
8319
8320 # Is the header present?
8321 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8322 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8323 cat >conftest.$ac_ext <<_ACEOF
8324 /* confdefs.h.  */
8325 _ACEOF
8326 cat confdefs.h >>conftest.$ac_ext
8327 cat >>conftest.$ac_ext <<_ACEOF
8328 /* end confdefs.h.  */
8329 #include <$ac_header>
8330 _ACEOF
8331 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8332   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8333   ac_status=$?
8334   grep -v '^ *+' conftest.er1 >conftest.err
8335   rm -f conftest.er1
8336   cat conftest.err >&5
8337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8338   (exit $ac_status); } >/dev/null; then
8339   if test -s conftest.err; then
8340     ac_cpp_err=$ac_c_preproc_warn_flag
8341     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8342   else
8343     ac_cpp_err=
8344   fi
8345 else
8346   ac_cpp_err=yes
8347 fi
8348 if test -z "$ac_cpp_err"; then
8349   ac_header_preproc=yes
8350 else
8351   echo "$as_me: failed program was:" >&5
8352 sed 's/^/| /' conftest.$ac_ext >&5
8353
8354   ac_header_preproc=no
8355 fi
8356 rm -f conftest.err conftest.$ac_ext
8357 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8358 echo "${ECHO_T}$ac_header_preproc" >&6
8359
8360 # So?  What about this header?
8361 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8362   yes:no: )
8363     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8364 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8365     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8366 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8367     ac_header_preproc=yes
8368     ;;
8369   no:yes:* )
8370     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8371 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8372     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8373 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8374     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8375 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8376     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8377 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8378     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8379 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8380     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8381 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8382     (
8383       cat <<\_ASBOX
8384 ## ---------------------------------------- ##
8385 ## Report this to pgsql-bugs@postgresql.org ##
8386 ## ---------------------------------------- ##
8387 _ASBOX
8388     ) |
8389       sed "s/^/$as_me: WARNING:     /" >&2
8390     ;;
8391 esac
8392 echo "$as_me:$LINENO: checking for $ac_header" >&5
8393 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8394 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8395   echo $ECHO_N "(cached) $ECHO_C" >&6
8396 else
8397   eval "$as_ac_Header=\$ac_header_preproc"
8398 fi
8399 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8400 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8401
8402 fi
8403 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8404   cat >>confdefs.h <<_ACEOF
8405 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8406 _ACEOF
8407
8408 else
8409   { { echo "$as_me:$LINENO: error: readline header not found
8410 If you have readline already installed, see config.log for details on the
8411 failure.  It is possible the compiler isn't looking in the proper directory.
8412 Use --without-readline to disable readline support." >&5
8413 echo "$as_me: error: readline header not found
8414 If you have readline already installed, see config.log for details on the
8415 failure.  It is possible the compiler isn't looking in the proper directory.
8416 Use --without-readline to disable readline support." >&2;}
8417    { (exit 1); exit 1; }; }
8418 fi
8419
8420 done
8421
8422 fi
8423
8424 done
8425
8426
8427 for ac_header in readline/history.h
8428 do
8429 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8430 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8431   echo "$as_me:$LINENO: checking for $ac_header" >&5
8432 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8433 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8434   echo $ECHO_N "(cached) $ECHO_C" >&6
8435 fi
8436 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8437 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8438 else
8439   # Is the header compilable?
8440 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8441 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8442 cat >conftest.$ac_ext <<_ACEOF
8443 /* confdefs.h.  */
8444 _ACEOF
8445 cat confdefs.h >>conftest.$ac_ext
8446 cat >>conftest.$ac_ext <<_ACEOF
8447 /* end confdefs.h.  */
8448 $ac_includes_default
8449 #include <$ac_header>
8450 _ACEOF
8451 rm -f conftest.$ac_objext
8452 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8453   (eval $ac_compile) 2>conftest.er1
8454   ac_status=$?
8455   grep -v '^ *+' conftest.er1 >conftest.err
8456   rm -f conftest.er1
8457   cat conftest.err >&5
8458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459   (exit $ac_status); } &&
8460          { ac_try='test -z "$ac_c_werror_flag"
8461                          || test ! -s conftest.err'
8462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8463   (eval $ac_try) 2>&5
8464   ac_status=$?
8465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466   (exit $ac_status); }; } &&
8467          { ac_try='test -s conftest.$ac_objext'
8468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8469   (eval $ac_try) 2>&5
8470   ac_status=$?
8471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8472   (exit $ac_status); }; }; then
8473   ac_header_compiler=yes
8474 else
8475   echo "$as_me: failed program was:" >&5
8476 sed 's/^/| /' conftest.$ac_ext >&5
8477
8478 ac_header_compiler=no
8479 fi
8480 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8481 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8482 echo "${ECHO_T}$ac_header_compiler" >&6
8483
8484 # Is the header present?
8485 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8486 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8487 cat >conftest.$ac_ext <<_ACEOF
8488 /* confdefs.h.  */
8489 _ACEOF
8490 cat confdefs.h >>conftest.$ac_ext
8491 cat >>conftest.$ac_ext <<_ACEOF
8492 /* end confdefs.h.  */
8493 #include <$ac_header>
8494 _ACEOF
8495 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8497   ac_status=$?
8498   grep -v '^ *+' conftest.er1 >conftest.err
8499   rm -f conftest.er1
8500   cat conftest.err >&5
8501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8502   (exit $ac_status); } >/dev/null; then
8503   if test -s conftest.err; then
8504     ac_cpp_err=$ac_c_preproc_warn_flag
8505     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8506   else
8507     ac_cpp_err=
8508   fi
8509 else
8510   ac_cpp_err=yes
8511 fi
8512 if test -z "$ac_cpp_err"; then
8513   ac_header_preproc=yes
8514 else
8515   echo "$as_me: failed program was:" >&5
8516 sed 's/^/| /' conftest.$ac_ext >&5
8517
8518   ac_header_preproc=no
8519 fi
8520 rm -f conftest.err conftest.$ac_ext
8521 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8522 echo "${ECHO_T}$ac_header_preproc" >&6
8523
8524 # So?  What about this header?
8525 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8526   yes:no: )
8527     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8528 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8529     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8530 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8531     ac_header_preproc=yes
8532     ;;
8533   no:yes:* )
8534     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8535 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8536     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8537 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8538     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8539 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8540     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8541 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8542     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8543 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8544     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8545 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8546     (
8547       cat <<\_ASBOX
8548 ## ---------------------------------------- ##
8549 ## Report this to pgsql-bugs@postgresql.org ##
8550 ## ---------------------------------------- ##
8551 _ASBOX
8552     ) |
8553       sed "s/^/$as_me: WARNING:     /" >&2
8554     ;;
8555 esac
8556 echo "$as_me:$LINENO: checking for $ac_header" >&5
8557 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8558 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8559   echo $ECHO_N "(cached) $ECHO_C" >&6
8560 else
8561   eval "$as_ac_Header=\$ac_header_preproc"
8562 fi
8563 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8564 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8565
8566 fi
8567 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8568   cat >>confdefs.h <<_ACEOF
8569 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8570 _ACEOF
8571
8572 else
8573
8574 for ac_header in history.h
8575 do
8576 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8577 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8578   echo "$as_me:$LINENO: checking for $ac_header" >&5
8579 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8580 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8581   echo $ECHO_N "(cached) $ECHO_C" >&6
8582 fi
8583 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8584 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8585 else
8586   # Is the header compilable?
8587 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8588 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8589 cat >conftest.$ac_ext <<_ACEOF
8590 /* confdefs.h.  */
8591 _ACEOF
8592 cat confdefs.h >>conftest.$ac_ext
8593 cat >>conftest.$ac_ext <<_ACEOF
8594 /* end confdefs.h.  */
8595 $ac_includes_default
8596 #include <$ac_header>
8597 _ACEOF
8598 rm -f conftest.$ac_objext
8599 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8600   (eval $ac_compile) 2>conftest.er1
8601   ac_status=$?
8602   grep -v '^ *+' conftest.er1 >conftest.err
8603   rm -f conftest.er1
8604   cat conftest.err >&5
8605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8606   (exit $ac_status); } &&
8607          { ac_try='test -z "$ac_c_werror_flag"
8608                          || test ! -s conftest.err'
8609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8610   (eval $ac_try) 2>&5
8611   ac_status=$?
8612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8613   (exit $ac_status); }; } &&
8614          { ac_try='test -s conftest.$ac_objext'
8615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8616   (eval $ac_try) 2>&5
8617   ac_status=$?
8618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619   (exit $ac_status); }; }; then
8620   ac_header_compiler=yes
8621 else
8622   echo "$as_me: failed program was:" >&5
8623 sed 's/^/| /' conftest.$ac_ext >&5
8624
8625 ac_header_compiler=no
8626 fi
8627 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8628 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8629 echo "${ECHO_T}$ac_header_compiler" >&6
8630
8631 # Is the header present?
8632 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8633 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8634 cat >conftest.$ac_ext <<_ACEOF
8635 /* confdefs.h.  */
8636 _ACEOF
8637 cat confdefs.h >>conftest.$ac_ext
8638 cat >>conftest.$ac_ext <<_ACEOF
8639 /* end confdefs.h.  */
8640 #include <$ac_header>
8641 _ACEOF
8642 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8643   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8644   ac_status=$?
8645   grep -v '^ *+' conftest.er1 >conftest.err
8646   rm -f conftest.er1
8647   cat conftest.err >&5
8648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8649   (exit $ac_status); } >/dev/null; then
8650   if test -s conftest.err; then
8651     ac_cpp_err=$ac_c_preproc_warn_flag
8652     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8653   else
8654     ac_cpp_err=
8655   fi
8656 else
8657   ac_cpp_err=yes
8658 fi
8659 if test -z "$ac_cpp_err"; then
8660   ac_header_preproc=yes
8661 else
8662   echo "$as_me: failed program was:" >&5
8663 sed 's/^/| /' conftest.$ac_ext >&5
8664
8665   ac_header_preproc=no
8666 fi
8667 rm -f conftest.err conftest.$ac_ext
8668 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8669 echo "${ECHO_T}$ac_header_preproc" >&6
8670
8671 # So?  What about this header?
8672 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8673   yes:no: )
8674     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8675 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8676     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8677 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8678     ac_header_preproc=yes
8679     ;;
8680   no:yes:* )
8681     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8682 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8683     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8684 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8685     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8686 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8687     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8688 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8689     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8690 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8691     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8692 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8693     (
8694       cat <<\_ASBOX
8695 ## ---------------------------------------- ##
8696 ## Report this to pgsql-bugs@postgresql.org ##
8697 ## ---------------------------------------- ##
8698 _ASBOX
8699     ) |
8700       sed "s/^/$as_me: WARNING:     /" >&2
8701     ;;
8702 esac
8703 echo "$as_me:$LINENO: checking for $ac_header" >&5
8704 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8705 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8706   echo $ECHO_N "(cached) $ECHO_C" >&6
8707 else
8708   eval "$as_ac_Header=\$ac_header_preproc"
8709 fi
8710 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8711 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8712
8713 fi
8714 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8715   cat >>confdefs.h <<_ACEOF
8716 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8717 _ACEOF
8718
8719 else
8720   { { echo "$as_me:$LINENO: error: history header not found
8721 If you have readline already installed, see config.log for details on the
8722 failure.  It is possible the compiler isn't looking in the proper directory.
8723 Use --without-readline to disable readline support." >&5
8724 echo "$as_me: error: history header not found
8725 If you have readline already installed, see config.log for details on the
8726 failure.  It is possible the compiler isn't looking in the proper directory.
8727 Use --without-readline to disable readline support." >&2;}
8728    { (exit 1); exit 1; }; }
8729 fi
8730
8731 done
8732
8733 fi
8734
8735 done
8736
8737 fi
8738
8739 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8740 # Some installations of libedit usurp /usr/include/readline/, which seems
8741 # bad practice, since in combined installations readline will have its headers
8742 # there.  We might have to resort to AC_EGREP checks to make sure we found
8743 # the proper header...
8744
8745 for ac_header in editline/readline.h
8746 do
8747 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8748 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8749   echo "$as_me:$LINENO: checking for $ac_header" >&5
8750 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8751 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8752   echo $ECHO_N "(cached) $ECHO_C" >&6
8753 fi
8754 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8755 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8756 else
8757   # Is the header compilable?
8758 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8759 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8760 cat >conftest.$ac_ext <<_ACEOF
8761 /* confdefs.h.  */
8762 _ACEOF
8763 cat confdefs.h >>conftest.$ac_ext
8764 cat >>conftest.$ac_ext <<_ACEOF
8765 /* end confdefs.h.  */
8766 $ac_includes_default
8767 #include <$ac_header>
8768 _ACEOF
8769 rm -f conftest.$ac_objext
8770 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8771   (eval $ac_compile) 2>conftest.er1
8772   ac_status=$?
8773   grep -v '^ *+' conftest.er1 >conftest.err
8774   rm -f conftest.er1
8775   cat conftest.err >&5
8776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8777   (exit $ac_status); } &&
8778          { ac_try='test -z "$ac_c_werror_flag"
8779                          || test ! -s conftest.err'
8780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8781   (eval $ac_try) 2>&5
8782   ac_status=$?
8783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8784   (exit $ac_status); }; } &&
8785          { ac_try='test -s conftest.$ac_objext'
8786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8787   (eval $ac_try) 2>&5
8788   ac_status=$?
8789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8790   (exit $ac_status); }; }; then
8791   ac_header_compiler=yes
8792 else
8793   echo "$as_me: failed program was:" >&5
8794 sed 's/^/| /' conftest.$ac_ext >&5
8795
8796 ac_header_compiler=no
8797 fi
8798 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8800 echo "${ECHO_T}$ac_header_compiler" >&6
8801
8802 # Is the header present?
8803 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8804 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8805 cat >conftest.$ac_ext <<_ACEOF
8806 /* confdefs.h.  */
8807 _ACEOF
8808 cat confdefs.h >>conftest.$ac_ext
8809 cat >>conftest.$ac_ext <<_ACEOF
8810 /* end confdefs.h.  */
8811 #include <$ac_header>
8812 _ACEOF
8813 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8814   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8815   ac_status=$?
8816   grep -v '^ *+' conftest.er1 >conftest.err
8817   rm -f conftest.er1
8818   cat conftest.err >&5
8819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8820   (exit $ac_status); } >/dev/null; then
8821   if test -s conftest.err; then
8822     ac_cpp_err=$ac_c_preproc_warn_flag
8823     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8824   else
8825     ac_cpp_err=
8826   fi
8827 else
8828   ac_cpp_err=yes
8829 fi
8830 if test -z "$ac_cpp_err"; then
8831   ac_header_preproc=yes
8832 else
8833   echo "$as_me: failed program was:" >&5
8834 sed 's/^/| /' conftest.$ac_ext >&5
8835
8836   ac_header_preproc=no
8837 fi
8838 rm -f conftest.err conftest.$ac_ext
8839 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8840 echo "${ECHO_T}$ac_header_preproc" >&6
8841
8842 # So?  What about this header?
8843 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8844   yes:no: )
8845     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8846 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8847     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8848 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8849     ac_header_preproc=yes
8850     ;;
8851   no:yes:* )
8852     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8853 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8854     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8855 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8856     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8857 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8858     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8859 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8860     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8861 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8862     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8863 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8864     (
8865       cat <<\_ASBOX
8866 ## ---------------------------------------- ##
8867 ## Report this to pgsql-bugs@postgresql.org ##
8868 ## ---------------------------------------- ##
8869 _ASBOX
8870     ) |
8871       sed "s/^/$as_me: WARNING:     /" >&2
8872     ;;
8873 esac
8874 echo "$as_me:$LINENO: checking for $ac_header" >&5
8875 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8876 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8877   echo $ECHO_N "(cached) $ECHO_C" >&6
8878 else
8879   eval "$as_ac_Header=\$ac_header_preproc"
8880 fi
8881 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8882 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8883
8884 fi
8885 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8886   cat >>confdefs.h <<_ACEOF
8887 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8888 _ACEOF
8889
8890 else
8891
8892 for ac_header in readline.h
8893 do
8894 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8895 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8896   echo "$as_me:$LINENO: checking for $ac_header" >&5
8897 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8898 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8899   echo $ECHO_N "(cached) $ECHO_C" >&6
8900 fi
8901 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8902 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8903 else
8904   # Is the header compilable?
8905 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8906 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8907 cat >conftest.$ac_ext <<_ACEOF
8908 /* confdefs.h.  */
8909 _ACEOF
8910 cat confdefs.h >>conftest.$ac_ext
8911 cat >>conftest.$ac_ext <<_ACEOF
8912 /* end confdefs.h.  */
8913 $ac_includes_default
8914 #include <$ac_header>
8915 _ACEOF
8916 rm -f conftest.$ac_objext
8917 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8918   (eval $ac_compile) 2>conftest.er1
8919   ac_status=$?
8920   grep -v '^ *+' conftest.er1 >conftest.err
8921   rm -f conftest.er1
8922   cat conftest.err >&5
8923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924   (exit $ac_status); } &&
8925          { ac_try='test -z "$ac_c_werror_flag"
8926                          || test ! -s conftest.err'
8927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8928   (eval $ac_try) 2>&5
8929   ac_status=$?
8930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931   (exit $ac_status); }; } &&
8932          { ac_try='test -s conftest.$ac_objext'
8933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8934   (eval $ac_try) 2>&5
8935   ac_status=$?
8936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8937   (exit $ac_status); }; }; then
8938   ac_header_compiler=yes
8939 else
8940   echo "$as_me: failed program was:" >&5
8941 sed 's/^/| /' conftest.$ac_ext >&5
8942
8943 ac_header_compiler=no
8944 fi
8945 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8946 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8947 echo "${ECHO_T}$ac_header_compiler" >&6
8948
8949 # Is the header present?
8950 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8951 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8952 cat >conftest.$ac_ext <<_ACEOF
8953 /* confdefs.h.  */
8954 _ACEOF
8955 cat confdefs.h >>conftest.$ac_ext
8956 cat >>conftest.$ac_ext <<_ACEOF
8957 /* end confdefs.h.  */
8958 #include <$ac_header>
8959 _ACEOF
8960 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8961   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8962   ac_status=$?
8963   grep -v '^ *+' conftest.er1 >conftest.err
8964   rm -f conftest.er1
8965   cat conftest.err >&5
8966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967   (exit $ac_status); } >/dev/null; then
8968   if test -s conftest.err; then
8969     ac_cpp_err=$ac_c_preproc_warn_flag
8970     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8971   else
8972     ac_cpp_err=
8973   fi
8974 else
8975   ac_cpp_err=yes
8976 fi
8977 if test -z "$ac_cpp_err"; then
8978   ac_header_preproc=yes
8979 else
8980   echo "$as_me: failed program was:" >&5
8981 sed 's/^/| /' conftest.$ac_ext >&5
8982
8983   ac_header_preproc=no
8984 fi
8985 rm -f conftest.err conftest.$ac_ext
8986 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8987 echo "${ECHO_T}$ac_header_preproc" >&6
8988
8989 # So?  What about this header?
8990 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8991   yes:no: )
8992     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8993 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8994     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8995 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8996     ac_header_preproc=yes
8997     ;;
8998   no:yes:* )
8999     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9000 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9001     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9002 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9003     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9004 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9005     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9006 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9007     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9008 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9009     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9010 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9011     (
9012       cat <<\_ASBOX
9013 ## ---------------------------------------- ##
9014 ## Report this to pgsql-bugs@postgresql.org ##
9015 ## ---------------------------------------- ##
9016 _ASBOX
9017     ) |
9018       sed "s/^/$as_me: WARNING:     /" >&2
9019     ;;
9020 esac
9021 echo "$as_me:$LINENO: checking for $ac_header" >&5
9022 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9023 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9024   echo $ECHO_N "(cached) $ECHO_C" >&6
9025 else
9026   eval "$as_ac_Header=\$ac_header_preproc"
9027 fi
9028 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9029 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9030
9031 fi
9032 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9033   cat >>confdefs.h <<_ACEOF
9034 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9035 _ACEOF
9036
9037 else
9038
9039 for ac_header in readline/readline.h
9040 do
9041 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9042 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9043   echo "$as_me:$LINENO: checking for $ac_header" >&5
9044 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9045 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9046   echo $ECHO_N "(cached) $ECHO_C" >&6
9047 fi
9048 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9049 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9050 else
9051   # Is the header compilable?
9052 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9053 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9054 cat >conftest.$ac_ext <<_ACEOF
9055 /* confdefs.h.  */
9056 _ACEOF
9057 cat confdefs.h >>conftest.$ac_ext
9058 cat >>conftest.$ac_ext <<_ACEOF
9059 /* end confdefs.h.  */
9060 $ac_includes_default
9061 #include <$ac_header>
9062 _ACEOF
9063 rm -f conftest.$ac_objext
9064 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9065   (eval $ac_compile) 2>conftest.er1
9066   ac_status=$?
9067   grep -v '^ *+' conftest.er1 >conftest.err
9068   rm -f conftest.er1
9069   cat conftest.err >&5
9070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9071   (exit $ac_status); } &&
9072          { ac_try='test -z "$ac_c_werror_flag"
9073                          || test ! -s conftest.err'
9074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9075   (eval $ac_try) 2>&5
9076   ac_status=$?
9077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078   (exit $ac_status); }; } &&
9079          { ac_try='test -s conftest.$ac_objext'
9080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9081   (eval $ac_try) 2>&5
9082   ac_status=$?
9083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084   (exit $ac_status); }; }; then
9085   ac_header_compiler=yes
9086 else
9087   echo "$as_me: failed program was:" >&5
9088 sed 's/^/| /' conftest.$ac_ext >&5
9089
9090 ac_header_compiler=no
9091 fi
9092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9093 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9094 echo "${ECHO_T}$ac_header_compiler" >&6
9095
9096 # Is the header present?
9097 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9098 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9099 cat >conftest.$ac_ext <<_ACEOF
9100 /* confdefs.h.  */
9101 _ACEOF
9102 cat confdefs.h >>conftest.$ac_ext
9103 cat >>conftest.$ac_ext <<_ACEOF
9104 /* end confdefs.h.  */
9105 #include <$ac_header>
9106 _ACEOF
9107 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9108   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9109   ac_status=$?
9110   grep -v '^ *+' conftest.er1 >conftest.err
9111   rm -f conftest.er1
9112   cat conftest.err >&5
9113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9114   (exit $ac_status); } >/dev/null; then
9115   if test -s conftest.err; then
9116     ac_cpp_err=$ac_c_preproc_warn_flag
9117     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9118   else
9119     ac_cpp_err=
9120   fi
9121 else
9122   ac_cpp_err=yes
9123 fi
9124 if test -z "$ac_cpp_err"; then
9125   ac_header_preproc=yes
9126 else
9127   echo "$as_me: failed program was:" >&5
9128 sed 's/^/| /' conftest.$ac_ext >&5
9129
9130   ac_header_preproc=no
9131 fi
9132 rm -f conftest.err conftest.$ac_ext
9133 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9134 echo "${ECHO_T}$ac_header_preproc" >&6
9135
9136 # So?  What about this header?
9137 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9138   yes:no: )
9139     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9140 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9141     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9142 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9143     ac_header_preproc=yes
9144     ;;
9145   no:yes:* )
9146     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9147 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9148     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9149 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9150     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9151 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9152     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9153 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9154     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9155 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9156     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9157 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9158     (
9159       cat <<\_ASBOX
9160 ## ---------------------------------------- ##
9161 ## Report this to pgsql-bugs@postgresql.org ##
9162 ## ---------------------------------------- ##
9163 _ASBOX
9164     ) |
9165       sed "s/^/$as_me: WARNING:     /" >&2
9166     ;;
9167 esac
9168 echo "$as_me:$LINENO: checking for $ac_header" >&5
9169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9171   echo $ECHO_N "(cached) $ECHO_C" >&6
9172 else
9173   eval "$as_ac_Header=\$ac_header_preproc"
9174 fi
9175 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9176 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9177
9178 fi
9179 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9180   cat >>confdefs.h <<_ACEOF
9181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9182 _ACEOF
9183
9184 else
9185   { { echo "$as_me:$LINENO: error: readline header not found
9186 If you have libedit already installed, see config.log for details on the
9187 failure.  It is possible the compiler isn't looking in the proper directory.
9188 Use --without-readline to disable libedit support." >&5
9189 echo "$as_me: error: readline header not found
9190 If you have libedit already installed, see config.log for details on the
9191 failure.  It is possible the compiler isn't looking in the proper directory.
9192 Use --without-readline to disable libedit support." >&2;}
9193    { (exit 1); exit 1; }; }
9194 fi
9195
9196 done
9197
9198 fi
9199
9200 done
9201
9202 fi
9203
9204 done
9205
9206
9207 for ac_header in editline/history.h
9208 do
9209 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9210 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9211   echo "$as_me:$LINENO: checking for $ac_header" >&5
9212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9214   echo $ECHO_N "(cached) $ECHO_C" >&6
9215 fi
9216 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9217 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9218 else
9219   # Is the header compilable?
9220 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9221 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9222 cat >conftest.$ac_ext <<_ACEOF
9223 /* confdefs.h.  */
9224 _ACEOF
9225 cat confdefs.h >>conftest.$ac_ext
9226 cat >>conftest.$ac_ext <<_ACEOF
9227 /* end confdefs.h.  */
9228 $ac_includes_default
9229 #include <$ac_header>
9230 _ACEOF
9231 rm -f conftest.$ac_objext
9232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9233   (eval $ac_compile) 2>conftest.er1
9234   ac_status=$?
9235   grep -v '^ *+' conftest.er1 >conftest.err
9236   rm -f conftest.er1
9237   cat conftest.err >&5
9238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9239   (exit $ac_status); } &&
9240          { ac_try='test -z "$ac_c_werror_flag"
9241                          || test ! -s conftest.err'
9242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9243   (eval $ac_try) 2>&5
9244   ac_status=$?
9245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9246   (exit $ac_status); }; } &&
9247          { ac_try='test -s conftest.$ac_objext'
9248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9249   (eval $ac_try) 2>&5
9250   ac_status=$?
9251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9252   (exit $ac_status); }; }; then
9253   ac_header_compiler=yes
9254 else
9255   echo "$as_me: failed program was:" >&5
9256 sed 's/^/| /' conftest.$ac_ext >&5
9257
9258 ac_header_compiler=no
9259 fi
9260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9261 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9262 echo "${ECHO_T}$ac_header_compiler" >&6
9263
9264 # Is the header present?
9265 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9266 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9267 cat >conftest.$ac_ext <<_ACEOF
9268 /* confdefs.h.  */
9269 _ACEOF
9270 cat confdefs.h >>conftest.$ac_ext
9271 cat >>conftest.$ac_ext <<_ACEOF
9272 /* end confdefs.h.  */
9273 #include <$ac_header>
9274 _ACEOF
9275 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9276   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9277   ac_status=$?
9278   grep -v '^ *+' conftest.er1 >conftest.err
9279   rm -f conftest.er1
9280   cat conftest.err >&5
9281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9282   (exit $ac_status); } >/dev/null; then
9283   if test -s conftest.err; then
9284     ac_cpp_err=$ac_c_preproc_warn_flag
9285     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9286   else
9287     ac_cpp_err=
9288   fi
9289 else
9290   ac_cpp_err=yes
9291 fi
9292 if test -z "$ac_cpp_err"; then
9293   ac_header_preproc=yes
9294 else
9295   echo "$as_me: failed program was:" >&5
9296 sed 's/^/| /' conftest.$ac_ext >&5
9297
9298   ac_header_preproc=no
9299 fi
9300 rm -f conftest.err conftest.$ac_ext
9301 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9302 echo "${ECHO_T}$ac_header_preproc" >&6
9303
9304 # So?  What about this header?
9305 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9306   yes:no: )
9307     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9308 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9309     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9310 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9311     ac_header_preproc=yes
9312     ;;
9313   no:yes:* )
9314     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9315 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9316     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9317 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9318     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9319 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9320     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9321 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9322     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9323 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9324     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9325 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9326     (
9327       cat <<\_ASBOX
9328 ## ---------------------------------------- ##
9329 ## Report this to pgsql-bugs@postgresql.org ##
9330 ## ---------------------------------------- ##
9331 _ASBOX
9332     ) |
9333       sed "s/^/$as_me: WARNING:     /" >&2
9334     ;;
9335 esac
9336 echo "$as_me:$LINENO: checking for $ac_header" >&5
9337 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9338 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9339   echo $ECHO_N "(cached) $ECHO_C" >&6
9340 else
9341   eval "$as_ac_Header=\$ac_header_preproc"
9342 fi
9343 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9344 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9345
9346 fi
9347 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9348   cat >>confdefs.h <<_ACEOF
9349 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9350 _ACEOF
9351
9352 else
9353
9354 for ac_header in history.h
9355 do
9356 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9357 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9358   echo "$as_me:$LINENO: checking for $ac_header" >&5
9359 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9360 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9361   echo $ECHO_N "(cached) $ECHO_C" >&6
9362 fi
9363 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9364 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9365 else
9366   # Is the header compilable?
9367 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9368 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9369 cat >conftest.$ac_ext <<_ACEOF
9370 /* confdefs.h.  */
9371 _ACEOF
9372 cat confdefs.h >>conftest.$ac_ext
9373 cat >>conftest.$ac_ext <<_ACEOF
9374 /* end confdefs.h.  */
9375 $ac_includes_default
9376 #include <$ac_header>
9377 _ACEOF
9378 rm -f conftest.$ac_objext
9379 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9380   (eval $ac_compile) 2>conftest.er1
9381   ac_status=$?
9382   grep -v '^ *+' conftest.er1 >conftest.err
9383   rm -f conftest.er1
9384   cat conftest.err >&5
9385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9386   (exit $ac_status); } &&
9387          { ac_try='test -z "$ac_c_werror_flag"
9388                          || test ! -s conftest.err'
9389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9390   (eval $ac_try) 2>&5
9391   ac_status=$?
9392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9393   (exit $ac_status); }; } &&
9394          { ac_try='test -s conftest.$ac_objext'
9395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9396   (eval $ac_try) 2>&5
9397   ac_status=$?
9398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399   (exit $ac_status); }; }; then
9400   ac_header_compiler=yes
9401 else
9402   echo "$as_me: failed program was:" >&5
9403 sed 's/^/| /' conftest.$ac_ext >&5
9404
9405 ac_header_compiler=no
9406 fi
9407 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9408 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9409 echo "${ECHO_T}$ac_header_compiler" >&6
9410
9411 # Is the header present?
9412 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9413 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9414 cat >conftest.$ac_ext <<_ACEOF
9415 /* confdefs.h.  */
9416 _ACEOF
9417 cat confdefs.h >>conftest.$ac_ext
9418 cat >>conftest.$ac_ext <<_ACEOF
9419 /* end confdefs.h.  */
9420 #include <$ac_header>
9421 _ACEOF
9422 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9423   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9424   ac_status=$?
9425   grep -v '^ *+' conftest.er1 >conftest.err
9426   rm -f conftest.er1
9427   cat conftest.err >&5
9428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9429   (exit $ac_status); } >/dev/null; then
9430   if test -s conftest.err; then
9431     ac_cpp_err=$ac_c_preproc_warn_flag
9432     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9433   else
9434     ac_cpp_err=
9435   fi
9436 else
9437   ac_cpp_err=yes
9438 fi
9439 if test -z "$ac_cpp_err"; then
9440   ac_header_preproc=yes
9441 else
9442   echo "$as_me: failed program was:" >&5
9443 sed 's/^/| /' conftest.$ac_ext >&5
9444
9445   ac_header_preproc=no
9446 fi
9447 rm -f conftest.err conftest.$ac_ext
9448 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9449 echo "${ECHO_T}$ac_header_preproc" >&6
9450
9451 # So?  What about this header?
9452 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9453   yes:no: )
9454     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9455 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9456     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9457 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9458     ac_header_preproc=yes
9459     ;;
9460   no:yes:* )
9461     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9462 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9463     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9464 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9465     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9466 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9467     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9468 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9469     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9470 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9471     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9472 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9473     (
9474       cat <<\_ASBOX
9475 ## ---------------------------------------- ##
9476 ## Report this to pgsql-bugs@postgresql.org ##
9477 ## ---------------------------------------- ##
9478 _ASBOX
9479     ) |
9480       sed "s/^/$as_me: WARNING:     /" >&2
9481     ;;
9482 esac
9483 echo "$as_me:$LINENO: checking for $ac_header" >&5
9484 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9485 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9486   echo $ECHO_N "(cached) $ECHO_C" >&6
9487 else
9488   eval "$as_ac_Header=\$ac_header_preproc"
9489 fi
9490 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9491 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9492
9493 fi
9494 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9495   cat >>confdefs.h <<_ACEOF
9496 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9497 _ACEOF
9498
9499 else
9500
9501 for ac_header in readline/history.h
9502 do
9503 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9504 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9505   echo "$as_me:$LINENO: checking for $ac_header" >&5
9506 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9507 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9508   echo $ECHO_N "(cached) $ECHO_C" >&6
9509 fi
9510 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9511 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9512 else
9513   # Is the header compilable?
9514 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9515 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9516 cat >conftest.$ac_ext <<_ACEOF
9517 /* confdefs.h.  */
9518 _ACEOF
9519 cat confdefs.h >>conftest.$ac_ext
9520 cat >>conftest.$ac_ext <<_ACEOF
9521 /* end confdefs.h.  */
9522 $ac_includes_default
9523 #include <$ac_header>
9524 _ACEOF
9525 rm -f conftest.$ac_objext
9526 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9527   (eval $ac_compile) 2>conftest.er1
9528   ac_status=$?
9529   grep -v '^ *+' conftest.er1 >conftest.err
9530   rm -f conftest.er1
9531   cat conftest.err >&5
9532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533   (exit $ac_status); } &&
9534          { ac_try='test -z "$ac_c_werror_flag"
9535                          || test ! -s conftest.err'
9536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9537   (eval $ac_try) 2>&5
9538   ac_status=$?
9539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9540   (exit $ac_status); }; } &&
9541          { ac_try='test -s conftest.$ac_objext'
9542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9543   (eval $ac_try) 2>&5
9544   ac_status=$?
9545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9546   (exit $ac_status); }; }; then
9547   ac_header_compiler=yes
9548 else
9549   echo "$as_me: failed program was:" >&5
9550 sed 's/^/| /' conftest.$ac_ext >&5
9551
9552 ac_header_compiler=no
9553 fi
9554 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9555 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9556 echo "${ECHO_T}$ac_header_compiler" >&6
9557
9558 # Is the header present?
9559 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9560 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9561 cat >conftest.$ac_ext <<_ACEOF
9562 /* confdefs.h.  */
9563 _ACEOF
9564 cat confdefs.h >>conftest.$ac_ext
9565 cat >>conftest.$ac_ext <<_ACEOF
9566 /* end confdefs.h.  */
9567 #include <$ac_header>
9568 _ACEOF
9569 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9570   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9571   ac_status=$?
9572   grep -v '^ *+' conftest.er1 >conftest.err
9573   rm -f conftest.er1
9574   cat conftest.err >&5
9575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9576   (exit $ac_status); } >/dev/null; then
9577   if test -s conftest.err; then
9578     ac_cpp_err=$ac_c_preproc_warn_flag
9579     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9580   else
9581     ac_cpp_err=
9582   fi
9583 else
9584   ac_cpp_err=yes
9585 fi
9586 if test -z "$ac_cpp_err"; then
9587   ac_header_preproc=yes
9588 else
9589   echo "$as_me: failed program was:" >&5
9590 sed 's/^/| /' conftest.$ac_ext >&5
9591
9592   ac_header_preproc=no
9593 fi
9594 rm -f conftest.err conftest.$ac_ext
9595 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9596 echo "${ECHO_T}$ac_header_preproc" >&6
9597
9598 # So?  What about this header?
9599 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9600   yes:no: )
9601     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9602 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9603     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9604 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9605     ac_header_preproc=yes
9606     ;;
9607   no:yes:* )
9608     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9609 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9610     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9611 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9612     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9613 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9614     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9615 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9616     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9617 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9618     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9619 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9620     (
9621       cat <<\_ASBOX
9622 ## ---------------------------------------- ##
9623 ## Report this to pgsql-bugs@postgresql.org ##
9624 ## ---------------------------------------- ##
9625 _ASBOX
9626     ) |
9627       sed "s/^/$as_me: WARNING:     /" >&2
9628     ;;
9629 esac
9630 echo "$as_me:$LINENO: checking for $ac_header" >&5
9631 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9632 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9633   echo $ECHO_N "(cached) $ECHO_C" >&6
9634 else
9635   eval "$as_ac_Header=\$ac_header_preproc"
9636 fi
9637 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9638 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9639
9640 fi
9641 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9642   cat >>confdefs.h <<_ACEOF
9643 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9644 _ACEOF
9645
9646 else
9647   { { echo "$as_me:$LINENO: error: history header not found
9648 If you have libedit already installed, see config.log for details on the
9649 failure.  It is possible the compiler isn't looking in the proper directory.
9650 Use --without-readline to disable libedit support." >&5
9651 echo "$as_me: error: history header not found
9652 If you have libedit already installed, see config.log for details on the
9653 failure.  It is possible the compiler isn't looking in the proper directory.
9654 Use --without-readline to disable libedit support." >&2;}
9655    { (exit 1); exit 1; }; }
9656 fi
9657
9658 done
9659
9660 fi
9661
9662 done
9663
9664 fi
9665
9666 done
9667
9668 fi
9669
9670 if test "$with_zlib" = yes; then
9671   if test "${ac_cv_header_zlib_h+set}" = set; then
9672   echo "$as_me:$LINENO: checking for zlib.h" >&5
9673 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9674 if test "${ac_cv_header_zlib_h+set}" = set; then
9675   echo $ECHO_N "(cached) $ECHO_C" >&6
9676 fi
9677 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9678 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9679 else
9680   # Is the header compilable?
9681 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9682 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9683 cat >conftest.$ac_ext <<_ACEOF
9684 /* confdefs.h.  */
9685 _ACEOF
9686 cat confdefs.h >>conftest.$ac_ext
9687 cat >>conftest.$ac_ext <<_ACEOF
9688 /* end confdefs.h.  */
9689 $ac_includes_default
9690 #include <zlib.h>
9691 _ACEOF
9692 rm -f conftest.$ac_objext
9693 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9694   (eval $ac_compile) 2>conftest.er1
9695   ac_status=$?
9696   grep -v '^ *+' conftest.er1 >conftest.err
9697   rm -f conftest.er1
9698   cat conftest.err >&5
9699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9700   (exit $ac_status); } &&
9701          { ac_try='test -z "$ac_c_werror_flag"
9702                          || test ! -s conftest.err'
9703   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9704   (eval $ac_try) 2>&5
9705   ac_status=$?
9706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9707   (exit $ac_status); }; } &&
9708          { ac_try='test -s conftest.$ac_objext'
9709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9710   (eval $ac_try) 2>&5
9711   ac_status=$?
9712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713   (exit $ac_status); }; }; then
9714   ac_header_compiler=yes
9715 else
9716   echo "$as_me: failed program was:" >&5
9717 sed 's/^/| /' conftest.$ac_ext >&5
9718
9719 ac_header_compiler=no
9720 fi
9721 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9722 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9723 echo "${ECHO_T}$ac_header_compiler" >&6
9724
9725 # Is the header present?
9726 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9727 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9728 cat >conftest.$ac_ext <<_ACEOF
9729 /* confdefs.h.  */
9730 _ACEOF
9731 cat confdefs.h >>conftest.$ac_ext
9732 cat >>conftest.$ac_ext <<_ACEOF
9733 /* end confdefs.h.  */
9734 #include <zlib.h>
9735 _ACEOF
9736 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9737   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9738   ac_status=$?
9739   grep -v '^ *+' conftest.er1 >conftest.err
9740   rm -f conftest.er1
9741   cat conftest.err >&5
9742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9743   (exit $ac_status); } >/dev/null; then
9744   if test -s conftest.err; then
9745     ac_cpp_err=$ac_c_preproc_warn_flag
9746     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9747   else
9748     ac_cpp_err=
9749   fi
9750 else
9751   ac_cpp_err=yes
9752 fi
9753 if test -z "$ac_cpp_err"; then
9754   ac_header_preproc=yes
9755 else
9756   echo "$as_me: failed program was:" >&5
9757 sed 's/^/| /' conftest.$ac_ext >&5
9758
9759   ac_header_preproc=no
9760 fi
9761 rm -f conftest.err conftest.$ac_ext
9762 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9763 echo "${ECHO_T}$ac_header_preproc" >&6
9764
9765 # So?  What about this header?
9766 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9767   yes:no: )
9768     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9769 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9770     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9771 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9772     ac_header_preproc=yes
9773     ;;
9774   no:yes:* )
9775     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9776 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9777     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9778 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9779     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9780 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9781     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9782 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9783     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9784 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9785     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9786 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9787     (
9788       cat <<\_ASBOX
9789 ## ---------------------------------------- ##
9790 ## Report this to pgsql-bugs@postgresql.org ##
9791 ## ---------------------------------------- ##
9792 _ASBOX
9793     ) |
9794       sed "s/^/$as_me: WARNING:     /" >&2
9795     ;;
9796 esac
9797 echo "$as_me:$LINENO: checking for zlib.h" >&5
9798 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9799 if test "${ac_cv_header_zlib_h+set}" = set; then
9800   echo $ECHO_N "(cached) $ECHO_C" >&6
9801 else
9802   ac_cv_header_zlib_h=$ac_header_preproc
9803 fi
9804 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9805 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9806
9807 fi
9808 if test $ac_cv_header_zlib_h = yes; then
9809   :
9810 else
9811   { { echo "$as_me:$LINENO: error: zlib header not found
9812 If you have zlib already installed, see config.log for details on the
9813 failure.  It is possible the compiler isn't looking in the proper directory.
9814 Use --without-zlib to disable zlib support." >&5
9815 echo "$as_me: error: zlib header not found
9816 If you have zlib already installed, see config.log for details on the
9817 failure.  It is possible the compiler isn't looking in the proper directory.
9818 Use --without-zlib to disable zlib support." >&2;}
9819    { (exit 1); exit 1; }; }
9820 fi
9821
9822
9823 fi
9824
9825 if test "$with_krb5" = yes ; then
9826   if test "${ac_cv_header_krb5_h+set}" = set; then
9827   echo "$as_me:$LINENO: checking for krb5.h" >&5
9828 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9829 if test "${ac_cv_header_krb5_h+set}" = set; then
9830   echo $ECHO_N "(cached) $ECHO_C" >&6
9831 fi
9832 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9833 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9834 else
9835   # Is the header compilable?
9836 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9837 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9838 cat >conftest.$ac_ext <<_ACEOF
9839 /* confdefs.h.  */
9840 _ACEOF
9841 cat confdefs.h >>conftest.$ac_ext
9842 cat >>conftest.$ac_ext <<_ACEOF
9843 /* end confdefs.h.  */
9844 $ac_includes_default
9845 #include <krb5.h>
9846 _ACEOF
9847 rm -f conftest.$ac_objext
9848 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9849   (eval $ac_compile) 2>conftest.er1
9850   ac_status=$?
9851   grep -v '^ *+' conftest.er1 >conftest.err
9852   rm -f conftest.er1
9853   cat conftest.err >&5
9854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9855   (exit $ac_status); } &&
9856          { ac_try='test -z "$ac_c_werror_flag"
9857                          || test ! -s conftest.err'
9858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9859   (eval $ac_try) 2>&5
9860   ac_status=$?
9861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9862   (exit $ac_status); }; } &&
9863          { ac_try='test -s conftest.$ac_objext'
9864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9865   (eval $ac_try) 2>&5
9866   ac_status=$?
9867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9868   (exit $ac_status); }; }; then
9869   ac_header_compiler=yes
9870 else
9871   echo "$as_me: failed program was:" >&5
9872 sed 's/^/| /' conftest.$ac_ext >&5
9873
9874 ac_header_compiler=no
9875 fi
9876 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9877 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9878 echo "${ECHO_T}$ac_header_compiler" >&6
9879
9880 # Is the header present?
9881 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9882 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9883 cat >conftest.$ac_ext <<_ACEOF
9884 /* confdefs.h.  */
9885 _ACEOF
9886 cat confdefs.h >>conftest.$ac_ext
9887 cat >>conftest.$ac_ext <<_ACEOF
9888 /* end confdefs.h.  */
9889 #include <krb5.h>
9890 _ACEOF
9891 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9892   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9893   ac_status=$?
9894   grep -v '^ *+' conftest.er1 >conftest.err
9895   rm -f conftest.er1
9896   cat conftest.err >&5
9897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9898   (exit $ac_status); } >/dev/null; then
9899   if test -s conftest.err; then
9900     ac_cpp_err=$ac_c_preproc_warn_flag
9901     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9902   else
9903     ac_cpp_err=
9904   fi
9905 else
9906   ac_cpp_err=yes
9907 fi
9908 if test -z "$ac_cpp_err"; then
9909   ac_header_preproc=yes
9910 else
9911   echo "$as_me: failed program was:" >&5
9912 sed 's/^/| /' conftest.$ac_ext >&5
9913
9914   ac_header_preproc=no
9915 fi
9916 rm -f conftest.err conftest.$ac_ext
9917 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9918 echo "${ECHO_T}$ac_header_preproc" >&6
9919
9920 # So?  What about this header?
9921 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9922   yes:no: )
9923     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9924 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9925     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9926 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9927     ac_header_preproc=yes
9928     ;;
9929   no:yes:* )
9930     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9931 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9932     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9933 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9934     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9935 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9936     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9937 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9938     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9939 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9940     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9941 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9942     (
9943       cat <<\_ASBOX
9944 ## ---------------------------------------- ##
9945 ## Report this to pgsql-bugs@postgresql.org ##
9946 ## ---------------------------------------- ##
9947 _ASBOX
9948     ) |
9949       sed "s/^/$as_me: WARNING:     /" >&2
9950     ;;
9951 esac
9952 echo "$as_me:$LINENO: checking for krb5.h" >&5
9953 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9954 if test "${ac_cv_header_krb5_h+set}" = set; then
9955   echo $ECHO_N "(cached) $ECHO_C" >&6
9956 else
9957   ac_cv_header_krb5_h=$ac_header_preproc
9958 fi
9959 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9960 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9961
9962 fi
9963 if test $ac_cv_header_krb5_h = yes; then
9964   :
9965 else
9966   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9967 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9968    { (exit 1); exit 1; }; }
9969 fi
9970
9971
9972 fi
9973
9974 if test "$with_openssl" = yes ; then
9975   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9976   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9977 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9978 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9979   echo $ECHO_N "(cached) $ECHO_C" >&6
9980 fi
9981 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9982 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9983 else
9984   # Is the header compilable?
9985 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9986 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9987 cat >conftest.$ac_ext <<_ACEOF
9988 /* confdefs.h.  */
9989 _ACEOF
9990 cat confdefs.h >>conftest.$ac_ext
9991 cat >>conftest.$ac_ext <<_ACEOF
9992 /* end confdefs.h.  */
9993 $ac_includes_default
9994 #include <openssl/ssl.h>
9995 _ACEOF
9996 rm -f conftest.$ac_objext
9997 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9998   (eval $ac_compile) 2>conftest.er1
9999   ac_status=$?
10000   grep -v '^ *+' conftest.er1 >conftest.err
10001   rm -f conftest.er1
10002   cat conftest.err >&5
10003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10004   (exit $ac_status); } &&
10005          { ac_try='test -z "$ac_c_werror_flag"
10006                          || test ! -s conftest.err'
10007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10008   (eval $ac_try) 2>&5
10009   ac_status=$?
10010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011   (exit $ac_status); }; } &&
10012          { ac_try='test -s conftest.$ac_objext'
10013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10014   (eval $ac_try) 2>&5
10015   ac_status=$?
10016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017   (exit $ac_status); }; }; then
10018   ac_header_compiler=yes
10019 else
10020   echo "$as_me: failed program was:" >&5
10021 sed 's/^/| /' conftest.$ac_ext >&5
10022
10023 ac_header_compiler=no
10024 fi
10025 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10026 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10027 echo "${ECHO_T}$ac_header_compiler" >&6
10028
10029 # Is the header present?
10030 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10031 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
10032 cat >conftest.$ac_ext <<_ACEOF
10033 /* confdefs.h.  */
10034 _ACEOF
10035 cat confdefs.h >>conftest.$ac_ext
10036 cat >>conftest.$ac_ext <<_ACEOF
10037 /* end confdefs.h.  */
10038 #include <openssl/ssl.h>
10039 _ACEOF
10040 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10041   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10042   ac_status=$?
10043   grep -v '^ *+' conftest.er1 >conftest.err
10044   rm -f conftest.er1
10045   cat conftest.err >&5
10046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10047   (exit $ac_status); } >/dev/null; then
10048   if test -s conftest.err; then
10049     ac_cpp_err=$ac_c_preproc_warn_flag
10050     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10051   else
10052     ac_cpp_err=
10053   fi
10054 else
10055   ac_cpp_err=yes
10056 fi
10057 if test -z "$ac_cpp_err"; then
10058   ac_header_preproc=yes
10059 else
10060   echo "$as_me: failed program was:" >&5
10061 sed 's/^/| /' conftest.$ac_ext >&5
10062
10063   ac_header_preproc=no
10064 fi
10065 rm -f conftest.err conftest.$ac_ext
10066 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10067 echo "${ECHO_T}$ac_header_preproc" >&6
10068
10069 # So?  What about this header?
10070 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10071   yes:no: )
10072     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10073 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10074     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10075 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10076     ac_header_preproc=yes
10077     ;;
10078   no:yes:* )
10079     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10080 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10081     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10082 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10083     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10084 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10085     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10086 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10087     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10088 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10089     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10090 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10091     (
10092       cat <<\_ASBOX
10093 ## ---------------------------------------- ##
10094 ## Report this to pgsql-bugs@postgresql.org ##
10095 ## ---------------------------------------- ##
10096 _ASBOX
10097     ) |
10098       sed "s/^/$as_me: WARNING:     /" >&2
10099     ;;
10100 esac
10101 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10102 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10103 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10104   echo $ECHO_N "(cached) $ECHO_C" >&6
10105 else
10106   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10107 fi
10108 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10109 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10110
10111 fi
10112 if test $ac_cv_header_openssl_ssl_h = yes; then
10113   :
10114 else
10115   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10116 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10117    { (exit 1); exit 1; }; }
10118 fi
10119
10120
10121   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10122   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10123 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10124 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10125   echo $ECHO_N "(cached) $ECHO_C" >&6
10126 fi
10127 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10128 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10129 else
10130   # Is the header compilable?
10131 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10132 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10133 cat >conftest.$ac_ext <<_ACEOF
10134 /* confdefs.h.  */
10135 _ACEOF
10136 cat confdefs.h >>conftest.$ac_ext
10137 cat >>conftest.$ac_ext <<_ACEOF
10138 /* end confdefs.h.  */
10139 $ac_includes_default
10140 #include <openssl/err.h>
10141 _ACEOF
10142 rm -f conftest.$ac_objext
10143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10144   (eval $ac_compile) 2>conftest.er1
10145   ac_status=$?
10146   grep -v '^ *+' conftest.er1 >conftest.err
10147   rm -f conftest.er1
10148   cat conftest.err >&5
10149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10150   (exit $ac_status); } &&
10151          { ac_try='test -z "$ac_c_werror_flag"
10152                          || test ! -s conftest.err'
10153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10154   (eval $ac_try) 2>&5
10155   ac_status=$?
10156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10157   (exit $ac_status); }; } &&
10158          { ac_try='test -s conftest.$ac_objext'
10159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10160   (eval $ac_try) 2>&5
10161   ac_status=$?
10162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10163   (exit $ac_status); }; }; then
10164   ac_header_compiler=yes
10165 else
10166   echo "$as_me: failed program was:" >&5
10167 sed 's/^/| /' conftest.$ac_ext >&5
10168
10169 ac_header_compiler=no
10170 fi
10171 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10172 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10173 echo "${ECHO_T}$ac_header_compiler" >&6
10174
10175 # Is the header present?
10176 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10177 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10178 cat >conftest.$ac_ext <<_ACEOF
10179 /* confdefs.h.  */
10180 _ACEOF
10181 cat confdefs.h >>conftest.$ac_ext
10182 cat >>conftest.$ac_ext <<_ACEOF
10183 /* end confdefs.h.  */
10184 #include <openssl/err.h>
10185 _ACEOF
10186 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10187   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10188   ac_status=$?
10189   grep -v '^ *+' conftest.er1 >conftest.err
10190   rm -f conftest.er1
10191   cat conftest.err >&5
10192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10193   (exit $ac_status); } >/dev/null; then
10194   if test -s conftest.err; then
10195     ac_cpp_err=$ac_c_preproc_warn_flag
10196     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10197   else
10198     ac_cpp_err=
10199   fi
10200 else
10201   ac_cpp_err=yes
10202 fi
10203 if test -z "$ac_cpp_err"; then
10204   ac_header_preproc=yes
10205 else
10206   echo "$as_me: failed program was:" >&5
10207 sed 's/^/| /' conftest.$ac_ext >&5
10208
10209   ac_header_preproc=no
10210 fi
10211 rm -f conftest.err conftest.$ac_ext
10212 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10213 echo "${ECHO_T}$ac_header_preproc" >&6
10214
10215 # So?  What about this header?
10216 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10217   yes:no: )
10218     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10219 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10220     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10221 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10222     ac_header_preproc=yes
10223     ;;
10224   no:yes:* )
10225     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10226 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10227     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10228 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10229     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10230 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10231     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10232 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10233     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10234 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10235     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10236 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10237     (
10238       cat <<\_ASBOX
10239 ## ---------------------------------------- ##
10240 ## Report this to pgsql-bugs@postgresql.org ##
10241 ## ---------------------------------------- ##
10242 _ASBOX
10243     ) |
10244       sed "s/^/$as_me: WARNING:     /" >&2
10245     ;;
10246 esac
10247 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10248 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10249 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10250   echo $ECHO_N "(cached) $ECHO_C" >&6
10251 else
10252   ac_cv_header_openssl_err_h=$ac_header_preproc
10253 fi
10254 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10255 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10256
10257 fi
10258 if test $ac_cv_header_openssl_err_h = yes; then
10259   :
10260 else
10261   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10262 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10263    { (exit 1); exit 1; }; }
10264 fi
10265
10266
10267 fi
10268
10269 if test "$with_pam" = yes ; then
10270
10271 for ac_header in security/pam_appl.h
10272 do
10273 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10274 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10275   echo "$as_me:$LINENO: checking for $ac_header" >&5
10276 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10277 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10278   echo $ECHO_N "(cached) $ECHO_C" >&6
10279 fi
10280 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10281 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10282 else
10283   # Is the header compilable?
10284 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10285 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10286 cat >conftest.$ac_ext <<_ACEOF
10287 /* confdefs.h.  */
10288 _ACEOF
10289 cat confdefs.h >>conftest.$ac_ext
10290 cat >>conftest.$ac_ext <<_ACEOF
10291 /* end confdefs.h.  */
10292 $ac_includes_default
10293 #include <$ac_header>
10294 _ACEOF
10295 rm -f conftest.$ac_objext
10296 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10297   (eval $ac_compile) 2>conftest.er1
10298   ac_status=$?
10299   grep -v '^ *+' conftest.er1 >conftest.err
10300   rm -f conftest.er1
10301   cat conftest.err >&5
10302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10303   (exit $ac_status); } &&
10304          { ac_try='test -z "$ac_c_werror_flag"
10305                          || test ! -s conftest.err'
10306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10307   (eval $ac_try) 2>&5
10308   ac_status=$?
10309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10310   (exit $ac_status); }; } &&
10311          { ac_try='test -s conftest.$ac_objext'
10312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10313   (eval $ac_try) 2>&5
10314   ac_status=$?
10315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316   (exit $ac_status); }; }; then
10317   ac_header_compiler=yes
10318 else
10319   echo "$as_me: failed program was:" >&5
10320 sed 's/^/| /' conftest.$ac_ext >&5
10321
10322 ac_header_compiler=no
10323 fi
10324 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10325 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10326 echo "${ECHO_T}$ac_header_compiler" >&6
10327
10328 # Is the header present?
10329 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10330 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10331 cat >conftest.$ac_ext <<_ACEOF
10332 /* confdefs.h.  */
10333 _ACEOF
10334 cat confdefs.h >>conftest.$ac_ext
10335 cat >>conftest.$ac_ext <<_ACEOF
10336 /* end confdefs.h.  */
10337 #include <$ac_header>
10338 _ACEOF
10339 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10340   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10341   ac_status=$?
10342   grep -v '^ *+' conftest.er1 >conftest.err
10343   rm -f conftest.er1
10344   cat conftest.err >&5
10345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10346   (exit $ac_status); } >/dev/null; then
10347   if test -s conftest.err; then
10348     ac_cpp_err=$ac_c_preproc_warn_flag
10349     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10350   else
10351     ac_cpp_err=
10352   fi
10353 else
10354   ac_cpp_err=yes
10355 fi
10356 if test -z "$ac_cpp_err"; then
10357   ac_header_preproc=yes
10358 else
10359   echo "$as_me: failed program was:" >&5
10360 sed 's/^/| /' conftest.$ac_ext >&5
10361
10362   ac_header_preproc=no
10363 fi
10364 rm -f conftest.err conftest.$ac_ext
10365 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10366 echo "${ECHO_T}$ac_header_preproc" >&6
10367
10368 # So?  What about this header?
10369 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10370   yes:no: )
10371     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10372 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10373     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10374 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10375     ac_header_preproc=yes
10376     ;;
10377   no:yes:* )
10378     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10379 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10380     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10381 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10382     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10383 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10384     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10385 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10386     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10387 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10388     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10389 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10390     (
10391       cat <<\_ASBOX
10392 ## ---------------------------------------- ##
10393 ## Report this to pgsql-bugs@postgresql.org ##
10394 ## ---------------------------------------- ##
10395 _ASBOX
10396     ) |
10397       sed "s/^/$as_me: WARNING:     /" >&2
10398     ;;
10399 esac
10400 echo "$as_me:$LINENO: checking for $ac_header" >&5
10401 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10402 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10403   echo $ECHO_N "(cached) $ECHO_C" >&6
10404 else
10405   eval "$as_ac_Header=\$ac_header_preproc"
10406 fi
10407 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10408 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10409
10410 fi
10411 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10412   cat >>confdefs.h <<_ACEOF
10413 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10414 _ACEOF
10415
10416 else
10417
10418 for ac_header in pam/pam_appl.h
10419 do
10420 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10421 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10422   echo "$as_me:$LINENO: checking for $ac_header" >&5
10423 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10424 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10425   echo $ECHO_N "(cached) $ECHO_C" >&6
10426 fi
10427 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10428 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10429 else
10430   # Is the header compilable?
10431 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10432 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10433 cat >conftest.$ac_ext <<_ACEOF
10434 /* confdefs.h.  */
10435 _ACEOF
10436 cat confdefs.h >>conftest.$ac_ext
10437 cat >>conftest.$ac_ext <<_ACEOF
10438 /* end confdefs.h.  */
10439 $ac_includes_default
10440 #include <$ac_header>
10441 _ACEOF
10442 rm -f conftest.$ac_objext
10443 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10444   (eval $ac_compile) 2>conftest.er1
10445   ac_status=$?
10446   grep -v '^ *+' conftest.er1 >conftest.err
10447   rm -f conftest.er1
10448   cat conftest.err >&5
10449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10450   (exit $ac_status); } &&
10451          { ac_try='test -z "$ac_c_werror_flag"
10452                          || test ! -s conftest.err'
10453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10454   (eval $ac_try) 2>&5
10455   ac_status=$?
10456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10457   (exit $ac_status); }; } &&
10458          { ac_try='test -s conftest.$ac_objext'
10459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10460   (eval $ac_try) 2>&5
10461   ac_status=$?
10462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10463   (exit $ac_status); }; }; then
10464   ac_header_compiler=yes
10465 else
10466   echo "$as_me: failed program was:" >&5
10467 sed 's/^/| /' conftest.$ac_ext >&5
10468
10469 ac_header_compiler=no
10470 fi
10471 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10472 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10473 echo "${ECHO_T}$ac_header_compiler" >&6
10474
10475 # Is the header present?
10476 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10477 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10478 cat >conftest.$ac_ext <<_ACEOF
10479 /* confdefs.h.  */
10480 _ACEOF
10481 cat confdefs.h >>conftest.$ac_ext
10482 cat >>conftest.$ac_ext <<_ACEOF
10483 /* end confdefs.h.  */
10484 #include <$ac_header>
10485 _ACEOF
10486 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10487   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10488   ac_status=$?
10489   grep -v '^ *+' conftest.er1 >conftest.err
10490   rm -f conftest.er1
10491   cat conftest.err >&5
10492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10493   (exit $ac_status); } >/dev/null; then
10494   if test -s conftest.err; then
10495     ac_cpp_err=$ac_c_preproc_warn_flag
10496     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10497   else
10498     ac_cpp_err=
10499   fi
10500 else
10501   ac_cpp_err=yes
10502 fi
10503 if test -z "$ac_cpp_err"; then
10504   ac_header_preproc=yes
10505 else
10506   echo "$as_me: failed program was:" >&5
10507 sed 's/^/| /' conftest.$ac_ext >&5
10508
10509   ac_header_preproc=no
10510 fi
10511 rm -f conftest.err conftest.$ac_ext
10512 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10513 echo "${ECHO_T}$ac_header_preproc" >&6
10514
10515 # So?  What about this header?
10516 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10517   yes:no: )
10518     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10519 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10520     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10521 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10522     ac_header_preproc=yes
10523     ;;
10524   no:yes:* )
10525     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10526 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10527     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10528 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10529     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10530 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10531     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10532 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10533     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10534 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10535     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10536 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10537     (
10538       cat <<\_ASBOX
10539 ## ---------------------------------------- ##
10540 ## Report this to pgsql-bugs@postgresql.org ##
10541 ## ---------------------------------------- ##
10542 _ASBOX
10543     ) |
10544       sed "s/^/$as_me: WARNING:     /" >&2
10545     ;;
10546 esac
10547 echo "$as_me:$LINENO: checking for $ac_header" >&5
10548 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10549 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10550   echo $ECHO_N "(cached) $ECHO_C" >&6
10551 else
10552   eval "$as_ac_Header=\$ac_header_preproc"
10553 fi
10554 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10555 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10556
10557 fi
10558 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10559   cat >>confdefs.h <<_ACEOF
10560 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10561 _ACEOF
10562
10563 else
10564   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10565 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10566    { (exit 1); exit 1; }; }
10567 fi
10568
10569 done
10570
10571 fi
10572
10573 done
10574
10575 fi
10576
10577 if test "$with_ldap" = yes ; then
10578   if test "$PORTNAME" != "win32"; then
10579
10580 for ac_header in ldap.h
10581 do
10582 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10583 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10584   echo "$as_me:$LINENO: checking for $ac_header" >&5
10585 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10586 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10587   echo $ECHO_N "(cached) $ECHO_C" >&6
10588 fi
10589 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10590 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10591 else
10592   # Is the header compilable?
10593 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10594 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10595 cat >conftest.$ac_ext <<_ACEOF
10596 /* confdefs.h.  */
10597 _ACEOF
10598 cat confdefs.h >>conftest.$ac_ext
10599 cat >>conftest.$ac_ext <<_ACEOF
10600 /* end confdefs.h.  */
10601 $ac_includes_default
10602 #include <$ac_header>
10603 _ACEOF
10604 rm -f conftest.$ac_objext
10605 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10606   (eval $ac_compile) 2>conftest.er1
10607   ac_status=$?
10608   grep -v '^ *+' conftest.er1 >conftest.err
10609   rm -f conftest.er1
10610   cat conftest.err >&5
10611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10612   (exit $ac_status); } &&
10613          { ac_try='test -z "$ac_c_werror_flag"
10614                          || test ! -s conftest.err'
10615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10616   (eval $ac_try) 2>&5
10617   ac_status=$?
10618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10619   (exit $ac_status); }; } &&
10620          { ac_try='test -s conftest.$ac_objext'
10621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10622   (eval $ac_try) 2>&5
10623   ac_status=$?
10624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10625   (exit $ac_status); }; }; then
10626   ac_header_compiler=yes
10627 else
10628   echo "$as_me: failed program was:" >&5
10629 sed 's/^/| /' conftest.$ac_ext >&5
10630
10631 ac_header_compiler=no
10632 fi
10633 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10634 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10635 echo "${ECHO_T}$ac_header_compiler" >&6
10636
10637 # Is the header present?
10638 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10639 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10640 cat >conftest.$ac_ext <<_ACEOF
10641 /* confdefs.h.  */
10642 _ACEOF
10643 cat confdefs.h >>conftest.$ac_ext
10644 cat >>conftest.$ac_ext <<_ACEOF
10645 /* end confdefs.h.  */
10646 #include <$ac_header>
10647 _ACEOF
10648 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10649   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10650   ac_status=$?
10651   grep -v '^ *+' conftest.er1 >conftest.err
10652   rm -f conftest.er1
10653   cat conftest.err >&5
10654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10655   (exit $ac_status); } >/dev/null; then
10656   if test -s conftest.err; then
10657     ac_cpp_err=$ac_c_preproc_warn_flag
10658     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10659   else
10660     ac_cpp_err=
10661   fi
10662 else
10663   ac_cpp_err=yes
10664 fi
10665 if test -z "$ac_cpp_err"; then
10666   ac_header_preproc=yes
10667 else
10668   echo "$as_me: failed program was:" >&5
10669 sed 's/^/| /' conftest.$ac_ext >&5
10670
10671   ac_header_preproc=no
10672 fi
10673 rm -f conftest.err conftest.$ac_ext
10674 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10675 echo "${ECHO_T}$ac_header_preproc" >&6
10676
10677 # So?  What about this header?
10678 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10679   yes:no: )
10680     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10681 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10682     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10683 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10684     ac_header_preproc=yes
10685     ;;
10686   no:yes:* )
10687     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10688 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10689     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10690 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10691     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10692 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10693     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10694 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10695     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10696 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10697     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10698 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10699     (
10700       cat <<\_ASBOX
10701 ## ---------------------------------------- ##
10702 ## Report this to pgsql-bugs@postgresql.org ##
10703 ## ---------------------------------------- ##
10704 _ASBOX
10705     ) |
10706       sed "s/^/$as_me: WARNING:     /" >&2
10707     ;;
10708 esac
10709 echo "$as_me:$LINENO: checking for $ac_header" >&5
10710 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10712   echo $ECHO_N "(cached) $ECHO_C" >&6
10713 else
10714   eval "$as_ac_Header=\$ac_header_preproc"
10715 fi
10716 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10717 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10718
10719 fi
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 <ldap.h> is required for LDAP" >&5
10727 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10728    { (exit 1); exit 1; }; }
10729 fi
10730
10731 done
10732
10733   else
10734
10735 for ac_header in winldap.h
10736 do
10737 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10738 echo "$as_me:$LINENO: checking for $ac_header" >&5
10739 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10740 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10741   echo $ECHO_N "(cached) $ECHO_C" >&6
10742 else
10743   cat >conftest.$ac_ext <<_ACEOF
10744 /* confdefs.h.  */
10745 _ACEOF
10746 cat confdefs.h >>conftest.$ac_ext
10747 cat >>conftest.$ac_ext <<_ACEOF
10748 /* end confdefs.h.  */
10749 $ac_includes_default
10750 #include <windows.h>
10751
10752
10753 #include <$ac_header>
10754 _ACEOF
10755 rm -f conftest.$ac_objext
10756 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10757   (eval $ac_compile) 2>conftest.er1
10758   ac_status=$?
10759   grep -v '^ *+' conftest.er1 >conftest.err
10760   rm -f conftest.er1
10761   cat conftest.err >&5
10762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10763   (exit $ac_status); } &&
10764          { ac_try='test -z "$ac_c_werror_flag"
10765                          || test ! -s conftest.err'
10766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10767   (eval $ac_try) 2>&5
10768   ac_status=$?
10769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10770   (exit $ac_status); }; } &&
10771          { ac_try='test -s conftest.$ac_objext'
10772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10773   (eval $ac_try) 2>&5
10774   ac_status=$?
10775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776   (exit $ac_status); }; }; then
10777   eval "$as_ac_Header=yes"
10778 else
10779   echo "$as_me: failed program was:" >&5
10780 sed 's/^/| /' conftest.$ac_ext >&5
10781
10782 eval "$as_ac_Header=no"
10783 fi
10784 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10785 fi
10786 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10787 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10788 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10789   cat >>confdefs.h <<_ACEOF
10790 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10791 _ACEOF
10792
10793 else
10794   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10795 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10796    { (exit 1); exit 1; }; }
10797 fi
10798
10799 done
10800
10801   fi
10802 fi
10803
10804 if test "$with_bonjour" = yes ; then
10805   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10806   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10807 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10808 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10809   echo $ECHO_N "(cached) $ECHO_C" >&6
10810 fi
10811 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10812 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10813 else
10814   # Is the header compilable?
10815 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10816 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10817 cat >conftest.$ac_ext <<_ACEOF
10818 /* confdefs.h.  */
10819 _ACEOF
10820 cat confdefs.h >>conftest.$ac_ext
10821 cat >>conftest.$ac_ext <<_ACEOF
10822 /* end confdefs.h.  */
10823 $ac_includes_default
10824 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10825 _ACEOF
10826 rm -f conftest.$ac_objext
10827 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10828   (eval $ac_compile) 2>conftest.er1
10829   ac_status=$?
10830   grep -v '^ *+' conftest.er1 >conftest.err
10831   rm -f conftest.er1
10832   cat conftest.err >&5
10833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10834   (exit $ac_status); } &&
10835          { ac_try='test -z "$ac_c_werror_flag"
10836                          || test ! -s conftest.err'
10837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10838   (eval $ac_try) 2>&5
10839   ac_status=$?
10840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10841   (exit $ac_status); }; } &&
10842          { ac_try='test -s conftest.$ac_objext'
10843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10844   (eval $ac_try) 2>&5
10845   ac_status=$?
10846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10847   (exit $ac_status); }; }; then
10848   ac_header_compiler=yes
10849 else
10850   echo "$as_me: failed program was:" >&5
10851 sed 's/^/| /' conftest.$ac_ext >&5
10852
10853 ac_header_compiler=no
10854 fi
10855 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10856 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10857 echo "${ECHO_T}$ac_header_compiler" >&6
10858
10859 # Is the header present?
10860 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10861 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10862 cat >conftest.$ac_ext <<_ACEOF
10863 /* confdefs.h.  */
10864 _ACEOF
10865 cat confdefs.h >>conftest.$ac_ext
10866 cat >>conftest.$ac_ext <<_ACEOF
10867 /* end confdefs.h.  */
10868 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10869 _ACEOF
10870 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10871   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10872   ac_status=$?
10873   grep -v '^ *+' conftest.er1 >conftest.err
10874   rm -f conftest.er1
10875   cat conftest.err >&5
10876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10877   (exit $ac_status); } >/dev/null; then
10878   if test -s conftest.err; then
10879     ac_cpp_err=$ac_c_preproc_warn_flag
10880     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10881   else
10882     ac_cpp_err=
10883   fi
10884 else
10885   ac_cpp_err=yes
10886 fi
10887 if test -z "$ac_cpp_err"; then
10888   ac_header_preproc=yes
10889 else
10890   echo "$as_me: failed program was:" >&5
10891 sed 's/^/| /' conftest.$ac_ext >&5
10892
10893   ac_header_preproc=no
10894 fi
10895 rm -f conftest.err conftest.$ac_ext
10896 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10897 echo "${ECHO_T}$ac_header_preproc" >&6
10898
10899 # So?  What about this header?
10900 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10901   yes:no: )
10902     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10903 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10904     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10905 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10906     ac_header_preproc=yes
10907     ;;
10908   no:yes:* )
10909     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10910 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10911     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10912 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10913     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10914 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10915     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10916 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10917     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10918 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10919     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10920 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10921     (
10922       cat <<\_ASBOX
10923 ## ---------------------------------------- ##
10924 ## Report this to pgsql-bugs@postgresql.org ##
10925 ## ---------------------------------------- ##
10926 _ASBOX
10927     ) |
10928       sed "s/^/$as_me: WARNING:     /" >&2
10929     ;;
10930 esac
10931 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10932 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10933 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10934   echo $ECHO_N "(cached) $ECHO_C" >&6
10935 else
10936   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10937 fi
10938 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10939 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10940
10941 fi
10942 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10943   :
10944 else
10945   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10946 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10947    { (exit 1); exit 1; }; }
10948 fi
10949
10950
10951 fi
10952
10953
10954 ##
10955 ## Types, structures, compiler characteristics
10956 ##
10957
10958  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10959 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10960 if test "${ac_cv_c_const+set}" = set; then
10961   echo $ECHO_N "(cached) $ECHO_C" >&6
10962 else
10963   cat >conftest.$ac_ext <<_ACEOF
10964 /* confdefs.h.  */
10965 _ACEOF
10966 cat confdefs.h >>conftest.$ac_ext
10967 cat >>conftest.$ac_ext <<_ACEOF
10968 /* end confdefs.h.  */
10969
10970 int
10971 main ()
10972 {
10973 /* FIXME: Include the comments suggested by Paul. */
10974 #ifndef __cplusplus
10975   /* Ultrix mips cc rejects this.  */
10976   typedef int charset[2];
10977   const charset x;
10978   /* SunOS 4.1.1 cc rejects this.  */
10979   char const *const *ccp;
10980   char **p;
10981   /* NEC SVR4.0.2 mips cc rejects this.  */
10982   struct point {int x, y;};
10983   static struct point const zero = {0,0};
10984   /* AIX XL C 1.02.0.0 rejects this.
10985      It does not let you subtract one const X* pointer from another in
10986      an arm of an if-expression whose if-part is not a constant
10987      expression */
10988   const char *g = "string";
10989   ccp = &g + (g ? g-g : 0);
10990   /* HPUX 7.0 cc rejects these. */
10991   ++ccp;
10992   p = (char**) ccp;
10993   ccp = (char const *const *) p;
10994   { /* SCO 3.2v4 cc rejects this.  */
10995     char *t;
10996     char const *s = 0 ? (char *) 0 : (char const *) 0;
10997
10998     *t++ = 0;
10999   }
11000   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11001     int x[] = {25, 17};
11002     const int *foo = &x[0];
11003     ++foo;
11004   }
11005   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11006     typedef const int *iptr;
11007     iptr p = 0;
11008     ++p;
11009   }
11010   { /* AIX XL C 1.02.0.0 rejects this saying
11011        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11012     struct s { int j; const int *ap[3]; };
11013     struct s *b; b->j = 5;
11014   }
11015   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11016     const int foo = 10;
11017   }
11018 #endif
11019
11020   ;
11021   return 0;
11022 }
11023 _ACEOF
11024 rm -f conftest.$ac_objext
11025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11026   (eval $ac_compile) 2>conftest.er1
11027   ac_status=$?
11028   grep -v '^ *+' conftest.er1 >conftest.err
11029   rm -f conftest.er1
11030   cat conftest.err >&5
11031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11032   (exit $ac_status); } &&
11033          { ac_try='test -z "$ac_c_werror_flag"
11034                          || test ! -s conftest.err'
11035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11036   (eval $ac_try) 2>&5
11037   ac_status=$?
11038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039   (exit $ac_status); }; } &&
11040          { ac_try='test -s conftest.$ac_objext'
11041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11042   (eval $ac_try) 2>&5
11043   ac_status=$?
11044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11045   (exit $ac_status); }; }; then
11046   ac_cv_c_const=yes
11047 else
11048   echo "$as_me: failed program was:" >&5
11049 sed 's/^/| /' conftest.$ac_ext >&5
11050
11051 ac_cv_c_const=no
11052 fi
11053 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11054 fi
11055 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
11056 echo "${ECHO_T}$ac_cv_c_const" >&6
11057 if test $ac_cv_c_const = no; then
11058
11059 cat >>confdefs.h <<\_ACEOF
11060 #define const
11061 _ACEOF
11062
11063 fi
11064
11065
11066 echo "$as_me:$LINENO: checking for inline" >&5
11067 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11068 if test "${ac_cv_c_inline+set}" = set; then
11069   echo $ECHO_N "(cached) $ECHO_C" >&6
11070 else
11071   ac_cv_c_inline=no
11072 for ac_kw in inline __inline__ __inline; do
11073   cat >conftest.$ac_ext <<_ACEOF
11074 /* confdefs.h.  */
11075 _ACEOF
11076 cat confdefs.h >>conftest.$ac_ext
11077 cat >>conftest.$ac_ext <<_ACEOF
11078 /* end confdefs.h.  */
11079 #ifndef __cplusplus
11080 typedef int foo_t;
11081 static $ac_kw foo_t static_foo () {return 0; }
11082 $ac_kw int foo () {return 0; }
11083 #endif
11084
11085 _ACEOF
11086 rm -f conftest.$ac_objext
11087 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11088   (eval $ac_compile) 2>conftest.er1
11089   ac_status=$?
11090   grep -v '^ *+' conftest.er1 >conftest.err
11091   rm -f conftest.er1
11092   cat conftest.err >&5
11093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11094   (exit $ac_status); } &&
11095          { ac_try='test -z "$ac_c_werror_flag"
11096                          || test ! -s conftest.err'
11097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11098   (eval $ac_try) 2>&5
11099   ac_status=$?
11100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11101   (exit $ac_status); }; } &&
11102          { ac_try='test -s conftest.$ac_objext'
11103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11104   (eval $ac_try) 2>&5
11105   ac_status=$?
11106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11107   (exit $ac_status); }; }; then
11108   ac_cv_c_inline=$ac_kw; break
11109 else
11110   echo "$as_me: failed program was:" >&5
11111 sed 's/^/| /' conftest.$ac_ext >&5
11112
11113 fi
11114 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11115 done
11116
11117 fi
11118 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11119 echo "${ECHO_T}$ac_cv_c_inline" >&6
11120 case $ac_cv_c_inline in
11121   inline | yes) ;;
11122   no)
11123 cat >>confdefs.h <<\_ACEOF
11124 #define inline
11125 _ACEOF
11126  ;;
11127   *)  cat >>confdefs.h <<_ACEOF
11128 #define inline $ac_cv_c_inline
11129 _ACEOF
11130  ;;
11131 esac
11132
11133 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11134 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11135 if test "${ac_cv_c_stringize+set}" = set; then
11136   echo $ECHO_N "(cached) $ECHO_C" >&6
11137 else
11138   cat >conftest.$ac_ext <<_ACEOF
11139 /* confdefs.h.  */
11140 _ACEOF
11141 cat confdefs.h >>conftest.$ac_ext
11142 cat >>conftest.$ac_ext <<_ACEOF
11143 /* end confdefs.h.  */
11144 #define x(y) #y
11145
11146 char *s = x(teststring);
11147 _ACEOF
11148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11149   $EGREP "#teststring" >/dev/null 2>&1; then
11150   ac_cv_c_stringize=no
11151 else
11152   ac_cv_c_stringize=yes
11153 fi
11154 rm -f conftest*
11155
11156 fi
11157 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11158 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11159 if test $ac_cv_c_stringize = yes; then
11160
11161 cat >>confdefs.h <<\_ACEOF
11162 #define HAVE_STRINGIZE 1
11163 _ACEOF
11164
11165 fi
11166
11167 echo "$as_me:$LINENO: checking for signed types" >&5
11168 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11169 if test "${pgac_cv_c_signed+set}" = set; then
11170   echo $ECHO_N "(cached) $ECHO_C" >&6
11171 else
11172   cat >conftest.$ac_ext <<_ACEOF
11173 /* confdefs.h.  */
11174 _ACEOF
11175 cat confdefs.h >>conftest.$ac_ext
11176 cat >>conftest.$ac_ext <<_ACEOF
11177 /* end confdefs.h.  */
11178
11179 int
11180 main ()
11181 {
11182 signed char c; signed short s; signed int i;
11183   ;
11184   return 0;
11185 }
11186 _ACEOF
11187 rm -f conftest.$ac_objext
11188 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11189   (eval $ac_compile) 2>conftest.er1
11190   ac_status=$?
11191   grep -v '^ *+' conftest.er1 >conftest.err
11192   rm -f conftest.er1
11193   cat conftest.err >&5
11194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11195   (exit $ac_status); } &&
11196          { ac_try='test -z "$ac_c_werror_flag"
11197                          || test ! -s conftest.err'
11198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11199   (eval $ac_try) 2>&5
11200   ac_status=$?
11201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11202   (exit $ac_status); }; } &&
11203          { ac_try='test -s conftest.$ac_objext'
11204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11205   (eval $ac_try) 2>&5
11206   ac_status=$?
11207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11208   (exit $ac_status); }; }; then
11209   pgac_cv_c_signed=yes
11210 else
11211   echo "$as_me: failed program was:" >&5
11212 sed 's/^/| /' conftest.$ac_ext >&5
11213
11214 pgac_cv_c_signed=no
11215 fi
11216 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11217 fi
11218 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11219 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11220 if test x"$pgac_cv_c_signed" = xno ; then
11221
11222 cat >>confdefs.h <<\_ACEOF
11223 #define signed
11224 _ACEOF
11225
11226 fi
11227 echo "$as_me:$LINENO: checking for working volatile" >&5
11228 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11229 if test "${ac_cv_c_volatile+set}" = set; then
11230   echo $ECHO_N "(cached) $ECHO_C" >&6
11231 else
11232   cat >conftest.$ac_ext <<_ACEOF
11233 /* confdefs.h.  */
11234 _ACEOF
11235 cat confdefs.h >>conftest.$ac_ext
11236 cat >>conftest.$ac_ext <<_ACEOF
11237 /* end confdefs.h.  */
11238
11239 int
11240 main ()
11241 {
11242
11243 volatile int x;
11244 int * volatile y;
11245   ;
11246   return 0;
11247 }
11248 _ACEOF
11249 rm -f conftest.$ac_objext
11250 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11251   (eval $ac_compile) 2>conftest.er1
11252   ac_status=$?
11253   grep -v '^ *+' conftest.er1 >conftest.err
11254   rm -f conftest.er1
11255   cat conftest.err >&5
11256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11257   (exit $ac_status); } &&
11258          { ac_try='test -z "$ac_c_werror_flag"
11259                          || test ! -s conftest.err'
11260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261   (eval $ac_try) 2>&5
11262   ac_status=$?
11263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264   (exit $ac_status); }; } &&
11265          { ac_try='test -s conftest.$ac_objext'
11266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11267   (eval $ac_try) 2>&5
11268   ac_status=$?
11269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11270   (exit $ac_status); }; }; then
11271   ac_cv_c_volatile=yes
11272 else
11273   echo "$as_me: failed program was:" >&5
11274 sed 's/^/| /' conftest.$ac_ext >&5
11275
11276 ac_cv_c_volatile=no
11277 fi
11278 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11279 fi
11280 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11281 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11282 if test $ac_cv_c_volatile = no; then
11283
11284 cat >>confdefs.h <<\_ACEOF
11285 #define volatile
11286 _ACEOF
11287
11288 fi
11289
11290 echo "$as_me:$LINENO: checking for __func__" >&5
11291 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11292 if test "${pgac_cv_funcname_func_support+set}" = set; then
11293   echo $ECHO_N "(cached) $ECHO_C" >&6
11294 else
11295   cat >conftest.$ac_ext <<_ACEOF
11296 /* confdefs.h.  */
11297 _ACEOF
11298 cat confdefs.h >>conftest.$ac_ext
11299 cat >>conftest.$ac_ext <<_ACEOF
11300 /* end confdefs.h.  */
11301 #include <stdio.h>
11302 int
11303 main ()
11304 {
11305 printf("%s\n", __func__);
11306   ;
11307   return 0;
11308 }
11309 _ACEOF
11310 rm -f conftest.$ac_objext
11311 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11312   (eval $ac_compile) 2>conftest.er1
11313   ac_status=$?
11314   grep -v '^ *+' conftest.er1 >conftest.err
11315   rm -f conftest.er1
11316   cat conftest.err >&5
11317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11318   (exit $ac_status); } &&
11319          { ac_try='test -z "$ac_c_werror_flag"
11320                          || test ! -s conftest.err'
11321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11322   (eval $ac_try) 2>&5
11323   ac_status=$?
11324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11325   (exit $ac_status); }; } &&
11326          { ac_try='test -s conftest.$ac_objext'
11327   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11328   (eval $ac_try) 2>&5
11329   ac_status=$?
11330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11331   (exit $ac_status); }; }; then
11332   pgac_cv_funcname_func_support=yes
11333 else
11334   echo "$as_me: failed program was:" >&5
11335 sed 's/^/| /' conftest.$ac_ext >&5
11336
11337 pgac_cv_funcname_func_support=no
11338 fi
11339 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11340 fi
11341 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11342 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11343 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11344
11345 cat >>confdefs.h <<\_ACEOF
11346 #define HAVE_FUNCNAME__FUNC 1
11347 _ACEOF
11348
11349 else
11350 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11351 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11352 if test "${pgac_cv_funcname_function_support+set}" = set; then
11353   echo $ECHO_N "(cached) $ECHO_C" >&6
11354 else
11355   cat >conftest.$ac_ext <<_ACEOF
11356 /* confdefs.h.  */
11357 _ACEOF
11358 cat confdefs.h >>conftest.$ac_ext
11359 cat >>conftest.$ac_ext <<_ACEOF
11360 /* end confdefs.h.  */
11361 #include <stdio.h>
11362 int
11363 main ()
11364 {
11365 printf("%s\n", __FUNCTION__);
11366   ;
11367   return 0;
11368 }
11369 _ACEOF
11370 rm -f conftest.$ac_objext
11371 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11372   (eval $ac_compile) 2>conftest.er1
11373   ac_status=$?
11374   grep -v '^ *+' conftest.er1 >conftest.err
11375   rm -f conftest.er1
11376   cat conftest.err >&5
11377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11378   (exit $ac_status); } &&
11379          { ac_try='test -z "$ac_c_werror_flag"
11380                          || test ! -s conftest.err'
11381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11382   (eval $ac_try) 2>&5
11383   ac_status=$?
11384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11385   (exit $ac_status); }; } &&
11386          { ac_try='test -s conftest.$ac_objext'
11387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11388   (eval $ac_try) 2>&5
11389   ac_status=$?
11390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11391   (exit $ac_status); }; }; then
11392   pgac_cv_funcname_function_support=yes
11393 else
11394   echo "$as_me: failed program was:" >&5
11395 sed 's/^/| /' conftest.$ac_ext >&5
11396
11397 pgac_cv_funcname_function_support=no
11398 fi
11399 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11400 fi
11401 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11402 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11403 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11404
11405 cat >>confdefs.h <<\_ACEOF
11406 #define HAVE_FUNCNAME__FUNCTION 1
11407 _ACEOF
11408
11409 fi
11410 fi
11411 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11412 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11413 if test "${ac_cv_struct_tm+set}" = set; then
11414   echo $ECHO_N "(cached) $ECHO_C" >&6
11415 else
11416   cat >conftest.$ac_ext <<_ACEOF
11417 /* confdefs.h.  */
11418 _ACEOF
11419 cat confdefs.h >>conftest.$ac_ext
11420 cat >>conftest.$ac_ext <<_ACEOF
11421 /* end confdefs.h.  */
11422 #include <sys/types.h>
11423 #include <time.h>
11424
11425 int
11426 main ()
11427 {
11428 struct tm *tp; tp->tm_sec;
11429   ;
11430   return 0;
11431 }
11432 _ACEOF
11433 rm -f conftest.$ac_objext
11434 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11435   (eval $ac_compile) 2>conftest.er1
11436   ac_status=$?
11437   grep -v '^ *+' conftest.er1 >conftest.err
11438   rm -f conftest.er1
11439   cat conftest.err >&5
11440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11441   (exit $ac_status); } &&
11442          { ac_try='test -z "$ac_c_werror_flag"
11443                          || test ! -s conftest.err'
11444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11445   (eval $ac_try) 2>&5
11446   ac_status=$?
11447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11448   (exit $ac_status); }; } &&
11449          { ac_try='test -s conftest.$ac_objext'
11450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11451   (eval $ac_try) 2>&5
11452   ac_status=$?
11453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11454   (exit $ac_status); }; }; then
11455   ac_cv_struct_tm=time.h
11456 else
11457   echo "$as_me: failed program was:" >&5
11458 sed 's/^/| /' conftest.$ac_ext >&5
11459
11460 ac_cv_struct_tm=sys/time.h
11461 fi
11462 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11463 fi
11464 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11465 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11466 if test $ac_cv_struct_tm = sys/time.h; then
11467
11468 cat >>confdefs.h <<\_ACEOF
11469 #define TM_IN_SYS_TIME 1
11470 _ACEOF
11471
11472 fi
11473
11474 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11475 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11476 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11477   echo $ECHO_N "(cached) $ECHO_C" >&6
11478 else
11479   cat >conftest.$ac_ext <<_ACEOF
11480 /* confdefs.h.  */
11481 _ACEOF
11482 cat confdefs.h >>conftest.$ac_ext
11483 cat >>conftest.$ac_ext <<_ACEOF
11484 /* end confdefs.h.  */
11485 #include <sys/types.h>
11486 #include <$ac_cv_struct_tm>
11487
11488
11489 int
11490 main ()
11491 {
11492 static struct tm ac_aggr;
11493 if (ac_aggr.tm_zone)
11494 return 0;
11495   ;
11496   return 0;
11497 }
11498 _ACEOF
11499 rm -f conftest.$ac_objext
11500 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11501   (eval $ac_compile) 2>conftest.er1
11502   ac_status=$?
11503   grep -v '^ *+' conftest.er1 >conftest.err
11504   rm -f conftest.er1
11505   cat conftest.err >&5
11506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507   (exit $ac_status); } &&
11508          { ac_try='test -z "$ac_c_werror_flag"
11509                          || test ! -s conftest.err'
11510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11511   (eval $ac_try) 2>&5
11512   ac_status=$?
11513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11514   (exit $ac_status); }; } &&
11515          { ac_try='test -s conftest.$ac_objext'
11516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11517   (eval $ac_try) 2>&5
11518   ac_status=$?
11519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520   (exit $ac_status); }; }; then
11521   ac_cv_member_struct_tm_tm_zone=yes
11522 else
11523   echo "$as_me: failed program was:" >&5
11524 sed 's/^/| /' conftest.$ac_ext >&5
11525
11526 cat >conftest.$ac_ext <<_ACEOF
11527 /* confdefs.h.  */
11528 _ACEOF
11529 cat confdefs.h >>conftest.$ac_ext
11530 cat >>conftest.$ac_ext <<_ACEOF
11531 /* end confdefs.h.  */
11532 #include <sys/types.h>
11533 #include <$ac_cv_struct_tm>
11534
11535
11536 int
11537 main ()
11538 {
11539 static struct tm ac_aggr;
11540 if (sizeof ac_aggr.tm_zone)
11541 return 0;
11542   ;
11543   return 0;
11544 }
11545 _ACEOF
11546 rm -f conftest.$ac_objext
11547 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11548   (eval $ac_compile) 2>conftest.er1
11549   ac_status=$?
11550   grep -v '^ *+' conftest.er1 >conftest.err
11551   rm -f conftest.er1
11552   cat conftest.err >&5
11553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11554   (exit $ac_status); } &&
11555          { ac_try='test -z "$ac_c_werror_flag"
11556                          || test ! -s conftest.err'
11557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11558   (eval $ac_try) 2>&5
11559   ac_status=$?
11560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11561   (exit $ac_status); }; } &&
11562          { ac_try='test -s conftest.$ac_objext'
11563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11564   (eval $ac_try) 2>&5
11565   ac_status=$?
11566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11567   (exit $ac_status); }; }; then
11568   ac_cv_member_struct_tm_tm_zone=yes
11569 else
11570   echo "$as_me: failed program was:" >&5
11571 sed 's/^/| /' conftest.$ac_ext >&5
11572
11573 ac_cv_member_struct_tm_tm_zone=no
11574 fi
11575 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11576 fi
11577 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11578 fi
11579 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11580 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11581 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11582
11583 cat >>confdefs.h <<_ACEOF
11584 #define HAVE_STRUCT_TM_TM_ZONE 1
11585 _ACEOF
11586
11587
11588 fi
11589
11590 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11591
11592 cat >>confdefs.h <<\_ACEOF
11593 #define HAVE_TM_ZONE 1
11594 _ACEOF
11595
11596 fi
11597 echo "$as_me:$LINENO: checking for tzname" >&5
11598 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11599 if test "${ac_cv_var_tzname+set}" = set; then
11600   echo $ECHO_N "(cached) $ECHO_C" >&6
11601 else
11602   cat >conftest.$ac_ext <<_ACEOF
11603 /* confdefs.h.  */
11604 _ACEOF
11605 cat confdefs.h >>conftest.$ac_ext
11606 cat >>conftest.$ac_ext <<_ACEOF
11607 /* end confdefs.h.  */
11608 #include <time.h>
11609 #ifndef tzname /* For SGI.  */
11610 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11611 #endif
11612
11613 int
11614 main ()
11615 {
11616 atoi(*tzname);
11617   ;
11618   return 0;
11619 }
11620 _ACEOF
11621 rm -f conftest.$ac_objext conftest$ac_exeext
11622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11623   (eval $ac_link) 2>conftest.er1
11624   ac_status=$?
11625   grep -v '^ *+' conftest.er1 >conftest.err
11626   rm -f conftest.er1
11627   cat conftest.err >&5
11628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11629   (exit $ac_status); } &&
11630          { ac_try='test -z "$ac_c_werror_flag"
11631                          || test ! -s conftest.err'
11632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11633   (eval $ac_try) 2>&5
11634   ac_status=$?
11635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11636   (exit $ac_status); }; } &&
11637          { ac_try='test -s conftest$ac_exeext'
11638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11639   (eval $ac_try) 2>&5
11640   ac_status=$?
11641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11642   (exit $ac_status); }; }; then
11643   ac_cv_var_tzname=yes
11644 else
11645   echo "$as_me: failed program was:" >&5
11646 sed 's/^/| /' conftest.$ac_ext >&5
11647
11648 ac_cv_var_tzname=no
11649 fi
11650 rm -f conftest.err conftest.$ac_objext \
11651       conftest$ac_exeext conftest.$ac_ext
11652 fi
11653 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11654 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11655 if test $ac_cv_var_tzname = yes; then
11656
11657 cat >>confdefs.h <<\_ACEOF
11658 #define HAVE_TZNAME 1
11659 _ACEOF
11660
11661 fi
11662
11663 echo "$as_me:$LINENO: checking for union semun" >&5
11664 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11665 if test "${ac_cv_type_union_semun+set}" = set; then
11666   echo $ECHO_N "(cached) $ECHO_C" >&6
11667 else
11668   cat >conftest.$ac_ext <<_ACEOF
11669 /* confdefs.h.  */
11670 _ACEOF
11671 cat confdefs.h >>conftest.$ac_ext
11672 cat >>conftest.$ac_ext <<_ACEOF
11673 /* end confdefs.h.  */
11674 #include <sys/types.h>
11675 #include <sys/ipc.h>
11676 #include <sys/sem.h>
11677
11678 int
11679 main ()
11680 {
11681 if ((union semun *) 0)
11682   return 0;
11683 if (sizeof (union semun))
11684   return 0;
11685   ;
11686   return 0;
11687 }
11688 _ACEOF
11689 rm -f conftest.$ac_objext
11690 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11691   (eval $ac_compile) 2>conftest.er1
11692   ac_status=$?
11693   grep -v '^ *+' conftest.er1 >conftest.err
11694   rm -f conftest.er1
11695   cat conftest.err >&5
11696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697   (exit $ac_status); } &&
11698          { ac_try='test -z "$ac_c_werror_flag"
11699                          || test ! -s conftest.err'
11700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11701   (eval $ac_try) 2>&5
11702   ac_status=$?
11703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11704   (exit $ac_status); }; } &&
11705          { ac_try='test -s conftest.$ac_objext'
11706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11707   (eval $ac_try) 2>&5
11708   ac_status=$?
11709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11710   (exit $ac_status); }; }; then
11711   ac_cv_type_union_semun=yes
11712 else
11713   echo "$as_me: failed program was:" >&5
11714 sed 's/^/| /' conftest.$ac_ext >&5
11715
11716 ac_cv_type_union_semun=no
11717 fi
11718 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11719 fi
11720 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11721 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11722 if test $ac_cv_type_union_semun = yes; then
11723
11724 cat >>confdefs.h <<_ACEOF
11725 #define HAVE_UNION_SEMUN 1
11726 _ACEOF
11727
11728
11729 fi
11730
11731 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11732 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11733 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11734   echo $ECHO_N "(cached) $ECHO_C" >&6
11735 else
11736   cat >conftest.$ac_ext <<_ACEOF
11737 /* confdefs.h.  */
11738 _ACEOF
11739 cat confdefs.h >>conftest.$ac_ext
11740 cat >>conftest.$ac_ext <<_ACEOF
11741 /* end confdefs.h.  */
11742 #include <sys/types.h>
11743 #ifdef HAVE_SYS_UN_H
11744 #include <sys/un.h>
11745 #endif
11746
11747
11748 int
11749 main ()
11750 {
11751 if ((struct sockaddr_un *) 0)
11752   return 0;
11753 if (sizeof (struct sockaddr_un))
11754   return 0;
11755   ;
11756   return 0;
11757 }
11758 _ACEOF
11759 rm -f conftest.$ac_objext
11760 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11761   (eval $ac_compile) 2>conftest.er1
11762   ac_status=$?
11763   grep -v '^ *+' conftest.er1 >conftest.err
11764   rm -f conftest.er1
11765   cat conftest.err >&5
11766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11767   (exit $ac_status); } &&
11768          { ac_try='test -z "$ac_c_werror_flag"
11769                          || test ! -s conftest.err'
11770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11771   (eval $ac_try) 2>&5
11772   ac_status=$?
11773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11774   (exit $ac_status); }; } &&
11775          { ac_try='test -s conftest.$ac_objext'
11776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11777   (eval $ac_try) 2>&5
11778   ac_status=$?
11779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11780   (exit $ac_status); }; }; then
11781   ac_cv_type_struct_sockaddr_un=yes
11782 else
11783   echo "$as_me: failed program was:" >&5
11784 sed 's/^/| /' conftest.$ac_ext >&5
11785
11786 ac_cv_type_struct_sockaddr_un=no
11787 fi
11788 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11789 fi
11790 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11791 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11792 if test $ac_cv_type_struct_sockaddr_un = yes; then
11793
11794 cat >>confdefs.h <<_ACEOF
11795 #define HAVE_STRUCT_SOCKADDR_UN 1
11796 _ACEOF
11797
11798
11799 cat >>confdefs.h <<\_ACEOF
11800 #define HAVE_UNIX_SOCKETS 1
11801 _ACEOF
11802
11803 fi
11804
11805 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11806 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11807 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11808   echo $ECHO_N "(cached) $ECHO_C" >&6
11809 else
11810   cat >conftest.$ac_ext <<_ACEOF
11811 /* confdefs.h.  */
11812 _ACEOF
11813 cat confdefs.h >>conftest.$ac_ext
11814 cat >>conftest.$ac_ext <<_ACEOF
11815 /* end confdefs.h.  */
11816 #include <sys/types.h>
11817 #ifdef HAVE_SYS_SOCKET_H
11818 #include <sys/socket.h>
11819 #endif
11820
11821
11822 int
11823 main ()
11824 {
11825 if ((struct sockaddr_storage *) 0)
11826   return 0;
11827 if (sizeof (struct sockaddr_storage))
11828   return 0;
11829   ;
11830   return 0;
11831 }
11832 _ACEOF
11833 rm -f conftest.$ac_objext
11834 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11835   (eval $ac_compile) 2>conftest.er1
11836   ac_status=$?
11837   grep -v '^ *+' conftest.er1 >conftest.err
11838   rm -f conftest.er1
11839   cat conftest.err >&5
11840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11841   (exit $ac_status); } &&
11842          { ac_try='test -z "$ac_c_werror_flag"
11843                          || test ! -s conftest.err'
11844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11845   (eval $ac_try) 2>&5
11846   ac_status=$?
11847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11848   (exit $ac_status); }; } &&
11849          { ac_try='test -s conftest.$ac_objext'
11850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11851   (eval $ac_try) 2>&5
11852   ac_status=$?
11853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11854   (exit $ac_status); }; }; then
11855   ac_cv_type_struct_sockaddr_storage=yes
11856 else
11857   echo "$as_me: failed program was:" >&5
11858 sed 's/^/| /' conftest.$ac_ext >&5
11859
11860 ac_cv_type_struct_sockaddr_storage=no
11861 fi
11862 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11863 fi
11864 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11865 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11866 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11867
11868 cat >>confdefs.h <<_ACEOF
11869 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11870 _ACEOF
11871
11872
11873 fi
11874
11875 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11876 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11877 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11878   echo $ECHO_N "(cached) $ECHO_C" >&6
11879 else
11880   cat >conftest.$ac_ext <<_ACEOF
11881 /* confdefs.h.  */
11882 _ACEOF
11883 cat confdefs.h >>conftest.$ac_ext
11884 cat >>conftest.$ac_ext <<_ACEOF
11885 /* end confdefs.h.  */
11886 #include <sys/types.h>
11887 #ifdef HAVE_SYS_SOCKET_H
11888 #include <sys/socket.h>
11889 #endif
11890
11891
11892 int
11893 main ()
11894 {
11895 static struct sockaddr_storage ac_aggr;
11896 if (ac_aggr.ss_family)
11897 return 0;
11898   ;
11899   return 0;
11900 }
11901 _ACEOF
11902 rm -f conftest.$ac_objext
11903 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11904   (eval $ac_compile) 2>conftest.er1
11905   ac_status=$?
11906   grep -v '^ *+' conftest.er1 >conftest.err
11907   rm -f conftest.er1
11908   cat conftest.err >&5
11909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11910   (exit $ac_status); } &&
11911          { ac_try='test -z "$ac_c_werror_flag"
11912                          || test ! -s conftest.err'
11913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11914   (eval $ac_try) 2>&5
11915   ac_status=$?
11916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11917   (exit $ac_status); }; } &&
11918          { ac_try='test -s conftest.$ac_objext'
11919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11920   (eval $ac_try) 2>&5
11921   ac_status=$?
11922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11923   (exit $ac_status); }; }; then
11924   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11925 else
11926   echo "$as_me: failed program was:" >&5
11927 sed 's/^/| /' conftest.$ac_ext >&5
11928
11929 cat >conftest.$ac_ext <<_ACEOF
11930 /* confdefs.h.  */
11931 _ACEOF
11932 cat confdefs.h >>conftest.$ac_ext
11933 cat >>conftest.$ac_ext <<_ACEOF
11934 /* end confdefs.h.  */
11935 #include <sys/types.h>
11936 #ifdef HAVE_SYS_SOCKET_H
11937 #include <sys/socket.h>
11938 #endif
11939
11940
11941 int
11942 main ()
11943 {
11944 static struct sockaddr_storage ac_aggr;
11945 if (sizeof ac_aggr.ss_family)
11946 return 0;
11947   ;
11948   return 0;
11949 }
11950 _ACEOF
11951 rm -f conftest.$ac_objext
11952 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11953   (eval $ac_compile) 2>conftest.er1
11954   ac_status=$?
11955   grep -v '^ *+' conftest.er1 >conftest.err
11956   rm -f conftest.er1
11957   cat conftest.err >&5
11958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11959   (exit $ac_status); } &&
11960          { ac_try='test -z "$ac_c_werror_flag"
11961                          || test ! -s conftest.err'
11962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11963   (eval $ac_try) 2>&5
11964   ac_status=$?
11965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11966   (exit $ac_status); }; } &&
11967          { ac_try='test -s conftest.$ac_objext'
11968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11969   (eval $ac_try) 2>&5
11970   ac_status=$?
11971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11972   (exit $ac_status); }; }; then
11973   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11974 else
11975   echo "$as_me: failed program was:" >&5
11976 sed 's/^/| /' conftest.$ac_ext >&5
11977
11978 ac_cv_member_struct_sockaddr_storage_ss_family=no
11979 fi
11980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11981 fi
11982 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11983 fi
11984 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11985 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11986 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11987
11988 cat >>confdefs.h <<_ACEOF
11989 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11990 _ACEOF
11991
11992
11993 fi
11994 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11995 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11996 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11997   echo $ECHO_N "(cached) $ECHO_C" >&6
11998 else
11999   cat >conftest.$ac_ext <<_ACEOF
12000 /* confdefs.h.  */
12001 _ACEOF
12002 cat confdefs.h >>conftest.$ac_ext
12003 cat >>conftest.$ac_ext <<_ACEOF
12004 /* end confdefs.h.  */
12005 #include <sys/types.h>
12006 #ifdef HAVE_SYS_SOCKET_H
12007 #include <sys/socket.h>
12008 #endif
12009
12010
12011 int
12012 main ()
12013 {
12014 static struct sockaddr_storage ac_aggr;
12015 if (ac_aggr.__ss_family)
12016 return 0;
12017   ;
12018   return 0;
12019 }
12020 _ACEOF
12021 rm -f conftest.$ac_objext
12022 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12023   (eval $ac_compile) 2>conftest.er1
12024   ac_status=$?
12025   grep -v '^ *+' conftest.er1 >conftest.err
12026   rm -f conftest.er1
12027   cat conftest.err >&5
12028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12029   (exit $ac_status); } &&
12030          { ac_try='test -z "$ac_c_werror_flag"
12031                          || test ! -s conftest.err'
12032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12033   (eval $ac_try) 2>&5
12034   ac_status=$?
12035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12036   (exit $ac_status); }; } &&
12037          { ac_try='test -s conftest.$ac_objext'
12038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12039   (eval $ac_try) 2>&5
12040   ac_status=$?
12041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12042   (exit $ac_status); }; }; then
12043   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12044 else
12045   echo "$as_me: failed program was:" >&5
12046 sed 's/^/| /' conftest.$ac_ext >&5
12047
12048 cat >conftest.$ac_ext <<_ACEOF
12049 /* confdefs.h.  */
12050 _ACEOF
12051 cat confdefs.h >>conftest.$ac_ext
12052 cat >>conftest.$ac_ext <<_ACEOF
12053 /* end confdefs.h.  */
12054 #include <sys/types.h>
12055 #ifdef HAVE_SYS_SOCKET_H
12056 #include <sys/socket.h>
12057 #endif
12058
12059
12060 int
12061 main ()
12062 {
12063 static struct sockaddr_storage ac_aggr;
12064 if (sizeof ac_aggr.__ss_family)
12065 return 0;
12066   ;
12067   return 0;
12068 }
12069 _ACEOF
12070 rm -f conftest.$ac_objext
12071 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12072   (eval $ac_compile) 2>conftest.er1
12073   ac_status=$?
12074   grep -v '^ *+' conftest.er1 >conftest.err
12075   rm -f conftest.er1
12076   cat conftest.err >&5
12077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12078   (exit $ac_status); } &&
12079          { ac_try='test -z "$ac_c_werror_flag"
12080                          || test ! -s conftest.err'
12081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12082   (eval $ac_try) 2>&5
12083   ac_status=$?
12084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12085   (exit $ac_status); }; } &&
12086          { ac_try='test -s conftest.$ac_objext'
12087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12088   (eval $ac_try) 2>&5
12089   ac_status=$?
12090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12091   (exit $ac_status); }; }; then
12092   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12093 else
12094   echo "$as_me: failed program was:" >&5
12095 sed 's/^/| /' conftest.$ac_ext >&5
12096
12097 ac_cv_member_struct_sockaddr_storage___ss_family=no
12098 fi
12099 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12100 fi
12101 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12102 fi
12103 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12104 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12105 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12106
12107 cat >>confdefs.h <<_ACEOF
12108 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12109 _ACEOF
12110
12111
12112 fi
12113 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12114 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12115 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12116   echo $ECHO_N "(cached) $ECHO_C" >&6
12117 else
12118   cat >conftest.$ac_ext <<_ACEOF
12119 /* confdefs.h.  */
12120 _ACEOF
12121 cat confdefs.h >>conftest.$ac_ext
12122 cat >>conftest.$ac_ext <<_ACEOF
12123 /* end confdefs.h.  */
12124 #include <sys/types.h>
12125 #ifdef HAVE_SYS_SOCKET_H
12126 #include <sys/socket.h>
12127 #endif
12128
12129
12130 int
12131 main ()
12132 {
12133 static struct sockaddr_storage ac_aggr;
12134 if (ac_aggr.ss_len)
12135 return 0;
12136   ;
12137   return 0;
12138 }
12139 _ACEOF
12140 rm -f conftest.$ac_objext
12141 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12142   (eval $ac_compile) 2>conftest.er1
12143   ac_status=$?
12144   grep -v '^ *+' conftest.er1 >conftest.err
12145   rm -f conftest.er1
12146   cat conftest.err >&5
12147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12148   (exit $ac_status); } &&
12149          { ac_try='test -z "$ac_c_werror_flag"
12150                          || test ! -s conftest.err'
12151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12152   (eval $ac_try) 2>&5
12153   ac_status=$?
12154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12155   (exit $ac_status); }; } &&
12156          { ac_try='test -s conftest.$ac_objext'
12157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12158   (eval $ac_try) 2>&5
12159   ac_status=$?
12160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12161   (exit $ac_status); }; }; then
12162   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12163 else
12164   echo "$as_me: failed program was:" >&5
12165 sed 's/^/| /' conftest.$ac_ext >&5
12166
12167 cat >conftest.$ac_ext <<_ACEOF
12168 /* confdefs.h.  */
12169 _ACEOF
12170 cat confdefs.h >>conftest.$ac_ext
12171 cat >>conftest.$ac_ext <<_ACEOF
12172 /* end confdefs.h.  */
12173 #include <sys/types.h>
12174 #ifdef HAVE_SYS_SOCKET_H
12175 #include <sys/socket.h>
12176 #endif
12177
12178
12179 int
12180 main ()
12181 {
12182 static struct sockaddr_storage ac_aggr;
12183 if (sizeof ac_aggr.ss_len)
12184 return 0;
12185   ;
12186   return 0;
12187 }
12188 _ACEOF
12189 rm -f conftest.$ac_objext
12190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12191   (eval $ac_compile) 2>conftest.er1
12192   ac_status=$?
12193   grep -v '^ *+' conftest.er1 >conftest.err
12194   rm -f conftest.er1
12195   cat conftest.err >&5
12196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12197   (exit $ac_status); } &&
12198          { ac_try='test -z "$ac_c_werror_flag"
12199                          || test ! -s conftest.err'
12200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12201   (eval $ac_try) 2>&5
12202   ac_status=$?
12203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12204   (exit $ac_status); }; } &&
12205          { ac_try='test -s conftest.$ac_objext'
12206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12207   (eval $ac_try) 2>&5
12208   ac_status=$?
12209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12210   (exit $ac_status); }; }; then
12211   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12212 else
12213   echo "$as_me: failed program was:" >&5
12214 sed 's/^/| /' conftest.$ac_ext >&5
12215
12216 ac_cv_member_struct_sockaddr_storage_ss_len=no
12217 fi
12218 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12219 fi
12220 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12221 fi
12222 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12223 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12224 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12225
12226 cat >>confdefs.h <<_ACEOF
12227 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12228 _ACEOF
12229
12230
12231 fi
12232 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12233 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12234 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12235   echo $ECHO_N "(cached) $ECHO_C" >&6
12236 else
12237   cat >conftest.$ac_ext <<_ACEOF
12238 /* confdefs.h.  */
12239 _ACEOF
12240 cat confdefs.h >>conftest.$ac_ext
12241 cat >>conftest.$ac_ext <<_ACEOF
12242 /* end confdefs.h.  */
12243 #include <sys/types.h>
12244 #ifdef HAVE_SYS_SOCKET_H
12245 #include <sys/socket.h>
12246 #endif
12247
12248
12249 int
12250 main ()
12251 {
12252 static struct sockaddr_storage ac_aggr;
12253 if (ac_aggr.__ss_len)
12254 return 0;
12255   ;
12256   return 0;
12257 }
12258 _ACEOF
12259 rm -f conftest.$ac_objext
12260 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12261   (eval $ac_compile) 2>conftest.er1
12262   ac_status=$?
12263   grep -v '^ *+' conftest.er1 >conftest.err
12264   rm -f conftest.er1
12265   cat conftest.err >&5
12266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12267   (exit $ac_status); } &&
12268          { ac_try='test -z "$ac_c_werror_flag"
12269                          || test ! -s conftest.err'
12270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12271   (eval $ac_try) 2>&5
12272   ac_status=$?
12273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12274   (exit $ac_status); }; } &&
12275          { ac_try='test -s conftest.$ac_objext'
12276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12277   (eval $ac_try) 2>&5
12278   ac_status=$?
12279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12280   (exit $ac_status); }; }; then
12281   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12282 else
12283   echo "$as_me: failed program was:" >&5
12284 sed 's/^/| /' conftest.$ac_ext >&5
12285
12286 cat >conftest.$ac_ext <<_ACEOF
12287 /* confdefs.h.  */
12288 _ACEOF
12289 cat confdefs.h >>conftest.$ac_ext
12290 cat >>conftest.$ac_ext <<_ACEOF
12291 /* end confdefs.h.  */
12292 #include <sys/types.h>
12293 #ifdef HAVE_SYS_SOCKET_H
12294 #include <sys/socket.h>
12295 #endif
12296
12297
12298 int
12299 main ()
12300 {
12301 static struct sockaddr_storage ac_aggr;
12302 if (sizeof ac_aggr.__ss_len)
12303 return 0;
12304   ;
12305   return 0;
12306 }
12307 _ACEOF
12308 rm -f conftest.$ac_objext
12309 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12310   (eval $ac_compile) 2>conftest.er1
12311   ac_status=$?
12312   grep -v '^ *+' conftest.er1 >conftest.err
12313   rm -f conftest.er1
12314   cat conftest.err >&5
12315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12316   (exit $ac_status); } &&
12317          { ac_try='test -z "$ac_c_werror_flag"
12318                          || test ! -s conftest.err'
12319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12320   (eval $ac_try) 2>&5
12321   ac_status=$?
12322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323   (exit $ac_status); }; } &&
12324          { ac_try='test -s conftest.$ac_objext'
12325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12326   (eval $ac_try) 2>&5
12327   ac_status=$?
12328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329   (exit $ac_status); }; }; then
12330   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12331 else
12332   echo "$as_me: failed program was:" >&5
12333 sed 's/^/| /' conftest.$ac_ext >&5
12334
12335 ac_cv_member_struct_sockaddr_storage___ss_len=no
12336 fi
12337 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12338 fi
12339 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12340 fi
12341 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12342 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12343 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12344
12345 cat >>confdefs.h <<_ACEOF
12346 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12347 _ACEOF
12348
12349
12350 fi
12351 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12352 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12353 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12354   echo $ECHO_N "(cached) $ECHO_C" >&6
12355 else
12356   cat >conftest.$ac_ext <<_ACEOF
12357 /* confdefs.h.  */
12358 _ACEOF
12359 cat confdefs.h >>conftest.$ac_ext
12360 cat >>conftest.$ac_ext <<_ACEOF
12361 /* end confdefs.h.  */
12362 #include <sys/types.h>
12363 #ifdef HAVE_SYS_SOCKET_H
12364 #include <sys/socket.h>
12365 #endif
12366
12367
12368 int
12369 main ()
12370 {
12371 static struct sockaddr ac_aggr;
12372 if (ac_aggr.sa_len)
12373 return 0;
12374   ;
12375   return 0;
12376 }
12377 _ACEOF
12378 rm -f conftest.$ac_objext
12379 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12380   (eval $ac_compile) 2>conftest.er1
12381   ac_status=$?
12382   grep -v '^ *+' conftest.er1 >conftest.err
12383   rm -f conftest.er1
12384   cat conftest.err >&5
12385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12386   (exit $ac_status); } &&
12387          { ac_try='test -z "$ac_c_werror_flag"
12388                          || test ! -s conftest.err'
12389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12390   (eval $ac_try) 2>&5
12391   ac_status=$?
12392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12393   (exit $ac_status); }; } &&
12394          { ac_try='test -s conftest.$ac_objext'
12395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12396   (eval $ac_try) 2>&5
12397   ac_status=$?
12398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12399   (exit $ac_status); }; }; then
12400   ac_cv_member_struct_sockaddr_sa_len=yes
12401 else
12402   echo "$as_me: failed program was:" >&5
12403 sed 's/^/| /' conftest.$ac_ext >&5
12404
12405 cat >conftest.$ac_ext <<_ACEOF
12406 /* confdefs.h.  */
12407 _ACEOF
12408 cat confdefs.h >>conftest.$ac_ext
12409 cat >>conftest.$ac_ext <<_ACEOF
12410 /* end confdefs.h.  */
12411 #include <sys/types.h>
12412 #ifdef HAVE_SYS_SOCKET_H
12413 #include <sys/socket.h>
12414 #endif
12415
12416
12417 int
12418 main ()
12419 {
12420 static struct sockaddr ac_aggr;
12421 if (sizeof ac_aggr.sa_len)
12422 return 0;
12423   ;
12424   return 0;
12425 }
12426 _ACEOF
12427 rm -f conftest.$ac_objext
12428 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12429   (eval $ac_compile) 2>conftest.er1
12430   ac_status=$?
12431   grep -v '^ *+' conftest.er1 >conftest.err
12432   rm -f conftest.er1
12433   cat conftest.err >&5
12434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12435   (exit $ac_status); } &&
12436          { ac_try='test -z "$ac_c_werror_flag"
12437                          || test ! -s conftest.err'
12438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12439   (eval $ac_try) 2>&5
12440   ac_status=$?
12441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12442   (exit $ac_status); }; } &&
12443          { ac_try='test -s conftest.$ac_objext'
12444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12445   (eval $ac_try) 2>&5
12446   ac_status=$?
12447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12448   (exit $ac_status); }; }; then
12449   ac_cv_member_struct_sockaddr_sa_len=yes
12450 else
12451   echo "$as_me: failed program was:" >&5
12452 sed 's/^/| /' conftest.$ac_ext >&5
12453
12454 ac_cv_member_struct_sockaddr_sa_len=no
12455 fi
12456 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12457 fi
12458 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12459 fi
12460 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12461 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12462 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12463
12464 cat >>confdefs.h <<_ACEOF
12465 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12466 _ACEOF
12467
12468
12469 fi
12470
12471 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12472 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12473 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12474   echo $ECHO_N "(cached) $ECHO_C" >&6
12475 else
12476   cat >conftest.$ac_ext <<_ACEOF
12477 /* confdefs.h.  */
12478 _ACEOF
12479 cat confdefs.h >>conftest.$ac_ext
12480 cat >>conftest.$ac_ext <<_ACEOF
12481 /* end confdefs.h.  */
12482 #include <sys/types.h>
12483 #include <sys/socket.h>
12484 #include <netdb.h>
12485
12486
12487 int
12488 main ()
12489 {
12490 if ((struct addrinfo *) 0)
12491   return 0;
12492 if (sizeof (struct addrinfo))
12493   return 0;
12494   ;
12495   return 0;
12496 }
12497 _ACEOF
12498 rm -f conftest.$ac_objext
12499 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12500   (eval $ac_compile) 2>conftest.er1
12501   ac_status=$?
12502   grep -v '^ *+' conftest.er1 >conftest.err
12503   rm -f conftest.er1
12504   cat conftest.err >&5
12505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12506   (exit $ac_status); } &&
12507          { ac_try='test -z "$ac_c_werror_flag"
12508                          || test ! -s conftest.err'
12509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12510   (eval $ac_try) 2>&5
12511   ac_status=$?
12512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12513   (exit $ac_status); }; } &&
12514          { ac_try='test -s conftest.$ac_objext'
12515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12516   (eval $ac_try) 2>&5
12517   ac_status=$?
12518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12519   (exit $ac_status); }; }; then
12520   ac_cv_type_struct_addrinfo=yes
12521 else
12522   echo "$as_me: failed program was:" >&5
12523 sed 's/^/| /' conftest.$ac_ext >&5
12524
12525 ac_cv_type_struct_addrinfo=no
12526 fi
12527 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12528 fi
12529 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12530 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12531 if test $ac_cv_type_struct_addrinfo = yes; then
12532
12533 cat >>confdefs.h <<_ACEOF
12534 #define HAVE_STRUCT_ADDRINFO 1
12535 _ACEOF
12536
12537
12538 fi
12539
12540
12541 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12542 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12543 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12544   echo $ECHO_N "(cached) $ECHO_C" >&6
12545 else
12546   cat >conftest.$ac_ext <<_ACEOF
12547 /* confdefs.h.  */
12548 _ACEOF
12549 cat confdefs.h >>conftest.$ac_ext
12550 cat >>conftest.$ac_ext <<_ACEOF
12551 /* end confdefs.h.  */
12552 #include <sys/param.h>
12553 #include <sys/types.h>
12554 #include <sys/socket.h>
12555 #include <sys/ucred.h>
12556
12557 int
12558 main ()
12559 {
12560 if ((struct cmsgcred *) 0)
12561   return 0;
12562 if (sizeof (struct cmsgcred))
12563   return 0;
12564   ;
12565   return 0;
12566 }
12567 _ACEOF
12568 rm -f conftest.$ac_objext
12569 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12570   (eval $ac_compile) 2>conftest.er1
12571   ac_status=$?
12572   grep -v '^ *+' conftest.er1 >conftest.err
12573   rm -f conftest.er1
12574   cat conftest.err >&5
12575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12576   (exit $ac_status); } &&
12577          { ac_try='test -z "$ac_c_werror_flag"
12578                          || test ! -s conftest.err'
12579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12580   (eval $ac_try) 2>&5
12581   ac_status=$?
12582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12583   (exit $ac_status); }; } &&
12584          { ac_try='test -s conftest.$ac_objext'
12585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12586   (eval $ac_try) 2>&5
12587   ac_status=$?
12588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12589   (exit $ac_status); }; }; then
12590   ac_cv_type_struct_cmsgcred=yes
12591 else
12592   echo "$as_me: failed program was:" >&5
12593 sed 's/^/| /' conftest.$ac_ext >&5
12594
12595 ac_cv_type_struct_cmsgcred=no
12596 fi
12597 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12598 fi
12599 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12600 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12601 if test $ac_cv_type_struct_cmsgcred = yes; then
12602
12603 cat >>confdefs.h <<_ACEOF
12604 #define HAVE_STRUCT_CMSGCRED 1
12605 _ACEOF
12606
12607
12608 fi
12609 echo "$as_me:$LINENO: checking for struct fcred" >&5
12610 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12611 if test "${ac_cv_type_struct_fcred+set}" = set; then
12612   echo $ECHO_N "(cached) $ECHO_C" >&6
12613 else
12614   cat >conftest.$ac_ext <<_ACEOF
12615 /* confdefs.h.  */
12616 _ACEOF
12617 cat confdefs.h >>conftest.$ac_ext
12618 cat >>conftest.$ac_ext <<_ACEOF
12619 /* end confdefs.h.  */
12620 #include <sys/param.h>
12621 #include <sys/types.h>
12622 #include <sys/socket.h>
12623 #include <sys/ucred.h>
12624
12625 int
12626 main ()
12627 {
12628 if ((struct fcred *) 0)
12629   return 0;
12630 if (sizeof (struct fcred))
12631   return 0;
12632   ;
12633   return 0;
12634 }
12635 _ACEOF
12636 rm -f conftest.$ac_objext
12637 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12638   (eval $ac_compile) 2>conftest.er1
12639   ac_status=$?
12640   grep -v '^ *+' conftest.er1 >conftest.err
12641   rm -f conftest.er1
12642   cat conftest.err >&5
12643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12644   (exit $ac_status); } &&
12645          { ac_try='test -z "$ac_c_werror_flag"
12646                          || test ! -s conftest.err'
12647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12648   (eval $ac_try) 2>&5
12649   ac_status=$?
12650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12651   (exit $ac_status); }; } &&
12652          { ac_try='test -s conftest.$ac_objext'
12653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12654   (eval $ac_try) 2>&5
12655   ac_status=$?
12656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12657   (exit $ac_status); }; }; then
12658   ac_cv_type_struct_fcred=yes
12659 else
12660   echo "$as_me: failed program was:" >&5
12661 sed 's/^/| /' conftest.$ac_ext >&5
12662
12663 ac_cv_type_struct_fcred=no
12664 fi
12665 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12666 fi
12667 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12668 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12669 if test $ac_cv_type_struct_fcred = yes; then
12670
12671 cat >>confdefs.h <<_ACEOF
12672 #define HAVE_STRUCT_FCRED 1
12673 _ACEOF
12674
12675
12676 fi
12677 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12678 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12679 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12680   echo $ECHO_N "(cached) $ECHO_C" >&6
12681 else
12682   cat >conftest.$ac_ext <<_ACEOF
12683 /* confdefs.h.  */
12684 _ACEOF
12685 cat confdefs.h >>conftest.$ac_ext
12686 cat >>conftest.$ac_ext <<_ACEOF
12687 /* end confdefs.h.  */
12688 #include <sys/param.h>
12689 #include <sys/types.h>
12690 #include <sys/socket.h>
12691 #include <sys/ucred.h>
12692
12693 int
12694 main ()
12695 {
12696 if ((struct sockcred *) 0)
12697   return 0;
12698 if (sizeof (struct sockcred))
12699   return 0;
12700   ;
12701   return 0;
12702 }
12703 _ACEOF
12704 rm -f conftest.$ac_objext
12705 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12706   (eval $ac_compile) 2>conftest.er1
12707   ac_status=$?
12708   grep -v '^ *+' conftest.er1 >conftest.err
12709   rm -f conftest.er1
12710   cat conftest.err >&5
12711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12712   (exit $ac_status); } &&
12713          { ac_try='test -z "$ac_c_werror_flag"
12714                          || test ! -s conftest.err'
12715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12716   (eval $ac_try) 2>&5
12717   ac_status=$?
12718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12719   (exit $ac_status); }; } &&
12720          { ac_try='test -s conftest.$ac_objext'
12721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12722   (eval $ac_try) 2>&5
12723   ac_status=$?
12724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12725   (exit $ac_status); }; }; then
12726   ac_cv_type_struct_sockcred=yes
12727 else
12728   echo "$as_me: failed program was:" >&5
12729 sed 's/^/| /' conftest.$ac_ext >&5
12730
12731 ac_cv_type_struct_sockcred=no
12732 fi
12733 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12734 fi
12735 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12736 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12737 if test $ac_cv_type_struct_sockcred = yes; then
12738
12739 cat >>confdefs.h <<_ACEOF
12740 #define HAVE_STRUCT_SOCKCRED 1
12741 _ACEOF
12742
12743
12744 fi
12745
12746
12747 echo "$as_me:$LINENO: checking for struct option" >&5
12748 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12749 if test "${ac_cv_type_struct_option+set}" = set; then
12750   echo $ECHO_N "(cached) $ECHO_C" >&6
12751 else
12752   cat >conftest.$ac_ext <<_ACEOF
12753 /* confdefs.h.  */
12754 _ACEOF
12755 cat confdefs.h >>conftest.$ac_ext
12756 cat >>conftest.$ac_ext <<_ACEOF
12757 /* end confdefs.h.  */
12758 #ifdef HAVE_GETOPT_H
12759 #include <getopt.h>
12760 #endif
12761
12762 int
12763 main ()
12764 {
12765 if ((struct option *) 0)
12766   return 0;
12767 if (sizeof (struct option))
12768   return 0;
12769   ;
12770   return 0;
12771 }
12772 _ACEOF
12773 rm -f conftest.$ac_objext
12774 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12775   (eval $ac_compile) 2>conftest.er1
12776   ac_status=$?
12777   grep -v '^ *+' conftest.er1 >conftest.err
12778   rm -f conftest.er1
12779   cat conftest.err >&5
12780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12781   (exit $ac_status); } &&
12782          { ac_try='test -z "$ac_c_werror_flag"
12783                          || test ! -s conftest.err'
12784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12785   (eval $ac_try) 2>&5
12786   ac_status=$?
12787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12788   (exit $ac_status); }; } &&
12789          { ac_try='test -s conftest.$ac_objext'
12790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12791   (eval $ac_try) 2>&5
12792   ac_status=$?
12793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12794   (exit $ac_status); }; }; then
12795   ac_cv_type_struct_option=yes
12796 else
12797   echo "$as_me: failed program was:" >&5
12798 sed 's/^/| /' conftest.$ac_ext >&5
12799
12800 ac_cv_type_struct_option=no
12801 fi
12802 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12803 fi
12804 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12805 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12806 if test $ac_cv_type_struct_option = yes; then
12807
12808 cat >>confdefs.h <<_ACEOF
12809 #define HAVE_STRUCT_OPTION 1
12810 _ACEOF
12811
12812
12813 fi
12814
12815
12816 if test "$with_zlib" = yes; then
12817   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12818   # did not).  While we could work around the lack of z_streamp, it
12819   # seems unwise to encourage people to use such old zlib versions...
12820   echo "$as_me:$LINENO: checking for z_streamp" >&5
12821 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12822 if test "${ac_cv_type_z_streamp+set}" = set; then
12823   echo $ECHO_N "(cached) $ECHO_C" >&6
12824 else
12825   cat >conftest.$ac_ext <<_ACEOF
12826 /* confdefs.h.  */
12827 _ACEOF
12828 cat confdefs.h >>conftest.$ac_ext
12829 cat >>conftest.$ac_ext <<_ACEOF
12830 /* end confdefs.h.  */
12831 #include <zlib.h>
12832
12833 int
12834 main ()
12835 {
12836 if ((z_streamp *) 0)
12837   return 0;
12838 if (sizeof (z_streamp))
12839   return 0;
12840   ;
12841   return 0;
12842 }
12843 _ACEOF
12844 rm -f conftest.$ac_objext
12845 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12846   (eval $ac_compile) 2>conftest.er1
12847   ac_status=$?
12848   grep -v '^ *+' conftest.er1 >conftest.err
12849   rm -f conftest.er1
12850   cat conftest.err >&5
12851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12852   (exit $ac_status); } &&
12853          { ac_try='test -z "$ac_c_werror_flag"
12854                          || test ! -s conftest.err'
12855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12856   (eval $ac_try) 2>&5
12857   ac_status=$?
12858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12859   (exit $ac_status); }; } &&
12860          { ac_try='test -s conftest.$ac_objext'
12861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12862   (eval $ac_try) 2>&5
12863   ac_status=$?
12864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12865   (exit $ac_status); }; }; then
12866   ac_cv_type_z_streamp=yes
12867 else
12868   echo "$as_me: failed program was:" >&5
12869 sed 's/^/| /' conftest.$ac_ext >&5
12870
12871 ac_cv_type_z_streamp=no
12872 fi
12873 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12874 fi
12875 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12876 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12877 if test $ac_cv_type_z_streamp = yes; then
12878   :
12879 else
12880   { { echo "$as_me:$LINENO: error: zlib version is too old
12881 Use --without-zlib to disable zlib support." >&5
12882 echo "$as_me: error: zlib version is too old
12883 Use --without-zlib to disable zlib support." >&2;}
12884    { (exit 1); exit 1; }; }
12885 fi
12886
12887 fi
12888
12889 if test "$with_krb5" = yes; then
12890 # Check for differences between MIT and Heimdal (KTH) releases
12891   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12892 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12893 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12894   echo $ECHO_N "(cached) $ECHO_C" >&6
12895 else
12896   cat >conftest.$ac_ext <<_ACEOF
12897 /* confdefs.h.  */
12898 _ACEOF
12899 cat confdefs.h >>conftest.$ac_ext
12900 cat >>conftest.$ac_ext <<_ACEOF
12901 /* end confdefs.h.  */
12902 #include <krb5.h>
12903
12904 int
12905 main ()
12906 {
12907 static krb5_ticket ac_aggr;
12908 if (ac_aggr.enc_part2)
12909 return 0;
12910   ;
12911   return 0;
12912 }
12913 _ACEOF
12914 rm -f conftest.$ac_objext
12915 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12916   (eval $ac_compile) 2>conftest.er1
12917   ac_status=$?
12918   grep -v '^ *+' conftest.er1 >conftest.err
12919   rm -f conftest.er1
12920   cat conftest.err >&5
12921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922   (exit $ac_status); } &&
12923          { ac_try='test -z "$ac_c_werror_flag"
12924                          || test ! -s conftest.err'
12925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12926   (eval $ac_try) 2>&5
12927   ac_status=$?
12928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929   (exit $ac_status); }; } &&
12930          { ac_try='test -s conftest.$ac_objext'
12931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12932   (eval $ac_try) 2>&5
12933   ac_status=$?
12934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12935   (exit $ac_status); }; }; then
12936   ac_cv_member_krb5_ticket_enc_part2=yes
12937 else
12938   echo "$as_me: failed program was:" >&5
12939 sed 's/^/| /' conftest.$ac_ext >&5
12940
12941 cat >conftest.$ac_ext <<_ACEOF
12942 /* confdefs.h.  */
12943 _ACEOF
12944 cat confdefs.h >>conftest.$ac_ext
12945 cat >>conftest.$ac_ext <<_ACEOF
12946 /* end confdefs.h.  */
12947 #include <krb5.h>
12948
12949 int
12950 main ()
12951 {
12952 static krb5_ticket ac_aggr;
12953 if (sizeof ac_aggr.enc_part2)
12954 return 0;
12955   ;
12956   return 0;
12957 }
12958 _ACEOF
12959 rm -f conftest.$ac_objext
12960 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12961   (eval $ac_compile) 2>conftest.er1
12962   ac_status=$?
12963   grep -v '^ *+' conftest.er1 >conftest.err
12964   rm -f conftest.er1
12965   cat conftest.err >&5
12966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12967   (exit $ac_status); } &&
12968          { ac_try='test -z "$ac_c_werror_flag"
12969                          || test ! -s conftest.err'
12970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12971   (eval $ac_try) 2>&5
12972   ac_status=$?
12973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12974   (exit $ac_status); }; } &&
12975          { ac_try='test -s conftest.$ac_objext'
12976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12977   (eval $ac_try) 2>&5
12978   ac_status=$?
12979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12980   (exit $ac_status); }; }; then
12981   ac_cv_member_krb5_ticket_enc_part2=yes
12982 else
12983   echo "$as_me: failed program was:" >&5
12984 sed 's/^/| /' conftest.$ac_ext >&5
12985
12986 ac_cv_member_krb5_ticket_enc_part2=no
12987 fi
12988 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12989 fi
12990 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12991 fi
12992 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12993 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12994 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12995
12996 cat >>confdefs.h <<_ACEOF
12997 #define HAVE_KRB5_TICKET_ENC_PART2 1
12998 _ACEOF
12999
13000
13001 else
13002   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
13003 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
13004 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
13005   echo $ECHO_N "(cached) $ECHO_C" >&6
13006 else
13007   cat >conftest.$ac_ext <<_ACEOF
13008 /* confdefs.h.  */
13009 _ACEOF
13010 cat confdefs.h >>conftest.$ac_ext
13011 cat >>conftest.$ac_ext <<_ACEOF
13012 /* end confdefs.h.  */
13013 #include <krb5.h>
13014
13015 int
13016 main ()
13017 {
13018 static krb5_ticket ac_aggr;
13019 if (ac_aggr.client)
13020 return 0;
13021   ;
13022   return 0;
13023 }
13024 _ACEOF
13025 rm -f conftest.$ac_objext
13026 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13027   (eval $ac_compile) 2>conftest.er1
13028   ac_status=$?
13029   grep -v '^ *+' conftest.er1 >conftest.err
13030   rm -f conftest.er1
13031   cat conftest.err >&5
13032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13033   (exit $ac_status); } &&
13034          { ac_try='test -z "$ac_c_werror_flag"
13035                          || test ! -s conftest.err'
13036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13037   (eval $ac_try) 2>&5
13038   ac_status=$?
13039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13040   (exit $ac_status); }; } &&
13041          { ac_try='test -s conftest.$ac_objext'
13042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13043   (eval $ac_try) 2>&5
13044   ac_status=$?
13045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13046   (exit $ac_status); }; }; then
13047   ac_cv_member_krb5_ticket_client=yes
13048 else
13049   echo "$as_me: failed program was:" >&5
13050 sed 's/^/| /' conftest.$ac_ext >&5
13051
13052 cat >conftest.$ac_ext <<_ACEOF
13053 /* confdefs.h.  */
13054 _ACEOF
13055 cat confdefs.h >>conftest.$ac_ext
13056 cat >>conftest.$ac_ext <<_ACEOF
13057 /* end confdefs.h.  */
13058 #include <krb5.h>
13059
13060 int
13061 main ()
13062 {
13063 static krb5_ticket ac_aggr;
13064 if (sizeof ac_aggr.client)
13065 return 0;
13066   ;
13067   return 0;
13068 }
13069 _ACEOF
13070 rm -f conftest.$ac_objext
13071 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13072   (eval $ac_compile) 2>conftest.er1
13073   ac_status=$?
13074   grep -v '^ *+' conftest.er1 >conftest.err
13075   rm -f conftest.er1
13076   cat conftest.err >&5
13077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13078   (exit $ac_status); } &&
13079          { ac_try='test -z "$ac_c_werror_flag"
13080                          || test ! -s conftest.err'
13081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13082   (eval $ac_try) 2>&5
13083   ac_status=$?
13084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13085   (exit $ac_status); }; } &&
13086          { ac_try='test -s conftest.$ac_objext'
13087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13088   (eval $ac_try) 2>&5
13089   ac_status=$?
13090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13091   (exit $ac_status); }; }; then
13092   ac_cv_member_krb5_ticket_client=yes
13093 else
13094   echo "$as_me: failed program was:" >&5
13095 sed 's/^/| /' conftest.$ac_ext >&5
13096
13097 ac_cv_member_krb5_ticket_client=no
13098 fi
13099 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13100 fi
13101 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13102 fi
13103 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13104 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13105 if test $ac_cv_member_krb5_ticket_client = yes; then
13106
13107 cat >>confdefs.h <<_ACEOF
13108 #define HAVE_KRB5_TICKET_CLIENT 1
13109 _ACEOF
13110
13111
13112 else
13113   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13114 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13115    { (exit 1); exit 1; }; }
13116 fi
13117
13118 fi
13119
13120   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13121 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13122 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13123   echo $ECHO_N "(cached) $ECHO_C" >&6
13124 else
13125   cat >conftest.$ac_ext <<_ACEOF
13126 /* confdefs.h.  */
13127 _ACEOF
13128 cat confdefs.h >>conftest.$ac_ext
13129 cat >>conftest.$ac_ext <<_ACEOF
13130 /* end confdefs.h.  */
13131 #include <krb5.h>
13132
13133 int
13134 main ()
13135 {
13136 static krb5_error ac_aggr;
13137 if (ac_aggr.text.data)
13138 return 0;
13139   ;
13140   return 0;
13141 }
13142 _ACEOF
13143 rm -f conftest.$ac_objext
13144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13145   (eval $ac_compile) 2>conftest.er1
13146   ac_status=$?
13147   grep -v '^ *+' conftest.er1 >conftest.err
13148   rm -f conftest.er1
13149   cat conftest.err >&5
13150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13151   (exit $ac_status); } &&
13152          { ac_try='test -z "$ac_c_werror_flag"
13153                          || test ! -s conftest.err'
13154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13155   (eval $ac_try) 2>&5
13156   ac_status=$?
13157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13158   (exit $ac_status); }; } &&
13159          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
13165   ac_cv_member_krb5_error_text_data=yes
13166 else
13167   echo "$as_me: failed program was:" >&5
13168 sed 's/^/| /' conftest.$ac_ext >&5
13169
13170 cat >conftest.$ac_ext <<_ACEOF
13171 /* confdefs.h.  */
13172 _ACEOF
13173 cat confdefs.h >>conftest.$ac_ext
13174 cat >>conftest.$ac_ext <<_ACEOF
13175 /* end confdefs.h.  */
13176 #include <krb5.h>
13177
13178 int
13179 main ()
13180 {
13181 static krb5_error ac_aggr;
13182 if (sizeof ac_aggr.text.data)
13183 return 0;
13184   ;
13185   return 0;
13186 }
13187 _ACEOF
13188 rm -f conftest.$ac_objext
13189 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13190   (eval $ac_compile) 2>conftest.er1
13191   ac_status=$?
13192   grep -v '^ *+' conftest.er1 >conftest.err
13193   rm -f conftest.er1
13194   cat conftest.err >&5
13195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13196   (exit $ac_status); } &&
13197          { ac_try='test -z "$ac_c_werror_flag"
13198                          || test ! -s conftest.err'
13199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13200   (eval $ac_try) 2>&5
13201   ac_status=$?
13202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13203   (exit $ac_status); }; } &&
13204          { ac_try='test -s conftest.$ac_objext'
13205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13206   (eval $ac_try) 2>&5
13207   ac_status=$?
13208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13209   (exit $ac_status); }; }; then
13210   ac_cv_member_krb5_error_text_data=yes
13211 else
13212   echo "$as_me: failed program was:" >&5
13213 sed 's/^/| /' conftest.$ac_ext >&5
13214
13215 ac_cv_member_krb5_error_text_data=no
13216 fi
13217 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13218 fi
13219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13220 fi
13221 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13222 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13223 if test $ac_cv_member_krb5_error_text_data = yes; then
13224
13225 cat >>confdefs.h <<_ACEOF
13226 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13227 _ACEOF
13228
13229
13230 else
13231   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13232 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13233 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13234   echo $ECHO_N "(cached) $ECHO_C" >&6
13235 else
13236   cat >conftest.$ac_ext <<_ACEOF
13237 /* confdefs.h.  */
13238 _ACEOF
13239 cat confdefs.h >>conftest.$ac_ext
13240 cat >>conftest.$ac_ext <<_ACEOF
13241 /* end confdefs.h.  */
13242 #include <krb5.h>
13243
13244 int
13245 main ()
13246 {
13247 static krb5_error ac_aggr;
13248 if (ac_aggr.e_data)
13249 return 0;
13250   ;
13251   return 0;
13252 }
13253 _ACEOF
13254 rm -f conftest.$ac_objext
13255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13256   (eval $ac_compile) 2>conftest.er1
13257   ac_status=$?
13258   grep -v '^ *+' conftest.er1 >conftest.err
13259   rm -f conftest.er1
13260   cat conftest.err >&5
13261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13262   (exit $ac_status); } &&
13263          { ac_try='test -z "$ac_c_werror_flag"
13264                          || test ! -s conftest.err'
13265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13266   (eval $ac_try) 2>&5
13267   ac_status=$?
13268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269   (exit $ac_status); }; } &&
13270          { ac_try='test -s conftest.$ac_objext'
13271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13272   (eval $ac_try) 2>&5
13273   ac_status=$?
13274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13275   (exit $ac_status); }; }; then
13276   ac_cv_member_krb5_error_e_data=yes
13277 else
13278   echo "$as_me: failed program was:" >&5
13279 sed 's/^/| /' conftest.$ac_ext >&5
13280
13281 cat >conftest.$ac_ext <<_ACEOF
13282 /* confdefs.h.  */
13283 _ACEOF
13284 cat confdefs.h >>conftest.$ac_ext
13285 cat >>conftest.$ac_ext <<_ACEOF
13286 /* end confdefs.h.  */
13287 #include <krb5.h>
13288
13289 int
13290 main ()
13291 {
13292 static krb5_error ac_aggr;
13293 if (sizeof ac_aggr.e_data)
13294 return 0;
13295   ;
13296   return 0;
13297 }
13298 _ACEOF
13299 rm -f conftest.$ac_objext
13300 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13301   (eval $ac_compile) 2>conftest.er1
13302   ac_status=$?
13303   grep -v '^ *+' conftest.er1 >conftest.err
13304   rm -f conftest.er1
13305   cat conftest.err >&5
13306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13307   (exit $ac_status); } &&
13308          { ac_try='test -z "$ac_c_werror_flag"
13309                          || test ! -s conftest.err'
13310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13311   (eval $ac_try) 2>&5
13312   ac_status=$?
13313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13314   (exit $ac_status); }; } &&
13315          { ac_try='test -s conftest.$ac_objext'
13316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13317   (eval $ac_try) 2>&5
13318   ac_status=$?
13319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13320   (exit $ac_status); }; }; then
13321   ac_cv_member_krb5_error_e_data=yes
13322 else
13323   echo "$as_me: failed program was:" >&5
13324 sed 's/^/| /' conftest.$ac_ext >&5
13325
13326 ac_cv_member_krb5_error_e_data=no
13327 fi
13328 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13329 fi
13330 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13331 fi
13332 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13333 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13334 if test $ac_cv_member_krb5_error_e_data = yes; then
13335
13336 cat >>confdefs.h <<_ACEOF
13337 #define HAVE_KRB5_ERROR_E_DATA 1
13338 _ACEOF
13339
13340
13341 else
13342   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13343 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13344    { (exit 1); exit 1; }; }
13345 fi
13346
13347 fi
13348
13349 fi
13350
13351 # This is probably only present on Darwin, but may as well check always
13352 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
13353 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
13354 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
13355   echo $ECHO_N "(cached) $ECHO_C" >&6
13356 else
13357   cat >conftest.$ac_ext <<_ACEOF
13358 /* confdefs.h.  */
13359 _ACEOF
13360 cat confdefs.h >>conftest.$ac_ext
13361 cat >>conftest.$ac_ext <<_ACEOF
13362 /* end confdefs.h.  */
13363 #include <fcntl.h>
13364
13365 int
13366 main ()
13367 {
13368 #ifndef F_FULLFSYNC
13369   char *p = (char *) F_FULLFSYNC;
13370 #endif
13371
13372   ;
13373   return 0;
13374 }
13375 _ACEOF
13376 rm -f conftest.$ac_objext
13377 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13378   (eval $ac_compile) 2>conftest.er1
13379   ac_status=$?
13380   grep -v '^ *+' conftest.er1 >conftest.err
13381   rm -f conftest.er1
13382   cat conftest.err >&5
13383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13384   (exit $ac_status); } &&
13385          { ac_try='test -z "$ac_c_werror_flag"
13386                          || test ! -s conftest.err'
13387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13388   (eval $ac_try) 2>&5
13389   ac_status=$?
13390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13391   (exit $ac_status); }; } &&
13392          { ac_try='test -s conftest.$ac_objext'
13393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13394   (eval $ac_try) 2>&5
13395   ac_status=$?
13396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13397   (exit $ac_status); }; }; then
13398   ac_cv_have_decl_F_FULLFSYNC=yes
13399 else
13400   echo "$as_me: failed program was:" >&5
13401 sed 's/^/| /' conftest.$ac_ext >&5
13402
13403 ac_cv_have_decl_F_FULLFSYNC=no
13404 fi
13405 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13406 fi
13407 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
13408 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
13409 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
13410
13411 cat >>confdefs.h <<_ACEOF
13412 #define HAVE_DECL_F_FULLFSYNC 1
13413 _ACEOF
13414
13415
13416 else
13417   cat >>confdefs.h <<_ACEOF
13418 #define HAVE_DECL_F_FULLFSYNC 0
13419 _ACEOF
13420
13421
13422 fi
13423
13424
13425
13426 ##
13427 ## Functions, global variables
13428 ##
13429
13430 echo "$as_me:$LINENO: checking for int timezone" >&5
13431 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13432 if test "${pgac_cv_var_int_timezone+set}" = set; then
13433   echo $ECHO_N "(cached) $ECHO_C" >&6
13434 else
13435   cat >conftest.$ac_ext <<_ACEOF
13436 /* confdefs.h.  */
13437 _ACEOF
13438 cat confdefs.h >>conftest.$ac_ext
13439 cat >>conftest.$ac_ext <<_ACEOF
13440 /* end confdefs.h.  */
13441 #include <time.h>
13442 int res;
13443 int
13444 main ()
13445 {
13446 #ifndef __CYGWIN__
13447 res = timezone / 60;
13448 #else
13449 res = _timezone / 60;
13450 #endif
13451   ;
13452   return 0;
13453 }
13454 _ACEOF
13455 rm -f conftest.$ac_objext conftest$ac_exeext
13456 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13457   (eval $ac_link) 2>conftest.er1
13458   ac_status=$?
13459   grep -v '^ *+' conftest.er1 >conftest.err
13460   rm -f conftest.er1
13461   cat conftest.err >&5
13462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13463   (exit $ac_status); } &&
13464          { ac_try='test -z "$ac_c_werror_flag"
13465                          || test ! -s conftest.err'
13466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13467   (eval $ac_try) 2>&5
13468   ac_status=$?
13469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13470   (exit $ac_status); }; } &&
13471          { ac_try='test -s conftest$ac_exeext'
13472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13473   (eval $ac_try) 2>&5
13474   ac_status=$?
13475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13476   (exit $ac_status); }; }; then
13477   pgac_cv_var_int_timezone=yes
13478 else
13479   echo "$as_me: failed program was:" >&5
13480 sed 's/^/| /' conftest.$ac_ext >&5
13481
13482 pgac_cv_var_int_timezone=no
13483 fi
13484 rm -f conftest.err conftest.$ac_objext \
13485       conftest$ac_exeext conftest.$ac_ext
13486 fi
13487 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13488 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13489 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13490
13491 cat >>confdefs.h <<\_ACEOF
13492 #define HAVE_INT_TIMEZONE
13493 _ACEOF
13494
13495 fi
13496 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13497 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13498  if test "${ac_cv_func_accept_return+set}" = set; then
13499   echo $ECHO_N "(cached) $ECHO_C" >&6
13500 else
13501    if test "${ac_cv_func_accept_arg1+set}" = set; then
13502   echo $ECHO_N "(cached) $ECHO_C" >&6
13503 else
13504     if test "${ac_cv_func_accept_arg2+set}" = set; then
13505   echo $ECHO_N "(cached) $ECHO_C" >&6
13506 else
13507      if test "${ac_cv_func_accept_arg3+set}" = set; then
13508   echo $ECHO_N "(cached) $ECHO_C" >&6
13509 else
13510       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13511       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13512        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13513         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13514          cat >conftest.$ac_ext <<_ACEOF
13515 /* confdefs.h.  */
13516 _ACEOF
13517 cat confdefs.h >>conftest.$ac_ext
13518 cat >>conftest.$ac_ext <<_ACEOF
13519 /* end confdefs.h.  */
13520 #ifdef HAVE_SYS_TYPES_H
13521 #include <sys/types.h>
13522 #endif
13523 #ifdef HAVE_SYS_SOCKET_H
13524 #include <sys/socket.h>
13525 #endif
13526 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13527 int
13528 main ()
13529 {
13530
13531   ;
13532   return 0;
13533 }
13534 _ACEOF
13535 rm -f conftest.$ac_objext
13536 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13537   (eval $ac_compile) 2>conftest.er1
13538   ac_status=$?
13539   grep -v '^ *+' conftest.er1 >conftest.err
13540   rm -f conftest.er1
13541   cat conftest.err >&5
13542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13543   (exit $ac_status); } &&
13544          { ac_try='test -z "$ac_c_werror_flag"
13545                          || test ! -s conftest.err'
13546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13547   (eval $ac_try) 2>&5
13548   ac_status=$?
13549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13550   (exit $ac_status); }; } &&
13551          { ac_try='test -s conftest.$ac_objext'
13552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13553   (eval $ac_try) 2>&5
13554   ac_status=$?
13555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13556   (exit $ac_status); }; }; then
13557   ac_not_found=no; break 4
13558 else
13559   echo "$as_me: failed program was:" >&5
13560 sed 's/^/| /' conftest.$ac_ext >&5
13561
13562 ac_not_found=yes
13563 fi
13564 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13565        done
13566       done
13567      done
13568     done
13569     if test "$ac_not_found" = yes; then
13570       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13571 echo "$as_me: error: could not determine argument types" >&2;}
13572    { (exit 1); exit 1; }; }
13573     fi
13574     if test "$ac_cv_func_accept_arg3" = "void"; then
13575       ac_cv_func_accept_arg3=int
13576     fi
13577
13578 fi
13579
13580 fi
13581
13582 fi
13583
13584 fi
13585  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
13586 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13587
13588 cat >>confdefs.h <<_ACEOF
13589 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13590 _ACEOF
13591
13592
13593 cat >>confdefs.h <<_ACEOF
13594 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13595 _ACEOF
13596
13597
13598 cat >>confdefs.h <<_ACEOF
13599 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13600 _ACEOF
13601
13602
13603 cat >>confdefs.h <<_ACEOF
13604 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13605 _ACEOF
13606
13607
13608 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13609 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13610 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13611   echo $ECHO_N "(cached) $ECHO_C" >&6
13612 else
13613   cat >conftest.$ac_ext <<_ACEOF
13614 /* confdefs.h.  */
13615 _ACEOF
13616 cat confdefs.h >>conftest.$ac_ext
13617 cat >>conftest.$ac_ext <<_ACEOF
13618 /* end confdefs.h.  */
13619 #include <sys/time.h>
13620 int
13621 main ()
13622 {
13623 struct timeval *tp;
13624 struct timezone *tzp;
13625 gettimeofday(tp,tzp);
13626   ;
13627   return 0;
13628 }
13629 _ACEOF
13630 rm -f conftest.$ac_objext
13631 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13632   (eval $ac_compile) 2>conftest.er1
13633   ac_status=$?
13634   grep -v '^ *+' conftest.er1 >conftest.err
13635   rm -f conftest.er1
13636   cat conftest.err >&5
13637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13638   (exit $ac_status); } &&
13639          { ac_try='test -z "$ac_c_werror_flag"
13640                          || test ! -s conftest.err'
13641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13642   (eval $ac_try) 2>&5
13643   ac_status=$?
13644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645   (exit $ac_status); }; } &&
13646          { ac_try='test -s conftest.$ac_objext'
13647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13648   (eval $ac_try) 2>&5
13649   ac_status=$?
13650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13651   (exit $ac_status); }; }; then
13652   pgac_cv_func_gettimeofday_1arg=no
13653 else
13654   echo "$as_me: failed program was:" >&5
13655 sed 's/^/| /' conftest.$ac_ext >&5
13656
13657 pgac_cv_func_gettimeofday_1arg=yes
13658 fi
13659 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13660 fi
13661 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13662 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13663 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13664
13665 cat >>confdefs.h <<\_ACEOF
13666 #define GETTIMEOFDAY_1ARG
13667 _ACEOF
13668
13669 fi
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13693 do
13694 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13695 echo "$as_me:$LINENO: checking for $ac_func" >&5
13696 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13697 if eval "test \"\${$as_ac_var+set}\" = set"; then
13698   echo $ECHO_N "(cached) $ECHO_C" >&6
13699 else
13700   cat >conftest.$ac_ext <<_ACEOF
13701 /* confdefs.h.  */
13702 _ACEOF
13703 cat confdefs.h >>conftest.$ac_ext
13704 cat >>conftest.$ac_ext <<_ACEOF
13705 /* end confdefs.h.  */
13706 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13707    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13708 #define $ac_func innocuous_$ac_func
13709
13710 /* System header to define __stub macros and hopefully few prototypes,
13711     which can conflict with char $ac_func (); below.
13712     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13713     <limits.h> exists even on freestanding compilers.  */
13714
13715 #ifdef __STDC__
13716 # include <limits.h>
13717 #else
13718 # include <assert.h>
13719 #endif
13720
13721 #undef $ac_func
13722
13723 /* Override any gcc2 internal prototype to avoid an error.  */
13724 #ifdef __cplusplus
13725 extern "C"
13726 {
13727 #endif
13728 /* We use char because int might match the return type of a gcc2
13729    builtin and then its argument prototype would still apply.  */
13730 char $ac_func ();
13731 /* The GNU C library defines this for functions which it implements
13732     to always fail with ENOSYS.  Some functions are actually named
13733     something starting with __ and the normal name is an alias.  */
13734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13735 choke me
13736 #else
13737 char (*f) () = $ac_func;
13738 #endif
13739 #ifdef __cplusplus
13740 }
13741 #endif
13742
13743 int
13744 main ()
13745 {
13746 return f != $ac_func;
13747   ;
13748   return 0;
13749 }
13750 _ACEOF
13751 rm -f conftest.$ac_objext conftest$ac_exeext
13752 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13753   (eval $ac_link) 2>conftest.er1
13754   ac_status=$?
13755   grep -v '^ *+' conftest.er1 >conftest.err
13756   rm -f conftest.er1
13757   cat conftest.err >&5
13758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759   (exit $ac_status); } &&
13760          { ac_try='test -z "$ac_c_werror_flag"
13761                          || test ! -s conftest.err'
13762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13763   (eval $ac_try) 2>&5
13764   ac_status=$?
13765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766   (exit $ac_status); }; } &&
13767          { ac_try='test -s conftest$ac_exeext'
13768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13769   (eval $ac_try) 2>&5
13770   ac_status=$?
13771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13772   (exit $ac_status); }; }; then
13773   eval "$as_ac_var=yes"
13774 else
13775   echo "$as_me: failed program was:" >&5
13776 sed 's/^/| /' conftest.$ac_ext >&5
13777
13778 eval "$as_ac_var=no"
13779 fi
13780 rm -f conftest.err conftest.$ac_objext \
13781       conftest$ac_exeext conftest.$ac_ext
13782 fi
13783 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13784 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13785 if test `eval echo '${'$as_ac_var'}'` = yes; then
13786   cat >>confdefs.h <<_ACEOF
13787 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13788 _ACEOF
13789
13790 fi
13791 done
13792
13793
13794 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13795 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13796 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13797   echo $ECHO_N "(cached) $ECHO_C" >&6
13798 else
13799   cat >conftest.$ac_ext <<_ACEOF
13800 /* confdefs.h.  */
13801 _ACEOF
13802 cat confdefs.h >>conftest.$ac_ext
13803 cat >>conftest.$ac_ext <<_ACEOF
13804 /* end confdefs.h.  */
13805 #include <unistd.h>
13806
13807 int
13808 main ()
13809 {
13810 #ifndef fdatasync
13811   char *p = (char *) fdatasync;
13812 #endif
13813
13814   ;
13815   return 0;
13816 }
13817 _ACEOF
13818 rm -f conftest.$ac_objext
13819 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13820   (eval $ac_compile) 2>conftest.er1
13821   ac_status=$?
13822   grep -v '^ *+' conftest.er1 >conftest.err
13823   rm -f conftest.er1
13824   cat conftest.err >&5
13825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826   (exit $ac_status); } &&
13827          { ac_try='test -z "$ac_c_werror_flag"
13828                          || test ! -s conftest.err'
13829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13830   (eval $ac_try) 2>&5
13831   ac_status=$?
13832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13833   (exit $ac_status); }; } &&
13834          { ac_try='test -s conftest.$ac_objext'
13835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13836   (eval $ac_try) 2>&5
13837   ac_status=$?
13838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13839   (exit $ac_status); }; }; then
13840   ac_cv_have_decl_fdatasync=yes
13841 else
13842   echo "$as_me: failed program was:" >&5
13843 sed 's/^/| /' conftest.$ac_ext >&5
13844
13845 ac_cv_have_decl_fdatasync=no
13846 fi
13847 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13848 fi
13849 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13850 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13851 if test $ac_cv_have_decl_fdatasync = yes; then
13852
13853 cat >>confdefs.h <<_ACEOF
13854 #define HAVE_DECL_FDATASYNC 1
13855 _ACEOF
13856
13857
13858 else
13859   cat >>confdefs.h <<_ACEOF
13860 #define HAVE_DECL_FDATASYNC 0
13861 _ACEOF
13862
13863
13864 fi
13865
13866
13867 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13868 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13869 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13870   echo $ECHO_N "(cached) $ECHO_C" >&6
13871 else
13872   cat >conftest.$ac_ext <<_ACEOF
13873 /* confdefs.h.  */
13874 _ACEOF
13875 cat confdefs.h >>conftest.$ac_ext
13876 cat >>conftest.$ac_ext <<_ACEOF
13877 /* end confdefs.h.  */
13878 #include <fcntl.h>
13879
13880 int
13881 main ()
13882 {
13883 #ifndef posix_fadvise
13884   char *p = (char *) posix_fadvise;
13885 #endif
13886
13887   ;
13888   return 0;
13889 }
13890 _ACEOF
13891 rm -f conftest.$ac_objext
13892 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13893   (eval $ac_compile) 2>conftest.er1
13894   ac_status=$?
13895   grep -v '^ *+' conftest.er1 >conftest.err
13896   rm -f conftest.er1
13897   cat conftest.err >&5
13898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13899   (exit $ac_status); } &&
13900          { ac_try='test -z "$ac_c_werror_flag"
13901                          || test ! -s conftest.err'
13902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13903   (eval $ac_try) 2>&5
13904   ac_status=$?
13905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13906   (exit $ac_status); }; } &&
13907          { ac_try='test -s conftest.$ac_objext'
13908   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13909   (eval $ac_try) 2>&5
13910   ac_status=$?
13911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13912   (exit $ac_status); }; }; then
13913   ac_cv_have_decl_posix_fadvise=yes
13914 else
13915   echo "$as_me: failed program was:" >&5
13916 sed 's/^/| /' conftest.$ac_ext >&5
13917
13918 ac_cv_have_decl_posix_fadvise=no
13919 fi
13920 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13921 fi
13922 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
13923 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
13924 if test $ac_cv_have_decl_posix_fadvise = yes; then
13925
13926 cat >>confdefs.h <<_ACEOF
13927 #define HAVE_DECL_POSIX_FADVISE 1
13928 _ACEOF
13929
13930
13931 else
13932   cat >>confdefs.h <<_ACEOF
13933 #define HAVE_DECL_POSIX_FADVISE 0
13934 _ACEOF
13935
13936
13937 fi
13938
13939
13940
13941 HAVE_IPV6=no
13942 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13943 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13944 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13945   echo $ECHO_N "(cached) $ECHO_C" >&6
13946 else
13947   cat >conftest.$ac_ext <<_ACEOF
13948 /* confdefs.h.  */
13949 _ACEOF
13950 cat confdefs.h >>conftest.$ac_ext
13951 cat >>conftest.$ac_ext <<_ACEOF
13952 /* end confdefs.h.  */
13953 $ac_includes_default
13954 #include <netinet/in.h>
13955
13956 int
13957 main ()
13958 {
13959 if ((struct sockaddr_in6 *) 0)
13960   return 0;
13961 if (sizeof (struct sockaddr_in6))
13962   return 0;
13963   ;
13964   return 0;
13965 }
13966 _ACEOF
13967 rm -f conftest.$ac_objext
13968 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13969   (eval $ac_compile) 2>conftest.er1
13970   ac_status=$?
13971   grep -v '^ *+' conftest.er1 >conftest.err
13972   rm -f conftest.er1
13973   cat conftest.err >&5
13974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975   (exit $ac_status); } &&
13976          { ac_try='test -z "$ac_c_werror_flag"
13977                          || test ! -s conftest.err'
13978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13979   (eval $ac_try) 2>&5
13980   ac_status=$?
13981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13982   (exit $ac_status); }; } &&
13983          { ac_try='test -s conftest.$ac_objext'
13984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13985   (eval $ac_try) 2>&5
13986   ac_status=$?
13987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13988   (exit $ac_status); }; }; then
13989   ac_cv_type_struct_sockaddr_in6=yes
13990 else
13991   echo "$as_me: failed program was:" >&5
13992 sed 's/^/| /' conftest.$ac_ext >&5
13993
13994 ac_cv_type_struct_sockaddr_in6=no
13995 fi
13996 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13997 fi
13998 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13999 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
14000 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
14001
14002 cat >>confdefs.h <<\_ACEOF
14003 #define HAVE_IPV6 1
14004 _ACEOF
14005
14006          HAVE_IPV6=yes
14007 fi
14008
14009
14010
14011 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
14012 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
14013 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
14014   echo $ECHO_N "(cached) $ECHO_C" >&6
14015 else
14016   cat >conftest.$ac_ext <<_ACEOF
14017 /* confdefs.h.  */
14018 _ACEOF
14019 cat confdefs.h >>conftest.$ac_ext
14020 cat >>conftest.$ac_ext <<_ACEOF
14021 /* end confdefs.h.  */
14022 #include <machine/vmparam.h>
14023 #include <sys/exec.h>
14024
14025 int
14026 main ()
14027 {
14028 PS_STRINGS->ps_nargvstr = 1;
14029 PS_STRINGS->ps_argvstr = "foo";
14030   ;
14031   return 0;
14032 }
14033 _ACEOF
14034 rm -f conftest.$ac_objext conftest$ac_exeext
14035 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14036   (eval $ac_link) 2>conftest.er1
14037   ac_status=$?
14038   grep -v '^ *+' conftest.er1 >conftest.err
14039   rm -f conftest.er1
14040   cat conftest.err >&5
14041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14042   (exit $ac_status); } &&
14043          { ac_try='test -z "$ac_c_werror_flag"
14044                          || test ! -s conftest.err'
14045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14046   (eval $ac_try) 2>&5
14047   ac_status=$?
14048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14049   (exit $ac_status); }; } &&
14050          { ac_try='test -s conftest$ac_exeext'
14051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14052   (eval $ac_try) 2>&5
14053   ac_status=$?
14054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14055   (exit $ac_status); }; }; then
14056   pgac_cv_var_PS_STRINGS=yes
14057 else
14058   echo "$as_me: failed program was:" >&5
14059 sed 's/^/| /' conftest.$ac_ext >&5
14060
14061 pgac_cv_var_PS_STRINGS=no
14062 fi
14063 rm -f conftest.err conftest.$ac_objext \
14064       conftest$ac_exeext conftest.$ac_ext
14065 fi
14066 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
14067 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
14068 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
14069
14070 cat >>confdefs.h <<\_ACEOF
14071 #define HAVE_PS_STRINGS
14072 _ACEOF
14073
14074 fi
14075
14076
14077 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
14078 # is missing.  Yes, there are machines that have only one.  We may
14079 # also decide to use snprintf.c if snprintf() is present but does not
14080 # have all the features we need --- see below.
14081
14082 if test "$PORTNAME" = "win32"; then
14083   # Win32 gets snprintf.c built unconditionally.
14084   #
14085   # To properly translate all NLS languages strings, we must support the
14086   # *printf() %$ format, which allows *printf() arguments to be selected
14087   # by position in the translated string.
14088   #
14089   # libintl versions < 0.13 use the native *printf() functions, and Win32
14090   # *printf() doesn't understand %$, so we must use our /port versions,
14091   # which do understand %$. libintl versions >= 0.13 include their own
14092   # *printf versions on Win32.  The libintl 0.13 release note text is:
14093   #
14094   #   C format strings with positions, as they arise when a translator
14095   #   needs to reorder a sentence, are now supported on all platforms.
14096   #   On those few platforms (NetBSD and Woe32) for which the native
14097   #   printf()/fprintf()/... functions don't support such format
14098   #   strings, replacements are provided through <libintl.h>.
14099   #
14100   # We could use libintl >= 0.13's *printf() if we were sure that we had
14101   # a litint >= 0.13 at runtime, but seeing that there is no clean way
14102   # to guarantee that, it is best to just use our own, so we are sure to
14103   # get %$ support. In include/port.h we disable the *printf() macros
14104   # that might have been defined by libintl.
14105   #
14106   # We do this unconditionally whether NLS is used or not so we are sure
14107   # that all Win32 libraries and binaries behave the same.
14108   pgac_need_repl_snprintf=yes
14109 else
14110   pgac_need_repl_snprintf=no
14111
14112 for ac_func in snprintf
14113 do
14114 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14115 echo "$as_me:$LINENO: checking for $ac_func" >&5
14116 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14117 if eval "test \"\${$as_ac_var+set}\" = set"; then
14118   echo $ECHO_N "(cached) $ECHO_C" >&6
14119 else
14120   cat >conftest.$ac_ext <<_ACEOF
14121 /* confdefs.h.  */
14122 _ACEOF
14123 cat confdefs.h >>conftest.$ac_ext
14124 cat >>conftest.$ac_ext <<_ACEOF
14125 /* end confdefs.h.  */
14126 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14127    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14128 #define $ac_func innocuous_$ac_func
14129
14130 /* System header to define __stub macros and hopefully few prototypes,
14131     which can conflict with char $ac_func (); below.
14132     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14133     <limits.h> exists even on freestanding compilers.  */
14134
14135 #ifdef __STDC__
14136 # include <limits.h>
14137 #else
14138 # include <assert.h>
14139 #endif
14140
14141 #undef $ac_func
14142
14143 /* Override any gcc2 internal prototype to avoid an error.  */
14144 #ifdef __cplusplus
14145 extern "C"
14146 {
14147 #endif
14148 /* We use char because int might match the return type of a gcc2
14149    builtin and then its argument prototype would still apply.  */
14150 char $ac_func ();
14151 /* The GNU C library defines this for functions which it implements
14152     to always fail with ENOSYS.  Some functions are actually named
14153     something starting with __ and the normal name is an alias.  */
14154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14155 choke me
14156 #else
14157 char (*f) () = $ac_func;
14158 #endif
14159 #ifdef __cplusplus
14160 }
14161 #endif
14162
14163 int
14164 main ()
14165 {
14166 return f != $ac_func;
14167   ;
14168   return 0;
14169 }
14170 _ACEOF
14171 rm -f conftest.$ac_objext conftest$ac_exeext
14172 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14173   (eval $ac_link) 2>conftest.er1
14174   ac_status=$?
14175   grep -v '^ *+' conftest.er1 >conftest.err
14176   rm -f conftest.er1
14177   cat conftest.err >&5
14178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14179   (exit $ac_status); } &&
14180          { ac_try='test -z "$ac_c_werror_flag"
14181                          || test ! -s conftest.err'
14182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14183   (eval $ac_try) 2>&5
14184   ac_status=$?
14185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14186   (exit $ac_status); }; } &&
14187          { ac_try='test -s conftest$ac_exeext'
14188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14189   (eval $ac_try) 2>&5
14190   ac_status=$?
14191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14192   (exit $ac_status); }; }; then
14193   eval "$as_ac_var=yes"
14194 else
14195   echo "$as_me: failed program was:" >&5
14196 sed 's/^/| /' conftest.$ac_ext >&5
14197
14198 eval "$as_ac_var=no"
14199 fi
14200 rm -f conftest.err conftest.$ac_objext \
14201       conftest$ac_exeext conftest.$ac_ext
14202 fi
14203 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14204 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14205 if test `eval echo '${'$as_ac_var'}'` = yes; then
14206   cat >>confdefs.h <<_ACEOF
14207 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14208 _ACEOF
14209
14210 else
14211   pgac_need_repl_snprintf=yes
14212 fi
14213 done
14214
14215
14216 for ac_func in vsnprintf
14217 do
14218 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14219 echo "$as_me:$LINENO: checking for $ac_func" >&5
14220 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14221 if eval "test \"\${$as_ac_var+set}\" = set"; then
14222   echo $ECHO_N "(cached) $ECHO_C" >&6
14223 else
14224   cat >conftest.$ac_ext <<_ACEOF
14225 /* confdefs.h.  */
14226 _ACEOF
14227 cat confdefs.h >>conftest.$ac_ext
14228 cat >>conftest.$ac_ext <<_ACEOF
14229 /* end confdefs.h.  */
14230 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14231    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14232 #define $ac_func innocuous_$ac_func
14233
14234 /* System header to define __stub macros and hopefully few prototypes,
14235     which can conflict with char $ac_func (); below.
14236     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14237     <limits.h> exists even on freestanding compilers.  */
14238
14239 #ifdef __STDC__
14240 # include <limits.h>
14241 #else
14242 # include <assert.h>
14243 #endif
14244
14245 #undef $ac_func
14246
14247 /* Override any gcc2 internal prototype to avoid an error.  */
14248 #ifdef __cplusplus
14249 extern "C"
14250 {
14251 #endif
14252 /* We use char because int might match the return type of a gcc2
14253    builtin and then its argument prototype would still apply.  */
14254 char $ac_func ();
14255 /* The GNU C library defines this for functions which it implements
14256     to always fail with ENOSYS.  Some functions are actually named
14257     something starting with __ and the normal name is an alias.  */
14258 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14259 choke me
14260 #else
14261 char (*f) () = $ac_func;
14262 #endif
14263 #ifdef __cplusplus
14264 }
14265 #endif
14266
14267 int
14268 main ()
14269 {
14270 return f != $ac_func;
14271   ;
14272   return 0;
14273 }
14274 _ACEOF
14275 rm -f conftest.$ac_objext conftest$ac_exeext
14276 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14277   (eval $ac_link) 2>conftest.er1
14278   ac_status=$?
14279   grep -v '^ *+' conftest.er1 >conftest.err
14280   rm -f conftest.er1
14281   cat conftest.err >&5
14282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14283   (exit $ac_status); } &&
14284          { ac_try='test -z "$ac_c_werror_flag"
14285                          || test ! -s conftest.err'
14286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14287   (eval $ac_try) 2>&5
14288   ac_status=$?
14289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14290   (exit $ac_status); }; } &&
14291          { ac_try='test -s conftest$ac_exeext'
14292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14293   (eval $ac_try) 2>&5
14294   ac_status=$?
14295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296   (exit $ac_status); }; }; then
14297   eval "$as_ac_var=yes"
14298 else
14299   echo "$as_me: failed program was:" >&5
14300 sed 's/^/| /' conftest.$ac_ext >&5
14301
14302 eval "$as_ac_var=no"
14303 fi
14304 rm -f conftest.err conftest.$ac_objext \
14305       conftest$ac_exeext conftest.$ac_ext
14306 fi
14307 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14308 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14309 if test `eval echo '${'$as_ac_var'}'` = yes; then
14310   cat >>confdefs.h <<_ACEOF
14311 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14312 _ACEOF
14313
14314 else
14315   pgac_need_repl_snprintf=yes
14316 fi
14317 done
14318
14319 fi
14320
14321
14322 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14323 # include/c.h will provide declarations.  Note this is a separate test
14324 # from whether the functions exist in the C library --- there are
14325 # systems that have the functions but don't bother to declare them :-(
14326
14327 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14328 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14329 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14330   echo $ECHO_N "(cached) $ECHO_C" >&6
14331 else
14332   cat >conftest.$ac_ext <<_ACEOF
14333 /* confdefs.h.  */
14334 _ACEOF
14335 cat confdefs.h >>conftest.$ac_ext
14336 cat >>conftest.$ac_ext <<_ACEOF
14337 /* end confdefs.h.  */
14338 $ac_includes_default
14339 int
14340 main ()
14341 {
14342 #ifndef snprintf
14343   char *p = (char *) snprintf;
14344 #endif
14345
14346   ;
14347   return 0;
14348 }
14349 _ACEOF
14350 rm -f conftest.$ac_objext
14351 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14352   (eval $ac_compile) 2>conftest.er1
14353   ac_status=$?
14354   grep -v '^ *+' conftest.er1 >conftest.err
14355   rm -f conftest.er1
14356   cat conftest.err >&5
14357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14358   (exit $ac_status); } &&
14359          { ac_try='test -z "$ac_c_werror_flag"
14360                          || test ! -s conftest.err'
14361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14362   (eval $ac_try) 2>&5
14363   ac_status=$?
14364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14365   (exit $ac_status); }; } &&
14366          { ac_try='test -s conftest.$ac_objext'
14367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14368   (eval $ac_try) 2>&5
14369   ac_status=$?
14370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14371   (exit $ac_status); }; }; then
14372   ac_cv_have_decl_snprintf=yes
14373 else
14374   echo "$as_me: failed program was:" >&5
14375 sed 's/^/| /' conftest.$ac_ext >&5
14376
14377 ac_cv_have_decl_snprintf=no
14378 fi
14379 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14380 fi
14381 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14382 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14383 if test $ac_cv_have_decl_snprintf = yes; then
14384
14385 cat >>confdefs.h <<_ACEOF
14386 #define HAVE_DECL_SNPRINTF 1
14387 _ACEOF
14388
14389
14390 else
14391   cat >>confdefs.h <<_ACEOF
14392 #define HAVE_DECL_SNPRINTF 0
14393 _ACEOF
14394
14395
14396 fi
14397 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14398 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14399 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14400   echo $ECHO_N "(cached) $ECHO_C" >&6
14401 else
14402   cat >conftest.$ac_ext <<_ACEOF
14403 /* confdefs.h.  */
14404 _ACEOF
14405 cat confdefs.h >>conftest.$ac_ext
14406 cat >>conftest.$ac_ext <<_ACEOF
14407 /* end confdefs.h.  */
14408 $ac_includes_default
14409 int
14410 main ()
14411 {
14412 #ifndef vsnprintf
14413   char *p = (char *) vsnprintf;
14414 #endif
14415
14416   ;
14417   return 0;
14418 }
14419 _ACEOF
14420 rm -f conftest.$ac_objext
14421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14422   (eval $ac_compile) 2>conftest.er1
14423   ac_status=$?
14424   grep -v '^ *+' conftest.er1 >conftest.err
14425   rm -f conftest.er1
14426   cat conftest.err >&5
14427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14428   (exit $ac_status); } &&
14429          { ac_try='test -z "$ac_c_werror_flag"
14430                          || test ! -s conftest.err'
14431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14432   (eval $ac_try) 2>&5
14433   ac_status=$?
14434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14435   (exit $ac_status); }; } &&
14436          { ac_try='test -s conftest.$ac_objext'
14437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14438   (eval $ac_try) 2>&5
14439   ac_status=$?
14440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14441   (exit $ac_status); }; }; then
14442   ac_cv_have_decl_vsnprintf=yes
14443 else
14444   echo "$as_me: failed program was:" >&5
14445 sed 's/^/| /' conftest.$ac_ext >&5
14446
14447 ac_cv_have_decl_vsnprintf=no
14448 fi
14449 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14450 fi
14451 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14452 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14453 if test $ac_cv_have_decl_vsnprintf = yes; then
14454
14455 cat >>confdefs.h <<_ACEOF
14456 #define HAVE_DECL_VSNPRINTF 1
14457 _ACEOF
14458
14459
14460 else
14461   cat >>confdefs.h <<_ACEOF
14462 #define HAVE_DECL_VSNPRINTF 0
14463 _ACEOF
14464
14465
14466 fi
14467
14468
14469
14470
14471 echo "$as_me:$LINENO: checking for isinf" >&5
14472 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14473 if test "${ac_cv_func_isinf+set}" = set; then
14474   echo $ECHO_N "(cached) $ECHO_C" >&6
14475 else
14476   cat >conftest.$ac_ext <<_ACEOF
14477 /* confdefs.h.  */
14478 _ACEOF
14479 cat confdefs.h >>conftest.$ac_ext
14480 cat >>conftest.$ac_ext <<_ACEOF
14481 /* end confdefs.h.  */
14482
14483 #include <math.h>
14484 double glob_double;
14485
14486 int
14487 main ()
14488 {
14489 return isinf(glob_double) ? 0 : 1;
14490   ;
14491   return 0;
14492 }
14493 _ACEOF
14494 rm -f conftest.$ac_objext conftest$ac_exeext
14495 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14496   (eval $ac_link) 2>conftest.er1
14497   ac_status=$?
14498   grep -v '^ *+' conftest.er1 >conftest.err
14499   rm -f conftest.er1
14500   cat conftest.err >&5
14501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14502   (exit $ac_status); } &&
14503          { ac_try='test -z "$ac_c_werror_flag"
14504                          || test ! -s conftest.err'
14505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14506   (eval $ac_try) 2>&5
14507   ac_status=$?
14508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509   (exit $ac_status); }; } &&
14510          { ac_try='test -s conftest$ac_exeext'
14511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14512   (eval $ac_try) 2>&5
14513   ac_status=$?
14514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14515   (exit $ac_status); }; }; then
14516   ac_cv_func_isinf=yes
14517 else
14518   echo "$as_me: failed program was:" >&5
14519 sed 's/^/| /' conftest.$ac_ext >&5
14520
14521 ac_cv_func_isinf=no
14522 fi
14523 rm -f conftest.err conftest.$ac_objext \
14524       conftest$ac_exeext conftest.$ac_ext
14525 fi
14526 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14527 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14528
14529 if test $ac_cv_func_isinf = yes ; then
14530
14531 cat >>confdefs.h <<\_ACEOF
14532 #define HAVE_ISINF 1
14533 _ACEOF
14534
14535 else
14536   case $LIBOBJS in
14537     "isinf.$ac_objext"   | \
14538   *" isinf.$ac_objext"   | \
14539     "isinf.$ac_objext "* | \
14540   *" isinf.$ac_objext "* ) ;;
14541   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14542 esac
14543
14544   # Look for a way to implement a substitute for isinf()
14545
14546
14547
14548
14549 for ac_func in fpclass fp_class fp_class_d class
14550 do
14551 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14552 echo "$as_me:$LINENO: checking for $ac_func" >&5
14553 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14554 if eval "test \"\${$as_ac_var+set}\" = set"; then
14555   echo $ECHO_N "(cached) $ECHO_C" >&6
14556 else
14557   cat >conftest.$ac_ext <<_ACEOF
14558 /* confdefs.h.  */
14559 _ACEOF
14560 cat confdefs.h >>conftest.$ac_ext
14561 cat >>conftest.$ac_ext <<_ACEOF
14562 /* end confdefs.h.  */
14563 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14564    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14565 #define $ac_func innocuous_$ac_func
14566
14567 /* System header to define __stub macros and hopefully few prototypes,
14568     which can conflict with char $ac_func (); below.
14569     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14570     <limits.h> exists even on freestanding compilers.  */
14571
14572 #ifdef __STDC__
14573 # include <limits.h>
14574 #else
14575 # include <assert.h>
14576 #endif
14577
14578 #undef $ac_func
14579
14580 /* Override any gcc2 internal prototype to avoid an error.  */
14581 #ifdef __cplusplus
14582 extern "C"
14583 {
14584 #endif
14585 /* We use char because int might match the return type of a gcc2
14586    builtin and then its argument prototype would still apply.  */
14587 char $ac_func ();
14588 /* The GNU C library defines this for functions which it implements
14589     to always fail with ENOSYS.  Some functions are actually named
14590     something starting with __ and the normal name is an alias.  */
14591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14592 choke me
14593 #else
14594 char (*f) () = $ac_func;
14595 #endif
14596 #ifdef __cplusplus
14597 }
14598 #endif
14599
14600 int
14601 main ()
14602 {
14603 return f != $ac_func;
14604   ;
14605   return 0;
14606 }
14607 _ACEOF
14608 rm -f conftest.$ac_objext conftest$ac_exeext
14609 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14610   (eval $ac_link) 2>conftest.er1
14611   ac_status=$?
14612   grep -v '^ *+' conftest.er1 >conftest.err
14613   rm -f conftest.er1
14614   cat conftest.err >&5
14615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14616   (exit $ac_status); } &&
14617          { ac_try='test -z "$ac_c_werror_flag"
14618                          || test ! -s conftest.err'
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); }; } &&
14624          { ac_try='test -s conftest$ac_exeext'
14625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14626   (eval $ac_try) 2>&5
14627   ac_status=$?
14628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14629   (exit $ac_status); }; }; then
14630   eval "$as_ac_var=yes"
14631 else
14632   echo "$as_me: failed program was:" >&5
14633 sed 's/^/| /' conftest.$ac_ext >&5
14634
14635 eval "$as_ac_var=no"
14636 fi
14637 rm -f conftest.err conftest.$ac_objext \
14638       conftest$ac_exeext conftest.$ac_ext
14639 fi
14640 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14641 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14642 if test `eval echo '${'$as_ac_var'}'` = yes; then
14643   cat >>confdefs.h <<_ACEOF
14644 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14645 _ACEOF
14646  break
14647 fi
14648 done
14649
14650 fi
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14666 do
14667 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14668 echo "$as_me:$LINENO: checking for $ac_func" >&5
14669 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14670 if eval "test \"\${$as_ac_var+set}\" = set"; then
14671   echo $ECHO_N "(cached) $ECHO_C" >&6
14672 else
14673   cat >conftest.$ac_ext <<_ACEOF
14674 /* confdefs.h.  */
14675 _ACEOF
14676 cat confdefs.h >>conftest.$ac_ext
14677 cat >>conftest.$ac_ext <<_ACEOF
14678 /* end confdefs.h.  */
14679 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14680    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14681 #define $ac_func innocuous_$ac_func
14682
14683 /* System header to define __stub macros and hopefully few prototypes,
14684     which can conflict with char $ac_func (); below.
14685     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14686     <limits.h> exists even on freestanding compilers.  */
14687
14688 #ifdef __STDC__
14689 # include <limits.h>
14690 #else
14691 # include <assert.h>
14692 #endif
14693
14694 #undef $ac_func
14695
14696 /* Override any gcc2 internal prototype to avoid an error.  */
14697 #ifdef __cplusplus
14698 extern "C"
14699 {
14700 #endif
14701 /* We use char because int might match the return type of a gcc2
14702    builtin and then its argument prototype would still apply.  */
14703 char $ac_func ();
14704 /* The GNU C library defines this for functions which it implements
14705     to always fail with ENOSYS.  Some functions are actually named
14706     something starting with __ and the normal name is an alias.  */
14707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14708 choke me
14709 #else
14710 char (*f) () = $ac_func;
14711 #endif
14712 #ifdef __cplusplus
14713 }
14714 #endif
14715
14716 int
14717 main ()
14718 {
14719 return f != $ac_func;
14720   ;
14721   return 0;
14722 }
14723 _ACEOF
14724 rm -f conftest.$ac_objext conftest$ac_exeext
14725 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14726   (eval $ac_link) 2>conftest.er1
14727   ac_status=$?
14728   grep -v '^ *+' conftest.er1 >conftest.err
14729   rm -f conftest.er1
14730   cat conftest.err >&5
14731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732   (exit $ac_status); } &&
14733          { ac_try='test -z "$ac_c_werror_flag"
14734                          || test ! -s conftest.err'
14735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14736   (eval $ac_try) 2>&5
14737   ac_status=$?
14738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14739   (exit $ac_status); }; } &&
14740          { ac_try='test -s conftest$ac_exeext'
14741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14742   (eval $ac_try) 2>&5
14743   ac_status=$?
14744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14745   (exit $ac_status); }; }; then
14746   eval "$as_ac_var=yes"
14747 else
14748   echo "$as_me: failed program was:" >&5
14749 sed 's/^/| /' conftest.$ac_ext >&5
14750
14751 eval "$as_ac_var=no"
14752 fi
14753 rm -f conftest.err conftest.$ac_objext \
14754       conftest$ac_exeext conftest.$ac_ext
14755 fi
14756 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14757 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14758 if test `eval echo '${'$as_ac_var'}'` = yes; then
14759   cat >>confdefs.h <<_ACEOF
14760 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14761 _ACEOF
14762
14763 else
14764   case $LIBOBJS in
14765     "$ac_func.$ac_objext"   | \
14766   *" $ac_func.$ac_objext"   | \
14767     "$ac_func.$ac_objext "* | \
14768   *" $ac_func.$ac_objext "* ) ;;
14769   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14770 esac
14771
14772 fi
14773 done
14774
14775
14776
14777 # System's version of getaddrinfo(), if any, may be used only if we found
14778 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14779 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14780 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14781 # because we want to use our own getaddrinfo.c on Windows anyway.)
14782 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14783
14784 for ac_func in getaddrinfo
14785 do
14786 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14787 echo "$as_me:$LINENO: checking for $ac_func" >&5
14788 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14789 if eval "test \"\${$as_ac_var+set}\" = set"; then
14790   echo $ECHO_N "(cached) $ECHO_C" >&6
14791 else
14792   cat >conftest.$ac_ext <<_ACEOF
14793 /* confdefs.h.  */
14794 _ACEOF
14795 cat confdefs.h >>conftest.$ac_ext
14796 cat >>conftest.$ac_ext <<_ACEOF
14797 /* end confdefs.h.  */
14798 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14799    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14800 #define $ac_func innocuous_$ac_func
14801
14802 /* System header to define __stub macros and hopefully few prototypes,
14803     which can conflict with char $ac_func (); below.
14804     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14805     <limits.h> exists even on freestanding compilers.  */
14806
14807 #ifdef __STDC__
14808 # include <limits.h>
14809 #else
14810 # include <assert.h>
14811 #endif
14812
14813 #undef $ac_func
14814
14815 /* Override any gcc2 internal prototype to avoid an error.  */
14816 #ifdef __cplusplus
14817 extern "C"
14818 {
14819 #endif
14820 /* We use char because int might match the return type of a gcc2
14821    builtin and then its argument prototype would still apply.  */
14822 char $ac_func ();
14823 /* The GNU C library defines this for functions which it implements
14824     to always fail with ENOSYS.  Some functions are actually named
14825     something starting with __ and the normal name is an alias.  */
14826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14827 choke me
14828 #else
14829 char (*f) () = $ac_func;
14830 #endif
14831 #ifdef __cplusplus
14832 }
14833 #endif
14834
14835 int
14836 main ()
14837 {
14838 return f != $ac_func;
14839   ;
14840   return 0;
14841 }
14842 _ACEOF
14843 rm -f conftest.$ac_objext conftest$ac_exeext
14844 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14845   (eval $ac_link) 2>conftest.er1
14846   ac_status=$?
14847   grep -v '^ *+' conftest.er1 >conftest.err
14848   rm -f conftest.er1
14849   cat conftest.err >&5
14850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14851   (exit $ac_status); } &&
14852          { ac_try='test -z "$ac_c_werror_flag"
14853                          || test ! -s conftest.err'
14854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14855   (eval $ac_try) 2>&5
14856   ac_status=$?
14857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14858   (exit $ac_status); }; } &&
14859          { ac_try='test -s conftest$ac_exeext'
14860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14861   (eval $ac_try) 2>&5
14862   ac_status=$?
14863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14864   (exit $ac_status); }; }; then
14865   eval "$as_ac_var=yes"
14866 else
14867   echo "$as_me: failed program was:" >&5
14868 sed 's/^/| /' conftest.$ac_ext >&5
14869
14870 eval "$as_ac_var=no"
14871 fi
14872 rm -f conftest.err conftest.$ac_objext \
14873       conftest$ac_exeext conftest.$ac_ext
14874 fi
14875 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14876 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14877 if test `eval echo '${'$as_ac_var'}'` = yes; then
14878   cat >>confdefs.h <<_ACEOF
14879 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14880 _ACEOF
14881
14882 else
14883   case $LIBOBJS in
14884     "$ac_func.$ac_objext"   | \
14885   *" $ac_func.$ac_objext"   | \
14886     "$ac_func.$ac_objext "* | \
14887   *" $ac_func.$ac_objext "* ) ;;
14888   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14889 esac
14890
14891 fi
14892 done
14893
14894
14895 else
14896   case $LIBOBJS in
14897     "getaddrinfo.$ac_objext"   | \
14898   *" getaddrinfo.$ac_objext"   | \
14899     "getaddrinfo.$ac_objext "* | \
14900   *" getaddrinfo.$ac_objext "* ) ;;
14901   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14902 esac
14903
14904 fi
14905
14906 # similarly, use system's getopt_long() only if system provides struct option.
14907 if test x"$ac_cv_type_struct_option" = xyes ; then
14908
14909 for ac_func in getopt_long
14910 do
14911 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14912 echo "$as_me:$LINENO: checking for $ac_func" >&5
14913 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14914 if eval "test \"\${$as_ac_var+set}\" = set"; then
14915   echo $ECHO_N "(cached) $ECHO_C" >&6
14916 else
14917   cat >conftest.$ac_ext <<_ACEOF
14918 /* confdefs.h.  */
14919 _ACEOF
14920 cat confdefs.h >>conftest.$ac_ext
14921 cat >>conftest.$ac_ext <<_ACEOF
14922 /* end confdefs.h.  */
14923 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14924    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14925 #define $ac_func innocuous_$ac_func
14926
14927 /* System header to define __stub macros and hopefully few prototypes,
14928     which can conflict with char $ac_func (); below.
14929     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14930     <limits.h> exists even on freestanding compilers.  */
14931
14932 #ifdef __STDC__
14933 # include <limits.h>
14934 #else
14935 # include <assert.h>
14936 #endif
14937
14938 #undef $ac_func
14939
14940 /* Override any gcc2 internal prototype to avoid an error.  */
14941 #ifdef __cplusplus
14942 extern "C"
14943 {
14944 #endif
14945 /* We use char because int might match the return type of a gcc2
14946    builtin and then its argument prototype would still apply.  */
14947 char $ac_func ();
14948 /* The GNU C library defines this for functions which it implements
14949     to always fail with ENOSYS.  Some functions are actually named
14950     something starting with __ and the normal name is an alias.  */
14951 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14952 choke me
14953 #else
14954 char (*f) () = $ac_func;
14955 #endif
14956 #ifdef __cplusplus
14957 }
14958 #endif
14959
14960 int
14961 main ()
14962 {
14963 return f != $ac_func;
14964   ;
14965   return 0;
14966 }
14967 _ACEOF
14968 rm -f conftest.$ac_objext conftest$ac_exeext
14969 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14970   (eval $ac_link) 2>conftest.er1
14971   ac_status=$?
14972   grep -v '^ *+' conftest.er1 >conftest.err
14973   rm -f conftest.er1
14974   cat conftest.err >&5
14975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14976   (exit $ac_status); } &&
14977          { ac_try='test -z "$ac_c_werror_flag"
14978                          || test ! -s conftest.err'
14979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14980   (eval $ac_try) 2>&5
14981   ac_status=$?
14982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14983   (exit $ac_status); }; } &&
14984          { ac_try='test -s conftest$ac_exeext'
14985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14986   (eval $ac_try) 2>&5
14987   ac_status=$?
14988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14989   (exit $ac_status); }; }; then
14990   eval "$as_ac_var=yes"
14991 else
14992   echo "$as_me: failed program was:" >&5
14993 sed 's/^/| /' conftest.$ac_ext >&5
14994
14995 eval "$as_ac_var=no"
14996 fi
14997 rm -f conftest.err conftest.$ac_objext \
14998       conftest$ac_exeext conftest.$ac_ext
14999 fi
15000 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15001 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15002 if test `eval echo '${'$as_ac_var'}'` = yes; then
15003   cat >>confdefs.h <<_ACEOF
15004 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15005 _ACEOF
15006
15007 else
15008   case $LIBOBJS in
15009     "$ac_func.$ac_objext"   | \
15010   *" $ac_func.$ac_objext"   | \
15011     "$ac_func.$ac_objext "* | \
15012   *" $ac_func.$ac_objext "* ) ;;
15013   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15014 esac
15015
15016 fi
15017 done
15018
15019
15020 else
15021   case $LIBOBJS in
15022     "getopt_long.$ac_objext"   | \
15023   *" getopt_long.$ac_objext"   | \
15024     "getopt_long.$ac_objext "* | \
15025   *" getopt_long.$ac_objext "* ) ;;
15026   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
15027 esac
15028
15029 fi
15030
15031 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
15032 # We override the previous test that said fseeko/ftello didn't exist
15033 # OS tests are also done in include/c.h and port/fseeko.c
15034 case $host_os in bsdi*|netbsd*)
15035 ac_cv_func_fseeko=yes
15036 esac
15037
15038 # Solaris has a very slow qsort in certain cases, so we replace it:
15039 #   http://forum.sun.com/thread.jspa?forumID=4&threadID=7231
15040 # Supposedly it is fixed in Solaris, but not sure which version, and
15041 # no confirmed testing.  2005-12-16
15042 if test "$PORTNAME" = "solaris"; then
15043 case $LIBOBJS in
15044     "qsort.$ac_objext"   | \
15045   *" qsort.$ac_objext"   | \
15046     "qsort.$ac_objext "* | \
15047   *" qsort.$ac_objext "* ) ;;
15048   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
15049 esac
15050
15051 fi
15052
15053 # Win32 support
15054 if test "$PORTNAME" = "win32"; then
15055 case $LIBOBJS in
15056     "gettimeofday.$ac_objext"   | \
15057   *" gettimeofday.$ac_objext"   | \
15058     "gettimeofday.$ac_objext "* | \
15059   *" gettimeofday.$ac_objext "* ) ;;
15060   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
15061 esac
15062
15063 case $LIBOBJS in
15064     "kill.$ac_objext"   | \
15065   *" kill.$ac_objext"   | \
15066     "kill.$ac_objext "* | \
15067   *" kill.$ac_objext "* ) ;;
15068   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
15069 esac
15070
15071 case $LIBOBJS in
15072     "open.$ac_objext"   | \
15073   *" open.$ac_objext"   | \
15074     "open.$ac_objext "* | \
15075   *" open.$ac_objext "* ) ;;
15076   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
15077 esac
15078
15079 case $LIBOBJS in
15080     "rand.$ac_objext"   | \
15081   *" rand.$ac_objext"   | \
15082     "rand.$ac_objext "* | \
15083   *" rand.$ac_objext "* ) ;;
15084   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
15085 esac
15086
15087 case $LIBOBJS in
15088     "win32error.$ac_objext"   | \
15089   *" win32error.$ac_objext"   | \
15090     "win32error.$ac_objext "* | \
15091   *" win32error.$ac_objext "* ) ;;
15092   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
15093 esac
15094
15095
15096 cat >>confdefs.h <<\_ACEOF
15097 #define HAVE_SYMLINK 1
15098 _ACEOF
15099
15100 fi
15101
15102 if test "$with_readline" = yes; then
15103   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
15104 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
15105 cat >conftest.$ac_ext <<_ACEOF
15106 /* confdefs.h.  */
15107 _ACEOF
15108 cat confdefs.h >>conftest.$ac_ext
15109 cat >>conftest.$ac_ext <<_ACEOF
15110 /* end confdefs.h.  */
15111 #include <stdio.h>
15112 #ifdef HAVE_READLINE_READLINE_H
15113 # include <readline/readline.h>
15114 #elif defined(HAVE_READLINE_H)
15115 # include <readline.h>
15116 #endif
15117
15118 int
15119 main ()
15120 {
15121 rl_completion_append_character = 'x';
15122   ;
15123   return 0;
15124 }
15125 _ACEOF
15126 rm -f conftest.$ac_objext conftest$ac_exeext
15127 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15128   (eval $ac_link) 2>conftest.er1
15129   ac_status=$?
15130   grep -v '^ *+' conftest.er1 >conftest.err
15131   rm -f conftest.er1
15132   cat conftest.err >&5
15133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15134   (exit $ac_status); } &&
15135          { ac_try='test -z "$ac_c_werror_flag"
15136                          || test ! -s conftest.err'
15137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15138   (eval $ac_try) 2>&5
15139   ac_status=$?
15140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15141   (exit $ac_status); }; } &&
15142          { ac_try='test -s conftest$ac_exeext'
15143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15144   (eval $ac_try) 2>&5
15145   ac_status=$?
15146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15147   (exit $ac_status); }; }; then
15148   echo "$as_me:$LINENO: result: yes" >&5
15149 echo "${ECHO_T}yes" >&6
15150
15151 cat >>confdefs.h <<\_ACEOF
15152 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15153 _ACEOF
15154
15155 else
15156   echo "$as_me: failed program was:" >&5
15157 sed 's/^/| /' conftest.$ac_ext >&5
15158
15159 echo "$as_me:$LINENO: result: no" >&5
15160 echo "${ECHO_T}no" >&6
15161 fi
15162 rm -f conftest.err conftest.$ac_objext \
15163       conftest$ac_exeext conftest.$ac_ext
15164
15165
15166 for ac_func in rl_completion_matches rl_filename_completion_function
15167 do
15168 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15169 echo "$as_me:$LINENO: checking for $ac_func" >&5
15170 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15171 if eval "test \"\${$as_ac_var+set}\" = set"; then
15172   echo $ECHO_N "(cached) $ECHO_C" >&6
15173 else
15174   cat >conftest.$ac_ext <<_ACEOF
15175 /* confdefs.h.  */
15176 _ACEOF
15177 cat confdefs.h >>conftest.$ac_ext
15178 cat >>conftest.$ac_ext <<_ACEOF
15179 /* end confdefs.h.  */
15180 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15181    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15182 #define $ac_func innocuous_$ac_func
15183
15184 /* System header to define __stub macros and hopefully few prototypes,
15185     which can conflict with char $ac_func (); below.
15186     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15187     <limits.h> exists even on freestanding compilers.  */
15188
15189 #ifdef __STDC__
15190 # include <limits.h>
15191 #else
15192 # include <assert.h>
15193 #endif
15194
15195 #undef $ac_func
15196
15197 /* Override any gcc2 internal prototype to avoid an error.  */
15198 #ifdef __cplusplus
15199 extern "C"
15200 {
15201 #endif
15202 /* We use char because int might match the return type of a gcc2
15203    builtin and then its argument prototype would still apply.  */
15204 char $ac_func ();
15205 /* The GNU C library defines this for functions which it implements
15206     to always fail with ENOSYS.  Some functions are actually named
15207     something starting with __ and the normal name is an alias.  */
15208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15209 choke me
15210 #else
15211 char (*f) () = $ac_func;
15212 #endif
15213 #ifdef __cplusplus
15214 }
15215 #endif
15216
15217 int
15218 main ()
15219 {
15220 return f != $ac_func;
15221   ;
15222   return 0;
15223 }
15224 _ACEOF
15225 rm -f conftest.$ac_objext conftest$ac_exeext
15226 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15227   (eval $ac_link) 2>conftest.er1
15228   ac_status=$?
15229   grep -v '^ *+' conftest.er1 >conftest.err
15230   rm -f conftest.er1
15231   cat conftest.err >&5
15232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15233   (exit $ac_status); } &&
15234          { ac_try='test -z "$ac_c_werror_flag"
15235                          || test ! -s conftest.err'
15236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15237   (eval $ac_try) 2>&5
15238   ac_status=$?
15239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15240   (exit $ac_status); }; } &&
15241          { ac_try='test -s conftest$ac_exeext'
15242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15243   (eval $ac_try) 2>&5
15244   ac_status=$?
15245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15246   (exit $ac_status); }; }; then
15247   eval "$as_ac_var=yes"
15248 else
15249   echo "$as_me: failed program was:" >&5
15250 sed 's/^/| /' conftest.$ac_ext >&5
15251
15252 eval "$as_ac_var=no"
15253 fi
15254 rm -f conftest.err conftest.$ac_objext \
15255       conftest$ac_exeext conftest.$ac_ext
15256 fi
15257 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15258 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15259 if test `eval echo '${'$as_ac_var'}'` = yes; then
15260   cat >>confdefs.h <<_ACEOF
15261 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15262 _ACEOF
15263
15264 fi
15265 done
15266
15267
15268 for ac_func in replace_history_entry
15269 do
15270 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15271 echo "$as_me:$LINENO: checking for $ac_func" >&5
15272 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15273 if eval "test \"\${$as_ac_var+set}\" = set"; then
15274   echo $ECHO_N "(cached) $ECHO_C" >&6
15275 else
15276   cat >conftest.$ac_ext <<_ACEOF
15277 /* confdefs.h.  */
15278 _ACEOF
15279 cat confdefs.h >>conftest.$ac_ext
15280 cat >>conftest.$ac_ext <<_ACEOF
15281 /* end confdefs.h.  */
15282 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15283    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15284 #define $ac_func innocuous_$ac_func
15285
15286 /* System header to define __stub macros and hopefully few prototypes,
15287     which can conflict with char $ac_func (); below.
15288     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15289     <limits.h> exists even on freestanding compilers.  */
15290
15291 #ifdef __STDC__
15292 # include <limits.h>
15293 #else
15294 # include <assert.h>
15295 #endif
15296
15297 #undef $ac_func
15298
15299 /* Override any gcc2 internal prototype to avoid an error.  */
15300 #ifdef __cplusplus
15301 extern "C"
15302 {
15303 #endif
15304 /* We use char because int might match the return type of a gcc2
15305    builtin and then its argument prototype would still apply.  */
15306 char $ac_func ();
15307 /* The GNU C library defines this for functions which it implements
15308     to always fail with ENOSYS.  Some functions are actually named
15309     something starting with __ and the normal name is an alias.  */
15310 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15311 choke me
15312 #else
15313 char (*f) () = $ac_func;
15314 #endif
15315 #ifdef __cplusplus
15316 }
15317 #endif
15318
15319 int
15320 main ()
15321 {
15322 return f != $ac_func;
15323   ;
15324   return 0;
15325 }
15326 _ACEOF
15327 rm -f conftest.$ac_objext conftest$ac_exeext
15328 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15329   (eval $ac_link) 2>conftest.er1
15330   ac_status=$?
15331   grep -v '^ *+' conftest.er1 >conftest.err
15332   rm -f conftest.er1
15333   cat conftest.err >&5
15334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335   (exit $ac_status); } &&
15336          { ac_try='test -z "$ac_c_werror_flag"
15337                          || test ! -s conftest.err'
15338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15339   (eval $ac_try) 2>&5
15340   ac_status=$?
15341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15342   (exit $ac_status); }; } &&
15343          { ac_try='test -s conftest$ac_exeext'
15344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15345   (eval $ac_try) 2>&5
15346   ac_status=$?
15347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15348   (exit $ac_status); }; }; then
15349   eval "$as_ac_var=yes"
15350 else
15351   echo "$as_me: failed program was:" >&5
15352 sed 's/^/| /' conftest.$ac_ext >&5
15353
15354 eval "$as_ac_var=no"
15355 fi
15356 rm -f conftest.err conftest.$ac_objext \
15357       conftest$ac_exeext conftest.$ac_ext
15358 fi
15359 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15360 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15361 if test `eval echo '${'$as_ac_var'}'` = yes; then
15362   cat >>confdefs.h <<_ACEOF
15363 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15364 _ACEOF
15365
15366 fi
15367 done
15368
15369 fi
15370
15371
15372 echo "$as_me:$LINENO: checking for finite" >&5
15373 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15374 cat >conftest.$ac_ext <<_ACEOF
15375 /* confdefs.h.  */
15376 _ACEOF
15377 cat confdefs.h >>conftest.$ac_ext
15378 cat >>conftest.$ac_ext <<_ACEOF
15379 /* end confdefs.h.  */
15380
15381 #include <math.h>
15382 double glob_double;
15383
15384 int
15385 main ()
15386 {
15387 return finite(glob_double) ? 0 : 1;
15388   ;
15389   return 0;
15390 }
15391 _ACEOF
15392 rm -f conftest.$ac_objext conftest$ac_exeext
15393 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15394   (eval $ac_link) 2>conftest.er1
15395   ac_status=$?
15396   grep -v '^ *+' conftest.er1 >conftest.err
15397   rm -f conftest.er1
15398   cat conftest.err >&5
15399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400   (exit $ac_status); } &&
15401          { ac_try='test -z "$ac_c_werror_flag"
15402                          || test ! -s conftest.err'
15403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15404   (eval $ac_try) 2>&5
15405   ac_status=$?
15406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15407   (exit $ac_status); }; } &&
15408          { ac_try='test -s conftest$ac_exeext'
15409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15410   (eval $ac_try) 2>&5
15411   ac_status=$?
15412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15413   (exit $ac_status); }; }; then
15414
15415 cat >>confdefs.h <<\_ACEOF
15416 #define HAVE_FINITE 1
15417 _ACEOF
15418
15419 echo "$as_me:$LINENO: result: yes" >&5
15420 echo "${ECHO_T}yes" >&6
15421 else
15422   echo "$as_me: failed program was:" >&5
15423 sed 's/^/| /' conftest.$ac_ext >&5
15424
15425 echo "$as_me:$LINENO: result: no" >&5
15426 echo "${ECHO_T}no" >&6
15427 fi
15428 rm -f conftest.err conftest.$ac_objext \
15429       conftest$ac_exeext conftest.$ac_ext
15430
15431 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15432 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15433 cat >conftest.$ac_ext <<_ACEOF
15434 /* confdefs.h.  */
15435 _ACEOF
15436 cat confdefs.h >>conftest.$ac_ext
15437 cat >>conftest.$ac_ext <<_ACEOF
15438 /* end confdefs.h.  */
15439 #include <setjmp.h>
15440 int
15441 main ()
15442 {
15443 sigjmp_buf x; sigsetjmp(x, 1);
15444   ;
15445   return 0;
15446 }
15447 _ACEOF
15448 rm -f conftest.$ac_objext conftest$ac_exeext
15449 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15450   (eval $ac_link) 2>conftest.er1
15451   ac_status=$?
15452   grep -v '^ *+' conftest.er1 >conftest.err
15453   rm -f conftest.er1
15454   cat conftest.err >&5
15455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15456   (exit $ac_status); } &&
15457          { ac_try='test -z "$ac_c_werror_flag"
15458                          || test ! -s conftest.err'
15459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15460   (eval $ac_try) 2>&5
15461   ac_status=$?
15462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15463   (exit $ac_status); }; } &&
15464          { ac_try='test -s conftest$ac_exeext'
15465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15466   (eval $ac_try) 2>&5
15467   ac_status=$?
15468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15469   (exit $ac_status); }; }; then
15470
15471 cat >>confdefs.h <<\_ACEOF
15472 #define HAVE_SIGSETJMP 1
15473 _ACEOF
15474
15475 echo "$as_me:$LINENO: result: yes" >&5
15476 echo "${ECHO_T}yes" >&6
15477 else
15478   echo "$as_me: failed program was:" >&5
15479 sed 's/^/| /' conftest.$ac_ext >&5
15480
15481 echo "$as_me:$LINENO: result: no" >&5
15482 echo "${ECHO_T}no" >&6
15483 fi
15484 rm -f conftest.err conftest.$ac_objext \
15485       conftest$ac_exeext conftest.$ac_ext
15486
15487 echo "$as_me:$LINENO: checking for syslog" >&5
15488 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15489 if test "${ac_cv_func_syslog+set}" = set; then
15490   echo $ECHO_N "(cached) $ECHO_C" >&6
15491 else
15492   cat >conftest.$ac_ext <<_ACEOF
15493 /* confdefs.h.  */
15494 _ACEOF
15495 cat confdefs.h >>conftest.$ac_ext
15496 cat >>conftest.$ac_ext <<_ACEOF
15497 /* end confdefs.h.  */
15498 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15499    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15500 #define syslog innocuous_syslog
15501
15502 /* System header to define __stub macros and hopefully few prototypes,
15503     which can conflict with char syslog (); below.
15504     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15505     <limits.h> exists even on freestanding compilers.  */
15506
15507 #ifdef __STDC__
15508 # include <limits.h>
15509 #else
15510 # include <assert.h>
15511 #endif
15512
15513 #undef syslog
15514
15515 /* Override any gcc2 internal prototype to avoid an error.  */
15516 #ifdef __cplusplus
15517 extern "C"
15518 {
15519 #endif
15520 /* We use char because int might match the return type of a gcc2
15521    builtin and then its argument prototype would still apply.  */
15522 char syslog ();
15523 /* The GNU C library defines this for functions which it implements
15524     to always fail with ENOSYS.  Some functions are actually named
15525     something starting with __ and the normal name is an alias.  */
15526 #if defined (__stub_syslog) || defined (__stub___syslog)
15527 choke me
15528 #else
15529 char (*f) () = syslog;
15530 #endif
15531 #ifdef __cplusplus
15532 }
15533 #endif
15534
15535 int
15536 main ()
15537 {
15538 return f != syslog;
15539   ;
15540   return 0;
15541 }
15542 _ACEOF
15543 rm -f conftest.$ac_objext conftest$ac_exeext
15544 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15545   (eval $ac_link) 2>conftest.er1
15546   ac_status=$?
15547   grep -v '^ *+' conftest.er1 >conftest.err
15548   rm -f conftest.er1
15549   cat conftest.err >&5
15550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15551   (exit $ac_status); } &&
15552          { ac_try='test -z "$ac_c_werror_flag"
15553                          || test ! -s conftest.err'
15554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15555   (eval $ac_try) 2>&5
15556   ac_status=$?
15557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15558   (exit $ac_status); }; } &&
15559          { ac_try='test -s conftest$ac_exeext'
15560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15561   (eval $ac_try) 2>&5
15562   ac_status=$?
15563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15564   (exit $ac_status); }; }; then
15565   ac_cv_func_syslog=yes
15566 else
15567   echo "$as_me: failed program was:" >&5
15568 sed 's/^/| /' conftest.$ac_ext >&5
15569
15570 ac_cv_func_syslog=no
15571 fi
15572 rm -f conftest.err conftest.$ac_objext \
15573       conftest$ac_exeext conftest.$ac_ext
15574 fi
15575 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15576 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15577 if test $ac_cv_func_syslog = yes; then
15578   if test "${ac_cv_header_syslog_h+set}" = set; then
15579   echo "$as_me:$LINENO: checking for syslog.h" >&5
15580 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15581 if test "${ac_cv_header_syslog_h+set}" = set; then
15582   echo $ECHO_N "(cached) $ECHO_C" >&6
15583 fi
15584 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15585 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15586 else
15587   # Is the header compilable?
15588 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15589 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15590 cat >conftest.$ac_ext <<_ACEOF
15591 /* confdefs.h.  */
15592 _ACEOF
15593 cat confdefs.h >>conftest.$ac_ext
15594 cat >>conftest.$ac_ext <<_ACEOF
15595 /* end confdefs.h.  */
15596 $ac_includes_default
15597 #include <syslog.h>
15598 _ACEOF
15599 rm -f conftest.$ac_objext
15600 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15601   (eval $ac_compile) 2>conftest.er1
15602   ac_status=$?
15603   grep -v '^ *+' conftest.er1 >conftest.err
15604   rm -f conftest.er1
15605   cat conftest.err >&5
15606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15607   (exit $ac_status); } &&
15608          { ac_try='test -z "$ac_c_werror_flag"
15609                          || test ! -s conftest.err'
15610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15611   (eval $ac_try) 2>&5
15612   ac_status=$?
15613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15614   (exit $ac_status); }; } &&
15615          { ac_try='test -s conftest.$ac_objext'
15616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15617   (eval $ac_try) 2>&5
15618   ac_status=$?
15619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15620   (exit $ac_status); }; }; then
15621   ac_header_compiler=yes
15622 else
15623   echo "$as_me: failed program was:" >&5
15624 sed 's/^/| /' conftest.$ac_ext >&5
15625
15626 ac_header_compiler=no
15627 fi
15628 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15629 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15630 echo "${ECHO_T}$ac_header_compiler" >&6
15631
15632 # Is the header present?
15633 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15634 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15635 cat >conftest.$ac_ext <<_ACEOF
15636 /* confdefs.h.  */
15637 _ACEOF
15638 cat confdefs.h >>conftest.$ac_ext
15639 cat >>conftest.$ac_ext <<_ACEOF
15640 /* end confdefs.h.  */
15641 #include <syslog.h>
15642 _ACEOF
15643 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15644   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15645   ac_status=$?
15646   grep -v '^ *+' conftest.er1 >conftest.err
15647   rm -f conftest.er1
15648   cat conftest.err >&5
15649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15650   (exit $ac_status); } >/dev/null; then
15651   if test -s conftest.err; then
15652     ac_cpp_err=$ac_c_preproc_warn_flag
15653     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15654   else
15655     ac_cpp_err=
15656   fi
15657 else
15658   ac_cpp_err=yes
15659 fi
15660 if test -z "$ac_cpp_err"; then
15661   ac_header_preproc=yes
15662 else
15663   echo "$as_me: failed program was:" >&5
15664 sed 's/^/| /' conftest.$ac_ext >&5
15665
15666   ac_header_preproc=no
15667 fi
15668 rm -f conftest.err conftest.$ac_ext
15669 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15670 echo "${ECHO_T}$ac_header_preproc" >&6
15671
15672 # So?  What about this header?
15673 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15674   yes:no: )
15675     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15676 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15677     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15678 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15679     ac_header_preproc=yes
15680     ;;
15681   no:yes:* )
15682     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15683 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15684     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15685 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15686     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15687 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15688     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15689 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15690     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15691 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15692     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15693 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15694     (
15695       cat <<\_ASBOX
15696 ## ---------------------------------------- ##
15697 ## Report this to pgsql-bugs@postgresql.org ##
15698 ## ---------------------------------------- ##
15699 _ASBOX
15700     ) |
15701       sed "s/^/$as_me: WARNING:     /" >&2
15702     ;;
15703 esac
15704 echo "$as_me:$LINENO: checking for syslog.h" >&5
15705 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15706 if test "${ac_cv_header_syslog_h+set}" = set; then
15707   echo $ECHO_N "(cached) $ECHO_C" >&6
15708 else
15709   ac_cv_header_syslog_h=$ac_header_preproc
15710 fi
15711 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15712 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15713
15714 fi
15715 if test $ac_cv_header_syslog_h = yes; then
15716
15717 cat >>confdefs.h <<\_ACEOF
15718 #define HAVE_SYSLOG 1
15719 _ACEOF
15720
15721 fi
15722
15723
15724 fi
15725
15726
15727 echo "$as_me:$LINENO: checking for optreset" >&5
15728 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15729 if test "${pgac_cv_var_int_optreset+set}" = set; then
15730   echo $ECHO_N "(cached) $ECHO_C" >&6
15731 else
15732   cat >conftest.$ac_ext <<_ACEOF
15733 /* confdefs.h.  */
15734 _ACEOF
15735 cat confdefs.h >>conftest.$ac_ext
15736 cat >>conftest.$ac_ext <<_ACEOF
15737 /* end confdefs.h.  */
15738 #include <unistd.h>
15739 int
15740 main ()
15741 {
15742 extern int optreset; optreset = 1;
15743   ;
15744   return 0;
15745 }
15746 _ACEOF
15747 rm -f conftest.$ac_objext conftest$ac_exeext
15748 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15749   (eval $ac_link) 2>conftest.er1
15750   ac_status=$?
15751   grep -v '^ *+' conftest.er1 >conftest.err
15752   rm -f conftest.er1
15753   cat conftest.err >&5
15754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15755   (exit $ac_status); } &&
15756          { ac_try='test -z "$ac_c_werror_flag"
15757                          || test ! -s conftest.err'
15758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15759   (eval $ac_try) 2>&5
15760   ac_status=$?
15761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15762   (exit $ac_status); }; } &&
15763          { ac_try='test -s conftest$ac_exeext'
15764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15765   (eval $ac_try) 2>&5
15766   ac_status=$?
15767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15768   (exit $ac_status); }; }; then
15769   pgac_cv_var_int_optreset=yes
15770 else
15771   echo "$as_me: failed program was:" >&5
15772 sed 's/^/| /' conftest.$ac_ext >&5
15773
15774 pgac_cv_var_int_optreset=no
15775 fi
15776 rm -f conftest.err conftest.$ac_objext \
15777       conftest$ac_exeext conftest.$ac_ext
15778 fi
15779 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15780 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15781 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15782
15783 cat >>confdefs.h <<\_ACEOF
15784 #define HAVE_INT_OPTRESET 1
15785 _ACEOF
15786
15787 fi
15788
15789
15790
15791 for ac_func in strtoll strtoq
15792 do
15793 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15794 echo "$as_me:$LINENO: checking for $ac_func" >&5
15795 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15796 if eval "test \"\${$as_ac_var+set}\" = set"; then
15797   echo $ECHO_N "(cached) $ECHO_C" >&6
15798 else
15799   cat >conftest.$ac_ext <<_ACEOF
15800 /* confdefs.h.  */
15801 _ACEOF
15802 cat confdefs.h >>conftest.$ac_ext
15803 cat >>conftest.$ac_ext <<_ACEOF
15804 /* end confdefs.h.  */
15805 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15806    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15807 #define $ac_func innocuous_$ac_func
15808
15809 /* System header to define __stub macros and hopefully few prototypes,
15810     which can conflict with char $ac_func (); below.
15811     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15812     <limits.h> exists even on freestanding compilers.  */
15813
15814 #ifdef __STDC__
15815 # include <limits.h>
15816 #else
15817 # include <assert.h>
15818 #endif
15819
15820 #undef $ac_func
15821
15822 /* Override any gcc2 internal prototype to avoid an error.  */
15823 #ifdef __cplusplus
15824 extern "C"
15825 {
15826 #endif
15827 /* We use char because int might match the return type of a gcc2
15828    builtin and then its argument prototype would still apply.  */
15829 char $ac_func ();
15830 /* The GNU C library defines this for functions which it implements
15831     to always fail with ENOSYS.  Some functions are actually named
15832     something starting with __ and the normal name is an alias.  */
15833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15834 choke me
15835 #else
15836 char (*f) () = $ac_func;
15837 #endif
15838 #ifdef __cplusplus
15839 }
15840 #endif
15841
15842 int
15843 main ()
15844 {
15845 return f != $ac_func;
15846   ;
15847   return 0;
15848 }
15849 _ACEOF
15850 rm -f conftest.$ac_objext conftest$ac_exeext
15851 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15852   (eval $ac_link) 2>conftest.er1
15853   ac_status=$?
15854   grep -v '^ *+' conftest.er1 >conftest.err
15855   rm -f conftest.er1
15856   cat conftest.err >&5
15857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15858   (exit $ac_status); } &&
15859          { ac_try='test -z "$ac_c_werror_flag"
15860                          || test ! -s conftest.err'
15861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15862   (eval $ac_try) 2>&5
15863   ac_status=$?
15864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15865   (exit $ac_status); }; } &&
15866          { ac_try='test -s conftest$ac_exeext'
15867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15868   (eval $ac_try) 2>&5
15869   ac_status=$?
15870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15871   (exit $ac_status); }; }; then
15872   eval "$as_ac_var=yes"
15873 else
15874   echo "$as_me: failed program was:" >&5
15875 sed 's/^/| /' conftest.$ac_ext >&5
15876
15877 eval "$as_ac_var=no"
15878 fi
15879 rm -f conftest.err conftest.$ac_objext \
15880       conftest$ac_exeext conftest.$ac_ext
15881 fi
15882 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15883 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15884 if test `eval echo '${'$as_ac_var'}'` = yes; then
15885   cat >>confdefs.h <<_ACEOF
15886 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15887 _ACEOF
15888  break
15889 fi
15890 done
15891
15892
15893
15894 for ac_func in strtoull strtouq
15895 do
15896 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15897 echo "$as_me:$LINENO: checking for $ac_func" >&5
15898 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15899 if eval "test \"\${$as_ac_var+set}\" = set"; then
15900   echo $ECHO_N "(cached) $ECHO_C" >&6
15901 else
15902   cat >conftest.$ac_ext <<_ACEOF
15903 /* confdefs.h.  */
15904 _ACEOF
15905 cat confdefs.h >>conftest.$ac_ext
15906 cat >>conftest.$ac_ext <<_ACEOF
15907 /* end confdefs.h.  */
15908 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15909    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15910 #define $ac_func innocuous_$ac_func
15911
15912 /* System header to define __stub macros and hopefully few prototypes,
15913     which can conflict with char $ac_func (); below.
15914     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15915     <limits.h> exists even on freestanding compilers.  */
15916
15917 #ifdef __STDC__
15918 # include <limits.h>
15919 #else
15920 # include <assert.h>
15921 #endif
15922
15923 #undef $ac_func
15924
15925 /* Override any gcc2 internal prototype to avoid an error.  */
15926 #ifdef __cplusplus
15927 extern "C"
15928 {
15929 #endif
15930 /* We use char because int might match the return type of a gcc2
15931    builtin and then its argument prototype would still apply.  */
15932 char $ac_func ();
15933 /* The GNU C library defines this for functions which it implements
15934     to always fail with ENOSYS.  Some functions are actually named
15935     something starting with __ and the normal name is an alias.  */
15936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15937 choke me
15938 #else
15939 char (*f) () = $ac_func;
15940 #endif
15941 #ifdef __cplusplus
15942 }
15943 #endif
15944
15945 int
15946 main ()
15947 {
15948 return f != $ac_func;
15949   ;
15950   return 0;
15951 }
15952 _ACEOF
15953 rm -f conftest.$ac_objext conftest$ac_exeext
15954 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15955   (eval $ac_link) 2>conftest.er1
15956   ac_status=$?
15957   grep -v '^ *+' conftest.er1 >conftest.err
15958   rm -f conftest.er1
15959   cat conftest.err >&5
15960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15961   (exit $ac_status); } &&
15962          { ac_try='test -z "$ac_c_werror_flag"
15963                          || test ! -s conftest.err'
15964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15965   (eval $ac_try) 2>&5
15966   ac_status=$?
15967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15968   (exit $ac_status); }; } &&
15969          { ac_try='test -s conftest$ac_exeext'
15970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15971   (eval $ac_try) 2>&5
15972   ac_status=$?
15973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15974   (exit $ac_status); }; }; then
15975   eval "$as_ac_var=yes"
15976 else
15977   echo "$as_me: failed program was:" >&5
15978 sed 's/^/| /' conftest.$ac_ext >&5
15979
15980 eval "$as_ac_var=no"
15981 fi
15982 rm -f conftest.err conftest.$ac_objext \
15983       conftest$ac_exeext conftest.$ac_ext
15984 fi
15985 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15986 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15987 if test `eval echo '${'$as_ac_var'}'` = yes; then
15988   cat >>confdefs.h <<_ACEOF
15989 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15990 _ACEOF
15991  break
15992 fi
15993 done
15994
15995
15996 # Check for one of atexit() or on_exit()
15997
15998 for ac_func in atexit
15999 do
16000 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16001 echo "$as_me:$LINENO: checking for $ac_func" >&5
16002 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16003 if eval "test \"\${$as_ac_var+set}\" = set"; then
16004   echo $ECHO_N "(cached) $ECHO_C" >&6
16005 else
16006   cat >conftest.$ac_ext <<_ACEOF
16007 /* confdefs.h.  */
16008 _ACEOF
16009 cat confdefs.h >>conftest.$ac_ext
16010 cat >>conftest.$ac_ext <<_ACEOF
16011 /* end confdefs.h.  */
16012 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16013    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16014 #define $ac_func innocuous_$ac_func
16015
16016 /* System header to define __stub macros and hopefully few prototypes,
16017     which can conflict with char $ac_func (); below.
16018     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16019     <limits.h> exists even on freestanding compilers.  */
16020
16021 #ifdef __STDC__
16022 # include <limits.h>
16023 #else
16024 # include <assert.h>
16025 #endif
16026
16027 #undef $ac_func
16028
16029 /* Override any gcc2 internal prototype to avoid an error.  */
16030 #ifdef __cplusplus
16031 extern "C"
16032 {
16033 #endif
16034 /* We use char because int might match the return type of a gcc2
16035    builtin and then its argument prototype would still apply.  */
16036 char $ac_func ();
16037 /* The GNU C library defines this for functions which it implements
16038     to always fail with ENOSYS.  Some functions are actually named
16039     something starting with __ and the normal name is an alias.  */
16040 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16041 choke me
16042 #else
16043 char (*f) () = $ac_func;
16044 #endif
16045 #ifdef __cplusplus
16046 }
16047 #endif
16048
16049 int
16050 main ()
16051 {
16052 return f != $ac_func;
16053   ;
16054   return 0;
16055 }
16056 _ACEOF
16057 rm -f conftest.$ac_objext conftest$ac_exeext
16058 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16059   (eval $ac_link) 2>conftest.er1
16060   ac_status=$?
16061   grep -v '^ *+' conftest.er1 >conftest.err
16062   rm -f conftest.er1
16063   cat conftest.err >&5
16064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16065   (exit $ac_status); } &&
16066          { ac_try='test -z "$ac_c_werror_flag"
16067                          || test ! -s conftest.err'
16068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16069   (eval $ac_try) 2>&5
16070   ac_status=$?
16071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16072   (exit $ac_status); }; } &&
16073          { ac_try='test -s conftest$ac_exeext'
16074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16075   (eval $ac_try) 2>&5
16076   ac_status=$?
16077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16078   (exit $ac_status); }; }; then
16079   eval "$as_ac_var=yes"
16080 else
16081   echo "$as_me: failed program was:" >&5
16082 sed 's/^/| /' conftest.$ac_ext >&5
16083
16084 eval "$as_ac_var=no"
16085 fi
16086 rm -f conftest.err conftest.$ac_objext \
16087       conftest$ac_exeext conftest.$ac_ext
16088 fi
16089 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16090 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16091 if test `eval echo '${'$as_ac_var'}'` = yes; then
16092   cat >>confdefs.h <<_ACEOF
16093 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16094 _ACEOF
16095
16096 else
16097
16098 for ac_func in on_exit
16099 do
16100 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16101 echo "$as_me:$LINENO: checking for $ac_func" >&5
16102 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16103 if eval "test \"\${$as_ac_var+set}\" = set"; then
16104   echo $ECHO_N "(cached) $ECHO_C" >&6
16105 else
16106   cat >conftest.$ac_ext <<_ACEOF
16107 /* confdefs.h.  */
16108 _ACEOF
16109 cat confdefs.h >>conftest.$ac_ext
16110 cat >>conftest.$ac_ext <<_ACEOF
16111 /* end confdefs.h.  */
16112 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16113    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16114 #define $ac_func innocuous_$ac_func
16115
16116 /* System header to define __stub macros and hopefully few prototypes,
16117     which can conflict with char $ac_func (); below.
16118     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16119     <limits.h> exists even on freestanding compilers.  */
16120
16121 #ifdef __STDC__
16122 # include <limits.h>
16123 #else
16124 # include <assert.h>
16125 #endif
16126
16127 #undef $ac_func
16128
16129 /* Override any gcc2 internal prototype to avoid an error.  */
16130 #ifdef __cplusplus
16131 extern "C"
16132 {
16133 #endif
16134 /* We use char because int might match the return type of a gcc2
16135    builtin and then its argument prototype would still apply.  */
16136 char $ac_func ();
16137 /* The GNU C library defines this for functions which it implements
16138     to always fail with ENOSYS.  Some functions are actually named
16139     something starting with __ and the normal name is an alias.  */
16140 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16141 choke me
16142 #else
16143 char (*f) () = $ac_func;
16144 #endif
16145 #ifdef __cplusplus
16146 }
16147 #endif
16148
16149 int
16150 main ()
16151 {
16152 return f != $ac_func;
16153   ;
16154   return 0;
16155 }
16156 _ACEOF
16157 rm -f conftest.$ac_objext conftest$ac_exeext
16158 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16159   (eval $ac_link) 2>conftest.er1
16160   ac_status=$?
16161   grep -v '^ *+' conftest.er1 >conftest.err
16162   rm -f conftest.er1
16163   cat conftest.err >&5
16164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16165   (exit $ac_status); } &&
16166          { ac_try='test -z "$ac_c_werror_flag"
16167                          || test ! -s conftest.err'
16168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16169   (eval $ac_try) 2>&5
16170   ac_status=$?
16171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16172   (exit $ac_status); }; } &&
16173          { ac_try='test -s conftest$ac_exeext'
16174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16175   (eval $ac_try) 2>&5
16176   ac_status=$?
16177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16178   (exit $ac_status); }; }; then
16179   eval "$as_ac_var=yes"
16180 else
16181   echo "$as_me: failed program was:" >&5
16182 sed 's/^/| /' conftest.$ac_ext >&5
16183
16184 eval "$as_ac_var=no"
16185 fi
16186 rm -f conftest.err conftest.$ac_objext \
16187       conftest$ac_exeext conftest.$ac_ext
16188 fi
16189 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16190 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16191 if test `eval echo '${'$as_ac_var'}'` = yes; then
16192   cat >>confdefs.h <<_ACEOF
16193 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16194 _ACEOF
16195
16196 else
16197   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16198 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16199    { (exit 1); exit 1; }; }
16200 fi
16201 done
16202
16203 fi
16204 done
16205
16206
16207 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16208 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16209 if test "${ac_cv_sys_largefile_source+set}" = set; then
16210   echo $ECHO_N "(cached) $ECHO_C" >&6
16211 else
16212   while :; do
16213   ac_cv_sys_largefile_source=no
16214   cat >conftest.$ac_ext <<_ACEOF
16215 /* confdefs.h.  */
16216 _ACEOF
16217 cat confdefs.h >>conftest.$ac_ext
16218 cat >>conftest.$ac_ext <<_ACEOF
16219 /* end confdefs.h.  */
16220 #include <stdio.h>
16221 int
16222 main ()
16223 {
16224 return !fseeko;
16225   ;
16226   return 0;
16227 }
16228 _ACEOF
16229 rm -f conftest.$ac_objext
16230 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16231   (eval $ac_compile) 2>conftest.er1
16232   ac_status=$?
16233   grep -v '^ *+' conftest.er1 >conftest.err
16234   rm -f conftest.er1
16235   cat conftest.err >&5
16236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16237   (exit $ac_status); } &&
16238          { ac_try='test -z "$ac_c_werror_flag"
16239                          || test ! -s conftest.err'
16240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16241   (eval $ac_try) 2>&5
16242   ac_status=$?
16243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16244   (exit $ac_status); }; } &&
16245          { ac_try='test -s conftest.$ac_objext'
16246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16247   (eval $ac_try) 2>&5
16248   ac_status=$?
16249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16250   (exit $ac_status); }; }; then
16251   break
16252 else
16253   echo "$as_me: failed program was:" >&5
16254 sed 's/^/| /' conftest.$ac_ext >&5
16255
16256 fi
16257 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16258   cat >conftest.$ac_ext <<_ACEOF
16259 /* confdefs.h.  */
16260 _ACEOF
16261 cat confdefs.h >>conftest.$ac_ext
16262 cat >>conftest.$ac_ext <<_ACEOF
16263 /* end confdefs.h.  */
16264 #define _LARGEFILE_SOURCE 1
16265 #include <stdio.h>
16266 int
16267 main ()
16268 {
16269 return !fseeko;
16270   ;
16271   return 0;
16272 }
16273 _ACEOF
16274 rm -f conftest.$ac_objext
16275 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16276   (eval $ac_compile) 2>conftest.er1
16277   ac_status=$?
16278   grep -v '^ *+' conftest.er1 >conftest.err
16279   rm -f conftest.er1
16280   cat conftest.err >&5
16281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16282   (exit $ac_status); } &&
16283          { ac_try='test -z "$ac_c_werror_flag"
16284                          || test ! -s conftest.err'
16285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16286   (eval $ac_try) 2>&5
16287   ac_status=$?
16288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16289   (exit $ac_status); }; } &&
16290          { ac_try='test -s conftest.$ac_objext'
16291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16292   (eval $ac_try) 2>&5
16293   ac_status=$?
16294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16295   (exit $ac_status); }; }; then
16296   ac_cv_sys_largefile_source=1; break
16297 else
16298   echo "$as_me: failed program was:" >&5
16299 sed 's/^/| /' conftest.$ac_ext >&5
16300
16301 fi
16302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16303   break
16304 done
16305 fi
16306 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16307 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16308 if test "$ac_cv_sys_largefile_source" != no; then
16309
16310 cat >>confdefs.h <<_ACEOF
16311 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16312 _ACEOF
16313
16314 fi
16315 rm -f conftest*
16316
16317 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16318 # in glibc 2.1.3, but that breaks too many other things.
16319 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16320 echo "$as_me:$LINENO: checking for fseeko" >&5
16321 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16322 if test "${ac_cv_func_fseeko+set}" = set; then
16323   echo $ECHO_N "(cached) $ECHO_C" >&6
16324 else
16325   cat >conftest.$ac_ext <<_ACEOF
16326 /* confdefs.h.  */
16327 _ACEOF
16328 cat confdefs.h >>conftest.$ac_ext
16329 cat >>conftest.$ac_ext <<_ACEOF
16330 /* end confdefs.h.  */
16331 #include <stdio.h>
16332 int
16333 main ()
16334 {
16335 return fseeko && fseeko (stdin, 0, 0);
16336   ;
16337   return 0;
16338 }
16339 _ACEOF
16340 rm -f conftest.$ac_objext conftest$ac_exeext
16341 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16342   (eval $ac_link) 2>conftest.er1
16343   ac_status=$?
16344   grep -v '^ *+' conftest.er1 >conftest.err
16345   rm -f conftest.er1
16346   cat conftest.err >&5
16347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16348   (exit $ac_status); } &&
16349          { ac_try='test -z "$ac_c_werror_flag"
16350                          || test ! -s conftest.err'
16351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16352   (eval $ac_try) 2>&5
16353   ac_status=$?
16354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16355   (exit $ac_status); }; } &&
16356          { ac_try='test -s conftest$ac_exeext'
16357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16358   (eval $ac_try) 2>&5
16359   ac_status=$?
16360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16361   (exit $ac_status); }; }; then
16362   ac_cv_func_fseeko=yes
16363 else
16364   echo "$as_me: failed program was:" >&5
16365 sed 's/^/| /' conftest.$ac_ext >&5
16366
16367 ac_cv_func_fseeko=no
16368 fi
16369 rm -f conftest.err conftest.$ac_objext \
16370       conftest$ac_exeext conftest.$ac_ext
16371 fi
16372 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16373 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16374 if test $ac_cv_func_fseeko = yes; then
16375
16376 cat >>confdefs.h <<\_ACEOF
16377 #define HAVE_FSEEKO 1
16378 _ACEOF
16379
16380 fi
16381
16382
16383 #
16384 # Pthreads
16385 #
16386 # For each platform, we need to know about any special compile and link
16387 # libraries, and whether the normal C function names are thread-safe.
16388 # See the comment at the top of src/port/thread.c for more information.
16389 #
16390 if test "$enable_thread_safety" = yes; then
16391
16392
16393
16394
16395 ac_ext=c
16396 ac_cpp='$CPP $CPPFLAGS'
16397 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16398 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16399 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16400
16401 acx_pthread_ok=no
16402
16403 # We used to check for pthread.h first, but this fails if pthread.h
16404 # requires special compiler flags (e.g. on True64 or Sequent).
16405 # It gets checked for in the link test anyway.
16406
16407 # First of all, check if the user has set any of the PTHREAD_LIBS,
16408 # etcetera environment variables, and if threads linking works using
16409 # them:
16410 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16411         save_CFLAGS="$CFLAGS"
16412         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16413         save_LIBS="$LIBS"
16414         LIBS="$PTHREAD_LIBS $LIBS"
16415         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16416 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16417         cat >conftest.$ac_ext <<_ACEOF
16418 /* confdefs.h.  */
16419 _ACEOF
16420 cat confdefs.h >>conftest.$ac_ext
16421 cat >>conftest.$ac_ext <<_ACEOF
16422 /* end confdefs.h.  */
16423
16424 /* Override any gcc2 internal prototype to avoid an error.  */
16425 #ifdef __cplusplus
16426 extern "C"
16427 #endif
16428 /* We use char because int might match the return type of a gcc2
16429    builtin and then its argument prototype would still apply.  */
16430 char pthread_join ();
16431 int
16432 main ()
16433 {
16434 pthread_join ();
16435   ;
16436   return 0;
16437 }
16438 _ACEOF
16439 rm -f conftest.$ac_objext conftest$ac_exeext
16440 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16441   (eval $ac_link) 2>conftest.er1
16442   ac_status=$?
16443   grep -v '^ *+' conftest.er1 >conftest.err
16444   rm -f conftest.er1
16445   cat conftest.err >&5
16446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16447   (exit $ac_status); } &&
16448          { ac_try='test -z "$ac_c_werror_flag"
16449                          || test ! -s conftest.err'
16450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16451   (eval $ac_try) 2>&5
16452   ac_status=$?
16453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16454   (exit $ac_status); }; } &&
16455          { ac_try='test -s conftest$ac_exeext'
16456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16457   (eval $ac_try) 2>&5
16458   ac_status=$?
16459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16460   (exit $ac_status); }; }; then
16461   acx_pthread_ok=yes
16462 else
16463   echo "$as_me: failed program was:" >&5
16464 sed 's/^/| /' conftest.$ac_ext >&5
16465
16466 fi
16467 rm -f conftest.err conftest.$ac_objext \
16468       conftest$ac_exeext conftest.$ac_ext
16469         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16470 echo "${ECHO_T}$acx_pthread_ok" >&6
16471         if test x"$acx_pthread_ok" = xno; then
16472                 PTHREAD_LIBS=""
16473                 PTHREAD_CFLAGS=""
16474         fi
16475         LIBS="$save_LIBS"
16476         CFLAGS="$save_CFLAGS"
16477 fi
16478
16479 # We must check for the threads library under a number of different
16480 # names; the ordering is very important because some systems
16481 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16482 # libraries is broken (non-POSIX).
16483
16484 # Create a list of thread flags to try.  Items starting with a "-" are
16485 # C compiler flags, and other items are library names, except for "none"
16486 # which indicates that we try without any flags at all, and "pthread-config"
16487 # which is a program returning the flags for the Pth emulation library.
16488
16489 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16490
16491 # The ordering *is* (sometimes) important.  Some notes on the
16492 # individual items follow:
16493
16494 # pthreads: AIX (must check this before -lpthread)
16495 # none: in case threads are in libc; should be tried before -Kthread and
16496 #       other compiler flags to prevent continual compiler warnings
16497 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16498 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16499 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16500 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16501 # -pthreads: Solaris/gcc
16502 # -mthreads: Mingw32/gcc, Lynx/gcc
16503 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16504 #      doesn't hurt to check since this sometimes defines pthreads too;
16505 #      also defines -D_REENTRANT)
16506 # pthread: Linux, etcetera
16507 # --thread-safe: KAI C++
16508 # pthread-config: use pthread-config program (for GNU Pth library)
16509
16510 case "${host_cpu}-${host_os}" in
16511         *solaris*)
16512
16513         # On Solaris (at least, for some versions), libc contains stubbed
16514         # (non-functional) versions of the pthreads routines, so link-based
16515         # tests will erroneously succeed.  (We need to link with -pthread or
16516         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16517         # a function called by this macro, so we could check for that, but
16518         # who knows whether they'll stub that too in a future libc.)  So,
16519         # we'll just look for -pthreads and -lpthread first:
16520
16521         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16522         ;;
16523 esac
16524
16525 if test x"$acx_pthread_ok" = xno; then
16526 for flag in $acx_pthread_flags; do
16527
16528         tryPTHREAD_CFLAGS=""
16529         tryPTHREAD_LIBS=""
16530         case $flag in
16531                 none)
16532                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16533 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16534                 ;;
16535
16536                 -*)
16537                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16538 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16539                 tryPTHREAD_CFLAGS="$flag"
16540                 ;;
16541
16542                 pthread-config)
16543                 # skip this if we already have flags defined, for PostgreSQL
16544                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16545                 # Extract the first word of "pthread-config", so it can be a program name with args.
16546 set dummy pthread-config; ac_word=$2
16547 echo "$as_me:$LINENO: checking for $ac_word" >&5
16548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16549 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16550   echo $ECHO_N "(cached) $ECHO_C" >&6
16551 else
16552   if test -n "$acx_pthread_config"; then
16553   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16554 else
16555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16556 for as_dir in $PATH
16557 do
16558   IFS=$as_save_IFS
16559   test -z "$as_dir" && as_dir=.
16560   for ac_exec_ext in '' $ac_executable_extensions; do
16561   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16562     ac_cv_prog_acx_pthread_config="yes"
16563     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16564     break 2
16565   fi
16566 done
16567 done
16568
16569   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16570 fi
16571 fi
16572 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16573 if test -n "$acx_pthread_config"; then
16574   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16575 echo "${ECHO_T}$acx_pthread_config" >&6
16576 else
16577   echo "$as_me:$LINENO: result: no" >&5
16578 echo "${ECHO_T}no" >&6
16579 fi
16580
16581                 if test x"$acx_pthread_config" = xno; then continue; fi
16582                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16583                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16584                 ;;
16585
16586                 *)
16587                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16588 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16589                 tryPTHREAD_LIBS="-l$flag"
16590                 ;;
16591         esac
16592
16593         save_LIBS="$LIBS"
16594         save_CFLAGS="$CFLAGS"
16595         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16596         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16597
16598         # Check for various functions.  We must include pthread.h,
16599         # since some functions may be macros.  (On the Sequent, we
16600         # need a special flag -Kthread to make this header compile.)
16601         # We check for pthread_join because it is in -lpthread on IRIX
16602         # while pthread_create is in libc.  We check for pthread_attr_init
16603         # due to DEC craziness with -lpthreads.  We check for
16604         # pthread_cleanup_push because it is one of the few pthread
16605         # functions on Solaris that doesn't have a non-functional libc stub.
16606         # We try pthread_create on general principles.
16607         cat >conftest.$ac_ext <<_ACEOF
16608 /* confdefs.h.  */
16609 _ACEOF
16610 cat confdefs.h >>conftest.$ac_ext
16611 cat >>conftest.$ac_ext <<_ACEOF
16612 /* end confdefs.h.  */
16613 #include <pthread.h>
16614 int
16615 main ()
16616 {
16617 pthread_t th; pthread_join(th, 0);
16618                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16619                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16620   ;
16621   return 0;
16622 }
16623 _ACEOF
16624 rm -f conftest.$ac_objext conftest$ac_exeext
16625 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16626   (eval $ac_link) 2>conftest.er1
16627   ac_status=$?
16628   grep -v '^ *+' conftest.er1 >conftest.err
16629   rm -f conftest.er1
16630   cat conftest.err >&5
16631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16632   (exit $ac_status); } &&
16633          { ac_try='test -z "$ac_c_werror_flag"
16634                          || test ! -s conftest.err'
16635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16636   (eval $ac_try) 2>&5
16637   ac_status=$?
16638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639   (exit $ac_status); }; } &&
16640          { ac_try='test -s conftest$ac_exeext'
16641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16642   (eval $ac_try) 2>&5
16643   ac_status=$?
16644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16645   (exit $ac_status); }; }; then
16646   acx_pthread_ok=yes
16647 else
16648   echo "$as_me: failed program was:" >&5
16649 sed 's/^/| /' conftest.$ac_ext >&5
16650
16651 acx_pthread_ok=no
16652 fi
16653 rm -f conftest.err conftest.$ac_objext \
16654       conftest$ac_exeext conftest.$ac_ext
16655
16656         if test "x$acx_pthread_ok" = xyes; then
16657             # Don't use options that are ignored by the compiler.
16658             # We find them by checking stderror.
16659             cat >conftest.$ac_ext <<_ACEOF
16660 int
16661 main (int argc, char **argv)
16662 {
16663   (void) argc;
16664   (void) argv;
16665   return 0;
16666 }
16667 _ACEOF
16668             rm -f conftest.$ac_objext conftest$ac_exeext
16669             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16670                 # we continue with more flags because Linux needs -lpthread
16671                 # for libpq builds on PostgreSQL.  The test above only
16672                 # tests for building binaries, not shared libraries.
16673                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16674                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16675             else   acx_pthread_ok=no
16676             fi
16677         fi
16678
16679         LIBS="$save_LIBS"
16680         CFLAGS="$save_CFLAGS"
16681
16682         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16683 echo "${ECHO_T}$acx_pthread_ok" >&6
16684 done
16685 fi
16686
16687 # Various other checks:
16688 if test "x$acx_pthread_ok" = xyes; then
16689         save_LIBS="$LIBS"
16690         LIBS="$PTHREAD_LIBS $LIBS"
16691         save_CFLAGS="$CFLAGS"
16692         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16693
16694         # Detect AIX lossage: threads are created detached by default
16695         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16696         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16697 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16698         cat >conftest.$ac_ext <<_ACEOF
16699 /* confdefs.h.  */
16700 _ACEOF
16701 cat confdefs.h >>conftest.$ac_ext
16702 cat >>conftest.$ac_ext <<_ACEOF
16703 /* end confdefs.h.  */
16704 #include <pthread.h>
16705 int
16706 main ()
16707 {
16708 int attr=PTHREAD_CREATE_JOINABLE;
16709   ;
16710   return 0;
16711 }
16712 _ACEOF
16713 rm -f conftest.$ac_objext conftest$ac_exeext
16714 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16715   (eval $ac_link) 2>conftest.er1
16716   ac_status=$?
16717   grep -v '^ *+' conftest.er1 >conftest.err
16718   rm -f conftest.er1
16719   cat conftest.err >&5
16720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16721   (exit $ac_status); } &&
16722          { ac_try='test -z "$ac_c_werror_flag"
16723                          || test ! -s conftest.err'
16724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16725   (eval $ac_try) 2>&5
16726   ac_status=$?
16727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728   (exit $ac_status); }; } &&
16729          { ac_try='test -s conftest$ac_exeext'
16730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16731   (eval $ac_try) 2>&5
16732   ac_status=$?
16733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16734   (exit $ac_status); }; }; then
16735   ok=PTHREAD_CREATE_JOINABLE
16736 else
16737   echo "$as_me: failed program was:" >&5
16738 sed 's/^/| /' conftest.$ac_ext >&5
16739
16740 ok=unknown
16741 fi
16742 rm -f conftest.err conftest.$ac_objext \
16743       conftest$ac_exeext conftest.$ac_ext
16744         if test x"$ok" = xunknown; then
16745                 cat >conftest.$ac_ext <<_ACEOF
16746 /* confdefs.h.  */
16747 _ACEOF
16748 cat confdefs.h >>conftest.$ac_ext
16749 cat >>conftest.$ac_ext <<_ACEOF
16750 /* end confdefs.h.  */
16751 #include <pthread.h>
16752 int
16753 main ()
16754 {
16755 int attr=PTHREAD_CREATE_UNDETACHED;
16756   ;
16757   return 0;
16758 }
16759 _ACEOF
16760 rm -f conftest.$ac_objext conftest$ac_exeext
16761 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16762   (eval $ac_link) 2>conftest.er1
16763   ac_status=$?
16764   grep -v '^ *+' conftest.er1 >conftest.err
16765   rm -f conftest.er1
16766   cat conftest.err >&5
16767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16768   (exit $ac_status); } &&
16769          { ac_try='test -z "$ac_c_werror_flag"
16770                          || test ! -s conftest.err'
16771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16772   (eval $ac_try) 2>&5
16773   ac_status=$?
16774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16775   (exit $ac_status); }; } &&
16776          { ac_try='test -s conftest$ac_exeext'
16777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16778   (eval $ac_try) 2>&5
16779   ac_status=$?
16780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16781   (exit $ac_status); }; }; then
16782   ok=PTHREAD_CREATE_UNDETACHED
16783 else
16784   echo "$as_me: failed program was:" >&5
16785 sed 's/^/| /' conftest.$ac_ext >&5
16786
16787 ok=unknown
16788 fi
16789 rm -f conftest.err conftest.$ac_objext \
16790       conftest$ac_exeext conftest.$ac_ext
16791         fi
16792         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16793
16794 cat >>confdefs.h <<\_ACEOF
16795 #define PTHREAD_CREATE_JOINABLE $ok
16796 _ACEOF
16797
16798         fi
16799         echo "$as_me:$LINENO: result: ${ok}" >&5
16800 echo "${ECHO_T}${ok}" >&6
16801         if test x"$ok" = xunknown; then
16802                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16803 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16804         fi
16805
16806         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16807 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16808         flag=no
16809 # We always add these in PostgreSQL
16810 #       case "${host_cpu}-${host_os}" in
16811 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16812 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16813 #       esac
16814         echo "$as_me:$LINENO: result: ${flag}" >&5
16815 echo "${ECHO_T}${flag}" >&6
16816         if test "x$flag" != xno; then
16817                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16818         fi
16819
16820         LIBS="$save_LIBS"
16821         CFLAGS="$save_CFLAGS"
16822
16823 # Supporting cc_r would require a special CC in all places that
16824 # use libpq, and that is ugly, so we don't do it.  Users can still
16825 # define their compiler as cc_r to do thread builds of everything.
16826         # More AIX lossage: must compile with cc_r
16827         # Extract the first word of "cc_r", so it can be a program name with args.
16828 set dummy cc_r; ac_word=$2
16829 echo "$as_me:$LINENO: checking for $ac_word" >&5
16830 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16831 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16832   echo $ECHO_N "(cached) $ECHO_C" >&6
16833 else
16834   if test -n "$PTHREAD_CC"; then
16835   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16836 else
16837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16838 for as_dir in $PATH
16839 do
16840   IFS=$as_save_IFS
16841   test -z "$as_dir" && as_dir=.
16842   for ac_exec_ext in '' $ac_executable_extensions; do
16843   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16844     ac_cv_prog_PTHREAD_CC="cc_r"
16845     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16846     break 2
16847   fi
16848 done
16849 done
16850
16851   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16852 fi
16853 fi
16854 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16855 if test -n "$PTHREAD_CC"; then
16856   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16857 echo "${ECHO_T}$PTHREAD_CC" >&6
16858 else
16859   echo "$as_me:$LINENO: result: no" >&5
16860 echo "${ECHO_T}no" >&6
16861 fi
16862
16863 else
16864         PTHREAD_CC="$CC"
16865 fi
16866
16867
16868
16869
16870
16871 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16872 if test x"$acx_pthread_ok" = xyes; then
16873
16874 cat >>confdefs.h <<\_ACEOF
16875 #define HAVE_PTHREAD 1
16876 _ACEOF
16877
16878         :
16879 else
16880         acx_pthread_ok=no
16881
16882 fi
16883 ac_ext=c
16884 ac_cpp='$CPP $CPPFLAGS'
16885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16888
16889         # set thread flags
16890
16891 # Some platforms use these, so just defineed them.  They can't hurt if they
16892 # are not supported.
16893 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16894
16895
16896 # At this point, we don't want to muck with the compiler name for threading.
16897 # Let's see who fails, perhaps AIX.  2004-04-23
16898 if test "$PTHREAD_CC" != "$CC"; then
16899 { { echo "$as_me:$LINENO: error:
16900 PostgreSQL does not support platforms that require a special
16901 compiler binary for thread-safety.
16902 " >&5
16903 echo "$as_me: error:
16904 PostgreSQL does not support platforms that require a special
16905 compiler binary for thread-safety.
16906 " >&2;}
16907    { (exit 1); exit 1; }; }
16908 fi
16909
16910 if test "$THREAD_SUPPORT" = no; then
16911 { { echo "$as_me:$LINENO: error:
16912 Cannot enable threads on your platform.
16913 Your platform is known to not support thread-safe programs.
16914 For details, compile and run src/bin/pg_thread_test.
16915 " >&5
16916 echo "$as_me: error:
16917 Cannot enable threads on your platform.
16918 Your platform is known to not support thread-safe programs.
16919 For details, compile and run src/bin/pg_thread_test.
16920 " >&2;}
16921    { (exit 1); exit 1; }; }
16922 fi
16923
16924 # Check for *_r functions
16925 _CFLAGS="$CFLAGS"
16926 _LIBS="$LIBS"
16927 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16928 LIBS="$LIBS $PTHREAD_LIBS"
16929
16930 if test "${ac_cv_header_pthread_h+set}" = set; then
16931   echo "$as_me:$LINENO: checking for pthread.h" >&5
16932 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16933 if test "${ac_cv_header_pthread_h+set}" = set; then
16934   echo $ECHO_N "(cached) $ECHO_C" >&6
16935 fi
16936 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16937 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16938 else
16939   # Is the header compilable?
16940 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16941 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16942 cat >conftest.$ac_ext <<_ACEOF
16943 /* confdefs.h.  */
16944 _ACEOF
16945 cat confdefs.h >>conftest.$ac_ext
16946 cat >>conftest.$ac_ext <<_ACEOF
16947 /* end confdefs.h.  */
16948 $ac_includes_default
16949 #include <pthread.h>
16950 _ACEOF
16951 rm -f conftest.$ac_objext
16952 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16953   (eval $ac_compile) 2>conftest.er1
16954   ac_status=$?
16955   grep -v '^ *+' conftest.er1 >conftest.err
16956   rm -f conftest.er1
16957   cat conftest.err >&5
16958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16959   (exit $ac_status); } &&
16960          { ac_try='test -z "$ac_c_werror_flag"
16961                          || test ! -s conftest.err'
16962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16963   (eval $ac_try) 2>&5
16964   ac_status=$?
16965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16966   (exit $ac_status); }; } &&
16967          { ac_try='test -s conftest.$ac_objext'
16968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16969   (eval $ac_try) 2>&5
16970   ac_status=$?
16971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16972   (exit $ac_status); }; }; then
16973   ac_header_compiler=yes
16974 else
16975   echo "$as_me: failed program was:" >&5
16976 sed 's/^/| /' conftest.$ac_ext >&5
16977
16978 ac_header_compiler=no
16979 fi
16980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16981 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16982 echo "${ECHO_T}$ac_header_compiler" >&6
16983
16984 # Is the header present?
16985 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16986 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16987 cat >conftest.$ac_ext <<_ACEOF
16988 /* confdefs.h.  */
16989 _ACEOF
16990 cat confdefs.h >>conftest.$ac_ext
16991 cat >>conftest.$ac_ext <<_ACEOF
16992 /* end confdefs.h.  */
16993 #include <pthread.h>
16994 _ACEOF
16995 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16996   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16997   ac_status=$?
16998   grep -v '^ *+' conftest.er1 >conftest.err
16999   rm -f conftest.er1
17000   cat conftest.err >&5
17001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17002   (exit $ac_status); } >/dev/null; then
17003   if test -s conftest.err; then
17004     ac_cpp_err=$ac_c_preproc_warn_flag
17005     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17006   else
17007     ac_cpp_err=
17008   fi
17009 else
17010   ac_cpp_err=yes
17011 fi
17012 if test -z "$ac_cpp_err"; then
17013   ac_header_preproc=yes
17014 else
17015   echo "$as_me: failed program was:" >&5
17016 sed 's/^/| /' conftest.$ac_ext >&5
17017
17018   ac_header_preproc=no
17019 fi
17020 rm -f conftest.err conftest.$ac_ext
17021 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17022 echo "${ECHO_T}$ac_header_preproc" >&6
17023
17024 # So?  What about this header?
17025 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17026   yes:no: )
17027     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
17028 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17029     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
17030 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
17031     ac_header_preproc=yes
17032     ;;
17033   no:yes:* )
17034     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
17035 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
17036     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
17037 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
17038     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
17039 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
17040     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
17041 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17042     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
17043 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
17044     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
17045 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
17046     (
17047       cat <<\_ASBOX
17048 ## ---------------------------------------- ##
17049 ## Report this to pgsql-bugs@postgresql.org ##
17050 ## ---------------------------------------- ##
17051 _ASBOX
17052     ) |
17053       sed "s/^/$as_me: WARNING:     /" >&2
17054     ;;
17055 esac
17056 echo "$as_me:$LINENO: checking for pthread.h" >&5
17057 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
17058 if test "${ac_cv_header_pthread_h+set}" = set; then
17059   echo $ECHO_N "(cached) $ECHO_C" >&6
17060 else
17061   ac_cv_header_pthread_h=$ac_header_preproc
17062 fi
17063 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
17064 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
17065
17066 fi
17067 if test $ac_cv_header_pthread_h = yes; then
17068   :
17069 else
17070   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
17071 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
17072    { (exit 1); exit 1; }; }
17073 fi
17074
17075
17076
17077
17078
17079
17080 for ac_func in strerror_r getpwuid_r gethostbyname_r
17081 do
17082 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17083 echo "$as_me:$LINENO: checking for $ac_func" >&5
17084 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17085 if eval "test \"\${$as_ac_var+set}\" = set"; then
17086   echo $ECHO_N "(cached) $ECHO_C" >&6
17087 else
17088   cat >conftest.$ac_ext <<_ACEOF
17089 /* confdefs.h.  */
17090 _ACEOF
17091 cat confdefs.h >>conftest.$ac_ext
17092 cat >>conftest.$ac_ext <<_ACEOF
17093 /* end confdefs.h.  */
17094 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17095    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17096 #define $ac_func innocuous_$ac_func
17097
17098 /* System header to define __stub macros and hopefully few prototypes,
17099     which can conflict with char $ac_func (); below.
17100     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17101     <limits.h> exists even on freestanding compilers.  */
17102
17103 #ifdef __STDC__
17104 # include <limits.h>
17105 #else
17106 # include <assert.h>
17107 #endif
17108
17109 #undef $ac_func
17110
17111 /* Override any gcc2 internal prototype to avoid an error.  */
17112 #ifdef __cplusplus
17113 extern "C"
17114 {
17115 #endif
17116 /* We use char because int might match the return type of a gcc2
17117    builtin and then its argument prototype would still apply.  */
17118 char $ac_func ();
17119 /* The GNU C library defines this for functions which it implements
17120     to always fail with ENOSYS.  Some functions are actually named
17121     something starting with __ and the normal name is an alias.  */
17122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17123 choke me
17124 #else
17125 char (*f) () = $ac_func;
17126 #endif
17127 #ifdef __cplusplus
17128 }
17129 #endif
17130
17131 int
17132 main ()
17133 {
17134 return f != $ac_func;
17135   ;
17136   return 0;
17137 }
17138 _ACEOF
17139 rm -f conftest.$ac_objext conftest$ac_exeext
17140 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17141   (eval $ac_link) 2>conftest.er1
17142   ac_status=$?
17143   grep -v '^ *+' conftest.er1 >conftest.err
17144   rm -f conftest.er1
17145   cat conftest.err >&5
17146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17147   (exit $ac_status); } &&
17148          { ac_try='test -z "$ac_c_werror_flag"
17149                          || test ! -s conftest.err'
17150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17151   (eval $ac_try) 2>&5
17152   ac_status=$?
17153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17154   (exit $ac_status); }; } &&
17155          { ac_try='test -s conftest$ac_exeext'
17156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17157   (eval $ac_try) 2>&5
17158   ac_status=$?
17159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17160   (exit $ac_status); }; }; then
17161   eval "$as_ac_var=yes"
17162 else
17163   echo "$as_me: failed program was:" >&5
17164 sed 's/^/| /' conftest.$ac_ext >&5
17165
17166 eval "$as_ac_var=no"
17167 fi
17168 rm -f conftest.err conftest.$ac_objext \
17169       conftest$ac_exeext conftest.$ac_ext
17170 fi
17171 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17172 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17173 if test `eval echo '${'$as_ac_var'}'` = yes; then
17174   cat >>confdefs.h <<_ACEOF
17175 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17176 _ACEOF
17177
17178 fi
17179 done
17180
17181
17182 # Do test here with the proper thread flags
17183 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17184 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17185 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17186   echo $ECHO_N "(cached) $ECHO_C" >&6
17187 else
17188   cat >conftest.$ac_ext <<_ACEOF
17189 /* confdefs.h.  */
17190 _ACEOF
17191 cat confdefs.h >>conftest.$ac_ext
17192 cat >>conftest.$ac_ext <<_ACEOF
17193 /* end confdefs.h.  */
17194 #include <sys/types.h>
17195 #include <pwd.h>
17196 int
17197 main ()
17198 {
17199 uid_t uid;
17200 struct passwd *space;
17201 char *buf;
17202 size_t bufsize;
17203 struct passwd **result;
17204 getpwuid_r(uid, space, buf, bufsize, result);
17205   ;
17206   return 0;
17207 }
17208 _ACEOF
17209 rm -f conftest.$ac_objext
17210 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17211   (eval $ac_compile) 2>conftest.er1
17212   ac_status=$?
17213   grep -v '^ *+' conftest.er1 >conftest.err
17214   rm -f conftest.er1
17215   cat conftest.err >&5
17216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17217   (exit $ac_status); } &&
17218          { ac_try='test -z "$ac_c_werror_flag"
17219                          || test ! -s conftest.err'
17220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17221   (eval $ac_try) 2>&5
17222   ac_status=$?
17223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17224   (exit $ac_status); }; } &&
17225          { ac_try='test -s conftest.$ac_objext'
17226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17227   (eval $ac_try) 2>&5
17228   ac_status=$?
17229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17230   (exit $ac_status); }; }; then
17231   pgac_func_getpwuid_r_5arg=yes
17232 else
17233   echo "$as_me: failed program was:" >&5
17234 sed 's/^/| /' conftest.$ac_ext >&5
17235
17236 pgac_func_getpwuid_r_5arg=no
17237 fi
17238 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17239 fi
17240 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17241 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17242 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17243
17244 cat >>confdefs.h <<\_ACEOF
17245 #define GETPWUID_R_5ARG
17246 _ACEOF
17247
17248 fi
17249
17250 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17251 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17252 if test "${pgac_func_strerror_r_int+set}" = set; then
17253   echo $ECHO_N "(cached) $ECHO_C" >&6
17254 else
17255   cat >conftest.$ac_ext <<_ACEOF
17256 /* confdefs.h.  */
17257 _ACEOF
17258 cat confdefs.h >>conftest.$ac_ext
17259 cat >>conftest.$ac_ext <<_ACEOF
17260 /* end confdefs.h.  */
17261 #include <string.h>
17262 int
17263 main ()
17264 {
17265 #ifndef _AIX
17266 int strerror_r(int, char *, size_t);
17267 #else
17268 /* Older AIX has 'int' for the third argument so we don't test the args. */
17269 int strerror_r();
17270 #endif
17271   ;
17272   return 0;
17273 }
17274 _ACEOF
17275 rm -f conftest.$ac_objext
17276 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17277   (eval $ac_compile) 2>conftest.er1
17278   ac_status=$?
17279   grep -v '^ *+' conftest.er1 >conftest.err
17280   rm -f conftest.er1
17281   cat conftest.err >&5
17282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17283   (exit $ac_status); } &&
17284          { ac_try='test -z "$ac_c_werror_flag"
17285                          || test ! -s conftest.err'
17286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17287   (eval $ac_try) 2>&5
17288   ac_status=$?
17289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17290   (exit $ac_status); }; } &&
17291          { ac_try='test -s conftest.$ac_objext'
17292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17293   (eval $ac_try) 2>&5
17294   ac_status=$?
17295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17296   (exit $ac_status); }; }; then
17297   pgac_func_strerror_r_int=yes
17298 else
17299   echo "$as_me: failed program was:" >&5
17300 sed 's/^/| /' conftest.$ac_ext >&5
17301
17302 pgac_func_strerror_r_int=no
17303 fi
17304 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17305 fi
17306 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17307 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17308 if test x"$pgac_func_strerror_r_int" = xyes ; then
17309
17310 cat >>confdefs.h <<\_ACEOF
17311 #define STRERROR_R_INT
17312 _ACEOF
17313
17314 fi
17315
17316
17317 # this will link libpq against libldap_r
17318 if test "$with_ldap" = yes ; then
17319   if test "$PORTNAME" != "win32"; then
17320
17321 echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
17322 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6
17323 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
17324   echo $ECHO_N "(cached) $ECHO_C" >&6
17325 else
17326   ac_check_lib_save_LIBS=$LIBS
17327 LIBS="-lldap_r  $LIBS"
17328 cat >conftest.$ac_ext <<_ACEOF
17329 /* confdefs.h.  */
17330 _ACEOF
17331 cat confdefs.h >>conftest.$ac_ext
17332 cat >>conftest.$ac_ext <<_ACEOF
17333 /* end confdefs.h.  */
17334
17335 /* Override any gcc2 internal prototype to avoid an error.  */
17336 #ifdef __cplusplus
17337 extern "C"
17338 #endif
17339 /* We use char because int might match the return type of a gcc2
17340    builtin and then its argument prototype would still apply.  */
17341 char ldap_simple_bind ();
17342 int
17343 main ()
17344 {
17345 ldap_simple_bind ();
17346   ;
17347   return 0;
17348 }
17349 _ACEOF
17350 rm -f conftest.$ac_objext conftest$ac_exeext
17351 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17352   (eval $ac_link) 2>conftest.er1
17353   ac_status=$?
17354   grep -v '^ *+' conftest.er1 >conftest.err
17355   rm -f conftest.er1
17356   cat conftest.err >&5
17357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17358   (exit $ac_status); } &&
17359          { ac_try='test -z "$ac_c_werror_flag"
17360                          || test ! -s conftest.err'
17361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17362   (eval $ac_try) 2>&5
17363   ac_status=$?
17364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17365   (exit $ac_status); }; } &&
17366          { ac_try='test -s conftest$ac_exeext'
17367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17368   (eval $ac_try) 2>&5
17369   ac_status=$?
17370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17371   (exit $ac_status); }; }; then
17372   ac_cv_lib_ldap_r_ldap_simple_bind=yes
17373 else
17374   echo "$as_me: failed program was:" >&5
17375 sed 's/^/| /' conftest.$ac_ext >&5
17376
17377 ac_cv_lib_ldap_r_ldap_simple_bind=no
17378 fi
17379 rm -f conftest.err conftest.$ac_objext \
17380       conftest$ac_exeext conftest.$ac_ext
17381 LIBS=$ac_check_lib_save_LIBS
17382 fi
17383 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
17384 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6
17385 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
17386   cat >>confdefs.h <<_ACEOF
17387 #define HAVE_LIBLDAP_R 1
17388 _ACEOF
17389
17390   LIBS="-lldap_r $LIBS"
17391
17392 else
17393   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
17394 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
17395    { (exit 1); exit 1; }; }
17396 fi
17397
17398     PTHREAD_LIBS="$PTHREAD_LIBS -lldap_r"
17399   fi
17400 fi
17401
17402 CFLAGS="$_CFLAGS"
17403 LIBS="$_LIBS"
17404
17405 else
17406 # do not use values from template file
17407 PTHREAD_CFLAGS=
17408 PTHREAD_LIBS=
17409 fi
17410
17411
17412
17413
17414
17415 # This test makes sure that run tests work at all.  Sometimes a shared
17416 # library is found by the linker, but the runtime linker can't find it.
17417 # This check should come after all modifications of compiler or linker
17418 # variables, and before any other run tests.
17419 echo "$as_me:$LINENO: checking test program" >&5
17420 echo $ECHO_N "checking test program... $ECHO_C" >&6
17421 if test "$cross_compiling" = yes; then
17422   echo "$as_me:$LINENO: result: cross-compiling" >&5
17423 echo "${ECHO_T}cross-compiling" >&6
17424 else
17425   cat >conftest.$ac_ext <<_ACEOF
17426 /* confdefs.h.  */
17427 _ACEOF
17428 cat confdefs.h >>conftest.$ac_ext
17429 cat >>conftest.$ac_ext <<_ACEOF
17430 /* end confdefs.h.  */
17431 int main() { return 0; }
17432 _ACEOF
17433 rm -f conftest$ac_exeext
17434 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17435   (eval $ac_link) 2>&5
17436   ac_status=$?
17437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17438   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17440   (eval $ac_try) 2>&5
17441   ac_status=$?
17442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17443   (exit $ac_status); }; }; then
17444   echo "$as_me:$LINENO: result: ok" >&5
17445 echo "${ECHO_T}ok" >&6
17446 else
17447   echo "$as_me: program exited with status $ac_status" >&5
17448 echo "$as_me: failed program was:" >&5
17449 sed 's/^/| /' conftest.$ac_ext >&5
17450
17451 ( exit $ac_status )
17452 echo "$as_me:$LINENO: result: failed" >&5
17453 echo "${ECHO_T}failed" >&6
17454 { { echo "$as_me:$LINENO: error:
17455 *** Could not execute a simple test program.  This may be a problem
17456 *** related to locating shared libraries.  Check the file 'config.log'
17457 *** for the exact reason." >&5
17458 echo "$as_me: error:
17459 *** Could not execute a simple test program.  This may be a problem
17460 *** related to locating shared libraries.  Check the file 'config.log'
17461 *** for the exact reason." >&2;}
17462    { (exit 1); exit 1; }; }
17463 fi
17464 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17465 fi
17466
17467 # --------------------
17468 # Run tests below here
17469 # --------------------
17470
17471 # Force use of our snprintf if system's doesn't do arg control
17472 # See comment above at snprintf test for details.
17473 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17474   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17475 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17476 if test "${pgac_cv_printf_arg_control+set}" = set; then
17477   echo $ECHO_N "(cached) $ECHO_C" >&6
17478 else
17479   if test "$cross_compiling" = yes; then
17480   pgac_cv_printf_arg_control=cross
17481 else
17482   cat >conftest.$ac_ext <<_ACEOF
17483 /* confdefs.h.  */
17484 _ACEOF
17485 cat confdefs.h >>conftest.$ac_ext
17486 cat >>conftest.$ac_ext <<_ACEOF
17487 /* end confdefs.h.  */
17488 #include <stdio.h>
17489 #include <string.h>
17490
17491 int main()
17492 {
17493   char buf[100];
17494
17495   /* can it swap arguments? */
17496   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17497   if (strcmp(buf, "4 3") != 0)
17498     return 1;
17499   return 0;
17500 }
17501 _ACEOF
17502 rm -f conftest$ac_exeext
17503 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17504   (eval $ac_link) 2>&5
17505   ac_status=$?
17506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17507   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17509   (eval $ac_try) 2>&5
17510   ac_status=$?
17511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17512   (exit $ac_status); }; }; then
17513   pgac_cv_printf_arg_control=yes
17514 else
17515   echo "$as_me: program exited with status $ac_status" >&5
17516 echo "$as_me: failed program was:" >&5
17517 sed 's/^/| /' conftest.$ac_ext >&5
17518
17519 ( exit $ac_status )
17520 pgac_cv_printf_arg_control=no
17521 fi
17522 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17523 fi
17524
17525 fi
17526 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17527 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17528
17529   if test $pgac_cv_printf_arg_control != yes ; then
17530     pgac_need_repl_snprintf=yes
17531   fi
17532 fi
17533
17534
17535
17536 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17537 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17538 if test "${pgac_cv_type_long_int_64+set}" = set; then
17539   echo $ECHO_N "(cached) $ECHO_C" >&6
17540 else
17541   if test "$cross_compiling" = yes; then
17542   # If cross-compiling, check the size reported by the compiler and
17543 # trust that the arithmetic works.
17544 cat >conftest.$ac_ext <<_ACEOF
17545 /* confdefs.h.  */
17546 _ACEOF
17547 cat confdefs.h >>conftest.$ac_ext
17548 cat >>conftest.$ac_ext <<_ACEOF
17549 /* end confdefs.h.  */
17550
17551 int
17552 main ()
17553 {
17554 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17555 test_array [0] = 0
17556
17557   ;
17558   return 0;
17559 }
17560 _ACEOF
17561 rm -f conftest.$ac_objext
17562 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17563   (eval $ac_compile) 2>conftest.er1
17564   ac_status=$?
17565   grep -v '^ *+' conftest.er1 >conftest.err
17566   rm -f conftest.er1
17567   cat conftest.err >&5
17568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17569   (exit $ac_status); } &&
17570          { ac_try='test -z "$ac_c_werror_flag"
17571                          || test ! -s conftest.err'
17572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17573   (eval $ac_try) 2>&5
17574   ac_status=$?
17575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17576   (exit $ac_status); }; } &&
17577          { ac_try='test -s conftest.$ac_objext'
17578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17579   (eval $ac_try) 2>&5
17580   ac_status=$?
17581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17582   (exit $ac_status); }; }; then
17583   pgac_cv_type_long_int_64=yes
17584 else
17585   echo "$as_me: failed program was:" >&5
17586 sed 's/^/| /' conftest.$ac_ext >&5
17587
17588 pgac_cv_type_long_int_64=no
17589 fi
17590 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17591 else
17592   cat >conftest.$ac_ext <<_ACEOF
17593 /* confdefs.h.  */
17594 _ACEOF
17595 cat confdefs.h >>conftest.$ac_ext
17596 cat >>conftest.$ac_ext <<_ACEOF
17597 /* end confdefs.h.  */
17598 typedef long int ac_int64;
17599
17600 /*
17601  * These are globals to discourage the compiler from folding all the
17602  * arithmetic tests down to compile-time constants.
17603  */
17604 ac_int64 a = 20000001;
17605 ac_int64 b = 40000005;
17606
17607 int does_int64_work()
17608 {
17609   ac_int64 c,d;
17610
17611   if (sizeof(ac_int64) != 8)
17612     return 0;                   /* definitely not the right size */
17613
17614   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17615   c = a * b;
17616   d = (c + b) / b;
17617   if (d != a+1)
17618     return 0;
17619   return 1;
17620 }
17621 main() {
17622   exit(! does_int64_work());
17623 }
17624 _ACEOF
17625 rm -f conftest$ac_exeext
17626 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17627   (eval $ac_link) 2>&5
17628   ac_status=$?
17629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17630   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17632   (eval $ac_try) 2>&5
17633   ac_status=$?
17634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17635   (exit $ac_status); }; }; then
17636   pgac_cv_type_long_int_64=yes
17637 else
17638   echo "$as_me: program exited with status $ac_status" >&5
17639 echo "$as_me: failed program was:" >&5
17640 sed 's/^/| /' conftest.$ac_ext >&5
17641
17642 ( exit $ac_status )
17643 pgac_cv_type_long_int_64=no
17644 fi
17645 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17646 fi
17647 fi
17648 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17649 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17650
17651 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17652 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17653
17654 cat >>confdefs.h <<\_ACEOF
17655 #define HAVE_LONG_INT_64
17656 _ACEOF
17657
17658 fi
17659
17660
17661 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17662   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17663 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17664 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17665   echo $ECHO_N "(cached) $ECHO_C" >&6
17666 else
17667   if test "$cross_compiling" = yes; then
17668   # If cross-compiling, check the size reported by the compiler and
17669 # trust that the arithmetic works.
17670 cat >conftest.$ac_ext <<_ACEOF
17671 /* confdefs.h.  */
17672 _ACEOF
17673 cat confdefs.h >>conftest.$ac_ext
17674 cat >>conftest.$ac_ext <<_ACEOF
17675 /* end confdefs.h.  */
17676
17677 int
17678 main ()
17679 {
17680 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17681 test_array [0] = 0
17682
17683   ;
17684   return 0;
17685 }
17686 _ACEOF
17687 rm -f conftest.$ac_objext
17688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17689   (eval $ac_compile) 2>conftest.er1
17690   ac_status=$?
17691   grep -v '^ *+' conftest.er1 >conftest.err
17692   rm -f conftest.er1
17693   cat conftest.err >&5
17694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17695   (exit $ac_status); } &&
17696          { ac_try='test -z "$ac_c_werror_flag"
17697                          || test ! -s conftest.err'
17698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17699   (eval $ac_try) 2>&5
17700   ac_status=$?
17701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17702   (exit $ac_status); }; } &&
17703          { ac_try='test -s conftest.$ac_objext'
17704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17705   (eval $ac_try) 2>&5
17706   ac_status=$?
17707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17708   (exit $ac_status); }; }; then
17709   pgac_cv_type_long_long_int_64=yes
17710 else
17711   echo "$as_me: failed program was:" >&5
17712 sed 's/^/| /' conftest.$ac_ext >&5
17713
17714 pgac_cv_type_long_long_int_64=no
17715 fi
17716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17717 else
17718   cat >conftest.$ac_ext <<_ACEOF
17719 /* confdefs.h.  */
17720 _ACEOF
17721 cat confdefs.h >>conftest.$ac_ext
17722 cat >>conftest.$ac_ext <<_ACEOF
17723 /* end confdefs.h.  */
17724 typedef long long int ac_int64;
17725
17726 /*
17727  * These are globals to discourage the compiler from folding all the
17728  * arithmetic tests down to compile-time constants.
17729  */
17730 ac_int64 a = 20000001;
17731 ac_int64 b = 40000005;
17732
17733 int does_int64_work()
17734 {
17735   ac_int64 c,d;
17736
17737   if (sizeof(ac_int64) != 8)
17738     return 0;                   /* definitely not the right size */
17739
17740   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17741   c = a * b;
17742   d = (c + b) / b;
17743   if (d != a+1)
17744     return 0;
17745   return 1;
17746 }
17747 main() {
17748   exit(! does_int64_work());
17749 }
17750 _ACEOF
17751 rm -f conftest$ac_exeext
17752 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17753   (eval $ac_link) 2>&5
17754   ac_status=$?
17755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17756   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17758   (eval $ac_try) 2>&5
17759   ac_status=$?
17760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17761   (exit $ac_status); }; }; then
17762   pgac_cv_type_long_long_int_64=yes
17763 else
17764   echo "$as_me: program exited with status $ac_status" >&5
17765 echo "$as_me: failed program was:" >&5
17766 sed 's/^/| /' conftest.$ac_ext >&5
17767
17768 ( exit $ac_status )
17769 pgac_cv_type_long_long_int_64=no
17770 fi
17771 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17772 fi
17773 fi
17774 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17775 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17776
17777 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17778 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17779
17780 cat >>confdefs.h <<\_ACEOF
17781 #define HAVE_LONG_LONG_INT_64
17782 _ACEOF
17783
17784 fi
17785
17786 fi
17787
17788
17789
17790 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17791   cat >conftest.$ac_ext <<_ACEOF
17792 /* confdefs.h.  */
17793 _ACEOF
17794 cat confdefs.h >>conftest.$ac_ext
17795 cat >>conftest.$ac_ext <<_ACEOF
17796 /* end confdefs.h.  */
17797
17798 #define INT64CONST(x)  x##LL
17799 long long int foo = INT64CONST(0x1234567890123456);
17800
17801 int
17802 main ()
17803 {
17804
17805   ;
17806   return 0;
17807 }
17808 _ACEOF
17809 rm -f conftest.$ac_objext
17810 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17811   (eval $ac_compile) 2>conftest.er1
17812   ac_status=$?
17813   grep -v '^ *+' conftest.er1 >conftest.err
17814   rm -f conftest.er1
17815   cat conftest.err >&5
17816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17817   (exit $ac_status); } &&
17818          { ac_try='test -z "$ac_c_werror_flag"
17819                          || test ! -s conftest.err'
17820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17821   (eval $ac_try) 2>&5
17822   ac_status=$?
17823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17824   (exit $ac_status); }; } &&
17825          { ac_try='test -s conftest.$ac_objext'
17826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17827   (eval $ac_try) 2>&5
17828   ac_status=$?
17829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17830   (exit $ac_status); }; }; then
17831
17832 cat >>confdefs.h <<\_ACEOF
17833 #define HAVE_LL_CONSTANTS 1
17834 _ACEOF
17835
17836 else
17837   echo "$as_me: failed program was:" >&5
17838 sed 's/^/| /' conftest.$ac_ext >&5
17839
17840 fi
17841 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17842 fi
17843
17844
17845 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17846 # we found we need to use "long long int", better check.  We cope with
17847 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17848 # work, fall back to our own snprintf emulation (which we know uses %lld).
17849
17850 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17851   if test $pgac_need_repl_snprintf = no; then
17852     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17853 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17854 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17855   echo $ECHO_N "(cached) $ECHO_C" >&6
17856 else
17857   for pgac_format in '%lld' '%qd' '%I64d'; do
17858 if test "$cross_compiling" = yes; then
17859   pgac_cv_snprintf_long_long_int_format=cross; break
17860 else
17861   cat >conftest.$ac_ext <<_ACEOF
17862 /* confdefs.h.  */
17863 _ACEOF
17864 cat confdefs.h >>conftest.$ac_ext
17865 cat >>conftest.$ac_ext <<_ACEOF
17866 /* end confdefs.h.  */
17867 #include <stdio.h>
17868 typedef long long int ac_int64;
17869 #define INT64_FORMAT "$pgac_format"
17870
17871 ac_int64 a = 20000001;
17872 ac_int64 b = 40000005;
17873
17874 int does_int64_snprintf_work()
17875 {
17876   ac_int64 c;
17877   char buf[100];
17878
17879   if (sizeof(ac_int64) != 8)
17880     return 0;                   /* doesn't look like the right size */
17881
17882   c = a * b;
17883   snprintf(buf, 100, INT64_FORMAT, c);
17884   if (strcmp(buf, "800000140000005") != 0)
17885     return 0;                   /* either multiply or snprintf is busted */
17886   return 1;
17887 }
17888 main() {
17889   exit(! does_int64_snprintf_work());
17890 }
17891 _ACEOF
17892 rm -f conftest$ac_exeext
17893 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17894   (eval $ac_link) 2>&5
17895   ac_status=$?
17896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17897   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17899   (eval $ac_try) 2>&5
17900   ac_status=$?
17901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17902   (exit $ac_status); }; }; then
17903   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17904 else
17905   echo "$as_me: program exited with status $ac_status" >&5
17906 echo "$as_me: failed program was:" >&5
17907 sed 's/^/| /' conftest.$ac_ext >&5
17908
17909 fi
17910 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17911 fi
17912 done
17913 fi
17914
17915 LONG_LONG_INT_FORMAT=''
17916
17917 case $pgac_cv_snprintf_long_long_int_format in
17918   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17919 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17920   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17921 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17922          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17923   *)     echo "$as_me:$LINENO: result: none" >&5
17924 echo "${ECHO_T}none" >&6;;
17925 esac
17926     if test "$LONG_LONG_INT_FORMAT" = ""; then
17927       # Force usage of our own snprintf, since system snprintf is broken
17928       pgac_need_repl_snprintf=yes
17929       LONG_LONG_INT_FORMAT='%lld'
17930     fi
17931   else
17932     # Here if we previously decided we needed to use our own snprintf
17933     LONG_LONG_INT_FORMAT='%lld'
17934   fi
17935   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17936   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17937   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17938 else
17939   # Here if we are not using 'long long int' at all
17940   INT64_FORMAT='"%ld"'
17941   UINT64_FORMAT='"%lu"'
17942 fi
17943
17944
17945 cat >>confdefs.h <<_ACEOF
17946 #define INT64_FORMAT $INT64_FORMAT
17947 _ACEOF
17948
17949
17950
17951 cat >>confdefs.h <<_ACEOF
17952 #define UINT64_FORMAT $UINT64_FORMAT
17953 _ACEOF
17954
17955
17956 # Now we have checked all the reasons to replace snprintf
17957 if test $pgac_need_repl_snprintf = yes; then
17958
17959 cat >>confdefs.h <<\_ACEOF
17960 #define USE_REPL_SNPRINTF 1
17961 _ACEOF
17962
17963   case $LIBOBJS in
17964     "snprintf.$ac_objext"   | \
17965   *" snprintf.$ac_objext"   | \
17966     "snprintf.$ac_objext "* | \
17967   *" snprintf.$ac_objext "* ) ;;
17968   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17969 esac
17970
17971 fi
17972
17973 # Need a #define for the size of Datum (unsigned long)
17974 echo "$as_me:$LINENO: checking for unsigned long" >&5
17975 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17976 if test "${ac_cv_type_unsigned_long+set}" = set; then
17977   echo $ECHO_N "(cached) $ECHO_C" >&6
17978 else
17979   cat >conftest.$ac_ext <<_ACEOF
17980 /* confdefs.h.  */
17981 _ACEOF
17982 cat confdefs.h >>conftest.$ac_ext
17983 cat >>conftest.$ac_ext <<_ACEOF
17984 /* end confdefs.h.  */
17985 $ac_includes_default
17986 int
17987 main ()
17988 {
17989 if ((unsigned long *) 0)
17990   return 0;
17991 if (sizeof (unsigned long))
17992   return 0;
17993   ;
17994   return 0;
17995 }
17996 _ACEOF
17997 rm -f conftest.$ac_objext
17998 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17999   (eval $ac_compile) 2>conftest.er1
18000   ac_status=$?
18001   grep -v '^ *+' conftest.er1 >conftest.err
18002   rm -f conftest.er1
18003   cat conftest.err >&5
18004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18005   (exit $ac_status); } &&
18006          { ac_try='test -z "$ac_c_werror_flag"
18007                          || test ! -s conftest.err'
18008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18009   (eval $ac_try) 2>&5
18010   ac_status=$?
18011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18012   (exit $ac_status); }; } &&
18013          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
18019   ac_cv_type_unsigned_long=yes
18020 else
18021   echo "$as_me: failed program was:" >&5
18022 sed 's/^/| /' conftest.$ac_ext >&5
18023
18024 ac_cv_type_unsigned_long=no
18025 fi
18026 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18027 fi
18028 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
18029 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
18030
18031 echo "$as_me:$LINENO: checking size of unsigned long" >&5
18032 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
18033 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
18034   echo $ECHO_N "(cached) $ECHO_C" >&6
18035 else
18036   if test "$ac_cv_type_unsigned_long" = yes; then
18037   # The cast to unsigned long works around a bug in the HP C Compiler
18038   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18039   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18040   # This bug is HP SR number 8606223364.
18041   if test "$cross_compiling" = yes; then
18042   # Depending upon the size, compute the lo and hi bounds.
18043 cat >conftest.$ac_ext <<_ACEOF
18044 /* confdefs.h.  */
18045 _ACEOF
18046 cat confdefs.h >>conftest.$ac_ext
18047 cat >>conftest.$ac_ext <<_ACEOF
18048 /* end confdefs.h.  */
18049 $ac_includes_default
18050 int
18051 main ()
18052 {
18053 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
18054 test_array [0] = 0
18055
18056   ;
18057   return 0;
18058 }
18059 _ACEOF
18060 rm -f conftest.$ac_objext
18061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18062   (eval $ac_compile) 2>conftest.er1
18063   ac_status=$?
18064   grep -v '^ *+' conftest.er1 >conftest.err
18065   rm -f conftest.er1
18066   cat conftest.err >&5
18067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068   (exit $ac_status); } &&
18069          { ac_try='test -z "$ac_c_werror_flag"
18070                          || test ! -s conftest.err'
18071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18072   (eval $ac_try) 2>&5
18073   ac_status=$?
18074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18075   (exit $ac_status); }; } &&
18076          { ac_try='test -s conftest.$ac_objext'
18077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18078   (eval $ac_try) 2>&5
18079   ac_status=$?
18080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18081   (exit $ac_status); }; }; then
18082   ac_lo=0 ac_mid=0
18083   while :; do
18084     cat >conftest.$ac_ext <<_ACEOF
18085 /* confdefs.h.  */
18086 _ACEOF
18087 cat confdefs.h >>conftest.$ac_ext
18088 cat >>conftest.$ac_ext <<_ACEOF
18089 /* end confdefs.h.  */
18090 $ac_includes_default
18091 int
18092 main ()
18093 {
18094 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18095 test_array [0] = 0
18096
18097   ;
18098   return 0;
18099 }
18100 _ACEOF
18101 rm -f conftest.$ac_objext
18102 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18103   (eval $ac_compile) 2>conftest.er1
18104   ac_status=$?
18105   grep -v '^ *+' conftest.er1 >conftest.err
18106   rm -f conftest.er1
18107   cat conftest.err >&5
18108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18109   (exit $ac_status); } &&
18110          { ac_try='test -z "$ac_c_werror_flag"
18111                          || test ! -s conftest.err'
18112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18113   (eval $ac_try) 2>&5
18114   ac_status=$?
18115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18116   (exit $ac_status); }; } &&
18117          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
18123   ac_hi=$ac_mid; break
18124 else
18125   echo "$as_me: failed program was:" >&5
18126 sed 's/^/| /' conftest.$ac_ext >&5
18127
18128 ac_lo=`expr $ac_mid + 1`
18129                     if test $ac_lo -le $ac_mid; then
18130                       ac_lo= ac_hi=
18131                       break
18132                     fi
18133                     ac_mid=`expr 2 '*' $ac_mid + 1`
18134 fi
18135 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18136   done
18137 else
18138   echo "$as_me: failed program was:" >&5
18139 sed 's/^/| /' conftest.$ac_ext >&5
18140
18141 cat >conftest.$ac_ext <<_ACEOF
18142 /* confdefs.h.  */
18143 _ACEOF
18144 cat confdefs.h >>conftest.$ac_ext
18145 cat >>conftest.$ac_ext <<_ACEOF
18146 /* end confdefs.h.  */
18147 $ac_includes_default
18148 int
18149 main ()
18150 {
18151 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
18152 test_array [0] = 0
18153
18154   ;
18155   return 0;
18156 }
18157 _ACEOF
18158 rm -f conftest.$ac_objext
18159 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18160   (eval $ac_compile) 2>conftest.er1
18161   ac_status=$?
18162   grep -v '^ *+' conftest.er1 >conftest.err
18163   rm -f conftest.er1
18164   cat conftest.err >&5
18165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18166   (exit $ac_status); } &&
18167          { ac_try='test -z "$ac_c_werror_flag"
18168                          || test ! -s conftest.err'
18169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18170   (eval $ac_try) 2>&5
18171   ac_status=$?
18172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18173   (exit $ac_status); }; } &&
18174          { ac_try='test -s conftest.$ac_objext'
18175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18176   (eval $ac_try) 2>&5
18177   ac_status=$?
18178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18179   (exit $ac_status); }; }; then
18180   ac_hi=-1 ac_mid=-1
18181   while :; do
18182     cat >conftest.$ac_ext <<_ACEOF
18183 /* confdefs.h.  */
18184 _ACEOF
18185 cat confdefs.h >>conftest.$ac_ext
18186 cat >>conftest.$ac_ext <<_ACEOF
18187 /* end confdefs.h.  */
18188 $ac_includes_default
18189 int
18190 main ()
18191 {
18192 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18193 test_array [0] = 0
18194
18195   ;
18196   return 0;
18197 }
18198 _ACEOF
18199 rm -f conftest.$ac_objext
18200 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18201   (eval $ac_compile) 2>conftest.er1
18202   ac_status=$?
18203   grep -v '^ *+' conftest.er1 >conftest.err
18204   rm -f conftest.er1
18205   cat conftest.err >&5
18206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18207   (exit $ac_status); } &&
18208          { ac_try='test -z "$ac_c_werror_flag"
18209                          || test ! -s conftest.err'
18210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18211   (eval $ac_try) 2>&5
18212   ac_status=$?
18213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18214   (exit $ac_status); }; } &&
18215          { ac_try='test -s conftest.$ac_objext'
18216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18217   (eval $ac_try) 2>&5
18218   ac_status=$?
18219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18220   (exit $ac_status); }; }; then
18221   ac_lo=$ac_mid; break
18222 else
18223   echo "$as_me: failed program was:" >&5
18224 sed 's/^/| /' conftest.$ac_ext >&5
18225
18226 ac_hi=`expr '(' $ac_mid ')' - 1`
18227                        if test $ac_mid -le $ac_hi; then
18228                          ac_lo= ac_hi=
18229                          break
18230                        fi
18231                        ac_mid=`expr 2 '*' $ac_mid`
18232 fi
18233 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18234   done
18235 else
18236   echo "$as_me: failed program was:" >&5
18237 sed 's/^/| /' conftest.$ac_ext >&5
18238
18239 ac_lo= ac_hi=
18240 fi
18241 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18242 fi
18243 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18244 # Binary search between lo and hi bounds.
18245 while test "x$ac_lo" != "x$ac_hi"; do
18246   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18247   cat >conftest.$ac_ext <<_ACEOF
18248 /* confdefs.h.  */
18249 _ACEOF
18250 cat confdefs.h >>conftest.$ac_ext
18251 cat >>conftest.$ac_ext <<_ACEOF
18252 /* end confdefs.h.  */
18253 $ac_includes_default
18254 int
18255 main ()
18256 {
18257 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18258 test_array [0] = 0
18259
18260   ;
18261   return 0;
18262 }
18263 _ACEOF
18264 rm -f conftest.$ac_objext
18265 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18266   (eval $ac_compile) 2>conftest.er1
18267   ac_status=$?
18268   grep -v '^ *+' conftest.er1 >conftest.err
18269   rm -f conftest.er1
18270   cat conftest.err >&5
18271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18272   (exit $ac_status); } &&
18273          { ac_try='test -z "$ac_c_werror_flag"
18274                          || test ! -s conftest.err'
18275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18276   (eval $ac_try) 2>&5
18277   ac_status=$?
18278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18279   (exit $ac_status); }; } &&
18280          { ac_try='test -s conftest.$ac_objext'
18281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18282   (eval $ac_try) 2>&5
18283   ac_status=$?
18284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18285   (exit $ac_status); }; }; then
18286   ac_hi=$ac_mid
18287 else
18288   echo "$as_me: failed program was:" >&5
18289 sed 's/^/| /' conftest.$ac_ext >&5
18290
18291 ac_lo=`expr '(' $ac_mid ')' + 1`
18292 fi
18293 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18294 done
18295 case $ac_lo in
18296 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18297 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18298 See \`config.log' for more details." >&5
18299 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18300 See \`config.log' for more details." >&2;}
18301    { (exit 1); exit 1; }; } ;;
18302 esac
18303 else
18304   if test "$cross_compiling" = yes; then
18305   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18306 See \`config.log' for more details." >&5
18307 echo "$as_me: error: cannot run test program while cross compiling
18308 See \`config.log' for more details." >&2;}
18309    { (exit 1); exit 1; }; }
18310 else
18311   cat >conftest.$ac_ext <<_ACEOF
18312 /* confdefs.h.  */
18313 _ACEOF
18314 cat confdefs.h >>conftest.$ac_ext
18315 cat >>conftest.$ac_ext <<_ACEOF
18316 /* end confdefs.h.  */
18317 $ac_includes_default
18318 long longval () { return (long) (sizeof (unsigned long)); }
18319 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18320 #include <stdio.h>
18321 #include <stdlib.h>
18322 int
18323 main ()
18324 {
18325
18326   FILE *f = fopen ("conftest.val", "w");
18327   if (! f)
18328     exit (1);
18329   if (((long) (sizeof (unsigned long))) < 0)
18330     {
18331       long i = longval ();
18332       if (i != ((long) (sizeof (unsigned long))))
18333         exit (1);
18334       fprintf (f, "%ld\n", i);
18335     }
18336   else
18337     {
18338       unsigned long i = ulongval ();
18339       if (i != ((long) (sizeof (unsigned long))))
18340         exit (1);
18341       fprintf (f, "%lu\n", i);
18342     }
18343   exit (ferror (f) || fclose (f) != 0);
18344
18345   ;
18346   return 0;
18347 }
18348 _ACEOF
18349 rm -f conftest$ac_exeext
18350 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18351   (eval $ac_link) 2>&5
18352   ac_status=$?
18353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18354   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18356   (eval $ac_try) 2>&5
18357   ac_status=$?
18358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18359   (exit $ac_status); }; }; then
18360   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18361 else
18362   echo "$as_me: program exited with status $ac_status" >&5
18363 echo "$as_me: failed program was:" >&5
18364 sed 's/^/| /' conftest.$ac_ext >&5
18365
18366 ( exit $ac_status )
18367 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18368 See \`config.log' for more details." >&5
18369 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18370 See \`config.log' for more details." >&2;}
18371    { (exit 1); exit 1; }; }
18372 fi
18373 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18374 fi
18375 fi
18376 rm -f conftest.val
18377 else
18378   ac_cv_sizeof_unsigned_long=0
18379 fi
18380 fi
18381 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18382 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18383 cat >>confdefs.h <<_ACEOF
18384 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18385 _ACEOF
18386
18387
18388
18389 # And one for the size of size_t (enables tweaks for > 32bit address space)
18390 echo "$as_me:$LINENO: checking for size_t" >&5
18391 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18392 if test "${ac_cv_type_size_t+set}" = set; then
18393   echo $ECHO_N "(cached) $ECHO_C" >&6
18394 else
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 if ((size_t *) 0)
18406   return 0;
18407 if (sizeof (size_t))
18408   return 0;
18409   ;
18410   return 0;
18411 }
18412 _ACEOF
18413 rm -f conftest.$ac_objext
18414 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18415   (eval $ac_compile) 2>conftest.er1
18416   ac_status=$?
18417   grep -v '^ *+' conftest.er1 >conftest.err
18418   rm -f conftest.er1
18419   cat conftest.err >&5
18420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18421   (exit $ac_status); } &&
18422          { ac_try='test -z "$ac_c_werror_flag"
18423                          || test ! -s conftest.err'
18424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18425   (eval $ac_try) 2>&5
18426   ac_status=$?
18427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18428   (exit $ac_status); }; } &&
18429          { ac_try='test -s conftest.$ac_objext'
18430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18431   (eval $ac_try) 2>&5
18432   ac_status=$?
18433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18434   (exit $ac_status); }; }; then
18435   ac_cv_type_size_t=yes
18436 else
18437   echo "$as_me: failed program was:" >&5
18438 sed 's/^/| /' conftest.$ac_ext >&5
18439
18440 ac_cv_type_size_t=no
18441 fi
18442 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18443 fi
18444 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18445 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18446
18447 echo "$as_me:$LINENO: checking size of size_t" >&5
18448 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18449 if test "${ac_cv_sizeof_size_t+set}" = set; then
18450   echo $ECHO_N "(cached) $ECHO_C" >&6
18451 else
18452   if test "$ac_cv_type_size_t" = yes; then
18453   # The cast to unsigned long works around a bug in the HP C Compiler
18454   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18455   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18456   # This bug is HP SR number 8606223364.
18457   if test "$cross_compiling" = yes; then
18458   # Depending upon the size, compute the lo and hi bounds.
18459 cat >conftest.$ac_ext <<_ACEOF
18460 /* confdefs.h.  */
18461 _ACEOF
18462 cat confdefs.h >>conftest.$ac_ext
18463 cat >>conftest.$ac_ext <<_ACEOF
18464 /* end confdefs.h.  */
18465 $ac_includes_default
18466 int
18467 main ()
18468 {
18469 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18470 test_array [0] = 0
18471
18472   ;
18473   return 0;
18474 }
18475 _ACEOF
18476 rm -f conftest.$ac_objext
18477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18478   (eval $ac_compile) 2>conftest.er1
18479   ac_status=$?
18480   grep -v '^ *+' conftest.er1 >conftest.err
18481   rm -f conftest.er1
18482   cat conftest.err >&5
18483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18484   (exit $ac_status); } &&
18485          { ac_try='test -z "$ac_c_werror_flag"
18486                          || test ! -s conftest.err'
18487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18488   (eval $ac_try) 2>&5
18489   ac_status=$?
18490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18491   (exit $ac_status); }; } &&
18492          { ac_try='test -s conftest.$ac_objext'
18493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18494   (eval $ac_try) 2>&5
18495   ac_status=$?
18496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18497   (exit $ac_status); }; }; then
18498   ac_lo=0 ac_mid=0
18499   while :; do
18500     cat >conftest.$ac_ext <<_ACEOF
18501 /* confdefs.h.  */
18502 _ACEOF
18503 cat confdefs.h >>conftest.$ac_ext
18504 cat >>conftest.$ac_ext <<_ACEOF
18505 /* end confdefs.h.  */
18506 $ac_includes_default
18507 int
18508 main ()
18509 {
18510 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18511 test_array [0] = 0
18512
18513   ;
18514   return 0;
18515 }
18516 _ACEOF
18517 rm -f conftest.$ac_objext
18518 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18519   (eval $ac_compile) 2>conftest.er1
18520   ac_status=$?
18521   grep -v '^ *+' conftest.er1 >conftest.err
18522   rm -f conftest.er1
18523   cat conftest.err >&5
18524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18525   (exit $ac_status); } &&
18526          { ac_try='test -z "$ac_c_werror_flag"
18527                          || test ! -s conftest.err'
18528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18529   (eval $ac_try) 2>&5
18530   ac_status=$?
18531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18532   (exit $ac_status); }; } &&
18533          { ac_try='test -s conftest.$ac_objext'
18534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18535   (eval $ac_try) 2>&5
18536   ac_status=$?
18537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18538   (exit $ac_status); }; }; then
18539   ac_hi=$ac_mid; break
18540 else
18541   echo "$as_me: failed program was:" >&5
18542 sed 's/^/| /' conftest.$ac_ext >&5
18543
18544 ac_lo=`expr $ac_mid + 1`
18545                     if test $ac_lo -le $ac_mid; then
18546                       ac_lo= ac_hi=
18547                       break
18548                     fi
18549                     ac_mid=`expr 2 '*' $ac_mid + 1`
18550 fi
18551 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18552   done
18553 else
18554   echo "$as_me: failed program was:" >&5
18555 sed 's/^/| /' conftest.$ac_ext >&5
18556
18557 cat >conftest.$ac_ext <<_ACEOF
18558 /* confdefs.h.  */
18559 _ACEOF
18560 cat confdefs.h >>conftest.$ac_ext
18561 cat >>conftest.$ac_ext <<_ACEOF
18562 /* end confdefs.h.  */
18563 $ac_includes_default
18564 int
18565 main ()
18566 {
18567 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18568 test_array [0] = 0
18569
18570   ;
18571   return 0;
18572 }
18573 _ACEOF
18574 rm -f conftest.$ac_objext
18575 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18576   (eval $ac_compile) 2>conftest.er1
18577   ac_status=$?
18578   grep -v '^ *+' conftest.er1 >conftest.err
18579   rm -f conftest.er1
18580   cat conftest.err >&5
18581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18582   (exit $ac_status); } &&
18583          { ac_try='test -z "$ac_c_werror_flag"
18584                          || test ! -s conftest.err'
18585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18586   (eval $ac_try) 2>&5
18587   ac_status=$?
18588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18589   (exit $ac_status); }; } &&
18590          { ac_try='test -s conftest.$ac_objext'
18591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18592   (eval $ac_try) 2>&5
18593   ac_status=$?
18594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18595   (exit $ac_status); }; }; then
18596   ac_hi=-1 ac_mid=-1
18597   while :; do
18598     cat >conftest.$ac_ext <<_ACEOF
18599 /* confdefs.h.  */
18600 _ACEOF
18601 cat confdefs.h >>conftest.$ac_ext
18602 cat >>conftest.$ac_ext <<_ACEOF
18603 /* end confdefs.h.  */
18604 $ac_includes_default
18605 int
18606 main ()
18607 {
18608 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18609 test_array [0] = 0
18610
18611   ;
18612   return 0;
18613 }
18614 _ACEOF
18615 rm -f conftest.$ac_objext
18616 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18617   (eval $ac_compile) 2>conftest.er1
18618   ac_status=$?
18619   grep -v '^ *+' conftest.er1 >conftest.err
18620   rm -f conftest.er1
18621   cat conftest.err >&5
18622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18623   (exit $ac_status); } &&
18624          { ac_try='test -z "$ac_c_werror_flag"
18625                          || test ! -s conftest.err'
18626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18627   (eval $ac_try) 2>&5
18628   ac_status=$?
18629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18630   (exit $ac_status); }; } &&
18631          { ac_try='test -s conftest.$ac_objext'
18632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18633   (eval $ac_try) 2>&5
18634   ac_status=$?
18635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18636   (exit $ac_status); }; }; then
18637   ac_lo=$ac_mid; break
18638 else
18639   echo "$as_me: failed program was:" >&5
18640 sed 's/^/| /' conftest.$ac_ext >&5
18641
18642 ac_hi=`expr '(' $ac_mid ')' - 1`
18643                        if test $ac_mid -le $ac_hi; then
18644                          ac_lo= ac_hi=
18645                          break
18646                        fi
18647                        ac_mid=`expr 2 '*' $ac_mid`
18648 fi
18649 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18650   done
18651 else
18652   echo "$as_me: failed program was:" >&5
18653 sed 's/^/| /' conftest.$ac_ext >&5
18654
18655 ac_lo= ac_hi=
18656 fi
18657 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18658 fi
18659 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18660 # Binary search between lo and hi bounds.
18661 while test "x$ac_lo" != "x$ac_hi"; do
18662   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18663   cat >conftest.$ac_ext <<_ACEOF
18664 /* confdefs.h.  */
18665 _ACEOF
18666 cat confdefs.h >>conftest.$ac_ext
18667 cat >>conftest.$ac_ext <<_ACEOF
18668 /* end confdefs.h.  */
18669 $ac_includes_default
18670 int
18671 main ()
18672 {
18673 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18674 test_array [0] = 0
18675
18676   ;
18677   return 0;
18678 }
18679 _ACEOF
18680 rm -f conftest.$ac_objext
18681 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18682   (eval $ac_compile) 2>conftest.er1
18683   ac_status=$?
18684   grep -v '^ *+' conftest.er1 >conftest.err
18685   rm -f conftest.er1
18686   cat conftest.err >&5
18687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18688   (exit $ac_status); } &&
18689          { ac_try='test -z "$ac_c_werror_flag"
18690                          || test ! -s conftest.err'
18691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18692   (eval $ac_try) 2>&5
18693   ac_status=$?
18694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18695   (exit $ac_status); }; } &&
18696          { ac_try='test -s conftest.$ac_objext'
18697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18698   (eval $ac_try) 2>&5
18699   ac_status=$?
18700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18701   (exit $ac_status); }; }; then
18702   ac_hi=$ac_mid
18703 else
18704   echo "$as_me: failed program was:" >&5
18705 sed 's/^/| /' conftest.$ac_ext >&5
18706
18707 ac_lo=`expr '(' $ac_mid ')' + 1`
18708 fi
18709 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18710 done
18711 case $ac_lo in
18712 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18713 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18714 See \`config.log' for more details." >&5
18715 echo "$as_me: error: cannot compute sizeof (size_t), 77
18716 See \`config.log' for more details." >&2;}
18717    { (exit 1); exit 1; }; } ;;
18718 esac
18719 else
18720   if test "$cross_compiling" = yes; then
18721   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18722 See \`config.log' for more details." >&5
18723 echo "$as_me: error: cannot run test program while cross compiling
18724 See \`config.log' for more details." >&2;}
18725    { (exit 1); exit 1; }; }
18726 else
18727   cat >conftest.$ac_ext <<_ACEOF
18728 /* confdefs.h.  */
18729 _ACEOF
18730 cat confdefs.h >>conftest.$ac_ext
18731 cat >>conftest.$ac_ext <<_ACEOF
18732 /* end confdefs.h.  */
18733 $ac_includes_default
18734 long longval () { return (long) (sizeof (size_t)); }
18735 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18736 #include <stdio.h>
18737 #include <stdlib.h>
18738 int
18739 main ()
18740 {
18741
18742   FILE *f = fopen ("conftest.val", "w");
18743   if (! f)
18744     exit (1);
18745   if (((long) (sizeof (size_t))) < 0)
18746     {
18747       long i = longval ();
18748       if (i != ((long) (sizeof (size_t))))
18749         exit (1);
18750       fprintf (f, "%ld\n", i);
18751     }
18752   else
18753     {
18754       unsigned long i = ulongval ();
18755       if (i != ((long) (sizeof (size_t))))
18756         exit (1);
18757       fprintf (f, "%lu\n", i);
18758     }
18759   exit (ferror (f) || fclose (f) != 0);
18760
18761   ;
18762   return 0;
18763 }
18764 _ACEOF
18765 rm -f conftest$ac_exeext
18766 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18767   (eval $ac_link) 2>&5
18768   ac_status=$?
18769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18770   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18772   (eval $ac_try) 2>&5
18773   ac_status=$?
18774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18775   (exit $ac_status); }; }; then
18776   ac_cv_sizeof_size_t=`cat conftest.val`
18777 else
18778   echo "$as_me: program exited with status $ac_status" >&5
18779 echo "$as_me: failed program was:" >&5
18780 sed 's/^/| /' conftest.$ac_ext >&5
18781
18782 ( exit $ac_status )
18783 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18784 See \`config.log' for more details." >&5
18785 echo "$as_me: error: cannot compute sizeof (size_t), 77
18786 See \`config.log' for more details." >&2;}
18787    { (exit 1); exit 1; }; }
18788 fi
18789 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18790 fi
18791 fi
18792 rm -f conftest.val
18793 else
18794   ac_cv_sizeof_size_t=0
18795 fi
18796 fi
18797 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18798 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18799 cat >>confdefs.h <<_ACEOF
18800 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18801 _ACEOF
18802
18803
18804
18805 # Determine memory alignment requirements for the basic C data types.
18806
18807 echo "$as_me:$LINENO: checking for short" >&5
18808 echo $ECHO_N "checking for short... $ECHO_C" >&6
18809 if test "${ac_cv_type_short+set}" = set; then
18810   echo $ECHO_N "(cached) $ECHO_C" >&6
18811 else
18812   cat >conftest.$ac_ext <<_ACEOF
18813 /* confdefs.h.  */
18814 _ACEOF
18815 cat confdefs.h >>conftest.$ac_ext
18816 cat >>conftest.$ac_ext <<_ACEOF
18817 /* end confdefs.h.  */
18818 $ac_includes_default
18819 int
18820 main ()
18821 {
18822 if ((short *) 0)
18823   return 0;
18824 if (sizeof (short))
18825   return 0;
18826   ;
18827   return 0;
18828 }
18829 _ACEOF
18830 rm -f conftest.$ac_objext
18831 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18832   (eval $ac_compile) 2>conftest.er1
18833   ac_status=$?
18834   grep -v '^ *+' conftest.er1 >conftest.err
18835   rm -f conftest.er1
18836   cat conftest.err >&5
18837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18838   (exit $ac_status); } &&
18839          { ac_try='test -z "$ac_c_werror_flag"
18840                          || test ! -s conftest.err'
18841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18842   (eval $ac_try) 2>&5
18843   ac_status=$?
18844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18845   (exit $ac_status); }; } &&
18846          { ac_try='test -s conftest.$ac_objext'
18847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18848   (eval $ac_try) 2>&5
18849   ac_status=$?
18850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18851   (exit $ac_status); }; }; then
18852   ac_cv_type_short=yes
18853 else
18854   echo "$as_me: failed program was:" >&5
18855 sed 's/^/| /' conftest.$ac_ext >&5
18856
18857 ac_cv_type_short=no
18858 fi
18859 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18860 fi
18861 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18862 echo "${ECHO_T}$ac_cv_type_short" >&6
18863
18864 echo "$as_me:$LINENO: checking alignment of short" >&5
18865 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18866 if test "${pgac_cv_alignof_short+set}" = set; then
18867   echo $ECHO_N "(cached) $ECHO_C" >&6
18868 else
18869   if test "$ac_cv_type_short" = yes; then
18870   if test "$cross_compiling" = yes; then
18871   # Depending upon the size, compute the lo and hi bounds.
18872 cat >conftest.$ac_ext <<_ACEOF
18873 /* confdefs.h.  */
18874 _ACEOF
18875 cat confdefs.h >>conftest.$ac_ext
18876 cat >>conftest.$ac_ext <<_ACEOF
18877 /* end confdefs.h.  */
18878 $ac_includes_default
18879 struct { char filler; short field; } pgac_struct;
18880 int
18881 main ()
18882 {
18883 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18884 test_array [0] = 0
18885
18886   ;
18887   return 0;
18888 }
18889 _ACEOF
18890 rm -f conftest.$ac_objext
18891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18892   (eval $ac_compile) 2>conftest.er1
18893   ac_status=$?
18894   grep -v '^ *+' conftest.er1 >conftest.err
18895   rm -f conftest.er1
18896   cat conftest.err >&5
18897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18898   (exit $ac_status); } &&
18899          { ac_try='test -z "$ac_c_werror_flag"
18900                          || test ! -s conftest.err'
18901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18902   (eval $ac_try) 2>&5
18903   ac_status=$?
18904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18905   (exit $ac_status); }; } &&
18906          { ac_try='test -s conftest.$ac_objext'
18907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18908   (eval $ac_try) 2>&5
18909   ac_status=$?
18910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18911   (exit $ac_status); }; }; then
18912   ac_lo=0 ac_mid=0
18913   while :; do
18914     cat >conftest.$ac_ext <<_ACEOF
18915 /* confdefs.h.  */
18916 _ACEOF
18917 cat confdefs.h >>conftest.$ac_ext
18918 cat >>conftest.$ac_ext <<_ACEOF
18919 /* end confdefs.h.  */
18920 $ac_includes_default
18921 struct { char filler; short field; } pgac_struct;
18922 int
18923 main ()
18924 {
18925 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18926 test_array [0] = 0
18927
18928   ;
18929   return 0;
18930 }
18931 _ACEOF
18932 rm -f conftest.$ac_objext
18933 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18934   (eval $ac_compile) 2>conftest.er1
18935   ac_status=$?
18936   grep -v '^ *+' conftest.er1 >conftest.err
18937   rm -f conftest.er1
18938   cat conftest.err >&5
18939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18940   (exit $ac_status); } &&
18941          { ac_try='test -z "$ac_c_werror_flag"
18942                          || test ! -s conftest.err'
18943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18944   (eval $ac_try) 2>&5
18945   ac_status=$?
18946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18947   (exit $ac_status); }; } &&
18948          { ac_try='test -s conftest.$ac_objext'
18949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18950   (eval $ac_try) 2>&5
18951   ac_status=$?
18952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18953   (exit $ac_status); }; }; then
18954   ac_hi=$ac_mid; break
18955 else
18956   echo "$as_me: failed program was:" >&5
18957 sed 's/^/| /' conftest.$ac_ext >&5
18958
18959 ac_lo=`expr $ac_mid + 1`
18960                     if test $ac_lo -le $ac_mid; then
18961                       ac_lo= ac_hi=
18962                       break
18963                     fi
18964                     ac_mid=`expr 2 '*' $ac_mid + 1`
18965 fi
18966 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18967   done
18968 else
18969   echo "$as_me: failed program was:" >&5
18970 sed 's/^/| /' conftest.$ac_ext >&5
18971
18972 cat >conftest.$ac_ext <<_ACEOF
18973 /* confdefs.h.  */
18974 _ACEOF
18975 cat confdefs.h >>conftest.$ac_ext
18976 cat >>conftest.$ac_ext <<_ACEOF
18977 /* end confdefs.h.  */
18978 $ac_includes_default
18979 struct { char filler; short field; } pgac_struct;
18980 int
18981 main ()
18982 {
18983 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18984 test_array [0] = 0
18985
18986   ;
18987   return 0;
18988 }
18989 _ACEOF
18990 rm -f conftest.$ac_objext
18991 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18992   (eval $ac_compile) 2>conftest.er1
18993   ac_status=$?
18994   grep -v '^ *+' conftest.er1 >conftest.err
18995   rm -f conftest.er1
18996   cat conftest.err >&5
18997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18998   (exit $ac_status); } &&
18999          { ac_try='test -z "$ac_c_werror_flag"
19000                          || test ! -s conftest.err'
19001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19002   (eval $ac_try) 2>&5
19003   ac_status=$?
19004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19005   (exit $ac_status); }; } &&
19006          { ac_try='test -s conftest.$ac_objext'
19007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19008   (eval $ac_try) 2>&5
19009   ac_status=$?
19010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19011   (exit $ac_status); }; }; then
19012   ac_hi=-1 ac_mid=-1
19013   while :; do
19014     cat >conftest.$ac_ext <<_ACEOF
19015 /* confdefs.h.  */
19016 _ACEOF
19017 cat confdefs.h >>conftest.$ac_ext
19018 cat >>conftest.$ac_ext <<_ACEOF
19019 /* end confdefs.h.  */
19020 $ac_includes_default
19021 struct { char filler; short field; } pgac_struct;
19022 int
19023 main ()
19024 {
19025 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19026 test_array [0] = 0
19027
19028   ;
19029   return 0;
19030 }
19031 _ACEOF
19032 rm -f conftest.$ac_objext
19033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19034   (eval $ac_compile) 2>conftest.er1
19035   ac_status=$?
19036   grep -v '^ *+' conftest.er1 >conftest.err
19037   rm -f conftest.er1
19038   cat conftest.err >&5
19039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19040   (exit $ac_status); } &&
19041          { ac_try='test -z "$ac_c_werror_flag"
19042                          || test ! -s conftest.err'
19043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19044   (eval $ac_try) 2>&5
19045   ac_status=$?
19046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19047   (exit $ac_status); }; } &&
19048          { ac_try='test -s conftest.$ac_objext'
19049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19050   (eval $ac_try) 2>&5
19051   ac_status=$?
19052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19053   (exit $ac_status); }; }; then
19054   ac_lo=$ac_mid; break
19055 else
19056   echo "$as_me: failed program was:" >&5
19057 sed 's/^/| /' conftest.$ac_ext >&5
19058
19059 ac_hi=`expr '(' $ac_mid ')' - 1`
19060                        if test $ac_mid -le $ac_hi; then
19061                          ac_lo= ac_hi=
19062                          break
19063                        fi
19064                        ac_mid=`expr 2 '*' $ac_mid`
19065 fi
19066 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19067   done
19068 else
19069   echo "$as_me: failed program was:" >&5
19070 sed 's/^/| /' conftest.$ac_ext >&5
19071
19072 ac_lo= ac_hi=
19073 fi
19074 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19075 fi
19076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19077 # Binary search between lo and hi bounds.
19078 while test "x$ac_lo" != "x$ac_hi"; do
19079   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19080   cat >conftest.$ac_ext <<_ACEOF
19081 /* confdefs.h.  */
19082 _ACEOF
19083 cat confdefs.h >>conftest.$ac_ext
19084 cat >>conftest.$ac_ext <<_ACEOF
19085 /* end confdefs.h.  */
19086 $ac_includes_default
19087 struct { char filler; short field; } pgac_struct;
19088 int
19089 main ()
19090 {
19091 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19092 test_array [0] = 0
19093
19094   ;
19095   return 0;
19096 }
19097 _ACEOF
19098 rm -f conftest.$ac_objext
19099 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19100   (eval $ac_compile) 2>conftest.er1
19101   ac_status=$?
19102   grep -v '^ *+' conftest.er1 >conftest.err
19103   rm -f conftest.er1
19104   cat conftest.err >&5
19105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19106   (exit $ac_status); } &&
19107          { ac_try='test -z "$ac_c_werror_flag"
19108                          || test ! -s conftest.err'
19109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19110   (eval $ac_try) 2>&5
19111   ac_status=$?
19112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19113   (exit $ac_status); }; } &&
19114          { ac_try='test -s conftest.$ac_objext'
19115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19116   (eval $ac_try) 2>&5
19117   ac_status=$?
19118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19119   (exit $ac_status); }; }; then
19120   ac_hi=$ac_mid
19121 else
19122   echo "$as_me: failed program was:" >&5
19123 sed 's/^/| /' conftest.$ac_ext >&5
19124
19125 ac_lo=`expr '(' $ac_mid ')' + 1`
19126 fi
19127 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19128 done
19129 case $ac_lo in
19130 ?*) pgac_cv_alignof_short=$ac_lo;;
19131 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19132 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19133    { (exit 1); exit 1; }; } ;;
19134 esac
19135 else
19136   if test "$cross_compiling" = yes; then
19137   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19138 See \`config.log' for more details." >&5
19139 echo "$as_me: error: cannot run test program while cross compiling
19140 See \`config.log' for more details." >&2;}
19141    { (exit 1); exit 1; }; }
19142 else
19143   cat >conftest.$ac_ext <<_ACEOF
19144 /* confdefs.h.  */
19145 _ACEOF
19146 cat confdefs.h >>conftest.$ac_ext
19147 cat >>conftest.$ac_ext <<_ACEOF
19148 /* end confdefs.h.  */
19149 $ac_includes_default
19150 struct { char filler; short field; } pgac_struct;
19151 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19152 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19153 #include <stdio.h>
19154 #include <stdlib.h>
19155 int
19156 main ()
19157 {
19158
19159   FILE *f = fopen ("conftest.val", "w");
19160   if (! f)
19161     exit (1);
19162   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19163     {
19164       long i = longval ();
19165       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19166         exit (1);
19167       fprintf (f, "%ld\n", i);
19168     }
19169   else
19170     {
19171       unsigned long i = ulongval ();
19172       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19173         exit (1);
19174       fprintf (f, "%lu\n", i);
19175     }
19176   exit (ferror (f) || fclose (f) != 0);
19177
19178   ;
19179   return 0;
19180 }
19181 _ACEOF
19182 rm -f conftest$ac_exeext
19183 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19184   (eval $ac_link) 2>&5
19185   ac_status=$?
19186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19187   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19189   (eval $ac_try) 2>&5
19190   ac_status=$?
19191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19192   (exit $ac_status); }; }; then
19193   pgac_cv_alignof_short=`cat conftest.val`
19194 else
19195   echo "$as_me: program exited with status $ac_status" >&5
19196 echo "$as_me: failed program was:" >&5
19197 sed 's/^/| /' conftest.$ac_ext >&5
19198
19199 ( exit $ac_status )
19200 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19201 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19202    { (exit 1); exit 1; }; }
19203 fi
19204 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19205 fi
19206 fi
19207 rm -f conftest.val
19208 else
19209   pgac_cv_alignof_short=0
19210 fi
19211 fi
19212 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19213 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19214 cat >>confdefs.h <<_ACEOF
19215 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19216 _ACEOF
19217
19218
19219 echo "$as_me:$LINENO: checking for int" >&5
19220 echo $ECHO_N "checking for int... $ECHO_C" >&6
19221 if test "${ac_cv_type_int+set}" = set; then
19222   echo $ECHO_N "(cached) $ECHO_C" >&6
19223 else
19224   cat >conftest.$ac_ext <<_ACEOF
19225 /* confdefs.h.  */
19226 _ACEOF
19227 cat confdefs.h >>conftest.$ac_ext
19228 cat >>conftest.$ac_ext <<_ACEOF
19229 /* end confdefs.h.  */
19230 $ac_includes_default
19231 int
19232 main ()
19233 {
19234 if ((int *) 0)
19235   return 0;
19236 if (sizeof (int))
19237   return 0;
19238   ;
19239   return 0;
19240 }
19241 _ACEOF
19242 rm -f conftest.$ac_objext
19243 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19244   (eval $ac_compile) 2>conftest.er1
19245   ac_status=$?
19246   grep -v '^ *+' conftest.er1 >conftest.err
19247   rm -f conftest.er1
19248   cat conftest.err >&5
19249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19250   (exit $ac_status); } &&
19251          { ac_try='test -z "$ac_c_werror_flag"
19252                          || test ! -s conftest.err'
19253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19254   (eval $ac_try) 2>&5
19255   ac_status=$?
19256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19257   (exit $ac_status); }; } &&
19258          { ac_try='test -s conftest.$ac_objext'
19259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19260   (eval $ac_try) 2>&5
19261   ac_status=$?
19262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19263   (exit $ac_status); }; }; then
19264   ac_cv_type_int=yes
19265 else
19266   echo "$as_me: failed program was:" >&5
19267 sed 's/^/| /' conftest.$ac_ext >&5
19268
19269 ac_cv_type_int=no
19270 fi
19271 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19272 fi
19273 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19274 echo "${ECHO_T}$ac_cv_type_int" >&6
19275
19276 echo "$as_me:$LINENO: checking alignment of int" >&5
19277 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19278 if test "${pgac_cv_alignof_int+set}" = set; then
19279   echo $ECHO_N "(cached) $ECHO_C" >&6
19280 else
19281   if test "$ac_cv_type_int" = yes; then
19282   if test "$cross_compiling" = yes; then
19283   # Depending upon the size, compute the lo and hi bounds.
19284 cat >conftest.$ac_ext <<_ACEOF
19285 /* confdefs.h.  */
19286 _ACEOF
19287 cat confdefs.h >>conftest.$ac_ext
19288 cat >>conftest.$ac_ext <<_ACEOF
19289 /* end confdefs.h.  */
19290 $ac_includes_default
19291 struct { char filler; int field; } pgac_struct;
19292 int
19293 main ()
19294 {
19295 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19296 test_array [0] = 0
19297
19298   ;
19299   return 0;
19300 }
19301 _ACEOF
19302 rm -f conftest.$ac_objext
19303 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19304   (eval $ac_compile) 2>conftest.er1
19305   ac_status=$?
19306   grep -v '^ *+' conftest.er1 >conftest.err
19307   rm -f conftest.er1
19308   cat conftest.err >&5
19309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19310   (exit $ac_status); } &&
19311          { ac_try='test -z "$ac_c_werror_flag"
19312                          || test ! -s conftest.err'
19313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19314   (eval $ac_try) 2>&5
19315   ac_status=$?
19316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19317   (exit $ac_status); }; } &&
19318          { ac_try='test -s conftest.$ac_objext'
19319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19320   (eval $ac_try) 2>&5
19321   ac_status=$?
19322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19323   (exit $ac_status); }; }; then
19324   ac_lo=0 ac_mid=0
19325   while :; do
19326     cat >conftest.$ac_ext <<_ACEOF
19327 /* confdefs.h.  */
19328 _ACEOF
19329 cat confdefs.h >>conftest.$ac_ext
19330 cat >>conftest.$ac_ext <<_ACEOF
19331 /* end confdefs.h.  */
19332 $ac_includes_default
19333 struct { char filler; int field; } pgac_struct;
19334 int
19335 main ()
19336 {
19337 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19338 test_array [0] = 0
19339
19340   ;
19341   return 0;
19342 }
19343 _ACEOF
19344 rm -f conftest.$ac_objext
19345 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19346   (eval $ac_compile) 2>conftest.er1
19347   ac_status=$?
19348   grep -v '^ *+' conftest.er1 >conftest.err
19349   rm -f conftest.er1
19350   cat conftest.err >&5
19351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19352   (exit $ac_status); } &&
19353          { ac_try='test -z "$ac_c_werror_flag"
19354                          || test ! -s conftest.err'
19355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19356   (eval $ac_try) 2>&5
19357   ac_status=$?
19358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19359   (exit $ac_status); }; } &&
19360          { ac_try='test -s conftest.$ac_objext'
19361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19362   (eval $ac_try) 2>&5
19363   ac_status=$?
19364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19365   (exit $ac_status); }; }; then
19366   ac_hi=$ac_mid; break
19367 else
19368   echo "$as_me: failed program was:" >&5
19369 sed 's/^/| /' conftest.$ac_ext >&5
19370
19371 ac_lo=`expr $ac_mid + 1`
19372                     if test $ac_lo -le $ac_mid; then
19373                       ac_lo= ac_hi=
19374                       break
19375                     fi
19376                     ac_mid=`expr 2 '*' $ac_mid + 1`
19377 fi
19378 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19379   done
19380 else
19381   echo "$as_me: failed program was:" >&5
19382 sed 's/^/| /' conftest.$ac_ext >&5
19383
19384 cat >conftest.$ac_ext <<_ACEOF
19385 /* confdefs.h.  */
19386 _ACEOF
19387 cat confdefs.h >>conftest.$ac_ext
19388 cat >>conftest.$ac_ext <<_ACEOF
19389 /* end confdefs.h.  */
19390 $ac_includes_default
19391 struct { char filler; int field; } pgac_struct;
19392 int
19393 main ()
19394 {
19395 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19396 test_array [0] = 0
19397
19398   ;
19399   return 0;
19400 }
19401 _ACEOF
19402 rm -f conftest.$ac_objext
19403 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19404   (eval $ac_compile) 2>conftest.er1
19405   ac_status=$?
19406   grep -v '^ *+' conftest.er1 >conftest.err
19407   rm -f conftest.er1
19408   cat conftest.err >&5
19409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19410   (exit $ac_status); } &&
19411          { ac_try='test -z "$ac_c_werror_flag"
19412                          || test ! -s conftest.err'
19413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19414   (eval $ac_try) 2>&5
19415   ac_status=$?
19416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19417   (exit $ac_status); }; } &&
19418          { ac_try='test -s conftest.$ac_objext'
19419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19420   (eval $ac_try) 2>&5
19421   ac_status=$?
19422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19423   (exit $ac_status); }; }; then
19424   ac_hi=-1 ac_mid=-1
19425   while :; do
19426     cat >conftest.$ac_ext <<_ACEOF
19427 /* confdefs.h.  */
19428 _ACEOF
19429 cat confdefs.h >>conftest.$ac_ext
19430 cat >>conftest.$ac_ext <<_ACEOF
19431 /* end confdefs.h.  */
19432 $ac_includes_default
19433 struct { char filler; int field; } pgac_struct;
19434 int
19435 main ()
19436 {
19437 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19438 test_array [0] = 0
19439
19440   ;
19441   return 0;
19442 }
19443 _ACEOF
19444 rm -f conftest.$ac_objext
19445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19446   (eval $ac_compile) 2>conftest.er1
19447   ac_status=$?
19448   grep -v '^ *+' conftest.er1 >conftest.err
19449   rm -f conftest.er1
19450   cat conftest.err >&5
19451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19452   (exit $ac_status); } &&
19453          { ac_try='test -z "$ac_c_werror_flag"
19454                          || test ! -s conftest.err'
19455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19456   (eval $ac_try) 2>&5
19457   ac_status=$?
19458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19459   (exit $ac_status); }; } &&
19460          { ac_try='test -s conftest.$ac_objext'
19461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19462   (eval $ac_try) 2>&5
19463   ac_status=$?
19464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19465   (exit $ac_status); }; }; then
19466   ac_lo=$ac_mid; break
19467 else
19468   echo "$as_me: failed program was:" >&5
19469 sed 's/^/| /' conftest.$ac_ext >&5
19470
19471 ac_hi=`expr '(' $ac_mid ')' - 1`
19472                        if test $ac_mid -le $ac_hi; then
19473                          ac_lo= ac_hi=
19474                          break
19475                        fi
19476                        ac_mid=`expr 2 '*' $ac_mid`
19477 fi
19478 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19479   done
19480 else
19481   echo "$as_me: failed program was:" >&5
19482 sed 's/^/| /' conftest.$ac_ext >&5
19483
19484 ac_lo= ac_hi=
19485 fi
19486 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19487 fi
19488 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19489 # Binary search between lo and hi bounds.
19490 while test "x$ac_lo" != "x$ac_hi"; do
19491   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19492   cat >conftest.$ac_ext <<_ACEOF
19493 /* confdefs.h.  */
19494 _ACEOF
19495 cat confdefs.h >>conftest.$ac_ext
19496 cat >>conftest.$ac_ext <<_ACEOF
19497 /* end confdefs.h.  */
19498 $ac_includes_default
19499 struct { char filler; int field; } pgac_struct;
19500 int
19501 main ()
19502 {
19503 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19504 test_array [0] = 0
19505
19506   ;
19507   return 0;
19508 }
19509 _ACEOF
19510 rm -f conftest.$ac_objext
19511 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19512   (eval $ac_compile) 2>conftest.er1
19513   ac_status=$?
19514   grep -v '^ *+' conftest.er1 >conftest.err
19515   rm -f conftest.er1
19516   cat conftest.err >&5
19517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19518   (exit $ac_status); } &&
19519          { ac_try='test -z "$ac_c_werror_flag"
19520                          || test ! -s conftest.err'
19521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19522   (eval $ac_try) 2>&5
19523   ac_status=$?
19524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19525   (exit $ac_status); }; } &&
19526          { ac_try='test -s conftest.$ac_objext'
19527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19528   (eval $ac_try) 2>&5
19529   ac_status=$?
19530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19531   (exit $ac_status); }; }; then
19532   ac_hi=$ac_mid
19533 else
19534   echo "$as_me: failed program was:" >&5
19535 sed 's/^/| /' conftest.$ac_ext >&5
19536
19537 ac_lo=`expr '(' $ac_mid ')' + 1`
19538 fi
19539 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19540 done
19541 case $ac_lo in
19542 ?*) pgac_cv_alignof_int=$ac_lo;;
19543 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19544 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19545    { (exit 1); exit 1; }; } ;;
19546 esac
19547 else
19548   if test "$cross_compiling" = yes; then
19549   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19550 See \`config.log' for more details." >&5
19551 echo "$as_me: error: cannot run test program while cross compiling
19552 See \`config.log' for more details." >&2;}
19553    { (exit 1); exit 1; }; }
19554 else
19555   cat >conftest.$ac_ext <<_ACEOF
19556 /* confdefs.h.  */
19557 _ACEOF
19558 cat confdefs.h >>conftest.$ac_ext
19559 cat >>conftest.$ac_ext <<_ACEOF
19560 /* end confdefs.h.  */
19561 $ac_includes_default
19562 struct { char filler; int field; } pgac_struct;
19563 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19564 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19565 #include <stdio.h>
19566 #include <stdlib.h>
19567 int
19568 main ()
19569 {
19570
19571   FILE *f = fopen ("conftest.val", "w");
19572   if (! f)
19573     exit (1);
19574   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19575     {
19576       long i = longval ();
19577       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19578         exit (1);
19579       fprintf (f, "%ld\n", i);
19580     }
19581   else
19582     {
19583       unsigned long i = ulongval ();
19584       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19585         exit (1);
19586       fprintf (f, "%lu\n", i);
19587     }
19588   exit (ferror (f) || fclose (f) != 0);
19589
19590   ;
19591   return 0;
19592 }
19593 _ACEOF
19594 rm -f conftest$ac_exeext
19595 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19596   (eval $ac_link) 2>&5
19597   ac_status=$?
19598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19599   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19601   (eval $ac_try) 2>&5
19602   ac_status=$?
19603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19604   (exit $ac_status); }; }; then
19605   pgac_cv_alignof_int=`cat conftest.val`
19606 else
19607   echo "$as_me: program exited with status $ac_status" >&5
19608 echo "$as_me: failed program was:" >&5
19609 sed 's/^/| /' conftest.$ac_ext >&5
19610
19611 ( exit $ac_status )
19612 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19613 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19614    { (exit 1); exit 1; }; }
19615 fi
19616 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19617 fi
19618 fi
19619 rm -f conftest.val
19620 else
19621   pgac_cv_alignof_int=0
19622 fi
19623 fi
19624 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19625 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19626 cat >>confdefs.h <<_ACEOF
19627 #define ALIGNOF_INT $pgac_cv_alignof_int
19628 _ACEOF
19629
19630
19631 echo "$as_me:$LINENO: checking for long" >&5
19632 echo $ECHO_N "checking for long... $ECHO_C" >&6
19633 if test "${ac_cv_type_long+set}" = set; then
19634   echo $ECHO_N "(cached) $ECHO_C" >&6
19635 else
19636   cat >conftest.$ac_ext <<_ACEOF
19637 /* confdefs.h.  */
19638 _ACEOF
19639 cat confdefs.h >>conftest.$ac_ext
19640 cat >>conftest.$ac_ext <<_ACEOF
19641 /* end confdefs.h.  */
19642 $ac_includes_default
19643 int
19644 main ()
19645 {
19646 if ((long *) 0)
19647   return 0;
19648 if (sizeof (long))
19649   return 0;
19650   ;
19651   return 0;
19652 }
19653 _ACEOF
19654 rm -f conftest.$ac_objext
19655 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19656   (eval $ac_compile) 2>conftest.er1
19657   ac_status=$?
19658   grep -v '^ *+' conftest.er1 >conftest.err
19659   rm -f conftest.er1
19660   cat conftest.err >&5
19661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19662   (exit $ac_status); } &&
19663          { ac_try='test -z "$ac_c_werror_flag"
19664                          || test ! -s conftest.err'
19665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19666   (eval $ac_try) 2>&5
19667   ac_status=$?
19668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19669   (exit $ac_status); }; } &&
19670          { ac_try='test -s conftest.$ac_objext'
19671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19672   (eval $ac_try) 2>&5
19673   ac_status=$?
19674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19675   (exit $ac_status); }; }; then
19676   ac_cv_type_long=yes
19677 else
19678   echo "$as_me: failed program was:" >&5
19679 sed 's/^/| /' conftest.$ac_ext >&5
19680
19681 ac_cv_type_long=no
19682 fi
19683 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19684 fi
19685 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19686 echo "${ECHO_T}$ac_cv_type_long" >&6
19687
19688 echo "$as_me:$LINENO: checking alignment of long" >&5
19689 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19690 if test "${pgac_cv_alignof_long+set}" = set; then
19691   echo $ECHO_N "(cached) $ECHO_C" >&6
19692 else
19693   if test "$ac_cv_type_long" = yes; then
19694   if test "$cross_compiling" = yes; then
19695   # Depending upon the size, compute the lo and hi bounds.
19696 cat >conftest.$ac_ext <<_ACEOF
19697 /* confdefs.h.  */
19698 _ACEOF
19699 cat confdefs.h >>conftest.$ac_ext
19700 cat >>conftest.$ac_ext <<_ACEOF
19701 /* end confdefs.h.  */
19702 $ac_includes_default
19703 struct { char filler; long field; } pgac_struct;
19704 int
19705 main ()
19706 {
19707 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19708 test_array [0] = 0
19709
19710   ;
19711   return 0;
19712 }
19713 _ACEOF
19714 rm -f conftest.$ac_objext
19715 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19716   (eval $ac_compile) 2>conftest.er1
19717   ac_status=$?
19718   grep -v '^ *+' conftest.er1 >conftest.err
19719   rm -f conftest.er1
19720   cat conftest.err >&5
19721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19722   (exit $ac_status); } &&
19723          { ac_try='test -z "$ac_c_werror_flag"
19724                          || test ! -s conftest.err'
19725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19726   (eval $ac_try) 2>&5
19727   ac_status=$?
19728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19729   (exit $ac_status); }; } &&
19730          { ac_try='test -s conftest.$ac_objext'
19731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19732   (eval $ac_try) 2>&5
19733   ac_status=$?
19734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19735   (exit $ac_status); }; }; then
19736   ac_lo=0 ac_mid=0
19737   while :; do
19738     cat >conftest.$ac_ext <<_ACEOF
19739 /* confdefs.h.  */
19740 _ACEOF
19741 cat confdefs.h >>conftest.$ac_ext
19742 cat >>conftest.$ac_ext <<_ACEOF
19743 /* end confdefs.h.  */
19744 $ac_includes_default
19745 struct { char filler; long field; } pgac_struct;
19746 int
19747 main ()
19748 {
19749 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19750 test_array [0] = 0
19751
19752   ;
19753   return 0;
19754 }
19755 _ACEOF
19756 rm -f conftest.$ac_objext
19757 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19758   (eval $ac_compile) 2>conftest.er1
19759   ac_status=$?
19760   grep -v '^ *+' conftest.er1 >conftest.err
19761   rm -f conftest.er1
19762   cat conftest.err >&5
19763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19764   (exit $ac_status); } &&
19765          { ac_try='test -z "$ac_c_werror_flag"
19766                          || test ! -s conftest.err'
19767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19768   (eval $ac_try) 2>&5
19769   ac_status=$?
19770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19771   (exit $ac_status); }; } &&
19772          { ac_try='test -s conftest.$ac_objext'
19773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19774   (eval $ac_try) 2>&5
19775   ac_status=$?
19776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19777   (exit $ac_status); }; }; then
19778   ac_hi=$ac_mid; break
19779 else
19780   echo "$as_me: failed program was:" >&5
19781 sed 's/^/| /' conftest.$ac_ext >&5
19782
19783 ac_lo=`expr $ac_mid + 1`
19784                     if test $ac_lo -le $ac_mid; then
19785                       ac_lo= ac_hi=
19786                       break
19787                     fi
19788                     ac_mid=`expr 2 '*' $ac_mid + 1`
19789 fi
19790 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19791   done
19792 else
19793   echo "$as_me: failed program was:" >&5
19794 sed 's/^/| /' conftest.$ac_ext >&5
19795
19796 cat >conftest.$ac_ext <<_ACEOF
19797 /* confdefs.h.  */
19798 _ACEOF
19799 cat confdefs.h >>conftest.$ac_ext
19800 cat >>conftest.$ac_ext <<_ACEOF
19801 /* end confdefs.h.  */
19802 $ac_includes_default
19803 struct { char filler; long field; } pgac_struct;
19804 int
19805 main ()
19806 {
19807 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19808 test_array [0] = 0
19809
19810   ;
19811   return 0;
19812 }
19813 _ACEOF
19814 rm -f conftest.$ac_objext
19815 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19816   (eval $ac_compile) 2>conftest.er1
19817   ac_status=$?
19818   grep -v '^ *+' conftest.er1 >conftest.err
19819   rm -f conftest.er1
19820   cat conftest.err >&5
19821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19822   (exit $ac_status); } &&
19823          { ac_try='test -z "$ac_c_werror_flag"
19824                          || test ! -s conftest.err'
19825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19826   (eval $ac_try) 2>&5
19827   ac_status=$?
19828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19829   (exit $ac_status); }; } &&
19830          { ac_try='test -s conftest.$ac_objext'
19831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19832   (eval $ac_try) 2>&5
19833   ac_status=$?
19834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19835   (exit $ac_status); }; }; then
19836   ac_hi=-1 ac_mid=-1
19837   while :; do
19838     cat >conftest.$ac_ext <<_ACEOF
19839 /* confdefs.h.  */
19840 _ACEOF
19841 cat confdefs.h >>conftest.$ac_ext
19842 cat >>conftest.$ac_ext <<_ACEOF
19843 /* end confdefs.h.  */
19844 $ac_includes_default
19845 struct { char filler; long field; } pgac_struct;
19846 int
19847 main ()
19848 {
19849 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19850 test_array [0] = 0
19851
19852   ;
19853   return 0;
19854 }
19855 _ACEOF
19856 rm -f conftest.$ac_objext
19857 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19858   (eval $ac_compile) 2>conftest.er1
19859   ac_status=$?
19860   grep -v '^ *+' conftest.er1 >conftest.err
19861   rm -f conftest.er1
19862   cat conftest.err >&5
19863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19864   (exit $ac_status); } &&
19865          { ac_try='test -z "$ac_c_werror_flag"
19866                          || test ! -s conftest.err'
19867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19868   (eval $ac_try) 2>&5
19869   ac_status=$?
19870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19871   (exit $ac_status); }; } &&
19872          { ac_try='test -s conftest.$ac_objext'
19873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19874   (eval $ac_try) 2>&5
19875   ac_status=$?
19876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19877   (exit $ac_status); }; }; then
19878   ac_lo=$ac_mid; break
19879 else
19880   echo "$as_me: failed program was:" >&5
19881 sed 's/^/| /' conftest.$ac_ext >&5
19882
19883 ac_hi=`expr '(' $ac_mid ')' - 1`
19884                        if test $ac_mid -le $ac_hi; then
19885                          ac_lo= ac_hi=
19886                          break
19887                        fi
19888                        ac_mid=`expr 2 '*' $ac_mid`
19889 fi
19890 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19891   done
19892 else
19893   echo "$as_me: failed program was:" >&5
19894 sed 's/^/| /' conftest.$ac_ext >&5
19895
19896 ac_lo= ac_hi=
19897 fi
19898 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19899 fi
19900 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19901 # Binary search between lo and hi bounds.
19902 while test "x$ac_lo" != "x$ac_hi"; do
19903   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19904   cat >conftest.$ac_ext <<_ACEOF
19905 /* confdefs.h.  */
19906 _ACEOF
19907 cat confdefs.h >>conftest.$ac_ext
19908 cat >>conftest.$ac_ext <<_ACEOF
19909 /* end confdefs.h.  */
19910 $ac_includes_default
19911 struct { char filler; long field; } pgac_struct;
19912 int
19913 main ()
19914 {
19915 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19916 test_array [0] = 0
19917
19918   ;
19919   return 0;
19920 }
19921 _ACEOF
19922 rm -f conftest.$ac_objext
19923 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19924   (eval $ac_compile) 2>conftest.er1
19925   ac_status=$?
19926   grep -v '^ *+' conftest.er1 >conftest.err
19927   rm -f conftest.er1
19928   cat conftest.err >&5
19929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19930   (exit $ac_status); } &&
19931          { ac_try='test -z "$ac_c_werror_flag"
19932                          || test ! -s conftest.err'
19933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19934   (eval $ac_try) 2>&5
19935   ac_status=$?
19936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19937   (exit $ac_status); }; } &&
19938          { ac_try='test -s conftest.$ac_objext'
19939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19940   (eval $ac_try) 2>&5
19941   ac_status=$?
19942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19943   (exit $ac_status); }; }; then
19944   ac_hi=$ac_mid
19945 else
19946   echo "$as_me: failed program was:" >&5
19947 sed 's/^/| /' conftest.$ac_ext >&5
19948
19949 ac_lo=`expr '(' $ac_mid ')' + 1`
19950 fi
19951 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19952 done
19953 case $ac_lo in
19954 ?*) pgac_cv_alignof_long=$ac_lo;;
19955 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19956 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19957    { (exit 1); exit 1; }; } ;;
19958 esac
19959 else
19960   if test "$cross_compiling" = yes; then
19961   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19962 See \`config.log' for more details." >&5
19963 echo "$as_me: error: cannot run test program while cross compiling
19964 See \`config.log' for more details." >&2;}
19965    { (exit 1); exit 1; }; }
19966 else
19967   cat >conftest.$ac_ext <<_ACEOF
19968 /* confdefs.h.  */
19969 _ACEOF
19970 cat confdefs.h >>conftest.$ac_ext
19971 cat >>conftest.$ac_ext <<_ACEOF
19972 /* end confdefs.h.  */
19973 $ac_includes_default
19974 struct { char filler; long field; } pgac_struct;
19975 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19976 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19977 #include <stdio.h>
19978 #include <stdlib.h>
19979 int
19980 main ()
19981 {
19982
19983   FILE *f = fopen ("conftest.val", "w");
19984   if (! f)
19985     exit (1);
19986   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19987     {
19988       long i = longval ();
19989       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19990         exit (1);
19991       fprintf (f, "%ld\n", i);
19992     }
19993   else
19994     {
19995       unsigned long i = ulongval ();
19996       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19997         exit (1);
19998       fprintf (f, "%lu\n", i);
19999     }
20000   exit (ferror (f) || fclose (f) != 0);
20001
20002   ;
20003   return 0;
20004 }
20005 _ACEOF
20006 rm -f conftest$ac_exeext
20007 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20008   (eval $ac_link) 2>&5
20009   ac_status=$?
20010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20011   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20013   (eval $ac_try) 2>&5
20014   ac_status=$?
20015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20016   (exit $ac_status); }; }; then
20017   pgac_cv_alignof_long=`cat conftest.val`
20018 else
20019   echo "$as_me: program exited with status $ac_status" >&5
20020 echo "$as_me: failed program was:" >&5
20021 sed 's/^/| /' conftest.$ac_ext >&5
20022
20023 ( exit $ac_status )
20024 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20025 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20026    { (exit 1); exit 1; }; }
20027 fi
20028 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20029 fi
20030 fi
20031 rm -f conftest.val
20032 else
20033   pgac_cv_alignof_long=0
20034 fi
20035 fi
20036 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
20037 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
20038 cat >>confdefs.h <<_ACEOF
20039 #define ALIGNOF_LONG $pgac_cv_alignof_long
20040 _ACEOF
20041
20042
20043 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
20044   echo "$as_me:$LINENO: checking for long long int" >&5
20045 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
20046 if test "${ac_cv_type_long_long_int+set}" = set; then
20047   echo $ECHO_N "(cached) $ECHO_C" >&6
20048 else
20049   cat >conftest.$ac_ext <<_ACEOF
20050 /* confdefs.h.  */
20051 _ACEOF
20052 cat confdefs.h >>conftest.$ac_ext
20053 cat >>conftest.$ac_ext <<_ACEOF
20054 /* end confdefs.h.  */
20055 $ac_includes_default
20056 int
20057 main ()
20058 {
20059 if ((long long int *) 0)
20060   return 0;
20061 if (sizeof (long long int))
20062   return 0;
20063   ;
20064   return 0;
20065 }
20066 _ACEOF
20067 rm -f conftest.$ac_objext
20068 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20069   (eval $ac_compile) 2>conftest.er1
20070   ac_status=$?
20071   grep -v '^ *+' conftest.er1 >conftest.err
20072   rm -f conftest.er1
20073   cat conftest.err >&5
20074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20075   (exit $ac_status); } &&
20076          { ac_try='test -z "$ac_c_werror_flag"
20077                          || test ! -s conftest.err'
20078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20079   (eval $ac_try) 2>&5
20080   ac_status=$?
20081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20082   (exit $ac_status); }; } &&
20083          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
20089   ac_cv_type_long_long_int=yes
20090 else
20091   echo "$as_me: failed program was:" >&5
20092 sed 's/^/| /' conftest.$ac_ext >&5
20093
20094 ac_cv_type_long_long_int=no
20095 fi
20096 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20097 fi
20098 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
20099 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
20100
20101 echo "$as_me:$LINENO: checking alignment of long long int" >&5
20102 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
20103 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
20104   echo $ECHO_N "(cached) $ECHO_C" >&6
20105 else
20106   if test "$ac_cv_type_long_long_int" = yes; then
20107   if test "$cross_compiling" = yes; then
20108   # Depending upon the size, compute the lo and hi bounds.
20109 cat >conftest.$ac_ext <<_ACEOF
20110 /* confdefs.h.  */
20111 _ACEOF
20112 cat confdefs.h >>conftest.$ac_ext
20113 cat >>conftest.$ac_ext <<_ACEOF
20114 /* end confdefs.h.  */
20115 $ac_includes_default
20116 struct { char filler; long long int field; } pgac_struct;
20117 int
20118 main ()
20119 {
20120 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20121 test_array [0] = 0
20122
20123   ;
20124   return 0;
20125 }
20126 _ACEOF
20127 rm -f conftest.$ac_objext
20128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20129   (eval $ac_compile) 2>conftest.er1
20130   ac_status=$?
20131   grep -v '^ *+' conftest.er1 >conftest.err
20132   rm -f conftest.er1
20133   cat conftest.err >&5
20134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20135   (exit $ac_status); } &&
20136          { ac_try='test -z "$ac_c_werror_flag"
20137                          || test ! -s conftest.err'
20138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20139   (eval $ac_try) 2>&5
20140   ac_status=$?
20141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20142   (exit $ac_status); }; } &&
20143          { ac_try='test -s conftest.$ac_objext'
20144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20145   (eval $ac_try) 2>&5
20146   ac_status=$?
20147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20148   (exit $ac_status); }; }; then
20149   ac_lo=0 ac_mid=0
20150   while :; do
20151     cat >conftest.$ac_ext <<_ACEOF
20152 /* confdefs.h.  */
20153 _ACEOF
20154 cat confdefs.h >>conftest.$ac_ext
20155 cat >>conftest.$ac_ext <<_ACEOF
20156 /* end confdefs.h.  */
20157 $ac_includes_default
20158 struct { char filler; long long int field; } pgac_struct;
20159 int
20160 main ()
20161 {
20162 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20163 test_array [0] = 0
20164
20165   ;
20166   return 0;
20167 }
20168 _ACEOF
20169 rm -f conftest.$ac_objext
20170 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20171   (eval $ac_compile) 2>conftest.er1
20172   ac_status=$?
20173   grep -v '^ *+' conftest.er1 >conftest.err
20174   rm -f conftest.er1
20175   cat conftest.err >&5
20176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20177   (exit $ac_status); } &&
20178          { ac_try='test -z "$ac_c_werror_flag"
20179                          || test ! -s conftest.err'
20180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20181   (eval $ac_try) 2>&5
20182   ac_status=$?
20183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20184   (exit $ac_status); }; } &&
20185          { ac_try='test -s conftest.$ac_objext'
20186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20187   (eval $ac_try) 2>&5
20188   ac_status=$?
20189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20190   (exit $ac_status); }; }; then
20191   ac_hi=$ac_mid; break
20192 else
20193   echo "$as_me: failed program was:" >&5
20194 sed 's/^/| /' conftest.$ac_ext >&5
20195
20196 ac_lo=`expr $ac_mid + 1`
20197                     if test $ac_lo -le $ac_mid; then
20198                       ac_lo= ac_hi=
20199                       break
20200                     fi
20201                     ac_mid=`expr 2 '*' $ac_mid + 1`
20202 fi
20203 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20204   done
20205 else
20206   echo "$as_me: failed program was:" >&5
20207 sed 's/^/| /' conftest.$ac_ext >&5
20208
20209 cat >conftest.$ac_ext <<_ACEOF
20210 /* confdefs.h.  */
20211 _ACEOF
20212 cat confdefs.h >>conftest.$ac_ext
20213 cat >>conftest.$ac_ext <<_ACEOF
20214 /* end confdefs.h.  */
20215 $ac_includes_default
20216 struct { char filler; long long int field; } pgac_struct;
20217 int
20218 main ()
20219 {
20220 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20221 test_array [0] = 0
20222
20223   ;
20224   return 0;
20225 }
20226 _ACEOF
20227 rm -f conftest.$ac_objext
20228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20229   (eval $ac_compile) 2>conftest.er1
20230   ac_status=$?
20231   grep -v '^ *+' conftest.er1 >conftest.err
20232   rm -f conftest.er1
20233   cat conftest.err >&5
20234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20235   (exit $ac_status); } &&
20236          { ac_try='test -z "$ac_c_werror_flag"
20237                          || test ! -s conftest.err'
20238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20239   (eval $ac_try) 2>&5
20240   ac_status=$?
20241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20242   (exit $ac_status); }; } &&
20243          { ac_try='test -s conftest.$ac_objext'
20244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20245   (eval $ac_try) 2>&5
20246   ac_status=$?
20247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20248   (exit $ac_status); }; }; then
20249   ac_hi=-1 ac_mid=-1
20250   while :; do
20251     cat >conftest.$ac_ext <<_ACEOF
20252 /* confdefs.h.  */
20253 _ACEOF
20254 cat confdefs.h >>conftest.$ac_ext
20255 cat >>conftest.$ac_ext <<_ACEOF
20256 /* end confdefs.h.  */
20257 $ac_includes_default
20258 struct { char filler; long long int field; } pgac_struct;
20259 int
20260 main ()
20261 {
20262 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20263 test_array [0] = 0
20264
20265   ;
20266   return 0;
20267 }
20268 _ACEOF
20269 rm -f conftest.$ac_objext
20270 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20271   (eval $ac_compile) 2>conftest.er1
20272   ac_status=$?
20273   grep -v '^ *+' conftest.er1 >conftest.err
20274   rm -f conftest.er1
20275   cat conftest.err >&5
20276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20277   (exit $ac_status); } &&
20278          { ac_try='test -z "$ac_c_werror_flag"
20279                          || test ! -s conftest.err'
20280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20281   (eval $ac_try) 2>&5
20282   ac_status=$?
20283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20284   (exit $ac_status); }; } &&
20285          { ac_try='test -s conftest.$ac_objext'
20286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20287   (eval $ac_try) 2>&5
20288   ac_status=$?
20289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20290   (exit $ac_status); }; }; then
20291   ac_lo=$ac_mid; break
20292 else
20293   echo "$as_me: failed program was:" >&5
20294 sed 's/^/| /' conftest.$ac_ext >&5
20295
20296 ac_hi=`expr '(' $ac_mid ')' - 1`
20297                        if test $ac_mid -le $ac_hi; then
20298                          ac_lo= ac_hi=
20299                          break
20300                        fi
20301                        ac_mid=`expr 2 '*' $ac_mid`
20302 fi
20303 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20304   done
20305 else
20306   echo "$as_me: failed program was:" >&5
20307 sed 's/^/| /' conftest.$ac_ext >&5
20308
20309 ac_lo= ac_hi=
20310 fi
20311 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20312 fi
20313 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20314 # Binary search between lo and hi bounds.
20315 while test "x$ac_lo" != "x$ac_hi"; do
20316   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20317   cat >conftest.$ac_ext <<_ACEOF
20318 /* confdefs.h.  */
20319 _ACEOF
20320 cat confdefs.h >>conftest.$ac_ext
20321 cat >>conftest.$ac_ext <<_ACEOF
20322 /* end confdefs.h.  */
20323 $ac_includes_default
20324 struct { char filler; long long int field; } pgac_struct;
20325 int
20326 main ()
20327 {
20328 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20329 test_array [0] = 0
20330
20331   ;
20332   return 0;
20333 }
20334 _ACEOF
20335 rm -f conftest.$ac_objext
20336 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20337   (eval $ac_compile) 2>conftest.er1
20338   ac_status=$?
20339   grep -v '^ *+' conftest.er1 >conftest.err
20340   rm -f conftest.er1
20341   cat conftest.err >&5
20342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20343   (exit $ac_status); } &&
20344          { ac_try='test -z "$ac_c_werror_flag"
20345                          || test ! -s conftest.err'
20346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20347   (eval $ac_try) 2>&5
20348   ac_status=$?
20349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20350   (exit $ac_status); }; } &&
20351          { ac_try='test -s conftest.$ac_objext'
20352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20353   (eval $ac_try) 2>&5
20354   ac_status=$?
20355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20356   (exit $ac_status); }; }; then
20357   ac_hi=$ac_mid
20358 else
20359   echo "$as_me: failed program was:" >&5
20360 sed 's/^/| /' conftest.$ac_ext >&5
20361
20362 ac_lo=`expr '(' $ac_mid ')' + 1`
20363 fi
20364 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20365 done
20366 case $ac_lo in
20367 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20368 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20369 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20370    { (exit 1); exit 1; }; } ;;
20371 esac
20372 else
20373   if test "$cross_compiling" = yes; then
20374   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20375 See \`config.log' for more details." >&5
20376 echo "$as_me: error: cannot run test program while cross compiling
20377 See \`config.log' for more details." >&2;}
20378    { (exit 1); exit 1; }; }
20379 else
20380   cat >conftest.$ac_ext <<_ACEOF
20381 /* confdefs.h.  */
20382 _ACEOF
20383 cat confdefs.h >>conftest.$ac_ext
20384 cat >>conftest.$ac_ext <<_ACEOF
20385 /* end confdefs.h.  */
20386 $ac_includes_default
20387 struct { char filler; long long int field; } pgac_struct;
20388 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20389 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20390 #include <stdio.h>
20391 #include <stdlib.h>
20392 int
20393 main ()
20394 {
20395
20396   FILE *f = fopen ("conftest.val", "w");
20397   if (! f)
20398     exit (1);
20399   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20400     {
20401       long i = longval ();
20402       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20403         exit (1);
20404       fprintf (f, "%ld\n", i);
20405     }
20406   else
20407     {
20408       unsigned long i = ulongval ();
20409       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20410         exit (1);
20411       fprintf (f, "%lu\n", i);
20412     }
20413   exit (ferror (f) || fclose (f) != 0);
20414
20415   ;
20416   return 0;
20417 }
20418 _ACEOF
20419 rm -f conftest$ac_exeext
20420 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20421   (eval $ac_link) 2>&5
20422   ac_status=$?
20423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20424   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20426   (eval $ac_try) 2>&5
20427   ac_status=$?
20428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20429   (exit $ac_status); }; }; then
20430   pgac_cv_alignof_long_long_int=`cat conftest.val`
20431 else
20432   echo "$as_me: program exited with status $ac_status" >&5
20433 echo "$as_me: failed program was:" >&5
20434 sed 's/^/| /' conftest.$ac_ext >&5
20435
20436 ( exit $ac_status )
20437 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20438 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20439    { (exit 1); exit 1; }; }
20440 fi
20441 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20442 fi
20443 fi
20444 rm -f conftest.val
20445 else
20446   pgac_cv_alignof_long_long_int=0
20447 fi
20448 fi
20449 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20450 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20451 cat >>confdefs.h <<_ACEOF
20452 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20453 _ACEOF
20454
20455
20456 fi
20457 echo "$as_me:$LINENO: checking for double" >&5
20458 echo $ECHO_N "checking for double... $ECHO_C" >&6
20459 if test "${ac_cv_type_double+set}" = set; then
20460   echo $ECHO_N "(cached) $ECHO_C" >&6
20461 else
20462   cat >conftest.$ac_ext <<_ACEOF
20463 /* confdefs.h.  */
20464 _ACEOF
20465 cat confdefs.h >>conftest.$ac_ext
20466 cat >>conftest.$ac_ext <<_ACEOF
20467 /* end confdefs.h.  */
20468 $ac_includes_default
20469 int
20470 main ()
20471 {
20472 if ((double *) 0)
20473   return 0;
20474 if (sizeof (double))
20475   return 0;
20476   ;
20477   return 0;
20478 }
20479 _ACEOF
20480 rm -f conftest.$ac_objext
20481 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20482   (eval $ac_compile) 2>conftest.er1
20483   ac_status=$?
20484   grep -v '^ *+' conftest.er1 >conftest.err
20485   rm -f conftest.er1
20486   cat conftest.err >&5
20487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20488   (exit $ac_status); } &&
20489          { ac_try='test -z "$ac_c_werror_flag"
20490                          || test ! -s conftest.err'
20491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20492   (eval $ac_try) 2>&5
20493   ac_status=$?
20494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20495   (exit $ac_status); }; } &&
20496          { ac_try='test -s conftest.$ac_objext'
20497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20498   (eval $ac_try) 2>&5
20499   ac_status=$?
20500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20501   (exit $ac_status); }; }; then
20502   ac_cv_type_double=yes
20503 else
20504   echo "$as_me: failed program was:" >&5
20505 sed 's/^/| /' conftest.$ac_ext >&5
20506
20507 ac_cv_type_double=no
20508 fi
20509 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20510 fi
20511 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20512 echo "${ECHO_T}$ac_cv_type_double" >&6
20513
20514 echo "$as_me:$LINENO: checking alignment of double" >&5
20515 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20516 if test "${pgac_cv_alignof_double+set}" = set; then
20517   echo $ECHO_N "(cached) $ECHO_C" >&6
20518 else
20519   if test "$ac_cv_type_double" = yes; then
20520   if test "$cross_compiling" = yes; then
20521   # Depending upon the size, compute the lo and hi bounds.
20522 cat >conftest.$ac_ext <<_ACEOF
20523 /* confdefs.h.  */
20524 _ACEOF
20525 cat confdefs.h >>conftest.$ac_ext
20526 cat >>conftest.$ac_ext <<_ACEOF
20527 /* end confdefs.h.  */
20528 $ac_includes_default
20529 struct { char filler; double field; } pgac_struct;
20530 int
20531 main ()
20532 {
20533 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20534 test_array [0] = 0
20535
20536   ;
20537   return 0;
20538 }
20539 _ACEOF
20540 rm -f conftest.$ac_objext
20541 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20542   (eval $ac_compile) 2>conftest.er1
20543   ac_status=$?
20544   grep -v '^ *+' conftest.er1 >conftest.err
20545   rm -f conftest.er1
20546   cat conftest.err >&5
20547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20548   (exit $ac_status); } &&
20549          { ac_try='test -z "$ac_c_werror_flag"
20550                          || test ! -s conftest.err'
20551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20552   (eval $ac_try) 2>&5
20553   ac_status=$?
20554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20555   (exit $ac_status); }; } &&
20556          { ac_try='test -s conftest.$ac_objext'
20557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20558   (eval $ac_try) 2>&5
20559   ac_status=$?
20560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20561   (exit $ac_status); }; }; then
20562   ac_lo=0 ac_mid=0
20563   while :; do
20564     cat >conftest.$ac_ext <<_ACEOF
20565 /* confdefs.h.  */
20566 _ACEOF
20567 cat confdefs.h >>conftest.$ac_ext
20568 cat >>conftest.$ac_ext <<_ACEOF
20569 /* end confdefs.h.  */
20570 $ac_includes_default
20571 struct { char filler; double field; } pgac_struct;
20572 int
20573 main ()
20574 {
20575 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20576 test_array [0] = 0
20577
20578   ;
20579   return 0;
20580 }
20581 _ACEOF
20582 rm -f conftest.$ac_objext
20583 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20584   (eval $ac_compile) 2>conftest.er1
20585   ac_status=$?
20586   grep -v '^ *+' conftest.er1 >conftest.err
20587   rm -f conftest.er1
20588   cat conftest.err >&5
20589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20590   (exit $ac_status); } &&
20591          { ac_try='test -z "$ac_c_werror_flag"
20592                          || test ! -s conftest.err'
20593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20594   (eval $ac_try) 2>&5
20595   ac_status=$?
20596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20597   (exit $ac_status); }; } &&
20598          { ac_try='test -s conftest.$ac_objext'
20599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20600   (eval $ac_try) 2>&5
20601   ac_status=$?
20602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20603   (exit $ac_status); }; }; then
20604   ac_hi=$ac_mid; break
20605 else
20606   echo "$as_me: failed program was:" >&5
20607 sed 's/^/| /' conftest.$ac_ext >&5
20608
20609 ac_lo=`expr $ac_mid + 1`
20610                     if test $ac_lo -le $ac_mid; then
20611                       ac_lo= ac_hi=
20612                       break
20613                     fi
20614                     ac_mid=`expr 2 '*' $ac_mid + 1`
20615 fi
20616 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20617   done
20618 else
20619   echo "$as_me: failed program was:" >&5
20620 sed 's/^/| /' conftest.$ac_ext >&5
20621
20622 cat >conftest.$ac_ext <<_ACEOF
20623 /* confdefs.h.  */
20624 _ACEOF
20625 cat confdefs.h >>conftest.$ac_ext
20626 cat >>conftest.$ac_ext <<_ACEOF
20627 /* end confdefs.h.  */
20628 $ac_includes_default
20629 struct { char filler; double field; } pgac_struct;
20630 int
20631 main ()
20632 {
20633 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20634 test_array [0] = 0
20635
20636   ;
20637   return 0;
20638 }
20639 _ACEOF
20640 rm -f conftest.$ac_objext
20641 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20642   (eval $ac_compile) 2>conftest.er1
20643   ac_status=$?
20644   grep -v '^ *+' conftest.er1 >conftest.err
20645   rm -f conftest.er1
20646   cat conftest.err >&5
20647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20648   (exit $ac_status); } &&
20649          { ac_try='test -z "$ac_c_werror_flag"
20650                          || test ! -s conftest.err'
20651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20652   (eval $ac_try) 2>&5
20653   ac_status=$?
20654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20655   (exit $ac_status); }; } &&
20656          { ac_try='test -s conftest.$ac_objext'
20657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20658   (eval $ac_try) 2>&5
20659   ac_status=$?
20660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20661   (exit $ac_status); }; }; then
20662   ac_hi=-1 ac_mid=-1
20663   while :; do
20664     cat >conftest.$ac_ext <<_ACEOF
20665 /* confdefs.h.  */
20666 _ACEOF
20667 cat confdefs.h >>conftest.$ac_ext
20668 cat >>conftest.$ac_ext <<_ACEOF
20669 /* end confdefs.h.  */
20670 $ac_includes_default
20671 struct { char filler; double field; } pgac_struct;
20672 int
20673 main ()
20674 {
20675 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20676 test_array [0] = 0
20677
20678   ;
20679   return 0;
20680 }
20681 _ACEOF
20682 rm -f conftest.$ac_objext
20683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20684   (eval $ac_compile) 2>conftest.er1
20685   ac_status=$?
20686   grep -v '^ *+' conftest.er1 >conftest.err
20687   rm -f conftest.er1
20688   cat conftest.err >&5
20689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20690   (exit $ac_status); } &&
20691          { ac_try='test -z "$ac_c_werror_flag"
20692                          || test ! -s conftest.err'
20693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20694   (eval $ac_try) 2>&5
20695   ac_status=$?
20696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20697   (exit $ac_status); }; } &&
20698          { ac_try='test -s conftest.$ac_objext'
20699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20700   (eval $ac_try) 2>&5
20701   ac_status=$?
20702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20703   (exit $ac_status); }; }; then
20704   ac_lo=$ac_mid; break
20705 else
20706   echo "$as_me: failed program was:" >&5
20707 sed 's/^/| /' conftest.$ac_ext >&5
20708
20709 ac_hi=`expr '(' $ac_mid ')' - 1`
20710                        if test $ac_mid -le $ac_hi; then
20711                          ac_lo= ac_hi=
20712                          break
20713                        fi
20714                        ac_mid=`expr 2 '*' $ac_mid`
20715 fi
20716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20717   done
20718 else
20719   echo "$as_me: failed program was:" >&5
20720 sed 's/^/| /' conftest.$ac_ext >&5
20721
20722 ac_lo= ac_hi=
20723 fi
20724 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20725 fi
20726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20727 # Binary search between lo and hi bounds.
20728 while test "x$ac_lo" != "x$ac_hi"; do
20729   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20730   cat >conftest.$ac_ext <<_ACEOF
20731 /* confdefs.h.  */
20732 _ACEOF
20733 cat confdefs.h >>conftest.$ac_ext
20734 cat >>conftest.$ac_ext <<_ACEOF
20735 /* end confdefs.h.  */
20736 $ac_includes_default
20737 struct { char filler; double field; } pgac_struct;
20738 int
20739 main ()
20740 {
20741 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20742 test_array [0] = 0
20743
20744   ;
20745   return 0;
20746 }
20747 _ACEOF
20748 rm -f conftest.$ac_objext
20749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20750   (eval $ac_compile) 2>conftest.er1
20751   ac_status=$?
20752   grep -v '^ *+' conftest.er1 >conftest.err
20753   rm -f conftest.er1
20754   cat conftest.err >&5
20755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20756   (exit $ac_status); } &&
20757          { ac_try='test -z "$ac_c_werror_flag"
20758                          || test ! -s conftest.err'
20759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20760   (eval $ac_try) 2>&5
20761   ac_status=$?
20762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20763   (exit $ac_status); }; } &&
20764          { ac_try='test -s conftest.$ac_objext'
20765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20766   (eval $ac_try) 2>&5
20767   ac_status=$?
20768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20769   (exit $ac_status); }; }; then
20770   ac_hi=$ac_mid
20771 else
20772   echo "$as_me: failed program was:" >&5
20773 sed 's/^/| /' conftest.$ac_ext >&5
20774
20775 ac_lo=`expr '(' $ac_mid ')' + 1`
20776 fi
20777 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20778 done
20779 case $ac_lo in
20780 ?*) pgac_cv_alignof_double=$ac_lo;;
20781 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20782 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20783    { (exit 1); exit 1; }; } ;;
20784 esac
20785 else
20786   if test "$cross_compiling" = yes; then
20787   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20788 See \`config.log' for more details." >&5
20789 echo "$as_me: error: cannot run test program while cross compiling
20790 See \`config.log' for more details." >&2;}
20791    { (exit 1); exit 1; }; }
20792 else
20793   cat >conftest.$ac_ext <<_ACEOF
20794 /* confdefs.h.  */
20795 _ACEOF
20796 cat confdefs.h >>conftest.$ac_ext
20797 cat >>conftest.$ac_ext <<_ACEOF
20798 /* end confdefs.h.  */
20799 $ac_includes_default
20800 struct { char filler; double field; } pgac_struct;
20801 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20802 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20803 #include <stdio.h>
20804 #include <stdlib.h>
20805 int
20806 main ()
20807 {
20808
20809   FILE *f = fopen ("conftest.val", "w");
20810   if (! f)
20811     exit (1);
20812   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20813     {
20814       long i = longval ();
20815       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20816         exit (1);
20817       fprintf (f, "%ld\n", i);
20818     }
20819   else
20820     {
20821       unsigned long i = ulongval ();
20822       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20823         exit (1);
20824       fprintf (f, "%lu\n", i);
20825     }
20826   exit (ferror (f) || fclose (f) != 0);
20827
20828   ;
20829   return 0;
20830 }
20831 _ACEOF
20832 rm -f conftest$ac_exeext
20833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20834   (eval $ac_link) 2>&5
20835   ac_status=$?
20836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20837   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20839   (eval $ac_try) 2>&5
20840   ac_status=$?
20841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20842   (exit $ac_status); }; }; then
20843   pgac_cv_alignof_double=`cat conftest.val`
20844 else
20845   echo "$as_me: program exited with status $ac_status" >&5
20846 echo "$as_me: failed program was:" >&5
20847 sed 's/^/| /' conftest.$ac_ext >&5
20848
20849 ( exit $ac_status )
20850 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20851 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20852    { (exit 1); exit 1; }; }
20853 fi
20854 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20855 fi
20856 fi
20857 rm -f conftest.val
20858 else
20859   pgac_cv_alignof_double=0
20860 fi
20861 fi
20862 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20863 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20864 cat >>confdefs.h <<_ACEOF
20865 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20866 _ACEOF
20867
20868
20869
20870 # Compute maximum alignment of any basic type.
20871 # We assume long's alignment is at least as strong as char, short, or int;
20872 # but we must check long long (if it exists) and double.
20873
20874 MAX_ALIGNOF=$pgac_cv_alignof_long
20875 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20876   MAX_ALIGNOF=$pgac_cv_alignof_double
20877 fi
20878 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20879   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20880 fi
20881
20882 cat >>confdefs.h <<_ACEOF
20883 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20884 _ACEOF
20885
20886
20887
20888 # Some platforms predefine the types int8, int16, etc.  Only check
20889 # a (hopefully) representative subset.
20890 echo "$as_me:$LINENO: checking for int8" >&5
20891 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20892 if test "${ac_cv_type_int8+set}" = set; then
20893   echo $ECHO_N "(cached) $ECHO_C" >&6
20894 else
20895   cat >conftest.$ac_ext <<_ACEOF
20896 /* confdefs.h.  */
20897 _ACEOF
20898 cat confdefs.h >>conftest.$ac_ext
20899 cat >>conftest.$ac_ext <<_ACEOF
20900 /* end confdefs.h.  */
20901 #include <stdio.h>
20902 #ifdef HAVE_SUPPORTDEFS_H
20903 #include <SupportDefs.h>
20904 #endif
20905
20906 int
20907 main ()
20908 {
20909 if ((int8 *) 0)
20910   return 0;
20911 if (sizeof (int8))
20912   return 0;
20913   ;
20914   return 0;
20915 }
20916 _ACEOF
20917 rm -f conftest.$ac_objext
20918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20919   (eval $ac_compile) 2>conftest.er1
20920   ac_status=$?
20921   grep -v '^ *+' conftest.er1 >conftest.err
20922   rm -f conftest.er1
20923   cat conftest.err >&5
20924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20925   (exit $ac_status); } &&
20926          { ac_try='test -z "$ac_c_werror_flag"
20927                          || test ! -s conftest.err'
20928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20929   (eval $ac_try) 2>&5
20930   ac_status=$?
20931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20932   (exit $ac_status); }; } &&
20933          { ac_try='test -s conftest.$ac_objext'
20934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20935   (eval $ac_try) 2>&5
20936   ac_status=$?
20937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20938   (exit $ac_status); }; }; then
20939   ac_cv_type_int8=yes
20940 else
20941   echo "$as_me: failed program was:" >&5
20942 sed 's/^/| /' conftest.$ac_ext >&5
20943
20944 ac_cv_type_int8=no
20945 fi
20946 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20947 fi
20948 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20949 echo "${ECHO_T}$ac_cv_type_int8" >&6
20950 if test $ac_cv_type_int8 = yes; then
20951
20952 cat >>confdefs.h <<_ACEOF
20953 #define HAVE_INT8 1
20954 _ACEOF
20955
20956
20957 fi
20958 echo "$as_me:$LINENO: checking for uint8" >&5
20959 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20960 if test "${ac_cv_type_uint8+set}" = set; then
20961   echo $ECHO_N "(cached) $ECHO_C" >&6
20962 else
20963   cat >conftest.$ac_ext <<_ACEOF
20964 /* confdefs.h.  */
20965 _ACEOF
20966 cat confdefs.h >>conftest.$ac_ext
20967 cat >>conftest.$ac_ext <<_ACEOF
20968 /* end confdefs.h.  */
20969 #include <stdio.h>
20970 #ifdef HAVE_SUPPORTDEFS_H
20971 #include <SupportDefs.h>
20972 #endif
20973
20974 int
20975 main ()
20976 {
20977 if ((uint8 *) 0)
20978   return 0;
20979 if (sizeof (uint8))
20980   return 0;
20981   ;
20982   return 0;
20983 }
20984 _ACEOF
20985 rm -f conftest.$ac_objext
20986 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20987   (eval $ac_compile) 2>conftest.er1
20988   ac_status=$?
20989   grep -v '^ *+' conftest.er1 >conftest.err
20990   rm -f conftest.er1
20991   cat conftest.err >&5
20992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20993   (exit $ac_status); } &&
20994          { ac_try='test -z "$ac_c_werror_flag"
20995                          || test ! -s conftest.err'
20996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20997   (eval $ac_try) 2>&5
20998   ac_status=$?
20999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21000   (exit $ac_status); }; } &&
21001          { ac_try='test -s conftest.$ac_objext'
21002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21003   (eval $ac_try) 2>&5
21004   ac_status=$?
21005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21006   (exit $ac_status); }; }; then
21007   ac_cv_type_uint8=yes
21008 else
21009   echo "$as_me: failed program was:" >&5
21010 sed 's/^/| /' conftest.$ac_ext >&5
21011
21012 ac_cv_type_uint8=no
21013 fi
21014 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21015 fi
21016 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
21017 echo "${ECHO_T}$ac_cv_type_uint8" >&6
21018 if test $ac_cv_type_uint8 = yes; then
21019
21020 cat >>confdefs.h <<_ACEOF
21021 #define HAVE_UINT8 1
21022 _ACEOF
21023
21024
21025 fi
21026 echo "$as_me:$LINENO: checking for int64" >&5
21027 echo $ECHO_N "checking for int64... $ECHO_C" >&6
21028 if test "${ac_cv_type_int64+set}" = set; then
21029   echo $ECHO_N "(cached) $ECHO_C" >&6
21030 else
21031   cat >conftest.$ac_ext <<_ACEOF
21032 /* confdefs.h.  */
21033 _ACEOF
21034 cat confdefs.h >>conftest.$ac_ext
21035 cat >>conftest.$ac_ext <<_ACEOF
21036 /* end confdefs.h.  */
21037 #include <stdio.h>
21038 #ifdef HAVE_SUPPORTDEFS_H
21039 #include <SupportDefs.h>
21040 #endif
21041
21042 int
21043 main ()
21044 {
21045 if ((int64 *) 0)
21046   return 0;
21047 if (sizeof (int64))
21048   return 0;
21049   ;
21050   return 0;
21051 }
21052 _ACEOF
21053 rm -f conftest.$ac_objext
21054 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21055   (eval $ac_compile) 2>conftest.er1
21056   ac_status=$?
21057   grep -v '^ *+' conftest.er1 >conftest.err
21058   rm -f conftest.er1
21059   cat conftest.err >&5
21060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21061   (exit $ac_status); } &&
21062          { ac_try='test -z "$ac_c_werror_flag"
21063                          || test ! -s conftest.err'
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); }; } &&
21069          { ac_try='test -s conftest.$ac_objext'
21070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21071   (eval $ac_try) 2>&5
21072   ac_status=$?
21073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21074   (exit $ac_status); }; }; then
21075   ac_cv_type_int64=yes
21076 else
21077   echo "$as_me: failed program was:" >&5
21078 sed 's/^/| /' conftest.$ac_ext >&5
21079
21080 ac_cv_type_int64=no
21081 fi
21082 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21083 fi
21084 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
21085 echo "${ECHO_T}$ac_cv_type_int64" >&6
21086 if test $ac_cv_type_int64 = yes; then
21087
21088 cat >>confdefs.h <<_ACEOF
21089 #define HAVE_INT64 1
21090 _ACEOF
21091
21092
21093 fi
21094 echo "$as_me:$LINENO: checking for uint64" >&5
21095 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
21096 if test "${ac_cv_type_uint64+set}" = set; then
21097   echo $ECHO_N "(cached) $ECHO_C" >&6
21098 else
21099   cat >conftest.$ac_ext <<_ACEOF
21100 /* confdefs.h.  */
21101 _ACEOF
21102 cat confdefs.h >>conftest.$ac_ext
21103 cat >>conftest.$ac_ext <<_ACEOF
21104 /* end confdefs.h.  */
21105 #include <stdio.h>
21106 #ifdef HAVE_SUPPORTDEFS_H
21107 #include <SupportDefs.h>
21108 #endif
21109
21110 int
21111 main ()
21112 {
21113 if ((uint64 *) 0)
21114   return 0;
21115 if (sizeof (uint64))
21116   return 0;
21117   ;
21118   return 0;
21119 }
21120 _ACEOF
21121 rm -f conftest.$ac_objext
21122 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21123   (eval $ac_compile) 2>conftest.er1
21124   ac_status=$?
21125   grep -v '^ *+' conftest.er1 >conftest.err
21126   rm -f conftest.er1
21127   cat conftest.err >&5
21128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21129   (exit $ac_status); } &&
21130          { ac_try='test -z "$ac_c_werror_flag"
21131                          || test ! -s conftest.err'
21132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21133   (eval $ac_try) 2>&5
21134   ac_status=$?
21135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21136   (exit $ac_status); }; } &&
21137          { ac_try='test -s conftest.$ac_objext'
21138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21139   (eval $ac_try) 2>&5
21140   ac_status=$?
21141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21142   (exit $ac_status); }; }; then
21143   ac_cv_type_uint64=yes
21144 else
21145   echo "$as_me: failed program was:" >&5
21146 sed 's/^/| /' conftest.$ac_ext >&5
21147
21148 ac_cv_type_uint64=no
21149 fi
21150 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21151 fi
21152 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
21153 echo "${ECHO_T}$ac_cv_type_uint64" >&6
21154 if test $ac_cv_type_uint64 = yes; then
21155
21156 cat >>confdefs.h <<_ACEOF
21157 #define HAVE_UINT64 1
21158 _ACEOF
21159
21160
21161 fi
21162
21163
21164 # We also check for sig_atomic_t, which *should* be defined per ANSI
21165 # C, but is missing on some old platforms.
21166 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
21167 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
21168 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
21169   echo $ECHO_N "(cached) $ECHO_C" >&6
21170 else
21171   cat >conftest.$ac_ext <<_ACEOF
21172 /* confdefs.h.  */
21173 _ACEOF
21174 cat confdefs.h >>conftest.$ac_ext
21175 cat >>conftest.$ac_ext <<_ACEOF
21176 /* end confdefs.h.  */
21177 #include <signal.h>
21178
21179 int
21180 main ()
21181 {
21182 if ((sig_atomic_t *) 0)
21183   return 0;
21184 if (sizeof (sig_atomic_t))
21185   return 0;
21186   ;
21187   return 0;
21188 }
21189 _ACEOF
21190 rm -f conftest.$ac_objext
21191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21192   (eval $ac_compile) 2>conftest.er1
21193   ac_status=$?
21194   grep -v '^ *+' conftest.er1 >conftest.err
21195   rm -f conftest.er1
21196   cat conftest.err >&5
21197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21198   (exit $ac_status); } &&
21199          { ac_try='test -z "$ac_c_werror_flag"
21200                          || test ! -s conftest.err'
21201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21202   (eval $ac_try) 2>&5
21203   ac_status=$?
21204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21205   (exit $ac_status); }; } &&
21206          { ac_try='test -s conftest.$ac_objext'
21207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21208   (eval $ac_try) 2>&5
21209   ac_status=$?
21210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21211   (exit $ac_status); }; }; then
21212   ac_cv_type_sig_atomic_t=yes
21213 else
21214   echo "$as_me: failed program was:" >&5
21215 sed 's/^/| /' conftest.$ac_ext >&5
21216
21217 ac_cv_type_sig_atomic_t=no
21218 fi
21219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21220 fi
21221 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21222 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21223 if test $ac_cv_type_sig_atomic_t = yes; then
21224
21225 cat >>confdefs.h <<_ACEOF
21226 #define HAVE_SIG_ATOMIC_T 1
21227 _ACEOF
21228
21229
21230 fi
21231
21232
21233
21234 if test x"$template" != x"win32"
21235 then
21236 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21237 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21238 if test "${pgac_cv_func_posix_signals+set}" = set; then
21239   echo $ECHO_N "(cached) $ECHO_C" >&6
21240 else
21241   cat >conftest.$ac_ext <<_ACEOF
21242 /* confdefs.h.  */
21243 _ACEOF
21244 cat confdefs.h >>conftest.$ac_ext
21245 cat >>conftest.$ac_ext <<_ACEOF
21246 /* end confdefs.h.  */
21247 #include <signal.h>
21248
21249 int
21250 main ()
21251 {
21252 struct sigaction act, oact;
21253 sigemptyset(&act.sa_mask);
21254 act.sa_flags = SA_RESTART;
21255 sigaction(0, &act, &oact);
21256   ;
21257   return 0;
21258 }
21259 _ACEOF
21260 rm -f conftest.$ac_objext conftest$ac_exeext
21261 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21262   (eval $ac_link) 2>conftest.er1
21263   ac_status=$?
21264   grep -v '^ *+' conftest.er1 >conftest.err
21265   rm -f conftest.er1
21266   cat conftest.err >&5
21267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21268   (exit $ac_status); } &&
21269          { ac_try='test -z "$ac_c_werror_flag"
21270                          || test ! -s conftest.err'
21271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21272   (eval $ac_try) 2>&5
21273   ac_status=$?
21274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21275   (exit $ac_status); }; } &&
21276          { ac_try='test -s conftest$ac_exeext'
21277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21278   (eval $ac_try) 2>&5
21279   ac_status=$?
21280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21281   (exit $ac_status); }; }; then
21282   pgac_cv_func_posix_signals=yes
21283 else
21284   echo "$as_me: failed program was:" >&5
21285 sed 's/^/| /' conftest.$ac_ext >&5
21286
21287 pgac_cv_func_posix_signals=no
21288 fi
21289 rm -f conftest.err conftest.$ac_objext \
21290       conftest$ac_exeext conftest.$ac_ext
21291 fi
21292 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21293 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21294 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21295
21296 cat >>confdefs.h <<\_ACEOF
21297 #define HAVE_POSIX_SIGNALS
21298 _ACEOF
21299
21300 fi
21301 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21302
21303 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21304   { { echo "$as_me:$LINENO: error:
21305 *** Thread-safety requires POSIX signals, which are not supported by your
21306 *** operating system.
21307 " >&5
21308 echo "$as_me: error:
21309 *** Thread-safety requires POSIX signals, which are not supported by your
21310 *** operating system.
21311 " >&2;}
21312    { (exit 1); exit 1; }; }
21313 fi
21314 fi
21315
21316 if test $ac_cv_func_fseeko = yes; then
21317 # Check whether --enable-largefile or --disable-largefile was given.
21318 if test "${enable_largefile+set}" = set; then
21319   enableval="$enable_largefile"
21320
21321 fi;
21322 if test "$enable_largefile" != no; then
21323
21324   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21325 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21326 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21327   echo $ECHO_N "(cached) $ECHO_C" >&6
21328 else
21329   ac_cv_sys_largefile_CC=no
21330      if test "$GCC" != yes; then
21331        ac_save_CC=$CC
21332        while :; do
21333          # IRIX 6.2 and later do not support large files by default,
21334          # so use the C compiler's -n32 option if that helps.
21335          cat >conftest.$ac_ext <<_ACEOF
21336 /* confdefs.h.  */
21337 _ACEOF
21338 cat confdefs.h >>conftest.$ac_ext
21339 cat >>conftest.$ac_ext <<_ACEOF
21340 /* end confdefs.h.  */
21341 #include <sys/types.h>
21342  /* Check that off_t can represent 2**63 - 1 correctly.
21343     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21344     since some C++ compilers masquerading as C compilers
21345     incorrectly reject 9223372036854775807.  */
21346 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21347   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21348                        && LARGE_OFF_T % 2147483647 == 1)
21349                       ? 1 : -1];
21350 int
21351 main ()
21352 {
21353
21354   ;
21355   return 0;
21356 }
21357 _ACEOF
21358          rm -f conftest.$ac_objext
21359 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21360   (eval $ac_compile) 2>conftest.er1
21361   ac_status=$?
21362   grep -v '^ *+' conftest.er1 >conftest.err
21363   rm -f conftest.er1
21364   cat conftest.err >&5
21365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21366   (exit $ac_status); } &&
21367          { ac_try='test -z "$ac_c_werror_flag"
21368                          || test ! -s conftest.err'
21369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21370   (eval $ac_try) 2>&5
21371   ac_status=$?
21372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21373   (exit $ac_status); }; } &&
21374          { ac_try='test -s conftest.$ac_objext'
21375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21376   (eval $ac_try) 2>&5
21377   ac_status=$?
21378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21379   (exit $ac_status); }; }; then
21380   break
21381 else
21382   echo "$as_me: failed program was:" >&5
21383 sed 's/^/| /' conftest.$ac_ext >&5
21384
21385 fi
21386 rm -f conftest.err conftest.$ac_objext
21387          CC="$CC -n32"
21388          rm -f conftest.$ac_objext
21389 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21390   (eval $ac_compile) 2>conftest.er1
21391   ac_status=$?
21392   grep -v '^ *+' conftest.er1 >conftest.err
21393   rm -f conftest.er1
21394   cat conftest.err >&5
21395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21396   (exit $ac_status); } &&
21397          { ac_try='test -z "$ac_c_werror_flag"
21398                          || test ! -s conftest.err'
21399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21400   (eval $ac_try) 2>&5
21401   ac_status=$?
21402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21403   (exit $ac_status); }; } &&
21404          { ac_try='test -s conftest.$ac_objext'
21405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21406   (eval $ac_try) 2>&5
21407   ac_status=$?
21408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21409   (exit $ac_status); }; }; then
21410   ac_cv_sys_largefile_CC=' -n32'; break
21411 else
21412   echo "$as_me: failed program was:" >&5
21413 sed 's/^/| /' conftest.$ac_ext >&5
21414
21415 fi
21416 rm -f conftest.err conftest.$ac_objext
21417          break
21418        done
21419        CC=$ac_save_CC
21420        rm -f conftest.$ac_ext
21421     fi
21422 fi
21423 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21424 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21425   if test "$ac_cv_sys_largefile_CC" != no; then
21426     CC=$CC$ac_cv_sys_largefile_CC
21427   fi
21428
21429   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21430 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21431 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21432   echo $ECHO_N "(cached) $ECHO_C" >&6
21433 else
21434   while :; do
21435   ac_cv_sys_file_offset_bits=no
21436   cat >conftest.$ac_ext <<_ACEOF
21437 /* confdefs.h.  */
21438 _ACEOF
21439 cat confdefs.h >>conftest.$ac_ext
21440 cat >>conftest.$ac_ext <<_ACEOF
21441 /* end confdefs.h.  */
21442 #include <sys/types.h>
21443  /* Check that off_t can represent 2**63 - 1 correctly.
21444     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21445     since some C++ compilers masquerading as C compilers
21446     incorrectly reject 9223372036854775807.  */
21447 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21448   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21449                        && LARGE_OFF_T % 2147483647 == 1)
21450                       ? 1 : -1];
21451 int
21452 main ()
21453 {
21454
21455   ;
21456   return 0;
21457 }
21458 _ACEOF
21459 rm -f conftest.$ac_objext
21460 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21461   (eval $ac_compile) 2>conftest.er1
21462   ac_status=$?
21463   grep -v '^ *+' conftest.er1 >conftest.err
21464   rm -f conftest.er1
21465   cat conftest.err >&5
21466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21467   (exit $ac_status); } &&
21468          { ac_try='test -z "$ac_c_werror_flag"
21469                          || test ! -s conftest.err'
21470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21471   (eval $ac_try) 2>&5
21472   ac_status=$?
21473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21474   (exit $ac_status); }; } &&
21475          { ac_try='test -s conftest.$ac_objext'
21476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21477   (eval $ac_try) 2>&5
21478   ac_status=$?
21479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21480   (exit $ac_status); }; }; then
21481   break
21482 else
21483   echo "$as_me: failed program was:" >&5
21484 sed 's/^/| /' conftest.$ac_ext >&5
21485
21486 fi
21487 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21488   cat >conftest.$ac_ext <<_ACEOF
21489 /* confdefs.h.  */
21490 _ACEOF
21491 cat confdefs.h >>conftest.$ac_ext
21492 cat >>conftest.$ac_ext <<_ACEOF
21493 /* end confdefs.h.  */
21494 #define _FILE_OFFSET_BITS 64
21495 #include <sys/types.h>
21496  /* Check that off_t can represent 2**63 - 1 correctly.
21497     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21498     since some C++ compilers masquerading as C compilers
21499     incorrectly reject 9223372036854775807.  */
21500 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21501   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21502                        && LARGE_OFF_T % 2147483647 == 1)
21503                       ? 1 : -1];
21504 int
21505 main ()
21506 {
21507
21508   ;
21509   return 0;
21510 }
21511 _ACEOF
21512 rm -f conftest.$ac_objext
21513 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21514   (eval $ac_compile) 2>conftest.er1
21515   ac_status=$?
21516   grep -v '^ *+' conftest.er1 >conftest.err
21517   rm -f conftest.er1
21518   cat conftest.err >&5
21519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21520   (exit $ac_status); } &&
21521          { ac_try='test -z "$ac_c_werror_flag"
21522                          || test ! -s conftest.err'
21523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21524   (eval $ac_try) 2>&5
21525   ac_status=$?
21526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21527   (exit $ac_status); }; } &&
21528          { ac_try='test -s conftest.$ac_objext'
21529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21530   (eval $ac_try) 2>&5
21531   ac_status=$?
21532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21533   (exit $ac_status); }; }; then
21534   ac_cv_sys_file_offset_bits=64; break
21535 else
21536   echo "$as_me: failed program was:" >&5
21537 sed 's/^/| /' conftest.$ac_ext >&5
21538
21539 fi
21540 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21541   break
21542 done
21543 fi
21544 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21545 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21546 if test "$ac_cv_sys_file_offset_bits" != no; then
21547
21548 cat >>confdefs.h <<_ACEOF
21549 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21550 _ACEOF
21551
21552 fi
21553 rm -f conftest*
21554   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21555 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21556 if test "${ac_cv_sys_large_files+set}" = set; then
21557   echo $ECHO_N "(cached) $ECHO_C" >&6
21558 else
21559   while :; do
21560   ac_cv_sys_large_files=no
21561   cat >conftest.$ac_ext <<_ACEOF
21562 /* confdefs.h.  */
21563 _ACEOF
21564 cat confdefs.h >>conftest.$ac_ext
21565 cat >>conftest.$ac_ext <<_ACEOF
21566 /* end confdefs.h.  */
21567 #include <sys/types.h>
21568  /* Check that off_t can represent 2**63 - 1 correctly.
21569     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21570     since some C++ compilers masquerading as C compilers
21571     incorrectly reject 9223372036854775807.  */
21572 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21573   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21574                        && LARGE_OFF_T % 2147483647 == 1)
21575                       ? 1 : -1];
21576 int
21577 main ()
21578 {
21579
21580   ;
21581   return 0;
21582 }
21583 _ACEOF
21584 rm -f conftest.$ac_objext
21585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21586   (eval $ac_compile) 2>conftest.er1
21587   ac_status=$?
21588   grep -v '^ *+' conftest.er1 >conftest.err
21589   rm -f conftest.er1
21590   cat conftest.err >&5
21591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21592   (exit $ac_status); } &&
21593          { ac_try='test -z "$ac_c_werror_flag"
21594                          || test ! -s conftest.err'
21595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21596   (eval $ac_try) 2>&5
21597   ac_status=$?
21598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21599   (exit $ac_status); }; } &&
21600          { ac_try='test -s conftest.$ac_objext'
21601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21602   (eval $ac_try) 2>&5
21603   ac_status=$?
21604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21605   (exit $ac_status); }; }; then
21606   break
21607 else
21608   echo "$as_me: failed program was:" >&5
21609 sed 's/^/| /' conftest.$ac_ext >&5
21610
21611 fi
21612 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 #define _LARGE_FILES 1
21620 #include <sys/types.h>
21621  /* Check that off_t can represent 2**63 - 1 correctly.
21622     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21623     since some C++ compilers masquerading as C compilers
21624     incorrectly reject 9223372036854775807.  */
21625 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21626   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21627                        && LARGE_OFF_T % 2147483647 == 1)
21628                       ? 1 : -1];
21629 int
21630 main ()
21631 {
21632
21633   ;
21634   return 0;
21635 }
21636 _ACEOF
21637 rm -f conftest.$ac_objext
21638 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21639   (eval $ac_compile) 2>conftest.er1
21640   ac_status=$?
21641   grep -v '^ *+' conftest.er1 >conftest.err
21642   rm -f conftest.er1
21643   cat conftest.err >&5
21644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21645   (exit $ac_status); } &&
21646          { ac_try='test -z "$ac_c_werror_flag"
21647                          || test ! -s conftest.err'
21648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21649   (eval $ac_try) 2>&5
21650   ac_status=$?
21651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21652   (exit $ac_status); }; } &&
21653          { ac_try='test -s conftest.$ac_objext'
21654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21655   (eval $ac_try) 2>&5
21656   ac_status=$?
21657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21658   (exit $ac_status); }; }; then
21659   ac_cv_sys_large_files=1; break
21660 else
21661   echo "$as_me: failed program was:" >&5
21662 sed 's/^/| /' conftest.$ac_ext >&5
21663
21664 fi
21665 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21666   break
21667 done
21668 fi
21669 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21670 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21671 if test "$ac_cv_sys_large_files" != no; then
21672
21673 cat >>confdefs.h <<_ACEOF
21674 #define _LARGE_FILES $ac_cv_sys_large_files
21675 _ACEOF
21676
21677 fi
21678 rm -f conftest*
21679 fi
21680
21681 fi
21682
21683 # SunOS doesn't handle negative byte comparisons properly with +/- return
21684 echo "$as_me:$LINENO: checking for working memcmp" >&5
21685 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21686 if test "${ac_cv_func_memcmp_working+set}" = set; then
21687   echo $ECHO_N "(cached) $ECHO_C" >&6
21688 else
21689   if test "$cross_compiling" = yes; then
21690   ac_cv_func_memcmp_working=no
21691 else
21692   cat >conftest.$ac_ext <<_ACEOF
21693 /* confdefs.h.  */
21694 _ACEOF
21695 cat confdefs.h >>conftest.$ac_ext
21696 cat >>conftest.$ac_ext <<_ACEOF
21697 /* end confdefs.h.  */
21698 $ac_includes_default
21699 int
21700 main ()
21701 {
21702
21703   /* Some versions of memcmp are not 8-bit clean.  */
21704   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21705   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21706     exit (1);
21707
21708   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21709      or more and with at least one buffer not starting on a 4-byte boundary.
21710      William Lewis provided this test program.   */
21711   {
21712     char foo[21];
21713     char bar[21];
21714     int i;
21715     for (i = 0; i < 4; i++)
21716       {
21717         char *a = foo + i;
21718         char *b = bar + i;
21719         strcpy (a, "--------01111111");
21720         strcpy (b, "--------10000000");
21721         if (memcmp (a, b, 16) >= 0)
21722           exit (1);
21723       }
21724     exit (0);
21725   }
21726
21727   ;
21728   return 0;
21729 }
21730 _ACEOF
21731 rm -f conftest$ac_exeext
21732 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21733   (eval $ac_link) 2>&5
21734   ac_status=$?
21735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21736   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21738   (eval $ac_try) 2>&5
21739   ac_status=$?
21740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21741   (exit $ac_status); }; }; then
21742   ac_cv_func_memcmp_working=yes
21743 else
21744   echo "$as_me: program exited with status $ac_status" >&5
21745 echo "$as_me: failed program was:" >&5
21746 sed 's/^/| /' conftest.$ac_ext >&5
21747
21748 ( exit $ac_status )
21749 ac_cv_func_memcmp_working=no
21750 fi
21751 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21752 fi
21753 fi
21754 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21755 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21756 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21757     "memcmp.$ac_objext"   | \
21758   *" memcmp.$ac_objext"   | \
21759     "memcmp.$ac_objext "* | \
21760   *" memcmp.$ac_objext "* ) ;;
21761   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21762 esac
21763
21764
21765
21766
21767 # Select semaphore implementation type.
21768 if test "$PORTNAME" != "win32"; then
21769   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21770
21771 cat >>confdefs.h <<\_ACEOF
21772 #define USE_NAMED_POSIX_SEMAPHORES 1
21773 _ACEOF
21774
21775     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21776   else
21777     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21778
21779 cat >>confdefs.h <<\_ACEOF
21780 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21781 _ACEOF
21782
21783       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21784     else
21785
21786 cat >>confdefs.h <<\_ACEOF
21787 #define USE_SYSV_SEMAPHORES 1
21788 _ACEOF
21789
21790       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21791     fi
21792   fi
21793 else
21794
21795 cat >>confdefs.h <<\_ACEOF
21796 #define USE_WIN32_SEMAPHORES 1
21797 _ACEOF
21798
21799   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
21800 fi
21801
21802
21803 # Select shared-memory implementation type.
21804
21805 cat >>confdefs.h <<\_ACEOF
21806 #define USE_SYSV_SHARED_MEMORY 1
21807 _ACEOF
21808
21809 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21810
21811
21812 # If not set in template file, set bytes to use libc memset()
21813 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
21814   MEMSET_LOOP_LIMIT=1024
21815 fi
21816
21817 cat >>confdefs.h <<_ACEOF
21818 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
21819 _ACEOF
21820
21821
21822
21823 if test "$enable_nls" = yes ; then
21824
21825   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21826 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21827 if test "${ac_cv_search_gettext+set}" = set; then
21828   echo $ECHO_N "(cached) $ECHO_C" >&6
21829 else
21830   ac_func_search_save_LIBS=$LIBS
21831 ac_cv_search_gettext=no
21832 cat >conftest.$ac_ext <<_ACEOF
21833 /* confdefs.h.  */
21834 _ACEOF
21835 cat confdefs.h >>conftest.$ac_ext
21836 cat >>conftest.$ac_ext <<_ACEOF
21837 /* end confdefs.h.  */
21838
21839 /* Override any gcc2 internal prototype to avoid an error.  */
21840 #ifdef __cplusplus
21841 extern "C"
21842 #endif
21843 /* We use char because int might match the return type of a gcc2
21844    builtin and then its argument prototype would still apply.  */
21845 char gettext ();
21846 int
21847 main ()
21848 {
21849 gettext ();
21850   ;
21851   return 0;
21852 }
21853 _ACEOF
21854 rm -f conftest.$ac_objext conftest$ac_exeext
21855 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21856   (eval $ac_link) 2>conftest.er1
21857   ac_status=$?
21858   grep -v '^ *+' conftest.er1 >conftest.err
21859   rm -f conftest.er1
21860   cat conftest.err >&5
21861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21862   (exit $ac_status); } &&
21863          { ac_try='test -z "$ac_c_werror_flag"
21864                          || test ! -s conftest.err'
21865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21866   (eval $ac_try) 2>&5
21867   ac_status=$?
21868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21869   (exit $ac_status); }; } &&
21870          { ac_try='test -s conftest$ac_exeext'
21871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21872   (eval $ac_try) 2>&5
21873   ac_status=$?
21874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21875   (exit $ac_status); }; }; then
21876   ac_cv_search_gettext="none required"
21877 else
21878   echo "$as_me: failed program was:" >&5
21879 sed 's/^/| /' conftest.$ac_ext >&5
21880
21881 fi
21882 rm -f conftest.err conftest.$ac_objext \
21883       conftest$ac_exeext conftest.$ac_ext
21884 if test "$ac_cv_search_gettext" = no; then
21885   for ac_lib in intl; do
21886     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21887     cat >conftest.$ac_ext <<_ACEOF
21888 /* confdefs.h.  */
21889 _ACEOF
21890 cat confdefs.h >>conftest.$ac_ext
21891 cat >>conftest.$ac_ext <<_ACEOF
21892 /* end confdefs.h.  */
21893
21894 /* Override any gcc2 internal prototype to avoid an error.  */
21895 #ifdef __cplusplus
21896 extern "C"
21897 #endif
21898 /* We use char because int might match the return type of a gcc2
21899    builtin and then its argument prototype would still apply.  */
21900 char gettext ();
21901 int
21902 main ()
21903 {
21904 gettext ();
21905   ;
21906   return 0;
21907 }
21908 _ACEOF
21909 rm -f conftest.$ac_objext conftest$ac_exeext
21910 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21911   (eval $ac_link) 2>conftest.er1
21912   ac_status=$?
21913   grep -v '^ *+' conftest.er1 >conftest.err
21914   rm -f conftest.er1
21915   cat conftest.err >&5
21916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21917   (exit $ac_status); } &&
21918          { ac_try='test -z "$ac_c_werror_flag"
21919                          || test ! -s conftest.err'
21920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21921   (eval $ac_try) 2>&5
21922   ac_status=$?
21923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21924   (exit $ac_status); }; } &&
21925          { ac_try='test -s conftest$ac_exeext'
21926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21927   (eval $ac_try) 2>&5
21928   ac_status=$?
21929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21930   (exit $ac_status); }; }; then
21931   ac_cv_search_gettext="-l$ac_lib"
21932 break
21933 else
21934   echo "$as_me: failed program was:" >&5
21935 sed 's/^/| /' conftest.$ac_ext >&5
21936
21937 fi
21938 rm -f conftest.err conftest.$ac_objext \
21939       conftest$ac_exeext conftest.$ac_ext
21940   done
21941 fi
21942 LIBS=$ac_func_search_save_LIBS
21943 fi
21944 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21945 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21946 if test "$ac_cv_search_gettext" != no; then
21947   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21948
21949 else
21950   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21951 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21952    { (exit 1); exit 1; }; }
21953 fi
21954
21955   if test "${ac_cv_header_libintl_h+set}" = set; then
21956   echo "$as_me:$LINENO: checking for libintl.h" >&5
21957 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21958 if test "${ac_cv_header_libintl_h+set}" = set; then
21959   echo $ECHO_N "(cached) $ECHO_C" >&6
21960 fi
21961 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21962 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21963 else
21964   # Is the header compilable?
21965 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21966 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21967 cat >conftest.$ac_ext <<_ACEOF
21968 /* confdefs.h.  */
21969 _ACEOF
21970 cat confdefs.h >>conftest.$ac_ext
21971 cat >>conftest.$ac_ext <<_ACEOF
21972 /* end confdefs.h.  */
21973 $ac_includes_default
21974 #include <libintl.h>
21975 _ACEOF
21976 rm -f conftest.$ac_objext
21977 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21978   (eval $ac_compile) 2>conftest.er1
21979   ac_status=$?
21980   grep -v '^ *+' conftest.er1 >conftest.err
21981   rm -f conftest.er1
21982   cat conftest.err >&5
21983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21984   (exit $ac_status); } &&
21985          { ac_try='test -z "$ac_c_werror_flag"
21986                          || test ! -s conftest.err'
21987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21988   (eval $ac_try) 2>&5
21989   ac_status=$?
21990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21991   (exit $ac_status); }; } &&
21992          { ac_try='test -s conftest.$ac_objext'
21993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21994   (eval $ac_try) 2>&5
21995   ac_status=$?
21996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21997   (exit $ac_status); }; }; then
21998   ac_header_compiler=yes
21999 else
22000   echo "$as_me: failed program was:" >&5
22001 sed 's/^/| /' conftest.$ac_ext >&5
22002
22003 ac_header_compiler=no
22004 fi
22005 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22006 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22007 echo "${ECHO_T}$ac_header_compiler" >&6
22008
22009 # Is the header present?
22010 echo "$as_me:$LINENO: checking libintl.h presence" >&5
22011 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
22012 cat >conftest.$ac_ext <<_ACEOF
22013 /* confdefs.h.  */
22014 _ACEOF
22015 cat confdefs.h >>conftest.$ac_ext
22016 cat >>conftest.$ac_ext <<_ACEOF
22017 /* end confdefs.h.  */
22018 #include <libintl.h>
22019 _ACEOF
22020 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22021   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22022   ac_status=$?
22023   grep -v '^ *+' conftest.er1 >conftest.err
22024   rm -f conftest.er1
22025   cat conftest.err >&5
22026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22027   (exit $ac_status); } >/dev/null; then
22028   if test -s conftest.err; then
22029     ac_cpp_err=$ac_c_preproc_warn_flag
22030     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22031   else
22032     ac_cpp_err=
22033   fi
22034 else
22035   ac_cpp_err=yes
22036 fi
22037 if test -z "$ac_cpp_err"; then
22038   ac_header_preproc=yes
22039 else
22040   echo "$as_me: failed program was:" >&5
22041 sed 's/^/| /' conftest.$ac_ext >&5
22042
22043   ac_header_preproc=no
22044 fi
22045 rm -f conftest.err conftest.$ac_ext
22046 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22047 echo "${ECHO_T}$ac_header_preproc" >&6
22048
22049 # So?  What about this header?
22050 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22051   yes:no: )
22052     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22053 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22054     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
22055 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
22056     ac_header_preproc=yes
22057     ;;
22058   no:yes:* )
22059     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
22060 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
22061     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
22062 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
22063     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
22064 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
22065     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
22066 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22067     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
22068 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
22069     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
22070 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
22071     (
22072       cat <<\_ASBOX
22073 ## ---------------------------------------- ##
22074 ## Report this to pgsql-bugs@postgresql.org ##
22075 ## ---------------------------------------- ##
22076 _ASBOX
22077     ) |
22078       sed "s/^/$as_me: WARNING:     /" >&2
22079     ;;
22080 esac
22081 echo "$as_me:$LINENO: checking for libintl.h" >&5
22082 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22083 if test "${ac_cv_header_libintl_h+set}" = set; then
22084   echo $ECHO_N "(cached) $ECHO_C" >&6
22085 else
22086   ac_cv_header_libintl_h=$ac_header_preproc
22087 fi
22088 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22089 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22090
22091 fi
22092 if test $ac_cv_header_libintl_h = yes; then
22093   :
22094 else
22095   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
22096 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
22097    { (exit 1); exit 1; }; }
22098 fi
22099
22100
22101   for ac_prog in msgfmt
22102 do
22103   # Extract the first word of "$ac_prog", so it can be a program name with args.
22104 set dummy $ac_prog; ac_word=$2
22105 echo "$as_me:$LINENO: checking for $ac_word" >&5
22106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22107 if test "${ac_cv_prog_MSGFMT+set}" = set; then
22108   echo $ECHO_N "(cached) $ECHO_C" >&6
22109 else
22110   if test -n "$MSGFMT"; then
22111   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
22112 else
22113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22114 for as_dir in $PATH
22115 do
22116   IFS=$as_save_IFS
22117   test -z "$as_dir" && as_dir=.
22118   for ac_exec_ext in '' $ac_executable_extensions; do
22119   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22120     ac_cv_prog_MSGFMT="$ac_prog"
22121     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22122     break 2
22123   fi
22124 done
22125 done
22126
22127 fi
22128 fi
22129 MSGFMT=$ac_cv_prog_MSGFMT
22130 if test -n "$MSGFMT"; then
22131   echo "$as_me:$LINENO: result: $MSGFMT" >&5
22132 echo "${ECHO_T}$MSGFMT" >&6
22133 else
22134   echo "$as_me:$LINENO: result: no" >&5
22135 echo "${ECHO_T}no" >&6
22136 fi
22137
22138   test -n "$MSGFMT" && break
22139 done
22140
22141   if test -z "$MSGFMT"; then
22142     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
22143 echo "$as_me: error: msgfmt is required for NLS" >&2;}
22144    { (exit 1); exit 1; }; }
22145   fi
22146   for ac_prog in msgmerge
22147 do
22148   # Extract the first word of "$ac_prog", so it can be a program name with args.
22149 set dummy $ac_prog; ac_word=$2
22150 echo "$as_me:$LINENO: checking for $ac_word" >&5
22151 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22152 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
22153   echo $ECHO_N "(cached) $ECHO_C" >&6
22154 else
22155   if test -n "$MSGMERGE"; then
22156   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
22157 else
22158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22159 for as_dir in $PATH
22160 do
22161   IFS=$as_save_IFS
22162   test -z "$as_dir" && as_dir=.
22163   for ac_exec_ext in '' $ac_executable_extensions; do
22164   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22165     ac_cv_prog_MSGMERGE="$ac_prog"
22166     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22167     break 2
22168   fi
22169 done
22170 done
22171
22172 fi
22173 fi
22174 MSGMERGE=$ac_cv_prog_MSGMERGE
22175 if test -n "$MSGMERGE"; then
22176   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
22177 echo "${ECHO_T}$MSGMERGE" >&6
22178 else
22179   echo "$as_me:$LINENO: result: no" >&5
22180 echo "${ECHO_T}no" >&6
22181 fi
22182
22183   test -n "$MSGMERGE" && break
22184 done
22185
22186   for ac_prog in xgettext
22187 do
22188   # Extract the first word of "$ac_prog", so it can be a program name with args.
22189 set dummy $ac_prog; ac_word=$2
22190 echo "$as_me:$LINENO: checking for $ac_word" >&5
22191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22192 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
22193   echo $ECHO_N "(cached) $ECHO_C" >&6
22194 else
22195   if test -n "$XGETTEXT"; then
22196   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
22197 else
22198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22199 for as_dir in $PATH
22200 do
22201   IFS=$as_save_IFS
22202   test -z "$as_dir" && as_dir=.
22203   for ac_exec_ext in '' $ac_executable_extensions; do
22204   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22205     ac_cv_prog_XGETTEXT="$ac_prog"
22206     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22207     break 2
22208   fi
22209 done
22210 done
22211
22212 fi
22213 fi
22214 XGETTEXT=$ac_cv_prog_XGETTEXT
22215 if test -n "$XGETTEXT"; then
22216   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
22217 echo "${ECHO_T}$XGETTEXT" >&6
22218 else
22219   echo "$as_me:$LINENO: result: no" >&5
22220 echo "${ECHO_T}no" >&6
22221 fi
22222
22223   test -n "$XGETTEXT" && break
22224 done
22225
22226
22227   # Note: share/locale is always the default, independent of $datadir
22228   localedir='${prefix}/share/locale'
22229
22230
22231 fi
22232
22233 # Check for Tcl configuration script tclConfig.sh
22234 if test "$with_tcl" = yes; then
22235     for ac_prog in tclsh tcl
22236 do
22237   # Extract the first word of "$ac_prog", so it can be a program name with args.
22238 set dummy $ac_prog; ac_word=$2
22239 echo "$as_me:$LINENO: checking for $ac_word" >&5
22240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22241 if test "${ac_cv_path_TCLSH+set}" = set; then
22242   echo $ECHO_N "(cached) $ECHO_C" >&6
22243 else
22244   case $TCLSH in
22245   [\\/]* | ?:[\\/]*)
22246   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22247   ;;
22248   *)
22249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22250 for as_dir in $PATH
22251 do
22252   IFS=$as_save_IFS
22253   test -z "$as_dir" && as_dir=.
22254   for ac_exec_ext in '' $ac_executable_extensions; do
22255   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22256     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22257     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22258     break 2
22259   fi
22260 done
22261 done
22262
22263   ;;
22264 esac
22265 fi
22266 TCLSH=$ac_cv_path_TCLSH
22267
22268 if test -n "$TCLSH"; then
22269   echo "$as_me:$LINENO: result: $TCLSH" >&5
22270 echo "${ECHO_T}$TCLSH" >&6
22271 else
22272   echo "$as_me:$LINENO: result: no" >&5
22273 echo "${ECHO_T}no" >&6
22274 fi
22275
22276   test -n "$TCLSH" && break
22277 done
22278
22279 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22280 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22281 # Let user override test
22282 if test -z "$TCL_CONFIG_SH"; then
22283     pgac_test_dirs="$with_tclconfig"
22284
22285     set X $pgac_test_dirs; shift
22286     if test $# -eq 0; then
22287         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22288 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22289    { (exit 1); exit 1; }; }
22290         set X `echo 'puts $auto_path' | $TCLSH`; shift
22291     fi
22292
22293     for pgac_dir do
22294         if test -r "$pgac_dir/tclConfig.sh"; then
22295             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22296             break
22297         fi
22298     done
22299 fi
22300
22301 if test -z "$TCL_CONFIG_SH"; then
22302     echo "$as_me:$LINENO: result: no" >&5
22303 echo "${ECHO_T}no" >&6
22304     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22305 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22306    { (exit 1); exit 1; }; }
22307 else
22308     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22309 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22310 fi
22311
22312
22313
22314     . "$TCL_CONFIG_SH"
22315 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22316 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22317 eval TCL_LIBS=\"$TCL_LIBS\"
22318 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22319 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22320
22321         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22322     ac_save_CPPFLAGS=$CPPFLAGS
22323     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22324     if test "${ac_cv_header_tcl_h+set}" = set; then
22325   echo "$as_me:$LINENO: checking for tcl.h" >&5
22326 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22327 if test "${ac_cv_header_tcl_h+set}" = set; then
22328   echo $ECHO_N "(cached) $ECHO_C" >&6
22329 fi
22330 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22331 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22332 else
22333   # Is the header compilable?
22334 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22335 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22336 cat >conftest.$ac_ext <<_ACEOF
22337 /* confdefs.h.  */
22338 _ACEOF
22339 cat confdefs.h >>conftest.$ac_ext
22340 cat >>conftest.$ac_ext <<_ACEOF
22341 /* end confdefs.h.  */
22342 $ac_includes_default
22343 #include <tcl.h>
22344 _ACEOF
22345 rm -f conftest.$ac_objext
22346 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22347   (eval $ac_compile) 2>conftest.er1
22348   ac_status=$?
22349   grep -v '^ *+' conftest.er1 >conftest.err
22350   rm -f conftest.er1
22351   cat conftest.err >&5
22352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22353   (exit $ac_status); } &&
22354          { ac_try='test -z "$ac_c_werror_flag"
22355                          || test ! -s conftest.err'
22356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22357   (eval $ac_try) 2>&5
22358   ac_status=$?
22359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22360   (exit $ac_status); }; } &&
22361          { ac_try='test -s conftest.$ac_objext'
22362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22363   (eval $ac_try) 2>&5
22364   ac_status=$?
22365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22366   (exit $ac_status); }; }; then
22367   ac_header_compiler=yes
22368 else
22369   echo "$as_me: failed program was:" >&5
22370 sed 's/^/| /' conftest.$ac_ext >&5
22371
22372 ac_header_compiler=no
22373 fi
22374 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22375 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22376 echo "${ECHO_T}$ac_header_compiler" >&6
22377
22378 # Is the header present?
22379 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22380 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22381 cat >conftest.$ac_ext <<_ACEOF
22382 /* confdefs.h.  */
22383 _ACEOF
22384 cat confdefs.h >>conftest.$ac_ext
22385 cat >>conftest.$ac_ext <<_ACEOF
22386 /* end confdefs.h.  */
22387 #include <tcl.h>
22388 _ACEOF
22389 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22390   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22391   ac_status=$?
22392   grep -v '^ *+' conftest.er1 >conftest.err
22393   rm -f conftest.er1
22394   cat conftest.err >&5
22395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22396   (exit $ac_status); } >/dev/null; then
22397   if test -s conftest.err; then
22398     ac_cpp_err=$ac_c_preproc_warn_flag
22399     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22400   else
22401     ac_cpp_err=
22402   fi
22403 else
22404   ac_cpp_err=yes
22405 fi
22406 if test -z "$ac_cpp_err"; then
22407   ac_header_preproc=yes
22408 else
22409   echo "$as_me: failed program was:" >&5
22410 sed 's/^/| /' conftest.$ac_ext >&5
22411
22412   ac_header_preproc=no
22413 fi
22414 rm -f conftest.err conftest.$ac_ext
22415 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22416 echo "${ECHO_T}$ac_header_preproc" >&6
22417
22418 # So?  What about this header?
22419 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22420   yes:no: )
22421     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22422 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22423     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22424 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22425     ac_header_preproc=yes
22426     ;;
22427   no:yes:* )
22428     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22429 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22430     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22431 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22432     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22433 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22434     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22435 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22436     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22437 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22438     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22439 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22440     (
22441       cat <<\_ASBOX
22442 ## ---------------------------------------- ##
22443 ## Report this to pgsql-bugs@postgresql.org ##
22444 ## ---------------------------------------- ##
22445 _ASBOX
22446     ) |
22447       sed "s/^/$as_me: WARNING:     /" >&2
22448     ;;
22449 esac
22450 echo "$as_me:$LINENO: checking for tcl.h" >&5
22451 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22452 if test "${ac_cv_header_tcl_h+set}" = set; then
22453   echo $ECHO_N "(cached) $ECHO_C" >&6
22454 else
22455   ac_cv_header_tcl_h=$ac_header_preproc
22456 fi
22457 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22458 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22459
22460 fi
22461 if test $ac_cv_header_tcl_h = yes; then
22462   :
22463 else
22464   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22465 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22466    { (exit 1); exit 1; }; }
22467 fi
22468
22469
22470     CPPFLAGS=$ac_save_CPPFLAGS
22471 fi
22472
22473 #
22474 # Check for DocBook and tools
22475 #
22476 for ac_prog in onsgmls nsgmls
22477 do
22478   # Extract the first word of "$ac_prog", so it can be a program name with args.
22479 set dummy $ac_prog; ac_word=$2
22480 echo "$as_me:$LINENO: checking for $ac_word" >&5
22481 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22482 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22483   echo $ECHO_N "(cached) $ECHO_C" >&6
22484 else
22485   if test -n "$NSGMLS"; then
22486   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22487 else
22488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22489 for as_dir in $PATH
22490 do
22491   IFS=$as_save_IFS
22492   test -z "$as_dir" && as_dir=.
22493   for ac_exec_ext in '' $ac_executable_extensions; do
22494   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22495     ac_cv_prog_NSGMLS="$ac_prog"
22496     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22497     break 2
22498   fi
22499 done
22500 done
22501
22502 fi
22503 fi
22504 NSGMLS=$ac_cv_prog_NSGMLS
22505 if test -n "$NSGMLS"; then
22506   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22507 echo "${ECHO_T}$NSGMLS" >&6
22508 else
22509   echo "$as_me:$LINENO: result: no" >&5
22510 echo "${ECHO_T}no" >&6
22511 fi
22512
22513   test -n "$NSGMLS" && break
22514 done
22515
22516 for ac_prog in openjade jade
22517 do
22518   # Extract the first word of "$ac_prog", so it can be a program name with args.
22519 set dummy $ac_prog; ac_word=$2
22520 echo "$as_me:$LINENO: checking for $ac_word" >&5
22521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22522 if test "${ac_cv_prog_JADE+set}" = set; then
22523   echo $ECHO_N "(cached) $ECHO_C" >&6
22524 else
22525   if test -n "$JADE"; then
22526   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22527 else
22528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22529 for as_dir in $PATH
22530 do
22531   IFS=$as_save_IFS
22532   test -z "$as_dir" && as_dir=.
22533   for ac_exec_ext in '' $ac_executable_extensions; do
22534   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22535     ac_cv_prog_JADE="$ac_prog"
22536     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22537     break 2
22538   fi
22539 done
22540 done
22541
22542 fi
22543 fi
22544 JADE=$ac_cv_prog_JADE
22545 if test -n "$JADE"; then
22546   echo "$as_me:$LINENO: result: $JADE" >&5
22547 echo "${ECHO_T}$JADE" >&6
22548 else
22549   echo "$as_me:$LINENO: result: no" >&5
22550 echo "${ECHO_T}no" >&6
22551 fi
22552
22553   test -n "$JADE" && break
22554 done
22555
22556
22557 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22558 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22559 if test "${pgac_cv_check_docbook+set}" = set; then
22560   echo $ECHO_N "(cached) $ECHO_C" >&6
22561 else
22562   cat >conftest.sgml <<EOF
22563 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22564 <book>
22565  <title>test</title>
22566  <chapter>
22567   <title>random</title>
22568    <sect1>
22569     <title>testsect</title>
22570     <para>text</para>
22571   </sect1>
22572  </chapter>
22573 </book>
22574 EOF
22575
22576 pgac_cv_check_docbook=no
22577
22578 if test -n "$NSGMLS"; then
22579   $NSGMLS -s conftest.sgml 1>&5 2>&1
22580   if test $? -eq 0; then
22581     pgac_cv_check_docbook=yes
22582   fi
22583 fi
22584 rm -f conftest.sgml
22585 fi
22586 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22587 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22588
22589 have_docbook=$pgac_cv_check_docbook
22590
22591
22592 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22593 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22594 if test "${pgac_cv_path_stylesheets+set}" = set; then
22595   echo $ECHO_N "(cached) $ECHO_C" >&6
22596 else
22597   if test -n "$DOCBOOKSTYLE"; then
22598   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22599 else
22600   for pgac_prefix in /usr /usr/local /opt; do
22601     for pgac_infix in share lib; do
22602       for pgac_postfix in \
22603         sgml/stylesheets/nwalsh-modular \
22604         sgml/stylesheets/docbook \
22605                 sgml/docbook-dsssl \
22606         sgml/docbook/dsssl/modular \
22607         sgml/docbook/stylesheet/dsssl/modular \
22608         sgml/docbook/dsssl-stylesheets
22609       do
22610         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22611         if test -r "$pgac_candidate/html/docbook.dsl" \
22612            && test -r "$pgac_candidate/print/docbook.dsl"
22613         then
22614           pgac_cv_path_stylesheets=$pgac_candidate
22615           break 3
22616         fi
22617       done
22618     done
22619   done
22620 fi
22621 fi
22622
22623 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22624
22625 if test -n "$DOCBOOKSTYLE"; then
22626   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22627 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22628 else
22629   echo "$as_me:$LINENO: result: no" >&5
22630 echo "${ECHO_T}no" >&6
22631 fi
22632 if test -n "$DOCBOOKSTYLE"; then
22633   for ac_prog in collateindex.pl
22634 do
22635   # Extract the first word of "$ac_prog", so it can be a program name with args.
22636 set dummy $ac_prog; ac_word=$2
22637 echo "$as_me:$LINENO: checking for $ac_word" >&5
22638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22639 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22640   echo $ECHO_N "(cached) $ECHO_C" >&6
22641 else
22642   case $COLLATEINDEX in
22643   [\\/]* | ?:[\\/]*)
22644   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22645   ;;
22646   *)
22647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22648 for as_dir in $DOCBOOKSTYLE/bin $PATH
22649 do
22650   IFS=$as_save_IFS
22651   test -z "$as_dir" && as_dir=.
22652   for ac_exec_ext in '' $ac_executable_extensions; do
22653   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22654     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22655     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22656     break 2
22657   fi
22658 done
22659 done
22660
22661   ;;
22662 esac
22663 fi
22664 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22665
22666 if test -n "$COLLATEINDEX"; then
22667   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22668 echo "${ECHO_T}$COLLATEINDEX" >&6
22669 else
22670   echo "$as_me:$LINENO: result: no" >&5
22671 echo "${ECHO_T}no" >&6
22672 fi
22673
22674   test -n "$COLLATEINDEX" && break
22675 done
22676
22677 else
22678   for ac_prog in collateindex.pl
22679 do
22680   # Extract the first word of "$ac_prog", so it can be a program name with args.
22681 set dummy $ac_prog; ac_word=$2
22682 echo "$as_me:$LINENO: checking for $ac_word" >&5
22683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22684 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22685   echo $ECHO_N "(cached) $ECHO_C" >&6
22686 else
22687   case $COLLATEINDEX in
22688   [\\/]* | ?:[\\/]*)
22689   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22690   ;;
22691   *)
22692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22693 for as_dir in $PATH
22694 do
22695   IFS=$as_save_IFS
22696   test -z "$as_dir" && as_dir=.
22697   for ac_exec_ext in '' $ac_executable_extensions; do
22698   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22699     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22700     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22701     break 2
22702   fi
22703 done
22704 done
22705
22706   ;;
22707 esac
22708 fi
22709 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22710
22711 if test -n "$COLLATEINDEX"; then
22712   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22713 echo "${ECHO_T}$COLLATEINDEX" >&6
22714 else
22715   echo "$as_me:$LINENO: result: no" >&5
22716 echo "${ECHO_T}no" >&6
22717 fi
22718
22719   test -n "$COLLATEINDEX" && break
22720 done
22721
22722 fi
22723 for ac_prog in sgmlspl
22724 do
22725   # Extract the first word of "$ac_prog", so it can be a program name with args.
22726 set dummy $ac_prog; ac_word=$2
22727 echo "$as_me:$LINENO: checking for $ac_word" >&5
22728 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22729 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22730   echo $ECHO_N "(cached) $ECHO_C" >&6
22731 else
22732   if test -n "$SGMLSPL"; then
22733   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22734 else
22735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22736 for as_dir in $PATH
22737 do
22738   IFS=$as_save_IFS
22739   test -z "$as_dir" && as_dir=.
22740   for ac_exec_ext in '' $ac_executable_extensions; do
22741   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22742     ac_cv_prog_SGMLSPL="$ac_prog"
22743     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22744     break 2
22745   fi
22746 done
22747 done
22748
22749 fi
22750 fi
22751 SGMLSPL=$ac_cv_prog_SGMLSPL
22752 if test -n "$SGMLSPL"; then
22753   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22754 echo "${ECHO_T}$SGMLSPL" >&6
22755 else
22756   echo "$as_me:$LINENO: result: no" >&5
22757 echo "${ECHO_T}no" >&6
22758 fi
22759
22760   test -n "$SGMLSPL" && break
22761 done
22762
22763
22764 # Thread testing
22765
22766 # We have to run the thread test near the end so we have all our symbols
22767 # defined.  Cross compiling throws a warning.
22768 #
22769 if test "$enable_thread_safety_force" = yes; then
22770 if test x"$template" != x"win32"
22771 then
22772   { echo "$as_me:$LINENO: WARNING:
22773 *** Skipping thread test program.  --enable-thread-safety-force was used.
22774 *** Run the program in src/test/thread on the your machine and add
22775 proper locking function calls to your applications to guarantee thread
22776 safety.
22777 " >&5
22778 echo "$as_me: WARNING:
22779 *** Skipping thread test program.  --enable-thread-safety-force was used.
22780 *** Run the program in src/test/thread on the your machine and add
22781 proper locking function calls to your applications to guarantee thread
22782 safety.
22783 " >&2;}
22784 else
22785 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22786 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22787 fi
22788 elif test "$enable_thread_safety" = yes; then
22789 if test x"$template" != x"win32"
22790 then
22791 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22792 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22793
22794 _CFLAGS="$CFLAGS"
22795 _LIBS="$LIBS"
22796 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22797 LIBS="$LIBS $PTHREAD_LIBS"
22798 if test "$cross_compiling" = yes; then
22799   echo "$as_me:$LINENO: result: maybe" >&5
22800 echo "${ECHO_T}maybe" >&6
22801   { echo "$as_me:$LINENO: WARNING:
22802 *** Skipping thread test program because of cross-compile build.
22803 *** Run the program in src/test/thread on the target machine.
22804 " >&5
22805 echo "$as_me: WARNING:
22806 *** Skipping thread test program because of cross-compile build.
22807 *** Run the program in src/test/thread on the target machine.
22808 " >&2;}
22809 else
22810   cat >conftest.$ac_ext <<_ACEOF
22811 /* confdefs.h.  */
22812 _ACEOF
22813 cat confdefs.h >>conftest.$ac_ext
22814 cat >>conftest.$ac_ext <<_ACEOF
22815 /* end confdefs.h.  */
22816 #include "$srcdir/src/test/thread/thread_test.c"
22817 _ACEOF
22818 rm -f conftest$ac_exeext
22819 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22820   (eval $ac_link) 2>&5
22821   ac_status=$?
22822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22823   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22825   (eval $ac_try) 2>&5
22826   ac_status=$?
22827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22828   (exit $ac_status); }; }; then
22829   echo "$as_me:$LINENO: result: yes" >&5
22830 echo "${ECHO_T}yes" >&6
22831 else
22832   echo "$as_me: program exited with status $ac_status" >&5
22833 echo "$as_me: failed program was:" >&5
22834 sed 's/^/| /' conftest.$ac_ext >&5
22835
22836 ( exit $ac_status )
22837 echo "$as_me:$LINENO: result: no" >&5
22838 echo "${ECHO_T}no" >&6
22839   { { echo "$as_me:$LINENO: error:
22840 *** Thread test program failed.  Your platform is not thread-safe.
22841 *** Check the file 'config.log'for the exact reason.
22842 ***
22843 *** You can use the configure option --enable-thread-safety-force
22844 *** to force threads to be enabled.  However, you must then run
22845 *** the program in src/test/thread and add locking function calls
22846 *** to your applications to guarantee thread safety.
22847 " >&5
22848 echo "$as_me: error:
22849 *** Thread test program failed.  Your platform is not thread-safe.
22850 *** Check the file 'config.log'for the exact reason.
22851 ***
22852 *** You can use the configure option --enable-thread-safety-force
22853 *** to force threads to be enabled.  However, you must then run
22854 *** the program in src/test/thread and add locking function calls
22855 *** to your applications to guarantee thread safety.
22856 " >&2;}
22857    { (exit 1); exit 1; }; }
22858 fi
22859 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22860 fi
22861 CFLAGS="$_CFLAGS"
22862 LIBS="$_LIBS"
22863 else
22864 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22865 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22866 fi
22867 fi
22868
22869 # prepare build tree if outside source tree
22870 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22871 # Note 2: /bin/pwd might be better than shell's built-in at getting
22872 #         a symlink-free name.
22873 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22874   vpath_build=no
22875 else
22876   vpath_build=yes
22877   if test "$no_create" != yes; then
22878     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22879     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22880     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22881       || { { echo "$as_me:$LINENO: error: failed" >&5
22882 echo "$as_me: error: failed" >&2;}
22883    { (exit 1); exit 1; }; }
22884     echo "$as_me:$LINENO: result: done" >&5
22885 echo "${ECHO_T}done" >&6
22886   fi
22887 fi
22888
22889
22890
22891                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22892
22893
22894                                                             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}"
22895
22896
22897 if test "$PORTNAME" = "win32"; then
22898           ac_config_commands="$ac_config_commands check_win32_symlinks"
22899
22900 fi
22901
22902           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22903
22904
22905 #
22906 # Warn about unknown options
22907 #
22908
22909
22910   for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do
22911      case $var in
22912        with_template) ;;
22913 with_docdir) ;;
22914 with_includes) ;;
22915 with_libraries) ;;
22916 with_libs) ;;
22917 enable_integer_datetimes) ;;
22918 enable_nls) ;;
22919 with_pgport) ;;
22920 enable_shared) ;;
22921 enable_rpath) ;;
22922 enable_spinlocks) ;;
22923 enable_debug) ;;
22924 enable_dtrace) ;;
22925 with_CC) ;;
22926 enable_depend) ;;
22927 enable_cassert) ;;
22928 enable_thread_safety) ;;
22929 enable_thread_safety_force) ;;
22930 with_tcl) ;;
22931 with_tclconfig) ;;
22932 with_perl) ;;
22933 with_python) ;;
22934 with_krb5) ;;
22935 with_krb_srvnam) ;;
22936 with_pam) ;;
22937 with_ldap) ;;
22938 with_bonjour) ;;
22939 with_openssl) ;;
22940 with_libedit_preferred) ;;
22941 with_readline) ;;
22942 with_zlib) ;;
22943
22944        with_gnu_ld) ;;
22945      *)
22946        echo -n "*** Option ignored: "
22947        echo $var | sed -e 's/\(^=*\)/--\1/;s/_/-/g'
22948        ;;
22949      esac
22950   done
22951
22952
22953 cat >confcache <<\_ACEOF
22954 # This file is a shell script that caches the results of configure
22955 # tests run on this system so they can be shared between configure
22956 # scripts and configure runs, see configure's option --config-cache.
22957 # It is not useful on other systems.  If it contains results you don't
22958 # want to keep, you may remove or edit it.
22959 #
22960 # config.status only pays attention to the cache file if you give it
22961 # the --recheck option to rerun configure.
22962 #
22963 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22964 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22965 # following values.
22966
22967 _ACEOF
22968
22969 # The following way of writing the cache mishandles newlines in values,
22970 # but we know of no workaround that is simple, portable, and efficient.
22971 # So, don't put newlines in cache variables' values.
22972 # Ultrix sh set writes to stderr and can't be redirected directly,
22973 # and sets the high bit in the cache file unless we assign to the vars.
22974 {
22975   (set) 2>&1 |
22976     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22977     *ac_space=\ *)
22978       # `set' does not quote correctly, so add quotes (double-quote
22979       # substitution turns \\\\ into \\, and sed turns \\ into \).
22980       sed -n \
22981         "s/'/'\\\\''/g;
22982           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22983       ;;
22984     *)
22985       # `set' quotes correctly as required by POSIX, so do not add quotes.
22986       sed -n \
22987         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22988       ;;
22989     esac;
22990 } |
22991   sed '
22992      t clear
22993      : clear
22994      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22995      t end
22996      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22997      : end' >>confcache
22998 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22999   if test -w $cache_file; then
23000     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23001     cat confcache >$cache_file
23002   else
23003     echo "not updating unwritable cache $cache_file"
23004   fi
23005 fi
23006 rm -f confcache
23007
23008 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23009 # Let make expand exec_prefix.
23010 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23011
23012 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23013 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23014 # trailing colons and then remove the whole line if VPATH becomes empty
23015 # (actually we leave an empty line to preserve line numbers).
23016 if test "x$srcdir" = x.; then
23017   ac_vpsub='/^[  ]*VPATH[        ]*=/{
23018 s/:*\$(srcdir):*/:/;
23019 s/:*\${srcdir}:*/:/;
23020 s/:*@srcdir@:*/:/;
23021 s/^\([^=]*=[     ]*\):*/\1/;
23022 s/:*$//;
23023 s/^[^=]*=[       ]*$//;
23024 }'
23025 fi
23026
23027 DEFS=-DHAVE_CONFIG_H
23028
23029 ac_libobjs=
23030 ac_ltlibobjs=
23031 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23032   # 1. Remove the extension, and $U if already installed.
23033   ac_i=`echo "$ac_i" |
23034          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
23035   # 2. Add them.
23036   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23037   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23038 done
23039 LIBOBJS=$ac_libobjs
23040
23041 LTLIBOBJS=$ac_ltlibobjs
23042
23043
23044
23045 : ${CONFIG_STATUS=./config.status}
23046 ac_clean_files_save=$ac_clean_files
23047 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23048 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23049 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23050 cat >$CONFIG_STATUS <<_ACEOF
23051 #! $SHELL
23052 # Generated by $as_me.
23053 # Run this file to recreate the current configuration.
23054 # Compiler output produced by configure, useful for debugging
23055 # configure, is in config.log if it exists.
23056
23057 debug=false
23058 ac_cs_recheck=false
23059 ac_cs_silent=false
23060 SHELL=\${CONFIG_SHELL-$SHELL}
23061 _ACEOF
23062
23063 cat >>$CONFIG_STATUS <<\_ACEOF
23064 ## --------------------- ##
23065 ## M4sh Initialization.  ##
23066 ## --------------------- ##
23067
23068 # Be Bourne compatible
23069 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23070   emulate sh
23071   NULLCMD=:
23072   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23073   # is contrary to our usage.  Disable this feature.
23074   alias -g '${1+"$@"}'='"$@"'
23075 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23076   set -o posix
23077 fi
23078 DUALCASE=1; export DUALCASE # for MKS sh
23079
23080 # Support unset when possible.
23081 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23082   as_unset=unset
23083 else
23084   as_unset=false
23085 fi
23086
23087
23088 # Work around bugs in pre-3.0 UWIN ksh.
23089 $as_unset ENV MAIL MAILPATH
23090 PS1='$ '
23091 PS2='> '
23092 PS4='+ '
23093
23094 # NLS nuisances.
23095 for as_var in \
23096   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23097   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23098   LC_TELEPHONE LC_TIME
23099 do
23100   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23101     eval $as_var=C; export $as_var
23102   else
23103     $as_unset $as_var
23104   fi
23105 done
23106
23107 # Required to use basename.
23108 if expr a : '\(a\)' >/dev/null 2>&1; then
23109   as_expr=expr
23110 else
23111   as_expr=false
23112 fi
23113
23114 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23115   as_basename=basename
23116 else
23117   as_basename=false
23118 fi
23119
23120
23121 # Name of the executable.
23122 as_me=`$as_basename "$0" ||
23123 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23124          X"$0" : 'X\(//\)$' \| \
23125          X"$0" : 'X\(/\)$' \| \
23126          .     : '\(.\)' 2>/dev/null ||
23127 echo X/"$0" |
23128     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23129           /^X\/\(\/\/\)$/{ s//\1/; q; }
23130           /^X\/\(\/\).*/{ s//\1/; q; }
23131           s/.*/./; q'`
23132
23133
23134 # PATH needs CR, and LINENO needs CR and PATH.
23135 # Avoid depending upon Character Ranges.
23136 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23137 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23138 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23139 as_cr_digits='0123456789'
23140 as_cr_alnum=$as_cr_Letters$as_cr_digits
23141
23142 # The user is always right.
23143 if test "${PATH_SEPARATOR+set}" != set; then
23144   echo "#! /bin/sh" >conf$$.sh
23145   echo  "exit 0"   >>conf$$.sh
23146   chmod +x conf$$.sh
23147   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23148     PATH_SEPARATOR=';'
23149   else
23150     PATH_SEPARATOR=:
23151   fi
23152   rm -f conf$$.sh
23153 fi
23154
23155
23156   as_lineno_1=$LINENO
23157   as_lineno_2=$LINENO
23158   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23159   test "x$as_lineno_1" != "x$as_lineno_2" &&
23160   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
23161   # Find who we are.  Look in the path if we contain no path at all
23162   # relative or not.
23163   case $0 in
23164     *[\\/]* ) as_myself=$0 ;;
23165     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23166 for as_dir in $PATH
23167 do
23168   IFS=$as_save_IFS
23169   test -z "$as_dir" && as_dir=.
23170   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23171 done
23172
23173        ;;
23174   esac
23175   # We did not find ourselves, most probably we were run as `sh COMMAND'
23176   # in which case we are not to be found in the path.
23177   if test "x$as_myself" = x; then
23178     as_myself=$0
23179   fi
23180   if test ! -f "$as_myself"; then
23181     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23182 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23183    { (exit 1); exit 1; }; }
23184   fi
23185   case $CONFIG_SHELL in
23186   '')
23187     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23189 do
23190   IFS=$as_save_IFS
23191   test -z "$as_dir" && as_dir=.
23192   for as_base in sh bash ksh sh5; do
23193          case $as_dir in
23194          /*)
23195            if ("$as_dir/$as_base" -c '
23196   as_lineno_1=$LINENO
23197   as_lineno_2=$LINENO
23198   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23199   test "x$as_lineno_1" != "x$as_lineno_2" &&
23200   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
23201              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23202              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23203              CONFIG_SHELL=$as_dir/$as_base
23204              export CONFIG_SHELL
23205              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23206            fi;;
23207          esac
23208        done
23209 done
23210 ;;
23211   esac
23212
23213   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23214   # uniformly replaced by the line number.  The first 'sed' inserts a
23215   # line-number line before each line; the second 'sed' does the real
23216   # work.  The second script uses 'N' to pair each line-number line
23217   # with the numbered line, and appends trailing '-' during
23218   # substitution so that $LINENO is not a special case at line end.
23219   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23220   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23221   sed '=' <$as_myself |
23222     sed '
23223       N
23224       s,$,-,
23225       : loop
23226       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23227       t loop
23228       s,-$,,
23229       s,^['$as_cr_digits']*\n,,
23230     ' >$as_me.lineno &&
23231   chmod +x $as_me.lineno ||
23232     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23233 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23234    { (exit 1); exit 1; }; }
23235
23236   # Don't try to exec as it changes $[0], causing all sort of problems
23237   # (the dirname of $[0] is not the place where we might find the
23238   # original and so on.  Autoconf is especially sensible to this).
23239   . ./$as_me.lineno
23240   # Exit status is that of the last command.
23241   exit
23242 }
23243
23244
23245 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23246   *c*,-n*) ECHO_N= ECHO_C='
23247 ' ECHO_T='      ' ;;
23248   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23249   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23250 esac
23251
23252 if expr a : '\(a\)' >/dev/null 2>&1; then
23253   as_expr=expr
23254 else
23255   as_expr=false
23256 fi
23257
23258 rm -f conf$$ conf$$.exe conf$$.file
23259 echo >conf$$.file
23260 if ln -s conf$$.file conf$$ 2>/dev/null; then
23261   # We could just check for DJGPP; but this test a) works b) is more generic
23262   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23263   if test -f conf$$.exe; then
23264     # Don't use ln at all; we don't have any links
23265     as_ln_s='cp -p'
23266   else
23267     as_ln_s='ln -s'
23268   fi
23269 elif ln conf$$.file conf$$ 2>/dev/null; then
23270   as_ln_s=ln
23271 else
23272   as_ln_s='cp -p'
23273 fi
23274 rm -f conf$$ conf$$.exe conf$$.file
23275
23276 if mkdir -p . 2>/dev/null; then
23277   as_mkdir_p=:
23278 else
23279   test -d ./-p && rmdir ./-p
23280   as_mkdir_p=false
23281 fi
23282
23283 as_executable_p="test -f"
23284
23285 # Sed expression to map a string onto a valid CPP name.
23286 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23287
23288 # Sed expression to map a string onto a valid variable name.
23289 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23290
23291
23292 # IFS
23293 # We need space, tab and new line, in precisely that order.
23294 as_nl='
23295 '
23296 IFS="   $as_nl"
23297
23298 # CDPATH.
23299 $as_unset CDPATH
23300
23301 exec 6>&1
23302
23303 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23304 # report actual input values of CONFIG_FILES etc. instead of their
23305 # values after options handling.  Logging --version etc. is OK.
23306 exec 5>>config.log
23307 {
23308   echo
23309   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23310 ## Running $as_me. ##
23311 _ASBOX
23312 } >&5
23313 cat >&5 <<_CSEOF
23314
23315 This file was extended by PostgreSQL $as_me 8.2devel, which was
23316 generated by GNU Autoconf 2.59.  Invocation command line was
23317
23318   CONFIG_FILES    = $CONFIG_FILES
23319   CONFIG_HEADERS  = $CONFIG_HEADERS
23320   CONFIG_LINKS    = $CONFIG_LINKS
23321   CONFIG_COMMANDS = $CONFIG_COMMANDS
23322   $ $0 $@
23323
23324 _CSEOF
23325 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23326 echo >&5
23327 _ACEOF
23328
23329 # Files that config.status was made for.
23330 if test -n "$ac_config_files"; then
23331   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23332 fi
23333
23334 if test -n "$ac_config_headers"; then
23335   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23336 fi
23337
23338 if test -n "$ac_config_links"; then
23339   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23340 fi
23341
23342 if test -n "$ac_config_commands"; then
23343   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23344 fi
23345
23346 cat >>$CONFIG_STATUS <<\_ACEOF
23347
23348 ac_cs_usage="\
23349 \`$as_me' instantiates files from templates according to the
23350 current configuration.
23351
23352 Usage: $0 [OPTIONS] [FILE]...
23353
23354   -h, --help       print this help, then exit
23355   -V, --version    print version number, then exit
23356   -q, --quiet      do not print progress messages
23357   -d, --debug      don't remove temporary files
23358       --recheck    update $as_me by reconfiguring in the same conditions
23359   --file=FILE[:TEMPLATE]
23360                    instantiate the configuration file FILE
23361   --header=FILE[:TEMPLATE]
23362                    instantiate the configuration header FILE
23363
23364 Configuration files:
23365 $config_files
23366
23367 Configuration headers:
23368 $config_headers
23369
23370 Configuration links:
23371 $config_links
23372
23373 Configuration commands:
23374 $config_commands
23375
23376 Report bugs to <bug-autoconf@gnu.org>."
23377 _ACEOF
23378
23379 cat >>$CONFIG_STATUS <<_ACEOF
23380 ac_cs_version="\\
23381 PostgreSQL config.status 8.2devel
23382 configured by $0, generated by GNU Autoconf 2.59,
23383   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23384
23385 Copyright (C) 2003 Free Software Foundation, Inc.
23386 This config.status script is free software; the Free Software Foundation
23387 gives unlimited permission to copy, distribute and modify it."
23388 srcdir=$srcdir
23389 _ACEOF
23390
23391 cat >>$CONFIG_STATUS <<\_ACEOF
23392 # If no file are specified by the user, then we need to provide default
23393 # value.  By we need to know if files were specified by the user.
23394 ac_need_defaults=:
23395 while test $# != 0
23396 do
23397   case $1 in
23398   --*=*)
23399     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23400     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23401     ac_shift=:
23402     ;;
23403   -*)
23404     ac_option=$1
23405     ac_optarg=$2
23406     ac_shift=shift
23407     ;;
23408   *) # This is not an option, so the user has probably given explicit
23409      # arguments.
23410      ac_option=$1
23411      ac_need_defaults=false;;
23412   esac
23413
23414   case $ac_option in
23415   # Handling of the options.
23416 _ACEOF
23417 cat >>$CONFIG_STATUS <<\_ACEOF
23418   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23419     ac_cs_recheck=: ;;
23420   --version | --vers* | -V )
23421     echo "$ac_cs_version"; exit 0 ;;
23422   --he | --h)
23423     # Conflict between --help and --header
23424     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23425 Try \`$0 --help' for more information." >&5
23426 echo "$as_me: error: ambiguous option: $1
23427 Try \`$0 --help' for more information." >&2;}
23428    { (exit 1); exit 1; }; };;
23429   --help | --hel | -h )
23430     echo "$ac_cs_usage"; exit 0 ;;
23431   --debug | --d* | -d )
23432     debug=: ;;
23433   --file | --fil | --fi | --f )
23434     $ac_shift
23435     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23436     ac_need_defaults=false;;
23437   --header | --heade | --head | --hea )
23438     $ac_shift
23439     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23440     ac_need_defaults=false;;
23441   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23442   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23443     ac_cs_silent=: ;;
23444
23445   # This is an error.
23446   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23447 Try \`$0 --help' for more information." >&5
23448 echo "$as_me: error: unrecognized option: $1
23449 Try \`$0 --help' for more information." >&2;}
23450    { (exit 1); exit 1; }; } ;;
23451
23452   *) ac_config_targets="$ac_config_targets $1" ;;
23453
23454   esac
23455   shift
23456 done
23457
23458 ac_configure_extra_args=
23459
23460 if $ac_cs_silent; then
23461   exec 6>/dev/null
23462   ac_configure_extra_args="$ac_configure_extra_args --silent"
23463 fi
23464
23465 _ACEOF
23466 cat >>$CONFIG_STATUS <<_ACEOF
23467 if \$ac_cs_recheck; then
23468   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23469   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23470 fi
23471
23472 _ACEOF
23473
23474
23475
23476
23477
23478 cat >>$CONFIG_STATUS <<\_ACEOF
23479 for ac_config_target in $ac_config_targets
23480 do
23481   case "$ac_config_target" in
23482   # Handling of arguments.
23483   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23484   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23485   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23486   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23487   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23488   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23489   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23490   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23491   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23492   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23493   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23494   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23495 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23496    { (exit 1); exit 1; }; };;
23497   esac
23498 done
23499
23500 # If the user did not use the arguments to specify the items to instantiate,
23501 # then the envvar interface is used.  Set only those that are not.
23502 # We use the long form for the default assignment because of an extremely
23503 # bizarre bug on SunOS 4.1.3.
23504 if $ac_need_defaults; then
23505   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23506   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23507   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23508   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23509 fi
23510
23511 # Have a temporary directory for convenience.  Make it in the build tree
23512 # simply because there is no reason to put it here, and in addition,
23513 # creating and moving files from /tmp can sometimes cause problems.
23514 # Create a temporary directory, and hook for its removal unless debugging.
23515 $debug ||
23516 {
23517   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23518   trap '{ (exit 1); exit 1; }' 1 2 13 15
23519 }
23520
23521 # Create a (secure) tmp directory for tmp files.
23522
23523 {
23524   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23525   test -n "$tmp" && test -d "$tmp"
23526 }  ||
23527 {
23528   tmp=./confstat$$-$RANDOM
23529   (umask 077 && mkdir $tmp)
23530 } ||
23531 {
23532    echo "$me: cannot create a temporary directory in ." >&2
23533    { (exit 1); exit 1; }
23534 }
23535
23536 _ACEOF
23537
23538 cat >>$CONFIG_STATUS <<_ACEOF
23539
23540 #
23541 # CONFIG_FILES section.
23542 #
23543
23544 # No need to generate the scripts if there are no CONFIG_FILES.
23545 # This happens for instance when ./config.status config.h
23546 if test -n "\$CONFIG_FILES"; then
23547   # Protect against being on the right side of a sed subst in config.status.
23548   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23549    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23550 s,@SHELL@,$SHELL,;t t
23551 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23552 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23553 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23554 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23555 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23556 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23557 s,@exec_prefix@,$exec_prefix,;t t
23558 s,@prefix@,$prefix,;t t
23559 s,@program_transform_name@,$program_transform_name,;t t
23560 s,@bindir@,$bindir,;t t
23561 s,@sbindir@,$sbindir,;t t
23562 s,@libexecdir@,$libexecdir,;t t
23563 s,@datadir@,$datadir,;t t
23564 s,@sysconfdir@,$sysconfdir,;t t
23565 s,@sharedstatedir@,$sharedstatedir,;t t
23566 s,@localstatedir@,$localstatedir,;t t
23567 s,@libdir@,$libdir,;t t
23568 s,@includedir@,$includedir,;t t
23569 s,@oldincludedir@,$oldincludedir,;t t
23570 s,@infodir@,$infodir,;t t
23571 s,@mandir@,$mandir,;t t
23572 s,@build_alias@,$build_alias,;t t
23573 s,@host_alias@,$host_alias,;t t
23574 s,@target_alias@,$target_alias,;t t
23575 s,@DEFS@,$DEFS,;t t
23576 s,@ECHO_C@,$ECHO_C,;t t
23577 s,@ECHO_N@,$ECHO_N,;t t
23578 s,@ECHO_T@,$ECHO_T,;t t
23579 s,@LIBS@,$LIBS,;t t
23580 s,@configure_args@,$configure_args,;t t
23581 s,@build@,$build,;t t
23582 s,@build_cpu@,$build_cpu,;t t
23583 s,@build_vendor@,$build_vendor,;t t
23584 s,@build_os@,$build_os,;t t
23585 s,@host@,$host,;t t
23586 s,@host_cpu@,$host_cpu,;t t
23587 s,@host_vendor@,$host_vendor,;t t
23588 s,@host_os@,$host_os,;t t
23589 s,@PORTNAME@,$PORTNAME,;t t
23590 s,@docdir@,$docdir,;t t
23591 s,@enable_nls@,$enable_nls,;t t
23592 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23593 s,@default_port@,$default_port,;t t
23594 s,@enable_shared@,$enable_shared,;t t
23595 s,@enable_rpath@,$enable_rpath,;t t
23596 s,@enable_debug@,$enable_debug,;t t
23597 s,@DTRACE@,$DTRACE,;t t
23598 s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
23599 s,@enable_dtrace@,$enable_dtrace,;t t
23600 s,@CC@,$CC,;t t
23601 s,@CFLAGS@,$CFLAGS,;t t
23602 s,@LDFLAGS@,$LDFLAGS,;t t
23603 s,@CPPFLAGS@,$CPPFLAGS,;t t
23604 s,@ac_ct_CC@,$ac_ct_CC,;t t
23605 s,@EXEEXT@,$EXEEXT,;t t
23606 s,@OBJEXT@,$OBJEXT,;t t
23607 s,@CPP@,$CPP,;t t
23608 s,@GCC@,$GCC,;t t
23609 s,@TAS@,$TAS,;t t
23610 s,@autodepend@,$autodepend,;t t
23611 s,@INCLUDES@,$INCLUDES,;t t
23612 s,@enable_thread_safety@,$enable_thread_safety,;t t
23613 s,@with_tcl@,$with_tcl,;t t
23614 s,@with_perl@,$with_perl,;t t
23615 s,@with_python@,$with_python,;t t
23616 s,@with_krb5@,$with_krb5,;t t
23617 s,@krb_srvtab@,$krb_srvtab,;t t
23618 s,@with_pam@,$with_pam,;t t
23619 s,@with_ldap@,$with_ldap,;t t
23620 s,@with_bonjour@,$with_bonjour,;t t
23621 s,@with_openssl@,$with_openssl,;t t
23622 s,@with_zlib@,$with_zlib,;t t
23623 s,@EGREP@,$EGREP,;t t
23624 s,@ELF_SYS@,$ELF_SYS,;t t
23625 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23626 s,@AWK@,$AWK,;t t
23627 s,@FLEX@,$FLEX,;t t
23628 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23629 s,@LN_S@,$LN_S,;t t
23630 s,@LD@,$LD,;t t
23631 s,@with_gnu_ld@,$with_gnu_ld,;t t
23632 s,@ld_R_works@,$ld_R_works,;t t
23633 s,@RANLIB@,$RANLIB,;t t
23634 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23635 s,@TAR@,$TAR,;t t
23636 s,@STRIP@,$STRIP,;t t
23637 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23638 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23639 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23640 s,@YACC@,$YACC,;t t
23641 s,@YFLAGS@,$YFLAGS,;t t
23642 s,@PERL@,$PERL,;t t
23643 s,@perl_archlibexp@,$perl_archlibexp,;t t
23644 s,@perl_privlibexp@,$perl_privlibexp,;t t
23645 s,@perl_useshrplib@,$perl_useshrplib,;t t
23646 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23647 s,@PYTHON@,$PYTHON,;t t
23648 s,@python_version@,$python_version,;t t
23649 s,@python_configdir@,$python_configdir,;t t
23650 s,@python_includespec@,$python_includespec,;t t
23651 s,@python_libdir@,$python_libdir,;t t
23652 s,@python_libspec@,$python_libspec,;t t
23653 s,@python_additional_libs@,$python_additional_libs,;t t
23654 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23655 s,@LIBOBJS@,$LIBOBJS,;t t
23656 s,@acx_pthread_config@,$acx_pthread_config,;t t
23657 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23658 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23659 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23660 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23661 s,@MSGFMT@,$MSGFMT,;t t
23662 s,@MSGMERGE@,$MSGMERGE,;t t
23663 s,@XGETTEXT@,$XGETTEXT,;t t
23664 s,@localedir@,$localedir,;t t
23665 s,@TCLSH@,$TCLSH,;t t
23666 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23667 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23668 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23669 s,@TCL_LIBS@,$TCL_LIBS,;t t
23670 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23671 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23672 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23673 s,@NSGMLS@,$NSGMLS,;t t
23674 s,@JADE@,$JADE,;t t
23675 s,@have_docbook@,$have_docbook,;t t
23676 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23677 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23678 s,@SGMLSPL@,$SGMLSPL,;t t
23679 s,@vpath_build@,$vpath_build,;t t
23680 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23681 CEOF
23682
23683 _ACEOF
23684
23685   cat >>$CONFIG_STATUS <<\_ACEOF
23686   # Split the substitutions into bite-sized pieces for seds with
23687   # small command number limits, like on Digital OSF/1 and HP-UX.
23688   ac_max_sed_lines=48
23689   ac_sed_frag=1 # Number of current file.
23690   ac_beg=1 # First line for current file.
23691   ac_end=$ac_max_sed_lines # Line after last line for current file.
23692   ac_more_lines=:
23693   ac_sed_cmds=
23694   while $ac_more_lines; do
23695     if test $ac_beg -gt 1; then
23696       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23697     else
23698       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23699     fi
23700     if test ! -s $tmp/subs.frag; then
23701       ac_more_lines=false
23702     else
23703       # The purpose of the label and of the branching condition is to
23704       # speed up the sed processing (if there are no `@' at all, there
23705       # is no need to browse any of the substitutions).
23706       # These are the two extra sed commands mentioned above.
23707       (echo ':t
23708   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23709       if test -z "$ac_sed_cmds"; then
23710         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23711       else
23712         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23713       fi
23714       ac_sed_frag=`expr $ac_sed_frag + 1`
23715       ac_beg=$ac_end
23716       ac_end=`expr $ac_end + $ac_max_sed_lines`
23717     fi
23718   done
23719   if test -z "$ac_sed_cmds"; then
23720     ac_sed_cmds=cat
23721   fi
23722 fi # test -n "$CONFIG_FILES"
23723
23724 _ACEOF
23725 cat >>$CONFIG_STATUS <<\_ACEOF
23726 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23727   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23728   case $ac_file in
23729   - | *:- | *:-:* ) # input from stdin
23730         cat >$tmp/stdin
23731         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23732         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23733   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23734         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23735   * )   ac_file_in=$ac_file.in ;;
23736   esac
23737
23738   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23739   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23740 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23741          X"$ac_file" : 'X\(//\)[^/]' \| \
23742          X"$ac_file" : 'X\(//\)$' \| \
23743          X"$ac_file" : 'X\(/\)' \| \
23744          .     : '\(.\)' 2>/dev/null ||
23745 echo X"$ac_file" |
23746     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23747           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23748           /^X\(\/\/\)$/{ s//\1/; q; }
23749           /^X\(\/\).*/{ s//\1/; q; }
23750           s/.*/./; q'`
23751   { if $as_mkdir_p; then
23752     mkdir -p "$ac_dir"
23753   else
23754     as_dir="$ac_dir"
23755     as_dirs=
23756     while test ! -d "$as_dir"; do
23757       as_dirs="$as_dir $as_dirs"
23758       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23759 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23760          X"$as_dir" : 'X\(//\)[^/]' \| \
23761          X"$as_dir" : 'X\(//\)$' \| \
23762          X"$as_dir" : 'X\(/\)' \| \
23763          .     : '\(.\)' 2>/dev/null ||
23764 echo X"$as_dir" |
23765     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23766           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23767           /^X\(\/\/\)$/{ s//\1/; q; }
23768           /^X\(\/\).*/{ s//\1/; q; }
23769           s/.*/./; q'`
23770     done
23771     test ! -n "$as_dirs" || mkdir $as_dirs
23772   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23773 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23774    { (exit 1); exit 1; }; }; }
23775
23776   ac_builddir=.
23777
23778 if test "$ac_dir" != .; then
23779   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23780   # A "../" for each directory in $ac_dir_suffix.
23781   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23782 else
23783   ac_dir_suffix= ac_top_builddir=
23784 fi
23785
23786 case $srcdir in
23787   .)  # No --srcdir option.  We are building in place.
23788     ac_srcdir=.
23789     if test -z "$ac_top_builddir"; then
23790        ac_top_srcdir=.
23791     else
23792        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23793     fi ;;
23794   [\\/]* | ?:[\\/]* )  # Absolute path.
23795     ac_srcdir=$srcdir$ac_dir_suffix;
23796     ac_top_srcdir=$srcdir ;;
23797   *) # Relative path.
23798     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23799     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23800 esac
23801
23802 # Do not use `cd foo && pwd` to compute absolute paths, because
23803 # the directories may not exist.
23804 case `pwd` in
23805 .) ac_abs_builddir="$ac_dir";;
23806 *)
23807   case "$ac_dir" in
23808   .) ac_abs_builddir=`pwd`;;
23809   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23810   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23811   esac;;
23812 esac
23813 case $ac_abs_builddir in
23814 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23815 *)
23816   case ${ac_top_builddir}. in
23817   .) ac_abs_top_builddir=$ac_abs_builddir;;
23818   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23819   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23820   esac;;
23821 esac
23822 case $ac_abs_builddir in
23823 .) ac_abs_srcdir=$ac_srcdir;;
23824 *)
23825   case $ac_srcdir in
23826   .) ac_abs_srcdir=$ac_abs_builddir;;
23827   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23828   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23829   esac;;
23830 esac
23831 case $ac_abs_builddir in
23832 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23833 *)
23834   case $ac_top_srcdir in
23835   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23836   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23837   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23838   esac;;
23839 esac
23840
23841
23842
23843   if test x"$ac_file" != x-; then
23844     { echo "$as_me:$LINENO: creating $ac_file" >&5
23845 echo "$as_me: creating $ac_file" >&6;}
23846     rm -f "$ac_file"
23847   fi
23848   # Let's still pretend it is `configure' which instantiates (i.e., don't
23849   # use $as_me), people would be surprised to read:
23850   #    /* config.h.  Generated by config.status.  */
23851   if test x"$ac_file" = x-; then
23852     configure_input=
23853   else
23854     configure_input="$ac_file.  "
23855   fi
23856   configure_input=$configure_input"Generated from `echo $ac_file_in |
23857                                      sed 's,.*/,,'` by configure."
23858
23859   # First look for the input files in the build tree, otherwise in the
23860   # src tree.
23861   ac_file_inputs=`IFS=:
23862     for f in $ac_file_in; do
23863       case $f in
23864       -) echo $tmp/stdin ;;
23865       [\\/$]*)
23866          # Absolute (can't be DOS-style, as IFS=:)
23867          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23868 echo "$as_me: error: cannot find input file: $f" >&2;}
23869    { (exit 1); exit 1; }; }
23870          echo "$f";;
23871       *) # Relative
23872          if test -f "$f"; then
23873            # Build tree
23874            echo "$f"
23875          elif test -f "$srcdir/$f"; then
23876            # Source tree
23877            echo "$srcdir/$f"
23878          else
23879            # /dev/null tree
23880            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23881 echo "$as_me: error: cannot find input file: $f" >&2;}
23882    { (exit 1); exit 1; }; }
23883          fi;;
23884       esac
23885     done` || { (exit 1); exit 1; }
23886 _ACEOF
23887 cat >>$CONFIG_STATUS <<_ACEOF
23888   sed "$ac_vpsub
23889 $extrasub
23890 _ACEOF
23891 cat >>$CONFIG_STATUS <<\_ACEOF
23892 :t
23893 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23894 s,@configure_input@,$configure_input,;t t
23895 s,@srcdir@,$ac_srcdir,;t t
23896 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23897 s,@top_srcdir@,$ac_top_srcdir,;t t
23898 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23899 s,@builddir@,$ac_builddir,;t t
23900 s,@abs_builddir@,$ac_abs_builddir,;t t
23901 s,@top_builddir@,$ac_top_builddir,;t t
23902 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23903 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23904   rm -f $tmp/stdin
23905   if test x"$ac_file" != x-; then
23906     mv $tmp/out $ac_file
23907   else
23908     cat $tmp/out
23909     rm -f $tmp/out
23910   fi
23911
23912 done
23913 _ACEOF
23914 cat >>$CONFIG_STATUS <<\_ACEOF
23915
23916 #
23917 # CONFIG_HEADER section.
23918 #
23919
23920 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23921 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23922 #
23923 # ac_d sets the value in "#define NAME VALUE" lines.
23924 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23925 ac_dB='[         ].*$,\1#\2'
23926 ac_dC=' '
23927 ac_dD=',;t'
23928 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23929 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23930 ac_uB='$,\1#\2define\3'
23931 ac_uC=' '
23932 ac_uD=',;t'
23933
23934 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23935   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23936   case $ac_file in
23937   - | *:- | *:-:* ) # input from stdin
23938         cat >$tmp/stdin
23939         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23940         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23941   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23942         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23943   * )   ac_file_in=$ac_file.in ;;
23944   esac
23945
23946   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23947 echo "$as_me: creating $ac_file" >&6;}
23948
23949   # First look for the input files in the build tree, otherwise in the
23950   # src tree.
23951   ac_file_inputs=`IFS=:
23952     for f in $ac_file_in; do
23953       case $f in
23954       -) echo $tmp/stdin ;;
23955       [\\/$]*)
23956          # Absolute (can't be DOS-style, as IFS=:)
23957          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23958 echo "$as_me: error: cannot find input file: $f" >&2;}
23959    { (exit 1); exit 1; }; }
23960          # Do quote $f, to prevent DOS paths from being IFS'd.
23961          echo "$f";;
23962       *) # Relative
23963          if test -f "$f"; then
23964            # Build tree
23965            echo "$f"
23966          elif test -f "$srcdir/$f"; then
23967            # Source tree
23968            echo "$srcdir/$f"
23969          else
23970            # /dev/null tree
23971            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23972 echo "$as_me: error: cannot find input file: $f" >&2;}
23973    { (exit 1); exit 1; }; }
23974          fi;;
23975       esac
23976     done` || { (exit 1); exit 1; }
23977   # Remove the trailing spaces.
23978   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23979
23980 _ACEOF
23981
23982 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23983 # `conftest.undefs', that substitutes the proper values into
23984 # config.h.in to produce config.h.  The first handles `#define'
23985 # templates, and the second `#undef' templates.
23986 # And first: Protect against being on the right side of a sed subst in
23987 # config.status.  Protect against being in an unquoted here document
23988 # in config.status.
23989 rm -f conftest.defines conftest.undefs
23990 # Using a here document instead of a string reduces the quoting nightmare.
23991 # Putting comments in sed scripts is not portable.
23992 #
23993 # `end' is used to avoid that the second main sed command (meant for
23994 # 0-ary CPP macros) applies to n-ary macro definitions.
23995 # See the Autoconf documentation for `clear'.
23996 cat >confdef2sed.sed <<\_ACEOF
23997 s/[\\&,]/\\&/g
23998 s,[\\$`],\\&,g
23999 t clear
24000 : clear
24001 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
24002 t end
24003 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
24004 : end
24005 _ACEOF
24006 # If some macros were called several times there might be several times
24007 # the same #defines, which is useless.  Nevertheless, we may not want to
24008 # sort them, since we want the *last* AC-DEFINE to be honored.
24009 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24010 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24011 rm -f confdef2sed.sed
24012
24013 # This sed command replaces #undef with comments.  This is necessary, for
24014 # example, in the case of _POSIX_SOURCE, which is predefined and required
24015 # on some systems where configure will not decide to define it.
24016 cat >>conftest.undefs <<\_ACEOF
24017 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
24018 _ACEOF
24019
24020 # Break up conftest.defines because some shells have a limit on the size
24021 # of here documents, and old seds have small limits too (100 cmds).
24022 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
24023 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
24024 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24025 echo '  :' >>$CONFIG_STATUS
24026 rm -f conftest.tail
24027 while grep . conftest.defines >/dev/null
24028 do
24029   # Write a limited-size here document to $tmp/defines.sed.
24030   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24031   # Speed up: don't consider the non `#define' lines.
24032   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
24033   # Work around the forget-to-reset-the-flag bug.
24034   echo 't clr' >>$CONFIG_STATUS
24035   echo ': clr' >>$CONFIG_STATUS
24036   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24037   echo 'CEOF
24038   sed -f $tmp/defines.sed $tmp/in >$tmp/out
24039   rm -f $tmp/in
24040   mv $tmp/out $tmp/in
24041 ' >>$CONFIG_STATUS
24042   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24043   rm -f conftest.defines
24044   mv conftest.tail conftest.defines
24045 done
24046 rm -f conftest.defines
24047 echo '  fi # grep' >>$CONFIG_STATUS
24048 echo >>$CONFIG_STATUS
24049
24050 # Break up conftest.undefs because some shells have a limit on the size
24051 # of here documents, and old seds have small limits too (100 cmds).
24052 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
24053 rm -f conftest.tail
24054 while grep . conftest.undefs >/dev/null
24055 do
24056   # Write a limited-size here document to $tmp/undefs.sed.
24057   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24058   # Speed up: don't consider the non `#undef'
24059   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
24060   # Work around the forget-to-reset-the-flag bug.
24061   echo 't clr' >>$CONFIG_STATUS
24062   echo ': clr' >>$CONFIG_STATUS
24063   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
24064   echo 'CEOF
24065   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24066   rm -f $tmp/in
24067   mv $tmp/out $tmp/in
24068 ' >>$CONFIG_STATUS
24069   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24070   rm -f conftest.undefs
24071   mv conftest.tail conftest.undefs
24072 done
24073 rm -f conftest.undefs
24074
24075 cat >>$CONFIG_STATUS <<\_ACEOF
24076   # Let's still pretend it is `configure' which instantiates (i.e., don't
24077   # use $as_me), people would be surprised to read:
24078   #    /* config.h.  Generated by config.status.  */
24079   if test x"$ac_file" = x-; then
24080     echo "/* Generated by configure.  */" >$tmp/config.h
24081   else
24082     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
24083   fi
24084   cat $tmp/in >>$tmp/config.h
24085   rm -f $tmp/in
24086   if test x"$ac_file" != x-; then
24087     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
24088       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24089 echo "$as_me: $ac_file is unchanged" >&6;}
24090     else
24091       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24092 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24093          X"$ac_file" : 'X\(//\)[^/]' \| \
24094          X"$ac_file" : 'X\(//\)$' \| \
24095          X"$ac_file" : 'X\(/\)' \| \
24096          .     : '\(.\)' 2>/dev/null ||
24097 echo X"$ac_file" |
24098     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24099           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24100           /^X\(\/\/\)$/{ s//\1/; q; }
24101           /^X\(\/\).*/{ s//\1/; q; }
24102           s/.*/./; q'`
24103       { if $as_mkdir_p; then
24104     mkdir -p "$ac_dir"
24105   else
24106     as_dir="$ac_dir"
24107     as_dirs=
24108     while test ! -d "$as_dir"; do
24109       as_dirs="$as_dir $as_dirs"
24110       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24111 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24112          X"$as_dir" : 'X\(//\)[^/]' \| \
24113          X"$as_dir" : 'X\(//\)$' \| \
24114          X"$as_dir" : 'X\(/\)' \| \
24115          .     : '\(.\)' 2>/dev/null ||
24116 echo X"$as_dir" |
24117     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24118           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24119           /^X\(\/\/\)$/{ s//\1/; q; }
24120           /^X\(\/\).*/{ s//\1/; q; }
24121           s/.*/./; q'`
24122     done
24123     test ! -n "$as_dirs" || mkdir $as_dirs
24124   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24125 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24126    { (exit 1); exit 1; }; }; }
24127
24128       rm -f $ac_file
24129       mv $tmp/config.h $ac_file
24130     fi
24131   else
24132     cat $tmp/config.h
24133     rm -f $tmp/config.h
24134   fi
24135   # Run the commands associated with the file.
24136   case $ac_file in
24137     src/include/pg_config.h )
24138 # Update timestamp for pg_config.h (see Makefile.global)
24139 echo >src/include/stamp-h
24140  ;;
24141   esac
24142 done
24143 _ACEOF
24144 cat >>$CONFIG_STATUS <<\_ACEOF
24145
24146 #
24147 # CONFIG_LINKS section.
24148 #
24149
24150 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
24151   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24152   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24153
24154   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
24155 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
24156
24157   if test ! -r $srcdir/$ac_source; then
24158     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
24159 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
24160    { (exit 1); exit 1; }; }
24161   fi
24162   rm -f $ac_dest
24163
24164   # Make relative symlinks.
24165   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
24166 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24167          X"$ac_dest" : 'X\(//\)[^/]' \| \
24168          X"$ac_dest" : 'X\(//\)$' \| \
24169          X"$ac_dest" : 'X\(/\)' \| \
24170          .     : '\(.\)' 2>/dev/null ||
24171 echo X"$ac_dest" |
24172     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24173           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24174           /^X\(\/\/\)$/{ s//\1/; q; }
24175           /^X\(\/\).*/{ s//\1/; q; }
24176           s/.*/./; q'`
24177   { if $as_mkdir_p; then
24178     mkdir -p "$ac_dest_dir"
24179   else
24180     as_dir="$ac_dest_dir"
24181     as_dirs=
24182     while test ! -d "$as_dir"; do
24183       as_dirs="$as_dir $as_dirs"
24184       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24185 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24186          X"$as_dir" : 'X\(//\)[^/]' \| \
24187          X"$as_dir" : 'X\(//\)$' \| \
24188          X"$as_dir" : 'X\(/\)' \| \
24189          .     : '\(.\)' 2>/dev/null ||
24190 echo X"$as_dir" |
24191     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24192           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24193           /^X\(\/\/\)$/{ s//\1/; q; }
24194           /^X\(\/\).*/{ s//\1/; q; }
24195           s/.*/./; q'`
24196     done
24197     test ! -n "$as_dirs" || mkdir $as_dirs
24198   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
24199 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
24200    { (exit 1); exit 1; }; }; }
24201
24202   ac_builddir=.
24203
24204 if test "$ac_dest_dir" != .; then
24205   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
24206   # A "../" for each directory in $ac_dir_suffix.
24207   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24208 else
24209   ac_dir_suffix= ac_top_builddir=
24210 fi
24211
24212 case $srcdir in
24213   .)  # No --srcdir option.  We are building in place.
24214     ac_srcdir=.
24215     if test -z "$ac_top_builddir"; then
24216        ac_top_srcdir=.
24217     else
24218        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24219     fi ;;
24220   [\\/]* | ?:[\\/]* )  # Absolute path.
24221     ac_srcdir=$srcdir$ac_dir_suffix;
24222     ac_top_srcdir=$srcdir ;;
24223   *) # Relative path.
24224     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24225     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24226 esac
24227
24228 # Do not use `cd foo && pwd` to compute absolute paths, because
24229 # the directories may not exist.
24230 case `pwd` in
24231 .) ac_abs_builddir="$ac_dest_dir";;
24232 *)
24233   case "$ac_dest_dir" in
24234   .) ac_abs_builddir=`pwd`;;
24235   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24236   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24237   esac;;
24238 esac
24239 case $ac_abs_builddir in
24240 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24241 *)
24242   case ${ac_top_builddir}. in
24243   .) ac_abs_top_builddir=$ac_abs_builddir;;
24244   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24245   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24246   esac;;
24247 esac
24248 case $ac_abs_builddir in
24249 .) ac_abs_srcdir=$ac_srcdir;;
24250 *)
24251   case $ac_srcdir in
24252   .) ac_abs_srcdir=$ac_abs_builddir;;
24253   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24254   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24255   esac;;
24256 esac
24257 case $ac_abs_builddir in
24258 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24259 *)
24260   case $ac_top_srcdir in
24261   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24262   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24263   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24264   esac;;
24265 esac
24266
24267
24268   case $srcdir in
24269   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24270       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24271   esac
24272
24273   # Try a symlink, then a hard link, then a copy.
24274   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24275     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24276     cp -p $srcdir/$ac_source $ac_dest ||
24277     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24278 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24279    { (exit 1); exit 1; }; }
24280 done
24281 _ACEOF
24282 cat >>$CONFIG_STATUS <<\_ACEOF
24283
24284 #
24285 # CONFIG_COMMANDS section.
24286 #
24287 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24288   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24289   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24290   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24291 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24292          X"$ac_dest" : 'X\(//\)[^/]' \| \
24293          X"$ac_dest" : 'X\(//\)$' \| \
24294          X"$ac_dest" : 'X\(/\)' \| \
24295          .     : '\(.\)' 2>/dev/null ||
24296 echo X"$ac_dest" |
24297     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24298           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24299           /^X\(\/\/\)$/{ s//\1/; q; }
24300           /^X\(\/\).*/{ s//\1/; q; }
24301           s/.*/./; q'`
24302   { if $as_mkdir_p; then
24303     mkdir -p "$ac_dir"
24304   else
24305     as_dir="$ac_dir"
24306     as_dirs=
24307     while test ! -d "$as_dir"; do
24308       as_dirs="$as_dir $as_dirs"
24309       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24310 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24311          X"$as_dir" : 'X\(//\)[^/]' \| \
24312          X"$as_dir" : 'X\(//\)$' \| \
24313          X"$as_dir" : 'X\(/\)' \| \
24314          .     : '\(.\)' 2>/dev/null ||
24315 echo X"$as_dir" |
24316     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24317           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24318           /^X\(\/\/\)$/{ s//\1/; q; }
24319           /^X\(\/\).*/{ s//\1/; q; }
24320           s/.*/./; q'`
24321     done
24322     test ! -n "$as_dirs" || mkdir $as_dirs
24323   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24324 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24325    { (exit 1); exit 1; }; }; }
24326
24327   ac_builddir=.
24328
24329 if test "$ac_dir" != .; then
24330   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24331   # A "../" for each directory in $ac_dir_suffix.
24332   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24333 else
24334   ac_dir_suffix= ac_top_builddir=
24335 fi
24336
24337 case $srcdir in
24338   .)  # No --srcdir option.  We are building in place.
24339     ac_srcdir=.
24340     if test -z "$ac_top_builddir"; then
24341        ac_top_srcdir=.
24342     else
24343        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24344     fi ;;
24345   [\\/]* | ?:[\\/]* )  # Absolute path.
24346     ac_srcdir=$srcdir$ac_dir_suffix;
24347     ac_top_srcdir=$srcdir ;;
24348   *) # Relative path.
24349     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24350     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24351 esac
24352
24353 # Do not use `cd foo && pwd` to compute absolute paths, because
24354 # the directories may not exist.
24355 case `pwd` in
24356 .) ac_abs_builddir="$ac_dir";;
24357 *)
24358   case "$ac_dir" in
24359   .) ac_abs_builddir=`pwd`;;
24360   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24361   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24362   esac;;
24363 esac
24364 case $ac_abs_builddir in
24365 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24366 *)
24367   case ${ac_top_builddir}. in
24368   .) ac_abs_top_builddir=$ac_abs_builddir;;
24369   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24370   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24371   esac;;
24372 esac
24373 case $ac_abs_builddir in
24374 .) ac_abs_srcdir=$ac_srcdir;;
24375 *)
24376   case $ac_srcdir in
24377   .) ac_abs_srcdir=$ac_abs_builddir;;
24378   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24379   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24380   esac;;
24381 esac
24382 case $ac_abs_builddir in
24383 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24384 *)
24385   case $ac_top_srcdir in
24386   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24387   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24388   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24389   esac;;
24390 esac
24391
24392
24393   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24394 echo "$as_me: executing $ac_dest commands" >&6;}
24395   case $ac_dest in
24396     check_win32_symlinks )
24397 # Links sometimes fail undetected on Mingw -
24398 # so here we detect it and warn the user
24399 for FILE in $CONFIG_LINKS
24400  do
24401         # test -e works for symlinks in the MinGW console
24402         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24403 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24404  done
24405  ;;
24406   esac
24407 done
24408 _ACEOF
24409
24410 cat >>$CONFIG_STATUS <<\_ACEOF
24411
24412 { (exit 0); exit 0; }
24413 _ACEOF
24414 chmod +x $CONFIG_STATUS
24415 ac_clean_files=$ac_clean_files_save
24416
24417
24418 # configure is writing to config.log, and then calls config.status.
24419 # config.status does its own redirection, appending to config.log.
24420 # Unfortunately, on DOS this fails, as config.log is still kept open
24421 # by configure, so config.status won't be able to write to it; its
24422 # output is simply discarded.  So we exec the FD to /dev/null,
24423 # effectively closing config.log, so it can be properly (re)opened and
24424 # appended to by config.status.  When coming back to configure, we
24425 # need to make the FD available again.
24426 if test "$no_create" != yes; then
24427   ac_cs_success=:
24428   ac_config_status_args=
24429   test "$silent" = yes &&
24430     ac_config_status_args="$ac_config_status_args --quiet"
24431   exec 5>/dev/null
24432   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24433   exec 5>>config.log
24434   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24435   # would make configure fail if this is the last instruction.
24436   $ac_cs_success || { (exit 1); exit 1; }
24437 fi
24438
24439