OSDN Git Service

Move thread_test directory from /tools to /test so source-only tarballs
[pg-rex/syncrep.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.2devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 2003 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright (c) 1996-2005, PostgreSQL Global Development Group
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248 # Name of the host.
249 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
250 # so uname gets run too.
251 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252
253 exec 6>&1
254
255 #
256 # Initializations.
257 #
258 ac_default_prefix=/usr/local
259 ac_config_libobj_dir=.
260 cross_compiling=no
261 subdirs=
262 MFLAGS=
263 MAKEFLAGS=
264 SHELL=${CONFIG_SHELL-/bin/sh}
265
266 # Maximum number of lines to put in a shell here document.
267 # This variable seems obsolete.  It should probably be removed, and
268 # only ac_max_sed_lines should be used.
269 : ${ac_max_here_lines=38}
270
271 # Identity of this package.
272 PACKAGE_NAME='PostgreSQL'
273 PACKAGE_TARNAME='postgresql'
274 PACKAGE_VERSION='8.2devel'
275 PACKAGE_STRING='PostgreSQL 8.2devel'
276 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
277
278 ac_unique_file="src/backend/access/common/heaptuple.c"
279 ac_default_prefix=/usr/local/pgsql
280 # Factoring default headers for most tests.
281 ac_includes_default="\
282 #include <stdio.h>
283 #if HAVE_SYS_TYPES_H
284 # include <sys/types.h>
285 #endif
286 #if HAVE_SYS_STAT_H
287 # include <sys/stat.h>
288 #endif
289 #if STDC_HEADERS
290 # include <stdlib.h>
291 # include <stddef.h>
292 #else
293 # if HAVE_STDLIB_H
294 #  include <stdlib.h>
295 # endif
296 #endif
297 #if HAVE_STRING_H
298 # if !STDC_HEADERS && HAVE_MEMORY_H
299 #  include <memory.h>
300 # endif
301 # include <string.h>
302 #endif
303 #if HAVE_STRINGS_H
304 # include <strings.h>
305 #endif
306 #if HAVE_INTTYPES_H
307 # include <inttypes.h>
308 #else
309 # if HAVE_STDINT_H
310 #  include <stdint.h>
311 # endif
312 #endif
313 #if HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif"
316
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_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 LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318 ac_subst_files=''
319
320 # Initialize some variables set by options.
321 ac_init_help=
322 ac_init_version=false
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 cache_file=/dev/null
326 exec_prefix=NONE
327 no_create=
328 no_recursion=
329 prefix=NONE
330 program_prefix=NONE
331 program_suffix=NONE
332 program_transform_name=s,x,x,
333 silent=
334 site=
335 srcdir=
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339
340 # Installation directory options.
341 # These are left unexpanded so users can "make install exec_prefix=/foo"
342 # and all the variables that are supposed to be based on exec_prefix
343 # by default will actually change.
344 # Use braces instead of parens because sh, perl, etc. also accept them.
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 ac_prev=
359 for ac_option
360 do
361   # If the previous option needs an argument, assign it.
362   if test -n "$ac_prev"; then
363     eval "$ac_prev=\$ac_option"
364     ac_prev=
365     continue
366   fi
367
368   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
369
370   # Accept the important Cygnus configure options, so we can diagnose typos.
371
372   case $ac_option in
373
374   -bindir | --bindir | --bindi | --bind | --bin | --bi)
375     ac_prev=bindir ;;
376   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
377     bindir=$ac_optarg ;;
378
379   -build | --build | --buil | --bui | --bu)
380     ac_prev=build_alias ;;
381   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
382     build_alias=$ac_optarg ;;
383
384   -cache-file | --cache-file | --cache-fil | --cache-fi \
385   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
386     ac_prev=cache_file ;;
387   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
388   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
389     cache_file=$ac_optarg ;;
390
391   --config-cache | -C)
392     cache_file=config.cache ;;
393
394   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
395     ac_prev=datadir ;;
396   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
397   | --da=*)
398     datadir=$ac_optarg ;;
399
400   -disable-* | --disable-*)
401     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
405    { (exit 1); exit 1; }; }
406     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
407     eval "enable_$ac_feature=no" ;;
408
409   -enable-* | --enable-*)
410     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
414    { (exit 1); exit 1; }; }
415     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
416     case $ac_option in
417       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418       *) ac_optarg=yes ;;
419     esac
420     eval "enable_$ac_feature='$ac_optarg'" ;;
421
422   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
423   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
424   | --exec | --exe | --ex)
425     ac_prev=exec_prefix ;;
426   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
427   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
428   | --exec=* | --exe=* | --ex=*)
429     exec_prefix=$ac_optarg ;;
430
431   -gas | --gas | --ga | --g)
432     # Obsolete; use --with-gas.
433     with_gas=yes ;;
434
435   -help | --help | --hel | --he | -h)
436     ac_init_help=long ;;
437   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
438     ac_init_help=recursive ;;
439   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
440     ac_init_help=short ;;
441
442   -host | --host | --hos | --ho)
443     ac_prev=host_alias ;;
444   -host=* | --host=* | --hos=* | --ho=*)
445     host_alias=$ac_optarg ;;
446
447   -includedir | --includedir | --includedi | --included | --include \
448   | --includ | --inclu | --incl | --inc)
449     ac_prev=includedir ;;
450   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
451   | --includ=* | --inclu=* | --incl=* | --inc=*)
452     includedir=$ac_optarg ;;
453
454   -infodir | --infodir | --infodi | --infod | --info | --inf)
455     ac_prev=infodir ;;
456   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
457     infodir=$ac_optarg ;;
458
459   -libdir | --libdir | --libdi | --libd)
460     ac_prev=libdir ;;
461   -libdir=* | --libdir=* | --libdi=* | --libd=*)
462     libdir=$ac_optarg ;;
463
464   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
465   | --libexe | --libex | --libe)
466     ac_prev=libexecdir ;;
467   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
468   | --libexe=* | --libex=* | --libe=*)
469     libexecdir=$ac_optarg ;;
470
471   -localstatedir | --localstatedir | --localstatedi | --localstated \
472   | --localstate | --localstat | --localsta | --localst \
473   | --locals | --local | --loca | --loc | --lo)
474     ac_prev=localstatedir ;;
475   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
476   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
477   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
478     localstatedir=$ac_optarg ;;
479
480   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
481     ac_prev=mandir ;;
482   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
483     mandir=$ac_optarg ;;
484
485   -nfp | --nfp | --nf)
486     # Obsolete; use --without-fp.
487     with_fp=no ;;
488
489   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
490   | --no-cr | --no-c | -n)
491     no_create=yes ;;
492
493   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
495     no_recursion=yes ;;
496
497   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
498   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
499   | --oldin | --oldi | --old | --ol | --o)
500     ac_prev=oldincludedir ;;
501   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
502   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
503   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
504     oldincludedir=$ac_optarg ;;
505
506   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
507     ac_prev=prefix ;;
508   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
509     prefix=$ac_optarg ;;
510
511   -program-prefix | --program-prefix | --program-prefi | --program-pref \
512   | --program-pre | --program-pr | --program-p)
513     ac_prev=program_prefix ;;
514   -program-prefix=* | --program-prefix=* | --program-prefi=* \
515   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
516     program_prefix=$ac_optarg ;;
517
518   -program-suffix | --program-suffix | --program-suffi | --program-suff \
519   | --program-suf | --program-su | --program-s)
520     ac_prev=program_suffix ;;
521   -program-suffix=* | --program-suffix=* | --program-suffi=* \
522   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
523     program_suffix=$ac_optarg ;;
524
525   -program-transform-name | --program-transform-name \
526   | --program-transform-nam | --program-transform-na \
527   | --program-transform-n | --program-transform- \
528   | --program-transform | --program-transfor \
529   | --program-transfo | --program-transf \
530   | --program-trans | --program-tran \
531   | --progr-tra | --program-tr | --program-t)
532     ac_prev=program_transform_name ;;
533   -program-transform-name=* | --program-transform-name=* \
534   | --program-transform-nam=* | --program-transform-na=* \
535   | --program-transform-n=* | --program-transform-=* \
536   | --program-transform=* | --program-transfor=* \
537   | --program-transfo=* | --program-transf=* \
538   | --program-trans=* | --program-tran=* \
539   | --progr-tra=* | --program-tr=* | --program-t=*)
540     program_transform_name=$ac_optarg ;;
541
542   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
543   | -silent | --silent | --silen | --sile | --sil)
544     silent=yes ;;
545
546   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
547     ac_prev=sbindir ;;
548   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
549   | --sbi=* | --sb=*)
550     sbindir=$ac_optarg ;;
551
552   -sharedstatedir | --sharedstatedir | --sharedstatedi \
553   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
554   | --sharedst | --shareds | --shared | --share | --shar \
555   | --sha | --sh)
556     ac_prev=sharedstatedir ;;
557   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
558   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
559   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
560   | --sha=* | --sh=*)
561     sharedstatedir=$ac_optarg ;;
562
563   -site | --site | --sit)
564     ac_prev=site ;;
565   -site=* | --site=* | --sit=*)
566     site=$ac_optarg ;;
567
568   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
569     ac_prev=srcdir ;;
570   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
571     srcdir=$ac_optarg ;;
572
573   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
574   | --syscon | --sysco | --sysc | --sys | --sy)
575     ac_prev=sysconfdir ;;
576   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
577   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
578     sysconfdir=$ac_optarg ;;
579
580   -target | --target | --targe | --targ | --tar | --ta | --t)
581     ac_prev=target_alias ;;
582   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
583     target_alias=$ac_optarg ;;
584
585   -v | -verbose | --verbose | --verbos | --verbo | --verb)
586     verbose=yes ;;
587
588   -version | --version | --versio | --versi | --vers | -V)
589     ac_init_version=: ;;
590
591   -with-* | --with-*)
592     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
593     # Reject names that are not valid shell variable names.
594     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
595       { echo "$as_me: error: invalid package name: $ac_package" >&2
596    { (exit 1); exit 1; }; }
597     ac_package=`echo $ac_package| sed 's/-/_/g'`
598     case $ac_option in
599       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
600       *) ac_optarg=yes ;;
601     esac
602     eval "with_$ac_package='$ac_optarg'" ;;
603
604   -without-* | --without-*)
605     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
606     # Reject names that are not valid shell variable names.
607     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
608       { echo "$as_me: error: invalid package name: $ac_package" >&2
609    { (exit 1); exit 1; }; }
610     ac_package=`echo $ac_package | sed 's/-/_/g'`
611     eval "with_$ac_package=no" ;;
612
613   --x)
614     # Obsolete; use --with-x.
615     with_x=yes ;;
616
617   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
618   | --x-incl | --x-inc | --x-in | --x-i)
619     ac_prev=x_includes ;;
620   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
621   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
622     x_includes=$ac_optarg ;;
623
624   -x-libraries | --x-libraries | --x-librarie | --x-librari \
625   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
626     ac_prev=x_libraries ;;
627   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
628   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
629     x_libraries=$ac_optarg ;;
630
631   -*) { echo "$as_me: error: unrecognized option: $ac_option
632 Try \`$0 --help' for more information." >&2
633    { (exit 1); exit 1; }; }
634     ;;
635
636   *=*)
637     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
638     # Reject names that are not valid shell variable names.
639     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
640       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
641    { (exit 1); exit 1; }; }
642     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
643     eval "$ac_envvar='$ac_optarg'"
644     export $ac_envvar ;;
645
646   *)
647     # FIXME: should be removed in autoconf 3.0.
648     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
649     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
650       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
651     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
652     ;;
653
654   esac
655 done
656
657 if test -n "$ac_prev"; then
658   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
659   { echo "$as_me: error: missing argument to $ac_option" >&2
660    { (exit 1); exit 1; }; }
661 fi
662
663 # Be sure to have absolute paths.
664 for ac_var in exec_prefix prefix
665 do
666   eval ac_val=$`echo $ac_var`
667   case $ac_val in
668     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
669     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
670    { (exit 1); exit 1; }; };;
671   esac
672 done
673
674 # Be sure to have absolute paths.
675 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
676               localstatedir libdir includedir oldincludedir infodir mandir
677 do
678   eval ac_val=$`echo $ac_var`
679   case $ac_val in
680     [\\/$]* | ?:[\\/]* ) ;;
681     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
682    { (exit 1); exit 1; }; };;
683   esac
684 done
685
686 # There might be people who depend on the old broken behavior: `$host'
687 # used to hold the argument of --host etc.
688 # FIXME: To remove some day.
689 build=$build_alias
690 host=$host_alias
691 target=$target_alias
692
693 # FIXME: To remove some day.
694 if test "x$host_alias" != x; then
695   if test "x$build_alias" = x; then
696     cross_compiling=maybe
697     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
698     If a cross compiler is detected then cross compile mode will be used." >&2
699   elif test "x$build_alias" != "x$host_alias"; then
700     cross_compiling=yes
701   fi
702 fi
703
704 ac_tool_prefix=
705 test -n "$host_alias" && ac_tool_prefix=$host_alias-
706
707 test "$silent" = yes && exec 6>/dev/null
708
709
710 # Find the source files, if location was not specified.
711 if test -z "$srcdir"; then
712   ac_srcdir_defaulted=yes
713   # Try the directory containing this script, then its parent.
714   ac_confdir=`(dirname "$0") 2>/dev/null ||
715 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
716          X"$0" : 'X\(//\)[^/]' \| \
717          X"$0" : 'X\(//\)$' \| \
718          X"$0" : 'X\(/\)' \| \
719          .     : '\(.\)' 2>/dev/null ||
720 echo X"$0" |
721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
722           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
723           /^X\(\/\/\)$/{ s//\1/; q; }
724           /^X\(\/\).*/{ s//\1/; q; }
725           s/.*/./; q'`
726   srcdir=$ac_confdir
727   if test ! -r $srcdir/$ac_unique_file; then
728     srcdir=..
729   fi
730 else
731   ac_srcdir_defaulted=no
732 fi
733 if test ! -r $srcdir/$ac_unique_file; then
734   if test "$ac_srcdir_defaulted" = yes; then
735     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
736    { (exit 1); exit 1; }; }
737   else
738     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
739    { (exit 1); exit 1; }; }
740   fi
741 fi
742 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
743   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
744    { (exit 1); exit 1; }; }
745 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
746 ac_env_build_alias_set=${build_alias+set}
747 ac_env_build_alias_value=$build_alias
748 ac_cv_env_build_alias_set=${build_alias+set}
749 ac_cv_env_build_alias_value=$build_alias
750 ac_env_host_alias_set=${host_alias+set}
751 ac_env_host_alias_value=$host_alias
752 ac_cv_env_host_alias_set=${host_alias+set}
753 ac_cv_env_host_alias_value=$host_alias
754 ac_env_target_alias_set=${target_alias+set}
755 ac_env_target_alias_value=$target_alias
756 ac_cv_env_target_alias_set=${target_alias+set}
757 ac_cv_env_target_alias_value=$target_alias
758 ac_env_CC_set=${CC+set}
759 ac_env_CC_value=$CC
760 ac_cv_env_CC_set=${CC+set}
761 ac_cv_env_CC_value=$CC
762 ac_env_CFLAGS_set=${CFLAGS+set}
763 ac_env_CFLAGS_value=$CFLAGS
764 ac_cv_env_CFLAGS_set=${CFLAGS+set}
765 ac_cv_env_CFLAGS_value=$CFLAGS
766 ac_env_LDFLAGS_set=${LDFLAGS+set}
767 ac_env_LDFLAGS_value=$LDFLAGS
768 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
769 ac_cv_env_LDFLAGS_value=$LDFLAGS
770 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
771 ac_env_CPPFLAGS_value=$CPPFLAGS
772 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
773 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
774 ac_env_CPP_set=${CPP+set}
775 ac_env_CPP_value=$CPP
776 ac_cv_env_CPP_set=${CPP+set}
777 ac_cv_env_CPP_value=$CPP
778 ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
779 ac_env_LDFLAGS_SL_value=$LDFLAGS_SL
780 ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
781 ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL
782 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
783 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
784 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
785 ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
786
787 #
788 # Report the --help message.
789 #
790 if test "$ac_init_help" = "long"; then
791   # Omit some internal or obsolete options to make the list less imposing.
792   # This message is too long to be a string in the A/UX 3.1 sh.
793   cat <<_ACEOF
794 \`configure' configures PostgreSQL 8.2devel to adapt to many kinds of systems.
795
796 Usage: $0 [OPTION]... [VAR=VALUE]...
797
798 To assign environment variables (e.g., CC, CFLAGS...), specify them as
799 VAR=VALUE.  See below for descriptions of some of the useful variables.
800
801 Defaults for the options are specified in brackets.
802
803 Configuration:
804   -h, --help              display this help and exit
805       --help=short        display options specific to this package
806       --help=recursive    display the short help of all the included packages
807   -V, --version           display version information and exit
808   -q, --quiet, --silent   do not print \`checking...' messages
809       --cache-file=FILE   cache test results in FILE [disabled]
810   -C, --config-cache      alias for \`--cache-file=config.cache'
811   -n, --no-create         do not create output files
812       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
813
814 _ACEOF
815
816   cat <<_ACEOF
817 Installation directories:
818   --prefix=PREFIX         install architecture-independent files in PREFIX
819                           [$ac_default_prefix]
820   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
821                           [PREFIX]
822
823 By default, \`make install' will install all the files in
824 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
825 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
826 for instance \`--prefix=\$HOME'.
827
828 For better control, use the options below.
829
830 Fine tuning of the installation directories:
831   --bindir=DIR           user executables [EPREFIX/bin]
832   --sbindir=DIR          system admin executables [EPREFIX/sbin]
833   --libexecdir=DIR       program executables [EPREFIX/libexec]
834   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
835   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
836   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
837   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
838   --libdir=DIR           object code libraries [EPREFIX/lib]
839   --includedir=DIR       C header files [PREFIX/include]
840   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
841   --infodir=DIR          info documentation [PREFIX/info]
842   --mandir=DIR           man documentation [PREFIX/man]
843 _ACEOF
844
845   cat <<\_ACEOF
846
847 System types:
848   --build=BUILD     configure for building on BUILD [guessed]
849   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
850 _ACEOF
851 fi
852
853 if test -n "$ac_init_help"; then
854   case $ac_init_help in
855      short | recursive ) echo "Configuration of PostgreSQL 8.2devel:";;
856    esac
857   cat <<\_ACEOF
858
859 Optional Features:
860   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
861   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
862   --enable-integer-datetimes  enable 64-bit integer date/time support
863   --enable-nls[=LANGUAGES]  enable Native Language Support
864   --disable-shared        do not build shared libraries
865   --disable-rpath         do not embed shared library search path in executables
866   --disable-spinlocks     do not use spinlocks
867   --enable-debug          build with debugging symbols (-g)
868   --enable-depend         turn on automatic dependency tracking
869   --enable-cassert        enable assertion checks (for debugging)
870   --enable-thread-safety  make client libraries thread-safe
871   --enable-thread-safety-force  force thread-safety in spite of thread test failure
872   --disable-largefile     omit support for large files
873
874 Optional Packages:
875   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
876   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
877
878   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
879   --without-docdir        do not install the documentation
880   --with-includes=DIRS    look for additional header files in DIRS
881   --with-libraries=DIRS   look for additional libraries in DIRS
882   --with-libs=DIRS        alternative spelling of --with-libraries
883   --with-pgport=PORTNUM   change default port number [5432]
884   --with-tcl              build Tcl modules (PL/Tcl)
885   --with-tclconfig=DIR    tclConfig.sh is in DIR
886   --with-perl             build Perl modules (PL/Perl)
887   --with-python           build Python modules (PL/Python)
888   --with-krb5             build with Kerberos 5 support
889   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
890   --with-pam              build with PAM support
891   --with-bonjour          build with Bonjour support
892   --with-openssl          build with OpenSSL support
893   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
894   --without-readline      do not use GNU Readline / BSD Libedit line editing
895   --without-zlib          do not use Zlib
896   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
897
898 Some influential environment variables:
899   CC          C compiler command
900   CFLAGS      C compiler flags
901   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
902               nonstandard directory <lib dir>
903   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
904               headers in a nonstandard directory <include dir>
905   CPP         C preprocessor
906   LDFLAGS_SL
907   DOCBOOKSTYLE
908               location of DocBook stylesheets
909
910 Use these variables to override the choices made by `configure' or to help
911 it to find libraries and programs with nonstandard names/locations.
912
913 Report bugs to <pgsql-bugs@postgresql.org>.
914 _ACEOF
915 fi
916
917 if test "$ac_init_help" = "recursive"; then
918   # If there are subdirs, report their specific --help.
919   ac_popdir=`pwd`
920   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
921     test -d $ac_dir || continue
922     ac_builddir=.
923
924 if test "$ac_dir" != .; then
925   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
926   # A "../" for each directory in $ac_dir_suffix.
927   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
928 else
929   ac_dir_suffix= ac_top_builddir=
930 fi
931
932 case $srcdir in
933   .)  # No --srcdir option.  We are building in place.
934     ac_srcdir=.
935     if test -z "$ac_top_builddir"; then
936        ac_top_srcdir=.
937     else
938        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
939     fi ;;
940   [\\/]* | ?:[\\/]* )  # Absolute path.
941     ac_srcdir=$srcdir$ac_dir_suffix;
942     ac_top_srcdir=$srcdir ;;
943   *) # Relative path.
944     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
945     ac_top_srcdir=$ac_top_builddir$srcdir ;;
946 esac
947
948 # Do not use `cd foo && pwd` to compute absolute paths, because
949 # the directories may not exist.
950 case `pwd` in
951 .) ac_abs_builddir="$ac_dir";;
952 *)
953   case "$ac_dir" in
954   .) ac_abs_builddir=`pwd`;;
955   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
956   *) ac_abs_builddir=`pwd`/"$ac_dir";;
957   esac;;
958 esac
959 case $ac_abs_builddir in
960 .) ac_abs_top_builddir=${ac_top_builddir}.;;
961 *)
962   case ${ac_top_builddir}. in
963   .) ac_abs_top_builddir=$ac_abs_builddir;;
964   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
965   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
966   esac;;
967 esac
968 case $ac_abs_builddir in
969 .) ac_abs_srcdir=$ac_srcdir;;
970 *)
971   case $ac_srcdir in
972   .) ac_abs_srcdir=$ac_abs_builddir;;
973   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
974   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
975   esac;;
976 esac
977 case $ac_abs_builddir in
978 .) ac_abs_top_srcdir=$ac_top_srcdir;;
979 *)
980   case $ac_top_srcdir in
981   .) ac_abs_top_srcdir=$ac_abs_builddir;;
982   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
983   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
984   esac;;
985 esac
986
987     cd $ac_dir
988     # Check for guested configure; otherwise get Cygnus style configure.
989     if test -f $ac_srcdir/configure.gnu; then
990       echo
991       $SHELL $ac_srcdir/configure.gnu  --help=recursive
992     elif test -f $ac_srcdir/configure; then
993       echo
994       $SHELL $ac_srcdir/configure  --help=recursive
995     elif test -f $ac_srcdir/configure.ac ||
996            test -f $ac_srcdir/configure.in; then
997       echo
998       $ac_configure --help
999     else
1000       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1001     fi
1002     cd $ac_popdir
1003   done
1004 fi
1005
1006 test -n "$ac_init_help" && exit 0
1007 if $ac_init_version; then
1008   cat <<\_ACEOF
1009 PostgreSQL configure 8.2devel
1010 generated by GNU Autoconf 2.59
1011
1012 Copyright (C) 2003 Free Software Foundation, Inc.
1013 This configure script is free software; the Free Software Foundation
1014 gives unlimited permission to copy, distribute and modify it.
1015
1016 Copyright (c) 1996-2005, PostgreSQL Global Development Group
1017 _ACEOF
1018   exit 0
1019 fi
1020 exec 5>config.log
1021 cat >&5 <<_ACEOF
1022 This file contains any messages produced by compilers while
1023 running configure, to aid debugging if configure makes a mistake.
1024
1025 It was created by PostgreSQL $as_me 8.2devel, which was
1026 generated by GNU Autoconf 2.59.  Invocation command line was
1027
1028   $ $0 $@
1029
1030 _ACEOF
1031 {
1032 cat <<_ASUNAME
1033 ## --------- ##
1034 ## Platform. ##
1035 ## --------- ##
1036
1037 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1038 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1039 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1040 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1041 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1042
1043 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1044 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1045
1046 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1047 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1048 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1049 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1050 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1051 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1052 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1053
1054 _ASUNAME
1055
1056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1057 for as_dir in $PATH
1058 do
1059   IFS=$as_save_IFS
1060   test -z "$as_dir" && as_dir=.
1061   echo "PATH: $as_dir"
1062 done
1063
1064 } >&5
1065
1066 cat >&5 <<_ACEOF
1067
1068
1069 ## ----------- ##
1070 ## Core tests. ##
1071 ## ----------- ##
1072
1073 _ACEOF
1074
1075
1076 # Keep a trace of the command line.
1077 # Strip out --no-create and --no-recursion so they do not pile up.
1078 # Strip out --silent because we don't want to record it for future runs.
1079 # Also quote any args containing shell meta-characters.
1080 # Make two passes to allow for proper duplicate-argument suppression.
1081 ac_configure_args=
1082 ac_configure_args0=
1083 ac_configure_args1=
1084 ac_sep=
1085 ac_must_keep_next=false
1086 for ac_pass in 1 2
1087 do
1088   for ac_arg
1089   do
1090     case $ac_arg in
1091     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1092     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1093     | -silent | --silent | --silen | --sile | --sil)
1094       continue ;;
1095     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1096       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1097     esac
1098     case $ac_pass in
1099     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1100     2)
1101       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1102       if test $ac_must_keep_next = true; then
1103         ac_must_keep_next=false # Got value, back to normal.
1104       else
1105         case $ac_arg in
1106           *=* | --config-cache | -C | -disable-* | --disable-* \
1107           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1108           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1109           | -with-* | --with-* | -without-* | --without-* | --x)
1110             case "$ac_configure_args0 " in
1111               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1112             esac
1113             ;;
1114           -* ) ac_must_keep_next=true ;;
1115         esac
1116       fi
1117       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1118       # Get rid of the leading space.
1119       ac_sep=" "
1120       ;;
1121     esac
1122   done
1123 done
1124 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1125 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1126
1127 # When interrupted or exit'd, cleanup temporary files, and complete
1128 # config.log.  We remove comments because anyway the quotes in there
1129 # would cause problems or look ugly.
1130 # WARNING: Be sure not to use single quotes in there, as some shells,
1131 # such as our DU 5.0 friend, will then `close' the trap.
1132 trap 'exit_status=$?
1133   # Save into config.log some information that might help in debugging.
1134   {
1135     echo
1136
1137     cat <<\_ASBOX
1138 ## ---------------- ##
1139 ## Cache variables. ##
1140 ## ---------------- ##
1141 _ASBOX
1142     echo
1143     # The following way of writing the cache mishandles newlines in values,
1144 {
1145   (set) 2>&1 |
1146     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1147     *ac_space=\ *)
1148       sed -n \
1149         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1150           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1151       ;;
1152     *)
1153       sed -n \
1154         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1155       ;;
1156     esac;
1157 }
1158     echo
1159
1160     cat <<\_ASBOX
1161 ## ----------------- ##
1162 ## Output variables. ##
1163 ## ----------------- ##
1164 _ASBOX
1165     echo
1166     for ac_var in $ac_subst_vars
1167     do
1168       eval ac_val=$`echo $ac_var`
1169       echo "$ac_var='"'"'$ac_val'"'"'"
1170     done | sort
1171     echo
1172
1173     if test -n "$ac_subst_files"; then
1174       cat <<\_ASBOX
1175 ## ------------- ##
1176 ## Output files. ##
1177 ## ------------- ##
1178 _ASBOX
1179       echo
1180       for ac_var in $ac_subst_files
1181       do
1182         eval ac_val=$`echo $ac_var`
1183         echo "$ac_var='"'"'$ac_val'"'"'"
1184       done | sort
1185       echo
1186     fi
1187
1188     if test -s confdefs.h; then
1189       cat <<\_ASBOX
1190 ## ----------- ##
1191 ## confdefs.h. ##
1192 ## ----------- ##
1193 _ASBOX
1194       echo
1195       sed "/^$/d" confdefs.h | sort
1196       echo
1197     fi
1198     test "$ac_signal" != 0 &&
1199       echo "$as_me: caught signal $ac_signal"
1200     echo "$as_me: exit $exit_status"
1201   } >&5
1202   rm -f core *.core &&
1203   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1204     exit $exit_status
1205      ' 0
1206 for ac_signal in 1 2 13 15; do
1207   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1208 done
1209 ac_signal=0
1210
1211 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1212 rm -rf conftest* confdefs.h
1213 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1214 echo >confdefs.h
1215
1216 # Predefined preprocessor variables.
1217
1218 cat >>confdefs.h <<_ACEOF
1219 #define PACKAGE_NAME "$PACKAGE_NAME"
1220 _ACEOF
1221
1222
1223 cat >>confdefs.h <<_ACEOF
1224 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1225 _ACEOF
1226
1227
1228 cat >>confdefs.h <<_ACEOF
1229 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1230 _ACEOF
1231
1232
1233 cat >>confdefs.h <<_ACEOF
1234 #define PACKAGE_STRING "$PACKAGE_STRING"
1235 _ACEOF
1236
1237
1238 cat >>confdefs.h <<_ACEOF
1239 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1240 _ACEOF
1241
1242
1243 # Let the site file select an alternate cache file if it wants to.
1244 # Prefer explicitly selected file to automatically selected ones.
1245 if test -z "$CONFIG_SITE"; then
1246   if test "x$prefix" != xNONE; then
1247     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1248   else
1249     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1250   fi
1251 fi
1252 for ac_site_file in $CONFIG_SITE; do
1253   if test -r "$ac_site_file"; then
1254     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1255 echo "$as_me: loading site script $ac_site_file" >&6;}
1256     sed 's/^/| /' "$ac_site_file" >&5
1257     . "$ac_site_file"
1258   fi
1259 done
1260
1261 if test -r "$cache_file"; then
1262   # Some versions of bash will fail to source /dev/null (special
1263   # files actually), so we avoid doing that.
1264   if test -f "$cache_file"; then
1265     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1266 echo "$as_me: loading cache $cache_file" >&6;}
1267     case $cache_file in
1268       [\\/]* | ?:[\\/]* ) . $cache_file;;
1269       *)                      . ./$cache_file;;
1270     esac
1271   fi
1272 else
1273   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1274 echo "$as_me: creating cache $cache_file" >&6;}
1275   >$cache_file
1276 fi
1277
1278 # Check that the precious variables saved in the cache have kept the same
1279 # value.
1280 ac_cache_corrupted=false
1281 for ac_var in `(set) 2>&1 |
1282                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1283   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1284   eval ac_new_set=\$ac_env_${ac_var}_set
1285   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1286   eval ac_new_val="\$ac_env_${ac_var}_value"
1287   case $ac_old_set,$ac_new_set in
1288     set,)
1289       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1290 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1291       ac_cache_corrupted=: ;;
1292     ,set)
1293       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1294 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1295       ac_cache_corrupted=: ;;
1296     ,);;
1297     *)
1298       if test "x$ac_old_val" != "x$ac_new_val"; then
1299         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1300 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1301         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1302 echo "$as_me:   former value:  $ac_old_val" >&2;}
1303         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1304 echo "$as_me:   current value: $ac_new_val" >&2;}
1305         ac_cache_corrupted=:
1306       fi;;
1307   esac
1308   # Pass precious variables to config.status.
1309   if test "$ac_new_set" = set; then
1310     case $ac_new_val in
1311     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1312       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1313     *) ac_arg=$ac_var=$ac_new_val ;;
1314     esac
1315     case " $ac_configure_args " in
1316       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1317       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1318     esac
1319   fi
1320 done
1321 if $ac_cache_corrupted; then
1322   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1323 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1324   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1325 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1326    { (exit 1); exit 1; }; }
1327 fi
1328
1329 ac_ext=c
1330 ac_cpp='$CPP $CPPFLAGS'
1331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365 ac_aux_dir=
1366 for ac_dir in config $srcdir/config; do
1367   if test -f $ac_dir/install-sh; then
1368     ac_aux_dir=$ac_dir
1369     ac_install_sh="$ac_aux_dir/install-sh -c"
1370     break
1371   elif test -f $ac_dir/install.sh; then
1372     ac_aux_dir=$ac_dir
1373     ac_install_sh="$ac_aux_dir/install.sh -c"
1374     break
1375   elif test -f $ac_dir/shtool; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/shtool install -c"
1378     break
1379   fi
1380 done
1381 if test -z "$ac_aux_dir"; then
1382   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1383 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1384    { (exit 1); exit 1; }; }
1385 fi
1386 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1387 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1388 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1389
1390
1391 configure_args=$ac_configure_args
1392
1393
1394
1395 cat >>confdefs.h <<_ACEOF
1396 #define PG_VERSION "$PACKAGE_VERSION"
1397 _ACEOF
1398
1399
1400 # Make sure we can run config.sub.
1401 $ac_config_sub sun4 >/dev/null 2>&1 ||
1402   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1403 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1404    { (exit 1); exit 1; }; }
1405
1406 echo "$as_me:$LINENO: checking build system type" >&5
1407 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1408 if test "${ac_cv_build+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_build_alias=$build_alias
1412 test -z "$ac_cv_build_alias" &&
1413   ac_cv_build_alias=`$ac_config_guess`
1414 test -z "$ac_cv_build_alias" &&
1415   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1416 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1417    { (exit 1); exit 1; }; }
1418 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1419   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1425 echo "${ECHO_T}$ac_cv_build" >&6
1426 build=$ac_cv_build
1427 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431
1432 echo "$as_me:$LINENO: checking host system type" >&5
1433 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1434 if test "${ac_cv_host+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_host_alias=$host_alias
1438 test -z "$ac_cv_host_alias" &&
1439   ac_cv_host_alias=$ac_cv_build_alias
1440 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1441   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1447 echo "${ECHO_T}$ac_cv_host" >&6
1448 host=$ac_cv_host
1449 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453
1454
1455 template=
1456 echo "$as_me:$LINENO: checking which template to use" >&5
1457 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1458
1459
1460
1461
1462 # Check whether --with-template or --without-template was given.
1463 if test "${with_template+set}" = set; then
1464   withval="$with_template"
1465
1466   case $withval in
1467     yes)
1468       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1469 echo "$as_me: error: argument required for --with-template option" >&2;}
1470    { (exit 1); exit 1; }; }
1471       ;;
1472     no)
1473       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1474 echo "$as_me: error: argument required for --with-template option" >&2;}
1475    { (exit 1); exit 1; }; }
1476       ;;
1477     *)
1478
1479   case $withval in
1480     list)   echo; ls "$srcdir/src/template"; exit;;
1481     *)      if test -f "$srcdir/src/template/$with_template" ; then
1482               template=$withval
1483             else
1484               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1485 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1486    { (exit 1); exit 1; }; }
1487             fi;;
1488   esac
1489
1490       ;;
1491   esac
1492
1493 else
1494
1495 # --with-template not given
1496
1497 case $host_os in
1498      aix*) template=aix ;;
1499     bsdi*) template=bsdi ;;
1500   cygwin*) template=cygwin ;;
1501   darwin*) template=darwin ;;
1502     dgux*) template=dgux ;;
1503  freebsd*) template=freebsd ;;
1504     hpux*) template=hpux ;;
1505     irix*) template=irix ;;
1506  linux*|gnu*|k*bsd*-gnu)
1507            template=linux ;;
1508    mingw*) template=win32 ;;
1509   netbsd*) template=netbsd ;;
1510 nextstep*) template=nextstep ;;
1511  openbsd*) template=openbsd ;;
1512      osf*) template=osf ;;
1513      sco*) template=sco ;;
1514  solaris*) template=solaris ;;
1515    sunos*) template=sunos4 ;;
1516  sysv4.2*)
1517         case $host_vendor in
1518           univel) template=univel ;;
1519         esac ;;
1520    sysv4*) template=svr4 ;;
1521    sysv5*) template=unixware ;;
1522   ultrix*) template=ultrix4 ;;
1523 esac
1524
1525   if test x"$template" = x"" ; then
1526     { { echo "$as_me:$LINENO: error:
1527 *******************************************************************
1528 PostgreSQL has apparently not been ported to your platform yet.
1529 To try a manual configuration, look into the src/template directory
1530 for a similar platform and use the '--with-template=' option.
1531
1532 Please also contact <pgsql-ports@postgresql.org> to see about
1533 rectifying this.  Include the above 'checking host system type...'
1534 line.
1535 *******************************************************************
1536 " >&5
1537 echo "$as_me: error:
1538 *******************************************************************
1539 PostgreSQL has apparently not been ported to your platform yet.
1540 To try a manual configuration, look into the src/template directory
1541 for a similar platform and use the '--with-template=' option.
1542
1543 Please also contact <pgsql-ports@postgresql.org> to see about
1544 rectifying this.  Include the above 'checking host system type...'
1545 line.
1546 *******************************************************************
1547 " >&2;}
1548    { (exit 1); exit 1; }; }
1549   fi
1550
1551
1552 fi;
1553
1554
1555 echo "$as_me:$LINENO: result: $template" >&5
1556 echo "${ECHO_T}$template" >&6
1557
1558 PORTNAME=$template
1559
1560
1561 # Initialize default assumption that we do not need separate assembly code
1562 # for TAS (test-and-set).  This can be overridden by the template file
1563 # when it's executed.
1564 need_tas=no
1565 tas_file=dummy.s
1566
1567
1568
1569 ##
1570 ## Command line options
1571 ##
1572
1573 #
1574 # Installation directory for documentation
1575 #
1576
1577
1578
1579 # Check whether --with-docdir or --without-docdir was given.
1580 if test "${with_docdir+set}" = set; then
1581   withval="$with_docdir"
1582
1583   case $withval in
1584     yes)
1585       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1586 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1587    { (exit 1); exit 1; }; }
1588       ;;
1589     no)
1590       docdir=
1591       ;;
1592     *)
1593       docdir=$withval
1594       ;;
1595   esac
1596
1597 else
1598   docdir='${prefix}/doc'
1599 fi;
1600
1601
1602
1603
1604 #
1605 # Add non-standard directories to the include path
1606 #
1607
1608
1609
1610 # Check whether --with-includes or --without-includes was given.
1611 if test "${with_includes+set}" = set; then
1612   withval="$with_includes"
1613
1614   case $withval in
1615     yes)
1616       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1617 echo "$as_me: error: argument required for --with-includes option" >&2;}
1618    { (exit 1); exit 1; }; }
1619       ;;
1620     no)
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     *)
1626
1627       ;;
1628   esac
1629
1630 fi;
1631
1632
1633
1634 #
1635 # Add non-standard directories to the library search path
1636 #
1637
1638
1639
1640 # Check whether --with-libraries or --without-libraries was given.
1641 if test "${with_libraries+set}" = set; then
1642   withval="$with_libraries"
1643
1644   case $withval in
1645     yes)
1646       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1647 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1648    { (exit 1); exit 1; }; }
1649       ;;
1650     no)
1651       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1652 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1653    { (exit 1); exit 1; }; }
1654       ;;
1655     *)
1656       LIBRARY_DIRS=$withval
1657       ;;
1658   esac
1659
1660 fi;
1661
1662
1663
1664
1665
1666 # Check whether --with-libs or --without-libs was given.
1667 if test "${with_libs+set}" = set; then
1668   withval="$with_libs"
1669
1670   case $withval in
1671     yes)
1672       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1673 echo "$as_me: error: argument required for --with-libs option" >&2;}
1674    { (exit 1); exit 1; }; }
1675       ;;
1676     no)
1677       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1678 echo "$as_me: error: argument required for --with-libs option" >&2;}
1679    { (exit 1); exit 1; }; }
1680       ;;
1681     *)
1682       LIBRARY_DIRS=$withval
1683       ;;
1684   esac
1685
1686 fi;
1687
1688
1689
1690 #
1691 # 64-bit integer date/time storage (--enable-integer-datetimes)
1692 #
1693 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1694 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1695
1696
1697 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1698 if test "${enable_integer_datetimes+set}" = set; then
1699   enableval="$enable_integer_datetimes"
1700
1701   case $enableval in
1702     yes)
1703
1704 cat >>confdefs.h <<\_ACEOF
1705 #define USE_INTEGER_DATETIMES 1
1706 _ACEOF
1707
1708       ;;
1709     no)
1710       :
1711       ;;
1712     *)
1713       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1714 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1715    { (exit 1); exit 1; }; }
1716       ;;
1717   esac
1718
1719 else
1720   enable_integer_datetimes=no
1721
1722 fi;
1723
1724 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1725 echo "${ECHO_T}$enable_integer_datetimes" >&6
1726
1727
1728 #
1729 # NLS
1730 #
1731 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1732 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1733
1734
1735 # Check whether --enable-nls or --disable-nls was given.
1736 if test "${enable_nls+set}" = set; then
1737   enableval="$enable_nls"
1738
1739   case $enableval in
1740     yes)
1741       :
1742       ;;
1743     no)
1744       :
1745       ;;
1746     *)
1747       enable_nls=yes
1748 WANTED_LANGUAGES=$enableval
1749       ;;
1750   esac
1751
1752 else
1753   enable_nls=no
1754 fi;
1755
1756
1757 if test "$enable_nls" = yes; then
1758
1759 cat >>confdefs.h <<\_ACEOF
1760 #define ENABLE_NLS 1
1761 _ACEOF
1762
1763 fi
1764
1765 echo "$as_me:$LINENO: result: $enable_nls" >&5
1766 echo "${ECHO_T}$enable_nls" >&6
1767
1768
1769
1770 #
1771 # Default port number (--with-pgport), default 5432
1772 #
1773 echo "$as_me:$LINENO: checking for default port number" >&5
1774 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1775
1776
1777
1778 # Check whether --with-pgport or --without-pgport was given.
1779 if test "${with_pgport+set}" = set; then
1780   withval="$with_pgport"
1781
1782   case $withval in
1783     yes)
1784       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1785 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1786    { (exit 1); exit 1; }; }
1787       ;;
1788     no)
1789       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1790 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1791    { (exit 1); exit 1; }; }
1792       ;;
1793     *)
1794       default_port=$withval
1795       ;;
1796   esac
1797
1798 else
1799   default_port=5432
1800 fi;
1801
1802 echo "$as_me:$LINENO: result: $default_port" >&5
1803 echo "${ECHO_T}$default_port" >&6
1804 # Need both of these because some places want an integer and some a string
1805
1806 cat >>confdefs.h <<_ACEOF
1807 #define DEF_PGPORT ${default_port}
1808 _ACEOF
1809
1810
1811 cat >>confdefs.h <<_ACEOF
1812 #define DEF_PGPORT_STR "${default_port}"
1813 _ACEOF
1814
1815
1816
1817 #
1818 # Option to disable shared libraries
1819 #
1820
1821
1822 # Check whether --enable-shared or --disable-shared was given.
1823 if test "${enable_shared+set}" = set; then
1824   enableval="$enable_shared"
1825
1826   case $enableval in
1827     yes)
1828       :
1829       ;;
1830     no)
1831       :
1832       ;;
1833     *)
1834       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1835 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1836    { (exit 1); exit 1; }; }
1837       ;;
1838   esac
1839
1840 else
1841   enable_shared=yes
1842
1843 fi;
1844
1845
1846
1847 #
1848 # '-rpath'-like feature can be disabled
1849 #
1850
1851
1852 # Check whether --enable-rpath or --disable-rpath was given.
1853 if test "${enable_rpath+set}" = set; then
1854   enableval="$enable_rpath"
1855
1856   case $enableval in
1857     yes)
1858       :
1859       ;;
1860     no)
1861       :
1862       ;;
1863     *)
1864       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1865 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1866    { (exit 1); exit 1; }; }
1867       ;;
1868   esac
1869
1870 else
1871   enable_rpath=yes
1872
1873 fi;
1874
1875
1876
1877 #
1878 # Spinlocks
1879 #
1880
1881
1882 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1883 if test "${enable_spinlocks+set}" = set; then
1884   enableval="$enable_spinlocks"
1885
1886   case $enableval in
1887     yes)
1888       :
1889       ;;
1890     no)
1891       :
1892       ;;
1893     *)
1894       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1895 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1896    { (exit 1); exit 1; }; }
1897       ;;
1898   esac
1899
1900 else
1901   enable_spinlocks=yes
1902
1903 fi;
1904
1905
1906 #
1907 # --enable-debug adds -g to compiler flags
1908 #
1909
1910
1911 # Check whether --enable-debug or --disable-debug was given.
1912 if test "${enable_debug+set}" = set; then
1913   enableval="$enable_debug"
1914
1915   case $enableval in
1916     yes)
1917       :
1918       ;;
1919     no)
1920       :
1921       ;;
1922     *)
1923       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1924 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1925    { (exit 1); exit 1; }; }
1926       ;;
1927   esac
1928
1929 else
1930   enable_debug=no
1931
1932 fi;
1933
1934
1935
1936 #
1937 # C compiler
1938 #
1939
1940 # For historical reasons you can also use --with-CC to specify the C compiler
1941 # to use, although the standard way to do this is to set the CC environment
1942 # variable.
1943
1944
1945
1946 # Check whether --with-CC or --without-CC was given.
1947 if test "${with_CC+set}" = set; then
1948   withval="$with_CC"
1949
1950   case $withval in
1951     yes)
1952       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1953 echo "$as_me: error: argument required for --with-CC option" >&2;}
1954    { (exit 1); exit 1; }; }
1955       ;;
1956     no)
1957       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1958 echo "$as_me: error: argument required for --with-CC option" >&2;}
1959    { (exit 1); exit 1; }; }
1960       ;;
1961     *)
1962       CC=$with_CC
1963       ;;
1964   esac
1965
1966 fi;
1967
1968
1969 case $template in
1970   aix) pgac_cc_list="gcc xlc";;
1971  irix) pgac_cc_list="cc";; # no gcc
1972     *) pgac_cc_list="gcc cc";;
1973 esac
1974
1975 ac_ext=c
1976 ac_cpp='$CPP $CPPFLAGS'
1977 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1978 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1979 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1980 if test -n "$ac_tool_prefix"; then
1981   for ac_prog in $pgac_cc_list
1982   do
1983     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1984 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1985 echo "$as_me:$LINENO: checking for $ac_word" >&5
1986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1987 if test "${ac_cv_prog_CC+set}" = set; then
1988   echo $ECHO_N "(cached) $ECHO_C" >&6
1989 else
1990   if test -n "$CC"; then
1991   ac_cv_prog_CC="$CC" # Let the user override the test.
1992 else
1993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1994 for as_dir in $PATH
1995 do
1996   IFS=$as_save_IFS
1997   test -z "$as_dir" && as_dir=.
1998   for ac_exec_ext in '' $ac_executable_extensions; do
1999   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2000     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2001     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2002     break 2
2003   fi
2004 done
2005 done
2006
2007 fi
2008 fi
2009 CC=$ac_cv_prog_CC
2010 if test -n "$CC"; then
2011   echo "$as_me:$LINENO: result: $CC" >&5
2012 echo "${ECHO_T}$CC" >&6
2013 else
2014   echo "$as_me:$LINENO: result: no" >&5
2015 echo "${ECHO_T}no" >&6
2016 fi
2017
2018     test -n "$CC" && break
2019   done
2020 fi
2021 if test -z "$CC"; then
2022   ac_ct_CC=$CC
2023   for ac_prog in $pgac_cc_list
2024 do
2025   # Extract the first word of "$ac_prog", so it can be a program name with args.
2026 set dummy $ac_prog; ac_word=$2
2027 echo "$as_me:$LINENO: checking for $ac_word" >&5
2028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2029 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2030   echo $ECHO_N "(cached) $ECHO_C" >&6
2031 else
2032   if test -n "$ac_ct_CC"; then
2033   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2034 else
2035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2036 for as_dir in $PATH
2037 do
2038   IFS=$as_save_IFS
2039   test -z "$as_dir" && as_dir=.
2040   for ac_exec_ext in '' $ac_executable_extensions; do
2041   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2042     ac_cv_prog_ac_ct_CC="$ac_prog"
2043     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2044     break 2
2045   fi
2046 done
2047 done
2048
2049 fi
2050 fi
2051 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2052 if test -n "$ac_ct_CC"; then
2053   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2054 echo "${ECHO_T}$ac_ct_CC" >&6
2055 else
2056   echo "$as_me:$LINENO: result: no" >&5
2057 echo "${ECHO_T}no" >&6
2058 fi
2059
2060   test -n "$ac_ct_CC" && break
2061 done
2062
2063   CC=$ac_ct_CC
2064 fi
2065
2066
2067 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2068 See \`config.log' for more details." >&5
2069 echo "$as_me: error: no acceptable C compiler found in \$PATH
2070 See \`config.log' for more details." >&2;}
2071    { (exit 1); exit 1; }; }
2072
2073 # Provide some information about the compiler.
2074 echo "$as_me:$LINENO:" \
2075      "checking for C compiler version" >&5
2076 ac_compiler=`set X $ac_compile; echo $2`
2077 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2078   (eval $ac_compiler --version </dev/null >&5) 2>&5
2079   ac_status=$?
2080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2081   (exit $ac_status); }
2082 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2083   (eval $ac_compiler -v </dev/null >&5) 2>&5
2084   ac_status=$?
2085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2086   (exit $ac_status); }
2087 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2088   (eval $ac_compiler -V </dev/null >&5) 2>&5
2089   ac_status=$?
2090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2091   (exit $ac_status); }
2092
2093 cat >conftest.$ac_ext <<_ACEOF
2094 /* confdefs.h.  */
2095 _ACEOF
2096 cat confdefs.h >>conftest.$ac_ext
2097 cat >>conftest.$ac_ext <<_ACEOF
2098 /* end confdefs.h.  */
2099
2100 int
2101 main ()
2102 {
2103
2104   ;
2105   return 0;
2106 }
2107 _ACEOF
2108 ac_clean_files_save=$ac_clean_files
2109 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2110 # Try to create an executable without -o first, disregard a.out.
2111 # It will help us diagnose broken compilers, and finding out an intuition
2112 # of exeext.
2113 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2114 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2115 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2116 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2117   (eval $ac_link_default) 2>&5
2118   ac_status=$?
2119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2120   (exit $ac_status); }; then
2121   # Find the output, starting from the most likely.  This scheme is
2122 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2123 # resort.
2124
2125 # Be careful to initialize this variable, since it used to be cached.
2126 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2127 ac_cv_exeext=
2128 # b.out is created by i960 compilers.
2129 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2130 do
2131   test -f "$ac_file" || continue
2132   case $ac_file in
2133     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2134         ;;
2135     conftest.$ac_ext )
2136         # This is the source file.
2137         ;;
2138     [ab].out )
2139         # We found the default executable, but exeext='' is most
2140         # certainly right.
2141         break;;
2142     *.* )
2143         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2144         # FIXME: I believe we export ac_cv_exeext for Libtool,
2145         # but it would be cool to find out if it's true.  Does anybody
2146         # maintain Libtool? --akim.
2147         export ac_cv_exeext
2148         break;;
2149     * )
2150         break;;
2151   esac
2152 done
2153 else
2154   echo "$as_me: failed program was:" >&5
2155 sed 's/^/| /' conftest.$ac_ext >&5
2156
2157 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2158 See \`config.log' for more details." >&5
2159 echo "$as_me: error: C compiler cannot create executables
2160 See \`config.log' for more details." >&2;}
2161    { (exit 77); exit 77; }; }
2162 fi
2163
2164 ac_exeext=$ac_cv_exeext
2165 echo "$as_me:$LINENO: result: $ac_file" >&5
2166 echo "${ECHO_T}$ac_file" >&6
2167
2168 # Check the compiler produces executables we can run.  If not, either
2169 # the compiler is broken, or we cross compile.
2170 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2171 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2172 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2173 # If not cross compiling, check that we can run a simple program.
2174 if test "$cross_compiling" != yes; then
2175   if { ac_try='./$ac_file'
2176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2177   (eval $ac_try) 2>&5
2178   ac_status=$?
2179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180   (exit $ac_status); }; }; then
2181     cross_compiling=no
2182   else
2183     if test "$cross_compiling" = maybe; then
2184         cross_compiling=yes
2185     else
2186         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2187 If you meant to cross compile, use \`--host'.
2188 See \`config.log' for more details." >&5
2189 echo "$as_me: error: cannot run C compiled programs.
2190 If you meant to cross compile, use \`--host'.
2191 See \`config.log' for more details." >&2;}
2192    { (exit 1); exit 1; }; }
2193     fi
2194   fi
2195 fi
2196 echo "$as_me:$LINENO: result: yes" >&5
2197 echo "${ECHO_T}yes" >&6
2198
2199 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2200 ac_clean_files=$ac_clean_files_save
2201 # Check the compiler produces executables we can run.  If not, either
2202 # the compiler is broken, or we cross compile.
2203 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2204 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2205 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2206 echo "${ECHO_T}$cross_compiling" >&6
2207
2208 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2209 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2211   (eval $ac_link) 2>&5
2212   ac_status=$?
2213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2214   (exit $ac_status); }; then
2215   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2216 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2217 # work properly (i.e., refer to `conftest.exe'), while it won't with
2218 # `rm'.
2219 for ac_file in conftest.exe conftest conftest.*; do
2220   test -f "$ac_file" || continue
2221   case $ac_file in
2222     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2223     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2224           export ac_cv_exeext
2225           break;;
2226     * ) break;;
2227   esac
2228 done
2229 else
2230   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2231 See \`config.log' for more details." >&5
2232 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2233 See \`config.log' for more details." >&2;}
2234    { (exit 1); exit 1; }; }
2235 fi
2236
2237 rm -f conftest$ac_cv_exeext
2238 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2239 echo "${ECHO_T}$ac_cv_exeext" >&6
2240
2241 rm -f conftest.$ac_ext
2242 EXEEXT=$ac_cv_exeext
2243 ac_exeext=$EXEEXT
2244 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2245 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2246 if test "${ac_cv_objext+set}" = set; then
2247   echo $ECHO_N "(cached) $ECHO_C" >&6
2248 else
2249   cat >conftest.$ac_ext <<_ACEOF
2250 /* confdefs.h.  */
2251 _ACEOF
2252 cat confdefs.h >>conftest.$ac_ext
2253 cat >>conftest.$ac_ext <<_ACEOF
2254 /* end confdefs.h.  */
2255
2256 int
2257 main ()
2258 {
2259
2260   ;
2261   return 0;
2262 }
2263 _ACEOF
2264 rm -f conftest.o conftest.obj
2265 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2266   (eval $ac_compile) 2>&5
2267   ac_status=$?
2268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269   (exit $ac_status); }; then
2270   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2271   case $ac_file in
2272     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2273     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2274        break;;
2275   esac
2276 done
2277 else
2278   echo "$as_me: failed program was:" >&5
2279 sed 's/^/| /' conftest.$ac_ext >&5
2280
2281 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2282 See \`config.log' for more details." >&5
2283 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2284 See \`config.log' for more details." >&2;}
2285    { (exit 1); exit 1; }; }
2286 fi
2287
2288 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2289 fi
2290 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2291 echo "${ECHO_T}$ac_cv_objext" >&6
2292 OBJEXT=$ac_cv_objext
2293 ac_objext=$OBJEXT
2294 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2295 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2296 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2297   echo $ECHO_N "(cached) $ECHO_C" >&6
2298 else
2299   cat >conftest.$ac_ext <<_ACEOF
2300 /* confdefs.h.  */
2301 _ACEOF
2302 cat confdefs.h >>conftest.$ac_ext
2303 cat >>conftest.$ac_ext <<_ACEOF
2304 /* end confdefs.h.  */
2305
2306 int
2307 main ()
2308 {
2309 #ifndef __GNUC__
2310        choke me
2311 #endif
2312
2313   ;
2314   return 0;
2315 }
2316 _ACEOF
2317 rm -f conftest.$ac_objext
2318 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2319   (eval $ac_compile) 2>conftest.er1
2320   ac_status=$?
2321   grep -v '^ *+' conftest.er1 >conftest.err
2322   rm -f conftest.er1
2323   cat conftest.err >&5
2324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2325   (exit $ac_status); } &&
2326          { ac_try='test -z "$ac_c_werror_flag"
2327                          || test ! -s conftest.err'
2328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2329   (eval $ac_try) 2>&5
2330   ac_status=$?
2331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2332   (exit $ac_status); }; } &&
2333          { ac_try='test -s conftest.$ac_objext'
2334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2335   (eval $ac_try) 2>&5
2336   ac_status=$?
2337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2338   (exit $ac_status); }; }; then
2339   ac_compiler_gnu=yes
2340 else
2341   echo "$as_me: failed program was:" >&5
2342 sed 's/^/| /' conftest.$ac_ext >&5
2343
2344 ac_compiler_gnu=no
2345 fi
2346 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2347 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2348
2349 fi
2350 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2351 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2352 GCC=`test $ac_compiler_gnu = yes && echo yes`
2353 ac_test_CFLAGS=${CFLAGS+set}
2354 ac_save_CFLAGS=$CFLAGS
2355 CFLAGS="-g"
2356 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2357 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2358 if test "${ac_cv_prog_cc_g+set}" = set; then
2359   echo $ECHO_N "(cached) $ECHO_C" >&6
2360 else
2361   cat >conftest.$ac_ext <<_ACEOF
2362 /* confdefs.h.  */
2363 _ACEOF
2364 cat confdefs.h >>conftest.$ac_ext
2365 cat >>conftest.$ac_ext <<_ACEOF
2366 /* end confdefs.h.  */
2367
2368 int
2369 main ()
2370 {
2371
2372   ;
2373   return 0;
2374 }
2375 _ACEOF
2376 rm -f conftest.$ac_objext
2377 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2378   (eval $ac_compile) 2>conftest.er1
2379   ac_status=$?
2380   grep -v '^ *+' conftest.er1 >conftest.err
2381   rm -f conftest.er1
2382   cat conftest.err >&5
2383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2384   (exit $ac_status); } &&
2385          { ac_try='test -z "$ac_c_werror_flag"
2386                          || test ! -s conftest.err'
2387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2388   (eval $ac_try) 2>&5
2389   ac_status=$?
2390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2391   (exit $ac_status); }; } &&
2392          { ac_try='test -s conftest.$ac_objext'
2393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2394   (eval $ac_try) 2>&5
2395   ac_status=$?
2396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397   (exit $ac_status); }; }; then
2398   ac_cv_prog_cc_g=yes
2399 else
2400   echo "$as_me: failed program was:" >&5
2401 sed 's/^/| /' conftest.$ac_ext >&5
2402
2403 ac_cv_prog_cc_g=no
2404 fi
2405 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2406 fi
2407 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2408 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2409 if test "$ac_test_CFLAGS" = set; then
2410   CFLAGS=$ac_save_CFLAGS
2411 elif test $ac_cv_prog_cc_g = yes; then
2412   if test "$GCC" = yes; then
2413     CFLAGS="-g -O2"
2414   else
2415     CFLAGS="-g"
2416   fi
2417 else
2418   if test "$GCC" = yes; then
2419     CFLAGS="-O2"
2420   else
2421     CFLAGS=
2422   fi
2423 fi
2424 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2425 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2426 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2427   echo $ECHO_N "(cached) $ECHO_C" >&6
2428 else
2429   ac_cv_prog_cc_stdc=no
2430 ac_save_CC=$CC
2431 cat >conftest.$ac_ext <<_ACEOF
2432 /* confdefs.h.  */
2433 _ACEOF
2434 cat confdefs.h >>conftest.$ac_ext
2435 cat >>conftest.$ac_ext <<_ACEOF
2436 /* end confdefs.h.  */
2437 #include <stdarg.h>
2438 #include <stdio.h>
2439 #include <sys/types.h>
2440 #include <sys/stat.h>
2441 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2442 struct buf { int x; };
2443 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2444 static char *e (p, i)
2445      char **p;
2446      int i;
2447 {
2448   return p[i];
2449 }
2450 static char *f (char * (*g) (char **, int), char **p, ...)
2451 {
2452   char *s;
2453   va_list v;
2454   va_start (v,p);
2455   s = g (p, va_arg (v,int));
2456   va_end (v);
2457   return s;
2458 }
2459
2460 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2461    function prototypes and stuff, but not '\xHH' hex character constants.
2462    These don't provoke an error unfortunately, instead are silently treated
2463    as 'x'.  The following induces an error, until -std1 is added to get
2464    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2465    array size at least.  It's necessary to write '\x00'==0 to get something
2466    that's true only with -std1.  */
2467 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2468
2469 int test (int i, double x);
2470 struct s1 {int (*f) (int a);};
2471 struct s2 {int (*f) (double a);};
2472 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2473 int argc;
2474 char **argv;
2475 int
2476 main ()
2477 {
2478 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2479   ;
2480   return 0;
2481 }
2482 _ACEOF
2483 # Don't try gcc -ansi; that turns off useful extensions and
2484 # breaks some systems' header files.
2485 # AIX                   -qlanglvl=ansi
2486 # Ultrix and OSF/1      -std1
2487 # HP-UX 10.20 and later -Ae
2488 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2489 # SVR4                  -Xc -D__EXTENSIONS__
2490 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2491 do
2492   CC="$ac_save_CC $ac_arg"
2493   rm -f conftest.$ac_objext
2494 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2495   (eval $ac_compile) 2>conftest.er1
2496   ac_status=$?
2497   grep -v '^ *+' conftest.er1 >conftest.err
2498   rm -f conftest.er1
2499   cat conftest.err >&5
2500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2501   (exit $ac_status); } &&
2502          { ac_try='test -z "$ac_c_werror_flag"
2503                          || test ! -s conftest.err'
2504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2505   (eval $ac_try) 2>&5
2506   ac_status=$?
2507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508   (exit $ac_status); }; } &&
2509          { ac_try='test -s conftest.$ac_objext'
2510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2511   (eval $ac_try) 2>&5
2512   ac_status=$?
2513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2514   (exit $ac_status); }; }; then
2515   ac_cv_prog_cc_stdc=$ac_arg
2516 break
2517 else
2518   echo "$as_me: failed program was:" >&5
2519 sed 's/^/| /' conftest.$ac_ext >&5
2520
2521 fi
2522 rm -f conftest.err conftest.$ac_objext
2523 done
2524 rm -f conftest.$ac_ext conftest.$ac_objext
2525 CC=$ac_save_CC
2526
2527 fi
2528
2529 case "x$ac_cv_prog_cc_stdc" in
2530   x|xno)
2531     echo "$as_me:$LINENO: result: none needed" >&5
2532 echo "${ECHO_T}none needed" >&6 ;;
2533   *)
2534     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2535 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2536     CC="$CC $ac_cv_prog_cc_stdc" ;;
2537 esac
2538
2539 # Some people use a C++ compiler to compile C.  Since we use `exit',
2540 # in C++ we need to declare it.  In case someone uses the same compiler
2541 # for both compiling C and C++ we need to have the C++ compiler decide
2542 # the declaration of exit, since it's the most demanding environment.
2543 cat >conftest.$ac_ext <<_ACEOF
2544 #ifndef __cplusplus
2545   choke me
2546 #endif
2547 _ACEOF
2548 rm -f conftest.$ac_objext
2549 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2550   (eval $ac_compile) 2>conftest.er1
2551   ac_status=$?
2552   grep -v '^ *+' conftest.er1 >conftest.err
2553   rm -f conftest.er1
2554   cat conftest.err >&5
2555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2556   (exit $ac_status); } &&
2557          { ac_try='test -z "$ac_c_werror_flag"
2558                          || test ! -s conftest.err'
2559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2560   (eval $ac_try) 2>&5
2561   ac_status=$?
2562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2563   (exit $ac_status); }; } &&
2564          { ac_try='test -s conftest.$ac_objext'
2565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2566   (eval $ac_try) 2>&5
2567   ac_status=$?
2568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2569   (exit $ac_status); }; }; then
2570   for ac_declaration in \
2571    '' \
2572    'extern "C" void std::exit (int) throw (); using std::exit;' \
2573    'extern "C" void std::exit (int); using std::exit;' \
2574    'extern "C" void exit (int) throw ();' \
2575    'extern "C" void exit (int);' \
2576    'void exit (int);'
2577 do
2578   cat >conftest.$ac_ext <<_ACEOF
2579 /* confdefs.h.  */
2580 _ACEOF
2581 cat confdefs.h >>conftest.$ac_ext
2582 cat >>conftest.$ac_ext <<_ACEOF
2583 /* end confdefs.h.  */
2584 $ac_declaration
2585 #include <stdlib.h>
2586 int
2587 main ()
2588 {
2589 exit (42);
2590   ;
2591   return 0;
2592 }
2593 _ACEOF
2594 rm -f conftest.$ac_objext
2595 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2596   (eval $ac_compile) 2>conftest.er1
2597   ac_status=$?
2598   grep -v '^ *+' conftest.er1 >conftest.err
2599   rm -f conftest.er1
2600   cat conftest.err >&5
2601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2602   (exit $ac_status); } &&
2603          { ac_try='test -z "$ac_c_werror_flag"
2604                          || test ! -s conftest.err'
2605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2606   (eval $ac_try) 2>&5
2607   ac_status=$?
2608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2609   (exit $ac_status); }; } &&
2610          { ac_try='test -s conftest.$ac_objext'
2611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2612   (eval $ac_try) 2>&5
2613   ac_status=$?
2614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2615   (exit $ac_status); }; }; then
2616   :
2617 else
2618   echo "$as_me: failed program was:" >&5
2619 sed 's/^/| /' conftest.$ac_ext >&5
2620
2621 continue
2622 fi
2623 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2624   cat >conftest.$ac_ext <<_ACEOF
2625 /* confdefs.h.  */
2626 _ACEOF
2627 cat confdefs.h >>conftest.$ac_ext
2628 cat >>conftest.$ac_ext <<_ACEOF
2629 /* end confdefs.h.  */
2630 $ac_declaration
2631 int
2632 main ()
2633 {
2634 exit (42);
2635   ;
2636   return 0;
2637 }
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   break
2662 else
2663   echo "$as_me: failed program was:" >&5
2664 sed 's/^/| /' conftest.$ac_ext >&5
2665
2666 fi
2667 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2668 done
2669 rm -f conftest*
2670 if test -n "$ac_declaration"; then
2671   echo '#ifdef __cplusplus' >>confdefs.h
2672   echo $ac_declaration      >>confdefs.h
2673   echo '#endif'             >>confdefs.h
2674 fi
2675
2676 else
2677   echo "$as_me: failed program was:" >&5
2678 sed 's/^/| /' conftest.$ac_ext >&5
2679
2680 fi
2681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2682 ac_ext=c
2683 ac_cpp='$CPP $CPPFLAGS'
2684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2687
2688
2689 unset CFLAGS
2690
2691 #
2692 # Read the template
2693 #
2694 . "$srcdir/src/template/$template" || exit
2695
2696 # CFLAGS are selected so:
2697 # If the user specifies something in the environment, that is used.
2698 # else:  If the template file set something, that is used.
2699 # else:  If the compiler is GCC, then we use -O2.
2700 # else:  If the compiler is something else, then we use -0.
2701
2702 if test "$ac_env_CFLAGS_set" = set; then
2703   CFLAGS=$ac_env_CFLAGS_value
2704 elif test "${CFLAGS+set}" = set; then
2705   : # (keep what template set)
2706 elif test "$GCC" = yes; then
2707   CFLAGS="-O2"
2708 else
2709   # if the user selected debug mode, don't use -O
2710   if test "$enable_debug" != yes; then
2711     CFLAGS="-O"
2712   fi
2713 fi
2714
2715 if test "$GCC" = yes; then
2716   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2717
2718   # Some versions of GCC support some additional useful warning flags.
2719   # Check whether they are supported, and add them to CFLAGS if so.
2720   echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2721 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2722 pgac_save_CFLAGS=$CFLAGS
2723 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2724 cat >conftest.$ac_ext <<_ACEOF
2725 /* confdefs.h.  */
2726 _ACEOF
2727 cat confdefs.h >>conftest.$ac_ext
2728 cat >>conftest.$ac_ext <<_ACEOF
2729 /* end confdefs.h.  */
2730
2731 int
2732 main ()
2733 {
2734
2735   ;
2736   return 0;
2737 }
2738 _ACEOF
2739 rm -f conftest.$ac_objext
2740 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2741   (eval $ac_compile) 2>conftest.er1
2742   ac_status=$?
2743   grep -v '^ *+' conftest.er1 >conftest.err
2744   rm -f conftest.er1
2745   cat conftest.err >&5
2746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2747   (exit $ac_status); } &&
2748          { ac_try='test -z "$ac_c_werror_flag"
2749                          || test ! -s conftest.err'
2750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2751   (eval $ac_try) 2>&5
2752   ac_status=$?
2753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2754   (exit $ac_status); }; } &&
2755          { ac_try='test -s conftest.$ac_objext'
2756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2757   (eval $ac_try) 2>&5
2758   ac_status=$?
2759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2760   (exit $ac_status); }; }; then
2761   echo "$as_me:$LINENO: result: yes" >&5
2762 echo "${ECHO_T}yes" >&6
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 sed 's/^/| /' conftest.$ac_ext >&5
2766
2767 CFLAGS="$pgac_save_CFLAGS"
2768                     echo "$as_me:$LINENO: result: no" >&5
2769 echo "${ECHO_T}no" >&6
2770 fi
2771 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2772
2773   echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2774 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2775 pgac_save_CFLAGS=$CFLAGS
2776 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2777 cat >conftest.$ac_ext <<_ACEOF
2778 /* confdefs.h.  */
2779 _ACEOF
2780 cat confdefs.h >>conftest.$ac_ext
2781 cat >>conftest.$ac_ext <<_ACEOF
2782 /* end confdefs.h.  */
2783
2784 int
2785 main ()
2786 {
2787
2788   ;
2789   return 0;
2790 }
2791 _ACEOF
2792 rm -f conftest.$ac_objext
2793 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2794   (eval $ac_compile) 2>conftest.er1
2795   ac_status=$?
2796   grep -v '^ *+' conftest.er1 >conftest.err
2797   rm -f conftest.er1
2798   cat conftest.err >&5
2799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800   (exit $ac_status); } &&
2801          { ac_try='test -z "$ac_c_werror_flag"
2802                          || test ! -s conftest.err'
2803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2804   (eval $ac_try) 2>&5
2805   ac_status=$?
2806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2807   (exit $ac_status); }; } &&
2808          { ac_try='test -s conftest.$ac_objext'
2809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2810   (eval $ac_try) 2>&5
2811   ac_status=$?
2812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2813   (exit $ac_status); }; }; then
2814   echo "$as_me:$LINENO: result: yes" >&5
2815 echo "${ECHO_T}yes" >&6
2816 else
2817   echo "$as_me: failed program was:" >&5
2818 sed 's/^/| /' conftest.$ac_ext >&5
2819
2820 CFLAGS="$pgac_save_CFLAGS"
2821                     echo "$as_me:$LINENO: result: no" >&5
2822 echo "${ECHO_T}no" >&6
2823 fi
2824 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2825
2826
2827   # Disable strict-aliasing rules; needed for gcc 3.3+
2828   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
2829 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
2830 pgac_save_CFLAGS=$CFLAGS
2831 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
2832 cat >conftest.$ac_ext <<_ACEOF
2833 /* confdefs.h.  */
2834 _ACEOF
2835 cat confdefs.h >>conftest.$ac_ext
2836 cat >>conftest.$ac_ext <<_ACEOF
2837 /* end confdefs.h.  */
2838
2839 int
2840 main ()
2841 {
2842
2843   ;
2844   return 0;
2845 }
2846 _ACEOF
2847 rm -f conftest.$ac_objext
2848 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2849   (eval $ac_compile) 2>conftest.er1
2850   ac_status=$?
2851   grep -v '^ *+' conftest.er1 >conftest.err
2852   rm -f conftest.er1
2853   cat conftest.err >&5
2854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2855   (exit $ac_status); } &&
2856          { ac_try='test -z "$ac_c_werror_flag"
2857                          || test ! -s conftest.err'
2858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2859   (eval $ac_try) 2>&5
2860   ac_status=$?
2861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2862   (exit $ac_status); }; } &&
2863          { ac_try='test -s conftest.$ac_objext'
2864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2865   (eval $ac_try) 2>&5
2866   ac_status=$?
2867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2868   (exit $ac_status); }; }; then
2869   echo "$as_me:$LINENO: result: yes" >&5
2870 echo "${ECHO_T}yes" >&6
2871 else
2872   echo "$as_me: failed program was:" >&5
2873 sed 's/^/| /' conftest.$ac_ext >&5
2874
2875 CFLAGS="$pgac_save_CFLAGS"
2876                     echo "$as_me:$LINENO: result: no" >&5
2877 echo "${ECHO_T}no" >&6
2878 fi
2879 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2880
2881 fi
2882
2883 # supply -g if --enable-debug
2884 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2885   CFLAGS="$CFLAGS -g"
2886 fi
2887
2888 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2889 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2890
2891 # We already have this in Makefile.win32, but configure needs it too
2892 if test "$PORTNAME" = "win32"; then
2893   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
2894 fi
2895
2896 # Check if the compiler still works with the template settings
2897 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2898 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2899
2900 cat >conftest.$ac_ext <<_ACEOF
2901 /* confdefs.h.  */
2902 _ACEOF
2903 cat confdefs.h >>conftest.$ac_ext
2904 cat >>conftest.$ac_ext <<_ACEOF
2905 /* end confdefs.h.  */
2906
2907 int
2908 main ()
2909 {
2910 return 0;
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 rm -f conftest.$ac_objext conftest$ac_exeext
2916 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2917   (eval $ac_link) 2>conftest.er1
2918   ac_status=$?
2919   grep -v '^ *+' conftest.er1 >conftest.err
2920   rm -f conftest.er1
2921   cat conftest.err >&5
2922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2923   (exit $ac_status); } &&
2924          { ac_try='test -z "$ac_c_werror_flag"
2925                          || test ! -s conftest.err'
2926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2927   (eval $ac_try) 2>&5
2928   ac_status=$?
2929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2930   (exit $ac_status); }; } &&
2931          { ac_try='test -s conftest$ac_exeext'
2932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2933   (eval $ac_try) 2>&5
2934   ac_status=$?
2935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2936   (exit $ac_status); }; }; then
2937   echo "$as_me:$LINENO: result: yes" >&5
2938 echo "${ECHO_T}yes" >&6
2939 else
2940   echo "$as_me: failed program was:" >&5
2941 sed 's/^/| /' conftest.$ac_ext >&5
2942
2943 echo "$as_me:$LINENO: result: no" >&5
2944 echo "${ECHO_T}no" >&6
2945    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
2946 echo "$as_me: error: cannot proceed" >&2;}
2947    { (exit 1); exit 1; }; }
2948 fi
2949 rm -f conftest.err conftest.$ac_objext \
2950       conftest$ac_exeext conftest.$ac_ext
2951
2952 # Defend against gcc -ffast-math
2953 if test "$GCC" = yes; then
2954 cat >conftest.$ac_ext <<_ACEOF
2955 /* confdefs.h.  */
2956 _ACEOF
2957 cat confdefs.h >>conftest.$ac_ext
2958 cat >>conftest.$ac_ext <<_ACEOF
2959 /* end confdefs.h.  */
2960
2961 int
2962 main ()
2963 {
2964 #ifdef __FAST_MATH__
2965 choke me
2966 #endif
2967   ;
2968   return 0;
2969 }
2970 _ACEOF
2971 rm -f conftest.$ac_objext
2972 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2973   (eval $ac_compile) 2>conftest.er1
2974   ac_status=$?
2975   grep -v '^ *+' conftest.er1 >conftest.err
2976   rm -f conftest.er1
2977   cat conftest.err >&5
2978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2979   (exit $ac_status); } &&
2980          { ac_try='test -z "$ac_c_werror_flag"
2981                          || test ! -s conftest.err'
2982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2983   (eval $ac_try) 2>&5
2984   ac_status=$?
2985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2986   (exit $ac_status); }; } &&
2987          { ac_try='test -s conftest.$ac_objext'
2988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2989   (eval $ac_try) 2>&5
2990   ac_status=$?
2991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2992   (exit $ac_status); }; }; then
2993   :
2994 else
2995   echo "$as_me: failed program was:" >&5
2996 sed 's/^/| /' conftest.$ac_ext >&5
2997
2998 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
2999 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3000    { (exit 1); exit 1; }; }
3001 fi
3002 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3003 fi
3004
3005 ac_ext=c
3006 ac_cpp='$CPP $CPPFLAGS'
3007 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3008 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3009 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3010 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3011 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3012 # On Suns, sometimes $CPP names a directory.
3013 if test -n "$CPP" && test -d "$CPP"; then
3014   CPP=
3015 fi
3016 if test -z "$CPP"; then
3017   if test "${ac_cv_prog_CPP+set}" = set; then
3018   echo $ECHO_N "(cached) $ECHO_C" >&6
3019 else
3020       # Double quotes because CPP needs to be expanded
3021     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3022     do
3023       ac_preproc_ok=false
3024 for ac_c_preproc_warn_flag in '' yes
3025 do
3026   # Use a header file that comes with gcc, so configuring glibc
3027   # with a fresh cross-compiler works.
3028   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3029   # <limits.h> exists even on freestanding compilers.
3030   # On the NeXT, cc -E runs the code through the compiler's parser,
3031   # not just through cpp. "Syntax error" is here to catch this case.
3032   cat >conftest.$ac_ext <<_ACEOF
3033 /* confdefs.h.  */
3034 _ACEOF
3035 cat confdefs.h >>conftest.$ac_ext
3036 cat >>conftest.$ac_ext <<_ACEOF
3037 /* end confdefs.h.  */
3038 #ifdef __STDC__
3039 # include <limits.h>
3040 #else
3041 # include <assert.h>
3042 #endif
3043                      Syntax error
3044 _ACEOF
3045 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3046   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3047   ac_status=$?
3048   grep -v '^ *+' conftest.er1 >conftest.err
3049   rm -f conftest.er1
3050   cat conftest.err >&5
3051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3052   (exit $ac_status); } >/dev/null; then
3053   if test -s conftest.err; then
3054     ac_cpp_err=$ac_c_preproc_warn_flag
3055     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3056   else
3057     ac_cpp_err=
3058   fi
3059 else
3060   ac_cpp_err=yes
3061 fi
3062 if test -z "$ac_cpp_err"; then
3063   :
3064 else
3065   echo "$as_me: failed program was:" >&5
3066 sed 's/^/| /' conftest.$ac_ext >&5
3067
3068   # Broken: fails on valid input.
3069 continue
3070 fi
3071 rm -f conftest.err conftest.$ac_ext
3072
3073   # OK, works on sane cases.  Now check whether non-existent headers
3074   # can be detected and how.
3075   cat >conftest.$ac_ext <<_ACEOF
3076 /* confdefs.h.  */
3077 _ACEOF
3078 cat confdefs.h >>conftest.$ac_ext
3079 cat >>conftest.$ac_ext <<_ACEOF
3080 /* end confdefs.h.  */
3081 #include <ac_nonexistent.h>
3082 _ACEOF
3083 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3084   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3085   ac_status=$?
3086   grep -v '^ *+' conftest.er1 >conftest.err
3087   rm -f conftest.er1
3088   cat conftest.err >&5
3089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3090   (exit $ac_status); } >/dev/null; then
3091   if test -s conftest.err; then
3092     ac_cpp_err=$ac_c_preproc_warn_flag
3093     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3094   else
3095     ac_cpp_err=
3096   fi
3097 else
3098   ac_cpp_err=yes
3099 fi
3100 if test -z "$ac_cpp_err"; then
3101   # Broken: success on invalid input.
3102 continue
3103 else
3104   echo "$as_me: failed program was:" >&5
3105 sed 's/^/| /' conftest.$ac_ext >&5
3106
3107   # Passes both tests.
3108 ac_preproc_ok=:
3109 break
3110 fi
3111 rm -f conftest.err conftest.$ac_ext
3112
3113 done
3114 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3115 rm -f conftest.err conftest.$ac_ext
3116 if $ac_preproc_ok; then
3117   break
3118 fi
3119
3120     done
3121     ac_cv_prog_CPP=$CPP
3122
3123 fi
3124   CPP=$ac_cv_prog_CPP
3125 else
3126   ac_cv_prog_CPP=$CPP
3127 fi
3128 echo "$as_me:$LINENO: result: $CPP" >&5
3129 echo "${ECHO_T}$CPP" >&6
3130 ac_preproc_ok=false
3131 for ac_c_preproc_warn_flag in '' yes
3132 do
3133   # Use a header file that comes with gcc, so configuring glibc
3134   # with a fresh cross-compiler works.
3135   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3136   # <limits.h> exists even on freestanding compilers.
3137   # On the NeXT, cc -E runs the code through the compiler's parser,
3138   # not just through cpp. "Syntax error" is here to catch this case.
3139   cat >conftest.$ac_ext <<_ACEOF
3140 /* confdefs.h.  */
3141 _ACEOF
3142 cat confdefs.h >>conftest.$ac_ext
3143 cat >>conftest.$ac_ext <<_ACEOF
3144 /* end confdefs.h.  */
3145 #ifdef __STDC__
3146 # include <limits.h>
3147 #else
3148 # include <assert.h>
3149 #endif
3150                      Syntax error
3151 _ACEOF
3152 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3154   ac_status=$?
3155   grep -v '^ *+' conftest.er1 >conftest.err
3156   rm -f conftest.er1
3157   cat conftest.err >&5
3158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3159   (exit $ac_status); } >/dev/null; then
3160   if test -s conftest.err; then
3161     ac_cpp_err=$ac_c_preproc_warn_flag
3162     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3163   else
3164     ac_cpp_err=
3165   fi
3166 else
3167   ac_cpp_err=yes
3168 fi
3169 if test -z "$ac_cpp_err"; then
3170   :
3171 else
3172   echo "$as_me: failed program was:" >&5
3173 sed 's/^/| /' conftest.$ac_ext >&5
3174
3175   # Broken: fails on valid input.
3176 continue
3177 fi
3178 rm -f conftest.err conftest.$ac_ext
3179
3180   # OK, works on sane cases.  Now check whether non-existent headers
3181   # can be detected and how.
3182   cat >conftest.$ac_ext <<_ACEOF
3183 /* confdefs.h.  */
3184 _ACEOF
3185 cat confdefs.h >>conftest.$ac_ext
3186 cat >>conftest.$ac_ext <<_ACEOF
3187 /* end confdefs.h.  */
3188 #include <ac_nonexistent.h>
3189 _ACEOF
3190 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3191   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3192   ac_status=$?
3193   grep -v '^ *+' conftest.er1 >conftest.err
3194   rm -f conftest.er1
3195   cat conftest.err >&5
3196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3197   (exit $ac_status); } >/dev/null; then
3198   if test -s conftest.err; then
3199     ac_cpp_err=$ac_c_preproc_warn_flag
3200     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3201   else
3202     ac_cpp_err=
3203   fi
3204 else
3205   ac_cpp_err=yes
3206 fi
3207 if test -z "$ac_cpp_err"; then
3208   # Broken: success on invalid input.
3209 continue
3210 else
3211   echo "$as_me: failed program was:" >&5
3212 sed 's/^/| /' conftest.$ac_ext >&5
3213
3214   # Passes both tests.
3215 ac_preproc_ok=:
3216 break
3217 fi
3218 rm -f conftest.err conftest.$ac_ext
3219
3220 done
3221 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3222 rm -f conftest.err conftest.$ac_ext
3223 if $ac_preproc_ok; then
3224   :
3225 else
3226   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3227 See \`config.log' for more details." >&5
3228 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3229 See \`config.log' for more details." >&2;}
3230    { (exit 1); exit 1; }; }
3231 fi
3232
3233 ac_ext=c
3234 ac_cpp='$CPP $CPPFLAGS'
3235 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3236 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3237 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3238
3239
3240
3241 # Create compiler version string
3242 if test x"$GCC" = x"yes" ; then
3243   cc_string="GCC `${CC} --version | sed q`"
3244 else
3245   cc_string=$CC
3246 fi
3247
3248 cat >>confdefs.h <<_ACEOF
3249 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3250 _ACEOF
3251
3252
3253
3254 #
3255 # Set up TAS assembly code if needed; the template file has now had its
3256 # chance to request this.
3257 #
3258           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3259
3260
3261 if test "$need_tas" = yes ; then
3262   TAS=tas.o
3263 else
3264   TAS=""
3265 fi
3266
3267
3268
3269 #
3270 # Automatic dependency tracking
3271 #
3272
3273
3274 # Check whether --enable-depend or --disable-depend was given.
3275 if test "${enable_depend+set}" = set; then
3276   enableval="$enable_depend"
3277
3278   case $enableval in
3279     yes)
3280       autodepend=yes
3281       ;;
3282     no)
3283       :
3284       ;;
3285     *)
3286       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3287 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3288    { (exit 1); exit 1; }; }
3289       ;;
3290   esac
3291
3292 else
3293   enable_depend=no
3294
3295 fi;
3296
3297
3298
3299
3300 #
3301 # Enable assert checks
3302 #
3303
3304
3305 # Check whether --enable-cassert or --disable-cassert was given.
3306 if test "${enable_cassert+set}" = set; then
3307   enableval="$enable_cassert"
3308
3309   case $enableval in
3310     yes)
3311
3312 cat >>confdefs.h <<\_ACEOF
3313 #define USE_ASSERT_CHECKING 1
3314 _ACEOF
3315
3316       ;;
3317     no)
3318       :
3319       ;;
3320     *)
3321       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3322 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3323    { (exit 1); exit 1; }; }
3324       ;;
3325   esac
3326
3327 else
3328   enable_cassert=no
3329
3330 fi;
3331
3332
3333
3334 #
3335 # Include directories
3336 #
3337 ac_save_IFS=$IFS
3338 IFS="${IFS}${PATH_SEPARATOR}"
3339 # SRCH_INC comes from the template file
3340 for dir in $with_includes $SRCH_INC; do
3341   if test -d "$dir"; then
3342     INCLUDES="$INCLUDES -I$dir"
3343   else
3344     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3345 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3346   fi
3347 done
3348 IFS=$ac_save_IFS
3349
3350
3351
3352 #
3353 # Library directories
3354 #
3355 ac_save_IFS=$IFS
3356 IFS="${IFS}${PATH_SEPARATOR}"
3357 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3358 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3359   if test -d "$dir"; then
3360     LIBDIRS="$LIBDIRS -L$dir"
3361   else
3362     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3363 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3364   fi
3365 done
3366 IFS=$ac_save_IFS
3367
3368 #
3369 # Enable thread-safe client libraries
3370 #
3371 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3372 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3373
3374
3375 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3376 if test "${enable_thread_safety+set}" = set; then
3377   enableval="$enable_thread_safety"
3378
3379   case $enableval in
3380     yes)
3381       :
3382       ;;
3383     no)
3384       :
3385       ;;
3386     *)
3387       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3388 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3389    { (exit 1); exit 1; }; }
3390       ;;
3391   esac
3392
3393 else
3394   enable_thread_safety=no
3395
3396 fi;
3397
3398
3399
3400 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3401 if test "${enable_thread_safety_force+set}" = set; then
3402   enableval="$enable_thread_safety_force"
3403
3404   case $enableval in
3405     yes)
3406       :
3407       ;;
3408     no)
3409       :
3410       ;;
3411     *)
3412       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3413 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3414    { (exit 1); exit 1; }; }
3415       ;;
3416   esac
3417
3418 else
3419   enable_thread_safety_force=no
3420
3421 fi;
3422
3423 if test "$enable_thread_safety" = yes -o \
3424         "$enable_thread_safety_force" = yes; then
3425   enable_thread_safety="yes"    # for 'force'
3426
3427 cat >>confdefs.h <<\_ACEOF
3428 #define ENABLE_THREAD_SAFETY 1
3429 _ACEOF
3430
3431 fi
3432 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3433 echo "${ECHO_T}$enable_thread_safety" >&6
3434
3435
3436 #
3437 # Optionally build Tcl modules (PL/Tcl)
3438 #
3439 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3440 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3441
3442
3443
3444 # Check whether --with-tcl or --without-tcl was given.
3445 if test "${with_tcl+set}" = set; then
3446   withval="$with_tcl"
3447
3448   case $withval in
3449     yes)
3450       :
3451       ;;
3452     no)
3453       :
3454       ;;
3455     *)
3456       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3457 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3458    { (exit 1); exit 1; }; }
3459       ;;
3460   esac
3461
3462 else
3463   with_tcl=no
3464
3465 fi;
3466
3467 echo "$as_me:$LINENO: result: $with_tcl" >&5
3468 echo "${ECHO_T}$with_tcl" >&6
3469
3470
3471 # We see if the path to the Tcl/Tk configuration scripts is specified.
3472 # This will override the use of tclsh to find the paths to search.
3473
3474
3475
3476
3477 # Check whether --with-tclconfig or --without-tclconfig was given.
3478 if test "${with_tclconfig+set}" = set; then
3479   withval="$with_tclconfig"
3480
3481   case $withval in
3482     yes)
3483       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3484 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3485    { (exit 1); exit 1; }; }
3486       ;;
3487     no)
3488       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3489 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3490    { (exit 1); exit 1; }; }
3491       ;;
3492     *)
3493
3494       ;;
3495   esac
3496
3497 fi;
3498
3499
3500 #
3501 # Optionally build Perl modules (PL/Perl)
3502 #
3503 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3504 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3505
3506
3507
3508 # Check whether --with-perl or --without-perl was given.
3509 if test "${with_perl+set}" = set; then
3510   withval="$with_perl"
3511
3512   case $withval in
3513     yes)
3514       :
3515       ;;
3516     no)
3517       :
3518       ;;
3519     *)
3520       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3521 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3522    { (exit 1); exit 1; }; }
3523       ;;
3524   esac
3525
3526 else
3527   with_perl=no
3528
3529 fi;
3530
3531 echo "$as_me:$LINENO: result: $with_perl" >&5
3532 echo "${ECHO_T}$with_perl" >&6
3533
3534
3535 #
3536 # Optionally build Python modules (PL/Python)
3537 #
3538 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3539 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3540
3541
3542
3543 # Check whether --with-python or --without-python was given.
3544 if test "${with_python+set}" = set; then
3545   withval="$with_python"
3546
3547   case $withval in
3548     yes)
3549       :
3550       ;;
3551     no)
3552       :
3553       ;;
3554     *)
3555       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3556 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3557    { (exit 1); exit 1; }; }
3558       ;;
3559   esac
3560
3561 else
3562   with_python=no
3563
3564 fi;
3565
3566 echo "$as_me:$LINENO: result: $with_python" >&5
3567 echo "${ECHO_T}$with_python" >&6
3568
3569
3570 #
3571 # Kerberos 5
3572 #
3573 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3574 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3575
3576
3577
3578 # Check whether --with-krb5 or --without-krb5 was given.
3579 if test "${with_krb5+set}" = set; then
3580   withval="$with_krb5"
3581
3582   case $withval in
3583     yes)
3584
3585
3586 cat >>confdefs.h <<\_ACEOF
3587 #define KRB5 1
3588 _ACEOF
3589
3590   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3591
3592       ;;
3593     no)
3594       :
3595       ;;
3596     *)
3597       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3598 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3599    { (exit 1); exit 1; }; }
3600       ;;
3601   esac
3602
3603 else
3604   with_krb5=no
3605
3606 fi;
3607
3608 echo "$as_me:$LINENO: result: $with_krb5" >&5
3609 echo "${ECHO_T}$with_krb5" >&6
3610
3611
3612
3613
3614
3615
3616 #
3617 # Kerberos configuration parameters
3618 #
3619
3620
3621
3622 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3623 if test "${with_krb_srvnam+set}" = set; then
3624   withval="$with_krb_srvnam"
3625
3626   case $withval in
3627     yes)
3628       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3629 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3630    { (exit 1); exit 1; }; }
3631       ;;
3632     no)
3633       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3634 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3635    { (exit 1); exit 1; }; }
3636       ;;
3637     *)
3638
3639       ;;
3640   esac
3641
3642 else
3643   with_krb_srvnam="postgres"
3644 fi;
3645
3646
3647 cat >>confdefs.h <<_ACEOF
3648 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3649 _ACEOF
3650
3651
3652
3653 #
3654 # PAM
3655 #
3656 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3657 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3658
3659
3660
3661 # Check whether --with-pam or --without-pam was given.
3662 if test "${with_pam+set}" = set; then
3663   withval="$with_pam"
3664
3665   case $withval in
3666     yes)
3667
3668 cat >>confdefs.h <<\_ACEOF
3669 #define USE_PAM 1
3670 _ACEOF
3671
3672       ;;
3673     no)
3674       :
3675       ;;
3676     *)
3677       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3678 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3679    { (exit 1); exit 1; }; }
3680       ;;
3681   esac
3682
3683 else
3684   with_pam=no
3685
3686 fi;
3687
3688 echo "$as_me:$LINENO: result: $with_pam" >&5
3689 echo "${ECHO_T}$with_pam" >&6
3690
3691
3692
3693 #
3694 # Bonjour
3695 #
3696 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
3697 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
3698
3699
3700
3701 # Check whether --with-bonjour or --without-bonjour was given.
3702 if test "${with_bonjour+set}" = set; then
3703   withval="$with_bonjour"
3704
3705   case $withval in
3706     yes)
3707
3708 cat >>confdefs.h <<\_ACEOF
3709 #define USE_BONJOUR 1
3710 _ACEOF
3711
3712       ;;
3713     no)
3714       :
3715       ;;
3716     *)
3717       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
3718 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
3719    { (exit 1); exit 1; }; }
3720       ;;
3721   esac
3722
3723 else
3724   with_bonjour=no
3725
3726 fi;
3727
3728 echo "$as_me:$LINENO: result: $with_bonjour" >&5
3729 echo "${ECHO_T}$with_bonjour" >&6
3730
3731
3732
3733 #
3734 # OpenSSL
3735 #
3736 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3737 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
3738
3739
3740
3741 # Check whether --with-openssl or --without-openssl was given.
3742 if test "${with_openssl+set}" = set; then
3743   withval="$with_openssl"
3744
3745   case $withval in
3746     yes)
3747
3748 cat >>confdefs.h <<\_ACEOF
3749 #define USE_SSL 1
3750 _ACEOF
3751
3752       ;;
3753     no)
3754       :
3755       ;;
3756     *)
3757       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3758 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3759    { (exit 1); exit 1; }; }
3760       ;;
3761   esac
3762
3763 else
3764   with_openssl=no
3765
3766 fi;
3767
3768 echo "$as_me:$LINENO: result: $with_openssl" >&5
3769 echo "${ECHO_T}$with_openssl" >&6
3770
3771
3772
3773 #
3774 # Prefer libedit
3775 #
3776
3777
3778
3779 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
3780 if test "${with_libedit_preferred+set}" = set; then
3781   withval="$with_libedit_preferred"
3782
3783   case $withval in
3784     yes)
3785       :
3786       ;;
3787     no)
3788       :
3789       ;;
3790     *)
3791       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
3792 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
3793    { (exit 1); exit 1; }; }
3794       ;;
3795   esac
3796
3797 else
3798   with_libedit_preferred=no
3799
3800 fi;
3801
3802
3803
3804 #
3805 # Readline
3806 #
3807
3808
3809
3810 # Check whether --with-readline or --without-readline was given.
3811 if test "${with_readline+set}" = set; then
3812   withval="$with_readline"
3813
3814   case $withval in
3815     yes)
3816       :
3817       ;;
3818     no)
3819       :
3820       ;;
3821     *)
3822       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
3823 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
3824    { (exit 1); exit 1; }; }
3825       ;;
3826   esac
3827
3828 else
3829   with_readline=yes
3830
3831 fi;
3832
3833 # readline on MinGW has problems with backslashes in psql and other bugs.
3834 # This is particularly a problem with non-US code pages.
3835 # Therefore disable its use until we understand the cause. 2004-07-20
3836 if test "$PORTNAME" = "win32"; then
3837   if test "$with_readline" = yes; then
3838     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
3839 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
3840     with_readline=no
3841   fi
3842 fi
3843
3844
3845 #
3846 # Zlib
3847 #
3848
3849
3850
3851 # Check whether --with-zlib or --without-zlib was given.
3852 if test "${with_zlib+set}" = set; then
3853   withval="$with_zlib"
3854
3855   case $withval in
3856     yes)
3857       :
3858       ;;
3859     no)
3860       :
3861       ;;
3862     *)
3863       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
3864 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
3865    { (exit 1); exit 1; }; }
3866       ;;
3867   esac
3868
3869 else
3870   with_zlib=yes
3871
3872 fi;
3873
3874
3875
3876 #
3877 # Elf
3878 #
3879
3880 # Assume system is ELF if it predefines __ELF__ as 1,
3881 # otherwise believe host_os based default.
3882 case $host_os in
3883     freebsd1*|freebsd2*) elf=no;;
3884     freebsd3*|freebsd4*) elf=yes;;
3885 esac
3886
3887
3888 echo "$as_me:$LINENO: checking for egrep" >&5
3889 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3890 if test "${ac_cv_prog_egrep+set}" = set; then
3891   echo $ECHO_N "(cached) $ECHO_C" >&6
3892 else
3893   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3894     then ac_cv_prog_egrep='grep -E'
3895     else ac_cv_prog_egrep='egrep'
3896     fi
3897 fi
3898 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3899 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3900  EGREP=$ac_cv_prog_egrep
3901
3902
3903 cat >conftest.$ac_ext <<_ACEOF
3904 /* confdefs.h.  */
3905 _ACEOF
3906 cat confdefs.h >>conftest.$ac_ext
3907 cat >>conftest.$ac_ext <<_ACEOF
3908 /* end confdefs.h.  */
3909 #if __ELF__
3910   yes
3911 #endif
3912
3913 _ACEOF
3914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3915   $EGREP "yes" >/dev/null 2>&1; then
3916   ELF_SYS=true
3917 else
3918   if test "X$elf" = "Xyes" ; then
3919   ELF_SYS=true
3920 else
3921   ELF_SYS=
3922 fi
3923 fi
3924 rm -f conftest*
3925
3926
3927
3928 #
3929 # Assignments
3930 #
3931
3932 CPPFLAGS="$CPPFLAGS $INCLUDES"
3933 LDFLAGS="$LDFLAGS $LIBDIRS"
3934
3935 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
3936 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
3937 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
3938 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
3939
3940
3941
3942 for ac_prog in gawk mawk nawk awk
3943 do
3944   # Extract the first word of "$ac_prog", so it can be a program name with args.
3945 set dummy $ac_prog; ac_word=$2
3946 echo "$as_me:$LINENO: checking for $ac_word" >&5
3947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3948 if test "${ac_cv_prog_AWK+set}" = set; then
3949   echo $ECHO_N "(cached) $ECHO_C" >&6
3950 else
3951   if test -n "$AWK"; then
3952   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3953 else
3954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3955 for as_dir in $PATH
3956 do
3957   IFS=$as_save_IFS
3958   test -z "$as_dir" && as_dir=.
3959   for ac_exec_ext in '' $ac_executable_extensions; do
3960   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3961     ac_cv_prog_AWK="$ac_prog"
3962     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3963     break 2
3964   fi
3965 done
3966 done
3967
3968 fi
3969 fi
3970 AWK=$ac_cv_prog_AWK
3971 if test -n "$AWK"; then
3972   echo "$as_me:$LINENO: result: $AWK" >&5
3973 echo "${ECHO_T}$AWK" >&6
3974 else
3975   echo "$as_me:$LINENO: result: no" >&5
3976 echo "${ECHO_T}no" >&6
3977 fi
3978
3979   test -n "$AWK" && break
3980 done
3981
3982 echo "$as_me:$LINENO: checking for flex" >&5
3983 echo $ECHO_N "checking for flex... $ECHO_C" >&6
3984 if test "${pgac_cv_path_flex+set}" = set; then
3985   echo $ECHO_N "(cached) $ECHO_C" >&6
3986 else
3987   # Let the user override the test
3988 if test -n "$FLEX"; then
3989   pgac_cv_path_flex=$FLEX
3990 else
3991   pgac_save_IFS=$IFS
3992   IFS=$PATH_SEPARATOR
3993   for pgac_dir in $PATH; do
3994     IFS=$pgac_save_IFS
3995     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
3996       pgac_dir=`pwd`
3997     fi
3998     for pgac_prog in flex lex; do
3999       pgac_candidate="$pgac_dir/$pgac_prog"
4000       if test -f "$pgac_candidate" \
4001         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4002       then
4003         echo '%%'  > conftest.l
4004         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4005           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4006             pgac_broken_flex=$pgac_candidate
4007             continue
4008           fi
4009
4010           pgac_cv_path_flex=$pgac_candidate
4011           break 2
4012         fi
4013       fi
4014     done
4015   done
4016   rm -f conftest.l lex.yy.c
4017   : ${pgac_cv_path_flex=no}
4018 fi
4019
4020 fi
4021 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4022 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4023 if test x"$pgac_cv_path_flex" = x"no"; then
4024   if test -n "$pgac_broken_flex"; then
4025     { echo "$as_me:$LINENO: WARNING:
4026 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4027 *** should get version 2.5.4 or later." >&5
4028 echo "$as_me: WARNING:
4029 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4030 *** should get version 2.5.4 or later." >&2;}
4031   fi
4032
4033   { echo "$as_me:$LINENO: WARNING:
4034 *** Without Flex you will not be able to build PostgreSQL from CVS or
4035 *** change any of the scanner definition files.  You can obtain Flex from
4036 *** a GNU mirror site.  (If you are using the official distribution of
4037 *** PostgreSQL then you do not need to worry about this because the Flex
4038 *** output is pre-generated.)" >&5
4039 echo "$as_me: WARNING:
4040 *** Without Flex you will not be able to build PostgreSQL from CVS or
4041 *** change any of the scanner definition files.  You can obtain Flex from
4042 *** a GNU mirror site.  (If you are using the official distribution of
4043 *** PostgreSQL then you do not need to worry about this because the Flex
4044 *** output is pre-generated.)" >&2;}
4045 fi
4046
4047 if test x"$pgac_cv_path_flex" = x"no"; then
4048   FLEX=
4049 else
4050   FLEX=$pgac_cv_path_flex
4051 fi
4052
4053
4054
4055
4056 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4057 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4058 LN_S=$as_ln_s
4059 if test "$LN_S" = "ln -s"; then
4060   echo "$as_me:$LINENO: result: yes" >&5
4061 echo "${ECHO_T}yes" >&6
4062 else
4063   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4064 echo "${ECHO_T}no, using $LN_S" >&6
4065 fi
4066
4067
4068 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4069 if test "${with_gnu_ld+set}" = set; then
4070   withval="$with_gnu_ld"
4071   test "$withval" = no || with_gnu_ld=yes
4072 else
4073   with_gnu_ld=no
4074 fi;
4075 ac_prog=ld
4076 if test "$GCC" = yes; then
4077   # Check if gcc -print-prog-name=ld gives a path.
4078   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4079 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4080   case $host in
4081   *-*-mingw*)
4082     # gcc leaves a trailing carriage return which upsets mingw
4083     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4084   *)
4085     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4086   esac
4087   case "$ac_prog" in
4088     # Accept absolute paths.
4089     [\\/]* | [A-Za-z]:[\\/]*)
4090       re_direlt='/[^/][^/]*/\.\./'
4091       # Canonicalize the path of ld
4092       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4093       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4094         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4095       done
4096       test -z "$LD" && LD="$ac_prog"
4097       ;;
4098   "")
4099     # If it fails, then pretend we aren't using GCC.
4100     ac_prog=ld
4101     ;;
4102   *)
4103     # If it is relative, then search for the first ld in PATH.
4104     with_gnu_ld=unknown
4105     ;;
4106   esac
4107 elif test "$with_gnu_ld" = yes; then
4108   echo "$as_me:$LINENO: checking for GNU ld" >&5
4109 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4110 else
4111   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4112 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4113 fi
4114 if test "${ac_cv_path_LD+set}" = set; then
4115   echo $ECHO_N "(cached) $ECHO_C" >&6
4116 else
4117   if test -z "$LD"; then
4118   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4119   for ac_dir in $PATH; do
4120     test -z "$ac_dir" && ac_dir=.
4121     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4122       ac_cv_path_LD="$ac_dir/$ac_prog"
4123       # Check to see if the program is GNU ld.  I'd rather use --version,
4124       # but apparently some GNU ld's only accept -v.
4125       # Break only if it was the GNU/non-GNU ld that we prefer.
4126       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4127         test "$with_gnu_ld" != no && break
4128       else
4129         test "$with_gnu_ld" != yes && break
4130       fi
4131     fi
4132   done
4133   IFS="$ac_save_ifs"
4134 else
4135   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4136 fi
4137 fi
4138
4139 LD="$ac_cv_path_LD"
4140 if test -n "$LD"; then
4141   echo "$as_me:$LINENO: result: $LD" >&5
4142 echo "${ECHO_T}$LD" >&6
4143 else
4144   echo "$as_me:$LINENO: result: no" >&5
4145 echo "${ECHO_T}no" >&6
4146 fi
4147 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4148 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4149    { (exit 1); exit 1; }; }
4150 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4151 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4152 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4153   echo $ECHO_N "(cached) $ECHO_C" >&6
4154 else
4155   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4156 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4157   ac_cv_prog_gnu_ld=yes
4158 else
4159   ac_cv_prog_gnu_ld=no
4160 fi
4161 fi
4162 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4163 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4164 with_gnu_ld=$ac_cv_prog_gnu_ld
4165
4166
4167
4168
4169 case $host_os in sysv5*)
4170   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4171 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4172 if test "${pgac_cv_prog_ld_R+set}" = set; then
4173   echo $ECHO_N "(cached) $ECHO_C" >&6
4174 else
4175
4176     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4177     cat >conftest.$ac_ext <<_ACEOF
4178 /* confdefs.h.  */
4179 _ACEOF
4180 cat confdefs.h >>conftest.$ac_ext
4181 cat >>conftest.$ac_ext <<_ACEOF
4182 /* end confdefs.h.  */
4183
4184 int
4185 main ()
4186 {
4187
4188   ;
4189   return 0;
4190 }
4191 _ACEOF
4192 rm -f conftest.$ac_objext conftest$ac_exeext
4193 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4194   (eval $ac_link) 2>conftest.er1
4195   ac_status=$?
4196   grep -v '^ *+' conftest.er1 >conftest.err
4197   rm -f conftest.er1
4198   cat conftest.err >&5
4199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200   (exit $ac_status); } &&
4201          { ac_try='test -z "$ac_c_werror_flag"
4202                          || test ! -s conftest.err'
4203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4204   (eval $ac_try) 2>&5
4205   ac_status=$?
4206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4207   (exit $ac_status); }; } &&
4208          { ac_try='test -s conftest$ac_exeext'
4209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4210   (eval $ac_try) 2>&5
4211   ac_status=$?
4212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4213   (exit $ac_status); }; }; then
4214   pgac_cv_prog_ld_R=yes
4215 else
4216   echo "$as_me: failed program was:" >&5
4217 sed 's/^/| /' conftest.$ac_ext >&5
4218
4219 pgac_cv_prog_ld_R=no
4220 fi
4221 rm -f conftest.err conftest.$ac_objext \
4222       conftest$ac_exeext conftest.$ac_ext
4223     LDFLAGS=$pgac_save_LDFLAGS
4224
4225 fi
4226 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4227 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4228   ld_R_works=$pgac_cv_prog_ld_R
4229
4230 esac
4231 if test -n "$ac_tool_prefix"; then
4232   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4233 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4234 echo "$as_me:$LINENO: checking for $ac_word" >&5
4235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4236 if test "${ac_cv_prog_RANLIB+set}" = set; then
4237   echo $ECHO_N "(cached) $ECHO_C" >&6
4238 else
4239   if test -n "$RANLIB"; then
4240   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4241 else
4242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4243 for as_dir in $PATH
4244 do
4245   IFS=$as_save_IFS
4246   test -z "$as_dir" && as_dir=.
4247   for ac_exec_ext in '' $ac_executable_extensions; do
4248   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4249     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4250     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4251     break 2
4252   fi
4253 done
4254 done
4255
4256 fi
4257 fi
4258 RANLIB=$ac_cv_prog_RANLIB
4259 if test -n "$RANLIB"; then
4260   echo "$as_me:$LINENO: result: $RANLIB" >&5
4261 echo "${ECHO_T}$RANLIB" >&6
4262 else
4263   echo "$as_me:$LINENO: result: no" >&5
4264 echo "${ECHO_T}no" >&6
4265 fi
4266
4267 fi
4268 if test -z "$ac_cv_prog_RANLIB"; then
4269   ac_ct_RANLIB=$RANLIB
4270   # Extract the first word of "ranlib", so it can be a program name with args.
4271 set dummy ranlib; ac_word=$2
4272 echo "$as_me:$LINENO: checking for $ac_word" >&5
4273 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4274 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4275   echo $ECHO_N "(cached) $ECHO_C" >&6
4276 else
4277   if test -n "$ac_ct_RANLIB"; then
4278   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4279 else
4280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4281 for as_dir in $PATH
4282 do
4283   IFS=$as_save_IFS
4284   test -z "$as_dir" && as_dir=.
4285   for ac_exec_ext in '' $ac_executable_extensions; do
4286   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4287     ac_cv_prog_ac_ct_RANLIB="ranlib"
4288     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4289     break 2
4290   fi
4291 done
4292 done
4293
4294   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4295 fi
4296 fi
4297 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4298 if test -n "$ac_ct_RANLIB"; then
4299   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4300 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4301 else
4302   echo "$as_me:$LINENO: result: no" >&5
4303 echo "${ECHO_T}no" >&6
4304 fi
4305
4306   RANLIB=$ac_ct_RANLIB
4307 else
4308   RANLIB="$ac_cv_prog_RANLIB"
4309 fi
4310
4311 for ac_prog in lorder
4312 do
4313   # Extract the first word of "$ac_prog", so it can be a program name with args.
4314 set dummy $ac_prog; ac_word=$2
4315 echo "$as_me:$LINENO: checking for $ac_word" >&5
4316 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4317 if test "${ac_cv_prog_LORDER+set}" = set; then
4318   echo $ECHO_N "(cached) $ECHO_C" >&6
4319 else
4320   if test -n "$LORDER"; then
4321   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
4322 else
4323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4324 for as_dir in $PATH
4325 do
4326   IFS=$as_save_IFS
4327   test -z "$as_dir" && as_dir=.
4328   for ac_exec_ext in '' $ac_executable_extensions; do
4329   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4330     ac_cv_prog_LORDER="$ac_prog"
4331     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4332     break 2
4333   fi
4334 done
4335 done
4336
4337 fi
4338 fi
4339 LORDER=$ac_cv_prog_LORDER
4340 if test -n "$LORDER"; then
4341   echo "$as_me:$LINENO: result: $LORDER" >&5
4342 echo "${ECHO_T}$LORDER" >&6
4343 else
4344   echo "$as_me:$LINENO: result: no" >&5
4345 echo "${ECHO_T}no" >&6
4346 fi
4347
4348   test -n "$LORDER" && break
4349 done
4350
4351 # Extract the first word of "tar", so it can be a program name with args.
4352 set dummy tar; ac_word=$2
4353 echo "$as_me:$LINENO: checking for $ac_word" >&5
4354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4355 if test "${ac_cv_path_TAR+set}" = set; then
4356   echo $ECHO_N "(cached) $ECHO_C" >&6
4357 else
4358   case $TAR in
4359   [\\/]* | ?:[\\/]*)
4360   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4361   ;;
4362   *)
4363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364 for as_dir in $PATH
4365 do
4366   IFS=$as_save_IFS
4367   test -z "$as_dir" && as_dir=.
4368   for ac_exec_ext in '' $ac_executable_extensions; do
4369   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4370     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4371     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4372     break 2
4373   fi
4374 done
4375 done
4376
4377   ;;
4378 esac
4379 fi
4380 TAR=$ac_cv_path_TAR
4381
4382 if test -n "$TAR"; then
4383   echo "$as_me:$LINENO: result: $TAR" >&5
4384 echo "${ECHO_T}$TAR" >&6
4385 else
4386   echo "$as_me:$LINENO: result: no" >&5
4387 echo "${ECHO_T}no" >&6
4388 fi
4389
4390
4391   if test -n "$ac_tool_prefix"; then
4392   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4393 set dummy ${ac_tool_prefix}strip; ac_word=$2
4394 echo "$as_me:$LINENO: checking for $ac_word" >&5
4395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4396 if test "${ac_cv_prog_STRIP+set}" = set; then
4397   echo $ECHO_N "(cached) $ECHO_C" >&6
4398 else
4399   if test -n "$STRIP"; then
4400   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4401 else
4402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403 for as_dir in $PATH
4404 do
4405   IFS=$as_save_IFS
4406   test -z "$as_dir" && as_dir=.
4407   for ac_exec_ext in '' $ac_executable_extensions; do
4408   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4410     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4411     break 2
4412   fi
4413 done
4414 done
4415
4416 fi
4417 fi
4418 STRIP=$ac_cv_prog_STRIP
4419 if test -n "$STRIP"; then
4420   echo "$as_me:$LINENO: result: $STRIP" >&5
4421 echo "${ECHO_T}$STRIP" >&6
4422 else
4423   echo "$as_me:$LINENO: result: no" >&5
4424 echo "${ECHO_T}no" >&6
4425 fi
4426
4427 fi
4428 if test -z "$ac_cv_prog_STRIP"; then
4429   ac_ct_STRIP=$STRIP
4430   # Extract the first word of "strip", so it can be a program name with args.
4431 set dummy strip; ac_word=$2
4432 echo "$as_me:$LINENO: checking for $ac_word" >&5
4433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4434 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4435   echo $ECHO_N "(cached) $ECHO_C" >&6
4436 else
4437   if test -n "$ac_ct_STRIP"; then
4438   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4439 else
4440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4441 for as_dir in $PATH
4442 do
4443   IFS=$as_save_IFS
4444   test -z "$as_dir" && as_dir=.
4445   for ac_exec_ext in '' $ac_executable_extensions; do
4446   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4447     ac_cv_prog_ac_ct_STRIP="strip"
4448     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4449     break 2
4450   fi
4451 done
4452 done
4453
4454   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4455 fi
4456 fi
4457 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4458 if test -n "$ac_ct_STRIP"; then
4459   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4460 echo "${ECHO_T}$ac_ct_STRIP" >&6
4461 else
4462   echo "$as_me:$LINENO: result: no" >&5
4463 echo "${ECHO_T}no" >&6
4464 fi
4465
4466   STRIP=$ac_ct_STRIP
4467 else
4468   STRIP="$ac_cv_prog_STRIP"
4469 fi
4470
4471
4472   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4473 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4474   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4475     STRIP_STATIC_LIB="$STRIP -x"
4476     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4477     echo "$as_me:$LINENO: result: yes" >&5
4478 echo "${ECHO_T}yes" >&6
4479   else
4480     STRIP_STATIC_LIB=:
4481     STRIP_SHARED_LIB=:
4482     echo "$as_me:$LINENO: result: no" >&5
4483 echo "${ECHO_T}no" >&6
4484   fi
4485
4486
4487
4488
4489 for ac_prog in 'bison -y'
4490 do
4491   # Extract the first word of "$ac_prog", so it can be a program name with args.
4492 set dummy $ac_prog; ac_word=$2
4493 echo "$as_me:$LINENO: checking for $ac_word" >&5
4494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4495 if test "${ac_cv_prog_YACC+set}" = set; then
4496   echo $ECHO_N "(cached) $ECHO_C" >&6
4497 else
4498   if test -n "$YACC"; then
4499   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4500 else
4501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4502 for as_dir in $PATH
4503 do
4504   IFS=$as_save_IFS
4505   test -z "$as_dir" && as_dir=.
4506   for ac_exec_ext in '' $ac_executable_extensions; do
4507   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4508     ac_cv_prog_YACC="$ac_prog"
4509     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4510     break 2
4511   fi
4512 done
4513 done
4514
4515 fi
4516 fi
4517 YACC=$ac_cv_prog_YACC
4518 if test -n "$YACC"; then
4519   echo "$as_me:$LINENO: result: $YACC" >&5
4520 echo "${ECHO_T}$YACC" >&6
4521 else
4522   echo "$as_me:$LINENO: result: no" >&5
4523 echo "${ECHO_T}no" >&6
4524 fi
4525
4526   test -n "$YACC" && break
4527 done
4528
4529
4530 if test "$YACC"; then
4531   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4532     { echo "$as_me:$LINENO: WARNING:
4533 *** If you are going to modify the grammar files or build from CVS, the installed
4534 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4535 echo "$as_me: WARNING:
4536 *** If you are going to modify the grammar files or build from CVS, the installed
4537 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4538   fi
4539 fi
4540
4541 if test -z "$YACC"; then
4542   { echo "$as_me:$LINENO: WARNING:
4543 *** Without Bison you will not be able to build PostgreSQL from CVS or
4544 *** change any of the parser definition files.  You can obtain Bison from
4545 *** a GNU mirror site.  (If you are using the official distribution of
4546 *** PostgreSQL then you do not need to worry about this because the Bison
4547 *** output is pre-generated.)  To use a different yacc program (possible,
4548 *** but not recommended), set the environment variable YACC before running
4549 *** 'configure'." >&5
4550 echo "$as_me: WARNING:
4551 *** Without Bison you will not be able to build PostgreSQL from CVS or
4552 *** change any of the parser definition files.  You can obtain Bison from
4553 *** a GNU mirror site.  (If you are using the official distribution of
4554 *** PostgreSQL then you do not need to worry about this because the Bison
4555 *** output is pre-generated.)  To use a different yacc program (possible,
4556 *** but not recommended), set the environment variable YACC before running
4557 *** 'configure'." >&2;}
4558 fi
4559
4560
4561 # Extract the first word of "perl", so it can be a program name with args.
4562 set dummy perl; ac_word=$2
4563 echo "$as_me:$LINENO: checking for $ac_word" >&5
4564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4565 if test "${ac_cv_path_PERL+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   case $PERL in
4569   [\\/]* | ?:[\\/]*)
4570   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4571   ;;
4572   *)
4573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4574 for as_dir in $PATH
4575 do
4576   IFS=$as_save_IFS
4577   test -z "$as_dir" && as_dir=.
4578   for ac_exec_ext in '' $ac_executable_extensions; do
4579   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4580     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4581     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4582     break 2
4583   fi
4584 done
4585 done
4586
4587   ;;
4588 esac
4589 fi
4590 PERL=$ac_cv_path_PERL
4591
4592 if test -n "$PERL"; then
4593   echo "$as_me:$LINENO: result: $PERL" >&5
4594 echo "${ECHO_T}$PERL" >&6
4595 else
4596   echo "$as_me:$LINENO: result: no" >&5
4597 echo "${ECHO_T}no" >&6
4598 fi
4599
4600 if test "$with_perl" = yes; then
4601
4602 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4603 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4604 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4605 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4606 echo "${ECHO_T}$perl_archlibexp" >&6
4607 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4608 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4609 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4610 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4611 echo "${ECHO_T}$perl_privlibexp" >&6
4612 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4613 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4614 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4615 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4616 echo "${ECHO_T}$perl_useshrplib" >&6
4617
4618 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4619 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4620 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4621 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4622 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4623 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4624 echo "${ECHO_T}$perl_embed_ldflags" >&6
4625 fi
4626
4627 if test "$with_python" = yes; then
4628   # Extract the first word of "python", so it can be a program name with args.
4629 set dummy python; ac_word=$2
4630 echo "$as_me:$LINENO: checking for $ac_word" >&5
4631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4632 if test "${ac_cv_path_PYTHON+set}" = set; then
4633   echo $ECHO_N "(cached) $ECHO_C" >&6
4634 else
4635   case $PYTHON in
4636   [\\/]* | ?:[\\/]*)
4637   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4638   ;;
4639   *)
4640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4641 for as_dir in $PATH
4642 do
4643   IFS=$as_save_IFS
4644   test -z "$as_dir" && as_dir=.
4645   for ac_exec_ext in '' $ac_executable_extensions; do
4646   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4647     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4648     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4649     break 2
4650   fi
4651 done
4652 done
4653
4654   ;;
4655 esac
4656 fi
4657 PYTHON=$ac_cv_path_PYTHON
4658
4659 if test -n "$PYTHON"; then
4660   echo "$as_me:$LINENO: result: $PYTHON" >&5
4661 echo "${ECHO_T}$PYTHON" >&6
4662 else
4663   echo "$as_me:$LINENO: result: no" >&5
4664 echo "${ECHO_T}no" >&6
4665 fi
4666
4667 if test x"$PYTHON" = x""; then
4668   { { echo "$as_me:$LINENO: error: Python not found" >&5
4669 echo "$as_me: error: Python not found" >&2;}
4670    { (exit 1); exit 1; }; }
4671 fi
4672
4673
4674 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4675 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4676 if "${PYTHON}" 2>&- -c 'import distutils'
4677 then
4678     echo "$as_me:$LINENO: result: yes" >&5
4679 echo "${ECHO_T}yes" >&6
4680 else
4681     echo "$as_me:$LINENO: result: no" >&5
4682 echo "${ECHO_T}no" >&6
4683     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4684 echo "$as_me: error: distutils module not found" >&2;}
4685    { (exit 1); exit 1; }; }
4686 fi
4687 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4688 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4689 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4690 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')"`
4691 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4692
4693 # This should be enough of a message.
4694 echo "$as_me:$LINENO: result: $python_configdir" >&5
4695 echo "${ECHO_T}$python_configdir" >&6
4696
4697
4698 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4699 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4700
4701 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4702 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4703 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4704 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4705
4706 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4707 then
4708         # New way: use the official shared library
4709         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4710         python_libspec="-L${python_libdir} -l${ldlibrary}"
4711 else
4712         # Old way: use libpython from python_configdir
4713         python_libdir="${python_configdir}"
4714         python_libspec="-L${python_libdir} -lpython${python_version}"
4715 fi
4716
4717 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4718
4719 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4720 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4721
4722
4723 # threaded python is not supported on bsd's
4724 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4725 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
4726 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
4727 if test "$pythreads" = "1"; then
4728   echo "$as_me:$LINENO: result: yes" >&5
4729 echo "${ECHO_T}yes" >&6
4730   case $host_os in
4731   openbsd*|freebsd4*)
4732     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
4733 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
4734    { (exit 1); exit 1; }; }
4735     ;;
4736   esac
4737 else
4738   echo "$as_me:$LINENO: result: no" >&5
4739 echo "${ECHO_T}no" >&6
4740 fi
4741
4742
4743 fi
4744
4745
4746 ##
4747 ## Libraries
4748 ##
4749
4750 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
4751 then
4752
4753 echo "$as_me:$LINENO: checking for main in -lbsd" >&5
4754 echo $ECHO_N "checking for main in -lbsd... $ECHO_C" >&6
4755 if test "${ac_cv_lib_bsd_main+set}" = set; then
4756   echo $ECHO_N "(cached) $ECHO_C" >&6
4757 else
4758   ac_check_lib_save_LIBS=$LIBS
4759 LIBS="-lbsd  $LIBS"
4760 cat >conftest.$ac_ext <<_ACEOF
4761 /* confdefs.h.  */
4762 _ACEOF
4763 cat confdefs.h >>conftest.$ac_ext
4764 cat >>conftest.$ac_ext <<_ACEOF
4765 /* end confdefs.h.  */
4766
4767
4768 int
4769 main ()
4770 {
4771 main ();
4772   ;
4773   return 0;
4774 }
4775 _ACEOF
4776 rm -f conftest.$ac_objext conftest$ac_exeext
4777 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4778   (eval $ac_link) 2>conftest.er1
4779   ac_status=$?
4780   grep -v '^ *+' conftest.er1 >conftest.err
4781   rm -f conftest.er1
4782   cat conftest.err >&5
4783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4784   (exit $ac_status); } &&
4785          { ac_try='test -z "$ac_c_werror_flag"
4786                          || test ! -s conftest.err'
4787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4788   (eval $ac_try) 2>&5
4789   ac_status=$?
4790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4791   (exit $ac_status); }; } &&
4792          { ac_try='test -s conftest$ac_exeext'
4793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4794   (eval $ac_try) 2>&5
4795   ac_status=$?
4796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4797   (exit $ac_status); }; }; then
4798   ac_cv_lib_bsd_main=yes
4799 else
4800   echo "$as_me: failed program was:" >&5
4801 sed 's/^/| /' conftest.$ac_ext >&5
4802
4803 ac_cv_lib_bsd_main=no
4804 fi
4805 rm -f conftest.err conftest.$ac_objext \
4806       conftest$ac_exeext conftest.$ac_ext
4807 LIBS=$ac_check_lib_save_LIBS
4808 fi
4809 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_main" >&5
4810 echo "${ECHO_T}$ac_cv_lib_bsd_main" >&6
4811 if test $ac_cv_lib_bsd_main = yes; then
4812   cat >>confdefs.h <<_ACEOF
4813 #define HAVE_LIBBSD 1
4814 _ACEOF
4815
4816   LIBS="-lbsd $LIBS"
4817
4818 fi
4819
4820 fi
4821 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
4822 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
4823 if test "${ac_cv_search_setproctitle+set}" = set; then
4824   echo $ECHO_N "(cached) $ECHO_C" >&6
4825 else
4826   ac_func_search_save_LIBS=$LIBS
4827 ac_cv_search_setproctitle=no
4828 cat >conftest.$ac_ext <<_ACEOF
4829 /* confdefs.h.  */
4830 _ACEOF
4831 cat confdefs.h >>conftest.$ac_ext
4832 cat >>conftest.$ac_ext <<_ACEOF
4833 /* end confdefs.h.  */
4834
4835 /* Override any gcc2 internal prototype to avoid an error.  */
4836 #ifdef __cplusplus
4837 extern "C"
4838 #endif
4839 /* We use char because int might match the return type of a gcc2
4840    builtin and then its argument prototype would still apply.  */
4841 char setproctitle ();
4842 int
4843 main ()
4844 {
4845 setproctitle ();
4846   ;
4847   return 0;
4848 }
4849 _ACEOF
4850 rm -f conftest.$ac_objext conftest$ac_exeext
4851 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4852   (eval $ac_link) 2>conftest.er1
4853   ac_status=$?
4854   grep -v '^ *+' conftest.er1 >conftest.err
4855   rm -f conftest.er1
4856   cat conftest.err >&5
4857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858   (exit $ac_status); } &&
4859          { ac_try='test -z "$ac_c_werror_flag"
4860                          || test ! -s conftest.err'
4861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4862   (eval $ac_try) 2>&5
4863   ac_status=$?
4864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4865   (exit $ac_status); }; } &&
4866          { ac_try='test -s conftest$ac_exeext'
4867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4868   (eval $ac_try) 2>&5
4869   ac_status=$?
4870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4871   (exit $ac_status); }; }; then
4872   ac_cv_search_setproctitle="none required"
4873 else
4874   echo "$as_me: failed program was:" >&5
4875 sed 's/^/| /' conftest.$ac_ext >&5
4876
4877 fi
4878 rm -f conftest.err conftest.$ac_objext \
4879       conftest$ac_exeext conftest.$ac_ext
4880 if test "$ac_cv_search_setproctitle" = no; then
4881   for ac_lib in util; do
4882     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4883     cat >conftest.$ac_ext <<_ACEOF
4884 /* confdefs.h.  */
4885 _ACEOF
4886 cat confdefs.h >>conftest.$ac_ext
4887 cat >>conftest.$ac_ext <<_ACEOF
4888 /* end confdefs.h.  */
4889
4890 /* Override any gcc2 internal prototype to avoid an error.  */
4891 #ifdef __cplusplus
4892 extern "C"
4893 #endif
4894 /* We use char because int might match the return type of a gcc2
4895    builtin and then its argument prototype would still apply.  */
4896 char setproctitle ();
4897 int
4898 main ()
4899 {
4900 setproctitle ();
4901   ;
4902   return 0;
4903 }
4904 _ACEOF
4905 rm -f conftest.$ac_objext conftest$ac_exeext
4906 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4907   (eval $ac_link) 2>conftest.er1
4908   ac_status=$?
4909   grep -v '^ *+' conftest.er1 >conftest.err
4910   rm -f conftest.er1
4911   cat conftest.err >&5
4912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913   (exit $ac_status); } &&
4914          { ac_try='test -z "$ac_c_werror_flag"
4915                          || test ! -s conftest.err'
4916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4917   (eval $ac_try) 2>&5
4918   ac_status=$?
4919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4920   (exit $ac_status); }; } &&
4921          { ac_try='test -s conftest$ac_exeext'
4922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4923   (eval $ac_try) 2>&5
4924   ac_status=$?
4925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926   (exit $ac_status); }; }; then
4927   ac_cv_search_setproctitle="-l$ac_lib"
4928 break
4929 else
4930   echo "$as_me: failed program was:" >&5
4931 sed 's/^/| /' conftest.$ac_ext >&5
4932
4933 fi
4934 rm -f conftest.err conftest.$ac_objext \
4935       conftest$ac_exeext conftest.$ac_ext
4936   done
4937 fi
4938 LIBS=$ac_func_search_save_LIBS
4939 fi
4940 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
4941 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
4942 if test "$ac_cv_search_setproctitle" != no; then
4943   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
4944
4945 fi
4946
4947 echo "$as_me:$LINENO: checking for library containing pow" >&5
4948 echo $ECHO_N "checking for library containing pow... $ECHO_C" >&6
4949 if test "${ac_cv_search_pow+set}" = set; then
4950   echo $ECHO_N "(cached) $ECHO_C" >&6
4951 else
4952   ac_func_search_save_LIBS=$LIBS
4953 ac_cv_search_pow=no
4954 cat >conftest.$ac_ext <<_ACEOF
4955 /* confdefs.h.  */
4956 _ACEOF
4957 cat confdefs.h >>conftest.$ac_ext
4958 cat >>conftest.$ac_ext <<_ACEOF
4959 /* end confdefs.h.  */
4960
4961 /* Override any gcc2 internal prototype to avoid an error.  */
4962 #ifdef __cplusplus
4963 extern "C"
4964 #endif
4965 /* We use char because int might match the return type of a gcc2
4966    builtin and then its argument prototype would still apply.  */
4967 char pow ();
4968 int
4969 main ()
4970 {
4971 pow ();
4972   ;
4973   return 0;
4974 }
4975 _ACEOF
4976 rm -f conftest.$ac_objext conftest$ac_exeext
4977 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4978   (eval $ac_link) 2>conftest.er1
4979   ac_status=$?
4980   grep -v '^ *+' conftest.er1 >conftest.err
4981   rm -f conftest.er1
4982   cat conftest.err >&5
4983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4984   (exit $ac_status); } &&
4985          { ac_try='test -z "$ac_c_werror_flag"
4986                          || test ! -s conftest.err'
4987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4988   (eval $ac_try) 2>&5
4989   ac_status=$?
4990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4991   (exit $ac_status); }; } &&
4992          { ac_try='test -s conftest$ac_exeext'
4993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4994   (eval $ac_try) 2>&5
4995   ac_status=$?
4996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997   (exit $ac_status); }; }; then
4998   ac_cv_search_pow="none required"
4999 else
5000   echo "$as_me: failed program was:" >&5
5001 sed 's/^/| /' conftest.$ac_ext >&5
5002
5003 fi
5004 rm -f conftest.err conftest.$ac_objext \
5005       conftest$ac_exeext conftest.$ac_ext
5006 if test "$ac_cv_search_pow" = no; then
5007   for ac_lib in m; do
5008     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5009     cat >conftest.$ac_ext <<_ACEOF
5010 /* confdefs.h.  */
5011 _ACEOF
5012 cat confdefs.h >>conftest.$ac_ext
5013 cat >>conftest.$ac_ext <<_ACEOF
5014 /* end confdefs.h.  */
5015
5016 /* Override any gcc2 internal prototype to avoid an error.  */
5017 #ifdef __cplusplus
5018 extern "C"
5019 #endif
5020 /* We use char because int might match the return type of a gcc2
5021    builtin and then its argument prototype would still apply.  */
5022 char pow ();
5023 int
5024 main ()
5025 {
5026 pow ();
5027   ;
5028   return 0;
5029 }
5030 _ACEOF
5031 rm -f conftest.$ac_objext conftest$ac_exeext
5032 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5033   (eval $ac_link) 2>conftest.er1
5034   ac_status=$?
5035   grep -v '^ *+' conftest.er1 >conftest.err
5036   rm -f conftest.er1
5037   cat conftest.err >&5
5038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5039   (exit $ac_status); } &&
5040          { ac_try='test -z "$ac_c_werror_flag"
5041                          || test ! -s conftest.err'
5042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5043   (eval $ac_try) 2>&5
5044   ac_status=$?
5045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046   (exit $ac_status); }; } &&
5047          { ac_try='test -s conftest$ac_exeext'
5048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5049   (eval $ac_try) 2>&5
5050   ac_status=$?
5051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5052   (exit $ac_status); }; }; then
5053   ac_cv_search_pow="-l$ac_lib"
5054 break
5055 else
5056   echo "$as_me: failed program was:" >&5
5057 sed 's/^/| /' conftest.$ac_ext >&5
5058
5059 fi
5060 rm -f conftest.err conftest.$ac_objext \
5061       conftest$ac_exeext conftest.$ac_ext
5062   done
5063 fi
5064 LIBS=$ac_func_search_save_LIBS
5065 fi
5066 echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
5067 echo "${ECHO_T}$ac_cv_search_pow" >&6
5068 if test "$ac_cv_search_pow" != no; then
5069   test "$ac_cv_search_pow" = "none required" || LIBS="$ac_cv_search_pow $LIBS"
5070
5071 fi
5072
5073 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5074 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5075 if test "${ac_cv_search_dlopen+set}" = set; then
5076   echo $ECHO_N "(cached) $ECHO_C" >&6
5077 else
5078   ac_func_search_save_LIBS=$LIBS
5079 ac_cv_search_dlopen=no
5080 cat >conftest.$ac_ext <<_ACEOF
5081 /* confdefs.h.  */
5082 _ACEOF
5083 cat confdefs.h >>conftest.$ac_ext
5084 cat >>conftest.$ac_ext <<_ACEOF
5085 /* end confdefs.h.  */
5086
5087 /* Override any gcc2 internal prototype to avoid an error.  */
5088 #ifdef __cplusplus
5089 extern "C"
5090 #endif
5091 /* We use char because int might match the return type of a gcc2
5092    builtin and then its argument prototype would still apply.  */
5093 char dlopen ();
5094 int
5095 main ()
5096 {
5097 dlopen ();
5098   ;
5099   return 0;
5100 }
5101 _ACEOF
5102 rm -f conftest.$ac_objext conftest$ac_exeext
5103 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5104   (eval $ac_link) 2>conftest.er1
5105   ac_status=$?
5106   grep -v '^ *+' conftest.er1 >conftest.err
5107   rm -f conftest.er1
5108   cat conftest.err >&5
5109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5110   (exit $ac_status); } &&
5111          { ac_try='test -z "$ac_c_werror_flag"
5112                          || test ! -s conftest.err'
5113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5114   (eval $ac_try) 2>&5
5115   ac_status=$?
5116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5117   (exit $ac_status); }; } &&
5118          { ac_try='test -s conftest$ac_exeext'
5119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5120   (eval $ac_try) 2>&5
5121   ac_status=$?
5122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5123   (exit $ac_status); }; }; then
5124   ac_cv_search_dlopen="none required"
5125 else
5126   echo "$as_me: failed program was:" >&5
5127 sed 's/^/| /' conftest.$ac_ext >&5
5128
5129 fi
5130 rm -f conftest.err conftest.$ac_objext \
5131       conftest$ac_exeext conftest.$ac_ext
5132 if test "$ac_cv_search_dlopen" = no; then
5133   for ac_lib in dl; do
5134     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5135     cat >conftest.$ac_ext <<_ACEOF
5136 /* confdefs.h.  */
5137 _ACEOF
5138 cat confdefs.h >>conftest.$ac_ext
5139 cat >>conftest.$ac_ext <<_ACEOF
5140 /* end confdefs.h.  */
5141
5142 /* Override any gcc2 internal prototype to avoid an error.  */
5143 #ifdef __cplusplus
5144 extern "C"
5145 #endif
5146 /* We use char because int might match the return type of a gcc2
5147    builtin and then its argument prototype would still apply.  */
5148 char dlopen ();
5149 int
5150 main ()
5151 {
5152 dlopen ();
5153   ;
5154   return 0;
5155 }
5156 _ACEOF
5157 rm -f conftest.$ac_objext conftest$ac_exeext
5158 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5159   (eval $ac_link) 2>conftest.er1
5160   ac_status=$?
5161   grep -v '^ *+' conftest.er1 >conftest.err
5162   rm -f conftest.er1
5163   cat conftest.err >&5
5164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5165   (exit $ac_status); } &&
5166          { ac_try='test -z "$ac_c_werror_flag"
5167                          || test ! -s conftest.err'
5168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5169   (eval $ac_try) 2>&5
5170   ac_status=$?
5171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172   (exit $ac_status); }; } &&
5173          { ac_try='test -s conftest$ac_exeext'
5174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5175   (eval $ac_try) 2>&5
5176   ac_status=$?
5177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178   (exit $ac_status); }; }; then
5179   ac_cv_search_dlopen="-l$ac_lib"
5180 break
5181 else
5182   echo "$as_me: failed program was:" >&5
5183 sed 's/^/| /' conftest.$ac_ext >&5
5184
5185 fi
5186 rm -f conftest.err conftest.$ac_objext \
5187       conftest$ac_exeext conftest.$ac_ext
5188   done
5189 fi
5190 LIBS=$ac_func_search_save_LIBS
5191 fi
5192 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5193 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5194 if test "$ac_cv_search_dlopen" != no; then
5195   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5196
5197 fi
5198
5199
5200 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
5201 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
5202 if test "${ac_cv_lib_nsl_main+set}" = set; then
5203   echo $ECHO_N "(cached) $ECHO_C" >&6
5204 else
5205   ac_check_lib_save_LIBS=$LIBS
5206 LIBS="-lnsl  $LIBS"
5207 cat >conftest.$ac_ext <<_ACEOF
5208 /* confdefs.h.  */
5209 _ACEOF
5210 cat confdefs.h >>conftest.$ac_ext
5211 cat >>conftest.$ac_ext <<_ACEOF
5212 /* end confdefs.h.  */
5213
5214
5215 int
5216 main ()
5217 {
5218 main ();
5219   ;
5220   return 0;
5221 }
5222 _ACEOF
5223 rm -f conftest.$ac_objext conftest$ac_exeext
5224 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5225   (eval $ac_link) 2>conftest.er1
5226   ac_status=$?
5227   grep -v '^ *+' conftest.er1 >conftest.err
5228   rm -f conftest.er1
5229   cat conftest.err >&5
5230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231   (exit $ac_status); } &&
5232          { ac_try='test -z "$ac_c_werror_flag"
5233                          || test ! -s conftest.err'
5234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235   (eval $ac_try) 2>&5
5236   ac_status=$?
5237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5238   (exit $ac_status); }; } &&
5239          { ac_try='test -s conftest$ac_exeext'
5240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5241   (eval $ac_try) 2>&5
5242   ac_status=$?
5243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244   (exit $ac_status); }; }; then
5245   ac_cv_lib_nsl_main=yes
5246 else
5247   echo "$as_me: failed program was:" >&5
5248 sed 's/^/| /' conftest.$ac_ext >&5
5249
5250 ac_cv_lib_nsl_main=no
5251 fi
5252 rm -f conftest.err conftest.$ac_objext \
5253       conftest$ac_exeext conftest.$ac_ext
5254 LIBS=$ac_check_lib_save_LIBS
5255 fi
5256 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
5257 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
5258 if test $ac_cv_lib_nsl_main = yes; then
5259   cat >>confdefs.h <<_ACEOF
5260 #define HAVE_LIBNSL 1
5261 _ACEOF
5262
5263   LIBS="-lnsl $LIBS"
5264
5265 fi
5266
5267 echo "$as_me:$LINENO: checking for library containing socket" >&5
5268 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5269 if test "${ac_cv_search_socket+set}" = set; then
5270   echo $ECHO_N "(cached) $ECHO_C" >&6
5271 else
5272   ac_func_search_save_LIBS=$LIBS
5273 ac_cv_search_socket=no
5274 cat >conftest.$ac_ext <<_ACEOF
5275 /* confdefs.h.  */
5276 _ACEOF
5277 cat confdefs.h >>conftest.$ac_ext
5278 cat >>conftest.$ac_ext <<_ACEOF
5279 /* end confdefs.h.  */
5280
5281 /* Override any gcc2 internal prototype to avoid an error.  */
5282 #ifdef __cplusplus
5283 extern "C"
5284 #endif
5285 /* We use char because int might match the return type of a gcc2
5286    builtin and then its argument prototype would still apply.  */
5287 char socket ();
5288 int
5289 main ()
5290 {
5291 socket ();
5292   ;
5293   return 0;
5294 }
5295 _ACEOF
5296 rm -f conftest.$ac_objext conftest$ac_exeext
5297 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5298   (eval $ac_link) 2>conftest.er1
5299   ac_status=$?
5300   grep -v '^ *+' conftest.er1 >conftest.err
5301   rm -f conftest.er1
5302   cat conftest.err >&5
5303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5304   (exit $ac_status); } &&
5305          { ac_try='test -z "$ac_c_werror_flag"
5306                          || test ! -s conftest.err'
5307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5308   (eval $ac_try) 2>&5
5309   ac_status=$?
5310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5311   (exit $ac_status); }; } &&
5312          { ac_try='test -s conftest$ac_exeext'
5313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5314   (eval $ac_try) 2>&5
5315   ac_status=$?
5316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5317   (exit $ac_status); }; }; then
5318   ac_cv_search_socket="none required"
5319 else
5320   echo "$as_me: failed program was:" >&5
5321 sed 's/^/| /' conftest.$ac_ext >&5
5322
5323 fi
5324 rm -f conftest.err conftest.$ac_objext \
5325       conftest$ac_exeext conftest.$ac_ext
5326 if test "$ac_cv_search_socket" = no; then
5327   for ac_lib in socket wsock32; do
5328     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5329     cat >conftest.$ac_ext <<_ACEOF
5330 /* confdefs.h.  */
5331 _ACEOF
5332 cat confdefs.h >>conftest.$ac_ext
5333 cat >>conftest.$ac_ext <<_ACEOF
5334 /* end confdefs.h.  */
5335
5336 /* Override any gcc2 internal prototype to avoid an error.  */
5337 #ifdef __cplusplus
5338 extern "C"
5339 #endif
5340 /* We use char because int might match the return type of a gcc2
5341    builtin and then its argument prototype would still apply.  */
5342 char socket ();
5343 int
5344 main ()
5345 {
5346 socket ();
5347   ;
5348   return 0;
5349 }
5350 _ACEOF
5351 rm -f conftest.$ac_objext conftest$ac_exeext
5352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5353   (eval $ac_link) 2>conftest.er1
5354   ac_status=$?
5355   grep -v '^ *+' conftest.er1 >conftest.err
5356   rm -f conftest.er1
5357   cat conftest.err >&5
5358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5359   (exit $ac_status); } &&
5360          { ac_try='test -z "$ac_c_werror_flag"
5361                          || test ! -s conftest.err'
5362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5363   (eval $ac_try) 2>&5
5364   ac_status=$?
5365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5366   (exit $ac_status); }; } &&
5367          { ac_try='test -s conftest$ac_exeext'
5368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5369   (eval $ac_try) 2>&5
5370   ac_status=$?
5371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5372   (exit $ac_status); }; }; then
5373   ac_cv_search_socket="-l$ac_lib"
5374 break
5375 else
5376   echo "$as_me: failed program was:" >&5
5377 sed 's/^/| /' conftest.$ac_ext >&5
5378
5379 fi
5380 rm -f conftest.err conftest.$ac_objext \
5381       conftest$ac_exeext conftest.$ac_ext
5382   done
5383 fi
5384 LIBS=$ac_func_search_save_LIBS
5385 fi
5386 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5387 echo "${ECHO_T}$ac_cv_search_socket" >&6
5388 if test "$ac_cv_search_socket" != no; then
5389   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5390
5391 fi
5392
5393
5394 echo "$as_me:$LINENO: checking for main in -lipc" >&5
5395 echo $ECHO_N "checking for main in -lipc... $ECHO_C" >&6
5396 if test "${ac_cv_lib_ipc_main+set}" = set; then
5397   echo $ECHO_N "(cached) $ECHO_C" >&6
5398 else
5399   ac_check_lib_save_LIBS=$LIBS
5400 LIBS="-lipc  $LIBS"
5401 cat >conftest.$ac_ext <<_ACEOF
5402 /* confdefs.h.  */
5403 _ACEOF
5404 cat confdefs.h >>conftest.$ac_ext
5405 cat >>conftest.$ac_ext <<_ACEOF
5406 /* end confdefs.h.  */
5407
5408
5409 int
5410 main ()
5411 {
5412 main ();
5413   ;
5414   return 0;
5415 }
5416 _ACEOF
5417 rm -f conftest.$ac_objext conftest$ac_exeext
5418 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5419   (eval $ac_link) 2>conftest.er1
5420   ac_status=$?
5421   grep -v '^ *+' conftest.er1 >conftest.err
5422   rm -f conftest.er1
5423   cat conftest.err >&5
5424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5425   (exit $ac_status); } &&
5426          { ac_try='test -z "$ac_c_werror_flag"
5427                          || test ! -s conftest.err'
5428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5429   (eval $ac_try) 2>&5
5430   ac_status=$?
5431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5432   (exit $ac_status); }; } &&
5433          { ac_try='test -s conftest$ac_exeext'
5434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5435   (eval $ac_try) 2>&5
5436   ac_status=$?
5437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438   (exit $ac_status); }; }; then
5439   ac_cv_lib_ipc_main=yes
5440 else
5441   echo "$as_me: failed program was:" >&5
5442 sed 's/^/| /' conftest.$ac_ext >&5
5443
5444 ac_cv_lib_ipc_main=no
5445 fi
5446 rm -f conftest.err conftest.$ac_objext \
5447       conftest$ac_exeext conftest.$ac_ext
5448 LIBS=$ac_check_lib_save_LIBS
5449 fi
5450 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_main" >&5
5451 echo "${ECHO_T}$ac_cv_lib_ipc_main" >&6
5452 if test $ac_cv_lib_ipc_main = yes; then
5453   cat >>confdefs.h <<_ACEOF
5454 #define HAVE_LIBIPC 1
5455 _ACEOF
5456
5457   LIBS="-lipc $LIBS"
5458
5459 fi
5460
5461
5462 echo "$as_me:$LINENO: checking for main in -lIPC" >&5
5463 echo $ECHO_N "checking for main in -lIPC... $ECHO_C" >&6
5464 if test "${ac_cv_lib_IPC_main+set}" = set; then
5465   echo $ECHO_N "(cached) $ECHO_C" >&6
5466 else
5467   ac_check_lib_save_LIBS=$LIBS
5468 LIBS="-lIPC  $LIBS"
5469 cat >conftest.$ac_ext <<_ACEOF
5470 /* confdefs.h.  */
5471 _ACEOF
5472 cat confdefs.h >>conftest.$ac_ext
5473 cat >>conftest.$ac_ext <<_ACEOF
5474 /* end confdefs.h.  */
5475
5476
5477 int
5478 main ()
5479 {
5480 main ();
5481   ;
5482   return 0;
5483 }
5484 _ACEOF
5485 rm -f conftest.$ac_objext conftest$ac_exeext
5486 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5487   (eval $ac_link) 2>conftest.er1
5488   ac_status=$?
5489   grep -v '^ *+' conftest.er1 >conftest.err
5490   rm -f conftest.er1
5491   cat conftest.err >&5
5492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493   (exit $ac_status); } &&
5494          { ac_try='test -z "$ac_c_werror_flag"
5495                          || test ! -s conftest.err'
5496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5497   (eval $ac_try) 2>&5
5498   ac_status=$?
5499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5500   (exit $ac_status); }; } &&
5501          { ac_try='test -s conftest$ac_exeext'
5502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5503   (eval $ac_try) 2>&5
5504   ac_status=$?
5505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5506   (exit $ac_status); }; }; then
5507   ac_cv_lib_IPC_main=yes
5508 else
5509   echo "$as_me: failed program was:" >&5
5510 sed 's/^/| /' conftest.$ac_ext >&5
5511
5512 ac_cv_lib_IPC_main=no
5513 fi
5514 rm -f conftest.err conftest.$ac_objext \
5515       conftest$ac_exeext conftest.$ac_ext
5516 LIBS=$ac_check_lib_save_LIBS
5517 fi
5518 echo "$as_me:$LINENO: result: $ac_cv_lib_IPC_main" >&5
5519 echo "${ECHO_T}$ac_cv_lib_IPC_main" >&6
5520 if test $ac_cv_lib_IPC_main = yes; then
5521   cat >>confdefs.h <<_ACEOF
5522 #define HAVE_LIBIPC 1
5523 _ACEOF
5524
5525   LIBS="-lIPC $LIBS"
5526
5527 fi
5528
5529
5530 echo "$as_me:$LINENO: checking for main in -llc" >&5
5531 echo $ECHO_N "checking for main in -llc... $ECHO_C" >&6
5532 if test "${ac_cv_lib_lc_main+set}" = set; then
5533   echo $ECHO_N "(cached) $ECHO_C" >&6
5534 else
5535   ac_check_lib_save_LIBS=$LIBS
5536 LIBS="-llc  $LIBS"
5537 cat >conftest.$ac_ext <<_ACEOF
5538 /* confdefs.h.  */
5539 _ACEOF
5540 cat confdefs.h >>conftest.$ac_ext
5541 cat >>conftest.$ac_ext <<_ACEOF
5542 /* end confdefs.h.  */
5543
5544
5545 int
5546 main ()
5547 {
5548 main ();
5549   ;
5550   return 0;
5551 }
5552 _ACEOF
5553 rm -f conftest.$ac_objext conftest$ac_exeext
5554 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5555   (eval $ac_link) 2>conftest.er1
5556   ac_status=$?
5557   grep -v '^ *+' conftest.er1 >conftest.err
5558   rm -f conftest.er1
5559   cat conftest.err >&5
5560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561   (exit $ac_status); } &&
5562          { ac_try='test -z "$ac_c_werror_flag"
5563                          || test ! -s conftest.err'
5564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5565   (eval $ac_try) 2>&5
5566   ac_status=$?
5567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568   (exit $ac_status); }; } &&
5569          { ac_try='test -s conftest$ac_exeext'
5570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5571   (eval $ac_try) 2>&5
5572   ac_status=$?
5573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574   (exit $ac_status); }; }; then
5575   ac_cv_lib_lc_main=yes
5576 else
5577   echo "$as_me: failed program was:" >&5
5578 sed 's/^/| /' conftest.$ac_ext >&5
5579
5580 ac_cv_lib_lc_main=no
5581 fi
5582 rm -f conftest.err conftest.$ac_objext \
5583       conftest$ac_exeext conftest.$ac_ext
5584 LIBS=$ac_check_lib_save_LIBS
5585 fi
5586 echo "$as_me:$LINENO: result: $ac_cv_lib_lc_main" >&5
5587 echo "${ECHO_T}$ac_cv_lib_lc_main" >&6
5588 if test $ac_cv_lib_lc_main = yes; then
5589   cat >>confdefs.h <<_ACEOF
5590 #define HAVE_LIBLC 1
5591 _ACEOF
5592
5593   LIBS="-llc $LIBS"
5594
5595 fi
5596
5597 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5598 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5599 if test "${ac_cv_search_shl_load+set}" = set; then
5600   echo $ECHO_N "(cached) $ECHO_C" >&6
5601 else
5602   ac_func_search_save_LIBS=$LIBS
5603 ac_cv_search_shl_load=no
5604 cat >conftest.$ac_ext <<_ACEOF
5605 /* confdefs.h.  */
5606 _ACEOF
5607 cat confdefs.h >>conftest.$ac_ext
5608 cat >>conftest.$ac_ext <<_ACEOF
5609 /* end confdefs.h.  */
5610
5611 /* Override any gcc2 internal prototype to avoid an error.  */
5612 #ifdef __cplusplus
5613 extern "C"
5614 #endif
5615 /* We use char because int might match the return type of a gcc2
5616    builtin and then its argument prototype would still apply.  */
5617 char shl_load ();
5618 int
5619 main ()
5620 {
5621 shl_load ();
5622   ;
5623   return 0;
5624 }
5625 _ACEOF
5626 rm -f conftest.$ac_objext conftest$ac_exeext
5627 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5628   (eval $ac_link) 2>conftest.er1
5629   ac_status=$?
5630   grep -v '^ *+' conftest.er1 >conftest.err
5631   rm -f conftest.er1
5632   cat conftest.err >&5
5633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5634   (exit $ac_status); } &&
5635          { ac_try='test -z "$ac_c_werror_flag"
5636                          || test ! -s conftest.err'
5637   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5638   (eval $ac_try) 2>&5
5639   ac_status=$?
5640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5641   (exit $ac_status); }; } &&
5642          { ac_try='test -s conftest$ac_exeext'
5643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5644   (eval $ac_try) 2>&5
5645   ac_status=$?
5646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647   (exit $ac_status); }; }; then
5648   ac_cv_search_shl_load="none required"
5649 else
5650   echo "$as_me: failed program was:" >&5
5651 sed 's/^/| /' conftest.$ac_ext >&5
5652
5653 fi
5654 rm -f conftest.err conftest.$ac_objext \
5655       conftest$ac_exeext conftest.$ac_ext
5656 if test "$ac_cv_search_shl_load" = no; then
5657   for ac_lib in dld; do
5658     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5659     cat >conftest.$ac_ext <<_ACEOF
5660 /* confdefs.h.  */
5661 _ACEOF
5662 cat confdefs.h >>conftest.$ac_ext
5663 cat >>conftest.$ac_ext <<_ACEOF
5664 /* end confdefs.h.  */
5665
5666 /* Override any gcc2 internal prototype to avoid an error.  */
5667 #ifdef __cplusplus
5668 extern "C"
5669 #endif
5670 /* We use char because int might match the return type of a gcc2
5671    builtin and then its argument prototype would still apply.  */
5672 char shl_load ();
5673 int
5674 main ()
5675 {
5676 shl_load ();
5677   ;
5678   return 0;
5679 }
5680 _ACEOF
5681 rm -f conftest.$ac_objext conftest$ac_exeext
5682 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5683   (eval $ac_link) 2>conftest.er1
5684   ac_status=$?
5685   grep -v '^ *+' conftest.er1 >conftest.err
5686   rm -f conftest.er1
5687   cat conftest.err >&5
5688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5689   (exit $ac_status); } &&
5690          { ac_try='test -z "$ac_c_werror_flag"
5691                          || test ! -s conftest.err'
5692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5693   (eval $ac_try) 2>&5
5694   ac_status=$?
5695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696   (exit $ac_status); }; } &&
5697          { ac_try='test -s conftest$ac_exeext'
5698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5699   (eval $ac_try) 2>&5
5700   ac_status=$?
5701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702   (exit $ac_status); }; }; then
5703   ac_cv_search_shl_load="-l$ac_lib"
5704 break
5705 else
5706   echo "$as_me: failed program was:" >&5
5707 sed 's/^/| /' conftest.$ac_ext >&5
5708
5709 fi
5710 rm -f conftest.err conftest.$ac_objext \
5711       conftest$ac_exeext conftest.$ac_ext
5712   done
5713 fi
5714 LIBS=$ac_func_search_save_LIBS
5715 fi
5716 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5717 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5718 if test "$ac_cv_search_shl_load" != no; then
5719   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5720
5721 fi
5722
5723
5724 echo "$as_me:$LINENO: checking for main in -lld" >&5
5725 echo $ECHO_N "checking for main in -lld... $ECHO_C" >&6
5726 if test "${ac_cv_lib_ld_main+set}" = set; then
5727   echo $ECHO_N "(cached) $ECHO_C" >&6
5728 else
5729   ac_check_lib_save_LIBS=$LIBS
5730 LIBS="-lld  $LIBS"
5731 cat >conftest.$ac_ext <<_ACEOF
5732 /* confdefs.h.  */
5733 _ACEOF
5734 cat confdefs.h >>conftest.$ac_ext
5735 cat >>conftest.$ac_ext <<_ACEOF
5736 /* end confdefs.h.  */
5737
5738
5739 int
5740 main ()
5741 {
5742 main ();
5743   ;
5744   return 0;
5745 }
5746 _ACEOF
5747 rm -f conftest.$ac_objext conftest$ac_exeext
5748 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5749   (eval $ac_link) 2>conftest.er1
5750   ac_status=$?
5751   grep -v '^ *+' conftest.er1 >conftest.err
5752   rm -f conftest.er1
5753   cat conftest.err >&5
5754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5755   (exit $ac_status); } &&
5756          { ac_try='test -z "$ac_c_werror_flag"
5757                          || test ! -s conftest.err'
5758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5759   (eval $ac_try) 2>&5
5760   ac_status=$?
5761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5762   (exit $ac_status); }; } &&
5763          { ac_try='test -s conftest$ac_exeext'
5764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5765   (eval $ac_try) 2>&5
5766   ac_status=$?
5767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5768   (exit $ac_status); }; }; then
5769   ac_cv_lib_ld_main=yes
5770 else
5771   echo "$as_me: failed program was:" >&5
5772 sed 's/^/| /' conftest.$ac_ext >&5
5773
5774 ac_cv_lib_ld_main=no
5775 fi
5776 rm -f conftest.err conftest.$ac_objext \
5777       conftest$ac_exeext conftest.$ac_ext
5778 LIBS=$ac_check_lib_save_LIBS
5779 fi
5780 echo "$as_me:$LINENO: result: $ac_cv_lib_ld_main" >&5
5781 echo "${ECHO_T}$ac_cv_lib_ld_main" >&6
5782 if test $ac_cv_lib_ld_main = yes; then
5783   cat >>confdefs.h <<_ACEOF
5784 #define HAVE_LIBLD 1
5785 _ACEOF
5786
5787   LIBS="-lld $LIBS"
5788
5789 fi
5790
5791
5792 echo "$as_me:$LINENO: checking for main in -lcompat" >&5
5793 echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
5794 if test "${ac_cv_lib_compat_main+set}" = set; then
5795   echo $ECHO_N "(cached) $ECHO_C" >&6
5796 else
5797   ac_check_lib_save_LIBS=$LIBS
5798 LIBS="-lcompat  $LIBS"
5799 cat >conftest.$ac_ext <<_ACEOF
5800 /* confdefs.h.  */
5801 _ACEOF
5802 cat confdefs.h >>conftest.$ac_ext
5803 cat >>conftest.$ac_ext <<_ACEOF
5804 /* end confdefs.h.  */
5805
5806
5807 int
5808 main ()
5809 {
5810 main ();
5811   ;
5812   return 0;
5813 }
5814 _ACEOF
5815 rm -f conftest.$ac_objext conftest$ac_exeext
5816 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5817   (eval $ac_link) 2>conftest.er1
5818   ac_status=$?
5819   grep -v '^ *+' conftest.er1 >conftest.err
5820   rm -f conftest.er1
5821   cat conftest.err >&5
5822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823   (exit $ac_status); } &&
5824          { ac_try='test -z "$ac_c_werror_flag"
5825                          || test ! -s conftest.err'
5826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5827   (eval $ac_try) 2>&5
5828   ac_status=$?
5829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830   (exit $ac_status); }; } &&
5831          { ac_try='test -s conftest$ac_exeext'
5832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5833   (eval $ac_try) 2>&5
5834   ac_status=$?
5835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5836   (exit $ac_status); }; }; then
5837   ac_cv_lib_compat_main=yes
5838 else
5839   echo "$as_me: failed program was:" >&5
5840 sed 's/^/| /' conftest.$ac_ext >&5
5841
5842 ac_cv_lib_compat_main=no
5843 fi
5844 rm -f conftest.err conftest.$ac_objext \
5845       conftest$ac_exeext conftest.$ac_ext
5846 LIBS=$ac_check_lib_save_LIBS
5847 fi
5848 echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
5849 echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
5850 if test $ac_cv_lib_compat_main = yes; then
5851   cat >>confdefs.h <<_ACEOF
5852 #define HAVE_LIBCOMPAT 1
5853 _ACEOF
5854
5855   LIBS="-lcompat $LIBS"
5856
5857 fi
5858
5859
5860 echo "$as_me:$LINENO: checking for main in -lBSD" >&5
5861 echo $ECHO_N "checking for main in -lBSD... $ECHO_C" >&6
5862 if test "${ac_cv_lib_BSD_main+set}" = set; then
5863   echo $ECHO_N "(cached) $ECHO_C" >&6
5864 else
5865   ac_check_lib_save_LIBS=$LIBS
5866 LIBS="-lBSD  $LIBS"
5867 cat >conftest.$ac_ext <<_ACEOF
5868 /* confdefs.h.  */
5869 _ACEOF
5870 cat confdefs.h >>conftest.$ac_ext
5871 cat >>conftest.$ac_ext <<_ACEOF
5872 /* end confdefs.h.  */
5873
5874
5875 int
5876 main ()
5877 {
5878 main ();
5879   ;
5880   return 0;
5881 }
5882 _ACEOF
5883 rm -f conftest.$ac_objext conftest$ac_exeext
5884 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5885   (eval $ac_link) 2>conftest.er1
5886   ac_status=$?
5887   grep -v '^ *+' conftest.er1 >conftest.err
5888   rm -f conftest.er1
5889   cat conftest.err >&5
5890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891   (exit $ac_status); } &&
5892          { ac_try='test -z "$ac_c_werror_flag"
5893                          || test ! -s conftest.err'
5894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5895   (eval $ac_try) 2>&5
5896   ac_status=$?
5897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5898   (exit $ac_status); }; } &&
5899          { ac_try='test -s conftest$ac_exeext'
5900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5901   (eval $ac_try) 2>&5
5902   ac_status=$?
5903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5904   (exit $ac_status); }; }; then
5905   ac_cv_lib_BSD_main=yes
5906 else
5907   echo "$as_me: failed program was:" >&5
5908 sed 's/^/| /' conftest.$ac_ext >&5
5909
5910 ac_cv_lib_BSD_main=no
5911 fi
5912 rm -f conftest.err conftest.$ac_objext \
5913       conftest$ac_exeext conftest.$ac_ext
5914 LIBS=$ac_check_lib_save_LIBS
5915 fi
5916 echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_main" >&5
5917 echo "${ECHO_T}$ac_cv_lib_BSD_main" >&6
5918 if test $ac_cv_lib_BSD_main = yes; then
5919   cat >>confdefs.h <<_ACEOF
5920 #define HAVE_LIBBSD 1
5921 _ACEOF
5922
5923   LIBS="-lBSD $LIBS"
5924
5925 fi
5926
5927
5928 echo "$as_me:$LINENO: checking for main in -lgen" >&5
5929 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
5930 if test "${ac_cv_lib_gen_main+set}" = set; then
5931   echo $ECHO_N "(cached) $ECHO_C" >&6
5932 else
5933   ac_check_lib_save_LIBS=$LIBS
5934 LIBS="-lgen  $LIBS"
5935 cat >conftest.$ac_ext <<_ACEOF
5936 /* confdefs.h.  */
5937 _ACEOF
5938 cat confdefs.h >>conftest.$ac_ext
5939 cat >>conftest.$ac_ext <<_ACEOF
5940 /* end confdefs.h.  */
5941
5942
5943 int
5944 main ()
5945 {
5946 main ();
5947   ;
5948   return 0;
5949 }
5950 _ACEOF
5951 rm -f conftest.$ac_objext conftest$ac_exeext
5952 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5953   (eval $ac_link) 2>conftest.er1
5954   ac_status=$?
5955   grep -v '^ *+' conftest.er1 >conftest.err
5956   rm -f conftest.er1
5957   cat conftest.err >&5
5958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5959   (exit $ac_status); } &&
5960          { ac_try='test -z "$ac_c_werror_flag"
5961                          || test ! -s conftest.err'
5962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5963   (eval $ac_try) 2>&5
5964   ac_status=$?
5965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5966   (exit $ac_status); }; } &&
5967          { ac_try='test -s conftest$ac_exeext'
5968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5969   (eval $ac_try) 2>&5
5970   ac_status=$?
5971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5972   (exit $ac_status); }; }; then
5973   ac_cv_lib_gen_main=yes
5974 else
5975   echo "$as_me: failed program was:" >&5
5976 sed 's/^/| /' conftest.$ac_ext >&5
5977
5978 ac_cv_lib_gen_main=no
5979 fi
5980 rm -f conftest.err conftest.$ac_objext \
5981       conftest$ac_exeext conftest.$ac_ext
5982 LIBS=$ac_check_lib_save_LIBS
5983 fi
5984 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
5985 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
5986 if test $ac_cv_lib_gen_main = yes; then
5987   cat >>confdefs.h <<_ACEOF
5988 #define HAVE_LIBGEN 1
5989 _ACEOF
5990
5991   LIBS="-lgen $LIBS"
5992
5993 fi
5994
5995
5996 echo "$as_me:$LINENO: checking for main in -lPW" >&5
5997 echo $ECHO_N "checking for main in -lPW... $ECHO_C" >&6
5998 if test "${ac_cv_lib_PW_main+set}" = set; then
5999   echo $ECHO_N "(cached) $ECHO_C" >&6
6000 else
6001   ac_check_lib_save_LIBS=$LIBS
6002 LIBS="-lPW  $LIBS"
6003 cat >conftest.$ac_ext <<_ACEOF
6004 /* confdefs.h.  */
6005 _ACEOF
6006 cat confdefs.h >>conftest.$ac_ext
6007 cat >>conftest.$ac_ext <<_ACEOF
6008 /* end confdefs.h.  */
6009
6010
6011 int
6012 main ()
6013 {
6014 main ();
6015   ;
6016   return 0;
6017 }
6018 _ACEOF
6019 rm -f conftest.$ac_objext conftest$ac_exeext
6020 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6021   (eval $ac_link) 2>conftest.er1
6022   ac_status=$?
6023   grep -v '^ *+' conftest.er1 >conftest.err
6024   rm -f conftest.er1
6025   cat conftest.err >&5
6026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6027   (exit $ac_status); } &&
6028          { ac_try='test -z "$ac_c_werror_flag"
6029                          || test ! -s conftest.err'
6030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6031   (eval $ac_try) 2>&5
6032   ac_status=$?
6033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6034   (exit $ac_status); }; } &&
6035          { ac_try='test -s conftest$ac_exeext'
6036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6037   (eval $ac_try) 2>&5
6038   ac_status=$?
6039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6040   (exit $ac_status); }; }; then
6041   ac_cv_lib_PW_main=yes
6042 else
6043   echo "$as_me: failed program was:" >&5
6044 sed 's/^/| /' conftest.$ac_ext >&5
6045
6046 ac_cv_lib_PW_main=no
6047 fi
6048 rm -f conftest.err conftest.$ac_objext \
6049       conftest$ac_exeext conftest.$ac_ext
6050 LIBS=$ac_check_lib_save_LIBS
6051 fi
6052 echo "$as_me:$LINENO: result: $ac_cv_lib_PW_main" >&5
6053 echo "${ECHO_T}$ac_cv_lib_PW_main" >&6
6054 if test $ac_cv_lib_PW_main = yes; then
6055   cat >>confdefs.h <<_ACEOF
6056 #define HAVE_LIBPW 1
6057 _ACEOF
6058
6059   LIBS="-lPW $LIBS"
6060
6061 fi
6062
6063
6064 echo "$as_me:$LINENO: checking for main in -lresolv" >&5
6065 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
6066 if test "${ac_cv_lib_resolv_main+set}" = set; then
6067   echo $ECHO_N "(cached) $ECHO_C" >&6
6068 else
6069   ac_check_lib_save_LIBS=$LIBS
6070 LIBS="-lresolv  $LIBS"
6071 cat >conftest.$ac_ext <<_ACEOF
6072 /* confdefs.h.  */
6073 _ACEOF
6074 cat confdefs.h >>conftest.$ac_ext
6075 cat >>conftest.$ac_ext <<_ACEOF
6076 /* end confdefs.h.  */
6077
6078
6079 int
6080 main ()
6081 {
6082 main ();
6083   ;
6084   return 0;
6085 }
6086 _ACEOF
6087 rm -f conftest.$ac_objext conftest$ac_exeext
6088 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6089   (eval $ac_link) 2>conftest.er1
6090   ac_status=$?
6091   grep -v '^ *+' conftest.er1 >conftest.err
6092   rm -f conftest.er1
6093   cat conftest.err >&5
6094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095   (exit $ac_status); } &&
6096          { ac_try='test -z "$ac_c_werror_flag"
6097                          || test ! -s conftest.err'
6098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6099   (eval $ac_try) 2>&5
6100   ac_status=$?
6101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6102   (exit $ac_status); }; } &&
6103          { ac_try='test -s conftest$ac_exeext'
6104   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6105   (eval $ac_try) 2>&5
6106   ac_status=$?
6107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6108   (exit $ac_status); }; }; then
6109   ac_cv_lib_resolv_main=yes
6110 else
6111   echo "$as_me: failed program was:" >&5
6112 sed 's/^/| /' conftest.$ac_ext >&5
6113
6114 ac_cv_lib_resolv_main=no
6115 fi
6116 rm -f conftest.err conftest.$ac_objext \
6117       conftest$ac_exeext conftest.$ac_ext
6118 LIBS=$ac_check_lib_save_LIBS
6119 fi
6120 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
6121 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
6122 if test $ac_cv_lib_resolv_main = yes; then
6123   cat >>confdefs.h <<_ACEOF
6124 #define HAVE_LIBRESOLV 1
6125 _ACEOF
6126
6127   LIBS="-lresolv $LIBS"
6128
6129 fi
6130
6131 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
6132 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
6133 if test "${ac_cv_search_getopt_long+set}" = set; then
6134   echo $ECHO_N "(cached) $ECHO_C" >&6
6135 else
6136   ac_func_search_save_LIBS=$LIBS
6137 ac_cv_search_getopt_long=no
6138 cat >conftest.$ac_ext <<_ACEOF
6139 /* confdefs.h.  */
6140 _ACEOF
6141 cat confdefs.h >>conftest.$ac_ext
6142 cat >>conftest.$ac_ext <<_ACEOF
6143 /* end confdefs.h.  */
6144
6145 /* Override any gcc2 internal prototype to avoid an error.  */
6146 #ifdef __cplusplus
6147 extern "C"
6148 #endif
6149 /* We use char because int might match the return type of a gcc2
6150    builtin and then its argument prototype would still apply.  */
6151 char getopt_long ();
6152 int
6153 main ()
6154 {
6155 getopt_long ();
6156   ;
6157   return 0;
6158 }
6159 _ACEOF
6160 rm -f conftest.$ac_objext conftest$ac_exeext
6161 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6162   (eval $ac_link) 2>conftest.er1
6163   ac_status=$?
6164   grep -v '^ *+' conftest.er1 >conftest.err
6165   rm -f conftest.er1
6166   cat conftest.err >&5
6167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6168   (exit $ac_status); } &&
6169          { ac_try='test -z "$ac_c_werror_flag"
6170                          || test ! -s conftest.err'
6171   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6172   (eval $ac_try) 2>&5
6173   ac_status=$?
6174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6175   (exit $ac_status); }; } &&
6176          { ac_try='test -s conftest$ac_exeext'
6177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6178   (eval $ac_try) 2>&5
6179   ac_status=$?
6180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181   (exit $ac_status); }; }; then
6182   ac_cv_search_getopt_long="none required"
6183 else
6184   echo "$as_me: failed program was:" >&5
6185 sed 's/^/| /' conftest.$ac_ext >&5
6186
6187 fi
6188 rm -f conftest.err conftest.$ac_objext \
6189       conftest$ac_exeext conftest.$ac_ext
6190 if test "$ac_cv_search_getopt_long" = no; then
6191   for ac_lib in getopt gnugetopt; do
6192     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6193     cat >conftest.$ac_ext <<_ACEOF
6194 /* confdefs.h.  */
6195 _ACEOF
6196 cat confdefs.h >>conftest.$ac_ext
6197 cat >>conftest.$ac_ext <<_ACEOF
6198 /* end confdefs.h.  */
6199
6200 /* Override any gcc2 internal prototype to avoid an error.  */
6201 #ifdef __cplusplus
6202 extern "C"
6203 #endif
6204 /* We use char because int might match the return type of a gcc2
6205    builtin and then its argument prototype would still apply.  */
6206 char getopt_long ();
6207 int
6208 main ()
6209 {
6210 getopt_long ();
6211   ;
6212   return 0;
6213 }
6214 _ACEOF
6215 rm -f conftest.$ac_objext conftest$ac_exeext
6216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6217   (eval $ac_link) 2>conftest.er1
6218   ac_status=$?
6219   grep -v '^ *+' conftest.er1 >conftest.err
6220   rm -f conftest.er1
6221   cat conftest.err >&5
6222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223   (exit $ac_status); } &&
6224          { ac_try='test -z "$ac_c_werror_flag"
6225                          || test ! -s conftest.err'
6226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6227   (eval $ac_try) 2>&5
6228   ac_status=$?
6229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6230   (exit $ac_status); }; } &&
6231          { ac_try='test -s conftest$ac_exeext'
6232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6233   (eval $ac_try) 2>&5
6234   ac_status=$?
6235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6236   (exit $ac_status); }; }; then
6237   ac_cv_search_getopt_long="-l$ac_lib"
6238 break
6239 else
6240   echo "$as_me: failed program was:" >&5
6241 sed 's/^/| /' conftest.$ac_ext >&5
6242
6243 fi
6244 rm -f conftest.err conftest.$ac_objext \
6245       conftest$ac_exeext conftest.$ac_ext
6246   done
6247 fi
6248 LIBS=$ac_func_search_save_LIBS
6249 fi
6250 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
6251 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
6252 if test "$ac_cv_search_getopt_long" != no; then
6253   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
6254
6255 fi
6256
6257 # QNX:
6258
6259 echo "$as_me:$LINENO: checking for main in -lunix" >&5
6260 echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
6261 if test "${ac_cv_lib_unix_main+set}" = set; then
6262   echo $ECHO_N "(cached) $ECHO_C" >&6
6263 else
6264   ac_check_lib_save_LIBS=$LIBS
6265 LIBS="-lunix  $LIBS"
6266 cat >conftest.$ac_ext <<_ACEOF
6267 /* confdefs.h.  */
6268 _ACEOF
6269 cat confdefs.h >>conftest.$ac_ext
6270 cat >>conftest.$ac_ext <<_ACEOF
6271 /* end confdefs.h.  */
6272
6273
6274 int
6275 main ()
6276 {
6277 main ();
6278   ;
6279   return 0;
6280 }
6281 _ACEOF
6282 rm -f conftest.$ac_objext conftest$ac_exeext
6283 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6284   (eval $ac_link) 2>conftest.er1
6285   ac_status=$?
6286   grep -v '^ *+' conftest.er1 >conftest.err
6287   rm -f conftest.er1
6288   cat conftest.err >&5
6289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6290   (exit $ac_status); } &&
6291          { ac_try='test -z "$ac_c_werror_flag"
6292                          || test ! -s conftest.err'
6293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6294   (eval $ac_try) 2>&5
6295   ac_status=$?
6296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297   (exit $ac_status); }; } &&
6298          { ac_try='test -s conftest$ac_exeext'
6299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6300   (eval $ac_try) 2>&5
6301   ac_status=$?
6302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6303   (exit $ac_status); }; }; then
6304   ac_cv_lib_unix_main=yes
6305 else
6306   echo "$as_me: failed program was:" >&5
6307 sed 's/^/| /' conftest.$ac_ext >&5
6308
6309 ac_cv_lib_unix_main=no
6310 fi
6311 rm -f conftest.err conftest.$ac_objext \
6312       conftest$ac_exeext conftest.$ac_ext
6313 LIBS=$ac_check_lib_save_LIBS
6314 fi
6315 echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
6316 echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
6317 if test $ac_cv_lib_unix_main = yes; then
6318   cat >>confdefs.h <<_ACEOF
6319 #define HAVE_LIBUNIX 1
6320 _ACEOF
6321
6322   LIBS="-lunix $LIBS"
6323
6324 fi
6325
6326 echo "$as_me:$LINENO: checking for library containing crypt" >&5
6327 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
6328 if test "${ac_cv_search_crypt+set}" = set; then
6329   echo $ECHO_N "(cached) $ECHO_C" >&6
6330 else
6331   ac_func_search_save_LIBS=$LIBS
6332 ac_cv_search_crypt=no
6333 cat >conftest.$ac_ext <<_ACEOF
6334 /* confdefs.h.  */
6335 _ACEOF
6336 cat confdefs.h >>conftest.$ac_ext
6337 cat >>conftest.$ac_ext <<_ACEOF
6338 /* end confdefs.h.  */
6339
6340 /* Override any gcc2 internal prototype to avoid an error.  */
6341 #ifdef __cplusplus
6342 extern "C"
6343 #endif
6344 /* We use char because int might match the return type of a gcc2
6345    builtin and then its argument prototype would still apply.  */
6346 char crypt ();
6347 int
6348 main ()
6349 {
6350 crypt ();
6351   ;
6352   return 0;
6353 }
6354 _ACEOF
6355 rm -f conftest.$ac_objext conftest$ac_exeext
6356 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6357   (eval $ac_link) 2>conftest.er1
6358   ac_status=$?
6359   grep -v '^ *+' conftest.er1 >conftest.err
6360   rm -f conftest.er1
6361   cat conftest.err >&5
6362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363   (exit $ac_status); } &&
6364          { ac_try='test -z "$ac_c_werror_flag"
6365                          || test ! -s conftest.err'
6366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6367   (eval $ac_try) 2>&5
6368   ac_status=$?
6369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6370   (exit $ac_status); }; } &&
6371          { ac_try='test -s conftest$ac_exeext'
6372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6373   (eval $ac_try) 2>&5
6374   ac_status=$?
6375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6376   (exit $ac_status); }; }; then
6377   ac_cv_search_crypt="none required"
6378 else
6379   echo "$as_me: failed program was:" >&5
6380 sed 's/^/| /' conftest.$ac_ext >&5
6381
6382 fi
6383 rm -f conftest.err conftest.$ac_objext \
6384       conftest$ac_exeext conftest.$ac_ext
6385 if test "$ac_cv_search_crypt" = no; then
6386   for ac_lib in crypt; do
6387     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6388     cat >conftest.$ac_ext <<_ACEOF
6389 /* confdefs.h.  */
6390 _ACEOF
6391 cat confdefs.h >>conftest.$ac_ext
6392 cat >>conftest.$ac_ext <<_ACEOF
6393 /* end confdefs.h.  */
6394
6395 /* Override any gcc2 internal prototype to avoid an error.  */
6396 #ifdef __cplusplus
6397 extern "C"
6398 #endif
6399 /* We use char because int might match the return type of a gcc2
6400    builtin and then its argument prototype would still apply.  */
6401 char crypt ();
6402 int
6403 main ()
6404 {
6405 crypt ();
6406   ;
6407   return 0;
6408 }
6409 _ACEOF
6410 rm -f conftest.$ac_objext conftest$ac_exeext
6411 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6412   (eval $ac_link) 2>conftest.er1
6413   ac_status=$?
6414   grep -v '^ *+' conftest.er1 >conftest.err
6415   rm -f conftest.er1
6416   cat conftest.err >&5
6417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6418   (exit $ac_status); } &&
6419          { ac_try='test -z "$ac_c_werror_flag"
6420                          || test ! -s conftest.err'
6421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6422   (eval $ac_try) 2>&5
6423   ac_status=$?
6424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6425   (exit $ac_status); }; } &&
6426          { ac_try='test -s conftest$ac_exeext'
6427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6428   (eval $ac_try) 2>&5
6429   ac_status=$?
6430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431   (exit $ac_status); }; }; then
6432   ac_cv_search_crypt="-l$ac_lib"
6433 break
6434 else
6435   echo "$as_me: failed program was:" >&5
6436 sed 's/^/| /' conftest.$ac_ext >&5
6437
6438 fi
6439 rm -f conftest.err conftest.$ac_objext \
6440       conftest$ac_exeext conftest.$ac_ext
6441   done
6442 fi
6443 LIBS=$ac_func_search_save_LIBS
6444 fi
6445 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6446 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6447 if test "$ac_cv_search_crypt" != no; then
6448   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6449
6450 fi
6451
6452 # Solaris:
6453 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6454 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6455 if test "${ac_cv_search_fdatasync+set}" = set; then
6456   echo $ECHO_N "(cached) $ECHO_C" >&6
6457 else
6458   ac_func_search_save_LIBS=$LIBS
6459 ac_cv_search_fdatasync=no
6460 cat >conftest.$ac_ext <<_ACEOF
6461 /* confdefs.h.  */
6462 _ACEOF
6463 cat confdefs.h >>conftest.$ac_ext
6464 cat >>conftest.$ac_ext <<_ACEOF
6465 /* end confdefs.h.  */
6466
6467 /* Override any gcc2 internal prototype to avoid an error.  */
6468 #ifdef __cplusplus
6469 extern "C"
6470 #endif
6471 /* We use char because int might match the return type of a gcc2
6472    builtin and then its argument prototype would still apply.  */
6473 char fdatasync ();
6474 int
6475 main ()
6476 {
6477 fdatasync ();
6478   ;
6479   return 0;
6480 }
6481 _ACEOF
6482 rm -f conftest.$ac_objext conftest$ac_exeext
6483 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6484   (eval $ac_link) 2>conftest.er1
6485   ac_status=$?
6486   grep -v '^ *+' conftest.er1 >conftest.err
6487   rm -f conftest.er1
6488   cat conftest.err >&5
6489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490   (exit $ac_status); } &&
6491          { ac_try='test -z "$ac_c_werror_flag"
6492                          || test ! -s conftest.err'
6493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6494   (eval $ac_try) 2>&5
6495   ac_status=$?
6496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6497   (exit $ac_status); }; } &&
6498          { ac_try='test -s conftest$ac_exeext'
6499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6500   (eval $ac_try) 2>&5
6501   ac_status=$?
6502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6503   (exit $ac_status); }; }; then
6504   ac_cv_search_fdatasync="none required"
6505 else
6506   echo "$as_me: failed program was:" >&5
6507 sed 's/^/| /' conftest.$ac_ext >&5
6508
6509 fi
6510 rm -f conftest.err conftest.$ac_objext \
6511       conftest$ac_exeext conftest.$ac_ext
6512 if test "$ac_cv_search_fdatasync" = no; then
6513   for ac_lib in rt posix4; do
6514     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6515     cat >conftest.$ac_ext <<_ACEOF
6516 /* confdefs.h.  */
6517 _ACEOF
6518 cat confdefs.h >>conftest.$ac_ext
6519 cat >>conftest.$ac_ext <<_ACEOF
6520 /* end confdefs.h.  */
6521
6522 /* Override any gcc2 internal prototype to avoid an error.  */
6523 #ifdef __cplusplus
6524 extern "C"
6525 #endif
6526 /* We use char because int might match the return type of a gcc2
6527    builtin and then its argument prototype would still apply.  */
6528 char fdatasync ();
6529 int
6530 main ()
6531 {
6532 fdatasync ();
6533   ;
6534   return 0;
6535 }
6536 _ACEOF
6537 rm -f conftest.$ac_objext conftest$ac_exeext
6538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6539   (eval $ac_link) 2>conftest.er1
6540   ac_status=$?
6541   grep -v '^ *+' conftest.er1 >conftest.err
6542   rm -f conftest.er1
6543   cat conftest.err >&5
6544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6545   (exit $ac_status); } &&
6546          { ac_try='test -z "$ac_c_werror_flag"
6547                          || test ! -s conftest.err'
6548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6549   (eval $ac_try) 2>&5
6550   ac_status=$?
6551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6552   (exit $ac_status); }; } &&
6553          { ac_try='test -s conftest$ac_exeext'
6554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6555   (eval $ac_try) 2>&5
6556   ac_status=$?
6557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6558   (exit $ac_status); }; }; then
6559   ac_cv_search_fdatasync="-l$ac_lib"
6560 break
6561 else
6562   echo "$as_me: failed program was:" >&5
6563 sed 's/^/| /' conftest.$ac_ext >&5
6564
6565 fi
6566 rm -f conftest.err conftest.$ac_objext \
6567       conftest$ac_exeext conftest.$ac_ext
6568   done
6569 fi
6570 LIBS=$ac_func_search_save_LIBS
6571 fi
6572 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6573 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6574 if test "$ac_cv_search_fdatasync" != no; then
6575   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6576
6577 fi
6578
6579 # Cygwin:
6580 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6581 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6582 if test "${ac_cv_search_shmget+set}" = set; then
6583   echo $ECHO_N "(cached) $ECHO_C" >&6
6584 else
6585   ac_func_search_save_LIBS=$LIBS
6586 ac_cv_search_shmget=no
6587 cat >conftest.$ac_ext <<_ACEOF
6588 /* confdefs.h.  */
6589 _ACEOF
6590 cat confdefs.h >>conftest.$ac_ext
6591 cat >>conftest.$ac_ext <<_ACEOF
6592 /* end confdefs.h.  */
6593
6594 /* Override any gcc2 internal prototype to avoid an error.  */
6595 #ifdef __cplusplus
6596 extern "C"
6597 #endif
6598 /* We use char because int might match the return type of a gcc2
6599    builtin and then its argument prototype would still apply.  */
6600 char shmget ();
6601 int
6602 main ()
6603 {
6604 shmget ();
6605   ;
6606   return 0;
6607 }
6608 _ACEOF
6609 rm -f conftest.$ac_objext conftest$ac_exeext
6610 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6611   (eval $ac_link) 2>conftest.er1
6612   ac_status=$?
6613   grep -v '^ *+' conftest.er1 >conftest.err
6614   rm -f conftest.er1
6615   cat conftest.err >&5
6616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6617   (exit $ac_status); } &&
6618          { ac_try='test -z "$ac_c_werror_flag"
6619                          || test ! -s conftest.err'
6620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6621   (eval $ac_try) 2>&5
6622   ac_status=$?
6623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624   (exit $ac_status); }; } &&
6625          { ac_try='test -s conftest$ac_exeext'
6626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6627   (eval $ac_try) 2>&5
6628   ac_status=$?
6629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630   (exit $ac_status); }; }; then
6631   ac_cv_search_shmget="none required"
6632 else
6633   echo "$as_me: failed program was:" >&5
6634 sed 's/^/| /' conftest.$ac_ext >&5
6635
6636 fi
6637 rm -f conftest.err conftest.$ac_objext \
6638       conftest$ac_exeext conftest.$ac_ext
6639 if test "$ac_cv_search_shmget" = no; then
6640   for ac_lib in cygipc; do
6641     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6642     cat >conftest.$ac_ext <<_ACEOF
6643 /* confdefs.h.  */
6644 _ACEOF
6645 cat confdefs.h >>conftest.$ac_ext
6646 cat >>conftest.$ac_ext <<_ACEOF
6647 /* end confdefs.h.  */
6648
6649 /* Override any gcc2 internal prototype to avoid an error.  */
6650 #ifdef __cplusplus
6651 extern "C"
6652 #endif
6653 /* We use char because int might match the return type of a gcc2
6654    builtin and then its argument prototype would still apply.  */
6655 char shmget ();
6656 int
6657 main ()
6658 {
6659 shmget ();
6660   ;
6661   return 0;
6662 }
6663 _ACEOF
6664 rm -f conftest.$ac_objext conftest$ac_exeext
6665 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6666   (eval $ac_link) 2>conftest.er1
6667   ac_status=$?
6668   grep -v '^ *+' conftest.er1 >conftest.err
6669   rm -f conftest.er1
6670   cat conftest.err >&5
6671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6672   (exit $ac_status); } &&
6673          { ac_try='test -z "$ac_c_werror_flag"
6674                          || test ! -s conftest.err'
6675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6676   (eval $ac_try) 2>&5
6677   ac_status=$?
6678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6679   (exit $ac_status); }; } &&
6680          { ac_try='test -s conftest$ac_exeext'
6681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6682   (eval $ac_try) 2>&5
6683   ac_status=$?
6684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6685   (exit $ac_status); }; }; then
6686   ac_cv_search_shmget="-l$ac_lib"
6687 break
6688 else
6689   echo "$as_me: failed program was:" >&5
6690 sed 's/^/| /' conftest.$ac_ext >&5
6691
6692 fi
6693 rm -f conftest.err conftest.$ac_objext \
6694       conftest$ac_exeext conftest.$ac_ext
6695   done
6696 fi
6697 LIBS=$ac_func_search_save_LIBS
6698 fi
6699 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6700 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6701 if test "$ac_cv_search_shmget" != no; then
6702   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6703
6704 fi
6705
6706
6707 if test "$with_readline" = yes; then
6708
6709
6710 if test "${pgac_cv_check_readline+set}" = set; then
6711   echo $ECHO_N "(cached) $ECHO_C" >&6
6712 else
6713   pgac_cv_check_readline=no
6714 pgac_save_LIBS=$LIBS
6715 if test x"$with_libedit_preferred" != x"yes"
6716 then    READLINE_ORDER="-lreadline -ledit"
6717 else    READLINE_ORDER="-ledit -lreadline"
6718 fi
6719 for pgac_rllib in $READLINE_ORDER ; do
6720   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6721 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6722   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6723     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6724     cat >conftest.$ac_ext <<_ACEOF
6725 /* confdefs.h.  */
6726 _ACEOF
6727 cat confdefs.h >>conftest.$ac_ext
6728 cat >>conftest.$ac_ext <<_ACEOF
6729 /* end confdefs.h.  */
6730
6731 /* Override any gcc2 internal prototype to avoid an error.  */
6732 #ifdef __cplusplus
6733 extern "C"
6734 #endif
6735 /* We use char because int might match the return type of a gcc2
6736    builtin and then its argument prototype would still apply.  */
6737 char readline ();
6738 int
6739 main ()
6740 {
6741 readline ();
6742   ;
6743   return 0;
6744 }
6745 _ACEOF
6746 rm -f conftest.$ac_objext conftest$ac_exeext
6747 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6748   (eval $ac_link) 2>conftest.er1
6749   ac_status=$?
6750   grep -v '^ *+' conftest.er1 >conftest.err
6751   rm -f conftest.er1
6752   cat conftest.err >&5
6753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6754   (exit $ac_status); } &&
6755          { ac_try='test -z "$ac_c_werror_flag"
6756                          || test ! -s conftest.err'
6757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6758   (eval $ac_try) 2>&5
6759   ac_status=$?
6760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761   (exit $ac_status); }; } &&
6762          { ac_try='test -s conftest$ac_exeext'
6763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6764   (eval $ac_try) 2>&5
6765   ac_status=$?
6766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6767   (exit $ac_status); }; }; then
6768
6769       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6770       # recognize dependent libraries; assume curses is needed if we didn't
6771       # find any dependency.
6772       case $host_os in
6773         netbsd* | openbsd* | irix*)
6774           if test x"$pgac_lib" = x"" ; then
6775             pgac_lib=" -lcurses"
6776           fi ;;
6777       esac
6778
6779       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6780       break
6781
6782 else
6783   echo "$as_me: failed program was:" >&5
6784 sed 's/^/| /' conftest.$ac_ext >&5
6785
6786 fi
6787 rm -f conftest.err conftest.$ac_objext \
6788       conftest$ac_exeext conftest.$ac_ext
6789   done
6790   if test "$pgac_cv_check_readline" != no ; then
6791     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6792 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6793     break
6794   else
6795     echo "$as_me:$LINENO: result: no" >&5
6796 echo "${ECHO_T}no" >&6
6797   fi
6798 done
6799 LIBS=$pgac_save_LIBS
6800
6801 fi
6802
6803 if test "$pgac_cv_check_readline" != no ; then
6804   LIBS="$pgac_cv_check_readline $LIBS"
6805
6806 cat >>confdefs.h <<\_ACEOF
6807 #define HAVE_LIBREADLINE 1
6808 _ACEOF
6809
6810 fi
6811
6812
6813   if test x"$pgac_cv_check_readline" = x"no"; then
6814     { { echo "$as_me:$LINENO: error: readline library not found
6815 If you have readline already installed, see config.log for details on the
6816 failure.  It is possible the compiler isn't looking in the proper directory.
6817 Use --without-readline to disable readline support." >&5
6818 echo "$as_me: error: readline library not found
6819 If you have readline already installed, see config.log for details on the
6820 failure.  It is possible the compiler isn't looking in the proper directory.
6821 Use --without-readline to disable readline support." >&2;}
6822    { (exit 1); exit 1; }; }
6823   fi
6824 fi
6825
6826 if test "$with_zlib" = yes; then
6827
6828 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6829 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6830 if test "${ac_cv_lib_z_inflate+set}" = set; then
6831   echo $ECHO_N "(cached) $ECHO_C" >&6
6832 else
6833   ac_check_lib_save_LIBS=$LIBS
6834 LIBS="-lz  $LIBS"
6835 cat >conftest.$ac_ext <<_ACEOF
6836 /* confdefs.h.  */
6837 _ACEOF
6838 cat confdefs.h >>conftest.$ac_ext
6839 cat >>conftest.$ac_ext <<_ACEOF
6840 /* end confdefs.h.  */
6841
6842 /* Override any gcc2 internal prototype to avoid an error.  */
6843 #ifdef __cplusplus
6844 extern "C"
6845 #endif
6846 /* We use char because int might match the return type of a gcc2
6847    builtin and then its argument prototype would still apply.  */
6848 char inflate ();
6849 int
6850 main ()
6851 {
6852 inflate ();
6853   ;
6854   return 0;
6855 }
6856 _ACEOF
6857 rm -f conftest.$ac_objext conftest$ac_exeext
6858 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6859   (eval $ac_link) 2>conftest.er1
6860   ac_status=$?
6861   grep -v '^ *+' conftest.er1 >conftest.err
6862   rm -f conftest.er1
6863   cat conftest.err >&5
6864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6865   (exit $ac_status); } &&
6866          { ac_try='test -z "$ac_c_werror_flag"
6867                          || test ! -s conftest.err'
6868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6869   (eval $ac_try) 2>&5
6870   ac_status=$?
6871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6872   (exit $ac_status); }; } &&
6873          { ac_try='test -s conftest$ac_exeext'
6874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6875   (eval $ac_try) 2>&5
6876   ac_status=$?
6877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6878   (exit $ac_status); }; }; then
6879   ac_cv_lib_z_inflate=yes
6880 else
6881   echo "$as_me: failed program was:" >&5
6882 sed 's/^/| /' conftest.$ac_ext >&5
6883
6884 ac_cv_lib_z_inflate=no
6885 fi
6886 rm -f conftest.err conftest.$ac_objext \
6887       conftest$ac_exeext conftest.$ac_ext
6888 LIBS=$ac_check_lib_save_LIBS
6889 fi
6890 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6891 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6892 if test $ac_cv_lib_z_inflate = yes; then
6893   cat >>confdefs.h <<_ACEOF
6894 #define HAVE_LIBZ 1
6895 _ACEOF
6896
6897   LIBS="-lz $LIBS"
6898
6899 else
6900   { { echo "$as_me:$LINENO: error: zlib library not found
6901 If you have zlib already installed, see config.log for details on the
6902 failure.  It is possible the compiler isn't looking in the proper directory.
6903 Use --without-zlib to disable zlib support." >&5
6904 echo "$as_me: error: zlib library not found
6905 If you have zlib already installed, see config.log for details on the
6906 failure.  It is possible the compiler isn't looking in the proper directory.
6907 Use --without-zlib to disable zlib support." >&2;}
6908    { (exit 1); exit 1; }; }
6909 fi
6910
6911 fi
6912
6913 if test "$enable_spinlocks" = yes; then
6914
6915 cat >>confdefs.h <<\_ACEOF
6916 #define HAVE_SPINLOCKS 1
6917 _ACEOF
6918
6919 else
6920   { echo "$as_me:$LINENO: WARNING:
6921 *** Not using spinlocks will cause poor performance." >&5
6922 echo "$as_me: WARNING:
6923 *** Not using spinlocks will cause poor performance." >&2;}
6924 fi
6925
6926 if test "$with_krb5" = yes ; then
6927   if test "$PORTNAME" != "win32"; then
6928      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6929 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6930 if test "${ac_cv_search_com_err+set}" = set; then
6931   echo $ECHO_N "(cached) $ECHO_C" >&6
6932 else
6933   ac_func_search_save_LIBS=$LIBS
6934 ac_cv_search_com_err=no
6935 cat >conftest.$ac_ext <<_ACEOF
6936 /* confdefs.h.  */
6937 _ACEOF
6938 cat confdefs.h >>conftest.$ac_ext
6939 cat >>conftest.$ac_ext <<_ACEOF
6940 /* end confdefs.h.  */
6941
6942 /* Override any gcc2 internal prototype to avoid an error.  */
6943 #ifdef __cplusplus
6944 extern "C"
6945 #endif
6946 /* We use char because int might match the return type of a gcc2
6947    builtin and then its argument prototype would still apply.  */
6948 char com_err ();
6949 int
6950 main ()
6951 {
6952 com_err ();
6953   ;
6954   return 0;
6955 }
6956 _ACEOF
6957 rm -f conftest.$ac_objext conftest$ac_exeext
6958 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6959   (eval $ac_link) 2>conftest.er1
6960   ac_status=$?
6961   grep -v '^ *+' conftest.er1 >conftest.err
6962   rm -f conftest.er1
6963   cat conftest.err >&5
6964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6965   (exit $ac_status); } &&
6966          { ac_try='test -z "$ac_c_werror_flag"
6967                          || test ! -s conftest.err'
6968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6969   (eval $ac_try) 2>&5
6970   ac_status=$?
6971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6972   (exit $ac_status); }; } &&
6973          { ac_try='test -s conftest$ac_exeext'
6974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6975   (eval $ac_try) 2>&5
6976   ac_status=$?
6977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6978   (exit $ac_status); }; }; then
6979   ac_cv_search_com_err="none required"
6980 else
6981   echo "$as_me: failed program was:" >&5
6982 sed 's/^/| /' conftest.$ac_ext >&5
6983
6984 fi
6985 rm -f conftest.err conftest.$ac_objext \
6986       conftest$ac_exeext conftest.$ac_ext
6987 if test "$ac_cv_search_com_err" = no; then
6988   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6989     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6990     cat >conftest.$ac_ext <<_ACEOF
6991 /* confdefs.h.  */
6992 _ACEOF
6993 cat confdefs.h >>conftest.$ac_ext
6994 cat >>conftest.$ac_ext <<_ACEOF
6995 /* end confdefs.h.  */
6996
6997 /* Override any gcc2 internal prototype to avoid an error.  */
6998 #ifdef __cplusplus
6999 extern "C"
7000 #endif
7001 /* We use char because int might match the return type of a gcc2
7002    builtin and then its argument prototype would still apply.  */
7003 char com_err ();
7004 int
7005 main ()
7006 {
7007 com_err ();
7008   ;
7009   return 0;
7010 }
7011 _ACEOF
7012 rm -f conftest.$ac_objext conftest$ac_exeext
7013 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7014   (eval $ac_link) 2>conftest.er1
7015   ac_status=$?
7016   grep -v '^ *+' conftest.er1 >conftest.err
7017   rm -f conftest.er1
7018   cat conftest.err >&5
7019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7020   (exit $ac_status); } &&
7021          { ac_try='test -z "$ac_c_werror_flag"
7022                          || test ! -s conftest.err'
7023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7024   (eval $ac_try) 2>&5
7025   ac_status=$?
7026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027   (exit $ac_status); }; } &&
7028          { ac_try='test -s conftest$ac_exeext'
7029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7030   (eval $ac_try) 2>&5
7031   ac_status=$?
7032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7033   (exit $ac_status); }; }; then
7034   ac_cv_search_com_err="-l$ac_lib"
7035 break
7036 else
7037   echo "$as_me: failed program was:" >&5
7038 sed 's/^/| /' conftest.$ac_ext >&5
7039
7040 fi
7041 rm -f conftest.err conftest.$ac_objext \
7042       conftest$ac_exeext conftest.$ac_ext
7043   done
7044 fi
7045 LIBS=$ac_func_search_save_LIBS
7046 fi
7047 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7048 echo "${ECHO_T}$ac_cv_search_com_err" >&6
7049 if test "$ac_cv_search_com_err" != no; then
7050   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
7051
7052 else
7053   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7054 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7055    { (exit 1); exit 1; }; }
7056 fi
7057
7058      echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
7059 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
7060 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
7061   echo $ECHO_N "(cached) $ECHO_C" >&6
7062 else
7063   ac_func_search_save_LIBS=$LIBS
7064 ac_cv_search_krb5_encrypt=no
7065 cat >conftest.$ac_ext <<_ACEOF
7066 /* confdefs.h.  */
7067 _ACEOF
7068 cat confdefs.h >>conftest.$ac_ext
7069 cat >>conftest.$ac_ext <<_ACEOF
7070 /* end confdefs.h.  */
7071
7072 /* Override any gcc2 internal prototype to avoid an error.  */
7073 #ifdef __cplusplus
7074 extern "C"
7075 #endif
7076 /* We use char because int might match the return type of a gcc2
7077    builtin and then its argument prototype would still apply.  */
7078 char krb5_encrypt ();
7079 int
7080 main ()
7081 {
7082 krb5_encrypt ();
7083   ;
7084   return 0;
7085 }
7086 _ACEOF
7087 rm -f conftest.$ac_objext conftest$ac_exeext
7088 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7089   (eval $ac_link) 2>conftest.er1
7090   ac_status=$?
7091   grep -v '^ *+' conftest.er1 >conftest.err
7092   rm -f conftest.er1
7093   cat conftest.err >&5
7094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7095   (exit $ac_status); } &&
7096          { ac_try='test -z "$ac_c_werror_flag"
7097                          || test ! -s conftest.err'
7098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7099   (eval $ac_try) 2>&5
7100   ac_status=$?
7101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7102   (exit $ac_status); }; } &&
7103          { ac_try='test -s conftest$ac_exeext'
7104   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7105   (eval $ac_try) 2>&5
7106   ac_status=$?
7107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7108   (exit $ac_status); }; }; then
7109   ac_cv_search_krb5_encrypt="none required"
7110 else
7111   echo "$as_me: failed program was:" >&5
7112 sed 's/^/| /' conftest.$ac_ext >&5
7113
7114 fi
7115 rm -f conftest.err conftest.$ac_objext \
7116       conftest$ac_exeext conftest.$ac_ext
7117 if test "$ac_cv_search_krb5_encrypt" = no; then
7118   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
7119     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7120     cat >conftest.$ac_ext <<_ACEOF
7121 /* confdefs.h.  */
7122 _ACEOF
7123 cat confdefs.h >>conftest.$ac_ext
7124 cat >>conftest.$ac_ext <<_ACEOF
7125 /* end confdefs.h.  */
7126
7127 /* Override any gcc2 internal prototype to avoid an error.  */
7128 #ifdef __cplusplus
7129 extern "C"
7130 #endif
7131 /* We use char because int might match the return type of a gcc2
7132    builtin and then its argument prototype would still apply.  */
7133 char krb5_encrypt ();
7134 int
7135 main ()
7136 {
7137 krb5_encrypt ();
7138   ;
7139   return 0;
7140 }
7141 _ACEOF
7142 rm -f conftest.$ac_objext conftest$ac_exeext
7143 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7144   (eval $ac_link) 2>conftest.er1
7145   ac_status=$?
7146   grep -v '^ *+' conftest.er1 >conftest.err
7147   rm -f conftest.er1
7148   cat conftest.err >&5
7149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7150   (exit $ac_status); } &&
7151          { ac_try='test -z "$ac_c_werror_flag"
7152                          || test ! -s conftest.err'
7153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7154   (eval $ac_try) 2>&5
7155   ac_status=$?
7156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7157   (exit $ac_status); }; } &&
7158          { ac_try='test -s conftest$ac_exeext'
7159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7160   (eval $ac_try) 2>&5
7161   ac_status=$?
7162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7163   (exit $ac_status); }; }; then
7164   ac_cv_search_krb5_encrypt="-l$ac_lib"
7165 break
7166 else
7167   echo "$as_me: failed program was:" >&5
7168 sed 's/^/| /' conftest.$ac_ext >&5
7169
7170 fi
7171 rm -f conftest.err conftest.$ac_objext \
7172       conftest$ac_exeext conftest.$ac_ext
7173   done
7174 fi
7175 LIBS=$ac_func_search_save_LIBS
7176 fi
7177 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
7178 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
7179 if test "$ac_cv_search_krb5_encrypt" != no; then
7180   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
7181
7182 else
7183   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
7184 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
7185    { (exit 1); exit 1; }; }
7186 fi
7187
7188      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
7189 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
7190 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7191   echo $ECHO_N "(cached) $ECHO_C" >&6
7192 else
7193   ac_func_search_save_LIBS=$LIBS
7194 ac_cv_search_krb5_sendauth=no
7195 cat >conftest.$ac_ext <<_ACEOF
7196 /* confdefs.h.  */
7197 _ACEOF
7198 cat confdefs.h >>conftest.$ac_ext
7199 cat >>conftest.$ac_ext <<_ACEOF
7200 /* end confdefs.h.  */
7201
7202 /* Override any gcc2 internal prototype to avoid an error.  */
7203 #ifdef __cplusplus
7204 extern "C"
7205 #endif
7206 /* We use char because int might match the return type of a gcc2
7207    builtin and then its argument prototype would still apply.  */
7208 char krb5_sendauth ();
7209 int
7210 main ()
7211 {
7212 krb5_sendauth ();
7213   ;
7214   return 0;
7215 }
7216 _ACEOF
7217 rm -f conftest.$ac_objext conftest$ac_exeext
7218 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7219   (eval $ac_link) 2>conftest.er1
7220   ac_status=$?
7221   grep -v '^ *+' conftest.er1 >conftest.err
7222   rm -f conftest.er1
7223   cat conftest.err >&5
7224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7225   (exit $ac_status); } &&
7226          { ac_try='test -z "$ac_c_werror_flag"
7227                          || test ! -s conftest.err'
7228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7229   (eval $ac_try) 2>&5
7230   ac_status=$?
7231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7232   (exit $ac_status); }; } &&
7233          { ac_try='test -s conftest$ac_exeext'
7234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7235   (eval $ac_try) 2>&5
7236   ac_status=$?
7237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7238   (exit $ac_status); }; }; then
7239   ac_cv_search_krb5_sendauth="none required"
7240 else
7241   echo "$as_me: failed program was:" >&5
7242 sed 's/^/| /' conftest.$ac_ext >&5
7243
7244 fi
7245 rm -f conftest.err conftest.$ac_objext \
7246       conftest$ac_exeext conftest.$ac_ext
7247 if test "$ac_cv_search_krb5_sendauth" = no; then
7248   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
7249     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7250     cat >conftest.$ac_ext <<_ACEOF
7251 /* confdefs.h.  */
7252 _ACEOF
7253 cat confdefs.h >>conftest.$ac_ext
7254 cat >>conftest.$ac_ext <<_ACEOF
7255 /* end confdefs.h.  */
7256
7257 /* Override any gcc2 internal prototype to avoid an error.  */
7258 #ifdef __cplusplus
7259 extern "C"
7260 #endif
7261 /* We use char because int might match the return type of a gcc2
7262    builtin and then its argument prototype would still apply.  */
7263 char krb5_sendauth ();
7264 int
7265 main ()
7266 {
7267 krb5_sendauth ();
7268   ;
7269   return 0;
7270 }
7271 _ACEOF
7272 rm -f conftest.$ac_objext conftest$ac_exeext
7273 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7274   (eval $ac_link) 2>conftest.er1
7275   ac_status=$?
7276   grep -v '^ *+' conftest.er1 >conftest.err
7277   rm -f conftest.er1
7278   cat conftest.err >&5
7279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7280   (exit $ac_status); } &&
7281          { ac_try='test -z "$ac_c_werror_flag"
7282                          || test ! -s conftest.err'
7283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287   (exit $ac_status); }; } &&
7288          { ac_try='test -s conftest$ac_exeext'
7289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7290   (eval $ac_try) 2>&5
7291   ac_status=$?
7292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7293   (exit $ac_status); }; }; then
7294   ac_cv_search_krb5_sendauth="-l$ac_lib"
7295 break
7296 else
7297   echo "$as_me: failed program was:" >&5
7298 sed 's/^/| /' conftest.$ac_ext >&5
7299
7300 fi
7301 rm -f conftest.err conftest.$ac_objext \
7302       conftest$ac_exeext conftest.$ac_ext
7303   done
7304 fi
7305 LIBS=$ac_func_search_save_LIBS
7306 fi
7307 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7308 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
7309 if test "$ac_cv_search_krb5_sendauth" != no; then
7310   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
7311
7312 else
7313   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7314 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7315    { (exit 1); exit 1; }; }
7316 fi
7317
7318   else
7319      echo "$as_me:$LINENO: checking for library containing com_err" >&5
7320 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
7321 if test "${ac_cv_search_com_err+set}" = set; then
7322   echo $ECHO_N "(cached) $ECHO_C" >&6
7323 else
7324   ac_func_search_save_LIBS=$LIBS
7325 ac_cv_search_com_err=no
7326 cat >conftest.$ac_ext <<_ACEOF
7327 /* confdefs.h.  */
7328 _ACEOF
7329 cat confdefs.h >>conftest.$ac_ext
7330 cat >>conftest.$ac_ext <<_ACEOF
7331 /* end confdefs.h.  */
7332
7333 /* Override any gcc2 internal prototype to avoid an error.  */
7334 #ifdef __cplusplus
7335 extern "C"
7336 #endif
7337 /* We use char because int might match the return type of a gcc2
7338    builtin and then its argument prototype would still apply.  */
7339 char com_err ();
7340 int
7341 main ()
7342 {
7343 com_err ();
7344   ;
7345   return 0;
7346 }
7347 _ACEOF
7348 rm -f conftest.$ac_objext conftest$ac_exeext
7349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7350   (eval $ac_link) 2>conftest.er1
7351   ac_status=$?
7352   grep -v '^ *+' conftest.er1 >conftest.err
7353   rm -f conftest.er1
7354   cat conftest.err >&5
7355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7356   (exit $ac_status); } &&
7357          { ac_try='test -z "$ac_c_werror_flag"
7358                          || test ! -s conftest.err'
7359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7360   (eval $ac_try) 2>&5
7361   ac_status=$?
7362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7363   (exit $ac_status); }; } &&
7364          { ac_try='test -s conftest$ac_exeext'
7365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7366   (eval $ac_try) 2>&5
7367   ac_status=$?
7368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7369   (exit $ac_status); }; }; then
7370   ac_cv_search_com_err="none required"
7371 else
7372   echo "$as_me: failed program was:" >&5
7373 sed 's/^/| /' conftest.$ac_ext >&5
7374
7375 fi
7376 rm -f conftest.err conftest.$ac_objext \
7377       conftest$ac_exeext conftest.$ac_ext
7378 if test "$ac_cv_search_com_err" = no; then
7379   for ac_lib in 'comerr32 -lkrb5_32'; do
7380     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7381     cat >conftest.$ac_ext <<_ACEOF
7382 /* confdefs.h.  */
7383 _ACEOF
7384 cat confdefs.h >>conftest.$ac_ext
7385 cat >>conftest.$ac_ext <<_ACEOF
7386 /* end confdefs.h.  */
7387
7388 /* Override any gcc2 internal prototype to avoid an error.  */
7389 #ifdef __cplusplus
7390 extern "C"
7391 #endif
7392 /* We use char because int might match the return type of a gcc2
7393    builtin and then its argument prototype would still apply.  */
7394 char com_err ();
7395 int
7396 main ()
7397 {
7398 com_err ();
7399   ;
7400   return 0;
7401 }
7402 _ACEOF
7403 rm -f conftest.$ac_objext conftest$ac_exeext
7404 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7405   (eval $ac_link) 2>conftest.er1
7406   ac_status=$?
7407   grep -v '^ *+' conftest.er1 >conftest.err
7408   rm -f conftest.er1
7409   cat conftest.err >&5
7410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7411   (exit $ac_status); } &&
7412          { ac_try='test -z "$ac_c_werror_flag"
7413                          || test ! -s conftest.err'
7414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7415   (eval $ac_try) 2>&5
7416   ac_status=$?
7417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7418   (exit $ac_status); }; } &&
7419          { ac_try='test -s conftest$ac_exeext'
7420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7421   (eval $ac_try) 2>&5
7422   ac_status=$?
7423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424   (exit $ac_status); }; }; then
7425   ac_cv_search_com_err="-l$ac_lib"
7426 break
7427 else
7428   echo "$as_me: failed program was:" >&5
7429 sed 's/^/| /' conftest.$ac_ext >&5
7430
7431 fi
7432 rm -f conftest.err conftest.$ac_objext \
7433       conftest$ac_exeext conftest.$ac_ext
7434   done
7435 fi
7436 LIBS=$ac_func_search_save_LIBS
7437 fi
7438 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7439 echo "${ECHO_T}$ac_cv_search_com_err" >&6
7440 if test "$ac_cv_search_com_err" != no; then
7441   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
7442
7443 else
7444   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7445 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7446    { (exit 1); exit 1; }; }
7447 fi
7448
7449   fi
7450 fi
7451
7452 if test "$with_openssl" = yes ; then
7453     if test "$PORTNAME" != "win32"; then
7454
7455 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7456 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
7457 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7458   echo $ECHO_N "(cached) $ECHO_C" >&6
7459 else
7460   ac_check_lib_save_LIBS=$LIBS
7461 LIBS="-lcrypto  $LIBS"
7462 cat >conftest.$ac_ext <<_ACEOF
7463 /* confdefs.h.  */
7464 _ACEOF
7465 cat confdefs.h >>conftest.$ac_ext
7466 cat >>conftest.$ac_ext <<_ACEOF
7467 /* end confdefs.h.  */
7468
7469 /* Override any gcc2 internal prototype to avoid an error.  */
7470 #ifdef __cplusplus
7471 extern "C"
7472 #endif
7473 /* We use char because int might match the return type of a gcc2
7474    builtin and then its argument prototype would still apply.  */
7475 char CRYPTO_new_ex_data ();
7476 int
7477 main ()
7478 {
7479 CRYPTO_new_ex_data ();
7480   ;
7481   return 0;
7482 }
7483 _ACEOF
7484 rm -f conftest.$ac_objext conftest$ac_exeext
7485 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7486   (eval $ac_link) 2>conftest.er1
7487   ac_status=$?
7488   grep -v '^ *+' conftest.er1 >conftest.err
7489   rm -f conftest.er1
7490   cat conftest.err >&5
7491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7492   (exit $ac_status); } &&
7493          { ac_try='test -z "$ac_c_werror_flag"
7494                          || test ! -s conftest.err'
7495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7496   (eval $ac_try) 2>&5
7497   ac_status=$?
7498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7499   (exit $ac_status); }; } &&
7500          { ac_try='test -s conftest$ac_exeext'
7501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7502   (eval $ac_try) 2>&5
7503   ac_status=$?
7504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7505   (exit $ac_status); }; }; then
7506   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7507 else
7508   echo "$as_me: failed program was:" >&5
7509 sed 's/^/| /' conftest.$ac_ext >&5
7510
7511 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7512 fi
7513 rm -f conftest.err conftest.$ac_objext \
7514       conftest$ac_exeext conftest.$ac_ext
7515 LIBS=$ac_check_lib_save_LIBS
7516 fi
7517 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7518 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
7519 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7520   cat >>confdefs.h <<_ACEOF
7521 #define HAVE_LIBCRYPTO 1
7522 _ACEOF
7523
7524   LIBS="-lcrypto $LIBS"
7525
7526 else
7527   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7528 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7529    { (exit 1); exit 1; }; }
7530 fi
7531
7532
7533 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7534 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7535 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7536   echo $ECHO_N "(cached) $ECHO_C" >&6
7537 else
7538   ac_check_lib_save_LIBS=$LIBS
7539 LIBS="-lssl  $LIBS"
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
7547 /* Override any gcc2 internal prototype to avoid an error.  */
7548 #ifdef __cplusplus
7549 extern "C"
7550 #endif
7551 /* We use char because int might match the return type of a gcc2
7552    builtin and then its argument prototype would still apply.  */
7553 char SSL_library_init ();
7554 int
7555 main ()
7556 {
7557 SSL_library_init ();
7558   ;
7559   return 0;
7560 }
7561 _ACEOF
7562 rm -f conftest.$ac_objext conftest$ac_exeext
7563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7564   (eval $ac_link) 2>conftest.er1
7565   ac_status=$?
7566   grep -v '^ *+' conftest.er1 >conftest.err
7567   rm -f conftest.er1
7568   cat conftest.err >&5
7569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570   (exit $ac_status); } &&
7571          { ac_try='test -z "$ac_c_werror_flag"
7572                          || test ! -s conftest.err'
7573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7574   (eval $ac_try) 2>&5
7575   ac_status=$?
7576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7577   (exit $ac_status); }; } &&
7578          { ac_try='test -s conftest$ac_exeext'
7579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7580   (eval $ac_try) 2>&5
7581   ac_status=$?
7582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7583   (exit $ac_status); }; }; then
7584   ac_cv_lib_ssl_SSL_library_init=yes
7585 else
7586   echo "$as_me: failed program was:" >&5
7587 sed 's/^/| /' conftest.$ac_ext >&5
7588
7589 ac_cv_lib_ssl_SSL_library_init=no
7590 fi
7591 rm -f conftest.err conftest.$ac_objext \
7592       conftest$ac_exeext conftest.$ac_ext
7593 LIBS=$ac_check_lib_save_LIBS
7594 fi
7595 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7596 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7597 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7598   cat >>confdefs.h <<_ACEOF
7599 #define HAVE_LIBSSL 1
7600 _ACEOF
7601
7602   LIBS="-lssl $LIBS"
7603
7604 else
7605   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7606 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7607    { (exit 1); exit 1; }; }
7608 fi
7609
7610   else
7611
7612 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7613 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7614 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7615   echo $ECHO_N "(cached) $ECHO_C" >&6
7616 else
7617   ac_check_lib_save_LIBS=$LIBS
7618 LIBS="-leay32  $LIBS"
7619 cat >conftest.$ac_ext <<_ACEOF
7620 /* confdefs.h.  */
7621 _ACEOF
7622 cat confdefs.h >>conftest.$ac_ext
7623 cat >>conftest.$ac_ext <<_ACEOF
7624 /* end confdefs.h.  */
7625
7626 /* Override any gcc2 internal prototype to avoid an error.  */
7627 #ifdef __cplusplus
7628 extern "C"
7629 #endif
7630 /* We use char because int might match the return type of a gcc2
7631    builtin and then its argument prototype would still apply.  */
7632 char CRYPTO_new_ex_data ();
7633 int
7634 main ()
7635 {
7636 CRYPTO_new_ex_data ();
7637   ;
7638   return 0;
7639 }
7640 _ACEOF
7641 rm -f conftest.$ac_objext conftest$ac_exeext
7642 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7643   (eval $ac_link) 2>conftest.er1
7644   ac_status=$?
7645   grep -v '^ *+' conftest.er1 >conftest.err
7646   rm -f conftest.er1
7647   cat conftest.err >&5
7648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649   (exit $ac_status); } &&
7650          { ac_try='test -z "$ac_c_werror_flag"
7651                          || test ! -s conftest.err'
7652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7653   (eval $ac_try) 2>&5
7654   ac_status=$?
7655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7656   (exit $ac_status); }; } &&
7657          { ac_try='test -s conftest$ac_exeext'
7658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7659   (eval $ac_try) 2>&5
7660   ac_status=$?
7661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7662   (exit $ac_status); }; }; then
7663   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7664 else
7665   echo "$as_me: failed program was:" >&5
7666 sed 's/^/| /' conftest.$ac_ext >&5
7667
7668 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7669 fi
7670 rm -f conftest.err conftest.$ac_objext \
7671       conftest$ac_exeext conftest.$ac_ext
7672 LIBS=$ac_check_lib_save_LIBS
7673 fi
7674 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7675 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7676 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7677   cat >>confdefs.h <<_ACEOF
7678 #define HAVE_LIBEAY32 1
7679 _ACEOF
7680
7681   LIBS="-leay32 $LIBS"
7682
7683 else
7684   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7685 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7686    { (exit 1); exit 1; }; }
7687 fi
7688
7689
7690 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7691 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7692 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7693   echo $ECHO_N "(cached) $ECHO_C" >&6
7694 else
7695   ac_check_lib_save_LIBS=$LIBS
7696 LIBS="-lssleay32  $LIBS"
7697 cat >conftest.$ac_ext <<_ACEOF
7698 /* confdefs.h.  */
7699 _ACEOF
7700 cat confdefs.h >>conftest.$ac_ext
7701 cat >>conftest.$ac_ext <<_ACEOF
7702 /* end confdefs.h.  */
7703
7704 /* Override any gcc2 internal prototype to avoid an error.  */
7705 #ifdef __cplusplus
7706 extern "C"
7707 #endif
7708 /* We use char because int might match the return type of a gcc2
7709    builtin and then its argument prototype would still apply.  */
7710 char SSL_library_init ();
7711 int
7712 main ()
7713 {
7714 SSL_library_init ();
7715   ;
7716   return 0;
7717 }
7718 _ACEOF
7719 rm -f conftest.$ac_objext conftest$ac_exeext
7720 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7721   (eval $ac_link) 2>conftest.er1
7722   ac_status=$?
7723   grep -v '^ *+' conftest.er1 >conftest.err
7724   rm -f conftest.er1
7725   cat conftest.err >&5
7726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7727   (exit $ac_status); } &&
7728          { ac_try='test -z "$ac_c_werror_flag"
7729                          || test ! -s conftest.err'
7730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7731   (eval $ac_try) 2>&5
7732   ac_status=$?
7733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7734   (exit $ac_status); }; } &&
7735          { ac_try='test -s conftest$ac_exeext'
7736   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7737   (eval $ac_try) 2>&5
7738   ac_status=$?
7739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7740   (exit $ac_status); }; }; then
7741   ac_cv_lib_ssleay32_SSL_library_init=yes
7742 else
7743   echo "$as_me: failed program was:" >&5
7744 sed 's/^/| /' conftest.$ac_ext >&5
7745
7746 ac_cv_lib_ssleay32_SSL_library_init=no
7747 fi
7748 rm -f conftest.err conftest.$ac_objext \
7749       conftest$ac_exeext conftest.$ac_ext
7750 LIBS=$ac_check_lib_save_LIBS
7751 fi
7752 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7753 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7754 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7755   cat >>confdefs.h <<_ACEOF
7756 #define HAVE_LIBSSLEAY32 1
7757 _ACEOF
7758
7759   LIBS="-lssleay32 $LIBS"
7760
7761 else
7762   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7763 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7764    { (exit 1); exit 1; }; }
7765 fi
7766
7767   fi
7768 fi
7769
7770 if test "$with_pam" = yes ; then
7771
7772 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7773 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7774 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7775   echo $ECHO_N "(cached) $ECHO_C" >&6
7776 else
7777   ac_check_lib_save_LIBS=$LIBS
7778 LIBS="-lpam  $LIBS"
7779 cat >conftest.$ac_ext <<_ACEOF
7780 /* confdefs.h.  */
7781 _ACEOF
7782 cat confdefs.h >>conftest.$ac_ext
7783 cat >>conftest.$ac_ext <<_ACEOF
7784 /* end confdefs.h.  */
7785
7786 /* Override any gcc2 internal prototype to avoid an error.  */
7787 #ifdef __cplusplus
7788 extern "C"
7789 #endif
7790 /* We use char because int might match the return type of a gcc2
7791    builtin and then its argument prototype would still apply.  */
7792 char pam_start ();
7793 int
7794 main ()
7795 {
7796 pam_start ();
7797   ;
7798   return 0;
7799 }
7800 _ACEOF
7801 rm -f conftest.$ac_objext conftest$ac_exeext
7802 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7803   (eval $ac_link) 2>conftest.er1
7804   ac_status=$?
7805   grep -v '^ *+' conftest.er1 >conftest.err
7806   rm -f conftest.er1
7807   cat conftest.err >&5
7808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7809   (exit $ac_status); } &&
7810          { ac_try='test -z "$ac_c_werror_flag"
7811                          || test ! -s conftest.err'
7812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7813   (eval $ac_try) 2>&5
7814   ac_status=$?
7815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7816   (exit $ac_status); }; } &&
7817          { ac_try='test -s conftest$ac_exeext'
7818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7819   (eval $ac_try) 2>&5
7820   ac_status=$?
7821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7822   (exit $ac_status); }; }; then
7823   ac_cv_lib_pam_pam_start=yes
7824 else
7825   echo "$as_me: failed program was:" >&5
7826 sed 's/^/| /' conftest.$ac_ext >&5
7827
7828 ac_cv_lib_pam_pam_start=no
7829 fi
7830 rm -f conftest.err conftest.$ac_objext \
7831       conftest$ac_exeext conftest.$ac_ext
7832 LIBS=$ac_check_lib_save_LIBS
7833 fi
7834 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7835 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7836 if test $ac_cv_lib_pam_pam_start = yes; then
7837   cat >>confdefs.h <<_ACEOF
7838 #define HAVE_LIBPAM 1
7839 _ACEOF
7840
7841   LIBS="-lpam $LIBS"
7842
7843 else
7844   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7845 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7846    { (exit 1); exit 1; }; }
7847 fi
7848
7849 fi
7850
7851
7852 ##
7853 ## Header files
7854 ##
7855
7856 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7857 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7858 if test "${ac_cv_header_stdc+set}" = set; then
7859   echo $ECHO_N "(cached) $ECHO_C" >&6
7860 else
7861   cat >conftest.$ac_ext <<_ACEOF
7862 /* confdefs.h.  */
7863 _ACEOF
7864 cat confdefs.h >>conftest.$ac_ext
7865 cat >>conftest.$ac_ext <<_ACEOF
7866 /* end confdefs.h.  */
7867 #include <stdlib.h>
7868 #include <stdarg.h>
7869 #include <string.h>
7870 #include <float.h>
7871
7872 int
7873 main ()
7874 {
7875
7876   ;
7877   return 0;
7878 }
7879 _ACEOF
7880 rm -f conftest.$ac_objext
7881 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7882   (eval $ac_compile) 2>conftest.er1
7883   ac_status=$?
7884   grep -v '^ *+' conftest.er1 >conftest.err
7885   rm -f conftest.er1
7886   cat conftest.err >&5
7887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7888   (exit $ac_status); } &&
7889          { ac_try='test -z "$ac_c_werror_flag"
7890                          || test ! -s conftest.err'
7891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7892   (eval $ac_try) 2>&5
7893   ac_status=$?
7894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895   (exit $ac_status); }; } &&
7896          { ac_try='test -s conftest.$ac_objext'
7897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7898   (eval $ac_try) 2>&5
7899   ac_status=$?
7900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7901   (exit $ac_status); }; }; then
7902   ac_cv_header_stdc=yes
7903 else
7904   echo "$as_me: failed program was:" >&5
7905 sed 's/^/| /' conftest.$ac_ext >&5
7906
7907 ac_cv_header_stdc=no
7908 fi
7909 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7910
7911 if test $ac_cv_header_stdc = yes; then
7912   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7913   cat >conftest.$ac_ext <<_ACEOF
7914 /* confdefs.h.  */
7915 _ACEOF
7916 cat confdefs.h >>conftest.$ac_ext
7917 cat >>conftest.$ac_ext <<_ACEOF
7918 /* end confdefs.h.  */
7919 #include <string.h>
7920
7921 _ACEOF
7922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7923   $EGREP "memchr" >/dev/null 2>&1; then
7924   :
7925 else
7926   ac_cv_header_stdc=no
7927 fi
7928 rm -f conftest*
7929
7930 fi
7931
7932 if test $ac_cv_header_stdc = yes; then
7933   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7934   cat >conftest.$ac_ext <<_ACEOF
7935 /* confdefs.h.  */
7936 _ACEOF
7937 cat confdefs.h >>conftest.$ac_ext
7938 cat >>conftest.$ac_ext <<_ACEOF
7939 /* end confdefs.h.  */
7940 #include <stdlib.h>
7941
7942 _ACEOF
7943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7944   $EGREP "free" >/dev/null 2>&1; then
7945   :
7946 else
7947   ac_cv_header_stdc=no
7948 fi
7949 rm -f conftest*
7950
7951 fi
7952
7953 if test $ac_cv_header_stdc = yes; then
7954   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7955   if test "$cross_compiling" = yes; then
7956   :
7957 else
7958   cat >conftest.$ac_ext <<_ACEOF
7959 /* confdefs.h.  */
7960 _ACEOF
7961 cat confdefs.h >>conftest.$ac_ext
7962 cat >>conftest.$ac_ext <<_ACEOF
7963 /* end confdefs.h.  */
7964 #include <ctype.h>
7965 #if ((' ' & 0x0FF) == 0x020)
7966 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7967 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7968 #else
7969 # define ISLOWER(c) \
7970                    (('a' <= (c) && (c) <= 'i') \
7971                      || ('j' <= (c) && (c) <= 'r') \
7972                      || ('s' <= (c) && (c) <= 'z'))
7973 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7974 #endif
7975
7976 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7977 int
7978 main ()
7979 {
7980   int i;
7981   for (i = 0; i < 256; i++)
7982     if (XOR (islower (i), ISLOWER (i))
7983         || toupper (i) != TOUPPER (i))
7984       exit(2);
7985   exit (0);
7986 }
7987 _ACEOF
7988 rm -f conftest$ac_exeext
7989 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7990   (eval $ac_link) 2>&5
7991   ac_status=$?
7992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7993   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7995   (eval $ac_try) 2>&5
7996   ac_status=$?
7997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7998   (exit $ac_status); }; }; then
7999   :
8000 else
8001   echo "$as_me: program exited with status $ac_status" >&5
8002 echo "$as_me: failed program was:" >&5
8003 sed 's/^/| /' conftest.$ac_ext >&5
8004
8005 ( exit $ac_status )
8006 ac_cv_header_stdc=no
8007 fi
8008 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8009 fi
8010 fi
8011 fi
8012 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8013 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8014 if test $ac_cv_header_stdc = yes; then
8015
8016 cat >>confdefs.h <<\_ACEOF
8017 #define STDC_HEADERS 1
8018 _ACEOF
8019
8020 fi
8021
8022 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8033                   inttypes.h stdint.h unistd.h
8034 do
8035 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8036 echo "$as_me:$LINENO: checking for $ac_header" >&5
8037 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8038 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8039   echo $ECHO_N "(cached) $ECHO_C" >&6
8040 else
8041   cat >conftest.$ac_ext <<_ACEOF
8042 /* confdefs.h.  */
8043 _ACEOF
8044 cat confdefs.h >>conftest.$ac_ext
8045 cat >>conftest.$ac_ext <<_ACEOF
8046 /* end confdefs.h.  */
8047 $ac_includes_default
8048
8049 #include <$ac_header>
8050 _ACEOF
8051 rm -f conftest.$ac_objext
8052 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8053   (eval $ac_compile) 2>conftest.er1
8054   ac_status=$?
8055   grep -v '^ *+' conftest.er1 >conftest.err
8056   rm -f conftest.er1
8057   cat conftest.err >&5
8058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8059   (exit $ac_status); } &&
8060          { ac_try='test -z "$ac_c_werror_flag"
8061                          || test ! -s conftest.err'
8062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8063   (eval $ac_try) 2>&5
8064   ac_status=$?
8065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066   (exit $ac_status); }; } &&
8067          { ac_try='test -s conftest.$ac_objext'
8068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8069   (eval $ac_try) 2>&5
8070   ac_status=$?
8071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8072   (exit $ac_status); }; }; then
8073   eval "$as_ac_Header=yes"
8074 else
8075   echo "$as_me: failed program was:" >&5
8076 sed 's/^/| /' conftest.$ac_ext >&5
8077
8078 eval "$as_ac_Header=no"
8079 fi
8080 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8081 fi
8082 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8083 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8084 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8085   cat >>confdefs.h <<_ACEOF
8086 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8087 _ACEOF
8088
8089 fi
8090
8091 done
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119 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
8120 do
8121 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8122 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8123   echo "$as_me:$LINENO: checking for $ac_header" >&5
8124 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8125 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8126   echo $ECHO_N "(cached) $ECHO_C" >&6
8127 fi
8128 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8129 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8130 else
8131   # Is the header compilable?
8132 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8133 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8134 cat >conftest.$ac_ext <<_ACEOF
8135 /* confdefs.h.  */
8136 _ACEOF
8137 cat confdefs.h >>conftest.$ac_ext
8138 cat >>conftest.$ac_ext <<_ACEOF
8139 /* end confdefs.h.  */
8140 $ac_includes_default
8141 #include <$ac_header>
8142 _ACEOF
8143 rm -f conftest.$ac_objext
8144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8145   (eval $ac_compile) 2>conftest.er1
8146   ac_status=$?
8147   grep -v '^ *+' conftest.er1 >conftest.err
8148   rm -f conftest.er1
8149   cat conftest.err >&5
8150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8151   (exit $ac_status); } &&
8152          { ac_try='test -z "$ac_c_werror_flag"
8153                          || test ! -s conftest.err'
8154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8155   (eval $ac_try) 2>&5
8156   ac_status=$?
8157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8158   (exit $ac_status); }; } &&
8159          { ac_try='test -s conftest.$ac_objext'
8160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8161   (eval $ac_try) 2>&5
8162   ac_status=$?
8163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8164   (exit $ac_status); }; }; then
8165   ac_header_compiler=yes
8166 else
8167   echo "$as_me: failed program was:" >&5
8168 sed 's/^/| /' conftest.$ac_ext >&5
8169
8170 ac_header_compiler=no
8171 fi
8172 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8173 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8174 echo "${ECHO_T}$ac_header_compiler" >&6
8175
8176 # Is the header present?
8177 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8178 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8179 cat >conftest.$ac_ext <<_ACEOF
8180 /* confdefs.h.  */
8181 _ACEOF
8182 cat confdefs.h >>conftest.$ac_ext
8183 cat >>conftest.$ac_ext <<_ACEOF
8184 /* end confdefs.h.  */
8185 #include <$ac_header>
8186 _ACEOF
8187 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8188   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8189   ac_status=$?
8190   grep -v '^ *+' conftest.er1 >conftest.err
8191   rm -f conftest.er1
8192   cat conftest.err >&5
8193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8194   (exit $ac_status); } >/dev/null; then
8195   if test -s conftest.err; then
8196     ac_cpp_err=$ac_c_preproc_warn_flag
8197     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8198   else
8199     ac_cpp_err=
8200   fi
8201 else
8202   ac_cpp_err=yes
8203 fi
8204 if test -z "$ac_cpp_err"; then
8205   ac_header_preproc=yes
8206 else
8207   echo "$as_me: failed program was:" >&5
8208 sed 's/^/| /' conftest.$ac_ext >&5
8209
8210   ac_header_preproc=no
8211 fi
8212 rm -f conftest.err conftest.$ac_ext
8213 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8214 echo "${ECHO_T}$ac_header_preproc" >&6
8215
8216 # So?  What about this header?
8217 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8218   yes:no: )
8219     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8220 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8221     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8222 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8223     ac_header_preproc=yes
8224     ;;
8225   no:yes:* )
8226     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8227 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8228     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8229 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8230     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8231 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8232     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8233 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8234     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8235 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8236     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8237 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8238     (
8239       cat <<\_ASBOX
8240 ## ---------------------------------------- ##
8241 ## Report this to pgsql-bugs@postgresql.org ##
8242 ## ---------------------------------------- ##
8243 _ASBOX
8244     ) |
8245       sed "s/^/$as_me: WARNING:     /" >&2
8246     ;;
8247 esac
8248 echo "$as_me:$LINENO: checking for $ac_header" >&5
8249 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8250 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8251   echo $ECHO_N "(cached) $ECHO_C" >&6
8252 else
8253   eval "$as_ac_Header=\$ac_header_preproc"
8254 fi
8255 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8256 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8257
8258 fi
8259 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8260   cat >>confdefs.h <<_ACEOF
8261 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8262 _ACEOF
8263
8264 fi
8265
8266 done
8267
8268
8269 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
8270 # netinet/in.h is included first.
8271
8272 for ac_header in netinet/in.h
8273 do
8274 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8275 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8276   echo "$as_me:$LINENO: checking for $ac_header" >&5
8277 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8278 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8279   echo $ECHO_N "(cached) $ECHO_C" >&6
8280 fi
8281 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8282 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8283 else
8284   # Is the header compilable?
8285 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8286 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8287 cat >conftest.$ac_ext <<_ACEOF
8288 /* confdefs.h.  */
8289 _ACEOF
8290 cat confdefs.h >>conftest.$ac_ext
8291 cat >>conftest.$ac_ext <<_ACEOF
8292 /* end confdefs.h.  */
8293 $ac_includes_default
8294 #include <$ac_header>
8295 _ACEOF
8296 rm -f conftest.$ac_objext
8297 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8298   (eval $ac_compile) 2>conftest.er1
8299   ac_status=$?
8300   grep -v '^ *+' conftest.er1 >conftest.err
8301   rm -f conftest.er1
8302   cat conftest.err >&5
8303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8304   (exit $ac_status); } &&
8305          { ac_try='test -z "$ac_c_werror_flag"
8306                          || test ! -s conftest.err'
8307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8308   (eval $ac_try) 2>&5
8309   ac_status=$?
8310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311   (exit $ac_status); }; } &&
8312          { ac_try='test -s conftest.$ac_objext'
8313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8314   (eval $ac_try) 2>&5
8315   ac_status=$?
8316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317   (exit $ac_status); }; }; then
8318   ac_header_compiler=yes
8319 else
8320   echo "$as_me: failed program was:" >&5
8321 sed 's/^/| /' conftest.$ac_ext >&5
8322
8323 ac_header_compiler=no
8324 fi
8325 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8326 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8327 echo "${ECHO_T}$ac_header_compiler" >&6
8328
8329 # Is the header present?
8330 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8331 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8332 cat >conftest.$ac_ext <<_ACEOF
8333 /* confdefs.h.  */
8334 _ACEOF
8335 cat confdefs.h >>conftest.$ac_ext
8336 cat >>conftest.$ac_ext <<_ACEOF
8337 /* end confdefs.h.  */
8338 #include <$ac_header>
8339 _ACEOF
8340 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8341   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8342   ac_status=$?
8343   grep -v '^ *+' conftest.er1 >conftest.err
8344   rm -f conftest.er1
8345   cat conftest.err >&5
8346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347   (exit $ac_status); } >/dev/null; then
8348   if test -s conftest.err; then
8349     ac_cpp_err=$ac_c_preproc_warn_flag
8350     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8351   else
8352     ac_cpp_err=
8353   fi
8354 else
8355   ac_cpp_err=yes
8356 fi
8357 if test -z "$ac_cpp_err"; then
8358   ac_header_preproc=yes
8359 else
8360   echo "$as_me: failed program was:" >&5
8361 sed 's/^/| /' conftest.$ac_ext >&5
8362
8363   ac_header_preproc=no
8364 fi
8365 rm -f conftest.err conftest.$ac_ext
8366 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8367 echo "${ECHO_T}$ac_header_preproc" >&6
8368
8369 # So?  What about this header?
8370 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8371   yes:no: )
8372     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8373 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8374     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8375 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8376     ac_header_preproc=yes
8377     ;;
8378   no:yes:* )
8379     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8380 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8381     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8382 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8383     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8384 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8385     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8386 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8387     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8388 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8389     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8390 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8391     (
8392       cat <<\_ASBOX
8393 ## ---------------------------------------- ##
8394 ## Report this to pgsql-bugs@postgresql.org ##
8395 ## ---------------------------------------- ##
8396 _ASBOX
8397     ) |
8398       sed "s/^/$as_me: WARNING:     /" >&2
8399     ;;
8400 esac
8401 echo "$as_me:$LINENO: checking for $ac_header" >&5
8402 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8403 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8404   echo $ECHO_N "(cached) $ECHO_C" >&6
8405 else
8406   eval "$as_ac_Header=\$ac_header_preproc"
8407 fi
8408 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8409 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8410
8411 fi
8412 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8413   cat >>confdefs.h <<_ACEOF
8414 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8415 _ACEOF
8416
8417 fi
8418
8419 done
8420
8421
8422 for ac_header in netinet/tcp.h
8423 do
8424 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8425 echo "$as_me:$LINENO: checking for $ac_header" >&5
8426 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8427 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8428   echo $ECHO_N "(cached) $ECHO_C" >&6
8429 else
8430   cat >conftest.$ac_ext <<_ACEOF
8431 /* confdefs.h.  */
8432 _ACEOF
8433 cat confdefs.h >>conftest.$ac_ext
8434 cat >>conftest.$ac_ext <<_ACEOF
8435 /* end confdefs.h.  */
8436 $ac_includes_default
8437 #ifdef HAVE_NETINET_IN_H
8438 #include <netinet/in.h>
8439 #endif
8440
8441
8442 #include <$ac_header>
8443 _ACEOF
8444 rm -f conftest.$ac_objext
8445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8446   (eval $ac_compile) 2>conftest.er1
8447   ac_status=$?
8448   grep -v '^ *+' conftest.er1 >conftest.err
8449   rm -f conftest.er1
8450   cat conftest.err >&5
8451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8452   (exit $ac_status); } &&
8453          { ac_try='test -z "$ac_c_werror_flag"
8454                          || test ! -s conftest.err'
8455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8456   (eval $ac_try) 2>&5
8457   ac_status=$?
8458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459   (exit $ac_status); }; } &&
8460          { ac_try='test -s conftest.$ac_objext'
8461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8462   (eval $ac_try) 2>&5
8463   ac_status=$?
8464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8465   (exit $ac_status); }; }; then
8466   eval "$as_ac_Header=yes"
8467 else
8468   echo "$as_me: failed program was:" >&5
8469 sed 's/^/| /' conftest.$ac_ext >&5
8470
8471 eval "$as_ac_Header=no"
8472 fi
8473 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8474 fi
8475 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8476 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8477 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8478   cat >>confdefs.h <<_ACEOF
8479 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8480 _ACEOF
8481
8482 fi
8483
8484 done
8485
8486
8487 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8488
8489 for ac_header in readline/readline.h
8490 do
8491 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8492 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8493   echo "$as_me:$LINENO: checking for $ac_header" >&5
8494 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8495 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8496   echo $ECHO_N "(cached) $ECHO_C" >&6
8497 fi
8498 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8499 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8500 else
8501   # Is the header compilable?
8502 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8503 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8504 cat >conftest.$ac_ext <<_ACEOF
8505 /* confdefs.h.  */
8506 _ACEOF
8507 cat confdefs.h >>conftest.$ac_ext
8508 cat >>conftest.$ac_ext <<_ACEOF
8509 /* end confdefs.h.  */
8510 $ac_includes_default
8511 #include <$ac_header>
8512 _ACEOF
8513 rm -f conftest.$ac_objext
8514 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8515   (eval $ac_compile) 2>conftest.er1
8516   ac_status=$?
8517   grep -v '^ *+' conftest.er1 >conftest.err
8518   rm -f conftest.er1
8519   cat conftest.err >&5
8520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8521   (exit $ac_status); } &&
8522          { ac_try='test -z "$ac_c_werror_flag"
8523                          || test ! -s conftest.err'
8524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8525   (eval $ac_try) 2>&5
8526   ac_status=$?
8527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8528   (exit $ac_status); }; } &&
8529          { ac_try='test -s conftest.$ac_objext'
8530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8531   (eval $ac_try) 2>&5
8532   ac_status=$?
8533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534   (exit $ac_status); }; }; then
8535   ac_header_compiler=yes
8536 else
8537   echo "$as_me: failed program was:" >&5
8538 sed 's/^/| /' conftest.$ac_ext >&5
8539
8540 ac_header_compiler=no
8541 fi
8542 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8543 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8544 echo "${ECHO_T}$ac_header_compiler" >&6
8545
8546 # Is the header present?
8547 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8548 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8549 cat >conftest.$ac_ext <<_ACEOF
8550 /* confdefs.h.  */
8551 _ACEOF
8552 cat confdefs.h >>conftest.$ac_ext
8553 cat >>conftest.$ac_ext <<_ACEOF
8554 /* end confdefs.h.  */
8555 #include <$ac_header>
8556 _ACEOF
8557 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8558   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8559   ac_status=$?
8560   grep -v '^ *+' conftest.er1 >conftest.err
8561   rm -f conftest.er1
8562   cat conftest.err >&5
8563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564   (exit $ac_status); } >/dev/null; then
8565   if test -s conftest.err; then
8566     ac_cpp_err=$ac_c_preproc_warn_flag
8567     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8568   else
8569     ac_cpp_err=
8570   fi
8571 else
8572   ac_cpp_err=yes
8573 fi
8574 if test -z "$ac_cpp_err"; then
8575   ac_header_preproc=yes
8576 else
8577   echo "$as_me: failed program was:" >&5
8578 sed 's/^/| /' conftest.$ac_ext >&5
8579
8580   ac_header_preproc=no
8581 fi
8582 rm -f conftest.err conftest.$ac_ext
8583 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8584 echo "${ECHO_T}$ac_header_preproc" >&6
8585
8586 # So?  What about this header?
8587 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8588   yes:no: )
8589     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8590 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8591     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8592 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8593     ac_header_preproc=yes
8594     ;;
8595   no:yes:* )
8596     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8597 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8598     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8599 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8600     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8601 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8602     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8603 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8604     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8605 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8606     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8607 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8608     (
8609       cat <<\_ASBOX
8610 ## ---------------------------------------- ##
8611 ## Report this to pgsql-bugs@postgresql.org ##
8612 ## ---------------------------------------- ##
8613 _ASBOX
8614     ) |
8615       sed "s/^/$as_me: WARNING:     /" >&2
8616     ;;
8617 esac
8618 echo "$as_me:$LINENO: checking for $ac_header" >&5
8619 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8620 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8621   echo $ECHO_N "(cached) $ECHO_C" >&6
8622 else
8623   eval "$as_ac_Header=\$ac_header_preproc"
8624 fi
8625 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8626 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8627
8628 fi
8629 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8630   cat >>confdefs.h <<_ACEOF
8631 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8632 _ACEOF
8633
8634 else
8635
8636 for ac_header in readline.h
8637 do
8638 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8639 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8640   echo "$as_me:$LINENO: checking for $ac_header" >&5
8641 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8642 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8643   echo $ECHO_N "(cached) $ECHO_C" >&6
8644 fi
8645 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8646 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8647 else
8648   # Is the header compilable?
8649 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8650 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8651 cat >conftest.$ac_ext <<_ACEOF
8652 /* confdefs.h.  */
8653 _ACEOF
8654 cat confdefs.h >>conftest.$ac_ext
8655 cat >>conftest.$ac_ext <<_ACEOF
8656 /* end confdefs.h.  */
8657 $ac_includes_default
8658 #include <$ac_header>
8659 _ACEOF
8660 rm -f conftest.$ac_objext
8661 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8662   (eval $ac_compile) 2>conftest.er1
8663   ac_status=$?
8664   grep -v '^ *+' conftest.er1 >conftest.err
8665   rm -f conftest.er1
8666   cat conftest.err >&5
8667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668   (exit $ac_status); } &&
8669          { ac_try='test -z "$ac_c_werror_flag"
8670                          || test ! -s conftest.err'
8671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8672   (eval $ac_try) 2>&5
8673   ac_status=$?
8674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8675   (exit $ac_status); }; } &&
8676          { ac_try='test -s conftest.$ac_objext'
8677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8678   (eval $ac_try) 2>&5
8679   ac_status=$?
8680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8681   (exit $ac_status); }; }; then
8682   ac_header_compiler=yes
8683 else
8684   echo "$as_me: failed program was:" >&5
8685 sed 's/^/| /' conftest.$ac_ext >&5
8686
8687 ac_header_compiler=no
8688 fi
8689 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8690 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8691 echo "${ECHO_T}$ac_header_compiler" >&6
8692
8693 # Is the header present?
8694 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8695 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8696 cat >conftest.$ac_ext <<_ACEOF
8697 /* confdefs.h.  */
8698 _ACEOF
8699 cat confdefs.h >>conftest.$ac_ext
8700 cat >>conftest.$ac_ext <<_ACEOF
8701 /* end confdefs.h.  */
8702 #include <$ac_header>
8703 _ACEOF
8704 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8705   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8706   ac_status=$?
8707   grep -v '^ *+' conftest.er1 >conftest.err
8708   rm -f conftest.er1
8709   cat conftest.err >&5
8710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8711   (exit $ac_status); } >/dev/null; then
8712   if test -s conftest.err; then
8713     ac_cpp_err=$ac_c_preproc_warn_flag
8714     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8715   else
8716     ac_cpp_err=
8717   fi
8718 else
8719   ac_cpp_err=yes
8720 fi
8721 if test -z "$ac_cpp_err"; then
8722   ac_header_preproc=yes
8723 else
8724   echo "$as_me: failed program was:" >&5
8725 sed 's/^/| /' conftest.$ac_ext >&5
8726
8727   ac_header_preproc=no
8728 fi
8729 rm -f conftest.err conftest.$ac_ext
8730 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8731 echo "${ECHO_T}$ac_header_preproc" >&6
8732
8733 # So?  What about this header?
8734 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8735   yes:no: )
8736     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8737 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8738     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8739 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8740     ac_header_preproc=yes
8741     ;;
8742   no:yes:* )
8743     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8744 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8745     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8746 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8747     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8748 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8749     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8750 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8751     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8752 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8753     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8754 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8755     (
8756       cat <<\_ASBOX
8757 ## ---------------------------------------- ##
8758 ## Report this to pgsql-bugs@postgresql.org ##
8759 ## ---------------------------------------- ##
8760 _ASBOX
8761     ) |
8762       sed "s/^/$as_me: WARNING:     /" >&2
8763     ;;
8764 esac
8765 echo "$as_me:$LINENO: checking for $ac_header" >&5
8766 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8767 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8768   echo $ECHO_N "(cached) $ECHO_C" >&6
8769 else
8770   eval "$as_ac_Header=\$ac_header_preproc"
8771 fi
8772 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8773 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8774
8775 fi
8776 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8777   cat >>confdefs.h <<_ACEOF
8778 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8779 _ACEOF
8780
8781 else
8782   { { echo "$as_me:$LINENO: error: readline header not found
8783 If you have readline already installed, see config.log for details on the
8784 failure.  It is possible the compiler isn't looking in the proper directory.
8785 Use --without-readline to disable readline support." >&5
8786 echo "$as_me: error: readline header not found
8787 If you have readline already installed, see config.log for details on the
8788 failure.  It is possible the compiler isn't looking in the proper directory.
8789 Use --without-readline to disable readline support." >&2;}
8790    { (exit 1); exit 1; }; }
8791 fi
8792
8793 done
8794
8795 fi
8796
8797 done
8798
8799
8800 for ac_header in readline/history.h
8801 do
8802 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8803 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8804   echo "$as_me:$LINENO: checking for $ac_header" >&5
8805 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8806 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8807   echo $ECHO_N "(cached) $ECHO_C" >&6
8808 fi
8809 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8810 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8811 else
8812   # Is the header compilable?
8813 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8814 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8815 cat >conftest.$ac_ext <<_ACEOF
8816 /* confdefs.h.  */
8817 _ACEOF
8818 cat confdefs.h >>conftest.$ac_ext
8819 cat >>conftest.$ac_ext <<_ACEOF
8820 /* end confdefs.h.  */
8821 $ac_includes_default
8822 #include <$ac_header>
8823 _ACEOF
8824 rm -f conftest.$ac_objext
8825 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8826   (eval $ac_compile) 2>conftest.er1
8827   ac_status=$?
8828   grep -v '^ *+' conftest.er1 >conftest.err
8829   rm -f conftest.er1
8830   cat conftest.err >&5
8831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832   (exit $ac_status); } &&
8833          { ac_try='test -z "$ac_c_werror_flag"
8834                          || test ! -s conftest.err'
8835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8836   (eval $ac_try) 2>&5
8837   ac_status=$?
8838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839   (exit $ac_status); }; } &&
8840          { ac_try='test -s conftest.$ac_objext'
8841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8842   (eval $ac_try) 2>&5
8843   ac_status=$?
8844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8845   (exit $ac_status); }; }; then
8846   ac_header_compiler=yes
8847 else
8848   echo "$as_me: failed program was:" >&5
8849 sed 's/^/| /' conftest.$ac_ext >&5
8850
8851 ac_header_compiler=no
8852 fi
8853 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8854 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8855 echo "${ECHO_T}$ac_header_compiler" >&6
8856
8857 # Is the header present?
8858 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8859 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8860 cat >conftest.$ac_ext <<_ACEOF
8861 /* confdefs.h.  */
8862 _ACEOF
8863 cat confdefs.h >>conftest.$ac_ext
8864 cat >>conftest.$ac_ext <<_ACEOF
8865 /* end confdefs.h.  */
8866 #include <$ac_header>
8867 _ACEOF
8868 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8869   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8870   ac_status=$?
8871   grep -v '^ *+' conftest.er1 >conftest.err
8872   rm -f conftest.er1
8873   cat conftest.err >&5
8874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8875   (exit $ac_status); } >/dev/null; then
8876   if test -s conftest.err; then
8877     ac_cpp_err=$ac_c_preproc_warn_flag
8878     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8879   else
8880     ac_cpp_err=
8881   fi
8882 else
8883   ac_cpp_err=yes
8884 fi
8885 if test -z "$ac_cpp_err"; then
8886   ac_header_preproc=yes
8887 else
8888   echo "$as_me: failed program was:" >&5
8889 sed 's/^/| /' conftest.$ac_ext >&5
8890
8891   ac_header_preproc=no
8892 fi
8893 rm -f conftest.err conftest.$ac_ext
8894 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8895 echo "${ECHO_T}$ac_header_preproc" >&6
8896
8897 # So?  What about this header?
8898 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8899   yes:no: )
8900     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8901 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8902     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8903 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8904     ac_header_preproc=yes
8905     ;;
8906   no:yes:* )
8907     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8908 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8909     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8910 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8911     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8912 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8913     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8914 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8915     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8916 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8917     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8918 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8919     (
8920       cat <<\_ASBOX
8921 ## ---------------------------------------- ##
8922 ## Report this to pgsql-bugs@postgresql.org ##
8923 ## ---------------------------------------- ##
8924 _ASBOX
8925     ) |
8926       sed "s/^/$as_me: WARNING:     /" >&2
8927     ;;
8928 esac
8929 echo "$as_me:$LINENO: checking for $ac_header" >&5
8930 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8931 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8932   echo $ECHO_N "(cached) $ECHO_C" >&6
8933 else
8934   eval "$as_ac_Header=\$ac_header_preproc"
8935 fi
8936 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8937 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8938
8939 fi
8940 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8941   cat >>confdefs.h <<_ACEOF
8942 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8943 _ACEOF
8944
8945 else
8946
8947 for ac_header in history.h
8948 do
8949 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8950 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8951   echo "$as_me:$LINENO: checking for $ac_header" >&5
8952 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8953 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8954   echo $ECHO_N "(cached) $ECHO_C" >&6
8955 fi
8956 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8957 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8958 else
8959   # Is the header compilable?
8960 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8961 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8962 cat >conftest.$ac_ext <<_ACEOF
8963 /* confdefs.h.  */
8964 _ACEOF
8965 cat confdefs.h >>conftest.$ac_ext
8966 cat >>conftest.$ac_ext <<_ACEOF
8967 /* end confdefs.h.  */
8968 $ac_includes_default
8969 #include <$ac_header>
8970 _ACEOF
8971 rm -f conftest.$ac_objext
8972 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8973   (eval $ac_compile) 2>conftest.er1
8974   ac_status=$?
8975   grep -v '^ *+' conftest.er1 >conftest.err
8976   rm -f conftest.er1
8977   cat conftest.err >&5
8978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8979   (exit $ac_status); } &&
8980          { ac_try='test -z "$ac_c_werror_flag"
8981                          || test ! -s conftest.err'
8982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8983   (eval $ac_try) 2>&5
8984   ac_status=$?
8985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8986   (exit $ac_status); }; } &&
8987          { ac_try='test -s conftest.$ac_objext'
8988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8989   (eval $ac_try) 2>&5
8990   ac_status=$?
8991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8992   (exit $ac_status); }; }; then
8993   ac_header_compiler=yes
8994 else
8995   echo "$as_me: failed program was:" >&5
8996 sed 's/^/| /' conftest.$ac_ext >&5
8997
8998 ac_header_compiler=no
8999 fi
9000 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9001 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9002 echo "${ECHO_T}$ac_header_compiler" >&6
9003
9004 # Is the header present?
9005 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9006 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9007 cat >conftest.$ac_ext <<_ACEOF
9008 /* confdefs.h.  */
9009 _ACEOF
9010 cat confdefs.h >>conftest.$ac_ext
9011 cat >>conftest.$ac_ext <<_ACEOF
9012 /* end confdefs.h.  */
9013 #include <$ac_header>
9014 _ACEOF
9015 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9016   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9017   ac_status=$?
9018   grep -v '^ *+' conftest.er1 >conftest.err
9019   rm -f conftest.er1
9020   cat conftest.err >&5
9021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9022   (exit $ac_status); } >/dev/null; then
9023   if test -s conftest.err; then
9024     ac_cpp_err=$ac_c_preproc_warn_flag
9025     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9026   else
9027     ac_cpp_err=
9028   fi
9029 else
9030   ac_cpp_err=yes
9031 fi
9032 if test -z "$ac_cpp_err"; then
9033   ac_header_preproc=yes
9034 else
9035   echo "$as_me: failed program was:" >&5
9036 sed 's/^/| /' conftest.$ac_ext >&5
9037
9038   ac_header_preproc=no
9039 fi
9040 rm -f conftest.err conftest.$ac_ext
9041 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9042 echo "${ECHO_T}$ac_header_preproc" >&6
9043
9044 # So?  What about this header?
9045 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9046   yes:no: )
9047     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9048 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9049     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9050 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9051     ac_header_preproc=yes
9052     ;;
9053   no:yes:* )
9054     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9055 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9056     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9057 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9058     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9059 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9060     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9061 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9062     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9063 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9064     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9065 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9066     (
9067       cat <<\_ASBOX
9068 ## ---------------------------------------- ##
9069 ## Report this to pgsql-bugs@postgresql.org ##
9070 ## ---------------------------------------- ##
9071 _ASBOX
9072     ) |
9073       sed "s/^/$as_me: WARNING:     /" >&2
9074     ;;
9075 esac
9076 echo "$as_me:$LINENO: checking for $ac_header" >&5
9077 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9078 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9079   echo $ECHO_N "(cached) $ECHO_C" >&6
9080 else
9081   eval "$as_ac_Header=\$ac_header_preproc"
9082 fi
9083 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9084 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9085
9086 fi
9087 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9088   cat >>confdefs.h <<_ACEOF
9089 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9090 _ACEOF
9091
9092 else
9093   { { echo "$as_me:$LINENO: error: history header not found
9094 If you have readline already installed, see config.log for details on the
9095 failure.  It is possible the compiler isn't looking in the proper directory.
9096 Use --without-readline to disable readline support." >&5
9097 echo "$as_me: error: history header not found
9098 If you have readline already installed, see config.log for details on the
9099 failure.  It is possible the compiler isn't looking in the proper directory.
9100 Use --without-readline to disable readline support." >&2;}
9101    { (exit 1); exit 1; }; }
9102 fi
9103
9104 done
9105
9106 fi
9107
9108 done
9109
9110 fi
9111
9112 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9113 # Some installations of libedit usurp /usr/include/readline/, which seems
9114 # bad practice, since in combined installations readline will have its headers
9115 # there.  We might have to resort to AC_EGREP checks to make sure we found
9116 # the proper header...
9117
9118 for ac_header in editline/readline.h
9119 do
9120 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9121 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9122   echo "$as_me:$LINENO: checking for $ac_header" >&5
9123 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9124 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9125   echo $ECHO_N "(cached) $ECHO_C" >&6
9126 fi
9127 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9128 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9129 else
9130   # Is the header compilable?
9131 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9132 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9133 cat >conftest.$ac_ext <<_ACEOF
9134 /* confdefs.h.  */
9135 _ACEOF
9136 cat confdefs.h >>conftest.$ac_ext
9137 cat >>conftest.$ac_ext <<_ACEOF
9138 /* end confdefs.h.  */
9139 $ac_includes_default
9140 #include <$ac_header>
9141 _ACEOF
9142 rm -f conftest.$ac_objext
9143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9144   (eval $ac_compile) 2>conftest.er1
9145   ac_status=$?
9146   grep -v '^ *+' conftest.er1 >conftest.err
9147   rm -f conftest.er1
9148   cat conftest.err >&5
9149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9150   (exit $ac_status); } &&
9151          { ac_try='test -z "$ac_c_werror_flag"
9152                          || test ! -s conftest.err'
9153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9154   (eval $ac_try) 2>&5
9155   ac_status=$?
9156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9157   (exit $ac_status); }; } &&
9158          { ac_try='test -s conftest.$ac_objext'
9159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9160   (eval $ac_try) 2>&5
9161   ac_status=$?
9162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9163   (exit $ac_status); }; }; then
9164   ac_header_compiler=yes
9165 else
9166   echo "$as_me: failed program was:" >&5
9167 sed 's/^/| /' conftest.$ac_ext >&5
9168
9169 ac_header_compiler=no
9170 fi
9171 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9172 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9173 echo "${ECHO_T}$ac_header_compiler" >&6
9174
9175 # Is the header present?
9176 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9177 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9178 cat >conftest.$ac_ext <<_ACEOF
9179 /* confdefs.h.  */
9180 _ACEOF
9181 cat confdefs.h >>conftest.$ac_ext
9182 cat >>conftest.$ac_ext <<_ACEOF
9183 /* end confdefs.h.  */
9184 #include <$ac_header>
9185 _ACEOF
9186 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9187   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9188   ac_status=$?
9189   grep -v '^ *+' conftest.er1 >conftest.err
9190   rm -f conftest.er1
9191   cat conftest.err >&5
9192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9193   (exit $ac_status); } >/dev/null; then
9194   if test -s conftest.err; then
9195     ac_cpp_err=$ac_c_preproc_warn_flag
9196     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9197   else
9198     ac_cpp_err=
9199   fi
9200 else
9201   ac_cpp_err=yes
9202 fi
9203 if test -z "$ac_cpp_err"; then
9204   ac_header_preproc=yes
9205 else
9206   echo "$as_me: failed program was:" >&5
9207 sed 's/^/| /' conftest.$ac_ext >&5
9208
9209   ac_header_preproc=no
9210 fi
9211 rm -f conftest.err conftest.$ac_ext
9212 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9213 echo "${ECHO_T}$ac_header_preproc" >&6
9214
9215 # So?  What about this header?
9216 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9217   yes:no: )
9218     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9219 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9220     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9221 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9222     ac_header_preproc=yes
9223     ;;
9224   no:yes:* )
9225     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9226 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9227     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9228 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9229     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9230 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9231     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9232 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9233     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9234 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9235     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9236 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9237     (
9238       cat <<\_ASBOX
9239 ## ---------------------------------------- ##
9240 ## Report this to pgsql-bugs@postgresql.org ##
9241 ## ---------------------------------------- ##
9242 _ASBOX
9243     ) |
9244       sed "s/^/$as_me: WARNING:     /" >&2
9245     ;;
9246 esac
9247 echo "$as_me:$LINENO: checking for $ac_header" >&5
9248 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9249 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9250   echo $ECHO_N "(cached) $ECHO_C" >&6
9251 else
9252   eval "$as_ac_Header=\$ac_header_preproc"
9253 fi
9254 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9255 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9256
9257 fi
9258 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9259   cat >>confdefs.h <<_ACEOF
9260 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9261 _ACEOF
9262
9263 else
9264
9265 for ac_header in readline.h
9266 do
9267 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9268 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9269   echo "$as_me:$LINENO: checking for $ac_header" >&5
9270 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9271 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9272   echo $ECHO_N "(cached) $ECHO_C" >&6
9273 fi
9274 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9275 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9276 else
9277   # Is the header compilable?
9278 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9279 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9280 cat >conftest.$ac_ext <<_ACEOF
9281 /* confdefs.h.  */
9282 _ACEOF
9283 cat confdefs.h >>conftest.$ac_ext
9284 cat >>conftest.$ac_ext <<_ACEOF
9285 /* end confdefs.h.  */
9286 $ac_includes_default
9287 #include <$ac_header>
9288 _ACEOF
9289 rm -f conftest.$ac_objext
9290 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9291   (eval $ac_compile) 2>conftest.er1
9292   ac_status=$?
9293   grep -v '^ *+' conftest.er1 >conftest.err
9294   rm -f conftest.er1
9295   cat conftest.err >&5
9296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9297   (exit $ac_status); } &&
9298          { ac_try='test -z "$ac_c_werror_flag"
9299                          || test ! -s conftest.err'
9300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9301   (eval $ac_try) 2>&5
9302   ac_status=$?
9303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9304   (exit $ac_status); }; } &&
9305          { ac_try='test -s conftest.$ac_objext'
9306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9307   (eval $ac_try) 2>&5
9308   ac_status=$?
9309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9310   (exit $ac_status); }; }; then
9311   ac_header_compiler=yes
9312 else
9313   echo "$as_me: failed program was:" >&5
9314 sed 's/^/| /' conftest.$ac_ext >&5
9315
9316 ac_header_compiler=no
9317 fi
9318 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9319 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9320 echo "${ECHO_T}$ac_header_compiler" >&6
9321
9322 # Is the header present?
9323 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9324 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9325 cat >conftest.$ac_ext <<_ACEOF
9326 /* confdefs.h.  */
9327 _ACEOF
9328 cat confdefs.h >>conftest.$ac_ext
9329 cat >>conftest.$ac_ext <<_ACEOF
9330 /* end confdefs.h.  */
9331 #include <$ac_header>
9332 _ACEOF
9333 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9334   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9335   ac_status=$?
9336   grep -v '^ *+' conftest.er1 >conftest.err
9337   rm -f conftest.er1
9338   cat conftest.err >&5
9339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9340   (exit $ac_status); } >/dev/null; then
9341   if test -s conftest.err; then
9342     ac_cpp_err=$ac_c_preproc_warn_flag
9343     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9344   else
9345     ac_cpp_err=
9346   fi
9347 else
9348   ac_cpp_err=yes
9349 fi
9350 if test -z "$ac_cpp_err"; then
9351   ac_header_preproc=yes
9352 else
9353   echo "$as_me: failed program was:" >&5
9354 sed 's/^/| /' conftest.$ac_ext >&5
9355
9356   ac_header_preproc=no
9357 fi
9358 rm -f conftest.err conftest.$ac_ext
9359 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9360 echo "${ECHO_T}$ac_header_preproc" >&6
9361
9362 # So?  What about this header?
9363 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9364   yes:no: )
9365     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9366 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9367     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9368 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9369     ac_header_preproc=yes
9370     ;;
9371   no:yes:* )
9372     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9373 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9374     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9375 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9376     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9377 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9378     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9379 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9380     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9381 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9382     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9383 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9384     (
9385       cat <<\_ASBOX
9386 ## ---------------------------------------- ##
9387 ## Report this to pgsql-bugs@postgresql.org ##
9388 ## ---------------------------------------- ##
9389 _ASBOX
9390     ) |
9391       sed "s/^/$as_me: WARNING:     /" >&2
9392     ;;
9393 esac
9394 echo "$as_me:$LINENO: checking for $ac_header" >&5
9395 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9396 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9397   echo $ECHO_N "(cached) $ECHO_C" >&6
9398 else
9399   eval "$as_ac_Header=\$ac_header_preproc"
9400 fi
9401 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9402 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9403
9404 fi
9405 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9406   cat >>confdefs.h <<_ACEOF
9407 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9408 _ACEOF
9409
9410 else
9411
9412 for ac_header in readline/readline.h
9413 do
9414 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9415 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9416   echo "$as_me:$LINENO: checking for $ac_header" >&5
9417 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9418 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9419   echo $ECHO_N "(cached) $ECHO_C" >&6
9420 fi
9421 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9422 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9423 else
9424   # Is the header compilable?
9425 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9426 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9427 cat >conftest.$ac_ext <<_ACEOF
9428 /* confdefs.h.  */
9429 _ACEOF
9430 cat confdefs.h >>conftest.$ac_ext
9431 cat >>conftest.$ac_ext <<_ACEOF
9432 /* end confdefs.h.  */
9433 $ac_includes_default
9434 #include <$ac_header>
9435 _ACEOF
9436 rm -f conftest.$ac_objext
9437 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9438   (eval $ac_compile) 2>conftest.er1
9439   ac_status=$?
9440   grep -v '^ *+' conftest.er1 >conftest.err
9441   rm -f conftest.er1
9442   cat conftest.err >&5
9443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9444   (exit $ac_status); } &&
9445          { ac_try='test -z "$ac_c_werror_flag"
9446                          || test ! -s conftest.err'
9447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9448   (eval $ac_try) 2>&5
9449   ac_status=$?
9450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9451   (exit $ac_status); }; } &&
9452          { ac_try='test -s conftest.$ac_objext'
9453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9454   (eval $ac_try) 2>&5
9455   ac_status=$?
9456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9457   (exit $ac_status); }; }; then
9458   ac_header_compiler=yes
9459 else
9460   echo "$as_me: failed program was:" >&5
9461 sed 's/^/| /' conftest.$ac_ext >&5
9462
9463 ac_header_compiler=no
9464 fi
9465 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9466 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9467 echo "${ECHO_T}$ac_header_compiler" >&6
9468
9469 # Is the header present?
9470 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9471 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9472 cat >conftest.$ac_ext <<_ACEOF
9473 /* confdefs.h.  */
9474 _ACEOF
9475 cat confdefs.h >>conftest.$ac_ext
9476 cat >>conftest.$ac_ext <<_ACEOF
9477 /* end confdefs.h.  */
9478 #include <$ac_header>
9479 _ACEOF
9480 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9481   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9482   ac_status=$?
9483   grep -v '^ *+' conftest.er1 >conftest.err
9484   rm -f conftest.er1
9485   cat conftest.err >&5
9486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9487   (exit $ac_status); } >/dev/null; then
9488   if test -s conftest.err; then
9489     ac_cpp_err=$ac_c_preproc_warn_flag
9490     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9491   else
9492     ac_cpp_err=
9493   fi
9494 else
9495   ac_cpp_err=yes
9496 fi
9497 if test -z "$ac_cpp_err"; then
9498   ac_header_preproc=yes
9499 else
9500   echo "$as_me: failed program was:" >&5
9501 sed 's/^/| /' conftest.$ac_ext >&5
9502
9503   ac_header_preproc=no
9504 fi
9505 rm -f conftest.err conftest.$ac_ext
9506 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9507 echo "${ECHO_T}$ac_header_preproc" >&6
9508
9509 # So?  What about this header?
9510 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9511   yes:no: )
9512     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9513 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9514     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9515 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9516     ac_header_preproc=yes
9517     ;;
9518   no:yes:* )
9519     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9520 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9521     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9522 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9523     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9524 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9525     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9526 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9527     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9528 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9529     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9530 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9531     (
9532       cat <<\_ASBOX
9533 ## ---------------------------------------- ##
9534 ## Report this to pgsql-bugs@postgresql.org ##
9535 ## ---------------------------------------- ##
9536 _ASBOX
9537     ) |
9538       sed "s/^/$as_me: WARNING:     /" >&2
9539     ;;
9540 esac
9541 echo "$as_me:$LINENO: checking for $ac_header" >&5
9542 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9543 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9544   echo $ECHO_N "(cached) $ECHO_C" >&6
9545 else
9546   eval "$as_ac_Header=\$ac_header_preproc"
9547 fi
9548 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9549 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9550
9551 fi
9552 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9553   cat >>confdefs.h <<_ACEOF
9554 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9555 _ACEOF
9556
9557 else
9558   { { echo "$as_me:$LINENO: error: readline header not found
9559 If you have libedit already installed, see config.log for details on the
9560 failure.  It is possible the compiler isn't looking in the proper directory.
9561 Use --without-readline to disable libedit support." >&5
9562 echo "$as_me: error: readline header not found
9563 If you have libedit already installed, see config.log for details on the
9564 failure.  It is possible the compiler isn't looking in the proper directory.
9565 Use --without-readline to disable libedit support." >&2;}
9566    { (exit 1); exit 1; }; }
9567 fi
9568
9569 done
9570
9571 fi
9572
9573 done
9574
9575 fi
9576
9577 done
9578
9579
9580 for ac_header in editline/history.h
9581 do
9582 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9583 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9584   echo "$as_me:$LINENO: checking for $ac_header" >&5
9585 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9586 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9587   echo $ECHO_N "(cached) $ECHO_C" >&6
9588 fi
9589 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9590 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9591 else
9592   # Is the header compilable?
9593 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9594 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9595 cat >conftest.$ac_ext <<_ACEOF
9596 /* confdefs.h.  */
9597 _ACEOF
9598 cat confdefs.h >>conftest.$ac_ext
9599 cat >>conftest.$ac_ext <<_ACEOF
9600 /* end confdefs.h.  */
9601 $ac_includes_default
9602 #include <$ac_header>
9603 _ACEOF
9604 rm -f conftest.$ac_objext
9605 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9606   (eval $ac_compile) 2>conftest.er1
9607   ac_status=$?
9608   grep -v '^ *+' conftest.er1 >conftest.err
9609   rm -f conftest.er1
9610   cat conftest.err >&5
9611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9612   (exit $ac_status); } &&
9613          { ac_try='test -z "$ac_c_werror_flag"
9614                          || test ! -s conftest.err'
9615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9616   (eval $ac_try) 2>&5
9617   ac_status=$?
9618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9619   (exit $ac_status); }; } &&
9620          { ac_try='test -s conftest.$ac_objext'
9621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9622   (eval $ac_try) 2>&5
9623   ac_status=$?
9624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625   (exit $ac_status); }; }; then
9626   ac_header_compiler=yes
9627 else
9628   echo "$as_me: failed program was:" >&5
9629 sed 's/^/| /' conftest.$ac_ext >&5
9630
9631 ac_header_compiler=no
9632 fi
9633 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9634 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9635 echo "${ECHO_T}$ac_header_compiler" >&6
9636
9637 # Is the header present?
9638 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9639 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9640 cat >conftest.$ac_ext <<_ACEOF
9641 /* confdefs.h.  */
9642 _ACEOF
9643 cat confdefs.h >>conftest.$ac_ext
9644 cat >>conftest.$ac_ext <<_ACEOF
9645 /* end confdefs.h.  */
9646 #include <$ac_header>
9647 _ACEOF
9648 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9649   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9650   ac_status=$?
9651   grep -v '^ *+' conftest.er1 >conftest.err
9652   rm -f conftest.er1
9653   cat conftest.err >&5
9654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655   (exit $ac_status); } >/dev/null; then
9656   if test -s conftest.err; then
9657     ac_cpp_err=$ac_c_preproc_warn_flag
9658     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9659   else
9660     ac_cpp_err=
9661   fi
9662 else
9663   ac_cpp_err=yes
9664 fi
9665 if test -z "$ac_cpp_err"; then
9666   ac_header_preproc=yes
9667 else
9668   echo "$as_me: failed program was:" >&5
9669 sed 's/^/| /' conftest.$ac_ext >&5
9670
9671   ac_header_preproc=no
9672 fi
9673 rm -f conftest.err conftest.$ac_ext
9674 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9675 echo "${ECHO_T}$ac_header_preproc" >&6
9676
9677 # So?  What about this header?
9678 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9679   yes:no: )
9680     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9681 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9682     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9683 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9684     ac_header_preproc=yes
9685     ;;
9686   no:yes:* )
9687     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9688 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9689     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9690 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9691     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9692 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9693     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9694 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9695     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9696 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9697     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9698 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9699     (
9700       cat <<\_ASBOX
9701 ## ---------------------------------------- ##
9702 ## Report this to pgsql-bugs@postgresql.org ##
9703 ## ---------------------------------------- ##
9704 _ASBOX
9705     ) |
9706       sed "s/^/$as_me: WARNING:     /" >&2
9707     ;;
9708 esac
9709 echo "$as_me:$LINENO: checking for $ac_header" >&5
9710 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9712   echo $ECHO_N "(cached) $ECHO_C" >&6
9713 else
9714   eval "$as_ac_Header=\$ac_header_preproc"
9715 fi
9716 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9717 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9718
9719 fi
9720 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9721   cat >>confdefs.h <<_ACEOF
9722 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9723 _ACEOF
9724
9725 else
9726
9727 for ac_header in history.h
9728 do
9729 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9730 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9731   echo "$as_me:$LINENO: checking for $ac_header" >&5
9732 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9733 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9734   echo $ECHO_N "(cached) $ECHO_C" >&6
9735 fi
9736 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9737 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9738 else
9739   # Is the header compilable?
9740 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9741 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9742 cat >conftest.$ac_ext <<_ACEOF
9743 /* confdefs.h.  */
9744 _ACEOF
9745 cat confdefs.h >>conftest.$ac_ext
9746 cat >>conftest.$ac_ext <<_ACEOF
9747 /* end confdefs.h.  */
9748 $ac_includes_default
9749 #include <$ac_header>
9750 _ACEOF
9751 rm -f conftest.$ac_objext
9752 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9753   (eval $ac_compile) 2>conftest.er1
9754   ac_status=$?
9755   grep -v '^ *+' conftest.er1 >conftest.err
9756   rm -f conftest.er1
9757   cat conftest.err >&5
9758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9759   (exit $ac_status); } &&
9760          { ac_try='test -z "$ac_c_werror_flag"
9761                          || test ! -s conftest.err'
9762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9763   (eval $ac_try) 2>&5
9764   ac_status=$?
9765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766   (exit $ac_status); }; } &&
9767          { ac_try='test -s conftest.$ac_objext'
9768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9769   (eval $ac_try) 2>&5
9770   ac_status=$?
9771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772   (exit $ac_status); }; }; then
9773   ac_header_compiler=yes
9774 else
9775   echo "$as_me: failed program was:" >&5
9776 sed 's/^/| /' conftest.$ac_ext >&5
9777
9778 ac_header_compiler=no
9779 fi
9780 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9781 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9782 echo "${ECHO_T}$ac_header_compiler" >&6
9783
9784 # Is the header present?
9785 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9786 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9787 cat >conftest.$ac_ext <<_ACEOF
9788 /* confdefs.h.  */
9789 _ACEOF
9790 cat confdefs.h >>conftest.$ac_ext
9791 cat >>conftest.$ac_ext <<_ACEOF
9792 /* end confdefs.h.  */
9793 #include <$ac_header>
9794 _ACEOF
9795 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9796   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9797   ac_status=$?
9798   grep -v '^ *+' conftest.er1 >conftest.err
9799   rm -f conftest.er1
9800   cat conftest.err >&5
9801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802   (exit $ac_status); } >/dev/null; then
9803   if test -s conftest.err; then
9804     ac_cpp_err=$ac_c_preproc_warn_flag
9805     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9806   else
9807     ac_cpp_err=
9808   fi
9809 else
9810   ac_cpp_err=yes
9811 fi
9812 if test -z "$ac_cpp_err"; then
9813   ac_header_preproc=yes
9814 else
9815   echo "$as_me: failed program was:" >&5
9816 sed 's/^/| /' conftest.$ac_ext >&5
9817
9818   ac_header_preproc=no
9819 fi
9820 rm -f conftest.err conftest.$ac_ext
9821 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9822 echo "${ECHO_T}$ac_header_preproc" >&6
9823
9824 # So?  What about this header?
9825 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9826   yes:no: )
9827     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9828 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9829     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9830 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9831     ac_header_preproc=yes
9832     ;;
9833   no:yes:* )
9834     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9835 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9836     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9837 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9838     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9839 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9840     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9841 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9842     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9843 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9844     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9845 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9846     (
9847       cat <<\_ASBOX
9848 ## ---------------------------------------- ##
9849 ## Report this to pgsql-bugs@postgresql.org ##
9850 ## ---------------------------------------- ##
9851 _ASBOX
9852     ) |
9853       sed "s/^/$as_me: WARNING:     /" >&2
9854     ;;
9855 esac
9856 echo "$as_me:$LINENO: checking for $ac_header" >&5
9857 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9858 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9859   echo $ECHO_N "(cached) $ECHO_C" >&6
9860 else
9861   eval "$as_ac_Header=\$ac_header_preproc"
9862 fi
9863 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9864 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9865
9866 fi
9867 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9868   cat >>confdefs.h <<_ACEOF
9869 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9870 _ACEOF
9871
9872 else
9873
9874 for ac_header in readline/history.h
9875 do
9876 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9877 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9878   echo "$as_me:$LINENO: checking for $ac_header" >&5
9879 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9880 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9881   echo $ECHO_N "(cached) $ECHO_C" >&6
9882 fi
9883 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9884 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9885 else
9886   # Is the header compilable?
9887 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9888 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9889 cat >conftest.$ac_ext <<_ACEOF
9890 /* confdefs.h.  */
9891 _ACEOF
9892 cat confdefs.h >>conftest.$ac_ext
9893 cat >>conftest.$ac_ext <<_ACEOF
9894 /* end confdefs.h.  */
9895 $ac_includes_default
9896 #include <$ac_header>
9897 _ACEOF
9898 rm -f conftest.$ac_objext
9899 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9900   (eval $ac_compile) 2>conftest.er1
9901   ac_status=$?
9902   grep -v '^ *+' conftest.er1 >conftest.err
9903   rm -f conftest.er1
9904   cat conftest.err >&5
9905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906   (exit $ac_status); } &&
9907          { ac_try='test -z "$ac_c_werror_flag"
9908                          || test ! -s conftest.err'
9909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9910   (eval $ac_try) 2>&5
9911   ac_status=$?
9912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9913   (exit $ac_status); }; } &&
9914          { ac_try='test -s conftest.$ac_objext'
9915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9916   (eval $ac_try) 2>&5
9917   ac_status=$?
9918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919   (exit $ac_status); }; }; then
9920   ac_header_compiler=yes
9921 else
9922   echo "$as_me: failed program was:" >&5
9923 sed 's/^/| /' conftest.$ac_ext >&5
9924
9925 ac_header_compiler=no
9926 fi
9927 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9928 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9929 echo "${ECHO_T}$ac_header_compiler" >&6
9930
9931 # Is the header present?
9932 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9933 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9934 cat >conftest.$ac_ext <<_ACEOF
9935 /* confdefs.h.  */
9936 _ACEOF
9937 cat confdefs.h >>conftest.$ac_ext
9938 cat >>conftest.$ac_ext <<_ACEOF
9939 /* end confdefs.h.  */
9940 #include <$ac_header>
9941 _ACEOF
9942 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9943   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9944   ac_status=$?
9945   grep -v '^ *+' conftest.er1 >conftest.err
9946   rm -f conftest.er1
9947   cat conftest.err >&5
9948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9949   (exit $ac_status); } >/dev/null; then
9950   if test -s conftest.err; then
9951     ac_cpp_err=$ac_c_preproc_warn_flag
9952     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9953   else
9954     ac_cpp_err=
9955   fi
9956 else
9957   ac_cpp_err=yes
9958 fi
9959 if test -z "$ac_cpp_err"; then
9960   ac_header_preproc=yes
9961 else
9962   echo "$as_me: failed program was:" >&5
9963 sed 's/^/| /' conftest.$ac_ext >&5
9964
9965   ac_header_preproc=no
9966 fi
9967 rm -f conftest.err conftest.$ac_ext
9968 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9969 echo "${ECHO_T}$ac_header_preproc" >&6
9970
9971 # So?  What about this header?
9972 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9973   yes:no: )
9974     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9975 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9976     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9977 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9978     ac_header_preproc=yes
9979     ;;
9980   no:yes:* )
9981     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9982 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9983     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9984 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9985     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9986 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9987     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9988 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9989     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9990 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9991     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9992 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9993     (
9994       cat <<\_ASBOX
9995 ## ---------------------------------------- ##
9996 ## Report this to pgsql-bugs@postgresql.org ##
9997 ## ---------------------------------------- ##
9998 _ASBOX
9999     ) |
10000       sed "s/^/$as_me: WARNING:     /" >&2
10001     ;;
10002 esac
10003 echo "$as_me:$LINENO: checking for $ac_header" >&5
10004 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10005 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10006   echo $ECHO_N "(cached) $ECHO_C" >&6
10007 else
10008   eval "$as_ac_Header=\$ac_header_preproc"
10009 fi
10010 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10011 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10012
10013 fi
10014 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10015   cat >>confdefs.h <<_ACEOF
10016 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10017 _ACEOF
10018
10019 else
10020   { { echo "$as_me:$LINENO: error: history header not found
10021 If you have libedit already installed, see config.log for details on the
10022 failure.  It is possible the compiler isn't looking in the proper directory.
10023 Use --without-readline to disable libedit support." >&5
10024 echo "$as_me: error: history header not found
10025 If you have libedit already installed, see config.log for details on the
10026 failure.  It is possible the compiler isn't looking in the proper directory.
10027 Use --without-readline to disable libedit support." >&2;}
10028    { (exit 1); exit 1; }; }
10029 fi
10030
10031 done
10032
10033 fi
10034
10035 done
10036
10037 fi
10038
10039 done
10040
10041 fi
10042
10043 if test "$with_zlib" = yes; then
10044   if test "${ac_cv_header_zlib_h+set}" = set; then
10045   echo "$as_me:$LINENO: checking for zlib.h" >&5
10046 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
10047 if test "${ac_cv_header_zlib_h+set}" = set; then
10048   echo $ECHO_N "(cached) $ECHO_C" >&6
10049 fi
10050 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
10051 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
10052 else
10053   # Is the header compilable?
10054 echo "$as_me:$LINENO: checking zlib.h usability" >&5
10055 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
10056 cat >conftest.$ac_ext <<_ACEOF
10057 /* confdefs.h.  */
10058 _ACEOF
10059 cat confdefs.h >>conftest.$ac_ext
10060 cat >>conftest.$ac_ext <<_ACEOF
10061 /* end confdefs.h.  */
10062 $ac_includes_default
10063 #include <zlib.h>
10064 _ACEOF
10065 rm -f conftest.$ac_objext
10066 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10067   (eval $ac_compile) 2>conftest.er1
10068   ac_status=$?
10069   grep -v '^ *+' conftest.er1 >conftest.err
10070   rm -f conftest.er1
10071   cat conftest.err >&5
10072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10073   (exit $ac_status); } &&
10074          { ac_try='test -z "$ac_c_werror_flag"
10075                          || test ! -s conftest.err'
10076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10077   (eval $ac_try) 2>&5
10078   ac_status=$?
10079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10080   (exit $ac_status); }; } &&
10081          { ac_try='test -s conftest.$ac_objext'
10082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10083   (eval $ac_try) 2>&5
10084   ac_status=$?
10085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086   (exit $ac_status); }; }; then
10087   ac_header_compiler=yes
10088 else
10089   echo "$as_me: failed program was:" >&5
10090 sed 's/^/| /' conftest.$ac_ext >&5
10091
10092 ac_header_compiler=no
10093 fi
10094 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10095 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10096 echo "${ECHO_T}$ac_header_compiler" >&6
10097
10098 # Is the header present?
10099 echo "$as_me:$LINENO: checking zlib.h presence" >&5
10100 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
10101 cat >conftest.$ac_ext <<_ACEOF
10102 /* confdefs.h.  */
10103 _ACEOF
10104 cat confdefs.h >>conftest.$ac_ext
10105 cat >>conftest.$ac_ext <<_ACEOF
10106 /* end confdefs.h.  */
10107 #include <zlib.h>
10108 _ACEOF
10109 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10110   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10111   ac_status=$?
10112   grep -v '^ *+' conftest.er1 >conftest.err
10113   rm -f conftest.er1
10114   cat conftest.err >&5
10115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10116   (exit $ac_status); } >/dev/null; then
10117   if test -s conftest.err; then
10118     ac_cpp_err=$ac_c_preproc_warn_flag
10119     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10120   else
10121     ac_cpp_err=
10122   fi
10123 else
10124   ac_cpp_err=yes
10125 fi
10126 if test -z "$ac_cpp_err"; then
10127   ac_header_preproc=yes
10128 else
10129   echo "$as_me: failed program was:" >&5
10130 sed 's/^/| /' conftest.$ac_ext >&5
10131
10132   ac_header_preproc=no
10133 fi
10134 rm -f conftest.err conftest.$ac_ext
10135 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10136 echo "${ECHO_T}$ac_header_preproc" >&6
10137
10138 # So?  What about this header?
10139 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10140   yes:no: )
10141     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
10142 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10143     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
10144 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
10145     ac_header_preproc=yes
10146     ;;
10147   no:yes:* )
10148     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
10149 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
10150     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
10151 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
10152     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
10153 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
10154     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
10155 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10156     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
10157 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
10158     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
10159 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
10160     (
10161       cat <<\_ASBOX
10162 ## ---------------------------------------- ##
10163 ## Report this to pgsql-bugs@postgresql.org ##
10164 ## ---------------------------------------- ##
10165 _ASBOX
10166     ) |
10167       sed "s/^/$as_me: WARNING:     /" >&2
10168     ;;
10169 esac
10170 echo "$as_me:$LINENO: checking for zlib.h" >&5
10171 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
10172 if test "${ac_cv_header_zlib_h+set}" = set; then
10173   echo $ECHO_N "(cached) $ECHO_C" >&6
10174 else
10175   ac_cv_header_zlib_h=$ac_header_preproc
10176 fi
10177 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
10178 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
10179
10180 fi
10181 if test $ac_cv_header_zlib_h = yes; then
10182   :
10183 else
10184   { { echo "$as_me:$LINENO: error: zlib header not found
10185 If you have zlib already installed, see config.log for details on the
10186 failure.  It is possible the compiler isn't looking in the proper directory.
10187 Use --without-zlib to disable zlib support." >&5
10188 echo "$as_me: error: zlib header not found
10189 If you have zlib already installed, see config.log for details on the
10190 failure.  It is possible the compiler isn't looking in the proper directory.
10191 Use --without-zlib to disable zlib support." >&2;}
10192    { (exit 1); exit 1; }; }
10193 fi
10194
10195
10196 fi
10197
10198 if test "$with_krb5" = yes ; then
10199   if test "${ac_cv_header_krb5_h+set}" = set; then
10200   echo "$as_me:$LINENO: checking for krb5.h" >&5
10201 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10202 if test "${ac_cv_header_krb5_h+set}" = set; then
10203   echo $ECHO_N "(cached) $ECHO_C" >&6
10204 fi
10205 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10206 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10207 else
10208   # Is the header compilable?
10209 echo "$as_me:$LINENO: checking krb5.h usability" >&5
10210 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
10211 cat >conftest.$ac_ext <<_ACEOF
10212 /* confdefs.h.  */
10213 _ACEOF
10214 cat confdefs.h >>conftest.$ac_ext
10215 cat >>conftest.$ac_ext <<_ACEOF
10216 /* end confdefs.h.  */
10217 $ac_includes_default
10218 #include <krb5.h>
10219 _ACEOF
10220 rm -f conftest.$ac_objext
10221 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10222   (eval $ac_compile) 2>conftest.er1
10223   ac_status=$?
10224   grep -v '^ *+' conftest.er1 >conftest.err
10225   rm -f conftest.er1
10226   cat conftest.err >&5
10227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10228   (exit $ac_status); } &&
10229          { ac_try='test -z "$ac_c_werror_flag"
10230                          || test ! -s conftest.err'
10231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10232   (eval $ac_try) 2>&5
10233   ac_status=$?
10234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10235   (exit $ac_status); }; } &&
10236          { ac_try='test -s conftest.$ac_objext'
10237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10238   (eval $ac_try) 2>&5
10239   ac_status=$?
10240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10241   (exit $ac_status); }; }; then
10242   ac_header_compiler=yes
10243 else
10244   echo "$as_me: failed program was:" >&5
10245 sed 's/^/| /' conftest.$ac_ext >&5
10246
10247 ac_header_compiler=no
10248 fi
10249 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10250 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10251 echo "${ECHO_T}$ac_header_compiler" >&6
10252
10253 # Is the header present?
10254 echo "$as_me:$LINENO: checking krb5.h presence" >&5
10255 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
10256 cat >conftest.$ac_ext <<_ACEOF
10257 /* confdefs.h.  */
10258 _ACEOF
10259 cat confdefs.h >>conftest.$ac_ext
10260 cat >>conftest.$ac_ext <<_ACEOF
10261 /* end confdefs.h.  */
10262 #include <krb5.h>
10263 _ACEOF
10264 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10265   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10266   ac_status=$?
10267   grep -v '^ *+' conftest.er1 >conftest.err
10268   rm -f conftest.er1
10269   cat conftest.err >&5
10270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10271   (exit $ac_status); } >/dev/null; then
10272   if test -s conftest.err; then
10273     ac_cpp_err=$ac_c_preproc_warn_flag
10274     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10275   else
10276     ac_cpp_err=
10277   fi
10278 else
10279   ac_cpp_err=yes
10280 fi
10281 if test -z "$ac_cpp_err"; then
10282   ac_header_preproc=yes
10283 else
10284   echo "$as_me: failed program was:" >&5
10285 sed 's/^/| /' conftest.$ac_ext >&5
10286
10287   ac_header_preproc=no
10288 fi
10289 rm -f conftest.err conftest.$ac_ext
10290 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10291 echo "${ECHO_T}$ac_header_preproc" >&6
10292
10293 # So?  What about this header?
10294 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10295   yes:no: )
10296     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
10297 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10298     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
10299 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
10300     ac_header_preproc=yes
10301     ;;
10302   no:yes:* )
10303     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
10304 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
10305     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
10306 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
10307     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
10308 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
10309     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
10310 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10311     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
10312 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
10313     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
10314 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
10315     (
10316       cat <<\_ASBOX
10317 ## ---------------------------------------- ##
10318 ## Report this to pgsql-bugs@postgresql.org ##
10319 ## ---------------------------------------- ##
10320 _ASBOX
10321     ) |
10322       sed "s/^/$as_me: WARNING:     /" >&2
10323     ;;
10324 esac
10325 echo "$as_me:$LINENO: checking for krb5.h" >&5
10326 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10327 if test "${ac_cv_header_krb5_h+set}" = set; then
10328   echo $ECHO_N "(cached) $ECHO_C" >&6
10329 else
10330   ac_cv_header_krb5_h=$ac_header_preproc
10331 fi
10332 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10333 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10334
10335 fi
10336 if test $ac_cv_header_krb5_h = yes; then
10337   :
10338 else
10339   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
10340 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
10341    { (exit 1); exit 1; }; }
10342 fi
10343
10344
10345 fi
10346
10347 if test "$with_openssl" = yes ; then
10348   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10349   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10350 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10351 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10352   echo $ECHO_N "(cached) $ECHO_C" >&6
10353 fi
10354 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10355 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10356 else
10357   # Is the header compilable?
10358 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
10359 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
10360 cat >conftest.$ac_ext <<_ACEOF
10361 /* confdefs.h.  */
10362 _ACEOF
10363 cat confdefs.h >>conftest.$ac_ext
10364 cat >>conftest.$ac_ext <<_ACEOF
10365 /* end confdefs.h.  */
10366 $ac_includes_default
10367 #include <openssl/ssl.h>
10368 _ACEOF
10369 rm -f conftest.$ac_objext
10370 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10371   (eval $ac_compile) 2>conftest.er1
10372   ac_status=$?
10373   grep -v '^ *+' conftest.er1 >conftest.err
10374   rm -f conftest.er1
10375   cat conftest.err >&5
10376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10377   (exit $ac_status); } &&
10378          { ac_try='test -z "$ac_c_werror_flag"
10379                          || test ! -s conftest.err'
10380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10381   (eval $ac_try) 2>&5
10382   ac_status=$?
10383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10384   (exit $ac_status); }; } &&
10385          { ac_try='test -s conftest.$ac_objext'
10386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10387   (eval $ac_try) 2>&5
10388   ac_status=$?
10389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10390   (exit $ac_status); }; }; then
10391   ac_header_compiler=yes
10392 else
10393   echo "$as_me: failed program was:" >&5
10394 sed 's/^/| /' conftest.$ac_ext >&5
10395
10396 ac_header_compiler=no
10397 fi
10398 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10399 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10400 echo "${ECHO_T}$ac_header_compiler" >&6
10401
10402 # Is the header present?
10403 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10404 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
10405 cat >conftest.$ac_ext <<_ACEOF
10406 /* confdefs.h.  */
10407 _ACEOF
10408 cat confdefs.h >>conftest.$ac_ext
10409 cat >>conftest.$ac_ext <<_ACEOF
10410 /* end confdefs.h.  */
10411 #include <openssl/ssl.h>
10412 _ACEOF
10413 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10414   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10415   ac_status=$?
10416   grep -v '^ *+' conftest.er1 >conftest.err
10417   rm -f conftest.er1
10418   cat conftest.err >&5
10419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10420   (exit $ac_status); } >/dev/null; then
10421   if test -s conftest.err; then
10422     ac_cpp_err=$ac_c_preproc_warn_flag
10423     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10424   else
10425     ac_cpp_err=
10426   fi
10427 else
10428   ac_cpp_err=yes
10429 fi
10430 if test -z "$ac_cpp_err"; then
10431   ac_header_preproc=yes
10432 else
10433   echo "$as_me: failed program was:" >&5
10434 sed 's/^/| /' conftest.$ac_ext >&5
10435
10436   ac_header_preproc=no
10437 fi
10438 rm -f conftest.err conftest.$ac_ext
10439 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10440 echo "${ECHO_T}$ac_header_preproc" >&6
10441
10442 # So?  What about this header?
10443 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10444   yes:no: )
10445     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10446 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10447     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10448 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10449     ac_header_preproc=yes
10450     ;;
10451   no:yes:* )
10452     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10453 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10454     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10455 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10456     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10457 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10458     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10459 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10460     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10461 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10462     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10463 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10464     (
10465       cat <<\_ASBOX
10466 ## ---------------------------------------- ##
10467 ## Report this to pgsql-bugs@postgresql.org ##
10468 ## ---------------------------------------- ##
10469 _ASBOX
10470     ) |
10471       sed "s/^/$as_me: WARNING:     /" >&2
10472     ;;
10473 esac
10474 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10475 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10476 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10477   echo $ECHO_N "(cached) $ECHO_C" >&6
10478 else
10479   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10480 fi
10481 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10482 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10483
10484 fi
10485 if test $ac_cv_header_openssl_ssl_h = yes; then
10486   :
10487 else
10488   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10489 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10490    { (exit 1); exit 1; }; }
10491 fi
10492
10493
10494   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10495   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10496 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10497 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10498   echo $ECHO_N "(cached) $ECHO_C" >&6
10499 fi
10500 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10501 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10502 else
10503   # Is the header compilable?
10504 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10505 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10506 cat >conftest.$ac_ext <<_ACEOF
10507 /* confdefs.h.  */
10508 _ACEOF
10509 cat confdefs.h >>conftest.$ac_ext
10510 cat >>conftest.$ac_ext <<_ACEOF
10511 /* end confdefs.h.  */
10512 $ac_includes_default
10513 #include <openssl/err.h>
10514 _ACEOF
10515 rm -f conftest.$ac_objext
10516 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10517   (eval $ac_compile) 2>conftest.er1
10518   ac_status=$?
10519   grep -v '^ *+' conftest.er1 >conftest.err
10520   rm -f conftest.er1
10521   cat conftest.err >&5
10522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10523   (exit $ac_status); } &&
10524          { ac_try='test -z "$ac_c_werror_flag"
10525                          || test ! -s conftest.err'
10526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10527   (eval $ac_try) 2>&5
10528   ac_status=$?
10529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10530   (exit $ac_status); }; } &&
10531          { ac_try='test -s conftest.$ac_objext'
10532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10533   (eval $ac_try) 2>&5
10534   ac_status=$?
10535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536   (exit $ac_status); }; }; then
10537   ac_header_compiler=yes
10538 else
10539   echo "$as_me: failed program was:" >&5
10540 sed 's/^/| /' conftest.$ac_ext >&5
10541
10542 ac_header_compiler=no
10543 fi
10544 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10545 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10546 echo "${ECHO_T}$ac_header_compiler" >&6
10547
10548 # Is the header present?
10549 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10550 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10551 cat >conftest.$ac_ext <<_ACEOF
10552 /* confdefs.h.  */
10553 _ACEOF
10554 cat confdefs.h >>conftest.$ac_ext
10555 cat >>conftest.$ac_ext <<_ACEOF
10556 /* end confdefs.h.  */
10557 #include <openssl/err.h>
10558 _ACEOF
10559 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10560   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10561   ac_status=$?
10562   grep -v '^ *+' conftest.er1 >conftest.err
10563   rm -f conftest.er1
10564   cat conftest.err >&5
10565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10566   (exit $ac_status); } >/dev/null; then
10567   if test -s conftest.err; then
10568     ac_cpp_err=$ac_c_preproc_warn_flag
10569     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10570   else
10571     ac_cpp_err=
10572   fi
10573 else
10574   ac_cpp_err=yes
10575 fi
10576 if test -z "$ac_cpp_err"; then
10577   ac_header_preproc=yes
10578 else
10579   echo "$as_me: failed program was:" >&5
10580 sed 's/^/| /' conftest.$ac_ext >&5
10581
10582   ac_header_preproc=no
10583 fi
10584 rm -f conftest.err conftest.$ac_ext
10585 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10586 echo "${ECHO_T}$ac_header_preproc" >&6
10587
10588 # So?  What about this header?
10589 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10590   yes:no: )
10591     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10592 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10593     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10594 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10595     ac_header_preproc=yes
10596     ;;
10597   no:yes:* )
10598     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10599 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10600     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10601 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10602     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10603 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10604     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10605 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10606     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10607 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10608     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10609 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10610     (
10611       cat <<\_ASBOX
10612 ## ---------------------------------------- ##
10613 ## Report this to pgsql-bugs@postgresql.org ##
10614 ## ---------------------------------------- ##
10615 _ASBOX
10616     ) |
10617       sed "s/^/$as_me: WARNING:     /" >&2
10618     ;;
10619 esac
10620 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10621 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10622 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10623   echo $ECHO_N "(cached) $ECHO_C" >&6
10624 else
10625   ac_cv_header_openssl_err_h=$ac_header_preproc
10626 fi
10627 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10628 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10629
10630 fi
10631 if test $ac_cv_header_openssl_err_h = yes; then
10632   :
10633 else
10634   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10635 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10636    { (exit 1); exit 1; }; }
10637 fi
10638
10639
10640 fi
10641
10642 if test "$with_pam" = yes ; then
10643
10644 for ac_header in security/pam_appl.h
10645 do
10646 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10648   echo "$as_me:$LINENO: checking for $ac_header" >&5
10649 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10650 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10651   echo $ECHO_N "(cached) $ECHO_C" >&6
10652 fi
10653 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10654 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10655 else
10656   # Is the header compilable?
10657 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10658 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10659 cat >conftest.$ac_ext <<_ACEOF
10660 /* confdefs.h.  */
10661 _ACEOF
10662 cat confdefs.h >>conftest.$ac_ext
10663 cat >>conftest.$ac_ext <<_ACEOF
10664 /* end confdefs.h.  */
10665 $ac_includes_default
10666 #include <$ac_header>
10667 _ACEOF
10668 rm -f conftest.$ac_objext
10669 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10670   (eval $ac_compile) 2>conftest.er1
10671   ac_status=$?
10672   grep -v '^ *+' conftest.er1 >conftest.err
10673   rm -f conftest.er1
10674   cat conftest.err >&5
10675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10676   (exit $ac_status); } &&
10677          { ac_try='test -z "$ac_c_werror_flag"
10678                          || test ! -s conftest.err'
10679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10680   (eval $ac_try) 2>&5
10681   ac_status=$?
10682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10683   (exit $ac_status); }; } &&
10684          { ac_try='test -s conftest.$ac_objext'
10685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10686   (eval $ac_try) 2>&5
10687   ac_status=$?
10688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10689   (exit $ac_status); }; }; then
10690   ac_header_compiler=yes
10691 else
10692   echo "$as_me: failed program was:" >&5
10693 sed 's/^/| /' conftest.$ac_ext >&5
10694
10695 ac_header_compiler=no
10696 fi
10697 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10698 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10699 echo "${ECHO_T}$ac_header_compiler" >&6
10700
10701 # Is the header present?
10702 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10703 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10704 cat >conftest.$ac_ext <<_ACEOF
10705 /* confdefs.h.  */
10706 _ACEOF
10707 cat confdefs.h >>conftest.$ac_ext
10708 cat >>conftest.$ac_ext <<_ACEOF
10709 /* end confdefs.h.  */
10710 #include <$ac_header>
10711 _ACEOF
10712 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10713   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10714   ac_status=$?
10715   grep -v '^ *+' conftest.er1 >conftest.err
10716   rm -f conftest.er1
10717   cat conftest.err >&5
10718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10719   (exit $ac_status); } >/dev/null; then
10720   if test -s conftest.err; then
10721     ac_cpp_err=$ac_c_preproc_warn_flag
10722     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10723   else
10724     ac_cpp_err=
10725   fi
10726 else
10727   ac_cpp_err=yes
10728 fi
10729 if test -z "$ac_cpp_err"; then
10730   ac_header_preproc=yes
10731 else
10732   echo "$as_me: failed program was:" >&5
10733 sed 's/^/| /' conftest.$ac_ext >&5
10734
10735   ac_header_preproc=no
10736 fi
10737 rm -f conftest.err conftest.$ac_ext
10738 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10739 echo "${ECHO_T}$ac_header_preproc" >&6
10740
10741 # So?  What about this header?
10742 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10743   yes:no: )
10744     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10745 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10746     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10747 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10748     ac_header_preproc=yes
10749     ;;
10750   no:yes:* )
10751     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10752 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10753     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10754 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10755     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10756 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10757     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10758 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10759     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10760 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10761     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10762 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10763     (
10764       cat <<\_ASBOX
10765 ## ---------------------------------------- ##
10766 ## Report this to pgsql-bugs@postgresql.org ##
10767 ## ---------------------------------------- ##
10768 _ASBOX
10769     ) |
10770       sed "s/^/$as_me: WARNING:     /" >&2
10771     ;;
10772 esac
10773 echo "$as_me:$LINENO: checking for $ac_header" >&5
10774 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10775 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10776   echo $ECHO_N "(cached) $ECHO_C" >&6
10777 else
10778   eval "$as_ac_Header=\$ac_header_preproc"
10779 fi
10780 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10781 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10782
10783 fi
10784 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10785   cat >>confdefs.h <<_ACEOF
10786 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10787 _ACEOF
10788
10789 else
10790
10791 for ac_header in pam/pam_appl.h
10792 do
10793 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10794 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10795   echo "$as_me:$LINENO: checking for $ac_header" >&5
10796 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10797 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10798   echo $ECHO_N "(cached) $ECHO_C" >&6
10799 fi
10800 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10801 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10802 else
10803   # Is the header compilable?
10804 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10805 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10806 cat >conftest.$ac_ext <<_ACEOF
10807 /* confdefs.h.  */
10808 _ACEOF
10809 cat confdefs.h >>conftest.$ac_ext
10810 cat >>conftest.$ac_ext <<_ACEOF
10811 /* end confdefs.h.  */
10812 $ac_includes_default
10813 #include <$ac_header>
10814 _ACEOF
10815 rm -f conftest.$ac_objext
10816 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10817   (eval $ac_compile) 2>conftest.er1
10818   ac_status=$?
10819   grep -v '^ *+' conftest.er1 >conftest.err
10820   rm -f conftest.er1
10821   cat conftest.err >&5
10822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10823   (exit $ac_status); } &&
10824          { ac_try='test -z "$ac_c_werror_flag"
10825                          || test ! -s conftest.err'
10826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10827   (eval $ac_try) 2>&5
10828   ac_status=$?
10829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10830   (exit $ac_status); }; } &&
10831          { ac_try='test -s conftest.$ac_objext'
10832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10833   (eval $ac_try) 2>&5
10834   ac_status=$?
10835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10836   (exit $ac_status); }; }; then
10837   ac_header_compiler=yes
10838 else
10839   echo "$as_me: failed program was:" >&5
10840 sed 's/^/| /' conftest.$ac_ext >&5
10841
10842 ac_header_compiler=no
10843 fi
10844 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10845 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10846 echo "${ECHO_T}$ac_header_compiler" >&6
10847
10848 # Is the header present?
10849 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10850 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10851 cat >conftest.$ac_ext <<_ACEOF
10852 /* confdefs.h.  */
10853 _ACEOF
10854 cat confdefs.h >>conftest.$ac_ext
10855 cat >>conftest.$ac_ext <<_ACEOF
10856 /* end confdefs.h.  */
10857 #include <$ac_header>
10858 _ACEOF
10859 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10860   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10861   ac_status=$?
10862   grep -v '^ *+' conftest.er1 >conftest.err
10863   rm -f conftest.er1
10864   cat conftest.err >&5
10865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10866   (exit $ac_status); } >/dev/null; then
10867   if test -s conftest.err; then
10868     ac_cpp_err=$ac_c_preproc_warn_flag
10869     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10870   else
10871     ac_cpp_err=
10872   fi
10873 else
10874   ac_cpp_err=yes
10875 fi
10876 if test -z "$ac_cpp_err"; then
10877   ac_header_preproc=yes
10878 else
10879   echo "$as_me: failed program was:" >&5
10880 sed 's/^/| /' conftest.$ac_ext >&5
10881
10882   ac_header_preproc=no
10883 fi
10884 rm -f conftest.err conftest.$ac_ext
10885 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10886 echo "${ECHO_T}$ac_header_preproc" >&6
10887
10888 # So?  What about this header?
10889 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10890   yes:no: )
10891     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10892 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10893     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10894 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10895     ac_header_preproc=yes
10896     ;;
10897   no:yes:* )
10898     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10899 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10900     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10901 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10902     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10903 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10904     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10905 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10906     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10907 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10908     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10909 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10910     (
10911       cat <<\_ASBOX
10912 ## ---------------------------------------- ##
10913 ## Report this to pgsql-bugs@postgresql.org ##
10914 ## ---------------------------------------- ##
10915 _ASBOX
10916     ) |
10917       sed "s/^/$as_me: WARNING:     /" >&2
10918     ;;
10919 esac
10920 echo "$as_me:$LINENO: checking for $ac_header" >&5
10921 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10922 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10923   echo $ECHO_N "(cached) $ECHO_C" >&6
10924 else
10925   eval "$as_ac_Header=\$ac_header_preproc"
10926 fi
10927 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10928 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10929
10930 fi
10931 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10932   cat >>confdefs.h <<_ACEOF
10933 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10934 _ACEOF
10935
10936 else
10937   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10938 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10939    { (exit 1); exit 1; }; }
10940 fi
10941
10942 done
10943
10944 fi
10945
10946 done
10947
10948 fi
10949
10950 if test "$with_bonjour" = yes ; then
10951   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10952   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10953 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10954 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10955   echo $ECHO_N "(cached) $ECHO_C" >&6
10956 fi
10957 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10958 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10959 else
10960   # Is the header compilable?
10961 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10962 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
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 $ac_includes_default
10970 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10971 _ACEOF
10972 rm -f conftest.$ac_objext
10973 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10974   (eval $ac_compile) 2>conftest.er1
10975   ac_status=$?
10976   grep -v '^ *+' conftest.er1 >conftest.err
10977   rm -f conftest.er1
10978   cat conftest.err >&5
10979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10980   (exit $ac_status); } &&
10981          { ac_try='test -z "$ac_c_werror_flag"
10982                          || test ! -s conftest.err'
10983   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10984   (eval $ac_try) 2>&5
10985   ac_status=$?
10986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10987   (exit $ac_status); }; } &&
10988          { ac_try='test -s conftest.$ac_objext'
10989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10990   (eval $ac_try) 2>&5
10991   ac_status=$?
10992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10993   (exit $ac_status); }; }; then
10994   ac_header_compiler=yes
10995 else
10996   echo "$as_me: failed program was:" >&5
10997 sed 's/^/| /' conftest.$ac_ext >&5
10998
10999 ac_header_compiler=no
11000 fi
11001 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11002 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11003 echo "${ECHO_T}$ac_header_compiler" >&6
11004
11005 # Is the header present?
11006 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
11007 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
11008 cat >conftest.$ac_ext <<_ACEOF
11009 /* confdefs.h.  */
11010 _ACEOF
11011 cat confdefs.h >>conftest.$ac_ext
11012 cat >>conftest.$ac_ext <<_ACEOF
11013 /* end confdefs.h.  */
11014 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
11015 _ACEOF
11016 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11018   ac_status=$?
11019   grep -v '^ *+' conftest.er1 >conftest.err
11020   rm -f conftest.er1
11021   cat conftest.err >&5
11022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11023   (exit $ac_status); } >/dev/null; then
11024   if test -s conftest.err; then
11025     ac_cpp_err=$ac_c_preproc_warn_flag
11026     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11027   else
11028     ac_cpp_err=
11029   fi
11030 else
11031   ac_cpp_err=yes
11032 fi
11033 if test -z "$ac_cpp_err"; then
11034   ac_header_preproc=yes
11035 else
11036   echo "$as_me: failed program was:" >&5
11037 sed 's/^/| /' conftest.$ac_ext >&5
11038
11039   ac_header_preproc=no
11040 fi
11041 rm -f conftest.err conftest.$ac_ext
11042 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11043 echo "${ECHO_T}$ac_header_preproc" >&6
11044
11045 # So?  What about this header?
11046 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11047   yes:no: )
11048     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
11049 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11050     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
11051 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
11052     ac_header_preproc=yes
11053     ;;
11054   no:yes:* )
11055     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
11056 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
11057     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
11058 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
11059     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
11060 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
11061     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
11062 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11063     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
11064 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
11065     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
11066 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
11067     (
11068       cat <<\_ASBOX
11069 ## ---------------------------------------- ##
11070 ## Report this to pgsql-bugs@postgresql.org ##
11071 ## ---------------------------------------- ##
11072 _ASBOX
11073     ) |
11074       sed "s/^/$as_me: WARNING:     /" >&2
11075     ;;
11076 esac
11077 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
11078 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
11079 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
11080   echo $ECHO_N "(cached) $ECHO_C" >&6
11081 else
11082   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
11083 fi
11084 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
11085 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
11086
11087 fi
11088 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
11089   :
11090 else
11091   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
11092 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
11093    { (exit 1); exit 1; }; }
11094 fi
11095
11096
11097 fi
11098
11099
11100 ##
11101 ## Types, structures, compiler characteristics
11102 ##
11103
11104  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
11105 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11106 if test "${ac_cv_c_const+set}" = set; then
11107   echo $ECHO_N "(cached) $ECHO_C" >&6
11108 else
11109   cat >conftest.$ac_ext <<_ACEOF
11110 /* confdefs.h.  */
11111 _ACEOF
11112 cat confdefs.h >>conftest.$ac_ext
11113 cat >>conftest.$ac_ext <<_ACEOF
11114 /* end confdefs.h.  */
11115
11116 int
11117 main ()
11118 {
11119 /* FIXME: Include the comments suggested by Paul. */
11120 #ifndef __cplusplus
11121   /* Ultrix mips cc rejects this.  */
11122   typedef int charset[2];
11123   const charset x;
11124   /* SunOS 4.1.1 cc rejects this.  */
11125   char const *const *ccp;
11126   char **p;
11127   /* NEC SVR4.0.2 mips cc rejects this.  */
11128   struct point {int x, y;};
11129   static struct point const zero = {0,0};
11130   /* AIX XL C 1.02.0.0 rejects this.
11131      It does not let you subtract one const X* pointer from another in
11132      an arm of an if-expression whose if-part is not a constant
11133      expression */
11134   const char *g = "string";
11135   ccp = &g + (g ? g-g : 0);
11136   /* HPUX 7.0 cc rejects these. */
11137   ++ccp;
11138   p = (char**) ccp;
11139   ccp = (char const *const *) p;
11140   { /* SCO 3.2v4 cc rejects this.  */
11141     char *t;
11142     char const *s = 0 ? (char *) 0 : (char const *) 0;
11143
11144     *t++ = 0;
11145   }
11146   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11147     int x[] = {25, 17};
11148     const int *foo = &x[0];
11149     ++foo;
11150   }
11151   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11152     typedef const int *iptr;
11153     iptr p = 0;
11154     ++p;
11155   }
11156   { /* AIX XL C 1.02.0.0 rejects this saying
11157        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11158     struct s { int j; const int *ap[3]; };
11159     struct s *b; b->j = 5;
11160   }
11161   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11162     const int foo = 10;
11163   }
11164 #endif
11165
11166   ;
11167   return 0;
11168 }
11169 _ACEOF
11170 rm -f conftest.$ac_objext
11171 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11172   (eval $ac_compile) 2>conftest.er1
11173   ac_status=$?
11174   grep -v '^ *+' conftest.er1 >conftest.err
11175   rm -f conftest.er1
11176   cat conftest.err >&5
11177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11178   (exit $ac_status); } &&
11179          { ac_try='test -z "$ac_c_werror_flag"
11180                          || test ! -s conftest.err'
11181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11182   (eval $ac_try) 2>&5
11183   ac_status=$?
11184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185   (exit $ac_status); }; } &&
11186          { ac_try='test -s conftest.$ac_objext'
11187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11188   (eval $ac_try) 2>&5
11189   ac_status=$?
11190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191   (exit $ac_status); }; }; then
11192   ac_cv_c_const=yes
11193 else
11194   echo "$as_me: failed program was:" >&5
11195 sed 's/^/| /' conftest.$ac_ext >&5
11196
11197 ac_cv_c_const=no
11198 fi
11199 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11200 fi
11201 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
11202 echo "${ECHO_T}$ac_cv_c_const" >&6
11203 if test $ac_cv_c_const = no; then
11204
11205 cat >>confdefs.h <<\_ACEOF
11206 #define const
11207 _ACEOF
11208
11209 fi
11210
11211
11212 echo "$as_me:$LINENO: checking for inline" >&5
11213 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11214 if test "${ac_cv_c_inline+set}" = set; then
11215   echo $ECHO_N "(cached) $ECHO_C" >&6
11216 else
11217   ac_cv_c_inline=no
11218 for ac_kw in inline __inline__ __inline; do
11219   cat >conftest.$ac_ext <<_ACEOF
11220 /* confdefs.h.  */
11221 _ACEOF
11222 cat confdefs.h >>conftest.$ac_ext
11223 cat >>conftest.$ac_ext <<_ACEOF
11224 /* end confdefs.h.  */
11225 #ifndef __cplusplus
11226 typedef int foo_t;
11227 static $ac_kw foo_t static_foo () {return 0; }
11228 $ac_kw int foo () {return 0; }
11229 #endif
11230
11231 _ACEOF
11232 rm -f conftest.$ac_objext
11233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11234   (eval $ac_compile) 2>conftest.er1
11235   ac_status=$?
11236   grep -v '^ *+' conftest.er1 >conftest.err
11237   rm -f conftest.er1
11238   cat conftest.err >&5
11239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11240   (exit $ac_status); } &&
11241          { ac_try='test -z "$ac_c_werror_flag"
11242                          || test ! -s conftest.err'
11243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11244   (eval $ac_try) 2>&5
11245   ac_status=$?
11246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11247   (exit $ac_status); }; } &&
11248          { ac_try='test -s conftest.$ac_objext'
11249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11250   (eval $ac_try) 2>&5
11251   ac_status=$?
11252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11253   (exit $ac_status); }; }; then
11254   ac_cv_c_inline=$ac_kw; break
11255 else
11256   echo "$as_me: failed program was:" >&5
11257 sed 's/^/| /' conftest.$ac_ext >&5
11258
11259 fi
11260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11261 done
11262
11263 fi
11264 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11265 echo "${ECHO_T}$ac_cv_c_inline" >&6
11266 case $ac_cv_c_inline in
11267   inline | yes) ;;
11268   no)
11269 cat >>confdefs.h <<\_ACEOF
11270 #define inline
11271 _ACEOF
11272  ;;
11273   *)  cat >>confdefs.h <<_ACEOF
11274 #define inline $ac_cv_c_inline
11275 _ACEOF
11276  ;;
11277 esac
11278
11279 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11280 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11281 if test "${ac_cv_c_stringize+set}" = set; then
11282   echo $ECHO_N "(cached) $ECHO_C" >&6
11283 else
11284   cat >conftest.$ac_ext <<_ACEOF
11285 /* confdefs.h.  */
11286 _ACEOF
11287 cat confdefs.h >>conftest.$ac_ext
11288 cat >>conftest.$ac_ext <<_ACEOF
11289 /* end confdefs.h.  */
11290 #define x(y) #y
11291
11292 char *s = x(teststring);
11293 _ACEOF
11294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11295   $EGREP "#teststring" >/dev/null 2>&1; then
11296   ac_cv_c_stringize=no
11297 else
11298   ac_cv_c_stringize=yes
11299 fi
11300 rm -f conftest*
11301
11302 fi
11303 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11304 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11305 if test $ac_cv_c_stringize = yes; then
11306
11307 cat >>confdefs.h <<\_ACEOF
11308 #define HAVE_STRINGIZE 1
11309 _ACEOF
11310
11311 fi
11312
11313 echo "$as_me:$LINENO: checking for signed types" >&5
11314 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11315 if test "${pgac_cv_c_signed+set}" = set; then
11316   echo $ECHO_N "(cached) $ECHO_C" >&6
11317 else
11318   cat >conftest.$ac_ext <<_ACEOF
11319 /* confdefs.h.  */
11320 _ACEOF
11321 cat confdefs.h >>conftest.$ac_ext
11322 cat >>conftest.$ac_ext <<_ACEOF
11323 /* end confdefs.h.  */
11324
11325 int
11326 main ()
11327 {
11328 signed char c; signed short s; signed int i;
11329   ;
11330   return 0;
11331 }
11332 _ACEOF
11333 rm -f conftest.$ac_objext
11334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11335   (eval $ac_compile) 2>conftest.er1
11336   ac_status=$?
11337   grep -v '^ *+' conftest.er1 >conftest.err
11338   rm -f conftest.er1
11339   cat conftest.err >&5
11340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11341   (exit $ac_status); } &&
11342          { ac_try='test -z "$ac_c_werror_flag"
11343                          || test ! -s conftest.err'
11344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11345   (eval $ac_try) 2>&5
11346   ac_status=$?
11347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11348   (exit $ac_status); }; } &&
11349          { ac_try='test -s conftest.$ac_objext'
11350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11351   (eval $ac_try) 2>&5
11352   ac_status=$?
11353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11354   (exit $ac_status); }; }; then
11355   pgac_cv_c_signed=yes
11356 else
11357   echo "$as_me: failed program was:" >&5
11358 sed 's/^/| /' conftest.$ac_ext >&5
11359
11360 pgac_cv_c_signed=no
11361 fi
11362 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11363 fi
11364 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11365 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11366 if test x"$pgac_cv_c_signed" = xno ; then
11367
11368 cat >>confdefs.h <<\_ACEOF
11369 #define signed
11370 _ACEOF
11371
11372 fi
11373 echo "$as_me:$LINENO: checking for working volatile" >&5
11374 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11375 if test "${ac_cv_c_volatile+set}" = set; then
11376   echo $ECHO_N "(cached) $ECHO_C" >&6
11377 else
11378   cat >conftest.$ac_ext <<_ACEOF
11379 /* confdefs.h.  */
11380 _ACEOF
11381 cat confdefs.h >>conftest.$ac_ext
11382 cat >>conftest.$ac_ext <<_ACEOF
11383 /* end confdefs.h.  */
11384
11385 int
11386 main ()
11387 {
11388
11389 volatile int x;
11390 int * volatile y;
11391   ;
11392   return 0;
11393 }
11394 _ACEOF
11395 rm -f conftest.$ac_objext
11396 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11397   (eval $ac_compile) 2>conftest.er1
11398   ac_status=$?
11399   grep -v '^ *+' conftest.er1 >conftest.err
11400   rm -f conftest.er1
11401   cat conftest.err >&5
11402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11403   (exit $ac_status); } &&
11404          { ac_try='test -z "$ac_c_werror_flag"
11405                          || test ! -s conftest.err'
11406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11407   (eval $ac_try) 2>&5
11408   ac_status=$?
11409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410   (exit $ac_status); }; } &&
11411          { ac_try='test -s conftest.$ac_objext'
11412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11413   (eval $ac_try) 2>&5
11414   ac_status=$?
11415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416   (exit $ac_status); }; }; then
11417   ac_cv_c_volatile=yes
11418 else
11419   echo "$as_me: failed program was:" >&5
11420 sed 's/^/| /' conftest.$ac_ext >&5
11421
11422 ac_cv_c_volatile=no
11423 fi
11424 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11425 fi
11426 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11427 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11428 if test $ac_cv_c_volatile = no; then
11429
11430 cat >>confdefs.h <<\_ACEOF
11431 #define volatile
11432 _ACEOF
11433
11434 fi
11435
11436 echo "$as_me:$LINENO: checking for __func__" >&5
11437 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11438 if test "${pgac_cv_funcname_func_support+set}" = set; then
11439   echo $ECHO_N "(cached) $ECHO_C" >&6
11440 else
11441   cat >conftest.$ac_ext <<_ACEOF
11442 /* confdefs.h.  */
11443 _ACEOF
11444 cat confdefs.h >>conftest.$ac_ext
11445 cat >>conftest.$ac_ext <<_ACEOF
11446 /* end confdefs.h.  */
11447 #include <stdio.h>
11448 int
11449 main ()
11450 {
11451 printf("%s\n", __func__);
11452   ;
11453   return 0;
11454 }
11455 _ACEOF
11456 rm -f conftest.$ac_objext
11457 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11458   (eval $ac_compile) 2>conftest.er1
11459   ac_status=$?
11460   grep -v '^ *+' conftest.er1 >conftest.err
11461   rm -f conftest.er1
11462   cat conftest.err >&5
11463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11464   (exit $ac_status); } &&
11465          { ac_try='test -z "$ac_c_werror_flag"
11466                          || test ! -s conftest.err'
11467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11468   (eval $ac_try) 2>&5
11469   ac_status=$?
11470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11471   (exit $ac_status); }; } &&
11472          { ac_try='test -s conftest.$ac_objext'
11473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11474   (eval $ac_try) 2>&5
11475   ac_status=$?
11476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11477   (exit $ac_status); }; }; then
11478   pgac_cv_funcname_func_support=yes
11479 else
11480   echo "$as_me: failed program was:" >&5
11481 sed 's/^/| /' conftest.$ac_ext >&5
11482
11483 pgac_cv_funcname_func_support=no
11484 fi
11485 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11486 fi
11487 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11488 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11489 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11490
11491 cat >>confdefs.h <<\_ACEOF
11492 #define HAVE_FUNCNAME__FUNC 1
11493 _ACEOF
11494
11495 else
11496 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11497 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11498 if test "${pgac_cv_funcname_function_support+set}" = set; then
11499   echo $ECHO_N "(cached) $ECHO_C" >&6
11500 else
11501   cat >conftest.$ac_ext <<_ACEOF
11502 /* confdefs.h.  */
11503 _ACEOF
11504 cat confdefs.h >>conftest.$ac_ext
11505 cat >>conftest.$ac_ext <<_ACEOF
11506 /* end confdefs.h.  */
11507 #include <stdio.h>
11508 int
11509 main ()
11510 {
11511 printf("%s\n", __FUNCTION__);
11512   ;
11513   return 0;
11514 }
11515 _ACEOF
11516 rm -f conftest.$ac_objext
11517 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11518   (eval $ac_compile) 2>conftest.er1
11519   ac_status=$?
11520   grep -v '^ *+' conftest.er1 >conftest.err
11521   rm -f conftest.er1
11522   cat conftest.err >&5
11523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524   (exit $ac_status); } &&
11525          { ac_try='test -z "$ac_c_werror_flag"
11526                          || test ! -s conftest.err'
11527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11528   (eval $ac_try) 2>&5
11529   ac_status=$?
11530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11531   (exit $ac_status); }; } &&
11532          { ac_try='test -s conftest.$ac_objext'
11533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11534   (eval $ac_try) 2>&5
11535   ac_status=$?
11536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11537   (exit $ac_status); }; }; then
11538   pgac_cv_funcname_function_support=yes
11539 else
11540   echo "$as_me: failed program was:" >&5
11541 sed 's/^/| /' conftest.$ac_ext >&5
11542
11543 pgac_cv_funcname_function_support=no
11544 fi
11545 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11546 fi
11547 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11548 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11549 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11550
11551 cat >>confdefs.h <<\_ACEOF
11552 #define HAVE_FUNCNAME__FUNCTION 1
11553 _ACEOF
11554
11555 fi
11556 fi
11557 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11558 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11559 if test "${ac_cv_struct_tm+set}" = set; then
11560   echo $ECHO_N "(cached) $ECHO_C" >&6
11561 else
11562   cat >conftest.$ac_ext <<_ACEOF
11563 /* confdefs.h.  */
11564 _ACEOF
11565 cat confdefs.h >>conftest.$ac_ext
11566 cat >>conftest.$ac_ext <<_ACEOF
11567 /* end confdefs.h.  */
11568 #include <sys/types.h>
11569 #include <time.h>
11570
11571 int
11572 main ()
11573 {
11574 struct tm *tp; tp->tm_sec;
11575   ;
11576   return 0;
11577 }
11578 _ACEOF
11579 rm -f conftest.$ac_objext
11580 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11581   (eval $ac_compile) 2>conftest.er1
11582   ac_status=$?
11583   grep -v '^ *+' conftest.er1 >conftest.err
11584   rm -f conftest.er1
11585   cat conftest.err >&5
11586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587   (exit $ac_status); } &&
11588          { ac_try='test -z "$ac_c_werror_flag"
11589                          || test ! -s conftest.err'
11590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11591   (eval $ac_try) 2>&5
11592   ac_status=$?
11593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11594   (exit $ac_status); }; } &&
11595          { ac_try='test -s conftest.$ac_objext'
11596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11597   (eval $ac_try) 2>&5
11598   ac_status=$?
11599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11600   (exit $ac_status); }; }; then
11601   ac_cv_struct_tm=time.h
11602 else
11603   echo "$as_me: failed program was:" >&5
11604 sed 's/^/| /' conftest.$ac_ext >&5
11605
11606 ac_cv_struct_tm=sys/time.h
11607 fi
11608 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11609 fi
11610 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11611 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11612 if test $ac_cv_struct_tm = sys/time.h; then
11613
11614 cat >>confdefs.h <<\_ACEOF
11615 #define TM_IN_SYS_TIME 1
11616 _ACEOF
11617
11618 fi
11619
11620 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11621 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11622 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11623   echo $ECHO_N "(cached) $ECHO_C" >&6
11624 else
11625   cat >conftest.$ac_ext <<_ACEOF
11626 /* confdefs.h.  */
11627 _ACEOF
11628 cat confdefs.h >>conftest.$ac_ext
11629 cat >>conftest.$ac_ext <<_ACEOF
11630 /* end confdefs.h.  */
11631 #include <sys/types.h>
11632 #include <$ac_cv_struct_tm>
11633
11634
11635 int
11636 main ()
11637 {
11638 static struct tm ac_aggr;
11639 if (ac_aggr.tm_zone)
11640 return 0;
11641   ;
11642   return 0;
11643 }
11644 _ACEOF
11645 rm -f conftest.$ac_objext
11646 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11647   (eval $ac_compile) 2>conftest.er1
11648   ac_status=$?
11649   grep -v '^ *+' conftest.er1 >conftest.err
11650   rm -f conftest.er1
11651   cat conftest.err >&5
11652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11653   (exit $ac_status); } &&
11654          { ac_try='test -z "$ac_c_werror_flag"
11655                          || test ! -s conftest.err'
11656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11657   (eval $ac_try) 2>&5
11658   ac_status=$?
11659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11660   (exit $ac_status); }; } &&
11661          { ac_try='test -s conftest.$ac_objext'
11662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11663   (eval $ac_try) 2>&5
11664   ac_status=$?
11665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666   (exit $ac_status); }; }; then
11667   ac_cv_member_struct_tm_tm_zone=yes
11668 else
11669   echo "$as_me: failed program was:" >&5
11670 sed 's/^/| /' conftest.$ac_ext >&5
11671
11672 cat >conftest.$ac_ext <<_ACEOF
11673 /* confdefs.h.  */
11674 _ACEOF
11675 cat confdefs.h >>conftest.$ac_ext
11676 cat >>conftest.$ac_ext <<_ACEOF
11677 /* end confdefs.h.  */
11678 #include <sys/types.h>
11679 #include <$ac_cv_struct_tm>
11680
11681
11682 int
11683 main ()
11684 {
11685 static struct tm ac_aggr;
11686 if (sizeof ac_aggr.tm_zone)
11687 return 0;
11688   ;
11689   return 0;
11690 }
11691 _ACEOF
11692 rm -f conftest.$ac_objext
11693 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11694   (eval $ac_compile) 2>conftest.er1
11695   ac_status=$?
11696   grep -v '^ *+' conftest.er1 >conftest.err
11697   rm -f conftest.er1
11698   cat conftest.err >&5
11699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11700   (exit $ac_status); } &&
11701          { ac_try='test -z "$ac_c_werror_flag"
11702                          || test ! -s conftest.err'
11703   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11704   (eval $ac_try) 2>&5
11705   ac_status=$?
11706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11707   (exit $ac_status); }; } &&
11708          { ac_try='test -s conftest.$ac_objext'
11709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11710   (eval $ac_try) 2>&5
11711   ac_status=$?
11712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11713   (exit $ac_status); }; }; then
11714   ac_cv_member_struct_tm_tm_zone=yes
11715 else
11716   echo "$as_me: failed program was:" >&5
11717 sed 's/^/| /' conftest.$ac_ext >&5
11718
11719 ac_cv_member_struct_tm_tm_zone=no
11720 fi
11721 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11722 fi
11723 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11724 fi
11725 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11726 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11727 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11728
11729 cat >>confdefs.h <<_ACEOF
11730 #define HAVE_STRUCT_TM_TM_ZONE 1
11731 _ACEOF
11732
11733
11734 fi
11735
11736 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11737
11738 cat >>confdefs.h <<\_ACEOF
11739 #define HAVE_TM_ZONE 1
11740 _ACEOF
11741
11742 fi
11743 echo "$as_me:$LINENO: checking for tzname" >&5
11744 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11745 if test "${ac_cv_var_tzname+set}" = set; then
11746   echo $ECHO_N "(cached) $ECHO_C" >&6
11747 else
11748   cat >conftest.$ac_ext <<_ACEOF
11749 /* confdefs.h.  */
11750 _ACEOF
11751 cat confdefs.h >>conftest.$ac_ext
11752 cat >>conftest.$ac_ext <<_ACEOF
11753 /* end confdefs.h.  */
11754 #include <time.h>
11755 #ifndef tzname /* For SGI.  */
11756 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11757 #endif
11758
11759 int
11760 main ()
11761 {
11762 atoi(*tzname);
11763   ;
11764   return 0;
11765 }
11766 _ACEOF
11767 rm -f conftest.$ac_objext conftest$ac_exeext
11768 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11769   (eval $ac_link) 2>conftest.er1
11770   ac_status=$?
11771   grep -v '^ *+' conftest.er1 >conftest.err
11772   rm -f conftest.er1
11773   cat conftest.err >&5
11774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775   (exit $ac_status); } &&
11776          { ac_try='test -z "$ac_c_werror_flag"
11777                          || test ! -s conftest.err'
11778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11779   (eval $ac_try) 2>&5
11780   ac_status=$?
11781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11782   (exit $ac_status); }; } &&
11783          { ac_try='test -s conftest$ac_exeext'
11784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11785   (eval $ac_try) 2>&5
11786   ac_status=$?
11787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11788   (exit $ac_status); }; }; then
11789   ac_cv_var_tzname=yes
11790 else
11791   echo "$as_me: failed program was:" >&5
11792 sed 's/^/| /' conftest.$ac_ext >&5
11793
11794 ac_cv_var_tzname=no
11795 fi
11796 rm -f conftest.err conftest.$ac_objext \
11797       conftest$ac_exeext conftest.$ac_ext
11798 fi
11799 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11800 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11801 if test $ac_cv_var_tzname = yes; then
11802
11803 cat >>confdefs.h <<\_ACEOF
11804 #define HAVE_TZNAME 1
11805 _ACEOF
11806
11807 fi
11808
11809 echo "$as_me:$LINENO: checking for union semun" >&5
11810 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11811 if test "${ac_cv_type_union_semun+set}" = set; then
11812   echo $ECHO_N "(cached) $ECHO_C" >&6
11813 else
11814   cat >conftest.$ac_ext <<_ACEOF
11815 /* confdefs.h.  */
11816 _ACEOF
11817 cat confdefs.h >>conftest.$ac_ext
11818 cat >>conftest.$ac_ext <<_ACEOF
11819 /* end confdefs.h.  */
11820 #include <sys/types.h>
11821 #include <sys/ipc.h>
11822 #include <sys/sem.h>
11823
11824 int
11825 main ()
11826 {
11827 if ((union semun *) 0)
11828   return 0;
11829 if (sizeof (union semun))
11830   return 0;
11831   ;
11832   return 0;
11833 }
11834 _ACEOF
11835 rm -f conftest.$ac_objext
11836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11837   (eval $ac_compile) 2>conftest.er1
11838   ac_status=$?
11839   grep -v '^ *+' conftest.er1 >conftest.err
11840   rm -f conftest.er1
11841   cat conftest.err >&5
11842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11843   (exit $ac_status); } &&
11844          { ac_try='test -z "$ac_c_werror_flag"
11845                          || test ! -s conftest.err'
11846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11847   (eval $ac_try) 2>&5
11848   ac_status=$?
11849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11850   (exit $ac_status); }; } &&
11851          { ac_try='test -s conftest.$ac_objext'
11852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11853   (eval $ac_try) 2>&5
11854   ac_status=$?
11855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11856   (exit $ac_status); }; }; then
11857   ac_cv_type_union_semun=yes
11858 else
11859   echo "$as_me: failed program was:" >&5
11860 sed 's/^/| /' conftest.$ac_ext >&5
11861
11862 ac_cv_type_union_semun=no
11863 fi
11864 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11865 fi
11866 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11867 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11868 if test $ac_cv_type_union_semun = yes; then
11869
11870 cat >>confdefs.h <<_ACEOF
11871 #define HAVE_UNION_SEMUN 1
11872 _ACEOF
11873
11874
11875 fi
11876
11877 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11878 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11879 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11880   echo $ECHO_N "(cached) $ECHO_C" >&6
11881 else
11882   cat >conftest.$ac_ext <<_ACEOF
11883 /* confdefs.h.  */
11884 _ACEOF
11885 cat confdefs.h >>conftest.$ac_ext
11886 cat >>conftest.$ac_ext <<_ACEOF
11887 /* end confdefs.h.  */
11888 #include <sys/types.h>
11889 #ifdef HAVE_SYS_UN_H
11890 #include <sys/un.h>
11891 #endif
11892
11893
11894 int
11895 main ()
11896 {
11897 if ((struct sockaddr_un *) 0)
11898   return 0;
11899 if (sizeof (struct sockaddr_un))
11900   return 0;
11901   ;
11902   return 0;
11903 }
11904 _ACEOF
11905 rm -f conftest.$ac_objext
11906 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11907   (eval $ac_compile) 2>conftest.er1
11908   ac_status=$?
11909   grep -v '^ *+' conftest.er1 >conftest.err
11910   rm -f conftest.er1
11911   cat conftest.err >&5
11912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11913   (exit $ac_status); } &&
11914          { ac_try='test -z "$ac_c_werror_flag"
11915                          || test ! -s conftest.err'
11916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11917   (eval $ac_try) 2>&5
11918   ac_status=$?
11919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11920   (exit $ac_status); }; } &&
11921          { ac_try='test -s conftest.$ac_objext'
11922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11923   (eval $ac_try) 2>&5
11924   ac_status=$?
11925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926   (exit $ac_status); }; }; then
11927   ac_cv_type_struct_sockaddr_un=yes
11928 else
11929   echo "$as_me: failed program was:" >&5
11930 sed 's/^/| /' conftest.$ac_ext >&5
11931
11932 ac_cv_type_struct_sockaddr_un=no
11933 fi
11934 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11935 fi
11936 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11937 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11938 if test $ac_cv_type_struct_sockaddr_un = yes; then
11939
11940 cat >>confdefs.h <<_ACEOF
11941 #define HAVE_STRUCT_SOCKADDR_UN 1
11942 _ACEOF
11943
11944
11945 cat >>confdefs.h <<\_ACEOF
11946 #define HAVE_UNIX_SOCKETS 1
11947 _ACEOF
11948
11949 fi
11950
11951 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11952 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11953 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11954   echo $ECHO_N "(cached) $ECHO_C" >&6
11955 else
11956   cat >conftest.$ac_ext <<_ACEOF
11957 /* confdefs.h.  */
11958 _ACEOF
11959 cat confdefs.h >>conftest.$ac_ext
11960 cat >>conftest.$ac_ext <<_ACEOF
11961 /* end confdefs.h.  */
11962 #include <sys/types.h>
11963 #ifdef HAVE_SYS_SOCKET_H
11964 #include <sys/socket.h>
11965 #endif
11966
11967
11968 int
11969 main ()
11970 {
11971 if ((struct sockaddr_storage *) 0)
11972   return 0;
11973 if (sizeof (struct sockaddr_storage))
11974   return 0;
11975   ;
11976   return 0;
11977 }
11978 _ACEOF
11979 rm -f conftest.$ac_objext
11980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11981   (eval $ac_compile) 2>conftest.er1
11982   ac_status=$?
11983   grep -v '^ *+' conftest.er1 >conftest.err
11984   rm -f conftest.er1
11985   cat conftest.err >&5
11986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11987   (exit $ac_status); } &&
11988          { ac_try='test -z "$ac_c_werror_flag"
11989                          || test ! -s conftest.err'
11990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11991   (eval $ac_try) 2>&5
11992   ac_status=$?
11993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11994   (exit $ac_status); }; } &&
11995          { ac_try='test -s conftest.$ac_objext'
11996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11997   (eval $ac_try) 2>&5
11998   ac_status=$?
11999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12000   (exit $ac_status); }; }; then
12001   ac_cv_type_struct_sockaddr_storage=yes
12002 else
12003   echo "$as_me: failed program was:" >&5
12004 sed 's/^/| /' conftest.$ac_ext >&5
12005
12006 ac_cv_type_struct_sockaddr_storage=no
12007 fi
12008 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12009 fi
12010 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
12011 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
12012 if test $ac_cv_type_struct_sockaddr_storage = yes; then
12013
12014 cat >>confdefs.h <<_ACEOF
12015 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12016 _ACEOF
12017
12018
12019 fi
12020
12021 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
12022 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
12023 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
12024   echo $ECHO_N "(cached) $ECHO_C" >&6
12025 else
12026   cat >conftest.$ac_ext <<_ACEOF
12027 /* confdefs.h.  */
12028 _ACEOF
12029 cat confdefs.h >>conftest.$ac_ext
12030 cat >>conftest.$ac_ext <<_ACEOF
12031 /* end confdefs.h.  */
12032 #include <sys/types.h>
12033 #ifdef HAVE_SYS_SOCKET_H
12034 #include <sys/socket.h>
12035 #endif
12036
12037
12038 int
12039 main ()
12040 {
12041 static struct sockaddr_storage ac_aggr;
12042 if (ac_aggr.ss_family)
12043 return 0;
12044   ;
12045   return 0;
12046 }
12047 _ACEOF
12048 rm -f conftest.$ac_objext
12049 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12050   (eval $ac_compile) 2>conftest.er1
12051   ac_status=$?
12052   grep -v '^ *+' conftest.er1 >conftest.err
12053   rm -f conftest.er1
12054   cat conftest.err >&5
12055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12056   (exit $ac_status); } &&
12057          { ac_try='test -z "$ac_c_werror_flag"
12058                          || test ! -s conftest.err'
12059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12060   (eval $ac_try) 2>&5
12061   ac_status=$?
12062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12063   (exit $ac_status); }; } &&
12064          { ac_try='test -s conftest.$ac_objext'
12065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12066   (eval $ac_try) 2>&5
12067   ac_status=$?
12068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12069   (exit $ac_status); }; }; then
12070   ac_cv_member_struct_sockaddr_storage_ss_family=yes
12071 else
12072   echo "$as_me: failed program was:" >&5
12073 sed 's/^/| /' conftest.$ac_ext >&5
12074
12075 cat >conftest.$ac_ext <<_ACEOF
12076 /* confdefs.h.  */
12077 _ACEOF
12078 cat confdefs.h >>conftest.$ac_ext
12079 cat >>conftest.$ac_ext <<_ACEOF
12080 /* end confdefs.h.  */
12081 #include <sys/types.h>
12082 #ifdef HAVE_SYS_SOCKET_H
12083 #include <sys/socket.h>
12084 #endif
12085
12086
12087 int
12088 main ()
12089 {
12090 static struct sockaddr_storage ac_aggr;
12091 if (sizeof ac_aggr.ss_family)
12092 return 0;
12093   ;
12094   return 0;
12095 }
12096 _ACEOF
12097 rm -f conftest.$ac_objext
12098 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12099   (eval $ac_compile) 2>conftest.er1
12100   ac_status=$?
12101   grep -v '^ *+' conftest.er1 >conftest.err
12102   rm -f conftest.er1
12103   cat conftest.err >&5
12104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12105   (exit $ac_status); } &&
12106          { ac_try='test -z "$ac_c_werror_flag"
12107                          || test ! -s conftest.err'
12108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12109   (eval $ac_try) 2>&5
12110   ac_status=$?
12111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12112   (exit $ac_status); }; } &&
12113          { ac_try='test -s conftest.$ac_objext'
12114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12115   (eval $ac_try) 2>&5
12116   ac_status=$?
12117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12118   (exit $ac_status); }; }; then
12119   ac_cv_member_struct_sockaddr_storage_ss_family=yes
12120 else
12121   echo "$as_me: failed program was:" >&5
12122 sed 's/^/| /' conftest.$ac_ext >&5
12123
12124 ac_cv_member_struct_sockaddr_storage_ss_family=no
12125 fi
12126 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12127 fi
12128 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12129 fi
12130 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
12131 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
12132 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
12133
12134 cat >>confdefs.h <<_ACEOF
12135 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12136 _ACEOF
12137
12138
12139 fi
12140 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
12141 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
12142 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
12143   echo $ECHO_N "(cached) $ECHO_C" >&6
12144 else
12145   cat >conftest.$ac_ext <<_ACEOF
12146 /* confdefs.h.  */
12147 _ACEOF
12148 cat confdefs.h >>conftest.$ac_ext
12149 cat >>conftest.$ac_ext <<_ACEOF
12150 /* end confdefs.h.  */
12151 #include <sys/types.h>
12152 #ifdef HAVE_SYS_SOCKET_H
12153 #include <sys/socket.h>
12154 #endif
12155
12156
12157 int
12158 main ()
12159 {
12160 static struct sockaddr_storage ac_aggr;
12161 if (ac_aggr.__ss_family)
12162 return 0;
12163   ;
12164   return 0;
12165 }
12166 _ACEOF
12167 rm -f conftest.$ac_objext
12168 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12169   (eval $ac_compile) 2>conftest.er1
12170   ac_status=$?
12171   grep -v '^ *+' conftest.er1 >conftest.err
12172   rm -f conftest.er1
12173   cat conftest.err >&5
12174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12175   (exit $ac_status); } &&
12176          { ac_try='test -z "$ac_c_werror_flag"
12177                          || test ! -s conftest.err'
12178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12179   (eval $ac_try) 2>&5
12180   ac_status=$?
12181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182   (exit $ac_status); }; } &&
12183          { ac_try='test -s conftest.$ac_objext'
12184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12185   (eval $ac_try) 2>&5
12186   ac_status=$?
12187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188   (exit $ac_status); }; }; then
12189   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12190 else
12191   echo "$as_me: failed program was:" >&5
12192 sed 's/^/| /' conftest.$ac_ext >&5
12193
12194 cat >conftest.$ac_ext <<_ACEOF
12195 /* confdefs.h.  */
12196 _ACEOF
12197 cat confdefs.h >>conftest.$ac_ext
12198 cat >>conftest.$ac_ext <<_ACEOF
12199 /* end confdefs.h.  */
12200 #include <sys/types.h>
12201 #ifdef HAVE_SYS_SOCKET_H
12202 #include <sys/socket.h>
12203 #endif
12204
12205
12206 int
12207 main ()
12208 {
12209 static struct sockaddr_storage ac_aggr;
12210 if (sizeof ac_aggr.__ss_family)
12211 return 0;
12212   ;
12213   return 0;
12214 }
12215 _ACEOF
12216 rm -f conftest.$ac_objext
12217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12218   (eval $ac_compile) 2>conftest.er1
12219   ac_status=$?
12220   grep -v '^ *+' conftest.er1 >conftest.err
12221   rm -f conftest.er1
12222   cat conftest.err >&5
12223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12224   (exit $ac_status); } &&
12225          { ac_try='test -z "$ac_c_werror_flag"
12226                          || test ! -s conftest.err'
12227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12228   (eval $ac_try) 2>&5
12229   ac_status=$?
12230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12231   (exit $ac_status); }; } &&
12232          { ac_try='test -s conftest.$ac_objext'
12233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12234   (eval $ac_try) 2>&5
12235   ac_status=$?
12236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12237   (exit $ac_status); }; }; then
12238   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12239 else
12240   echo "$as_me: failed program was:" >&5
12241 sed 's/^/| /' conftest.$ac_ext >&5
12242
12243 ac_cv_member_struct_sockaddr_storage___ss_family=no
12244 fi
12245 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12246 fi
12247 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12248 fi
12249 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12250 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12251 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12252
12253 cat >>confdefs.h <<_ACEOF
12254 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12255 _ACEOF
12256
12257
12258 fi
12259 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12260 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12261 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12262   echo $ECHO_N "(cached) $ECHO_C" >&6
12263 else
12264   cat >conftest.$ac_ext <<_ACEOF
12265 /* confdefs.h.  */
12266 _ACEOF
12267 cat confdefs.h >>conftest.$ac_ext
12268 cat >>conftest.$ac_ext <<_ACEOF
12269 /* end confdefs.h.  */
12270 #include <sys/types.h>
12271 #ifdef HAVE_SYS_SOCKET_H
12272 #include <sys/socket.h>
12273 #endif
12274
12275
12276 int
12277 main ()
12278 {
12279 static struct sockaddr_storage ac_aggr;
12280 if (ac_aggr.ss_len)
12281 return 0;
12282   ;
12283   return 0;
12284 }
12285 _ACEOF
12286 rm -f conftest.$ac_objext
12287 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12288   (eval $ac_compile) 2>conftest.er1
12289   ac_status=$?
12290   grep -v '^ *+' conftest.er1 >conftest.err
12291   rm -f conftest.er1
12292   cat conftest.err >&5
12293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12294   (exit $ac_status); } &&
12295          { ac_try='test -z "$ac_c_werror_flag"
12296                          || test ! -s conftest.err'
12297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12298   (eval $ac_try) 2>&5
12299   ac_status=$?
12300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12301   (exit $ac_status); }; } &&
12302          { ac_try='test -s conftest.$ac_objext'
12303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12304   (eval $ac_try) 2>&5
12305   ac_status=$?
12306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12307   (exit $ac_status); }; }; then
12308   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12309 else
12310   echo "$as_me: failed program was:" >&5
12311 sed 's/^/| /' conftest.$ac_ext >&5
12312
12313 cat >conftest.$ac_ext <<_ACEOF
12314 /* confdefs.h.  */
12315 _ACEOF
12316 cat confdefs.h >>conftest.$ac_ext
12317 cat >>conftest.$ac_ext <<_ACEOF
12318 /* end confdefs.h.  */
12319 #include <sys/types.h>
12320 #ifdef HAVE_SYS_SOCKET_H
12321 #include <sys/socket.h>
12322 #endif
12323
12324
12325 int
12326 main ()
12327 {
12328 static struct sockaddr_storage ac_aggr;
12329 if (sizeof ac_aggr.ss_len)
12330 return 0;
12331   ;
12332   return 0;
12333 }
12334 _ACEOF
12335 rm -f conftest.$ac_objext
12336 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12337   (eval $ac_compile) 2>conftest.er1
12338   ac_status=$?
12339   grep -v '^ *+' conftest.er1 >conftest.err
12340   rm -f conftest.er1
12341   cat conftest.err >&5
12342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343   (exit $ac_status); } &&
12344          { ac_try='test -z "$ac_c_werror_flag"
12345                          || test ! -s conftest.err'
12346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12347   (eval $ac_try) 2>&5
12348   ac_status=$?
12349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12350   (exit $ac_status); }; } &&
12351          { ac_try='test -s conftest.$ac_objext'
12352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12353   (eval $ac_try) 2>&5
12354   ac_status=$?
12355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356   (exit $ac_status); }; }; then
12357   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12358 else
12359   echo "$as_me: failed program was:" >&5
12360 sed 's/^/| /' conftest.$ac_ext >&5
12361
12362 ac_cv_member_struct_sockaddr_storage_ss_len=no
12363 fi
12364 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12365 fi
12366 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12367 fi
12368 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12369 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12370 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12371
12372 cat >>confdefs.h <<_ACEOF
12373 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12374 _ACEOF
12375
12376
12377 fi
12378 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12379 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12380 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12381   echo $ECHO_N "(cached) $ECHO_C" >&6
12382 else
12383   cat >conftest.$ac_ext <<_ACEOF
12384 /* confdefs.h.  */
12385 _ACEOF
12386 cat confdefs.h >>conftest.$ac_ext
12387 cat >>conftest.$ac_ext <<_ACEOF
12388 /* end confdefs.h.  */
12389 #include <sys/types.h>
12390 #ifdef HAVE_SYS_SOCKET_H
12391 #include <sys/socket.h>
12392 #endif
12393
12394
12395 int
12396 main ()
12397 {
12398 static struct sockaddr_storage ac_aggr;
12399 if (ac_aggr.__ss_len)
12400 return 0;
12401   ;
12402   return 0;
12403 }
12404 _ACEOF
12405 rm -f conftest.$ac_objext
12406 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12407   (eval $ac_compile) 2>conftest.er1
12408   ac_status=$?
12409   grep -v '^ *+' conftest.er1 >conftest.err
12410   rm -f conftest.er1
12411   cat conftest.err >&5
12412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413   (exit $ac_status); } &&
12414          { ac_try='test -z "$ac_c_werror_flag"
12415                          || test ! -s conftest.err'
12416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12417   (eval $ac_try) 2>&5
12418   ac_status=$?
12419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12420   (exit $ac_status); }; } &&
12421          { ac_try='test -s conftest.$ac_objext'
12422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12423   (eval $ac_try) 2>&5
12424   ac_status=$?
12425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12426   (exit $ac_status); }; }; then
12427   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12428 else
12429   echo "$as_me: failed program was:" >&5
12430 sed 's/^/| /' conftest.$ac_ext >&5
12431
12432 cat >conftest.$ac_ext <<_ACEOF
12433 /* confdefs.h.  */
12434 _ACEOF
12435 cat confdefs.h >>conftest.$ac_ext
12436 cat >>conftest.$ac_ext <<_ACEOF
12437 /* end confdefs.h.  */
12438 #include <sys/types.h>
12439 #ifdef HAVE_SYS_SOCKET_H
12440 #include <sys/socket.h>
12441 #endif
12442
12443
12444 int
12445 main ()
12446 {
12447 static struct sockaddr_storage ac_aggr;
12448 if (sizeof ac_aggr.__ss_len)
12449 return 0;
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 rm -f conftest.$ac_objext
12455 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12456   (eval $ac_compile) 2>conftest.er1
12457   ac_status=$?
12458   grep -v '^ *+' conftest.er1 >conftest.err
12459   rm -f conftest.er1
12460   cat conftest.err >&5
12461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462   (exit $ac_status); } &&
12463          { ac_try='test -z "$ac_c_werror_flag"
12464                          || test ! -s conftest.err'
12465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12466   (eval $ac_try) 2>&5
12467   ac_status=$?
12468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469   (exit $ac_status); }; } &&
12470          { ac_try='test -s conftest.$ac_objext'
12471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12472   (eval $ac_try) 2>&5
12473   ac_status=$?
12474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475   (exit $ac_status); }; }; then
12476   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12477 else
12478   echo "$as_me: failed program was:" >&5
12479 sed 's/^/| /' conftest.$ac_ext >&5
12480
12481 ac_cv_member_struct_sockaddr_storage___ss_len=no
12482 fi
12483 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12484 fi
12485 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12486 fi
12487 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12488 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12489 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12490
12491 cat >>confdefs.h <<_ACEOF
12492 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12493 _ACEOF
12494
12495
12496 fi
12497 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12498 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12499 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12500   echo $ECHO_N "(cached) $ECHO_C" >&6
12501 else
12502   cat >conftest.$ac_ext <<_ACEOF
12503 /* confdefs.h.  */
12504 _ACEOF
12505 cat confdefs.h >>conftest.$ac_ext
12506 cat >>conftest.$ac_ext <<_ACEOF
12507 /* end confdefs.h.  */
12508 #include <sys/types.h>
12509 #ifdef HAVE_SYS_SOCKET_H
12510 #include <sys/socket.h>
12511 #endif
12512
12513
12514 int
12515 main ()
12516 {
12517 static struct sockaddr ac_aggr;
12518 if (ac_aggr.sa_len)
12519 return 0;
12520   ;
12521   return 0;
12522 }
12523 _ACEOF
12524 rm -f conftest.$ac_objext
12525 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12526   (eval $ac_compile) 2>conftest.er1
12527   ac_status=$?
12528   grep -v '^ *+' conftest.er1 >conftest.err
12529   rm -f conftest.er1
12530   cat conftest.err >&5
12531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12532   (exit $ac_status); } &&
12533          { ac_try='test -z "$ac_c_werror_flag"
12534                          || test ! -s conftest.err'
12535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12536   (eval $ac_try) 2>&5
12537   ac_status=$?
12538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12539   (exit $ac_status); }; } &&
12540          { ac_try='test -s conftest.$ac_objext'
12541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12542   (eval $ac_try) 2>&5
12543   ac_status=$?
12544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545   (exit $ac_status); }; }; then
12546   ac_cv_member_struct_sockaddr_sa_len=yes
12547 else
12548   echo "$as_me: failed program was:" >&5
12549 sed 's/^/| /' conftest.$ac_ext >&5
12550
12551 cat >conftest.$ac_ext <<_ACEOF
12552 /* confdefs.h.  */
12553 _ACEOF
12554 cat confdefs.h >>conftest.$ac_ext
12555 cat >>conftest.$ac_ext <<_ACEOF
12556 /* end confdefs.h.  */
12557 #include <sys/types.h>
12558 #ifdef HAVE_SYS_SOCKET_H
12559 #include <sys/socket.h>
12560 #endif
12561
12562
12563 int
12564 main ()
12565 {
12566 static struct sockaddr ac_aggr;
12567 if (sizeof ac_aggr.sa_len)
12568 return 0;
12569   ;
12570   return 0;
12571 }
12572 _ACEOF
12573 rm -f conftest.$ac_objext
12574 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12575   (eval $ac_compile) 2>conftest.er1
12576   ac_status=$?
12577   grep -v '^ *+' conftest.er1 >conftest.err
12578   rm -f conftest.er1
12579   cat conftest.err >&5
12580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581   (exit $ac_status); } &&
12582          { ac_try='test -z "$ac_c_werror_flag"
12583                          || test ! -s conftest.err'
12584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12585   (eval $ac_try) 2>&5
12586   ac_status=$?
12587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12588   (exit $ac_status); }; } &&
12589          { ac_try='test -s conftest.$ac_objext'
12590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12591   (eval $ac_try) 2>&5
12592   ac_status=$?
12593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12594   (exit $ac_status); }; }; then
12595   ac_cv_member_struct_sockaddr_sa_len=yes
12596 else
12597   echo "$as_me: failed program was:" >&5
12598 sed 's/^/| /' conftest.$ac_ext >&5
12599
12600 ac_cv_member_struct_sockaddr_sa_len=no
12601 fi
12602 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12603 fi
12604 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12605 fi
12606 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12607 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12608 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12609
12610 cat >>confdefs.h <<_ACEOF
12611 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12612 _ACEOF
12613
12614
12615 fi
12616
12617 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12618 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12619 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12620   echo $ECHO_N "(cached) $ECHO_C" >&6
12621 else
12622   cat >conftest.$ac_ext <<_ACEOF
12623 /* confdefs.h.  */
12624 _ACEOF
12625 cat confdefs.h >>conftest.$ac_ext
12626 cat >>conftest.$ac_ext <<_ACEOF
12627 /* end confdefs.h.  */
12628 #include <sys/types.h>
12629 #include <sys/socket.h>
12630 #include <netdb.h>
12631
12632
12633 int
12634 main ()
12635 {
12636 if ((struct addrinfo *) 0)
12637   return 0;
12638 if (sizeof (struct addrinfo))
12639   return 0;
12640   ;
12641   return 0;
12642 }
12643 _ACEOF
12644 rm -f conftest.$ac_objext
12645 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12646   (eval $ac_compile) 2>conftest.er1
12647   ac_status=$?
12648   grep -v '^ *+' conftest.er1 >conftest.err
12649   rm -f conftest.er1
12650   cat conftest.err >&5
12651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12652   (exit $ac_status); } &&
12653          { ac_try='test -z "$ac_c_werror_flag"
12654                          || test ! -s conftest.err'
12655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12656   (eval $ac_try) 2>&5
12657   ac_status=$?
12658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12659   (exit $ac_status); }; } &&
12660          { ac_try='test -s conftest.$ac_objext'
12661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12662   (eval $ac_try) 2>&5
12663   ac_status=$?
12664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12665   (exit $ac_status); }; }; then
12666   ac_cv_type_struct_addrinfo=yes
12667 else
12668   echo "$as_me: failed program was:" >&5
12669 sed 's/^/| /' conftest.$ac_ext >&5
12670
12671 ac_cv_type_struct_addrinfo=no
12672 fi
12673 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12674 fi
12675 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12676 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12677 if test $ac_cv_type_struct_addrinfo = yes; then
12678
12679 cat >>confdefs.h <<_ACEOF
12680 #define HAVE_STRUCT_ADDRINFO 1
12681 _ACEOF
12682
12683
12684 fi
12685
12686
12687 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12688 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12689 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12690   echo $ECHO_N "(cached) $ECHO_C" >&6
12691 else
12692   cat >conftest.$ac_ext <<_ACEOF
12693 /* confdefs.h.  */
12694 _ACEOF
12695 cat confdefs.h >>conftest.$ac_ext
12696 cat >>conftest.$ac_ext <<_ACEOF
12697 /* end confdefs.h.  */
12698 #include <sys/param.h>
12699 #include <sys/types.h>
12700 #include <sys/socket.h>
12701 #include <sys/ucred.h>
12702
12703 int
12704 main ()
12705 {
12706 if ((struct cmsgcred *) 0)
12707   return 0;
12708 if (sizeof (struct cmsgcred))
12709   return 0;
12710   ;
12711   return 0;
12712 }
12713 _ACEOF
12714 rm -f conftest.$ac_objext
12715 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12716   (eval $ac_compile) 2>conftest.er1
12717   ac_status=$?
12718   grep -v '^ *+' conftest.er1 >conftest.err
12719   rm -f conftest.er1
12720   cat conftest.err >&5
12721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12722   (exit $ac_status); } &&
12723          { ac_try='test -z "$ac_c_werror_flag"
12724                          || test ! -s conftest.err'
12725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12726   (eval $ac_try) 2>&5
12727   ac_status=$?
12728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12729   (exit $ac_status); }; } &&
12730          { ac_try='test -s conftest.$ac_objext'
12731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12732   (eval $ac_try) 2>&5
12733   ac_status=$?
12734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12735   (exit $ac_status); }; }; then
12736   ac_cv_type_struct_cmsgcred=yes
12737 else
12738   echo "$as_me: failed program was:" >&5
12739 sed 's/^/| /' conftest.$ac_ext >&5
12740
12741 ac_cv_type_struct_cmsgcred=no
12742 fi
12743 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12744 fi
12745 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12746 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12747 if test $ac_cv_type_struct_cmsgcred = yes; then
12748
12749 cat >>confdefs.h <<_ACEOF
12750 #define HAVE_STRUCT_CMSGCRED 1
12751 _ACEOF
12752
12753
12754 fi
12755 echo "$as_me:$LINENO: checking for struct fcred" >&5
12756 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12757 if test "${ac_cv_type_struct_fcred+set}" = set; then
12758   echo $ECHO_N "(cached) $ECHO_C" >&6
12759 else
12760   cat >conftest.$ac_ext <<_ACEOF
12761 /* confdefs.h.  */
12762 _ACEOF
12763 cat confdefs.h >>conftest.$ac_ext
12764 cat >>conftest.$ac_ext <<_ACEOF
12765 /* end confdefs.h.  */
12766 #include <sys/param.h>
12767 #include <sys/types.h>
12768 #include <sys/socket.h>
12769 #include <sys/ucred.h>
12770
12771 int
12772 main ()
12773 {
12774 if ((struct fcred *) 0)
12775   return 0;
12776 if (sizeof (struct fcred))
12777   return 0;
12778   ;
12779   return 0;
12780 }
12781 _ACEOF
12782 rm -f conftest.$ac_objext
12783 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12784   (eval $ac_compile) 2>conftest.er1
12785   ac_status=$?
12786   grep -v '^ *+' conftest.er1 >conftest.err
12787   rm -f conftest.er1
12788   cat conftest.err >&5
12789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12790   (exit $ac_status); } &&
12791          { ac_try='test -z "$ac_c_werror_flag"
12792                          || test ! -s conftest.err'
12793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12794   (eval $ac_try) 2>&5
12795   ac_status=$?
12796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12797   (exit $ac_status); }; } &&
12798          { ac_try='test -s conftest.$ac_objext'
12799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12800   (eval $ac_try) 2>&5
12801   ac_status=$?
12802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12803   (exit $ac_status); }; }; then
12804   ac_cv_type_struct_fcred=yes
12805 else
12806   echo "$as_me: failed program was:" >&5
12807 sed 's/^/| /' conftest.$ac_ext >&5
12808
12809 ac_cv_type_struct_fcred=no
12810 fi
12811 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12812 fi
12813 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12814 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12815 if test $ac_cv_type_struct_fcred = yes; then
12816
12817 cat >>confdefs.h <<_ACEOF
12818 #define HAVE_STRUCT_FCRED 1
12819 _ACEOF
12820
12821
12822 fi
12823 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12824 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12825 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12826   echo $ECHO_N "(cached) $ECHO_C" >&6
12827 else
12828   cat >conftest.$ac_ext <<_ACEOF
12829 /* confdefs.h.  */
12830 _ACEOF
12831 cat confdefs.h >>conftest.$ac_ext
12832 cat >>conftest.$ac_ext <<_ACEOF
12833 /* end confdefs.h.  */
12834 #include <sys/param.h>
12835 #include <sys/types.h>
12836 #include <sys/socket.h>
12837 #include <sys/ucred.h>
12838
12839 int
12840 main ()
12841 {
12842 if ((struct sockcred *) 0)
12843   return 0;
12844 if (sizeof (struct sockcred))
12845   return 0;
12846   ;
12847   return 0;
12848 }
12849 _ACEOF
12850 rm -f conftest.$ac_objext
12851 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12852   (eval $ac_compile) 2>conftest.er1
12853   ac_status=$?
12854   grep -v '^ *+' conftest.er1 >conftest.err
12855   rm -f conftest.er1
12856   cat conftest.err >&5
12857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12858   (exit $ac_status); } &&
12859          { ac_try='test -z "$ac_c_werror_flag"
12860                          || test ! -s conftest.err'
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); }; } &&
12866          { ac_try='test -s conftest.$ac_objext'
12867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12868   (eval $ac_try) 2>&5
12869   ac_status=$?
12870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12871   (exit $ac_status); }; }; then
12872   ac_cv_type_struct_sockcred=yes
12873 else
12874   echo "$as_me: failed program was:" >&5
12875 sed 's/^/| /' conftest.$ac_ext >&5
12876
12877 ac_cv_type_struct_sockcred=no
12878 fi
12879 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12880 fi
12881 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12882 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12883 if test $ac_cv_type_struct_sockcred = yes; then
12884
12885 cat >>confdefs.h <<_ACEOF
12886 #define HAVE_STRUCT_SOCKCRED 1
12887 _ACEOF
12888
12889
12890 fi
12891
12892
12893 echo "$as_me:$LINENO: checking for struct option" >&5
12894 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12895 if test "${ac_cv_type_struct_option+set}" = set; then
12896   echo $ECHO_N "(cached) $ECHO_C" >&6
12897 else
12898   cat >conftest.$ac_ext <<_ACEOF
12899 /* confdefs.h.  */
12900 _ACEOF
12901 cat confdefs.h >>conftest.$ac_ext
12902 cat >>conftest.$ac_ext <<_ACEOF
12903 /* end confdefs.h.  */
12904 #ifdef HAVE_GETOPT_H
12905 #include <getopt.h>
12906 #endif
12907
12908 int
12909 main ()
12910 {
12911 if ((struct option *) 0)
12912   return 0;
12913 if (sizeof (struct option))
12914   return 0;
12915   ;
12916   return 0;
12917 }
12918 _ACEOF
12919 rm -f conftest.$ac_objext
12920 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12921   (eval $ac_compile) 2>conftest.er1
12922   ac_status=$?
12923   grep -v '^ *+' conftest.er1 >conftest.err
12924   rm -f conftest.er1
12925   cat conftest.err >&5
12926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12927   (exit $ac_status); } &&
12928          { ac_try='test -z "$ac_c_werror_flag"
12929                          || test ! -s conftest.err'
12930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12931   (eval $ac_try) 2>&5
12932   ac_status=$?
12933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12934   (exit $ac_status); }; } &&
12935          { ac_try='test -s conftest.$ac_objext'
12936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12937   (eval $ac_try) 2>&5
12938   ac_status=$?
12939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12940   (exit $ac_status); }; }; then
12941   ac_cv_type_struct_option=yes
12942 else
12943   echo "$as_me: failed program was:" >&5
12944 sed 's/^/| /' conftest.$ac_ext >&5
12945
12946 ac_cv_type_struct_option=no
12947 fi
12948 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12949 fi
12950 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12951 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12952 if test $ac_cv_type_struct_option = yes; then
12953
12954 cat >>confdefs.h <<_ACEOF
12955 #define HAVE_STRUCT_OPTION 1
12956 _ACEOF
12957
12958
12959 fi
12960
12961
12962 if test "$with_zlib" = yes; then
12963   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12964   # did not).  While we could work around the lack of z_streamp, it
12965   # seems unwise to encourage people to use such old zlib versions...
12966   echo "$as_me:$LINENO: checking for z_streamp" >&5
12967 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12968 if test "${ac_cv_type_z_streamp+set}" = set; then
12969   echo $ECHO_N "(cached) $ECHO_C" >&6
12970 else
12971   cat >conftest.$ac_ext <<_ACEOF
12972 /* confdefs.h.  */
12973 _ACEOF
12974 cat confdefs.h >>conftest.$ac_ext
12975 cat >>conftest.$ac_ext <<_ACEOF
12976 /* end confdefs.h.  */
12977 #include <zlib.h>
12978
12979 int
12980 main ()
12981 {
12982 if ((z_streamp *) 0)
12983   return 0;
12984 if (sizeof (z_streamp))
12985   return 0;
12986   ;
12987   return 0;
12988 }
12989 _ACEOF
12990 rm -f conftest.$ac_objext
12991 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12992   (eval $ac_compile) 2>conftest.er1
12993   ac_status=$?
12994   grep -v '^ *+' conftest.er1 >conftest.err
12995   rm -f conftest.er1
12996   cat conftest.err >&5
12997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998   (exit $ac_status); } &&
12999          { ac_try='test -z "$ac_c_werror_flag"
13000                          || test ! -s conftest.err'
13001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13002   (eval $ac_try) 2>&5
13003   ac_status=$?
13004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13005   (exit $ac_status); }; } &&
13006          { ac_try='test -s conftest.$ac_objext'
13007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13008   (eval $ac_try) 2>&5
13009   ac_status=$?
13010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13011   (exit $ac_status); }; }; then
13012   ac_cv_type_z_streamp=yes
13013 else
13014   echo "$as_me: failed program was:" >&5
13015 sed 's/^/| /' conftest.$ac_ext >&5
13016
13017 ac_cv_type_z_streamp=no
13018 fi
13019 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13020 fi
13021 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
13022 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
13023 if test $ac_cv_type_z_streamp = yes; then
13024   :
13025 else
13026   { { echo "$as_me:$LINENO: error: zlib version is too old
13027 Use --without-zlib to disable zlib support." >&5
13028 echo "$as_me: error: zlib version is too old
13029 Use --without-zlib to disable zlib support." >&2;}
13030    { (exit 1); exit 1; }; }
13031 fi
13032
13033 fi
13034
13035 if test "$with_krb5" = yes; then
13036 # Check for differences between MIT and Heimdal (KTH) releases
13037   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
13038 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
13039 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
13040   echo $ECHO_N "(cached) $ECHO_C" >&6
13041 else
13042   cat >conftest.$ac_ext <<_ACEOF
13043 /* confdefs.h.  */
13044 _ACEOF
13045 cat confdefs.h >>conftest.$ac_ext
13046 cat >>conftest.$ac_ext <<_ACEOF
13047 /* end confdefs.h.  */
13048 #include <krb5.h>
13049
13050 int
13051 main ()
13052 {
13053 static krb5_ticket ac_aggr;
13054 if (ac_aggr.enc_part2)
13055 return 0;
13056   ;
13057   return 0;
13058 }
13059 _ACEOF
13060 rm -f conftest.$ac_objext
13061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13062   (eval $ac_compile) 2>conftest.er1
13063   ac_status=$?
13064   grep -v '^ *+' conftest.er1 >conftest.err
13065   rm -f conftest.er1
13066   cat conftest.err >&5
13067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068   (exit $ac_status); } &&
13069          { ac_try='test -z "$ac_c_werror_flag"
13070                          || test ! -s conftest.err'
13071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13072   (eval $ac_try) 2>&5
13073   ac_status=$?
13074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13075   (exit $ac_status); }; } &&
13076          { ac_try='test -s conftest.$ac_objext'
13077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13078   (eval $ac_try) 2>&5
13079   ac_status=$?
13080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13081   (exit $ac_status); }; }; then
13082   ac_cv_member_krb5_ticket_enc_part2=yes
13083 else
13084   echo "$as_me: failed program was:" >&5
13085 sed 's/^/| /' conftest.$ac_ext >&5
13086
13087 cat >conftest.$ac_ext <<_ACEOF
13088 /* confdefs.h.  */
13089 _ACEOF
13090 cat confdefs.h >>conftest.$ac_ext
13091 cat >>conftest.$ac_ext <<_ACEOF
13092 /* end confdefs.h.  */
13093 #include <krb5.h>
13094
13095 int
13096 main ()
13097 {
13098 static krb5_ticket ac_aggr;
13099 if (sizeof ac_aggr.enc_part2)
13100 return 0;
13101   ;
13102   return 0;
13103 }
13104 _ACEOF
13105 rm -f conftest.$ac_objext
13106 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13107   (eval $ac_compile) 2>conftest.er1
13108   ac_status=$?
13109   grep -v '^ *+' conftest.er1 >conftest.err
13110   rm -f conftest.er1
13111   cat conftest.err >&5
13112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113   (exit $ac_status); } &&
13114          { ac_try='test -z "$ac_c_werror_flag"
13115                          || test ! -s conftest.err'
13116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13117   (eval $ac_try) 2>&5
13118   ac_status=$?
13119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13120   (exit $ac_status); }; } &&
13121          { ac_try='test -s conftest.$ac_objext'
13122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13123   (eval $ac_try) 2>&5
13124   ac_status=$?
13125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13126   (exit $ac_status); }; }; then
13127   ac_cv_member_krb5_ticket_enc_part2=yes
13128 else
13129   echo "$as_me: failed program was:" >&5
13130 sed 's/^/| /' conftest.$ac_ext >&5
13131
13132 ac_cv_member_krb5_ticket_enc_part2=no
13133 fi
13134 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13135 fi
13136 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13137 fi
13138 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
13139 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
13140 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
13141
13142 cat >>confdefs.h <<_ACEOF
13143 #define HAVE_KRB5_TICKET_ENC_PART2 1
13144 _ACEOF
13145
13146
13147 else
13148   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
13149 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
13150 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
13151   echo $ECHO_N "(cached) $ECHO_C" >&6
13152 else
13153   cat >conftest.$ac_ext <<_ACEOF
13154 /* confdefs.h.  */
13155 _ACEOF
13156 cat confdefs.h >>conftest.$ac_ext
13157 cat >>conftest.$ac_ext <<_ACEOF
13158 /* end confdefs.h.  */
13159 #include <krb5.h>
13160
13161 int
13162 main ()
13163 {
13164 static krb5_ticket ac_aggr;
13165 if (ac_aggr.client)
13166 return 0;
13167   ;
13168   return 0;
13169 }
13170 _ACEOF
13171 rm -f conftest.$ac_objext
13172 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13173   (eval $ac_compile) 2>conftest.er1
13174   ac_status=$?
13175   grep -v '^ *+' conftest.er1 >conftest.err
13176   rm -f conftest.er1
13177   cat conftest.err >&5
13178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13179   (exit $ac_status); } &&
13180          { ac_try='test -z "$ac_c_werror_flag"
13181                          || test ! -s conftest.err'
13182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13183   (eval $ac_try) 2>&5
13184   ac_status=$?
13185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13186   (exit $ac_status); }; } &&
13187          { ac_try='test -s conftest.$ac_objext'
13188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13189   (eval $ac_try) 2>&5
13190   ac_status=$?
13191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13192   (exit $ac_status); }; }; then
13193   ac_cv_member_krb5_ticket_client=yes
13194 else
13195   echo "$as_me: failed program was:" >&5
13196 sed 's/^/| /' conftest.$ac_ext >&5
13197
13198 cat >conftest.$ac_ext <<_ACEOF
13199 /* confdefs.h.  */
13200 _ACEOF
13201 cat confdefs.h >>conftest.$ac_ext
13202 cat >>conftest.$ac_ext <<_ACEOF
13203 /* end confdefs.h.  */
13204 #include <krb5.h>
13205
13206 int
13207 main ()
13208 {
13209 static krb5_ticket ac_aggr;
13210 if (sizeof ac_aggr.client)
13211 return 0;
13212   ;
13213   return 0;
13214 }
13215 _ACEOF
13216 rm -f conftest.$ac_objext
13217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13218   (eval $ac_compile) 2>conftest.er1
13219   ac_status=$?
13220   grep -v '^ *+' conftest.er1 >conftest.err
13221   rm -f conftest.er1
13222   cat conftest.err >&5
13223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13224   (exit $ac_status); } &&
13225          { ac_try='test -z "$ac_c_werror_flag"
13226                          || test ! -s conftest.err'
13227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13231   (exit $ac_status); }; } &&
13232          { ac_try='test -s conftest.$ac_objext'
13233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13234   (eval $ac_try) 2>&5
13235   ac_status=$?
13236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13237   (exit $ac_status); }; }; then
13238   ac_cv_member_krb5_ticket_client=yes
13239 else
13240   echo "$as_me: failed program was:" >&5
13241 sed 's/^/| /' conftest.$ac_ext >&5
13242
13243 ac_cv_member_krb5_ticket_client=no
13244 fi
13245 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13246 fi
13247 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13248 fi
13249 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13250 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13251 if test $ac_cv_member_krb5_ticket_client = yes; then
13252
13253 cat >>confdefs.h <<_ACEOF
13254 #define HAVE_KRB5_TICKET_CLIENT 1
13255 _ACEOF
13256
13257
13258 else
13259   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13260 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13261    { (exit 1); exit 1; }; }
13262 fi
13263
13264 fi
13265
13266   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13267 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13268 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13269   echo $ECHO_N "(cached) $ECHO_C" >&6
13270 else
13271   cat >conftest.$ac_ext <<_ACEOF
13272 /* confdefs.h.  */
13273 _ACEOF
13274 cat confdefs.h >>conftest.$ac_ext
13275 cat >>conftest.$ac_ext <<_ACEOF
13276 /* end confdefs.h.  */
13277 #include <krb5.h>
13278
13279 int
13280 main ()
13281 {
13282 static krb5_error ac_aggr;
13283 if (ac_aggr.text.data)
13284 return 0;
13285   ;
13286   return 0;
13287 }
13288 _ACEOF
13289 rm -f conftest.$ac_objext
13290 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13291   (eval $ac_compile) 2>conftest.er1
13292   ac_status=$?
13293   grep -v '^ *+' conftest.er1 >conftest.err
13294   rm -f conftest.er1
13295   cat conftest.err >&5
13296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13297   (exit $ac_status); } &&
13298          { ac_try='test -z "$ac_c_werror_flag"
13299                          || test ! -s conftest.err'
13300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13301   (eval $ac_try) 2>&5
13302   ac_status=$?
13303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13304   (exit $ac_status); }; } &&
13305          { ac_try='test -s conftest.$ac_objext'
13306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13307   (eval $ac_try) 2>&5
13308   ac_status=$?
13309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13310   (exit $ac_status); }; }; then
13311   ac_cv_member_krb5_error_text_data=yes
13312 else
13313   echo "$as_me: failed program was:" >&5
13314 sed 's/^/| /' conftest.$ac_ext >&5
13315
13316 cat >conftest.$ac_ext <<_ACEOF
13317 /* confdefs.h.  */
13318 _ACEOF
13319 cat confdefs.h >>conftest.$ac_ext
13320 cat >>conftest.$ac_ext <<_ACEOF
13321 /* end confdefs.h.  */
13322 #include <krb5.h>
13323
13324 int
13325 main ()
13326 {
13327 static krb5_error ac_aggr;
13328 if (sizeof ac_aggr.text.data)
13329 return 0;
13330   ;
13331   return 0;
13332 }
13333 _ACEOF
13334 rm -f conftest.$ac_objext
13335 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13336   (eval $ac_compile) 2>conftest.er1
13337   ac_status=$?
13338   grep -v '^ *+' conftest.er1 >conftest.err
13339   rm -f conftest.er1
13340   cat conftest.err >&5
13341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13342   (exit $ac_status); } &&
13343          { ac_try='test -z "$ac_c_werror_flag"
13344                          || test ! -s conftest.err'
13345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13346   (eval $ac_try) 2>&5
13347   ac_status=$?
13348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13349   (exit $ac_status); }; } &&
13350          { ac_try='test -s conftest.$ac_objext'
13351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13352   (eval $ac_try) 2>&5
13353   ac_status=$?
13354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13355   (exit $ac_status); }; }; then
13356   ac_cv_member_krb5_error_text_data=yes
13357 else
13358   echo "$as_me: failed program was:" >&5
13359 sed 's/^/| /' conftest.$ac_ext >&5
13360
13361 ac_cv_member_krb5_error_text_data=no
13362 fi
13363 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13364 fi
13365 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13366 fi
13367 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13368 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13369 if test $ac_cv_member_krb5_error_text_data = yes; then
13370
13371 cat >>confdefs.h <<_ACEOF
13372 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13373 _ACEOF
13374
13375
13376 else
13377   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13378 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13379 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13380   echo $ECHO_N "(cached) $ECHO_C" >&6
13381 else
13382   cat >conftest.$ac_ext <<_ACEOF
13383 /* confdefs.h.  */
13384 _ACEOF
13385 cat confdefs.h >>conftest.$ac_ext
13386 cat >>conftest.$ac_ext <<_ACEOF
13387 /* end confdefs.h.  */
13388 #include <krb5.h>
13389
13390 int
13391 main ()
13392 {
13393 static krb5_error ac_aggr;
13394 if (ac_aggr.e_data)
13395 return 0;
13396   ;
13397   return 0;
13398 }
13399 _ACEOF
13400 rm -f conftest.$ac_objext
13401 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13402   (eval $ac_compile) 2>conftest.er1
13403   ac_status=$?
13404   grep -v '^ *+' conftest.er1 >conftest.err
13405   rm -f conftest.er1
13406   cat conftest.err >&5
13407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13408   (exit $ac_status); } &&
13409          { ac_try='test -z "$ac_c_werror_flag"
13410                          || test ! -s conftest.err'
13411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13412   (eval $ac_try) 2>&5
13413   ac_status=$?
13414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13415   (exit $ac_status); }; } &&
13416          { ac_try='test -s conftest.$ac_objext'
13417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13418   (eval $ac_try) 2>&5
13419   ac_status=$?
13420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13421   (exit $ac_status); }; }; then
13422   ac_cv_member_krb5_error_e_data=yes
13423 else
13424   echo "$as_me: failed program was:" >&5
13425 sed 's/^/| /' conftest.$ac_ext >&5
13426
13427 cat >conftest.$ac_ext <<_ACEOF
13428 /* confdefs.h.  */
13429 _ACEOF
13430 cat confdefs.h >>conftest.$ac_ext
13431 cat >>conftest.$ac_ext <<_ACEOF
13432 /* end confdefs.h.  */
13433 #include <krb5.h>
13434
13435 int
13436 main ()
13437 {
13438 static krb5_error ac_aggr;
13439 if (sizeof ac_aggr.e_data)
13440 return 0;
13441   ;
13442   return 0;
13443 }
13444 _ACEOF
13445 rm -f conftest.$ac_objext
13446 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13447   (eval $ac_compile) 2>conftest.er1
13448   ac_status=$?
13449   grep -v '^ *+' conftest.er1 >conftest.err
13450   rm -f conftest.er1
13451   cat conftest.err >&5
13452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13453   (exit $ac_status); } &&
13454          { ac_try='test -z "$ac_c_werror_flag"
13455                          || test ! -s conftest.err'
13456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13457   (eval $ac_try) 2>&5
13458   ac_status=$?
13459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13460   (exit $ac_status); }; } &&
13461          { ac_try='test -s conftest.$ac_objext'
13462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13463   (eval $ac_try) 2>&5
13464   ac_status=$?
13465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13466   (exit $ac_status); }; }; then
13467   ac_cv_member_krb5_error_e_data=yes
13468 else
13469   echo "$as_me: failed program was:" >&5
13470 sed 's/^/| /' conftest.$ac_ext >&5
13471
13472 ac_cv_member_krb5_error_e_data=no
13473 fi
13474 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13475 fi
13476 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13477 fi
13478 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13479 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13480 if test $ac_cv_member_krb5_error_e_data = yes; then
13481
13482 cat >>confdefs.h <<_ACEOF
13483 #define HAVE_KRB5_ERROR_E_DATA 1
13484 _ACEOF
13485
13486
13487 else
13488   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13489 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13490    { (exit 1); exit 1; }; }
13491 fi
13492
13493 fi
13494
13495 fi
13496
13497 # This is probably only present on Darwin, but may as well check always
13498 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
13499 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
13500 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
13501   echo $ECHO_N "(cached) $ECHO_C" >&6
13502 else
13503   cat >conftest.$ac_ext <<_ACEOF
13504 /* confdefs.h.  */
13505 _ACEOF
13506 cat confdefs.h >>conftest.$ac_ext
13507 cat >>conftest.$ac_ext <<_ACEOF
13508 /* end confdefs.h.  */
13509 #include <fcntl.h>
13510
13511 int
13512 main ()
13513 {
13514 #ifndef F_FULLFSYNC
13515   char *p = (char *) F_FULLFSYNC;
13516 #endif
13517
13518   ;
13519   return 0;
13520 }
13521 _ACEOF
13522 rm -f conftest.$ac_objext
13523 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13524   (eval $ac_compile) 2>conftest.er1
13525   ac_status=$?
13526   grep -v '^ *+' conftest.er1 >conftest.err
13527   rm -f conftest.er1
13528   cat conftest.err >&5
13529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530   (exit $ac_status); } &&
13531          { ac_try='test -z "$ac_c_werror_flag"
13532                          || test ! -s conftest.err'
13533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13534   (eval $ac_try) 2>&5
13535   ac_status=$?
13536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13537   (exit $ac_status); }; } &&
13538          { ac_try='test -s conftest.$ac_objext'
13539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13540   (eval $ac_try) 2>&5
13541   ac_status=$?
13542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13543   (exit $ac_status); }; }; then
13544   ac_cv_have_decl_F_FULLFSYNC=yes
13545 else
13546   echo "$as_me: failed program was:" >&5
13547 sed 's/^/| /' conftest.$ac_ext >&5
13548
13549 ac_cv_have_decl_F_FULLFSYNC=no
13550 fi
13551 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13552 fi
13553 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
13554 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
13555 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
13556
13557 cat >>confdefs.h <<_ACEOF
13558 #define HAVE_DECL_F_FULLFSYNC 1
13559 _ACEOF
13560
13561
13562 else
13563   cat >>confdefs.h <<_ACEOF
13564 #define HAVE_DECL_F_FULLFSYNC 0
13565 _ACEOF
13566
13567
13568 fi
13569
13570
13571
13572 ##
13573 ## Functions, global variables
13574 ##
13575
13576 echo "$as_me:$LINENO: checking for int timezone" >&5
13577 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13578 if test "${pgac_cv_var_int_timezone+set}" = set; then
13579   echo $ECHO_N "(cached) $ECHO_C" >&6
13580 else
13581   cat >conftest.$ac_ext <<_ACEOF
13582 /* confdefs.h.  */
13583 _ACEOF
13584 cat confdefs.h >>conftest.$ac_ext
13585 cat >>conftest.$ac_ext <<_ACEOF
13586 /* end confdefs.h.  */
13587 #include <time.h>
13588 int res;
13589 int
13590 main ()
13591 {
13592 #ifndef __CYGWIN__
13593 res = timezone / 60;
13594 #else
13595 res = _timezone / 60;
13596 #endif
13597   ;
13598   return 0;
13599 }
13600 _ACEOF
13601 rm -f conftest.$ac_objext conftest$ac_exeext
13602 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13603   (eval $ac_link) 2>conftest.er1
13604   ac_status=$?
13605   grep -v '^ *+' conftest.er1 >conftest.err
13606   rm -f conftest.er1
13607   cat conftest.err >&5
13608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13609   (exit $ac_status); } &&
13610          { ac_try='test -z "$ac_c_werror_flag"
13611                          || test ! -s conftest.err'
13612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13613   (eval $ac_try) 2>&5
13614   ac_status=$?
13615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13616   (exit $ac_status); }; } &&
13617          { ac_try='test -s conftest$ac_exeext'
13618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13619   (eval $ac_try) 2>&5
13620   ac_status=$?
13621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13622   (exit $ac_status); }; }; then
13623   pgac_cv_var_int_timezone=yes
13624 else
13625   echo "$as_me: failed program was:" >&5
13626 sed 's/^/| /' conftest.$ac_ext >&5
13627
13628 pgac_cv_var_int_timezone=no
13629 fi
13630 rm -f conftest.err conftest.$ac_objext \
13631       conftest$ac_exeext conftest.$ac_ext
13632 fi
13633 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13634 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13635 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13636
13637 cat >>confdefs.h <<\_ACEOF
13638 #define HAVE_INT_TIMEZONE
13639 _ACEOF
13640
13641 fi
13642 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13643 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13644  if test "${ac_cv_func_accept_return+set}" = set; then
13645   echo $ECHO_N "(cached) $ECHO_C" >&6
13646 else
13647    if test "${ac_cv_func_accept_arg1+set}" = set; then
13648   echo $ECHO_N "(cached) $ECHO_C" >&6
13649 else
13650     if test "${ac_cv_func_accept_arg2+set}" = set; then
13651   echo $ECHO_N "(cached) $ECHO_C" >&6
13652 else
13653      if test "${ac_cv_func_accept_arg3+set}" = set; then
13654   echo $ECHO_N "(cached) $ECHO_C" >&6
13655 else
13656       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13657       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13658        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13659         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13660          cat >conftest.$ac_ext <<_ACEOF
13661 /* confdefs.h.  */
13662 _ACEOF
13663 cat confdefs.h >>conftest.$ac_ext
13664 cat >>conftest.$ac_ext <<_ACEOF
13665 /* end confdefs.h.  */
13666 #ifdef HAVE_SYS_TYPES_H
13667 #include <sys/types.h>
13668 #endif
13669 #ifdef HAVE_SYS_SOCKET_H
13670 #include <sys/socket.h>
13671 #endif
13672 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13673 int
13674 main ()
13675 {
13676
13677   ;
13678   return 0;
13679 }
13680 _ACEOF
13681 rm -f conftest.$ac_objext
13682 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13683   (eval $ac_compile) 2>conftest.er1
13684   ac_status=$?
13685   grep -v '^ *+' conftest.er1 >conftest.err
13686   rm -f conftest.er1
13687   cat conftest.err >&5
13688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13689   (exit $ac_status); } &&
13690          { ac_try='test -z "$ac_c_werror_flag"
13691                          || test ! -s conftest.err'
13692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13693   (eval $ac_try) 2>&5
13694   ac_status=$?
13695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13696   (exit $ac_status); }; } &&
13697          { ac_try='test -s conftest.$ac_objext'
13698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13699   (eval $ac_try) 2>&5
13700   ac_status=$?
13701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13702   (exit $ac_status); }; }; then
13703   ac_not_found=no; break 4
13704 else
13705   echo "$as_me: failed program was:" >&5
13706 sed 's/^/| /' conftest.$ac_ext >&5
13707
13708 ac_not_found=yes
13709 fi
13710 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13711        done
13712       done
13713      done
13714     done
13715     if test "$ac_not_found" = yes; then
13716       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13717 echo "$as_me: error: could not determine argument types" >&2;}
13718    { (exit 1); exit 1; }; }
13719     fi
13720     if test "$ac_cv_func_accept_arg3" = "void"; then
13721       ac_cv_func_accept_arg3=int
13722     fi
13723
13724 fi
13725
13726 fi
13727
13728 fi
13729
13730 fi
13731  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
13732 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13733
13734 cat >>confdefs.h <<_ACEOF
13735 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13736 _ACEOF
13737
13738
13739 cat >>confdefs.h <<_ACEOF
13740 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13741 _ACEOF
13742
13743
13744 cat >>confdefs.h <<_ACEOF
13745 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13746 _ACEOF
13747
13748
13749 cat >>confdefs.h <<_ACEOF
13750 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13751 _ACEOF
13752
13753
13754 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13755 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13756 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13757   echo $ECHO_N "(cached) $ECHO_C" >&6
13758 else
13759   cat >conftest.$ac_ext <<_ACEOF
13760 /* confdefs.h.  */
13761 _ACEOF
13762 cat confdefs.h >>conftest.$ac_ext
13763 cat >>conftest.$ac_ext <<_ACEOF
13764 /* end confdefs.h.  */
13765 #include <sys/time.h>
13766 int
13767 main ()
13768 {
13769 struct timeval *tp;
13770 struct timezone *tzp;
13771 gettimeofday(tp,tzp);
13772   ;
13773   return 0;
13774 }
13775 _ACEOF
13776 rm -f conftest.$ac_objext
13777 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13778   (eval $ac_compile) 2>conftest.er1
13779   ac_status=$?
13780   grep -v '^ *+' conftest.er1 >conftest.err
13781   rm -f conftest.er1
13782   cat conftest.err >&5
13783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784   (exit $ac_status); } &&
13785          { ac_try='test -z "$ac_c_werror_flag"
13786                          || test ! -s conftest.err'
13787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13788   (eval $ac_try) 2>&5
13789   ac_status=$?
13790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13791   (exit $ac_status); }; } &&
13792          { ac_try='test -s conftest.$ac_objext'
13793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13794   (eval $ac_try) 2>&5
13795   ac_status=$?
13796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13797   (exit $ac_status); }; }; then
13798   pgac_cv_func_gettimeofday_1arg=no
13799 else
13800   echo "$as_me: failed program was:" >&5
13801 sed 's/^/| /' conftest.$ac_ext >&5
13802
13803 pgac_cv_func_gettimeofday_1arg=yes
13804 fi
13805 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13806 fi
13807 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13808 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13809 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13810
13811 cat >>confdefs.h <<\_ACEOF
13812 #define GETTIMEOFDAY_1ARG
13813 _ACEOF
13814
13815 fi
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13839 do
13840 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13841 echo "$as_me:$LINENO: checking for $ac_func" >&5
13842 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13843 if eval "test \"\${$as_ac_var+set}\" = set"; then
13844   echo $ECHO_N "(cached) $ECHO_C" >&6
13845 else
13846   cat >conftest.$ac_ext <<_ACEOF
13847 /* confdefs.h.  */
13848 _ACEOF
13849 cat confdefs.h >>conftest.$ac_ext
13850 cat >>conftest.$ac_ext <<_ACEOF
13851 /* end confdefs.h.  */
13852 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13853    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13854 #define $ac_func innocuous_$ac_func
13855
13856 /* System header to define __stub macros and hopefully few prototypes,
13857     which can conflict with char $ac_func (); below.
13858     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13859     <limits.h> exists even on freestanding compilers.  */
13860
13861 #ifdef __STDC__
13862 # include <limits.h>
13863 #else
13864 # include <assert.h>
13865 #endif
13866
13867 #undef $ac_func
13868
13869 /* Override any gcc2 internal prototype to avoid an error.  */
13870 #ifdef __cplusplus
13871 extern "C"
13872 {
13873 #endif
13874 /* We use char because int might match the return type of a gcc2
13875    builtin and then its argument prototype would still apply.  */
13876 char $ac_func ();
13877 /* The GNU C library defines this for functions which it implements
13878     to always fail with ENOSYS.  Some functions are actually named
13879     something starting with __ and the normal name is an alias.  */
13880 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13881 choke me
13882 #else
13883 char (*f) () = $ac_func;
13884 #endif
13885 #ifdef __cplusplus
13886 }
13887 #endif
13888
13889 int
13890 main ()
13891 {
13892 return f != $ac_func;
13893   ;
13894   return 0;
13895 }
13896 _ACEOF
13897 rm -f conftest.$ac_objext conftest$ac_exeext
13898 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13899   (eval $ac_link) 2>conftest.er1
13900   ac_status=$?
13901   grep -v '^ *+' conftest.er1 >conftest.err
13902   rm -f conftest.er1
13903   cat conftest.err >&5
13904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13905   (exit $ac_status); } &&
13906          { ac_try='test -z "$ac_c_werror_flag"
13907                          || test ! -s conftest.err'
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); }; } &&
13913          { ac_try='test -s conftest$ac_exeext'
13914   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13915   (eval $ac_try) 2>&5
13916   ac_status=$?
13917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13918   (exit $ac_status); }; }; then
13919   eval "$as_ac_var=yes"
13920 else
13921   echo "$as_me: failed program was:" >&5
13922 sed 's/^/| /' conftest.$ac_ext >&5
13923
13924 eval "$as_ac_var=no"
13925 fi
13926 rm -f conftest.err conftest.$ac_objext \
13927       conftest$ac_exeext conftest.$ac_ext
13928 fi
13929 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13930 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13931 if test `eval echo '${'$as_ac_var'}'` = yes; then
13932   cat >>confdefs.h <<_ACEOF
13933 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13934 _ACEOF
13935
13936 fi
13937 done
13938
13939
13940 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13941 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13942 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13943   echo $ECHO_N "(cached) $ECHO_C" >&6
13944 else
13945   cat >conftest.$ac_ext <<_ACEOF
13946 /* confdefs.h.  */
13947 _ACEOF
13948 cat confdefs.h >>conftest.$ac_ext
13949 cat >>conftest.$ac_ext <<_ACEOF
13950 /* end confdefs.h.  */
13951 #include <unistd.h>
13952
13953 int
13954 main ()
13955 {
13956 #ifndef fdatasync
13957   char *p = (char *) fdatasync;
13958 #endif
13959
13960   ;
13961   return 0;
13962 }
13963 _ACEOF
13964 rm -f conftest.$ac_objext
13965 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13966   (eval $ac_compile) 2>conftest.er1
13967   ac_status=$?
13968   grep -v '^ *+' conftest.er1 >conftest.err
13969   rm -f conftest.er1
13970   cat conftest.err >&5
13971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13972   (exit $ac_status); } &&
13973          { ac_try='test -z "$ac_c_werror_flag"
13974                          || test ! -s conftest.err'
13975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13976   (eval $ac_try) 2>&5
13977   ac_status=$?
13978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13979   (exit $ac_status); }; } &&
13980          { ac_try='test -s conftest.$ac_objext'
13981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13982   (eval $ac_try) 2>&5
13983   ac_status=$?
13984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13985   (exit $ac_status); }; }; then
13986   ac_cv_have_decl_fdatasync=yes
13987 else
13988   echo "$as_me: failed program was:" >&5
13989 sed 's/^/| /' conftest.$ac_ext >&5
13990
13991 ac_cv_have_decl_fdatasync=no
13992 fi
13993 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13994 fi
13995 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13996 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13997 if test $ac_cv_have_decl_fdatasync = yes; then
13998
13999 cat >>confdefs.h <<_ACEOF
14000 #define HAVE_DECL_FDATASYNC 1
14001 _ACEOF
14002
14003
14004 else
14005   cat >>confdefs.h <<_ACEOF
14006 #define HAVE_DECL_FDATASYNC 0
14007 _ACEOF
14008
14009
14010 fi
14011
14012
14013
14014 HAVE_IPV6=no
14015 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
14016 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
14017 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
14018   echo $ECHO_N "(cached) $ECHO_C" >&6
14019 else
14020   cat >conftest.$ac_ext <<_ACEOF
14021 /* confdefs.h.  */
14022 _ACEOF
14023 cat confdefs.h >>conftest.$ac_ext
14024 cat >>conftest.$ac_ext <<_ACEOF
14025 /* end confdefs.h.  */
14026 $ac_includes_default
14027 #include <netinet/in.h>
14028
14029 int
14030 main ()
14031 {
14032 if ((struct sockaddr_in6 *) 0)
14033   return 0;
14034 if (sizeof (struct sockaddr_in6))
14035   return 0;
14036   ;
14037   return 0;
14038 }
14039 _ACEOF
14040 rm -f conftest.$ac_objext
14041 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14042   (eval $ac_compile) 2>conftest.er1
14043   ac_status=$?
14044   grep -v '^ *+' conftest.er1 >conftest.err
14045   rm -f conftest.er1
14046   cat conftest.err >&5
14047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14048   (exit $ac_status); } &&
14049          { ac_try='test -z "$ac_c_werror_flag"
14050                          || test ! -s conftest.err'
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); }; } &&
14056          { ac_try='test -s conftest.$ac_objext'
14057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14058   (eval $ac_try) 2>&5
14059   ac_status=$?
14060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14061   (exit $ac_status); }; }; then
14062   ac_cv_type_struct_sockaddr_in6=yes
14063 else
14064   echo "$as_me: failed program was:" >&5
14065 sed 's/^/| /' conftest.$ac_ext >&5
14066
14067 ac_cv_type_struct_sockaddr_in6=no
14068 fi
14069 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14070 fi
14071 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
14072 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
14073 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
14074
14075 cat >>confdefs.h <<\_ACEOF
14076 #define HAVE_IPV6 1
14077 _ACEOF
14078
14079          HAVE_IPV6=yes
14080 fi
14081
14082
14083
14084 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
14085 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
14086 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
14087   echo $ECHO_N "(cached) $ECHO_C" >&6
14088 else
14089   cat >conftest.$ac_ext <<_ACEOF
14090 /* confdefs.h.  */
14091 _ACEOF
14092 cat confdefs.h >>conftest.$ac_ext
14093 cat >>conftest.$ac_ext <<_ACEOF
14094 /* end confdefs.h.  */
14095 #include <machine/vmparam.h>
14096 #include <sys/exec.h>
14097
14098 int
14099 main ()
14100 {
14101 PS_STRINGS->ps_nargvstr = 1;
14102 PS_STRINGS->ps_argvstr = "foo";
14103   ;
14104   return 0;
14105 }
14106 _ACEOF
14107 rm -f conftest.$ac_objext conftest$ac_exeext
14108 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14109   (eval $ac_link) 2>conftest.er1
14110   ac_status=$?
14111   grep -v '^ *+' conftest.er1 >conftest.err
14112   rm -f conftest.er1
14113   cat conftest.err >&5
14114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14115   (exit $ac_status); } &&
14116          { ac_try='test -z "$ac_c_werror_flag"
14117                          || test ! -s conftest.err'
14118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14119   (eval $ac_try) 2>&5
14120   ac_status=$?
14121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14122   (exit $ac_status); }; } &&
14123          { ac_try='test -s conftest$ac_exeext'
14124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14125   (eval $ac_try) 2>&5
14126   ac_status=$?
14127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14128   (exit $ac_status); }; }; then
14129   pgac_cv_var_PS_STRINGS=yes
14130 else
14131   echo "$as_me: failed program was:" >&5
14132 sed 's/^/| /' conftest.$ac_ext >&5
14133
14134 pgac_cv_var_PS_STRINGS=no
14135 fi
14136 rm -f conftest.err conftest.$ac_objext \
14137       conftest$ac_exeext conftest.$ac_ext
14138 fi
14139 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
14140 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
14141 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
14142
14143 cat >>confdefs.h <<\_ACEOF
14144 #define HAVE_PS_STRINGS
14145 _ACEOF
14146
14147 fi
14148
14149
14150 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
14151 # is missing.  Yes, there are machines that have only one.  We may
14152 # also decide to use snprintf.c if snprintf() is present but does not
14153 # have all the features we need --- see below.
14154
14155 if test "$PORTNAME" = "win32"; then
14156   # Win32 gets snprintf.c built unconditionally.
14157   #
14158   # To properly translate all NLS languages strings, we must support the
14159   # *printf() %$ format, which allows *printf() arguments to be selected
14160   # by position in the translated string.
14161   #
14162   # libintl versions < 0.13 use the native *printf() functions, and Win32
14163   # *printf() doesn't understand %$, so we must use our /port versions,
14164   # which do understand %$. libintl versions >= 0.13 include their own
14165   # *printf versions on Win32.  The libintl 0.13 release note text is:
14166   #
14167   #   C format strings with positions, as they arise when a translator
14168   #   needs to reorder a sentence, are now supported on all platforms.
14169   #   On those few platforms (NetBSD and Woe32) for which the native
14170   #   printf()/fprintf()/... functions don't support such format
14171   #   strings, replacements are provided through <libintl.h>.
14172   #
14173   # We could use libintl >= 0.13's *printf() if we were sure that we had
14174   # a litint >= 0.13 at runtime, but seeing that there is no clean way
14175   # to guarantee that, it is best to just use our own, so we are sure to
14176   # get %$ support. In include/port.h we disable the *printf() macros
14177   # that might have been defined by libintl.
14178   #
14179   # We do this unconditionally whether NLS is used or not so we are sure
14180   # that all Win32 libraries and binaries behave the same.
14181   pgac_need_repl_snprintf=yes
14182 else
14183   pgac_need_repl_snprintf=no
14184
14185 for ac_func in snprintf
14186 do
14187 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14188 echo "$as_me:$LINENO: checking for $ac_func" >&5
14189 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14190 if eval "test \"\${$as_ac_var+set}\" = set"; then
14191   echo $ECHO_N "(cached) $ECHO_C" >&6
14192 else
14193   cat >conftest.$ac_ext <<_ACEOF
14194 /* confdefs.h.  */
14195 _ACEOF
14196 cat confdefs.h >>conftest.$ac_ext
14197 cat >>conftest.$ac_ext <<_ACEOF
14198 /* end confdefs.h.  */
14199 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14200    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14201 #define $ac_func innocuous_$ac_func
14202
14203 /* System header to define __stub macros and hopefully few prototypes,
14204     which can conflict with char $ac_func (); below.
14205     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14206     <limits.h> exists even on freestanding compilers.  */
14207
14208 #ifdef __STDC__
14209 # include <limits.h>
14210 #else
14211 # include <assert.h>
14212 #endif
14213
14214 #undef $ac_func
14215
14216 /* Override any gcc2 internal prototype to avoid an error.  */
14217 #ifdef __cplusplus
14218 extern "C"
14219 {
14220 #endif
14221 /* We use char because int might match the return type of a gcc2
14222    builtin and then its argument prototype would still apply.  */
14223 char $ac_func ();
14224 /* The GNU C library defines this for functions which it implements
14225     to always fail with ENOSYS.  Some functions are actually named
14226     something starting with __ and the normal name is an alias.  */
14227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14228 choke me
14229 #else
14230 char (*f) () = $ac_func;
14231 #endif
14232 #ifdef __cplusplus
14233 }
14234 #endif
14235
14236 int
14237 main ()
14238 {
14239 return f != $ac_func;
14240   ;
14241   return 0;
14242 }
14243 _ACEOF
14244 rm -f conftest.$ac_objext conftest$ac_exeext
14245 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14246   (eval $ac_link) 2>conftest.er1
14247   ac_status=$?
14248   grep -v '^ *+' conftest.er1 >conftest.err
14249   rm -f conftest.er1
14250   cat conftest.err >&5
14251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14252   (exit $ac_status); } &&
14253          { ac_try='test -z "$ac_c_werror_flag"
14254                          || test ! -s conftest.err'
14255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14256   (eval $ac_try) 2>&5
14257   ac_status=$?
14258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14259   (exit $ac_status); }; } &&
14260          { ac_try='test -s conftest$ac_exeext'
14261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14262   (eval $ac_try) 2>&5
14263   ac_status=$?
14264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14265   (exit $ac_status); }; }; then
14266   eval "$as_ac_var=yes"
14267 else
14268   echo "$as_me: failed program was:" >&5
14269 sed 's/^/| /' conftest.$ac_ext >&5
14270
14271 eval "$as_ac_var=no"
14272 fi
14273 rm -f conftest.err conftest.$ac_objext \
14274       conftest$ac_exeext conftest.$ac_ext
14275 fi
14276 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14277 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14278 if test `eval echo '${'$as_ac_var'}'` = yes; then
14279   cat >>confdefs.h <<_ACEOF
14280 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14281 _ACEOF
14282
14283 else
14284   pgac_need_repl_snprintf=yes
14285 fi
14286 done
14287
14288
14289 for ac_func in vsnprintf
14290 do
14291 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14292 echo "$as_me:$LINENO: checking for $ac_func" >&5
14293 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14294 if eval "test \"\${$as_ac_var+set}\" = set"; then
14295   echo $ECHO_N "(cached) $ECHO_C" >&6
14296 else
14297   cat >conftest.$ac_ext <<_ACEOF
14298 /* confdefs.h.  */
14299 _ACEOF
14300 cat confdefs.h >>conftest.$ac_ext
14301 cat >>conftest.$ac_ext <<_ACEOF
14302 /* end confdefs.h.  */
14303 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14304    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14305 #define $ac_func innocuous_$ac_func
14306
14307 /* System header to define __stub macros and hopefully few prototypes,
14308     which can conflict with char $ac_func (); below.
14309     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14310     <limits.h> exists even on freestanding compilers.  */
14311
14312 #ifdef __STDC__
14313 # include <limits.h>
14314 #else
14315 # include <assert.h>
14316 #endif
14317
14318 #undef $ac_func
14319
14320 /* Override any gcc2 internal prototype to avoid an error.  */
14321 #ifdef __cplusplus
14322 extern "C"
14323 {
14324 #endif
14325 /* We use char because int might match the return type of a gcc2
14326    builtin and then its argument prototype would still apply.  */
14327 char $ac_func ();
14328 /* The GNU C library defines this for functions which it implements
14329     to always fail with ENOSYS.  Some functions are actually named
14330     something starting with __ and the normal name is an alias.  */
14331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14332 choke me
14333 #else
14334 char (*f) () = $ac_func;
14335 #endif
14336 #ifdef __cplusplus
14337 }
14338 #endif
14339
14340 int
14341 main ()
14342 {
14343 return f != $ac_func;
14344   ;
14345   return 0;
14346 }
14347 _ACEOF
14348 rm -f conftest.$ac_objext conftest$ac_exeext
14349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14350   (eval $ac_link) 2>conftest.er1
14351   ac_status=$?
14352   grep -v '^ *+' conftest.er1 >conftest.err
14353   rm -f conftest.er1
14354   cat conftest.err >&5
14355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14356   (exit $ac_status); } &&
14357          { ac_try='test -z "$ac_c_werror_flag"
14358                          || test ! -s conftest.err'
14359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14360   (eval $ac_try) 2>&5
14361   ac_status=$?
14362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363   (exit $ac_status); }; } &&
14364          { ac_try='test -s conftest$ac_exeext'
14365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14366   (eval $ac_try) 2>&5
14367   ac_status=$?
14368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14369   (exit $ac_status); }; }; then
14370   eval "$as_ac_var=yes"
14371 else
14372   echo "$as_me: failed program was:" >&5
14373 sed 's/^/| /' conftest.$ac_ext >&5
14374
14375 eval "$as_ac_var=no"
14376 fi
14377 rm -f conftest.err conftest.$ac_objext \
14378       conftest$ac_exeext conftest.$ac_ext
14379 fi
14380 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14381 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14382 if test `eval echo '${'$as_ac_var'}'` = yes; then
14383   cat >>confdefs.h <<_ACEOF
14384 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14385 _ACEOF
14386
14387 else
14388   pgac_need_repl_snprintf=yes
14389 fi
14390 done
14391
14392 fi
14393
14394
14395 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14396 # include/c.h will provide declarations.  Note this is a separate test
14397 # from whether the functions exist in the C library --- there are
14398 # systems that have the functions but don't bother to declare them :-(
14399
14400 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14401 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14402 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14403   echo $ECHO_N "(cached) $ECHO_C" >&6
14404 else
14405   cat >conftest.$ac_ext <<_ACEOF
14406 /* confdefs.h.  */
14407 _ACEOF
14408 cat confdefs.h >>conftest.$ac_ext
14409 cat >>conftest.$ac_ext <<_ACEOF
14410 /* end confdefs.h.  */
14411 $ac_includes_default
14412 int
14413 main ()
14414 {
14415 #ifndef snprintf
14416   char *p = (char *) snprintf;
14417 #endif
14418
14419   ;
14420   return 0;
14421 }
14422 _ACEOF
14423 rm -f conftest.$ac_objext
14424 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14425   (eval $ac_compile) 2>conftest.er1
14426   ac_status=$?
14427   grep -v '^ *+' conftest.er1 >conftest.err
14428   rm -f conftest.er1
14429   cat conftest.err >&5
14430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14431   (exit $ac_status); } &&
14432          { ac_try='test -z "$ac_c_werror_flag"
14433                          || test ! -s conftest.err'
14434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14435   (eval $ac_try) 2>&5
14436   ac_status=$?
14437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14438   (exit $ac_status); }; } &&
14439          { ac_try='test -s conftest.$ac_objext'
14440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14441   (eval $ac_try) 2>&5
14442   ac_status=$?
14443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14444   (exit $ac_status); }; }; then
14445   ac_cv_have_decl_snprintf=yes
14446 else
14447   echo "$as_me: failed program was:" >&5
14448 sed 's/^/| /' conftest.$ac_ext >&5
14449
14450 ac_cv_have_decl_snprintf=no
14451 fi
14452 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14453 fi
14454 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14455 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14456 if test $ac_cv_have_decl_snprintf = yes; then
14457
14458 cat >>confdefs.h <<_ACEOF
14459 #define HAVE_DECL_SNPRINTF 1
14460 _ACEOF
14461
14462
14463 else
14464   cat >>confdefs.h <<_ACEOF
14465 #define HAVE_DECL_SNPRINTF 0
14466 _ACEOF
14467
14468
14469 fi
14470 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14471 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14472 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14473   echo $ECHO_N "(cached) $ECHO_C" >&6
14474 else
14475   cat >conftest.$ac_ext <<_ACEOF
14476 /* confdefs.h.  */
14477 _ACEOF
14478 cat confdefs.h >>conftest.$ac_ext
14479 cat >>conftest.$ac_ext <<_ACEOF
14480 /* end confdefs.h.  */
14481 $ac_includes_default
14482 int
14483 main ()
14484 {
14485 #ifndef vsnprintf
14486   char *p = (char *) vsnprintf;
14487 #endif
14488
14489   ;
14490   return 0;
14491 }
14492 _ACEOF
14493 rm -f conftest.$ac_objext
14494 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14495   (eval $ac_compile) 2>conftest.er1
14496   ac_status=$?
14497   grep -v '^ *+' conftest.er1 >conftest.err
14498   rm -f conftest.er1
14499   cat conftest.err >&5
14500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14501   (exit $ac_status); } &&
14502          { ac_try='test -z "$ac_c_werror_flag"
14503                          || test ! -s conftest.err'
14504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14505   (eval $ac_try) 2>&5
14506   ac_status=$?
14507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14508   (exit $ac_status); }; } &&
14509          { ac_try='test -s conftest.$ac_objext'
14510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14511   (eval $ac_try) 2>&5
14512   ac_status=$?
14513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14514   (exit $ac_status); }; }; then
14515   ac_cv_have_decl_vsnprintf=yes
14516 else
14517   echo "$as_me: failed program was:" >&5
14518 sed 's/^/| /' conftest.$ac_ext >&5
14519
14520 ac_cv_have_decl_vsnprintf=no
14521 fi
14522 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14523 fi
14524 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14525 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14526 if test $ac_cv_have_decl_vsnprintf = yes; then
14527
14528 cat >>confdefs.h <<_ACEOF
14529 #define HAVE_DECL_VSNPRINTF 1
14530 _ACEOF
14531
14532
14533 else
14534   cat >>confdefs.h <<_ACEOF
14535 #define HAVE_DECL_VSNPRINTF 0
14536 _ACEOF
14537
14538
14539 fi
14540
14541
14542
14543
14544 echo "$as_me:$LINENO: checking for isinf" >&5
14545 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14546 if test "${ac_cv_func_isinf+set}" = set; then
14547   echo $ECHO_N "(cached) $ECHO_C" >&6
14548 else
14549   cat >conftest.$ac_ext <<_ACEOF
14550 /* confdefs.h.  */
14551 _ACEOF
14552 cat confdefs.h >>conftest.$ac_ext
14553 cat >>conftest.$ac_ext <<_ACEOF
14554 /* end confdefs.h.  */
14555
14556 #include <math.h>
14557 double glob_double;
14558
14559 int
14560 main ()
14561 {
14562 return isinf(glob_double) ? 0 : 1;
14563   ;
14564   return 0;
14565 }
14566 _ACEOF
14567 rm -f conftest.$ac_objext conftest$ac_exeext
14568 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14569   (eval $ac_link) 2>conftest.er1
14570   ac_status=$?
14571   grep -v '^ *+' conftest.er1 >conftest.err
14572   rm -f conftest.er1
14573   cat conftest.err >&5
14574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14575   (exit $ac_status); } &&
14576          { ac_try='test -z "$ac_c_werror_flag"
14577                          || test ! -s conftest.err'
14578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14579   (eval $ac_try) 2>&5
14580   ac_status=$?
14581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582   (exit $ac_status); }; } &&
14583          { ac_try='test -s conftest$ac_exeext'
14584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14585   (eval $ac_try) 2>&5
14586   ac_status=$?
14587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14588   (exit $ac_status); }; }; then
14589   ac_cv_func_isinf=yes
14590 else
14591   echo "$as_me: failed program was:" >&5
14592 sed 's/^/| /' conftest.$ac_ext >&5
14593
14594 ac_cv_func_isinf=no
14595 fi
14596 rm -f conftest.err conftest.$ac_objext \
14597       conftest$ac_exeext conftest.$ac_ext
14598 fi
14599 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14600 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14601
14602 if test $ac_cv_func_isinf = yes ; then
14603
14604 cat >>confdefs.h <<\_ACEOF
14605 #define HAVE_ISINF 1
14606 _ACEOF
14607
14608 else
14609   case $LIBOBJS in
14610     "isinf.$ac_objext"   | \
14611   *" isinf.$ac_objext"   | \
14612     "isinf.$ac_objext "* | \
14613   *" isinf.$ac_objext "* ) ;;
14614   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14615 esac
14616
14617   # Look for a way to implement a substitute for isinf()
14618
14619
14620
14621
14622 for ac_func in fpclass fp_class fp_class_d class
14623 do
14624 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14625 echo "$as_me:$LINENO: checking for $ac_func" >&5
14626 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14627 if eval "test \"\${$as_ac_var+set}\" = set"; then
14628   echo $ECHO_N "(cached) $ECHO_C" >&6
14629 else
14630   cat >conftest.$ac_ext <<_ACEOF
14631 /* confdefs.h.  */
14632 _ACEOF
14633 cat confdefs.h >>conftest.$ac_ext
14634 cat >>conftest.$ac_ext <<_ACEOF
14635 /* end confdefs.h.  */
14636 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14637    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14638 #define $ac_func innocuous_$ac_func
14639
14640 /* System header to define __stub macros and hopefully few prototypes,
14641     which can conflict with char $ac_func (); below.
14642     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14643     <limits.h> exists even on freestanding compilers.  */
14644
14645 #ifdef __STDC__
14646 # include <limits.h>
14647 #else
14648 # include <assert.h>
14649 #endif
14650
14651 #undef $ac_func
14652
14653 /* Override any gcc2 internal prototype to avoid an error.  */
14654 #ifdef __cplusplus
14655 extern "C"
14656 {
14657 #endif
14658 /* We use char because int might match the return type of a gcc2
14659    builtin and then its argument prototype would still apply.  */
14660 char $ac_func ();
14661 /* The GNU C library defines this for functions which it implements
14662     to always fail with ENOSYS.  Some functions are actually named
14663     something starting with __ and the normal name is an alias.  */
14664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14665 choke me
14666 #else
14667 char (*f) () = $ac_func;
14668 #endif
14669 #ifdef __cplusplus
14670 }
14671 #endif
14672
14673 int
14674 main ()
14675 {
14676 return f != $ac_func;
14677   ;
14678   return 0;
14679 }
14680 _ACEOF
14681 rm -f conftest.$ac_objext conftest$ac_exeext
14682 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14683   (eval $ac_link) 2>conftest.er1
14684   ac_status=$?
14685   grep -v '^ *+' conftest.er1 >conftest.err
14686   rm -f conftest.er1
14687   cat conftest.err >&5
14688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14689   (exit $ac_status); } &&
14690          { ac_try='test -z "$ac_c_werror_flag"
14691                          || test ! -s conftest.err'
14692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14693   (eval $ac_try) 2>&5
14694   ac_status=$?
14695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14696   (exit $ac_status); }; } &&
14697          { ac_try='test -s conftest$ac_exeext'
14698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14699   (eval $ac_try) 2>&5
14700   ac_status=$?
14701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14702   (exit $ac_status); }; }; then
14703   eval "$as_ac_var=yes"
14704 else
14705   echo "$as_me: failed program was:" >&5
14706 sed 's/^/| /' conftest.$ac_ext >&5
14707
14708 eval "$as_ac_var=no"
14709 fi
14710 rm -f conftest.err conftest.$ac_objext \
14711       conftest$ac_exeext conftest.$ac_ext
14712 fi
14713 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14714 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14715 if test `eval echo '${'$as_ac_var'}'` = yes; then
14716   cat >>confdefs.h <<_ACEOF
14717 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14718 _ACEOF
14719  break
14720 fi
14721 done
14722
14723 fi
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14739 do
14740 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14741 echo "$as_me:$LINENO: checking for $ac_func" >&5
14742 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14743 if eval "test \"\${$as_ac_var+set}\" = set"; then
14744   echo $ECHO_N "(cached) $ECHO_C" >&6
14745 else
14746   cat >conftest.$ac_ext <<_ACEOF
14747 /* confdefs.h.  */
14748 _ACEOF
14749 cat confdefs.h >>conftest.$ac_ext
14750 cat >>conftest.$ac_ext <<_ACEOF
14751 /* end confdefs.h.  */
14752 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14753    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14754 #define $ac_func innocuous_$ac_func
14755
14756 /* System header to define __stub macros and hopefully few prototypes,
14757     which can conflict with char $ac_func (); below.
14758     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14759     <limits.h> exists even on freestanding compilers.  */
14760
14761 #ifdef __STDC__
14762 # include <limits.h>
14763 #else
14764 # include <assert.h>
14765 #endif
14766
14767 #undef $ac_func
14768
14769 /* Override any gcc2 internal prototype to avoid an error.  */
14770 #ifdef __cplusplus
14771 extern "C"
14772 {
14773 #endif
14774 /* We use char because int might match the return type of a gcc2
14775    builtin and then its argument prototype would still apply.  */
14776 char $ac_func ();
14777 /* The GNU C library defines this for functions which it implements
14778     to always fail with ENOSYS.  Some functions are actually named
14779     something starting with __ and the normal name is an alias.  */
14780 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14781 choke me
14782 #else
14783 char (*f) () = $ac_func;
14784 #endif
14785 #ifdef __cplusplus
14786 }
14787 #endif
14788
14789 int
14790 main ()
14791 {
14792 return f != $ac_func;
14793   ;
14794   return 0;
14795 }
14796 _ACEOF
14797 rm -f conftest.$ac_objext conftest$ac_exeext
14798 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14799   (eval $ac_link) 2>conftest.er1
14800   ac_status=$?
14801   grep -v '^ *+' conftest.er1 >conftest.err
14802   rm -f conftest.er1
14803   cat conftest.err >&5
14804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14805   (exit $ac_status); } &&
14806          { ac_try='test -z "$ac_c_werror_flag"
14807                          || test ! -s conftest.err'
14808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14809   (eval $ac_try) 2>&5
14810   ac_status=$?
14811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14812   (exit $ac_status); }; } &&
14813          { ac_try='test -s conftest$ac_exeext'
14814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14815   (eval $ac_try) 2>&5
14816   ac_status=$?
14817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14818   (exit $ac_status); }; }; then
14819   eval "$as_ac_var=yes"
14820 else
14821   echo "$as_me: failed program was:" >&5
14822 sed 's/^/| /' conftest.$ac_ext >&5
14823
14824 eval "$as_ac_var=no"
14825 fi
14826 rm -f conftest.err conftest.$ac_objext \
14827       conftest$ac_exeext conftest.$ac_ext
14828 fi
14829 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14830 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14831 if test `eval echo '${'$as_ac_var'}'` = yes; then
14832   cat >>confdefs.h <<_ACEOF
14833 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14834 _ACEOF
14835
14836 else
14837   case $LIBOBJS in
14838     "$ac_func.$ac_objext"   | \
14839   *" $ac_func.$ac_objext"   | \
14840     "$ac_func.$ac_objext "* | \
14841   *" $ac_func.$ac_objext "* ) ;;
14842   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14843 esac
14844
14845 fi
14846 done
14847
14848
14849
14850 # System's version of getaddrinfo(), if any, may be used only if we found
14851 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14852 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14853 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14854 # because we want to use our own getaddrinfo.c on Windows anyway.)
14855 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14856
14857 for ac_func in getaddrinfo
14858 do
14859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14860 echo "$as_me:$LINENO: checking for $ac_func" >&5
14861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14862 if eval "test \"\${$as_ac_var+set}\" = set"; then
14863   echo $ECHO_N "(cached) $ECHO_C" >&6
14864 else
14865   cat >conftest.$ac_ext <<_ACEOF
14866 /* confdefs.h.  */
14867 _ACEOF
14868 cat confdefs.h >>conftest.$ac_ext
14869 cat >>conftest.$ac_ext <<_ACEOF
14870 /* end confdefs.h.  */
14871 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14872    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14873 #define $ac_func innocuous_$ac_func
14874
14875 /* System header to define __stub macros and hopefully few prototypes,
14876     which can conflict with char $ac_func (); below.
14877     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14878     <limits.h> exists even on freestanding compilers.  */
14879
14880 #ifdef __STDC__
14881 # include <limits.h>
14882 #else
14883 # include <assert.h>
14884 #endif
14885
14886 #undef $ac_func
14887
14888 /* Override any gcc2 internal prototype to avoid an error.  */
14889 #ifdef __cplusplus
14890 extern "C"
14891 {
14892 #endif
14893 /* We use char because int might match the return type of a gcc2
14894    builtin and then its argument prototype would still apply.  */
14895 char $ac_func ();
14896 /* The GNU C library defines this for functions which it implements
14897     to always fail with ENOSYS.  Some functions are actually named
14898     something starting with __ and the normal name is an alias.  */
14899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14900 choke me
14901 #else
14902 char (*f) () = $ac_func;
14903 #endif
14904 #ifdef __cplusplus
14905 }
14906 #endif
14907
14908 int
14909 main ()
14910 {
14911 return f != $ac_func;
14912   ;
14913   return 0;
14914 }
14915 _ACEOF
14916 rm -f conftest.$ac_objext conftest$ac_exeext
14917 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14918   (eval $ac_link) 2>conftest.er1
14919   ac_status=$?
14920   grep -v '^ *+' conftest.er1 >conftest.err
14921   rm -f conftest.er1
14922   cat conftest.err >&5
14923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14924   (exit $ac_status); } &&
14925          { ac_try='test -z "$ac_c_werror_flag"
14926                          || test ! -s conftest.err'
14927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14928   (eval $ac_try) 2>&5
14929   ac_status=$?
14930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14931   (exit $ac_status); }; } &&
14932          { ac_try='test -s conftest$ac_exeext'
14933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14934   (eval $ac_try) 2>&5
14935   ac_status=$?
14936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14937   (exit $ac_status); }; }; then
14938   eval "$as_ac_var=yes"
14939 else
14940   echo "$as_me: failed program was:" >&5
14941 sed 's/^/| /' conftest.$ac_ext >&5
14942
14943 eval "$as_ac_var=no"
14944 fi
14945 rm -f conftest.err conftest.$ac_objext \
14946       conftest$ac_exeext conftest.$ac_ext
14947 fi
14948 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14949 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14950 if test `eval echo '${'$as_ac_var'}'` = yes; then
14951   cat >>confdefs.h <<_ACEOF
14952 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14953 _ACEOF
14954
14955 else
14956   case $LIBOBJS in
14957     "$ac_func.$ac_objext"   | \
14958   *" $ac_func.$ac_objext"   | \
14959     "$ac_func.$ac_objext "* | \
14960   *" $ac_func.$ac_objext "* ) ;;
14961   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14962 esac
14963
14964 fi
14965 done
14966
14967
14968 else
14969   case $LIBOBJS in
14970     "getaddrinfo.$ac_objext"   | \
14971   *" getaddrinfo.$ac_objext"   | \
14972     "getaddrinfo.$ac_objext "* | \
14973   *" getaddrinfo.$ac_objext "* ) ;;
14974   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14975 esac
14976
14977 fi
14978
14979 # similarly, use system's getopt_long() only if system provides struct option.
14980 if test x"$ac_cv_type_struct_option" = xyes ; then
14981
14982 for ac_func in getopt_long
14983 do
14984 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14985 echo "$as_me:$LINENO: checking for $ac_func" >&5
14986 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14987 if eval "test \"\${$as_ac_var+set}\" = set"; then
14988   echo $ECHO_N "(cached) $ECHO_C" >&6
14989 else
14990   cat >conftest.$ac_ext <<_ACEOF
14991 /* confdefs.h.  */
14992 _ACEOF
14993 cat confdefs.h >>conftest.$ac_ext
14994 cat >>conftest.$ac_ext <<_ACEOF
14995 /* end confdefs.h.  */
14996 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14997    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14998 #define $ac_func innocuous_$ac_func
14999
15000 /* System header to define __stub macros and hopefully few prototypes,
15001     which can conflict with char $ac_func (); below.
15002     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15003     <limits.h> exists even on freestanding compilers.  */
15004
15005 #ifdef __STDC__
15006 # include <limits.h>
15007 #else
15008 # include <assert.h>
15009 #endif
15010
15011 #undef $ac_func
15012
15013 /* Override any gcc2 internal prototype to avoid an error.  */
15014 #ifdef __cplusplus
15015 extern "C"
15016 {
15017 #endif
15018 /* We use char because int might match the return type of a gcc2
15019    builtin and then its argument prototype would still apply.  */
15020 char $ac_func ();
15021 /* The GNU C library defines this for functions which it implements
15022     to always fail with ENOSYS.  Some functions are actually named
15023     something starting with __ and the normal name is an alias.  */
15024 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15025 choke me
15026 #else
15027 char (*f) () = $ac_func;
15028 #endif
15029 #ifdef __cplusplus
15030 }
15031 #endif
15032
15033 int
15034 main ()
15035 {
15036 return f != $ac_func;
15037   ;
15038   return 0;
15039 }
15040 _ACEOF
15041 rm -f conftest.$ac_objext conftest$ac_exeext
15042 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15043   (eval $ac_link) 2>conftest.er1
15044   ac_status=$?
15045   grep -v '^ *+' conftest.er1 >conftest.err
15046   rm -f conftest.er1
15047   cat conftest.err >&5
15048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15049   (exit $ac_status); } &&
15050          { ac_try='test -z "$ac_c_werror_flag"
15051                          || test ! -s conftest.err'
15052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15053   (eval $ac_try) 2>&5
15054   ac_status=$?
15055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15056   (exit $ac_status); }; } &&
15057          { ac_try='test -s conftest$ac_exeext'
15058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15059   (eval $ac_try) 2>&5
15060   ac_status=$?
15061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15062   (exit $ac_status); }; }; then
15063   eval "$as_ac_var=yes"
15064 else
15065   echo "$as_me: failed program was:" >&5
15066 sed 's/^/| /' conftest.$ac_ext >&5
15067
15068 eval "$as_ac_var=no"
15069 fi
15070 rm -f conftest.err conftest.$ac_objext \
15071       conftest$ac_exeext conftest.$ac_ext
15072 fi
15073 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15074 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15075 if test `eval echo '${'$as_ac_var'}'` = yes; then
15076   cat >>confdefs.h <<_ACEOF
15077 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15078 _ACEOF
15079
15080 else
15081   case $LIBOBJS in
15082     "$ac_func.$ac_objext"   | \
15083   *" $ac_func.$ac_objext"   | \
15084     "$ac_func.$ac_objext "* | \
15085   *" $ac_func.$ac_objext "* ) ;;
15086   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15087 esac
15088
15089 fi
15090 done
15091
15092
15093 else
15094   case $LIBOBJS in
15095     "getopt_long.$ac_objext"   | \
15096   *" getopt_long.$ac_objext"   | \
15097     "getopt_long.$ac_objext "* | \
15098   *" getopt_long.$ac_objext "* ) ;;
15099   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
15100 esac
15101
15102 fi
15103
15104 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
15105 # We override the previous test that said fseeko/ftello didn't exist
15106 # OS tests are also done in include/c.h and port/fseeko.c
15107 case $host_os in bsdi*|netbsd*)
15108 ac_cv_func_fseeko=yes
15109 esac
15110
15111 # Solaris has a very slow qsort in certain cases, so we replace it:
15112 #   http://forum.sun.com/thread.jspa?forumID=4&threadID=7231
15113 # Supposedly it is fixed in Solaris, but not sure which version, and
15114 # no confirmed testing.  2005-12-16
15115 if test "$PORTNAME" = "solaris"; then
15116 case $LIBOBJS in
15117     "qsort.$ac_objext"   | \
15118   *" qsort.$ac_objext"   | \
15119     "qsort.$ac_objext "* | \
15120   *" qsort.$ac_objext "* ) ;;
15121   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
15122 esac
15123
15124 fi
15125
15126 # Win32 support
15127 if test "$PORTNAME" = "win32"; then
15128 case $LIBOBJS in
15129     "gettimeofday.$ac_objext"   | \
15130   *" gettimeofday.$ac_objext"   | \
15131     "gettimeofday.$ac_objext "* | \
15132   *" gettimeofday.$ac_objext "* ) ;;
15133   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
15134 esac
15135
15136 case $LIBOBJS in
15137     "kill.$ac_objext"   | \
15138   *" kill.$ac_objext"   | \
15139     "kill.$ac_objext "* | \
15140   *" kill.$ac_objext "* ) ;;
15141   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
15142 esac
15143
15144 case $LIBOBJS in
15145     "open.$ac_objext"   | \
15146   *" open.$ac_objext"   | \
15147     "open.$ac_objext "* | \
15148   *" open.$ac_objext "* ) ;;
15149   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
15150 esac
15151
15152 case $LIBOBJS in
15153     "rand.$ac_objext"   | \
15154   *" rand.$ac_objext"   | \
15155     "rand.$ac_objext "* | \
15156   *" rand.$ac_objext "* ) ;;
15157   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
15158 esac
15159
15160
15161 cat >>confdefs.h <<\_ACEOF
15162 #define HAVE_SYMLINK 1
15163 _ACEOF
15164
15165 fi
15166
15167 if test "$with_readline" = yes; then
15168   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
15169 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
15170 cat >conftest.$ac_ext <<_ACEOF
15171 /* confdefs.h.  */
15172 _ACEOF
15173 cat confdefs.h >>conftest.$ac_ext
15174 cat >>conftest.$ac_ext <<_ACEOF
15175 /* end confdefs.h.  */
15176 #include <stdio.h>
15177 #ifdef HAVE_READLINE_READLINE_H
15178 # include <readline/readline.h>
15179 #elif defined(HAVE_READLINE_H)
15180 # include <readline.h>
15181 #endif
15182
15183 int
15184 main ()
15185 {
15186 rl_completion_append_character = 'x';
15187   ;
15188   return 0;
15189 }
15190 _ACEOF
15191 rm -f conftest.$ac_objext conftest$ac_exeext
15192 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15193   (eval $ac_link) 2>conftest.er1
15194   ac_status=$?
15195   grep -v '^ *+' conftest.er1 >conftest.err
15196   rm -f conftest.er1
15197   cat conftest.err >&5
15198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15199   (exit $ac_status); } &&
15200          { ac_try='test -z "$ac_c_werror_flag"
15201                          || test ! -s conftest.err'
15202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15203   (eval $ac_try) 2>&5
15204   ac_status=$?
15205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15206   (exit $ac_status); }; } &&
15207          { ac_try='test -s conftest$ac_exeext'
15208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15209   (eval $ac_try) 2>&5
15210   ac_status=$?
15211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15212   (exit $ac_status); }; }; then
15213   echo "$as_me:$LINENO: result: yes" >&5
15214 echo "${ECHO_T}yes" >&6
15215
15216 cat >>confdefs.h <<\_ACEOF
15217 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15218 _ACEOF
15219
15220 else
15221   echo "$as_me: failed program was:" >&5
15222 sed 's/^/| /' conftest.$ac_ext >&5
15223
15224 echo "$as_me:$LINENO: result: no" >&5
15225 echo "${ECHO_T}no" >&6
15226 fi
15227 rm -f conftest.err conftest.$ac_objext \
15228       conftest$ac_exeext conftest.$ac_ext
15229
15230
15231 for ac_func in rl_completion_matches rl_filename_completion_function
15232 do
15233 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15234 echo "$as_me:$LINENO: checking for $ac_func" >&5
15235 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15236 if eval "test \"\${$as_ac_var+set}\" = set"; then
15237   echo $ECHO_N "(cached) $ECHO_C" >&6
15238 else
15239   cat >conftest.$ac_ext <<_ACEOF
15240 /* confdefs.h.  */
15241 _ACEOF
15242 cat confdefs.h >>conftest.$ac_ext
15243 cat >>conftest.$ac_ext <<_ACEOF
15244 /* end confdefs.h.  */
15245 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15246    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15247 #define $ac_func innocuous_$ac_func
15248
15249 /* System header to define __stub macros and hopefully few prototypes,
15250     which can conflict with char $ac_func (); below.
15251     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15252     <limits.h> exists even on freestanding compilers.  */
15253
15254 #ifdef __STDC__
15255 # include <limits.h>
15256 #else
15257 # include <assert.h>
15258 #endif
15259
15260 #undef $ac_func
15261
15262 /* Override any gcc2 internal prototype to avoid an error.  */
15263 #ifdef __cplusplus
15264 extern "C"
15265 {
15266 #endif
15267 /* We use char because int might match the return type of a gcc2
15268    builtin and then its argument prototype would still apply.  */
15269 char $ac_func ();
15270 /* The GNU C library defines this for functions which it implements
15271     to always fail with ENOSYS.  Some functions are actually named
15272     something starting with __ and the normal name is an alias.  */
15273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15274 choke me
15275 #else
15276 char (*f) () = $ac_func;
15277 #endif
15278 #ifdef __cplusplus
15279 }
15280 #endif
15281
15282 int
15283 main ()
15284 {
15285 return f != $ac_func;
15286   ;
15287   return 0;
15288 }
15289 _ACEOF
15290 rm -f conftest.$ac_objext conftest$ac_exeext
15291 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15292   (eval $ac_link) 2>conftest.er1
15293   ac_status=$?
15294   grep -v '^ *+' conftest.er1 >conftest.err
15295   rm -f conftest.er1
15296   cat conftest.err >&5
15297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15298   (exit $ac_status); } &&
15299          { ac_try='test -z "$ac_c_werror_flag"
15300                          || test ! -s conftest.err'
15301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15302   (eval $ac_try) 2>&5
15303   ac_status=$?
15304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15305   (exit $ac_status); }; } &&
15306          { ac_try='test -s conftest$ac_exeext'
15307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15308   (eval $ac_try) 2>&5
15309   ac_status=$?
15310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311   (exit $ac_status); }; }; then
15312   eval "$as_ac_var=yes"
15313 else
15314   echo "$as_me: failed program was:" >&5
15315 sed 's/^/| /' conftest.$ac_ext >&5
15316
15317 eval "$as_ac_var=no"
15318 fi
15319 rm -f conftest.err conftest.$ac_objext \
15320       conftest$ac_exeext conftest.$ac_ext
15321 fi
15322 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15323 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15324 if test `eval echo '${'$as_ac_var'}'` = yes; then
15325   cat >>confdefs.h <<_ACEOF
15326 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15327 _ACEOF
15328
15329 fi
15330 done
15331
15332
15333 for ac_func in replace_history_entry
15334 do
15335 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15336 echo "$as_me:$LINENO: checking for $ac_func" >&5
15337 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15338 if eval "test \"\${$as_ac_var+set}\" = set"; then
15339   echo $ECHO_N "(cached) $ECHO_C" >&6
15340 else
15341   cat >conftest.$ac_ext <<_ACEOF
15342 /* confdefs.h.  */
15343 _ACEOF
15344 cat confdefs.h >>conftest.$ac_ext
15345 cat >>conftest.$ac_ext <<_ACEOF
15346 /* end confdefs.h.  */
15347 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15348    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15349 #define $ac_func innocuous_$ac_func
15350
15351 /* System header to define __stub macros and hopefully few prototypes,
15352     which can conflict with char $ac_func (); below.
15353     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15354     <limits.h> exists even on freestanding compilers.  */
15355
15356 #ifdef __STDC__
15357 # include <limits.h>
15358 #else
15359 # include <assert.h>
15360 #endif
15361
15362 #undef $ac_func
15363
15364 /* Override any gcc2 internal prototype to avoid an error.  */
15365 #ifdef __cplusplus
15366 extern "C"
15367 {
15368 #endif
15369 /* We use char because int might match the return type of a gcc2
15370    builtin and then its argument prototype would still apply.  */
15371 char $ac_func ();
15372 /* The GNU C library defines this for functions which it implements
15373     to always fail with ENOSYS.  Some functions are actually named
15374     something starting with __ and the normal name is an alias.  */
15375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15376 choke me
15377 #else
15378 char (*f) () = $ac_func;
15379 #endif
15380 #ifdef __cplusplus
15381 }
15382 #endif
15383
15384 int
15385 main ()
15386 {
15387 return f != $ac_func;
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   eval "$as_ac_var=yes"
15415 else
15416   echo "$as_me: failed program was:" >&5
15417 sed 's/^/| /' conftest.$ac_ext >&5
15418
15419 eval "$as_ac_var=no"
15420 fi
15421 rm -f conftest.err conftest.$ac_objext \
15422       conftest$ac_exeext conftest.$ac_ext
15423 fi
15424 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15425 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15426 if test `eval echo '${'$as_ac_var'}'` = yes; then
15427   cat >>confdefs.h <<_ACEOF
15428 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15429 _ACEOF
15430
15431 fi
15432 done
15433
15434 fi
15435
15436
15437 echo "$as_me:$LINENO: checking for finite" >&5
15438 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15439 cat >conftest.$ac_ext <<_ACEOF
15440 /* confdefs.h.  */
15441 _ACEOF
15442 cat confdefs.h >>conftest.$ac_ext
15443 cat >>conftest.$ac_ext <<_ACEOF
15444 /* end confdefs.h.  */
15445
15446 #include <math.h>
15447 double glob_double;
15448
15449 int
15450 main ()
15451 {
15452 return finite(glob_double) ? 0 : 1;
15453   ;
15454   return 0;
15455 }
15456 _ACEOF
15457 rm -f conftest.$ac_objext conftest$ac_exeext
15458 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15459   (eval $ac_link) 2>conftest.er1
15460   ac_status=$?
15461   grep -v '^ *+' conftest.er1 >conftest.err
15462   rm -f conftest.er1
15463   cat conftest.err >&5
15464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15465   (exit $ac_status); } &&
15466          { ac_try='test -z "$ac_c_werror_flag"
15467                          || test ! -s conftest.err'
15468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15469   (eval $ac_try) 2>&5
15470   ac_status=$?
15471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15472   (exit $ac_status); }; } &&
15473          { ac_try='test -s conftest$ac_exeext'
15474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15475   (eval $ac_try) 2>&5
15476   ac_status=$?
15477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15478   (exit $ac_status); }; }; then
15479
15480 cat >>confdefs.h <<\_ACEOF
15481 #define HAVE_FINITE 1
15482 _ACEOF
15483
15484 echo "$as_me:$LINENO: result: yes" >&5
15485 echo "${ECHO_T}yes" >&6
15486 else
15487   echo "$as_me: failed program was:" >&5
15488 sed 's/^/| /' conftest.$ac_ext >&5
15489
15490 echo "$as_me:$LINENO: result: no" >&5
15491 echo "${ECHO_T}no" >&6
15492 fi
15493 rm -f conftest.err conftest.$ac_objext \
15494       conftest$ac_exeext conftest.$ac_ext
15495
15496 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15497 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15498 cat >conftest.$ac_ext <<_ACEOF
15499 /* confdefs.h.  */
15500 _ACEOF
15501 cat confdefs.h >>conftest.$ac_ext
15502 cat >>conftest.$ac_ext <<_ACEOF
15503 /* end confdefs.h.  */
15504 #include <setjmp.h>
15505 int
15506 main ()
15507 {
15508 sigjmp_buf x; sigsetjmp(x, 1);
15509   ;
15510   return 0;
15511 }
15512 _ACEOF
15513 rm -f conftest.$ac_objext conftest$ac_exeext
15514 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15515   (eval $ac_link) 2>conftest.er1
15516   ac_status=$?
15517   grep -v '^ *+' conftest.er1 >conftest.err
15518   rm -f conftest.er1
15519   cat conftest.err >&5
15520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15521   (exit $ac_status); } &&
15522          { ac_try='test -z "$ac_c_werror_flag"
15523                          || test ! -s conftest.err'
15524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15525   (eval $ac_try) 2>&5
15526   ac_status=$?
15527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15528   (exit $ac_status); }; } &&
15529          { ac_try='test -s conftest$ac_exeext'
15530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15531   (eval $ac_try) 2>&5
15532   ac_status=$?
15533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15534   (exit $ac_status); }; }; then
15535
15536 cat >>confdefs.h <<\_ACEOF
15537 #define HAVE_SIGSETJMP 1
15538 _ACEOF
15539
15540 echo "$as_me:$LINENO: result: yes" >&5
15541 echo "${ECHO_T}yes" >&6
15542 else
15543   echo "$as_me: failed program was:" >&5
15544 sed 's/^/| /' conftest.$ac_ext >&5
15545
15546 echo "$as_me:$LINENO: result: no" >&5
15547 echo "${ECHO_T}no" >&6
15548 fi
15549 rm -f conftest.err conftest.$ac_objext \
15550       conftest$ac_exeext conftest.$ac_ext
15551
15552 echo "$as_me:$LINENO: checking for syslog" >&5
15553 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15554 if test "${ac_cv_func_syslog+set}" = set; then
15555   echo $ECHO_N "(cached) $ECHO_C" >&6
15556 else
15557   cat >conftest.$ac_ext <<_ACEOF
15558 /* confdefs.h.  */
15559 _ACEOF
15560 cat confdefs.h >>conftest.$ac_ext
15561 cat >>conftest.$ac_ext <<_ACEOF
15562 /* end confdefs.h.  */
15563 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15564    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15565 #define syslog innocuous_syslog
15566
15567 /* System header to define __stub macros and hopefully few prototypes,
15568     which can conflict with char syslog (); below.
15569     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15570     <limits.h> exists even on freestanding compilers.  */
15571
15572 #ifdef __STDC__
15573 # include <limits.h>
15574 #else
15575 # include <assert.h>
15576 #endif
15577
15578 #undef syslog
15579
15580 /* Override any gcc2 internal prototype to avoid an error.  */
15581 #ifdef __cplusplus
15582 extern "C"
15583 {
15584 #endif
15585 /* We use char because int might match the return type of a gcc2
15586    builtin and then its argument prototype would still apply.  */
15587 char syslog ();
15588 /* The GNU C library defines this for functions which it implements
15589     to always fail with ENOSYS.  Some functions are actually named
15590     something starting with __ and the normal name is an alias.  */
15591 #if defined (__stub_syslog) || defined (__stub___syslog)
15592 choke me
15593 #else
15594 char (*f) () = syslog;
15595 #endif
15596 #ifdef __cplusplus
15597 }
15598 #endif
15599
15600 int
15601 main ()
15602 {
15603 return f != syslog;
15604   ;
15605   return 0;
15606 }
15607 _ACEOF
15608 rm -f conftest.$ac_objext conftest$ac_exeext
15609 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15610   (eval $ac_link) 2>conftest.er1
15611   ac_status=$?
15612   grep -v '^ *+' conftest.er1 >conftest.err
15613   rm -f conftest.er1
15614   cat conftest.err >&5
15615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15616   (exit $ac_status); } &&
15617          { ac_try='test -z "$ac_c_werror_flag"
15618                          || test ! -s conftest.err'
15619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15620   (eval $ac_try) 2>&5
15621   ac_status=$?
15622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15623   (exit $ac_status); }; } &&
15624          { ac_try='test -s conftest$ac_exeext'
15625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15626   (eval $ac_try) 2>&5
15627   ac_status=$?
15628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15629   (exit $ac_status); }; }; then
15630   ac_cv_func_syslog=yes
15631 else
15632   echo "$as_me: failed program was:" >&5
15633 sed 's/^/| /' conftest.$ac_ext >&5
15634
15635 ac_cv_func_syslog=no
15636 fi
15637 rm -f conftest.err conftest.$ac_objext \
15638       conftest$ac_exeext conftest.$ac_ext
15639 fi
15640 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15641 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15642 if test $ac_cv_func_syslog = yes; then
15643   if test "${ac_cv_header_syslog_h+set}" = set; then
15644   echo "$as_me:$LINENO: checking for syslog.h" >&5
15645 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15646 if test "${ac_cv_header_syslog_h+set}" = set; then
15647   echo $ECHO_N "(cached) $ECHO_C" >&6
15648 fi
15649 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15650 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15651 else
15652   # Is the header compilable?
15653 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15654 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15655 cat >conftest.$ac_ext <<_ACEOF
15656 /* confdefs.h.  */
15657 _ACEOF
15658 cat confdefs.h >>conftest.$ac_ext
15659 cat >>conftest.$ac_ext <<_ACEOF
15660 /* end confdefs.h.  */
15661 $ac_includes_default
15662 #include <syslog.h>
15663 _ACEOF
15664 rm -f conftest.$ac_objext
15665 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15666   (eval $ac_compile) 2>conftest.er1
15667   ac_status=$?
15668   grep -v '^ *+' conftest.er1 >conftest.err
15669   rm -f conftest.er1
15670   cat conftest.err >&5
15671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15672   (exit $ac_status); } &&
15673          { ac_try='test -z "$ac_c_werror_flag"
15674                          || test ! -s conftest.err'
15675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15676   (eval $ac_try) 2>&5
15677   ac_status=$?
15678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15679   (exit $ac_status); }; } &&
15680          { ac_try='test -s conftest.$ac_objext'
15681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15682   (eval $ac_try) 2>&5
15683   ac_status=$?
15684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685   (exit $ac_status); }; }; then
15686   ac_header_compiler=yes
15687 else
15688   echo "$as_me: failed program was:" >&5
15689 sed 's/^/| /' conftest.$ac_ext >&5
15690
15691 ac_header_compiler=no
15692 fi
15693 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15694 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15695 echo "${ECHO_T}$ac_header_compiler" >&6
15696
15697 # Is the header present?
15698 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15699 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15700 cat >conftest.$ac_ext <<_ACEOF
15701 /* confdefs.h.  */
15702 _ACEOF
15703 cat confdefs.h >>conftest.$ac_ext
15704 cat >>conftest.$ac_ext <<_ACEOF
15705 /* end confdefs.h.  */
15706 #include <syslog.h>
15707 _ACEOF
15708 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15709   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15710   ac_status=$?
15711   grep -v '^ *+' conftest.er1 >conftest.err
15712   rm -f conftest.er1
15713   cat conftest.err >&5
15714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715   (exit $ac_status); } >/dev/null; then
15716   if test -s conftest.err; then
15717     ac_cpp_err=$ac_c_preproc_warn_flag
15718     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15719   else
15720     ac_cpp_err=
15721   fi
15722 else
15723   ac_cpp_err=yes
15724 fi
15725 if test -z "$ac_cpp_err"; then
15726   ac_header_preproc=yes
15727 else
15728   echo "$as_me: failed program was:" >&5
15729 sed 's/^/| /' conftest.$ac_ext >&5
15730
15731   ac_header_preproc=no
15732 fi
15733 rm -f conftest.err conftest.$ac_ext
15734 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15735 echo "${ECHO_T}$ac_header_preproc" >&6
15736
15737 # So?  What about this header?
15738 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15739   yes:no: )
15740     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15741 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15742     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15743 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15744     ac_header_preproc=yes
15745     ;;
15746   no:yes:* )
15747     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15748 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15749     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15750 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15751     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15752 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15753     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15754 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15755     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15756 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15757     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15758 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15759     (
15760       cat <<\_ASBOX
15761 ## ---------------------------------------- ##
15762 ## Report this to pgsql-bugs@postgresql.org ##
15763 ## ---------------------------------------- ##
15764 _ASBOX
15765     ) |
15766       sed "s/^/$as_me: WARNING:     /" >&2
15767     ;;
15768 esac
15769 echo "$as_me:$LINENO: checking for syslog.h" >&5
15770 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15771 if test "${ac_cv_header_syslog_h+set}" = set; then
15772   echo $ECHO_N "(cached) $ECHO_C" >&6
15773 else
15774   ac_cv_header_syslog_h=$ac_header_preproc
15775 fi
15776 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15777 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15778
15779 fi
15780 if test $ac_cv_header_syslog_h = yes; then
15781
15782 cat >>confdefs.h <<\_ACEOF
15783 #define HAVE_SYSLOG 1
15784 _ACEOF
15785
15786 fi
15787
15788
15789 fi
15790
15791
15792 echo "$as_me:$LINENO: checking for optreset" >&5
15793 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15794 if test "${pgac_cv_var_int_optreset+set}" = set; then
15795   echo $ECHO_N "(cached) $ECHO_C" >&6
15796 else
15797   cat >conftest.$ac_ext <<_ACEOF
15798 /* confdefs.h.  */
15799 _ACEOF
15800 cat confdefs.h >>conftest.$ac_ext
15801 cat >>conftest.$ac_ext <<_ACEOF
15802 /* end confdefs.h.  */
15803 #include <unistd.h>
15804 int
15805 main ()
15806 {
15807 extern int optreset; optreset = 1;
15808   ;
15809   return 0;
15810 }
15811 _ACEOF
15812 rm -f conftest.$ac_objext conftest$ac_exeext
15813 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15814   (eval $ac_link) 2>conftest.er1
15815   ac_status=$?
15816   grep -v '^ *+' conftest.er1 >conftest.err
15817   rm -f conftest.er1
15818   cat conftest.err >&5
15819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820   (exit $ac_status); } &&
15821          { ac_try='test -z "$ac_c_werror_flag"
15822                          || test ! -s conftest.err'
15823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15824   (eval $ac_try) 2>&5
15825   ac_status=$?
15826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15827   (exit $ac_status); }; } &&
15828          { ac_try='test -s conftest$ac_exeext'
15829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15830   (eval $ac_try) 2>&5
15831   ac_status=$?
15832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15833   (exit $ac_status); }; }; then
15834   pgac_cv_var_int_optreset=yes
15835 else
15836   echo "$as_me: failed program was:" >&5
15837 sed 's/^/| /' conftest.$ac_ext >&5
15838
15839 pgac_cv_var_int_optreset=no
15840 fi
15841 rm -f conftest.err conftest.$ac_objext \
15842       conftest$ac_exeext conftest.$ac_ext
15843 fi
15844 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15845 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15846 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15847
15848 cat >>confdefs.h <<\_ACEOF
15849 #define HAVE_INT_OPTRESET 1
15850 _ACEOF
15851
15852 fi
15853
15854
15855
15856 for ac_func in strtoll strtoq
15857 do
15858 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15859 echo "$as_me:$LINENO: checking for $ac_func" >&5
15860 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15861 if eval "test \"\${$as_ac_var+set}\" = set"; then
15862   echo $ECHO_N "(cached) $ECHO_C" >&6
15863 else
15864   cat >conftest.$ac_ext <<_ACEOF
15865 /* confdefs.h.  */
15866 _ACEOF
15867 cat confdefs.h >>conftest.$ac_ext
15868 cat >>conftest.$ac_ext <<_ACEOF
15869 /* end confdefs.h.  */
15870 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15871    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15872 #define $ac_func innocuous_$ac_func
15873
15874 /* System header to define __stub macros and hopefully few prototypes,
15875     which can conflict with char $ac_func (); below.
15876     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15877     <limits.h> exists even on freestanding compilers.  */
15878
15879 #ifdef __STDC__
15880 # include <limits.h>
15881 #else
15882 # include <assert.h>
15883 #endif
15884
15885 #undef $ac_func
15886
15887 /* Override any gcc2 internal prototype to avoid an error.  */
15888 #ifdef __cplusplus
15889 extern "C"
15890 {
15891 #endif
15892 /* We use char because int might match the return type of a gcc2
15893    builtin and then its argument prototype would still apply.  */
15894 char $ac_func ();
15895 /* The GNU C library defines this for functions which it implements
15896     to always fail with ENOSYS.  Some functions are actually named
15897     something starting with __ and the normal name is an alias.  */
15898 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15899 choke me
15900 #else
15901 char (*f) () = $ac_func;
15902 #endif
15903 #ifdef __cplusplus
15904 }
15905 #endif
15906
15907 int
15908 main ()
15909 {
15910 return f != $ac_func;
15911   ;
15912   return 0;
15913 }
15914 _ACEOF
15915 rm -f conftest.$ac_objext conftest$ac_exeext
15916 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15917   (eval $ac_link) 2>conftest.er1
15918   ac_status=$?
15919   grep -v '^ *+' conftest.er1 >conftest.err
15920   rm -f conftest.er1
15921   cat conftest.err >&5
15922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15923   (exit $ac_status); } &&
15924          { ac_try='test -z "$ac_c_werror_flag"
15925                          || test ! -s conftest.err'
15926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15927   (eval $ac_try) 2>&5
15928   ac_status=$?
15929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15930   (exit $ac_status); }; } &&
15931          { ac_try='test -s conftest$ac_exeext'
15932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15933   (eval $ac_try) 2>&5
15934   ac_status=$?
15935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15936   (exit $ac_status); }; }; then
15937   eval "$as_ac_var=yes"
15938 else
15939   echo "$as_me: failed program was:" >&5
15940 sed 's/^/| /' conftest.$ac_ext >&5
15941
15942 eval "$as_ac_var=no"
15943 fi
15944 rm -f conftest.err conftest.$ac_objext \
15945       conftest$ac_exeext conftest.$ac_ext
15946 fi
15947 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15948 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15949 if test `eval echo '${'$as_ac_var'}'` = yes; then
15950   cat >>confdefs.h <<_ACEOF
15951 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15952 _ACEOF
15953  break
15954 fi
15955 done
15956
15957
15958
15959 for ac_func in strtoull strtouq
15960 do
15961 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15962 echo "$as_me:$LINENO: checking for $ac_func" >&5
15963 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15964 if eval "test \"\${$as_ac_var+set}\" = set"; then
15965   echo $ECHO_N "(cached) $ECHO_C" >&6
15966 else
15967   cat >conftest.$ac_ext <<_ACEOF
15968 /* confdefs.h.  */
15969 _ACEOF
15970 cat confdefs.h >>conftest.$ac_ext
15971 cat >>conftest.$ac_ext <<_ACEOF
15972 /* end confdefs.h.  */
15973 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15974    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15975 #define $ac_func innocuous_$ac_func
15976
15977 /* System header to define __stub macros and hopefully few prototypes,
15978     which can conflict with char $ac_func (); below.
15979     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15980     <limits.h> exists even on freestanding compilers.  */
15981
15982 #ifdef __STDC__
15983 # include <limits.h>
15984 #else
15985 # include <assert.h>
15986 #endif
15987
15988 #undef $ac_func
15989
15990 /* Override any gcc2 internal prototype to avoid an error.  */
15991 #ifdef __cplusplus
15992 extern "C"
15993 {
15994 #endif
15995 /* We use char because int might match the return type of a gcc2
15996    builtin and then its argument prototype would still apply.  */
15997 char $ac_func ();
15998 /* The GNU C library defines this for functions which it implements
15999     to always fail with ENOSYS.  Some functions are actually named
16000     something starting with __ and the normal name is an alias.  */
16001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16002 choke me
16003 #else
16004 char (*f) () = $ac_func;
16005 #endif
16006 #ifdef __cplusplus
16007 }
16008 #endif
16009
16010 int
16011 main ()
16012 {
16013 return f != $ac_func;
16014   ;
16015   return 0;
16016 }
16017 _ACEOF
16018 rm -f conftest.$ac_objext conftest$ac_exeext
16019 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16020   (eval $ac_link) 2>conftest.er1
16021   ac_status=$?
16022   grep -v '^ *+' conftest.er1 >conftest.err
16023   rm -f conftest.er1
16024   cat conftest.err >&5
16025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16026   (exit $ac_status); } &&
16027          { ac_try='test -z "$ac_c_werror_flag"
16028                          || test ! -s conftest.err'
16029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16030   (eval $ac_try) 2>&5
16031   ac_status=$?
16032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16033   (exit $ac_status); }; } &&
16034          { ac_try='test -s conftest$ac_exeext'
16035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16036   (eval $ac_try) 2>&5
16037   ac_status=$?
16038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16039   (exit $ac_status); }; }; then
16040   eval "$as_ac_var=yes"
16041 else
16042   echo "$as_me: failed program was:" >&5
16043 sed 's/^/| /' conftest.$ac_ext >&5
16044
16045 eval "$as_ac_var=no"
16046 fi
16047 rm -f conftest.err conftest.$ac_objext \
16048       conftest$ac_exeext conftest.$ac_ext
16049 fi
16050 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16051 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16052 if test `eval echo '${'$as_ac_var'}'` = yes; then
16053   cat >>confdefs.h <<_ACEOF
16054 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16055 _ACEOF
16056  break
16057 fi
16058 done
16059
16060
16061 # Check for one of atexit() or on_exit()
16062
16063 for ac_func in atexit
16064 do
16065 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16066 echo "$as_me:$LINENO: checking for $ac_func" >&5
16067 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16068 if eval "test \"\${$as_ac_var+set}\" = set"; then
16069   echo $ECHO_N "(cached) $ECHO_C" >&6
16070 else
16071   cat >conftest.$ac_ext <<_ACEOF
16072 /* confdefs.h.  */
16073 _ACEOF
16074 cat confdefs.h >>conftest.$ac_ext
16075 cat >>conftest.$ac_ext <<_ACEOF
16076 /* end confdefs.h.  */
16077 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16078    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16079 #define $ac_func innocuous_$ac_func
16080
16081 /* System header to define __stub macros and hopefully few prototypes,
16082     which can conflict with char $ac_func (); below.
16083     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16084     <limits.h> exists even on freestanding compilers.  */
16085
16086 #ifdef __STDC__
16087 # include <limits.h>
16088 #else
16089 # include <assert.h>
16090 #endif
16091
16092 #undef $ac_func
16093
16094 /* Override any gcc2 internal prototype to avoid an error.  */
16095 #ifdef __cplusplus
16096 extern "C"
16097 {
16098 #endif
16099 /* We use char because int might match the return type of a gcc2
16100    builtin and then its argument prototype would still apply.  */
16101 char $ac_func ();
16102 /* The GNU C library defines this for functions which it implements
16103     to always fail with ENOSYS.  Some functions are actually named
16104     something starting with __ and the normal name is an alias.  */
16105 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16106 choke me
16107 #else
16108 char (*f) () = $ac_func;
16109 #endif
16110 #ifdef __cplusplus
16111 }
16112 #endif
16113
16114 int
16115 main ()
16116 {
16117 return f != $ac_func;
16118   ;
16119   return 0;
16120 }
16121 _ACEOF
16122 rm -f conftest.$ac_objext conftest$ac_exeext
16123 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16124   (eval $ac_link) 2>conftest.er1
16125   ac_status=$?
16126   grep -v '^ *+' conftest.er1 >conftest.err
16127   rm -f conftest.er1
16128   cat conftest.err >&5
16129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16130   (exit $ac_status); } &&
16131          { ac_try='test -z "$ac_c_werror_flag"
16132                          || test ! -s conftest.err'
16133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16134   (eval $ac_try) 2>&5
16135   ac_status=$?
16136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16137   (exit $ac_status); }; } &&
16138          { ac_try='test -s conftest$ac_exeext'
16139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16140   (eval $ac_try) 2>&5
16141   ac_status=$?
16142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16143   (exit $ac_status); }; }; then
16144   eval "$as_ac_var=yes"
16145 else
16146   echo "$as_me: failed program was:" >&5
16147 sed 's/^/| /' conftest.$ac_ext >&5
16148
16149 eval "$as_ac_var=no"
16150 fi
16151 rm -f conftest.err conftest.$ac_objext \
16152       conftest$ac_exeext conftest.$ac_ext
16153 fi
16154 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16155 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16156 if test `eval echo '${'$as_ac_var'}'` = yes; then
16157   cat >>confdefs.h <<_ACEOF
16158 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16159 _ACEOF
16160
16161 else
16162
16163 for ac_func in on_exit
16164 do
16165 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16166 echo "$as_me:$LINENO: checking for $ac_func" >&5
16167 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16168 if eval "test \"\${$as_ac_var+set}\" = set"; then
16169   echo $ECHO_N "(cached) $ECHO_C" >&6
16170 else
16171   cat >conftest.$ac_ext <<_ACEOF
16172 /* confdefs.h.  */
16173 _ACEOF
16174 cat confdefs.h >>conftest.$ac_ext
16175 cat >>conftest.$ac_ext <<_ACEOF
16176 /* end confdefs.h.  */
16177 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16178    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16179 #define $ac_func innocuous_$ac_func
16180
16181 /* System header to define __stub macros and hopefully few prototypes,
16182     which can conflict with char $ac_func (); below.
16183     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16184     <limits.h> exists even on freestanding compilers.  */
16185
16186 #ifdef __STDC__
16187 # include <limits.h>
16188 #else
16189 # include <assert.h>
16190 #endif
16191
16192 #undef $ac_func
16193
16194 /* Override any gcc2 internal prototype to avoid an error.  */
16195 #ifdef __cplusplus
16196 extern "C"
16197 {
16198 #endif
16199 /* We use char because int might match the return type of a gcc2
16200    builtin and then its argument prototype would still apply.  */
16201 char $ac_func ();
16202 /* The GNU C library defines this for functions which it implements
16203     to always fail with ENOSYS.  Some functions are actually named
16204     something starting with __ and the normal name is an alias.  */
16205 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16206 choke me
16207 #else
16208 char (*f) () = $ac_func;
16209 #endif
16210 #ifdef __cplusplus
16211 }
16212 #endif
16213
16214 int
16215 main ()
16216 {
16217 return f != $ac_func;
16218   ;
16219   return 0;
16220 }
16221 _ACEOF
16222 rm -f conftest.$ac_objext conftest$ac_exeext
16223 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16224   (eval $ac_link) 2>conftest.er1
16225   ac_status=$?
16226   grep -v '^ *+' conftest.er1 >conftest.err
16227   rm -f conftest.er1
16228   cat conftest.err >&5
16229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16230   (exit $ac_status); } &&
16231          { ac_try='test -z "$ac_c_werror_flag"
16232                          || test ! -s conftest.err'
16233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16234   (eval $ac_try) 2>&5
16235   ac_status=$?
16236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16237   (exit $ac_status); }; } &&
16238          { ac_try='test -s conftest$ac_exeext'
16239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16240   (eval $ac_try) 2>&5
16241   ac_status=$?
16242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16243   (exit $ac_status); }; }; then
16244   eval "$as_ac_var=yes"
16245 else
16246   echo "$as_me: failed program was:" >&5
16247 sed 's/^/| /' conftest.$ac_ext >&5
16248
16249 eval "$as_ac_var=no"
16250 fi
16251 rm -f conftest.err conftest.$ac_objext \
16252       conftest$ac_exeext conftest.$ac_ext
16253 fi
16254 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16255 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16256 if test `eval echo '${'$as_ac_var'}'` = yes; then
16257   cat >>confdefs.h <<_ACEOF
16258 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16259 _ACEOF
16260
16261 else
16262   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16263 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16264    { (exit 1); exit 1; }; }
16265 fi
16266 done
16267
16268 fi
16269 done
16270
16271
16272 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16273 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16274 if test "${ac_cv_sys_largefile_source+set}" = set; then
16275   echo $ECHO_N "(cached) $ECHO_C" >&6
16276 else
16277   while :; do
16278   ac_cv_sys_largefile_source=no
16279   cat >conftest.$ac_ext <<_ACEOF
16280 /* confdefs.h.  */
16281 _ACEOF
16282 cat confdefs.h >>conftest.$ac_ext
16283 cat >>conftest.$ac_ext <<_ACEOF
16284 /* end confdefs.h.  */
16285 #include <stdio.h>
16286 int
16287 main ()
16288 {
16289 return !fseeko;
16290   ;
16291   return 0;
16292 }
16293 _ACEOF
16294 rm -f conftest.$ac_objext
16295 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16296   (eval $ac_compile) 2>conftest.er1
16297   ac_status=$?
16298   grep -v '^ *+' conftest.er1 >conftest.err
16299   rm -f conftest.er1
16300   cat conftest.err >&5
16301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16302   (exit $ac_status); } &&
16303          { ac_try='test -z "$ac_c_werror_flag"
16304                          || test ! -s conftest.err'
16305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16306   (eval $ac_try) 2>&5
16307   ac_status=$?
16308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16309   (exit $ac_status); }; } &&
16310          { ac_try='test -s conftest.$ac_objext'
16311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16312   (eval $ac_try) 2>&5
16313   ac_status=$?
16314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16315   (exit $ac_status); }; }; then
16316   break
16317 else
16318   echo "$as_me: failed program was:" >&5
16319 sed 's/^/| /' conftest.$ac_ext >&5
16320
16321 fi
16322 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16323   cat >conftest.$ac_ext <<_ACEOF
16324 /* confdefs.h.  */
16325 _ACEOF
16326 cat confdefs.h >>conftest.$ac_ext
16327 cat >>conftest.$ac_ext <<_ACEOF
16328 /* end confdefs.h.  */
16329 #define _LARGEFILE_SOURCE 1
16330 #include <stdio.h>
16331 int
16332 main ()
16333 {
16334 return !fseeko;
16335   ;
16336   return 0;
16337 }
16338 _ACEOF
16339 rm -f conftest.$ac_objext
16340 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16341   (eval $ac_compile) 2>conftest.er1
16342   ac_status=$?
16343   grep -v '^ *+' conftest.er1 >conftest.err
16344   rm -f conftest.er1
16345   cat conftest.err >&5
16346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16347   (exit $ac_status); } &&
16348          { ac_try='test -z "$ac_c_werror_flag"
16349                          || test ! -s conftest.err'
16350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16351   (eval $ac_try) 2>&5
16352   ac_status=$?
16353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16354   (exit $ac_status); }; } &&
16355          { ac_try='test -s conftest.$ac_objext'
16356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16357   (eval $ac_try) 2>&5
16358   ac_status=$?
16359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16360   (exit $ac_status); }; }; then
16361   ac_cv_sys_largefile_source=1; break
16362 else
16363   echo "$as_me: failed program was:" >&5
16364 sed 's/^/| /' conftest.$ac_ext >&5
16365
16366 fi
16367 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16368   break
16369 done
16370 fi
16371 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16372 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16373 if test "$ac_cv_sys_largefile_source" != no; then
16374
16375 cat >>confdefs.h <<_ACEOF
16376 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16377 _ACEOF
16378
16379 fi
16380 rm -f conftest*
16381
16382 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16383 # in glibc 2.1.3, but that breaks too many other things.
16384 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16385 echo "$as_me:$LINENO: checking for fseeko" >&5
16386 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16387 if test "${ac_cv_func_fseeko+set}" = set; then
16388   echo $ECHO_N "(cached) $ECHO_C" >&6
16389 else
16390   cat >conftest.$ac_ext <<_ACEOF
16391 /* confdefs.h.  */
16392 _ACEOF
16393 cat confdefs.h >>conftest.$ac_ext
16394 cat >>conftest.$ac_ext <<_ACEOF
16395 /* end confdefs.h.  */
16396 #include <stdio.h>
16397 int
16398 main ()
16399 {
16400 return fseeko && fseeko (stdin, 0, 0);
16401   ;
16402   return 0;
16403 }
16404 _ACEOF
16405 rm -f conftest.$ac_objext conftest$ac_exeext
16406 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16407   (eval $ac_link) 2>conftest.er1
16408   ac_status=$?
16409   grep -v '^ *+' conftest.er1 >conftest.err
16410   rm -f conftest.er1
16411   cat conftest.err >&5
16412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16413   (exit $ac_status); } &&
16414          { ac_try='test -z "$ac_c_werror_flag"
16415                          || test ! -s conftest.err'
16416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16417   (eval $ac_try) 2>&5
16418   ac_status=$?
16419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16420   (exit $ac_status); }; } &&
16421          { ac_try='test -s conftest$ac_exeext'
16422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16423   (eval $ac_try) 2>&5
16424   ac_status=$?
16425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16426   (exit $ac_status); }; }; then
16427   ac_cv_func_fseeko=yes
16428 else
16429   echo "$as_me: failed program was:" >&5
16430 sed 's/^/| /' conftest.$ac_ext >&5
16431
16432 ac_cv_func_fseeko=no
16433 fi
16434 rm -f conftest.err conftest.$ac_objext \
16435       conftest$ac_exeext conftest.$ac_ext
16436 fi
16437 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16438 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16439 if test $ac_cv_func_fseeko = yes; then
16440
16441 cat >>confdefs.h <<\_ACEOF
16442 #define HAVE_FSEEKO 1
16443 _ACEOF
16444
16445 fi
16446
16447
16448 #
16449 # Pthreads
16450 #
16451 # For each platform, we need to know about any special compile and link
16452 # libraries, and whether the normal C function names are thread-safe.
16453 # See the comment at the top of src/port/thread.c for more information.
16454 #
16455 if test "$enable_thread_safety" = yes; then
16456
16457
16458
16459
16460 ac_ext=c
16461 ac_cpp='$CPP $CPPFLAGS'
16462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16465
16466 acx_pthread_ok=no
16467
16468 # We used to check for pthread.h first, but this fails if pthread.h
16469 # requires special compiler flags (e.g. on True64 or Sequent).
16470 # It gets checked for in the link test anyway.
16471
16472 # First of all, check if the user has set any of the PTHREAD_LIBS,
16473 # etcetera environment variables, and if threads linking works using
16474 # them:
16475 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16476         save_CFLAGS="$CFLAGS"
16477         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16478         save_LIBS="$LIBS"
16479         LIBS="$PTHREAD_LIBS $LIBS"
16480         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16481 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16482         cat >conftest.$ac_ext <<_ACEOF
16483 /* confdefs.h.  */
16484 _ACEOF
16485 cat confdefs.h >>conftest.$ac_ext
16486 cat >>conftest.$ac_ext <<_ACEOF
16487 /* end confdefs.h.  */
16488
16489 /* Override any gcc2 internal prototype to avoid an error.  */
16490 #ifdef __cplusplus
16491 extern "C"
16492 #endif
16493 /* We use char because int might match the return type of a gcc2
16494    builtin and then its argument prototype would still apply.  */
16495 char pthread_join ();
16496 int
16497 main ()
16498 {
16499 pthread_join ();
16500   ;
16501   return 0;
16502 }
16503 _ACEOF
16504 rm -f conftest.$ac_objext conftest$ac_exeext
16505 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16506   (eval $ac_link) 2>conftest.er1
16507   ac_status=$?
16508   grep -v '^ *+' conftest.er1 >conftest.err
16509   rm -f conftest.er1
16510   cat conftest.err >&5
16511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16512   (exit $ac_status); } &&
16513          { ac_try='test -z "$ac_c_werror_flag"
16514                          || test ! -s conftest.err'
16515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16516   (eval $ac_try) 2>&5
16517   ac_status=$?
16518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16519   (exit $ac_status); }; } &&
16520          { ac_try='test -s conftest$ac_exeext'
16521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16522   (eval $ac_try) 2>&5
16523   ac_status=$?
16524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16525   (exit $ac_status); }; }; then
16526   acx_pthread_ok=yes
16527 else
16528   echo "$as_me: failed program was:" >&5
16529 sed 's/^/| /' conftest.$ac_ext >&5
16530
16531 fi
16532 rm -f conftest.err conftest.$ac_objext \
16533       conftest$ac_exeext conftest.$ac_ext
16534         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16535 echo "${ECHO_T}$acx_pthread_ok" >&6
16536         if test x"$acx_pthread_ok" = xno; then
16537                 PTHREAD_LIBS=""
16538                 PTHREAD_CFLAGS=""
16539         fi
16540         LIBS="$save_LIBS"
16541         CFLAGS="$save_CFLAGS"
16542 fi
16543
16544 # We must check for the threads library under a number of different
16545 # names; the ordering is very important because some systems
16546 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16547 # libraries is broken (non-POSIX).
16548
16549 # Create a list of thread flags to try.  Items starting with a "-" are
16550 # C compiler flags, and other items are library names, except for "none"
16551 # which indicates that we try without any flags at all, and "pthread-config"
16552 # which is a program returning the flags for the Pth emulation library.
16553
16554 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16555
16556 # The ordering *is* (sometimes) important.  Some notes on the
16557 # individual items follow:
16558
16559 # pthreads: AIX (must check this before -lpthread)
16560 # none: in case threads are in libc; should be tried before -Kthread and
16561 #       other compiler flags to prevent continual compiler warnings
16562 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16563 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16564 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16565 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16566 # -pthreads: Solaris/gcc
16567 # -mthreads: Mingw32/gcc, Lynx/gcc
16568 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16569 #      doesn't hurt to check since this sometimes defines pthreads too;
16570 #      also defines -D_REENTRANT)
16571 # pthread: Linux, etcetera
16572 # --thread-safe: KAI C++
16573 # pthread-config: use pthread-config program (for GNU Pth library)
16574
16575 case "${host_cpu}-${host_os}" in
16576         *solaris*)
16577
16578         # On Solaris (at least, for some versions), libc contains stubbed
16579         # (non-functional) versions of the pthreads routines, so link-based
16580         # tests will erroneously succeed.  (We need to link with -pthread or
16581         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16582         # a function called by this macro, so we could check for that, but
16583         # who knows whether they'll stub that too in a future libc.)  So,
16584         # we'll just look for -pthreads and -lpthread first:
16585
16586         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16587         ;;
16588 esac
16589
16590 if test x"$acx_pthread_ok" = xno; then
16591 for flag in $acx_pthread_flags; do
16592
16593         tryPTHREAD_CFLAGS=""
16594         tryPTHREAD_LIBS=""
16595         case $flag in
16596                 none)
16597                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16598 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16599                 ;;
16600
16601                 -*)
16602                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16603 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16604                 tryPTHREAD_CFLAGS="$flag"
16605                 ;;
16606
16607                 pthread-config)
16608                 # skip this if we already have flags defined, for PostgreSQL
16609                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16610                 # Extract the first word of "pthread-config", so it can be a program name with args.
16611 set dummy pthread-config; ac_word=$2
16612 echo "$as_me:$LINENO: checking for $ac_word" >&5
16613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16614 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16615   echo $ECHO_N "(cached) $ECHO_C" >&6
16616 else
16617   if test -n "$acx_pthread_config"; then
16618   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16619 else
16620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16621 for as_dir in $PATH
16622 do
16623   IFS=$as_save_IFS
16624   test -z "$as_dir" && as_dir=.
16625   for ac_exec_ext in '' $ac_executable_extensions; do
16626   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16627     ac_cv_prog_acx_pthread_config="yes"
16628     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16629     break 2
16630   fi
16631 done
16632 done
16633
16634   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16635 fi
16636 fi
16637 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16638 if test -n "$acx_pthread_config"; then
16639   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16640 echo "${ECHO_T}$acx_pthread_config" >&6
16641 else
16642   echo "$as_me:$LINENO: result: no" >&5
16643 echo "${ECHO_T}no" >&6
16644 fi
16645
16646                 if test x"$acx_pthread_config" = xno; then continue; fi
16647                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16648                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16649                 ;;
16650
16651                 *)
16652                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16653 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16654                 tryPTHREAD_LIBS="-l$flag"
16655                 ;;
16656         esac
16657
16658         save_LIBS="$LIBS"
16659         save_CFLAGS="$CFLAGS"
16660         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16661         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16662
16663         # Check for various functions.  We must include pthread.h,
16664         # since some functions may be macros.  (On the Sequent, we
16665         # need a special flag -Kthread to make this header compile.)
16666         # We check for pthread_join because it is in -lpthread on IRIX
16667         # while pthread_create is in libc.  We check for pthread_attr_init
16668         # due to DEC craziness with -lpthreads.  We check for
16669         # pthread_cleanup_push because it is one of the few pthread
16670         # functions on Solaris that doesn't have a non-functional libc stub.
16671         # We try pthread_create on general principles.
16672         cat >conftest.$ac_ext <<_ACEOF
16673 /* confdefs.h.  */
16674 _ACEOF
16675 cat confdefs.h >>conftest.$ac_ext
16676 cat >>conftest.$ac_ext <<_ACEOF
16677 /* end confdefs.h.  */
16678 #include <pthread.h>
16679 int
16680 main ()
16681 {
16682 pthread_t th; pthread_join(th, 0);
16683                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16684                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16685   ;
16686   return 0;
16687 }
16688 _ACEOF
16689 rm -f conftest.$ac_objext conftest$ac_exeext
16690 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16691   (eval $ac_link) 2>conftest.er1
16692   ac_status=$?
16693   grep -v '^ *+' conftest.er1 >conftest.err
16694   rm -f conftest.er1
16695   cat conftest.err >&5
16696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16697   (exit $ac_status); } &&
16698          { ac_try='test -z "$ac_c_werror_flag"
16699                          || test ! -s conftest.err'
16700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16701   (eval $ac_try) 2>&5
16702   ac_status=$?
16703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16704   (exit $ac_status); }; } &&
16705          { ac_try='test -s conftest$ac_exeext'
16706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16707   (eval $ac_try) 2>&5
16708   ac_status=$?
16709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16710   (exit $ac_status); }; }; then
16711   acx_pthread_ok=yes
16712 else
16713   echo "$as_me: failed program was:" >&5
16714 sed 's/^/| /' conftest.$ac_ext >&5
16715
16716 acx_pthread_ok=no
16717 fi
16718 rm -f conftest.err conftest.$ac_objext \
16719       conftest$ac_exeext conftest.$ac_ext
16720
16721         if test "x$acx_pthread_ok" = xyes; then
16722             # Don't use options that are ignored by the compiler.
16723             # We find them by checking stderror.
16724             cat >conftest.$ac_ext <<_ACEOF
16725 int
16726 main (int argc, char **argv)
16727 {
16728   (void) argc;
16729   (void) argv;
16730   return 0;
16731 }
16732 _ACEOF
16733             rm -f conftest.$ac_objext conftest$ac_exeext
16734             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16735                 # we continue with more flags because Linux needs -lpthread
16736                 # for libpq builds on PostgreSQL.  The test above only
16737                 # tests for building binaries, not shared libraries.
16738                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16739                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16740             else   acx_pthread_ok=no
16741             fi
16742         fi
16743
16744         LIBS="$save_LIBS"
16745         CFLAGS="$save_CFLAGS"
16746
16747         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16748 echo "${ECHO_T}$acx_pthread_ok" >&6
16749 done
16750 fi
16751
16752 # Various other checks:
16753 if test "x$acx_pthread_ok" = xyes; then
16754         save_LIBS="$LIBS"
16755         LIBS="$PTHREAD_LIBS $LIBS"
16756         save_CFLAGS="$CFLAGS"
16757         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16758
16759         # Detect AIX lossage: threads are created detached by default
16760         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16761         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16762 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16763         cat >conftest.$ac_ext <<_ACEOF
16764 /* confdefs.h.  */
16765 _ACEOF
16766 cat confdefs.h >>conftest.$ac_ext
16767 cat >>conftest.$ac_ext <<_ACEOF
16768 /* end confdefs.h.  */
16769 #include <pthread.h>
16770 int
16771 main ()
16772 {
16773 int attr=PTHREAD_CREATE_JOINABLE;
16774   ;
16775   return 0;
16776 }
16777 _ACEOF
16778 rm -f conftest.$ac_objext conftest$ac_exeext
16779 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16780   (eval $ac_link) 2>conftest.er1
16781   ac_status=$?
16782   grep -v '^ *+' conftest.er1 >conftest.err
16783   rm -f conftest.er1
16784   cat conftest.err >&5
16785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16786   (exit $ac_status); } &&
16787          { ac_try='test -z "$ac_c_werror_flag"
16788                          || test ! -s conftest.err'
16789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16790   (eval $ac_try) 2>&5
16791   ac_status=$?
16792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16793   (exit $ac_status); }; } &&
16794          { ac_try='test -s conftest$ac_exeext'
16795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16796   (eval $ac_try) 2>&5
16797   ac_status=$?
16798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16799   (exit $ac_status); }; }; then
16800   ok=PTHREAD_CREATE_JOINABLE
16801 else
16802   echo "$as_me: failed program was:" >&5
16803 sed 's/^/| /' conftest.$ac_ext >&5
16804
16805 ok=unknown
16806 fi
16807 rm -f conftest.err conftest.$ac_objext \
16808       conftest$ac_exeext conftest.$ac_ext
16809         if test x"$ok" = xunknown; then
16810                 cat >conftest.$ac_ext <<_ACEOF
16811 /* confdefs.h.  */
16812 _ACEOF
16813 cat confdefs.h >>conftest.$ac_ext
16814 cat >>conftest.$ac_ext <<_ACEOF
16815 /* end confdefs.h.  */
16816 #include <pthread.h>
16817 int
16818 main ()
16819 {
16820 int attr=PTHREAD_CREATE_UNDETACHED;
16821   ;
16822   return 0;
16823 }
16824 _ACEOF
16825 rm -f conftest.$ac_objext conftest$ac_exeext
16826 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16827   (eval $ac_link) 2>conftest.er1
16828   ac_status=$?
16829   grep -v '^ *+' conftest.er1 >conftest.err
16830   rm -f conftest.er1
16831   cat conftest.err >&5
16832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16833   (exit $ac_status); } &&
16834          { ac_try='test -z "$ac_c_werror_flag"
16835                          || test ! -s conftest.err'
16836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16837   (eval $ac_try) 2>&5
16838   ac_status=$?
16839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16840   (exit $ac_status); }; } &&
16841          { ac_try='test -s conftest$ac_exeext'
16842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16843   (eval $ac_try) 2>&5
16844   ac_status=$?
16845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16846   (exit $ac_status); }; }; then
16847   ok=PTHREAD_CREATE_UNDETACHED
16848 else
16849   echo "$as_me: failed program was:" >&5
16850 sed 's/^/| /' conftest.$ac_ext >&5
16851
16852 ok=unknown
16853 fi
16854 rm -f conftest.err conftest.$ac_objext \
16855       conftest$ac_exeext conftest.$ac_ext
16856         fi
16857         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16858
16859 cat >>confdefs.h <<\_ACEOF
16860 #define PTHREAD_CREATE_JOINABLE $ok
16861 _ACEOF
16862
16863         fi
16864         echo "$as_me:$LINENO: result: ${ok}" >&5
16865 echo "${ECHO_T}${ok}" >&6
16866         if test x"$ok" = xunknown; then
16867                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16868 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16869         fi
16870
16871         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16872 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16873         flag=no
16874 # We always add these in PostgreSQL
16875 #       case "${host_cpu}-${host_os}" in
16876 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16877 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16878 #       esac
16879         echo "$as_me:$LINENO: result: ${flag}" >&5
16880 echo "${ECHO_T}${flag}" >&6
16881         if test "x$flag" != xno; then
16882                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16883         fi
16884
16885         LIBS="$save_LIBS"
16886         CFLAGS="$save_CFLAGS"
16887
16888 # Supporting cc_r would require a special CC in all places that
16889 # use libpq, and that is ugly, so we don't do it.  Users can still
16890 # define their compiler as cc_r to do thread builds of everything.
16891         # More AIX lossage: must compile with cc_r
16892         # Extract the first word of "cc_r", so it can be a program name with args.
16893 set dummy cc_r; ac_word=$2
16894 echo "$as_me:$LINENO: checking for $ac_word" >&5
16895 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16896 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16897   echo $ECHO_N "(cached) $ECHO_C" >&6
16898 else
16899   if test -n "$PTHREAD_CC"; then
16900   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16901 else
16902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16903 for as_dir in $PATH
16904 do
16905   IFS=$as_save_IFS
16906   test -z "$as_dir" && as_dir=.
16907   for ac_exec_ext in '' $ac_executable_extensions; do
16908   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16909     ac_cv_prog_PTHREAD_CC="cc_r"
16910     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16911     break 2
16912   fi
16913 done
16914 done
16915
16916   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16917 fi
16918 fi
16919 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16920 if test -n "$PTHREAD_CC"; then
16921   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16922 echo "${ECHO_T}$PTHREAD_CC" >&6
16923 else
16924   echo "$as_me:$LINENO: result: no" >&5
16925 echo "${ECHO_T}no" >&6
16926 fi
16927
16928 else
16929         PTHREAD_CC="$CC"
16930 fi
16931
16932
16933
16934
16935
16936 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16937 if test x"$acx_pthread_ok" = xyes; then
16938
16939 cat >>confdefs.h <<\_ACEOF
16940 #define HAVE_PTHREAD 1
16941 _ACEOF
16942
16943         :
16944 else
16945         acx_pthread_ok=no
16946
16947 fi
16948 ac_ext=c
16949 ac_cpp='$CPP $CPPFLAGS'
16950 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16951 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16952 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16953
16954         # set thread flags
16955
16956 # Some platforms use these, so just defineed them.  They can't hurt if they
16957 # are not supported.
16958 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16959
16960
16961 # At this point, we don't want to muck with the compiler name for threading.
16962 # Let's see who fails, perhaps AIX.  2004-04-23
16963 if test "$PTHREAD_CC" != "$CC"; then
16964 { { echo "$as_me:$LINENO: error:
16965 PostgreSQL does not support platforms that require a special
16966 compiler binary for thread-safety.
16967 " >&5
16968 echo "$as_me: error:
16969 PostgreSQL does not support platforms that require a special
16970 compiler binary for thread-safety.
16971 " >&2;}
16972    { (exit 1); exit 1; }; }
16973 fi
16974
16975 if test "$THREAD_SUPPORT" = no; then
16976 { { echo "$as_me:$LINENO: error:
16977 Cannot enable threads on your platform.
16978 Your platform is known to not support thread-safe programs.
16979 For details, compile and run src/bin/pg_thread_test.
16980 " >&5
16981 echo "$as_me: error:
16982 Cannot enable threads on your platform.
16983 Your platform is known to not support thread-safe programs.
16984 For details, compile and run src/bin/pg_thread_test.
16985 " >&2;}
16986    { (exit 1); exit 1; }; }
16987 fi
16988
16989 # Check for *_r functions
16990 _CFLAGS="$CFLAGS"
16991 _LIBS="$LIBS"
16992 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16993 LIBS="$LIBS $PTHREAD_LIBS"
16994
16995 if test "${ac_cv_header_pthread_h+set}" = set; then
16996   echo "$as_me:$LINENO: checking for pthread.h" >&5
16997 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16998 if test "${ac_cv_header_pthread_h+set}" = set; then
16999   echo $ECHO_N "(cached) $ECHO_C" >&6
17000 fi
17001 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
17002 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
17003 else
17004   # Is the header compilable?
17005 echo "$as_me:$LINENO: checking pthread.h usability" >&5
17006 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
17007 cat >conftest.$ac_ext <<_ACEOF
17008 /* confdefs.h.  */
17009 _ACEOF
17010 cat confdefs.h >>conftest.$ac_ext
17011 cat >>conftest.$ac_ext <<_ACEOF
17012 /* end confdefs.h.  */
17013 $ac_includes_default
17014 #include <pthread.h>
17015 _ACEOF
17016 rm -f conftest.$ac_objext
17017 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17018   (eval $ac_compile) 2>conftest.er1
17019   ac_status=$?
17020   grep -v '^ *+' conftest.er1 >conftest.err
17021   rm -f conftest.er1
17022   cat conftest.err >&5
17023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17024   (exit $ac_status); } &&
17025          { ac_try='test -z "$ac_c_werror_flag"
17026                          || test ! -s conftest.err'
17027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17028   (eval $ac_try) 2>&5
17029   ac_status=$?
17030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17031   (exit $ac_status); }; } &&
17032          { ac_try='test -s conftest.$ac_objext'
17033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17034   (eval $ac_try) 2>&5
17035   ac_status=$?
17036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17037   (exit $ac_status); }; }; then
17038   ac_header_compiler=yes
17039 else
17040   echo "$as_me: failed program was:" >&5
17041 sed 's/^/| /' conftest.$ac_ext >&5
17042
17043 ac_header_compiler=no
17044 fi
17045 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17046 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17047 echo "${ECHO_T}$ac_header_compiler" >&6
17048
17049 # Is the header present?
17050 echo "$as_me:$LINENO: checking pthread.h presence" >&5
17051 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
17052 cat >conftest.$ac_ext <<_ACEOF
17053 /* confdefs.h.  */
17054 _ACEOF
17055 cat confdefs.h >>conftest.$ac_ext
17056 cat >>conftest.$ac_ext <<_ACEOF
17057 /* end confdefs.h.  */
17058 #include <pthread.h>
17059 _ACEOF
17060 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17062   ac_status=$?
17063   grep -v '^ *+' conftest.er1 >conftest.err
17064   rm -f conftest.er1
17065   cat conftest.err >&5
17066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17067   (exit $ac_status); } >/dev/null; then
17068   if test -s conftest.err; then
17069     ac_cpp_err=$ac_c_preproc_warn_flag
17070     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17071   else
17072     ac_cpp_err=
17073   fi
17074 else
17075   ac_cpp_err=yes
17076 fi
17077 if test -z "$ac_cpp_err"; then
17078   ac_header_preproc=yes
17079 else
17080   echo "$as_me: failed program was:" >&5
17081 sed 's/^/| /' conftest.$ac_ext >&5
17082
17083   ac_header_preproc=no
17084 fi
17085 rm -f conftest.err conftest.$ac_ext
17086 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17087 echo "${ECHO_T}$ac_header_preproc" >&6
17088
17089 # So?  What about this header?
17090 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17091   yes:no: )
17092     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
17093 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17094     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
17095 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
17096     ac_header_preproc=yes
17097     ;;
17098   no:yes:* )
17099     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
17100 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
17101     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
17102 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
17103     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
17104 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
17105     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
17106 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17107     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
17108 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
17109     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
17110 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
17111     (
17112       cat <<\_ASBOX
17113 ## ---------------------------------------- ##
17114 ## Report this to pgsql-bugs@postgresql.org ##
17115 ## ---------------------------------------- ##
17116 _ASBOX
17117     ) |
17118       sed "s/^/$as_me: WARNING:     /" >&2
17119     ;;
17120 esac
17121 echo "$as_me:$LINENO: checking for pthread.h" >&5
17122 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
17123 if test "${ac_cv_header_pthread_h+set}" = set; then
17124   echo $ECHO_N "(cached) $ECHO_C" >&6
17125 else
17126   ac_cv_header_pthread_h=$ac_header_preproc
17127 fi
17128 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
17129 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
17130
17131 fi
17132 if test $ac_cv_header_pthread_h = yes; then
17133   :
17134 else
17135   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
17136 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
17137    { (exit 1); exit 1; }; }
17138 fi
17139
17140
17141
17142
17143
17144
17145 for ac_func in strerror_r getpwuid_r gethostbyname_r
17146 do
17147 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17148 echo "$as_me:$LINENO: checking for $ac_func" >&5
17149 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17150 if eval "test \"\${$as_ac_var+set}\" = set"; then
17151   echo $ECHO_N "(cached) $ECHO_C" >&6
17152 else
17153   cat >conftest.$ac_ext <<_ACEOF
17154 /* confdefs.h.  */
17155 _ACEOF
17156 cat confdefs.h >>conftest.$ac_ext
17157 cat >>conftest.$ac_ext <<_ACEOF
17158 /* end confdefs.h.  */
17159 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17160    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17161 #define $ac_func innocuous_$ac_func
17162
17163 /* System header to define __stub macros and hopefully few prototypes,
17164     which can conflict with char $ac_func (); below.
17165     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17166     <limits.h> exists even on freestanding compilers.  */
17167
17168 #ifdef __STDC__
17169 # include <limits.h>
17170 #else
17171 # include <assert.h>
17172 #endif
17173
17174 #undef $ac_func
17175
17176 /* Override any gcc2 internal prototype to avoid an error.  */
17177 #ifdef __cplusplus
17178 extern "C"
17179 {
17180 #endif
17181 /* We use char because int might match the return type of a gcc2
17182    builtin and then its argument prototype would still apply.  */
17183 char $ac_func ();
17184 /* The GNU C library defines this for functions which it implements
17185     to always fail with ENOSYS.  Some functions are actually named
17186     something starting with __ and the normal name is an alias.  */
17187 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17188 choke me
17189 #else
17190 char (*f) () = $ac_func;
17191 #endif
17192 #ifdef __cplusplus
17193 }
17194 #endif
17195
17196 int
17197 main ()
17198 {
17199 return f != $ac_func;
17200   ;
17201   return 0;
17202 }
17203 _ACEOF
17204 rm -f conftest.$ac_objext conftest$ac_exeext
17205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17206   (eval $ac_link) 2>conftest.er1
17207   ac_status=$?
17208   grep -v '^ *+' conftest.er1 >conftest.err
17209   rm -f conftest.er1
17210   cat conftest.err >&5
17211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17212   (exit $ac_status); } &&
17213          { ac_try='test -z "$ac_c_werror_flag"
17214                          || test ! -s conftest.err'
17215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17216   (eval $ac_try) 2>&5
17217   ac_status=$?
17218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17219   (exit $ac_status); }; } &&
17220          { ac_try='test -s conftest$ac_exeext'
17221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17222   (eval $ac_try) 2>&5
17223   ac_status=$?
17224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17225   (exit $ac_status); }; }; then
17226   eval "$as_ac_var=yes"
17227 else
17228   echo "$as_me: failed program was:" >&5
17229 sed 's/^/| /' conftest.$ac_ext >&5
17230
17231 eval "$as_ac_var=no"
17232 fi
17233 rm -f conftest.err conftest.$ac_objext \
17234       conftest$ac_exeext conftest.$ac_ext
17235 fi
17236 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17237 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17238 if test `eval echo '${'$as_ac_var'}'` = yes; then
17239   cat >>confdefs.h <<_ACEOF
17240 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17241 _ACEOF
17242
17243 fi
17244 done
17245
17246
17247 # Do test here with the proper thread flags
17248 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17249 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17250 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17251   echo $ECHO_N "(cached) $ECHO_C" >&6
17252 else
17253   cat >conftest.$ac_ext <<_ACEOF
17254 /* confdefs.h.  */
17255 _ACEOF
17256 cat confdefs.h >>conftest.$ac_ext
17257 cat >>conftest.$ac_ext <<_ACEOF
17258 /* end confdefs.h.  */
17259 #include <sys/types.h>
17260 #include <pwd.h>
17261 int
17262 main ()
17263 {
17264 uid_t uid;
17265 struct passwd *space;
17266 char *buf;
17267 size_t bufsize;
17268 struct passwd **result;
17269 getpwuid_r(uid, space, buf, bufsize, result);
17270   ;
17271   return 0;
17272 }
17273 _ACEOF
17274 rm -f conftest.$ac_objext
17275 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17276   (eval $ac_compile) 2>conftest.er1
17277   ac_status=$?
17278   grep -v '^ *+' conftest.er1 >conftest.err
17279   rm -f conftest.er1
17280   cat conftest.err >&5
17281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17282   (exit $ac_status); } &&
17283          { ac_try='test -z "$ac_c_werror_flag"
17284                          || test ! -s conftest.err'
17285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17286   (eval $ac_try) 2>&5
17287   ac_status=$?
17288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17289   (exit $ac_status); }; } &&
17290          { ac_try='test -s conftest.$ac_objext'
17291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17292   (eval $ac_try) 2>&5
17293   ac_status=$?
17294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17295   (exit $ac_status); }; }; then
17296   pgac_func_getpwuid_r_5arg=yes
17297 else
17298   echo "$as_me: failed program was:" >&5
17299 sed 's/^/| /' conftest.$ac_ext >&5
17300
17301 pgac_func_getpwuid_r_5arg=no
17302 fi
17303 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17304 fi
17305 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17306 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17307 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17308
17309 cat >>confdefs.h <<\_ACEOF
17310 #define GETPWUID_R_5ARG
17311 _ACEOF
17312
17313 fi
17314
17315 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17316 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17317 if test "${pgac_func_strerror_r_int+set}" = set; then
17318   echo $ECHO_N "(cached) $ECHO_C" >&6
17319 else
17320   cat >conftest.$ac_ext <<_ACEOF
17321 /* confdefs.h.  */
17322 _ACEOF
17323 cat confdefs.h >>conftest.$ac_ext
17324 cat >>conftest.$ac_ext <<_ACEOF
17325 /* end confdefs.h.  */
17326 #include <string.h>
17327 int
17328 main ()
17329 {
17330 #ifndef _AIX
17331 int strerror_r(int, char *, size_t);
17332 #else
17333 /* Older AIX has 'int' for the third argument so we don't test the args. */
17334 int strerror_r();
17335 #endif
17336   ;
17337   return 0;
17338 }
17339 _ACEOF
17340 rm -f conftest.$ac_objext
17341 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17342   (eval $ac_compile) 2>conftest.er1
17343   ac_status=$?
17344   grep -v '^ *+' conftest.er1 >conftest.err
17345   rm -f conftest.er1
17346   cat conftest.err >&5
17347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17348   (exit $ac_status); } &&
17349          { ac_try='test -z "$ac_c_werror_flag"
17350                          || test ! -s conftest.err'
17351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17352   (eval $ac_try) 2>&5
17353   ac_status=$?
17354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17355   (exit $ac_status); }; } &&
17356          { ac_try='test -s conftest.$ac_objext'
17357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17358   (eval $ac_try) 2>&5
17359   ac_status=$?
17360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17361   (exit $ac_status); }; }; then
17362   pgac_func_strerror_r_int=yes
17363 else
17364   echo "$as_me: failed program was:" >&5
17365 sed 's/^/| /' conftest.$ac_ext >&5
17366
17367 pgac_func_strerror_r_int=no
17368 fi
17369 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17370 fi
17371 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17372 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17373 if test x"$pgac_func_strerror_r_int" = xyes ; then
17374
17375 cat >>confdefs.h <<\_ACEOF
17376 #define STRERROR_R_INT
17377 _ACEOF
17378
17379 fi
17380
17381
17382 CFLAGS="$_CFLAGS"
17383 LIBS="$_LIBS"
17384
17385 else
17386 # do not use values from template file
17387 PTHREAD_CFLAGS=
17388 PTHREAD_LIBS=
17389 fi
17390
17391
17392
17393
17394
17395 # This test makes sure that run tests work at all.  Sometimes a shared
17396 # library is found by the linker, but the runtime linker can't find it.
17397 # This check should come after all modifications of compiler or linker
17398 # variables, and before any other run tests.
17399 echo "$as_me:$LINENO: checking test program" >&5
17400 echo $ECHO_N "checking test program... $ECHO_C" >&6
17401 if test "$cross_compiling" = yes; then
17402   echo "$as_me:$LINENO: result: cross-compiling" >&5
17403 echo "${ECHO_T}cross-compiling" >&6
17404 else
17405   cat >conftest.$ac_ext <<_ACEOF
17406 /* confdefs.h.  */
17407 _ACEOF
17408 cat confdefs.h >>conftest.$ac_ext
17409 cat >>conftest.$ac_ext <<_ACEOF
17410 /* end confdefs.h.  */
17411 int main() { return 0; }
17412 _ACEOF
17413 rm -f conftest$ac_exeext
17414 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17415   (eval $ac_link) 2>&5
17416   ac_status=$?
17417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17418   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17420   (eval $ac_try) 2>&5
17421   ac_status=$?
17422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423   (exit $ac_status); }; }; then
17424   echo "$as_me:$LINENO: result: ok" >&5
17425 echo "${ECHO_T}ok" >&6
17426 else
17427   echo "$as_me: program exited with status $ac_status" >&5
17428 echo "$as_me: failed program was:" >&5
17429 sed 's/^/| /' conftest.$ac_ext >&5
17430
17431 ( exit $ac_status )
17432 echo "$as_me:$LINENO: result: failed" >&5
17433 echo "${ECHO_T}failed" >&6
17434 { { echo "$as_me:$LINENO: error:
17435 *** Could not execute a simple test program.  This may be a problem
17436 *** related to locating shared libraries.  Check the file 'config.log'
17437 *** for the exact reason." >&5
17438 echo "$as_me: error:
17439 *** Could not execute a simple test program.  This may be a problem
17440 *** related to locating shared libraries.  Check the file 'config.log'
17441 *** for the exact reason." >&2;}
17442    { (exit 1); exit 1; }; }
17443 fi
17444 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17445 fi
17446
17447 # --------------------
17448 # Run tests below here
17449 # --------------------
17450
17451 # Force use of our snprintf if system's doesn't do arg control
17452 # See comment above at snprintf test for details.
17453 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17454   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17455 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17456 if test "${pgac_cv_printf_arg_control+set}" = set; then
17457   echo $ECHO_N "(cached) $ECHO_C" >&6
17458 else
17459   if test "$cross_compiling" = yes; then
17460   pgac_cv_printf_arg_control=cross
17461 else
17462   cat >conftest.$ac_ext <<_ACEOF
17463 /* confdefs.h.  */
17464 _ACEOF
17465 cat confdefs.h >>conftest.$ac_ext
17466 cat >>conftest.$ac_ext <<_ACEOF
17467 /* end confdefs.h.  */
17468 #include <stdio.h>
17469 #include <string.h>
17470
17471 int main()
17472 {
17473   char buf[100];
17474
17475   /* can it swap arguments? */
17476   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17477   if (strcmp(buf, "4 3") != 0)
17478     return 1;
17479   return 0;
17480 }
17481 _ACEOF
17482 rm -f conftest$ac_exeext
17483 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17484   (eval $ac_link) 2>&5
17485   ac_status=$?
17486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17487   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17489   (eval $ac_try) 2>&5
17490   ac_status=$?
17491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17492   (exit $ac_status); }; }; then
17493   pgac_cv_printf_arg_control=yes
17494 else
17495   echo "$as_me: program exited with status $ac_status" >&5
17496 echo "$as_me: failed program was:" >&5
17497 sed 's/^/| /' conftest.$ac_ext >&5
17498
17499 ( exit $ac_status )
17500 pgac_cv_printf_arg_control=no
17501 fi
17502 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17503 fi
17504
17505 fi
17506 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17507 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17508
17509   if test $pgac_cv_printf_arg_control != yes ; then
17510     pgac_need_repl_snprintf=yes
17511   fi
17512 fi
17513
17514
17515
17516 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17517 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17518 if test "${pgac_cv_type_long_int_64+set}" = set; then
17519   echo $ECHO_N "(cached) $ECHO_C" >&6
17520 else
17521   if test "$cross_compiling" = yes; then
17522   # If cross-compiling, check the size reported by the compiler and
17523 # trust that the arithmetic works.
17524 cat >conftest.$ac_ext <<_ACEOF
17525 /* confdefs.h.  */
17526 _ACEOF
17527 cat confdefs.h >>conftest.$ac_ext
17528 cat >>conftest.$ac_ext <<_ACEOF
17529 /* end confdefs.h.  */
17530
17531 int
17532 main ()
17533 {
17534 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17535 test_array [0] = 0
17536
17537   ;
17538   return 0;
17539 }
17540 _ACEOF
17541 rm -f conftest.$ac_objext
17542 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17543   (eval $ac_compile) 2>conftest.er1
17544   ac_status=$?
17545   grep -v '^ *+' conftest.er1 >conftest.err
17546   rm -f conftest.er1
17547   cat conftest.err >&5
17548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17549   (exit $ac_status); } &&
17550          { ac_try='test -z "$ac_c_werror_flag"
17551                          || test ! -s conftest.err'
17552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17553   (eval $ac_try) 2>&5
17554   ac_status=$?
17555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17556   (exit $ac_status); }; } &&
17557          { ac_try='test -s conftest.$ac_objext'
17558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17559   (eval $ac_try) 2>&5
17560   ac_status=$?
17561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17562   (exit $ac_status); }; }; then
17563   pgac_cv_type_long_int_64=yes
17564 else
17565   echo "$as_me: failed program was:" >&5
17566 sed 's/^/| /' conftest.$ac_ext >&5
17567
17568 pgac_cv_type_long_int_64=no
17569 fi
17570 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17571 else
17572   cat >conftest.$ac_ext <<_ACEOF
17573 /* confdefs.h.  */
17574 _ACEOF
17575 cat confdefs.h >>conftest.$ac_ext
17576 cat >>conftest.$ac_ext <<_ACEOF
17577 /* end confdefs.h.  */
17578 typedef long int ac_int64;
17579
17580 /*
17581  * These are globals to discourage the compiler from folding all the
17582  * arithmetic tests down to compile-time constants.
17583  */
17584 ac_int64 a = 20000001;
17585 ac_int64 b = 40000005;
17586
17587 int does_int64_work()
17588 {
17589   ac_int64 c,d;
17590
17591   if (sizeof(ac_int64) != 8)
17592     return 0;                   /* definitely not the right size */
17593
17594   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17595   c = a * b;
17596   d = (c + b) / b;
17597   if (d != a+1)
17598     return 0;
17599   return 1;
17600 }
17601 main() {
17602   exit(! does_int64_work());
17603 }
17604 _ACEOF
17605 rm -f conftest$ac_exeext
17606 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17607   (eval $ac_link) 2>&5
17608   ac_status=$?
17609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17610   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17612   (eval $ac_try) 2>&5
17613   ac_status=$?
17614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17615   (exit $ac_status); }; }; then
17616   pgac_cv_type_long_int_64=yes
17617 else
17618   echo "$as_me: program exited with status $ac_status" >&5
17619 echo "$as_me: failed program was:" >&5
17620 sed 's/^/| /' conftest.$ac_ext >&5
17621
17622 ( exit $ac_status )
17623 pgac_cv_type_long_int_64=no
17624 fi
17625 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17626 fi
17627 fi
17628 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17629 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17630
17631 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17632 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17633
17634 cat >>confdefs.h <<\_ACEOF
17635 #define HAVE_LONG_INT_64
17636 _ACEOF
17637
17638 fi
17639
17640
17641 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17642   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17643 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17644 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17645   echo $ECHO_N "(cached) $ECHO_C" >&6
17646 else
17647   if test "$cross_compiling" = yes; then
17648   # If cross-compiling, check the size reported by the compiler and
17649 # trust that the arithmetic works.
17650 cat >conftest.$ac_ext <<_ACEOF
17651 /* confdefs.h.  */
17652 _ACEOF
17653 cat confdefs.h >>conftest.$ac_ext
17654 cat >>conftest.$ac_ext <<_ACEOF
17655 /* end confdefs.h.  */
17656
17657 int
17658 main ()
17659 {
17660 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17661 test_array [0] = 0
17662
17663   ;
17664   return 0;
17665 }
17666 _ACEOF
17667 rm -f conftest.$ac_objext
17668 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17669   (eval $ac_compile) 2>conftest.er1
17670   ac_status=$?
17671   grep -v '^ *+' conftest.er1 >conftest.err
17672   rm -f conftest.er1
17673   cat conftest.err >&5
17674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17675   (exit $ac_status); } &&
17676          { ac_try='test -z "$ac_c_werror_flag"
17677                          || test ! -s conftest.err'
17678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17679   (eval $ac_try) 2>&5
17680   ac_status=$?
17681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17682   (exit $ac_status); }; } &&
17683          { ac_try='test -s conftest.$ac_objext'
17684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17685   (eval $ac_try) 2>&5
17686   ac_status=$?
17687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17688   (exit $ac_status); }; }; then
17689   pgac_cv_type_long_long_int_64=yes
17690 else
17691   echo "$as_me: failed program was:" >&5
17692 sed 's/^/| /' conftest.$ac_ext >&5
17693
17694 pgac_cv_type_long_long_int_64=no
17695 fi
17696 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17697 else
17698   cat >conftest.$ac_ext <<_ACEOF
17699 /* confdefs.h.  */
17700 _ACEOF
17701 cat confdefs.h >>conftest.$ac_ext
17702 cat >>conftest.$ac_ext <<_ACEOF
17703 /* end confdefs.h.  */
17704 typedef long long int ac_int64;
17705
17706 /*
17707  * These are globals to discourage the compiler from folding all the
17708  * arithmetic tests down to compile-time constants.
17709  */
17710 ac_int64 a = 20000001;
17711 ac_int64 b = 40000005;
17712
17713 int does_int64_work()
17714 {
17715   ac_int64 c,d;
17716
17717   if (sizeof(ac_int64) != 8)
17718     return 0;                   /* definitely not the right size */
17719
17720   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17721   c = a * b;
17722   d = (c + b) / b;
17723   if (d != a+1)
17724     return 0;
17725   return 1;
17726 }
17727 main() {
17728   exit(! does_int64_work());
17729 }
17730 _ACEOF
17731 rm -f conftest$ac_exeext
17732 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17733   (eval $ac_link) 2>&5
17734   ac_status=$?
17735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17736   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17738   (eval $ac_try) 2>&5
17739   ac_status=$?
17740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17741   (exit $ac_status); }; }; then
17742   pgac_cv_type_long_long_int_64=yes
17743 else
17744   echo "$as_me: program exited with status $ac_status" >&5
17745 echo "$as_me: failed program was:" >&5
17746 sed 's/^/| /' conftest.$ac_ext >&5
17747
17748 ( exit $ac_status )
17749 pgac_cv_type_long_long_int_64=no
17750 fi
17751 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17752 fi
17753 fi
17754 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17755 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17756
17757 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17758 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17759
17760 cat >>confdefs.h <<\_ACEOF
17761 #define HAVE_LONG_LONG_INT_64
17762 _ACEOF
17763
17764 fi
17765
17766 fi
17767
17768
17769
17770 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17771   cat >conftest.$ac_ext <<_ACEOF
17772 /* confdefs.h.  */
17773 _ACEOF
17774 cat confdefs.h >>conftest.$ac_ext
17775 cat >>conftest.$ac_ext <<_ACEOF
17776 /* end confdefs.h.  */
17777
17778 #define INT64CONST(x)  x##LL
17779 long long int foo = INT64CONST(0x1234567890123456);
17780
17781 int
17782 main ()
17783 {
17784
17785   ;
17786   return 0;
17787 }
17788 _ACEOF
17789 rm -f conftest.$ac_objext
17790 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17791   (eval $ac_compile) 2>conftest.er1
17792   ac_status=$?
17793   grep -v '^ *+' conftest.er1 >conftest.err
17794   rm -f conftest.er1
17795   cat conftest.err >&5
17796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17797   (exit $ac_status); } &&
17798          { ac_try='test -z "$ac_c_werror_flag"
17799                          || test ! -s conftest.err'
17800   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17801   (eval $ac_try) 2>&5
17802   ac_status=$?
17803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17804   (exit $ac_status); }; } &&
17805          { ac_try='test -s conftest.$ac_objext'
17806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17807   (eval $ac_try) 2>&5
17808   ac_status=$?
17809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17810   (exit $ac_status); }; }; then
17811
17812 cat >>confdefs.h <<\_ACEOF
17813 #define HAVE_LL_CONSTANTS 1
17814 _ACEOF
17815
17816 else
17817   echo "$as_me: failed program was:" >&5
17818 sed 's/^/| /' conftest.$ac_ext >&5
17819
17820 fi
17821 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17822 fi
17823
17824
17825 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17826 # we found we need to use "long long int", better check.  We cope with
17827 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17828 # work, fall back to our own snprintf emulation (which we know uses %lld).
17829
17830 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17831   if test $pgac_need_repl_snprintf = no; then
17832     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17833 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17834 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17835   echo $ECHO_N "(cached) $ECHO_C" >&6
17836 else
17837   for pgac_format in '%lld' '%qd' '%I64d'; do
17838 if test "$cross_compiling" = yes; then
17839   pgac_cv_snprintf_long_long_int_format=cross; break
17840 else
17841   cat >conftest.$ac_ext <<_ACEOF
17842 /* confdefs.h.  */
17843 _ACEOF
17844 cat confdefs.h >>conftest.$ac_ext
17845 cat >>conftest.$ac_ext <<_ACEOF
17846 /* end confdefs.h.  */
17847 #include <stdio.h>
17848 typedef long long int ac_int64;
17849 #define INT64_FORMAT "$pgac_format"
17850
17851 ac_int64 a = 20000001;
17852 ac_int64 b = 40000005;
17853
17854 int does_int64_snprintf_work()
17855 {
17856   ac_int64 c;
17857   char buf[100];
17858
17859   if (sizeof(ac_int64) != 8)
17860     return 0;                   /* doesn't look like the right size */
17861
17862   c = a * b;
17863   snprintf(buf, 100, INT64_FORMAT, c);
17864   if (strcmp(buf, "800000140000005") != 0)
17865     return 0;                   /* either multiply or snprintf is busted */
17866   return 1;
17867 }
17868 main() {
17869   exit(! does_int64_snprintf_work());
17870 }
17871 _ACEOF
17872 rm -f conftest$ac_exeext
17873 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17874   (eval $ac_link) 2>&5
17875   ac_status=$?
17876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17877   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17879   (eval $ac_try) 2>&5
17880   ac_status=$?
17881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17882   (exit $ac_status); }; }; then
17883   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17884 else
17885   echo "$as_me: program exited with status $ac_status" >&5
17886 echo "$as_me: failed program was:" >&5
17887 sed 's/^/| /' conftest.$ac_ext >&5
17888
17889 fi
17890 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17891 fi
17892 done
17893 fi
17894
17895 LONG_LONG_INT_FORMAT=''
17896
17897 case $pgac_cv_snprintf_long_long_int_format in
17898   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17899 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17900   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17901 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17902          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17903   *)     echo "$as_me:$LINENO: result: none" >&5
17904 echo "${ECHO_T}none" >&6;;
17905 esac
17906     if test "$LONG_LONG_INT_FORMAT" = ""; then
17907       # Force usage of our own snprintf, since system snprintf is broken
17908       pgac_need_repl_snprintf=yes
17909       LONG_LONG_INT_FORMAT='%lld'
17910     fi
17911   else
17912     # Here if we previously decided we needed to use our own snprintf
17913     LONG_LONG_INT_FORMAT='%lld'
17914   fi
17915   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17916   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17917   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17918 else
17919   # Here if we are not using 'long long int' at all
17920   INT64_FORMAT='"%ld"'
17921   UINT64_FORMAT='"%lu"'
17922 fi
17923
17924
17925 cat >>confdefs.h <<_ACEOF
17926 #define INT64_FORMAT $INT64_FORMAT
17927 _ACEOF
17928
17929
17930
17931 cat >>confdefs.h <<_ACEOF
17932 #define UINT64_FORMAT $UINT64_FORMAT
17933 _ACEOF
17934
17935
17936 # Now we have checked all the reasons to replace snprintf
17937 if test $pgac_need_repl_snprintf = yes; then
17938
17939 cat >>confdefs.h <<\_ACEOF
17940 #define USE_REPL_SNPRINTF 1
17941 _ACEOF
17942
17943   case $LIBOBJS in
17944     "snprintf.$ac_objext"   | \
17945   *" snprintf.$ac_objext"   | \
17946     "snprintf.$ac_objext "* | \
17947   *" snprintf.$ac_objext "* ) ;;
17948   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17949 esac
17950
17951 fi
17952
17953 # Need a #define for the size of Datum (unsigned long)
17954 echo "$as_me:$LINENO: checking for unsigned long" >&5
17955 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17956 if test "${ac_cv_type_unsigned_long+set}" = set; then
17957   echo $ECHO_N "(cached) $ECHO_C" >&6
17958 else
17959   cat >conftest.$ac_ext <<_ACEOF
17960 /* confdefs.h.  */
17961 _ACEOF
17962 cat confdefs.h >>conftest.$ac_ext
17963 cat >>conftest.$ac_ext <<_ACEOF
17964 /* end confdefs.h.  */
17965 $ac_includes_default
17966 int
17967 main ()
17968 {
17969 if ((unsigned long *) 0)
17970   return 0;
17971 if (sizeof (unsigned long))
17972   return 0;
17973   ;
17974   return 0;
17975 }
17976 _ACEOF
17977 rm -f conftest.$ac_objext
17978 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17979   (eval $ac_compile) 2>conftest.er1
17980   ac_status=$?
17981   grep -v '^ *+' conftest.er1 >conftest.err
17982   rm -f conftest.er1
17983   cat conftest.err >&5
17984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17985   (exit $ac_status); } &&
17986          { ac_try='test -z "$ac_c_werror_flag"
17987                          || test ! -s conftest.err'
17988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17989   (eval $ac_try) 2>&5
17990   ac_status=$?
17991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17992   (exit $ac_status); }; } &&
17993          { ac_try='test -s conftest.$ac_objext'
17994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17995   (eval $ac_try) 2>&5
17996   ac_status=$?
17997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17998   (exit $ac_status); }; }; then
17999   ac_cv_type_unsigned_long=yes
18000 else
18001   echo "$as_me: failed program was:" >&5
18002 sed 's/^/| /' conftest.$ac_ext >&5
18003
18004 ac_cv_type_unsigned_long=no
18005 fi
18006 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18007 fi
18008 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
18009 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
18010
18011 echo "$as_me:$LINENO: checking size of unsigned long" >&5
18012 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
18013 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
18014   echo $ECHO_N "(cached) $ECHO_C" >&6
18015 else
18016   if test "$ac_cv_type_unsigned_long" = yes; then
18017   # The cast to unsigned long works around a bug in the HP C Compiler
18018   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18019   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18020   # This bug is HP SR number 8606223364.
18021   if test "$cross_compiling" = yes; then
18022   # Depending upon the size, compute the lo and hi bounds.
18023 cat >conftest.$ac_ext <<_ACEOF
18024 /* confdefs.h.  */
18025 _ACEOF
18026 cat confdefs.h >>conftest.$ac_ext
18027 cat >>conftest.$ac_ext <<_ACEOF
18028 /* end confdefs.h.  */
18029 $ac_includes_default
18030 int
18031 main ()
18032 {
18033 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
18034 test_array [0] = 0
18035
18036   ;
18037   return 0;
18038 }
18039 _ACEOF
18040 rm -f conftest.$ac_objext
18041 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18042   (eval $ac_compile) 2>conftest.er1
18043   ac_status=$?
18044   grep -v '^ *+' conftest.er1 >conftest.err
18045   rm -f conftest.er1
18046   cat conftest.err >&5
18047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18048   (exit $ac_status); } &&
18049          { ac_try='test -z "$ac_c_werror_flag"
18050                          || test ! -s conftest.err'
18051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18052   (eval $ac_try) 2>&5
18053   ac_status=$?
18054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18055   (exit $ac_status); }; } &&
18056          { ac_try='test -s conftest.$ac_objext'
18057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18058   (eval $ac_try) 2>&5
18059   ac_status=$?
18060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18061   (exit $ac_status); }; }; then
18062   ac_lo=0 ac_mid=0
18063   while :; do
18064     cat >conftest.$ac_ext <<_ACEOF
18065 /* confdefs.h.  */
18066 _ACEOF
18067 cat confdefs.h >>conftest.$ac_ext
18068 cat >>conftest.$ac_ext <<_ACEOF
18069 /* end confdefs.h.  */
18070 $ac_includes_default
18071 int
18072 main ()
18073 {
18074 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18075 test_array [0] = 0
18076
18077   ;
18078   return 0;
18079 }
18080 _ACEOF
18081 rm -f conftest.$ac_objext
18082 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18083   (eval $ac_compile) 2>conftest.er1
18084   ac_status=$?
18085   grep -v '^ *+' conftest.er1 >conftest.err
18086   rm -f conftest.er1
18087   cat conftest.err >&5
18088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18089   (exit $ac_status); } &&
18090          { ac_try='test -z "$ac_c_werror_flag"
18091                          || test ! -s conftest.err'
18092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18093   (eval $ac_try) 2>&5
18094   ac_status=$?
18095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18096   (exit $ac_status); }; } &&
18097          { ac_try='test -s conftest.$ac_objext'
18098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18099   (eval $ac_try) 2>&5
18100   ac_status=$?
18101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18102   (exit $ac_status); }; }; then
18103   ac_hi=$ac_mid; break
18104 else
18105   echo "$as_me: failed program was:" >&5
18106 sed 's/^/| /' conftest.$ac_ext >&5
18107
18108 ac_lo=`expr $ac_mid + 1`
18109                     if test $ac_lo -le $ac_mid; then
18110                       ac_lo= ac_hi=
18111                       break
18112                     fi
18113                     ac_mid=`expr 2 '*' $ac_mid + 1`
18114 fi
18115 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18116   done
18117 else
18118   echo "$as_me: failed program was:" >&5
18119 sed 's/^/| /' conftest.$ac_ext >&5
18120
18121 cat >conftest.$ac_ext <<_ACEOF
18122 /* confdefs.h.  */
18123 _ACEOF
18124 cat confdefs.h >>conftest.$ac_ext
18125 cat >>conftest.$ac_ext <<_ACEOF
18126 /* end confdefs.h.  */
18127 $ac_includes_default
18128 int
18129 main ()
18130 {
18131 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
18132 test_array [0] = 0
18133
18134   ;
18135   return 0;
18136 }
18137 _ACEOF
18138 rm -f conftest.$ac_objext
18139 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18140   (eval $ac_compile) 2>conftest.er1
18141   ac_status=$?
18142   grep -v '^ *+' conftest.er1 >conftest.err
18143   rm -f conftest.er1
18144   cat conftest.err >&5
18145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18146   (exit $ac_status); } &&
18147          { ac_try='test -z "$ac_c_werror_flag"
18148                          || test ! -s conftest.err'
18149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18150   (eval $ac_try) 2>&5
18151   ac_status=$?
18152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18153   (exit $ac_status); }; } &&
18154          { ac_try='test -s conftest.$ac_objext'
18155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18156   (eval $ac_try) 2>&5
18157   ac_status=$?
18158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18159   (exit $ac_status); }; }; then
18160   ac_hi=-1 ac_mid=-1
18161   while :; do
18162     cat >conftest.$ac_ext <<_ACEOF
18163 /* confdefs.h.  */
18164 _ACEOF
18165 cat confdefs.h >>conftest.$ac_ext
18166 cat >>conftest.$ac_ext <<_ACEOF
18167 /* end confdefs.h.  */
18168 $ac_includes_default
18169 int
18170 main ()
18171 {
18172 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18173 test_array [0] = 0
18174
18175   ;
18176   return 0;
18177 }
18178 _ACEOF
18179 rm -f conftest.$ac_objext
18180 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18181   (eval $ac_compile) 2>conftest.er1
18182   ac_status=$?
18183   grep -v '^ *+' conftest.er1 >conftest.err
18184   rm -f conftest.er1
18185   cat conftest.err >&5
18186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18187   (exit $ac_status); } &&
18188          { ac_try='test -z "$ac_c_werror_flag"
18189                          || test ! -s conftest.err'
18190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18191   (eval $ac_try) 2>&5
18192   ac_status=$?
18193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18194   (exit $ac_status); }; } &&
18195          { ac_try='test -s conftest.$ac_objext'
18196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18197   (eval $ac_try) 2>&5
18198   ac_status=$?
18199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18200   (exit $ac_status); }; }; then
18201   ac_lo=$ac_mid; break
18202 else
18203   echo "$as_me: failed program was:" >&5
18204 sed 's/^/| /' conftest.$ac_ext >&5
18205
18206 ac_hi=`expr '(' $ac_mid ')' - 1`
18207                        if test $ac_mid -le $ac_hi; then
18208                          ac_lo= ac_hi=
18209                          break
18210                        fi
18211                        ac_mid=`expr 2 '*' $ac_mid`
18212 fi
18213 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18214   done
18215 else
18216   echo "$as_me: failed program was:" >&5
18217 sed 's/^/| /' conftest.$ac_ext >&5
18218
18219 ac_lo= ac_hi=
18220 fi
18221 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18222 fi
18223 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18224 # Binary search between lo and hi bounds.
18225 while test "x$ac_lo" != "x$ac_hi"; do
18226   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18227   cat >conftest.$ac_ext <<_ACEOF
18228 /* confdefs.h.  */
18229 _ACEOF
18230 cat confdefs.h >>conftest.$ac_ext
18231 cat >>conftest.$ac_ext <<_ACEOF
18232 /* end confdefs.h.  */
18233 $ac_includes_default
18234 int
18235 main ()
18236 {
18237 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18238 test_array [0] = 0
18239
18240   ;
18241   return 0;
18242 }
18243 _ACEOF
18244 rm -f conftest.$ac_objext
18245 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18246   (eval $ac_compile) 2>conftest.er1
18247   ac_status=$?
18248   grep -v '^ *+' conftest.er1 >conftest.err
18249   rm -f conftest.er1
18250   cat conftest.err >&5
18251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18252   (exit $ac_status); } &&
18253          { ac_try='test -z "$ac_c_werror_flag"
18254                          || test ! -s conftest.err'
18255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18256   (eval $ac_try) 2>&5
18257   ac_status=$?
18258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18259   (exit $ac_status); }; } &&
18260          { ac_try='test -s conftest.$ac_objext'
18261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18262   (eval $ac_try) 2>&5
18263   ac_status=$?
18264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18265   (exit $ac_status); }; }; then
18266   ac_hi=$ac_mid
18267 else
18268   echo "$as_me: failed program was:" >&5
18269 sed 's/^/| /' conftest.$ac_ext >&5
18270
18271 ac_lo=`expr '(' $ac_mid ')' + 1`
18272 fi
18273 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18274 done
18275 case $ac_lo in
18276 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18277 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18278 See \`config.log' for more details." >&5
18279 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18280 See \`config.log' for more details." >&2;}
18281    { (exit 1); exit 1; }; } ;;
18282 esac
18283 else
18284   if test "$cross_compiling" = yes; then
18285   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18286 See \`config.log' for more details." >&5
18287 echo "$as_me: error: cannot run test program while cross compiling
18288 See \`config.log' for more details." >&2;}
18289    { (exit 1); exit 1; }; }
18290 else
18291   cat >conftest.$ac_ext <<_ACEOF
18292 /* confdefs.h.  */
18293 _ACEOF
18294 cat confdefs.h >>conftest.$ac_ext
18295 cat >>conftest.$ac_ext <<_ACEOF
18296 /* end confdefs.h.  */
18297 $ac_includes_default
18298 long longval () { return (long) (sizeof (unsigned long)); }
18299 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18300 #include <stdio.h>
18301 #include <stdlib.h>
18302 int
18303 main ()
18304 {
18305
18306   FILE *f = fopen ("conftest.val", "w");
18307   if (! f)
18308     exit (1);
18309   if (((long) (sizeof (unsigned long))) < 0)
18310     {
18311       long i = longval ();
18312       if (i != ((long) (sizeof (unsigned long))))
18313         exit (1);
18314       fprintf (f, "%ld\n", i);
18315     }
18316   else
18317     {
18318       unsigned long i = ulongval ();
18319       if (i != ((long) (sizeof (unsigned long))))
18320         exit (1);
18321       fprintf (f, "%lu\n", i);
18322     }
18323   exit (ferror (f) || fclose (f) != 0);
18324
18325   ;
18326   return 0;
18327 }
18328 _ACEOF
18329 rm -f conftest$ac_exeext
18330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18331   (eval $ac_link) 2>&5
18332   ac_status=$?
18333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18334   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18336   (eval $ac_try) 2>&5
18337   ac_status=$?
18338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18339   (exit $ac_status); }; }; then
18340   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18341 else
18342   echo "$as_me: program exited with status $ac_status" >&5
18343 echo "$as_me: failed program was:" >&5
18344 sed 's/^/| /' conftest.$ac_ext >&5
18345
18346 ( exit $ac_status )
18347 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18348 See \`config.log' for more details." >&5
18349 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18350 See \`config.log' for more details." >&2;}
18351    { (exit 1); exit 1; }; }
18352 fi
18353 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18354 fi
18355 fi
18356 rm -f conftest.val
18357 else
18358   ac_cv_sizeof_unsigned_long=0
18359 fi
18360 fi
18361 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18362 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18363 cat >>confdefs.h <<_ACEOF
18364 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18365 _ACEOF
18366
18367
18368
18369 # And one for the size of size_t (enables tweaks for > 32bit address space)
18370 echo "$as_me:$LINENO: checking for size_t" >&5
18371 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18372 if test "${ac_cv_type_size_t+set}" = set; then
18373   echo $ECHO_N "(cached) $ECHO_C" >&6
18374 else
18375   cat >conftest.$ac_ext <<_ACEOF
18376 /* confdefs.h.  */
18377 _ACEOF
18378 cat confdefs.h >>conftest.$ac_ext
18379 cat >>conftest.$ac_ext <<_ACEOF
18380 /* end confdefs.h.  */
18381 $ac_includes_default
18382 int
18383 main ()
18384 {
18385 if ((size_t *) 0)
18386   return 0;
18387 if (sizeof (size_t))
18388   return 0;
18389   ;
18390   return 0;
18391 }
18392 _ACEOF
18393 rm -f conftest.$ac_objext
18394 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18395   (eval $ac_compile) 2>conftest.er1
18396   ac_status=$?
18397   grep -v '^ *+' conftest.er1 >conftest.err
18398   rm -f conftest.er1
18399   cat conftest.err >&5
18400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18401   (exit $ac_status); } &&
18402          { ac_try='test -z "$ac_c_werror_flag"
18403                          || test ! -s conftest.err'
18404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18405   (eval $ac_try) 2>&5
18406   ac_status=$?
18407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18408   (exit $ac_status); }; } &&
18409          { ac_try='test -s conftest.$ac_objext'
18410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18411   (eval $ac_try) 2>&5
18412   ac_status=$?
18413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18414   (exit $ac_status); }; }; then
18415   ac_cv_type_size_t=yes
18416 else
18417   echo "$as_me: failed program was:" >&5
18418 sed 's/^/| /' conftest.$ac_ext >&5
18419
18420 ac_cv_type_size_t=no
18421 fi
18422 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18423 fi
18424 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18425 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18426
18427 echo "$as_me:$LINENO: checking size of size_t" >&5
18428 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18429 if test "${ac_cv_sizeof_size_t+set}" = set; then
18430   echo $ECHO_N "(cached) $ECHO_C" >&6
18431 else
18432   if test "$ac_cv_type_size_t" = yes; then
18433   # The cast to unsigned long works around a bug in the HP C Compiler
18434   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18435   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18436   # This bug is HP SR number 8606223364.
18437   if test "$cross_compiling" = yes; then
18438   # Depending upon the size, compute the lo and hi bounds.
18439 cat >conftest.$ac_ext <<_ACEOF
18440 /* confdefs.h.  */
18441 _ACEOF
18442 cat confdefs.h >>conftest.$ac_ext
18443 cat >>conftest.$ac_ext <<_ACEOF
18444 /* end confdefs.h.  */
18445 $ac_includes_default
18446 int
18447 main ()
18448 {
18449 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18450 test_array [0] = 0
18451
18452   ;
18453   return 0;
18454 }
18455 _ACEOF
18456 rm -f conftest.$ac_objext
18457 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18458   (eval $ac_compile) 2>conftest.er1
18459   ac_status=$?
18460   grep -v '^ *+' conftest.er1 >conftest.err
18461   rm -f conftest.er1
18462   cat conftest.err >&5
18463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18464   (exit $ac_status); } &&
18465          { ac_try='test -z "$ac_c_werror_flag"
18466                          || test ! -s conftest.err'
18467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18468   (eval $ac_try) 2>&5
18469   ac_status=$?
18470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18471   (exit $ac_status); }; } &&
18472          { ac_try='test -s conftest.$ac_objext'
18473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18474   (eval $ac_try) 2>&5
18475   ac_status=$?
18476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18477   (exit $ac_status); }; }; then
18478   ac_lo=0 ac_mid=0
18479   while :; do
18480     cat >conftest.$ac_ext <<_ACEOF
18481 /* confdefs.h.  */
18482 _ACEOF
18483 cat confdefs.h >>conftest.$ac_ext
18484 cat >>conftest.$ac_ext <<_ACEOF
18485 /* end confdefs.h.  */
18486 $ac_includes_default
18487 int
18488 main ()
18489 {
18490 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18491 test_array [0] = 0
18492
18493   ;
18494   return 0;
18495 }
18496 _ACEOF
18497 rm -f conftest.$ac_objext
18498 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18499   (eval $ac_compile) 2>conftest.er1
18500   ac_status=$?
18501   grep -v '^ *+' conftest.er1 >conftest.err
18502   rm -f conftest.er1
18503   cat conftest.err >&5
18504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18505   (exit $ac_status); } &&
18506          { ac_try='test -z "$ac_c_werror_flag"
18507                          || test ! -s conftest.err'
18508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18509   (eval $ac_try) 2>&5
18510   ac_status=$?
18511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18512   (exit $ac_status); }; } &&
18513          { ac_try='test -s conftest.$ac_objext'
18514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18515   (eval $ac_try) 2>&5
18516   ac_status=$?
18517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18518   (exit $ac_status); }; }; then
18519   ac_hi=$ac_mid; break
18520 else
18521   echo "$as_me: failed program was:" >&5
18522 sed 's/^/| /' conftest.$ac_ext >&5
18523
18524 ac_lo=`expr $ac_mid + 1`
18525                     if test $ac_lo -le $ac_mid; then
18526                       ac_lo= ac_hi=
18527                       break
18528                     fi
18529                     ac_mid=`expr 2 '*' $ac_mid + 1`
18530 fi
18531 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18532   done
18533 else
18534   echo "$as_me: failed program was:" >&5
18535 sed 's/^/| /' conftest.$ac_ext >&5
18536
18537 cat >conftest.$ac_ext <<_ACEOF
18538 /* confdefs.h.  */
18539 _ACEOF
18540 cat confdefs.h >>conftest.$ac_ext
18541 cat >>conftest.$ac_ext <<_ACEOF
18542 /* end confdefs.h.  */
18543 $ac_includes_default
18544 int
18545 main ()
18546 {
18547 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18548 test_array [0] = 0
18549
18550   ;
18551   return 0;
18552 }
18553 _ACEOF
18554 rm -f conftest.$ac_objext
18555 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18556   (eval $ac_compile) 2>conftest.er1
18557   ac_status=$?
18558   grep -v '^ *+' conftest.er1 >conftest.err
18559   rm -f conftest.er1
18560   cat conftest.err >&5
18561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18562   (exit $ac_status); } &&
18563          { ac_try='test -z "$ac_c_werror_flag"
18564                          || test ! -s conftest.err'
18565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18566   (eval $ac_try) 2>&5
18567   ac_status=$?
18568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18569   (exit $ac_status); }; } &&
18570          { ac_try='test -s conftest.$ac_objext'
18571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18572   (eval $ac_try) 2>&5
18573   ac_status=$?
18574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18575   (exit $ac_status); }; }; then
18576   ac_hi=-1 ac_mid=-1
18577   while :; do
18578     cat >conftest.$ac_ext <<_ACEOF
18579 /* confdefs.h.  */
18580 _ACEOF
18581 cat confdefs.h >>conftest.$ac_ext
18582 cat >>conftest.$ac_ext <<_ACEOF
18583 /* end confdefs.h.  */
18584 $ac_includes_default
18585 int
18586 main ()
18587 {
18588 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18589 test_array [0] = 0
18590
18591   ;
18592   return 0;
18593 }
18594 _ACEOF
18595 rm -f conftest.$ac_objext
18596 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18597   (eval $ac_compile) 2>conftest.er1
18598   ac_status=$?
18599   grep -v '^ *+' conftest.er1 >conftest.err
18600   rm -f conftest.er1
18601   cat conftest.err >&5
18602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18603   (exit $ac_status); } &&
18604          { ac_try='test -z "$ac_c_werror_flag"
18605                          || test ! -s conftest.err'
18606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18607   (eval $ac_try) 2>&5
18608   ac_status=$?
18609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18610   (exit $ac_status); }; } &&
18611          { ac_try='test -s conftest.$ac_objext'
18612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18613   (eval $ac_try) 2>&5
18614   ac_status=$?
18615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18616   (exit $ac_status); }; }; then
18617   ac_lo=$ac_mid; break
18618 else
18619   echo "$as_me: failed program was:" >&5
18620 sed 's/^/| /' conftest.$ac_ext >&5
18621
18622 ac_hi=`expr '(' $ac_mid ')' - 1`
18623                        if test $ac_mid -le $ac_hi; then
18624                          ac_lo= ac_hi=
18625                          break
18626                        fi
18627                        ac_mid=`expr 2 '*' $ac_mid`
18628 fi
18629 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18630   done
18631 else
18632   echo "$as_me: failed program was:" >&5
18633 sed 's/^/| /' conftest.$ac_ext >&5
18634
18635 ac_lo= ac_hi=
18636 fi
18637 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18638 fi
18639 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18640 # Binary search between lo and hi bounds.
18641 while test "x$ac_lo" != "x$ac_hi"; do
18642   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18643   cat >conftest.$ac_ext <<_ACEOF
18644 /* confdefs.h.  */
18645 _ACEOF
18646 cat confdefs.h >>conftest.$ac_ext
18647 cat >>conftest.$ac_ext <<_ACEOF
18648 /* end confdefs.h.  */
18649 $ac_includes_default
18650 int
18651 main ()
18652 {
18653 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18654 test_array [0] = 0
18655
18656   ;
18657   return 0;
18658 }
18659 _ACEOF
18660 rm -f conftest.$ac_objext
18661 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18662   (eval $ac_compile) 2>conftest.er1
18663   ac_status=$?
18664   grep -v '^ *+' conftest.er1 >conftest.err
18665   rm -f conftest.er1
18666   cat conftest.err >&5
18667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18668   (exit $ac_status); } &&
18669          { ac_try='test -z "$ac_c_werror_flag"
18670                          || test ! -s conftest.err'
18671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18672   (eval $ac_try) 2>&5
18673   ac_status=$?
18674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18675   (exit $ac_status); }; } &&
18676          { ac_try='test -s conftest.$ac_objext'
18677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18678   (eval $ac_try) 2>&5
18679   ac_status=$?
18680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18681   (exit $ac_status); }; }; then
18682   ac_hi=$ac_mid
18683 else
18684   echo "$as_me: failed program was:" >&5
18685 sed 's/^/| /' conftest.$ac_ext >&5
18686
18687 ac_lo=`expr '(' $ac_mid ')' + 1`
18688 fi
18689 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18690 done
18691 case $ac_lo in
18692 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18693 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18694 See \`config.log' for more details." >&5
18695 echo "$as_me: error: cannot compute sizeof (size_t), 77
18696 See \`config.log' for more details." >&2;}
18697    { (exit 1); exit 1; }; } ;;
18698 esac
18699 else
18700   if test "$cross_compiling" = yes; then
18701   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18702 See \`config.log' for more details." >&5
18703 echo "$as_me: error: cannot run test program while cross compiling
18704 See \`config.log' for more details." >&2;}
18705    { (exit 1); exit 1; }; }
18706 else
18707   cat >conftest.$ac_ext <<_ACEOF
18708 /* confdefs.h.  */
18709 _ACEOF
18710 cat confdefs.h >>conftest.$ac_ext
18711 cat >>conftest.$ac_ext <<_ACEOF
18712 /* end confdefs.h.  */
18713 $ac_includes_default
18714 long longval () { return (long) (sizeof (size_t)); }
18715 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18716 #include <stdio.h>
18717 #include <stdlib.h>
18718 int
18719 main ()
18720 {
18721
18722   FILE *f = fopen ("conftest.val", "w");
18723   if (! f)
18724     exit (1);
18725   if (((long) (sizeof (size_t))) < 0)
18726     {
18727       long i = longval ();
18728       if (i != ((long) (sizeof (size_t))))
18729         exit (1);
18730       fprintf (f, "%ld\n", i);
18731     }
18732   else
18733     {
18734       unsigned long i = ulongval ();
18735       if (i != ((long) (sizeof (size_t))))
18736         exit (1);
18737       fprintf (f, "%lu\n", i);
18738     }
18739   exit (ferror (f) || fclose (f) != 0);
18740
18741   ;
18742   return 0;
18743 }
18744 _ACEOF
18745 rm -f conftest$ac_exeext
18746 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18747   (eval $ac_link) 2>&5
18748   ac_status=$?
18749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18750   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18752   (eval $ac_try) 2>&5
18753   ac_status=$?
18754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18755   (exit $ac_status); }; }; then
18756   ac_cv_sizeof_size_t=`cat conftest.val`
18757 else
18758   echo "$as_me: program exited with status $ac_status" >&5
18759 echo "$as_me: failed program was:" >&5
18760 sed 's/^/| /' conftest.$ac_ext >&5
18761
18762 ( exit $ac_status )
18763 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18764 See \`config.log' for more details." >&5
18765 echo "$as_me: error: cannot compute sizeof (size_t), 77
18766 See \`config.log' for more details." >&2;}
18767    { (exit 1); exit 1; }; }
18768 fi
18769 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18770 fi
18771 fi
18772 rm -f conftest.val
18773 else
18774   ac_cv_sizeof_size_t=0
18775 fi
18776 fi
18777 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18778 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18779 cat >>confdefs.h <<_ACEOF
18780 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18781 _ACEOF
18782
18783
18784
18785 # Determine memory alignment requirements for the basic C data types.
18786
18787 echo "$as_me:$LINENO: checking for short" >&5
18788 echo $ECHO_N "checking for short... $ECHO_C" >&6
18789 if test "${ac_cv_type_short+set}" = set; then
18790   echo $ECHO_N "(cached) $ECHO_C" >&6
18791 else
18792   cat >conftest.$ac_ext <<_ACEOF
18793 /* confdefs.h.  */
18794 _ACEOF
18795 cat confdefs.h >>conftest.$ac_ext
18796 cat >>conftest.$ac_ext <<_ACEOF
18797 /* end confdefs.h.  */
18798 $ac_includes_default
18799 int
18800 main ()
18801 {
18802 if ((short *) 0)
18803   return 0;
18804 if (sizeof (short))
18805   return 0;
18806   ;
18807   return 0;
18808 }
18809 _ACEOF
18810 rm -f conftest.$ac_objext
18811 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18812   (eval $ac_compile) 2>conftest.er1
18813   ac_status=$?
18814   grep -v '^ *+' conftest.er1 >conftest.err
18815   rm -f conftest.er1
18816   cat conftest.err >&5
18817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18818   (exit $ac_status); } &&
18819          { ac_try='test -z "$ac_c_werror_flag"
18820                          || test ! -s conftest.err'
18821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18822   (eval $ac_try) 2>&5
18823   ac_status=$?
18824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18825   (exit $ac_status); }; } &&
18826          { ac_try='test -s conftest.$ac_objext'
18827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18828   (eval $ac_try) 2>&5
18829   ac_status=$?
18830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18831   (exit $ac_status); }; }; then
18832   ac_cv_type_short=yes
18833 else
18834   echo "$as_me: failed program was:" >&5
18835 sed 's/^/| /' conftest.$ac_ext >&5
18836
18837 ac_cv_type_short=no
18838 fi
18839 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18840 fi
18841 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18842 echo "${ECHO_T}$ac_cv_type_short" >&6
18843
18844 echo "$as_me:$LINENO: checking alignment of short" >&5
18845 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18846 if test "${pgac_cv_alignof_short+set}" = set; then
18847   echo $ECHO_N "(cached) $ECHO_C" >&6
18848 else
18849   if test "$ac_cv_type_short" = yes; then
18850   if test "$cross_compiling" = yes; then
18851   # Depending upon the size, compute the lo and hi bounds.
18852 cat >conftest.$ac_ext <<_ACEOF
18853 /* confdefs.h.  */
18854 _ACEOF
18855 cat confdefs.h >>conftest.$ac_ext
18856 cat >>conftest.$ac_ext <<_ACEOF
18857 /* end confdefs.h.  */
18858 $ac_includes_default
18859 struct { char filler; short field; } pgac_struct;
18860 int
18861 main ()
18862 {
18863 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18864 test_array [0] = 0
18865
18866   ;
18867   return 0;
18868 }
18869 _ACEOF
18870 rm -f conftest.$ac_objext
18871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18872   (eval $ac_compile) 2>conftest.er1
18873   ac_status=$?
18874   grep -v '^ *+' conftest.er1 >conftest.err
18875   rm -f conftest.er1
18876   cat conftest.err >&5
18877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18878   (exit $ac_status); } &&
18879          { ac_try='test -z "$ac_c_werror_flag"
18880                          || test ! -s conftest.err'
18881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18882   (eval $ac_try) 2>&5
18883   ac_status=$?
18884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18885   (exit $ac_status); }; } &&
18886          { ac_try='test -s conftest.$ac_objext'
18887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18888   (eval $ac_try) 2>&5
18889   ac_status=$?
18890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18891   (exit $ac_status); }; }; then
18892   ac_lo=0 ac_mid=0
18893   while :; do
18894     cat >conftest.$ac_ext <<_ACEOF
18895 /* confdefs.h.  */
18896 _ACEOF
18897 cat confdefs.h >>conftest.$ac_ext
18898 cat >>conftest.$ac_ext <<_ACEOF
18899 /* end confdefs.h.  */
18900 $ac_includes_default
18901 struct { char filler; short field; } pgac_struct;
18902 int
18903 main ()
18904 {
18905 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18906 test_array [0] = 0
18907
18908   ;
18909   return 0;
18910 }
18911 _ACEOF
18912 rm -f conftest.$ac_objext
18913 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18914   (eval $ac_compile) 2>conftest.er1
18915   ac_status=$?
18916   grep -v '^ *+' conftest.er1 >conftest.err
18917   rm -f conftest.er1
18918   cat conftest.err >&5
18919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18920   (exit $ac_status); } &&
18921          { ac_try='test -z "$ac_c_werror_flag"
18922                          || test ! -s conftest.err'
18923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18924   (eval $ac_try) 2>&5
18925   ac_status=$?
18926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18927   (exit $ac_status); }; } &&
18928          { ac_try='test -s conftest.$ac_objext'
18929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18930   (eval $ac_try) 2>&5
18931   ac_status=$?
18932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18933   (exit $ac_status); }; }; then
18934   ac_hi=$ac_mid; break
18935 else
18936   echo "$as_me: failed program was:" >&5
18937 sed 's/^/| /' conftest.$ac_ext >&5
18938
18939 ac_lo=`expr $ac_mid + 1`
18940                     if test $ac_lo -le $ac_mid; then
18941                       ac_lo= ac_hi=
18942                       break
18943                     fi
18944                     ac_mid=`expr 2 '*' $ac_mid + 1`
18945 fi
18946 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18947   done
18948 else
18949   echo "$as_me: failed program was:" >&5
18950 sed 's/^/| /' conftest.$ac_ext >&5
18951
18952 cat >conftest.$ac_ext <<_ACEOF
18953 /* confdefs.h.  */
18954 _ACEOF
18955 cat confdefs.h >>conftest.$ac_ext
18956 cat >>conftest.$ac_ext <<_ACEOF
18957 /* end confdefs.h.  */
18958 $ac_includes_default
18959 struct { char filler; short field; } pgac_struct;
18960 int
18961 main ()
18962 {
18963 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18964 test_array [0] = 0
18965
18966   ;
18967   return 0;
18968 }
18969 _ACEOF
18970 rm -f conftest.$ac_objext
18971 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18972   (eval $ac_compile) 2>conftest.er1
18973   ac_status=$?
18974   grep -v '^ *+' conftest.er1 >conftest.err
18975   rm -f conftest.er1
18976   cat conftest.err >&5
18977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18978   (exit $ac_status); } &&
18979          { ac_try='test -z "$ac_c_werror_flag"
18980                          || test ! -s conftest.err'
18981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18982   (eval $ac_try) 2>&5
18983   ac_status=$?
18984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18985   (exit $ac_status); }; } &&
18986          { ac_try='test -s conftest.$ac_objext'
18987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18988   (eval $ac_try) 2>&5
18989   ac_status=$?
18990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18991   (exit $ac_status); }; }; then
18992   ac_hi=-1 ac_mid=-1
18993   while :; do
18994     cat >conftest.$ac_ext <<_ACEOF
18995 /* confdefs.h.  */
18996 _ACEOF
18997 cat confdefs.h >>conftest.$ac_ext
18998 cat >>conftest.$ac_ext <<_ACEOF
18999 /* end confdefs.h.  */
19000 $ac_includes_default
19001 struct { char filler; short field; } pgac_struct;
19002 int
19003 main ()
19004 {
19005 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19006 test_array [0] = 0
19007
19008   ;
19009   return 0;
19010 }
19011 _ACEOF
19012 rm -f conftest.$ac_objext
19013 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19014   (eval $ac_compile) 2>conftest.er1
19015   ac_status=$?
19016   grep -v '^ *+' conftest.er1 >conftest.err
19017   rm -f conftest.er1
19018   cat conftest.err >&5
19019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19020   (exit $ac_status); } &&
19021          { ac_try='test -z "$ac_c_werror_flag"
19022                          || test ! -s conftest.err'
19023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19024   (eval $ac_try) 2>&5
19025   ac_status=$?
19026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19027   (exit $ac_status); }; } &&
19028          { ac_try='test -s conftest.$ac_objext'
19029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19030   (eval $ac_try) 2>&5
19031   ac_status=$?
19032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19033   (exit $ac_status); }; }; then
19034   ac_lo=$ac_mid; break
19035 else
19036   echo "$as_me: failed program was:" >&5
19037 sed 's/^/| /' conftest.$ac_ext >&5
19038
19039 ac_hi=`expr '(' $ac_mid ')' - 1`
19040                        if test $ac_mid -le $ac_hi; then
19041                          ac_lo= ac_hi=
19042                          break
19043                        fi
19044                        ac_mid=`expr 2 '*' $ac_mid`
19045 fi
19046 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19047   done
19048 else
19049   echo "$as_me: failed program was:" >&5
19050 sed 's/^/| /' conftest.$ac_ext >&5
19051
19052 ac_lo= ac_hi=
19053 fi
19054 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19055 fi
19056 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19057 # Binary search between lo and hi bounds.
19058 while test "x$ac_lo" != "x$ac_hi"; do
19059   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19060   cat >conftest.$ac_ext <<_ACEOF
19061 /* confdefs.h.  */
19062 _ACEOF
19063 cat confdefs.h >>conftest.$ac_ext
19064 cat >>conftest.$ac_ext <<_ACEOF
19065 /* end confdefs.h.  */
19066 $ac_includes_default
19067 struct { char filler; short field; } pgac_struct;
19068 int
19069 main ()
19070 {
19071 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19072 test_array [0] = 0
19073
19074   ;
19075   return 0;
19076 }
19077 _ACEOF
19078 rm -f conftest.$ac_objext
19079 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19080   (eval $ac_compile) 2>conftest.er1
19081   ac_status=$?
19082   grep -v '^ *+' conftest.er1 >conftest.err
19083   rm -f conftest.er1
19084   cat conftest.err >&5
19085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19086   (exit $ac_status); } &&
19087          { ac_try='test -z "$ac_c_werror_flag"
19088                          || test ! -s conftest.err'
19089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19090   (eval $ac_try) 2>&5
19091   ac_status=$?
19092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19093   (exit $ac_status); }; } &&
19094          { ac_try='test -s conftest.$ac_objext'
19095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19096   (eval $ac_try) 2>&5
19097   ac_status=$?
19098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19099   (exit $ac_status); }; }; then
19100   ac_hi=$ac_mid
19101 else
19102   echo "$as_me: failed program was:" >&5
19103 sed 's/^/| /' conftest.$ac_ext >&5
19104
19105 ac_lo=`expr '(' $ac_mid ')' + 1`
19106 fi
19107 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19108 done
19109 case $ac_lo in
19110 ?*) pgac_cv_alignof_short=$ac_lo;;
19111 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19112 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19113    { (exit 1); exit 1; }; } ;;
19114 esac
19115 else
19116   if test "$cross_compiling" = yes; then
19117   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19118 See \`config.log' for more details." >&5
19119 echo "$as_me: error: cannot run test program while cross compiling
19120 See \`config.log' for more details." >&2;}
19121    { (exit 1); exit 1; }; }
19122 else
19123   cat >conftest.$ac_ext <<_ACEOF
19124 /* confdefs.h.  */
19125 _ACEOF
19126 cat confdefs.h >>conftest.$ac_ext
19127 cat >>conftest.$ac_ext <<_ACEOF
19128 /* end confdefs.h.  */
19129 $ac_includes_default
19130 struct { char filler; short field; } pgac_struct;
19131 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19132 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19133 #include <stdio.h>
19134 #include <stdlib.h>
19135 int
19136 main ()
19137 {
19138
19139   FILE *f = fopen ("conftest.val", "w");
19140   if (! f)
19141     exit (1);
19142   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19143     {
19144       long i = longval ();
19145       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19146         exit (1);
19147       fprintf (f, "%ld\n", i);
19148     }
19149   else
19150     {
19151       unsigned long i = ulongval ();
19152       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19153         exit (1);
19154       fprintf (f, "%lu\n", i);
19155     }
19156   exit (ferror (f) || fclose (f) != 0);
19157
19158   ;
19159   return 0;
19160 }
19161 _ACEOF
19162 rm -f conftest$ac_exeext
19163 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19164   (eval $ac_link) 2>&5
19165   ac_status=$?
19166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19167   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19169   (eval $ac_try) 2>&5
19170   ac_status=$?
19171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19172   (exit $ac_status); }; }; then
19173   pgac_cv_alignof_short=`cat conftest.val`
19174 else
19175   echo "$as_me: program exited with status $ac_status" >&5
19176 echo "$as_me: failed program was:" >&5
19177 sed 's/^/| /' conftest.$ac_ext >&5
19178
19179 ( exit $ac_status )
19180 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19181 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19182    { (exit 1); exit 1; }; }
19183 fi
19184 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19185 fi
19186 fi
19187 rm -f conftest.val
19188 else
19189   pgac_cv_alignof_short=0
19190 fi
19191 fi
19192 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19193 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19194 cat >>confdefs.h <<_ACEOF
19195 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19196 _ACEOF
19197
19198
19199 echo "$as_me:$LINENO: checking for int" >&5
19200 echo $ECHO_N "checking for int... $ECHO_C" >&6
19201 if test "${ac_cv_type_int+set}" = set; then
19202   echo $ECHO_N "(cached) $ECHO_C" >&6
19203 else
19204   cat >conftest.$ac_ext <<_ACEOF
19205 /* confdefs.h.  */
19206 _ACEOF
19207 cat confdefs.h >>conftest.$ac_ext
19208 cat >>conftest.$ac_ext <<_ACEOF
19209 /* end confdefs.h.  */
19210 $ac_includes_default
19211 int
19212 main ()
19213 {
19214 if ((int *) 0)
19215   return 0;
19216 if (sizeof (int))
19217   return 0;
19218   ;
19219   return 0;
19220 }
19221 _ACEOF
19222 rm -f conftest.$ac_objext
19223 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19224   (eval $ac_compile) 2>conftest.er1
19225   ac_status=$?
19226   grep -v '^ *+' conftest.er1 >conftest.err
19227   rm -f conftest.er1
19228   cat conftest.err >&5
19229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19230   (exit $ac_status); } &&
19231          { ac_try='test -z "$ac_c_werror_flag"
19232                          || test ! -s conftest.err'
19233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19234   (eval $ac_try) 2>&5
19235   ac_status=$?
19236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19237   (exit $ac_status); }; } &&
19238          { ac_try='test -s conftest.$ac_objext'
19239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19240   (eval $ac_try) 2>&5
19241   ac_status=$?
19242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19243   (exit $ac_status); }; }; then
19244   ac_cv_type_int=yes
19245 else
19246   echo "$as_me: failed program was:" >&5
19247 sed 's/^/| /' conftest.$ac_ext >&5
19248
19249 ac_cv_type_int=no
19250 fi
19251 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19252 fi
19253 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19254 echo "${ECHO_T}$ac_cv_type_int" >&6
19255
19256 echo "$as_me:$LINENO: checking alignment of int" >&5
19257 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19258 if test "${pgac_cv_alignof_int+set}" = set; then
19259   echo $ECHO_N "(cached) $ECHO_C" >&6
19260 else
19261   if test "$ac_cv_type_int" = yes; then
19262   if test "$cross_compiling" = yes; then
19263   # Depending upon the size, compute the lo and hi bounds.
19264 cat >conftest.$ac_ext <<_ACEOF
19265 /* confdefs.h.  */
19266 _ACEOF
19267 cat confdefs.h >>conftest.$ac_ext
19268 cat >>conftest.$ac_ext <<_ACEOF
19269 /* end confdefs.h.  */
19270 $ac_includes_default
19271 struct { char filler; int field; } pgac_struct;
19272 int
19273 main ()
19274 {
19275 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19276 test_array [0] = 0
19277
19278   ;
19279   return 0;
19280 }
19281 _ACEOF
19282 rm -f conftest.$ac_objext
19283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19284   (eval $ac_compile) 2>conftest.er1
19285   ac_status=$?
19286   grep -v '^ *+' conftest.er1 >conftest.err
19287   rm -f conftest.er1
19288   cat conftest.err >&5
19289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19290   (exit $ac_status); } &&
19291          { ac_try='test -z "$ac_c_werror_flag"
19292                          || test ! -s conftest.err'
19293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19294   (eval $ac_try) 2>&5
19295   ac_status=$?
19296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19297   (exit $ac_status); }; } &&
19298          { ac_try='test -s conftest.$ac_objext'
19299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19300   (eval $ac_try) 2>&5
19301   ac_status=$?
19302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19303   (exit $ac_status); }; }; then
19304   ac_lo=0 ac_mid=0
19305   while :; do
19306     cat >conftest.$ac_ext <<_ACEOF
19307 /* confdefs.h.  */
19308 _ACEOF
19309 cat confdefs.h >>conftest.$ac_ext
19310 cat >>conftest.$ac_ext <<_ACEOF
19311 /* end confdefs.h.  */
19312 $ac_includes_default
19313 struct { char filler; int field; } pgac_struct;
19314 int
19315 main ()
19316 {
19317 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19318 test_array [0] = 0
19319
19320   ;
19321   return 0;
19322 }
19323 _ACEOF
19324 rm -f conftest.$ac_objext
19325 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19326   (eval $ac_compile) 2>conftest.er1
19327   ac_status=$?
19328   grep -v '^ *+' conftest.er1 >conftest.err
19329   rm -f conftest.er1
19330   cat conftest.err >&5
19331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19332   (exit $ac_status); } &&
19333          { ac_try='test -z "$ac_c_werror_flag"
19334                          || test ! -s conftest.err'
19335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19336   (eval $ac_try) 2>&5
19337   ac_status=$?
19338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19339   (exit $ac_status); }; } &&
19340          { ac_try='test -s conftest.$ac_objext'
19341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19342   (eval $ac_try) 2>&5
19343   ac_status=$?
19344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19345   (exit $ac_status); }; }; then
19346   ac_hi=$ac_mid; break
19347 else
19348   echo "$as_me: failed program was:" >&5
19349 sed 's/^/| /' conftest.$ac_ext >&5
19350
19351 ac_lo=`expr $ac_mid + 1`
19352                     if test $ac_lo -le $ac_mid; then
19353                       ac_lo= ac_hi=
19354                       break
19355                     fi
19356                     ac_mid=`expr 2 '*' $ac_mid + 1`
19357 fi
19358 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19359   done
19360 else
19361   echo "$as_me: failed program was:" >&5
19362 sed 's/^/| /' conftest.$ac_ext >&5
19363
19364 cat >conftest.$ac_ext <<_ACEOF
19365 /* confdefs.h.  */
19366 _ACEOF
19367 cat confdefs.h >>conftest.$ac_ext
19368 cat >>conftest.$ac_ext <<_ACEOF
19369 /* end confdefs.h.  */
19370 $ac_includes_default
19371 struct { char filler; int field; } pgac_struct;
19372 int
19373 main ()
19374 {
19375 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19376 test_array [0] = 0
19377
19378   ;
19379   return 0;
19380 }
19381 _ACEOF
19382 rm -f conftest.$ac_objext
19383 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19384   (eval $ac_compile) 2>conftest.er1
19385   ac_status=$?
19386   grep -v '^ *+' conftest.er1 >conftest.err
19387   rm -f conftest.er1
19388   cat conftest.err >&5
19389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19390   (exit $ac_status); } &&
19391          { ac_try='test -z "$ac_c_werror_flag"
19392                          || test ! -s conftest.err'
19393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19394   (eval $ac_try) 2>&5
19395   ac_status=$?
19396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19397   (exit $ac_status); }; } &&
19398          { ac_try='test -s conftest.$ac_objext'
19399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19400   (eval $ac_try) 2>&5
19401   ac_status=$?
19402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19403   (exit $ac_status); }; }; then
19404   ac_hi=-1 ac_mid=-1
19405   while :; do
19406     cat >conftest.$ac_ext <<_ACEOF
19407 /* confdefs.h.  */
19408 _ACEOF
19409 cat confdefs.h >>conftest.$ac_ext
19410 cat >>conftest.$ac_ext <<_ACEOF
19411 /* end confdefs.h.  */
19412 $ac_includes_default
19413 struct { char filler; int field; } pgac_struct;
19414 int
19415 main ()
19416 {
19417 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19418 test_array [0] = 0
19419
19420   ;
19421   return 0;
19422 }
19423 _ACEOF
19424 rm -f conftest.$ac_objext
19425 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19426   (eval $ac_compile) 2>conftest.er1
19427   ac_status=$?
19428   grep -v '^ *+' conftest.er1 >conftest.err
19429   rm -f conftest.er1
19430   cat conftest.err >&5
19431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19432   (exit $ac_status); } &&
19433          { ac_try='test -z "$ac_c_werror_flag"
19434                          || test ! -s conftest.err'
19435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19436   (eval $ac_try) 2>&5
19437   ac_status=$?
19438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19439   (exit $ac_status); }; } &&
19440          { ac_try='test -s conftest.$ac_objext'
19441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19442   (eval $ac_try) 2>&5
19443   ac_status=$?
19444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19445   (exit $ac_status); }; }; then
19446   ac_lo=$ac_mid; break
19447 else
19448   echo "$as_me: failed program was:" >&5
19449 sed 's/^/| /' conftest.$ac_ext >&5
19450
19451 ac_hi=`expr '(' $ac_mid ')' - 1`
19452                        if test $ac_mid -le $ac_hi; then
19453                          ac_lo= ac_hi=
19454                          break
19455                        fi
19456                        ac_mid=`expr 2 '*' $ac_mid`
19457 fi
19458 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19459   done
19460 else
19461   echo "$as_me: failed program was:" >&5
19462 sed 's/^/| /' conftest.$ac_ext >&5
19463
19464 ac_lo= ac_hi=
19465 fi
19466 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19467 fi
19468 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19469 # Binary search between lo and hi bounds.
19470 while test "x$ac_lo" != "x$ac_hi"; do
19471   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19472   cat >conftest.$ac_ext <<_ACEOF
19473 /* confdefs.h.  */
19474 _ACEOF
19475 cat confdefs.h >>conftest.$ac_ext
19476 cat >>conftest.$ac_ext <<_ACEOF
19477 /* end confdefs.h.  */
19478 $ac_includes_default
19479 struct { char filler; int field; } pgac_struct;
19480 int
19481 main ()
19482 {
19483 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19484 test_array [0] = 0
19485
19486   ;
19487   return 0;
19488 }
19489 _ACEOF
19490 rm -f conftest.$ac_objext
19491 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19492   (eval $ac_compile) 2>conftest.er1
19493   ac_status=$?
19494   grep -v '^ *+' conftest.er1 >conftest.err
19495   rm -f conftest.er1
19496   cat conftest.err >&5
19497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19498   (exit $ac_status); } &&
19499          { ac_try='test -z "$ac_c_werror_flag"
19500                          || test ! -s conftest.err'
19501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19502   (eval $ac_try) 2>&5
19503   ac_status=$?
19504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19505   (exit $ac_status); }; } &&
19506          { ac_try='test -s conftest.$ac_objext'
19507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19508   (eval $ac_try) 2>&5
19509   ac_status=$?
19510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19511   (exit $ac_status); }; }; then
19512   ac_hi=$ac_mid
19513 else
19514   echo "$as_me: failed program was:" >&5
19515 sed 's/^/| /' conftest.$ac_ext >&5
19516
19517 ac_lo=`expr '(' $ac_mid ')' + 1`
19518 fi
19519 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19520 done
19521 case $ac_lo in
19522 ?*) pgac_cv_alignof_int=$ac_lo;;
19523 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19524 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19525    { (exit 1); exit 1; }; } ;;
19526 esac
19527 else
19528   if test "$cross_compiling" = yes; then
19529   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19530 See \`config.log' for more details." >&5
19531 echo "$as_me: error: cannot run test program while cross compiling
19532 See \`config.log' for more details." >&2;}
19533    { (exit 1); exit 1; }; }
19534 else
19535   cat >conftest.$ac_ext <<_ACEOF
19536 /* confdefs.h.  */
19537 _ACEOF
19538 cat confdefs.h >>conftest.$ac_ext
19539 cat >>conftest.$ac_ext <<_ACEOF
19540 /* end confdefs.h.  */
19541 $ac_includes_default
19542 struct { char filler; int field; } pgac_struct;
19543 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19544 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19545 #include <stdio.h>
19546 #include <stdlib.h>
19547 int
19548 main ()
19549 {
19550
19551   FILE *f = fopen ("conftest.val", "w");
19552   if (! f)
19553     exit (1);
19554   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19555     {
19556       long i = longval ();
19557       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19558         exit (1);
19559       fprintf (f, "%ld\n", i);
19560     }
19561   else
19562     {
19563       unsigned long i = ulongval ();
19564       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19565         exit (1);
19566       fprintf (f, "%lu\n", i);
19567     }
19568   exit (ferror (f) || fclose (f) != 0);
19569
19570   ;
19571   return 0;
19572 }
19573 _ACEOF
19574 rm -f conftest$ac_exeext
19575 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19576   (eval $ac_link) 2>&5
19577   ac_status=$?
19578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19579   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19581   (eval $ac_try) 2>&5
19582   ac_status=$?
19583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19584   (exit $ac_status); }; }; then
19585   pgac_cv_alignof_int=`cat conftest.val`
19586 else
19587   echo "$as_me: program exited with status $ac_status" >&5
19588 echo "$as_me: failed program was:" >&5
19589 sed 's/^/| /' conftest.$ac_ext >&5
19590
19591 ( exit $ac_status )
19592 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19593 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19594    { (exit 1); exit 1; }; }
19595 fi
19596 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19597 fi
19598 fi
19599 rm -f conftest.val
19600 else
19601   pgac_cv_alignof_int=0
19602 fi
19603 fi
19604 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19605 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19606 cat >>confdefs.h <<_ACEOF
19607 #define ALIGNOF_INT $pgac_cv_alignof_int
19608 _ACEOF
19609
19610
19611 echo "$as_me:$LINENO: checking for long" >&5
19612 echo $ECHO_N "checking for long... $ECHO_C" >&6
19613 if test "${ac_cv_type_long+set}" = set; then
19614   echo $ECHO_N "(cached) $ECHO_C" >&6
19615 else
19616   cat >conftest.$ac_ext <<_ACEOF
19617 /* confdefs.h.  */
19618 _ACEOF
19619 cat confdefs.h >>conftest.$ac_ext
19620 cat >>conftest.$ac_ext <<_ACEOF
19621 /* end confdefs.h.  */
19622 $ac_includes_default
19623 int
19624 main ()
19625 {
19626 if ((long *) 0)
19627   return 0;
19628 if (sizeof (long))
19629   return 0;
19630   ;
19631   return 0;
19632 }
19633 _ACEOF
19634 rm -f conftest.$ac_objext
19635 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19636   (eval $ac_compile) 2>conftest.er1
19637   ac_status=$?
19638   grep -v '^ *+' conftest.er1 >conftest.err
19639   rm -f conftest.er1
19640   cat conftest.err >&5
19641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19642   (exit $ac_status); } &&
19643          { ac_try='test -z "$ac_c_werror_flag"
19644                          || test ! -s conftest.err'
19645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19646   (eval $ac_try) 2>&5
19647   ac_status=$?
19648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19649   (exit $ac_status); }; } &&
19650          { ac_try='test -s conftest.$ac_objext'
19651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19652   (eval $ac_try) 2>&5
19653   ac_status=$?
19654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19655   (exit $ac_status); }; }; then
19656   ac_cv_type_long=yes
19657 else
19658   echo "$as_me: failed program was:" >&5
19659 sed 's/^/| /' conftest.$ac_ext >&5
19660
19661 ac_cv_type_long=no
19662 fi
19663 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19664 fi
19665 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19666 echo "${ECHO_T}$ac_cv_type_long" >&6
19667
19668 echo "$as_me:$LINENO: checking alignment of long" >&5
19669 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19670 if test "${pgac_cv_alignof_long+set}" = set; then
19671   echo $ECHO_N "(cached) $ECHO_C" >&6
19672 else
19673   if test "$ac_cv_type_long" = yes; then
19674   if test "$cross_compiling" = yes; then
19675   # Depending upon the size, compute the lo and hi bounds.
19676 cat >conftest.$ac_ext <<_ACEOF
19677 /* confdefs.h.  */
19678 _ACEOF
19679 cat confdefs.h >>conftest.$ac_ext
19680 cat >>conftest.$ac_ext <<_ACEOF
19681 /* end confdefs.h.  */
19682 $ac_includes_default
19683 struct { char filler; long field; } pgac_struct;
19684 int
19685 main ()
19686 {
19687 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19688 test_array [0] = 0
19689
19690   ;
19691   return 0;
19692 }
19693 _ACEOF
19694 rm -f conftest.$ac_objext
19695 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19696   (eval $ac_compile) 2>conftest.er1
19697   ac_status=$?
19698   grep -v '^ *+' conftest.er1 >conftest.err
19699   rm -f conftest.er1
19700   cat conftest.err >&5
19701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19702   (exit $ac_status); } &&
19703          { ac_try='test -z "$ac_c_werror_flag"
19704                          || test ! -s conftest.err'
19705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19706   (eval $ac_try) 2>&5
19707   ac_status=$?
19708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19709   (exit $ac_status); }; } &&
19710          { ac_try='test -s conftest.$ac_objext'
19711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19712   (eval $ac_try) 2>&5
19713   ac_status=$?
19714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19715   (exit $ac_status); }; }; then
19716   ac_lo=0 ac_mid=0
19717   while :; do
19718     cat >conftest.$ac_ext <<_ACEOF
19719 /* confdefs.h.  */
19720 _ACEOF
19721 cat confdefs.h >>conftest.$ac_ext
19722 cat >>conftest.$ac_ext <<_ACEOF
19723 /* end confdefs.h.  */
19724 $ac_includes_default
19725 struct { char filler; long field; } pgac_struct;
19726 int
19727 main ()
19728 {
19729 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19730 test_array [0] = 0
19731
19732   ;
19733   return 0;
19734 }
19735 _ACEOF
19736 rm -f conftest.$ac_objext
19737 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19738   (eval $ac_compile) 2>conftest.er1
19739   ac_status=$?
19740   grep -v '^ *+' conftest.er1 >conftest.err
19741   rm -f conftest.er1
19742   cat conftest.err >&5
19743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19744   (exit $ac_status); } &&
19745          { ac_try='test -z "$ac_c_werror_flag"
19746                          || test ! -s conftest.err'
19747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19748   (eval $ac_try) 2>&5
19749   ac_status=$?
19750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19751   (exit $ac_status); }; } &&
19752          { ac_try='test -s conftest.$ac_objext'
19753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19754   (eval $ac_try) 2>&5
19755   ac_status=$?
19756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19757   (exit $ac_status); }; }; then
19758   ac_hi=$ac_mid; break
19759 else
19760   echo "$as_me: failed program was:" >&5
19761 sed 's/^/| /' conftest.$ac_ext >&5
19762
19763 ac_lo=`expr $ac_mid + 1`
19764                     if test $ac_lo -le $ac_mid; then
19765                       ac_lo= ac_hi=
19766                       break
19767                     fi
19768                     ac_mid=`expr 2 '*' $ac_mid + 1`
19769 fi
19770 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19771   done
19772 else
19773   echo "$as_me: failed program was:" >&5
19774 sed 's/^/| /' conftest.$ac_ext >&5
19775
19776 cat >conftest.$ac_ext <<_ACEOF
19777 /* confdefs.h.  */
19778 _ACEOF
19779 cat confdefs.h >>conftest.$ac_ext
19780 cat >>conftest.$ac_ext <<_ACEOF
19781 /* end confdefs.h.  */
19782 $ac_includes_default
19783 struct { char filler; long field; } pgac_struct;
19784 int
19785 main ()
19786 {
19787 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19788 test_array [0] = 0
19789
19790   ;
19791   return 0;
19792 }
19793 _ACEOF
19794 rm -f conftest.$ac_objext
19795 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19796   (eval $ac_compile) 2>conftest.er1
19797   ac_status=$?
19798   grep -v '^ *+' conftest.er1 >conftest.err
19799   rm -f conftest.er1
19800   cat conftest.err >&5
19801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19802   (exit $ac_status); } &&
19803          { ac_try='test -z "$ac_c_werror_flag"
19804                          || test ! -s conftest.err'
19805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19806   (eval $ac_try) 2>&5
19807   ac_status=$?
19808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19809   (exit $ac_status); }; } &&
19810          { ac_try='test -s conftest.$ac_objext'
19811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19812   (eval $ac_try) 2>&5
19813   ac_status=$?
19814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19815   (exit $ac_status); }; }; then
19816   ac_hi=-1 ac_mid=-1
19817   while :; do
19818     cat >conftest.$ac_ext <<_ACEOF
19819 /* confdefs.h.  */
19820 _ACEOF
19821 cat confdefs.h >>conftest.$ac_ext
19822 cat >>conftest.$ac_ext <<_ACEOF
19823 /* end confdefs.h.  */
19824 $ac_includes_default
19825 struct { char filler; long field; } pgac_struct;
19826 int
19827 main ()
19828 {
19829 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19830 test_array [0] = 0
19831
19832   ;
19833   return 0;
19834 }
19835 _ACEOF
19836 rm -f conftest.$ac_objext
19837 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19838   (eval $ac_compile) 2>conftest.er1
19839   ac_status=$?
19840   grep -v '^ *+' conftest.er1 >conftest.err
19841   rm -f conftest.er1
19842   cat conftest.err >&5
19843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19844   (exit $ac_status); } &&
19845          { ac_try='test -z "$ac_c_werror_flag"
19846                          || test ! -s conftest.err'
19847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19848   (eval $ac_try) 2>&5
19849   ac_status=$?
19850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19851   (exit $ac_status); }; } &&
19852          { ac_try='test -s conftest.$ac_objext'
19853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19854   (eval $ac_try) 2>&5
19855   ac_status=$?
19856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19857   (exit $ac_status); }; }; then
19858   ac_lo=$ac_mid; break
19859 else
19860   echo "$as_me: failed program was:" >&5
19861 sed 's/^/| /' conftest.$ac_ext >&5
19862
19863 ac_hi=`expr '(' $ac_mid ')' - 1`
19864                        if test $ac_mid -le $ac_hi; then
19865                          ac_lo= ac_hi=
19866                          break
19867                        fi
19868                        ac_mid=`expr 2 '*' $ac_mid`
19869 fi
19870 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19871   done
19872 else
19873   echo "$as_me: failed program was:" >&5
19874 sed 's/^/| /' conftest.$ac_ext >&5
19875
19876 ac_lo= ac_hi=
19877 fi
19878 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19879 fi
19880 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19881 # Binary search between lo and hi bounds.
19882 while test "x$ac_lo" != "x$ac_hi"; do
19883   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19884   cat >conftest.$ac_ext <<_ACEOF
19885 /* confdefs.h.  */
19886 _ACEOF
19887 cat confdefs.h >>conftest.$ac_ext
19888 cat >>conftest.$ac_ext <<_ACEOF
19889 /* end confdefs.h.  */
19890 $ac_includes_default
19891 struct { char filler; long field; } pgac_struct;
19892 int
19893 main ()
19894 {
19895 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19896 test_array [0] = 0
19897
19898   ;
19899   return 0;
19900 }
19901 _ACEOF
19902 rm -f conftest.$ac_objext
19903 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19904   (eval $ac_compile) 2>conftest.er1
19905   ac_status=$?
19906   grep -v '^ *+' conftest.er1 >conftest.err
19907   rm -f conftest.er1
19908   cat conftest.err >&5
19909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19910   (exit $ac_status); } &&
19911          { ac_try='test -z "$ac_c_werror_flag"
19912                          || test ! -s conftest.err'
19913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19914   (eval $ac_try) 2>&5
19915   ac_status=$?
19916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19917   (exit $ac_status); }; } &&
19918          { ac_try='test -s conftest.$ac_objext'
19919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19920   (eval $ac_try) 2>&5
19921   ac_status=$?
19922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19923   (exit $ac_status); }; }; then
19924   ac_hi=$ac_mid
19925 else
19926   echo "$as_me: failed program was:" >&5
19927 sed 's/^/| /' conftest.$ac_ext >&5
19928
19929 ac_lo=`expr '(' $ac_mid ')' + 1`
19930 fi
19931 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19932 done
19933 case $ac_lo in
19934 ?*) pgac_cv_alignof_long=$ac_lo;;
19935 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19936 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19937    { (exit 1); exit 1; }; } ;;
19938 esac
19939 else
19940   if test "$cross_compiling" = yes; then
19941   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19942 See \`config.log' for more details." >&5
19943 echo "$as_me: error: cannot run test program while cross compiling
19944 See \`config.log' for more details." >&2;}
19945    { (exit 1); exit 1; }; }
19946 else
19947   cat >conftest.$ac_ext <<_ACEOF
19948 /* confdefs.h.  */
19949 _ACEOF
19950 cat confdefs.h >>conftest.$ac_ext
19951 cat >>conftest.$ac_ext <<_ACEOF
19952 /* end confdefs.h.  */
19953 $ac_includes_default
19954 struct { char filler; long field; } pgac_struct;
19955 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19956 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19957 #include <stdio.h>
19958 #include <stdlib.h>
19959 int
19960 main ()
19961 {
19962
19963   FILE *f = fopen ("conftest.val", "w");
19964   if (! f)
19965     exit (1);
19966   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19967     {
19968       long i = longval ();
19969       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19970         exit (1);
19971       fprintf (f, "%ld\n", i);
19972     }
19973   else
19974     {
19975       unsigned long i = ulongval ();
19976       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19977         exit (1);
19978       fprintf (f, "%lu\n", i);
19979     }
19980   exit (ferror (f) || fclose (f) != 0);
19981
19982   ;
19983   return 0;
19984 }
19985 _ACEOF
19986 rm -f conftest$ac_exeext
19987 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19988   (eval $ac_link) 2>&5
19989   ac_status=$?
19990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19991   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19993   (eval $ac_try) 2>&5
19994   ac_status=$?
19995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19996   (exit $ac_status); }; }; then
19997   pgac_cv_alignof_long=`cat conftest.val`
19998 else
19999   echo "$as_me: program exited with status $ac_status" >&5
20000 echo "$as_me: failed program was:" >&5
20001 sed 's/^/| /' conftest.$ac_ext >&5
20002
20003 ( exit $ac_status )
20004 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20005 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20006    { (exit 1); exit 1; }; }
20007 fi
20008 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20009 fi
20010 fi
20011 rm -f conftest.val
20012 else
20013   pgac_cv_alignof_long=0
20014 fi
20015 fi
20016 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
20017 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
20018 cat >>confdefs.h <<_ACEOF
20019 #define ALIGNOF_LONG $pgac_cv_alignof_long
20020 _ACEOF
20021
20022
20023 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
20024   echo "$as_me:$LINENO: checking for long long int" >&5
20025 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
20026 if test "${ac_cv_type_long_long_int+set}" = set; then
20027   echo $ECHO_N "(cached) $ECHO_C" >&6
20028 else
20029   cat >conftest.$ac_ext <<_ACEOF
20030 /* confdefs.h.  */
20031 _ACEOF
20032 cat confdefs.h >>conftest.$ac_ext
20033 cat >>conftest.$ac_ext <<_ACEOF
20034 /* end confdefs.h.  */
20035 $ac_includes_default
20036 int
20037 main ()
20038 {
20039 if ((long long int *) 0)
20040   return 0;
20041 if (sizeof (long long int))
20042   return 0;
20043   ;
20044   return 0;
20045 }
20046 _ACEOF
20047 rm -f conftest.$ac_objext
20048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20049   (eval $ac_compile) 2>conftest.er1
20050   ac_status=$?
20051   grep -v '^ *+' conftest.er1 >conftest.err
20052   rm -f conftest.er1
20053   cat conftest.err >&5
20054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20055   (exit $ac_status); } &&
20056          { ac_try='test -z "$ac_c_werror_flag"
20057                          || test ! -s conftest.err'
20058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20059   (eval $ac_try) 2>&5
20060   ac_status=$?
20061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20062   (exit $ac_status); }; } &&
20063          { ac_try='test -s conftest.$ac_objext'
20064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20065   (eval $ac_try) 2>&5
20066   ac_status=$?
20067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20068   (exit $ac_status); }; }; then
20069   ac_cv_type_long_long_int=yes
20070 else
20071   echo "$as_me: failed program was:" >&5
20072 sed 's/^/| /' conftest.$ac_ext >&5
20073
20074 ac_cv_type_long_long_int=no
20075 fi
20076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20077 fi
20078 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
20079 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
20080
20081 echo "$as_me:$LINENO: checking alignment of long long int" >&5
20082 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
20083 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
20084   echo $ECHO_N "(cached) $ECHO_C" >&6
20085 else
20086   if test "$ac_cv_type_long_long_int" = yes; then
20087   if test "$cross_compiling" = yes; then
20088   # Depending upon the size, compute the lo and hi bounds.
20089 cat >conftest.$ac_ext <<_ACEOF
20090 /* confdefs.h.  */
20091 _ACEOF
20092 cat confdefs.h >>conftest.$ac_ext
20093 cat >>conftest.$ac_ext <<_ACEOF
20094 /* end confdefs.h.  */
20095 $ac_includes_default
20096 struct { char filler; long long int field; } pgac_struct;
20097 int
20098 main ()
20099 {
20100 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20101 test_array [0] = 0
20102
20103   ;
20104   return 0;
20105 }
20106 _ACEOF
20107 rm -f conftest.$ac_objext
20108 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20109   (eval $ac_compile) 2>conftest.er1
20110   ac_status=$?
20111   grep -v '^ *+' conftest.er1 >conftest.err
20112   rm -f conftest.er1
20113   cat conftest.err >&5
20114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20115   (exit $ac_status); } &&
20116          { ac_try='test -z "$ac_c_werror_flag"
20117                          || test ! -s conftest.err'
20118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20119   (eval $ac_try) 2>&5
20120   ac_status=$?
20121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20122   (exit $ac_status); }; } &&
20123          { ac_try='test -s conftest.$ac_objext'
20124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20125   (eval $ac_try) 2>&5
20126   ac_status=$?
20127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20128   (exit $ac_status); }; }; then
20129   ac_lo=0 ac_mid=0
20130   while :; do
20131     cat >conftest.$ac_ext <<_ACEOF
20132 /* confdefs.h.  */
20133 _ACEOF
20134 cat confdefs.h >>conftest.$ac_ext
20135 cat >>conftest.$ac_ext <<_ACEOF
20136 /* end confdefs.h.  */
20137 $ac_includes_default
20138 struct { char filler; long long int field; } pgac_struct;
20139 int
20140 main ()
20141 {
20142 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20143 test_array [0] = 0
20144
20145   ;
20146   return 0;
20147 }
20148 _ACEOF
20149 rm -f conftest.$ac_objext
20150 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20151   (eval $ac_compile) 2>conftest.er1
20152   ac_status=$?
20153   grep -v '^ *+' conftest.er1 >conftest.err
20154   rm -f conftest.er1
20155   cat conftest.err >&5
20156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20157   (exit $ac_status); } &&
20158          { ac_try='test -z "$ac_c_werror_flag"
20159                          || test ! -s conftest.err'
20160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20161   (eval $ac_try) 2>&5
20162   ac_status=$?
20163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20164   (exit $ac_status); }; } &&
20165          { ac_try='test -s conftest.$ac_objext'
20166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20167   (eval $ac_try) 2>&5
20168   ac_status=$?
20169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20170   (exit $ac_status); }; }; then
20171   ac_hi=$ac_mid; break
20172 else
20173   echo "$as_me: failed program was:" >&5
20174 sed 's/^/| /' conftest.$ac_ext >&5
20175
20176 ac_lo=`expr $ac_mid + 1`
20177                     if test $ac_lo -le $ac_mid; then
20178                       ac_lo= ac_hi=
20179                       break
20180                     fi
20181                     ac_mid=`expr 2 '*' $ac_mid + 1`
20182 fi
20183 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20184   done
20185 else
20186   echo "$as_me: failed program was:" >&5
20187 sed 's/^/| /' conftest.$ac_ext >&5
20188
20189 cat >conftest.$ac_ext <<_ACEOF
20190 /* confdefs.h.  */
20191 _ACEOF
20192 cat confdefs.h >>conftest.$ac_ext
20193 cat >>conftest.$ac_ext <<_ACEOF
20194 /* end confdefs.h.  */
20195 $ac_includes_default
20196 struct { char filler; long long int field; } pgac_struct;
20197 int
20198 main ()
20199 {
20200 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20201 test_array [0] = 0
20202
20203   ;
20204   return 0;
20205 }
20206 _ACEOF
20207 rm -f conftest.$ac_objext
20208 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20209   (eval $ac_compile) 2>conftest.er1
20210   ac_status=$?
20211   grep -v '^ *+' conftest.er1 >conftest.err
20212   rm -f conftest.er1
20213   cat conftest.err >&5
20214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20215   (exit $ac_status); } &&
20216          { ac_try='test -z "$ac_c_werror_flag"
20217                          || test ! -s conftest.err'
20218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20219   (eval $ac_try) 2>&5
20220   ac_status=$?
20221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20222   (exit $ac_status); }; } &&
20223          { ac_try='test -s conftest.$ac_objext'
20224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20225   (eval $ac_try) 2>&5
20226   ac_status=$?
20227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20228   (exit $ac_status); }; }; then
20229   ac_hi=-1 ac_mid=-1
20230   while :; do
20231     cat >conftest.$ac_ext <<_ACEOF
20232 /* confdefs.h.  */
20233 _ACEOF
20234 cat confdefs.h >>conftest.$ac_ext
20235 cat >>conftest.$ac_ext <<_ACEOF
20236 /* end confdefs.h.  */
20237 $ac_includes_default
20238 struct { char filler; long long int field; } pgac_struct;
20239 int
20240 main ()
20241 {
20242 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20243 test_array [0] = 0
20244
20245   ;
20246   return 0;
20247 }
20248 _ACEOF
20249 rm -f conftest.$ac_objext
20250 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20251   (eval $ac_compile) 2>conftest.er1
20252   ac_status=$?
20253   grep -v '^ *+' conftest.er1 >conftest.err
20254   rm -f conftest.er1
20255   cat conftest.err >&5
20256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20257   (exit $ac_status); } &&
20258          { ac_try='test -z "$ac_c_werror_flag"
20259                          || test ! -s conftest.err'
20260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20261   (eval $ac_try) 2>&5
20262   ac_status=$?
20263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20264   (exit $ac_status); }; } &&
20265          { ac_try='test -s conftest.$ac_objext'
20266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20267   (eval $ac_try) 2>&5
20268   ac_status=$?
20269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20270   (exit $ac_status); }; }; then
20271   ac_lo=$ac_mid; break
20272 else
20273   echo "$as_me: failed program was:" >&5
20274 sed 's/^/| /' conftest.$ac_ext >&5
20275
20276 ac_hi=`expr '(' $ac_mid ')' - 1`
20277                        if test $ac_mid -le $ac_hi; then
20278                          ac_lo= ac_hi=
20279                          break
20280                        fi
20281                        ac_mid=`expr 2 '*' $ac_mid`
20282 fi
20283 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20284   done
20285 else
20286   echo "$as_me: failed program was:" >&5
20287 sed 's/^/| /' conftest.$ac_ext >&5
20288
20289 ac_lo= ac_hi=
20290 fi
20291 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20292 fi
20293 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20294 # Binary search between lo and hi bounds.
20295 while test "x$ac_lo" != "x$ac_hi"; do
20296   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20297   cat >conftest.$ac_ext <<_ACEOF
20298 /* confdefs.h.  */
20299 _ACEOF
20300 cat confdefs.h >>conftest.$ac_ext
20301 cat >>conftest.$ac_ext <<_ACEOF
20302 /* end confdefs.h.  */
20303 $ac_includes_default
20304 struct { char filler; long long int field; } pgac_struct;
20305 int
20306 main ()
20307 {
20308 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20309 test_array [0] = 0
20310
20311   ;
20312   return 0;
20313 }
20314 _ACEOF
20315 rm -f conftest.$ac_objext
20316 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20317   (eval $ac_compile) 2>conftest.er1
20318   ac_status=$?
20319   grep -v '^ *+' conftest.er1 >conftest.err
20320   rm -f conftest.er1
20321   cat conftest.err >&5
20322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20323   (exit $ac_status); } &&
20324          { ac_try='test -z "$ac_c_werror_flag"
20325                          || test ! -s conftest.err'
20326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20327   (eval $ac_try) 2>&5
20328   ac_status=$?
20329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20330   (exit $ac_status); }; } &&
20331          { ac_try='test -s conftest.$ac_objext'
20332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20333   (eval $ac_try) 2>&5
20334   ac_status=$?
20335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20336   (exit $ac_status); }; }; then
20337   ac_hi=$ac_mid
20338 else
20339   echo "$as_me: failed program was:" >&5
20340 sed 's/^/| /' conftest.$ac_ext >&5
20341
20342 ac_lo=`expr '(' $ac_mid ')' + 1`
20343 fi
20344 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20345 done
20346 case $ac_lo in
20347 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20348 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20349 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20350    { (exit 1); exit 1; }; } ;;
20351 esac
20352 else
20353   if test "$cross_compiling" = yes; then
20354   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20355 See \`config.log' for more details." >&5
20356 echo "$as_me: error: cannot run test program while cross compiling
20357 See \`config.log' for more details." >&2;}
20358    { (exit 1); exit 1; }; }
20359 else
20360   cat >conftest.$ac_ext <<_ACEOF
20361 /* confdefs.h.  */
20362 _ACEOF
20363 cat confdefs.h >>conftest.$ac_ext
20364 cat >>conftest.$ac_ext <<_ACEOF
20365 /* end confdefs.h.  */
20366 $ac_includes_default
20367 struct { char filler; long long int field; } pgac_struct;
20368 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20369 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20370 #include <stdio.h>
20371 #include <stdlib.h>
20372 int
20373 main ()
20374 {
20375
20376   FILE *f = fopen ("conftest.val", "w");
20377   if (! f)
20378     exit (1);
20379   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20380     {
20381       long i = longval ();
20382       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20383         exit (1);
20384       fprintf (f, "%ld\n", i);
20385     }
20386   else
20387     {
20388       unsigned long i = ulongval ();
20389       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20390         exit (1);
20391       fprintf (f, "%lu\n", i);
20392     }
20393   exit (ferror (f) || fclose (f) != 0);
20394
20395   ;
20396   return 0;
20397 }
20398 _ACEOF
20399 rm -f conftest$ac_exeext
20400 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20401   (eval $ac_link) 2>&5
20402   ac_status=$?
20403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20406   (eval $ac_try) 2>&5
20407   ac_status=$?
20408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20409   (exit $ac_status); }; }; then
20410   pgac_cv_alignof_long_long_int=`cat conftest.val`
20411 else
20412   echo "$as_me: program exited with status $ac_status" >&5
20413 echo "$as_me: failed program was:" >&5
20414 sed 's/^/| /' conftest.$ac_ext >&5
20415
20416 ( exit $ac_status )
20417 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20418 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20419    { (exit 1); exit 1; }; }
20420 fi
20421 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20422 fi
20423 fi
20424 rm -f conftest.val
20425 else
20426   pgac_cv_alignof_long_long_int=0
20427 fi
20428 fi
20429 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20430 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20431 cat >>confdefs.h <<_ACEOF
20432 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20433 _ACEOF
20434
20435
20436 fi
20437 echo "$as_me:$LINENO: checking for double" >&5
20438 echo $ECHO_N "checking for double... $ECHO_C" >&6
20439 if test "${ac_cv_type_double+set}" = set; then
20440   echo $ECHO_N "(cached) $ECHO_C" >&6
20441 else
20442   cat >conftest.$ac_ext <<_ACEOF
20443 /* confdefs.h.  */
20444 _ACEOF
20445 cat confdefs.h >>conftest.$ac_ext
20446 cat >>conftest.$ac_ext <<_ACEOF
20447 /* end confdefs.h.  */
20448 $ac_includes_default
20449 int
20450 main ()
20451 {
20452 if ((double *) 0)
20453   return 0;
20454 if (sizeof (double))
20455   return 0;
20456   ;
20457   return 0;
20458 }
20459 _ACEOF
20460 rm -f conftest.$ac_objext
20461 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20462   (eval $ac_compile) 2>conftest.er1
20463   ac_status=$?
20464   grep -v '^ *+' conftest.er1 >conftest.err
20465   rm -f conftest.er1
20466   cat conftest.err >&5
20467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20468   (exit $ac_status); } &&
20469          { ac_try='test -z "$ac_c_werror_flag"
20470                          || test ! -s conftest.err'
20471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20472   (eval $ac_try) 2>&5
20473   ac_status=$?
20474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20475   (exit $ac_status); }; } &&
20476          { ac_try='test -s conftest.$ac_objext'
20477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20478   (eval $ac_try) 2>&5
20479   ac_status=$?
20480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20481   (exit $ac_status); }; }; then
20482   ac_cv_type_double=yes
20483 else
20484   echo "$as_me: failed program was:" >&5
20485 sed 's/^/| /' conftest.$ac_ext >&5
20486
20487 ac_cv_type_double=no
20488 fi
20489 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20490 fi
20491 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20492 echo "${ECHO_T}$ac_cv_type_double" >&6
20493
20494 echo "$as_me:$LINENO: checking alignment of double" >&5
20495 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20496 if test "${pgac_cv_alignof_double+set}" = set; then
20497   echo $ECHO_N "(cached) $ECHO_C" >&6
20498 else
20499   if test "$ac_cv_type_double" = yes; then
20500   if test "$cross_compiling" = yes; then
20501   # Depending upon the size, compute the lo and hi bounds.
20502 cat >conftest.$ac_ext <<_ACEOF
20503 /* confdefs.h.  */
20504 _ACEOF
20505 cat confdefs.h >>conftest.$ac_ext
20506 cat >>conftest.$ac_ext <<_ACEOF
20507 /* end confdefs.h.  */
20508 $ac_includes_default
20509 struct { char filler; double field; } pgac_struct;
20510 int
20511 main ()
20512 {
20513 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20514 test_array [0] = 0
20515
20516   ;
20517   return 0;
20518 }
20519 _ACEOF
20520 rm -f conftest.$ac_objext
20521 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20522   (eval $ac_compile) 2>conftest.er1
20523   ac_status=$?
20524   grep -v '^ *+' conftest.er1 >conftest.err
20525   rm -f conftest.er1
20526   cat conftest.err >&5
20527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20528   (exit $ac_status); } &&
20529          { ac_try='test -z "$ac_c_werror_flag"
20530                          || test ! -s conftest.err'
20531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20532   (eval $ac_try) 2>&5
20533   ac_status=$?
20534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20535   (exit $ac_status); }; } &&
20536          { ac_try='test -s conftest.$ac_objext'
20537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20538   (eval $ac_try) 2>&5
20539   ac_status=$?
20540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20541   (exit $ac_status); }; }; then
20542   ac_lo=0 ac_mid=0
20543   while :; do
20544     cat >conftest.$ac_ext <<_ACEOF
20545 /* confdefs.h.  */
20546 _ACEOF
20547 cat confdefs.h >>conftest.$ac_ext
20548 cat >>conftest.$ac_ext <<_ACEOF
20549 /* end confdefs.h.  */
20550 $ac_includes_default
20551 struct { char filler; double field; } pgac_struct;
20552 int
20553 main ()
20554 {
20555 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20556 test_array [0] = 0
20557
20558   ;
20559   return 0;
20560 }
20561 _ACEOF
20562 rm -f conftest.$ac_objext
20563 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20564   (eval $ac_compile) 2>conftest.er1
20565   ac_status=$?
20566   grep -v '^ *+' conftest.er1 >conftest.err
20567   rm -f conftest.er1
20568   cat conftest.err >&5
20569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20570   (exit $ac_status); } &&
20571          { ac_try='test -z "$ac_c_werror_flag"
20572                          || test ! -s conftest.err'
20573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20574   (eval $ac_try) 2>&5
20575   ac_status=$?
20576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20577   (exit $ac_status); }; } &&
20578          { ac_try='test -s conftest.$ac_objext'
20579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20580   (eval $ac_try) 2>&5
20581   ac_status=$?
20582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20583   (exit $ac_status); }; }; then
20584   ac_hi=$ac_mid; break
20585 else
20586   echo "$as_me: failed program was:" >&5
20587 sed 's/^/| /' conftest.$ac_ext >&5
20588
20589 ac_lo=`expr $ac_mid + 1`
20590                     if test $ac_lo -le $ac_mid; then
20591                       ac_lo= ac_hi=
20592                       break
20593                     fi
20594                     ac_mid=`expr 2 '*' $ac_mid + 1`
20595 fi
20596 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20597   done
20598 else
20599   echo "$as_me: failed program was:" >&5
20600 sed 's/^/| /' conftest.$ac_ext >&5
20601
20602 cat >conftest.$ac_ext <<_ACEOF
20603 /* confdefs.h.  */
20604 _ACEOF
20605 cat confdefs.h >>conftest.$ac_ext
20606 cat >>conftest.$ac_ext <<_ACEOF
20607 /* end confdefs.h.  */
20608 $ac_includes_default
20609 struct { char filler; double field; } pgac_struct;
20610 int
20611 main ()
20612 {
20613 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20614 test_array [0] = 0
20615
20616   ;
20617   return 0;
20618 }
20619 _ACEOF
20620 rm -f conftest.$ac_objext
20621 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20622   (eval $ac_compile) 2>conftest.er1
20623   ac_status=$?
20624   grep -v '^ *+' conftest.er1 >conftest.err
20625   rm -f conftest.er1
20626   cat conftest.err >&5
20627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20628   (exit $ac_status); } &&
20629          { ac_try='test -z "$ac_c_werror_flag"
20630                          || test ! -s conftest.err'
20631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20632   (eval $ac_try) 2>&5
20633   ac_status=$?
20634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20635   (exit $ac_status); }; } &&
20636          { ac_try='test -s conftest.$ac_objext'
20637   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20638   (eval $ac_try) 2>&5
20639   ac_status=$?
20640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20641   (exit $ac_status); }; }; then
20642   ac_hi=-1 ac_mid=-1
20643   while :; do
20644     cat >conftest.$ac_ext <<_ACEOF
20645 /* confdefs.h.  */
20646 _ACEOF
20647 cat confdefs.h >>conftest.$ac_ext
20648 cat >>conftest.$ac_ext <<_ACEOF
20649 /* end confdefs.h.  */
20650 $ac_includes_default
20651 struct { char filler; double field; } pgac_struct;
20652 int
20653 main ()
20654 {
20655 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20656 test_array [0] = 0
20657
20658   ;
20659   return 0;
20660 }
20661 _ACEOF
20662 rm -f conftest.$ac_objext
20663 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20664   (eval $ac_compile) 2>conftest.er1
20665   ac_status=$?
20666   grep -v '^ *+' conftest.er1 >conftest.err
20667   rm -f conftest.er1
20668   cat conftest.err >&5
20669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20670   (exit $ac_status); } &&
20671          { ac_try='test -z "$ac_c_werror_flag"
20672                          || test ! -s conftest.err'
20673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20674   (eval $ac_try) 2>&5
20675   ac_status=$?
20676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20677   (exit $ac_status); }; } &&
20678          { ac_try='test -s conftest.$ac_objext'
20679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20680   (eval $ac_try) 2>&5
20681   ac_status=$?
20682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20683   (exit $ac_status); }; }; then
20684   ac_lo=$ac_mid; break
20685 else
20686   echo "$as_me: failed program was:" >&5
20687 sed 's/^/| /' conftest.$ac_ext >&5
20688
20689 ac_hi=`expr '(' $ac_mid ')' - 1`
20690                        if test $ac_mid -le $ac_hi; then
20691                          ac_lo= ac_hi=
20692                          break
20693                        fi
20694                        ac_mid=`expr 2 '*' $ac_mid`
20695 fi
20696 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20697   done
20698 else
20699   echo "$as_me: failed program was:" >&5
20700 sed 's/^/| /' conftest.$ac_ext >&5
20701
20702 ac_lo= ac_hi=
20703 fi
20704 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20705 fi
20706 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20707 # Binary search between lo and hi bounds.
20708 while test "x$ac_lo" != "x$ac_hi"; do
20709   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20710   cat >conftest.$ac_ext <<_ACEOF
20711 /* confdefs.h.  */
20712 _ACEOF
20713 cat confdefs.h >>conftest.$ac_ext
20714 cat >>conftest.$ac_ext <<_ACEOF
20715 /* end confdefs.h.  */
20716 $ac_includes_default
20717 struct { char filler; double field; } pgac_struct;
20718 int
20719 main ()
20720 {
20721 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20722 test_array [0] = 0
20723
20724   ;
20725   return 0;
20726 }
20727 _ACEOF
20728 rm -f conftest.$ac_objext
20729 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20730   (eval $ac_compile) 2>conftest.er1
20731   ac_status=$?
20732   grep -v '^ *+' conftest.er1 >conftest.err
20733   rm -f conftest.er1
20734   cat conftest.err >&5
20735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20736   (exit $ac_status); } &&
20737          { ac_try='test -z "$ac_c_werror_flag"
20738                          || test ! -s conftest.err'
20739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20740   (eval $ac_try) 2>&5
20741   ac_status=$?
20742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20743   (exit $ac_status); }; } &&
20744          { ac_try='test -s conftest.$ac_objext'
20745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20746   (eval $ac_try) 2>&5
20747   ac_status=$?
20748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20749   (exit $ac_status); }; }; then
20750   ac_hi=$ac_mid
20751 else
20752   echo "$as_me: failed program was:" >&5
20753 sed 's/^/| /' conftest.$ac_ext >&5
20754
20755 ac_lo=`expr '(' $ac_mid ')' + 1`
20756 fi
20757 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20758 done
20759 case $ac_lo in
20760 ?*) pgac_cv_alignof_double=$ac_lo;;
20761 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20762 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20763    { (exit 1); exit 1; }; } ;;
20764 esac
20765 else
20766   if test "$cross_compiling" = yes; then
20767   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20768 See \`config.log' for more details." >&5
20769 echo "$as_me: error: cannot run test program while cross compiling
20770 See \`config.log' for more details." >&2;}
20771    { (exit 1); exit 1; }; }
20772 else
20773   cat >conftest.$ac_ext <<_ACEOF
20774 /* confdefs.h.  */
20775 _ACEOF
20776 cat confdefs.h >>conftest.$ac_ext
20777 cat >>conftest.$ac_ext <<_ACEOF
20778 /* end confdefs.h.  */
20779 $ac_includes_default
20780 struct { char filler; double field; } pgac_struct;
20781 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20782 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20783 #include <stdio.h>
20784 #include <stdlib.h>
20785 int
20786 main ()
20787 {
20788
20789   FILE *f = fopen ("conftest.val", "w");
20790   if (! f)
20791     exit (1);
20792   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20793     {
20794       long i = longval ();
20795       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20796         exit (1);
20797       fprintf (f, "%ld\n", i);
20798     }
20799   else
20800     {
20801       unsigned long i = ulongval ();
20802       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20803         exit (1);
20804       fprintf (f, "%lu\n", i);
20805     }
20806   exit (ferror (f) || fclose (f) != 0);
20807
20808   ;
20809   return 0;
20810 }
20811 _ACEOF
20812 rm -f conftest$ac_exeext
20813 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20814   (eval $ac_link) 2>&5
20815   ac_status=$?
20816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20817   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20819   (eval $ac_try) 2>&5
20820   ac_status=$?
20821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20822   (exit $ac_status); }; }; then
20823   pgac_cv_alignof_double=`cat conftest.val`
20824 else
20825   echo "$as_me: program exited with status $ac_status" >&5
20826 echo "$as_me: failed program was:" >&5
20827 sed 's/^/| /' conftest.$ac_ext >&5
20828
20829 ( exit $ac_status )
20830 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20831 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20832    { (exit 1); exit 1; }; }
20833 fi
20834 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20835 fi
20836 fi
20837 rm -f conftest.val
20838 else
20839   pgac_cv_alignof_double=0
20840 fi
20841 fi
20842 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20843 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20844 cat >>confdefs.h <<_ACEOF
20845 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20846 _ACEOF
20847
20848
20849
20850 # Compute maximum alignment of any basic type.
20851 # We assume long's alignment is at least as strong as char, short, or int;
20852 # but we must check long long (if it exists) and double.
20853
20854 MAX_ALIGNOF=$pgac_cv_alignof_long
20855 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20856   MAX_ALIGNOF=$pgac_cv_alignof_double
20857 fi
20858 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20859   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20860 fi
20861
20862 cat >>confdefs.h <<_ACEOF
20863 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20864 _ACEOF
20865
20866
20867
20868 # Some platforms predefine the types int8, int16, etc.  Only check
20869 # a (hopefully) representative subset.
20870 echo "$as_me:$LINENO: checking for int8" >&5
20871 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20872 if test "${ac_cv_type_int8+set}" = set; then
20873   echo $ECHO_N "(cached) $ECHO_C" >&6
20874 else
20875   cat >conftest.$ac_ext <<_ACEOF
20876 /* confdefs.h.  */
20877 _ACEOF
20878 cat confdefs.h >>conftest.$ac_ext
20879 cat >>conftest.$ac_ext <<_ACEOF
20880 /* end confdefs.h.  */
20881 #include <stdio.h>
20882 #ifdef HAVE_SUPPORTDEFS_H
20883 #include <SupportDefs.h>
20884 #endif
20885
20886 int
20887 main ()
20888 {
20889 if ((int8 *) 0)
20890   return 0;
20891 if (sizeof (int8))
20892   return 0;
20893   ;
20894   return 0;
20895 }
20896 _ACEOF
20897 rm -f conftest.$ac_objext
20898 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20899   (eval $ac_compile) 2>conftest.er1
20900   ac_status=$?
20901   grep -v '^ *+' conftest.er1 >conftest.err
20902   rm -f conftest.er1
20903   cat conftest.err >&5
20904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20905   (exit $ac_status); } &&
20906          { ac_try='test -z "$ac_c_werror_flag"
20907                          || test ! -s conftest.err'
20908   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20909   (eval $ac_try) 2>&5
20910   ac_status=$?
20911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20912   (exit $ac_status); }; } &&
20913          { ac_try='test -s conftest.$ac_objext'
20914   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20915   (eval $ac_try) 2>&5
20916   ac_status=$?
20917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20918   (exit $ac_status); }; }; then
20919   ac_cv_type_int8=yes
20920 else
20921   echo "$as_me: failed program was:" >&5
20922 sed 's/^/| /' conftest.$ac_ext >&5
20923
20924 ac_cv_type_int8=no
20925 fi
20926 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20927 fi
20928 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20929 echo "${ECHO_T}$ac_cv_type_int8" >&6
20930 if test $ac_cv_type_int8 = yes; then
20931
20932 cat >>confdefs.h <<_ACEOF
20933 #define HAVE_INT8 1
20934 _ACEOF
20935
20936
20937 fi
20938 echo "$as_me:$LINENO: checking for uint8" >&5
20939 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20940 if test "${ac_cv_type_uint8+set}" = set; then
20941   echo $ECHO_N "(cached) $ECHO_C" >&6
20942 else
20943   cat >conftest.$ac_ext <<_ACEOF
20944 /* confdefs.h.  */
20945 _ACEOF
20946 cat confdefs.h >>conftest.$ac_ext
20947 cat >>conftest.$ac_ext <<_ACEOF
20948 /* end confdefs.h.  */
20949 #include <stdio.h>
20950 #ifdef HAVE_SUPPORTDEFS_H
20951 #include <SupportDefs.h>
20952 #endif
20953
20954 int
20955 main ()
20956 {
20957 if ((uint8 *) 0)
20958   return 0;
20959 if (sizeof (uint8))
20960   return 0;
20961   ;
20962   return 0;
20963 }
20964 _ACEOF
20965 rm -f conftest.$ac_objext
20966 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20967   (eval $ac_compile) 2>conftest.er1
20968   ac_status=$?
20969   grep -v '^ *+' conftest.er1 >conftest.err
20970   rm -f conftest.er1
20971   cat conftest.err >&5
20972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20973   (exit $ac_status); } &&
20974          { ac_try='test -z "$ac_c_werror_flag"
20975                          || test ! -s conftest.err'
20976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20977   (eval $ac_try) 2>&5
20978   ac_status=$?
20979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20980   (exit $ac_status); }; } &&
20981          { ac_try='test -s conftest.$ac_objext'
20982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20983   (eval $ac_try) 2>&5
20984   ac_status=$?
20985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20986   (exit $ac_status); }; }; then
20987   ac_cv_type_uint8=yes
20988 else
20989   echo "$as_me: failed program was:" >&5
20990 sed 's/^/| /' conftest.$ac_ext >&5
20991
20992 ac_cv_type_uint8=no
20993 fi
20994 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20995 fi
20996 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20997 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20998 if test $ac_cv_type_uint8 = yes; then
20999
21000 cat >>confdefs.h <<_ACEOF
21001 #define HAVE_UINT8 1
21002 _ACEOF
21003
21004
21005 fi
21006 echo "$as_me:$LINENO: checking for int64" >&5
21007 echo $ECHO_N "checking for int64... $ECHO_C" >&6
21008 if test "${ac_cv_type_int64+set}" = set; then
21009   echo $ECHO_N "(cached) $ECHO_C" >&6
21010 else
21011   cat >conftest.$ac_ext <<_ACEOF
21012 /* confdefs.h.  */
21013 _ACEOF
21014 cat confdefs.h >>conftest.$ac_ext
21015 cat >>conftest.$ac_ext <<_ACEOF
21016 /* end confdefs.h.  */
21017 #include <stdio.h>
21018 #ifdef HAVE_SUPPORTDEFS_H
21019 #include <SupportDefs.h>
21020 #endif
21021
21022 int
21023 main ()
21024 {
21025 if ((int64 *) 0)
21026   return 0;
21027 if (sizeof (int64))
21028   return 0;
21029   ;
21030   return 0;
21031 }
21032 _ACEOF
21033 rm -f conftest.$ac_objext
21034 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21035   (eval $ac_compile) 2>conftest.er1
21036   ac_status=$?
21037   grep -v '^ *+' conftest.er1 >conftest.err
21038   rm -f conftest.er1
21039   cat conftest.err >&5
21040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21041   (exit $ac_status); } &&
21042          { ac_try='test -z "$ac_c_werror_flag"
21043                          || test ! -s conftest.err'
21044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21045   (eval $ac_try) 2>&5
21046   ac_status=$?
21047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21048   (exit $ac_status); }; } &&
21049          { ac_try='test -s conftest.$ac_objext'
21050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21051   (eval $ac_try) 2>&5
21052   ac_status=$?
21053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21054   (exit $ac_status); }; }; then
21055   ac_cv_type_int64=yes
21056 else
21057   echo "$as_me: failed program was:" >&5
21058 sed 's/^/| /' conftest.$ac_ext >&5
21059
21060 ac_cv_type_int64=no
21061 fi
21062 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21063 fi
21064 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
21065 echo "${ECHO_T}$ac_cv_type_int64" >&6
21066 if test $ac_cv_type_int64 = yes; then
21067
21068 cat >>confdefs.h <<_ACEOF
21069 #define HAVE_INT64 1
21070 _ACEOF
21071
21072
21073 fi
21074 echo "$as_me:$LINENO: checking for uint64" >&5
21075 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
21076 if test "${ac_cv_type_uint64+set}" = set; then
21077   echo $ECHO_N "(cached) $ECHO_C" >&6
21078 else
21079   cat >conftest.$ac_ext <<_ACEOF
21080 /* confdefs.h.  */
21081 _ACEOF
21082 cat confdefs.h >>conftest.$ac_ext
21083 cat >>conftest.$ac_ext <<_ACEOF
21084 /* end confdefs.h.  */
21085 #include <stdio.h>
21086 #ifdef HAVE_SUPPORTDEFS_H
21087 #include <SupportDefs.h>
21088 #endif
21089
21090 int
21091 main ()
21092 {
21093 if ((uint64 *) 0)
21094   return 0;
21095 if (sizeof (uint64))
21096   return 0;
21097   ;
21098   return 0;
21099 }
21100 _ACEOF
21101 rm -f conftest.$ac_objext
21102 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21103   (eval $ac_compile) 2>conftest.er1
21104   ac_status=$?
21105   grep -v '^ *+' conftest.er1 >conftest.err
21106   rm -f conftest.er1
21107   cat conftest.err >&5
21108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21109   (exit $ac_status); } &&
21110          { ac_try='test -z "$ac_c_werror_flag"
21111                          || test ! -s conftest.err'
21112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21113   (eval $ac_try) 2>&5
21114   ac_status=$?
21115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21116   (exit $ac_status); }; } &&
21117          { ac_try='test -s conftest.$ac_objext'
21118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21119   (eval $ac_try) 2>&5
21120   ac_status=$?
21121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21122   (exit $ac_status); }; }; then
21123   ac_cv_type_uint64=yes
21124 else
21125   echo "$as_me: failed program was:" >&5
21126 sed 's/^/| /' conftest.$ac_ext >&5
21127
21128 ac_cv_type_uint64=no
21129 fi
21130 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21131 fi
21132 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
21133 echo "${ECHO_T}$ac_cv_type_uint64" >&6
21134 if test $ac_cv_type_uint64 = yes; then
21135
21136 cat >>confdefs.h <<_ACEOF
21137 #define HAVE_UINT64 1
21138 _ACEOF
21139
21140
21141 fi
21142
21143
21144 # We also check for sig_atomic_t, which *should* be defined per ANSI
21145 # C, but is missing on some old platforms.
21146 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
21147 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
21148 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
21149   echo $ECHO_N "(cached) $ECHO_C" >&6
21150 else
21151   cat >conftest.$ac_ext <<_ACEOF
21152 /* confdefs.h.  */
21153 _ACEOF
21154 cat confdefs.h >>conftest.$ac_ext
21155 cat >>conftest.$ac_ext <<_ACEOF
21156 /* end confdefs.h.  */
21157 #include <signal.h>
21158
21159 int
21160 main ()
21161 {
21162 if ((sig_atomic_t *) 0)
21163   return 0;
21164 if (sizeof (sig_atomic_t))
21165   return 0;
21166   ;
21167   return 0;
21168 }
21169 _ACEOF
21170 rm -f conftest.$ac_objext
21171 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21172   (eval $ac_compile) 2>conftest.er1
21173   ac_status=$?
21174   grep -v '^ *+' conftest.er1 >conftest.err
21175   rm -f conftest.er1
21176   cat conftest.err >&5
21177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21178   (exit $ac_status); } &&
21179          { ac_try='test -z "$ac_c_werror_flag"
21180                          || test ! -s conftest.err'
21181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21182   (eval $ac_try) 2>&5
21183   ac_status=$?
21184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21185   (exit $ac_status); }; } &&
21186          { ac_try='test -s conftest.$ac_objext'
21187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21188   (eval $ac_try) 2>&5
21189   ac_status=$?
21190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21191   (exit $ac_status); }; }; then
21192   ac_cv_type_sig_atomic_t=yes
21193 else
21194   echo "$as_me: failed program was:" >&5
21195 sed 's/^/| /' conftest.$ac_ext >&5
21196
21197 ac_cv_type_sig_atomic_t=no
21198 fi
21199 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21200 fi
21201 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21202 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21203 if test $ac_cv_type_sig_atomic_t = yes; then
21204
21205 cat >>confdefs.h <<_ACEOF
21206 #define HAVE_SIG_ATOMIC_T 1
21207 _ACEOF
21208
21209
21210 fi
21211
21212
21213
21214 if test x"$template" != x"win32"
21215 then
21216 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21217 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21218 if test "${pgac_cv_func_posix_signals+set}" = set; then
21219   echo $ECHO_N "(cached) $ECHO_C" >&6
21220 else
21221   cat >conftest.$ac_ext <<_ACEOF
21222 /* confdefs.h.  */
21223 _ACEOF
21224 cat confdefs.h >>conftest.$ac_ext
21225 cat >>conftest.$ac_ext <<_ACEOF
21226 /* end confdefs.h.  */
21227 #include <signal.h>
21228
21229 int
21230 main ()
21231 {
21232 struct sigaction act, oact;
21233 sigemptyset(&act.sa_mask);
21234 act.sa_flags = SA_RESTART;
21235 sigaction(0, &act, &oact);
21236   ;
21237   return 0;
21238 }
21239 _ACEOF
21240 rm -f conftest.$ac_objext conftest$ac_exeext
21241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21242   (eval $ac_link) 2>conftest.er1
21243   ac_status=$?
21244   grep -v '^ *+' conftest.er1 >conftest.err
21245   rm -f conftest.er1
21246   cat conftest.err >&5
21247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21248   (exit $ac_status); } &&
21249          { ac_try='test -z "$ac_c_werror_flag"
21250                          || test ! -s conftest.err'
21251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21252   (eval $ac_try) 2>&5
21253   ac_status=$?
21254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21255   (exit $ac_status); }; } &&
21256          { ac_try='test -s conftest$ac_exeext'
21257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21258   (eval $ac_try) 2>&5
21259   ac_status=$?
21260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21261   (exit $ac_status); }; }; then
21262   pgac_cv_func_posix_signals=yes
21263 else
21264   echo "$as_me: failed program was:" >&5
21265 sed 's/^/| /' conftest.$ac_ext >&5
21266
21267 pgac_cv_func_posix_signals=no
21268 fi
21269 rm -f conftest.err conftest.$ac_objext \
21270       conftest$ac_exeext conftest.$ac_ext
21271 fi
21272 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21273 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21274 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21275
21276 cat >>confdefs.h <<\_ACEOF
21277 #define HAVE_POSIX_SIGNALS
21278 _ACEOF
21279
21280 fi
21281 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21282
21283 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21284   { { echo "$as_me:$LINENO: error:
21285 *** Thread-safety requires POSIX signals, which are not supported by your
21286 *** operating system.
21287 " >&5
21288 echo "$as_me: error:
21289 *** Thread-safety requires POSIX signals, which are not supported by your
21290 *** operating system.
21291 " >&2;}
21292    { (exit 1); exit 1; }; }
21293 fi
21294 fi
21295
21296 if test $ac_cv_func_fseeko = yes; then
21297 # Check whether --enable-largefile or --disable-largefile was given.
21298 if test "${enable_largefile+set}" = set; then
21299   enableval="$enable_largefile"
21300
21301 fi;
21302 if test "$enable_largefile" != no; then
21303
21304   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21305 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21306 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21307   echo $ECHO_N "(cached) $ECHO_C" >&6
21308 else
21309   ac_cv_sys_largefile_CC=no
21310      if test "$GCC" != yes; then
21311        ac_save_CC=$CC
21312        while :; do
21313          # IRIX 6.2 and later do not support large files by default,
21314          # so use the C compiler's -n32 option if that helps.
21315          cat >conftest.$ac_ext <<_ACEOF
21316 /* confdefs.h.  */
21317 _ACEOF
21318 cat confdefs.h >>conftest.$ac_ext
21319 cat >>conftest.$ac_ext <<_ACEOF
21320 /* end confdefs.h.  */
21321 #include <sys/types.h>
21322  /* Check that off_t can represent 2**63 - 1 correctly.
21323     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21324     since some C++ compilers masquerading as C compilers
21325     incorrectly reject 9223372036854775807.  */
21326 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21327   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21328                        && LARGE_OFF_T % 2147483647 == 1)
21329                       ? 1 : -1];
21330 int
21331 main ()
21332 {
21333
21334   ;
21335   return 0;
21336 }
21337 _ACEOF
21338          rm -f conftest.$ac_objext
21339 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21340   (eval $ac_compile) 2>conftest.er1
21341   ac_status=$?
21342   grep -v '^ *+' conftest.er1 >conftest.err
21343   rm -f conftest.er1
21344   cat conftest.err >&5
21345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21346   (exit $ac_status); } &&
21347          { ac_try='test -z "$ac_c_werror_flag"
21348                          || test ! -s conftest.err'
21349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21350   (eval $ac_try) 2>&5
21351   ac_status=$?
21352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21353   (exit $ac_status); }; } &&
21354          { ac_try='test -s conftest.$ac_objext'
21355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21356   (eval $ac_try) 2>&5
21357   ac_status=$?
21358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21359   (exit $ac_status); }; }; then
21360   break
21361 else
21362   echo "$as_me: failed program was:" >&5
21363 sed 's/^/| /' conftest.$ac_ext >&5
21364
21365 fi
21366 rm -f conftest.err conftest.$ac_objext
21367          CC="$CC -n32"
21368          rm -f conftest.$ac_objext
21369 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21370   (eval $ac_compile) 2>conftest.er1
21371   ac_status=$?
21372   grep -v '^ *+' conftest.er1 >conftest.err
21373   rm -f conftest.er1
21374   cat conftest.err >&5
21375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21376   (exit $ac_status); } &&
21377          { ac_try='test -z "$ac_c_werror_flag"
21378                          || test ! -s conftest.err'
21379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21380   (eval $ac_try) 2>&5
21381   ac_status=$?
21382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21383   (exit $ac_status); }; } &&
21384          { ac_try='test -s conftest.$ac_objext'
21385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21386   (eval $ac_try) 2>&5
21387   ac_status=$?
21388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21389   (exit $ac_status); }; }; then
21390   ac_cv_sys_largefile_CC=' -n32'; break
21391 else
21392   echo "$as_me: failed program was:" >&5
21393 sed 's/^/| /' conftest.$ac_ext >&5
21394
21395 fi
21396 rm -f conftest.err conftest.$ac_objext
21397          break
21398        done
21399        CC=$ac_save_CC
21400        rm -f conftest.$ac_ext
21401     fi
21402 fi
21403 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21404 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21405   if test "$ac_cv_sys_largefile_CC" != no; then
21406     CC=$CC$ac_cv_sys_largefile_CC
21407   fi
21408
21409   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21410 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21411 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21412   echo $ECHO_N "(cached) $ECHO_C" >&6
21413 else
21414   while :; do
21415   ac_cv_sys_file_offset_bits=no
21416   cat >conftest.$ac_ext <<_ACEOF
21417 /* confdefs.h.  */
21418 _ACEOF
21419 cat confdefs.h >>conftest.$ac_ext
21420 cat >>conftest.$ac_ext <<_ACEOF
21421 /* end confdefs.h.  */
21422 #include <sys/types.h>
21423  /* Check that off_t can represent 2**63 - 1 correctly.
21424     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21425     since some C++ compilers masquerading as C compilers
21426     incorrectly reject 9223372036854775807.  */
21427 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21428   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21429                        && LARGE_OFF_T % 2147483647 == 1)
21430                       ? 1 : -1];
21431 int
21432 main ()
21433 {
21434
21435   ;
21436   return 0;
21437 }
21438 _ACEOF
21439 rm -f conftest.$ac_objext
21440 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21441   (eval $ac_compile) 2>conftest.er1
21442   ac_status=$?
21443   grep -v '^ *+' conftest.er1 >conftest.err
21444   rm -f conftest.er1
21445   cat conftest.err >&5
21446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21447   (exit $ac_status); } &&
21448          { ac_try='test -z "$ac_c_werror_flag"
21449                          || test ! -s conftest.err'
21450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21451   (eval $ac_try) 2>&5
21452   ac_status=$?
21453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21454   (exit $ac_status); }; } &&
21455          { ac_try='test -s conftest.$ac_objext'
21456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21457   (eval $ac_try) 2>&5
21458   ac_status=$?
21459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21460   (exit $ac_status); }; }; then
21461   break
21462 else
21463   echo "$as_me: failed program was:" >&5
21464 sed 's/^/| /' conftest.$ac_ext >&5
21465
21466 fi
21467 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21468   cat >conftest.$ac_ext <<_ACEOF
21469 /* confdefs.h.  */
21470 _ACEOF
21471 cat confdefs.h >>conftest.$ac_ext
21472 cat >>conftest.$ac_ext <<_ACEOF
21473 /* end confdefs.h.  */
21474 #define _FILE_OFFSET_BITS 64
21475 #include <sys/types.h>
21476  /* Check that off_t can represent 2**63 - 1 correctly.
21477     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21478     since some C++ compilers masquerading as C compilers
21479     incorrectly reject 9223372036854775807.  */
21480 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21481   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21482                        && LARGE_OFF_T % 2147483647 == 1)
21483                       ? 1 : -1];
21484 int
21485 main ()
21486 {
21487
21488   ;
21489   return 0;
21490 }
21491 _ACEOF
21492 rm -f conftest.$ac_objext
21493 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21494   (eval $ac_compile) 2>conftest.er1
21495   ac_status=$?
21496   grep -v '^ *+' conftest.er1 >conftest.err
21497   rm -f conftest.er1
21498   cat conftest.err >&5
21499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21500   (exit $ac_status); } &&
21501          { ac_try='test -z "$ac_c_werror_flag"
21502                          || test ! -s conftest.err'
21503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21504   (eval $ac_try) 2>&5
21505   ac_status=$?
21506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21507   (exit $ac_status); }; } &&
21508          { ac_try='test -s conftest.$ac_objext'
21509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21510   (eval $ac_try) 2>&5
21511   ac_status=$?
21512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21513   (exit $ac_status); }; }; then
21514   ac_cv_sys_file_offset_bits=64; break
21515 else
21516   echo "$as_me: failed program was:" >&5
21517 sed 's/^/| /' conftest.$ac_ext >&5
21518
21519 fi
21520 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21521   break
21522 done
21523 fi
21524 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21525 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21526 if test "$ac_cv_sys_file_offset_bits" != no; then
21527
21528 cat >>confdefs.h <<_ACEOF
21529 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21530 _ACEOF
21531
21532 fi
21533 rm -f conftest*
21534   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21535 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21536 if test "${ac_cv_sys_large_files+set}" = set; then
21537   echo $ECHO_N "(cached) $ECHO_C" >&6
21538 else
21539   while :; do
21540   ac_cv_sys_large_files=no
21541   cat >conftest.$ac_ext <<_ACEOF
21542 /* confdefs.h.  */
21543 _ACEOF
21544 cat confdefs.h >>conftest.$ac_ext
21545 cat >>conftest.$ac_ext <<_ACEOF
21546 /* end confdefs.h.  */
21547 #include <sys/types.h>
21548  /* Check that off_t can represent 2**63 - 1 correctly.
21549     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21550     since some C++ compilers masquerading as C compilers
21551     incorrectly reject 9223372036854775807.  */
21552 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21553   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21554                        && LARGE_OFF_T % 2147483647 == 1)
21555                       ? 1 : -1];
21556 int
21557 main ()
21558 {
21559
21560   ;
21561   return 0;
21562 }
21563 _ACEOF
21564 rm -f conftest.$ac_objext
21565 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21566   (eval $ac_compile) 2>conftest.er1
21567   ac_status=$?
21568   grep -v '^ *+' conftest.er1 >conftest.err
21569   rm -f conftest.er1
21570   cat conftest.err >&5
21571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21572   (exit $ac_status); } &&
21573          { ac_try='test -z "$ac_c_werror_flag"
21574                          || test ! -s conftest.err'
21575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21576   (eval $ac_try) 2>&5
21577   ac_status=$?
21578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21579   (exit $ac_status); }; } &&
21580          { ac_try='test -s conftest.$ac_objext'
21581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21582   (eval $ac_try) 2>&5
21583   ac_status=$?
21584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21585   (exit $ac_status); }; }; then
21586   break
21587 else
21588   echo "$as_me: failed program was:" >&5
21589 sed 's/^/| /' conftest.$ac_ext >&5
21590
21591 fi
21592 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21593   cat >conftest.$ac_ext <<_ACEOF
21594 /* confdefs.h.  */
21595 _ACEOF
21596 cat confdefs.h >>conftest.$ac_ext
21597 cat >>conftest.$ac_ext <<_ACEOF
21598 /* end confdefs.h.  */
21599 #define _LARGE_FILES 1
21600 #include <sys/types.h>
21601  /* Check that off_t can represent 2**63 - 1 correctly.
21602     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21603     since some C++ compilers masquerading as C compilers
21604     incorrectly reject 9223372036854775807.  */
21605 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21606   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21607                        && LARGE_OFF_T % 2147483647 == 1)
21608                       ? 1 : -1];
21609 int
21610 main ()
21611 {
21612
21613   ;
21614   return 0;
21615 }
21616 _ACEOF
21617 rm -f conftest.$ac_objext
21618 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21619   (eval $ac_compile) 2>conftest.er1
21620   ac_status=$?
21621   grep -v '^ *+' conftest.er1 >conftest.err
21622   rm -f conftest.er1
21623   cat conftest.err >&5
21624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21625   (exit $ac_status); } &&
21626          { ac_try='test -z "$ac_c_werror_flag"
21627                          || test ! -s conftest.err'
21628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21629   (eval $ac_try) 2>&5
21630   ac_status=$?
21631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21632   (exit $ac_status); }; } &&
21633          { ac_try='test -s conftest.$ac_objext'
21634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21635   (eval $ac_try) 2>&5
21636   ac_status=$?
21637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21638   (exit $ac_status); }; }; then
21639   ac_cv_sys_large_files=1; break
21640 else
21641   echo "$as_me: failed program was:" >&5
21642 sed 's/^/| /' conftest.$ac_ext >&5
21643
21644 fi
21645 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21646   break
21647 done
21648 fi
21649 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21650 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21651 if test "$ac_cv_sys_large_files" != no; then
21652
21653 cat >>confdefs.h <<_ACEOF
21654 #define _LARGE_FILES $ac_cv_sys_large_files
21655 _ACEOF
21656
21657 fi
21658 rm -f conftest*
21659 fi
21660
21661 fi
21662
21663 # SunOS doesn't handle negative byte comparisons properly with +/- return
21664 echo "$as_me:$LINENO: checking for working memcmp" >&5
21665 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21666 if test "${ac_cv_func_memcmp_working+set}" = set; then
21667   echo $ECHO_N "(cached) $ECHO_C" >&6
21668 else
21669   if test "$cross_compiling" = yes; then
21670   ac_cv_func_memcmp_working=no
21671 else
21672   cat >conftest.$ac_ext <<_ACEOF
21673 /* confdefs.h.  */
21674 _ACEOF
21675 cat confdefs.h >>conftest.$ac_ext
21676 cat >>conftest.$ac_ext <<_ACEOF
21677 /* end confdefs.h.  */
21678 $ac_includes_default
21679 int
21680 main ()
21681 {
21682
21683   /* Some versions of memcmp are not 8-bit clean.  */
21684   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21685   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21686     exit (1);
21687
21688   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21689      or more and with at least one buffer not starting on a 4-byte boundary.
21690      William Lewis provided this test program.   */
21691   {
21692     char foo[21];
21693     char bar[21];
21694     int i;
21695     for (i = 0; i < 4; i++)
21696       {
21697         char *a = foo + i;
21698         char *b = bar + i;
21699         strcpy (a, "--------01111111");
21700         strcpy (b, "--------10000000");
21701         if (memcmp (a, b, 16) >= 0)
21702           exit (1);
21703       }
21704     exit (0);
21705   }
21706
21707   ;
21708   return 0;
21709 }
21710 _ACEOF
21711 rm -f conftest$ac_exeext
21712 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21713   (eval $ac_link) 2>&5
21714   ac_status=$?
21715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21716   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21718   (eval $ac_try) 2>&5
21719   ac_status=$?
21720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21721   (exit $ac_status); }; }; then
21722   ac_cv_func_memcmp_working=yes
21723 else
21724   echo "$as_me: program exited with status $ac_status" >&5
21725 echo "$as_me: failed program was:" >&5
21726 sed 's/^/| /' conftest.$ac_ext >&5
21727
21728 ( exit $ac_status )
21729 ac_cv_func_memcmp_working=no
21730 fi
21731 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21732 fi
21733 fi
21734 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21735 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21736 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21737     "memcmp.$ac_objext"   | \
21738   *" memcmp.$ac_objext"   | \
21739     "memcmp.$ac_objext "* | \
21740   *" memcmp.$ac_objext "* ) ;;
21741   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21742 esac
21743
21744
21745
21746
21747 # Select semaphore implementation type.
21748 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21749
21750 cat >>confdefs.h <<\_ACEOF
21751 #define USE_NAMED_POSIX_SEMAPHORES 1
21752 _ACEOF
21753
21754   SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21755 else
21756   if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21757
21758 cat >>confdefs.h <<\_ACEOF
21759 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21760 _ACEOF
21761
21762     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21763   else
21764
21765 cat >>confdefs.h <<\_ACEOF
21766 #define USE_SYSV_SEMAPHORES 1
21767 _ACEOF
21768
21769     SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21770   fi
21771 fi
21772
21773
21774 # Select shared-memory implementation type.
21775
21776 cat >>confdefs.h <<\_ACEOF
21777 #define USE_SYSV_SHARED_MEMORY 1
21778 _ACEOF
21779
21780 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21781
21782
21783 # If not set in template file, set bytes to use libc memset()
21784 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
21785   MEMSET_LOOP_LIMIT=1024
21786 fi
21787
21788 cat >>confdefs.h <<_ACEOF
21789 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
21790 _ACEOF
21791
21792
21793
21794 if test "$enable_nls" = yes ; then
21795
21796   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21797 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21798 if test "${ac_cv_search_gettext+set}" = set; then
21799   echo $ECHO_N "(cached) $ECHO_C" >&6
21800 else
21801   ac_func_search_save_LIBS=$LIBS
21802 ac_cv_search_gettext=no
21803 cat >conftest.$ac_ext <<_ACEOF
21804 /* confdefs.h.  */
21805 _ACEOF
21806 cat confdefs.h >>conftest.$ac_ext
21807 cat >>conftest.$ac_ext <<_ACEOF
21808 /* end confdefs.h.  */
21809
21810 /* Override any gcc2 internal prototype to avoid an error.  */
21811 #ifdef __cplusplus
21812 extern "C"
21813 #endif
21814 /* We use char because int might match the return type of a gcc2
21815    builtin and then its argument prototype would still apply.  */
21816 char gettext ();
21817 int
21818 main ()
21819 {
21820 gettext ();
21821   ;
21822   return 0;
21823 }
21824 _ACEOF
21825 rm -f conftest.$ac_objext conftest$ac_exeext
21826 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21827   (eval $ac_link) 2>conftest.er1
21828   ac_status=$?
21829   grep -v '^ *+' conftest.er1 >conftest.err
21830   rm -f conftest.er1
21831   cat conftest.err >&5
21832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21833   (exit $ac_status); } &&
21834          { ac_try='test -z "$ac_c_werror_flag"
21835                          || test ! -s conftest.err'
21836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21837   (eval $ac_try) 2>&5
21838   ac_status=$?
21839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21840   (exit $ac_status); }; } &&
21841          { ac_try='test -s conftest$ac_exeext'
21842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21843   (eval $ac_try) 2>&5
21844   ac_status=$?
21845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21846   (exit $ac_status); }; }; then
21847   ac_cv_search_gettext="none required"
21848 else
21849   echo "$as_me: failed program was:" >&5
21850 sed 's/^/| /' conftest.$ac_ext >&5
21851
21852 fi
21853 rm -f conftest.err conftest.$ac_objext \
21854       conftest$ac_exeext conftest.$ac_ext
21855 if test "$ac_cv_search_gettext" = no; then
21856   for ac_lib in intl; do
21857     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21858     cat >conftest.$ac_ext <<_ACEOF
21859 /* confdefs.h.  */
21860 _ACEOF
21861 cat confdefs.h >>conftest.$ac_ext
21862 cat >>conftest.$ac_ext <<_ACEOF
21863 /* end confdefs.h.  */
21864
21865 /* Override any gcc2 internal prototype to avoid an error.  */
21866 #ifdef __cplusplus
21867 extern "C"
21868 #endif
21869 /* We use char because int might match the return type of a gcc2
21870    builtin and then its argument prototype would still apply.  */
21871 char gettext ();
21872 int
21873 main ()
21874 {
21875 gettext ();
21876   ;
21877   return 0;
21878 }
21879 _ACEOF
21880 rm -f conftest.$ac_objext conftest$ac_exeext
21881 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21882   (eval $ac_link) 2>conftest.er1
21883   ac_status=$?
21884   grep -v '^ *+' conftest.er1 >conftest.err
21885   rm -f conftest.er1
21886   cat conftest.err >&5
21887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21888   (exit $ac_status); } &&
21889          { ac_try='test -z "$ac_c_werror_flag"
21890                          || test ! -s conftest.err'
21891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21892   (eval $ac_try) 2>&5
21893   ac_status=$?
21894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21895   (exit $ac_status); }; } &&
21896          { ac_try='test -s conftest$ac_exeext'
21897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21898   (eval $ac_try) 2>&5
21899   ac_status=$?
21900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21901   (exit $ac_status); }; }; then
21902   ac_cv_search_gettext="-l$ac_lib"
21903 break
21904 else
21905   echo "$as_me: failed program was:" >&5
21906 sed 's/^/| /' conftest.$ac_ext >&5
21907
21908 fi
21909 rm -f conftest.err conftest.$ac_objext \
21910       conftest$ac_exeext conftest.$ac_ext
21911   done
21912 fi
21913 LIBS=$ac_func_search_save_LIBS
21914 fi
21915 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21916 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21917 if test "$ac_cv_search_gettext" != no; then
21918   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21919
21920 else
21921   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21922 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21923    { (exit 1); exit 1; }; }
21924 fi
21925
21926   if test "${ac_cv_header_libintl_h+set}" = set; then
21927   echo "$as_me:$LINENO: checking for libintl.h" >&5
21928 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21929 if test "${ac_cv_header_libintl_h+set}" = set; then
21930   echo $ECHO_N "(cached) $ECHO_C" >&6
21931 fi
21932 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21933 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21934 else
21935   # Is the header compilable?
21936 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21937 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21938 cat >conftest.$ac_ext <<_ACEOF
21939 /* confdefs.h.  */
21940 _ACEOF
21941 cat confdefs.h >>conftest.$ac_ext
21942 cat >>conftest.$ac_ext <<_ACEOF
21943 /* end confdefs.h.  */
21944 $ac_includes_default
21945 #include <libintl.h>
21946 _ACEOF
21947 rm -f conftest.$ac_objext
21948 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21949   (eval $ac_compile) 2>conftest.er1
21950   ac_status=$?
21951   grep -v '^ *+' conftest.er1 >conftest.err
21952   rm -f conftest.er1
21953   cat conftest.err >&5
21954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21955   (exit $ac_status); } &&
21956          { ac_try='test -z "$ac_c_werror_flag"
21957                          || test ! -s conftest.err'
21958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21959   (eval $ac_try) 2>&5
21960   ac_status=$?
21961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21962   (exit $ac_status); }; } &&
21963          { ac_try='test -s conftest.$ac_objext'
21964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21965   (eval $ac_try) 2>&5
21966   ac_status=$?
21967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21968   (exit $ac_status); }; }; then
21969   ac_header_compiler=yes
21970 else
21971   echo "$as_me: failed program was:" >&5
21972 sed 's/^/| /' conftest.$ac_ext >&5
21973
21974 ac_header_compiler=no
21975 fi
21976 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21977 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21978 echo "${ECHO_T}$ac_header_compiler" >&6
21979
21980 # Is the header present?
21981 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21982 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21983 cat >conftest.$ac_ext <<_ACEOF
21984 /* confdefs.h.  */
21985 _ACEOF
21986 cat confdefs.h >>conftest.$ac_ext
21987 cat >>conftest.$ac_ext <<_ACEOF
21988 /* end confdefs.h.  */
21989 #include <libintl.h>
21990 _ACEOF
21991 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21992   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21993   ac_status=$?
21994   grep -v '^ *+' conftest.er1 >conftest.err
21995   rm -f conftest.er1
21996   cat conftest.err >&5
21997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21998   (exit $ac_status); } >/dev/null; then
21999   if test -s conftest.err; then
22000     ac_cpp_err=$ac_c_preproc_warn_flag
22001     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22002   else
22003     ac_cpp_err=
22004   fi
22005 else
22006   ac_cpp_err=yes
22007 fi
22008 if test -z "$ac_cpp_err"; then
22009   ac_header_preproc=yes
22010 else
22011   echo "$as_me: failed program was:" >&5
22012 sed 's/^/| /' conftest.$ac_ext >&5
22013
22014   ac_header_preproc=no
22015 fi
22016 rm -f conftest.err conftest.$ac_ext
22017 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22018 echo "${ECHO_T}$ac_header_preproc" >&6
22019
22020 # So?  What about this header?
22021 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22022   yes:no: )
22023     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22024 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22025     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
22026 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
22027     ac_header_preproc=yes
22028     ;;
22029   no:yes:* )
22030     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
22031 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
22032     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
22033 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
22034     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
22035 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
22036     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
22037 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22038     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
22039 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
22040     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
22041 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
22042     (
22043       cat <<\_ASBOX
22044 ## ---------------------------------------- ##
22045 ## Report this to pgsql-bugs@postgresql.org ##
22046 ## ---------------------------------------- ##
22047 _ASBOX
22048     ) |
22049       sed "s/^/$as_me: WARNING:     /" >&2
22050     ;;
22051 esac
22052 echo "$as_me:$LINENO: checking for libintl.h" >&5
22053 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22054 if test "${ac_cv_header_libintl_h+set}" = set; then
22055   echo $ECHO_N "(cached) $ECHO_C" >&6
22056 else
22057   ac_cv_header_libintl_h=$ac_header_preproc
22058 fi
22059 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22060 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22061
22062 fi
22063 if test $ac_cv_header_libintl_h = yes; then
22064   :
22065 else
22066   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
22067 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
22068    { (exit 1); exit 1; }; }
22069 fi
22070
22071
22072   for ac_prog in msgfmt
22073 do
22074   # Extract the first word of "$ac_prog", so it can be a program name with args.
22075 set dummy $ac_prog; ac_word=$2
22076 echo "$as_me:$LINENO: checking for $ac_word" >&5
22077 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22078 if test "${ac_cv_prog_MSGFMT+set}" = set; then
22079   echo $ECHO_N "(cached) $ECHO_C" >&6
22080 else
22081   if test -n "$MSGFMT"; then
22082   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
22083 else
22084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22085 for as_dir in $PATH
22086 do
22087   IFS=$as_save_IFS
22088   test -z "$as_dir" && as_dir=.
22089   for ac_exec_ext in '' $ac_executable_extensions; do
22090   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22091     ac_cv_prog_MSGFMT="$ac_prog"
22092     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22093     break 2
22094   fi
22095 done
22096 done
22097
22098 fi
22099 fi
22100 MSGFMT=$ac_cv_prog_MSGFMT
22101 if test -n "$MSGFMT"; then
22102   echo "$as_me:$LINENO: result: $MSGFMT" >&5
22103 echo "${ECHO_T}$MSGFMT" >&6
22104 else
22105   echo "$as_me:$LINENO: result: no" >&5
22106 echo "${ECHO_T}no" >&6
22107 fi
22108
22109   test -n "$MSGFMT" && break
22110 done
22111
22112   if test -z "$MSGFMT"; then
22113     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
22114 echo "$as_me: error: msgfmt is required for NLS" >&2;}
22115    { (exit 1); exit 1; }; }
22116   fi
22117   for ac_prog in msgmerge
22118 do
22119   # Extract the first word of "$ac_prog", so it can be a program name with args.
22120 set dummy $ac_prog; ac_word=$2
22121 echo "$as_me:$LINENO: checking for $ac_word" >&5
22122 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22123 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
22124   echo $ECHO_N "(cached) $ECHO_C" >&6
22125 else
22126   if test -n "$MSGMERGE"; then
22127   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
22128 else
22129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22130 for as_dir in $PATH
22131 do
22132   IFS=$as_save_IFS
22133   test -z "$as_dir" && as_dir=.
22134   for ac_exec_ext in '' $ac_executable_extensions; do
22135   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22136     ac_cv_prog_MSGMERGE="$ac_prog"
22137     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22138     break 2
22139   fi
22140 done
22141 done
22142
22143 fi
22144 fi
22145 MSGMERGE=$ac_cv_prog_MSGMERGE
22146 if test -n "$MSGMERGE"; then
22147   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
22148 echo "${ECHO_T}$MSGMERGE" >&6
22149 else
22150   echo "$as_me:$LINENO: result: no" >&5
22151 echo "${ECHO_T}no" >&6
22152 fi
22153
22154   test -n "$MSGMERGE" && break
22155 done
22156
22157   for ac_prog in xgettext
22158 do
22159   # Extract the first word of "$ac_prog", so it can be a program name with args.
22160 set dummy $ac_prog; ac_word=$2
22161 echo "$as_me:$LINENO: checking for $ac_word" >&5
22162 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22163 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
22164   echo $ECHO_N "(cached) $ECHO_C" >&6
22165 else
22166   if test -n "$XGETTEXT"; then
22167   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
22168 else
22169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22170 for as_dir in $PATH
22171 do
22172   IFS=$as_save_IFS
22173   test -z "$as_dir" && as_dir=.
22174   for ac_exec_ext in '' $ac_executable_extensions; do
22175   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22176     ac_cv_prog_XGETTEXT="$ac_prog"
22177     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22178     break 2
22179   fi
22180 done
22181 done
22182
22183 fi
22184 fi
22185 XGETTEXT=$ac_cv_prog_XGETTEXT
22186 if test -n "$XGETTEXT"; then
22187   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
22188 echo "${ECHO_T}$XGETTEXT" >&6
22189 else
22190   echo "$as_me:$LINENO: result: no" >&5
22191 echo "${ECHO_T}no" >&6
22192 fi
22193
22194   test -n "$XGETTEXT" && break
22195 done
22196
22197
22198   # Note: share/locale is always the default, independent of $datadir
22199   localedir='${prefix}/share/locale'
22200   if test x"$prefix" = x"NONE"; then
22201     exp_localedir="$ac_default_prefix/share/locale"
22202   else
22203     exp_localedir="$prefix/share/locale"
22204   fi
22205
22206
22207
22208 cat >>confdefs.h <<_ACEOF
22209 #define LOCALEDIR "$exp_localedir"
22210 _ACEOF
22211
22212
22213 fi
22214
22215 # Check for Tcl configuration script tclConfig.sh
22216 if test "$with_tcl" = yes; then
22217     for ac_prog in tclsh tcl
22218 do
22219   # Extract the first word of "$ac_prog", so it can be a program name with args.
22220 set dummy $ac_prog; ac_word=$2
22221 echo "$as_me:$LINENO: checking for $ac_word" >&5
22222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22223 if test "${ac_cv_path_TCLSH+set}" = set; then
22224   echo $ECHO_N "(cached) $ECHO_C" >&6
22225 else
22226   case $TCLSH in
22227   [\\/]* | ?:[\\/]*)
22228   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22229   ;;
22230   *)
22231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22232 for as_dir in $PATH
22233 do
22234   IFS=$as_save_IFS
22235   test -z "$as_dir" && as_dir=.
22236   for ac_exec_ext in '' $ac_executable_extensions; do
22237   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22238     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22239     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22240     break 2
22241   fi
22242 done
22243 done
22244
22245   ;;
22246 esac
22247 fi
22248 TCLSH=$ac_cv_path_TCLSH
22249
22250 if test -n "$TCLSH"; then
22251   echo "$as_me:$LINENO: result: $TCLSH" >&5
22252 echo "${ECHO_T}$TCLSH" >&6
22253 else
22254   echo "$as_me:$LINENO: result: no" >&5
22255 echo "${ECHO_T}no" >&6
22256 fi
22257
22258   test -n "$TCLSH" && break
22259 done
22260
22261 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22262 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22263 # Let user override test
22264 if test -z "$TCL_CONFIG_SH"; then
22265     pgac_test_dirs="$with_tclconfig"
22266
22267     set X $pgac_test_dirs; shift
22268     if test $# -eq 0; then
22269         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22270 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22271    { (exit 1); exit 1; }; }
22272         set X `echo 'puts $auto_path' | $TCLSH`; shift
22273     fi
22274
22275     for pgac_dir do
22276         if test -r "$pgac_dir/tclConfig.sh"; then
22277             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22278             break
22279         fi
22280     done
22281 fi
22282
22283 if test -z "$TCL_CONFIG_SH"; then
22284     echo "$as_me:$LINENO: result: no" >&5
22285 echo "${ECHO_T}no" >&6
22286     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22287 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22288    { (exit 1); exit 1; }; }
22289 else
22290     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22291 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22292 fi
22293
22294
22295
22296     . "$TCL_CONFIG_SH"
22297 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22298 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22299 eval TCL_LIBS=\"$TCL_LIBS\"
22300 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22301 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22302
22303         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22304     ac_save_CPPFLAGS=$CPPFLAGS
22305     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22306     if test "${ac_cv_header_tcl_h+set}" = set; then
22307   echo "$as_me:$LINENO: checking for tcl.h" >&5
22308 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22309 if test "${ac_cv_header_tcl_h+set}" = set; then
22310   echo $ECHO_N "(cached) $ECHO_C" >&6
22311 fi
22312 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22313 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22314 else
22315   # Is the header compilable?
22316 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22317 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22318 cat >conftest.$ac_ext <<_ACEOF
22319 /* confdefs.h.  */
22320 _ACEOF
22321 cat confdefs.h >>conftest.$ac_ext
22322 cat >>conftest.$ac_ext <<_ACEOF
22323 /* end confdefs.h.  */
22324 $ac_includes_default
22325 #include <tcl.h>
22326 _ACEOF
22327 rm -f conftest.$ac_objext
22328 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22329   (eval $ac_compile) 2>conftest.er1
22330   ac_status=$?
22331   grep -v '^ *+' conftest.er1 >conftest.err
22332   rm -f conftest.er1
22333   cat conftest.err >&5
22334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22335   (exit $ac_status); } &&
22336          { ac_try='test -z "$ac_c_werror_flag"
22337                          || test ! -s conftest.err'
22338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22339   (eval $ac_try) 2>&5
22340   ac_status=$?
22341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22342   (exit $ac_status); }; } &&
22343          { ac_try='test -s conftest.$ac_objext'
22344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22345   (eval $ac_try) 2>&5
22346   ac_status=$?
22347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22348   (exit $ac_status); }; }; then
22349   ac_header_compiler=yes
22350 else
22351   echo "$as_me: failed program was:" >&5
22352 sed 's/^/| /' conftest.$ac_ext >&5
22353
22354 ac_header_compiler=no
22355 fi
22356 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22357 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22358 echo "${ECHO_T}$ac_header_compiler" >&6
22359
22360 # Is the header present?
22361 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22362 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22363 cat >conftest.$ac_ext <<_ACEOF
22364 /* confdefs.h.  */
22365 _ACEOF
22366 cat confdefs.h >>conftest.$ac_ext
22367 cat >>conftest.$ac_ext <<_ACEOF
22368 /* end confdefs.h.  */
22369 #include <tcl.h>
22370 _ACEOF
22371 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22372   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22373   ac_status=$?
22374   grep -v '^ *+' conftest.er1 >conftest.err
22375   rm -f conftest.er1
22376   cat conftest.err >&5
22377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22378   (exit $ac_status); } >/dev/null; then
22379   if test -s conftest.err; then
22380     ac_cpp_err=$ac_c_preproc_warn_flag
22381     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22382   else
22383     ac_cpp_err=
22384   fi
22385 else
22386   ac_cpp_err=yes
22387 fi
22388 if test -z "$ac_cpp_err"; then
22389   ac_header_preproc=yes
22390 else
22391   echo "$as_me: failed program was:" >&5
22392 sed 's/^/| /' conftest.$ac_ext >&5
22393
22394   ac_header_preproc=no
22395 fi
22396 rm -f conftest.err conftest.$ac_ext
22397 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22398 echo "${ECHO_T}$ac_header_preproc" >&6
22399
22400 # So?  What about this header?
22401 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22402   yes:no: )
22403     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22404 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22405     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22406 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22407     ac_header_preproc=yes
22408     ;;
22409   no:yes:* )
22410     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22411 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22412     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22413 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22414     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22415 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22416     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22417 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22418     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22419 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22420     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22421 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22422     (
22423       cat <<\_ASBOX
22424 ## ---------------------------------------- ##
22425 ## Report this to pgsql-bugs@postgresql.org ##
22426 ## ---------------------------------------- ##
22427 _ASBOX
22428     ) |
22429       sed "s/^/$as_me: WARNING:     /" >&2
22430     ;;
22431 esac
22432 echo "$as_me:$LINENO: checking for tcl.h" >&5
22433 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22434 if test "${ac_cv_header_tcl_h+set}" = set; then
22435   echo $ECHO_N "(cached) $ECHO_C" >&6
22436 else
22437   ac_cv_header_tcl_h=$ac_header_preproc
22438 fi
22439 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22440 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22441
22442 fi
22443 if test $ac_cv_header_tcl_h = yes; then
22444   :
22445 else
22446   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22447 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22448    { (exit 1); exit 1; }; }
22449 fi
22450
22451
22452     CPPFLAGS=$ac_save_CPPFLAGS
22453 fi
22454
22455 #
22456 # Check for DocBook and tools
22457 #
22458 for ac_prog in onsgmls nsgmls
22459 do
22460   # Extract the first word of "$ac_prog", so it can be a program name with args.
22461 set dummy $ac_prog; ac_word=$2
22462 echo "$as_me:$LINENO: checking for $ac_word" >&5
22463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22464 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22465   echo $ECHO_N "(cached) $ECHO_C" >&6
22466 else
22467   if test -n "$NSGMLS"; then
22468   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22469 else
22470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22471 for as_dir in $PATH
22472 do
22473   IFS=$as_save_IFS
22474   test -z "$as_dir" && as_dir=.
22475   for ac_exec_ext in '' $ac_executable_extensions; do
22476   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22477     ac_cv_prog_NSGMLS="$ac_prog"
22478     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22479     break 2
22480   fi
22481 done
22482 done
22483
22484 fi
22485 fi
22486 NSGMLS=$ac_cv_prog_NSGMLS
22487 if test -n "$NSGMLS"; then
22488   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22489 echo "${ECHO_T}$NSGMLS" >&6
22490 else
22491   echo "$as_me:$LINENO: result: no" >&5
22492 echo "${ECHO_T}no" >&6
22493 fi
22494
22495   test -n "$NSGMLS" && break
22496 done
22497
22498 for ac_prog in openjade jade
22499 do
22500   # Extract the first word of "$ac_prog", so it can be a program name with args.
22501 set dummy $ac_prog; ac_word=$2
22502 echo "$as_me:$LINENO: checking for $ac_word" >&5
22503 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22504 if test "${ac_cv_prog_JADE+set}" = set; then
22505   echo $ECHO_N "(cached) $ECHO_C" >&6
22506 else
22507   if test -n "$JADE"; then
22508   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22509 else
22510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22511 for as_dir in $PATH
22512 do
22513   IFS=$as_save_IFS
22514   test -z "$as_dir" && as_dir=.
22515   for ac_exec_ext in '' $ac_executable_extensions; do
22516   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22517     ac_cv_prog_JADE="$ac_prog"
22518     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22519     break 2
22520   fi
22521 done
22522 done
22523
22524 fi
22525 fi
22526 JADE=$ac_cv_prog_JADE
22527 if test -n "$JADE"; then
22528   echo "$as_me:$LINENO: result: $JADE" >&5
22529 echo "${ECHO_T}$JADE" >&6
22530 else
22531   echo "$as_me:$LINENO: result: no" >&5
22532 echo "${ECHO_T}no" >&6
22533 fi
22534
22535   test -n "$JADE" && break
22536 done
22537
22538
22539 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22540 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22541 if test "${pgac_cv_check_docbook+set}" = set; then
22542   echo $ECHO_N "(cached) $ECHO_C" >&6
22543 else
22544   cat >conftest.sgml <<EOF
22545 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22546 <book>
22547  <title>test</title>
22548  <chapter>
22549   <title>random</title>
22550    <sect1>
22551     <title>testsect</title>
22552     <para>text</para>
22553   </sect1>
22554  </chapter>
22555 </book>
22556 EOF
22557
22558 pgac_cv_check_docbook=no
22559
22560 if test -n "$NSGMLS"; then
22561   $NSGMLS -s conftest.sgml 1>&5 2>&1
22562   if test $? -eq 0; then
22563     pgac_cv_check_docbook=yes
22564   fi
22565 fi
22566 rm -f conftest.sgml
22567 fi
22568 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22569 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22570
22571 have_docbook=$pgac_cv_check_docbook
22572
22573
22574 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22575 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22576 if test "${pgac_cv_path_stylesheets+set}" = set; then
22577   echo $ECHO_N "(cached) $ECHO_C" >&6
22578 else
22579   if test -n "$DOCBOOKSTYLE"; then
22580   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22581 else
22582   for pgac_prefix in /usr /usr/local /opt; do
22583     for pgac_infix in share lib; do
22584       for pgac_postfix in \
22585         sgml/stylesheets/nwalsh-modular \
22586         sgml/stylesheets/docbook \
22587                 sgml/docbook-dsssl \
22588         sgml/docbook/dsssl/modular \
22589         sgml/docbook/stylesheet/dsssl/modular \
22590         sgml/docbook/dsssl-stylesheets
22591       do
22592         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22593         if test -r "$pgac_candidate/html/docbook.dsl" \
22594            && test -r "$pgac_candidate/print/docbook.dsl"
22595         then
22596           pgac_cv_path_stylesheets=$pgac_candidate
22597           break 3
22598         fi
22599       done
22600     done
22601   done
22602 fi
22603 fi
22604
22605 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22606
22607 if test -n "$DOCBOOKSTYLE"; then
22608   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22609 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22610 else
22611   echo "$as_me:$LINENO: result: no" >&5
22612 echo "${ECHO_T}no" >&6
22613 fi
22614 if test -n "$DOCBOOKSTYLE"; then
22615   for ac_prog in collateindex.pl
22616 do
22617   # Extract the first word of "$ac_prog", so it can be a program name with args.
22618 set dummy $ac_prog; ac_word=$2
22619 echo "$as_me:$LINENO: checking for $ac_word" >&5
22620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22621 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22622   echo $ECHO_N "(cached) $ECHO_C" >&6
22623 else
22624   case $COLLATEINDEX in
22625   [\\/]* | ?:[\\/]*)
22626   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22627   ;;
22628   *)
22629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22630 for as_dir in $DOCBOOKSTYLE/bin $PATH
22631 do
22632   IFS=$as_save_IFS
22633   test -z "$as_dir" && as_dir=.
22634   for ac_exec_ext in '' $ac_executable_extensions; do
22635   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22636     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22637     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22638     break 2
22639   fi
22640 done
22641 done
22642
22643   ;;
22644 esac
22645 fi
22646 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22647
22648 if test -n "$COLLATEINDEX"; then
22649   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22650 echo "${ECHO_T}$COLLATEINDEX" >&6
22651 else
22652   echo "$as_me:$LINENO: result: no" >&5
22653 echo "${ECHO_T}no" >&6
22654 fi
22655
22656   test -n "$COLLATEINDEX" && break
22657 done
22658
22659 else
22660   for ac_prog in collateindex.pl
22661 do
22662   # Extract the first word of "$ac_prog", so it can be a program name with args.
22663 set dummy $ac_prog; ac_word=$2
22664 echo "$as_me:$LINENO: checking for $ac_word" >&5
22665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22666 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22667   echo $ECHO_N "(cached) $ECHO_C" >&6
22668 else
22669   case $COLLATEINDEX in
22670   [\\/]* | ?:[\\/]*)
22671   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22672   ;;
22673   *)
22674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22675 for as_dir in $PATH
22676 do
22677   IFS=$as_save_IFS
22678   test -z "$as_dir" && as_dir=.
22679   for ac_exec_ext in '' $ac_executable_extensions; do
22680   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22681     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22682     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22683     break 2
22684   fi
22685 done
22686 done
22687
22688   ;;
22689 esac
22690 fi
22691 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22692
22693 if test -n "$COLLATEINDEX"; then
22694   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22695 echo "${ECHO_T}$COLLATEINDEX" >&6
22696 else
22697   echo "$as_me:$LINENO: result: no" >&5
22698 echo "${ECHO_T}no" >&6
22699 fi
22700
22701   test -n "$COLLATEINDEX" && break
22702 done
22703
22704 fi
22705 for ac_prog in sgmlspl
22706 do
22707   # Extract the first word of "$ac_prog", so it can be a program name with args.
22708 set dummy $ac_prog; ac_word=$2
22709 echo "$as_me:$LINENO: checking for $ac_word" >&5
22710 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22711 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22712   echo $ECHO_N "(cached) $ECHO_C" >&6
22713 else
22714   if test -n "$SGMLSPL"; then
22715   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22716 else
22717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22718 for as_dir in $PATH
22719 do
22720   IFS=$as_save_IFS
22721   test -z "$as_dir" && as_dir=.
22722   for ac_exec_ext in '' $ac_executable_extensions; do
22723   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22724     ac_cv_prog_SGMLSPL="$ac_prog"
22725     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22726     break 2
22727   fi
22728 done
22729 done
22730
22731 fi
22732 fi
22733 SGMLSPL=$ac_cv_prog_SGMLSPL
22734 if test -n "$SGMLSPL"; then
22735   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22736 echo "${ECHO_T}$SGMLSPL" >&6
22737 else
22738   echo "$as_me:$LINENO: result: no" >&5
22739 echo "${ECHO_T}no" >&6
22740 fi
22741
22742   test -n "$SGMLSPL" && break
22743 done
22744
22745
22746 # Thread testing
22747
22748 # We have to run the thread test near the end so we have all our symbols
22749 # defined.  Cross compiling throws a warning.
22750 #
22751 if test "$enable_thread_safety_force" = yes; then
22752 if test x"$template" != x"win32"
22753 then
22754   { echo "$as_me:$LINENO: WARNING:
22755 *** Skipping thread test program.  --enable-thread-safety-force was used.
22756 *** Run the program in src/test/thread on the your machine and add
22757 proper locking function calls to your applications to guarantee thread
22758 safety.
22759 " >&5
22760 echo "$as_me: WARNING:
22761 *** Skipping thread test program.  --enable-thread-safety-force was used.
22762 *** Run the program in src/test/thread on the your machine and add
22763 proper locking function calls to your applications to guarantee thread
22764 safety.
22765 " >&2;}
22766 else
22767 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22768 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22769 fi
22770 elif test "$enable_thread_safety" = yes; then
22771 if test x"$template" != x"win32"
22772 then
22773 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22774 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22775
22776 _CFLAGS="$CFLAGS"
22777 _LIBS="$LIBS"
22778 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22779 LIBS="$LIBS $PTHREAD_LIBS"
22780 if test "$cross_compiling" = yes; then
22781   echo "$as_me:$LINENO: result: maybe" >&5
22782 echo "${ECHO_T}maybe" >&6
22783   { echo "$as_me:$LINENO: WARNING:
22784 *** Skipping thread test program because of cross-compile build.
22785 *** Run the program in src/test/thread on the target machine.
22786 " >&5
22787 echo "$as_me: WARNING:
22788 *** Skipping thread test program because of cross-compile build.
22789 *** Run the program in src/test/thread on the target machine.
22790 " >&2;}
22791 else
22792   cat >conftest.$ac_ext <<_ACEOF
22793 /* confdefs.h.  */
22794 _ACEOF
22795 cat confdefs.h >>conftest.$ac_ext
22796 cat >>conftest.$ac_ext <<_ACEOF
22797 /* end confdefs.h.  */
22798 #include "$srcdir/src/test/thread/thread_test.c"
22799 _ACEOF
22800 rm -f conftest$ac_exeext
22801 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22802   (eval $ac_link) 2>&5
22803   ac_status=$?
22804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22805   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22807   (eval $ac_try) 2>&5
22808   ac_status=$?
22809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22810   (exit $ac_status); }; }; then
22811   echo "$as_me:$LINENO: result: yes" >&5
22812 echo "${ECHO_T}yes" >&6
22813 else
22814   echo "$as_me: program exited with status $ac_status" >&5
22815 echo "$as_me: failed program was:" >&5
22816 sed 's/^/| /' conftest.$ac_ext >&5
22817
22818 ( exit $ac_status )
22819 echo "$as_me:$LINENO: result: no" >&5
22820 echo "${ECHO_T}no" >&6
22821   { { echo "$as_me:$LINENO: error:
22822 *** Thread test program failed.  Your platform is not thread-safe.
22823 *** Check the file 'config.log'for the exact reason.
22824 ***
22825 *** You can use the configure option --enable-thread-safety-force
22826 *** to force threads to be enabled.  However, you must then run
22827 *** the program in src/test/thread and add locking function calls
22828 *** to your applications to guarantee thread safety.
22829 " >&5
22830 echo "$as_me: error:
22831 *** Thread test program failed.  Your platform is not thread-safe.
22832 *** Check the file 'config.log'for the exact reason.
22833 ***
22834 *** You can use the configure option --enable-thread-safety-force
22835 *** to force threads to be enabled.  However, you must then run
22836 *** the program in src/test/thread and add locking function calls
22837 *** to your applications to guarantee thread safety.
22838 " >&2;}
22839    { (exit 1); exit 1; }; }
22840 fi
22841 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22842 fi
22843 CFLAGS="$_CFLAGS"
22844 LIBS="$_LIBS"
22845 else
22846 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22847 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22848 fi
22849 fi
22850
22851 # prepare build tree if outside source tree
22852 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22853 # Note 2: /bin/pwd might be better than shell's built-in at getting
22854 #         a symlink-free name.
22855 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22856   vpath_build=no
22857 else
22858   vpath_build=yes
22859   if test "$no_create" != yes; then
22860     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22861     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22862     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22863       || { { echo "$as_me:$LINENO: error: failed" >&5
22864 echo "$as_me: error: failed" >&2;}
22865    { (exit 1); exit 1; }; }
22866     echo "$as_me:$LINENO: result: done" >&5
22867 echo "${ECHO_T}done" >&6
22868   fi
22869 fi
22870
22871
22872
22873                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22874
22875
22876                                                             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}"
22877
22878
22879 if test "$PORTNAME" = "win32"; then
22880           ac_config_commands="$ac_config_commands check_win32_symlinks"
22881
22882 fi
22883
22884           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22885
22886
22887 cat >confcache <<\_ACEOF
22888 # This file is a shell script that caches the results of configure
22889 # tests run on this system so they can be shared between configure
22890 # scripts and configure runs, see configure's option --config-cache.
22891 # It is not useful on other systems.  If it contains results you don't
22892 # want to keep, you may remove or edit it.
22893 #
22894 # config.status only pays attention to the cache file if you give it
22895 # the --recheck option to rerun configure.
22896 #
22897 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22898 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22899 # following values.
22900
22901 _ACEOF
22902
22903 # The following way of writing the cache mishandles newlines in values,
22904 # but we know of no workaround that is simple, portable, and efficient.
22905 # So, don't put newlines in cache variables' values.
22906 # Ultrix sh set writes to stderr and can't be redirected directly,
22907 # and sets the high bit in the cache file unless we assign to the vars.
22908 {
22909   (set) 2>&1 |
22910     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22911     *ac_space=\ *)
22912       # `set' does not quote correctly, so add quotes (double-quote
22913       # substitution turns \\\\ into \\, and sed turns \\ into \).
22914       sed -n \
22915         "s/'/'\\\\''/g;
22916           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22917       ;;
22918     *)
22919       # `set' quotes correctly as required by POSIX, so do not add quotes.
22920       sed -n \
22921         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22922       ;;
22923     esac;
22924 } |
22925   sed '
22926      t clear
22927      : clear
22928      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22929      t end
22930      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22931      : end' >>confcache
22932 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22933   if test -w $cache_file; then
22934     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22935     cat confcache >$cache_file
22936   else
22937     echo "not updating unwritable cache $cache_file"
22938   fi
22939 fi
22940 rm -f confcache
22941
22942 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22943 # Let make expand exec_prefix.
22944 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22945
22946 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22947 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22948 # trailing colons and then remove the whole line if VPATH becomes empty
22949 # (actually we leave an empty line to preserve line numbers).
22950 if test "x$srcdir" = x.; then
22951   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22952 s/:*\$(srcdir):*/:/;
22953 s/:*\${srcdir}:*/:/;
22954 s/:*@srcdir@:*/:/;
22955 s/^\([^=]*=[     ]*\):*/\1/;
22956 s/:*$//;
22957 s/^[^=]*=[       ]*$//;
22958 }'
22959 fi
22960
22961 DEFS=-DHAVE_CONFIG_H
22962
22963 ac_libobjs=
22964 ac_ltlibobjs=
22965 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22966   # 1. Remove the extension, and $U if already installed.
22967   ac_i=`echo "$ac_i" |
22968          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22969   # 2. Add them.
22970   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22971   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22972 done
22973 LIBOBJS=$ac_libobjs
22974
22975 LTLIBOBJS=$ac_ltlibobjs
22976
22977
22978
22979 : ${CONFIG_STATUS=./config.status}
22980 ac_clean_files_save=$ac_clean_files
22981 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22982 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22983 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22984 cat >$CONFIG_STATUS <<_ACEOF
22985 #! $SHELL
22986 # Generated by $as_me.
22987 # Run this file to recreate the current configuration.
22988 # Compiler output produced by configure, useful for debugging
22989 # configure, is in config.log if it exists.
22990
22991 debug=false
22992 ac_cs_recheck=false
22993 ac_cs_silent=false
22994 SHELL=\${CONFIG_SHELL-$SHELL}
22995 _ACEOF
22996
22997 cat >>$CONFIG_STATUS <<\_ACEOF
22998 ## --------------------- ##
22999 ## M4sh Initialization.  ##
23000 ## --------------------- ##
23001
23002 # Be Bourne compatible
23003 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23004   emulate sh
23005   NULLCMD=:
23006   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23007   # is contrary to our usage.  Disable this feature.
23008   alias -g '${1+"$@"}'='"$@"'
23009 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23010   set -o posix
23011 fi
23012 DUALCASE=1; export DUALCASE # for MKS sh
23013
23014 # Support unset when possible.
23015 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23016   as_unset=unset
23017 else
23018   as_unset=false
23019 fi
23020
23021
23022 # Work around bugs in pre-3.0 UWIN ksh.
23023 $as_unset ENV MAIL MAILPATH
23024 PS1='$ '
23025 PS2='> '
23026 PS4='+ '
23027
23028 # NLS nuisances.
23029 for as_var in \
23030   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23031   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23032   LC_TELEPHONE LC_TIME
23033 do
23034   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23035     eval $as_var=C; export $as_var
23036   else
23037     $as_unset $as_var
23038   fi
23039 done
23040
23041 # Required to use basename.
23042 if expr a : '\(a\)' >/dev/null 2>&1; then
23043   as_expr=expr
23044 else
23045   as_expr=false
23046 fi
23047
23048 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23049   as_basename=basename
23050 else
23051   as_basename=false
23052 fi
23053
23054
23055 # Name of the executable.
23056 as_me=`$as_basename "$0" ||
23057 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23058          X"$0" : 'X\(//\)$' \| \
23059          X"$0" : 'X\(/\)$' \| \
23060          .     : '\(.\)' 2>/dev/null ||
23061 echo X/"$0" |
23062     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23063           /^X\/\(\/\/\)$/{ s//\1/; q; }
23064           /^X\/\(\/\).*/{ s//\1/; q; }
23065           s/.*/./; q'`
23066
23067
23068 # PATH needs CR, and LINENO needs CR and PATH.
23069 # Avoid depending upon Character Ranges.
23070 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23071 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23072 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23073 as_cr_digits='0123456789'
23074 as_cr_alnum=$as_cr_Letters$as_cr_digits
23075
23076 # The user is always right.
23077 if test "${PATH_SEPARATOR+set}" != set; then
23078   echo "#! /bin/sh" >conf$$.sh
23079   echo  "exit 0"   >>conf$$.sh
23080   chmod +x conf$$.sh
23081   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23082     PATH_SEPARATOR=';'
23083   else
23084     PATH_SEPARATOR=:
23085   fi
23086   rm -f conf$$.sh
23087 fi
23088
23089
23090   as_lineno_1=$LINENO
23091   as_lineno_2=$LINENO
23092   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23093   test "x$as_lineno_1" != "x$as_lineno_2" &&
23094   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
23095   # Find who we are.  Look in the path if we contain no path at all
23096   # relative or not.
23097   case $0 in
23098     *[\\/]* ) as_myself=$0 ;;
23099     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23100 for as_dir in $PATH
23101 do
23102   IFS=$as_save_IFS
23103   test -z "$as_dir" && as_dir=.
23104   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23105 done
23106
23107        ;;
23108   esac
23109   # We did not find ourselves, most probably we were run as `sh COMMAND'
23110   # in which case we are not to be found in the path.
23111   if test "x$as_myself" = x; then
23112     as_myself=$0
23113   fi
23114   if test ! -f "$as_myself"; then
23115     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23116 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23117    { (exit 1); exit 1; }; }
23118   fi
23119   case $CONFIG_SHELL in
23120   '')
23121     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23122 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23123 do
23124   IFS=$as_save_IFS
23125   test -z "$as_dir" && as_dir=.
23126   for as_base in sh bash ksh sh5; do
23127          case $as_dir in
23128          /*)
23129            if ("$as_dir/$as_base" -c '
23130   as_lineno_1=$LINENO
23131   as_lineno_2=$LINENO
23132   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23133   test "x$as_lineno_1" != "x$as_lineno_2" &&
23134   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
23135              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23136              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23137              CONFIG_SHELL=$as_dir/$as_base
23138              export CONFIG_SHELL
23139              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23140            fi;;
23141          esac
23142        done
23143 done
23144 ;;
23145   esac
23146
23147   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23148   # uniformly replaced by the line number.  The first 'sed' inserts a
23149   # line-number line before each line; the second 'sed' does the real
23150   # work.  The second script uses 'N' to pair each line-number line
23151   # with the numbered line, and appends trailing '-' during
23152   # substitution so that $LINENO is not a special case at line end.
23153   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23154   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23155   sed '=' <$as_myself |
23156     sed '
23157       N
23158       s,$,-,
23159       : loop
23160       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23161       t loop
23162       s,-$,,
23163       s,^['$as_cr_digits']*\n,,
23164     ' >$as_me.lineno &&
23165   chmod +x $as_me.lineno ||
23166     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23167 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23168    { (exit 1); exit 1; }; }
23169
23170   # Don't try to exec as it changes $[0], causing all sort of problems
23171   # (the dirname of $[0] is not the place where we might find the
23172   # original and so on.  Autoconf is especially sensible to this).
23173   . ./$as_me.lineno
23174   # Exit status is that of the last command.
23175   exit
23176 }
23177
23178
23179 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23180   *c*,-n*) ECHO_N= ECHO_C='
23181 ' ECHO_T='      ' ;;
23182   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23183   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23184 esac
23185
23186 if expr a : '\(a\)' >/dev/null 2>&1; then
23187   as_expr=expr
23188 else
23189   as_expr=false
23190 fi
23191
23192 rm -f conf$$ conf$$.exe conf$$.file
23193 echo >conf$$.file
23194 if ln -s conf$$.file conf$$ 2>/dev/null; then
23195   # We could just check for DJGPP; but this test a) works b) is more generic
23196   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23197   if test -f conf$$.exe; then
23198     # Don't use ln at all; we don't have any links
23199     as_ln_s='cp -p'
23200   else
23201     as_ln_s='ln -s'
23202   fi
23203 elif ln conf$$.file conf$$ 2>/dev/null; then
23204   as_ln_s=ln
23205 else
23206   as_ln_s='cp -p'
23207 fi
23208 rm -f conf$$ conf$$.exe conf$$.file
23209
23210 if mkdir -p . 2>/dev/null; then
23211   as_mkdir_p=:
23212 else
23213   test -d ./-p && rmdir ./-p
23214   as_mkdir_p=false
23215 fi
23216
23217 as_executable_p="test -f"
23218
23219 # Sed expression to map a string onto a valid CPP name.
23220 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23221
23222 # Sed expression to map a string onto a valid variable name.
23223 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23224
23225
23226 # IFS
23227 # We need space, tab and new line, in precisely that order.
23228 as_nl='
23229 '
23230 IFS="   $as_nl"
23231
23232 # CDPATH.
23233 $as_unset CDPATH
23234
23235 exec 6>&1
23236
23237 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23238 # report actual input values of CONFIG_FILES etc. instead of their
23239 # values after options handling.  Logging --version etc. is OK.
23240 exec 5>>config.log
23241 {
23242   echo
23243   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23244 ## Running $as_me. ##
23245 _ASBOX
23246 } >&5
23247 cat >&5 <<_CSEOF
23248
23249 This file was extended by PostgreSQL $as_me 8.2devel, which was
23250 generated by GNU Autoconf 2.59.  Invocation command line was
23251
23252   CONFIG_FILES    = $CONFIG_FILES
23253   CONFIG_HEADERS  = $CONFIG_HEADERS
23254   CONFIG_LINKS    = $CONFIG_LINKS
23255   CONFIG_COMMANDS = $CONFIG_COMMANDS
23256   $ $0 $@
23257
23258 _CSEOF
23259 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23260 echo >&5
23261 _ACEOF
23262
23263 # Files that config.status was made for.
23264 if test -n "$ac_config_files"; then
23265   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23266 fi
23267
23268 if test -n "$ac_config_headers"; then
23269   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23270 fi
23271
23272 if test -n "$ac_config_links"; then
23273   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23274 fi
23275
23276 if test -n "$ac_config_commands"; then
23277   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23278 fi
23279
23280 cat >>$CONFIG_STATUS <<\_ACEOF
23281
23282 ac_cs_usage="\
23283 \`$as_me' instantiates files from templates according to the
23284 current configuration.
23285
23286 Usage: $0 [OPTIONS] [FILE]...
23287
23288   -h, --help       print this help, then exit
23289   -V, --version    print version number, then exit
23290   -q, --quiet      do not print progress messages
23291   -d, --debug      don't remove temporary files
23292       --recheck    update $as_me by reconfiguring in the same conditions
23293   --file=FILE[:TEMPLATE]
23294                    instantiate the configuration file FILE
23295   --header=FILE[:TEMPLATE]
23296                    instantiate the configuration header FILE
23297
23298 Configuration files:
23299 $config_files
23300
23301 Configuration headers:
23302 $config_headers
23303
23304 Configuration links:
23305 $config_links
23306
23307 Configuration commands:
23308 $config_commands
23309
23310 Report bugs to <bug-autoconf@gnu.org>."
23311 _ACEOF
23312
23313 cat >>$CONFIG_STATUS <<_ACEOF
23314 ac_cs_version="\\
23315 PostgreSQL config.status 8.2devel
23316 configured by $0, generated by GNU Autoconf 2.59,
23317   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23318
23319 Copyright (C) 2003 Free Software Foundation, Inc.
23320 This config.status script is free software; the Free Software Foundation
23321 gives unlimited permission to copy, distribute and modify it."
23322 srcdir=$srcdir
23323 _ACEOF
23324
23325 cat >>$CONFIG_STATUS <<\_ACEOF
23326 # If no file are specified by the user, then we need to provide default
23327 # value.  By we need to know if files were specified by the user.
23328 ac_need_defaults=:
23329 while test $# != 0
23330 do
23331   case $1 in
23332   --*=*)
23333     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23334     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23335     ac_shift=:
23336     ;;
23337   -*)
23338     ac_option=$1
23339     ac_optarg=$2
23340     ac_shift=shift
23341     ;;
23342   *) # This is not an option, so the user has probably given explicit
23343      # arguments.
23344      ac_option=$1
23345      ac_need_defaults=false;;
23346   esac
23347
23348   case $ac_option in
23349   # Handling of the options.
23350 _ACEOF
23351 cat >>$CONFIG_STATUS <<\_ACEOF
23352   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23353     ac_cs_recheck=: ;;
23354   --version | --vers* | -V )
23355     echo "$ac_cs_version"; exit 0 ;;
23356   --he | --h)
23357     # Conflict between --help and --header
23358     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23359 Try \`$0 --help' for more information." >&5
23360 echo "$as_me: error: ambiguous option: $1
23361 Try \`$0 --help' for more information." >&2;}
23362    { (exit 1); exit 1; }; };;
23363   --help | --hel | -h )
23364     echo "$ac_cs_usage"; exit 0 ;;
23365   --debug | --d* | -d )
23366     debug=: ;;
23367   --file | --fil | --fi | --f )
23368     $ac_shift
23369     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23370     ac_need_defaults=false;;
23371   --header | --heade | --head | --hea )
23372     $ac_shift
23373     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23374     ac_need_defaults=false;;
23375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23376   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23377     ac_cs_silent=: ;;
23378
23379   # This is an error.
23380   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23381 Try \`$0 --help' for more information." >&5
23382 echo "$as_me: error: unrecognized option: $1
23383 Try \`$0 --help' for more information." >&2;}
23384    { (exit 1); exit 1; }; } ;;
23385
23386   *) ac_config_targets="$ac_config_targets $1" ;;
23387
23388   esac
23389   shift
23390 done
23391
23392 ac_configure_extra_args=
23393
23394 if $ac_cs_silent; then
23395   exec 6>/dev/null
23396   ac_configure_extra_args="$ac_configure_extra_args --silent"
23397 fi
23398
23399 _ACEOF
23400 cat >>$CONFIG_STATUS <<_ACEOF
23401 if \$ac_cs_recheck; then
23402   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23403   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23404 fi
23405
23406 _ACEOF
23407
23408
23409
23410
23411
23412 cat >>$CONFIG_STATUS <<\_ACEOF
23413 for ac_config_target in $ac_config_targets
23414 do
23415   case "$ac_config_target" in
23416   # Handling of arguments.
23417   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23418   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23419   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23420   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23421   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23422   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23423   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23424   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23425   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23426   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23427   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23428   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23429 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23430    { (exit 1); exit 1; }; };;
23431   esac
23432 done
23433
23434 # If the user did not use the arguments to specify the items to instantiate,
23435 # then the envvar interface is used.  Set only those that are not.
23436 # We use the long form for the default assignment because of an extremely
23437 # bizarre bug on SunOS 4.1.3.
23438 if $ac_need_defaults; then
23439   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23440   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23441   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23442   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23443 fi
23444
23445 # Have a temporary directory for convenience.  Make it in the build tree
23446 # simply because there is no reason to put it here, and in addition,
23447 # creating and moving files from /tmp can sometimes cause problems.
23448 # Create a temporary directory, and hook for its removal unless debugging.
23449 $debug ||
23450 {
23451   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23452   trap '{ (exit 1); exit 1; }' 1 2 13 15
23453 }
23454
23455 # Create a (secure) tmp directory for tmp files.
23456
23457 {
23458   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23459   test -n "$tmp" && test -d "$tmp"
23460 }  ||
23461 {
23462   tmp=./confstat$$-$RANDOM
23463   (umask 077 && mkdir $tmp)
23464 } ||
23465 {
23466    echo "$me: cannot create a temporary directory in ." >&2
23467    { (exit 1); exit 1; }
23468 }
23469
23470 _ACEOF
23471
23472 cat >>$CONFIG_STATUS <<_ACEOF
23473
23474 #
23475 # CONFIG_FILES section.
23476 #
23477
23478 # No need to generate the scripts if there are no CONFIG_FILES.
23479 # This happens for instance when ./config.status config.h
23480 if test -n "\$CONFIG_FILES"; then
23481   # Protect against being on the right side of a sed subst in config.status.
23482   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23483    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23484 s,@SHELL@,$SHELL,;t t
23485 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23486 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23487 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23488 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23489 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23490 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23491 s,@exec_prefix@,$exec_prefix,;t t
23492 s,@prefix@,$prefix,;t t
23493 s,@program_transform_name@,$program_transform_name,;t t
23494 s,@bindir@,$bindir,;t t
23495 s,@sbindir@,$sbindir,;t t
23496 s,@libexecdir@,$libexecdir,;t t
23497 s,@datadir@,$datadir,;t t
23498 s,@sysconfdir@,$sysconfdir,;t t
23499 s,@sharedstatedir@,$sharedstatedir,;t t
23500 s,@localstatedir@,$localstatedir,;t t
23501 s,@libdir@,$libdir,;t t
23502 s,@includedir@,$includedir,;t t
23503 s,@oldincludedir@,$oldincludedir,;t t
23504 s,@infodir@,$infodir,;t t
23505 s,@mandir@,$mandir,;t t
23506 s,@build_alias@,$build_alias,;t t
23507 s,@host_alias@,$host_alias,;t t
23508 s,@target_alias@,$target_alias,;t t
23509 s,@DEFS@,$DEFS,;t t
23510 s,@ECHO_C@,$ECHO_C,;t t
23511 s,@ECHO_N@,$ECHO_N,;t t
23512 s,@ECHO_T@,$ECHO_T,;t t
23513 s,@LIBS@,$LIBS,;t t
23514 s,@configure_args@,$configure_args,;t t
23515 s,@build@,$build,;t t
23516 s,@build_cpu@,$build_cpu,;t t
23517 s,@build_vendor@,$build_vendor,;t t
23518 s,@build_os@,$build_os,;t t
23519 s,@host@,$host,;t t
23520 s,@host_cpu@,$host_cpu,;t t
23521 s,@host_vendor@,$host_vendor,;t t
23522 s,@host_os@,$host_os,;t t
23523 s,@PORTNAME@,$PORTNAME,;t t
23524 s,@docdir@,$docdir,;t t
23525 s,@enable_nls@,$enable_nls,;t t
23526 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23527 s,@default_port@,$default_port,;t t
23528 s,@enable_shared@,$enable_shared,;t t
23529 s,@enable_rpath@,$enable_rpath,;t t
23530 s,@enable_debug@,$enable_debug,;t t
23531 s,@CC@,$CC,;t t
23532 s,@CFLAGS@,$CFLAGS,;t t
23533 s,@LDFLAGS@,$LDFLAGS,;t t
23534 s,@CPPFLAGS@,$CPPFLAGS,;t t
23535 s,@ac_ct_CC@,$ac_ct_CC,;t t
23536 s,@EXEEXT@,$EXEEXT,;t t
23537 s,@OBJEXT@,$OBJEXT,;t t
23538 s,@CPP@,$CPP,;t t
23539 s,@GCC@,$GCC,;t t
23540 s,@TAS@,$TAS,;t t
23541 s,@autodepend@,$autodepend,;t t
23542 s,@INCLUDES@,$INCLUDES,;t t
23543 s,@enable_thread_safety@,$enable_thread_safety,;t t
23544 s,@with_tcl@,$with_tcl,;t t
23545 s,@with_perl@,$with_perl,;t t
23546 s,@with_python@,$with_python,;t t
23547 s,@with_krb5@,$with_krb5,;t t
23548 s,@krb_srvtab@,$krb_srvtab,;t t
23549 s,@with_pam@,$with_pam,;t t
23550 s,@with_bonjour@,$with_bonjour,;t t
23551 s,@with_openssl@,$with_openssl,;t t
23552 s,@with_zlib@,$with_zlib,;t t
23553 s,@EGREP@,$EGREP,;t t
23554 s,@ELF_SYS@,$ELF_SYS,;t t
23555 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23556 s,@AWK@,$AWK,;t t
23557 s,@FLEX@,$FLEX,;t t
23558 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23559 s,@LN_S@,$LN_S,;t t
23560 s,@LD@,$LD,;t t
23561 s,@with_gnu_ld@,$with_gnu_ld,;t t
23562 s,@ld_R_works@,$ld_R_works,;t t
23563 s,@RANLIB@,$RANLIB,;t t
23564 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23565 s,@LORDER@,$LORDER,;t t
23566 s,@TAR@,$TAR,;t t
23567 s,@STRIP@,$STRIP,;t t
23568 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23569 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23570 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23571 s,@YACC@,$YACC,;t t
23572 s,@YFLAGS@,$YFLAGS,;t t
23573 s,@PERL@,$PERL,;t t
23574 s,@perl_archlibexp@,$perl_archlibexp,;t t
23575 s,@perl_privlibexp@,$perl_privlibexp,;t t
23576 s,@perl_useshrplib@,$perl_useshrplib,;t t
23577 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23578 s,@PYTHON@,$PYTHON,;t t
23579 s,@python_version@,$python_version,;t t
23580 s,@python_configdir@,$python_configdir,;t t
23581 s,@python_includespec@,$python_includespec,;t t
23582 s,@python_libdir@,$python_libdir,;t t
23583 s,@python_libspec@,$python_libspec,;t t
23584 s,@python_additional_libs@,$python_additional_libs,;t t
23585 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23586 s,@LIBOBJS@,$LIBOBJS,;t t
23587 s,@acx_pthread_config@,$acx_pthread_config,;t t
23588 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23589 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23590 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23591 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23592 s,@MSGFMT@,$MSGFMT,;t t
23593 s,@MSGMERGE@,$MSGMERGE,;t t
23594 s,@XGETTEXT@,$XGETTEXT,;t t
23595 s,@localedir@,$localedir,;t t
23596 s,@TCLSH@,$TCLSH,;t t
23597 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23598 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23599 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23600 s,@TCL_LIBS@,$TCL_LIBS,;t t
23601 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23602 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23603 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23604 s,@NSGMLS@,$NSGMLS,;t t
23605 s,@JADE@,$JADE,;t t
23606 s,@have_docbook@,$have_docbook,;t t
23607 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23608 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23609 s,@SGMLSPL@,$SGMLSPL,;t t
23610 s,@vpath_build@,$vpath_build,;t t
23611 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23612 CEOF
23613
23614 _ACEOF
23615
23616   cat >>$CONFIG_STATUS <<\_ACEOF
23617   # Split the substitutions into bite-sized pieces for seds with
23618   # small command number limits, like on Digital OSF/1 and HP-UX.
23619   ac_max_sed_lines=48
23620   ac_sed_frag=1 # Number of current file.
23621   ac_beg=1 # First line for current file.
23622   ac_end=$ac_max_sed_lines # Line after last line for current file.
23623   ac_more_lines=:
23624   ac_sed_cmds=
23625   while $ac_more_lines; do
23626     if test $ac_beg -gt 1; then
23627       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23628     else
23629       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23630     fi
23631     if test ! -s $tmp/subs.frag; then
23632       ac_more_lines=false
23633     else
23634       # The purpose of the label and of the branching condition is to
23635       # speed up the sed processing (if there are no `@' at all, there
23636       # is no need to browse any of the substitutions).
23637       # These are the two extra sed commands mentioned above.
23638       (echo ':t
23639   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23640       if test -z "$ac_sed_cmds"; then
23641         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23642       else
23643         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23644       fi
23645       ac_sed_frag=`expr $ac_sed_frag + 1`
23646       ac_beg=$ac_end
23647       ac_end=`expr $ac_end + $ac_max_sed_lines`
23648     fi
23649   done
23650   if test -z "$ac_sed_cmds"; then
23651     ac_sed_cmds=cat
23652   fi
23653 fi # test -n "$CONFIG_FILES"
23654
23655 _ACEOF
23656 cat >>$CONFIG_STATUS <<\_ACEOF
23657 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23658   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23659   case $ac_file in
23660   - | *:- | *:-:* ) # input from stdin
23661         cat >$tmp/stdin
23662         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23663         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23664   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23665         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23666   * )   ac_file_in=$ac_file.in ;;
23667   esac
23668
23669   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23670   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23671 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23672          X"$ac_file" : 'X\(//\)[^/]' \| \
23673          X"$ac_file" : 'X\(//\)$' \| \
23674          X"$ac_file" : 'X\(/\)' \| \
23675          .     : '\(.\)' 2>/dev/null ||
23676 echo X"$ac_file" |
23677     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23678           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23679           /^X\(\/\/\)$/{ s//\1/; q; }
23680           /^X\(\/\).*/{ s//\1/; q; }
23681           s/.*/./; q'`
23682   { if $as_mkdir_p; then
23683     mkdir -p "$ac_dir"
23684   else
23685     as_dir="$ac_dir"
23686     as_dirs=
23687     while test ! -d "$as_dir"; do
23688       as_dirs="$as_dir $as_dirs"
23689       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23690 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23691          X"$as_dir" : 'X\(//\)[^/]' \| \
23692          X"$as_dir" : 'X\(//\)$' \| \
23693          X"$as_dir" : 'X\(/\)' \| \
23694          .     : '\(.\)' 2>/dev/null ||
23695 echo X"$as_dir" |
23696     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23697           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23698           /^X\(\/\/\)$/{ s//\1/; q; }
23699           /^X\(\/\).*/{ s//\1/; q; }
23700           s/.*/./; q'`
23701     done
23702     test ! -n "$as_dirs" || mkdir $as_dirs
23703   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23704 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23705    { (exit 1); exit 1; }; }; }
23706
23707   ac_builddir=.
23708
23709 if test "$ac_dir" != .; then
23710   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23711   # A "../" for each directory in $ac_dir_suffix.
23712   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23713 else
23714   ac_dir_suffix= ac_top_builddir=
23715 fi
23716
23717 case $srcdir in
23718   .)  # No --srcdir option.  We are building in place.
23719     ac_srcdir=.
23720     if test -z "$ac_top_builddir"; then
23721        ac_top_srcdir=.
23722     else
23723        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23724     fi ;;
23725   [\\/]* | ?:[\\/]* )  # Absolute path.
23726     ac_srcdir=$srcdir$ac_dir_suffix;
23727     ac_top_srcdir=$srcdir ;;
23728   *) # Relative path.
23729     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23730     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23731 esac
23732
23733 # Do not use `cd foo && pwd` to compute absolute paths, because
23734 # the directories may not exist.
23735 case `pwd` in
23736 .) ac_abs_builddir="$ac_dir";;
23737 *)
23738   case "$ac_dir" in
23739   .) ac_abs_builddir=`pwd`;;
23740   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23741   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23742   esac;;
23743 esac
23744 case $ac_abs_builddir in
23745 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23746 *)
23747   case ${ac_top_builddir}. in
23748   .) ac_abs_top_builddir=$ac_abs_builddir;;
23749   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23750   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23751   esac;;
23752 esac
23753 case $ac_abs_builddir in
23754 .) ac_abs_srcdir=$ac_srcdir;;
23755 *)
23756   case $ac_srcdir in
23757   .) ac_abs_srcdir=$ac_abs_builddir;;
23758   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23759   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23760   esac;;
23761 esac
23762 case $ac_abs_builddir in
23763 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23764 *)
23765   case $ac_top_srcdir in
23766   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23767   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23768   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23769   esac;;
23770 esac
23771
23772
23773
23774   if test x"$ac_file" != x-; then
23775     { echo "$as_me:$LINENO: creating $ac_file" >&5
23776 echo "$as_me: creating $ac_file" >&6;}
23777     rm -f "$ac_file"
23778   fi
23779   # Let's still pretend it is `configure' which instantiates (i.e., don't
23780   # use $as_me), people would be surprised to read:
23781   #    /* config.h.  Generated by config.status.  */
23782   if test x"$ac_file" = x-; then
23783     configure_input=
23784   else
23785     configure_input="$ac_file.  "
23786   fi
23787   configure_input=$configure_input"Generated from `echo $ac_file_in |
23788                                      sed 's,.*/,,'` by configure."
23789
23790   # First look for the input files in the build tree, otherwise in the
23791   # src tree.
23792   ac_file_inputs=`IFS=:
23793     for f in $ac_file_in; do
23794       case $f in
23795       -) echo $tmp/stdin ;;
23796       [\\/$]*)
23797          # Absolute (can't be DOS-style, as IFS=:)
23798          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23799 echo "$as_me: error: cannot find input file: $f" >&2;}
23800    { (exit 1); exit 1; }; }
23801          echo "$f";;
23802       *) # Relative
23803          if test -f "$f"; then
23804            # Build tree
23805            echo "$f"
23806          elif test -f "$srcdir/$f"; then
23807            # Source tree
23808            echo "$srcdir/$f"
23809          else
23810            # /dev/null tree
23811            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23812 echo "$as_me: error: cannot find input file: $f" >&2;}
23813    { (exit 1); exit 1; }; }
23814          fi;;
23815       esac
23816     done` || { (exit 1); exit 1; }
23817 _ACEOF
23818 cat >>$CONFIG_STATUS <<_ACEOF
23819   sed "$ac_vpsub
23820 $extrasub
23821 _ACEOF
23822 cat >>$CONFIG_STATUS <<\_ACEOF
23823 :t
23824 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23825 s,@configure_input@,$configure_input,;t t
23826 s,@srcdir@,$ac_srcdir,;t t
23827 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23828 s,@top_srcdir@,$ac_top_srcdir,;t t
23829 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23830 s,@builddir@,$ac_builddir,;t t
23831 s,@abs_builddir@,$ac_abs_builddir,;t t
23832 s,@top_builddir@,$ac_top_builddir,;t t
23833 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23834 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23835   rm -f $tmp/stdin
23836   if test x"$ac_file" != x-; then
23837     mv $tmp/out $ac_file
23838   else
23839     cat $tmp/out
23840     rm -f $tmp/out
23841   fi
23842
23843 done
23844 _ACEOF
23845 cat >>$CONFIG_STATUS <<\_ACEOF
23846
23847 #
23848 # CONFIG_HEADER section.
23849 #
23850
23851 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23852 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23853 #
23854 # ac_d sets the value in "#define NAME VALUE" lines.
23855 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23856 ac_dB='[         ].*$,\1#\2'
23857 ac_dC=' '
23858 ac_dD=',;t'
23859 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23860 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23861 ac_uB='$,\1#\2define\3'
23862 ac_uC=' '
23863 ac_uD=',;t'
23864
23865 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23866   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23867   case $ac_file in
23868   - | *:- | *:-:* ) # input from stdin
23869         cat >$tmp/stdin
23870         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23871         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23872   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23873         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23874   * )   ac_file_in=$ac_file.in ;;
23875   esac
23876
23877   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23878 echo "$as_me: creating $ac_file" >&6;}
23879
23880   # First look for the input files in the build tree, otherwise in the
23881   # src tree.
23882   ac_file_inputs=`IFS=:
23883     for f in $ac_file_in; do
23884       case $f in
23885       -) echo $tmp/stdin ;;
23886       [\\/$]*)
23887          # Absolute (can't be DOS-style, as IFS=:)
23888          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23889 echo "$as_me: error: cannot find input file: $f" >&2;}
23890    { (exit 1); exit 1; }; }
23891          # Do quote $f, to prevent DOS paths from being IFS'd.
23892          echo "$f";;
23893       *) # Relative
23894          if test -f "$f"; then
23895            # Build tree
23896            echo "$f"
23897          elif test -f "$srcdir/$f"; then
23898            # Source tree
23899            echo "$srcdir/$f"
23900          else
23901            # /dev/null tree
23902            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23903 echo "$as_me: error: cannot find input file: $f" >&2;}
23904    { (exit 1); exit 1; }; }
23905          fi;;
23906       esac
23907     done` || { (exit 1); exit 1; }
23908   # Remove the trailing spaces.
23909   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23910
23911 _ACEOF
23912
23913 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23914 # `conftest.undefs', that substitutes the proper values into
23915 # config.h.in to produce config.h.  The first handles `#define'
23916 # templates, and the second `#undef' templates.
23917 # And first: Protect against being on the right side of a sed subst in
23918 # config.status.  Protect against being in an unquoted here document
23919 # in config.status.
23920 rm -f conftest.defines conftest.undefs
23921 # Using a here document instead of a string reduces the quoting nightmare.
23922 # Putting comments in sed scripts is not portable.
23923 #
23924 # `end' is used to avoid that the second main sed command (meant for
23925 # 0-ary CPP macros) applies to n-ary macro definitions.
23926 # See the Autoconf documentation for `clear'.
23927 cat >confdef2sed.sed <<\_ACEOF
23928 s/[\\&,]/\\&/g
23929 s,[\\$`],\\&,g
23930 t clear
23931 : clear
23932 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23933 t end
23934 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23935 : end
23936 _ACEOF
23937 # If some macros were called several times there might be several times
23938 # the same #defines, which is useless.  Nevertheless, we may not want to
23939 # sort them, since we want the *last* AC-DEFINE to be honored.
23940 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23941 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23942 rm -f confdef2sed.sed
23943
23944 # This sed command replaces #undef with comments.  This is necessary, for
23945 # example, in the case of _POSIX_SOURCE, which is predefined and required
23946 # on some systems where configure will not decide to define it.
23947 cat >>conftest.undefs <<\_ACEOF
23948 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23949 _ACEOF
23950
23951 # Break up conftest.defines because some shells have a limit on the size
23952 # of here documents, and old seds have small limits too (100 cmds).
23953 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23954 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23955 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23956 echo '  :' >>$CONFIG_STATUS
23957 rm -f conftest.tail
23958 while grep . conftest.defines >/dev/null
23959 do
23960   # Write a limited-size here document to $tmp/defines.sed.
23961   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23962   # Speed up: don't consider the non `#define' lines.
23963   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23964   # Work around the forget-to-reset-the-flag bug.
23965   echo 't clr' >>$CONFIG_STATUS
23966   echo ': clr' >>$CONFIG_STATUS
23967   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23968   echo 'CEOF
23969   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23970   rm -f $tmp/in
23971   mv $tmp/out $tmp/in
23972 ' >>$CONFIG_STATUS
23973   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23974   rm -f conftest.defines
23975   mv conftest.tail conftest.defines
23976 done
23977 rm -f conftest.defines
23978 echo '  fi # grep' >>$CONFIG_STATUS
23979 echo >>$CONFIG_STATUS
23980
23981 # Break up conftest.undefs because some shells have a limit on the size
23982 # of here documents, and old seds have small limits too (100 cmds).
23983 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23984 rm -f conftest.tail
23985 while grep . conftest.undefs >/dev/null
23986 do
23987   # Write a limited-size here document to $tmp/undefs.sed.
23988   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23989   # Speed up: don't consider the non `#undef'
23990   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23991   # Work around the forget-to-reset-the-flag bug.
23992   echo 't clr' >>$CONFIG_STATUS
23993   echo ': clr' >>$CONFIG_STATUS
23994   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23995   echo 'CEOF
23996   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23997   rm -f $tmp/in
23998   mv $tmp/out $tmp/in
23999 ' >>$CONFIG_STATUS
24000   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24001   rm -f conftest.undefs
24002   mv conftest.tail conftest.undefs
24003 done
24004 rm -f conftest.undefs
24005
24006 cat >>$CONFIG_STATUS <<\_ACEOF
24007   # Let's still pretend it is `configure' which instantiates (i.e., don't
24008   # use $as_me), people would be surprised to read:
24009   #    /* config.h.  Generated by config.status.  */
24010   if test x"$ac_file" = x-; then
24011     echo "/* Generated by configure.  */" >$tmp/config.h
24012   else
24013     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
24014   fi
24015   cat $tmp/in >>$tmp/config.h
24016   rm -f $tmp/in
24017   if test x"$ac_file" != x-; then
24018     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
24019       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24020 echo "$as_me: $ac_file is unchanged" >&6;}
24021     else
24022       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24023 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24024          X"$ac_file" : 'X\(//\)[^/]' \| \
24025          X"$ac_file" : 'X\(//\)$' \| \
24026          X"$ac_file" : 'X\(/\)' \| \
24027          .     : '\(.\)' 2>/dev/null ||
24028 echo X"$ac_file" |
24029     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24030           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24031           /^X\(\/\/\)$/{ s//\1/; q; }
24032           /^X\(\/\).*/{ s//\1/; q; }
24033           s/.*/./; q'`
24034       { if $as_mkdir_p; then
24035     mkdir -p "$ac_dir"
24036   else
24037     as_dir="$ac_dir"
24038     as_dirs=
24039     while test ! -d "$as_dir"; do
24040       as_dirs="$as_dir $as_dirs"
24041       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24042 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24043          X"$as_dir" : 'X\(//\)[^/]' \| \
24044          X"$as_dir" : 'X\(//\)$' \| \
24045          X"$as_dir" : 'X\(/\)' \| \
24046          .     : '\(.\)' 2>/dev/null ||
24047 echo X"$as_dir" |
24048     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24049           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24050           /^X\(\/\/\)$/{ s//\1/; q; }
24051           /^X\(\/\).*/{ s//\1/; q; }
24052           s/.*/./; q'`
24053     done
24054     test ! -n "$as_dirs" || mkdir $as_dirs
24055   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24056 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24057    { (exit 1); exit 1; }; }; }
24058
24059       rm -f $ac_file
24060       mv $tmp/config.h $ac_file
24061     fi
24062   else
24063     cat $tmp/config.h
24064     rm -f $tmp/config.h
24065   fi
24066   # Run the commands associated with the file.
24067   case $ac_file in
24068     src/include/pg_config.h )
24069 # Update timestamp for pg_config.h (see Makefile.global)
24070 echo >src/include/stamp-h
24071  ;;
24072   esac
24073 done
24074 _ACEOF
24075 cat >>$CONFIG_STATUS <<\_ACEOF
24076
24077 #
24078 # CONFIG_LINKS section.
24079 #
24080
24081 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
24082   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24083   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24084
24085   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
24086 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
24087
24088   if test ! -r $srcdir/$ac_source; then
24089     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
24090 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
24091    { (exit 1); exit 1; }; }
24092   fi
24093   rm -f $ac_dest
24094
24095   # Make relative symlinks.
24096   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
24097 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24098          X"$ac_dest" : 'X\(//\)[^/]' \| \
24099          X"$ac_dest" : 'X\(//\)$' \| \
24100          X"$ac_dest" : 'X\(/\)' \| \
24101          .     : '\(.\)' 2>/dev/null ||
24102 echo X"$ac_dest" |
24103     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24104           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24105           /^X\(\/\/\)$/{ s//\1/; q; }
24106           /^X\(\/\).*/{ s//\1/; q; }
24107           s/.*/./; q'`
24108   { if $as_mkdir_p; then
24109     mkdir -p "$ac_dest_dir"
24110   else
24111     as_dir="$ac_dest_dir"
24112     as_dirs=
24113     while test ! -d "$as_dir"; do
24114       as_dirs="$as_dir $as_dirs"
24115       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24116 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24117          X"$as_dir" : 'X\(//\)[^/]' \| \
24118          X"$as_dir" : 'X\(//\)$' \| \
24119          X"$as_dir" : 'X\(/\)' \| \
24120          .     : '\(.\)' 2>/dev/null ||
24121 echo X"$as_dir" |
24122     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24123           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24124           /^X\(\/\/\)$/{ s//\1/; q; }
24125           /^X\(\/\).*/{ s//\1/; q; }
24126           s/.*/./; q'`
24127     done
24128     test ! -n "$as_dirs" || mkdir $as_dirs
24129   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
24130 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
24131    { (exit 1); exit 1; }; }; }
24132
24133   ac_builddir=.
24134
24135 if test "$ac_dest_dir" != .; then
24136   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
24137   # A "../" for each directory in $ac_dir_suffix.
24138   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24139 else
24140   ac_dir_suffix= ac_top_builddir=
24141 fi
24142
24143 case $srcdir in
24144   .)  # No --srcdir option.  We are building in place.
24145     ac_srcdir=.
24146     if test -z "$ac_top_builddir"; then
24147        ac_top_srcdir=.
24148     else
24149        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24150     fi ;;
24151   [\\/]* | ?:[\\/]* )  # Absolute path.
24152     ac_srcdir=$srcdir$ac_dir_suffix;
24153     ac_top_srcdir=$srcdir ;;
24154   *) # Relative path.
24155     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24156     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24157 esac
24158
24159 # Do not use `cd foo && pwd` to compute absolute paths, because
24160 # the directories may not exist.
24161 case `pwd` in
24162 .) ac_abs_builddir="$ac_dest_dir";;
24163 *)
24164   case "$ac_dest_dir" in
24165   .) ac_abs_builddir=`pwd`;;
24166   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24167   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24168   esac;;
24169 esac
24170 case $ac_abs_builddir in
24171 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24172 *)
24173   case ${ac_top_builddir}. in
24174   .) ac_abs_top_builddir=$ac_abs_builddir;;
24175   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24176   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24177   esac;;
24178 esac
24179 case $ac_abs_builddir in
24180 .) ac_abs_srcdir=$ac_srcdir;;
24181 *)
24182   case $ac_srcdir in
24183   .) ac_abs_srcdir=$ac_abs_builddir;;
24184   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24185   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24186   esac;;
24187 esac
24188 case $ac_abs_builddir in
24189 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24190 *)
24191   case $ac_top_srcdir in
24192   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24193   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24194   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24195   esac;;
24196 esac
24197
24198
24199   case $srcdir in
24200   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24201       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24202   esac
24203
24204   # Try a symlink, then a hard link, then a copy.
24205   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24206     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24207     cp -p $srcdir/$ac_source $ac_dest ||
24208     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24209 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24210    { (exit 1); exit 1; }; }
24211 done
24212 _ACEOF
24213 cat >>$CONFIG_STATUS <<\_ACEOF
24214
24215 #
24216 # CONFIG_COMMANDS section.
24217 #
24218 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24219   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24220   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24221   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24222 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24223          X"$ac_dest" : 'X\(//\)[^/]' \| \
24224          X"$ac_dest" : 'X\(//\)$' \| \
24225          X"$ac_dest" : 'X\(/\)' \| \
24226          .     : '\(.\)' 2>/dev/null ||
24227 echo X"$ac_dest" |
24228     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24229           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24230           /^X\(\/\/\)$/{ s//\1/; q; }
24231           /^X\(\/\).*/{ s//\1/; q; }
24232           s/.*/./; q'`
24233   { if $as_mkdir_p; then
24234     mkdir -p "$ac_dir"
24235   else
24236     as_dir="$ac_dir"
24237     as_dirs=
24238     while test ! -d "$as_dir"; do
24239       as_dirs="$as_dir $as_dirs"
24240       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24241 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24242          X"$as_dir" : 'X\(//\)[^/]' \| \
24243          X"$as_dir" : 'X\(//\)$' \| \
24244          X"$as_dir" : 'X\(/\)' \| \
24245          .     : '\(.\)' 2>/dev/null ||
24246 echo X"$as_dir" |
24247     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24248           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24249           /^X\(\/\/\)$/{ s//\1/; q; }
24250           /^X\(\/\).*/{ s//\1/; q; }
24251           s/.*/./; q'`
24252     done
24253     test ! -n "$as_dirs" || mkdir $as_dirs
24254   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24255 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24256    { (exit 1); exit 1; }; }; }
24257
24258   ac_builddir=.
24259
24260 if test "$ac_dir" != .; then
24261   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24262   # A "../" for each directory in $ac_dir_suffix.
24263   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24264 else
24265   ac_dir_suffix= ac_top_builddir=
24266 fi
24267
24268 case $srcdir in
24269   .)  # No --srcdir option.  We are building in place.
24270     ac_srcdir=.
24271     if test -z "$ac_top_builddir"; then
24272        ac_top_srcdir=.
24273     else
24274        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24275     fi ;;
24276   [\\/]* | ?:[\\/]* )  # Absolute path.
24277     ac_srcdir=$srcdir$ac_dir_suffix;
24278     ac_top_srcdir=$srcdir ;;
24279   *) # Relative path.
24280     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24281     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24282 esac
24283
24284 # Do not use `cd foo && pwd` to compute absolute paths, because
24285 # the directories may not exist.
24286 case `pwd` in
24287 .) ac_abs_builddir="$ac_dir";;
24288 *)
24289   case "$ac_dir" in
24290   .) ac_abs_builddir=`pwd`;;
24291   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24292   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24293   esac;;
24294 esac
24295 case $ac_abs_builddir in
24296 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24297 *)
24298   case ${ac_top_builddir}. in
24299   .) ac_abs_top_builddir=$ac_abs_builddir;;
24300   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24301   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24302   esac;;
24303 esac
24304 case $ac_abs_builddir in
24305 .) ac_abs_srcdir=$ac_srcdir;;
24306 *)
24307   case $ac_srcdir in
24308   .) ac_abs_srcdir=$ac_abs_builddir;;
24309   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24310   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24311   esac;;
24312 esac
24313 case $ac_abs_builddir in
24314 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24315 *)
24316   case $ac_top_srcdir in
24317   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24318   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24319   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24320   esac;;
24321 esac
24322
24323
24324   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24325 echo "$as_me: executing $ac_dest commands" >&6;}
24326   case $ac_dest in
24327     check_win32_symlinks )
24328 # Links sometimes fail undetected on Mingw -
24329 # so here we detect it and warn the user
24330 for FILE in $CONFIG_LINKS
24331  do
24332         # test -e works for symlinks in the MinGW console
24333         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24334 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24335  done
24336  ;;
24337   esac
24338 done
24339 _ACEOF
24340
24341 cat >>$CONFIG_STATUS <<\_ACEOF
24342
24343 { (exit 0); exit 0; }
24344 _ACEOF
24345 chmod +x $CONFIG_STATUS
24346 ac_clean_files=$ac_clean_files_save
24347
24348
24349 # configure is writing to config.log, and then calls config.status.
24350 # config.status does its own redirection, appending to config.log.
24351 # Unfortunately, on DOS this fails, as config.log is still kept open
24352 # by configure, so config.status won't be able to write to it; its
24353 # output is simply discarded.  So we exec the FD to /dev/null,
24354 # effectively closing config.log, so it can be properly (re)opened and
24355 # appended to by config.status.  When coming back to configure, we
24356 # need to make the FD available again.
24357 if test "$no_create" != yes; then
24358   ac_cs_success=:
24359   ac_config_status_args=
24360   test "$silent" = yes &&
24361     ac_config_status_args="$ac_config_status_args --quiet"
24362   exec 5>/dev/null
24363   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24364   exec 5>>config.log
24365   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24366   # would make configure fail if this is the last instruction.
24367   $ac_cs_success || { (exit 1); exit 1; }
24368 fi
24369
24370