]> granicus.if.org Git - postgresql/blob - configure
Clean up some messages and fix missing translation support. Option --log
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.1beta2.
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.1beta2'
275 PACKAGE_STRING='PostgreSQL 8.1beta2'
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.1beta2 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.1beta2:";;
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   --without-readline      do not use Readline
894   --without-zlib          do not use Zlib
895   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
896
897 Some influential environment variables:
898   CC          C compiler command
899   CFLAGS      C compiler flags
900   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
901               nonstandard directory <lib dir>
902   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
903               headers in a nonstandard directory <include dir>
904   CPP         C preprocessor
905   LDFLAGS_SL
906   DOCBOOKSTYLE
907               location of DocBook stylesheets
908
909 Use these variables to override the choices made by `configure' or to help
910 it to find libraries and programs with nonstandard names/locations.
911
912 Report bugs to <pgsql-bugs@postgresql.org>.
913 _ACEOF
914 fi
915
916 if test "$ac_init_help" = "recursive"; then
917   # If there are subdirs, report their specific --help.
918   ac_popdir=`pwd`
919   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
920     test -d $ac_dir || continue
921     ac_builddir=.
922
923 if test "$ac_dir" != .; then
924   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
925   # A "../" for each directory in $ac_dir_suffix.
926   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
927 else
928   ac_dir_suffix= ac_top_builddir=
929 fi
930
931 case $srcdir in
932   .)  # No --srcdir option.  We are building in place.
933     ac_srcdir=.
934     if test -z "$ac_top_builddir"; then
935        ac_top_srcdir=.
936     else
937        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
938     fi ;;
939   [\\/]* | ?:[\\/]* )  # Absolute path.
940     ac_srcdir=$srcdir$ac_dir_suffix;
941     ac_top_srcdir=$srcdir ;;
942   *) # Relative path.
943     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
944     ac_top_srcdir=$ac_top_builddir$srcdir ;;
945 esac
946
947 # Do not use `cd foo && pwd` to compute absolute paths, because
948 # the directories may not exist.
949 case `pwd` in
950 .) ac_abs_builddir="$ac_dir";;
951 *)
952   case "$ac_dir" in
953   .) ac_abs_builddir=`pwd`;;
954   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
955   *) ac_abs_builddir=`pwd`/"$ac_dir";;
956   esac;;
957 esac
958 case $ac_abs_builddir in
959 .) ac_abs_top_builddir=${ac_top_builddir}.;;
960 *)
961   case ${ac_top_builddir}. in
962   .) ac_abs_top_builddir=$ac_abs_builddir;;
963   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
964   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
965   esac;;
966 esac
967 case $ac_abs_builddir in
968 .) ac_abs_srcdir=$ac_srcdir;;
969 *)
970   case $ac_srcdir in
971   .) ac_abs_srcdir=$ac_abs_builddir;;
972   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
973   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
974   esac;;
975 esac
976 case $ac_abs_builddir in
977 .) ac_abs_top_srcdir=$ac_top_srcdir;;
978 *)
979   case $ac_top_srcdir in
980   .) ac_abs_top_srcdir=$ac_abs_builddir;;
981   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
982   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
983   esac;;
984 esac
985
986     cd $ac_dir
987     # Check for guested configure; otherwise get Cygnus style configure.
988     if test -f $ac_srcdir/configure.gnu; then
989       echo
990       $SHELL $ac_srcdir/configure.gnu  --help=recursive
991     elif test -f $ac_srcdir/configure; then
992       echo
993       $SHELL $ac_srcdir/configure  --help=recursive
994     elif test -f $ac_srcdir/configure.ac ||
995            test -f $ac_srcdir/configure.in; then
996       echo
997       $ac_configure --help
998     else
999       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1000     fi
1001     cd $ac_popdir
1002   done
1003 fi
1004
1005 test -n "$ac_init_help" && exit 0
1006 if $ac_init_version; then
1007   cat <<\_ACEOF
1008 PostgreSQL configure 8.1beta2
1009 generated by GNU Autoconf 2.59
1010
1011 Copyright (C) 2003 Free Software Foundation, Inc.
1012 This configure script is free software; the Free Software Foundation
1013 gives unlimited permission to copy, distribute and modify it.
1014
1015 Copyright (c) 1996-2005, PostgreSQL Global Development Group
1016 _ACEOF
1017   exit 0
1018 fi
1019 exec 5>config.log
1020 cat >&5 <<_ACEOF
1021 This file contains any messages produced by compilers while
1022 running configure, to aid debugging if configure makes a mistake.
1023
1024 It was created by PostgreSQL $as_me 8.1beta2, which was
1025 generated by GNU Autoconf 2.59.  Invocation command line was
1026
1027   $ $0 $@
1028
1029 _ACEOF
1030 {
1031 cat <<_ASUNAME
1032 ## --------- ##
1033 ## Platform. ##
1034 ## --------- ##
1035
1036 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1037 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1038 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1039 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1040 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1041
1042 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1043 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1044
1045 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1046 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1047 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1048 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1049 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1050 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1051 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1052
1053 _ASUNAME
1054
1055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1056 for as_dir in $PATH
1057 do
1058   IFS=$as_save_IFS
1059   test -z "$as_dir" && as_dir=.
1060   echo "PATH: $as_dir"
1061 done
1062
1063 } >&5
1064
1065 cat >&5 <<_ACEOF
1066
1067
1068 ## ----------- ##
1069 ## Core tests. ##
1070 ## ----------- ##
1071
1072 _ACEOF
1073
1074
1075 # Keep a trace of the command line.
1076 # Strip out --no-create and --no-recursion so they do not pile up.
1077 # Strip out --silent because we don't want to record it for future runs.
1078 # Also quote any args containing shell meta-characters.
1079 # Make two passes to allow for proper duplicate-argument suppression.
1080 ac_configure_args=
1081 ac_configure_args0=
1082 ac_configure_args1=
1083 ac_sep=
1084 ac_must_keep_next=false
1085 for ac_pass in 1 2
1086 do
1087   for ac_arg
1088   do
1089     case $ac_arg in
1090     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1091     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1092     | -silent | --silent | --silen | --sile | --sil)
1093       continue ;;
1094     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1095       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1096     esac
1097     case $ac_pass in
1098     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1099     2)
1100       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1101       if test $ac_must_keep_next = true; then
1102         ac_must_keep_next=false # Got value, back to normal.
1103       else
1104         case $ac_arg in
1105           *=* | --config-cache | -C | -disable-* | --disable-* \
1106           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1107           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1108           | -with-* | --with-* | -without-* | --without-* | --x)
1109             case "$ac_configure_args0 " in
1110               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1111             esac
1112             ;;
1113           -* ) ac_must_keep_next=true ;;
1114         esac
1115       fi
1116       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1117       # Get rid of the leading space.
1118       ac_sep=" "
1119       ;;
1120     esac
1121   done
1122 done
1123 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1124 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1125
1126 # When interrupted or exit'd, cleanup temporary files, and complete
1127 # config.log.  We remove comments because anyway the quotes in there
1128 # would cause problems or look ugly.
1129 # WARNING: Be sure not to use single quotes in there, as some shells,
1130 # such as our DU 5.0 friend, will then `close' the trap.
1131 trap 'exit_status=$?
1132   # Save into config.log some information that might help in debugging.
1133   {
1134     echo
1135
1136     cat <<\_ASBOX
1137 ## ---------------- ##
1138 ## Cache variables. ##
1139 ## ---------------- ##
1140 _ASBOX
1141     echo
1142     # The following way of writing the cache mishandles newlines in values,
1143 {
1144   (set) 2>&1 |
1145     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1146     *ac_space=\ *)
1147       sed -n \
1148         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1149           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1150       ;;
1151     *)
1152       sed -n \
1153         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1154       ;;
1155     esac;
1156 }
1157     echo
1158
1159     cat <<\_ASBOX
1160 ## ----------------- ##
1161 ## Output variables. ##
1162 ## ----------------- ##
1163 _ASBOX
1164     echo
1165     for ac_var in $ac_subst_vars
1166     do
1167       eval ac_val=$`echo $ac_var`
1168       echo "$ac_var='"'"'$ac_val'"'"'"
1169     done | sort
1170     echo
1171
1172     if test -n "$ac_subst_files"; then
1173       cat <<\_ASBOX
1174 ## ------------- ##
1175 ## Output files. ##
1176 ## ------------- ##
1177 _ASBOX
1178       echo
1179       for ac_var in $ac_subst_files
1180       do
1181         eval ac_val=$`echo $ac_var`
1182         echo "$ac_var='"'"'$ac_val'"'"'"
1183       done | sort
1184       echo
1185     fi
1186
1187     if test -s confdefs.h; then
1188       cat <<\_ASBOX
1189 ## ----------- ##
1190 ## confdefs.h. ##
1191 ## ----------- ##
1192 _ASBOX
1193       echo
1194       sed "/^$/d" confdefs.h | sort
1195       echo
1196     fi
1197     test "$ac_signal" != 0 &&
1198       echo "$as_me: caught signal $ac_signal"
1199     echo "$as_me: exit $exit_status"
1200   } >&5
1201   rm -f core *.core &&
1202   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1203     exit $exit_status
1204      ' 0
1205 for ac_signal in 1 2 13 15; do
1206   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1207 done
1208 ac_signal=0
1209
1210 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1211 rm -rf conftest* confdefs.h
1212 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1213 echo >confdefs.h
1214
1215 # Predefined preprocessor variables.
1216
1217 cat >>confdefs.h <<_ACEOF
1218 #define PACKAGE_NAME "$PACKAGE_NAME"
1219 _ACEOF
1220
1221
1222 cat >>confdefs.h <<_ACEOF
1223 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1224 _ACEOF
1225
1226
1227 cat >>confdefs.h <<_ACEOF
1228 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1229 _ACEOF
1230
1231
1232 cat >>confdefs.h <<_ACEOF
1233 #define PACKAGE_STRING "$PACKAGE_STRING"
1234 _ACEOF
1235
1236
1237 cat >>confdefs.h <<_ACEOF
1238 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1239 _ACEOF
1240
1241
1242 # Let the site file select an alternate cache file if it wants to.
1243 # Prefer explicitly selected file to automatically selected ones.
1244 if test -z "$CONFIG_SITE"; then
1245   if test "x$prefix" != xNONE; then
1246     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1247   else
1248     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1249   fi
1250 fi
1251 for ac_site_file in $CONFIG_SITE; do
1252   if test -r "$ac_site_file"; then
1253     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1254 echo "$as_me: loading site script $ac_site_file" >&6;}
1255     sed 's/^/| /' "$ac_site_file" >&5
1256     . "$ac_site_file"
1257   fi
1258 done
1259
1260 if test -r "$cache_file"; then
1261   # Some versions of bash will fail to source /dev/null (special
1262   # files actually), so we avoid doing that.
1263   if test -f "$cache_file"; then
1264     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1265 echo "$as_me: loading cache $cache_file" >&6;}
1266     case $cache_file in
1267       [\\/]* | ?:[\\/]* ) . $cache_file;;
1268       *)                      . ./$cache_file;;
1269     esac
1270   fi
1271 else
1272   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1273 echo "$as_me: creating cache $cache_file" >&6;}
1274   >$cache_file
1275 fi
1276
1277 # Check that the precious variables saved in the cache have kept the same
1278 # value.
1279 ac_cache_corrupted=false
1280 for ac_var in `(set) 2>&1 |
1281                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1282   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1283   eval ac_new_set=\$ac_env_${ac_var}_set
1284   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1285   eval ac_new_val="\$ac_env_${ac_var}_value"
1286   case $ac_old_set,$ac_new_set in
1287     set,)
1288       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1289 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1290       ac_cache_corrupted=: ;;
1291     ,set)
1292       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1293 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1294       ac_cache_corrupted=: ;;
1295     ,);;
1296     *)
1297       if test "x$ac_old_val" != "x$ac_new_val"; then
1298         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1299 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1300         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1301 echo "$as_me:   former value:  $ac_old_val" >&2;}
1302         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1303 echo "$as_me:   current value: $ac_new_val" >&2;}
1304         ac_cache_corrupted=:
1305       fi;;
1306   esac
1307   # Pass precious variables to config.status.
1308   if test "$ac_new_set" = set; then
1309     case $ac_new_val in
1310     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1311       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1312     *) ac_arg=$ac_var=$ac_new_val ;;
1313     esac
1314     case " $ac_configure_args " in
1315       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1316       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1317     esac
1318   fi
1319 done
1320 if $ac_cache_corrupted; then
1321   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1322 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1323   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1324 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1325    { (exit 1); exit 1; }; }
1326 fi
1327
1328 ac_ext=c
1329 ac_cpp='$CPP $CPPFLAGS'
1330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1333
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 ac_aux_dir=
1365 for ac_dir in config $srcdir/config; do
1366   if test -f $ac_dir/install-sh; then
1367     ac_aux_dir=$ac_dir
1368     ac_install_sh="$ac_aux_dir/install-sh -c"
1369     break
1370   elif test -f $ac_dir/install.sh; then
1371     ac_aux_dir=$ac_dir
1372     ac_install_sh="$ac_aux_dir/install.sh -c"
1373     break
1374   elif test -f $ac_dir/shtool; then
1375     ac_aux_dir=$ac_dir
1376     ac_install_sh="$ac_aux_dir/shtool install -c"
1377     break
1378   fi
1379 done
1380 if test -z "$ac_aux_dir"; then
1381   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1382 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1383    { (exit 1); exit 1; }; }
1384 fi
1385 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1386 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1387 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1388
1389
1390 configure_args=$ac_configure_args
1391
1392
1393
1394 cat >>confdefs.h <<_ACEOF
1395 #define PG_VERSION "$PACKAGE_VERSION"
1396 _ACEOF
1397
1398
1399 # Make sure we can run config.sub.
1400 $ac_config_sub sun4 >/dev/null 2>&1 ||
1401   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1402 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1403    { (exit 1); exit 1; }; }
1404
1405 echo "$as_me:$LINENO: checking build system type" >&5
1406 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1407 if test "${ac_cv_build+set}" = set; then
1408   echo $ECHO_N "(cached) $ECHO_C" >&6
1409 else
1410   ac_cv_build_alias=$build_alias
1411 test -z "$ac_cv_build_alias" &&
1412   ac_cv_build_alias=`$ac_config_guess`
1413 test -z "$ac_cv_build_alias" &&
1414   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1415 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1416    { (exit 1); exit 1; }; }
1417 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1418   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1419 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1420    { (exit 1); exit 1; }; }
1421
1422 fi
1423 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1424 echo "${ECHO_T}$ac_cv_build" >&6
1425 build=$ac_cv_build
1426 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1427 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1428 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1429
1430
1431 echo "$as_me:$LINENO: checking host system type" >&5
1432 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1433 if test "${ac_cv_host+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   ac_cv_host_alias=$host_alias
1437 test -z "$ac_cv_host_alias" &&
1438   ac_cv_host_alias=$ac_cv_build_alias
1439 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1440   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1441 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1442    { (exit 1); exit 1; }; }
1443
1444 fi
1445 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1446 echo "${ECHO_T}$ac_cv_host" >&6
1447 host=$ac_cv_host
1448 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1449 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1450 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1451
1452
1453
1454 template=
1455 echo "$as_me:$LINENO: checking which template to use" >&5
1456 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1457
1458
1459
1460
1461 # Check whether --with-template or --without-template was given.
1462 if test "${with_template+set}" = set; then
1463   withval="$with_template"
1464
1465   case $withval in
1466     yes)
1467       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1468 echo "$as_me: error: argument required for --with-template option" >&2;}
1469    { (exit 1); exit 1; }; }
1470       ;;
1471     no)
1472       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1473 echo "$as_me: error: argument required for --with-template option" >&2;}
1474    { (exit 1); exit 1; }; }
1475       ;;
1476     *)
1477
1478   case $withval in
1479     list)   echo; ls "$srcdir/src/template"; exit;;
1480     *)      if test -f "$srcdir/src/template/$with_template" ; then
1481               template=$withval
1482             else
1483               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1484 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1485    { (exit 1); exit 1; }; }
1486             fi;;
1487   esac
1488
1489       ;;
1490   esac
1491
1492 else
1493
1494 # --with-template not given
1495
1496 case $host_os in
1497      aix*) template=aix ;;
1498     beos*) template=beos ;;
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      qnx*) template=qnx4 ;;
1514      sco*) template=sco ;;
1515  solaris*) template=solaris ;;
1516    sunos*) template=sunos4 ;;
1517  sysv4.2*)
1518         case $host_vendor in
1519           univel) template=univel ;;
1520         esac ;;
1521    sysv4*) template=svr4 ;;
1522    sysv5*) template=unixware ;;
1523   ultrix*) template=ultrix4 ;;
1524 esac
1525
1526   if test x"$template" = x"" ; then
1527     { { echo "$as_me:$LINENO: error:
1528 *******************************************************************
1529 PostgreSQL has apparently not been ported to your platform yet.
1530 To try a manual configuration, look into the src/template directory
1531 for a similar platform and use the '--with-template=' option.
1532
1533 Please also contact <pgsql-ports@postgresql.org> to see about
1534 rectifying this.  Include the above 'checking host system type...'
1535 line.
1536 *******************************************************************
1537 " >&5
1538 echo "$as_me: error:
1539 *******************************************************************
1540 PostgreSQL has apparently not been ported to your platform yet.
1541 To try a manual configuration, look into the src/template directory
1542 for a similar platform and use the '--with-template=' option.
1543
1544 Please also contact <pgsql-ports@postgresql.org> to see about
1545 rectifying this.  Include the above 'checking host system type...'
1546 line.
1547 *******************************************************************
1548 " >&2;}
1549    { (exit 1); exit 1; }; }
1550   fi
1551
1552
1553 fi;
1554
1555
1556 echo "$as_me:$LINENO: result: $template" >&5
1557 echo "${ECHO_T}$template" >&6
1558
1559 PORTNAME=$template
1560
1561
1562 # Initialize default assumption that we do not need separate assembly code
1563 # for TAS (test-and-set).  This can be overridden by the template file
1564 # when it's executed.
1565 need_tas=no
1566 tas_file=dummy.s
1567
1568
1569
1570 ##
1571 ## Command line options
1572 ##
1573
1574 #
1575 # Installation directory for documentation
1576 #
1577
1578
1579
1580 # Check whether --with-docdir or --without-docdir was given.
1581 if test "${with_docdir+set}" = set; then
1582   withval="$with_docdir"
1583
1584   case $withval in
1585     yes)
1586       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1587 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1588    { (exit 1); exit 1; }; }
1589       ;;
1590     no)
1591       docdir=
1592       ;;
1593     *)
1594       docdir=$withval
1595       ;;
1596   esac
1597
1598 else
1599   docdir='${prefix}/doc'
1600 fi;
1601
1602
1603
1604
1605 #
1606 # Add non-standard directories to the include path
1607 #
1608
1609
1610
1611 # Check whether --with-includes or --without-includes was given.
1612 if test "${with_includes+set}" = set; then
1613   withval="$with_includes"
1614
1615   case $withval in
1616     yes)
1617       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1618 echo "$as_me: error: argument required for --with-includes option" >&2;}
1619    { (exit 1); exit 1; }; }
1620       ;;
1621     no)
1622       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1623 echo "$as_me: error: argument required for --with-includes option" >&2;}
1624    { (exit 1); exit 1; }; }
1625       ;;
1626     *)
1627
1628       ;;
1629   esac
1630
1631 fi;
1632
1633
1634
1635 #
1636 # Add non-standard directories to the library search path
1637 #
1638
1639
1640
1641 # Check whether --with-libraries or --without-libraries was given.
1642 if test "${with_libraries+set}" = set; then
1643   withval="$with_libraries"
1644
1645   case $withval in
1646     yes)
1647       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1648 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1649    { (exit 1); exit 1; }; }
1650       ;;
1651     no)
1652       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1653 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1654    { (exit 1); exit 1; }; }
1655       ;;
1656     *)
1657       LIBRARY_DIRS=$withval
1658       ;;
1659   esac
1660
1661 fi;
1662
1663
1664
1665
1666
1667 # Check whether --with-libs or --without-libs was given.
1668 if test "${with_libs+set}" = set; then
1669   withval="$with_libs"
1670
1671   case $withval in
1672     yes)
1673       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1674 echo "$as_me: error: argument required for --with-libs option" >&2;}
1675    { (exit 1); exit 1; }; }
1676       ;;
1677     no)
1678       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1679 echo "$as_me: error: argument required for --with-libs option" >&2;}
1680    { (exit 1); exit 1; }; }
1681       ;;
1682     *)
1683       LIBRARY_DIRS=$withval
1684       ;;
1685   esac
1686
1687 fi;
1688
1689
1690
1691 #
1692 # 64-bit integer date/time storage (--enable-integer-datetimes)
1693 #
1694 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1695 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1696
1697
1698 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1699 if test "${enable_integer_datetimes+set}" = set; then
1700   enableval="$enable_integer_datetimes"
1701
1702   case $enableval in
1703     yes)
1704
1705 cat >>confdefs.h <<\_ACEOF
1706 #define USE_INTEGER_DATETIMES 1
1707 _ACEOF
1708
1709       ;;
1710     no)
1711       :
1712       ;;
1713     *)
1714       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1715 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1716    { (exit 1); exit 1; }; }
1717       ;;
1718   esac
1719
1720 else
1721   enable_integer_datetimes=no
1722
1723 fi;
1724
1725 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1726 echo "${ECHO_T}$enable_integer_datetimes" >&6
1727
1728
1729 #
1730 # NLS
1731 #
1732 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1733 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1734
1735
1736 # Check whether --enable-nls or --disable-nls was given.
1737 if test "${enable_nls+set}" = set; then
1738   enableval="$enable_nls"
1739
1740   case $enableval in
1741     yes)
1742       :
1743       ;;
1744     no)
1745       :
1746       ;;
1747     *)
1748       enable_nls=yes
1749 WANTED_LANGUAGES=$enableval
1750       ;;
1751   esac
1752
1753 else
1754   enable_nls=no
1755 fi;
1756
1757
1758 if test "$enable_nls" = yes; then
1759
1760 cat >>confdefs.h <<\_ACEOF
1761 #define ENABLE_NLS 1
1762 _ACEOF
1763
1764 fi
1765
1766 echo "$as_me:$LINENO: result: $enable_nls" >&5
1767 echo "${ECHO_T}$enable_nls" >&6
1768
1769
1770
1771 #
1772 # Default port number (--with-pgport), default 5432
1773 #
1774 echo "$as_me:$LINENO: checking for default port number" >&5
1775 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1776
1777
1778
1779 # Check whether --with-pgport or --without-pgport was given.
1780 if test "${with_pgport+set}" = set; then
1781   withval="$with_pgport"
1782
1783   case $withval in
1784     yes)
1785       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1786 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1787    { (exit 1); exit 1; }; }
1788       ;;
1789     no)
1790       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1791 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1792    { (exit 1); exit 1; }; }
1793       ;;
1794     *)
1795       default_port=$withval
1796       ;;
1797   esac
1798
1799 else
1800   default_port=5432
1801 fi;
1802
1803 echo "$as_me:$LINENO: result: $default_port" >&5
1804 echo "${ECHO_T}$default_port" >&6
1805 # Need both of these because some places want an integer and some a string
1806
1807 cat >>confdefs.h <<_ACEOF
1808 #define DEF_PGPORT ${default_port}
1809 _ACEOF
1810
1811
1812 cat >>confdefs.h <<_ACEOF
1813 #define DEF_PGPORT_STR "${default_port}"
1814 _ACEOF
1815
1816
1817
1818 #
1819 # Option to disable shared libraries
1820 #
1821
1822
1823 # Check whether --enable-shared or --disable-shared was given.
1824 if test "${enable_shared+set}" = set; then
1825   enableval="$enable_shared"
1826
1827   case $enableval in
1828     yes)
1829       :
1830       ;;
1831     no)
1832       :
1833       ;;
1834     *)
1835       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1836 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1837    { (exit 1); exit 1; }; }
1838       ;;
1839   esac
1840
1841 else
1842   enable_shared=yes
1843
1844 fi;
1845
1846
1847
1848 #
1849 # '-rpath'-like feature can be disabled
1850 #
1851
1852
1853 # Check whether --enable-rpath or --disable-rpath was given.
1854 if test "${enable_rpath+set}" = set; then
1855   enableval="$enable_rpath"
1856
1857   case $enableval in
1858     yes)
1859       :
1860       ;;
1861     no)
1862       :
1863       ;;
1864     *)
1865       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1866 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1867    { (exit 1); exit 1; }; }
1868       ;;
1869   esac
1870
1871 else
1872   enable_rpath=yes
1873
1874 fi;
1875
1876
1877
1878 #
1879 # Spinlocks
1880 #
1881
1882
1883 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1884 if test "${enable_spinlocks+set}" = set; then
1885   enableval="$enable_spinlocks"
1886
1887   case $enableval in
1888     yes)
1889       :
1890       ;;
1891     no)
1892       :
1893       ;;
1894     *)
1895       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1896 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1897    { (exit 1); exit 1; }; }
1898       ;;
1899   esac
1900
1901 else
1902   enable_spinlocks=yes
1903
1904 fi;
1905
1906
1907 #
1908 # --enable-debug adds -g to compiler flags
1909 #
1910
1911
1912 # Check whether --enable-debug or --disable-debug was given.
1913 if test "${enable_debug+set}" = set; then
1914   enableval="$enable_debug"
1915
1916   case $enableval in
1917     yes)
1918       :
1919       ;;
1920     no)
1921       :
1922       ;;
1923     *)
1924       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1925 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1926    { (exit 1); exit 1; }; }
1927       ;;
1928   esac
1929
1930 else
1931   enable_debug=no
1932
1933 fi;
1934
1935
1936
1937 #
1938 # C compiler
1939 #
1940
1941 # For historical reasons you can also use --with-CC to specify the C compiler
1942 # to use, although the standard way to do this is to set the CC environment
1943 # variable.
1944
1945
1946
1947 # Check whether --with-CC or --without-CC was given.
1948 if test "${with_CC+set}" = set; then
1949   withval="$with_CC"
1950
1951   case $withval in
1952     yes)
1953       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1954 echo "$as_me: error: argument required for --with-CC option" >&2;}
1955    { (exit 1); exit 1; }; }
1956       ;;
1957     no)
1958       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1959 echo "$as_me: error: argument required for --with-CC option" >&2;}
1960    { (exit 1); exit 1; }; }
1961       ;;
1962     *)
1963       CC=$with_CC
1964       ;;
1965   esac
1966
1967 fi;
1968
1969
1970 case $template in
1971   aix) pgac_cc_list="gcc xlc";;
1972  irix) pgac_cc_list="cc";; # no gcc
1973     *) pgac_cc_list="gcc cc";;
1974 esac
1975
1976 ac_ext=c
1977 ac_cpp='$CPP $CPPFLAGS'
1978 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1979 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1980 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1981 if test -n "$ac_tool_prefix"; then
1982   for ac_prog in $pgac_cc_list
1983   do
1984     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1985 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1986 echo "$as_me:$LINENO: checking for $ac_word" >&5
1987 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1988 if test "${ac_cv_prog_CC+set}" = set; then
1989   echo $ECHO_N "(cached) $ECHO_C" >&6
1990 else
1991   if test -n "$CC"; then
1992   ac_cv_prog_CC="$CC" # Let the user override the test.
1993 else
1994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1995 for as_dir in $PATH
1996 do
1997   IFS=$as_save_IFS
1998   test -z "$as_dir" && as_dir=.
1999   for ac_exec_ext in '' $ac_executable_extensions; do
2000   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2001     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2002     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2003     break 2
2004   fi
2005 done
2006 done
2007
2008 fi
2009 fi
2010 CC=$ac_cv_prog_CC
2011 if test -n "$CC"; then
2012   echo "$as_me:$LINENO: result: $CC" >&5
2013 echo "${ECHO_T}$CC" >&6
2014 else
2015   echo "$as_me:$LINENO: result: no" >&5
2016 echo "${ECHO_T}no" >&6
2017 fi
2018
2019     test -n "$CC" && break
2020   done
2021 fi
2022 if test -z "$CC"; then
2023   ac_ct_CC=$CC
2024   for ac_prog in $pgac_cc_list
2025 do
2026   # Extract the first word of "$ac_prog", so it can be a program name with args.
2027 set dummy $ac_prog; ac_word=$2
2028 echo "$as_me:$LINENO: checking for $ac_word" >&5
2029 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2030 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2031   echo $ECHO_N "(cached) $ECHO_C" >&6
2032 else
2033   if test -n "$ac_ct_CC"; then
2034   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2035 else
2036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2037 for as_dir in $PATH
2038 do
2039   IFS=$as_save_IFS
2040   test -z "$as_dir" && as_dir=.
2041   for ac_exec_ext in '' $ac_executable_extensions; do
2042   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2043     ac_cv_prog_ac_ct_CC="$ac_prog"
2044     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2045     break 2
2046   fi
2047 done
2048 done
2049
2050 fi
2051 fi
2052 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2053 if test -n "$ac_ct_CC"; then
2054   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2055 echo "${ECHO_T}$ac_ct_CC" >&6
2056 else
2057   echo "$as_me:$LINENO: result: no" >&5
2058 echo "${ECHO_T}no" >&6
2059 fi
2060
2061   test -n "$ac_ct_CC" && break
2062 done
2063
2064   CC=$ac_ct_CC
2065 fi
2066
2067
2068 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2069 See \`config.log' for more details." >&5
2070 echo "$as_me: error: no acceptable C compiler found in \$PATH
2071 See \`config.log' for more details." >&2;}
2072    { (exit 1); exit 1; }; }
2073
2074 # Provide some information about the compiler.
2075 echo "$as_me:$LINENO:" \
2076      "checking for C compiler version" >&5
2077 ac_compiler=`set X $ac_compile; echo $2`
2078 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2079   (eval $ac_compiler --version </dev/null >&5) 2>&5
2080   ac_status=$?
2081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2082   (exit $ac_status); }
2083 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2084   (eval $ac_compiler -v </dev/null >&5) 2>&5
2085   ac_status=$?
2086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2087   (exit $ac_status); }
2088 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2089   (eval $ac_compiler -V </dev/null >&5) 2>&5
2090   ac_status=$?
2091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2092   (exit $ac_status); }
2093
2094 cat >conftest.$ac_ext <<_ACEOF
2095 /* confdefs.h.  */
2096 _ACEOF
2097 cat confdefs.h >>conftest.$ac_ext
2098 cat >>conftest.$ac_ext <<_ACEOF
2099 /* end confdefs.h.  */
2100
2101 int
2102 main ()
2103 {
2104
2105   ;
2106   return 0;
2107 }
2108 _ACEOF
2109 ac_clean_files_save=$ac_clean_files
2110 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2111 # Try to create an executable without -o first, disregard a.out.
2112 # It will help us diagnose broken compilers, and finding out an intuition
2113 # of exeext.
2114 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2115 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2116 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2117 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2118   (eval $ac_link_default) 2>&5
2119   ac_status=$?
2120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2121   (exit $ac_status); }; then
2122   # Find the output, starting from the most likely.  This scheme is
2123 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2124 # resort.
2125
2126 # Be careful to initialize this variable, since it used to be cached.
2127 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2128 ac_cv_exeext=
2129 # b.out is created by i960 compilers.
2130 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2131 do
2132   test -f "$ac_file" || continue
2133   case $ac_file in
2134     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2135         ;;
2136     conftest.$ac_ext )
2137         # This is the source file.
2138         ;;
2139     [ab].out )
2140         # We found the default executable, but exeext='' is most
2141         # certainly right.
2142         break;;
2143     *.* )
2144         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2145         # FIXME: I believe we export ac_cv_exeext for Libtool,
2146         # but it would be cool to find out if it's true.  Does anybody
2147         # maintain Libtool? --akim.
2148         export ac_cv_exeext
2149         break;;
2150     * )
2151         break;;
2152   esac
2153 done
2154 else
2155   echo "$as_me: failed program was:" >&5
2156 sed 's/^/| /' conftest.$ac_ext >&5
2157
2158 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2159 See \`config.log' for more details." >&5
2160 echo "$as_me: error: C compiler cannot create executables
2161 See \`config.log' for more details." >&2;}
2162    { (exit 77); exit 77; }; }
2163 fi
2164
2165 ac_exeext=$ac_cv_exeext
2166 echo "$as_me:$LINENO: result: $ac_file" >&5
2167 echo "${ECHO_T}$ac_file" >&6
2168
2169 # Check the compiler produces executables we can run.  If not, either
2170 # the compiler is broken, or we cross compile.
2171 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2172 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2173 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2174 # If not cross compiling, check that we can run a simple program.
2175 if test "$cross_compiling" != yes; then
2176   if { ac_try='./$ac_file'
2177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2178   (eval $ac_try) 2>&5
2179   ac_status=$?
2180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2181   (exit $ac_status); }; }; then
2182     cross_compiling=no
2183   else
2184     if test "$cross_compiling" = maybe; then
2185         cross_compiling=yes
2186     else
2187         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2188 If you meant to cross compile, use \`--host'.
2189 See \`config.log' for more details." >&5
2190 echo "$as_me: error: cannot run C compiled programs.
2191 If you meant to cross compile, use \`--host'.
2192 See \`config.log' for more details." >&2;}
2193    { (exit 1); exit 1; }; }
2194     fi
2195   fi
2196 fi
2197 echo "$as_me:$LINENO: result: yes" >&5
2198 echo "${ECHO_T}yes" >&6
2199
2200 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2201 ac_clean_files=$ac_clean_files_save
2202 # Check the compiler produces executables we can run.  If not, either
2203 # the compiler is broken, or we cross compile.
2204 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2205 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2206 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2207 echo "${ECHO_T}$cross_compiling" >&6
2208
2209 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2210 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2211 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2212   (eval $ac_link) 2>&5
2213   ac_status=$?
2214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2215   (exit $ac_status); }; then
2216   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2217 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2218 # work properly (i.e., refer to `conftest.exe'), while it won't with
2219 # `rm'.
2220 for ac_file in conftest.exe conftest conftest.*; do
2221   test -f "$ac_file" || continue
2222   case $ac_file in
2223     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2224     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2225           export ac_cv_exeext
2226           break;;
2227     * ) break;;
2228   esac
2229 done
2230 else
2231   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2232 See \`config.log' for more details." >&5
2233 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2234 See \`config.log' for more details." >&2;}
2235    { (exit 1); exit 1; }; }
2236 fi
2237
2238 rm -f conftest$ac_cv_exeext
2239 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2240 echo "${ECHO_T}$ac_cv_exeext" >&6
2241
2242 rm -f conftest.$ac_ext
2243 EXEEXT=$ac_cv_exeext
2244 ac_exeext=$EXEEXT
2245 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2246 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2247 if test "${ac_cv_objext+set}" = set; then
2248   echo $ECHO_N "(cached) $ECHO_C" >&6
2249 else
2250   cat >conftest.$ac_ext <<_ACEOF
2251 /* confdefs.h.  */
2252 _ACEOF
2253 cat confdefs.h >>conftest.$ac_ext
2254 cat >>conftest.$ac_ext <<_ACEOF
2255 /* end confdefs.h.  */
2256
2257 int
2258 main ()
2259 {
2260
2261   ;
2262   return 0;
2263 }
2264 _ACEOF
2265 rm -f conftest.o conftest.obj
2266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2267   (eval $ac_compile) 2>&5
2268   ac_status=$?
2269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2270   (exit $ac_status); }; then
2271   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2272   case $ac_file in
2273     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2274     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2275        break;;
2276   esac
2277 done
2278 else
2279   echo "$as_me: failed program was:" >&5
2280 sed 's/^/| /' conftest.$ac_ext >&5
2281
2282 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2283 See \`config.log' for more details." >&5
2284 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2285 See \`config.log' for more details." >&2;}
2286    { (exit 1); exit 1; }; }
2287 fi
2288
2289 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2290 fi
2291 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2292 echo "${ECHO_T}$ac_cv_objext" >&6
2293 OBJEXT=$ac_cv_objext
2294 ac_objext=$OBJEXT
2295 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2296 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2297 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2298   echo $ECHO_N "(cached) $ECHO_C" >&6
2299 else
2300   cat >conftest.$ac_ext <<_ACEOF
2301 /* confdefs.h.  */
2302 _ACEOF
2303 cat confdefs.h >>conftest.$ac_ext
2304 cat >>conftest.$ac_ext <<_ACEOF
2305 /* end confdefs.h.  */
2306
2307 int
2308 main ()
2309 {
2310 #ifndef __GNUC__
2311        choke me
2312 #endif
2313
2314   ;
2315   return 0;
2316 }
2317 _ACEOF
2318 rm -f conftest.$ac_objext
2319 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2320   (eval $ac_compile) 2>conftest.er1
2321   ac_status=$?
2322   grep -v '^ *+' conftest.er1 >conftest.err
2323   rm -f conftest.er1
2324   cat conftest.err >&5
2325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2326   (exit $ac_status); } &&
2327          { ac_try='test -z "$ac_c_werror_flag"
2328                          || test ! -s conftest.err'
2329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2330   (eval $ac_try) 2>&5
2331   ac_status=$?
2332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2333   (exit $ac_status); }; } &&
2334          { ac_try='test -s conftest.$ac_objext'
2335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2336   (eval $ac_try) 2>&5
2337   ac_status=$?
2338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339   (exit $ac_status); }; }; then
2340   ac_compiler_gnu=yes
2341 else
2342   echo "$as_me: failed program was:" >&5
2343 sed 's/^/| /' conftest.$ac_ext >&5
2344
2345 ac_compiler_gnu=no
2346 fi
2347 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2348 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2349
2350 fi
2351 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2352 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2353 GCC=`test $ac_compiler_gnu = yes && echo yes`
2354 ac_test_CFLAGS=${CFLAGS+set}
2355 ac_save_CFLAGS=$CFLAGS
2356 CFLAGS="-g"
2357 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2358 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2359 if test "${ac_cv_prog_cc_g+set}" = set; then
2360   echo $ECHO_N "(cached) $ECHO_C" >&6
2361 else
2362   cat >conftest.$ac_ext <<_ACEOF
2363 /* confdefs.h.  */
2364 _ACEOF
2365 cat confdefs.h >>conftest.$ac_ext
2366 cat >>conftest.$ac_ext <<_ACEOF
2367 /* end confdefs.h.  */
2368
2369 int
2370 main ()
2371 {
2372
2373   ;
2374   return 0;
2375 }
2376 _ACEOF
2377 rm -f conftest.$ac_objext
2378 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2379   (eval $ac_compile) 2>conftest.er1
2380   ac_status=$?
2381   grep -v '^ *+' conftest.er1 >conftest.err
2382   rm -f conftest.er1
2383   cat conftest.err >&5
2384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2385   (exit $ac_status); } &&
2386          { ac_try='test -z "$ac_c_werror_flag"
2387                          || test ! -s conftest.err'
2388   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2389   (eval $ac_try) 2>&5
2390   ac_status=$?
2391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2392   (exit $ac_status); }; } &&
2393          { ac_try='test -s conftest.$ac_objext'
2394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2395   (eval $ac_try) 2>&5
2396   ac_status=$?
2397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398   (exit $ac_status); }; }; then
2399   ac_cv_prog_cc_g=yes
2400 else
2401   echo "$as_me: failed program was:" >&5
2402 sed 's/^/| /' conftest.$ac_ext >&5
2403
2404 ac_cv_prog_cc_g=no
2405 fi
2406 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2407 fi
2408 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2409 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2410 if test "$ac_test_CFLAGS" = set; then
2411   CFLAGS=$ac_save_CFLAGS
2412 elif test $ac_cv_prog_cc_g = yes; then
2413   if test "$GCC" = yes; then
2414     CFLAGS="-g -O2"
2415   else
2416     CFLAGS="-g"
2417   fi
2418 else
2419   if test "$GCC" = yes; then
2420     CFLAGS="-O2"
2421   else
2422     CFLAGS=
2423   fi
2424 fi
2425 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2426 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2427 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2428   echo $ECHO_N "(cached) $ECHO_C" >&6
2429 else
2430   ac_cv_prog_cc_stdc=no
2431 ac_save_CC=$CC
2432 cat >conftest.$ac_ext <<_ACEOF
2433 /* confdefs.h.  */
2434 _ACEOF
2435 cat confdefs.h >>conftest.$ac_ext
2436 cat >>conftest.$ac_ext <<_ACEOF
2437 /* end confdefs.h.  */
2438 #include <stdarg.h>
2439 #include <stdio.h>
2440 #include <sys/types.h>
2441 #include <sys/stat.h>
2442 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2443 struct buf { int x; };
2444 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2445 static char *e (p, i)
2446      char **p;
2447      int i;
2448 {
2449   return p[i];
2450 }
2451 static char *f (char * (*g) (char **, int), char **p, ...)
2452 {
2453   char *s;
2454   va_list v;
2455   va_start (v,p);
2456   s = g (p, va_arg (v,int));
2457   va_end (v);
2458   return s;
2459 }
2460
2461 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2462    function prototypes and stuff, but not '\xHH' hex character constants.
2463    These don't provoke an error unfortunately, instead are silently treated
2464    as 'x'.  The following induces an error, until -std1 is added to get
2465    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2466    array size at least.  It's necessary to write '\x00'==0 to get something
2467    that's true only with -std1.  */
2468 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2469
2470 int test (int i, double x);
2471 struct s1 {int (*f) (int a);};
2472 struct s2 {int (*f) (double a);};
2473 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2474 int argc;
2475 char **argv;
2476 int
2477 main ()
2478 {
2479 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2480   ;
2481   return 0;
2482 }
2483 _ACEOF
2484 # Don't try gcc -ansi; that turns off useful extensions and
2485 # breaks some systems' header files.
2486 # AIX                   -qlanglvl=ansi
2487 # Ultrix and OSF/1      -std1
2488 # HP-UX 10.20 and later -Ae
2489 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2490 # SVR4                  -Xc -D__EXTENSIONS__
2491 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2492 do
2493   CC="$ac_save_CC $ac_arg"
2494   rm -f conftest.$ac_objext
2495 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2496   (eval $ac_compile) 2>conftest.er1
2497   ac_status=$?
2498   grep -v '^ *+' conftest.er1 >conftest.err
2499   rm -f conftest.er1
2500   cat conftest.err >&5
2501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2502   (exit $ac_status); } &&
2503          { ac_try='test -z "$ac_c_werror_flag"
2504                          || test ! -s conftest.err'
2505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2506   (eval $ac_try) 2>&5
2507   ac_status=$?
2508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509   (exit $ac_status); }; } &&
2510          { ac_try='test -s conftest.$ac_objext'
2511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2512   (eval $ac_try) 2>&5
2513   ac_status=$?
2514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515   (exit $ac_status); }; }; then
2516   ac_cv_prog_cc_stdc=$ac_arg
2517 break
2518 else
2519   echo "$as_me: failed program was:" >&5
2520 sed 's/^/| /' conftest.$ac_ext >&5
2521
2522 fi
2523 rm -f conftest.err conftest.$ac_objext
2524 done
2525 rm -f conftest.$ac_ext conftest.$ac_objext
2526 CC=$ac_save_CC
2527
2528 fi
2529
2530 case "x$ac_cv_prog_cc_stdc" in
2531   x|xno)
2532     echo "$as_me:$LINENO: result: none needed" >&5
2533 echo "${ECHO_T}none needed" >&6 ;;
2534   *)
2535     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2536 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2537     CC="$CC $ac_cv_prog_cc_stdc" ;;
2538 esac
2539
2540 # Some people use a C++ compiler to compile C.  Since we use `exit',
2541 # in C++ we need to declare it.  In case someone uses the same compiler
2542 # for both compiling C and C++ we need to have the C++ compiler decide
2543 # the declaration of exit, since it's the most demanding environment.
2544 cat >conftest.$ac_ext <<_ACEOF
2545 #ifndef __cplusplus
2546   choke me
2547 #endif
2548 _ACEOF
2549 rm -f conftest.$ac_objext
2550 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2551   (eval $ac_compile) 2>conftest.er1
2552   ac_status=$?
2553   grep -v '^ *+' conftest.er1 >conftest.err
2554   rm -f conftest.er1
2555   cat conftest.err >&5
2556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2557   (exit $ac_status); } &&
2558          { ac_try='test -z "$ac_c_werror_flag"
2559                          || test ! -s conftest.err'
2560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2561   (eval $ac_try) 2>&5
2562   ac_status=$?
2563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2564   (exit $ac_status); }; } &&
2565          { ac_try='test -s conftest.$ac_objext'
2566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2567   (eval $ac_try) 2>&5
2568   ac_status=$?
2569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570   (exit $ac_status); }; }; then
2571   for ac_declaration in \
2572    '' \
2573    'extern "C" void std::exit (int) throw (); using std::exit;' \
2574    'extern "C" void std::exit (int); using std::exit;' \
2575    'extern "C" void exit (int) throw ();' \
2576    'extern "C" void exit (int);' \
2577    'void exit (int);'
2578 do
2579   cat >conftest.$ac_ext <<_ACEOF
2580 /* confdefs.h.  */
2581 _ACEOF
2582 cat confdefs.h >>conftest.$ac_ext
2583 cat >>conftest.$ac_ext <<_ACEOF
2584 /* end confdefs.h.  */
2585 $ac_declaration
2586 #include <stdlib.h>
2587 int
2588 main ()
2589 {
2590 exit (42);
2591   ;
2592   return 0;
2593 }
2594 _ACEOF
2595 rm -f conftest.$ac_objext
2596 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2597   (eval $ac_compile) 2>conftest.er1
2598   ac_status=$?
2599   grep -v '^ *+' conftest.er1 >conftest.err
2600   rm -f conftest.er1
2601   cat conftest.err >&5
2602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2603   (exit $ac_status); } &&
2604          { ac_try='test -z "$ac_c_werror_flag"
2605                          || test ! -s conftest.err'
2606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2607   (eval $ac_try) 2>&5
2608   ac_status=$?
2609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2610   (exit $ac_status); }; } &&
2611          { ac_try='test -s conftest.$ac_objext'
2612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2613   (eval $ac_try) 2>&5
2614   ac_status=$?
2615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2616   (exit $ac_status); }; }; then
2617   :
2618 else
2619   echo "$as_me: failed program was:" >&5
2620 sed 's/^/| /' conftest.$ac_ext >&5
2621
2622 continue
2623 fi
2624 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2625   cat >conftest.$ac_ext <<_ACEOF
2626 /* confdefs.h.  */
2627 _ACEOF
2628 cat confdefs.h >>conftest.$ac_ext
2629 cat >>conftest.$ac_ext <<_ACEOF
2630 /* end confdefs.h.  */
2631 $ac_declaration
2632 int
2633 main ()
2634 {
2635 exit (42);
2636   ;
2637   return 0;
2638 }
2639 _ACEOF
2640 rm -f conftest.$ac_objext
2641 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2642   (eval $ac_compile) 2>conftest.er1
2643   ac_status=$?
2644   grep -v '^ *+' conftest.er1 >conftest.err
2645   rm -f conftest.er1
2646   cat conftest.err >&5
2647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2648   (exit $ac_status); } &&
2649          { ac_try='test -z "$ac_c_werror_flag"
2650                          || test ! -s conftest.err'
2651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2652   (eval $ac_try) 2>&5
2653   ac_status=$?
2654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655   (exit $ac_status); }; } &&
2656          { ac_try='test -s conftest.$ac_objext'
2657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2658   (eval $ac_try) 2>&5
2659   ac_status=$?
2660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661   (exit $ac_status); }; }; then
2662   break
2663 else
2664   echo "$as_me: failed program was:" >&5
2665 sed 's/^/| /' conftest.$ac_ext >&5
2666
2667 fi
2668 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2669 done
2670 rm -f conftest*
2671 if test -n "$ac_declaration"; then
2672   echo '#ifdef __cplusplus' >>confdefs.h
2673   echo $ac_declaration      >>confdefs.h
2674   echo '#endif'             >>confdefs.h
2675 fi
2676
2677 else
2678   echo "$as_me: failed program was:" >&5
2679 sed 's/^/| /' conftest.$ac_ext >&5
2680
2681 fi
2682 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2683 ac_ext=c
2684 ac_cpp='$CPP $CPPFLAGS'
2685 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2688
2689
2690 unset CFLAGS
2691
2692 #
2693 # Read the template
2694 #
2695 . "$srcdir/src/template/$template" || exit
2696
2697 # CFLAGS are selected so:
2698 # If the user specifies something in the environment, that is used.
2699 # else:  If the template file set something, that is used.
2700 # else:  If the compiler is GCC, then we use -O2.
2701 # else:  If the compiler is something else, then we use -0.
2702
2703 if test "$ac_env_CFLAGS_set" = set; then
2704   CFLAGS=$ac_env_CFLAGS_value
2705 elif test "${CFLAGS+set}" = set; then
2706   : # (keep what template set)
2707 elif test "$GCC" = yes; then
2708   CFLAGS="-O2"
2709 else
2710   # if the user selected debug mode, don't use -O
2711   if test "$enable_debug" != yes; then
2712     CFLAGS="-O"
2713   fi
2714 fi
2715
2716 if test "$GCC" = yes; then
2717   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
2718
2719   # Some versions of GCC support some additional useful warning flags.
2720   # Check whether they are supported, and add them to CFLAGS if so.
2721   echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2722 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2723 pgac_save_CFLAGS=$CFLAGS
2724 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2725 cat >conftest.$ac_ext <<_ACEOF
2726 /* confdefs.h.  */
2727 _ACEOF
2728 cat confdefs.h >>conftest.$ac_ext
2729 cat >>conftest.$ac_ext <<_ACEOF
2730 /* end confdefs.h.  */
2731
2732 int
2733 main ()
2734 {
2735
2736   ;
2737   return 0;
2738 }
2739 _ACEOF
2740 rm -f conftest.$ac_objext
2741 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2742   (eval $ac_compile) 2>conftest.er1
2743   ac_status=$?
2744   grep -v '^ *+' conftest.er1 >conftest.err
2745   rm -f conftest.er1
2746   cat conftest.err >&5
2747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2748   (exit $ac_status); } &&
2749          { ac_try='test -z "$ac_c_werror_flag"
2750                          || test ! -s conftest.err'
2751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2752   (eval $ac_try) 2>&5
2753   ac_status=$?
2754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2755   (exit $ac_status); }; } &&
2756          { ac_try='test -s conftest.$ac_objext'
2757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2758   (eval $ac_try) 2>&5
2759   ac_status=$?
2760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2761   (exit $ac_status); }; }; then
2762   echo "$as_me:$LINENO: result: yes" >&5
2763 echo "${ECHO_T}yes" >&6
2764 else
2765   echo "$as_me: failed program was:" >&5
2766 sed 's/^/| /' conftest.$ac_ext >&5
2767
2768 CFLAGS="$pgac_save_CFLAGS"
2769                     echo "$as_me:$LINENO: result: no" >&5
2770 echo "${ECHO_T}no" >&6
2771 fi
2772 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2773
2774   echo "$as_me:$LINENO: checking if $CC supports -Wold-style-definition" >&5
2775 echo $ECHO_N "checking if $CC supports -Wold-style-definition... $ECHO_C" >&6
2776 pgac_save_CFLAGS=$CFLAGS
2777 CFLAGS="$pgac_save_CFLAGS -Wold-style-definition"
2778 cat >conftest.$ac_ext <<_ACEOF
2779 /* confdefs.h.  */
2780 _ACEOF
2781 cat confdefs.h >>conftest.$ac_ext
2782 cat >>conftest.$ac_ext <<_ACEOF
2783 /* end confdefs.h.  */
2784
2785 int
2786 main ()
2787 {
2788
2789   ;
2790   return 0;
2791 }
2792 _ACEOF
2793 rm -f conftest.$ac_objext
2794 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2795   (eval $ac_compile) 2>conftest.er1
2796   ac_status=$?
2797   grep -v '^ *+' conftest.er1 >conftest.err
2798   rm -f conftest.er1
2799   cat conftest.err >&5
2800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2801   (exit $ac_status); } &&
2802          { ac_try='test -z "$ac_c_werror_flag"
2803                          || test ! -s conftest.err'
2804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2805   (eval $ac_try) 2>&5
2806   ac_status=$?
2807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2808   (exit $ac_status); }; } &&
2809          { ac_try='test -s conftest.$ac_objext'
2810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2811   (eval $ac_try) 2>&5
2812   ac_status=$?
2813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2814   (exit $ac_status); }; }; then
2815   echo "$as_me:$LINENO: result: yes" >&5
2816 echo "${ECHO_T}yes" >&6
2817 else
2818   echo "$as_me: failed program was:" >&5
2819 sed 's/^/| /' conftest.$ac_ext >&5
2820
2821 CFLAGS="$pgac_save_CFLAGS"
2822                     echo "$as_me:$LINENO: result: no" >&5
2823 echo "${ECHO_T}no" >&6
2824 fi
2825 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2826
2827   echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2828 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2829 pgac_save_CFLAGS=$CFLAGS
2830 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2831 cat >conftest.$ac_ext <<_ACEOF
2832 /* confdefs.h.  */
2833 _ACEOF
2834 cat confdefs.h >>conftest.$ac_ext
2835 cat >>conftest.$ac_ext <<_ACEOF
2836 /* end confdefs.h.  */
2837
2838 int
2839 main ()
2840 {
2841
2842   ;
2843   return 0;
2844 }
2845 _ACEOF
2846 rm -f conftest.$ac_objext
2847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2848   (eval $ac_compile) 2>conftest.er1
2849   ac_status=$?
2850   grep -v '^ *+' conftest.er1 >conftest.err
2851   rm -f conftest.er1
2852   cat conftest.err >&5
2853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2854   (exit $ac_status); } &&
2855          { ac_try='test -z "$ac_c_werror_flag"
2856                          || test ! -s conftest.err'
2857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2858   (eval $ac_try) 2>&5
2859   ac_status=$?
2860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2861   (exit $ac_status); }; } &&
2862          { ac_try='test -s conftest.$ac_objext'
2863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2864   (eval $ac_try) 2>&5
2865   ac_status=$?
2866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2867   (exit $ac_status); }; }; then
2868   echo "$as_me:$LINENO: result: yes" >&5
2869 echo "${ECHO_T}yes" >&6
2870 else
2871   echo "$as_me: failed program was:" >&5
2872 sed 's/^/| /' conftest.$ac_ext >&5
2873
2874 CFLAGS="$pgac_save_CFLAGS"
2875                     echo "$as_me:$LINENO: result: no" >&5
2876 echo "${ECHO_T}no" >&6
2877 fi
2878 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2879
2880
2881   # Disable strict-aliasing rules; needed for gcc 3.3+
2882   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
2883 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
2884 pgac_save_CFLAGS=$CFLAGS
2885 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
2886 cat >conftest.$ac_ext <<_ACEOF
2887 /* confdefs.h.  */
2888 _ACEOF
2889 cat confdefs.h >>conftest.$ac_ext
2890 cat >>conftest.$ac_ext <<_ACEOF
2891 /* end confdefs.h.  */
2892
2893 int
2894 main ()
2895 {
2896
2897   ;
2898   return 0;
2899 }
2900 _ACEOF
2901 rm -f conftest.$ac_objext
2902 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2903   (eval $ac_compile) 2>conftest.er1
2904   ac_status=$?
2905   grep -v '^ *+' conftest.er1 >conftest.err
2906   rm -f conftest.er1
2907   cat conftest.err >&5
2908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2909   (exit $ac_status); } &&
2910          { ac_try='test -z "$ac_c_werror_flag"
2911                          || test ! -s conftest.err'
2912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2913   (eval $ac_try) 2>&5
2914   ac_status=$?
2915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2916   (exit $ac_status); }; } &&
2917          { ac_try='test -s conftest.$ac_objext'
2918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2919   (eval $ac_try) 2>&5
2920   ac_status=$?
2921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2922   (exit $ac_status); }; }; then
2923   echo "$as_me:$LINENO: result: yes" >&5
2924 echo "${ECHO_T}yes" >&6
2925 else
2926   echo "$as_me: failed program was:" >&5
2927 sed 's/^/| /' conftest.$ac_ext >&5
2928
2929 CFLAGS="$pgac_save_CFLAGS"
2930                     echo "$as_me:$LINENO: result: no" >&5
2931 echo "${ECHO_T}no" >&6
2932 fi
2933 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2934
2935 fi
2936
2937 # supply -g if --enable-debug
2938 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2939   CFLAGS="$CFLAGS -g"
2940 fi
2941
2942 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2943 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2944
2945 # We already have this in Makefile.win32, but configure needs it too
2946 if test "$PORTNAME" = "win32"; then
2947   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
2948 fi
2949
2950 # Check if the compiler still works with the template settings
2951 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2952 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2953
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 return 0;
2965   ;
2966   return 0;
2967 }
2968 _ACEOF
2969 rm -f conftest.$ac_objext conftest$ac_exeext
2970 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2971   (eval $ac_link) 2>conftest.er1
2972   ac_status=$?
2973   grep -v '^ *+' conftest.er1 >conftest.err
2974   rm -f conftest.er1
2975   cat conftest.err >&5
2976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2977   (exit $ac_status); } &&
2978          { ac_try='test -z "$ac_c_werror_flag"
2979                          || test ! -s conftest.err'
2980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2981   (eval $ac_try) 2>&5
2982   ac_status=$?
2983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2984   (exit $ac_status); }; } &&
2985          { ac_try='test -s conftest$ac_exeext'
2986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2987   (eval $ac_try) 2>&5
2988   ac_status=$?
2989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990   (exit $ac_status); }; }; then
2991   echo "$as_me:$LINENO: result: yes" >&5
2992 echo "${ECHO_T}yes" >&6
2993 else
2994   echo "$as_me: failed program was:" >&5
2995 sed 's/^/| /' conftest.$ac_ext >&5
2996
2997 echo "$as_me:$LINENO: result: no" >&5
2998 echo "${ECHO_T}no" >&6
2999    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3000 echo "$as_me: error: cannot proceed" >&2;}
3001    { (exit 1); exit 1; }; }
3002 fi
3003 rm -f conftest.err conftest.$ac_objext \
3004       conftest$ac_exeext conftest.$ac_ext
3005
3006 # Defend against gcc -ffast-math
3007 if test "$GCC" = yes; then
3008 cat >conftest.$ac_ext <<_ACEOF
3009 /* confdefs.h.  */
3010 _ACEOF
3011 cat confdefs.h >>conftest.$ac_ext
3012 cat >>conftest.$ac_ext <<_ACEOF
3013 /* end confdefs.h.  */
3014
3015 int
3016 main ()
3017 {
3018 #ifdef __FAST_MATH__
3019 choke me
3020 #endif
3021   ;
3022   return 0;
3023 }
3024 _ACEOF
3025 rm -f conftest.$ac_objext
3026 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3027   (eval $ac_compile) 2>conftest.er1
3028   ac_status=$?
3029   grep -v '^ *+' conftest.er1 >conftest.err
3030   rm -f conftest.er1
3031   cat conftest.err >&5
3032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3033   (exit $ac_status); } &&
3034          { ac_try='test -z "$ac_c_werror_flag"
3035                          || test ! -s conftest.err'
3036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3037   (eval $ac_try) 2>&5
3038   ac_status=$?
3039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3040   (exit $ac_status); }; } &&
3041          { ac_try='test -s conftest.$ac_objext'
3042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3043   (eval $ac_try) 2>&5
3044   ac_status=$?
3045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3046   (exit $ac_status); }; }; then
3047   :
3048 else
3049   echo "$as_me: failed program was:" >&5
3050 sed 's/^/| /' conftest.$ac_ext >&5
3051
3052 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3053 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3054    { (exit 1); exit 1; }; }
3055 fi
3056 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3057 fi
3058
3059 ac_ext=c
3060 ac_cpp='$CPP $CPPFLAGS'
3061 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3062 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3063 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3064 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3065 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3066 # On Suns, sometimes $CPP names a directory.
3067 if test -n "$CPP" && test -d "$CPP"; then
3068   CPP=
3069 fi
3070 if test -z "$CPP"; then
3071   if test "${ac_cv_prog_CPP+set}" = set; then
3072   echo $ECHO_N "(cached) $ECHO_C" >&6
3073 else
3074       # Double quotes because CPP needs to be expanded
3075     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3076     do
3077       ac_preproc_ok=false
3078 for ac_c_preproc_warn_flag in '' yes
3079 do
3080   # Use a header file that comes with gcc, so configuring glibc
3081   # with a fresh cross-compiler works.
3082   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3083   # <limits.h> exists even on freestanding compilers.
3084   # On the NeXT, cc -E runs the code through the compiler's parser,
3085   # not just through cpp. "Syntax error" is here to catch this case.
3086   cat >conftest.$ac_ext <<_ACEOF
3087 /* confdefs.h.  */
3088 _ACEOF
3089 cat confdefs.h >>conftest.$ac_ext
3090 cat >>conftest.$ac_ext <<_ACEOF
3091 /* end confdefs.h.  */
3092 #ifdef __STDC__
3093 # include <limits.h>
3094 #else
3095 # include <assert.h>
3096 #endif
3097                      Syntax error
3098 _ACEOF
3099 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3100   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3101   ac_status=$?
3102   grep -v '^ *+' conftest.er1 >conftest.err
3103   rm -f conftest.er1
3104   cat conftest.err >&5
3105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3106   (exit $ac_status); } >/dev/null; then
3107   if test -s conftest.err; then
3108     ac_cpp_err=$ac_c_preproc_warn_flag
3109     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3110   else
3111     ac_cpp_err=
3112   fi
3113 else
3114   ac_cpp_err=yes
3115 fi
3116 if test -z "$ac_cpp_err"; then
3117   :
3118 else
3119   echo "$as_me: failed program was:" >&5
3120 sed 's/^/| /' conftest.$ac_ext >&5
3121
3122   # Broken: fails on valid input.
3123 continue
3124 fi
3125 rm -f conftest.err conftest.$ac_ext
3126
3127   # OK, works on sane cases.  Now check whether non-existent headers
3128   # can be detected and how.
3129   cat >conftest.$ac_ext <<_ACEOF
3130 /* confdefs.h.  */
3131 _ACEOF
3132 cat confdefs.h >>conftest.$ac_ext
3133 cat >>conftest.$ac_ext <<_ACEOF
3134 /* end confdefs.h.  */
3135 #include <ac_nonexistent.h>
3136 _ACEOF
3137 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3138   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3139   ac_status=$?
3140   grep -v '^ *+' conftest.er1 >conftest.err
3141   rm -f conftest.er1
3142   cat conftest.err >&5
3143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3144   (exit $ac_status); } >/dev/null; then
3145   if test -s conftest.err; then
3146     ac_cpp_err=$ac_c_preproc_warn_flag
3147     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3148   else
3149     ac_cpp_err=
3150   fi
3151 else
3152   ac_cpp_err=yes
3153 fi
3154 if test -z "$ac_cpp_err"; then
3155   # Broken: success on invalid input.
3156 continue
3157 else
3158   echo "$as_me: failed program was:" >&5
3159 sed 's/^/| /' conftest.$ac_ext >&5
3160
3161   # Passes both tests.
3162 ac_preproc_ok=:
3163 break
3164 fi
3165 rm -f conftest.err conftest.$ac_ext
3166
3167 done
3168 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3169 rm -f conftest.err conftest.$ac_ext
3170 if $ac_preproc_ok; then
3171   break
3172 fi
3173
3174     done
3175     ac_cv_prog_CPP=$CPP
3176
3177 fi
3178   CPP=$ac_cv_prog_CPP
3179 else
3180   ac_cv_prog_CPP=$CPP
3181 fi
3182 echo "$as_me:$LINENO: result: $CPP" >&5
3183 echo "${ECHO_T}$CPP" >&6
3184 ac_preproc_ok=false
3185 for ac_c_preproc_warn_flag in '' yes
3186 do
3187   # Use a header file that comes with gcc, so configuring glibc
3188   # with a fresh cross-compiler works.
3189   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3190   # <limits.h> exists even on freestanding compilers.
3191   # On the NeXT, cc -E runs the code through the compiler's parser,
3192   # not just through cpp. "Syntax error" is here to catch this case.
3193   cat >conftest.$ac_ext <<_ACEOF
3194 /* confdefs.h.  */
3195 _ACEOF
3196 cat confdefs.h >>conftest.$ac_ext
3197 cat >>conftest.$ac_ext <<_ACEOF
3198 /* end confdefs.h.  */
3199 #ifdef __STDC__
3200 # include <limits.h>
3201 #else
3202 # include <assert.h>
3203 #endif
3204                      Syntax error
3205 _ACEOF
3206 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3207   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3208   ac_status=$?
3209   grep -v '^ *+' conftest.er1 >conftest.err
3210   rm -f conftest.er1
3211   cat conftest.err >&5
3212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3213   (exit $ac_status); } >/dev/null; then
3214   if test -s conftest.err; then
3215     ac_cpp_err=$ac_c_preproc_warn_flag
3216     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3217   else
3218     ac_cpp_err=
3219   fi
3220 else
3221   ac_cpp_err=yes
3222 fi
3223 if test -z "$ac_cpp_err"; then
3224   :
3225 else
3226   echo "$as_me: failed program was:" >&5
3227 sed 's/^/| /' conftest.$ac_ext >&5
3228
3229   # Broken: fails on valid input.
3230 continue
3231 fi
3232 rm -f conftest.err conftest.$ac_ext
3233
3234   # OK, works on sane cases.  Now check whether non-existent headers
3235   # can be detected and how.
3236   cat >conftest.$ac_ext <<_ACEOF
3237 /* confdefs.h.  */
3238 _ACEOF
3239 cat confdefs.h >>conftest.$ac_ext
3240 cat >>conftest.$ac_ext <<_ACEOF
3241 /* end confdefs.h.  */
3242 #include <ac_nonexistent.h>
3243 _ACEOF
3244 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3245   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3246   ac_status=$?
3247   grep -v '^ *+' conftest.er1 >conftest.err
3248   rm -f conftest.er1
3249   cat conftest.err >&5
3250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3251   (exit $ac_status); } >/dev/null; then
3252   if test -s conftest.err; then
3253     ac_cpp_err=$ac_c_preproc_warn_flag
3254     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3255   else
3256     ac_cpp_err=
3257   fi
3258 else
3259   ac_cpp_err=yes
3260 fi
3261 if test -z "$ac_cpp_err"; then
3262   # Broken: success on invalid input.
3263 continue
3264 else
3265   echo "$as_me: failed program was:" >&5
3266 sed 's/^/| /' conftest.$ac_ext >&5
3267
3268   # Passes both tests.
3269 ac_preproc_ok=:
3270 break
3271 fi
3272 rm -f conftest.err conftest.$ac_ext
3273
3274 done
3275 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3276 rm -f conftest.err conftest.$ac_ext
3277 if $ac_preproc_ok; then
3278   :
3279 else
3280   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3281 See \`config.log' for more details." >&5
3282 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3283 See \`config.log' for more details." >&2;}
3284    { (exit 1); exit 1; }; }
3285 fi
3286
3287 ac_ext=c
3288 ac_cpp='$CPP $CPPFLAGS'
3289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3292
3293
3294
3295 # Create compiler version string
3296 if test x"$GCC" = x"yes" ; then
3297   cc_string="GCC `${CC} --version | sed q`"
3298 else
3299   cc_string=$CC
3300 fi
3301
3302 cat >>confdefs.h <<_ACEOF
3303 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3304 _ACEOF
3305
3306
3307
3308 #
3309 # Set up TAS assembly code if needed; the template file has now had its
3310 # chance to request this.
3311 #
3312           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3313
3314
3315 if test "$need_tas" = yes ; then
3316   TAS=tas.o
3317 else
3318   TAS=""
3319 fi
3320
3321
3322
3323 #
3324 # Automatic dependency tracking
3325 #
3326
3327
3328 # Check whether --enable-depend or --disable-depend was given.
3329 if test "${enable_depend+set}" = set; then
3330   enableval="$enable_depend"
3331
3332   case $enableval in
3333     yes)
3334       autodepend=yes
3335       ;;
3336     no)
3337       :
3338       ;;
3339     *)
3340       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3341 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3342    { (exit 1); exit 1; }; }
3343       ;;
3344   esac
3345
3346 else
3347   enable_depend=no
3348
3349 fi;
3350
3351
3352
3353
3354 #
3355 # Enable assert checks
3356 #
3357
3358
3359 # Check whether --enable-cassert or --disable-cassert was given.
3360 if test "${enable_cassert+set}" = set; then
3361   enableval="$enable_cassert"
3362
3363   case $enableval in
3364     yes)
3365
3366 cat >>confdefs.h <<\_ACEOF
3367 #define USE_ASSERT_CHECKING 1
3368 _ACEOF
3369
3370       ;;
3371     no)
3372       :
3373       ;;
3374     *)
3375       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3376 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3377    { (exit 1); exit 1; }; }
3378       ;;
3379   esac
3380
3381 else
3382   enable_cassert=no
3383
3384 fi;
3385
3386
3387
3388 #
3389 # Include directories
3390 #
3391 ac_save_IFS=$IFS
3392 IFS="${IFS}${PATH_SEPARATOR}"
3393 # SRCH_INC comes from the template file
3394 for dir in $with_includes $SRCH_INC; do
3395   if test -d "$dir"; then
3396     INCLUDES="$INCLUDES -I$dir"
3397   else
3398     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3399 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3400   fi
3401 done
3402 IFS=$ac_save_IFS
3403
3404
3405
3406 #
3407 # Library directories
3408 #
3409 ac_save_IFS=$IFS
3410 IFS="${IFS}${PATH_SEPARATOR}"
3411 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3412 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3413   if test -d "$dir"; then
3414     LIBDIRS="$LIBDIRS -L$dir"
3415   else
3416     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3417 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3418   fi
3419 done
3420 IFS=$ac_save_IFS
3421
3422 #
3423 # Enable thread-safe client libraries
3424 #
3425 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3426 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3427
3428
3429 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3430 if test "${enable_thread_safety+set}" = set; then
3431   enableval="$enable_thread_safety"
3432
3433   case $enableval in
3434     yes)
3435       :
3436       ;;
3437     no)
3438       :
3439       ;;
3440     *)
3441       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3442 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3443    { (exit 1); exit 1; }; }
3444       ;;
3445   esac
3446
3447 else
3448   enable_thread_safety=no
3449
3450 fi;
3451
3452
3453
3454 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3455 if test "${enable_thread_safety_force+set}" = set; then
3456   enableval="$enable_thread_safety_force"
3457
3458   case $enableval in
3459     yes)
3460       :
3461       ;;
3462     no)
3463       :
3464       ;;
3465     *)
3466       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3467 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3468    { (exit 1); exit 1; }; }
3469       ;;
3470   esac
3471
3472 else
3473   enable_thread_safety_force=no
3474
3475 fi;
3476
3477 if test "$enable_thread_safety" = yes -o \
3478         "$enable_thread_safety_force" = yes; then
3479   enable_thread_safety="yes"    # for 'force'
3480
3481 cat >>confdefs.h <<\_ACEOF
3482 #define ENABLE_THREAD_SAFETY 1
3483 _ACEOF
3484
3485 fi
3486 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3487 echo "${ECHO_T}$enable_thread_safety" >&6
3488
3489
3490 #
3491 # Optionally build Tcl modules (PL/Tcl)
3492 #
3493 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3494 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3495
3496
3497
3498 # Check whether --with-tcl or --without-tcl was given.
3499 if test "${with_tcl+set}" = set; then
3500   withval="$with_tcl"
3501
3502   case $withval in
3503     yes)
3504       :
3505       ;;
3506     no)
3507       :
3508       ;;
3509     *)
3510       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3511 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3512    { (exit 1); exit 1; }; }
3513       ;;
3514   esac
3515
3516 else
3517   with_tcl=no
3518
3519 fi;
3520
3521 echo "$as_me:$LINENO: result: $with_tcl" >&5
3522 echo "${ECHO_T}$with_tcl" >&6
3523
3524
3525 # We see if the path to the Tcl/Tk configuration scripts is specified.
3526 # This will override the use of tclsh to find the paths to search.
3527
3528
3529
3530
3531 # Check whether --with-tclconfig or --without-tclconfig was given.
3532 if test "${with_tclconfig+set}" = set; then
3533   withval="$with_tclconfig"
3534
3535   case $withval in
3536     yes)
3537       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3538 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3539    { (exit 1); exit 1; }; }
3540       ;;
3541     no)
3542       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3543 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3544    { (exit 1); exit 1; }; }
3545       ;;
3546     *)
3547
3548       ;;
3549   esac
3550
3551 fi;
3552
3553
3554 #
3555 # Optionally build Perl modules (PL/Perl)
3556 #
3557 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3558 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3559
3560
3561
3562 # Check whether --with-perl or --without-perl was given.
3563 if test "${with_perl+set}" = set; then
3564   withval="$with_perl"
3565
3566   case $withval in
3567     yes)
3568       :
3569       ;;
3570     no)
3571       :
3572       ;;
3573     *)
3574       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3575 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3576    { (exit 1); exit 1; }; }
3577       ;;
3578   esac
3579
3580 else
3581   with_perl=no
3582
3583 fi;
3584
3585 echo "$as_me:$LINENO: result: $with_perl" >&5
3586 echo "${ECHO_T}$with_perl" >&6
3587
3588
3589 #
3590 # Optionally build Python modules (PL/Python)
3591 #
3592 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3593 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3594
3595
3596
3597 # Check whether --with-python or --without-python was given.
3598 if test "${with_python+set}" = set; then
3599   withval="$with_python"
3600
3601   case $withval in
3602     yes)
3603       :
3604       ;;
3605     no)
3606       :
3607       ;;
3608     *)
3609       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3610 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3611    { (exit 1); exit 1; }; }
3612       ;;
3613   esac
3614
3615 else
3616   with_python=no
3617
3618 fi;
3619
3620 echo "$as_me:$LINENO: result: $with_python" >&5
3621 echo "${ECHO_T}$with_python" >&6
3622
3623
3624 #
3625 # Kerberos 5
3626 #
3627 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3628 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3629
3630
3631
3632 # Check whether --with-krb5 or --without-krb5 was given.
3633 if test "${with_krb5+set}" = set; then
3634   withval="$with_krb5"
3635
3636   case $withval in
3637     yes)
3638
3639
3640 cat >>confdefs.h <<\_ACEOF
3641 #define KRB5 1
3642 _ACEOF
3643
3644   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3645
3646       ;;
3647     no)
3648       :
3649       ;;
3650     *)
3651       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3652 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3653    { (exit 1); exit 1; }; }
3654       ;;
3655   esac
3656
3657 else
3658   with_krb5=no
3659
3660 fi;
3661
3662 echo "$as_me:$LINENO: result: $with_krb5" >&5
3663 echo "${ECHO_T}$with_krb5" >&6
3664
3665
3666
3667
3668
3669
3670 #
3671 # Kerberos configuration parameters
3672 #
3673
3674
3675
3676 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3677 if test "${with_krb_srvnam+set}" = set; then
3678   withval="$with_krb_srvnam"
3679
3680   case $withval in
3681     yes)
3682       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3683 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3684    { (exit 1); exit 1; }; }
3685       ;;
3686     no)
3687       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3688 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3689    { (exit 1); exit 1; }; }
3690       ;;
3691     *)
3692
3693       ;;
3694   esac
3695
3696 else
3697   with_krb_srvnam="postgres"
3698 fi;
3699
3700
3701 cat >>confdefs.h <<_ACEOF
3702 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3703 _ACEOF
3704
3705
3706
3707 #
3708 # PAM
3709 #
3710 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3711 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3712
3713
3714
3715 # Check whether --with-pam or --without-pam was given.
3716 if test "${with_pam+set}" = set; then
3717   withval="$with_pam"
3718
3719   case $withval in
3720     yes)
3721
3722 cat >>confdefs.h <<\_ACEOF
3723 #define USE_PAM 1
3724 _ACEOF
3725
3726       ;;
3727     no)
3728       :
3729       ;;
3730     *)
3731       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3732 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3733    { (exit 1); exit 1; }; }
3734       ;;
3735   esac
3736
3737 else
3738   with_pam=no
3739
3740 fi;
3741
3742 echo "$as_me:$LINENO: result: $with_pam" >&5
3743 echo "${ECHO_T}$with_pam" >&6
3744
3745
3746
3747 #
3748 # Bonjour
3749 #
3750 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
3751 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
3752
3753
3754
3755 # Check whether --with-bonjour or --without-bonjour was given.
3756 if test "${with_bonjour+set}" = set; then
3757   withval="$with_bonjour"
3758
3759   case $withval in
3760     yes)
3761
3762 cat >>confdefs.h <<\_ACEOF
3763 #define USE_BONJOUR 1
3764 _ACEOF
3765
3766       ;;
3767     no)
3768       :
3769       ;;
3770     *)
3771       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
3772 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
3773    { (exit 1); exit 1; }; }
3774       ;;
3775   esac
3776
3777 else
3778   with_bonjour=no
3779
3780 fi;
3781
3782 echo "$as_me:$LINENO: result: $with_bonjour" >&5
3783 echo "${ECHO_T}$with_bonjour" >&6
3784
3785
3786
3787 #
3788 # OpenSSL
3789 #
3790 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3791 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
3792
3793
3794
3795 # Check whether --with-openssl or --without-openssl was given.
3796 if test "${with_openssl+set}" = set; then
3797   withval="$with_openssl"
3798
3799   case $withval in
3800     yes)
3801
3802 cat >>confdefs.h <<\_ACEOF
3803 #define USE_SSL 1
3804 _ACEOF
3805
3806       ;;
3807     no)
3808       :
3809       ;;
3810     *)
3811       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3812 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3813    { (exit 1); exit 1; }; }
3814       ;;
3815   esac
3816
3817 else
3818   with_openssl=no
3819
3820 fi;
3821
3822 echo "$as_me:$LINENO: result: $with_openssl" >&5
3823 echo "${ECHO_T}$with_openssl" >&6
3824
3825
3826
3827 #
3828 # Readline
3829 #
3830
3831
3832
3833 # Check whether --with-readline or --without-readline was given.
3834 if test "${with_readline+set}" = set; then
3835   withval="$with_readline"
3836
3837   case $withval in
3838     yes)
3839       :
3840       ;;
3841     no)
3842       :
3843       ;;
3844     *)
3845       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
3846 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
3847    { (exit 1); exit 1; }; }
3848       ;;
3849   esac
3850
3851 else
3852   with_readline=yes
3853
3854 fi;
3855
3856 # readline on MinGW has problems with backslashes in psql and other bugs.
3857 # This is particularly a problem with non-US code pages.
3858 # Therefore disable its use until we understand the cause. 2004-07-20
3859 if test "$PORTNAME" = "win32"; then
3860   if test "$with_readline" = yes; then
3861     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
3862 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
3863     with_readline=no
3864   fi
3865 fi
3866
3867
3868 #
3869 # Zlib
3870 #
3871
3872
3873
3874 # Check whether --with-zlib or --without-zlib was given.
3875 if test "${with_zlib+set}" = set; then
3876   withval="$with_zlib"
3877
3878   case $withval in
3879     yes)
3880       :
3881       ;;
3882     no)
3883       :
3884       ;;
3885     *)
3886       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
3887 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
3888    { (exit 1); exit 1; }; }
3889       ;;
3890   esac
3891
3892 else
3893   with_zlib=yes
3894
3895 fi;
3896
3897
3898
3899 #
3900 # Elf
3901 #
3902
3903 # Assume system is ELF if it predefines __ELF__ as 1,
3904 # otherwise believe host_os based default.
3905 case $host_os in
3906     freebsd1*|freebsd2*) elf=no;;
3907     freebsd3*|freebsd4*) elf=yes;;
3908 esac
3909
3910
3911 echo "$as_me:$LINENO: checking for egrep" >&5
3912 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3913 if test "${ac_cv_prog_egrep+set}" = set; then
3914   echo $ECHO_N "(cached) $ECHO_C" >&6
3915 else
3916   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3917     then ac_cv_prog_egrep='grep -E'
3918     else ac_cv_prog_egrep='egrep'
3919     fi
3920 fi
3921 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3922 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3923  EGREP=$ac_cv_prog_egrep
3924
3925
3926 cat >conftest.$ac_ext <<_ACEOF
3927 /* confdefs.h.  */
3928 _ACEOF
3929 cat confdefs.h >>conftest.$ac_ext
3930 cat >>conftest.$ac_ext <<_ACEOF
3931 /* end confdefs.h.  */
3932 #if __ELF__
3933   yes
3934 #endif
3935
3936 _ACEOF
3937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3938   $EGREP "yes" >/dev/null 2>&1; then
3939   ELF_SYS=true
3940 else
3941   if test "X$elf" = "Xyes" ; then
3942   ELF_SYS=true
3943 else
3944   ELF_SYS=
3945 fi
3946 fi
3947 rm -f conftest*
3948
3949
3950
3951 #
3952 # Assignments
3953 #
3954
3955 CPPFLAGS="$CPPFLAGS $INCLUDES"
3956 LDFLAGS="$LDFLAGS $LIBDIRS"
3957
3958 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
3959 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
3960 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
3961 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
3962
3963
3964
3965 for ac_prog in gawk mawk nawk awk
3966 do
3967   # Extract the first word of "$ac_prog", so it can be a program name with args.
3968 set dummy $ac_prog; ac_word=$2
3969 echo "$as_me:$LINENO: checking for $ac_word" >&5
3970 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3971 if test "${ac_cv_prog_AWK+set}" = set; then
3972   echo $ECHO_N "(cached) $ECHO_C" >&6
3973 else
3974   if test -n "$AWK"; then
3975   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3976 else
3977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3978 for as_dir in $PATH
3979 do
3980   IFS=$as_save_IFS
3981   test -z "$as_dir" && as_dir=.
3982   for ac_exec_ext in '' $ac_executable_extensions; do
3983   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3984     ac_cv_prog_AWK="$ac_prog"
3985     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3986     break 2
3987   fi
3988 done
3989 done
3990
3991 fi
3992 fi
3993 AWK=$ac_cv_prog_AWK
3994 if test -n "$AWK"; then
3995   echo "$as_me:$LINENO: result: $AWK" >&5
3996 echo "${ECHO_T}$AWK" >&6
3997 else
3998   echo "$as_me:$LINENO: result: no" >&5
3999 echo "${ECHO_T}no" >&6
4000 fi
4001
4002   test -n "$AWK" && break
4003 done
4004
4005 echo "$as_me:$LINENO: checking for flex" >&5
4006 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4007 if test "${pgac_cv_path_flex+set}" = set; then
4008   echo $ECHO_N "(cached) $ECHO_C" >&6
4009 else
4010   # Let the user override the test
4011 if test -n "$FLEX"; then
4012   pgac_cv_path_flex=$FLEX
4013 else
4014   pgac_save_IFS=$IFS
4015   IFS=$PATH_SEPARATOR
4016   for pgac_dir in $PATH; do
4017     IFS=$pgac_save_IFS
4018     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4019       pgac_dir=`pwd`
4020     fi
4021     for pgac_prog in flex lex; do
4022       pgac_candidate="$pgac_dir/$pgac_prog"
4023       if test -f "$pgac_candidate" \
4024         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4025       then
4026         echo '%%'  > conftest.l
4027         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4028           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4029             pgac_broken_flex=$pgac_candidate
4030             continue
4031           fi
4032
4033           pgac_cv_path_flex=$pgac_candidate
4034           break 2
4035         fi
4036       fi
4037     done
4038   done
4039   rm -f conftest.l lex.yy.c
4040   : ${pgac_cv_path_flex=no}
4041 fi
4042
4043 fi
4044 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4045 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4046 if test x"$pgac_cv_path_flex" = x"no"; then
4047   if test -n "$pgac_broken_flex"; then
4048     { echo "$as_me:$LINENO: WARNING:
4049 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4050 *** should get version 2.5.4 or later." >&5
4051 echo "$as_me: WARNING:
4052 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4053 *** should get version 2.5.4 or later." >&2;}
4054   fi
4055
4056   { echo "$as_me:$LINENO: WARNING:
4057 *** Without Flex you will not be able to build PostgreSQL from CVS or
4058 *** change any of the scanner definition files.  You can obtain Flex from
4059 *** a GNU mirror site.  (If you are using the official distribution of
4060 *** PostgreSQL then you do not need to worry about this because the Flex
4061 *** output is pre-generated.)" >&5
4062 echo "$as_me: WARNING:
4063 *** Without Flex you will not be able to build PostgreSQL from CVS or
4064 *** change any of the scanner definition files.  You can obtain Flex from
4065 *** a GNU mirror site.  (If you are using the official distribution of
4066 *** PostgreSQL then you do not need to worry about this because the Flex
4067 *** output is pre-generated.)" >&2;}
4068 fi
4069
4070 if test x"$pgac_cv_path_flex" = x"no"; then
4071   FLEX=
4072 else
4073   FLEX=$pgac_cv_path_flex
4074 fi
4075
4076
4077
4078
4079 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4080 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4081 LN_S=$as_ln_s
4082 if test "$LN_S" = "ln -s"; then
4083   echo "$as_me:$LINENO: result: yes" >&5
4084 echo "${ECHO_T}yes" >&6
4085 else
4086   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4087 echo "${ECHO_T}no, using $LN_S" >&6
4088 fi
4089
4090
4091 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4092 if test "${with_gnu_ld+set}" = set; then
4093   withval="$with_gnu_ld"
4094   test "$withval" = no || with_gnu_ld=yes
4095 else
4096   with_gnu_ld=no
4097 fi;
4098 ac_prog=ld
4099 if test "$GCC" = yes; then
4100   # Check if gcc -print-prog-name=ld gives a path.
4101   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4102 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4103   case $host in
4104   *-*-mingw*)
4105     # gcc leaves a trailing carriage return which upsets mingw
4106     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4107   *)
4108     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4109   esac
4110   case "$ac_prog" in
4111     # Accept absolute paths.
4112     [\\/]* | [A-Za-z]:[\\/]*)
4113       re_direlt='/[^/][^/]*/\.\./'
4114       # Canonicalize the path of ld
4115       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4116       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4117         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4118       done
4119       test -z "$LD" && LD="$ac_prog"
4120       ;;
4121   "")
4122     # If it fails, then pretend we aren't using GCC.
4123     ac_prog=ld
4124     ;;
4125   *)
4126     # If it is relative, then search for the first ld in PATH.
4127     with_gnu_ld=unknown
4128     ;;
4129   esac
4130 elif test "$with_gnu_ld" = yes; then
4131   echo "$as_me:$LINENO: checking for GNU ld" >&5
4132 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4133 else
4134   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4135 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4136 fi
4137 if test "${ac_cv_path_LD+set}" = set; then
4138   echo $ECHO_N "(cached) $ECHO_C" >&6
4139 else
4140   if test -z "$LD"; then
4141   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4142   for ac_dir in $PATH; do
4143     test -z "$ac_dir" && ac_dir=.
4144     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4145       ac_cv_path_LD="$ac_dir/$ac_prog"
4146       # Check to see if the program is GNU ld.  I'd rather use --version,
4147       # but apparently some GNU ld's only accept -v.
4148       # Break only if it was the GNU/non-GNU ld that we prefer.
4149       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4150         test "$with_gnu_ld" != no && break
4151       else
4152         test "$with_gnu_ld" != yes && break
4153       fi
4154     fi
4155   done
4156   IFS="$ac_save_ifs"
4157 else
4158   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4159 fi
4160 fi
4161
4162 LD="$ac_cv_path_LD"
4163 if test -n "$LD"; then
4164   echo "$as_me:$LINENO: result: $LD" >&5
4165 echo "${ECHO_T}$LD" >&6
4166 else
4167   echo "$as_me:$LINENO: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4169 fi
4170 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4171 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4172    { (exit 1); exit 1; }; }
4173 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4174 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4175 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4176   echo $ECHO_N "(cached) $ECHO_C" >&6
4177 else
4178   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4179 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4180   ac_cv_prog_gnu_ld=yes
4181 else
4182   ac_cv_prog_gnu_ld=no
4183 fi
4184 fi
4185 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4186 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4187 with_gnu_ld=$ac_cv_prog_gnu_ld
4188
4189
4190
4191
4192 case $host_os in sysv5*)
4193   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4194 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4195 if test "${pgac_cv_prog_ld_R+set}" = set; then
4196   echo $ECHO_N "(cached) $ECHO_C" >&6
4197 else
4198
4199     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4200     cat >conftest.$ac_ext <<_ACEOF
4201 /* confdefs.h.  */
4202 _ACEOF
4203 cat confdefs.h >>conftest.$ac_ext
4204 cat >>conftest.$ac_ext <<_ACEOF
4205 /* end confdefs.h.  */
4206
4207 int
4208 main ()
4209 {
4210
4211   ;
4212   return 0;
4213 }
4214 _ACEOF
4215 rm -f conftest.$ac_objext conftest$ac_exeext
4216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4217   (eval $ac_link) 2>conftest.er1
4218   ac_status=$?
4219   grep -v '^ *+' conftest.er1 >conftest.err
4220   rm -f conftest.er1
4221   cat conftest.err >&5
4222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4223   (exit $ac_status); } &&
4224          { ac_try='test -z "$ac_c_werror_flag"
4225                          || test ! -s conftest.err'
4226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4227   (eval $ac_try) 2>&5
4228   ac_status=$?
4229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4230   (exit $ac_status); }; } &&
4231          { ac_try='test -s conftest$ac_exeext'
4232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4233   (eval $ac_try) 2>&5
4234   ac_status=$?
4235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4236   (exit $ac_status); }; }; then
4237   pgac_cv_prog_ld_R=yes
4238 else
4239   echo "$as_me: failed program was:" >&5
4240 sed 's/^/| /' conftest.$ac_ext >&5
4241
4242 pgac_cv_prog_ld_R=no
4243 fi
4244 rm -f conftest.err conftest.$ac_objext \
4245       conftest$ac_exeext conftest.$ac_ext
4246     LDFLAGS=$pgac_save_LDFLAGS
4247
4248 fi
4249 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4250 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4251   ld_R_works=$pgac_cv_prog_ld_R
4252
4253 esac
4254 if test -n "$ac_tool_prefix"; then
4255   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4256 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4257 echo "$as_me:$LINENO: checking for $ac_word" >&5
4258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4259 if test "${ac_cv_prog_RANLIB+set}" = set; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   if test -n "$RANLIB"; then
4263   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4264 else
4265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4266 for as_dir in $PATH
4267 do
4268   IFS=$as_save_IFS
4269   test -z "$as_dir" && as_dir=.
4270   for ac_exec_ext in '' $ac_executable_extensions; do
4271   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4272     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4273     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4274     break 2
4275   fi
4276 done
4277 done
4278
4279 fi
4280 fi
4281 RANLIB=$ac_cv_prog_RANLIB
4282 if test -n "$RANLIB"; then
4283   echo "$as_me:$LINENO: result: $RANLIB" >&5
4284 echo "${ECHO_T}$RANLIB" >&6
4285 else
4286   echo "$as_me:$LINENO: result: no" >&5
4287 echo "${ECHO_T}no" >&6
4288 fi
4289
4290 fi
4291 if test -z "$ac_cv_prog_RANLIB"; then
4292   ac_ct_RANLIB=$RANLIB
4293   # Extract the first word of "ranlib", so it can be a program name with args.
4294 set dummy ranlib; ac_word=$2
4295 echo "$as_me:$LINENO: checking for $ac_word" >&5
4296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4297 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4298   echo $ECHO_N "(cached) $ECHO_C" >&6
4299 else
4300   if test -n "$ac_ct_RANLIB"; then
4301   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4302 else
4303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304 for as_dir in $PATH
4305 do
4306   IFS=$as_save_IFS
4307   test -z "$as_dir" && as_dir=.
4308   for ac_exec_ext in '' $ac_executable_extensions; do
4309   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4310     ac_cv_prog_ac_ct_RANLIB="ranlib"
4311     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4312     break 2
4313   fi
4314 done
4315 done
4316
4317   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4318 fi
4319 fi
4320 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4321 if test -n "$ac_ct_RANLIB"; then
4322   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4323 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4324 else
4325   echo "$as_me:$LINENO: result: no" >&5
4326 echo "${ECHO_T}no" >&6
4327 fi
4328
4329   RANLIB=$ac_ct_RANLIB
4330 else
4331   RANLIB="$ac_cv_prog_RANLIB"
4332 fi
4333
4334 for ac_prog in lorder
4335 do
4336   # Extract the first word of "$ac_prog", so it can be a program name with args.
4337 set dummy $ac_prog; ac_word=$2
4338 echo "$as_me:$LINENO: checking for $ac_word" >&5
4339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4340 if test "${ac_cv_prog_LORDER+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343   if test -n "$LORDER"; then
4344   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
4345 else
4346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4347 for as_dir in $PATH
4348 do
4349   IFS=$as_save_IFS
4350   test -z "$as_dir" && as_dir=.
4351   for ac_exec_ext in '' $ac_executable_extensions; do
4352   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4353     ac_cv_prog_LORDER="$ac_prog"
4354     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4355     break 2
4356   fi
4357 done
4358 done
4359
4360 fi
4361 fi
4362 LORDER=$ac_cv_prog_LORDER
4363 if test -n "$LORDER"; then
4364   echo "$as_me:$LINENO: result: $LORDER" >&5
4365 echo "${ECHO_T}$LORDER" >&6
4366 else
4367   echo "$as_me:$LINENO: result: no" >&5
4368 echo "${ECHO_T}no" >&6
4369 fi
4370
4371   test -n "$LORDER" && break
4372 done
4373
4374 # Extract the first word of "tar", so it can be a program name with args.
4375 set dummy tar; ac_word=$2
4376 echo "$as_me:$LINENO: checking for $ac_word" >&5
4377 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4378 if test "${ac_cv_path_TAR+set}" = set; then
4379   echo $ECHO_N "(cached) $ECHO_C" >&6
4380 else
4381   case $TAR in
4382   [\\/]* | ?:[\\/]*)
4383   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4384   ;;
4385   *)
4386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387 for as_dir in $PATH
4388 do
4389   IFS=$as_save_IFS
4390   test -z "$as_dir" && as_dir=.
4391   for ac_exec_ext in '' $ac_executable_extensions; do
4392   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4393     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4394     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4395     break 2
4396   fi
4397 done
4398 done
4399
4400   ;;
4401 esac
4402 fi
4403 TAR=$ac_cv_path_TAR
4404
4405 if test -n "$TAR"; then
4406   echo "$as_me:$LINENO: result: $TAR" >&5
4407 echo "${ECHO_T}$TAR" >&6
4408 else
4409   echo "$as_me:$LINENO: result: no" >&5
4410 echo "${ECHO_T}no" >&6
4411 fi
4412
4413
4414   if test -n "$ac_tool_prefix"; then
4415   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4416 set dummy ${ac_tool_prefix}strip; ac_word=$2
4417 echo "$as_me:$LINENO: checking for $ac_word" >&5
4418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4419 if test "${ac_cv_prog_STRIP+set}" = set; then
4420   echo $ECHO_N "(cached) $ECHO_C" >&6
4421 else
4422   if test -n "$STRIP"; then
4423   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4424 else
4425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4426 for as_dir in $PATH
4427 do
4428   IFS=$as_save_IFS
4429   test -z "$as_dir" && as_dir=.
4430   for ac_exec_ext in '' $ac_executable_extensions; do
4431   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4432     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4433     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4434     break 2
4435   fi
4436 done
4437 done
4438
4439 fi
4440 fi
4441 STRIP=$ac_cv_prog_STRIP
4442 if test -n "$STRIP"; then
4443   echo "$as_me:$LINENO: result: $STRIP" >&5
4444 echo "${ECHO_T}$STRIP" >&6
4445 else
4446   echo "$as_me:$LINENO: result: no" >&5
4447 echo "${ECHO_T}no" >&6
4448 fi
4449
4450 fi
4451 if test -z "$ac_cv_prog_STRIP"; then
4452   ac_ct_STRIP=$STRIP
4453   # Extract the first word of "strip", so it can be a program name with args.
4454 set dummy strip; ac_word=$2
4455 echo "$as_me:$LINENO: checking for $ac_word" >&5
4456 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4457 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4458   echo $ECHO_N "(cached) $ECHO_C" >&6
4459 else
4460   if test -n "$ac_ct_STRIP"; then
4461   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4462 else
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464 for as_dir in $PATH
4465 do
4466   IFS=$as_save_IFS
4467   test -z "$as_dir" && as_dir=.
4468   for ac_exec_ext in '' $ac_executable_extensions; do
4469   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4470     ac_cv_prog_ac_ct_STRIP="strip"
4471     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4472     break 2
4473   fi
4474 done
4475 done
4476
4477   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4478 fi
4479 fi
4480 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4481 if test -n "$ac_ct_STRIP"; then
4482   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4483 echo "${ECHO_T}$ac_ct_STRIP" >&6
4484 else
4485   echo "$as_me:$LINENO: result: no" >&5
4486 echo "${ECHO_T}no" >&6
4487 fi
4488
4489   STRIP=$ac_ct_STRIP
4490 else
4491   STRIP="$ac_cv_prog_STRIP"
4492 fi
4493
4494
4495   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4496 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4497   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4498     STRIP_STATIC_LIB="$STRIP -x"
4499     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4500     echo "$as_me:$LINENO: result: yes" >&5
4501 echo "${ECHO_T}yes" >&6
4502   else
4503     STRIP_STATIC_LIB=:
4504     STRIP_SHARED_LIB=:
4505     echo "$as_me:$LINENO: result: no" >&5
4506 echo "${ECHO_T}no" >&6
4507   fi
4508
4509
4510
4511
4512 for ac_prog in 'bison -y'
4513 do
4514   # Extract the first word of "$ac_prog", so it can be a program name with args.
4515 set dummy $ac_prog; ac_word=$2
4516 echo "$as_me:$LINENO: checking for $ac_word" >&5
4517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4518 if test "${ac_cv_prog_YACC+set}" = set; then
4519   echo $ECHO_N "(cached) $ECHO_C" >&6
4520 else
4521   if test -n "$YACC"; then
4522   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4523 else
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525 for as_dir in $PATH
4526 do
4527   IFS=$as_save_IFS
4528   test -z "$as_dir" && as_dir=.
4529   for ac_exec_ext in '' $ac_executable_extensions; do
4530   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4531     ac_cv_prog_YACC="$ac_prog"
4532     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4533     break 2
4534   fi
4535 done
4536 done
4537
4538 fi
4539 fi
4540 YACC=$ac_cv_prog_YACC
4541 if test -n "$YACC"; then
4542   echo "$as_me:$LINENO: result: $YACC" >&5
4543 echo "${ECHO_T}$YACC" >&6
4544 else
4545   echo "$as_me:$LINENO: result: no" >&5
4546 echo "${ECHO_T}no" >&6
4547 fi
4548
4549   test -n "$YACC" && break
4550 done
4551
4552
4553 if test "$YACC"; then
4554   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4555     { echo "$as_me:$LINENO: WARNING:
4556 *** If you are going to modify the grammar files or build from CVS, the installed
4557 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4558 echo "$as_me: WARNING:
4559 *** If you are going to modify the grammar files or build from CVS, the installed
4560 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4561   fi
4562 fi
4563
4564 if test -z "$YACC"; then
4565   { echo "$as_me:$LINENO: WARNING:
4566 *** Without Bison you will not be able to build PostgreSQL from CVS or
4567 *** change any of the parser definition files.  You can obtain Bison from
4568 *** a GNU mirror site.  (If you are using the official distribution of
4569 *** PostgreSQL then you do not need to worry about this because the Bison
4570 *** output is pre-generated.)  To use a different yacc program (possible,
4571 *** but not recommended), set the environment variable YACC before running
4572 *** 'configure'." >&5
4573 echo "$as_me: WARNING:
4574 *** Without Bison you will not be able to build PostgreSQL from CVS or
4575 *** change any of the parser definition files.  You can obtain Bison from
4576 *** a GNU mirror site.  (If you are using the official distribution of
4577 *** PostgreSQL then you do not need to worry about this because the Bison
4578 *** output is pre-generated.)  To use a different yacc program (possible,
4579 *** but not recommended), set the environment variable YACC before running
4580 *** 'configure'." >&2;}
4581 fi
4582
4583
4584 # Extract the first word of "perl", so it can be a program name with args.
4585 set dummy perl; ac_word=$2
4586 echo "$as_me:$LINENO: checking for $ac_word" >&5
4587 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4588 if test "${ac_cv_path_PERL+set}" = set; then
4589   echo $ECHO_N "(cached) $ECHO_C" >&6
4590 else
4591   case $PERL in
4592   [\\/]* | ?:[\\/]*)
4593   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4594   ;;
4595   *)
4596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597 for as_dir in $PATH
4598 do
4599   IFS=$as_save_IFS
4600   test -z "$as_dir" && as_dir=.
4601   for ac_exec_ext in '' $ac_executable_extensions; do
4602   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4603     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4604     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4605     break 2
4606   fi
4607 done
4608 done
4609
4610   ;;
4611 esac
4612 fi
4613 PERL=$ac_cv_path_PERL
4614
4615 if test -n "$PERL"; then
4616   echo "$as_me:$LINENO: result: $PERL" >&5
4617 echo "${ECHO_T}$PERL" >&6
4618 else
4619   echo "$as_me:$LINENO: result: no" >&5
4620 echo "${ECHO_T}no" >&6
4621 fi
4622
4623 if test "$with_perl" = yes; then
4624
4625 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4626 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4627 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4628 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4629 echo "${ECHO_T}$perl_archlibexp" >&6
4630 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4631 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4632 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4633 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4634 echo "${ECHO_T}$perl_privlibexp" >&6
4635 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4636 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4637 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4638 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4639 echo "${ECHO_T}$perl_useshrplib" >&6
4640
4641 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4642 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4643 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4644 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4645 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4646 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4647 echo "${ECHO_T}$perl_embed_ldflags" >&6
4648 fi
4649
4650 if test "$with_python" = yes; then
4651   # Extract the first word of "python", so it can be a program name with args.
4652 set dummy python; ac_word=$2
4653 echo "$as_me:$LINENO: checking for $ac_word" >&5
4654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4655 if test "${ac_cv_path_PYTHON+set}" = set; then
4656   echo $ECHO_N "(cached) $ECHO_C" >&6
4657 else
4658   case $PYTHON in
4659   [\\/]* | ?:[\\/]*)
4660   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4661   ;;
4662   *)
4663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664 for as_dir in $PATH
4665 do
4666   IFS=$as_save_IFS
4667   test -z "$as_dir" && as_dir=.
4668   for ac_exec_ext in '' $ac_executable_extensions; do
4669   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4670     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4671     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4672     break 2
4673   fi
4674 done
4675 done
4676
4677   ;;
4678 esac
4679 fi
4680 PYTHON=$ac_cv_path_PYTHON
4681
4682 if test -n "$PYTHON"; then
4683   echo "$as_me:$LINENO: result: $PYTHON" >&5
4684 echo "${ECHO_T}$PYTHON" >&6
4685 else
4686   echo "$as_me:$LINENO: result: no" >&5
4687 echo "${ECHO_T}no" >&6
4688 fi
4689
4690 if test x"$PYTHON" = x""; then
4691   { { echo "$as_me:$LINENO: error: Python not found" >&5
4692 echo "$as_me: error: Python not found" >&2;}
4693    { (exit 1); exit 1; }; }
4694 fi
4695
4696
4697 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4698 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4699 if "${PYTHON}" 2>&- -c 'import distutils'
4700 then
4701     echo "$as_me:$LINENO: result: yes" >&5
4702 echo "${ECHO_T}yes" >&6
4703 else
4704     echo "$as_me:$LINENO: result: no" >&5
4705 echo "${ECHO_T}no" >&6
4706     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4707 echo "$as_me: error: distutils module not found" >&2;}
4708    { (exit 1); exit 1; }; }
4709 fi
4710 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4711 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4712 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4713 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')"`
4714 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4715
4716 # This should be enough of a message.
4717 echo "$as_me:$LINENO: result: $python_configdir" >&5
4718 echo "${ECHO_T}$python_configdir" >&6
4719
4720
4721 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4722 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4723
4724 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4725 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4726 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4727 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4728
4729 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4730 then
4731         # New way: use the official shared library
4732         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4733         python_libspec="-L${python_libdir} -l${ldlibrary}"
4734 else
4735         # Old way: use libpython from python_configdir
4736         python_libdir="${python_configdir}"
4737         python_libspec="-L${python_libdir} -lpython${python_version}"
4738 fi
4739
4740 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4741
4742 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4743 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4744
4745
4746 # threaded python is not supported on bsd's
4747 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4748 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
4749 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
4750 if test "$pythreads" = "1"; then
4751   echo "$as_me:$LINENO: result: yes" >&5
4752 echo "${ECHO_T}yes" >&6
4753   case $host_os in
4754   openbsd*|freebsd*)
4755     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
4756 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
4757    { (exit 1); exit 1; }; }
4758     ;;
4759   esac
4760 else
4761   echo "$as_me:$LINENO: result: no" >&5
4762 echo "${ECHO_T}no" >&6
4763 fi
4764
4765
4766 fi
4767
4768
4769 ##
4770 ## Libraries
4771 ##
4772
4773 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
4774 then
4775
4776 echo "$as_me:$LINENO: checking for main in -lbsd" >&5
4777 echo $ECHO_N "checking for main in -lbsd... $ECHO_C" >&6
4778 if test "${ac_cv_lib_bsd_main+set}" = set; then
4779   echo $ECHO_N "(cached) $ECHO_C" >&6
4780 else
4781   ac_check_lib_save_LIBS=$LIBS
4782 LIBS="-lbsd  $LIBS"
4783 cat >conftest.$ac_ext <<_ACEOF
4784 /* confdefs.h.  */
4785 _ACEOF
4786 cat confdefs.h >>conftest.$ac_ext
4787 cat >>conftest.$ac_ext <<_ACEOF
4788 /* end confdefs.h.  */
4789
4790
4791 int
4792 main ()
4793 {
4794 main ();
4795   ;
4796   return 0;
4797 }
4798 _ACEOF
4799 rm -f conftest.$ac_objext conftest$ac_exeext
4800 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4801   (eval $ac_link) 2>conftest.er1
4802   ac_status=$?
4803   grep -v '^ *+' conftest.er1 >conftest.err
4804   rm -f conftest.er1
4805   cat conftest.err >&5
4806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4807   (exit $ac_status); } &&
4808          { ac_try='test -z "$ac_c_werror_flag"
4809                          || test ! -s conftest.err'
4810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4811   (eval $ac_try) 2>&5
4812   ac_status=$?
4813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814   (exit $ac_status); }; } &&
4815          { ac_try='test -s conftest$ac_exeext'
4816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4817   (eval $ac_try) 2>&5
4818   ac_status=$?
4819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4820   (exit $ac_status); }; }; then
4821   ac_cv_lib_bsd_main=yes
4822 else
4823   echo "$as_me: failed program was:" >&5
4824 sed 's/^/| /' conftest.$ac_ext >&5
4825
4826 ac_cv_lib_bsd_main=no
4827 fi
4828 rm -f conftest.err conftest.$ac_objext \
4829       conftest$ac_exeext conftest.$ac_ext
4830 LIBS=$ac_check_lib_save_LIBS
4831 fi
4832 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_main" >&5
4833 echo "${ECHO_T}$ac_cv_lib_bsd_main" >&6
4834 if test $ac_cv_lib_bsd_main = yes; then
4835   cat >>confdefs.h <<_ACEOF
4836 #define HAVE_LIBBSD 1
4837 _ACEOF
4838
4839   LIBS="-lbsd $LIBS"
4840
4841 fi
4842
4843 fi
4844
4845 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
4846 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
4847 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
4848   echo $ECHO_N "(cached) $ECHO_C" >&6
4849 else
4850   ac_check_lib_save_LIBS=$LIBS
4851 LIBS="-lutil  $LIBS"
4852 cat >conftest.$ac_ext <<_ACEOF
4853 /* confdefs.h.  */
4854 _ACEOF
4855 cat confdefs.h >>conftest.$ac_ext
4856 cat >>conftest.$ac_ext <<_ACEOF
4857 /* end confdefs.h.  */
4858
4859 /* Override any gcc2 internal prototype to avoid an error.  */
4860 #ifdef __cplusplus
4861 extern "C"
4862 #endif
4863 /* We use char because int might match the return type of a gcc2
4864    builtin and then its argument prototype would still apply.  */
4865 char setproctitle ();
4866 int
4867 main ()
4868 {
4869 setproctitle ();
4870   ;
4871   return 0;
4872 }
4873 _ACEOF
4874 rm -f conftest.$ac_objext conftest$ac_exeext
4875 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4876   (eval $ac_link) 2>conftest.er1
4877   ac_status=$?
4878   grep -v '^ *+' conftest.er1 >conftest.err
4879   rm -f conftest.er1
4880   cat conftest.err >&5
4881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4882   (exit $ac_status); } &&
4883          { ac_try='test -z "$ac_c_werror_flag"
4884                          || test ! -s conftest.err'
4885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4886   (eval $ac_try) 2>&5
4887   ac_status=$?
4888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4889   (exit $ac_status); }; } &&
4890          { ac_try='test -s conftest$ac_exeext'
4891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4892   (eval $ac_try) 2>&5
4893   ac_status=$?
4894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4895   (exit $ac_status); }; }; then
4896   ac_cv_lib_util_setproctitle=yes
4897 else
4898   echo "$as_me: failed program was:" >&5
4899 sed 's/^/| /' conftest.$ac_ext >&5
4900
4901 ac_cv_lib_util_setproctitle=no
4902 fi
4903 rm -f conftest.err conftest.$ac_objext \
4904       conftest$ac_exeext conftest.$ac_ext
4905 LIBS=$ac_check_lib_save_LIBS
4906 fi
4907 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
4908 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
4909 if test $ac_cv_lib_util_setproctitle = yes; then
4910   cat >>confdefs.h <<_ACEOF
4911 #define HAVE_LIBUTIL 1
4912 _ACEOF
4913
4914   LIBS="-lutil $LIBS"
4915
4916 fi
4917
4918
4919 echo "$as_me:$LINENO: checking for main in -lm" >&5
4920 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
4921 if test "${ac_cv_lib_m_main+set}" = set; then
4922   echo $ECHO_N "(cached) $ECHO_C" >&6
4923 else
4924   ac_check_lib_save_LIBS=$LIBS
4925 LIBS="-lm  $LIBS"
4926 cat >conftest.$ac_ext <<_ACEOF
4927 /* confdefs.h.  */
4928 _ACEOF
4929 cat confdefs.h >>conftest.$ac_ext
4930 cat >>conftest.$ac_ext <<_ACEOF
4931 /* end confdefs.h.  */
4932
4933
4934 int
4935 main ()
4936 {
4937 main ();
4938   ;
4939   return 0;
4940 }
4941 _ACEOF
4942 rm -f conftest.$ac_objext conftest$ac_exeext
4943 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4944   (eval $ac_link) 2>conftest.er1
4945   ac_status=$?
4946   grep -v '^ *+' conftest.er1 >conftest.err
4947   rm -f conftest.er1
4948   cat conftest.err >&5
4949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4950   (exit $ac_status); } &&
4951          { ac_try='test -z "$ac_c_werror_flag"
4952                          || test ! -s conftest.err'
4953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4954   (eval $ac_try) 2>&5
4955   ac_status=$?
4956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4957   (exit $ac_status); }; } &&
4958          { ac_try='test -s conftest$ac_exeext'
4959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4960   (eval $ac_try) 2>&5
4961   ac_status=$?
4962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4963   (exit $ac_status); }; }; then
4964   ac_cv_lib_m_main=yes
4965 else
4966   echo "$as_me: failed program was:" >&5
4967 sed 's/^/| /' conftest.$ac_ext >&5
4968
4969 ac_cv_lib_m_main=no
4970 fi
4971 rm -f conftest.err conftest.$ac_objext \
4972       conftest$ac_exeext conftest.$ac_ext
4973 LIBS=$ac_check_lib_save_LIBS
4974 fi
4975 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
4976 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
4977 if test $ac_cv_lib_m_main = yes; then
4978   cat >>confdefs.h <<_ACEOF
4979 #define HAVE_LIBM 1
4980 _ACEOF
4981
4982   LIBS="-lm $LIBS"
4983
4984 fi
4985
4986
4987 echo "$as_me:$LINENO: checking for main in -ldl" >&5
4988 echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
4989 if test "${ac_cv_lib_dl_main+set}" = set; then
4990   echo $ECHO_N "(cached) $ECHO_C" >&6
4991 else
4992   ac_check_lib_save_LIBS=$LIBS
4993 LIBS="-ldl  $LIBS"
4994 cat >conftest.$ac_ext <<_ACEOF
4995 /* confdefs.h.  */
4996 _ACEOF
4997 cat confdefs.h >>conftest.$ac_ext
4998 cat >>conftest.$ac_ext <<_ACEOF
4999 /* end confdefs.h.  */
5000
5001
5002 int
5003 main ()
5004 {
5005 main ();
5006   ;
5007   return 0;
5008 }
5009 _ACEOF
5010 rm -f conftest.$ac_objext conftest$ac_exeext
5011 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5012   (eval $ac_link) 2>conftest.er1
5013   ac_status=$?
5014   grep -v '^ *+' conftest.er1 >conftest.err
5015   rm -f conftest.er1
5016   cat conftest.err >&5
5017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5018   (exit $ac_status); } &&
5019          { ac_try='test -z "$ac_c_werror_flag"
5020                          || test ! -s conftest.err'
5021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5022   (eval $ac_try) 2>&5
5023   ac_status=$?
5024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5025   (exit $ac_status); }; } &&
5026          { ac_try='test -s conftest$ac_exeext'
5027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5028   (eval $ac_try) 2>&5
5029   ac_status=$?
5030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5031   (exit $ac_status); }; }; then
5032   ac_cv_lib_dl_main=yes
5033 else
5034   echo "$as_me: failed program was:" >&5
5035 sed 's/^/| /' conftest.$ac_ext >&5
5036
5037 ac_cv_lib_dl_main=no
5038 fi
5039 rm -f conftest.err conftest.$ac_objext \
5040       conftest$ac_exeext conftest.$ac_ext
5041 LIBS=$ac_check_lib_save_LIBS
5042 fi
5043 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5
5044 echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
5045 if test $ac_cv_lib_dl_main = yes; then
5046   cat >>confdefs.h <<_ACEOF
5047 #define HAVE_LIBDL 1
5048 _ACEOF
5049
5050   LIBS="-ldl $LIBS"
5051
5052 fi
5053
5054
5055 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
5056 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
5057 if test "${ac_cv_lib_nsl_main+set}" = set; then
5058   echo $ECHO_N "(cached) $ECHO_C" >&6
5059 else
5060   ac_check_lib_save_LIBS=$LIBS
5061 LIBS="-lnsl  $LIBS"
5062 cat >conftest.$ac_ext <<_ACEOF
5063 /* confdefs.h.  */
5064 _ACEOF
5065 cat confdefs.h >>conftest.$ac_ext
5066 cat >>conftest.$ac_ext <<_ACEOF
5067 /* end confdefs.h.  */
5068
5069
5070 int
5071 main ()
5072 {
5073 main ();
5074   ;
5075   return 0;
5076 }
5077 _ACEOF
5078 rm -f conftest.$ac_objext conftest$ac_exeext
5079 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5080   (eval $ac_link) 2>conftest.er1
5081   ac_status=$?
5082   grep -v '^ *+' conftest.er1 >conftest.err
5083   rm -f conftest.er1
5084   cat conftest.err >&5
5085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086   (exit $ac_status); } &&
5087          { ac_try='test -z "$ac_c_werror_flag"
5088                          || test ! -s conftest.err'
5089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5090   (eval $ac_try) 2>&5
5091   ac_status=$?
5092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5093   (exit $ac_status); }; } &&
5094          { ac_try='test -s conftest$ac_exeext'
5095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5096   (eval $ac_try) 2>&5
5097   ac_status=$?
5098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5099   (exit $ac_status); }; }; then
5100   ac_cv_lib_nsl_main=yes
5101 else
5102   echo "$as_me: failed program was:" >&5
5103 sed 's/^/| /' conftest.$ac_ext >&5
5104
5105 ac_cv_lib_nsl_main=no
5106 fi
5107 rm -f conftest.err conftest.$ac_objext \
5108       conftest$ac_exeext conftest.$ac_ext
5109 LIBS=$ac_check_lib_save_LIBS
5110 fi
5111 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
5112 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
5113 if test $ac_cv_lib_nsl_main = yes; then
5114   cat >>confdefs.h <<_ACEOF
5115 #define HAVE_LIBNSL 1
5116 _ACEOF
5117
5118   LIBS="-lnsl $LIBS"
5119
5120 fi
5121
5122
5123 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
5124 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
5125 if test "${ac_cv_lib_socket_main+set}" = set; then
5126   echo $ECHO_N "(cached) $ECHO_C" >&6
5127 else
5128   ac_check_lib_save_LIBS=$LIBS
5129 LIBS="-lsocket  $LIBS"
5130 cat >conftest.$ac_ext <<_ACEOF
5131 /* confdefs.h.  */
5132 _ACEOF
5133 cat confdefs.h >>conftest.$ac_ext
5134 cat >>conftest.$ac_ext <<_ACEOF
5135 /* end confdefs.h.  */
5136
5137
5138 int
5139 main ()
5140 {
5141 main ();
5142   ;
5143   return 0;
5144 }
5145 _ACEOF
5146 rm -f conftest.$ac_objext conftest$ac_exeext
5147 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5148   (eval $ac_link) 2>conftest.er1
5149   ac_status=$?
5150   grep -v '^ *+' conftest.er1 >conftest.err
5151   rm -f conftest.er1
5152   cat conftest.err >&5
5153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5154   (exit $ac_status); } &&
5155          { ac_try='test -z "$ac_c_werror_flag"
5156                          || test ! -s conftest.err'
5157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5158   (eval $ac_try) 2>&5
5159   ac_status=$?
5160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5161   (exit $ac_status); }; } &&
5162          { ac_try='test -s conftest$ac_exeext'
5163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5164   (eval $ac_try) 2>&5
5165   ac_status=$?
5166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167   (exit $ac_status); }; }; then
5168   ac_cv_lib_socket_main=yes
5169 else
5170   echo "$as_me: failed program was:" >&5
5171 sed 's/^/| /' conftest.$ac_ext >&5
5172
5173 ac_cv_lib_socket_main=no
5174 fi
5175 rm -f conftest.err conftest.$ac_objext \
5176       conftest$ac_exeext conftest.$ac_ext
5177 LIBS=$ac_check_lib_save_LIBS
5178 fi
5179 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
5180 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
5181 if test $ac_cv_lib_socket_main = yes; then
5182   cat >>confdefs.h <<_ACEOF
5183 #define HAVE_LIBSOCKET 1
5184 _ACEOF
5185
5186   LIBS="-lsocket $LIBS"
5187
5188 fi
5189
5190
5191 echo "$as_me:$LINENO: checking for main in -lipc" >&5
5192 echo $ECHO_N "checking for main in -lipc... $ECHO_C" >&6
5193 if test "${ac_cv_lib_ipc_main+set}" = set; then
5194   echo $ECHO_N "(cached) $ECHO_C" >&6
5195 else
5196   ac_check_lib_save_LIBS=$LIBS
5197 LIBS="-lipc  $LIBS"
5198 cat >conftest.$ac_ext <<_ACEOF
5199 /* confdefs.h.  */
5200 _ACEOF
5201 cat confdefs.h >>conftest.$ac_ext
5202 cat >>conftest.$ac_ext <<_ACEOF
5203 /* end confdefs.h.  */
5204
5205
5206 int
5207 main ()
5208 {
5209 main ();
5210   ;
5211   return 0;
5212 }
5213 _ACEOF
5214 rm -f conftest.$ac_objext conftest$ac_exeext
5215 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5216   (eval $ac_link) 2>conftest.er1
5217   ac_status=$?
5218   grep -v '^ *+' conftest.er1 >conftest.err
5219   rm -f conftest.er1
5220   cat conftest.err >&5
5221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222   (exit $ac_status); } &&
5223          { ac_try='test -z "$ac_c_werror_flag"
5224                          || test ! -s conftest.err'
5225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5226   (eval $ac_try) 2>&5
5227   ac_status=$?
5228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5229   (exit $ac_status); }; } &&
5230          { ac_try='test -s conftest$ac_exeext'
5231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5232   (eval $ac_try) 2>&5
5233   ac_status=$?
5234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5235   (exit $ac_status); }; }; then
5236   ac_cv_lib_ipc_main=yes
5237 else
5238   echo "$as_me: failed program was:" >&5
5239 sed 's/^/| /' conftest.$ac_ext >&5
5240
5241 ac_cv_lib_ipc_main=no
5242 fi
5243 rm -f conftest.err conftest.$ac_objext \
5244       conftest$ac_exeext conftest.$ac_ext
5245 LIBS=$ac_check_lib_save_LIBS
5246 fi
5247 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_main" >&5
5248 echo "${ECHO_T}$ac_cv_lib_ipc_main" >&6
5249 if test $ac_cv_lib_ipc_main = yes; then
5250   cat >>confdefs.h <<_ACEOF
5251 #define HAVE_LIBIPC 1
5252 _ACEOF
5253
5254   LIBS="-lipc $LIBS"
5255
5256 fi
5257
5258
5259 echo "$as_me:$LINENO: checking for main in -lIPC" >&5
5260 echo $ECHO_N "checking for main in -lIPC... $ECHO_C" >&6
5261 if test "${ac_cv_lib_IPC_main+set}" = set; then
5262   echo $ECHO_N "(cached) $ECHO_C" >&6
5263 else
5264   ac_check_lib_save_LIBS=$LIBS
5265 LIBS="-lIPC  $LIBS"
5266 cat >conftest.$ac_ext <<_ACEOF
5267 /* confdefs.h.  */
5268 _ACEOF
5269 cat confdefs.h >>conftest.$ac_ext
5270 cat >>conftest.$ac_ext <<_ACEOF
5271 /* end confdefs.h.  */
5272
5273
5274 int
5275 main ()
5276 {
5277 main ();
5278   ;
5279   return 0;
5280 }
5281 _ACEOF
5282 rm -f conftest.$ac_objext conftest$ac_exeext
5283 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5284   (eval $ac_link) 2>conftest.er1
5285   ac_status=$?
5286   grep -v '^ *+' conftest.er1 >conftest.err
5287   rm -f conftest.er1
5288   cat conftest.err >&5
5289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290   (exit $ac_status); } &&
5291          { ac_try='test -z "$ac_c_werror_flag"
5292                          || test ! -s conftest.err'
5293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5294   (eval $ac_try) 2>&5
5295   ac_status=$?
5296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297   (exit $ac_status); }; } &&
5298          { ac_try='test -s conftest$ac_exeext'
5299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5300   (eval $ac_try) 2>&5
5301   ac_status=$?
5302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5303   (exit $ac_status); }; }; then
5304   ac_cv_lib_IPC_main=yes
5305 else
5306   echo "$as_me: failed program was:" >&5
5307 sed 's/^/| /' conftest.$ac_ext >&5
5308
5309 ac_cv_lib_IPC_main=no
5310 fi
5311 rm -f conftest.err conftest.$ac_objext \
5312       conftest$ac_exeext conftest.$ac_ext
5313 LIBS=$ac_check_lib_save_LIBS
5314 fi
5315 echo "$as_me:$LINENO: result: $ac_cv_lib_IPC_main" >&5
5316 echo "${ECHO_T}$ac_cv_lib_IPC_main" >&6
5317 if test $ac_cv_lib_IPC_main = yes; then
5318   cat >>confdefs.h <<_ACEOF
5319 #define HAVE_LIBIPC 1
5320 _ACEOF
5321
5322   LIBS="-lIPC $LIBS"
5323
5324 fi
5325
5326
5327 echo "$as_me:$LINENO: checking for main in -llc" >&5
5328 echo $ECHO_N "checking for main in -llc... $ECHO_C" >&6
5329 if test "${ac_cv_lib_lc_main+set}" = set; then
5330   echo $ECHO_N "(cached) $ECHO_C" >&6
5331 else
5332   ac_check_lib_save_LIBS=$LIBS
5333 LIBS="-llc  $LIBS"
5334 cat >conftest.$ac_ext <<_ACEOF
5335 /* confdefs.h.  */
5336 _ACEOF
5337 cat confdefs.h >>conftest.$ac_ext
5338 cat >>conftest.$ac_ext <<_ACEOF
5339 /* end confdefs.h.  */
5340
5341
5342 int
5343 main ()
5344 {
5345 main ();
5346   ;
5347   return 0;
5348 }
5349 _ACEOF
5350 rm -f conftest.$ac_objext conftest$ac_exeext
5351 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5352   (eval $ac_link) 2>conftest.er1
5353   ac_status=$?
5354   grep -v '^ *+' conftest.er1 >conftest.err
5355   rm -f conftest.er1
5356   cat conftest.err >&5
5357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5358   (exit $ac_status); } &&
5359          { ac_try='test -z "$ac_c_werror_flag"
5360                          || test ! -s conftest.err'
5361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5362   (eval $ac_try) 2>&5
5363   ac_status=$?
5364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5365   (exit $ac_status); }; } &&
5366          { ac_try='test -s conftest$ac_exeext'
5367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5368   (eval $ac_try) 2>&5
5369   ac_status=$?
5370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5371   (exit $ac_status); }; }; then
5372   ac_cv_lib_lc_main=yes
5373 else
5374   echo "$as_me: failed program was:" >&5
5375 sed 's/^/| /' conftest.$ac_ext >&5
5376
5377 ac_cv_lib_lc_main=no
5378 fi
5379 rm -f conftest.err conftest.$ac_objext \
5380       conftest$ac_exeext conftest.$ac_ext
5381 LIBS=$ac_check_lib_save_LIBS
5382 fi
5383 echo "$as_me:$LINENO: result: $ac_cv_lib_lc_main" >&5
5384 echo "${ECHO_T}$ac_cv_lib_lc_main" >&6
5385 if test $ac_cv_lib_lc_main = yes; then
5386   cat >>confdefs.h <<_ACEOF
5387 #define HAVE_LIBLC 1
5388 _ACEOF
5389
5390   LIBS="-llc $LIBS"
5391
5392 fi
5393
5394
5395 echo "$as_me:$LINENO: checking for main in -ldld" >&5
5396 echo $ECHO_N "checking for main in -ldld... $ECHO_C" >&6
5397 if test "${ac_cv_lib_dld_main+set}" = set; then
5398   echo $ECHO_N "(cached) $ECHO_C" >&6
5399 else
5400   ac_check_lib_save_LIBS=$LIBS
5401 LIBS="-ldld  $LIBS"
5402 cat >conftest.$ac_ext <<_ACEOF
5403 /* confdefs.h.  */
5404 _ACEOF
5405 cat confdefs.h >>conftest.$ac_ext
5406 cat >>conftest.$ac_ext <<_ACEOF
5407 /* end confdefs.h.  */
5408
5409
5410 int
5411 main ()
5412 {
5413 main ();
5414   ;
5415   return 0;
5416 }
5417 _ACEOF
5418 rm -f conftest.$ac_objext conftest$ac_exeext
5419 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5420   (eval $ac_link) 2>conftest.er1
5421   ac_status=$?
5422   grep -v '^ *+' conftest.er1 >conftest.err
5423   rm -f conftest.er1
5424   cat conftest.err >&5
5425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5426   (exit $ac_status); } &&
5427          { ac_try='test -z "$ac_c_werror_flag"
5428                          || test ! -s conftest.err'
5429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5430   (eval $ac_try) 2>&5
5431   ac_status=$?
5432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5433   (exit $ac_status); }; } &&
5434          { ac_try='test -s conftest$ac_exeext'
5435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5436   (eval $ac_try) 2>&5
5437   ac_status=$?
5438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5439   (exit $ac_status); }; }; then
5440   ac_cv_lib_dld_main=yes
5441 else
5442   echo "$as_me: failed program was:" >&5
5443 sed 's/^/| /' conftest.$ac_ext >&5
5444
5445 ac_cv_lib_dld_main=no
5446 fi
5447 rm -f conftest.err conftest.$ac_objext \
5448       conftest$ac_exeext conftest.$ac_ext
5449 LIBS=$ac_check_lib_save_LIBS
5450 fi
5451 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_main" >&5
5452 echo "${ECHO_T}$ac_cv_lib_dld_main" >&6
5453 if test $ac_cv_lib_dld_main = yes; then
5454   cat >>confdefs.h <<_ACEOF
5455 #define HAVE_LIBDLD 1
5456 _ACEOF
5457
5458   LIBS="-ldld $LIBS"
5459
5460 fi
5461
5462
5463 echo "$as_me:$LINENO: checking for main in -lld" >&5
5464 echo $ECHO_N "checking for main in -lld... $ECHO_C" >&6
5465 if test "${ac_cv_lib_ld_main+set}" = set; then
5466   echo $ECHO_N "(cached) $ECHO_C" >&6
5467 else
5468   ac_check_lib_save_LIBS=$LIBS
5469 LIBS="-lld  $LIBS"
5470 cat >conftest.$ac_ext <<_ACEOF
5471 /* confdefs.h.  */
5472 _ACEOF
5473 cat confdefs.h >>conftest.$ac_ext
5474 cat >>conftest.$ac_ext <<_ACEOF
5475 /* end confdefs.h.  */
5476
5477
5478 int
5479 main ()
5480 {
5481 main ();
5482   ;
5483   return 0;
5484 }
5485 _ACEOF
5486 rm -f conftest.$ac_objext conftest$ac_exeext
5487 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5488   (eval $ac_link) 2>conftest.er1
5489   ac_status=$?
5490   grep -v '^ *+' conftest.er1 >conftest.err
5491   rm -f conftest.er1
5492   cat conftest.err >&5
5493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494   (exit $ac_status); } &&
5495          { ac_try='test -z "$ac_c_werror_flag"
5496                          || test ! -s conftest.err'
5497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5498   (eval $ac_try) 2>&5
5499   ac_status=$?
5500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501   (exit $ac_status); }; } &&
5502          { ac_try='test -s conftest$ac_exeext'
5503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5504   (eval $ac_try) 2>&5
5505   ac_status=$?
5506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5507   (exit $ac_status); }; }; then
5508   ac_cv_lib_ld_main=yes
5509 else
5510   echo "$as_me: failed program was:" >&5
5511 sed 's/^/| /' conftest.$ac_ext >&5
5512
5513 ac_cv_lib_ld_main=no
5514 fi
5515 rm -f conftest.err conftest.$ac_objext \
5516       conftest$ac_exeext conftest.$ac_ext
5517 LIBS=$ac_check_lib_save_LIBS
5518 fi
5519 echo "$as_me:$LINENO: result: $ac_cv_lib_ld_main" >&5
5520 echo "${ECHO_T}$ac_cv_lib_ld_main" >&6
5521 if test $ac_cv_lib_ld_main = yes; then
5522   cat >>confdefs.h <<_ACEOF
5523 #define HAVE_LIBLD 1
5524 _ACEOF
5525
5526   LIBS="-lld $LIBS"
5527
5528 fi
5529
5530
5531 echo "$as_me:$LINENO: checking for main in -lcompat" >&5
5532 echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
5533 if test "${ac_cv_lib_compat_main+set}" = set; then
5534   echo $ECHO_N "(cached) $ECHO_C" >&6
5535 else
5536   ac_check_lib_save_LIBS=$LIBS
5537 LIBS="-lcompat  $LIBS"
5538 cat >conftest.$ac_ext <<_ACEOF
5539 /* confdefs.h.  */
5540 _ACEOF
5541 cat confdefs.h >>conftest.$ac_ext
5542 cat >>conftest.$ac_ext <<_ACEOF
5543 /* end confdefs.h.  */
5544
5545
5546 int
5547 main ()
5548 {
5549 main ();
5550   ;
5551   return 0;
5552 }
5553 _ACEOF
5554 rm -f conftest.$ac_objext conftest$ac_exeext
5555 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5556   (eval $ac_link) 2>conftest.er1
5557   ac_status=$?
5558   grep -v '^ *+' conftest.er1 >conftest.err
5559   rm -f conftest.er1
5560   cat conftest.err >&5
5561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5562   (exit $ac_status); } &&
5563          { ac_try='test -z "$ac_c_werror_flag"
5564                          || test ! -s conftest.err'
5565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5566   (eval $ac_try) 2>&5
5567   ac_status=$?
5568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569   (exit $ac_status); }; } &&
5570          { ac_try='test -s conftest$ac_exeext'
5571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5572   (eval $ac_try) 2>&5
5573   ac_status=$?
5574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575   (exit $ac_status); }; }; then
5576   ac_cv_lib_compat_main=yes
5577 else
5578   echo "$as_me: failed program was:" >&5
5579 sed 's/^/| /' conftest.$ac_ext >&5
5580
5581 ac_cv_lib_compat_main=no
5582 fi
5583 rm -f conftest.err conftest.$ac_objext \
5584       conftest$ac_exeext conftest.$ac_ext
5585 LIBS=$ac_check_lib_save_LIBS
5586 fi
5587 echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
5588 echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
5589 if test $ac_cv_lib_compat_main = yes; then
5590   cat >>confdefs.h <<_ACEOF
5591 #define HAVE_LIBCOMPAT 1
5592 _ACEOF
5593
5594   LIBS="-lcompat $LIBS"
5595
5596 fi
5597
5598
5599 echo "$as_me:$LINENO: checking for main in -lBSD" >&5
5600 echo $ECHO_N "checking for main in -lBSD... $ECHO_C" >&6
5601 if test "${ac_cv_lib_BSD_main+set}" = set; then
5602   echo $ECHO_N "(cached) $ECHO_C" >&6
5603 else
5604   ac_check_lib_save_LIBS=$LIBS
5605 LIBS="-lBSD  $LIBS"
5606 cat >conftest.$ac_ext <<_ACEOF
5607 /* confdefs.h.  */
5608 _ACEOF
5609 cat confdefs.h >>conftest.$ac_ext
5610 cat >>conftest.$ac_ext <<_ACEOF
5611 /* end confdefs.h.  */
5612
5613
5614 int
5615 main ()
5616 {
5617 main ();
5618   ;
5619   return 0;
5620 }
5621 _ACEOF
5622 rm -f conftest.$ac_objext conftest$ac_exeext
5623 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5624   (eval $ac_link) 2>conftest.er1
5625   ac_status=$?
5626   grep -v '^ *+' conftest.er1 >conftest.err
5627   rm -f conftest.er1
5628   cat conftest.err >&5
5629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5630   (exit $ac_status); } &&
5631          { ac_try='test -z "$ac_c_werror_flag"
5632                          || test ! -s conftest.err'
5633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5634   (eval $ac_try) 2>&5
5635   ac_status=$?
5636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5637   (exit $ac_status); }; } &&
5638          { ac_try='test -s conftest$ac_exeext'
5639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5640   (eval $ac_try) 2>&5
5641   ac_status=$?
5642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5643   (exit $ac_status); }; }; then
5644   ac_cv_lib_BSD_main=yes
5645 else
5646   echo "$as_me: failed program was:" >&5
5647 sed 's/^/| /' conftest.$ac_ext >&5
5648
5649 ac_cv_lib_BSD_main=no
5650 fi
5651 rm -f conftest.err conftest.$ac_objext \
5652       conftest$ac_exeext conftest.$ac_ext
5653 LIBS=$ac_check_lib_save_LIBS
5654 fi
5655 echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_main" >&5
5656 echo "${ECHO_T}$ac_cv_lib_BSD_main" >&6
5657 if test $ac_cv_lib_BSD_main = yes; then
5658   cat >>confdefs.h <<_ACEOF
5659 #define HAVE_LIBBSD 1
5660 _ACEOF
5661
5662   LIBS="-lBSD $LIBS"
5663
5664 fi
5665
5666
5667 echo "$as_me:$LINENO: checking for main in -lgen" >&5
5668 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
5669 if test "${ac_cv_lib_gen_main+set}" = set; then
5670   echo $ECHO_N "(cached) $ECHO_C" >&6
5671 else
5672   ac_check_lib_save_LIBS=$LIBS
5673 LIBS="-lgen  $LIBS"
5674 cat >conftest.$ac_ext <<_ACEOF
5675 /* confdefs.h.  */
5676 _ACEOF
5677 cat confdefs.h >>conftest.$ac_ext
5678 cat >>conftest.$ac_ext <<_ACEOF
5679 /* end confdefs.h.  */
5680
5681
5682 int
5683 main ()
5684 {
5685 main ();
5686   ;
5687   return 0;
5688 }
5689 _ACEOF
5690 rm -f conftest.$ac_objext conftest$ac_exeext
5691 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5692   (eval $ac_link) 2>conftest.er1
5693   ac_status=$?
5694   grep -v '^ *+' conftest.er1 >conftest.err
5695   rm -f conftest.er1
5696   cat conftest.err >&5
5697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5698   (exit $ac_status); } &&
5699          { ac_try='test -z "$ac_c_werror_flag"
5700                          || test ! -s conftest.err'
5701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5702   (eval $ac_try) 2>&5
5703   ac_status=$?
5704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5705   (exit $ac_status); }; } &&
5706          { ac_try='test -s conftest$ac_exeext'
5707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5708   (eval $ac_try) 2>&5
5709   ac_status=$?
5710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5711   (exit $ac_status); }; }; then
5712   ac_cv_lib_gen_main=yes
5713 else
5714   echo "$as_me: failed program was:" >&5
5715 sed 's/^/| /' conftest.$ac_ext >&5
5716
5717 ac_cv_lib_gen_main=no
5718 fi
5719 rm -f conftest.err conftest.$ac_objext \
5720       conftest$ac_exeext conftest.$ac_ext
5721 LIBS=$ac_check_lib_save_LIBS
5722 fi
5723 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
5724 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
5725 if test $ac_cv_lib_gen_main = yes; then
5726   cat >>confdefs.h <<_ACEOF
5727 #define HAVE_LIBGEN 1
5728 _ACEOF
5729
5730   LIBS="-lgen $LIBS"
5731
5732 fi
5733
5734
5735 echo "$as_me:$LINENO: checking for main in -lPW" >&5
5736 echo $ECHO_N "checking for main in -lPW... $ECHO_C" >&6
5737 if test "${ac_cv_lib_PW_main+set}" = set; then
5738   echo $ECHO_N "(cached) $ECHO_C" >&6
5739 else
5740   ac_check_lib_save_LIBS=$LIBS
5741 LIBS="-lPW  $LIBS"
5742 cat >conftest.$ac_ext <<_ACEOF
5743 /* confdefs.h.  */
5744 _ACEOF
5745 cat confdefs.h >>conftest.$ac_ext
5746 cat >>conftest.$ac_ext <<_ACEOF
5747 /* end confdefs.h.  */
5748
5749
5750 int
5751 main ()
5752 {
5753 main ();
5754   ;
5755   return 0;
5756 }
5757 _ACEOF
5758 rm -f conftest.$ac_objext conftest$ac_exeext
5759 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5760   (eval $ac_link) 2>conftest.er1
5761   ac_status=$?
5762   grep -v '^ *+' conftest.er1 >conftest.err
5763   rm -f conftest.er1
5764   cat conftest.err >&5
5765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766   (exit $ac_status); } &&
5767          { ac_try='test -z "$ac_c_werror_flag"
5768                          || test ! -s conftest.err'
5769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5770   (eval $ac_try) 2>&5
5771   ac_status=$?
5772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5773   (exit $ac_status); }; } &&
5774          { ac_try='test -s conftest$ac_exeext'
5775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5776   (eval $ac_try) 2>&5
5777   ac_status=$?
5778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5779   (exit $ac_status); }; }; then
5780   ac_cv_lib_PW_main=yes
5781 else
5782   echo "$as_me: failed program was:" >&5
5783 sed 's/^/| /' conftest.$ac_ext >&5
5784
5785 ac_cv_lib_PW_main=no
5786 fi
5787 rm -f conftest.err conftest.$ac_objext \
5788       conftest$ac_exeext conftest.$ac_ext
5789 LIBS=$ac_check_lib_save_LIBS
5790 fi
5791 echo "$as_me:$LINENO: result: $ac_cv_lib_PW_main" >&5
5792 echo "${ECHO_T}$ac_cv_lib_PW_main" >&6
5793 if test $ac_cv_lib_PW_main = yes; then
5794   cat >>confdefs.h <<_ACEOF
5795 #define HAVE_LIBPW 1
5796 _ACEOF
5797
5798   LIBS="-lPW $LIBS"
5799
5800 fi
5801
5802
5803 echo "$as_me:$LINENO: checking for main in -lresolv" >&5
5804 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
5805 if test "${ac_cv_lib_resolv_main+set}" = set; then
5806   echo $ECHO_N "(cached) $ECHO_C" >&6
5807 else
5808   ac_check_lib_save_LIBS=$LIBS
5809 LIBS="-lresolv  $LIBS"
5810 cat >conftest.$ac_ext <<_ACEOF
5811 /* confdefs.h.  */
5812 _ACEOF
5813 cat confdefs.h >>conftest.$ac_ext
5814 cat >>conftest.$ac_ext <<_ACEOF
5815 /* end confdefs.h.  */
5816
5817
5818 int
5819 main ()
5820 {
5821 main ();
5822   ;
5823   return 0;
5824 }
5825 _ACEOF
5826 rm -f conftest.$ac_objext conftest$ac_exeext
5827 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5828   (eval $ac_link) 2>conftest.er1
5829   ac_status=$?
5830   grep -v '^ *+' conftest.er1 >conftest.err
5831   rm -f conftest.er1
5832   cat conftest.err >&5
5833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834   (exit $ac_status); } &&
5835          { ac_try='test -z "$ac_c_werror_flag"
5836                          || test ! -s conftest.err'
5837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5838   (eval $ac_try) 2>&5
5839   ac_status=$?
5840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5841   (exit $ac_status); }; } &&
5842          { ac_try='test -s conftest$ac_exeext'
5843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5844   (eval $ac_try) 2>&5
5845   ac_status=$?
5846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5847   (exit $ac_status); }; }; then
5848   ac_cv_lib_resolv_main=yes
5849 else
5850   echo "$as_me: failed program was:" >&5
5851 sed 's/^/| /' conftest.$ac_ext >&5
5852
5853 ac_cv_lib_resolv_main=no
5854 fi
5855 rm -f conftest.err conftest.$ac_objext \
5856       conftest$ac_exeext conftest.$ac_ext
5857 LIBS=$ac_check_lib_save_LIBS
5858 fi
5859 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
5860 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
5861 if test $ac_cv_lib_resolv_main = yes; then
5862   cat >>confdefs.h <<_ACEOF
5863 #define HAVE_LIBRESOLV 1
5864 _ACEOF
5865
5866   LIBS="-lresolv $LIBS"
5867
5868 fi
5869
5870 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5871 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5872 if test "${ac_cv_search_getopt_long+set}" = set; then
5873   echo $ECHO_N "(cached) $ECHO_C" >&6
5874 else
5875   ac_func_search_save_LIBS=$LIBS
5876 ac_cv_search_getopt_long=no
5877 cat >conftest.$ac_ext <<_ACEOF
5878 /* confdefs.h.  */
5879 _ACEOF
5880 cat confdefs.h >>conftest.$ac_ext
5881 cat >>conftest.$ac_ext <<_ACEOF
5882 /* end confdefs.h.  */
5883
5884 /* Override any gcc2 internal prototype to avoid an error.  */
5885 #ifdef __cplusplus
5886 extern "C"
5887 #endif
5888 /* We use char because int might match the return type of a gcc2
5889    builtin and then its argument prototype would still apply.  */
5890 char getopt_long ();
5891 int
5892 main ()
5893 {
5894 getopt_long ();
5895   ;
5896   return 0;
5897 }
5898 _ACEOF
5899 rm -f conftest.$ac_objext conftest$ac_exeext
5900 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5901   (eval $ac_link) 2>conftest.er1
5902   ac_status=$?
5903   grep -v '^ *+' conftest.er1 >conftest.err
5904   rm -f conftest.er1
5905   cat conftest.err >&5
5906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907   (exit $ac_status); } &&
5908          { ac_try='test -z "$ac_c_werror_flag"
5909                          || test ! -s conftest.err'
5910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5911   (eval $ac_try) 2>&5
5912   ac_status=$?
5913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914   (exit $ac_status); }; } &&
5915          { ac_try='test -s conftest$ac_exeext'
5916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5917   (eval $ac_try) 2>&5
5918   ac_status=$?
5919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920   (exit $ac_status); }; }; then
5921   ac_cv_search_getopt_long="none required"
5922 else
5923   echo "$as_me: failed program was:" >&5
5924 sed 's/^/| /' conftest.$ac_ext >&5
5925
5926 fi
5927 rm -f conftest.err conftest.$ac_objext \
5928       conftest$ac_exeext conftest.$ac_ext
5929 if test "$ac_cv_search_getopt_long" = no; then
5930   for ac_lib in getopt gnugetopt; do
5931     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5932     cat >conftest.$ac_ext <<_ACEOF
5933 /* confdefs.h.  */
5934 _ACEOF
5935 cat confdefs.h >>conftest.$ac_ext
5936 cat >>conftest.$ac_ext <<_ACEOF
5937 /* end confdefs.h.  */
5938
5939 /* Override any gcc2 internal prototype to avoid an error.  */
5940 #ifdef __cplusplus
5941 extern "C"
5942 #endif
5943 /* We use char because int might match the return type of a gcc2
5944    builtin and then its argument prototype would still apply.  */
5945 char getopt_long ();
5946 int
5947 main ()
5948 {
5949 getopt_long ();
5950   ;
5951   return 0;
5952 }
5953 _ACEOF
5954 rm -f conftest.$ac_objext conftest$ac_exeext
5955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5956   (eval $ac_link) 2>conftest.er1
5957   ac_status=$?
5958   grep -v '^ *+' conftest.er1 >conftest.err
5959   rm -f conftest.er1
5960   cat conftest.err >&5
5961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5962   (exit $ac_status); } &&
5963          { ac_try='test -z "$ac_c_werror_flag"
5964                          || test ! -s conftest.err'
5965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5966   (eval $ac_try) 2>&5
5967   ac_status=$?
5968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5969   (exit $ac_status); }; } &&
5970          { ac_try='test -s conftest$ac_exeext'
5971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5972   (eval $ac_try) 2>&5
5973   ac_status=$?
5974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5975   (exit $ac_status); }; }; then
5976   ac_cv_search_getopt_long="-l$ac_lib"
5977 break
5978 else
5979   echo "$as_me: failed program was:" >&5
5980 sed 's/^/| /' conftest.$ac_ext >&5
5981
5982 fi
5983 rm -f conftest.err conftest.$ac_objext \
5984       conftest$ac_exeext conftest.$ac_ext
5985   done
5986 fi
5987 LIBS=$ac_func_search_save_LIBS
5988 fi
5989 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5990 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5991 if test "$ac_cv_search_getopt_long" != no; then
5992   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5993
5994 fi
5995
5996 # QNX:
5997
5998 echo "$as_me:$LINENO: checking for main in -lunix" >&5
5999 echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
6000 if test "${ac_cv_lib_unix_main+set}" = set; then
6001   echo $ECHO_N "(cached) $ECHO_C" >&6
6002 else
6003   ac_check_lib_save_LIBS=$LIBS
6004 LIBS="-lunix  $LIBS"
6005 cat >conftest.$ac_ext <<_ACEOF
6006 /* confdefs.h.  */
6007 _ACEOF
6008 cat confdefs.h >>conftest.$ac_ext
6009 cat >>conftest.$ac_ext <<_ACEOF
6010 /* end confdefs.h.  */
6011
6012
6013 int
6014 main ()
6015 {
6016 main ();
6017   ;
6018   return 0;
6019 }
6020 _ACEOF
6021 rm -f conftest.$ac_objext conftest$ac_exeext
6022 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6023   (eval $ac_link) 2>conftest.er1
6024   ac_status=$?
6025   grep -v '^ *+' conftest.er1 >conftest.err
6026   rm -f conftest.er1
6027   cat conftest.err >&5
6028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6029   (exit $ac_status); } &&
6030          { ac_try='test -z "$ac_c_werror_flag"
6031                          || test ! -s conftest.err'
6032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6033   (eval $ac_try) 2>&5
6034   ac_status=$?
6035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6036   (exit $ac_status); }; } &&
6037          { ac_try='test -s conftest$ac_exeext'
6038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6039   (eval $ac_try) 2>&5
6040   ac_status=$?
6041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042   (exit $ac_status); }; }; then
6043   ac_cv_lib_unix_main=yes
6044 else
6045   echo "$as_me: failed program was:" >&5
6046 sed 's/^/| /' conftest.$ac_ext >&5
6047
6048 ac_cv_lib_unix_main=no
6049 fi
6050 rm -f conftest.err conftest.$ac_objext \
6051       conftest$ac_exeext conftest.$ac_ext
6052 LIBS=$ac_check_lib_save_LIBS
6053 fi
6054 echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
6055 echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
6056 if test $ac_cv_lib_unix_main = yes; then
6057   cat >>confdefs.h <<_ACEOF
6058 #define HAVE_LIBUNIX 1
6059 _ACEOF
6060
6061   LIBS="-lunix $LIBS"
6062
6063 fi
6064
6065 echo "$as_me:$LINENO: checking for library containing crypt" >&5
6066 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
6067 if test "${ac_cv_search_crypt+set}" = set; then
6068   echo $ECHO_N "(cached) $ECHO_C" >&6
6069 else
6070   ac_func_search_save_LIBS=$LIBS
6071 ac_cv_search_crypt=no
6072 cat >conftest.$ac_ext <<_ACEOF
6073 /* confdefs.h.  */
6074 _ACEOF
6075 cat confdefs.h >>conftest.$ac_ext
6076 cat >>conftest.$ac_ext <<_ACEOF
6077 /* end confdefs.h.  */
6078
6079 /* Override any gcc2 internal prototype to avoid an error.  */
6080 #ifdef __cplusplus
6081 extern "C"
6082 #endif
6083 /* We use char because int might match the return type of a gcc2
6084    builtin and then its argument prototype would still apply.  */
6085 char crypt ();
6086 int
6087 main ()
6088 {
6089 crypt ();
6090   ;
6091   return 0;
6092 }
6093 _ACEOF
6094 rm -f conftest.$ac_objext conftest$ac_exeext
6095 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6096   (eval $ac_link) 2>conftest.er1
6097   ac_status=$?
6098   grep -v '^ *+' conftest.er1 >conftest.err
6099   rm -f conftest.er1
6100   cat conftest.err >&5
6101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6102   (exit $ac_status); } &&
6103          { ac_try='test -z "$ac_c_werror_flag"
6104                          || test ! -s conftest.err'
6105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6106   (eval $ac_try) 2>&5
6107   ac_status=$?
6108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6109   (exit $ac_status); }; } &&
6110          { ac_try='test -s conftest$ac_exeext'
6111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6112   (eval $ac_try) 2>&5
6113   ac_status=$?
6114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6115   (exit $ac_status); }; }; then
6116   ac_cv_search_crypt="none required"
6117 else
6118   echo "$as_me: failed program was:" >&5
6119 sed 's/^/| /' conftest.$ac_ext >&5
6120
6121 fi
6122 rm -f conftest.err conftest.$ac_objext \
6123       conftest$ac_exeext conftest.$ac_ext
6124 if test "$ac_cv_search_crypt" = no; then
6125   for ac_lib in crypt; do
6126     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6127     cat >conftest.$ac_ext <<_ACEOF
6128 /* confdefs.h.  */
6129 _ACEOF
6130 cat confdefs.h >>conftest.$ac_ext
6131 cat >>conftest.$ac_ext <<_ACEOF
6132 /* end confdefs.h.  */
6133
6134 /* Override any gcc2 internal prototype to avoid an error.  */
6135 #ifdef __cplusplus
6136 extern "C"
6137 #endif
6138 /* We use char because int might match the return type of a gcc2
6139    builtin and then its argument prototype would still apply.  */
6140 char crypt ();
6141 int
6142 main ()
6143 {
6144 crypt ();
6145   ;
6146   return 0;
6147 }
6148 _ACEOF
6149 rm -f conftest.$ac_objext conftest$ac_exeext
6150 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6151   (eval $ac_link) 2>conftest.er1
6152   ac_status=$?
6153   grep -v '^ *+' conftest.er1 >conftest.err
6154   rm -f conftest.er1
6155   cat conftest.err >&5
6156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6157   (exit $ac_status); } &&
6158          { ac_try='test -z "$ac_c_werror_flag"
6159                          || test ! -s conftest.err'
6160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6161   (eval $ac_try) 2>&5
6162   ac_status=$?
6163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164   (exit $ac_status); }; } &&
6165          { ac_try='test -s conftest$ac_exeext'
6166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6167   (eval $ac_try) 2>&5
6168   ac_status=$?
6169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6170   (exit $ac_status); }; }; then
6171   ac_cv_search_crypt="-l$ac_lib"
6172 break
6173 else
6174   echo "$as_me: failed program was:" >&5
6175 sed 's/^/| /' conftest.$ac_ext >&5
6176
6177 fi
6178 rm -f conftest.err conftest.$ac_objext \
6179       conftest$ac_exeext conftest.$ac_ext
6180   done
6181 fi
6182 LIBS=$ac_func_search_save_LIBS
6183 fi
6184 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6185 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6186 if test "$ac_cv_search_crypt" != no; then
6187   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6188
6189 fi
6190
6191 # BeOS:
6192 if test "$PORTNAME" = "beos"
6193 then
6194
6195 echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
6196 echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
6197 if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
6198   echo $ECHO_N "(cached) $ECHO_C" >&6
6199 else
6200   ac_check_lib_save_LIBS=$LIBS
6201 LIBS="-lbind  $LIBS"
6202 cat >conftest.$ac_ext <<_ACEOF
6203 /* confdefs.h.  */
6204 _ACEOF
6205 cat confdefs.h >>conftest.$ac_ext
6206 cat >>conftest.$ac_ext <<_ACEOF
6207 /* end confdefs.h.  */
6208
6209 /* Override any gcc2 internal prototype to avoid an error.  */
6210 #ifdef __cplusplus
6211 extern "C"
6212 #endif
6213 /* We use char because int might match the return type of a gcc2
6214    builtin and then its argument prototype would still apply.  */
6215 char __inet_ntoa ();
6216 int
6217 main ()
6218 {
6219 __inet_ntoa ();
6220   ;
6221   return 0;
6222 }
6223 _ACEOF
6224 rm -f conftest.$ac_objext conftest$ac_exeext
6225 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6226   (eval $ac_link) 2>conftest.er1
6227   ac_status=$?
6228   grep -v '^ *+' conftest.er1 >conftest.err
6229   rm -f conftest.er1
6230   cat conftest.err >&5
6231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6232   (exit $ac_status); } &&
6233          { ac_try='test -z "$ac_c_werror_flag"
6234                          || test ! -s conftest.err'
6235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6236   (eval $ac_try) 2>&5
6237   ac_status=$?
6238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6239   (exit $ac_status); }; } &&
6240          { ac_try='test -s conftest$ac_exeext'
6241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6242   (eval $ac_try) 2>&5
6243   ac_status=$?
6244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6245   (exit $ac_status); }; }; then
6246   ac_cv_lib_bind___inet_ntoa=yes
6247 else
6248   echo "$as_me: failed program was:" >&5
6249 sed 's/^/| /' conftest.$ac_ext >&5
6250
6251 ac_cv_lib_bind___inet_ntoa=no
6252 fi
6253 rm -f conftest.err conftest.$ac_objext \
6254       conftest$ac_exeext conftest.$ac_ext
6255 LIBS=$ac_check_lib_save_LIBS
6256 fi
6257 echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
6258 echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
6259 if test $ac_cv_lib_bind___inet_ntoa = yes; then
6260   cat >>confdefs.h <<_ACEOF
6261 #define HAVE_LIBBIND 1
6262 _ACEOF
6263
6264   LIBS="-lbind $LIBS"
6265
6266 fi
6267
6268 fi
6269 # Solaris:
6270 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6271 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6272 if test "${ac_cv_search_fdatasync+set}" = set; then
6273   echo $ECHO_N "(cached) $ECHO_C" >&6
6274 else
6275   ac_func_search_save_LIBS=$LIBS
6276 ac_cv_search_fdatasync=no
6277 cat >conftest.$ac_ext <<_ACEOF
6278 /* confdefs.h.  */
6279 _ACEOF
6280 cat confdefs.h >>conftest.$ac_ext
6281 cat >>conftest.$ac_ext <<_ACEOF
6282 /* end confdefs.h.  */
6283
6284 /* Override any gcc2 internal prototype to avoid an error.  */
6285 #ifdef __cplusplus
6286 extern "C"
6287 #endif
6288 /* We use char because int might match the return type of a gcc2
6289    builtin and then its argument prototype would still apply.  */
6290 char fdatasync ();
6291 int
6292 main ()
6293 {
6294 fdatasync ();
6295   ;
6296   return 0;
6297 }
6298 _ACEOF
6299 rm -f conftest.$ac_objext conftest$ac_exeext
6300 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6301   (eval $ac_link) 2>conftest.er1
6302   ac_status=$?
6303   grep -v '^ *+' conftest.er1 >conftest.err
6304   rm -f conftest.er1
6305   cat conftest.err >&5
6306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6307   (exit $ac_status); } &&
6308          { ac_try='test -z "$ac_c_werror_flag"
6309                          || test ! -s conftest.err'
6310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6311   (eval $ac_try) 2>&5
6312   ac_status=$?
6313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6314   (exit $ac_status); }; } &&
6315          { ac_try='test -s conftest$ac_exeext'
6316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6317   (eval $ac_try) 2>&5
6318   ac_status=$?
6319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6320   (exit $ac_status); }; }; then
6321   ac_cv_search_fdatasync="none required"
6322 else
6323   echo "$as_me: failed program was:" >&5
6324 sed 's/^/| /' conftest.$ac_ext >&5
6325
6326 fi
6327 rm -f conftest.err conftest.$ac_objext \
6328       conftest$ac_exeext conftest.$ac_ext
6329 if test "$ac_cv_search_fdatasync" = no; then
6330   for ac_lib in rt posix4; do
6331     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6332     cat >conftest.$ac_ext <<_ACEOF
6333 /* confdefs.h.  */
6334 _ACEOF
6335 cat confdefs.h >>conftest.$ac_ext
6336 cat >>conftest.$ac_ext <<_ACEOF
6337 /* end confdefs.h.  */
6338
6339 /* Override any gcc2 internal prototype to avoid an error.  */
6340 #ifdef __cplusplus
6341 extern "C"
6342 #endif
6343 /* We use char because int might match the return type of a gcc2
6344    builtin and then its argument prototype would still apply.  */
6345 char fdatasync ();
6346 int
6347 main ()
6348 {
6349 fdatasync ();
6350   ;
6351   return 0;
6352 }
6353 _ACEOF
6354 rm -f conftest.$ac_objext conftest$ac_exeext
6355 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6356   (eval $ac_link) 2>conftest.er1
6357   ac_status=$?
6358   grep -v '^ *+' conftest.er1 >conftest.err
6359   rm -f conftest.er1
6360   cat conftest.err >&5
6361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362   (exit $ac_status); } &&
6363          { ac_try='test -z "$ac_c_werror_flag"
6364                          || test ! -s conftest.err'
6365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6366   (eval $ac_try) 2>&5
6367   ac_status=$?
6368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369   (exit $ac_status); }; } &&
6370          { ac_try='test -s conftest$ac_exeext'
6371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6372   (eval $ac_try) 2>&5
6373   ac_status=$?
6374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6375   (exit $ac_status); }; }; then
6376   ac_cv_search_fdatasync="-l$ac_lib"
6377 break
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   done
6386 fi
6387 LIBS=$ac_func_search_save_LIBS
6388 fi
6389 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6390 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6391 if test "$ac_cv_search_fdatasync" != no; then
6392   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6393
6394 fi
6395
6396 # Cygwin:
6397
6398 echo "$as_me:$LINENO: checking for shmget in -lcygipc" >&5
6399 echo $ECHO_N "checking for shmget in -lcygipc... $ECHO_C" >&6
6400 if test "${ac_cv_lib_cygipc_shmget+set}" = set; then
6401   echo $ECHO_N "(cached) $ECHO_C" >&6
6402 else
6403   ac_check_lib_save_LIBS=$LIBS
6404 LIBS="-lcygipc  $LIBS"
6405 cat >conftest.$ac_ext <<_ACEOF
6406 /* confdefs.h.  */
6407 _ACEOF
6408 cat confdefs.h >>conftest.$ac_ext
6409 cat >>conftest.$ac_ext <<_ACEOF
6410 /* end confdefs.h.  */
6411
6412 /* Override any gcc2 internal prototype to avoid an error.  */
6413 #ifdef __cplusplus
6414 extern "C"
6415 #endif
6416 /* We use char because int might match the return type of a gcc2
6417    builtin and then its argument prototype would still apply.  */
6418 char shmget ();
6419 int
6420 main ()
6421 {
6422 shmget ();
6423   ;
6424   return 0;
6425 }
6426 _ACEOF
6427 rm -f conftest.$ac_objext conftest$ac_exeext
6428 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6429   (eval $ac_link) 2>conftest.er1
6430   ac_status=$?
6431   grep -v '^ *+' conftest.er1 >conftest.err
6432   rm -f conftest.er1
6433   cat conftest.err >&5
6434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6435   (exit $ac_status); } &&
6436          { ac_try='test -z "$ac_c_werror_flag"
6437                          || test ! -s conftest.err'
6438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6439   (eval $ac_try) 2>&5
6440   ac_status=$?
6441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6442   (exit $ac_status); }; } &&
6443          { ac_try='test -s conftest$ac_exeext'
6444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6445   (eval $ac_try) 2>&5
6446   ac_status=$?
6447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6448   (exit $ac_status); }; }; then
6449   ac_cv_lib_cygipc_shmget=yes
6450 else
6451   echo "$as_me: failed program was:" >&5
6452 sed 's/^/| /' conftest.$ac_ext >&5
6453
6454 ac_cv_lib_cygipc_shmget=no
6455 fi
6456 rm -f conftest.err conftest.$ac_objext \
6457       conftest$ac_exeext conftest.$ac_ext
6458 LIBS=$ac_check_lib_save_LIBS
6459 fi
6460 echo "$as_me:$LINENO: result: $ac_cv_lib_cygipc_shmget" >&5
6461 echo "${ECHO_T}$ac_cv_lib_cygipc_shmget" >&6
6462 if test $ac_cv_lib_cygipc_shmget = yes; then
6463   cat >>confdefs.h <<_ACEOF
6464 #define HAVE_LIBCYGIPC 1
6465 _ACEOF
6466
6467   LIBS="-lcygipc $LIBS"
6468
6469 fi
6470
6471 # WIN32:
6472 if test "$PORTNAME" = "win32"
6473 then
6474
6475 echo "$as_me:$LINENO: checking for main in -lwsock32" >&5
6476 echo $ECHO_N "checking for main in -lwsock32... $ECHO_C" >&6
6477 if test "${ac_cv_lib_wsock32_main+set}" = set; then
6478   echo $ECHO_N "(cached) $ECHO_C" >&6
6479 else
6480   ac_check_lib_save_LIBS=$LIBS
6481 LIBS="-lwsock32  $LIBS"
6482 cat >conftest.$ac_ext <<_ACEOF
6483 /* confdefs.h.  */
6484 _ACEOF
6485 cat confdefs.h >>conftest.$ac_ext
6486 cat >>conftest.$ac_ext <<_ACEOF
6487 /* end confdefs.h.  */
6488
6489
6490 int
6491 main ()
6492 {
6493 main ();
6494   ;
6495   return 0;
6496 }
6497 _ACEOF
6498 rm -f conftest.$ac_objext conftest$ac_exeext
6499 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6500   (eval $ac_link) 2>conftest.er1
6501   ac_status=$?
6502   grep -v '^ *+' conftest.er1 >conftest.err
6503   rm -f conftest.er1
6504   cat conftest.err >&5
6505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506   (exit $ac_status); } &&
6507          { ac_try='test -z "$ac_c_werror_flag"
6508                          || test ! -s conftest.err'
6509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6510   (eval $ac_try) 2>&5
6511   ac_status=$?
6512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6513   (exit $ac_status); }; } &&
6514          { ac_try='test -s conftest$ac_exeext'
6515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6516   (eval $ac_try) 2>&5
6517   ac_status=$?
6518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6519   (exit $ac_status); }; }; then
6520   ac_cv_lib_wsock32_main=yes
6521 else
6522   echo "$as_me: failed program was:" >&5
6523 sed 's/^/| /' conftest.$ac_ext >&5
6524
6525 ac_cv_lib_wsock32_main=no
6526 fi
6527 rm -f conftest.err conftest.$ac_objext \
6528       conftest$ac_exeext conftest.$ac_ext
6529 LIBS=$ac_check_lib_save_LIBS
6530 fi
6531 echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_main" >&5
6532 echo "${ECHO_T}$ac_cv_lib_wsock32_main" >&6
6533 if test $ac_cv_lib_wsock32_main = yes; then
6534   cat >>confdefs.h <<_ACEOF
6535 #define HAVE_LIBWSOCK32 1
6536 _ACEOF
6537
6538   LIBS="-lwsock32 $LIBS"
6539
6540 fi
6541
6542 fi
6543
6544 if test "$with_readline" = yes; then
6545
6546 echo "$as_me:$LINENO: checking for readline" >&5
6547 echo $ECHO_N "checking for readline... $ECHO_C" >&6
6548
6549 if test "${pgac_cv_check_readline+set}" = set; then
6550   echo $ECHO_N "(cached) $ECHO_C" >&6
6551 else
6552   pgac_cv_check_readline=no
6553 pgac_save_LIBS=$LIBS
6554 for pgac_rllib in -lreadline -ledit ; do
6555   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6556     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6557     cat >conftest.$ac_ext <<_ACEOF
6558 /* confdefs.h.  */
6559 _ACEOF
6560 cat confdefs.h >>conftest.$ac_ext
6561 cat >>conftest.$ac_ext <<_ACEOF
6562 /* end confdefs.h.  */
6563
6564 /* Override any gcc2 internal prototype to avoid an error.  */
6565 #ifdef __cplusplus
6566 extern "C"
6567 #endif
6568 /* We use char because int might match the return type of a gcc2
6569    builtin and then its argument prototype would still apply.  */
6570 char readline ();
6571 int
6572 main ()
6573 {
6574 readline ();
6575   ;
6576   return 0;
6577 }
6578 _ACEOF
6579 rm -f conftest.$ac_objext conftest$ac_exeext
6580 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6581   (eval $ac_link) 2>conftest.er1
6582   ac_status=$?
6583   grep -v '^ *+' conftest.er1 >conftest.err
6584   rm -f conftest.er1
6585   cat conftest.err >&5
6586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6587   (exit $ac_status); } &&
6588          { ac_try='test -z "$ac_c_werror_flag"
6589                          || test ! -s conftest.err'
6590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6591   (eval $ac_try) 2>&5
6592   ac_status=$?
6593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6594   (exit $ac_status); }; } &&
6595          { ac_try='test -s conftest$ac_exeext'
6596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6597   (eval $ac_try) 2>&5
6598   ac_status=$?
6599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6600   (exit $ac_status); }; }; then
6601
6602       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6603       # recognize dependent libraries; assume curses is needed if we didn't
6604       # find any dependency.
6605       case $host_os in
6606         netbsd* | openbsd* | irix*)
6607           if test x"$pgac_lib" = x"" ; then
6608             pgac_lib=" -lcurses"
6609           fi ;;
6610       esac
6611
6612       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6613       break 2
6614
6615 else
6616   echo "$as_me: failed program was:" >&5
6617 sed 's/^/| /' conftest.$ac_ext >&5
6618
6619 fi
6620 rm -f conftest.err conftest.$ac_objext \
6621       conftest$ac_exeext conftest.$ac_ext
6622   done
6623 done
6624 LIBS=$pgac_save_LIBS
6625
6626 fi
6627
6628 if test "$pgac_cv_check_readline" != no ; then
6629
6630 cat >>confdefs.h <<\_ACEOF
6631 #define HAVE_LIBREADLINE 1
6632 _ACEOF
6633
6634   LIBS="$pgac_cv_check_readline $LIBS"
6635   echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6636 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6637 else
6638   echo "$as_me:$LINENO: result: no" >&5
6639 echo "${ECHO_T}no" >&6
6640 fi
6641   if test x"$pgac_cv_check_readline" = x"no"; then
6642     { { echo "$as_me:$LINENO: error: readline library not found
6643 If you have readline already installed, see config.log for details on the
6644 failure.  It is possible the compiler isn't looking in the proper directory.
6645 Use --without-readline to disable readline support." >&5
6646 echo "$as_me: error: readline library not found
6647 If you have readline already installed, see config.log for details on the
6648 failure.  It is possible the compiler isn't looking in the proper directory.
6649 Use --without-readline to disable readline support." >&2;}
6650    { (exit 1); exit 1; }; }
6651   fi
6652 fi
6653
6654 if test "$with_zlib" = yes; then
6655
6656 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6657 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6658 if test "${ac_cv_lib_z_inflate+set}" = set; then
6659   echo $ECHO_N "(cached) $ECHO_C" >&6
6660 else
6661   ac_check_lib_save_LIBS=$LIBS
6662 LIBS="-lz  $LIBS"
6663 cat >conftest.$ac_ext <<_ACEOF
6664 /* confdefs.h.  */
6665 _ACEOF
6666 cat confdefs.h >>conftest.$ac_ext
6667 cat >>conftest.$ac_ext <<_ACEOF
6668 /* end confdefs.h.  */
6669
6670 /* Override any gcc2 internal prototype to avoid an error.  */
6671 #ifdef __cplusplus
6672 extern "C"
6673 #endif
6674 /* We use char because int might match the return type of a gcc2
6675    builtin and then its argument prototype would still apply.  */
6676 char inflate ();
6677 int
6678 main ()
6679 {
6680 inflate ();
6681   ;
6682   return 0;
6683 }
6684 _ACEOF
6685 rm -f conftest.$ac_objext conftest$ac_exeext
6686 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6687   (eval $ac_link) 2>conftest.er1
6688   ac_status=$?
6689   grep -v '^ *+' conftest.er1 >conftest.err
6690   rm -f conftest.er1
6691   cat conftest.err >&5
6692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6693   (exit $ac_status); } &&
6694          { ac_try='test -z "$ac_c_werror_flag"
6695                          || test ! -s conftest.err'
6696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6697   (eval $ac_try) 2>&5
6698   ac_status=$?
6699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700   (exit $ac_status); }; } &&
6701          { ac_try='test -s conftest$ac_exeext'
6702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6703   (eval $ac_try) 2>&5
6704   ac_status=$?
6705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6706   (exit $ac_status); }; }; then
6707   ac_cv_lib_z_inflate=yes
6708 else
6709   echo "$as_me: failed program was:" >&5
6710 sed 's/^/| /' conftest.$ac_ext >&5
6711
6712 ac_cv_lib_z_inflate=no
6713 fi
6714 rm -f conftest.err conftest.$ac_objext \
6715       conftest$ac_exeext conftest.$ac_ext
6716 LIBS=$ac_check_lib_save_LIBS
6717 fi
6718 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6719 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6720 if test $ac_cv_lib_z_inflate = yes; then
6721   cat >>confdefs.h <<_ACEOF
6722 #define HAVE_LIBZ 1
6723 _ACEOF
6724
6725   LIBS="-lz $LIBS"
6726
6727 else
6728   { { echo "$as_me:$LINENO: error: zlib library not found
6729 If you have zlib already installed, see config.log for details on the
6730 failure.  It is possible the compiler isn't looking in the proper directory.
6731 Use --without-zlib to disable zlib support." >&5
6732 echo "$as_me: error: zlib library not found
6733 If you have zlib already installed, see config.log for details on the
6734 failure.  It is possible the compiler isn't looking in the proper directory.
6735 Use --without-zlib to disable zlib support." >&2;}
6736    { (exit 1); exit 1; }; }
6737 fi
6738
6739 fi
6740
6741 if test "$enable_spinlocks" = yes; then
6742
6743 cat >>confdefs.h <<\_ACEOF
6744 #define HAVE_SPINLOCKS 1
6745 _ACEOF
6746
6747 else
6748   { echo "$as_me:$LINENO: WARNING:
6749 *** Not using spinlocks will cause poor performance." >&5
6750 echo "$as_me: WARNING:
6751 *** Not using spinlocks will cause poor performance." >&2;}
6752 fi
6753
6754 if test "$with_krb5" = yes ; then
6755   if test "$PORTNAME" != "win32"; then
6756      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6757 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6758 if test "${ac_cv_search_com_err+set}" = set; then
6759   echo $ECHO_N "(cached) $ECHO_C" >&6
6760 else
6761   ac_func_search_save_LIBS=$LIBS
6762 ac_cv_search_com_err=no
6763 cat >conftest.$ac_ext <<_ACEOF
6764 /* confdefs.h.  */
6765 _ACEOF
6766 cat confdefs.h >>conftest.$ac_ext
6767 cat >>conftest.$ac_ext <<_ACEOF
6768 /* end confdefs.h.  */
6769
6770 /* Override any gcc2 internal prototype to avoid an error.  */
6771 #ifdef __cplusplus
6772 extern "C"
6773 #endif
6774 /* We use char because int might match the return type of a gcc2
6775    builtin and then its argument prototype would still apply.  */
6776 char com_err ();
6777 int
6778 main ()
6779 {
6780 com_err ();
6781   ;
6782   return 0;
6783 }
6784 _ACEOF
6785 rm -f conftest.$ac_objext conftest$ac_exeext
6786 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6787   (eval $ac_link) 2>conftest.er1
6788   ac_status=$?
6789   grep -v '^ *+' conftest.er1 >conftest.err
6790   rm -f conftest.er1
6791   cat conftest.err >&5
6792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6793   (exit $ac_status); } &&
6794          { ac_try='test -z "$ac_c_werror_flag"
6795                          || test ! -s conftest.err'
6796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6797   (eval $ac_try) 2>&5
6798   ac_status=$?
6799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6800   (exit $ac_status); }; } &&
6801          { ac_try='test -s conftest$ac_exeext'
6802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6803   (eval $ac_try) 2>&5
6804   ac_status=$?
6805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6806   (exit $ac_status); }; }; then
6807   ac_cv_search_com_err="none required"
6808 else
6809   echo "$as_me: failed program was:" >&5
6810 sed 's/^/| /' conftest.$ac_ext >&5
6811
6812 fi
6813 rm -f conftest.err conftest.$ac_objext \
6814       conftest$ac_exeext conftest.$ac_ext
6815 if test "$ac_cv_search_com_err" = no; then
6816   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6817     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6818     cat >conftest.$ac_ext <<_ACEOF
6819 /* confdefs.h.  */
6820 _ACEOF
6821 cat confdefs.h >>conftest.$ac_ext
6822 cat >>conftest.$ac_ext <<_ACEOF
6823 /* end confdefs.h.  */
6824
6825 /* Override any gcc2 internal prototype to avoid an error.  */
6826 #ifdef __cplusplus
6827 extern "C"
6828 #endif
6829 /* We use char because int might match the return type of a gcc2
6830    builtin and then its argument prototype would still apply.  */
6831 char com_err ();
6832 int
6833 main ()
6834 {
6835 com_err ();
6836   ;
6837   return 0;
6838 }
6839 _ACEOF
6840 rm -f conftest.$ac_objext conftest$ac_exeext
6841 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6842   (eval $ac_link) 2>conftest.er1
6843   ac_status=$?
6844   grep -v '^ *+' conftest.er1 >conftest.err
6845   rm -f conftest.er1
6846   cat conftest.err >&5
6847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6848   (exit $ac_status); } &&
6849          { ac_try='test -z "$ac_c_werror_flag"
6850                          || test ! -s conftest.err'
6851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6852   (eval $ac_try) 2>&5
6853   ac_status=$?
6854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6855   (exit $ac_status); }; } &&
6856          { ac_try='test -s conftest$ac_exeext'
6857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6858   (eval $ac_try) 2>&5
6859   ac_status=$?
6860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6861   (exit $ac_status); }; }; then
6862   ac_cv_search_com_err="-l$ac_lib"
6863 break
6864 else
6865   echo "$as_me: failed program was:" >&5
6866 sed 's/^/| /' conftest.$ac_ext >&5
6867
6868 fi
6869 rm -f conftest.err conftest.$ac_objext \
6870       conftest$ac_exeext conftest.$ac_ext
6871   done
6872 fi
6873 LIBS=$ac_func_search_save_LIBS
6874 fi
6875 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6876 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6877 if test "$ac_cv_search_com_err" != no; then
6878   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6879
6880 else
6881   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6882 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6883    { (exit 1); exit 1; }; }
6884 fi
6885
6886      echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
6887 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
6888 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
6889   echo $ECHO_N "(cached) $ECHO_C" >&6
6890 else
6891   ac_func_search_save_LIBS=$LIBS
6892 ac_cv_search_krb5_encrypt=no
6893 cat >conftest.$ac_ext <<_ACEOF
6894 /* confdefs.h.  */
6895 _ACEOF
6896 cat confdefs.h >>conftest.$ac_ext
6897 cat >>conftest.$ac_ext <<_ACEOF
6898 /* end confdefs.h.  */
6899
6900 /* Override any gcc2 internal prototype to avoid an error.  */
6901 #ifdef __cplusplus
6902 extern "C"
6903 #endif
6904 /* We use char because int might match the return type of a gcc2
6905    builtin and then its argument prototype would still apply.  */
6906 char krb5_encrypt ();
6907 int
6908 main ()
6909 {
6910 krb5_encrypt ();
6911   ;
6912   return 0;
6913 }
6914 _ACEOF
6915 rm -f conftest.$ac_objext conftest$ac_exeext
6916 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6917   (eval $ac_link) 2>conftest.er1
6918   ac_status=$?
6919   grep -v '^ *+' conftest.er1 >conftest.err
6920   rm -f conftest.er1
6921   cat conftest.err >&5
6922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6923   (exit $ac_status); } &&
6924          { ac_try='test -z "$ac_c_werror_flag"
6925                          || test ! -s conftest.err'
6926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6927   (eval $ac_try) 2>&5
6928   ac_status=$?
6929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6930   (exit $ac_status); }; } &&
6931          { ac_try='test -s conftest$ac_exeext'
6932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6933   (eval $ac_try) 2>&5
6934   ac_status=$?
6935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6936   (exit $ac_status); }; }; then
6937   ac_cv_search_krb5_encrypt="none required"
6938 else
6939   echo "$as_me: failed program was:" >&5
6940 sed 's/^/| /' conftest.$ac_ext >&5
6941
6942 fi
6943 rm -f conftest.err conftest.$ac_objext \
6944       conftest$ac_exeext conftest.$ac_ext
6945 if test "$ac_cv_search_krb5_encrypt" = no; then
6946   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
6947     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6948     cat >conftest.$ac_ext <<_ACEOF
6949 /* confdefs.h.  */
6950 _ACEOF
6951 cat confdefs.h >>conftest.$ac_ext
6952 cat >>conftest.$ac_ext <<_ACEOF
6953 /* end confdefs.h.  */
6954
6955 /* Override any gcc2 internal prototype to avoid an error.  */
6956 #ifdef __cplusplus
6957 extern "C"
6958 #endif
6959 /* We use char because int might match the return type of a gcc2
6960    builtin and then its argument prototype would still apply.  */
6961 char krb5_encrypt ();
6962 int
6963 main ()
6964 {
6965 krb5_encrypt ();
6966   ;
6967   return 0;
6968 }
6969 _ACEOF
6970 rm -f conftest.$ac_objext conftest$ac_exeext
6971 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6972   (eval $ac_link) 2>conftest.er1
6973   ac_status=$?
6974   grep -v '^ *+' conftest.er1 >conftest.err
6975   rm -f conftest.er1
6976   cat conftest.err >&5
6977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6978   (exit $ac_status); } &&
6979          { ac_try='test -z "$ac_c_werror_flag"
6980                          || test ! -s conftest.err'
6981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6982   (eval $ac_try) 2>&5
6983   ac_status=$?
6984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6985   (exit $ac_status); }; } &&
6986          { ac_try='test -s conftest$ac_exeext'
6987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6988   (eval $ac_try) 2>&5
6989   ac_status=$?
6990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6991   (exit $ac_status); }; }; then
6992   ac_cv_search_krb5_encrypt="-l$ac_lib"
6993 break
6994 else
6995   echo "$as_me: failed program was:" >&5
6996 sed 's/^/| /' conftest.$ac_ext >&5
6997
6998 fi
6999 rm -f conftest.err conftest.$ac_objext \
7000       conftest$ac_exeext conftest.$ac_ext
7001   done
7002 fi
7003 LIBS=$ac_func_search_save_LIBS
7004 fi
7005 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
7006 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
7007 if test "$ac_cv_search_krb5_encrypt" != no; then
7008   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
7009
7010 else
7011   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
7012 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
7013    { (exit 1); exit 1; }; }
7014 fi
7015
7016      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
7017 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
7018 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7019   echo $ECHO_N "(cached) $ECHO_C" >&6
7020 else
7021   ac_func_search_save_LIBS=$LIBS
7022 ac_cv_search_krb5_sendauth=no
7023 cat >conftest.$ac_ext <<_ACEOF
7024 /* confdefs.h.  */
7025 _ACEOF
7026 cat confdefs.h >>conftest.$ac_ext
7027 cat >>conftest.$ac_ext <<_ACEOF
7028 /* end confdefs.h.  */
7029
7030 /* Override any gcc2 internal prototype to avoid an error.  */
7031 #ifdef __cplusplus
7032 extern "C"
7033 #endif
7034 /* We use char because int might match the return type of a gcc2
7035    builtin and then its argument prototype would still apply.  */
7036 char krb5_sendauth ();
7037 int
7038 main ()
7039 {
7040 krb5_sendauth ();
7041   ;
7042   return 0;
7043 }
7044 _ACEOF
7045 rm -f conftest.$ac_objext conftest$ac_exeext
7046 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7047   (eval $ac_link) 2>conftest.er1
7048   ac_status=$?
7049   grep -v '^ *+' conftest.er1 >conftest.err
7050   rm -f conftest.er1
7051   cat conftest.err >&5
7052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7053   (exit $ac_status); } &&
7054          { ac_try='test -z "$ac_c_werror_flag"
7055                          || test ! -s conftest.err'
7056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7057   (eval $ac_try) 2>&5
7058   ac_status=$?
7059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7060   (exit $ac_status); }; } &&
7061          { ac_try='test -s conftest$ac_exeext'
7062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7063   (eval $ac_try) 2>&5
7064   ac_status=$?
7065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7066   (exit $ac_status); }; }; then
7067   ac_cv_search_krb5_sendauth="none required"
7068 else
7069   echo "$as_me: failed program was:" >&5
7070 sed 's/^/| /' conftest.$ac_ext >&5
7071
7072 fi
7073 rm -f conftest.err conftest.$ac_objext \
7074       conftest$ac_exeext conftest.$ac_ext
7075 if test "$ac_cv_search_krb5_sendauth" = no; then
7076   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
7077     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7078     cat >conftest.$ac_ext <<_ACEOF
7079 /* confdefs.h.  */
7080 _ACEOF
7081 cat confdefs.h >>conftest.$ac_ext
7082 cat >>conftest.$ac_ext <<_ACEOF
7083 /* end confdefs.h.  */
7084
7085 /* Override any gcc2 internal prototype to avoid an error.  */
7086 #ifdef __cplusplus
7087 extern "C"
7088 #endif
7089 /* We use char because int might match the return type of a gcc2
7090    builtin and then its argument prototype would still apply.  */
7091 char krb5_sendauth ();
7092 int
7093 main ()
7094 {
7095 krb5_sendauth ();
7096   ;
7097   return 0;
7098 }
7099 _ACEOF
7100 rm -f conftest.$ac_objext conftest$ac_exeext
7101 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7102   (eval $ac_link) 2>conftest.er1
7103   ac_status=$?
7104   grep -v '^ *+' conftest.er1 >conftest.err
7105   rm -f conftest.er1
7106   cat conftest.err >&5
7107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7108   (exit $ac_status); } &&
7109          { ac_try='test -z "$ac_c_werror_flag"
7110                          || test ! -s conftest.err'
7111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7112   (eval $ac_try) 2>&5
7113   ac_status=$?
7114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7115   (exit $ac_status); }; } &&
7116          { ac_try='test -s conftest$ac_exeext'
7117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7118   (eval $ac_try) 2>&5
7119   ac_status=$?
7120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7121   (exit $ac_status); }; }; then
7122   ac_cv_search_krb5_sendauth="-l$ac_lib"
7123 break
7124 else
7125   echo "$as_me: failed program was:" >&5
7126 sed 's/^/| /' conftest.$ac_ext >&5
7127
7128 fi
7129 rm -f conftest.err conftest.$ac_objext \
7130       conftest$ac_exeext conftest.$ac_ext
7131   done
7132 fi
7133 LIBS=$ac_func_search_save_LIBS
7134 fi
7135 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7136 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
7137 if test "$ac_cv_search_krb5_sendauth" != no; then
7138   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
7139
7140 else
7141   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7142 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7143    { (exit 1); exit 1; }; }
7144 fi
7145
7146   else
7147      echo "$as_me:$LINENO: checking for library containing com_err" >&5
7148 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
7149 if test "${ac_cv_search_com_err+set}" = set; then
7150   echo $ECHO_N "(cached) $ECHO_C" >&6
7151 else
7152   ac_func_search_save_LIBS=$LIBS
7153 ac_cv_search_com_err=no
7154 cat >conftest.$ac_ext <<_ACEOF
7155 /* confdefs.h.  */
7156 _ACEOF
7157 cat confdefs.h >>conftest.$ac_ext
7158 cat >>conftest.$ac_ext <<_ACEOF
7159 /* end confdefs.h.  */
7160
7161 /* Override any gcc2 internal prototype to avoid an error.  */
7162 #ifdef __cplusplus
7163 extern "C"
7164 #endif
7165 /* We use char because int might match the return type of a gcc2
7166    builtin and then its argument prototype would still apply.  */
7167 char com_err ();
7168 int
7169 main ()
7170 {
7171 com_err ();
7172   ;
7173   return 0;
7174 }
7175 _ACEOF
7176 rm -f conftest.$ac_objext conftest$ac_exeext
7177 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7178   (eval $ac_link) 2>conftest.er1
7179   ac_status=$?
7180   grep -v '^ *+' conftest.er1 >conftest.err
7181   rm -f conftest.er1
7182   cat conftest.err >&5
7183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7184   (exit $ac_status); } &&
7185          { ac_try='test -z "$ac_c_werror_flag"
7186                          || test ! -s conftest.err'
7187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7188   (eval $ac_try) 2>&5
7189   ac_status=$?
7190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7191   (exit $ac_status); }; } &&
7192          { ac_try='test -s conftest$ac_exeext'
7193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7194   (eval $ac_try) 2>&5
7195   ac_status=$?
7196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197   (exit $ac_status); }; }; then
7198   ac_cv_search_com_err="none required"
7199 else
7200   echo "$as_me: failed program was:" >&5
7201 sed 's/^/| /' conftest.$ac_ext >&5
7202
7203 fi
7204 rm -f conftest.err conftest.$ac_objext \
7205       conftest$ac_exeext conftest.$ac_ext
7206 if test "$ac_cv_search_com_err" = no; then
7207   for ac_lib in 'comerr32 -lkrb5_32'; do
7208     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7209     cat >conftest.$ac_ext <<_ACEOF
7210 /* confdefs.h.  */
7211 _ACEOF
7212 cat confdefs.h >>conftest.$ac_ext
7213 cat >>conftest.$ac_ext <<_ACEOF
7214 /* end confdefs.h.  */
7215
7216 /* Override any gcc2 internal prototype to avoid an error.  */
7217 #ifdef __cplusplus
7218 extern "C"
7219 #endif
7220 /* We use char because int might match the return type of a gcc2
7221    builtin and then its argument prototype would still apply.  */
7222 char com_err ();
7223 int
7224 main ()
7225 {
7226 com_err ();
7227   ;
7228   return 0;
7229 }
7230 _ACEOF
7231 rm -f conftest.$ac_objext conftest$ac_exeext
7232 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7233   (eval $ac_link) 2>conftest.er1
7234   ac_status=$?
7235   grep -v '^ *+' conftest.er1 >conftest.err
7236   rm -f conftest.er1
7237   cat conftest.err >&5
7238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7239   (exit $ac_status); } &&
7240          { ac_try='test -z "$ac_c_werror_flag"
7241                          || test ! -s conftest.err'
7242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7243   (eval $ac_try) 2>&5
7244   ac_status=$?
7245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7246   (exit $ac_status); }; } &&
7247          { ac_try='test -s conftest$ac_exeext'
7248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7249   (eval $ac_try) 2>&5
7250   ac_status=$?
7251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7252   (exit $ac_status); }; }; then
7253   ac_cv_search_com_err="-l$ac_lib"
7254 break
7255 else
7256   echo "$as_me: failed program was:" >&5
7257 sed 's/^/| /' conftest.$ac_ext >&5
7258
7259 fi
7260 rm -f conftest.err conftest.$ac_objext \
7261       conftest$ac_exeext conftest.$ac_ext
7262   done
7263 fi
7264 LIBS=$ac_func_search_save_LIBS
7265 fi
7266 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7267 echo "${ECHO_T}$ac_cv_search_com_err" >&6
7268 if test "$ac_cv_search_com_err" != no; then
7269   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
7270
7271 else
7272   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7273 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7274    { (exit 1); exit 1; }; }
7275 fi
7276
7277   fi
7278 fi
7279
7280 if test "$with_openssl" = yes ; then
7281     if test "$PORTNAME" != "win32"; then
7282
7283 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7284 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
7285 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7286   echo $ECHO_N "(cached) $ECHO_C" >&6
7287 else
7288   ac_check_lib_save_LIBS=$LIBS
7289 LIBS="-lcrypto  $LIBS"
7290 cat >conftest.$ac_ext <<_ACEOF
7291 /* confdefs.h.  */
7292 _ACEOF
7293 cat confdefs.h >>conftest.$ac_ext
7294 cat >>conftest.$ac_ext <<_ACEOF
7295 /* end confdefs.h.  */
7296
7297 /* Override any gcc2 internal prototype to avoid an error.  */
7298 #ifdef __cplusplus
7299 extern "C"
7300 #endif
7301 /* We use char because int might match the return type of a gcc2
7302    builtin and then its argument prototype would still apply.  */
7303 char CRYPTO_new_ex_data ();
7304 int
7305 main ()
7306 {
7307 CRYPTO_new_ex_data ();
7308   ;
7309   return 0;
7310 }
7311 _ACEOF
7312 rm -f conftest.$ac_objext conftest$ac_exeext
7313 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7314   (eval $ac_link) 2>conftest.er1
7315   ac_status=$?
7316   grep -v '^ *+' conftest.er1 >conftest.err
7317   rm -f conftest.er1
7318   cat conftest.err >&5
7319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7320   (exit $ac_status); } &&
7321          { ac_try='test -z "$ac_c_werror_flag"
7322                          || test ! -s conftest.err'
7323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7324   (eval $ac_try) 2>&5
7325   ac_status=$?
7326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7327   (exit $ac_status); }; } &&
7328          { ac_try='test -s conftest$ac_exeext'
7329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7330   (eval $ac_try) 2>&5
7331   ac_status=$?
7332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7333   (exit $ac_status); }; }; then
7334   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7335 else
7336   echo "$as_me: failed program was:" >&5
7337 sed 's/^/| /' conftest.$ac_ext >&5
7338
7339 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7340 fi
7341 rm -f conftest.err conftest.$ac_objext \
7342       conftest$ac_exeext conftest.$ac_ext
7343 LIBS=$ac_check_lib_save_LIBS
7344 fi
7345 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7346 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
7347 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7348   cat >>confdefs.h <<_ACEOF
7349 #define HAVE_LIBCRYPTO 1
7350 _ACEOF
7351
7352   LIBS="-lcrypto $LIBS"
7353
7354 else
7355   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7356 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7357    { (exit 1); exit 1; }; }
7358 fi
7359
7360
7361 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7362 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7363 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7364   echo $ECHO_N "(cached) $ECHO_C" >&6
7365 else
7366   ac_check_lib_save_LIBS=$LIBS
7367 LIBS="-lssl  $LIBS"
7368 cat >conftest.$ac_ext <<_ACEOF
7369 /* confdefs.h.  */
7370 _ACEOF
7371 cat confdefs.h >>conftest.$ac_ext
7372 cat >>conftest.$ac_ext <<_ACEOF
7373 /* end confdefs.h.  */
7374
7375 /* Override any gcc2 internal prototype to avoid an error.  */
7376 #ifdef __cplusplus
7377 extern "C"
7378 #endif
7379 /* We use char because int might match the return type of a gcc2
7380    builtin and then its argument prototype would still apply.  */
7381 char SSL_library_init ();
7382 int
7383 main ()
7384 {
7385 SSL_library_init ();
7386   ;
7387   return 0;
7388 }
7389 _ACEOF
7390 rm -f conftest.$ac_objext conftest$ac_exeext
7391 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7392   (eval $ac_link) 2>conftest.er1
7393   ac_status=$?
7394   grep -v '^ *+' conftest.er1 >conftest.err
7395   rm -f conftest.er1
7396   cat conftest.err >&5
7397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7398   (exit $ac_status); } &&
7399          { ac_try='test -z "$ac_c_werror_flag"
7400                          || test ! -s conftest.err'
7401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7402   (eval $ac_try) 2>&5
7403   ac_status=$?
7404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7405   (exit $ac_status); }; } &&
7406          { ac_try='test -s conftest$ac_exeext'
7407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7408   (eval $ac_try) 2>&5
7409   ac_status=$?
7410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7411   (exit $ac_status); }; }; then
7412   ac_cv_lib_ssl_SSL_library_init=yes
7413 else
7414   echo "$as_me: failed program was:" >&5
7415 sed 's/^/| /' conftest.$ac_ext >&5
7416
7417 ac_cv_lib_ssl_SSL_library_init=no
7418 fi
7419 rm -f conftest.err conftest.$ac_objext \
7420       conftest$ac_exeext conftest.$ac_ext
7421 LIBS=$ac_check_lib_save_LIBS
7422 fi
7423 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7424 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7425 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7426   cat >>confdefs.h <<_ACEOF
7427 #define HAVE_LIBSSL 1
7428 _ACEOF
7429
7430   LIBS="-lssl $LIBS"
7431
7432 else
7433   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7434 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7435    { (exit 1); exit 1; }; }
7436 fi
7437
7438   else
7439
7440 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7441 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7442 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7443   echo $ECHO_N "(cached) $ECHO_C" >&6
7444 else
7445   ac_check_lib_save_LIBS=$LIBS
7446 LIBS="-leay32  $LIBS"
7447 cat >conftest.$ac_ext <<_ACEOF
7448 /* confdefs.h.  */
7449 _ACEOF
7450 cat confdefs.h >>conftest.$ac_ext
7451 cat >>conftest.$ac_ext <<_ACEOF
7452 /* end confdefs.h.  */
7453
7454 /* Override any gcc2 internal prototype to avoid an error.  */
7455 #ifdef __cplusplus
7456 extern "C"
7457 #endif
7458 /* We use char because int might match the return type of a gcc2
7459    builtin and then its argument prototype would still apply.  */
7460 char CRYPTO_new_ex_data ();
7461 int
7462 main ()
7463 {
7464 CRYPTO_new_ex_data ();
7465   ;
7466   return 0;
7467 }
7468 _ACEOF
7469 rm -f conftest.$ac_objext conftest$ac_exeext
7470 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7471   (eval $ac_link) 2>conftest.er1
7472   ac_status=$?
7473   grep -v '^ *+' conftest.er1 >conftest.err
7474   rm -f conftest.er1
7475   cat conftest.err >&5
7476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7477   (exit $ac_status); } &&
7478          { ac_try='test -z "$ac_c_werror_flag"
7479                          || test ! -s conftest.err'
7480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7481   (eval $ac_try) 2>&5
7482   ac_status=$?
7483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7484   (exit $ac_status); }; } &&
7485          { ac_try='test -s conftest$ac_exeext'
7486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7487   (eval $ac_try) 2>&5
7488   ac_status=$?
7489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490   (exit $ac_status); }; }; then
7491   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7492 else
7493   echo "$as_me: failed program was:" >&5
7494 sed 's/^/| /' conftest.$ac_ext >&5
7495
7496 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7497 fi
7498 rm -f conftest.err conftest.$ac_objext \
7499       conftest$ac_exeext conftest.$ac_ext
7500 LIBS=$ac_check_lib_save_LIBS
7501 fi
7502 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7503 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7504 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7505   cat >>confdefs.h <<_ACEOF
7506 #define HAVE_LIBEAY32 1
7507 _ACEOF
7508
7509   LIBS="-leay32 $LIBS"
7510
7511 else
7512   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7513 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7514    { (exit 1); exit 1; }; }
7515 fi
7516
7517
7518 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7519 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7520 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7521   echo $ECHO_N "(cached) $ECHO_C" >&6
7522 else
7523   ac_check_lib_save_LIBS=$LIBS
7524 LIBS="-lssleay32  $LIBS"
7525 cat >conftest.$ac_ext <<_ACEOF
7526 /* confdefs.h.  */
7527 _ACEOF
7528 cat confdefs.h >>conftest.$ac_ext
7529 cat >>conftest.$ac_ext <<_ACEOF
7530 /* end confdefs.h.  */
7531
7532 /* Override any gcc2 internal prototype to avoid an error.  */
7533 #ifdef __cplusplus
7534 extern "C"
7535 #endif
7536 /* We use char because int might match the return type of a gcc2
7537    builtin and then its argument prototype would still apply.  */
7538 char SSL_library_init ();
7539 int
7540 main ()
7541 {
7542 SSL_library_init ();
7543   ;
7544   return 0;
7545 }
7546 _ACEOF
7547 rm -f conftest.$ac_objext conftest$ac_exeext
7548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7549   (eval $ac_link) 2>conftest.er1
7550   ac_status=$?
7551   grep -v '^ *+' conftest.er1 >conftest.err
7552   rm -f conftest.er1
7553   cat conftest.err >&5
7554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7555   (exit $ac_status); } &&
7556          { ac_try='test -z "$ac_c_werror_flag"
7557                          || test ! -s conftest.err'
7558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7559   (eval $ac_try) 2>&5
7560   ac_status=$?
7561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7562   (exit $ac_status); }; } &&
7563          { ac_try='test -s conftest$ac_exeext'
7564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7565   (eval $ac_try) 2>&5
7566   ac_status=$?
7567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7568   (exit $ac_status); }; }; then
7569   ac_cv_lib_ssleay32_SSL_library_init=yes
7570 else
7571   echo "$as_me: failed program was:" >&5
7572 sed 's/^/| /' conftest.$ac_ext >&5
7573
7574 ac_cv_lib_ssleay32_SSL_library_init=no
7575 fi
7576 rm -f conftest.err conftest.$ac_objext \
7577       conftest$ac_exeext conftest.$ac_ext
7578 LIBS=$ac_check_lib_save_LIBS
7579 fi
7580 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7581 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7582 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7583   cat >>confdefs.h <<_ACEOF
7584 #define HAVE_LIBSSLEAY32 1
7585 _ACEOF
7586
7587   LIBS="-lssleay32 $LIBS"
7588
7589 else
7590   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7591 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7592    { (exit 1); exit 1; }; }
7593 fi
7594
7595   fi
7596 fi
7597
7598 if test "$with_pam" = yes ; then
7599
7600 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7601 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7602 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7603   echo $ECHO_N "(cached) $ECHO_C" >&6
7604 else
7605   ac_check_lib_save_LIBS=$LIBS
7606 LIBS="-lpam  $LIBS"
7607 cat >conftest.$ac_ext <<_ACEOF
7608 /* confdefs.h.  */
7609 _ACEOF
7610 cat confdefs.h >>conftest.$ac_ext
7611 cat >>conftest.$ac_ext <<_ACEOF
7612 /* end confdefs.h.  */
7613
7614 /* Override any gcc2 internal prototype to avoid an error.  */
7615 #ifdef __cplusplus
7616 extern "C"
7617 #endif
7618 /* We use char because int might match the return type of a gcc2
7619    builtin and then its argument prototype would still apply.  */
7620 char pam_start ();
7621 int
7622 main ()
7623 {
7624 pam_start ();
7625   ;
7626   return 0;
7627 }
7628 _ACEOF
7629 rm -f conftest.$ac_objext conftest$ac_exeext
7630 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7631   (eval $ac_link) 2>conftest.er1
7632   ac_status=$?
7633   grep -v '^ *+' conftest.er1 >conftest.err
7634   rm -f conftest.er1
7635   cat conftest.err >&5
7636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7637   (exit $ac_status); } &&
7638          { ac_try='test -z "$ac_c_werror_flag"
7639                          || test ! -s conftest.err'
7640   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7644   (exit $ac_status); }; } &&
7645          { ac_try='test -s conftest$ac_exeext'
7646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7647   (eval $ac_try) 2>&5
7648   ac_status=$?
7649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7650   (exit $ac_status); }; }; then
7651   ac_cv_lib_pam_pam_start=yes
7652 else
7653   echo "$as_me: failed program was:" >&5
7654 sed 's/^/| /' conftest.$ac_ext >&5
7655
7656 ac_cv_lib_pam_pam_start=no
7657 fi
7658 rm -f conftest.err conftest.$ac_objext \
7659       conftest$ac_exeext conftest.$ac_ext
7660 LIBS=$ac_check_lib_save_LIBS
7661 fi
7662 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7663 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7664 if test $ac_cv_lib_pam_pam_start = yes; then
7665   cat >>confdefs.h <<_ACEOF
7666 #define HAVE_LIBPAM 1
7667 _ACEOF
7668
7669   LIBS="-lpam $LIBS"
7670
7671 else
7672   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7673 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7674    { (exit 1); exit 1; }; }
7675 fi
7676
7677 fi
7678
7679
7680 ##
7681 ## Header files
7682 ##
7683
7684 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7685 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7686 if test "${ac_cv_header_stdc+set}" = set; then
7687   echo $ECHO_N "(cached) $ECHO_C" >&6
7688 else
7689   cat >conftest.$ac_ext <<_ACEOF
7690 /* confdefs.h.  */
7691 _ACEOF
7692 cat confdefs.h >>conftest.$ac_ext
7693 cat >>conftest.$ac_ext <<_ACEOF
7694 /* end confdefs.h.  */
7695 #include <stdlib.h>
7696 #include <stdarg.h>
7697 #include <string.h>
7698 #include <float.h>
7699
7700 int
7701 main ()
7702 {
7703
7704   ;
7705   return 0;
7706 }
7707 _ACEOF
7708 rm -f conftest.$ac_objext
7709 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7710   (eval $ac_compile) 2>conftest.er1
7711   ac_status=$?
7712   grep -v '^ *+' conftest.er1 >conftest.err
7713   rm -f conftest.er1
7714   cat conftest.err >&5
7715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7716   (exit $ac_status); } &&
7717          { ac_try='test -z "$ac_c_werror_flag"
7718                          || test ! -s conftest.err'
7719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7720   (eval $ac_try) 2>&5
7721   ac_status=$?
7722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7723   (exit $ac_status); }; } &&
7724          { ac_try='test -s conftest.$ac_objext'
7725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7726   (eval $ac_try) 2>&5
7727   ac_status=$?
7728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7729   (exit $ac_status); }; }; then
7730   ac_cv_header_stdc=yes
7731 else
7732   echo "$as_me: failed program was:" >&5
7733 sed 's/^/| /' conftest.$ac_ext >&5
7734
7735 ac_cv_header_stdc=no
7736 fi
7737 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7738
7739 if test $ac_cv_header_stdc = yes; then
7740   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7741   cat >conftest.$ac_ext <<_ACEOF
7742 /* confdefs.h.  */
7743 _ACEOF
7744 cat confdefs.h >>conftest.$ac_ext
7745 cat >>conftest.$ac_ext <<_ACEOF
7746 /* end confdefs.h.  */
7747 #include <string.h>
7748
7749 _ACEOF
7750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7751   $EGREP "memchr" >/dev/null 2>&1; then
7752   :
7753 else
7754   ac_cv_header_stdc=no
7755 fi
7756 rm -f conftest*
7757
7758 fi
7759
7760 if test $ac_cv_header_stdc = yes; then
7761   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7762   cat >conftest.$ac_ext <<_ACEOF
7763 /* confdefs.h.  */
7764 _ACEOF
7765 cat confdefs.h >>conftest.$ac_ext
7766 cat >>conftest.$ac_ext <<_ACEOF
7767 /* end confdefs.h.  */
7768 #include <stdlib.h>
7769
7770 _ACEOF
7771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7772   $EGREP "free" >/dev/null 2>&1; then
7773   :
7774 else
7775   ac_cv_header_stdc=no
7776 fi
7777 rm -f conftest*
7778
7779 fi
7780
7781 if test $ac_cv_header_stdc = yes; then
7782   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7783   if test "$cross_compiling" = yes; then
7784   :
7785 else
7786   cat >conftest.$ac_ext <<_ACEOF
7787 /* confdefs.h.  */
7788 _ACEOF
7789 cat confdefs.h >>conftest.$ac_ext
7790 cat >>conftest.$ac_ext <<_ACEOF
7791 /* end confdefs.h.  */
7792 #include <ctype.h>
7793 #if ((' ' & 0x0FF) == 0x020)
7794 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7795 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7796 #else
7797 # define ISLOWER(c) \
7798                    (('a' <= (c) && (c) <= 'i') \
7799                      || ('j' <= (c) && (c) <= 'r') \
7800                      || ('s' <= (c) && (c) <= 'z'))
7801 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7802 #endif
7803
7804 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7805 int
7806 main ()
7807 {
7808   int i;
7809   for (i = 0; i < 256; i++)
7810     if (XOR (islower (i), ISLOWER (i))
7811         || toupper (i) != TOUPPER (i))
7812       exit(2);
7813   exit (0);
7814 }
7815 _ACEOF
7816 rm -f conftest$ac_exeext
7817 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7818   (eval $ac_link) 2>&5
7819   ac_status=$?
7820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7821   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7823   (eval $ac_try) 2>&5
7824   ac_status=$?
7825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7826   (exit $ac_status); }; }; then
7827   :
7828 else
7829   echo "$as_me: program exited with status $ac_status" >&5
7830 echo "$as_me: failed program was:" >&5
7831 sed 's/^/| /' conftest.$ac_ext >&5
7832
7833 ( exit $ac_status )
7834 ac_cv_header_stdc=no
7835 fi
7836 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7837 fi
7838 fi
7839 fi
7840 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7841 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7842 if test $ac_cv_header_stdc = yes; then
7843
7844 cat >>confdefs.h <<\_ACEOF
7845 #define STDC_HEADERS 1
7846 _ACEOF
7847
7848 fi
7849
7850 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7861                   inttypes.h stdint.h unistd.h
7862 do
7863 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7864 echo "$as_me:$LINENO: checking for $ac_header" >&5
7865 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7866 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7867   echo $ECHO_N "(cached) $ECHO_C" >&6
7868 else
7869   cat >conftest.$ac_ext <<_ACEOF
7870 /* confdefs.h.  */
7871 _ACEOF
7872 cat confdefs.h >>conftest.$ac_ext
7873 cat >>conftest.$ac_ext <<_ACEOF
7874 /* end confdefs.h.  */
7875 $ac_includes_default
7876
7877 #include <$ac_header>
7878 _ACEOF
7879 rm -f conftest.$ac_objext
7880 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7881   (eval $ac_compile) 2>conftest.er1
7882   ac_status=$?
7883   grep -v '^ *+' conftest.er1 >conftest.err
7884   rm -f conftest.er1
7885   cat conftest.err >&5
7886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7887   (exit $ac_status); } &&
7888          { ac_try='test -z "$ac_c_werror_flag"
7889                          || test ! -s conftest.err'
7890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7891   (eval $ac_try) 2>&5
7892   ac_status=$?
7893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7894   (exit $ac_status); }; } &&
7895          { ac_try='test -s conftest.$ac_objext'
7896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7897   (eval $ac_try) 2>&5
7898   ac_status=$?
7899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7900   (exit $ac_status); }; }; then
7901   eval "$as_ac_Header=yes"
7902 else
7903   echo "$as_me: failed program was:" >&5
7904 sed 's/^/| /' conftest.$ac_ext >&5
7905
7906 eval "$as_ac_Header=no"
7907 fi
7908 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7909 fi
7910 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7911 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7912 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7913   cat >>confdefs.h <<_ACEOF
7914 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7915 _ACEOF
7916
7917 fi
7918
7919 done
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947 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
7948 do
7949 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7950 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7951   echo "$as_me:$LINENO: checking for $ac_header" >&5
7952 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7953 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7954   echo $ECHO_N "(cached) $ECHO_C" >&6
7955 fi
7956 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7957 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7958 else
7959   # Is the header compilable?
7960 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7961 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7962 cat >conftest.$ac_ext <<_ACEOF
7963 /* confdefs.h.  */
7964 _ACEOF
7965 cat confdefs.h >>conftest.$ac_ext
7966 cat >>conftest.$ac_ext <<_ACEOF
7967 /* end confdefs.h.  */
7968 $ac_includes_default
7969 #include <$ac_header>
7970 _ACEOF
7971 rm -f conftest.$ac_objext
7972 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7973   (eval $ac_compile) 2>conftest.er1
7974   ac_status=$?
7975   grep -v '^ *+' conftest.er1 >conftest.err
7976   rm -f conftest.er1
7977   cat conftest.err >&5
7978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7979   (exit $ac_status); } &&
7980          { ac_try='test -z "$ac_c_werror_flag"
7981                          || test ! -s conftest.err'
7982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7983   (eval $ac_try) 2>&5
7984   ac_status=$?
7985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7986   (exit $ac_status); }; } &&
7987          { ac_try='test -s conftest.$ac_objext'
7988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7989   (eval $ac_try) 2>&5
7990   ac_status=$?
7991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7992   (exit $ac_status); }; }; then
7993   ac_header_compiler=yes
7994 else
7995   echo "$as_me: failed program was:" >&5
7996 sed 's/^/| /' conftest.$ac_ext >&5
7997
7998 ac_header_compiler=no
7999 fi
8000 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8001 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8002 echo "${ECHO_T}$ac_header_compiler" >&6
8003
8004 # Is the header present?
8005 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8006 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8007 cat >conftest.$ac_ext <<_ACEOF
8008 /* confdefs.h.  */
8009 _ACEOF
8010 cat confdefs.h >>conftest.$ac_ext
8011 cat >>conftest.$ac_ext <<_ACEOF
8012 /* end confdefs.h.  */
8013 #include <$ac_header>
8014 _ACEOF
8015 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8016   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8017   ac_status=$?
8018   grep -v '^ *+' conftest.er1 >conftest.err
8019   rm -f conftest.er1
8020   cat conftest.err >&5
8021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022   (exit $ac_status); } >/dev/null; then
8023   if test -s conftest.err; then
8024     ac_cpp_err=$ac_c_preproc_warn_flag
8025     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8026   else
8027     ac_cpp_err=
8028   fi
8029 else
8030   ac_cpp_err=yes
8031 fi
8032 if test -z "$ac_cpp_err"; then
8033   ac_header_preproc=yes
8034 else
8035   echo "$as_me: failed program was:" >&5
8036 sed 's/^/| /' conftest.$ac_ext >&5
8037
8038   ac_header_preproc=no
8039 fi
8040 rm -f conftest.err conftest.$ac_ext
8041 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8042 echo "${ECHO_T}$ac_header_preproc" >&6
8043
8044 # So?  What about this header?
8045 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8046   yes:no: )
8047     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8048 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8049     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8050 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8051     ac_header_preproc=yes
8052     ;;
8053   no:yes:* )
8054     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8055 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8056     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8057 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8058     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8059 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8060     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8061 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8062     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8063 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8064     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8065 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8066     (
8067       cat <<\_ASBOX
8068 ## ---------------------------------------- ##
8069 ## Report this to pgsql-bugs@postgresql.org ##
8070 ## ---------------------------------------- ##
8071 _ASBOX
8072     ) |
8073       sed "s/^/$as_me: WARNING:     /" >&2
8074     ;;
8075 esac
8076 echo "$as_me:$LINENO: checking for $ac_header" >&5
8077 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8078 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8079   echo $ECHO_N "(cached) $ECHO_C" >&6
8080 else
8081   eval "$as_ac_Header=\$ac_header_preproc"
8082 fi
8083 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8084 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8085
8086 fi
8087 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8088   cat >>confdefs.h <<_ACEOF
8089 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8090 _ACEOF
8091
8092 fi
8093
8094 done
8095
8096
8097 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
8098 # netinet/in.h is included first.
8099
8100 for ac_header in netinet/in.h
8101 do
8102 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8103 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8104   echo "$as_me:$LINENO: checking for $ac_header" >&5
8105 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8107   echo $ECHO_N "(cached) $ECHO_C" >&6
8108 fi
8109 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8110 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8111 else
8112   # Is the header compilable?
8113 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8114 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8115 cat >conftest.$ac_ext <<_ACEOF
8116 /* confdefs.h.  */
8117 _ACEOF
8118 cat confdefs.h >>conftest.$ac_ext
8119 cat >>conftest.$ac_ext <<_ACEOF
8120 /* end confdefs.h.  */
8121 $ac_includes_default
8122 #include <$ac_header>
8123 _ACEOF
8124 rm -f conftest.$ac_objext
8125 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8126   (eval $ac_compile) 2>conftest.er1
8127   ac_status=$?
8128   grep -v '^ *+' conftest.er1 >conftest.err
8129   rm -f conftest.er1
8130   cat conftest.err >&5
8131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132   (exit $ac_status); } &&
8133          { ac_try='test -z "$ac_c_werror_flag"
8134                          || test ! -s conftest.err'
8135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8136   (eval $ac_try) 2>&5
8137   ac_status=$?
8138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8139   (exit $ac_status); }; } &&
8140          { ac_try='test -s conftest.$ac_objext'
8141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8142   (eval $ac_try) 2>&5
8143   ac_status=$?
8144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8145   (exit $ac_status); }; }; then
8146   ac_header_compiler=yes
8147 else
8148   echo "$as_me: failed program was:" >&5
8149 sed 's/^/| /' conftest.$ac_ext >&5
8150
8151 ac_header_compiler=no
8152 fi
8153 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8154 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8155 echo "${ECHO_T}$ac_header_compiler" >&6
8156
8157 # Is the header present?
8158 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8159 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8160 cat >conftest.$ac_ext <<_ACEOF
8161 /* confdefs.h.  */
8162 _ACEOF
8163 cat confdefs.h >>conftest.$ac_ext
8164 cat >>conftest.$ac_ext <<_ACEOF
8165 /* end confdefs.h.  */
8166 #include <$ac_header>
8167 _ACEOF
8168 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8169   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8170   ac_status=$?
8171   grep -v '^ *+' conftest.er1 >conftest.err
8172   rm -f conftest.er1
8173   cat conftest.err >&5
8174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8175   (exit $ac_status); } >/dev/null; then
8176   if test -s conftest.err; then
8177     ac_cpp_err=$ac_c_preproc_warn_flag
8178     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8179   else
8180     ac_cpp_err=
8181   fi
8182 else
8183   ac_cpp_err=yes
8184 fi
8185 if test -z "$ac_cpp_err"; then
8186   ac_header_preproc=yes
8187 else
8188   echo "$as_me: failed program was:" >&5
8189 sed 's/^/| /' conftest.$ac_ext >&5
8190
8191   ac_header_preproc=no
8192 fi
8193 rm -f conftest.err conftest.$ac_ext
8194 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8195 echo "${ECHO_T}$ac_header_preproc" >&6
8196
8197 # So?  What about this header?
8198 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8199   yes:no: )
8200     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8201 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8202     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8203 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8204     ac_header_preproc=yes
8205     ;;
8206   no:yes:* )
8207     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8208 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8209     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8210 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8211     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8212 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8213     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8214 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8215     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8216 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8217     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8218 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8219     (
8220       cat <<\_ASBOX
8221 ## ---------------------------------------- ##
8222 ## Report this to pgsql-bugs@postgresql.org ##
8223 ## ---------------------------------------- ##
8224 _ASBOX
8225     ) |
8226       sed "s/^/$as_me: WARNING:     /" >&2
8227     ;;
8228 esac
8229 echo "$as_me:$LINENO: checking for $ac_header" >&5
8230 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8231 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8232   echo $ECHO_N "(cached) $ECHO_C" >&6
8233 else
8234   eval "$as_ac_Header=\$ac_header_preproc"
8235 fi
8236 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8237 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8238
8239 fi
8240 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8241   cat >>confdefs.h <<_ACEOF
8242 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8243 _ACEOF
8244
8245 fi
8246
8247 done
8248
8249
8250 for ac_header in netinet/tcp.h
8251 do
8252 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8253 echo "$as_me:$LINENO: checking for $ac_header" >&5
8254 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8255 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8256   echo $ECHO_N "(cached) $ECHO_C" >&6
8257 else
8258   cat >conftest.$ac_ext <<_ACEOF
8259 /* confdefs.h.  */
8260 _ACEOF
8261 cat confdefs.h >>conftest.$ac_ext
8262 cat >>conftest.$ac_ext <<_ACEOF
8263 /* end confdefs.h.  */
8264 $ac_includes_default
8265 #ifdef HAVE_NETINET_IN_H
8266 #include <netinet/in.h>
8267 #endif
8268
8269
8270 #include <$ac_header>
8271 _ACEOF
8272 rm -f conftest.$ac_objext
8273 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8274   (eval $ac_compile) 2>conftest.er1
8275   ac_status=$?
8276   grep -v '^ *+' conftest.er1 >conftest.err
8277   rm -f conftest.er1
8278   cat conftest.err >&5
8279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8280   (exit $ac_status); } &&
8281          { ac_try='test -z "$ac_c_werror_flag"
8282                          || test ! -s conftest.err'
8283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8284   (eval $ac_try) 2>&5
8285   ac_status=$?
8286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8287   (exit $ac_status); }; } &&
8288          { ac_try='test -s conftest.$ac_objext'
8289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8290   (eval $ac_try) 2>&5
8291   ac_status=$?
8292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8293   (exit $ac_status); }; }; then
8294   eval "$as_ac_Header=yes"
8295 else
8296   echo "$as_me: failed program was:" >&5
8297 sed 's/^/| /' conftest.$ac_ext >&5
8298
8299 eval "$as_ac_Header=no"
8300 fi
8301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8302 fi
8303 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8304 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8305 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8306   cat >>confdefs.h <<_ACEOF
8307 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8308 _ACEOF
8309
8310 fi
8311
8312 done
8313
8314
8315 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8316
8317 for ac_header in readline/readline.h
8318 do
8319 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8320 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8321   echo "$as_me:$LINENO: checking for $ac_header" >&5
8322 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8323 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8324   echo $ECHO_N "(cached) $ECHO_C" >&6
8325 fi
8326 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8327 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8328 else
8329   # Is the header compilable?
8330 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8331 echo $ECHO_N "checking $ac_header usability... $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 $ac_includes_default
8339 #include <$ac_header>
8340 _ACEOF
8341 rm -f conftest.$ac_objext
8342 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8343   (eval $ac_compile) 2>conftest.er1
8344   ac_status=$?
8345   grep -v '^ *+' conftest.er1 >conftest.err
8346   rm -f conftest.er1
8347   cat conftest.err >&5
8348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349   (exit $ac_status); } &&
8350          { ac_try='test -z "$ac_c_werror_flag"
8351                          || test ! -s conftest.err'
8352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8353   (eval $ac_try) 2>&5
8354   ac_status=$?
8355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8356   (exit $ac_status); }; } &&
8357          { ac_try='test -s conftest.$ac_objext'
8358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8359   (eval $ac_try) 2>&5
8360   ac_status=$?
8361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8362   (exit $ac_status); }; }; then
8363   ac_header_compiler=yes
8364 else
8365   echo "$as_me: failed program was:" >&5
8366 sed 's/^/| /' conftest.$ac_ext >&5
8367
8368 ac_header_compiler=no
8369 fi
8370 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8371 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8372 echo "${ECHO_T}$ac_header_compiler" >&6
8373
8374 # Is the header present?
8375 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8376 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8377 cat >conftest.$ac_ext <<_ACEOF
8378 /* confdefs.h.  */
8379 _ACEOF
8380 cat confdefs.h >>conftest.$ac_ext
8381 cat >>conftest.$ac_ext <<_ACEOF
8382 /* end confdefs.h.  */
8383 #include <$ac_header>
8384 _ACEOF
8385 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8386   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8387   ac_status=$?
8388   grep -v '^ *+' conftest.er1 >conftest.err
8389   rm -f conftest.er1
8390   cat conftest.err >&5
8391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392   (exit $ac_status); } >/dev/null; then
8393   if test -s conftest.err; then
8394     ac_cpp_err=$ac_c_preproc_warn_flag
8395     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8396   else
8397     ac_cpp_err=
8398   fi
8399 else
8400   ac_cpp_err=yes
8401 fi
8402 if test -z "$ac_cpp_err"; then
8403   ac_header_preproc=yes
8404 else
8405   echo "$as_me: failed program was:" >&5
8406 sed 's/^/| /' conftest.$ac_ext >&5
8407
8408   ac_header_preproc=no
8409 fi
8410 rm -f conftest.err conftest.$ac_ext
8411 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8412 echo "${ECHO_T}$ac_header_preproc" >&6
8413
8414 # So?  What about this header?
8415 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8416   yes:no: )
8417     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8418 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8419     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8420 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8421     ac_header_preproc=yes
8422     ;;
8423   no:yes:* )
8424     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8425 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8426     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8427 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8428     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8429 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8430     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8431 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8432     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8433 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8434     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8435 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8436     (
8437       cat <<\_ASBOX
8438 ## ---------------------------------------- ##
8439 ## Report this to pgsql-bugs@postgresql.org ##
8440 ## ---------------------------------------- ##
8441 _ASBOX
8442     ) |
8443       sed "s/^/$as_me: WARNING:     /" >&2
8444     ;;
8445 esac
8446 echo "$as_me:$LINENO: checking for $ac_header" >&5
8447 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8448 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8449   echo $ECHO_N "(cached) $ECHO_C" >&6
8450 else
8451   eval "$as_ac_Header=\$ac_header_preproc"
8452 fi
8453 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8454 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8455
8456 fi
8457 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8458   cat >>confdefs.h <<_ACEOF
8459 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8460 _ACEOF
8461
8462 else
8463
8464 for ac_header in readline.h
8465 do
8466 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8467 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8468   echo "$as_me:$LINENO: checking for $ac_header" >&5
8469 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8470 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8471   echo $ECHO_N "(cached) $ECHO_C" >&6
8472 fi
8473 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8474 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8475 else
8476   # Is the header compilable?
8477 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8478 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8479 cat >conftest.$ac_ext <<_ACEOF
8480 /* confdefs.h.  */
8481 _ACEOF
8482 cat confdefs.h >>conftest.$ac_ext
8483 cat >>conftest.$ac_ext <<_ACEOF
8484 /* end confdefs.h.  */
8485 $ac_includes_default
8486 #include <$ac_header>
8487 _ACEOF
8488 rm -f conftest.$ac_objext
8489 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8490   (eval $ac_compile) 2>conftest.er1
8491   ac_status=$?
8492   grep -v '^ *+' conftest.er1 >conftest.err
8493   rm -f conftest.er1
8494   cat conftest.err >&5
8495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496   (exit $ac_status); } &&
8497          { ac_try='test -z "$ac_c_werror_flag"
8498                          || test ! -s conftest.err'
8499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8500   (eval $ac_try) 2>&5
8501   ac_status=$?
8502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8503   (exit $ac_status); }; } &&
8504          { ac_try='test -s conftest.$ac_objext'
8505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8506   (eval $ac_try) 2>&5
8507   ac_status=$?
8508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8509   (exit $ac_status); }; }; then
8510   ac_header_compiler=yes
8511 else
8512   echo "$as_me: failed program was:" >&5
8513 sed 's/^/| /' conftest.$ac_ext >&5
8514
8515 ac_header_compiler=no
8516 fi
8517 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8518 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8519 echo "${ECHO_T}$ac_header_compiler" >&6
8520
8521 # Is the header present?
8522 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8523 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8524 cat >conftest.$ac_ext <<_ACEOF
8525 /* confdefs.h.  */
8526 _ACEOF
8527 cat confdefs.h >>conftest.$ac_ext
8528 cat >>conftest.$ac_ext <<_ACEOF
8529 /* end confdefs.h.  */
8530 #include <$ac_header>
8531 _ACEOF
8532 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8533   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8534   ac_status=$?
8535   grep -v '^ *+' conftest.er1 >conftest.err
8536   rm -f conftest.er1
8537   cat conftest.err >&5
8538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539   (exit $ac_status); } >/dev/null; then
8540   if test -s conftest.err; then
8541     ac_cpp_err=$ac_c_preproc_warn_flag
8542     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8543   else
8544     ac_cpp_err=
8545   fi
8546 else
8547   ac_cpp_err=yes
8548 fi
8549 if test -z "$ac_cpp_err"; then
8550   ac_header_preproc=yes
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 sed 's/^/| /' conftest.$ac_ext >&5
8554
8555   ac_header_preproc=no
8556 fi
8557 rm -f conftest.err conftest.$ac_ext
8558 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8559 echo "${ECHO_T}$ac_header_preproc" >&6
8560
8561 # So?  What about this header?
8562 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8563   yes:no: )
8564     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8565 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8566     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8567 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8568     ac_header_preproc=yes
8569     ;;
8570   no:yes:* )
8571     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8572 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8573     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8574 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8575     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8576 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8577     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8578 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8579     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8580 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8581     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8582 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8583     (
8584       cat <<\_ASBOX
8585 ## ---------------------------------------- ##
8586 ## Report this to pgsql-bugs@postgresql.org ##
8587 ## ---------------------------------------- ##
8588 _ASBOX
8589     ) |
8590       sed "s/^/$as_me: WARNING:     /" >&2
8591     ;;
8592 esac
8593 echo "$as_me:$LINENO: checking for $ac_header" >&5
8594 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8596   echo $ECHO_N "(cached) $ECHO_C" >&6
8597 else
8598   eval "$as_ac_Header=\$ac_header_preproc"
8599 fi
8600 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8601 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8602
8603 fi
8604 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8605   cat >>confdefs.h <<_ACEOF
8606 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8607 _ACEOF
8608
8609 else
8610   { { echo "$as_me:$LINENO: error: readline header not found
8611 If you have readline already installed, see config.log for details on the
8612 failure.  It is possible the compiler isn't looking in the proper directory.
8613 Use --without-readline to disable readline support." >&5
8614 echo "$as_me: error: readline header not found
8615 If you have readline already installed, see config.log for details on the
8616 failure.  It is possible the compiler isn't looking in the proper directory.
8617 Use --without-readline to disable readline support." >&2;}
8618    { (exit 1); exit 1; }; }
8619 fi
8620
8621 done
8622
8623 fi
8624
8625 done
8626
8627
8628 for ac_header in readline/history.h
8629 do
8630 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8631 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8632   echo "$as_me:$LINENO: checking for $ac_header" >&5
8633 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8634 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8635   echo $ECHO_N "(cached) $ECHO_C" >&6
8636 fi
8637 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8638 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8639 else
8640   # Is the header compilable?
8641 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8642 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8643 cat >conftest.$ac_ext <<_ACEOF
8644 /* confdefs.h.  */
8645 _ACEOF
8646 cat confdefs.h >>conftest.$ac_ext
8647 cat >>conftest.$ac_ext <<_ACEOF
8648 /* end confdefs.h.  */
8649 $ac_includes_default
8650 #include <$ac_header>
8651 _ACEOF
8652 rm -f conftest.$ac_objext
8653 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8654   (eval $ac_compile) 2>conftest.er1
8655   ac_status=$?
8656   grep -v '^ *+' conftest.er1 >conftest.err
8657   rm -f conftest.er1
8658   cat conftest.err >&5
8659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8660   (exit $ac_status); } &&
8661          { ac_try='test -z "$ac_c_werror_flag"
8662                          || test ! -s conftest.err'
8663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8664   (eval $ac_try) 2>&5
8665   ac_status=$?
8666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667   (exit $ac_status); }; } &&
8668          { ac_try='test -s conftest.$ac_objext'
8669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8670   (eval $ac_try) 2>&5
8671   ac_status=$?
8672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673   (exit $ac_status); }; }; then
8674   ac_header_compiler=yes
8675 else
8676   echo "$as_me: failed program was:" >&5
8677 sed 's/^/| /' conftest.$ac_ext >&5
8678
8679 ac_header_compiler=no
8680 fi
8681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8682 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8683 echo "${ECHO_T}$ac_header_compiler" >&6
8684
8685 # Is the header present?
8686 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8687 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8688 cat >conftest.$ac_ext <<_ACEOF
8689 /* confdefs.h.  */
8690 _ACEOF
8691 cat confdefs.h >>conftest.$ac_ext
8692 cat >>conftest.$ac_ext <<_ACEOF
8693 /* end confdefs.h.  */
8694 #include <$ac_header>
8695 _ACEOF
8696 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8697   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8698   ac_status=$?
8699   grep -v '^ *+' conftest.er1 >conftest.err
8700   rm -f conftest.er1
8701   cat conftest.err >&5
8702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8703   (exit $ac_status); } >/dev/null; then
8704   if test -s conftest.err; then
8705     ac_cpp_err=$ac_c_preproc_warn_flag
8706     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8707   else
8708     ac_cpp_err=
8709   fi
8710 else
8711   ac_cpp_err=yes
8712 fi
8713 if test -z "$ac_cpp_err"; then
8714   ac_header_preproc=yes
8715 else
8716   echo "$as_me: failed program was:" >&5
8717 sed 's/^/| /' conftest.$ac_ext >&5
8718
8719   ac_header_preproc=no
8720 fi
8721 rm -f conftest.err conftest.$ac_ext
8722 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8723 echo "${ECHO_T}$ac_header_preproc" >&6
8724
8725 # So?  What about this header?
8726 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8727   yes:no: )
8728     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8729 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8730     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8731 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8732     ac_header_preproc=yes
8733     ;;
8734   no:yes:* )
8735     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8736 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8737     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8738 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8739     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8740 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8741     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8742 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8743     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8744 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8745     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8746 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8747     (
8748       cat <<\_ASBOX
8749 ## ---------------------------------------- ##
8750 ## Report this to pgsql-bugs@postgresql.org ##
8751 ## ---------------------------------------- ##
8752 _ASBOX
8753     ) |
8754       sed "s/^/$as_me: WARNING:     /" >&2
8755     ;;
8756 esac
8757 echo "$as_me:$LINENO: checking for $ac_header" >&5
8758 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8759 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8760   echo $ECHO_N "(cached) $ECHO_C" >&6
8761 else
8762   eval "$as_ac_Header=\$ac_header_preproc"
8763 fi
8764 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8765 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8766
8767 fi
8768 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8769   cat >>confdefs.h <<_ACEOF
8770 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8771 _ACEOF
8772
8773 else
8774
8775 for ac_header in history.h
8776 do
8777 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8778 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8779   echo "$as_me:$LINENO: checking for $ac_header" >&5
8780 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8781 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8782   echo $ECHO_N "(cached) $ECHO_C" >&6
8783 fi
8784 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8785 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8786 else
8787   # Is the header compilable?
8788 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8789 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8790 cat >conftest.$ac_ext <<_ACEOF
8791 /* confdefs.h.  */
8792 _ACEOF
8793 cat confdefs.h >>conftest.$ac_ext
8794 cat >>conftest.$ac_ext <<_ACEOF
8795 /* end confdefs.h.  */
8796 $ac_includes_default
8797 #include <$ac_header>
8798 _ACEOF
8799 rm -f conftest.$ac_objext
8800 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8801   (eval $ac_compile) 2>conftest.er1
8802   ac_status=$?
8803   grep -v '^ *+' conftest.er1 >conftest.err
8804   rm -f conftest.er1
8805   cat conftest.err >&5
8806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8807   (exit $ac_status); } &&
8808          { ac_try='test -z "$ac_c_werror_flag"
8809                          || test ! -s conftest.err'
8810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8811   (eval $ac_try) 2>&5
8812   ac_status=$?
8813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8814   (exit $ac_status); }; } &&
8815          { ac_try='test -s conftest.$ac_objext'
8816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8817   (eval $ac_try) 2>&5
8818   ac_status=$?
8819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8820   (exit $ac_status); }; }; then
8821   ac_header_compiler=yes
8822 else
8823   echo "$as_me: failed program was:" >&5
8824 sed 's/^/| /' conftest.$ac_ext >&5
8825
8826 ac_header_compiler=no
8827 fi
8828 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8829 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8830 echo "${ECHO_T}$ac_header_compiler" >&6
8831
8832 # Is the header present?
8833 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8834 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8835 cat >conftest.$ac_ext <<_ACEOF
8836 /* confdefs.h.  */
8837 _ACEOF
8838 cat confdefs.h >>conftest.$ac_ext
8839 cat >>conftest.$ac_ext <<_ACEOF
8840 /* end confdefs.h.  */
8841 #include <$ac_header>
8842 _ACEOF
8843 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8844   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8845   ac_status=$?
8846   grep -v '^ *+' conftest.er1 >conftest.err
8847   rm -f conftest.er1
8848   cat conftest.err >&5
8849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8850   (exit $ac_status); } >/dev/null; then
8851   if test -s conftest.err; then
8852     ac_cpp_err=$ac_c_preproc_warn_flag
8853     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8854   else
8855     ac_cpp_err=
8856   fi
8857 else
8858   ac_cpp_err=yes
8859 fi
8860 if test -z "$ac_cpp_err"; then
8861   ac_header_preproc=yes
8862 else
8863   echo "$as_me: failed program was:" >&5
8864 sed 's/^/| /' conftest.$ac_ext >&5
8865
8866   ac_header_preproc=no
8867 fi
8868 rm -f conftest.err conftest.$ac_ext
8869 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8870 echo "${ECHO_T}$ac_header_preproc" >&6
8871
8872 # So?  What about this header?
8873 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8874   yes:no: )
8875     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8876 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8877     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8878 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8879     ac_header_preproc=yes
8880     ;;
8881   no:yes:* )
8882     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8883 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8884     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8885 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8886     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8887 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8888     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8889 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8890     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8891 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8892     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8893 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8894     (
8895       cat <<\_ASBOX
8896 ## ---------------------------------------- ##
8897 ## Report this to pgsql-bugs@postgresql.org ##
8898 ## ---------------------------------------- ##
8899 _ASBOX
8900     ) |
8901       sed "s/^/$as_me: WARNING:     /" >&2
8902     ;;
8903 esac
8904 echo "$as_me:$LINENO: checking for $ac_header" >&5
8905 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8906 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8907   echo $ECHO_N "(cached) $ECHO_C" >&6
8908 else
8909   eval "$as_ac_Header=\$ac_header_preproc"
8910 fi
8911 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8912 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8913
8914 fi
8915 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8916   cat >>confdefs.h <<_ACEOF
8917 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8918 _ACEOF
8919
8920 else
8921   { { echo "$as_me:$LINENO: error: history header not found
8922 If you have readline already installed, see config.log for details on the
8923 failure.  It is possible the compiler isn't looking in the proper directory.
8924 Use --without-readline to disable readline support." >&5
8925 echo "$as_me: error: history header not found
8926 If you have readline already installed, see config.log for details on the
8927 failure.  It is possible the compiler isn't looking in the proper directory.
8928 Use --without-readline to disable readline support." >&2;}
8929    { (exit 1); exit 1; }; }
8930 fi
8931
8932 done
8933
8934 fi
8935
8936 done
8937
8938 fi
8939
8940 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8941 # Some installations of libedit usurp /usr/include/readline/, which seems
8942 # bad practice, since in combined installations readline will have its headers
8943 # there.  We might have to resort to AC_EGREP checks to make sure we found
8944 # the proper header...
8945
8946 for ac_header in editline/readline.h
8947 do
8948 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8949 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8950   echo "$as_me:$LINENO: checking for $ac_header" >&5
8951 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8952 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8953   echo $ECHO_N "(cached) $ECHO_C" >&6
8954 fi
8955 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8956 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8957 else
8958   # Is the header compilable?
8959 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8960 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8961 cat >conftest.$ac_ext <<_ACEOF
8962 /* confdefs.h.  */
8963 _ACEOF
8964 cat confdefs.h >>conftest.$ac_ext
8965 cat >>conftest.$ac_ext <<_ACEOF
8966 /* end confdefs.h.  */
8967 $ac_includes_default
8968 #include <$ac_header>
8969 _ACEOF
8970 rm -f conftest.$ac_objext
8971 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8972   (eval $ac_compile) 2>conftest.er1
8973   ac_status=$?
8974   grep -v '^ *+' conftest.er1 >conftest.err
8975   rm -f conftest.er1
8976   cat conftest.err >&5
8977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8978   (exit $ac_status); } &&
8979          { ac_try='test -z "$ac_c_werror_flag"
8980                          || test ! -s conftest.err'
8981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8982   (eval $ac_try) 2>&5
8983   ac_status=$?
8984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8985   (exit $ac_status); }; } &&
8986          { ac_try='test -s conftest.$ac_objext'
8987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8988   (eval $ac_try) 2>&5
8989   ac_status=$?
8990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8991   (exit $ac_status); }; }; then
8992   ac_header_compiler=yes
8993 else
8994   echo "$as_me: failed program was:" >&5
8995 sed 's/^/| /' conftest.$ac_ext >&5
8996
8997 ac_header_compiler=no
8998 fi
8999 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9000 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9001 echo "${ECHO_T}$ac_header_compiler" >&6
9002
9003 # Is the header present?
9004 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9005 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9006 cat >conftest.$ac_ext <<_ACEOF
9007 /* confdefs.h.  */
9008 _ACEOF
9009 cat confdefs.h >>conftest.$ac_ext
9010 cat >>conftest.$ac_ext <<_ACEOF
9011 /* end confdefs.h.  */
9012 #include <$ac_header>
9013 _ACEOF
9014 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9015   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9016   ac_status=$?
9017   grep -v '^ *+' conftest.er1 >conftest.err
9018   rm -f conftest.er1
9019   cat conftest.err >&5
9020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9021   (exit $ac_status); } >/dev/null; then
9022   if test -s conftest.err; then
9023     ac_cpp_err=$ac_c_preproc_warn_flag
9024     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9025   else
9026     ac_cpp_err=
9027   fi
9028 else
9029   ac_cpp_err=yes
9030 fi
9031 if test -z "$ac_cpp_err"; then
9032   ac_header_preproc=yes
9033 else
9034   echo "$as_me: failed program was:" >&5
9035 sed 's/^/| /' conftest.$ac_ext >&5
9036
9037   ac_header_preproc=no
9038 fi
9039 rm -f conftest.err conftest.$ac_ext
9040 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9041 echo "${ECHO_T}$ac_header_preproc" >&6
9042
9043 # So?  What about this header?
9044 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9045   yes:no: )
9046     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9047 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9048     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9049 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9050     ac_header_preproc=yes
9051     ;;
9052   no:yes:* )
9053     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9054 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9055     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9056 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9057     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9058 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9059     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9060 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9061     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9062 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9063     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9064 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9065     (
9066       cat <<\_ASBOX
9067 ## ---------------------------------------- ##
9068 ## Report this to pgsql-bugs@postgresql.org ##
9069 ## ---------------------------------------- ##
9070 _ASBOX
9071     ) |
9072       sed "s/^/$as_me: WARNING:     /" >&2
9073     ;;
9074 esac
9075 echo "$as_me:$LINENO: checking for $ac_header" >&5
9076 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9077 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9078   echo $ECHO_N "(cached) $ECHO_C" >&6
9079 else
9080   eval "$as_ac_Header=\$ac_header_preproc"
9081 fi
9082 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9083 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9084
9085 fi
9086 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9087   cat >>confdefs.h <<_ACEOF
9088 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9089 _ACEOF
9090
9091 else
9092
9093 for ac_header in readline.h
9094 do
9095 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9096 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9097   echo "$as_me:$LINENO: checking for $ac_header" >&5
9098 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9099 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9100   echo $ECHO_N "(cached) $ECHO_C" >&6
9101 fi
9102 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9103 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9104 else
9105   # Is the header compilable?
9106 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9107 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9108 cat >conftest.$ac_ext <<_ACEOF
9109 /* confdefs.h.  */
9110 _ACEOF
9111 cat confdefs.h >>conftest.$ac_ext
9112 cat >>conftest.$ac_ext <<_ACEOF
9113 /* end confdefs.h.  */
9114 $ac_includes_default
9115 #include <$ac_header>
9116 _ACEOF
9117 rm -f conftest.$ac_objext
9118 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9119   (eval $ac_compile) 2>conftest.er1
9120   ac_status=$?
9121   grep -v '^ *+' conftest.er1 >conftest.err
9122   rm -f conftest.er1
9123   cat conftest.err >&5
9124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9125   (exit $ac_status); } &&
9126          { ac_try='test -z "$ac_c_werror_flag"
9127                          || test ! -s conftest.err'
9128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9129   (eval $ac_try) 2>&5
9130   ac_status=$?
9131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9132   (exit $ac_status); }; } &&
9133          { ac_try='test -s conftest.$ac_objext'
9134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9135   (eval $ac_try) 2>&5
9136   ac_status=$?
9137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9138   (exit $ac_status); }; }; then
9139   ac_header_compiler=yes
9140 else
9141   echo "$as_me: failed program was:" >&5
9142 sed 's/^/| /' conftest.$ac_ext >&5
9143
9144 ac_header_compiler=no
9145 fi
9146 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9147 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9148 echo "${ECHO_T}$ac_header_compiler" >&6
9149
9150 # Is the header present?
9151 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9152 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9153 cat >conftest.$ac_ext <<_ACEOF
9154 /* confdefs.h.  */
9155 _ACEOF
9156 cat confdefs.h >>conftest.$ac_ext
9157 cat >>conftest.$ac_ext <<_ACEOF
9158 /* end confdefs.h.  */
9159 #include <$ac_header>
9160 _ACEOF
9161 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9162   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9163   ac_status=$?
9164   grep -v '^ *+' conftest.er1 >conftest.err
9165   rm -f conftest.er1
9166   cat conftest.err >&5
9167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9168   (exit $ac_status); } >/dev/null; then
9169   if test -s conftest.err; then
9170     ac_cpp_err=$ac_c_preproc_warn_flag
9171     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9172   else
9173     ac_cpp_err=
9174   fi
9175 else
9176   ac_cpp_err=yes
9177 fi
9178 if test -z "$ac_cpp_err"; then
9179   ac_header_preproc=yes
9180 else
9181   echo "$as_me: failed program was:" >&5
9182 sed 's/^/| /' conftest.$ac_ext >&5
9183
9184   ac_header_preproc=no
9185 fi
9186 rm -f conftest.err conftest.$ac_ext
9187 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9188 echo "${ECHO_T}$ac_header_preproc" >&6
9189
9190 # So?  What about this header?
9191 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9192   yes:no: )
9193     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9194 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9195     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9196 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9197     ac_header_preproc=yes
9198     ;;
9199   no:yes:* )
9200     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9201 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9202     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9203 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9204     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9205 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9206     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9207 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9208     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9209 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9210     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9211 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9212     (
9213       cat <<\_ASBOX
9214 ## ---------------------------------------- ##
9215 ## Report this to pgsql-bugs@postgresql.org ##
9216 ## ---------------------------------------- ##
9217 _ASBOX
9218     ) |
9219       sed "s/^/$as_me: WARNING:     /" >&2
9220     ;;
9221 esac
9222 echo "$as_me:$LINENO: checking for $ac_header" >&5
9223 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9224 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9225   echo $ECHO_N "(cached) $ECHO_C" >&6
9226 else
9227   eval "$as_ac_Header=\$ac_header_preproc"
9228 fi
9229 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9230 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9231
9232 fi
9233 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9234   cat >>confdefs.h <<_ACEOF
9235 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9236 _ACEOF
9237
9238 else
9239
9240 for ac_header in readline/readline.h
9241 do
9242 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9243 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9244   echo "$as_me:$LINENO: checking for $ac_header" >&5
9245 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9246 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9247   echo $ECHO_N "(cached) $ECHO_C" >&6
9248 fi
9249 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9250 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9251 else
9252   # Is the header compilable?
9253 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9254 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9255 cat >conftest.$ac_ext <<_ACEOF
9256 /* confdefs.h.  */
9257 _ACEOF
9258 cat confdefs.h >>conftest.$ac_ext
9259 cat >>conftest.$ac_ext <<_ACEOF
9260 /* end confdefs.h.  */
9261 $ac_includes_default
9262 #include <$ac_header>
9263 _ACEOF
9264 rm -f conftest.$ac_objext
9265 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9266   (eval $ac_compile) 2>conftest.er1
9267   ac_status=$?
9268   grep -v '^ *+' conftest.er1 >conftest.err
9269   rm -f conftest.er1
9270   cat conftest.err >&5
9271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9272   (exit $ac_status); } &&
9273          { ac_try='test -z "$ac_c_werror_flag"
9274                          || test ! -s conftest.err'
9275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9276   (eval $ac_try) 2>&5
9277   ac_status=$?
9278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9279   (exit $ac_status); }; } &&
9280          { ac_try='test -s conftest.$ac_objext'
9281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9282   (eval $ac_try) 2>&5
9283   ac_status=$?
9284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9285   (exit $ac_status); }; }; then
9286   ac_header_compiler=yes
9287 else
9288   echo "$as_me: failed program was:" >&5
9289 sed 's/^/| /' conftest.$ac_ext >&5
9290
9291 ac_header_compiler=no
9292 fi
9293 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9294 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9295 echo "${ECHO_T}$ac_header_compiler" >&6
9296
9297 # Is the header present?
9298 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9299 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9300 cat >conftest.$ac_ext <<_ACEOF
9301 /* confdefs.h.  */
9302 _ACEOF
9303 cat confdefs.h >>conftest.$ac_ext
9304 cat >>conftest.$ac_ext <<_ACEOF
9305 /* end confdefs.h.  */
9306 #include <$ac_header>
9307 _ACEOF
9308 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9309   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9310   ac_status=$?
9311   grep -v '^ *+' conftest.er1 >conftest.err
9312   rm -f conftest.er1
9313   cat conftest.err >&5
9314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315   (exit $ac_status); } >/dev/null; then
9316   if test -s conftest.err; then
9317     ac_cpp_err=$ac_c_preproc_warn_flag
9318     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9319   else
9320     ac_cpp_err=
9321   fi
9322 else
9323   ac_cpp_err=yes
9324 fi
9325 if test -z "$ac_cpp_err"; then
9326   ac_header_preproc=yes
9327 else
9328   echo "$as_me: failed program was:" >&5
9329 sed 's/^/| /' conftest.$ac_ext >&5
9330
9331   ac_header_preproc=no
9332 fi
9333 rm -f conftest.err conftest.$ac_ext
9334 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9335 echo "${ECHO_T}$ac_header_preproc" >&6
9336
9337 # So?  What about this header?
9338 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9339   yes:no: )
9340     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9341 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9342     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9343 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9344     ac_header_preproc=yes
9345     ;;
9346   no:yes:* )
9347     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9348 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9349     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9350 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9351     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9352 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9353     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9354 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9355     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9356 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9357     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9358 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9359     (
9360       cat <<\_ASBOX
9361 ## ---------------------------------------- ##
9362 ## Report this to pgsql-bugs@postgresql.org ##
9363 ## ---------------------------------------- ##
9364 _ASBOX
9365     ) |
9366       sed "s/^/$as_me: WARNING:     /" >&2
9367     ;;
9368 esac
9369 echo "$as_me:$LINENO: checking for $ac_header" >&5
9370 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9371 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9372   echo $ECHO_N "(cached) $ECHO_C" >&6
9373 else
9374   eval "$as_ac_Header=\$ac_header_preproc"
9375 fi
9376 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9377 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9378
9379 fi
9380 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9381   cat >>confdefs.h <<_ACEOF
9382 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9383 _ACEOF
9384
9385 else
9386   { { echo "$as_me:$LINENO: error: readline header not found
9387 If you have libedit already installed, see config.log for details on the
9388 failure.  It is possible the compiler isn't looking in the proper directory.
9389 Use --without-readline to disable libedit support." >&5
9390 echo "$as_me: error: readline header not found
9391 If you have libedit already installed, see config.log for details on the
9392 failure.  It is possible the compiler isn't looking in the proper directory.
9393 Use --without-readline to disable libedit support." >&2;}
9394    { (exit 1); exit 1; }; }
9395 fi
9396
9397 done
9398
9399 fi
9400
9401 done
9402
9403 fi
9404
9405 done
9406
9407
9408 for ac_header in editline/history.h
9409 do
9410 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9411 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9412   echo "$as_me:$LINENO: checking for $ac_header" >&5
9413 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9414 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9415   echo $ECHO_N "(cached) $ECHO_C" >&6
9416 fi
9417 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9418 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9419 else
9420   # Is the header compilable?
9421 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9422 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9423 cat >conftest.$ac_ext <<_ACEOF
9424 /* confdefs.h.  */
9425 _ACEOF
9426 cat confdefs.h >>conftest.$ac_ext
9427 cat >>conftest.$ac_ext <<_ACEOF
9428 /* end confdefs.h.  */
9429 $ac_includes_default
9430 #include <$ac_header>
9431 _ACEOF
9432 rm -f conftest.$ac_objext
9433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9434   (eval $ac_compile) 2>conftest.er1
9435   ac_status=$?
9436   grep -v '^ *+' conftest.er1 >conftest.err
9437   rm -f conftest.er1
9438   cat conftest.err >&5
9439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9440   (exit $ac_status); } &&
9441          { ac_try='test -z "$ac_c_werror_flag"
9442                          || test ! -s conftest.err'
9443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9444   (eval $ac_try) 2>&5
9445   ac_status=$?
9446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9447   (exit $ac_status); }; } &&
9448          { ac_try='test -s conftest.$ac_objext'
9449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9450   (eval $ac_try) 2>&5
9451   ac_status=$?
9452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9453   (exit $ac_status); }; }; then
9454   ac_header_compiler=yes
9455 else
9456   echo "$as_me: failed program was:" >&5
9457 sed 's/^/| /' conftest.$ac_ext >&5
9458
9459 ac_header_compiler=no
9460 fi
9461 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9462 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9463 echo "${ECHO_T}$ac_header_compiler" >&6
9464
9465 # Is the header present?
9466 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9467 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9468 cat >conftest.$ac_ext <<_ACEOF
9469 /* confdefs.h.  */
9470 _ACEOF
9471 cat confdefs.h >>conftest.$ac_ext
9472 cat >>conftest.$ac_ext <<_ACEOF
9473 /* end confdefs.h.  */
9474 #include <$ac_header>
9475 _ACEOF
9476 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9477   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9478   ac_status=$?
9479   grep -v '^ *+' conftest.er1 >conftest.err
9480   rm -f conftest.er1
9481   cat conftest.err >&5
9482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483   (exit $ac_status); } >/dev/null; then
9484   if test -s conftest.err; then
9485     ac_cpp_err=$ac_c_preproc_warn_flag
9486     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9487   else
9488     ac_cpp_err=
9489   fi
9490 else
9491   ac_cpp_err=yes
9492 fi
9493 if test -z "$ac_cpp_err"; then
9494   ac_header_preproc=yes
9495 else
9496   echo "$as_me: failed program was:" >&5
9497 sed 's/^/| /' conftest.$ac_ext >&5
9498
9499   ac_header_preproc=no
9500 fi
9501 rm -f conftest.err conftest.$ac_ext
9502 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9503 echo "${ECHO_T}$ac_header_preproc" >&6
9504
9505 # So?  What about this header?
9506 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9507   yes:no: )
9508     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9509 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9510     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9511 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9512     ac_header_preproc=yes
9513     ;;
9514   no:yes:* )
9515     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9516 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9517     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9518 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9519     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9520 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9521     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9522 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9523     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9524 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9525     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9526 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9527     (
9528       cat <<\_ASBOX
9529 ## ---------------------------------------- ##
9530 ## Report this to pgsql-bugs@postgresql.org ##
9531 ## ---------------------------------------- ##
9532 _ASBOX
9533     ) |
9534       sed "s/^/$as_me: WARNING:     /" >&2
9535     ;;
9536 esac
9537 echo "$as_me:$LINENO: checking for $ac_header" >&5
9538 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9539 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9540   echo $ECHO_N "(cached) $ECHO_C" >&6
9541 else
9542   eval "$as_ac_Header=\$ac_header_preproc"
9543 fi
9544 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9545 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9546
9547 fi
9548 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9549   cat >>confdefs.h <<_ACEOF
9550 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9551 _ACEOF
9552
9553 else
9554
9555 for ac_header in history.h
9556 do
9557 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9558 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9559   echo "$as_me:$LINENO: checking for $ac_header" >&5
9560 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9561 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9562   echo $ECHO_N "(cached) $ECHO_C" >&6
9563 fi
9564 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9565 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9566 else
9567   # Is the header compilable?
9568 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9569 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9570 cat >conftest.$ac_ext <<_ACEOF
9571 /* confdefs.h.  */
9572 _ACEOF
9573 cat confdefs.h >>conftest.$ac_ext
9574 cat >>conftest.$ac_ext <<_ACEOF
9575 /* end confdefs.h.  */
9576 $ac_includes_default
9577 #include <$ac_header>
9578 _ACEOF
9579 rm -f conftest.$ac_objext
9580 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9581   (eval $ac_compile) 2>conftest.er1
9582   ac_status=$?
9583   grep -v '^ *+' conftest.er1 >conftest.err
9584   rm -f conftest.er1
9585   cat conftest.err >&5
9586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9587   (exit $ac_status); } &&
9588          { ac_try='test -z "$ac_c_werror_flag"
9589                          || test ! -s conftest.err'
9590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9591   (eval $ac_try) 2>&5
9592   ac_status=$?
9593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9594   (exit $ac_status); }; } &&
9595          { ac_try='test -s conftest.$ac_objext'
9596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9597   (eval $ac_try) 2>&5
9598   ac_status=$?
9599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9600   (exit $ac_status); }; }; then
9601   ac_header_compiler=yes
9602 else
9603   echo "$as_me: failed program was:" >&5
9604 sed 's/^/| /' conftest.$ac_ext >&5
9605
9606 ac_header_compiler=no
9607 fi
9608 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9609 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9610 echo "${ECHO_T}$ac_header_compiler" >&6
9611
9612 # Is the header present?
9613 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9614 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9615 cat >conftest.$ac_ext <<_ACEOF
9616 /* confdefs.h.  */
9617 _ACEOF
9618 cat confdefs.h >>conftest.$ac_ext
9619 cat >>conftest.$ac_ext <<_ACEOF
9620 /* end confdefs.h.  */
9621 #include <$ac_header>
9622 _ACEOF
9623 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9624   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9625   ac_status=$?
9626   grep -v '^ *+' conftest.er1 >conftest.err
9627   rm -f conftest.er1
9628   cat conftest.err >&5
9629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9630   (exit $ac_status); } >/dev/null; then
9631   if test -s conftest.err; then
9632     ac_cpp_err=$ac_c_preproc_warn_flag
9633     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9634   else
9635     ac_cpp_err=
9636   fi
9637 else
9638   ac_cpp_err=yes
9639 fi
9640 if test -z "$ac_cpp_err"; then
9641   ac_header_preproc=yes
9642 else
9643   echo "$as_me: failed program was:" >&5
9644 sed 's/^/| /' conftest.$ac_ext >&5
9645
9646   ac_header_preproc=no
9647 fi
9648 rm -f conftest.err conftest.$ac_ext
9649 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9650 echo "${ECHO_T}$ac_header_preproc" >&6
9651
9652 # So?  What about this header?
9653 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9654   yes:no: )
9655     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9656 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9657     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9658 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9659     ac_header_preproc=yes
9660     ;;
9661   no:yes:* )
9662     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9663 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9664     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9665 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9666     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9667 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9668     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9669 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9670     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9671 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9672     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9673 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9674     (
9675       cat <<\_ASBOX
9676 ## ---------------------------------------- ##
9677 ## Report this to pgsql-bugs@postgresql.org ##
9678 ## ---------------------------------------- ##
9679 _ASBOX
9680     ) |
9681       sed "s/^/$as_me: WARNING:     /" >&2
9682     ;;
9683 esac
9684 echo "$as_me:$LINENO: checking for $ac_header" >&5
9685 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9686 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9687   echo $ECHO_N "(cached) $ECHO_C" >&6
9688 else
9689   eval "$as_ac_Header=\$ac_header_preproc"
9690 fi
9691 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9692 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9693
9694 fi
9695 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9696   cat >>confdefs.h <<_ACEOF
9697 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9698 _ACEOF
9699
9700 else
9701
9702 for ac_header in readline/history.h
9703 do
9704 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9705 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9706   echo "$as_me:$LINENO: checking for $ac_header" >&5
9707 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9708 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9709   echo $ECHO_N "(cached) $ECHO_C" >&6
9710 fi
9711 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9712 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9713 else
9714   # Is the header compilable?
9715 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9716 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9717 cat >conftest.$ac_ext <<_ACEOF
9718 /* confdefs.h.  */
9719 _ACEOF
9720 cat confdefs.h >>conftest.$ac_ext
9721 cat >>conftest.$ac_ext <<_ACEOF
9722 /* end confdefs.h.  */
9723 $ac_includes_default
9724 #include <$ac_header>
9725 _ACEOF
9726 rm -f conftest.$ac_objext
9727 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9728   (eval $ac_compile) 2>conftest.er1
9729   ac_status=$?
9730   grep -v '^ *+' conftest.er1 >conftest.err
9731   rm -f conftest.er1
9732   cat conftest.err >&5
9733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9734   (exit $ac_status); } &&
9735          { ac_try='test -z "$ac_c_werror_flag"
9736                          || test ! -s conftest.err'
9737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9738   (eval $ac_try) 2>&5
9739   ac_status=$?
9740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741   (exit $ac_status); }; } &&
9742          { ac_try='test -s conftest.$ac_objext'
9743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9744   (eval $ac_try) 2>&5
9745   ac_status=$?
9746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9747   (exit $ac_status); }; }; then
9748   ac_header_compiler=yes
9749 else
9750   echo "$as_me: failed program was:" >&5
9751 sed 's/^/| /' conftest.$ac_ext >&5
9752
9753 ac_header_compiler=no
9754 fi
9755 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9756 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9757 echo "${ECHO_T}$ac_header_compiler" >&6
9758
9759 # Is the header present?
9760 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9761 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9762 cat >conftest.$ac_ext <<_ACEOF
9763 /* confdefs.h.  */
9764 _ACEOF
9765 cat confdefs.h >>conftest.$ac_ext
9766 cat >>conftest.$ac_ext <<_ACEOF
9767 /* end confdefs.h.  */
9768 #include <$ac_header>
9769 _ACEOF
9770 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9771   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9772   ac_status=$?
9773   grep -v '^ *+' conftest.er1 >conftest.err
9774   rm -f conftest.er1
9775   cat conftest.err >&5
9776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9777   (exit $ac_status); } >/dev/null; then
9778   if test -s conftest.err; then
9779     ac_cpp_err=$ac_c_preproc_warn_flag
9780     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9781   else
9782     ac_cpp_err=
9783   fi
9784 else
9785   ac_cpp_err=yes
9786 fi
9787 if test -z "$ac_cpp_err"; then
9788   ac_header_preproc=yes
9789 else
9790   echo "$as_me: failed program was:" >&5
9791 sed 's/^/| /' conftest.$ac_ext >&5
9792
9793   ac_header_preproc=no
9794 fi
9795 rm -f conftest.err conftest.$ac_ext
9796 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9797 echo "${ECHO_T}$ac_header_preproc" >&6
9798
9799 # So?  What about this header?
9800 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9801   yes:no: )
9802     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9803 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9804     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9805 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9806     ac_header_preproc=yes
9807     ;;
9808   no:yes:* )
9809     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9810 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9811     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9812 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9813     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9814 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9815     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9816 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9817     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9818 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9819     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9820 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9821     (
9822       cat <<\_ASBOX
9823 ## ---------------------------------------- ##
9824 ## Report this to pgsql-bugs@postgresql.org ##
9825 ## ---------------------------------------- ##
9826 _ASBOX
9827     ) |
9828       sed "s/^/$as_me: WARNING:     /" >&2
9829     ;;
9830 esac
9831 echo "$as_me:$LINENO: checking for $ac_header" >&5
9832 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9833 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9834   echo $ECHO_N "(cached) $ECHO_C" >&6
9835 else
9836   eval "$as_ac_Header=\$ac_header_preproc"
9837 fi
9838 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9839 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9840
9841 fi
9842 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9843   cat >>confdefs.h <<_ACEOF
9844 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9845 _ACEOF
9846
9847 else
9848   { { echo "$as_me:$LINENO: error: history header not found
9849 If you have libedit already installed, see config.log for details on the
9850 failure.  It is possible the compiler isn't looking in the proper directory.
9851 Use --without-readline to disable libedit support." >&5
9852 echo "$as_me: error: history header not found
9853 If you have libedit already installed, see config.log for details on the
9854 failure.  It is possible the compiler isn't looking in the proper directory.
9855 Use --without-readline to disable libedit support." >&2;}
9856    { (exit 1); exit 1; }; }
9857 fi
9858
9859 done
9860
9861 fi
9862
9863 done
9864
9865 fi
9866
9867 done
9868
9869 fi
9870
9871 if test "$with_zlib" = yes; then
9872   if test "${ac_cv_header_zlib_h+set}" = set; then
9873   echo "$as_me:$LINENO: checking for zlib.h" >&5
9874 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9875 if test "${ac_cv_header_zlib_h+set}" = set; then
9876   echo $ECHO_N "(cached) $ECHO_C" >&6
9877 fi
9878 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9879 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9880 else
9881   # Is the header compilable?
9882 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9883 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9884 cat >conftest.$ac_ext <<_ACEOF
9885 /* confdefs.h.  */
9886 _ACEOF
9887 cat confdefs.h >>conftest.$ac_ext
9888 cat >>conftest.$ac_ext <<_ACEOF
9889 /* end confdefs.h.  */
9890 $ac_includes_default
9891 #include <zlib.h>
9892 _ACEOF
9893 rm -f conftest.$ac_objext
9894 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9895   (eval $ac_compile) 2>conftest.er1
9896   ac_status=$?
9897   grep -v '^ *+' conftest.er1 >conftest.err
9898   rm -f conftest.er1
9899   cat conftest.err >&5
9900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9901   (exit $ac_status); } &&
9902          { ac_try='test -z "$ac_c_werror_flag"
9903                          || test ! -s conftest.err'
9904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9905   (eval $ac_try) 2>&5
9906   ac_status=$?
9907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9908   (exit $ac_status); }; } &&
9909          { ac_try='test -s conftest.$ac_objext'
9910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9911   (eval $ac_try) 2>&5
9912   ac_status=$?
9913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9914   (exit $ac_status); }; }; then
9915   ac_header_compiler=yes
9916 else
9917   echo "$as_me: failed program was:" >&5
9918 sed 's/^/| /' conftest.$ac_ext >&5
9919
9920 ac_header_compiler=no
9921 fi
9922 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9923 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9924 echo "${ECHO_T}$ac_header_compiler" >&6
9925
9926 # Is the header present?
9927 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9928 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9929 cat >conftest.$ac_ext <<_ACEOF
9930 /* confdefs.h.  */
9931 _ACEOF
9932 cat confdefs.h >>conftest.$ac_ext
9933 cat >>conftest.$ac_ext <<_ACEOF
9934 /* end confdefs.h.  */
9935 #include <zlib.h>
9936 _ACEOF
9937 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9938   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9939   ac_status=$?
9940   grep -v '^ *+' conftest.er1 >conftest.err
9941   rm -f conftest.er1
9942   cat conftest.err >&5
9943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9944   (exit $ac_status); } >/dev/null; then
9945   if test -s conftest.err; then
9946     ac_cpp_err=$ac_c_preproc_warn_flag
9947     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9948   else
9949     ac_cpp_err=
9950   fi
9951 else
9952   ac_cpp_err=yes
9953 fi
9954 if test -z "$ac_cpp_err"; then
9955   ac_header_preproc=yes
9956 else
9957   echo "$as_me: failed program was:" >&5
9958 sed 's/^/| /' conftest.$ac_ext >&5
9959
9960   ac_header_preproc=no
9961 fi
9962 rm -f conftest.err conftest.$ac_ext
9963 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9964 echo "${ECHO_T}$ac_header_preproc" >&6
9965
9966 # So?  What about this header?
9967 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9968   yes:no: )
9969     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9970 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9971     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9972 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9973     ac_header_preproc=yes
9974     ;;
9975   no:yes:* )
9976     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9977 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9978     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9979 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9980     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9981 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9982     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9983 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9984     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9985 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9986     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9987 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9988     (
9989       cat <<\_ASBOX
9990 ## ---------------------------------------- ##
9991 ## Report this to pgsql-bugs@postgresql.org ##
9992 ## ---------------------------------------- ##
9993 _ASBOX
9994     ) |
9995       sed "s/^/$as_me: WARNING:     /" >&2
9996     ;;
9997 esac
9998 echo "$as_me:$LINENO: checking for zlib.h" >&5
9999 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
10000 if test "${ac_cv_header_zlib_h+set}" = set; then
10001   echo $ECHO_N "(cached) $ECHO_C" >&6
10002 else
10003   ac_cv_header_zlib_h=$ac_header_preproc
10004 fi
10005 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
10006 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
10007
10008 fi
10009 if test $ac_cv_header_zlib_h = yes; then
10010   :
10011 else
10012   { { echo "$as_me:$LINENO: error: zlib header not found
10013 If you have zlib already installed, see config.log for details on the
10014 failure.  It is possible the compiler isn't looking in the proper directory.
10015 Use --without-zlib to disable zlib support." >&5
10016 echo "$as_me: error: zlib header not found
10017 If you have zlib already installed, see config.log for details on the
10018 failure.  It is possible the compiler isn't looking in the proper directory.
10019 Use --without-zlib to disable zlib support." >&2;}
10020    { (exit 1); exit 1; }; }
10021 fi
10022
10023
10024 fi
10025
10026 if test "$with_krb5" = yes ; then
10027   if test "${ac_cv_header_krb5_h+set}" = set; then
10028   echo "$as_me:$LINENO: checking for krb5.h" >&5
10029 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10030 if test "${ac_cv_header_krb5_h+set}" = set; then
10031   echo $ECHO_N "(cached) $ECHO_C" >&6
10032 fi
10033 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10034 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10035 else
10036   # Is the header compilable?
10037 echo "$as_me:$LINENO: checking krb5.h usability" >&5
10038 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
10039 cat >conftest.$ac_ext <<_ACEOF
10040 /* confdefs.h.  */
10041 _ACEOF
10042 cat confdefs.h >>conftest.$ac_ext
10043 cat >>conftest.$ac_ext <<_ACEOF
10044 /* end confdefs.h.  */
10045 $ac_includes_default
10046 #include <krb5.h>
10047 _ACEOF
10048 rm -f conftest.$ac_objext
10049 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10050   (eval $ac_compile) 2>conftest.er1
10051   ac_status=$?
10052   grep -v '^ *+' conftest.er1 >conftest.err
10053   rm -f conftest.er1
10054   cat conftest.err >&5
10055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10056   (exit $ac_status); } &&
10057          { ac_try='test -z "$ac_c_werror_flag"
10058                          || test ! -s conftest.err'
10059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10060   (eval $ac_try) 2>&5
10061   ac_status=$?
10062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10063   (exit $ac_status); }; } &&
10064          { ac_try='test -s conftest.$ac_objext'
10065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10066   (eval $ac_try) 2>&5
10067   ac_status=$?
10068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10069   (exit $ac_status); }; }; then
10070   ac_header_compiler=yes
10071 else
10072   echo "$as_me: failed program was:" >&5
10073 sed 's/^/| /' conftest.$ac_ext >&5
10074
10075 ac_header_compiler=no
10076 fi
10077 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10078 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10079 echo "${ECHO_T}$ac_header_compiler" >&6
10080
10081 # Is the header present?
10082 echo "$as_me:$LINENO: checking krb5.h presence" >&5
10083 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
10084 cat >conftest.$ac_ext <<_ACEOF
10085 /* confdefs.h.  */
10086 _ACEOF
10087 cat confdefs.h >>conftest.$ac_ext
10088 cat >>conftest.$ac_ext <<_ACEOF
10089 /* end confdefs.h.  */
10090 #include <krb5.h>
10091 _ACEOF
10092 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10093   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10094   ac_status=$?
10095   grep -v '^ *+' conftest.er1 >conftest.err
10096   rm -f conftest.er1
10097   cat conftest.err >&5
10098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10099   (exit $ac_status); } >/dev/null; then
10100   if test -s conftest.err; then
10101     ac_cpp_err=$ac_c_preproc_warn_flag
10102     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10103   else
10104     ac_cpp_err=
10105   fi
10106 else
10107   ac_cpp_err=yes
10108 fi
10109 if test -z "$ac_cpp_err"; then
10110   ac_header_preproc=yes
10111 else
10112   echo "$as_me: failed program was:" >&5
10113 sed 's/^/| /' conftest.$ac_ext >&5
10114
10115   ac_header_preproc=no
10116 fi
10117 rm -f conftest.err conftest.$ac_ext
10118 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10119 echo "${ECHO_T}$ac_header_preproc" >&6
10120
10121 # So?  What about this header?
10122 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10123   yes:no: )
10124     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
10125 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10126     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
10127 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
10128     ac_header_preproc=yes
10129     ;;
10130   no:yes:* )
10131     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
10132 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
10133     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
10134 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
10135     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
10136 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
10137     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
10138 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10139     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
10140 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
10141     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
10142 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
10143     (
10144       cat <<\_ASBOX
10145 ## ---------------------------------------- ##
10146 ## Report this to pgsql-bugs@postgresql.org ##
10147 ## ---------------------------------------- ##
10148 _ASBOX
10149     ) |
10150       sed "s/^/$as_me: WARNING:     /" >&2
10151     ;;
10152 esac
10153 echo "$as_me:$LINENO: checking for krb5.h" >&5
10154 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10155 if test "${ac_cv_header_krb5_h+set}" = set; then
10156   echo $ECHO_N "(cached) $ECHO_C" >&6
10157 else
10158   ac_cv_header_krb5_h=$ac_header_preproc
10159 fi
10160 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10161 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10162
10163 fi
10164 if test $ac_cv_header_krb5_h = yes; then
10165   :
10166 else
10167   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
10168 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
10169    { (exit 1); exit 1; }; }
10170 fi
10171
10172
10173 fi
10174
10175 if test "$with_openssl" = yes ; then
10176   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10177   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10178 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10179 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10180   echo $ECHO_N "(cached) $ECHO_C" >&6
10181 fi
10182 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10183 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10184 else
10185   # Is the header compilable?
10186 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
10187 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
10188 cat >conftest.$ac_ext <<_ACEOF
10189 /* confdefs.h.  */
10190 _ACEOF
10191 cat confdefs.h >>conftest.$ac_ext
10192 cat >>conftest.$ac_ext <<_ACEOF
10193 /* end confdefs.h.  */
10194 $ac_includes_default
10195 #include <openssl/ssl.h>
10196 _ACEOF
10197 rm -f conftest.$ac_objext
10198 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10199   (eval $ac_compile) 2>conftest.er1
10200   ac_status=$?
10201   grep -v '^ *+' conftest.er1 >conftest.err
10202   rm -f conftest.er1
10203   cat conftest.err >&5
10204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10205   (exit $ac_status); } &&
10206          { ac_try='test -z "$ac_c_werror_flag"
10207                          || test ! -s conftest.err'
10208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10209   (eval $ac_try) 2>&5
10210   ac_status=$?
10211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10212   (exit $ac_status); }; } &&
10213          { ac_try='test -s conftest.$ac_objext'
10214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10215   (eval $ac_try) 2>&5
10216   ac_status=$?
10217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10218   (exit $ac_status); }; }; then
10219   ac_header_compiler=yes
10220 else
10221   echo "$as_me: failed program was:" >&5
10222 sed 's/^/| /' conftest.$ac_ext >&5
10223
10224 ac_header_compiler=no
10225 fi
10226 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10227 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10228 echo "${ECHO_T}$ac_header_compiler" >&6
10229
10230 # Is the header present?
10231 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10232 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
10233 cat >conftest.$ac_ext <<_ACEOF
10234 /* confdefs.h.  */
10235 _ACEOF
10236 cat confdefs.h >>conftest.$ac_ext
10237 cat >>conftest.$ac_ext <<_ACEOF
10238 /* end confdefs.h.  */
10239 #include <openssl/ssl.h>
10240 _ACEOF
10241 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10242   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10243   ac_status=$?
10244   grep -v '^ *+' conftest.er1 >conftest.err
10245   rm -f conftest.er1
10246   cat conftest.err >&5
10247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10248   (exit $ac_status); } >/dev/null; then
10249   if test -s conftest.err; then
10250     ac_cpp_err=$ac_c_preproc_warn_flag
10251     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10252   else
10253     ac_cpp_err=
10254   fi
10255 else
10256   ac_cpp_err=yes
10257 fi
10258 if test -z "$ac_cpp_err"; then
10259   ac_header_preproc=yes
10260 else
10261   echo "$as_me: failed program was:" >&5
10262 sed 's/^/| /' conftest.$ac_ext >&5
10263
10264   ac_header_preproc=no
10265 fi
10266 rm -f conftest.err conftest.$ac_ext
10267 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10268 echo "${ECHO_T}$ac_header_preproc" >&6
10269
10270 # So?  What about this header?
10271 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10272   yes:no: )
10273     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10274 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10275     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10276 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10277     ac_header_preproc=yes
10278     ;;
10279   no:yes:* )
10280     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10281 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10282     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10283 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10284     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10285 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10286     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10287 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10288     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10289 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10290     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10291 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10292     (
10293       cat <<\_ASBOX
10294 ## ---------------------------------------- ##
10295 ## Report this to pgsql-bugs@postgresql.org ##
10296 ## ---------------------------------------- ##
10297 _ASBOX
10298     ) |
10299       sed "s/^/$as_me: WARNING:     /" >&2
10300     ;;
10301 esac
10302 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10303 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10304 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10305   echo $ECHO_N "(cached) $ECHO_C" >&6
10306 else
10307   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10308 fi
10309 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10310 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10311
10312 fi
10313 if test $ac_cv_header_openssl_ssl_h = yes; then
10314   :
10315 else
10316   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10317 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10318    { (exit 1); exit 1; }; }
10319 fi
10320
10321
10322   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10323   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10324 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10325 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10326   echo $ECHO_N "(cached) $ECHO_C" >&6
10327 fi
10328 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10329 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10330 else
10331   # Is the header compilable?
10332 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10333 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10334 cat >conftest.$ac_ext <<_ACEOF
10335 /* confdefs.h.  */
10336 _ACEOF
10337 cat confdefs.h >>conftest.$ac_ext
10338 cat >>conftest.$ac_ext <<_ACEOF
10339 /* end confdefs.h.  */
10340 $ac_includes_default
10341 #include <openssl/err.h>
10342 _ACEOF
10343 rm -f conftest.$ac_objext
10344 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10345   (eval $ac_compile) 2>conftest.er1
10346   ac_status=$?
10347   grep -v '^ *+' conftest.er1 >conftest.err
10348   rm -f conftest.er1
10349   cat conftest.err >&5
10350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10351   (exit $ac_status); } &&
10352          { ac_try='test -z "$ac_c_werror_flag"
10353                          || test ! -s conftest.err'
10354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10355   (eval $ac_try) 2>&5
10356   ac_status=$?
10357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10358   (exit $ac_status); }; } &&
10359          { ac_try='test -s conftest.$ac_objext'
10360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10361   (eval $ac_try) 2>&5
10362   ac_status=$?
10363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10364   (exit $ac_status); }; }; then
10365   ac_header_compiler=yes
10366 else
10367   echo "$as_me: failed program was:" >&5
10368 sed 's/^/| /' conftest.$ac_ext >&5
10369
10370 ac_header_compiler=no
10371 fi
10372 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10373 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10374 echo "${ECHO_T}$ac_header_compiler" >&6
10375
10376 # Is the header present?
10377 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10378 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10379 cat >conftest.$ac_ext <<_ACEOF
10380 /* confdefs.h.  */
10381 _ACEOF
10382 cat confdefs.h >>conftest.$ac_ext
10383 cat >>conftest.$ac_ext <<_ACEOF
10384 /* end confdefs.h.  */
10385 #include <openssl/err.h>
10386 _ACEOF
10387 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10388   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10389   ac_status=$?
10390   grep -v '^ *+' conftest.er1 >conftest.err
10391   rm -f conftest.er1
10392   cat conftest.err >&5
10393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10394   (exit $ac_status); } >/dev/null; then
10395   if test -s conftest.err; then
10396     ac_cpp_err=$ac_c_preproc_warn_flag
10397     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10398   else
10399     ac_cpp_err=
10400   fi
10401 else
10402   ac_cpp_err=yes
10403 fi
10404 if test -z "$ac_cpp_err"; then
10405   ac_header_preproc=yes
10406 else
10407   echo "$as_me: failed program was:" >&5
10408 sed 's/^/| /' conftest.$ac_ext >&5
10409
10410   ac_header_preproc=no
10411 fi
10412 rm -f conftest.err conftest.$ac_ext
10413 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10414 echo "${ECHO_T}$ac_header_preproc" >&6
10415
10416 # So?  What about this header?
10417 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10418   yes:no: )
10419     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10420 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10421     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10422 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10423     ac_header_preproc=yes
10424     ;;
10425   no:yes:* )
10426     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10427 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10428     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10429 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10430     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10431 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10432     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10433 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10434     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10435 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10436     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10437 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10438     (
10439       cat <<\_ASBOX
10440 ## ---------------------------------------- ##
10441 ## Report this to pgsql-bugs@postgresql.org ##
10442 ## ---------------------------------------- ##
10443 _ASBOX
10444     ) |
10445       sed "s/^/$as_me: WARNING:     /" >&2
10446     ;;
10447 esac
10448 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10449 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10450 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10451   echo $ECHO_N "(cached) $ECHO_C" >&6
10452 else
10453   ac_cv_header_openssl_err_h=$ac_header_preproc
10454 fi
10455 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10456 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10457
10458 fi
10459 if test $ac_cv_header_openssl_err_h = yes; then
10460   :
10461 else
10462   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10463 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10464    { (exit 1); exit 1; }; }
10465 fi
10466
10467
10468 fi
10469
10470 if test "$with_pam" = yes ; then
10471
10472 for ac_header in security/pam_appl.h
10473 do
10474 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10475 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10476   echo "$as_me:$LINENO: checking for $ac_header" >&5
10477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10478 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10479   echo $ECHO_N "(cached) $ECHO_C" >&6
10480 fi
10481 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10482 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10483 else
10484   # Is the header compilable?
10485 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10486 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10487 cat >conftest.$ac_ext <<_ACEOF
10488 /* confdefs.h.  */
10489 _ACEOF
10490 cat confdefs.h >>conftest.$ac_ext
10491 cat >>conftest.$ac_ext <<_ACEOF
10492 /* end confdefs.h.  */
10493 $ac_includes_default
10494 #include <$ac_header>
10495 _ACEOF
10496 rm -f conftest.$ac_objext
10497 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10498   (eval $ac_compile) 2>conftest.er1
10499   ac_status=$?
10500   grep -v '^ *+' conftest.er1 >conftest.err
10501   rm -f conftest.er1
10502   cat conftest.err >&5
10503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10504   (exit $ac_status); } &&
10505          { ac_try='test -z "$ac_c_werror_flag"
10506                          || test ! -s conftest.err'
10507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10508   (eval $ac_try) 2>&5
10509   ac_status=$?
10510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10511   (exit $ac_status); }; } &&
10512          { ac_try='test -s conftest.$ac_objext'
10513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10514   (eval $ac_try) 2>&5
10515   ac_status=$?
10516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10517   (exit $ac_status); }; }; then
10518   ac_header_compiler=yes
10519 else
10520   echo "$as_me: failed program was:" >&5
10521 sed 's/^/| /' conftest.$ac_ext >&5
10522
10523 ac_header_compiler=no
10524 fi
10525 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10526 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10527 echo "${ECHO_T}$ac_header_compiler" >&6
10528
10529 # Is the header present?
10530 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10531 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10532 cat >conftest.$ac_ext <<_ACEOF
10533 /* confdefs.h.  */
10534 _ACEOF
10535 cat confdefs.h >>conftest.$ac_ext
10536 cat >>conftest.$ac_ext <<_ACEOF
10537 /* end confdefs.h.  */
10538 #include <$ac_header>
10539 _ACEOF
10540 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10541   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10542   ac_status=$?
10543   grep -v '^ *+' conftest.er1 >conftest.err
10544   rm -f conftest.er1
10545   cat conftest.err >&5
10546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10547   (exit $ac_status); } >/dev/null; then
10548   if test -s conftest.err; then
10549     ac_cpp_err=$ac_c_preproc_warn_flag
10550     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10551   else
10552     ac_cpp_err=
10553   fi
10554 else
10555   ac_cpp_err=yes
10556 fi
10557 if test -z "$ac_cpp_err"; then
10558   ac_header_preproc=yes
10559 else
10560   echo "$as_me: failed program was:" >&5
10561 sed 's/^/| /' conftest.$ac_ext >&5
10562
10563   ac_header_preproc=no
10564 fi
10565 rm -f conftest.err conftest.$ac_ext
10566 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10567 echo "${ECHO_T}$ac_header_preproc" >&6
10568
10569 # So?  What about this header?
10570 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10571   yes:no: )
10572     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10573 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10574     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10575 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10576     ac_header_preproc=yes
10577     ;;
10578   no:yes:* )
10579     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10580 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10581     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10582 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10583     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10584 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10585     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10586 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10587     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10588 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10589     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10590 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10591     (
10592       cat <<\_ASBOX
10593 ## ---------------------------------------- ##
10594 ## Report this to pgsql-bugs@postgresql.org ##
10595 ## ---------------------------------------- ##
10596 _ASBOX
10597     ) |
10598       sed "s/^/$as_me: WARNING:     /" >&2
10599     ;;
10600 esac
10601 echo "$as_me:$LINENO: checking for $ac_header" >&5
10602 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10603 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10604   echo $ECHO_N "(cached) $ECHO_C" >&6
10605 else
10606   eval "$as_ac_Header=\$ac_header_preproc"
10607 fi
10608 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10609 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10610
10611 fi
10612 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10613   cat >>confdefs.h <<_ACEOF
10614 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10615 _ACEOF
10616
10617 else
10618
10619 for ac_header in pam/pam_appl.h
10620 do
10621 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10622 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10623   echo "$as_me:$LINENO: checking for $ac_header" >&5
10624 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10625 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10626   echo $ECHO_N "(cached) $ECHO_C" >&6
10627 fi
10628 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10629 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10630 else
10631   # Is the header compilable?
10632 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10633 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10634 cat >conftest.$ac_ext <<_ACEOF
10635 /* confdefs.h.  */
10636 _ACEOF
10637 cat confdefs.h >>conftest.$ac_ext
10638 cat >>conftest.$ac_ext <<_ACEOF
10639 /* end confdefs.h.  */
10640 $ac_includes_default
10641 #include <$ac_header>
10642 _ACEOF
10643 rm -f conftest.$ac_objext
10644 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10645   (eval $ac_compile) 2>conftest.er1
10646   ac_status=$?
10647   grep -v '^ *+' conftest.er1 >conftest.err
10648   rm -f conftest.er1
10649   cat conftest.err >&5
10650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10651   (exit $ac_status); } &&
10652          { ac_try='test -z "$ac_c_werror_flag"
10653                          || test ! -s conftest.err'
10654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10655   (eval $ac_try) 2>&5
10656   ac_status=$?
10657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658   (exit $ac_status); }; } &&
10659          { ac_try='test -s conftest.$ac_objext'
10660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10661   (eval $ac_try) 2>&5
10662   ac_status=$?
10663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10664   (exit $ac_status); }; }; then
10665   ac_header_compiler=yes
10666 else
10667   echo "$as_me: failed program was:" >&5
10668 sed 's/^/| /' conftest.$ac_ext >&5
10669
10670 ac_header_compiler=no
10671 fi
10672 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10673 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10674 echo "${ECHO_T}$ac_header_compiler" >&6
10675
10676 # Is the header present?
10677 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10678 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10679 cat >conftest.$ac_ext <<_ACEOF
10680 /* confdefs.h.  */
10681 _ACEOF
10682 cat confdefs.h >>conftest.$ac_ext
10683 cat >>conftest.$ac_ext <<_ACEOF
10684 /* end confdefs.h.  */
10685 #include <$ac_header>
10686 _ACEOF
10687 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10688   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10689   ac_status=$?
10690   grep -v '^ *+' conftest.er1 >conftest.err
10691   rm -f conftest.er1
10692   cat conftest.err >&5
10693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694   (exit $ac_status); } >/dev/null; then
10695   if test -s conftest.err; then
10696     ac_cpp_err=$ac_c_preproc_warn_flag
10697     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10698   else
10699     ac_cpp_err=
10700   fi
10701 else
10702   ac_cpp_err=yes
10703 fi
10704 if test -z "$ac_cpp_err"; then
10705   ac_header_preproc=yes
10706 else
10707   echo "$as_me: failed program was:" >&5
10708 sed 's/^/| /' conftest.$ac_ext >&5
10709
10710   ac_header_preproc=no
10711 fi
10712 rm -f conftest.err conftest.$ac_ext
10713 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10714 echo "${ECHO_T}$ac_header_preproc" >&6
10715
10716 # So?  What about this header?
10717 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10718   yes:no: )
10719     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10720 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10721     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10722 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10723     ac_header_preproc=yes
10724     ;;
10725   no:yes:* )
10726     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10727 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10728     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10729 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10730     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10731 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10732     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10733 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10734     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10735 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10736     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10737 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10738     (
10739       cat <<\_ASBOX
10740 ## ---------------------------------------- ##
10741 ## Report this to pgsql-bugs@postgresql.org ##
10742 ## ---------------------------------------- ##
10743 _ASBOX
10744     ) |
10745       sed "s/^/$as_me: WARNING:     /" >&2
10746     ;;
10747 esac
10748 echo "$as_me:$LINENO: checking for $ac_header" >&5
10749 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10750 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10751   echo $ECHO_N "(cached) $ECHO_C" >&6
10752 else
10753   eval "$as_ac_Header=\$ac_header_preproc"
10754 fi
10755 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10756 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10757
10758 fi
10759 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10760   cat >>confdefs.h <<_ACEOF
10761 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10762 _ACEOF
10763
10764 else
10765   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10766 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10767    { (exit 1); exit 1; }; }
10768 fi
10769
10770 done
10771
10772 fi
10773
10774 done
10775
10776 fi
10777
10778 if test "$with_bonjour" = yes ; then
10779   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10780   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10781 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10782 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10783   echo $ECHO_N "(cached) $ECHO_C" >&6
10784 fi
10785 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10786 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10787 else
10788   # Is the header compilable?
10789 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10790 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10791 cat >conftest.$ac_ext <<_ACEOF
10792 /* confdefs.h.  */
10793 _ACEOF
10794 cat confdefs.h >>conftest.$ac_ext
10795 cat >>conftest.$ac_ext <<_ACEOF
10796 /* end confdefs.h.  */
10797 $ac_includes_default
10798 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10799 _ACEOF
10800 rm -f conftest.$ac_objext
10801 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10802   (eval $ac_compile) 2>conftest.er1
10803   ac_status=$?
10804   grep -v '^ *+' conftest.er1 >conftest.err
10805   rm -f conftest.er1
10806   cat conftest.err >&5
10807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10808   (exit $ac_status); } &&
10809          { ac_try='test -z "$ac_c_werror_flag"
10810                          || test ! -s conftest.err'
10811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10812   (eval $ac_try) 2>&5
10813   ac_status=$?
10814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10815   (exit $ac_status); }; } &&
10816          { ac_try='test -s conftest.$ac_objext'
10817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10818   (eval $ac_try) 2>&5
10819   ac_status=$?
10820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10821   (exit $ac_status); }; }; then
10822   ac_header_compiler=yes
10823 else
10824   echo "$as_me: failed program was:" >&5
10825 sed 's/^/| /' conftest.$ac_ext >&5
10826
10827 ac_header_compiler=no
10828 fi
10829 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10830 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10831 echo "${ECHO_T}$ac_header_compiler" >&6
10832
10833 # Is the header present?
10834 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10835 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10836 cat >conftest.$ac_ext <<_ACEOF
10837 /* confdefs.h.  */
10838 _ACEOF
10839 cat confdefs.h >>conftest.$ac_ext
10840 cat >>conftest.$ac_ext <<_ACEOF
10841 /* end confdefs.h.  */
10842 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10843 _ACEOF
10844 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10845   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10846   ac_status=$?
10847   grep -v '^ *+' conftest.er1 >conftest.err
10848   rm -f conftest.er1
10849   cat conftest.err >&5
10850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10851   (exit $ac_status); } >/dev/null; then
10852   if test -s conftest.err; then
10853     ac_cpp_err=$ac_c_preproc_warn_flag
10854     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10855   else
10856     ac_cpp_err=
10857   fi
10858 else
10859   ac_cpp_err=yes
10860 fi
10861 if test -z "$ac_cpp_err"; then
10862   ac_header_preproc=yes
10863 else
10864   echo "$as_me: failed program was:" >&5
10865 sed 's/^/| /' conftest.$ac_ext >&5
10866
10867   ac_header_preproc=no
10868 fi
10869 rm -f conftest.err conftest.$ac_ext
10870 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10871 echo "${ECHO_T}$ac_header_preproc" >&6
10872
10873 # So?  What about this header?
10874 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10875   yes:no: )
10876     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10877 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10878     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10879 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10880     ac_header_preproc=yes
10881     ;;
10882   no:yes:* )
10883     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10884 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10885     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10886 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10887     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10888 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10889     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10890 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10891     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10892 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10893     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10894 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10895     (
10896       cat <<\_ASBOX
10897 ## ---------------------------------------- ##
10898 ## Report this to pgsql-bugs@postgresql.org ##
10899 ## ---------------------------------------- ##
10900 _ASBOX
10901     ) |
10902       sed "s/^/$as_me: WARNING:     /" >&2
10903     ;;
10904 esac
10905 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10906 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10907 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10908   echo $ECHO_N "(cached) $ECHO_C" >&6
10909 else
10910   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10911 fi
10912 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10913 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10914
10915 fi
10916 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10917   :
10918 else
10919   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10920 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10921    { (exit 1); exit 1; }; }
10922 fi
10923
10924
10925 fi
10926
10927
10928 ##
10929 ## Types, structures, compiler characteristics
10930 ##
10931
10932  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10933 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10934 if test "${ac_cv_c_const+set}" = set; then
10935   echo $ECHO_N "(cached) $ECHO_C" >&6
10936 else
10937   cat >conftest.$ac_ext <<_ACEOF
10938 /* confdefs.h.  */
10939 _ACEOF
10940 cat confdefs.h >>conftest.$ac_ext
10941 cat >>conftest.$ac_ext <<_ACEOF
10942 /* end confdefs.h.  */
10943
10944 int
10945 main ()
10946 {
10947 /* FIXME: Include the comments suggested by Paul. */
10948 #ifndef __cplusplus
10949   /* Ultrix mips cc rejects this.  */
10950   typedef int charset[2];
10951   const charset x;
10952   /* SunOS 4.1.1 cc rejects this.  */
10953   char const *const *ccp;
10954   char **p;
10955   /* NEC SVR4.0.2 mips cc rejects this.  */
10956   struct point {int x, y;};
10957   static struct point const zero = {0,0};
10958   /* AIX XL C 1.02.0.0 rejects this.
10959      It does not let you subtract one const X* pointer from another in
10960      an arm of an if-expression whose if-part is not a constant
10961      expression */
10962   const char *g = "string";
10963   ccp = &g + (g ? g-g : 0);
10964   /* HPUX 7.0 cc rejects these. */
10965   ++ccp;
10966   p = (char**) ccp;
10967   ccp = (char const *const *) p;
10968   { /* SCO 3.2v4 cc rejects this.  */
10969     char *t;
10970     char const *s = 0 ? (char *) 0 : (char const *) 0;
10971
10972     *t++ = 0;
10973   }
10974   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10975     int x[] = {25, 17};
10976     const int *foo = &x[0];
10977     ++foo;
10978   }
10979   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10980     typedef const int *iptr;
10981     iptr p = 0;
10982     ++p;
10983   }
10984   { /* AIX XL C 1.02.0.0 rejects this saying
10985        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10986     struct s { int j; const int *ap[3]; };
10987     struct s *b; b->j = 5;
10988   }
10989   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10990     const int foo = 10;
10991   }
10992 #endif
10993
10994   ;
10995   return 0;
10996 }
10997 _ACEOF
10998 rm -f conftest.$ac_objext
10999 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11000   (eval $ac_compile) 2>conftest.er1
11001   ac_status=$?
11002   grep -v '^ *+' conftest.er1 >conftest.err
11003   rm -f conftest.er1
11004   cat conftest.err >&5
11005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11006   (exit $ac_status); } &&
11007          { ac_try='test -z "$ac_c_werror_flag"
11008                          || test ! -s conftest.err'
11009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11010   (eval $ac_try) 2>&5
11011   ac_status=$?
11012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11013   (exit $ac_status); }; } &&
11014          { ac_try='test -s conftest.$ac_objext'
11015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11016   (eval $ac_try) 2>&5
11017   ac_status=$?
11018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11019   (exit $ac_status); }; }; then
11020   ac_cv_c_const=yes
11021 else
11022   echo "$as_me: failed program was:" >&5
11023 sed 's/^/| /' conftest.$ac_ext >&5
11024
11025 ac_cv_c_const=no
11026 fi
11027 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11028 fi
11029 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
11030 echo "${ECHO_T}$ac_cv_c_const" >&6
11031 if test $ac_cv_c_const = no; then
11032
11033 cat >>confdefs.h <<\_ACEOF
11034 #define const
11035 _ACEOF
11036
11037 fi
11038
11039
11040 echo "$as_me:$LINENO: checking for inline" >&5
11041 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11042 if test "${ac_cv_c_inline+set}" = set; then
11043   echo $ECHO_N "(cached) $ECHO_C" >&6
11044 else
11045   ac_cv_c_inline=no
11046 for ac_kw in inline __inline__ __inline; do
11047   cat >conftest.$ac_ext <<_ACEOF
11048 /* confdefs.h.  */
11049 _ACEOF
11050 cat confdefs.h >>conftest.$ac_ext
11051 cat >>conftest.$ac_ext <<_ACEOF
11052 /* end confdefs.h.  */
11053 #ifndef __cplusplus
11054 typedef int foo_t;
11055 static $ac_kw foo_t static_foo () {return 0; }
11056 $ac_kw int foo () {return 0; }
11057 #endif
11058
11059 _ACEOF
11060 rm -f conftest.$ac_objext
11061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11062   (eval $ac_compile) 2>conftest.er1
11063   ac_status=$?
11064   grep -v '^ *+' conftest.er1 >conftest.err
11065   rm -f conftest.er1
11066   cat conftest.err >&5
11067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11068   (exit $ac_status); } &&
11069          { ac_try='test -z "$ac_c_werror_flag"
11070                          || test ! -s conftest.err'
11071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11072   (eval $ac_try) 2>&5
11073   ac_status=$?
11074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075   (exit $ac_status); }; } &&
11076          { ac_try='test -s conftest.$ac_objext'
11077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11078   (eval $ac_try) 2>&5
11079   ac_status=$?
11080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11081   (exit $ac_status); }; }; then
11082   ac_cv_c_inline=$ac_kw; break
11083 else
11084   echo "$as_me: failed program was:" >&5
11085 sed 's/^/| /' conftest.$ac_ext >&5
11086
11087 fi
11088 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11089 done
11090
11091 fi
11092 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11093 echo "${ECHO_T}$ac_cv_c_inline" >&6
11094 case $ac_cv_c_inline in
11095   inline | yes) ;;
11096   no)
11097 cat >>confdefs.h <<\_ACEOF
11098 #define inline
11099 _ACEOF
11100  ;;
11101   *)  cat >>confdefs.h <<_ACEOF
11102 #define inline $ac_cv_c_inline
11103 _ACEOF
11104  ;;
11105 esac
11106
11107 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11108 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11109 if test "${ac_cv_c_stringize+set}" = set; then
11110   echo $ECHO_N "(cached) $ECHO_C" >&6
11111 else
11112   cat >conftest.$ac_ext <<_ACEOF
11113 /* confdefs.h.  */
11114 _ACEOF
11115 cat confdefs.h >>conftest.$ac_ext
11116 cat >>conftest.$ac_ext <<_ACEOF
11117 /* end confdefs.h.  */
11118 #define x(y) #y
11119
11120 char *s = x(teststring);
11121 _ACEOF
11122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11123   $EGREP "#teststring" >/dev/null 2>&1; then
11124   ac_cv_c_stringize=no
11125 else
11126   ac_cv_c_stringize=yes
11127 fi
11128 rm -f conftest*
11129
11130 fi
11131 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11132 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11133 if test $ac_cv_c_stringize = yes; then
11134
11135 cat >>confdefs.h <<\_ACEOF
11136 #define HAVE_STRINGIZE 1
11137 _ACEOF
11138
11139 fi
11140
11141 echo "$as_me:$LINENO: checking for signed types" >&5
11142 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11143 if test "${pgac_cv_c_signed+set}" = set; then
11144   echo $ECHO_N "(cached) $ECHO_C" >&6
11145 else
11146   cat >conftest.$ac_ext <<_ACEOF
11147 /* confdefs.h.  */
11148 _ACEOF
11149 cat confdefs.h >>conftest.$ac_ext
11150 cat >>conftest.$ac_ext <<_ACEOF
11151 /* end confdefs.h.  */
11152
11153 int
11154 main ()
11155 {
11156 signed char c; signed short s; signed int i;
11157   ;
11158   return 0;
11159 }
11160 _ACEOF
11161 rm -f conftest.$ac_objext
11162 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11163   (eval $ac_compile) 2>conftest.er1
11164   ac_status=$?
11165   grep -v '^ *+' conftest.er1 >conftest.err
11166   rm -f conftest.er1
11167   cat conftest.err >&5
11168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11169   (exit $ac_status); } &&
11170          { ac_try='test -z "$ac_c_werror_flag"
11171                          || test ! -s conftest.err'
11172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11173   (eval $ac_try) 2>&5
11174   ac_status=$?
11175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11176   (exit $ac_status); }; } &&
11177          { ac_try='test -s conftest.$ac_objext'
11178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11179   (eval $ac_try) 2>&5
11180   ac_status=$?
11181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11182   (exit $ac_status); }; }; then
11183   pgac_cv_c_signed=yes
11184 else
11185   echo "$as_me: failed program was:" >&5
11186 sed 's/^/| /' conftest.$ac_ext >&5
11187
11188 pgac_cv_c_signed=no
11189 fi
11190 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11191 fi
11192 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11193 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11194 if test x"$pgac_cv_c_signed" = xno ; then
11195
11196 cat >>confdefs.h <<\_ACEOF
11197 #define signed
11198 _ACEOF
11199
11200 fi
11201 echo "$as_me:$LINENO: checking for working volatile" >&5
11202 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11203 if test "${ac_cv_c_volatile+set}" = set; then
11204   echo $ECHO_N "(cached) $ECHO_C" >&6
11205 else
11206   cat >conftest.$ac_ext <<_ACEOF
11207 /* confdefs.h.  */
11208 _ACEOF
11209 cat confdefs.h >>conftest.$ac_ext
11210 cat >>conftest.$ac_ext <<_ACEOF
11211 /* end confdefs.h.  */
11212
11213 int
11214 main ()
11215 {
11216
11217 volatile int x;
11218 int * volatile y;
11219   ;
11220   return 0;
11221 }
11222 _ACEOF
11223 rm -f conftest.$ac_objext
11224 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11225   (eval $ac_compile) 2>conftest.er1
11226   ac_status=$?
11227   grep -v '^ *+' conftest.er1 >conftest.err
11228   rm -f conftest.er1
11229   cat conftest.err >&5
11230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11231   (exit $ac_status); } &&
11232          { ac_try='test -z "$ac_c_werror_flag"
11233                          || test ! -s conftest.err'
11234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11235   (eval $ac_try) 2>&5
11236   ac_status=$?
11237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11238   (exit $ac_status); }; } &&
11239          { ac_try='test -s conftest.$ac_objext'
11240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11241   (eval $ac_try) 2>&5
11242   ac_status=$?
11243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11244   (exit $ac_status); }; }; then
11245   ac_cv_c_volatile=yes
11246 else
11247   echo "$as_me: failed program was:" >&5
11248 sed 's/^/| /' conftest.$ac_ext >&5
11249
11250 ac_cv_c_volatile=no
11251 fi
11252 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11253 fi
11254 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11255 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11256 if test $ac_cv_c_volatile = no; then
11257
11258 cat >>confdefs.h <<\_ACEOF
11259 #define volatile
11260 _ACEOF
11261
11262 fi
11263
11264 echo "$as_me:$LINENO: checking for __func__" >&5
11265 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11266 if test "${pgac_cv_funcname_func_support+set}" = set; then
11267   echo $ECHO_N "(cached) $ECHO_C" >&6
11268 else
11269   cat >conftest.$ac_ext <<_ACEOF
11270 /* confdefs.h.  */
11271 _ACEOF
11272 cat confdefs.h >>conftest.$ac_ext
11273 cat >>conftest.$ac_ext <<_ACEOF
11274 /* end confdefs.h.  */
11275 #include <stdio.h>
11276 int
11277 main ()
11278 {
11279 printf("%s\n", __func__);
11280   ;
11281   return 0;
11282 }
11283 _ACEOF
11284 rm -f conftest.$ac_objext
11285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11286   (eval $ac_compile) 2>conftest.er1
11287   ac_status=$?
11288   grep -v '^ *+' conftest.er1 >conftest.err
11289   rm -f conftest.er1
11290   cat conftest.err >&5
11291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11292   (exit $ac_status); } &&
11293          { ac_try='test -z "$ac_c_werror_flag"
11294                          || test ! -s conftest.err'
11295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11296   (eval $ac_try) 2>&5
11297   ac_status=$?
11298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11299   (exit $ac_status); }; } &&
11300          { ac_try='test -s conftest.$ac_objext'
11301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11302   (eval $ac_try) 2>&5
11303   ac_status=$?
11304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11305   (exit $ac_status); }; }; then
11306   pgac_cv_funcname_func_support=yes
11307 else
11308   echo "$as_me: failed program was:" >&5
11309 sed 's/^/| /' conftest.$ac_ext >&5
11310
11311 pgac_cv_funcname_func_support=no
11312 fi
11313 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11314 fi
11315 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11316 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11317 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11318
11319 cat >>confdefs.h <<\_ACEOF
11320 #define HAVE_FUNCNAME__FUNC 1
11321 _ACEOF
11322
11323 else
11324 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11325 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11326 if test "${pgac_cv_funcname_function_support+set}" = set; then
11327   echo $ECHO_N "(cached) $ECHO_C" >&6
11328 else
11329   cat >conftest.$ac_ext <<_ACEOF
11330 /* confdefs.h.  */
11331 _ACEOF
11332 cat confdefs.h >>conftest.$ac_ext
11333 cat >>conftest.$ac_ext <<_ACEOF
11334 /* end confdefs.h.  */
11335 #include <stdio.h>
11336 int
11337 main ()
11338 {
11339 printf("%s\n", __FUNCTION__);
11340   ;
11341   return 0;
11342 }
11343 _ACEOF
11344 rm -f conftest.$ac_objext
11345 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11346   (eval $ac_compile) 2>conftest.er1
11347   ac_status=$?
11348   grep -v '^ *+' conftest.er1 >conftest.err
11349   rm -f conftest.er1
11350   cat conftest.err >&5
11351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352   (exit $ac_status); } &&
11353          { ac_try='test -z "$ac_c_werror_flag"
11354                          || test ! -s conftest.err'
11355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11356   (eval $ac_try) 2>&5
11357   ac_status=$?
11358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11359   (exit $ac_status); }; } &&
11360          { ac_try='test -s conftest.$ac_objext'
11361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11362   (eval $ac_try) 2>&5
11363   ac_status=$?
11364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11365   (exit $ac_status); }; }; then
11366   pgac_cv_funcname_function_support=yes
11367 else
11368   echo "$as_me: failed program was:" >&5
11369 sed 's/^/| /' conftest.$ac_ext >&5
11370
11371 pgac_cv_funcname_function_support=no
11372 fi
11373 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11374 fi
11375 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11376 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11377 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11378
11379 cat >>confdefs.h <<\_ACEOF
11380 #define HAVE_FUNCNAME__FUNCTION 1
11381 _ACEOF
11382
11383 fi
11384 fi
11385 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11386 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11387 if test "${ac_cv_struct_tm+set}" = set; then
11388   echo $ECHO_N "(cached) $ECHO_C" >&6
11389 else
11390   cat >conftest.$ac_ext <<_ACEOF
11391 /* confdefs.h.  */
11392 _ACEOF
11393 cat confdefs.h >>conftest.$ac_ext
11394 cat >>conftest.$ac_ext <<_ACEOF
11395 /* end confdefs.h.  */
11396 #include <sys/types.h>
11397 #include <time.h>
11398
11399 int
11400 main ()
11401 {
11402 struct tm *tp; tp->tm_sec;
11403   ;
11404   return 0;
11405 }
11406 _ACEOF
11407 rm -f conftest.$ac_objext
11408 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11409   (eval $ac_compile) 2>conftest.er1
11410   ac_status=$?
11411   grep -v '^ *+' conftest.er1 >conftest.err
11412   rm -f conftest.er1
11413   cat conftest.err >&5
11414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415   (exit $ac_status); } &&
11416          { ac_try='test -z "$ac_c_werror_flag"
11417                          || test ! -s conftest.err'
11418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11419   (eval $ac_try) 2>&5
11420   ac_status=$?
11421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11422   (exit $ac_status); }; } &&
11423          { ac_try='test -s conftest.$ac_objext'
11424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11425   (eval $ac_try) 2>&5
11426   ac_status=$?
11427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11428   (exit $ac_status); }; }; then
11429   ac_cv_struct_tm=time.h
11430 else
11431   echo "$as_me: failed program was:" >&5
11432 sed 's/^/| /' conftest.$ac_ext >&5
11433
11434 ac_cv_struct_tm=sys/time.h
11435 fi
11436 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11437 fi
11438 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11439 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11440 if test $ac_cv_struct_tm = sys/time.h; then
11441
11442 cat >>confdefs.h <<\_ACEOF
11443 #define TM_IN_SYS_TIME 1
11444 _ACEOF
11445
11446 fi
11447
11448 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11449 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11450 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11451   echo $ECHO_N "(cached) $ECHO_C" >&6
11452 else
11453   cat >conftest.$ac_ext <<_ACEOF
11454 /* confdefs.h.  */
11455 _ACEOF
11456 cat confdefs.h >>conftest.$ac_ext
11457 cat >>conftest.$ac_ext <<_ACEOF
11458 /* end confdefs.h.  */
11459 #include <sys/types.h>
11460 #include <$ac_cv_struct_tm>
11461
11462
11463 int
11464 main ()
11465 {
11466 static struct tm ac_aggr;
11467 if (ac_aggr.tm_zone)
11468 return 0;
11469   ;
11470   return 0;
11471 }
11472 _ACEOF
11473 rm -f conftest.$ac_objext
11474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11475   (eval $ac_compile) 2>conftest.er1
11476   ac_status=$?
11477   grep -v '^ *+' conftest.er1 >conftest.err
11478   rm -f conftest.er1
11479   cat conftest.err >&5
11480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481   (exit $ac_status); } &&
11482          { ac_try='test -z "$ac_c_werror_flag"
11483                          || test ! -s conftest.err'
11484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11485   (eval $ac_try) 2>&5
11486   ac_status=$?
11487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11488   (exit $ac_status); }; } &&
11489          { ac_try='test -s conftest.$ac_objext'
11490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11491   (eval $ac_try) 2>&5
11492   ac_status=$?
11493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11494   (exit $ac_status); }; }; then
11495   ac_cv_member_struct_tm_tm_zone=yes
11496 else
11497   echo "$as_me: failed program was:" >&5
11498 sed 's/^/| /' conftest.$ac_ext >&5
11499
11500 cat >conftest.$ac_ext <<_ACEOF
11501 /* confdefs.h.  */
11502 _ACEOF
11503 cat confdefs.h >>conftest.$ac_ext
11504 cat >>conftest.$ac_ext <<_ACEOF
11505 /* end confdefs.h.  */
11506 #include <sys/types.h>
11507 #include <$ac_cv_struct_tm>
11508
11509
11510 int
11511 main ()
11512 {
11513 static struct tm ac_aggr;
11514 if (sizeof ac_aggr.tm_zone)
11515 return 0;
11516   ;
11517   return 0;
11518 }
11519 _ACEOF
11520 rm -f conftest.$ac_objext
11521 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11522   (eval $ac_compile) 2>conftest.er1
11523   ac_status=$?
11524   grep -v '^ *+' conftest.er1 >conftest.err
11525   rm -f conftest.er1
11526   cat conftest.err >&5
11527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11528   (exit $ac_status); } &&
11529          { ac_try='test -z "$ac_c_werror_flag"
11530                          || test ! -s conftest.err'
11531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11532   (eval $ac_try) 2>&5
11533   ac_status=$?
11534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11535   (exit $ac_status); }; } &&
11536          { ac_try='test -s conftest.$ac_objext'
11537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11538   (eval $ac_try) 2>&5
11539   ac_status=$?
11540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11541   (exit $ac_status); }; }; then
11542   ac_cv_member_struct_tm_tm_zone=yes
11543 else
11544   echo "$as_me: failed program was:" >&5
11545 sed 's/^/| /' conftest.$ac_ext >&5
11546
11547 ac_cv_member_struct_tm_tm_zone=no
11548 fi
11549 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11550 fi
11551 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11552 fi
11553 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11554 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11555 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11556
11557 cat >>confdefs.h <<_ACEOF
11558 #define HAVE_STRUCT_TM_TM_ZONE 1
11559 _ACEOF
11560
11561
11562 fi
11563
11564 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11565
11566 cat >>confdefs.h <<\_ACEOF
11567 #define HAVE_TM_ZONE 1
11568 _ACEOF
11569
11570 fi
11571 echo "$as_me:$LINENO: checking for tzname" >&5
11572 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11573 if test "${ac_cv_var_tzname+set}" = set; then
11574   echo $ECHO_N "(cached) $ECHO_C" >&6
11575 else
11576   cat >conftest.$ac_ext <<_ACEOF
11577 /* confdefs.h.  */
11578 _ACEOF
11579 cat confdefs.h >>conftest.$ac_ext
11580 cat >>conftest.$ac_ext <<_ACEOF
11581 /* end confdefs.h.  */
11582 #include <time.h>
11583 #ifndef tzname /* For SGI.  */
11584 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11585 #endif
11586
11587 int
11588 main ()
11589 {
11590 atoi(*tzname);
11591   ;
11592   return 0;
11593 }
11594 _ACEOF
11595 rm -f conftest.$ac_objext conftest$ac_exeext
11596 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11597   (eval $ac_link) 2>conftest.er1
11598   ac_status=$?
11599   grep -v '^ *+' conftest.er1 >conftest.err
11600   rm -f conftest.er1
11601   cat conftest.err >&5
11602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11603   (exit $ac_status); } &&
11604          { ac_try='test -z "$ac_c_werror_flag"
11605                          || test ! -s conftest.err'
11606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11607   (eval $ac_try) 2>&5
11608   ac_status=$?
11609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11610   (exit $ac_status); }; } &&
11611          { ac_try='test -s conftest$ac_exeext'
11612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11613   (eval $ac_try) 2>&5
11614   ac_status=$?
11615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11616   (exit $ac_status); }; }; then
11617   ac_cv_var_tzname=yes
11618 else
11619   echo "$as_me: failed program was:" >&5
11620 sed 's/^/| /' conftest.$ac_ext >&5
11621
11622 ac_cv_var_tzname=no
11623 fi
11624 rm -f conftest.err conftest.$ac_objext \
11625       conftest$ac_exeext conftest.$ac_ext
11626 fi
11627 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11628 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11629 if test $ac_cv_var_tzname = yes; then
11630
11631 cat >>confdefs.h <<\_ACEOF
11632 #define HAVE_TZNAME 1
11633 _ACEOF
11634
11635 fi
11636
11637 echo "$as_me:$LINENO: checking for union semun" >&5
11638 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11639 if test "${ac_cv_type_union_semun+set}" = set; then
11640   echo $ECHO_N "(cached) $ECHO_C" >&6
11641 else
11642   cat >conftest.$ac_ext <<_ACEOF
11643 /* confdefs.h.  */
11644 _ACEOF
11645 cat confdefs.h >>conftest.$ac_ext
11646 cat >>conftest.$ac_ext <<_ACEOF
11647 /* end confdefs.h.  */
11648 #include <sys/types.h>
11649 #include <sys/ipc.h>
11650 #include <sys/sem.h>
11651
11652 int
11653 main ()
11654 {
11655 if ((union semun *) 0)
11656   return 0;
11657 if (sizeof (union semun))
11658   return 0;
11659   ;
11660   return 0;
11661 }
11662 _ACEOF
11663 rm -f conftest.$ac_objext
11664 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11665   (eval $ac_compile) 2>conftest.er1
11666   ac_status=$?
11667   grep -v '^ *+' conftest.er1 >conftest.err
11668   rm -f conftest.er1
11669   cat conftest.err >&5
11670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11671   (exit $ac_status); } &&
11672          { ac_try='test -z "$ac_c_werror_flag"
11673                          || test ! -s conftest.err'
11674   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11675   (eval $ac_try) 2>&5
11676   ac_status=$?
11677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11678   (exit $ac_status); }; } &&
11679          { ac_try='test -s conftest.$ac_objext'
11680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11681   (eval $ac_try) 2>&5
11682   ac_status=$?
11683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11684   (exit $ac_status); }; }; then
11685   ac_cv_type_union_semun=yes
11686 else
11687   echo "$as_me: failed program was:" >&5
11688 sed 's/^/| /' conftest.$ac_ext >&5
11689
11690 ac_cv_type_union_semun=no
11691 fi
11692 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11693 fi
11694 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11695 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11696 if test $ac_cv_type_union_semun = yes; then
11697
11698 cat >>confdefs.h <<_ACEOF
11699 #define HAVE_UNION_SEMUN 1
11700 _ACEOF
11701
11702
11703 fi
11704
11705 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11706 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11707 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11708   echo $ECHO_N "(cached) $ECHO_C" >&6
11709 else
11710   cat >conftest.$ac_ext <<_ACEOF
11711 /* confdefs.h.  */
11712 _ACEOF
11713 cat confdefs.h >>conftest.$ac_ext
11714 cat >>conftest.$ac_ext <<_ACEOF
11715 /* end confdefs.h.  */
11716 #include <sys/types.h>
11717 #ifdef HAVE_SYS_UN_H
11718 #include <sys/un.h>
11719 #endif
11720
11721
11722 int
11723 main ()
11724 {
11725 if ((struct sockaddr_un *) 0)
11726   return 0;
11727 if (sizeof (struct sockaddr_un))
11728   return 0;
11729   ;
11730   return 0;
11731 }
11732 _ACEOF
11733 rm -f conftest.$ac_objext
11734 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11735   (eval $ac_compile) 2>conftest.er1
11736   ac_status=$?
11737   grep -v '^ *+' conftest.er1 >conftest.err
11738   rm -f conftest.er1
11739   cat conftest.err >&5
11740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11741   (exit $ac_status); } &&
11742          { ac_try='test -z "$ac_c_werror_flag"
11743                          || test ! -s conftest.err'
11744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11745   (eval $ac_try) 2>&5
11746   ac_status=$?
11747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11748   (exit $ac_status); }; } &&
11749          { ac_try='test -s conftest.$ac_objext'
11750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11751   (eval $ac_try) 2>&5
11752   ac_status=$?
11753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11754   (exit $ac_status); }; }; then
11755   ac_cv_type_struct_sockaddr_un=yes
11756 else
11757   echo "$as_me: failed program was:" >&5
11758 sed 's/^/| /' conftest.$ac_ext >&5
11759
11760 ac_cv_type_struct_sockaddr_un=no
11761 fi
11762 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11763 fi
11764 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11765 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11766 if test $ac_cv_type_struct_sockaddr_un = yes; then
11767
11768 cat >>confdefs.h <<_ACEOF
11769 #define HAVE_STRUCT_SOCKADDR_UN 1
11770 _ACEOF
11771
11772
11773 cat >>confdefs.h <<\_ACEOF
11774 #define HAVE_UNIX_SOCKETS 1
11775 _ACEOF
11776
11777 fi
11778
11779 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11780 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11781 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11782   echo $ECHO_N "(cached) $ECHO_C" >&6
11783 else
11784   cat >conftest.$ac_ext <<_ACEOF
11785 /* confdefs.h.  */
11786 _ACEOF
11787 cat confdefs.h >>conftest.$ac_ext
11788 cat >>conftest.$ac_ext <<_ACEOF
11789 /* end confdefs.h.  */
11790 #include <sys/types.h>
11791 #ifdef HAVE_SYS_SOCKET_H
11792 #include <sys/socket.h>
11793 #endif
11794
11795
11796 int
11797 main ()
11798 {
11799 if ((struct sockaddr_storage *) 0)
11800   return 0;
11801 if (sizeof (struct sockaddr_storage))
11802   return 0;
11803   ;
11804   return 0;
11805 }
11806 _ACEOF
11807 rm -f conftest.$ac_objext
11808 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11809   (eval $ac_compile) 2>conftest.er1
11810   ac_status=$?
11811   grep -v '^ *+' conftest.er1 >conftest.err
11812   rm -f conftest.er1
11813   cat conftest.err >&5
11814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11815   (exit $ac_status); } &&
11816          { ac_try='test -z "$ac_c_werror_flag"
11817                          || test ! -s conftest.err'
11818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11819   (eval $ac_try) 2>&5
11820   ac_status=$?
11821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11822   (exit $ac_status); }; } &&
11823          { ac_try='test -s conftest.$ac_objext'
11824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11825   (eval $ac_try) 2>&5
11826   ac_status=$?
11827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11828   (exit $ac_status); }; }; then
11829   ac_cv_type_struct_sockaddr_storage=yes
11830 else
11831   echo "$as_me: failed program was:" >&5
11832 sed 's/^/| /' conftest.$ac_ext >&5
11833
11834 ac_cv_type_struct_sockaddr_storage=no
11835 fi
11836 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11837 fi
11838 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11839 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11840 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11841
11842 cat >>confdefs.h <<_ACEOF
11843 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11844 _ACEOF
11845
11846
11847 fi
11848
11849 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11850 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11851 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11852   echo $ECHO_N "(cached) $ECHO_C" >&6
11853 else
11854   cat >conftest.$ac_ext <<_ACEOF
11855 /* confdefs.h.  */
11856 _ACEOF
11857 cat confdefs.h >>conftest.$ac_ext
11858 cat >>conftest.$ac_ext <<_ACEOF
11859 /* end confdefs.h.  */
11860 #include <sys/types.h>
11861 #ifdef HAVE_SYS_SOCKET_H
11862 #include <sys/socket.h>
11863 #endif
11864
11865
11866 int
11867 main ()
11868 {
11869 static struct sockaddr_storage ac_aggr;
11870 if (ac_aggr.ss_family)
11871 return 0;
11872   ;
11873   return 0;
11874 }
11875 _ACEOF
11876 rm -f conftest.$ac_objext
11877 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11878   (eval $ac_compile) 2>conftest.er1
11879   ac_status=$?
11880   grep -v '^ *+' conftest.er1 >conftest.err
11881   rm -f conftest.er1
11882   cat conftest.err >&5
11883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11884   (exit $ac_status); } &&
11885          { ac_try='test -z "$ac_c_werror_flag"
11886                          || test ! -s conftest.err'
11887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11888   (eval $ac_try) 2>&5
11889   ac_status=$?
11890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11891   (exit $ac_status); }; } &&
11892          { ac_try='test -s conftest.$ac_objext'
11893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11894   (eval $ac_try) 2>&5
11895   ac_status=$?
11896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11897   (exit $ac_status); }; }; then
11898   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11899 else
11900   echo "$as_me: failed program was:" >&5
11901 sed 's/^/| /' conftest.$ac_ext >&5
11902
11903 cat >conftest.$ac_ext <<_ACEOF
11904 /* confdefs.h.  */
11905 _ACEOF
11906 cat confdefs.h >>conftest.$ac_ext
11907 cat >>conftest.$ac_ext <<_ACEOF
11908 /* end confdefs.h.  */
11909 #include <sys/types.h>
11910 #ifdef HAVE_SYS_SOCKET_H
11911 #include <sys/socket.h>
11912 #endif
11913
11914
11915 int
11916 main ()
11917 {
11918 static struct sockaddr_storage ac_aggr;
11919 if (sizeof ac_aggr.ss_family)
11920 return 0;
11921   ;
11922   return 0;
11923 }
11924 _ACEOF
11925 rm -f conftest.$ac_objext
11926 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11927   (eval $ac_compile) 2>conftest.er1
11928   ac_status=$?
11929   grep -v '^ *+' conftest.er1 >conftest.err
11930   rm -f conftest.er1
11931   cat conftest.err >&5
11932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11933   (exit $ac_status); } &&
11934          { ac_try='test -z "$ac_c_werror_flag"
11935                          || test ! -s conftest.err'
11936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11937   (eval $ac_try) 2>&5
11938   ac_status=$?
11939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11940   (exit $ac_status); }; } &&
11941          { ac_try='test -s conftest.$ac_objext'
11942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11943   (eval $ac_try) 2>&5
11944   ac_status=$?
11945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11946   (exit $ac_status); }; }; then
11947   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11948 else
11949   echo "$as_me: failed program was:" >&5
11950 sed 's/^/| /' conftest.$ac_ext >&5
11951
11952 ac_cv_member_struct_sockaddr_storage_ss_family=no
11953 fi
11954 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11955 fi
11956 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11957 fi
11958 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11959 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11960 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11961
11962 cat >>confdefs.h <<_ACEOF
11963 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11964 _ACEOF
11965
11966
11967 fi
11968 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11969 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11970 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11971   echo $ECHO_N "(cached) $ECHO_C" >&6
11972 else
11973   cat >conftest.$ac_ext <<_ACEOF
11974 /* confdefs.h.  */
11975 _ACEOF
11976 cat confdefs.h >>conftest.$ac_ext
11977 cat >>conftest.$ac_ext <<_ACEOF
11978 /* end confdefs.h.  */
11979 #include <sys/types.h>
11980 #ifdef HAVE_SYS_SOCKET_H
11981 #include <sys/socket.h>
11982 #endif
11983
11984
11985 int
11986 main ()
11987 {
11988 static struct sockaddr_storage ac_aggr;
11989 if (ac_aggr.__ss_family)
11990 return 0;
11991   ;
11992   return 0;
11993 }
11994 _ACEOF
11995 rm -f conftest.$ac_objext
11996 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11997   (eval $ac_compile) 2>conftest.er1
11998   ac_status=$?
11999   grep -v '^ *+' conftest.er1 >conftest.err
12000   rm -f conftest.er1
12001   cat conftest.err >&5
12002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12003   (exit $ac_status); } &&
12004          { ac_try='test -z "$ac_c_werror_flag"
12005                          || test ! -s conftest.err'
12006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12007   (eval $ac_try) 2>&5
12008   ac_status=$?
12009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12010   (exit $ac_status); }; } &&
12011          { ac_try='test -s conftest.$ac_objext'
12012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12013   (eval $ac_try) 2>&5
12014   ac_status=$?
12015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12016   (exit $ac_status); }; }; then
12017   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12018 else
12019   echo "$as_me: failed program was:" >&5
12020 sed 's/^/| /' conftest.$ac_ext >&5
12021
12022 cat >conftest.$ac_ext <<_ACEOF
12023 /* confdefs.h.  */
12024 _ACEOF
12025 cat confdefs.h >>conftest.$ac_ext
12026 cat >>conftest.$ac_ext <<_ACEOF
12027 /* end confdefs.h.  */
12028 #include <sys/types.h>
12029 #ifdef HAVE_SYS_SOCKET_H
12030 #include <sys/socket.h>
12031 #endif
12032
12033
12034 int
12035 main ()
12036 {
12037 static struct sockaddr_storage ac_aggr;
12038 if (sizeof ac_aggr.__ss_family)
12039 return 0;
12040   ;
12041   return 0;
12042 }
12043 _ACEOF
12044 rm -f conftest.$ac_objext
12045 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12046   (eval $ac_compile) 2>conftest.er1
12047   ac_status=$?
12048   grep -v '^ *+' conftest.er1 >conftest.err
12049   rm -f conftest.er1
12050   cat conftest.err >&5
12051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12052   (exit $ac_status); } &&
12053          { ac_try='test -z "$ac_c_werror_flag"
12054                          || test ! -s conftest.err'
12055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12056   (eval $ac_try) 2>&5
12057   ac_status=$?
12058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12059   (exit $ac_status); }; } &&
12060          { ac_try='test -s conftest.$ac_objext'
12061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12062   (eval $ac_try) 2>&5
12063   ac_status=$?
12064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12065   (exit $ac_status); }; }; then
12066   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12067 else
12068   echo "$as_me: failed program was:" >&5
12069 sed 's/^/| /' conftest.$ac_ext >&5
12070
12071 ac_cv_member_struct_sockaddr_storage___ss_family=no
12072 fi
12073 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12074 fi
12075 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12076 fi
12077 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12078 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12079 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12080
12081 cat >>confdefs.h <<_ACEOF
12082 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12083 _ACEOF
12084
12085
12086 fi
12087 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12088 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12089 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12090   echo $ECHO_N "(cached) $ECHO_C" >&6
12091 else
12092   cat >conftest.$ac_ext <<_ACEOF
12093 /* confdefs.h.  */
12094 _ACEOF
12095 cat confdefs.h >>conftest.$ac_ext
12096 cat >>conftest.$ac_ext <<_ACEOF
12097 /* end confdefs.h.  */
12098 #include <sys/types.h>
12099 #ifdef HAVE_SYS_SOCKET_H
12100 #include <sys/socket.h>
12101 #endif
12102
12103
12104 int
12105 main ()
12106 {
12107 static struct sockaddr_storage ac_aggr;
12108 if (ac_aggr.ss_len)
12109 return 0;
12110   ;
12111   return 0;
12112 }
12113 _ACEOF
12114 rm -f conftest.$ac_objext
12115 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12116   (eval $ac_compile) 2>conftest.er1
12117   ac_status=$?
12118   grep -v '^ *+' conftest.er1 >conftest.err
12119   rm -f conftest.er1
12120   cat conftest.err >&5
12121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122   (exit $ac_status); } &&
12123          { ac_try='test -z "$ac_c_werror_flag"
12124                          || test ! -s conftest.err'
12125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12126   (eval $ac_try) 2>&5
12127   ac_status=$?
12128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12129   (exit $ac_status); }; } &&
12130          { ac_try='test -s conftest.$ac_objext'
12131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12132   (eval $ac_try) 2>&5
12133   ac_status=$?
12134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12135   (exit $ac_status); }; }; then
12136   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12137 else
12138   echo "$as_me: failed program was:" >&5
12139 sed 's/^/| /' conftest.$ac_ext >&5
12140
12141 cat >conftest.$ac_ext <<_ACEOF
12142 /* confdefs.h.  */
12143 _ACEOF
12144 cat confdefs.h >>conftest.$ac_ext
12145 cat >>conftest.$ac_ext <<_ACEOF
12146 /* end confdefs.h.  */
12147 #include <sys/types.h>
12148 #ifdef HAVE_SYS_SOCKET_H
12149 #include <sys/socket.h>
12150 #endif
12151
12152
12153 int
12154 main ()
12155 {
12156 static struct sockaddr_storage ac_aggr;
12157 if (sizeof ac_aggr.ss_len)
12158 return 0;
12159   ;
12160   return 0;
12161 }
12162 _ACEOF
12163 rm -f conftest.$ac_objext
12164 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12165   (eval $ac_compile) 2>conftest.er1
12166   ac_status=$?
12167   grep -v '^ *+' conftest.er1 >conftest.err
12168   rm -f conftest.er1
12169   cat conftest.err >&5
12170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12171   (exit $ac_status); } &&
12172          { ac_try='test -z "$ac_c_werror_flag"
12173                          || test ! -s conftest.err'
12174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12175   (eval $ac_try) 2>&5
12176   ac_status=$?
12177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12178   (exit $ac_status); }; } &&
12179          { ac_try='test -s conftest.$ac_objext'
12180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12181   (eval $ac_try) 2>&5
12182   ac_status=$?
12183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12184   (exit $ac_status); }; }; then
12185   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12186 else
12187   echo "$as_me: failed program was:" >&5
12188 sed 's/^/| /' conftest.$ac_ext >&5
12189
12190 ac_cv_member_struct_sockaddr_storage_ss_len=no
12191 fi
12192 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12193 fi
12194 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12195 fi
12196 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12197 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12198 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12199
12200 cat >>confdefs.h <<_ACEOF
12201 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12202 _ACEOF
12203
12204
12205 fi
12206 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12207 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12208 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12209   echo $ECHO_N "(cached) $ECHO_C" >&6
12210 else
12211   cat >conftest.$ac_ext <<_ACEOF
12212 /* confdefs.h.  */
12213 _ACEOF
12214 cat confdefs.h >>conftest.$ac_ext
12215 cat >>conftest.$ac_ext <<_ACEOF
12216 /* end confdefs.h.  */
12217 #include <sys/types.h>
12218 #ifdef HAVE_SYS_SOCKET_H
12219 #include <sys/socket.h>
12220 #endif
12221
12222
12223 int
12224 main ()
12225 {
12226 static struct sockaddr_storage ac_aggr;
12227 if (ac_aggr.__ss_len)
12228 return 0;
12229   ;
12230   return 0;
12231 }
12232 _ACEOF
12233 rm -f conftest.$ac_objext
12234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12235   (eval $ac_compile) 2>conftest.er1
12236   ac_status=$?
12237   grep -v '^ *+' conftest.er1 >conftest.err
12238   rm -f conftest.er1
12239   cat conftest.err >&5
12240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12241   (exit $ac_status); } &&
12242          { ac_try='test -z "$ac_c_werror_flag"
12243                          || test ! -s conftest.err'
12244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12245   (eval $ac_try) 2>&5
12246   ac_status=$?
12247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12248   (exit $ac_status); }; } &&
12249          { ac_try='test -s conftest.$ac_objext'
12250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12251   (eval $ac_try) 2>&5
12252   ac_status=$?
12253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12254   (exit $ac_status); }; }; then
12255   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12256 else
12257   echo "$as_me: failed program was:" >&5
12258 sed 's/^/| /' conftest.$ac_ext >&5
12259
12260 cat >conftest.$ac_ext <<_ACEOF
12261 /* confdefs.h.  */
12262 _ACEOF
12263 cat confdefs.h >>conftest.$ac_ext
12264 cat >>conftest.$ac_ext <<_ACEOF
12265 /* end confdefs.h.  */
12266 #include <sys/types.h>
12267 #ifdef HAVE_SYS_SOCKET_H
12268 #include <sys/socket.h>
12269 #endif
12270
12271
12272 int
12273 main ()
12274 {
12275 static struct sockaddr_storage ac_aggr;
12276 if (sizeof ac_aggr.__ss_len)
12277 return 0;
12278   ;
12279   return 0;
12280 }
12281 _ACEOF
12282 rm -f conftest.$ac_objext
12283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12284   (eval $ac_compile) 2>conftest.er1
12285   ac_status=$?
12286   grep -v '^ *+' conftest.er1 >conftest.err
12287   rm -f conftest.er1
12288   cat conftest.err >&5
12289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12290   (exit $ac_status); } &&
12291          { ac_try='test -z "$ac_c_werror_flag"
12292                          || test ! -s conftest.err'
12293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12294   (eval $ac_try) 2>&5
12295   ac_status=$?
12296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12297   (exit $ac_status); }; } &&
12298          { ac_try='test -s conftest.$ac_objext'
12299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12300   (eval $ac_try) 2>&5
12301   ac_status=$?
12302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12303   (exit $ac_status); }; }; then
12304   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12305 else
12306   echo "$as_me: failed program was:" >&5
12307 sed 's/^/| /' conftest.$ac_ext >&5
12308
12309 ac_cv_member_struct_sockaddr_storage___ss_len=no
12310 fi
12311 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12312 fi
12313 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12314 fi
12315 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12316 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12317 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12318
12319 cat >>confdefs.h <<_ACEOF
12320 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12321 _ACEOF
12322
12323
12324 fi
12325 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12326 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12327 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12328   echo $ECHO_N "(cached) $ECHO_C" >&6
12329 else
12330   cat >conftest.$ac_ext <<_ACEOF
12331 /* confdefs.h.  */
12332 _ACEOF
12333 cat confdefs.h >>conftest.$ac_ext
12334 cat >>conftest.$ac_ext <<_ACEOF
12335 /* end confdefs.h.  */
12336 #include <sys/types.h>
12337 #ifdef HAVE_SYS_SOCKET_H
12338 #include <sys/socket.h>
12339 #endif
12340
12341
12342 int
12343 main ()
12344 {
12345 static struct sockaddr ac_aggr;
12346 if (ac_aggr.sa_len)
12347 return 0;
12348   ;
12349   return 0;
12350 }
12351 _ACEOF
12352 rm -f conftest.$ac_objext
12353 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12354   (eval $ac_compile) 2>conftest.er1
12355   ac_status=$?
12356   grep -v '^ *+' conftest.er1 >conftest.err
12357   rm -f conftest.er1
12358   cat conftest.err >&5
12359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12360   (exit $ac_status); } &&
12361          { ac_try='test -z "$ac_c_werror_flag"
12362                          || test ! -s conftest.err'
12363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12364   (eval $ac_try) 2>&5
12365   ac_status=$?
12366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12367   (exit $ac_status); }; } &&
12368          { ac_try='test -s conftest.$ac_objext'
12369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12370   (eval $ac_try) 2>&5
12371   ac_status=$?
12372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12373   (exit $ac_status); }; }; then
12374   ac_cv_member_struct_sockaddr_sa_len=yes
12375 else
12376   echo "$as_me: failed program was:" >&5
12377 sed 's/^/| /' conftest.$ac_ext >&5
12378
12379 cat >conftest.$ac_ext <<_ACEOF
12380 /* confdefs.h.  */
12381 _ACEOF
12382 cat confdefs.h >>conftest.$ac_ext
12383 cat >>conftest.$ac_ext <<_ACEOF
12384 /* end confdefs.h.  */
12385 #include <sys/types.h>
12386 #ifdef HAVE_SYS_SOCKET_H
12387 #include <sys/socket.h>
12388 #endif
12389
12390
12391 int
12392 main ()
12393 {
12394 static struct sockaddr ac_aggr;
12395 if (sizeof ac_aggr.sa_len)
12396 return 0;
12397   ;
12398   return 0;
12399 }
12400 _ACEOF
12401 rm -f conftest.$ac_objext
12402 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12403   (eval $ac_compile) 2>conftest.er1
12404   ac_status=$?
12405   grep -v '^ *+' conftest.er1 >conftest.err
12406   rm -f conftest.er1
12407   cat conftest.err >&5
12408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12409   (exit $ac_status); } &&
12410          { ac_try='test -z "$ac_c_werror_flag"
12411                          || test ! -s conftest.err'
12412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12413   (eval $ac_try) 2>&5
12414   ac_status=$?
12415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12416   (exit $ac_status); }; } &&
12417          { ac_try='test -s conftest.$ac_objext'
12418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12419   (eval $ac_try) 2>&5
12420   ac_status=$?
12421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12422   (exit $ac_status); }; }; then
12423   ac_cv_member_struct_sockaddr_sa_len=yes
12424 else
12425   echo "$as_me: failed program was:" >&5
12426 sed 's/^/| /' conftest.$ac_ext >&5
12427
12428 ac_cv_member_struct_sockaddr_sa_len=no
12429 fi
12430 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12431 fi
12432 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12433 fi
12434 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12435 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12436 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12437
12438 cat >>confdefs.h <<_ACEOF
12439 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12440 _ACEOF
12441
12442
12443 fi
12444
12445 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12446 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12447 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12448   echo $ECHO_N "(cached) $ECHO_C" >&6
12449 else
12450   cat >conftest.$ac_ext <<_ACEOF
12451 /* confdefs.h.  */
12452 _ACEOF
12453 cat confdefs.h >>conftest.$ac_ext
12454 cat >>conftest.$ac_ext <<_ACEOF
12455 /* end confdefs.h.  */
12456 #include <sys/types.h>
12457 #include <sys/socket.h>
12458 #include <netdb.h>
12459
12460
12461 int
12462 main ()
12463 {
12464 if ((struct addrinfo *) 0)
12465   return 0;
12466 if (sizeof (struct addrinfo))
12467   return 0;
12468   ;
12469   return 0;
12470 }
12471 _ACEOF
12472 rm -f conftest.$ac_objext
12473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12474   (eval $ac_compile) 2>conftest.er1
12475   ac_status=$?
12476   grep -v '^ *+' conftest.er1 >conftest.err
12477   rm -f conftest.er1
12478   cat conftest.err >&5
12479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480   (exit $ac_status); } &&
12481          { ac_try='test -z "$ac_c_werror_flag"
12482                          || test ! -s conftest.err'
12483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12484   (eval $ac_try) 2>&5
12485   ac_status=$?
12486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12487   (exit $ac_status); }; } &&
12488          { ac_try='test -s conftest.$ac_objext'
12489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12490   (eval $ac_try) 2>&5
12491   ac_status=$?
12492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12493   (exit $ac_status); }; }; then
12494   ac_cv_type_struct_addrinfo=yes
12495 else
12496   echo "$as_me: failed program was:" >&5
12497 sed 's/^/| /' conftest.$ac_ext >&5
12498
12499 ac_cv_type_struct_addrinfo=no
12500 fi
12501 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12502 fi
12503 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12504 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12505 if test $ac_cv_type_struct_addrinfo = yes; then
12506
12507 cat >>confdefs.h <<_ACEOF
12508 #define HAVE_STRUCT_ADDRINFO 1
12509 _ACEOF
12510
12511
12512 fi
12513
12514
12515 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12516 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12517 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12518   echo $ECHO_N "(cached) $ECHO_C" >&6
12519 else
12520   cat >conftest.$ac_ext <<_ACEOF
12521 /* confdefs.h.  */
12522 _ACEOF
12523 cat confdefs.h >>conftest.$ac_ext
12524 cat >>conftest.$ac_ext <<_ACEOF
12525 /* end confdefs.h.  */
12526 #include <sys/param.h>
12527 #include <sys/types.h>
12528 #include <sys/socket.h>
12529 #include <sys/ucred.h>
12530
12531 int
12532 main ()
12533 {
12534 if ((struct cmsgcred *) 0)
12535   return 0;
12536 if (sizeof (struct cmsgcred))
12537   return 0;
12538   ;
12539   return 0;
12540 }
12541 _ACEOF
12542 rm -f conftest.$ac_objext
12543 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12544   (eval $ac_compile) 2>conftest.er1
12545   ac_status=$?
12546   grep -v '^ *+' conftest.er1 >conftest.err
12547   rm -f conftest.er1
12548   cat conftest.err >&5
12549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12550   (exit $ac_status); } &&
12551          { ac_try='test -z "$ac_c_werror_flag"
12552                          || test ! -s conftest.err'
12553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12554   (eval $ac_try) 2>&5
12555   ac_status=$?
12556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12557   (exit $ac_status); }; } &&
12558          { ac_try='test -s conftest.$ac_objext'
12559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12560   (eval $ac_try) 2>&5
12561   ac_status=$?
12562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12563   (exit $ac_status); }; }; then
12564   ac_cv_type_struct_cmsgcred=yes
12565 else
12566   echo "$as_me: failed program was:" >&5
12567 sed 's/^/| /' conftest.$ac_ext >&5
12568
12569 ac_cv_type_struct_cmsgcred=no
12570 fi
12571 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12572 fi
12573 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12574 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12575 if test $ac_cv_type_struct_cmsgcred = yes; then
12576
12577 cat >>confdefs.h <<_ACEOF
12578 #define HAVE_STRUCT_CMSGCRED 1
12579 _ACEOF
12580
12581
12582 fi
12583 echo "$as_me:$LINENO: checking for struct fcred" >&5
12584 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12585 if test "${ac_cv_type_struct_fcred+set}" = set; then
12586   echo $ECHO_N "(cached) $ECHO_C" >&6
12587 else
12588   cat >conftest.$ac_ext <<_ACEOF
12589 /* confdefs.h.  */
12590 _ACEOF
12591 cat confdefs.h >>conftest.$ac_ext
12592 cat >>conftest.$ac_ext <<_ACEOF
12593 /* end confdefs.h.  */
12594 #include <sys/param.h>
12595 #include <sys/types.h>
12596 #include <sys/socket.h>
12597 #include <sys/ucred.h>
12598
12599 int
12600 main ()
12601 {
12602 if ((struct fcred *) 0)
12603   return 0;
12604 if (sizeof (struct fcred))
12605   return 0;
12606   ;
12607   return 0;
12608 }
12609 _ACEOF
12610 rm -f conftest.$ac_objext
12611 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12612   (eval $ac_compile) 2>conftest.er1
12613   ac_status=$?
12614   grep -v '^ *+' conftest.er1 >conftest.err
12615   rm -f conftest.er1
12616   cat conftest.err >&5
12617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12618   (exit $ac_status); } &&
12619          { ac_try='test -z "$ac_c_werror_flag"
12620                          || test ! -s conftest.err'
12621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12622   (eval $ac_try) 2>&5
12623   ac_status=$?
12624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12625   (exit $ac_status); }; } &&
12626          { ac_try='test -s conftest.$ac_objext'
12627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12628   (eval $ac_try) 2>&5
12629   ac_status=$?
12630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12631   (exit $ac_status); }; }; then
12632   ac_cv_type_struct_fcred=yes
12633 else
12634   echo "$as_me: failed program was:" >&5
12635 sed 's/^/| /' conftest.$ac_ext >&5
12636
12637 ac_cv_type_struct_fcred=no
12638 fi
12639 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12640 fi
12641 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12642 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12643 if test $ac_cv_type_struct_fcred = yes; then
12644
12645 cat >>confdefs.h <<_ACEOF
12646 #define HAVE_STRUCT_FCRED 1
12647 _ACEOF
12648
12649
12650 fi
12651 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12652 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12653 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12654   echo $ECHO_N "(cached) $ECHO_C" >&6
12655 else
12656   cat >conftest.$ac_ext <<_ACEOF
12657 /* confdefs.h.  */
12658 _ACEOF
12659 cat confdefs.h >>conftest.$ac_ext
12660 cat >>conftest.$ac_ext <<_ACEOF
12661 /* end confdefs.h.  */
12662 #include <sys/param.h>
12663 #include <sys/types.h>
12664 #include <sys/socket.h>
12665 #include <sys/ucred.h>
12666
12667 int
12668 main ()
12669 {
12670 if ((struct sockcred *) 0)
12671   return 0;
12672 if (sizeof (struct sockcred))
12673   return 0;
12674   ;
12675   return 0;
12676 }
12677 _ACEOF
12678 rm -f conftest.$ac_objext
12679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12680   (eval $ac_compile) 2>conftest.er1
12681   ac_status=$?
12682   grep -v '^ *+' conftest.er1 >conftest.err
12683   rm -f conftest.er1
12684   cat conftest.err >&5
12685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12686   (exit $ac_status); } &&
12687          { ac_try='test -z "$ac_c_werror_flag"
12688                          || test ! -s conftest.err'
12689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12690   (eval $ac_try) 2>&5
12691   ac_status=$?
12692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12693   (exit $ac_status); }; } &&
12694          { ac_try='test -s conftest.$ac_objext'
12695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12696   (eval $ac_try) 2>&5
12697   ac_status=$?
12698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12699   (exit $ac_status); }; }; then
12700   ac_cv_type_struct_sockcred=yes
12701 else
12702   echo "$as_me: failed program was:" >&5
12703 sed 's/^/| /' conftest.$ac_ext >&5
12704
12705 ac_cv_type_struct_sockcred=no
12706 fi
12707 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12708 fi
12709 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12710 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12711 if test $ac_cv_type_struct_sockcred = yes; then
12712
12713 cat >>confdefs.h <<_ACEOF
12714 #define HAVE_STRUCT_SOCKCRED 1
12715 _ACEOF
12716
12717
12718 fi
12719
12720
12721 echo "$as_me:$LINENO: checking for struct option" >&5
12722 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12723 if test "${ac_cv_type_struct_option+set}" = set; then
12724   echo $ECHO_N "(cached) $ECHO_C" >&6
12725 else
12726   cat >conftest.$ac_ext <<_ACEOF
12727 /* confdefs.h.  */
12728 _ACEOF
12729 cat confdefs.h >>conftest.$ac_ext
12730 cat >>conftest.$ac_ext <<_ACEOF
12731 /* end confdefs.h.  */
12732 #ifdef HAVE_GETOPT_H
12733 #include <getopt.h>
12734 #endif
12735
12736 int
12737 main ()
12738 {
12739 if ((struct option *) 0)
12740   return 0;
12741 if (sizeof (struct option))
12742   return 0;
12743   ;
12744   return 0;
12745 }
12746 _ACEOF
12747 rm -f conftest.$ac_objext
12748 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12749   (eval $ac_compile) 2>conftest.er1
12750   ac_status=$?
12751   grep -v '^ *+' conftest.er1 >conftest.err
12752   rm -f conftest.er1
12753   cat conftest.err >&5
12754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12755   (exit $ac_status); } &&
12756          { ac_try='test -z "$ac_c_werror_flag"
12757                          || test ! -s conftest.err'
12758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12759   (eval $ac_try) 2>&5
12760   ac_status=$?
12761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12762   (exit $ac_status); }; } &&
12763          { ac_try='test -s conftest.$ac_objext'
12764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12765   (eval $ac_try) 2>&5
12766   ac_status=$?
12767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12768   (exit $ac_status); }; }; then
12769   ac_cv_type_struct_option=yes
12770 else
12771   echo "$as_me: failed program was:" >&5
12772 sed 's/^/| /' conftest.$ac_ext >&5
12773
12774 ac_cv_type_struct_option=no
12775 fi
12776 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12777 fi
12778 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12779 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12780 if test $ac_cv_type_struct_option = yes; then
12781
12782 cat >>confdefs.h <<_ACEOF
12783 #define HAVE_STRUCT_OPTION 1
12784 _ACEOF
12785
12786
12787 fi
12788
12789
12790 if test "$with_zlib" = yes; then
12791   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12792   # did not).  While we could work around the lack of z_streamp, it
12793   # seems unwise to encourage people to use such old zlib versions...
12794   echo "$as_me:$LINENO: checking for z_streamp" >&5
12795 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12796 if test "${ac_cv_type_z_streamp+set}" = set; then
12797   echo $ECHO_N "(cached) $ECHO_C" >&6
12798 else
12799   cat >conftest.$ac_ext <<_ACEOF
12800 /* confdefs.h.  */
12801 _ACEOF
12802 cat confdefs.h >>conftest.$ac_ext
12803 cat >>conftest.$ac_ext <<_ACEOF
12804 /* end confdefs.h.  */
12805 #include <zlib.h>
12806
12807 int
12808 main ()
12809 {
12810 if ((z_streamp *) 0)
12811   return 0;
12812 if (sizeof (z_streamp))
12813   return 0;
12814   ;
12815   return 0;
12816 }
12817 _ACEOF
12818 rm -f conftest.$ac_objext
12819 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12820   (eval $ac_compile) 2>conftest.er1
12821   ac_status=$?
12822   grep -v '^ *+' conftest.er1 >conftest.err
12823   rm -f conftest.er1
12824   cat conftest.err >&5
12825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12826   (exit $ac_status); } &&
12827          { ac_try='test -z "$ac_c_werror_flag"
12828                          || test ! -s conftest.err'
12829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12830   (eval $ac_try) 2>&5
12831   ac_status=$?
12832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12833   (exit $ac_status); }; } &&
12834          { ac_try='test -s conftest.$ac_objext'
12835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12836   (eval $ac_try) 2>&5
12837   ac_status=$?
12838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12839   (exit $ac_status); }; }; then
12840   ac_cv_type_z_streamp=yes
12841 else
12842   echo "$as_me: failed program was:" >&5
12843 sed 's/^/| /' conftest.$ac_ext >&5
12844
12845 ac_cv_type_z_streamp=no
12846 fi
12847 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12848 fi
12849 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12850 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12851 if test $ac_cv_type_z_streamp = yes; then
12852   :
12853 else
12854   { { echo "$as_me:$LINENO: error: zlib version is too old
12855 Use --without-zlib to disable zlib support." >&5
12856 echo "$as_me: error: zlib version is too old
12857 Use --without-zlib to disable zlib support." >&2;}
12858    { (exit 1); exit 1; }; }
12859 fi
12860
12861 fi
12862
12863 if test "$with_krb5" = yes; then
12864 # Check for differences between MIT and Heimdal (KTH) releases
12865   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12866 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12867 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12868   echo $ECHO_N "(cached) $ECHO_C" >&6
12869 else
12870   cat >conftest.$ac_ext <<_ACEOF
12871 /* confdefs.h.  */
12872 _ACEOF
12873 cat confdefs.h >>conftest.$ac_ext
12874 cat >>conftest.$ac_ext <<_ACEOF
12875 /* end confdefs.h.  */
12876 #include <krb5.h>
12877
12878 int
12879 main ()
12880 {
12881 static krb5_ticket ac_aggr;
12882 if (ac_aggr.enc_part2)
12883 return 0;
12884   ;
12885   return 0;
12886 }
12887 _ACEOF
12888 rm -f conftest.$ac_objext
12889 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12890   (eval $ac_compile) 2>conftest.er1
12891   ac_status=$?
12892   grep -v '^ *+' conftest.er1 >conftest.err
12893   rm -f conftest.er1
12894   cat conftest.err >&5
12895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12896   (exit $ac_status); } &&
12897          { ac_try='test -z "$ac_c_werror_flag"
12898                          || test ! -s conftest.err'
12899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12900   (eval $ac_try) 2>&5
12901   ac_status=$?
12902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12903   (exit $ac_status); }; } &&
12904          { ac_try='test -s conftest.$ac_objext'
12905   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12906   (eval $ac_try) 2>&5
12907   ac_status=$?
12908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12909   (exit $ac_status); }; }; then
12910   ac_cv_member_krb5_ticket_enc_part2=yes
12911 else
12912   echo "$as_me: failed program was:" >&5
12913 sed 's/^/| /' conftest.$ac_ext >&5
12914
12915 cat >conftest.$ac_ext <<_ACEOF
12916 /* confdefs.h.  */
12917 _ACEOF
12918 cat confdefs.h >>conftest.$ac_ext
12919 cat >>conftest.$ac_ext <<_ACEOF
12920 /* end confdefs.h.  */
12921 #include <krb5.h>
12922
12923 int
12924 main ()
12925 {
12926 static krb5_ticket ac_aggr;
12927 if (sizeof ac_aggr.enc_part2)
12928 return 0;
12929   ;
12930   return 0;
12931 }
12932 _ACEOF
12933 rm -f conftest.$ac_objext
12934 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12935   (eval $ac_compile) 2>conftest.er1
12936   ac_status=$?
12937   grep -v '^ *+' conftest.er1 >conftest.err
12938   rm -f conftest.er1
12939   cat conftest.err >&5
12940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12941   (exit $ac_status); } &&
12942          { ac_try='test -z "$ac_c_werror_flag"
12943                          || test ! -s conftest.err'
12944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12945   (eval $ac_try) 2>&5
12946   ac_status=$?
12947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12948   (exit $ac_status); }; } &&
12949          { ac_try='test -s conftest.$ac_objext'
12950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12951   (eval $ac_try) 2>&5
12952   ac_status=$?
12953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12954   (exit $ac_status); }; }; then
12955   ac_cv_member_krb5_ticket_enc_part2=yes
12956 else
12957   echo "$as_me: failed program was:" >&5
12958 sed 's/^/| /' conftest.$ac_ext >&5
12959
12960 ac_cv_member_krb5_ticket_enc_part2=no
12961 fi
12962 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12963 fi
12964 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12965 fi
12966 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12967 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12968 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12969
12970 cat >>confdefs.h <<_ACEOF
12971 #define HAVE_KRB5_TICKET_ENC_PART2 1
12972 _ACEOF
12973
12974
12975 else
12976   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12977 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12978 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12979   echo $ECHO_N "(cached) $ECHO_C" >&6
12980 else
12981   cat >conftest.$ac_ext <<_ACEOF
12982 /* confdefs.h.  */
12983 _ACEOF
12984 cat confdefs.h >>conftest.$ac_ext
12985 cat >>conftest.$ac_ext <<_ACEOF
12986 /* end confdefs.h.  */
12987 #include <krb5.h>
12988
12989 int
12990 main ()
12991 {
12992 static krb5_ticket ac_aggr;
12993 if (ac_aggr.client)
12994 return 0;
12995   ;
12996   return 0;
12997 }
12998 _ACEOF
12999 rm -f conftest.$ac_objext
13000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13001   (eval $ac_compile) 2>conftest.er1
13002   ac_status=$?
13003   grep -v '^ *+' conftest.er1 >conftest.err
13004   rm -f conftest.er1
13005   cat conftest.err >&5
13006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13007   (exit $ac_status); } &&
13008          { ac_try='test -z "$ac_c_werror_flag"
13009                          || test ! -s conftest.err'
13010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13011   (eval $ac_try) 2>&5
13012   ac_status=$?
13013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13014   (exit $ac_status); }; } &&
13015          { ac_try='test -s conftest.$ac_objext'
13016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13017   (eval $ac_try) 2>&5
13018   ac_status=$?
13019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13020   (exit $ac_status); }; }; then
13021   ac_cv_member_krb5_ticket_client=yes
13022 else
13023   echo "$as_me: failed program was:" >&5
13024 sed 's/^/| /' conftest.$ac_ext >&5
13025
13026 cat >conftest.$ac_ext <<_ACEOF
13027 /* confdefs.h.  */
13028 _ACEOF
13029 cat confdefs.h >>conftest.$ac_ext
13030 cat >>conftest.$ac_ext <<_ACEOF
13031 /* end confdefs.h.  */
13032 #include <krb5.h>
13033
13034 int
13035 main ()
13036 {
13037 static krb5_ticket ac_aggr;
13038 if (sizeof ac_aggr.client)
13039 return 0;
13040   ;
13041   return 0;
13042 }
13043 _ACEOF
13044 rm -f conftest.$ac_objext
13045 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13046   (eval $ac_compile) 2>conftest.er1
13047   ac_status=$?
13048   grep -v '^ *+' conftest.er1 >conftest.err
13049   rm -f conftest.er1
13050   cat conftest.err >&5
13051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13052   (exit $ac_status); } &&
13053          { ac_try='test -z "$ac_c_werror_flag"
13054                          || test ! -s conftest.err'
13055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13056   (eval $ac_try) 2>&5
13057   ac_status=$?
13058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13059   (exit $ac_status); }; } &&
13060          { ac_try='test -s conftest.$ac_objext'
13061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13062   (eval $ac_try) 2>&5
13063   ac_status=$?
13064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13065   (exit $ac_status); }; }; then
13066   ac_cv_member_krb5_ticket_client=yes
13067 else
13068   echo "$as_me: failed program was:" >&5
13069 sed 's/^/| /' conftest.$ac_ext >&5
13070
13071 ac_cv_member_krb5_ticket_client=no
13072 fi
13073 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13074 fi
13075 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13076 fi
13077 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13078 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13079 if test $ac_cv_member_krb5_ticket_client = yes; then
13080
13081 cat >>confdefs.h <<_ACEOF
13082 #define HAVE_KRB5_TICKET_CLIENT 1
13083 _ACEOF
13084
13085
13086 else
13087   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13088 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13089    { (exit 1); exit 1; }; }
13090 fi
13091
13092 fi
13093
13094   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13095 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13096 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13097   echo $ECHO_N "(cached) $ECHO_C" >&6
13098 else
13099   cat >conftest.$ac_ext <<_ACEOF
13100 /* confdefs.h.  */
13101 _ACEOF
13102 cat confdefs.h >>conftest.$ac_ext
13103 cat >>conftest.$ac_ext <<_ACEOF
13104 /* end confdefs.h.  */
13105 #include <krb5.h>
13106
13107 int
13108 main ()
13109 {
13110 static krb5_error ac_aggr;
13111 if (ac_aggr.text.data)
13112 return 0;
13113   ;
13114   return 0;
13115 }
13116 _ACEOF
13117 rm -f conftest.$ac_objext
13118 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13119   (eval $ac_compile) 2>conftest.er1
13120   ac_status=$?
13121   grep -v '^ *+' conftest.er1 >conftest.err
13122   rm -f conftest.er1
13123   cat conftest.err >&5
13124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13125   (exit $ac_status); } &&
13126          { ac_try='test -z "$ac_c_werror_flag"
13127                          || test ! -s conftest.err'
13128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13129   (eval $ac_try) 2>&5
13130   ac_status=$?
13131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13132   (exit $ac_status); }; } &&
13133          { ac_try='test -s conftest.$ac_objext'
13134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13135   (eval $ac_try) 2>&5
13136   ac_status=$?
13137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13138   (exit $ac_status); }; }; then
13139   ac_cv_member_krb5_error_text_data=yes
13140 else
13141   echo "$as_me: failed program was:" >&5
13142 sed 's/^/| /' conftest.$ac_ext >&5
13143
13144 cat >conftest.$ac_ext <<_ACEOF
13145 /* confdefs.h.  */
13146 _ACEOF
13147 cat confdefs.h >>conftest.$ac_ext
13148 cat >>conftest.$ac_ext <<_ACEOF
13149 /* end confdefs.h.  */
13150 #include <krb5.h>
13151
13152 int
13153 main ()
13154 {
13155 static krb5_error ac_aggr;
13156 if (sizeof ac_aggr.text.data)
13157 return 0;
13158   ;
13159   return 0;
13160 }
13161 _ACEOF
13162 rm -f conftest.$ac_objext
13163 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13164   (eval $ac_compile) 2>conftest.er1
13165   ac_status=$?
13166   grep -v '^ *+' conftest.er1 >conftest.err
13167   rm -f conftest.er1
13168   cat conftest.err >&5
13169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13170   (exit $ac_status); } &&
13171          { ac_try='test -z "$ac_c_werror_flag"
13172                          || test ! -s conftest.err'
13173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13174   (eval $ac_try) 2>&5
13175   ac_status=$?
13176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13177   (exit $ac_status); }; } &&
13178          { ac_try='test -s conftest.$ac_objext'
13179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13180   (eval $ac_try) 2>&5
13181   ac_status=$?
13182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13183   (exit $ac_status); }; }; then
13184   ac_cv_member_krb5_error_text_data=yes
13185 else
13186   echo "$as_me: failed program was:" >&5
13187 sed 's/^/| /' conftest.$ac_ext >&5
13188
13189 ac_cv_member_krb5_error_text_data=no
13190 fi
13191 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13192 fi
13193 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13194 fi
13195 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13196 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13197 if test $ac_cv_member_krb5_error_text_data = yes; then
13198
13199 cat >>confdefs.h <<_ACEOF
13200 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13201 _ACEOF
13202
13203
13204 else
13205   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13206 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13207 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13208   echo $ECHO_N "(cached) $ECHO_C" >&6
13209 else
13210   cat >conftest.$ac_ext <<_ACEOF
13211 /* confdefs.h.  */
13212 _ACEOF
13213 cat confdefs.h >>conftest.$ac_ext
13214 cat >>conftest.$ac_ext <<_ACEOF
13215 /* end confdefs.h.  */
13216 #include <krb5.h>
13217
13218 int
13219 main ()
13220 {
13221 static krb5_error ac_aggr;
13222 if (ac_aggr.e_data)
13223 return 0;
13224   ;
13225   return 0;
13226 }
13227 _ACEOF
13228 rm -f conftest.$ac_objext
13229 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13230   (eval $ac_compile) 2>conftest.er1
13231   ac_status=$?
13232   grep -v '^ *+' conftest.er1 >conftest.err
13233   rm -f conftest.er1
13234   cat conftest.err >&5
13235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13236   (exit $ac_status); } &&
13237          { ac_try='test -z "$ac_c_werror_flag"
13238                          || test ! -s conftest.err'
13239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13240   (eval $ac_try) 2>&5
13241   ac_status=$?
13242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13243   (exit $ac_status); }; } &&
13244          { ac_try='test -s conftest.$ac_objext'
13245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13246   (eval $ac_try) 2>&5
13247   ac_status=$?
13248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13249   (exit $ac_status); }; }; then
13250   ac_cv_member_krb5_error_e_data=yes
13251 else
13252   echo "$as_me: failed program was:" >&5
13253 sed 's/^/| /' conftest.$ac_ext >&5
13254
13255 cat >conftest.$ac_ext <<_ACEOF
13256 /* confdefs.h.  */
13257 _ACEOF
13258 cat confdefs.h >>conftest.$ac_ext
13259 cat >>conftest.$ac_ext <<_ACEOF
13260 /* end confdefs.h.  */
13261 #include <krb5.h>
13262
13263 int
13264 main ()
13265 {
13266 static krb5_error ac_aggr;
13267 if (sizeof ac_aggr.e_data)
13268 return 0;
13269   ;
13270   return 0;
13271 }
13272 _ACEOF
13273 rm -f conftest.$ac_objext
13274 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13275   (eval $ac_compile) 2>conftest.er1
13276   ac_status=$?
13277   grep -v '^ *+' conftest.er1 >conftest.err
13278   rm -f conftest.er1
13279   cat conftest.err >&5
13280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13281   (exit $ac_status); } &&
13282          { ac_try='test -z "$ac_c_werror_flag"
13283                          || test ! -s conftest.err'
13284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13285   (eval $ac_try) 2>&5
13286   ac_status=$?
13287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13288   (exit $ac_status); }; } &&
13289          { ac_try='test -s conftest.$ac_objext'
13290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13291   (eval $ac_try) 2>&5
13292   ac_status=$?
13293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13294   (exit $ac_status); }; }; then
13295   ac_cv_member_krb5_error_e_data=yes
13296 else
13297   echo "$as_me: failed program was:" >&5
13298 sed 's/^/| /' conftest.$ac_ext >&5
13299
13300 ac_cv_member_krb5_error_e_data=no
13301 fi
13302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13303 fi
13304 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13305 fi
13306 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13307 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13308 if test $ac_cv_member_krb5_error_e_data = yes; then
13309
13310 cat >>confdefs.h <<_ACEOF
13311 #define HAVE_KRB5_ERROR_E_DATA 1
13312 _ACEOF
13313
13314
13315 else
13316   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13317 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13318    { (exit 1); exit 1; }; }
13319 fi
13320
13321 fi
13322
13323 fi
13324
13325 ##
13326 ## Functions, global variables
13327 ##
13328
13329 echo "$as_me:$LINENO: checking for int timezone" >&5
13330 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13331 if test "${pgac_cv_var_int_timezone+set}" = set; then
13332   echo $ECHO_N "(cached) $ECHO_C" >&6
13333 else
13334   cat >conftest.$ac_ext <<_ACEOF
13335 /* confdefs.h.  */
13336 _ACEOF
13337 cat confdefs.h >>conftest.$ac_ext
13338 cat >>conftest.$ac_ext <<_ACEOF
13339 /* end confdefs.h.  */
13340 #include <time.h>
13341 int res;
13342 int
13343 main ()
13344 {
13345 #ifndef __CYGWIN__
13346 res = timezone / 60;
13347 #else
13348 res = _timezone / 60;
13349 #endif
13350   ;
13351   return 0;
13352 }
13353 _ACEOF
13354 rm -f conftest.$ac_objext conftest$ac_exeext
13355 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13356   (eval $ac_link) 2>conftest.er1
13357   ac_status=$?
13358   grep -v '^ *+' conftest.er1 >conftest.err
13359   rm -f conftest.er1
13360   cat conftest.err >&5
13361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13362   (exit $ac_status); } &&
13363          { ac_try='test -z "$ac_c_werror_flag"
13364                          || test ! -s conftest.err'
13365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13366   (eval $ac_try) 2>&5
13367   ac_status=$?
13368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13369   (exit $ac_status); }; } &&
13370          { ac_try='test -s conftest$ac_exeext'
13371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13372   (eval $ac_try) 2>&5
13373   ac_status=$?
13374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13375   (exit $ac_status); }; }; then
13376   pgac_cv_var_int_timezone=yes
13377 else
13378   echo "$as_me: failed program was:" >&5
13379 sed 's/^/| /' conftest.$ac_ext >&5
13380
13381 pgac_cv_var_int_timezone=no
13382 fi
13383 rm -f conftest.err conftest.$ac_objext \
13384       conftest$ac_exeext conftest.$ac_ext
13385 fi
13386 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13387 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13388 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13389
13390 cat >>confdefs.h <<\_ACEOF
13391 #define HAVE_INT_TIMEZONE
13392 _ACEOF
13393
13394 fi
13395 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13396 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13397  if test "${ac_cv_func_accept_return+set}" = set; then
13398   echo $ECHO_N "(cached) $ECHO_C" >&6
13399 else
13400    if test "${ac_cv_func_accept_arg1+set}" = set; then
13401   echo $ECHO_N "(cached) $ECHO_C" >&6
13402 else
13403     if test "${ac_cv_func_accept_arg2+set}" = set; then
13404   echo $ECHO_N "(cached) $ECHO_C" >&6
13405 else
13406      if test "${ac_cv_func_accept_arg3+set}" = set; then
13407   echo $ECHO_N "(cached) $ECHO_C" >&6
13408 else
13409       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13410       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13411        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13412         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13413          cat >conftest.$ac_ext <<_ACEOF
13414 /* confdefs.h.  */
13415 _ACEOF
13416 cat confdefs.h >>conftest.$ac_ext
13417 cat >>conftest.$ac_ext <<_ACEOF
13418 /* end confdefs.h.  */
13419 #ifdef HAVE_SYS_TYPES_H
13420 #include <sys/types.h>
13421 #endif
13422 #ifdef HAVE_SYS_SOCKET_H
13423 #include <sys/socket.h>
13424 #endif
13425 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13426 int
13427 main ()
13428 {
13429
13430   ;
13431   return 0;
13432 }
13433 _ACEOF
13434 rm -f conftest.$ac_objext
13435 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13436   (eval $ac_compile) 2>conftest.er1
13437   ac_status=$?
13438   grep -v '^ *+' conftest.er1 >conftest.err
13439   rm -f conftest.er1
13440   cat conftest.err >&5
13441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13442   (exit $ac_status); } &&
13443          { ac_try='test -z "$ac_c_werror_flag"
13444                          || test ! -s conftest.err'
13445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13446   (eval $ac_try) 2>&5
13447   ac_status=$?
13448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13449   (exit $ac_status); }; } &&
13450          { ac_try='test -s conftest.$ac_objext'
13451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13452   (eval $ac_try) 2>&5
13453   ac_status=$?
13454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13455   (exit $ac_status); }; }; then
13456   ac_not_found=no; break 4
13457 else
13458   echo "$as_me: failed program was:" >&5
13459 sed 's/^/| /' conftest.$ac_ext >&5
13460
13461 ac_not_found=yes
13462 fi
13463 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13464        done
13465       done
13466      done
13467     done
13468     if test "$ac_not_found" = yes; then
13469       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13470 echo "$as_me: error: could not determine argument types" >&2;}
13471    { (exit 1); exit 1; }; }
13472     fi
13473     if test "$ac_cv_func_accept_arg3" = "void"; then
13474       ac_cv_func_accept_arg3=int
13475     fi
13476
13477 fi
13478
13479 fi
13480
13481 fi
13482
13483 fi
13484  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
13485 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13486
13487 cat >>confdefs.h <<_ACEOF
13488 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13489 _ACEOF
13490
13491
13492 cat >>confdefs.h <<_ACEOF
13493 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13494 _ACEOF
13495
13496
13497 cat >>confdefs.h <<_ACEOF
13498 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13499 _ACEOF
13500
13501
13502 cat >>confdefs.h <<_ACEOF
13503 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13504 _ACEOF
13505
13506
13507 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13508 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13509 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13510   echo $ECHO_N "(cached) $ECHO_C" >&6
13511 else
13512   cat >conftest.$ac_ext <<_ACEOF
13513 /* confdefs.h.  */
13514 _ACEOF
13515 cat confdefs.h >>conftest.$ac_ext
13516 cat >>conftest.$ac_ext <<_ACEOF
13517 /* end confdefs.h.  */
13518 #include <sys/time.h>
13519 int
13520 main ()
13521 {
13522 struct timeval *tp;
13523 struct timezone *tzp;
13524 gettimeofday(tp,tzp);
13525   ;
13526   return 0;
13527 }
13528 _ACEOF
13529 rm -f conftest.$ac_objext
13530 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13531   (eval $ac_compile) 2>conftest.er1
13532   ac_status=$?
13533   grep -v '^ *+' conftest.er1 >conftest.err
13534   rm -f conftest.er1
13535   cat conftest.err >&5
13536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13537   (exit $ac_status); } &&
13538          { ac_try='test -z "$ac_c_werror_flag"
13539                          || test ! -s conftest.err'
13540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13541   (eval $ac_try) 2>&5
13542   ac_status=$?
13543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13544   (exit $ac_status); }; } &&
13545          { ac_try='test -s conftest.$ac_objext'
13546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13547   (eval $ac_try) 2>&5
13548   ac_status=$?
13549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13550   (exit $ac_status); }; }; then
13551   pgac_cv_func_gettimeofday_1arg=no
13552 else
13553   echo "$as_me: failed program was:" >&5
13554 sed 's/^/| /' conftest.$ac_ext >&5
13555
13556 pgac_cv_func_gettimeofday_1arg=yes
13557 fi
13558 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13559 fi
13560 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13561 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13562 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13563
13564 cat >>confdefs.h <<\_ACEOF
13565 #define GETTIMEOFDAY_1ARG
13566 _ACEOF
13567
13568 fi
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13592 do
13593 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13594 echo "$as_me:$LINENO: checking for $ac_func" >&5
13595 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13596 if eval "test \"\${$as_ac_var+set}\" = set"; then
13597   echo $ECHO_N "(cached) $ECHO_C" >&6
13598 else
13599   cat >conftest.$ac_ext <<_ACEOF
13600 /* confdefs.h.  */
13601 _ACEOF
13602 cat confdefs.h >>conftest.$ac_ext
13603 cat >>conftest.$ac_ext <<_ACEOF
13604 /* end confdefs.h.  */
13605 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13606    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13607 #define $ac_func innocuous_$ac_func
13608
13609 /* System header to define __stub macros and hopefully few prototypes,
13610     which can conflict with char $ac_func (); below.
13611     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13612     <limits.h> exists even on freestanding compilers.  */
13613
13614 #ifdef __STDC__
13615 # include <limits.h>
13616 #else
13617 # include <assert.h>
13618 #endif
13619
13620 #undef $ac_func
13621
13622 /* Override any gcc2 internal prototype to avoid an error.  */
13623 #ifdef __cplusplus
13624 extern "C"
13625 {
13626 #endif
13627 /* We use char because int might match the return type of a gcc2
13628    builtin and then its argument prototype would still apply.  */
13629 char $ac_func ();
13630 /* The GNU C library defines this for functions which it implements
13631     to always fail with ENOSYS.  Some functions are actually named
13632     something starting with __ and the normal name is an alias.  */
13633 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13634 choke me
13635 #else
13636 char (*f) () = $ac_func;
13637 #endif
13638 #ifdef __cplusplus
13639 }
13640 #endif
13641
13642 int
13643 main ()
13644 {
13645 return f != $ac_func;
13646   ;
13647   return 0;
13648 }
13649 _ACEOF
13650 rm -f conftest.$ac_objext conftest$ac_exeext
13651 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13652   (eval $ac_link) 2>conftest.er1
13653   ac_status=$?
13654   grep -v '^ *+' conftest.er1 >conftest.err
13655   rm -f conftest.er1
13656   cat conftest.err >&5
13657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13658   (exit $ac_status); } &&
13659          { ac_try='test -z "$ac_c_werror_flag"
13660                          || test ! -s conftest.err'
13661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13662   (eval $ac_try) 2>&5
13663   ac_status=$?
13664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13665   (exit $ac_status); }; } &&
13666          { ac_try='test -s conftest$ac_exeext'
13667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13668   (eval $ac_try) 2>&5
13669   ac_status=$?
13670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13671   (exit $ac_status); }; }; then
13672   eval "$as_ac_var=yes"
13673 else
13674   echo "$as_me: failed program was:" >&5
13675 sed 's/^/| /' conftest.$ac_ext >&5
13676
13677 eval "$as_ac_var=no"
13678 fi
13679 rm -f conftest.err conftest.$ac_objext \
13680       conftest$ac_exeext conftest.$ac_ext
13681 fi
13682 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13683 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13684 if test `eval echo '${'$as_ac_var'}'` = yes; then
13685   cat >>confdefs.h <<_ACEOF
13686 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13687 _ACEOF
13688
13689 fi
13690 done
13691
13692
13693 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13694 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13695 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13696   echo $ECHO_N "(cached) $ECHO_C" >&6
13697 else
13698   cat >conftest.$ac_ext <<_ACEOF
13699 /* confdefs.h.  */
13700 _ACEOF
13701 cat confdefs.h >>conftest.$ac_ext
13702 cat >>conftest.$ac_ext <<_ACEOF
13703 /* end confdefs.h.  */
13704 #include <unistd.h>
13705
13706 int
13707 main ()
13708 {
13709 #ifndef fdatasync
13710   char *p = (char *) fdatasync;
13711 #endif
13712
13713   ;
13714   return 0;
13715 }
13716 _ACEOF
13717 rm -f conftest.$ac_objext
13718 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13719   (eval $ac_compile) 2>conftest.er1
13720   ac_status=$?
13721   grep -v '^ *+' conftest.er1 >conftest.err
13722   rm -f conftest.er1
13723   cat conftest.err >&5
13724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725   (exit $ac_status); } &&
13726          { ac_try='test -z "$ac_c_werror_flag"
13727                          || test ! -s conftest.err'
13728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13729   (eval $ac_try) 2>&5
13730   ac_status=$?
13731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13732   (exit $ac_status); }; } &&
13733          { ac_try='test -s conftest.$ac_objext'
13734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13735   (eval $ac_try) 2>&5
13736   ac_status=$?
13737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13738   (exit $ac_status); }; }; then
13739   ac_cv_have_decl_fdatasync=yes
13740 else
13741   echo "$as_me: failed program was:" >&5
13742 sed 's/^/| /' conftest.$ac_ext >&5
13743
13744 ac_cv_have_decl_fdatasync=no
13745 fi
13746 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13747 fi
13748 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13749 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13750 if test $ac_cv_have_decl_fdatasync = yes; then
13751
13752 cat >>confdefs.h <<_ACEOF
13753 #define HAVE_DECL_FDATASYNC 1
13754 _ACEOF
13755
13756
13757 else
13758   cat >>confdefs.h <<_ACEOF
13759 #define HAVE_DECL_FDATASYNC 0
13760 _ACEOF
13761
13762
13763 fi
13764
13765
13766
13767 HAVE_IPV6=no
13768 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13769 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13770 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13771   echo $ECHO_N "(cached) $ECHO_C" >&6
13772 else
13773   cat >conftest.$ac_ext <<_ACEOF
13774 /* confdefs.h.  */
13775 _ACEOF
13776 cat confdefs.h >>conftest.$ac_ext
13777 cat >>conftest.$ac_ext <<_ACEOF
13778 /* end confdefs.h.  */
13779 $ac_includes_default
13780 #include <netinet/in.h>
13781
13782 int
13783 main ()
13784 {
13785 if ((struct sockaddr_in6 *) 0)
13786   return 0;
13787 if (sizeof (struct sockaddr_in6))
13788   return 0;
13789   ;
13790   return 0;
13791 }
13792 _ACEOF
13793 rm -f conftest.$ac_objext
13794 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13795   (eval $ac_compile) 2>conftest.er1
13796   ac_status=$?
13797   grep -v '^ *+' conftest.er1 >conftest.err
13798   rm -f conftest.er1
13799   cat conftest.err >&5
13800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13801   (exit $ac_status); } &&
13802          { ac_try='test -z "$ac_c_werror_flag"
13803                          || test ! -s conftest.err'
13804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13805   (eval $ac_try) 2>&5
13806   ac_status=$?
13807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13808   (exit $ac_status); }; } &&
13809          { ac_try='test -s conftest.$ac_objext'
13810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13811   (eval $ac_try) 2>&5
13812   ac_status=$?
13813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13814   (exit $ac_status); }; }; then
13815   ac_cv_type_struct_sockaddr_in6=yes
13816 else
13817   echo "$as_me: failed program was:" >&5
13818 sed 's/^/| /' conftest.$ac_ext >&5
13819
13820 ac_cv_type_struct_sockaddr_in6=no
13821 fi
13822 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13823 fi
13824 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13825 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13826 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13827
13828 cat >>confdefs.h <<\_ACEOF
13829 #define HAVE_IPV6 1
13830 _ACEOF
13831
13832          HAVE_IPV6=yes
13833 fi
13834
13835
13836
13837 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13838 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13839 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13840   echo $ECHO_N "(cached) $ECHO_C" >&6
13841 else
13842   cat >conftest.$ac_ext <<_ACEOF
13843 /* confdefs.h.  */
13844 _ACEOF
13845 cat confdefs.h >>conftest.$ac_ext
13846 cat >>conftest.$ac_ext <<_ACEOF
13847 /* end confdefs.h.  */
13848 #include <machine/vmparam.h>
13849 #include <sys/exec.h>
13850
13851 int
13852 main ()
13853 {
13854 PS_STRINGS->ps_nargvstr = 1;
13855 PS_STRINGS->ps_argvstr = "foo";
13856   ;
13857   return 0;
13858 }
13859 _ACEOF
13860 rm -f conftest.$ac_objext conftest$ac_exeext
13861 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13862   (eval $ac_link) 2>conftest.er1
13863   ac_status=$?
13864   grep -v '^ *+' conftest.er1 >conftest.err
13865   rm -f conftest.er1
13866   cat conftest.err >&5
13867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13868   (exit $ac_status); } &&
13869          { ac_try='test -z "$ac_c_werror_flag"
13870                          || test ! -s conftest.err'
13871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13872   (eval $ac_try) 2>&5
13873   ac_status=$?
13874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875   (exit $ac_status); }; } &&
13876          { ac_try='test -s conftest$ac_exeext'
13877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13878   (eval $ac_try) 2>&5
13879   ac_status=$?
13880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881   (exit $ac_status); }; }; then
13882   pgac_cv_var_PS_STRINGS=yes
13883 else
13884   echo "$as_me: failed program was:" >&5
13885 sed 's/^/| /' conftest.$ac_ext >&5
13886
13887 pgac_cv_var_PS_STRINGS=no
13888 fi
13889 rm -f conftest.err conftest.$ac_objext \
13890       conftest$ac_exeext conftest.$ac_ext
13891 fi
13892 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13893 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13894 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13895
13896 cat >>confdefs.h <<\_ACEOF
13897 #define HAVE_PS_STRINGS
13898 _ACEOF
13899
13900 fi
13901
13902
13903 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13904 # is missing.  Yes, there are machines that have only one.  We may
13905 # also decide to use snprintf.c if snprintf() is present but does not
13906 # have all the features we need --- see below.
13907
13908 pgac_need_repl_snprintf=no
13909
13910 for ac_func in snprintf
13911 do
13912 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13913 echo "$as_me:$LINENO: checking for $ac_func" >&5
13914 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13915 if eval "test \"\${$as_ac_var+set}\" = set"; then
13916   echo $ECHO_N "(cached) $ECHO_C" >&6
13917 else
13918   cat >conftest.$ac_ext <<_ACEOF
13919 /* confdefs.h.  */
13920 _ACEOF
13921 cat confdefs.h >>conftest.$ac_ext
13922 cat >>conftest.$ac_ext <<_ACEOF
13923 /* end confdefs.h.  */
13924 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13925    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13926 #define $ac_func innocuous_$ac_func
13927
13928 /* System header to define __stub macros and hopefully few prototypes,
13929     which can conflict with char $ac_func (); below.
13930     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13931     <limits.h> exists even on freestanding compilers.  */
13932
13933 #ifdef __STDC__
13934 # include <limits.h>
13935 #else
13936 # include <assert.h>
13937 #endif
13938
13939 #undef $ac_func
13940
13941 /* Override any gcc2 internal prototype to avoid an error.  */
13942 #ifdef __cplusplus
13943 extern "C"
13944 {
13945 #endif
13946 /* We use char because int might match the return type of a gcc2
13947    builtin and then its argument prototype would still apply.  */
13948 char $ac_func ();
13949 /* The GNU C library defines this for functions which it implements
13950     to always fail with ENOSYS.  Some functions are actually named
13951     something starting with __ and the normal name is an alias.  */
13952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13953 choke me
13954 #else
13955 char (*f) () = $ac_func;
13956 #endif
13957 #ifdef __cplusplus
13958 }
13959 #endif
13960
13961 int
13962 main ()
13963 {
13964 return f != $ac_func;
13965   ;
13966   return 0;
13967 }
13968 _ACEOF
13969 rm -f conftest.$ac_objext conftest$ac_exeext
13970 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13971   (eval $ac_link) 2>conftest.er1
13972   ac_status=$?
13973   grep -v '^ *+' conftest.er1 >conftest.err
13974   rm -f conftest.er1
13975   cat conftest.err >&5
13976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13977   (exit $ac_status); } &&
13978          { ac_try='test -z "$ac_c_werror_flag"
13979                          || test ! -s conftest.err'
13980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13981   (eval $ac_try) 2>&5
13982   ac_status=$?
13983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13984   (exit $ac_status); }; } &&
13985          { ac_try='test -s conftest$ac_exeext'
13986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13990   (exit $ac_status); }; }; then
13991   eval "$as_ac_var=yes"
13992 else
13993   echo "$as_me: failed program was:" >&5
13994 sed 's/^/| /' conftest.$ac_ext >&5
13995
13996 eval "$as_ac_var=no"
13997 fi
13998 rm -f conftest.err conftest.$ac_objext \
13999       conftest$ac_exeext conftest.$ac_ext
14000 fi
14001 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14002 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14003 if test `eval echo '${'$as_ac_var'}'` = yes; then
14004   cat >>confdefs.h <<_ACEOF
14005 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14006 _ACEOF
14007
14008 else
14009   pgac_need_repl_snprintf=yes
14010 fi
14011 done
14012
14013
14014 for ac_func in vsnprintf
14015 do
14016 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14017 echo "$as_me:$LINENO: checking for $ac_func" >&5
14018 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14019 if eval "test \"\${$as_ac_var+set}\" = set"; then
14020   echo $ECHO_N "(cached) $ECHO_C" >&6
14021 else
14022   cat >conftest.$ac_ext <<_ACEOF
14023 /* confdefs.h.  */
14024 _ACEOF
14025 cat confdefs.h >>conftest.$ac_ext
14026 cat >>conftest.$ac_ext <<_ACEOF
14027 /* end confdefs.h.  */
14028 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14029    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14030 #define $ac_func innocuous_$ac_func
14031
14032 /* System header to define __stub macros and hopefully few prototypes,
14033     which can conflict with char $ac_func (); below.
14034     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14035     <limits.h> exists even on freestanding compilers.  */
14036
14037 #ifdef __STDC__
14038 # include <limits.h>
14039 #else
14040 # include <assert.h>
14041 #endif
14042
14043 #undef $ac_func
14044
14045 /* Override any gcc2 internal prototype to avoid an error.  */
14046 #ifdef __cplusplus
14047 extern "C"
14048 {
14049 #endif
14050 /* We use char because int might match the return type of a gcc2
14051    builtin and then its argument prototype would still apply.  */
14052 char $ac_func ();
14053 /* The GNU C library defines this for functions which it implements
14054     to always fail with ENOSYS.  Some functions are actually named
14055     something starting with __ and the normal name is an alias.  */
14056 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14057 choke me
14058 #else
14059 char (*f) () = $ac_func;
14060 #endif
14061 #ifdef __cplusplus
14062 }
14063 #endif
14064
14065 int
14066 main ()
14067 {
14068 return f != $ac_func;
14069   ;
14070   return 0;
14071 }
14072 _ACEOF
14073 rm -f conftest.$ac_objext conftest$ac_exeext
14074 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14075   (eval $ac_link) 2>conftest.er1
14076   ac_status=$?
14077   grep -v '^ *+' conftest.er1 >conftest.err
14078   rm -f conftest.er1
14079   cat conftest.err >&5
14080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14081   (exit $ac_status); } &&
14082          { ac_try='test -z "$ac_c_werror_flag"
14083                          || test ! -s conftest.err'
14084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14085   (eval $ac_try) 2>&5
14086   ac_status=$?
14087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14088   (exit $ac_status); }; } &&
14089          { ac_try='test -s conftest$ac_exeext'
14090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14091   (eval $ac_try) 2>&5
14092   ac_status=$?
14093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14094   (exit $ac_status); }; }; then
14095   eval "$as_ac_var=yes"
14096 else
14097   echo "$as_me: failed program was:" >&5
14098 sed 's/^/| /' conftest.$ac_ext >&5
14099
14100 eval "$as_ac_var=no"
14101 fi
14102 rm -f conftest.err conftest.$ac_objext \
14103       conftest$ac_exeext conftest.$ac_ext
14104 fi
14105 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14106 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14107 if test `eval echo '${'$as_ac_var'}'` = yes; then
14108   cat >>confdefs.h <<_ACEOF
14109 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14110 _ACEOF
14111
14112 else
14113   pgac_need_repl_snprintf=yes
14114 fi
14115 done
14116
14117
14118
14119 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14120 # include/c.h will provide declarations.  Note this is a separate test
14121 # from whether the functions exist in the C library --- there are
14122 # systems that have the functions but don't bother to declare them :-(
14123
14124 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14125 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14126 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14127   echo $ECHO_N "(cached) $ECHO_C" >&6
14128 else
14129   cat >conftest.$ac_ext <<_ACEOF
14130 /* confdefs.h.  */
14131 _ACEOF
14132 cat confdefs.h >>conftest.$ac_ext
14133 cat >>conftest.$ac_ext <<_ACEOF
14134 /* end confdefs.h.  */
14135 $ac_includes_default
14136 int
14137 main ()
14138 {
14139 #ifndef snprintf
14140   char *p = (char *) snprintf;
14141 #endif
14142
14143   ;
14144   return 0;
14145 }
14146 _ACEOF
14147 rm -f conftest.$ac_objext
14148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14149   (eval $ac_compile) 2>conftest.er1
14150   ac_status=$?
14151   grep -v '^ *+' conftest.er1 >conftest.err
14152   rm -f conftest.er1
14153   cat conftest.err >&5
14154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14155   (exit $ac_status); } &&
14156          { ac_try='test -z "$ac_c_werror_flag"
14157                          || test ! -s conftest.err'
14158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14159   (eval $ac_try) 2>&5
14160   ac_status=$?
14161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14162   (exit $ac_status); }; } &&
14163          { ac_try='test -s conftest.$ac_objext'
14164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14165   (eval $ac_try) 2>&5
14166   ac_status=$?
14167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14168   (exit $ac_status); }; }; then
14169   ac_cv_have_decl_snprintf=yes
14170 else
14171   echo "$as_me: failed program was:" >&5
14172 sed 's/^/| /' conftest.$ac_ext >&5
14173
14174 ac_cv_have_decl_snprintf=no
14175 fi
14176 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14177 fi
14178 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14179 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14180 if test $ac_cv_have_decl_snprintf = yes; then
14181
14182 cat >>confdefs.h <<_ACEOF
14183 #define HAVE_DECL_SNPRINTF 1
14184 _ACEOF
14185
14186
14187 else
14188   cat >>confdefs.h <<_ACEOF
14189 #define HAVE_DECL_SNPRINTF 0
14190 _ACEOF
14191
14192
14193 fi
14194 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14195 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14196 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14197   echo $ECHO_N "(cached) $ECHO_C" >&6
14198 else
14199   cat >conftest.$ac_ext <<_ACEOF
14200 /* confdefs.h.  */
14201 _ACEOF
14202 cat confdefs.h >>conftest.$ac_ext
14203 cat >>conftest.$ac_ext <<_ACEOF
14204 /* end confdefs.h.  */
14205 $ac_includes_default
14206 int
14207 main ()
14208 {
14209 #ifndef vsnprintf
14210   char *p = (char *) vsnprintf;
14211 #endif
14212
14213   ;
14214   return 0;
14215 }
14216 _ACEOF
14217 rm -f conftest.$ac_objext
14218 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14219   (eval $ac_compile) 2>conftest.er1
14220   ac_status=$?
14221   grep -v '^ *+' conftest.er1 >conftest.err
14222   rm -f conftest.er1
14223   cat conftest.err >&5
14224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14225   (exit $ac_status); } &&
14226          { ac_try='test -z "$ac_c_werror_flag"
14227                          || test ! -s conftest.err'
14228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14229   (eval $ac_try) 2>&5
14230   ac_status=$?
14231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14232   (exit $ac_status); }; } &&
14233          { ac_try='test -s conftest.$ac_objext'
14234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14235   (eval $ac_try) 2>&5
14236   ac_status=$?
14237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14238   (exit $ac_status); }; }; then
14239   ac_cv_have_decl_vsnprintf=yes
14240 else
14241   echo "$as_me: failed program was:" >&5
14242 sed 's/^/| /' conftest.$ac_ext >&5
14243
14244 ac_cv_have_decl_vsnprintf=no
14245 fi
14246 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14247 fi
14248 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14249 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14250 if test $ac_cv_have_decl_vsnprintf = yes; then
14251
14252 cat >>confdefs.h <<_ACEOF
14253 #define HAVE_DECL_VSNPRINTF 1
14254 _ACEOF
14255
14256
14257 else
14258   cat >>confdefs.h <<_ACEOF
14259 #define HAVE_DECL_VSNPRINTF 0
14260 _ACEOF
14261
14262
14263 fi
14264
14265
14266
14267
14268 # do this one the hard way in case isinf() is a macro
14269 echo "$as_me:$LINENO: checking for isinf" >&5
14270 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14271 if test "${ac_cv_func_isinf+set}" = set; then
14272   echo $ECHO_N "(cached) $ECHO_C" >&6
14273 else
14274   cat >conftest.$ac_ext <<_ACEOF
14275 /* confdefs.h.  */
14276 _ACEOF
14277 cat confdefs.h >>conftest.$ac_ext
14278 cat >>conftest.$ac_ext <<_ACEOF
14279 /* end confdefs.h.  */
14280 #include <math.h>
14281
14282 int
14283 main ()
14284 {
14285 double x = 0.0; int res = isinf(x);
14286   ;
14287   return 0;
14288 }
14289 _ACEOF
14290 rm -f conftest.$ac_objext conftest$ac_exeext
14291 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14292   (eval $ac_link) 2>conftest.er1
14293   ac_status=$?
14294   grep -v '^ *+' conftest.er1 >conftest.err
14295   rm -f conftest.er1
14296   cat conftest.err >&5
14297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14298   (exit $ac_status); } &&
14299          { ac_try='test -z "$ac_c_werror_flag"
14300                          || test ! -s conftest.err'
14301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14302   (eval $ac_try) 2>&5
14303   ac_status=$?
14304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14305   (exit $ac_status); }; } &&
14306          { ac_try='test -s conftest$ac_exeext'
14307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14308   (eval $ac_try) 2>&5
14309   ac_status=$?
14310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14311   (exit $ac_status); }; }; then
14312   ac_cv_func_isinf=yes
14313 else
14314   echo "$as_me: failed program was:" >&5
14315 sed 's/^/| /' conftest.$ac_ext >&5
14316
14317 ac_cv_func_isinf=no
14318 fi
14319 rm -f conftest.err conftest.$ac_objext \
14320       conftest$ac_exeext conftest.$ac_ext
14321 fi
14322 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14323 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14324
14325 if test $ac_cv_func_isinf = yes ; then
14326
14327 cat >>confdefs.h <<\_ACEOF
14328 #define HAVE_ISINF 1
14329 _ACEOF
14330
14331 else
14332   case $LIBOBJS in
14333     "isinf.$ac_objext"   | \
14334   *" isinf.$ac_objext"   | \
14335     "isinf.$ac_objext "* | \
14336   *" isinf.$ac_objext "* ) ;;
14337   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14338 esac
14339
14340   # Look for a way to implement a substitute for isinf()
14341
14342
14343
14344
14345 for ac_func in fpclass fp_class fp_class_d class
14346 do
14347 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14348 echo "$as_me:$LINENO: checking for $ac_func" >&5
14349 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14350 if eval "test \"\${$as_ac_var+set}\" = set"; then
14351   echo $ECHO_N "(cached) $ECHO_C" >&6
14352 else
14353   cat >conftest.$ac_ext <<_ACEOF
14354 /* confdefs.h.  */
14355 _ACEOF
14356 cat confdefs.h >>conftest.$ac_ext
14357 cat >>conftest.$ac_ext <<_ACEOF
14358 /* end confdefs.h.  */
14359 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14360    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14361 #define $ac_func innocuous_$ac_func
14362
14363 /* System header to define __stub macros and hopefully few prototypes,
14364     which can conflict with char $ac_func (); below.
14365     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14366     <limits.h> exists even on freestanding compilers.  */
14367
14368 #ifdef __STDC__
14369 # include <limits.h>
14370 #else
14371 # include <assert.h>
14372 #endif
14373
14374 #undef $ac_func
14375
14376 /* Override any gcc2 internal prototype to avoid an error.  */
14377 #ifdef __cplusplus
14378 extern "C"
14379 {
14380 #endif
14381 /* We use char because int might match the return type of a gcc2
14382    builtin and then its argument prototype would still apply.  */
14383 char $ac_func ();
14384 /* The GNU C library defines this for functions which it implements
14385     to always fail with ENOSYS.  Some functions are actually named
14386     something starting with __ and the normal name is an alias.  */
14387 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14388 choke me
14389 #else
14390 char (*f) () = $ac_func;
14391 #endif
14392 #ifdef __cplusplus
14393 }
14394 #endif
14395
14396 int
14397 main ()
14398 {
14399 return f != $ac_func;
14400   ;
14401   return 0;
14402 }
14403 _ACEOF
14404 rm -f conftest.$ac_objext conftest$ac_exeext
14405 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14406   (eval $ac_link) 2>conftest.er1
14407   ac_status=$?
14408   grep -v '^ *+' conftest.er1 >conftest.err
14409   rm -f conftest.er1
14410   cat conftest.err >&5
14411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14412   (exit $ac_status); } &&
14413          { ac_try='test -z "$ac_c_werror_flag"
14414                          || test ! -s conftest.err'
14415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14416   (eval $ac_try) 2>&5
14417   ac_status=$?
14418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14419   (exit $ac_status); }; } &&
14420          { ac_try='test -s conftest$ac_exeext'
14421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14422   (eval $ac_try) 2>&5
14423   ac_status=$?
14424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14425   (exit $ac_status); }; }; then
14426   eval "$as_ac_var=yes"
14427 else
14428   echo "$as_me: failed program was:" >&5
14429 sed 's/^/| /' conftest.$ac_ext >&5
14430
14431 eval "$as_ac_var=no"
14432 fi
14433 rm -f conftest.err conftest.$ac_objext \
14434       conftest$ac_exeext conftest.$ac_ext
14435 fi
14436 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14437 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14438 if test `eval echo '${'$as_ac_var'}'` = yes; then
14439   cat >>confdefs.h <<_ACEOF
14440 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14441 _ACEOF
14442  break
14443 fi
14444 done
14445
14446 fi
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14462 do
14463 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14464 echo "$as_me:$LINENO: checking for $ac_func" >&5
14465 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14466 if eval "test \"\${$as_ac_var+set}\" = set"; then
14467   echo $ECHO_N "(cached) $ECHO_C" >&6
14468 else
14469   cat >conftest.$ac_ext <<_ACEOF
14470 /* confdefs.h.  */
14471 _ACEOF
14472 cat confdefs.h >>conftest.$ac_ext
14473 cat >>conftest.$ac_ext <<_ACEOF
14474 /* end confdefs.h.  */
14475 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14476    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14477 #define $ac_func innocuous_$ac_func
14478
14479 /* System header to define __stub macros and hopefully few prototypes,
14480     which can conflict with char $ac_func (); below.
14481     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14482     <limits.h> exists even on freestanding compilers.  */
14483
14484 #ifdef __STDC__
14485 # include <limits.h>
14486 #else
14487 # include <assert.h>
14488 #endif
14489
14490 #undef $ac_func
14491
14492 /* Override any gcc2 internal prototype to avoid an error.  */
14493 #ifdef __cplusplus
14494 extern "C"
14495 {
14496 #endif
14497 /* We use char because int might match the return type of a gcc2
14498    builtin and then its argument prototype would still apply.  */
14499 char $ac_func ();
14500 /* The GNU C library defines this for functions which it implements
14501     to always fail with ENOSYS.  Some functions are actually named
14502     something starting with __ and the normal name is an alias.  */
14503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14504 choke me
14505 #else
14506 char (*f) () = $ac_func;
14507 #endif
14508 #ifdef __cplusplus
14509 }
14510 #endif
14511
14512 int
14513 main ()
14514 {
14515 return f != $ac_func;
14516   ;
14517   return 0;
14518 }
14519 _ACEOF
14520 rm -f conftest.$ac_objext conftest$ac_exeext
14521 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14522   (eval $ac_link) 2>conftest.er1
14523   ac_status=$?
14524   grep -v '^ *+' conftest.er1 >conftest.err
14525   rm -f conftest.er1
14526   cat conftest.err >&5
14527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14528   (exit $ac_status); } &&
14529          { ac_try='test -z "$ac_c_werror_flag"
14530                          || test ! -s conftest.err'
14531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14532   (eval $ac_try) 2>&5
14533   ac_status=$?
14534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14535   (exit $ac_status); }; } &&
14536          { ac_try='test -s conftest$ac_exeext'
14537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14538   (eval $ac_try) 2>&5
14539   ac_status=$?
14540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14541   (exit $ac_status); }; }; then
14542   eval "$as_ac_var=yes"
14543 else
14544   echo "$as_me: failed program was:" >&5
14545 sed 's/^/| /' conftest.$ac_ext >&5
14546
14547 eval "$as_ac_var=no"
14548 fi
14549 rm -f conftest.err conftest.$ac_objext \
14550       conftest$ac_exeext conftest.$ac_ext
14551 fi
14552 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14553 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14554 if test `eval echo '${'$as_ac_var'}'` = yes; then
14555   cat >>confdefs.h <<_ACEOF
14556 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14557 _ACEOF
14558
14559 else
14560   case $LIBOBJS in
14561     "$ac_func.$ac_objext"   | \
14562   *" $ac_func.$ac_objext"   | \
14563     "$ac_func.$ac_objext "* | \
14564   *" $ac_func.$ac_objext "* ) ;;
14565   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14566 esac
14567
14568 fi
14569 done
14570
14571
14572
14573 # System's version of getaddrinfo(), if any, may be used only if we found
14574 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14575 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14576 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14577 # because we want to use our own getaddrinfo.c on Windows anyway.)
14578 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14579
14580 for ac_func in getaddrinfo
14581 do
14582 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14583 echo "$as_me:$LINENO: checking for $ac_func" >&5
14584 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14585 if eval "test \"\${$as_ac_var+set}\" = set"; then
14586   echo $ECHO_N "(cached) $ECHO_C" >&6
14587 else
14588   cat >conftest.$ac_ext <<_ACEOF
14589 /* confdefs.h.  */
14590 _ACEOF
14591 cat confdefs.h >>conftest.$ac_ext
14592 cat >>conftest.$ac_ext <<_ACEOF
14593 /* end confdefs.h.  */
14594 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14595    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14596 #define $ac_func innocuous_$ac_func
14597
14598 /* System header to define __stub macros and hopefully few prototypes,
14599     which can conflict with char $ac_func (); below.
14600     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14601     <limits.h> exists even on freestanding compilers.  */
14602
14603 #ifdef __STDC__
14604 # include <limits.h>
14605 #else
14606 # include <assert.h>
14607 #endif
14608
14609 #undef $ac_func
14610
14611 /* Override any gcc2 internal prototype to avoid an error.  */
14612 #ifdef __cplusplus
14613 extern "C"
14614 {
14615 #endif
14616 /* We use char because int might match the return type of a gcc2
14617    builtin and then its argument prototype would still apply.  */
14618 char $ac_func ();
14619 /* The GNU C library defines this for functions which it implements
14620     to always fail with ENOSYS.  Some functions are actually named
14621     something starting with __ and the normal name is an alias.  */
14622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14623 choke me
14624 #else
14625 char (*f) () = $ac_func;
14626 #endif
14627 #ifdef __cplusplus
14628 }
14629 #endif
14630
14631 int
14632 main ()
14633 {
14634 return f != $ac_func;
14635   ;
14636   return 0;
14637 }
14638 _ACEOF
14639 rm -f conftest.$ac_objext conftest$ac_exeext
14640 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14641   (eval $ac_link) 2>conftest.er1
14642   ac_status=$?
14643   grep -v '^ *+' conftest.er1 >conftest.err
14644   rm -f conftest.er1
14645   cat conftest.err >&5
14646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14647   (exit $ac_status); } &&
14648          { ac_try='test -z "$ac_c_werror_flag"
14649                          || test ! -s conftest.err'
14650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14651   (eval $ac_try) 2>&5
14652   ac_status=$?
14653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14654   (exit $ac_status); }; } &&
14655          { ac_try='test -s conftest$ac_exeext'
14656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14657   (eval $ac_try) 2>&5
14658   ac_status=$?
14659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14660   (exit $ac_status); }; }; then
14661   eval "$as_ac_var=yes"
14662 else
14663   echo "$as_me: failed program was:" >&5
14664 sed 's/^/| /' conftest.$ac_ext >&5
14665
14666 eval "$as_ac_var=no"
14667 fi
14668 rm -f conftest.err conftest.$ac_objext \
14669       conftest$ac_exeext conftest.$ac_ext
14670 fi
14671 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14672 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14673 if test `eval echo '${'$as_ac_var'}'` = yes; then
14674   cat >>confdefs.h <<_ACEOF
14675 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14676 _ACEOF
14677
14678 else
14679   case $LIBOBJS in
14680     "$ac_func.$ac_objext"   | \
14681   *" $ac_func.$ac_objext"   | \
14682     "$ac_func.$ac_objext "* | \
14683   *" $ac_func.$ac_objext "* ) ;;
14684   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14685 esac
14686
14687 fi
14688 done
14689
14690
14691 else
14692   case $LIBOBJS in
14693     "getaddrinfo.$ac_objext"   | \
14694   *" getaddrinfo.$ac_objext"   | \
14695     "getaddrinfo.$ac_objext "* | \
14696   *" getaddrinfo.$ac_objext "* ) ;;
14697   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14698 esac
14699
14700 fi
14701
14702 # similarly, use system's getopt_long() only if system provides struct option.
14703 if test x"$ac_cv_type_struct_option" = xyes ; then
14704
14705 for ac_func in getopt_long
14706 do
14707 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14708 echo "$as_me:$LINENO: checking for $ac_func" >&5
14709 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14710 if eval "test \"\${$as_ac_var+set}\" = set"; then
14711   echo $ECHO_N "(cached) $ECHO_C" >&6
14712 else
14713   cat >conftest.$ac_ext <<_ACEOF
14714 /* confdefs.h.  */
14715 _ACEOF
14716 cat confdefs.h >>conftest.$ac_ext
14717 cat >>conftest.$ac_ext <<_ACEOF
14718 /* end confdefs.h.  */
14719 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14720    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14721 #define $ac_func innocuous_$ac_func
14722
14723 /* System header to define __stub macros and hopefully few prototypes,
14724     which can conflict with char $ac_func (); below.
14725     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14726     <limits.h> exists even on freestanding compilers.  */
14727
14728 #ifdef __STDC__
14729 # include <limits.h>
14730 #else
14731 # include <assert.h>
14732 #endif
14733
14734 #undef $ac_func
14735
14736 /* Override any gcc2 internal prototype to avoid an error.  */
14737 #ifdef __cplusplus
14738 extern "C"
14739 {
14740 #endif
14741 /* We use char because int might match the return type of a gcc2
14742    builtin and then its argument prototype would still apply.  */
14743 char $ac_func ();
14744 /* The GNU C library defines this for functions which it implements
14745     to always fail with ENOSYS.  Some functions are actually named
14746     something starting with __ and the normal name is an alias.  */
14747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14748 choke me
14749 #else
14750 char (*f) () = $ac_func;
14751 #endif
14752 #ifdef __cplusplus
14753 }
14754 #endif
14755
14756 int
14757 main ()
14758 {
14759 return f != $ac_func;
14760   ;
14761   return 0;
14762 }
14763 _ACEOF
14764 rm -f conftest.$ac_objext conftest$ac_exeext
14765 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14766   (eval $ac_link) 2>conftest.er1
14767   ac_status=$?
14768   grep -v '^ *+' conftest.er1 >conftest.err
14769   rm -f conftest.er1
14770   cat conftest.err >&5
14771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772   (exit $ac_status); } &&
14773          { ac_try='test -z "$ac_c_werror_flag"
14774                          || test ! -s conftest.err'
14775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14776   (eval $ac_try) 2>&5
14777   ac_status=$?
14778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779   (exit $ac_status); }; } &&
14780          { ac_try='test -s conftest$ac_exeext'
14781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14782   (eval $ac_try) 2>&5
14783   ac_status=$?
14784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14785   (exit $ac_status); }; }; then
14786   eval "$as_ac_var=yes"
14787 else
14788   echo "$as_me: failed program was:" >&5
14789 sed 's/^/| /' conftest.$ac_ext >&5
14790
14791 eval "$as_ac_var=no"
14792 fi
14793 rm -f conftest.err conftest.$ac_objext \
14794       conftest$ac_exeext conftest.$ac_ext
14795 fi
14796 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14797 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14798 if test `eval echo '${'$as_ac_var'}'` = yes; then
14799   cat >>confdefs.h <<_ACEOF
14800 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14801 _ACEOF
14802
14803 else
14804   case $LIBOBJS in
14805     "$ac_func.$ac_objext"   | \
14806   *" $ac_func.$ac_objext"   | \
14807     "$ac_func.$ac_objext "* | \
14808   *" $ac_func.$ac_objext "* ) ;;
14809   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14810 esac
14811
14812 fi
14813 done
14814
14815
14816 else
14817   case $LIBOBJS in
14818     "getopt_long.$ac_objext"   | \
14819   *" getopt_long.$ac_objext"   | \
14820     "getopt_long.$ac_objext "* | \
14821   *" getopt_long.$ac_objext "* ) ;;
14822   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14823 esac
14824
14825 fi
14826
14827 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14828 # We override the previous test that said fseeko/ftello didn't exist
14829 # OS tests are also done in include/c.h and port/fseeko.c
14830 case $host_os in bsdi*|netbsd*)
14831 ac_cv_func_fseeko=yes
14832 esac
14833
14834 # Solaris has a very slow qsort in certain cases, so we replace it.
14835 if test "$PORTNAME" = "solaris"; then
14836 case $LIBOBJS in
14837     "qsort.$ac_objext"   | \
14838   *" qsort.$ac_objext"   | \
14839     "qsort.$ac_objext "* | \
14840   *" qsort.$ac_objext "* ) ;;
14841   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
14842 esac
14843
14844 fi
14845
14846 # Win32 support
14847 if test "$PORTNAME" = "win32"; then
14848 case $LIBOBJS in
14849     "gettimeofday.$ac_objext"   | \
14850   *" gettimeofday.$ac_objext"   | \
14851     "gettimeofday.$ac_objext "* | \
14852   *" gettimeofday.$ac_objext "* ) ;;
14853   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14854 esac
14855
14856 case $LIBOBJS in
14857     "kill.$ac_objext"   | \
14858   *" kill.$ac_objext"   | \
14859     "kill.$ac_objext "* | \
14860   *" kill.$ac_objext "* ) ;;
14861   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14862 esac
14863
14864 case $LIBOBJS in
14865     "open.$ac_objext"   | \
14866   *" open.$ac_objext"   | \
14867     "open.$ac_objext "* | \
14868   *" open.$ac_objext "* ) ;;
14869   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14870 esac
14871
14872 case $LIBOBJS in
14873     "rand.$ac_objext"   | \
14874   *" rand.$ac_objext"   | \
14875     "rand.$ac_objext "* | \
14876   *" rand.$ac_objext "* ) ;;
14877   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14878 esac
14879
14880
14881 cat >>confdefs.h <<\_ACEOF
14882 #define HAVE_SYMLINK 1
14883 _ACEOF
14884
14885 fi
14886
14887 if test "$with_readline" = yes; then
14888   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
14889 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
14890 cat >conftest.$ac_ext <<_ACEOF
14891 /* confdefs.h.  */
14892 _ACEOF
14893 cat confdefs.h >>conftest.$ac_ext
14894 cat >>conftest.$ac_ext <<_ACEOF
14895 /* end confdefs.h.  */
14896 #include <stdio.h>
14897 #ifdef HAVE_READLINE_READLINE_H
14898 # include <readline/readline.h>
14899 #elif defined(HAVE_READLINE_H)
14900 # include <readline.h>
14901 #endif
14902
14903 int
14904 main ()
14905 {
14906 rl_completion_append_character = 'x';
14907   ;
14908   return 0;
14909 }
14910 _ACEOF
14911 rm -f conftest.$ac_objext conftest$ac_exeext
14912 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14913   (eval $ac_link) 2>conftest.er1
14914   ac_status=$?
14915   grep -v '^ *+' conftest.er1 >conftest.err
14916   rm -f conftest.er1
14917   cat conftest.err >&5
14918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14919   (exit $ac_status); } &&
14920          { ac_try='test -z "$ac_c_werror_flag"
14921                          || test ! -s conftest.err'
14922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14923   (eval $ac_try) 2>&5
14924   ac_status=$?
14925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14926   (exit $ac_status); }; } &&
14927          { ac_try='test -s conftest$ac_exeext'
14928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14929   (eval $ac_try) 2>&5
14930   ac_status=$?
14931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14932   (exit $ac_status); }; }; then
14933   echo "$as_me:$LINENO: result: yes" >&5
14934 echo "${ECHO_T}yes" >&6
14935
14936 cat >>confdefs.h <<\_ACEOF
14937 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
14938 _ACEOF
14939
14940 else
14941   echo "$as_me: failed program was:" >&5
14942 sed 's/^/| /' conftest.$ac_ext >&5
14943
14944 echo "$as_me:$LINENO: result: no" >&5
14945 echo "${ECHO_T}no" >&6
14946 fi
14947 rm -f conftest.err conftest.$ac_objext \
14948       conftest$ac_exeext conftest.$ac_ext
14949
14950
14951 for ac_func in rl_completion_matches rl_filename_completion_function
14952 do
14953 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14954 echo "$as_me:$LINENO: checking for $ac_func" >&5
14955 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14956 if eval "test \"\${$as_ac_var+set}\" = set"; then
14957   echo $ECHO_N "(cached) $ECHO_C" >&6
14958 else
14959   cat >conftest.$ac_ext <<_ACEOF
14960 /* confdefs.h.  */
14961 _ACEOF
14962 cat confdefs.h >>conftest.$ac_ext
14963 cat >>conftest.$ac_ext <<_ACEOF
14964 /* end confdefs.h.  */
14965 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14966    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14967 #define $ac_func innocuous_$ac_func
14968
14969 /* System header to define __stub macros and hopefully few prototypes,
14970     which can conflict with char $ac_func (); below.
14971     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14972     <limits.h> exists even on freestanding compilers.  */
14973
14974 #ifdef __STDC__
14975 # include <limits.h>
14976 #else
14977 # include <assert.h>
14978 #endif
14979
14980 #undef $ac_func
14981
14982 /* Override any gcc2 internal prototype to avoid an error.  */
14983 #ifdef __cplusplus
14984 extern "C"
14985 {
14986 #endif
14987 /* We use char because int might match the return type of a gcc2
14988    builtin and then its argument prototype would still apply.  */
14989 char $ac_func ();
14990 /* The GNU C library defines this for functions which it implements
14991     to always fail with ENOSYS.  Some functions are actually named
14992     something starting with __ and the normal name is an alias.  */
14993 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14994 choke me
14995 #else
14996 char (*f) () = $ac_func;
14997 #endif
14998 #ifdef __cplusplus
14999 }
15000 #endif
15001
15002 int
15003 main ()
15004 {
15005 return f != $ac_func;
15006   ;
15007   return 0;
15008 }
15009 _ACEOF
15010 rm -f conftest.$ac_objext conftest$ac_exeext
15011 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15012   (eval $ac_link) 2>conftest.er1
15013   ac_status=$?
15014   grep -v '^ *+' conftest.er1 >conftest.err
15015   rm -f conftest.er1
15016   cat conftest.err >&5
15017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15018   (exit $ac_status); } &&
15019          { ac_try='test -z "$ac_c_werror_flag"
15020                          || test ! -s conftest.err'
15021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15022   (eval $ac_try) 2>&5
15023   ac_status=$?
15024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15025   (exit $ac_status); }; } &&
15026          { ac_try='test -s conftest$ac_exeext'
15027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15028   (eval $ac_try) 2>&5
15029   ac_status=$?
15030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15031   (exit $ac_status); }; }; then
15032   eval "$as_ac_var=yes"
15033 else
15034   echo "$as_me: failed program was:" >&5
15035 sed 's/^/| /' conftest.$ac_ext >&5
15036
15037 eval "$as_ac_var=no"
15038 fi
15039 rm -f conftest.err conftest.$ac_objext \
15040       conftest$ac_exeext conftest.$ac_ext
15041 fi
15042 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15043 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15044 if test `eval echo '${'$as_ac_var'}'` = yes; then
15045   cat >>confdefs.h <<_ACEOF
15046 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15047 _ACEOF
15048
15049 fi
15050 done
15051
15052
15053 for ac_func in replace_history_entry
15054 do
15055 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15056 echo "$as_me:$LINENO: checking for $ac_func" >&5
15057 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15058 if eval "test \"\${$as_ac_var+set}\" = set"; then
15059   echo $ECHO_N "(cached) $ECHO_C" >&6
15060 else
15061   cat >conftest.$ac_ext <<_ACEOF
15062 /* confdefs.h.  */
15063 _ACEOF
15064 cat confdefs.h >>conftest.$ac_ext
15065 cat >>conftest.$ac_ext <<_ACEOF
15066 /* end confdefs.h.  */
15067 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15068    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15069 #define $ac_func innocuous_$ac_func
15070
15071 /* System header to define __stub macros and hopefully few prototypes,
15072     which can conflict with char $ac_func (); below.
15073     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15074     <limits.h> exists even on freestanding compilers.  */
15075
15076 #ifdef __STDC__
15077 # include <limits.h>
15078 #else
15079 # include <assert.h>
15080 #endif
15081
15082 #undef $ac_func
15083
15084 /* Override any gcc2 internal prototype to avoid an error.  */
15085 #ifdef __cplusplus
15086 extern "C"
15087 {
15088 #endif
15089 /* We use char because int might match the return type of a gcc2
15090    builtin and then its argument prototype would still apply.  */
15091 char $ac_func ();
15092 /* The GNU C library defines this for functions which it implements
15093     to always fail with ENOSYS.  Some functions are actually named
15094     something starting with __ and the normal name is an alias.  */
15095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15096 choke me
15097 #else
15098 char (*f) () = $ac_func;
15099 #endif
15100 #ifdef __cplusplus
15101 }
15102 #endif
15103
15104 int
15105 main ()
15106 {
15107 return f != $ac_func;
15108   ;
15109   return 0;
15110 }
15111 _ACEOF
15112 rm -f conftest.$ac_objext conftest$ac_exeext
15113 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15114   (eval $ac_link) 2>conftest.er1
15115   ac_status=$?
15116   grep -v '^ *+' conftest.er1 >conftest.err
15117   rm -f conftest.er1
15118   cat conftest.err >&5
15119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120   (exit $ac_status); } &&
15121          { ac_try='test -z "$ac_c_werror_flag"
15122                          || test ! -s conftest.err'
15123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15124   (eval $ac_try) 2>&5
15125   ac_status=$?
15126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15127   (exit $ac_status); }; } &&
15128          { ac_try='test -s conftest$ac_exeext'
15129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15130   (eval $ac_try) 2>&5
15131   ac_status=$?
15132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15133   (exit $ac_status); }; }; then
15134   eval "$as_ac_var=yes"
15135 else
15136   echo "$as_me: failed program was:" >&5
15137 sed 's/^/| /' conftest.$ac_ext >&5
15138
15139 eval "$as_ac_var=no"
15140 fi
15141 rm -f conftest.err conftest.$ac_objext \
15142       conftest$ac_exeext conftest.$ac_ext
15143 fi
15144 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15145 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15146 if test `eval echo '${'$as_ac_var'}'` = yes; then
15147   cat >>confdefs.h <<_ACEOF
15148 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15149 _ACEOF
15150
15151 fi
15152 done
15153
15154 fi
15155
15156
15157 echo "$as_me:$LINENO: checking for finite" >&5
15158 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15159 cat >conftest.$ac_ext <<_ACEOF
15160 /* confdefs.h.  */
15161 _ACEOF
15162 cat confdefs.h >>conftest.$ac_ext
15163 cat >>conftest.$ac_ext <<_ACEOF
15164 /* end confdefs.h.  */
15165 #include <math.h>
15166 int
15167 main ()
15168 {
15169 int dummy=finite(1.0);
15170   ;
15171   return 0;
15172 }
15173 _ACEOF
15174 rm -f conftest.$ac_objext conftest$ac_exeext
15175 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15176   (eval $ac_link) 2>conftest.er1
15177   ac_status=$?
15178   grep -v '^ *+' conftest.er1 >conftest.err
15179   rm -f conftest.er1
15180   cat conftest.err >&5
15181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15182   (exit $ac_status); } &&
15183          { ac_try='test -z "$ac_c_werror_flag"
15184                          || test ! -s conftest.err'
15185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15186   (eval $ac_try) 2>&5
15187   ac_status=$?
15188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15189   (exit $ac_status); }; } &&
15190          { ac_try='test -s conftest$ac_exeext'
15191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15192   (eval $ac_try) 2>&5
15193   ac_status=$?
15194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15195   (exit $ac_status); }; }; then
15196
15197 cat >>confdefs.h <<\_ACEOF
15198 #define HAVE_FINITE 1
15199 _ACEOF
15200
15201 echo "$as_me:$LINENO: result: yes" >&5
15202 echo "${ECHO_T}yes" >&6
15203 else
15204   echo "$as_me: failed program was:" >&5
15205 sed 's/^/| /' conftest.$ac_ext >&5
15206
15207 echo "$as_me:$LINENO: result: no" >&5
15208 echo "${ECHO_T}no" >&6
15209 fi
15210 rm -f conftest.err conftest.$ac_objext \
15211       conftest$ac_exeext conftest.$ac_ext
15212
15213 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15214 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15215 cat >conftest.$ac_ext <<_ACEOF
15216 /* confdefs.h.  */
15217 _ACEOF
15218 cat confdefs.h >>conftest.$ac_ext
15219 cat >>conftest.$ac_ext <<_ACEOF
15220 /* end confdefs.h.  */
15221 #include <setjmp.h>
15222 int
15223 main ()
15224 {
15225 sigjmp_buf x; sigsetjmp(x, 1);
15226   ;
15227   return 0;
15228 }
15229 _ACEOF
15230 rm -f conftest.$ac_objext conftest$ac_exeext
15231 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15232   (eval $ac_link) 2>conftest.er1
15233   ac_status=$?
15234   grep -v '^ *+' conftest.er1 >conftest.err
15235   rm -f conftest.er1
15236   cat conftest.err >&5
15237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15238   (exit $ac_status); } &&
15239          { ac_try='test -z "$ac_c_werror_flag"
15240                          || test ! -s conftest.err'
15241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15242   (eval $ac_try) 2>&5
15243   ac_status=$?
15244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15245   (exit $ac_status); }; } &&
15246          { ac_try='test -s conftest$ac_exeext'
15247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15248   (eval $ac_try) 2>&5
15249   ac_status=$?
15250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15251   (exit $ac_status); }; }; then
15252
15253 cat >>confdefs.h <<\_ACEOF
15254 #define HAVE_SIGSETJMP 1
15255 _ACEOF
15256
15257 echo "$as_me:$LINENO: result: yes" >&5
15258 echo "${ECHO_T}yes" >&6
15259 else
15260   echo "$as_me: failed program was:" >&5
15261 sed 's/^/| /' conftest.$ac_ext >&5
15262
15263 echo "$as_me:$LINENO: result: no" >&5
15264 echo "${ECHO_T}no" >&6
15265 fi
15266 rm -f conftest.err conftest.$ac_objext \
15267       conftest$ac_exeext conftest.$ac_ext
15268
15269 echo "$as_me:$LINENO: checking for syslog" >&5
15270 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15271 if test "${ac_cv_func_syslog+set}" = set; then
15272   echo $ECHO_N "(cached) $ECHO_C" >&6
15273 else
15274   cat >conftest.$ac_ext <<_ACEOF
15275 /* confdefs.h.  */
15276 _ACEOF
15277 cat confdefs.h >>conftest.$ac_ext
15278 cat >>conftest.$ac_ext <<_ACEOF
15279 /* end confdefs.h.  */
15280 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15281    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15282 #define syslog innocuous_syslog
15283
15284 /* System header to define __stub macros and hopefully few prototypes,
15285     which can conflict with char syslog (); below.
15286     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15287     <limits.h> exists even on freestanding compilers.  */
15288
15289 #ifdef __STDC__
15290 # include <limits.h>
15291 #else
15292 # include <assert.h>
15293 #endif
15294
15295 #undef syslog
15296
15297 /* Override any gcc2 internal prototype to avoid an error.  */
15298 #ifdef __cplusplus
15299 extern "C"
15300 {
15301 #endif
15302 /* We use char because int might match the return type of a gcc2
15303    builtin and then its argument prototype would still apply.  */
15304 char syslog ();
15305 /* The GNU C library defines this for functions which it implements
15306     to always fail with ENOSYS.  Some functions are actually named
15307     something starting with __ and the normal name is an alias.  */
15308 #if defined (__stub_syslog) || defined (__stub___syslog)
15309 choke me
15310 #else
15311 char (*f) () = syslog;
15312 #endif
15313 #ifdef __cplusplus
15314 }
15315 #endif
15316
15317 int
15318 main ()
15319 {
15320 return f != syslog;
15321   ;
15322   return 0;
15323 }
15324 _ACEOF
15325 rm -f conftest.$ac_objext conftest$ac_exeext
15326 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15327   (eval $ac_link) 2>conftest.er1
15328   ac_status=$?
15329   grep -v '^ *+' conftest.er1 >conftest.err
15330   rm -f conftest.er1
15331   cat conftest.err >&5
15332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15333   (exit $ac_status); } &&
15334          { ac_try='test -z "$ac_c_werror_flag"
15335                          || test ! -s conftest.err'
15336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15337   (eval $ac_try) 2>&5
15338   ac_status=$?
15339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15340   (exit $ac_status); }; } &&
15341          { ac_try='test -s conftest$ac_exeext'
15342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15343   (eval $ac_try) 2>&5
15344   ac_status=$?
15345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346   (exit $ac_status); }; }; then
15347   ac_cv_func_syslog=yes
15348 else
15349   echo "$as_me: failed program was:" >&5
15350 sed 's/^/| /' conftest.$ac_ext >&5
15351
15352 ac_cv_func_syslog=no
15353 fi
15354 rm -f conftest.err conftest.$ac_objext \
15355       conftest$ac_exeext conftest.$ac_ext
15356 fi
15357 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15358 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15359 if test $ac_cv_func_syslog = yes; then
15360   if test "${ac_cv_header_syslog_h+set}" = set; then
15361   echo "$as_me:$LINENO: checking for syslog.h" >&5
15362 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15363 if test "${ac_cv_header_syslog_h+set}" = set; then
15364   echo $ECHO_N "(cached) $ECHO_C" >&6
15365 fi
15366 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15367 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15368 else
15369   # Is the header compilable?
15370 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15371 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15372 cat >conftest.$ac_ext <<_ACEOF
15373 /* confdefs.h.  */
15374 _ACEOF
15375 cat confdefs.h >>conftest.$ac_ext
15376 cat >>conftest.$ac_ext <<_ACEOF
15377 /* end confdefs.h.  */
15378 $ac_includes_default
15379 #include <syslog.h>
15380 _ACEOF
15381 rm -f conftest.$ac_objext
15382 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15383   (eval $ac_compile) 2>conftest.er1
15384   ac_status=$?
15385   grep -v '^ *+' conftest.er1 >conftest.err
15386   rm -f conftest.er1
15387   cat conftest.err >&5
15388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15389   (exit $ac_status); } &&
15390          { ac_try='test -z "$ac_c_werror_flag"
15391                          || test ! -s conftest.err'
15392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15393   (eval $ac_try) 2>&5
15394   ac_status=$?
15395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15396   (exit $ac_status); }; } &&
15397          { ac_try='test -s conftest.$ac_objext'
15398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15399   (eval $ac_try) 2>&5
15400   ac_status=$?
15401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15402   (exit $ac_status); }; }; then
15403   ac_header_compiler=yes
15404 else
15405   echo "$as_me: failed program was:" >&5
15406 sed 's/^/| /' conftest.$ac_ext >&5
15407
15408 ac_header_compiler=no
15409 fi
15410 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15411 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15412 echo "${ECHO_T}$ac_header_compiler" >&6
15413
15414 # Is the header present?
15415 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15416 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15417 cat >conftest.$ac_ext <<_ACEOF
15418 /* confdefs.h.  */
15419 _ACEOF
15420 cat confdefs.h >>conftest.$ac_ext
15421 cat >>conftest.$ac_ext <<_ACEOF
15422 /* end confdefs.h.  */
15423 #include <syslog.h>
15424 _ACEOF
15425 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15426   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15427   ac_status=$?
15428   grep -v '^ *+' conftest.er1 >conftest.err
15429   rm -f conftest.er1
15430   cat conftest.err >&5
15431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15432   (exit $ac_status); } >/dev/null; then
15433   if test -s conftest.err; then
15434     ac_cpp_err=$ac_c_preproc_warn_flag
15435     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15436   else
15437     ac_cpp_err=
15438   fi
15439 else
15440   ac_cpp_err=yes
15441 fi
15442 if test -z "$ac_cpp_err"; then
15443   ac_header_preproc=yes
15444 else
15445   echo "$as_me: failed program was:" >&5
15446 sed 's/^/| /' conftest.$ac_ext >&5
15447
15448   ac_header_preproc=no
15449 fi
15450 rm -f conftest.err conftest.$ac_ext
15451 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15452 echo "${ECHO_T}$ac_header_preproc" >&6
15453
15454 # So?  What about this header?
15455 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15456   yes:no: )
15457     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15458 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15459     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15460 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15461     ac_header_preproc=yes
15462     ;;
15463   no:yes:* )
15464     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15465 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15466     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15467 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15468     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15469 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15470     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15471 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15472     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15473 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15474     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15475 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15476     (
15477       cat <<\_ASBOX
15478 ## ---------------------------------------- ##
15479 ## Report this to pgsql-bugs@postgresql.org ##
15480 ## ---------------------------------------- ##
15481 _ASBOX
15482     ) |
15483       sed "s/^/$as_me: WARNING:     /" >&2
15484     ;;
15485 esac
15486 echo "$as_me:$LINENO: checking for syslog.h" >&5
15487 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15488 if test "${ac_cv_header_syslog_h+set}" = set; then
15489   echo $ECHO_N "(cached) $ECHO_C" >&6
15490 else
15491   ac_cv_header_syslog_h=$ac_header_preproc
15492 fi
15493 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15494 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15495
15496 fi
15497 if test $ac_cv_header_syslog_h = yes; then
15498
15499 cat >>confdefs.h <<\_ACEOF
15500 #define HAVE_SYSLOG 1
15501 _ACEOF
15502
15503 fi
15504
15505
15506 fi
15507
15508
15509 echo "$as_me:$LINENO: checking for optreset" >&5
15510 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15511 if test "${pgac_cv_var_int_optreset+set}" = set; then
15512   echo $ECHO_N "(cached) $ECHO_C" >&6
15513 else
15514   cat >conftest.$ac_ext <<_ACEOF
15515 /* confdefs.h.  */
15516 _ACEOF
15517 cat confdefs.h >>conftest.$ac_ext
15518 cat >>conftest.$ac_ext <<_ACEOF
15519 /* end confdefs.h.  */
15520 #include <unistd.h>
15521 int
15522 main ()
15523 {
15524 extern int optreset; optreset = 1;
15525   ;
15526   return 0;
15527 }
15528 _ACEOF
15529 rm -f conftest.$ac_objext conftest$ac_exeext
15530 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15531   (eval $ac_link) 2>conftest.er1
15532   ac_status=$?
15533   grep -v '^ *+' conftest.er1 >conftest.err
15534   rm -f conftest.er1
15535   cat conftest.err >&5
15536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15537   (exit $ac_status); } &&
15538          { ac_try='test -z "$ac_c_werror_flag"
15539                          || test ! -s conftest.err'
15540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15541   (eval $ac_try) 2>&5
15542   ac_status=$?
15543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15544   (exit $ac_status); }; } &&
15545          { ac_try='test -s conftest$ac_exeext'
15546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15547   (eval $ac_try) 2>&5
15548   ac_status=$?
15549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15550   (exit $ac_status); }; }; then
15551   pgac_cv_var_int_optreset=yes
15552 else
15553   echo "$as_me: failed program was:" >&5
15554 sed 's/^/| /' conftest.$ac_ext >&5
15555
15556 pgac_cv_var_int_optreset=no
15557 fi
15558 rm -f conftest.err conftest.$ac_objext \
15559       conftest$ac_exeext conftest.$ac_ext
15560 fi
15561 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15562 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15563 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15564
15565 cat >>confdefs.h <<\_ACEOF
15566 #define HAVE_INT_OPTRESET 1
15567 _ACEOF
15568
15569 fi
15570
15571
15572
15573 for ac_func in strtoll strtoq
15574 do
15575 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15576 echo "$as_me:$LINENO: checking for $ac_func" >&5
15577 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15578 if eval "test \"\${$as_ac_var+set}\" = set"; then
15579   echo $ECHO_N "(cached) $ECHO_C" >&6
15580 else
15581   cat >conftest.$ac_ext <<_ACEOF
15582 /* confdefs.h.  */
15583 _ACEOF
15584 cat confdefs.h >>conftest.$ac_ext
15585 cat >>conftest.$ac_ext <<_ACEOF
15586 /* end confdefs.h.  */
15587 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15588    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15589 #define $ac_func innocuous_$ac_func
15590
15591 /* System header to define __stub macros and hopefully few prototypes,
15592     which can conflict with char $ac_func (); below.
15593     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15594     <limits.h> exists even on freestanding compilers.  */
15595
15596 #ifdef __STDC__
15597 # include <limits.h>
15598 #else
15599 # include <assert.h>
15600 #endif
15601
15602 #undef $ac_func
15603
15604 /* Override any gcc2 internal prototype to avoid an error.  */
15605 #ifdef __cplusplus
15606 extern "C"
15607 {
15608 #endif
15609 /* We use char because int might match the return type of a gcc2
15610    builtin and then its argument prototype would still apply.  */
15611 char $ac_func ();
15612 /* The GNU C library defines this for functions which it implements
15613     to always fail with ENOSYS.  Some functions are actually named
15614     something starting with __ and the normal name is an alias.  */
15615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15616 choke me
15617 #else
15618 char (*f) () = $ac_func;
15619 #endif
15620 #ifdef __cplusplus
15621 }
15622 #endif
15623
15624 int
15625 main ()
15626 {
15627 return f != $ac_func;
15628   ;
15629   return 0;
15630 }
15631 _ACEOF
15632 rm -f conftest.$ac_objext conftest$ac_exeext
15633 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15634   (eval $ac_link) 2>conftest.er1
15635   ac_status=$?
15636   grep -v '^ *+' conftest.er1 >conftest.err
15637   rm -f conftest.er1
15638   cat conftest.err >&5
15639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640   (exit $ac_status); } &&
15641          { ac_try='test -z "$ac_c_werror_flag"
15642                          || test ! -s conftest.err'
15643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15644   (eval $ac_try) 2>&5
15645   ac_status=$?
15646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647   (exit $ac_status); }; } &&
15648          { ac_try='test -s conftest$ac_exeext'
15649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15650   (eval $ac_try) 2>&5
15651   ac_status=$?
15652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15653   (exit $ac_status); }; }; then
15654   eval "$as_ac_var=yes"
15655 else
15656   echo "$as_me: failed program was:" >&5
15657 sed 's/^/| /' conftest.$ac_ext >&5
15658
15659 eval "$as_ac_var=no"
15660 fi
15661 rm -f conftest.err conftest.$ac_objext \
15662       conftest$ac_exeext conftest.$ac_ext
15663 fi
15664 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15665 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15666 if test `eval echo '${'$as_ac_var'}'` = yes; then
15667   cat >>confdefs.h <<_ACEOF
15668 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15669 _ACEOF
15670  break
15671 fi
15672 done
15673
15674
15675
15676 for ac_func in strtoull strtouq
15677 do
15678 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15679 echo "$as_me:$LINENO: checking for $ac_func" >&5
15680 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15681 if eval "test \"\${$as_ac_var+set}\" = set"; then
15682   echo $ECHO_N "(cached) $ECHO_C" >&6
15683 else
15684   cat >conftest.$ac_ext <<_ACEOF
15685 /* confdefs.h.  */
15686 _ACEOF
15687 cat confdefs.h >>conftest.$ac_ext
15688 cat >>conftest.$ac_ext <<_ACEOF
15689 /* end confdefs.h.  */
15690 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15691    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15692 #define $ac_func innocuous_$ac_func
15693
15694 /* System header to define __stub macros and hopefully few prototypes,
15695     which can conflict with char $ac_func (); below.
15696     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15697     <limits.h> exists even on freestanding compilers.  */
15698
15699 #ifdef __STDC__
15700 # include <limits.h>
15701 #else
15702 # include <assert.h>
15703 #endif
15704
15705 #undef $ac_func
15706
15707 /* Override any gcc2 internal prototype to avoid an error.  */
15708 #ifdef __cplusplus
15709 extern "C"
15710 {
15711 #endif
15712 /* We use char because int might match the return type of a gcc2
15713    builtin and then its argument prototype would still apply.  */
15714 char $ac_func ();
15715 /* The GNU C library defines this for functions which it implements
15716     to always fail with ENOSYS.  Some functions are actually named
15717     something starting with __ and the normal name is an alias.  */
15718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15719 choke me
15720 #else
15721 char (*f) () = $ac_func;
15722 #endif
15723 #ifdef __cplusplus
15724 }
15725 #endif
15726
15727 int
15728 main ()
15729 {
15730 return f != $ac_func;
15731   ;
15732   return 0;
15733 }
15734 _ACEOF
15735 rm -f conftest.$ac_objext conftest$ac_exeext
15736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15737   (eval $ac_link) 2>conftest.er1
15738   ac_status=$?
15739   grep -v '^ *+' conftest.er1 >conftest.err
15740   rm -f conftest.er1
15741   cat conftest.err >&5
15742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15743   (exit $ac_status); } &&
15744          { ac_try='test -z "$ac_c_werror_flag"
15745                          || test ! -s conftest.err'
15746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15747   (eval $ac_try) 2>&5
15748   ac_status=$?
15749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15750   (exit $ac_status); }; } &&
15751          { ac_try='test -s conftest$ac_exeext'
15752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15753   (eval $ac_try) 2>&5
15754   ac_status=$?
15755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15756   (exit $ac_status); }; }; then
15757   eval "$as_ac_var=yes"
15758 else
15759   echo "$as_me: failed program was:" >&5
15760 sed 's/^/| /' conftest.$ac_ext >&5
15761
15762 eval "$as_ac_var=no"
15763 fi
15764 rm -f conftest.err conftest.$ac_objext \
15765       conftest$ac_exeext conftest.$ac_ext
15766 fi
15767 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15768 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15769 if test `eval echo '${'$as_ac_var'}'` = yes; then
15770   cat >>confdefs.h <<_ACEOF
15771 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15772 _ACEOF
15773  break
15774 fi
15775 done
15776
15777
15778 # Check for one of atexit() or on_exit()
15779
15780 for ac_func in atexit
15781 do
15782 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15783 echo "$as_me:$LINENO: checking for $ac_func" >&5
15784 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15785 if eval "test \"\${$as_ac_var+set}\" = set"; then
15786   echo $ECHO_N "(cached) $ECHO_C" >&6
15787 else
15788   cat >conftest.$ac_ext <<_ACEOF
15789 /* confdefs.h.  */
15790 _ACEOF
15791 cat confdefs.h >>conftest.$ac_ext
15792 cat >>conftest.$ac_ext <<_ACEOF
15793 /* end confdefs.h.  */
15794 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15795    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15796 #define $ac_func innocuous_$ac_func
15797
15798 /* System header to define __stub macros and hopefully few prototypes,
15799     which can conflict with char $ac_func (); below.
15800     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15801     <limits.h> exists even on freestanding compilers.  */
15802
15803 #ifdef __STDC__
15804 # include <limits.h>
15805 #else
15806 # include <assert.h>
15807 #endif
15808
15809 #undef $ac_func
15810
15811 /* Override any gcc2 internal prototype to avoid an error.  */
15812 #ifdef __cplusplus
15813 extern "C"
15814 {
15815 #endif
15816 /* We use char because int might match the return type of a gcc2
15817    builtin and then its argument prototype would still apply.  */
15818 char $ac_func ();
15819 /* The GNU C library defines this for functions which it implements
15820     to always fail with ENOSYS.  Some functions are actually named
15821     something starting with __ and the normal name is an alias.  */
15822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15823 choke me
15824 #else
15825 char (*f) () = $ac_func;
15826 #endif
15827 #ifdef __cplusplus
15828 }
15829 #endif
15830
15831 int
15832 main ()
15833 {
15834 return f != $ac_func;
15835   ;
15836   return 0;
15837 }
15838 _ACEOF
15839 rm -f conftest.$ac_objext conftest$ac_exeext
15840 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15841   (eval $ac_link) 2>conftest.er1
15842   ac_status=$?
15843   grep -v '^ *+' conftest.er1 >conftest.err
15844   rm -f conftest.er1
15845   cat conftest.err >&5
15846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15847   (exit $ac_status); } &&
15848          { ac_try='test -z "$ac_c_werror_flag"
15849                          || test ! -s conftest.err'
15850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15851   (eval $ac_try) 2>&5
15852   ac_status=$?
15853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15854   (exit $ac_status); }; } &&
15855          { ac_try='test -s conftest$ac_exeext'
15856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15857   (eval $ac_try) 2>&5
15858   ac_status=$?
15859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15860   (exit $ac_status); }; }; then
15861   eval "$as_ac_var=yes"
15862 else
15863   echo "$as_me: failed program was:" >&5
15864 sed 's/^/| /' conftest.$ac_ext >&5
15865
15866 eval "$as_ac_var=no"
15867 fi
15868 rm -f conftest.err conftest.$ac_objext \
15869       conftest$ac_exeext conftest.$ac_ext
15870 fi
15871 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15872 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15873 if test `eval echo '${'$as_ac_var'}'` = yes; then
15874   cat >>confdefs.h <<_ACEOF
15875 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15876 _ACEOF
15877
15878 else
15879
15880 for ac_func in on_exit
15881 do
15882 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15883 echo "$as_me:$LINENO: checking for $ac_func" >&5
15884 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15885 if eval "test \"\${$as_ac_var+set}\" = set"; then
15886   echo $ECHO_N "(cached) $ECHO_C" >&6
15887 else
15888   cat >conftest.$ac_ext <<_ACEOF
15889 /* confdefs.h.  */
15890 _ACEOF
15891 cat confdefs.h >>conftest.$ac_ext
15892 cat >>conftest.$ac_ext <<_ACEOF
15893 /* end confdefs.h.  */
15894 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15895    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15896 #define $ac_func innocuous_$ac_func
15897
15898 /* System header to define __stub macros and hopefully few prototypes,
15899     which can conflict with char $ac_func (); below.
15900     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15901     <limits.h> exists even on freestanding compilers.  */
15902
15903 #ifdef __STDC__
15904 # include <limits.h>
15905 #else
15906 # include <assert.h>
15907 #endif
15908
15909 #undef $ac_func
15910
15911 /* Override any gcc2 internal prototype to avoid an error.  */
15912 #ifdef __cplusplus
15913 extern "C"
15914 {
15915 #endif
15916 /* We use char because int might match the return type of a gcc2
15917    builtin and then its argument prototype would still apply.  */
15918 char $ac_func ();
15919 /* The GNU C library defines this for functions which it implements
15920     to always fail with ENOSYS.  Some functions are actually named
15921     something starting with __ and the normal name is an alias.  */
15922 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15923 choke me
15924 #else
15925 char (*f) () = $ac_func;
15926 #endif
15927 #ifdef __cplusplus
15928 }
15929 #endif
15930
15931 int
15932 main ()
15933 {
15934 return f != $ac_func;
15935   ;
15936   return 0;
15937 }
15938 _ACEOF
15939 rm -f conftest.$ac_objext conftest$ac_exeext
15940 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15941   (eval $ac_link) 2>conftest.er1
15942   ac_status=$?
15943   grep -v '^ *+' conftest.er1 >conftest.err
15944   rm -f conftest.er1
15945   cat conftest.err >&5
15946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15947   (exit $ac_status); } &&
15948          { ac_try='test -z "$ac_c_werror_flag"
15949                          || test ! -s conftest.err'
15950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15951   (eval $ac_try) 2>&5
15952   ac_status=$?
15953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15954   (exit $ac_status); }; } &&
15955          { ac_try='test -s conftest$ac_exeext'
15956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15957   (eval $ac_try) 2>&5
15958   ac_status=$?
15959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15960   (exit $ac_status); }; }; then
15961   eval "$as_ac_var=yes"
15962 else
15963   echo "$as_me: failed program was:" >&5
15964 sed 's/^/| /' conftest.$ac_ext >&5
15965
15966 eval "$as_ac_var=no"
15967 fi
15968 rm -f conftest.err conftest.$ac_objext \
15969       conftest$ac_exeext conftest.$ac_ext
15970 fi
15971 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15972 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15973 if test `eval echo '${'$as_ac_var'}'` = yes; then
15974   cat >>confdefs.h <<_ACEOF
15975 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15976 _ACEOF
15977
15978 else
15979   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
15980 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
15981    { (exit 1); exit 1; }; }
15982 fi
15983 done
15984
15985 fi
15986 done
15987
15988
15989 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15990 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
15991 if test "${ac_cv_sys_largefile_source+set}" = set; then
15992   echo $ECHO_N "(cached) $ECHO_C" >&6
15993 else
15994   while :; do
15995   ac_cv_sys_largefile_source=no
15996   cat >conftest.$ac_ext <<_ACEOF
15997 /* confdefs.h.  */
15998 _ACEOF
15999 cat confdefs.h >>conftest.$ac_ext
16000 cat >>conftest.$ac_ext <<_ACEOF
16001 /* end confdefs.h.  */
16002 #include <stdio.h>
16003 int
16004 main ()
16005 {
16006 return !fseeko;
16007   ;
16008   return 0;
16009 }
16010 _ACEOF
16011 rm -f conftest.$ac_objext
16012 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16013   (eval $ac_compile) 2>conftest.er1
16014   ac_status=$?
16015   grep -v '^ *+' conftest.er1 >conftest.err
16016   rm -f conftest.er1
16017   cat conftest.err >&5
16018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16019   (exit $ac_status); } &&
16020          { ac_try='test -z "$ac_c_werror_flag"
16021                          || test ! -s conftest.err'
16022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16023   (eval $ac_try) 2>&5
16024   ac_status=$?
16025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16026   (exit $ac_status); }; } &&
16027          { ac_try='test -s conftest.$ac_objext'
16028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16029   (eval $ac_try) 2>&5
16030   ac_status=$?
16031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16032   (exit $ac_status); }; }; then
16033   break
16034 else
16035   echo "$as_me: failed program was:" >&5
16036 sed 's/^/| /' conftest.$ac_ext >&5
16037
16038 fi
16039 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16040   cat >conftest.$ac_ext <<_ACEOF
16041 /* confdefs.h.  */
16042 _ACEOF
16043 cat confdefs.h >>conftest.$ac_ext
16044 cat >>conftest.$ac_ext <<_ACEOF
16045 /* end confdefs.h.  */
16046 #define _LARGEFILE_SOURCE 1
16047 #include <stdio.h>
16048 int
16049 main ()
16050 {
16051 return !fseeko;
16052   ;
16053   return 0;
16054 }
16055 _ACEOF
16056 rm -f conftest.$ac_objext
16057 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16058   (eval $ac_compile) 2>conftest.er1
16059   ac_status=$?
16060   grep -v '^ *+' conftest.er1 >conftest.err
16061   rm -f conftest.er1
16062   cat conftest.err >&5
16063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16064   (exit $ac_status); } &&
16065          { ac_try='test -z "$ac_c_werror_flag"
16066                          || test ! -s conftest.err'
16067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16068   (eval $ac_try) 2>&5
16069   ac_status=$?
16070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16071   (exit $ac_status); }; } &&
16072          { ac_try='test -s conftest.$ac_objext'
16073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16074   (eval $ac_try) 2>&5
16075   ac_status=$?
16076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16077   (exit $ac_status); }; }; then
16078   ac_cv_sys_largefile_source=1; break
16079 else
16080   echo "$as_me: failed program was:" >&5
16081 sed 's/^/| /' conftest.$ac_ext >&5
16082
16083 fi
16084 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16085   break
16086 done
16087 fi
16088 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16089 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16090 if test "$ac_cv_sys_largefile_source" != no; then
16091
16092 cat >>confdefs.h <<_ACEOF
16093 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16094 _ACEOF
16095
16096 fi
16097 rm -f conftest*
16098
16099 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16100 # in glibc 2.1.3, but that breaks too many other things.
16101 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16102 echo "$as_me:$LINENO: checking for fseeko" >&5
16103 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16104 if test "${ac_cv_func_fseeko+set}" = set; then
16105   echo $ECHO_N "(cached) $ECHO_C" >&6
16106 else
16107   cat >conftest.$ac_ext <<_ACEOF
16108 /* confdefs.h.  */
16109 _ACEOF
16110 cat confdefs.h >>conftest.$ac_ext
16111 cat >>conftest.$ac_ext <<_ACEOF
16112 /* end confdefs.h.  */
16113 #include <stdio.h>
16114 int
16115 main ()
16116 {
16117 return fseeko && fseeko (stdin, 0, 0);
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   ac_cv_func_fseeko=yes
16145 else
16146   echo "$as_me: failed program was:" >&5
16147 sed 's/^/| /' conftest.$ac_ext >&5
16148
16149 ac_cv_func_fseeko=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: $ac_cv_func_fseeko" >&5
16155 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16156 if test $ac_cv_func_fseeko = yes; then
16157
16158 cat >>confdefs.h <<\_ACEOF
16159 #define HAVE_FSEEKO 1
16160 _ACEOF
16161
16162 fi
16163
16164
16165 #
16166 # Pthreads
16167 #
16168 # For each platform, we need to know about any special compile and link
16169 # libraries, and whether the normal C function names are thread-safe.
16170 # See the comment at the top of src/port/thread.c for more information.
16171 #
16172 if test "$enable_thread_safety" = yes; then
16173
16174
16175
16176
16177 ac_ext=c
16178 ac_cpp='$CPP $CPPFLAGS'
16179 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16180 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16181 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16182
16183 acx_pthread_ok=no
16184
16185 # We used to check for pthread.h first, but this fails if pthread.h
16186 # requires special compiler flags (e.g. on True64 or Sequent).
16187 # It gets checked for in the link test anyway.
16188
16189 # First of all, check if the user has set any of the PTHREAD_LIBS,
16190 # etcetera environment variables, and if threads linking works using
16191 # them:
16192 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16193         save_CFLAGS="$CFLAGS"
16194         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16195         save_LIBS="$LIBS"
16196         LIBS="$PTHREAD_LIBS $LIBS"
16197         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16198 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16199         cat >conftest.$ac_ext <<_ACEOF
16200 /* confdefs.h.  */
16201 _ACEOF
16202 cat confdefs.h >>conftest.$ac_ext
16203 cat >>conftest.$ac_ext <<_ACEOF
16204 /* end confdefs.h.  */
16205
16206 /* Override any gcc2 internal prototype to avoid an error.  */
16207 #ifdef __cplusplus
16208 extern "C"
16209 #endif
16210 /* We use char because int might match the return type of a gcc2
16211    builtin and then its argument prototype would still apply.  */
16212 char pthread_join ();
16213 int
16214 main ()
16215 {
16216 pthread_join ();
16217   ;
16218   return 0;
16219 }
16220 _ACEOF
16221 rm -f conftest.$ac_objext conftest$ac_exeext
16222 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16223   (eval $ac_link) 2>conftest.er1
16224   ac_status=$?
16225   grep -v '^ *+' conftest.er1 >conftest.err
16226   rm -f conftest.er1
16227   cat conftest.err >&5
16228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16229   (exit $ac_status); } &&
16230          { ac_try='test -z "$ac_c_werror_flag"
16231                          || test ! -s conftest.err'
16232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16233   (eval $ac_try) 2>&5
16234   ac_status=$?
16235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16236   (exit $ac_status); }; } &&
16237          { ac_try='test -s conftest$ac_exeext'
16238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16239   (eval $ac_try) 2>&5
16240   ac_status=$?
16241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16242   (exit $ac_status); }; }; then
16243   acx_pthread_ok=yes
16244 else
16245   echo "$as_me: failed program was:" >&5
16246 sed 's/^/| /' conftest.$ac_ext >&5
16247
16248 fi
16249 rm -f conftest.err conftest.$ac_objext \
16250       conftest$ac_exeext conftest.$ac_ext
16251         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16252 echo "${ECHO_T}$acx_pthread_ok" >&6
16253         if test x"$acx_pthread_ok" = xno; then
16254                 PTHREAD_LIBS=""
16255                 PTHREAD_CFLAGS=""
16256         fi
16257         LIBS="$save_LIBS"
16258         CFLAGS="$save_CFLAGS"
16259 fi
16260
16261 # We must check for the threads library under a number of different
16262 # names; the ordering is very important because some systems
16263 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16264 # libraries is broken (non-POSIX).
16265
16266 # Create a list of thread flags to try.  Items starting with a "-" are
16267 # C compiler flags, and other items are library names, except for "none"
16268 # which indicates that we try without any flags at all, and "pthread-config"
16269 # which is a program returning the flags for the Pth emulation library.
16270
16271 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16272
16273 # The ordering *is* (sometimes) important.  Some notes on the
16274 # individual items follow:
16275
16276 # pthreads: AIX (must check this before -lpthread)
16277 # none: in case threads are in libc; should be tried before -Kthread and
16278 #       other compiler flags to prevent continual compiler warnings
16279 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16280 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16281 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16282 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16283 # -pthreads: Solaris/gcc
16284 # -mthreads: Mingw32/gcc, Lynx/gcc
16285 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16286 #      doesn't hurt to check since this sometimes defines pthreads too;
16287 #      also defines -D_REENTRANT)
16288 # pthread: Linux, etcetera
16289 # --thread-safe: KAI C++
16290 # pthread-config: use pthread-config program (for GNU Pth library)
16291
16292 case "${host_cpu}-${host_os}" in
16293         *solaris*)
16294
16295         # On Solaris (at least, for some versions), libc contains stubbed
16296         # (non-functional) versions of the pthreads routines, so link-based
16297         # tests will erroneously succeed.  (We need to link with -pthread or
16298         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16299         # a function called by this macro, so we could check for that, but
16300         # who knows whether they'll stub that too in a future libc.)  So,
16301         # we'll just look for -pthreads and -lpthread first:
16302
16303         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16304         ;;
16305 esac
16306
16307 if test x"$acx_pthread_ok" = xno; then
16308 for flag in $acx_pthread_flags; do
16309
16310         tryPTHREAD_CFLAGS=""
16311         tryPTHREAD_LIBS=""
16312         case $flag in
16313                 none)
16314                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16315 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16316                 ;;
16317
16318                 -*)
16319                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16320 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16321                 tryPTHREAD_CFLAGS="$flag"
16322                 ;;
16323
16324                 pthread-config)
16325                 # skip this if we already have flags defined, for PostgreSQL
16326                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16327                 # Extract the first word of "pthread-config", so it can be a program name with args.
16328 set dummy pthread-config; ac_word=$2
16329 echo "$as_me:$LINENO: checking for $ac_word" >&5
16330 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16331 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16332   echo $ECHO_N "(cached) $ECHO_C" >&6
16333 else
16334   if test -n "$acx_pthread_config"; then
16335   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16336 else
16337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16338 for as_dir in $PATH
16339 do
16340   IFS=$as_save_IFS
16341   test -z "$as_dir" && as_dir=.
16342   for ac_exec_ext in '' $ac_executable_extensions; do
16343   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16344     ac_cv_prog_acx_pthread_config="yes"
16345     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16346     break 2
16347   fi
16348 done
16349 done
16350
16351   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16352 fi
16353 fi
16354 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16355 if test -n "$acx_pthread_config"; then
16356   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16357 echo "${ECHO_T}$acx_pthread_config" >&6
16358 else
16359   echo "$as_me:$LINENO: result: no" >&5
16360 echo "${ECHO_T}no" >&6
16361 fi
16362
16363                 if test x"$acx_pthread_config" = xno; then continue; fi
16364                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16365                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16366                 ;;
16367
16368                 *)
16369                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16370 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16371                 tryPTHREAD_LIBS="-l$flag"
16372                 ;;
16373         esac
16374
16375         save_LIBS="$LIBS"
16376         save_CFLAGS="$CFLAGS"
16377         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16378         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16379
16380         # Check for various functions.  We must include pthread.h,
16381         # since some functions may be macros.  (On the Sequent, we
16382         # need a special flag -Kthread to make this header compile.)
16383         # We check for pthread_join because it is in -lpthread on IRIX
16384         # while pthread_create is in libc.  We check for pthread_attr_init
16385         # due to DEC craziness with -lpthreads.  We check for
16386         # pthread_cleanup_push because it is one of the few pthread
16387         # functions on Solaris that doesn't have a non-functional libc stub.
16388         # We try pthread_create on general principles.
16389         cat >conftest.$ac_ext <<_ACEOF
16390 /* confdefs.h.  */
16391 _ACEOF
16392 cat confdefs.h >>conftest.$ac_ext
16393 cat >>conftest.$ac_ext <<_ACEOF
16394 /* end confdefs.h.  */
16395 #include <pthread.h>
16396 int
16397 main ()
16398 {
16399 pthread_t th; pthread_join(th, 0);
16400                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16401                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16402   ;
16403   return 0;
16404 }
16405 _ACEOF
16406 rm -f conftest.$ac_objext conftest$ac_exeext
16407 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16408   (eval $ac_link) 2>conftest.er1
16409   ac_status=$?
16410   grep -v '^ *+' conftest.er1 >conftest.err
16411   rm -f conftest.er1
16412   cat conftest.err >&5
16413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16414   (exit $ac_status); } &&
16415          { ac_try='test -z "$ac_c_werror_flag"
16416                          || test ! -s conftest.err'
16417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16418   (eval $ac_try) 2>&5
16419   ac_status=$?
16420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16421   (exit $ac_status); }; } &&
16422          { ac_try='test -s conftest$ac_exeext'
16423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16424   (eval $ac_try) 2>&5
16425   ac_status=$?
16426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16427   (exit $ac_status); }; }; then
16428   acx_pthread_ok=yes
16429 else
16430   echo "$as_me: failed program was:" >&5
16431 sed 's/^/| /' conftest.$ac_ext >&5
16432
16433 acx_pthread_ok=no
16434 fi
16435 rm -f conftest.err conftest.$ac_objext \
16436       conftest$ac_exeext conftest.$ac_ext
16437
16438         if test "x$acx_pthread_ok" = xyes; then
16439             # Don't use options that are ignored by the compiler.
16440             # We find them by checking stderror.
16441             cat >conftest.$ac_ext <<_ACEOF
16442 int
16443 main (int argc, char **argv)
16444 {
16445   (void) argc;
16446   (void) argv;
16447   return 0;
16448 }
16449 _ACEOF
16450             rm -f conftest.$ac_objext conftest$ac_exeext
16451             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16452                 # we continue with more flags because Linux needs -lpthread
16453                 # for libpq builds on PostgreSQL.  The test above only
16454                 # tests for building binaries, not shared libraries.
16455                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16456                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16457             else   acx_pthread_ok=no
16458             fi
16459         fi
16460
16461         LIBS="$save_LIBS"
16462         CFLAGS="$save_CFLAGS"
16463
16464         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16465 echo "${ECHO_T}$acx_pthread_ok" >&6
16466 done
16467 fi
16468
16469 # Various other checks:
16470 if test "x$acx_pthread_ok" = xyes; then
16471         save_LIBS="$LIBS"
16472         LIBS="$PTHREAD_LIBS $LIBS"
16473         save_CFLAGS="$CFLAGS"
16474         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16475
16476         # Detect AIX lossage: threads are created detached by default
16477         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16478         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16479 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16480         cat >conftest.$ac_ext <<_ACEOF
16481 /* confdefs.h.  */
16482 _ACEOF
16483 cat confdefs.h >>conftest.$ac_ext
16484 cat >>conftest.$ac_ext <<_ACEOF
16485 /* end confdefs.h.  */
16486 #include <pthread.h>
16487 int
16488 main ()
16489 {
16490 int attr=PTHREAD_CREATE_JOINABLE;
16491   ;
16492   return 0;
16493 }
16494 _ACEOF
16495 rm -f conftest.$ac_objext conftest$ac_exeext
16496 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16497   (eval $ac_link) 2>conftest.er1
16498   ac_status=$?
16499   grep -v '^ *+' conftest.er1 >conftest.err
16500   rm -f conftest.er1
16501   cat conftest.err >&5
16502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16503   (exit $ac_status); } &&
16504          { ac_try='test -z "$ac_c_werror_flag"
16505                          || test ! -s conftest.err'
16506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16507   (eval $ac_try) 2>&5
16508   ac_status=$?
16509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16510   (exit $ac_status); }; } &&
16511          { ac_try='test -s conftest$ac_exeext'
16512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16513   (eval $ac_try) 2>&5
16514   ac_status=$?
16515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16516   (exit $ac_status); }; }; then
16517   ok=PTHREAD_CREATE_JOINABLE
16518 else
16519   echo "$as_me: failed program was:" >&5
16520 sed 's/^/| /' conftest.$ac_ext >&5
16521
16522 ok=unknown
16523 fi
16524 rm -f conftest.err conftest.$ac_objext \
16525       conftest$ac_exeext conftest.$ac_ext
16526         if test x"$ok" = xunknown; then
16527                 cat >conftest.$ac_ext <<_ACEOF
16528 /* confdefs.h.  */
16529 _ACEOF
16530 cat confdefs.h >>conftest.$ac_ext
16531 cat >>conftest.$ac_ext <<_ACEOF
16532 /* end confdefs.h.  */
16533 #include <pthread.h>
16534 int
16535 main ()
16536 {
16537 int attr=PTHREAD_CREATE_UNDETACHED;
16538   ;
16539   return 0;
16540 }
16541 _ACEOF
16542 rm -f conftest.$ac_objext conftest$ac_exeext
16543 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16544   (eval $ac_link) 2>conftest.er1
16545   ac_status=$?
16546   grep -v '^ *+' conftest.er1 >conftest.err
16547   rm -f conftest.er1
16548   cat conftest.err >&5
16549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16550   (exit $ac_status); } &&
16551          { ac_try='test -z "$ac_c_werror_flag"
16552                          || test ! -s conftest.err'
16553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16554   (eval $ac_try) 2>&5
16555   ac_status=$?
16556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557   (exit $ac_status); }; } &&
16558          { ac_try='test -s conftest$ac_exeext'
16559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16560   (eval $ac_try) 2>&5
16561   ac_status=$?
16562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16563   (exit $ac_status); }; }; then
16564   ok=PTHREAD_CREATE_UNDETACHED
16565 else
16566   echo "$as_me: failed program was:" >&5
16567 sed 's/^/| /' conftest.$ac_ext >&5
16568
16569 ok=unknown
16570 fi
16571 rm -f conftest.err conftest.$ac_objext \
16572       conftest$ac_exeext conftest.$ac_ext
16573         fi
16574         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16575
16576 cat >>confdefs.h <<\_ACEOF
16577 #define PTHREAD_CREATE_JOINABLE $ok
16578 _ACEOF
16579
16580         fi
16581         echo "$as_me:$LINENO: result: ${ok}" >&5
16582 echo "${ECHO_T}${ok}" >&6
16583         if test x"$ok" = xunknown; then
16584                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16585 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16586         fi
16587
16588         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16589 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16590         flag=no
16591 # We always add these in PostgreSQL
16592 #       case "${host_cpu}-${host_os}" in
16593 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16594 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16595 #       esac
16596         echo "$as_me:$LINENO: result: ${flag}" >&5
16597 echo "${ECHO_T}${flag}" >&6
16598         if test "x$flag" != xno; then
16599                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16600         fi
16601
16602         LIBS="$save_LIBS"
16603         CFLAGS="$save_CFLAGS"
16604
16605 # Supporting cc_r would require a special CC in all places that
16606 # use libpq, and that is ugly, so we don't do it.  Users can still
16607 # define their compiler as cc_r to do thread builds of everything.
16608         # More AIX lossage: must compile with cc_r
16609         # Extract the first word of "cc_r", so it can be a program name with args.
16610 set dummy cc_r; ac_word=$2
16611 echo "$as_me:$LINENO: checking for $ac_word" >&5
16612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16613 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16614   echo $ECHO_N "(cached) $ECHO_C" >&6
16615 else
16616   if test -n "$PTHREAD_CC"; then
16617   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16618 else
16619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16620 for as_dir in $PATH
16621 do
16622   IFS=$as_save_IFS
16623   test -z "$as_dir" && as_dir=.
16624   for ac_exec_ext in '' $ac_executable_extensions; do
16625   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16626     ac_cv_prog_PTHREAD_CC="cc_r"
16627     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16628     break 2
16629   fi
16630 done
16631 done
16632
16633   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16634 fi
16635 fi
16636 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16637 if test -n "$PTHREAD_CC"; then
16638   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16639 echo "${ECHO_T}$PTHREAD_CC" >&6
16640 else
16641   echo "$as_me:$LINENO: result: no" >&5
16642 echo "${ECHO_T}no" >&6
16643 fi
16644
16645 else
16646         PTHREAD_CC="$CC"
16647 fi
16648
16649
16650
16651
16652
16653 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16654 if test x"$acx_pthread_ok" = xyes; then
16655
16656 cat >>confdefs.h <<\_ACEOF
16657 #define HAVE_PTHREAD 1
16658 _ACEOF
16659
16660         :
16661 else
16662         acx_pthread_ok=no
16663
16664 fi
16665 ac_ext=c
16666 ac_cpp='$CPP $CPPFLAGS'
16667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16670
16671         # set thread flags
16672
16673 # Some platforms use these, so just defineed them.  They can't hurt if they
16674 # are not supported.
16675 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16676
16677
16678 # At this point, we don't want to muck with the compiler name for threading.
16679 # Let's see who fails, perhaps AIX.  2004-04-23
16680 if test "$PTHREAD_CC" != "$CC"; then
16681 { { echo "$as_me:$LINENO: error:
16682 PostgreSQL does not support platforms that require a special
16683 compiler binary for thread-safety.
16684 " >&5
16685 echo "$as_me: error:
16686 PostgreSQL does not support platforms that require a special
16687 compiler binary for thread-safety.
16688 " >&2;}
16689    { (exit 1); exit 1; }; }
16690 fi
16691
16692 if test "$THREAD_SUPPORT" = no; then
16693 { { echo "$as_me:$LINENO: error:
16694 Cannot enable threads on your platform.
16695 Your platform is known to not support thread-safe programs.
16696 For details, compile and run src/bin/pg_thread_test.
16697 " >&5
16698 echo "$as_me: error:
16699 Cannot enable threads on your platform.
16700 Your platform is known to not support thread-safe programs.
16701 For details, compile and run src/bin/pg_thread_test.
16702 " >&2;}
16703    { (exit 1); exit 1; }; }
16704 fi
16705
16706 # Check for *_r functions
16707 _CFLAGS="$CFLAGS"
16708 _LIBS="$LIBS"
16709 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16710 LIBS="$LIBS $PTHREAD_LIBS"
16711
16712 if test "${ac_cv_header_pthread_h+set}" = set; then
16713   echo "$as_me:$LINENO: checking for pthread.h" >&5
16714 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16715 if test "${ac_cv_header_pthread_h+set}" = set; then
16716   echo $ECHO_N "(cached) $ECHO_C" >&6
16717 fi
16718 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16719 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16720 else
16721   # Is the header compilable?
16722 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16723 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16724 cat >conftest.$ac_ext <<_ACEOF
16725 /* confdefs.h.  */
16726 _ACEOF
16727 cat confdefs.h >>conftest.$ac_ext
16728 cat >>conftest.$ac_ext <<_ACEOF
16729 /* end confdefs.h.  */
16730 $ac_includes_default
16731 #include <pthread.h>
16732 _ACEOF
16733 rm -f conftest.$ac_objext
16734 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16735   (eval $ac_compile) 2>conftest.er1
16736   ac_status=$?
16737   grep -v '^ *+' conftest.er1 >conftest.err
16738   rm -f conftest.er1
16739   cat conftest.err >&5
16740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16741   (exit $ac_status); } &&
16742          { ac_try='test -z "$ac_c_werror_flag"
16743                          || test ! -s conftest.err'
16744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16745   (eval $ac_try) 2>&5
16746   ac_status=$?
16747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16748   (exit $ac_status); }; } &&
16749          { ac_try='test -s conftest.$ac_objext'
16750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16751   (eval $ac_try) 2>&5
16752   ac_status=$?
16753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16754   (exit $ac_status); }; }; then
16755   ac_header_compiler=yes
16756 else
16757   echo "$as_me: failed program was:" >&5
16758 sed 's/^/| /' conftest.$ac_ext >&5
16759
16760 ac_header_compiler=no
16761 fi
16762 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16763 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16764 echo "${ECHO_T}$ac_header_compiler" >&6
16765
16766 # Is the header present?
16767 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16768 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16769 cat >conftest.$ac_ext <<_ACEOF
16770 /* confdefs.h.  */
16771 _ACEOF
16772 cat confdefs.h >>conftest.$ac_ext
16773 cat >>conftest.$ac_ext <<_ACEOF
16774 /* end confdefs.h.  */
16775 #include <pthread.h>
16776 _ACEOF
16777 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16778   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16779   ac_status=$?
16780   grep -v '^ *+' conftest.er1 >conftest.err
16781   rm -f conftest.er1
16782   cat conftest.err >&5
16783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16784   (exit $ac_status); } >/dev/null; then
16785   if test -s conftest.err; then
16786     ac_cpp_err=$ac_c_preproc_warn_flag
16787     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16788   else
16789     ac_cpp_err=
16790   fi
16791 else
16792   ac_cpp_err=yes
16793 fi
16794 if test -z "$ac_cpp_err"; then
16795   ac_header_preproc=yes
16796 else
16797   echo "$as_me: failed program was:" >&5
16798 sed 's/^/| /' conftest.$ac_ext >&5
16799
16800   ac_header_preproc=no
16801 fi
16802 rm -f conftest.err conftest.$ac_ext
16803 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16804 echo "${ECHO_T}$ac_header_preproc" >&6
16805
16806 # So?  What about this header?
16807 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16808   yes:no: )
16809     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16810 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16811     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16812 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16813     ac_header_preproc=yes
16814     ;;
16815   no:yes:* )
16816     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16817 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16818     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16819 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16820     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16821 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16822     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16823 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16824     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16825 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16826     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16827 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16828     (
16829       cat <<\_ASBOX
16830 ## ---------------------------------------- ##
16831 ## Report this to pgsql-bugs@postgresql.org ##
16832 ## ---------------------------------------- ##
16833 _ASBOX
16834     ) |
16835       sed "s/^/$as_me: WARNING:     /" >&2
16836     ;;
16837 esac
16838 echo "$as_me:$LINENO: checking for pthread.h" >&5
16839 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16840 if test "${ac_cv_header_pthread_h+set}" = set; then
16841   echo $ECHO_N "(cached) $ECHO_C" >&6
16842 else
16843   ac_cv_header_pthread_h=$ac_header_preproc
16844 fi
16845 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16846 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16847
16848 fi
16849 if test $ac_cv_header_pthread_h = yes; then
16850   :
16851 else
16852   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16853 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16854    { (exit 1); exit 1; }; }
16855 fi
16856
16857
16858
16859
16860
16861
16862 for ac_func in strerror_r getpwuid_r gethostbyname_r
16863 do
16864 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16865 echo "$as_me:$LINENO: checking for $ac_func" >&5
16866 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16867 if eval "test \"\${$as_ac_var+set}\" = set"; then
16868   echo $ECHO_N "(cached) $ECHO_C" >&6
16869 else
16870   cat >conftest.$ac_ext <<_ACEOF
16871 /* confdefs.h.  */
16872 _ACEOF
16873 cat confdefs.h >>conftest.$ac_ext
16874 cat >>conftest.$ac_ext <<_ACEOF
16875 /* end confdefs.h.  */
16876 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16877    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16878 #define $ac_func innocuous_$ac_func
16879
16880 /* System header to define __stub macros and hopefully few prototypes,
16881     which can conflict with char $ac_func (); below.
16882     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16883     <limits.h> exists even on freestanding compilers.  */
16884
16885 #ifdef __STDC__
16886 # include <limits.h>
16887 #else
16888 # include <assert.h>
16889 #endif
16890
16891 #undef $ac_func
16892
16893 /* Override any gcc2 internal prototype to avoid an error.  */
16894 #ifdef __cplusplus
16895 extern "C"
16896 {
16897 #endif
16898 /* We use char because int might match the return type of a gcc2
16899    builtin and then its argument prototype would still apply.  */
16900 char $ac_func ();
16901 /* The GNU C library defines this for functions which it implements
16902     to always fail with ENOSYS.  Some functions are actually named
16903     something starting with __ and the normal name is an alias.  */
16904 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16905 choke me
16906 #else
16907 char (*f) () = $ac_func;
16908 #endif
16909 #ifdef __cplusplus
16910 }
16911 #endif
16912
16913 int
16914 main ()
16915 {
16916 return f != $ac_func;
16917   ;
16918   return 0;
16919 }
16920 _ACEOF
16921 rm -f conftest.$ac_objext conftest$ac_exeext
16922 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16923   (eval $ac_link) 2>conftest.er1
16924   ac_status=$?
16925   grep -v '^ *+' conftest.er1 >conftest.err
16926   rm -f conftest.er1
16927   cat conftest.err >&5
16928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16929   (exit $ac_status); } &&
16930          { ac_try='test -z "$ac_c_werror_flag"
16931                          || test ! -s conftest.err'
16932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16933   (eval $ac_try) 2>&5
16934   ac_status=$?
16935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16936   (exit $ac_status); }; } &&
16937          { ac_try='test -s conftest$ac_exeext'
16938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16939   (eval $ac_try) 2>&5
16940   ac_status=$?
16941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16942   (exit $ac_status); }; }; then
16943   eval "$as_ac_var=yes"
16944 else
16945   echo "$as_me: failed program was:" >&5
16946 sed 's/^/| /' conftest.$ac_ext >&5
16947
16948 eval "$as_ac_var=no"
16949 fi
16950 rm -f conftest.err conftest.$ac_objext \
16951       conftest$ac_exeext conftest.$ac_ext
16952 fi
16953 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16954 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16955 if test `eval echo '${'$as_ac_var'}'` = yes; then
16956   cat >>confdefs.h <<_ACEOF
16957 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16958 _ACEOF
16959
16960 fi
16961 done
16962
16963
16964 # Do test here with the proper thread flags
16965 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
16966 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
16967 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
16968   echo $ECHO_N "(cached) $ECHO_C" >&6
16969 else
16970   cat >conftest.$ac_ext <<_ACEOF
16971 /* confdefs.h.  */
16972 _ACEOF
16973 cat confdefs.h >>conftest.$ac_ext
16974 cat >>conftest.$ac_ext <<_ACEOF
16975 /* end confdefs.h.  */
16976 #include <sys/types.h>
16977 #include <pwd.h>
16978 int
16979 main ()
16980 {
16981 uid_t uid;
16982 struct passwd *space;
16983 char *buf;
16984 size_t bufsize;
16985 struct passwd **result;
16986 getpwuid_r(uid, space, buf, bufsize, result);
16987   ;
16988   return 0;
16989 }
16990 _ACEOF
16991 rm -f conftest.$ac_objext
16992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16993   (eval $ac_compile) 2>conftest.er1
16994   ac_status=$?
16995   grep -v '^ *+' conftest.er1 >conftest.err
16996   rm -f conftest.er1
16997   cat conftest.err >&5
16998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16999   (exit $ac_status); } &&
17000          { ac_try='test -z "$ac_c_werror_flag"
17001                          || test ! -s conftest.err'
17002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17003   (eval $ac_try) 2>&5
17004   ac_status=$?
17005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17006   (exit $ac_status); }; } &&
17007          { ac_try='test -s conftest.$ac_objext'
17008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17009   (eval $ac_try) 2>&5
17010   ac_status=$?
17011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17012   (exit $ac_status); }; }; then
17013   pgac_func_getpwuid_r_5arg=yes
17014 else
17015   echo "$as_me: failed program was:" >&5
17016 sed 's/^/| /' conftest.$ac_ext >&5
17017
17018 pgac_func_getpwuid_r_5arg=no
17019 fi
17020 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17021 fi
17022 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17023 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17024 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17025
17026 cat >>confdefs.h <<\_ACEOF
17027 #define GETPWUID_R_5ARG
17028 _ACEOF
17029
17030 fi
17031
17032 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17033 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17034 if test "${pgac_func_strerror_r_int+set}" = set; then
17035   echo $ECHO_N "(cached) $ECHO_C" >&6
17036 else
17037   cat >conftest.$ac_ext <<_ACEOF
17038 /* confdefs.h.  */
17039 _ACEOF
17040 cat confdefs.h >>conftest.$ac_ext
17041 cat >>conftest.$ac_ext <<_ACEOF
17042 /* end confdefs.h.  */
17043 #include <string.h>
17044 int
17045 main ()
17046 {
17047 #ifndef _AIX
17048 int strerror_r(int, char *, size_t);
17049 #else
17050 /* Older AIX has 'int' for the third argument so we don't test the args. */
17051 int strerror_r();
17052 #endif
17053   ;
17054   return 0;
17055 }
17056 _ACEOF
17057 rm -f conftest.$ac_objext
17058 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17059   (eval $ac_compile) 2>conftest.er1
17060   ac_status=$?
17061   grep -v '^ *+' conftest.er1 >conftest.err
17062   rm -f conftest.er1
17063   cat conftest.err >&5
17064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17065   (exit $ac_status); } &&
17066          { ac_try='test -z "$ac_c_werror_flag"
17067                          || test ! -s conftest.err'
17068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17069   (eval $ac_try) 2>&5
17070   ac_status=$?
17071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17072   (exit $ac_status); }; } &&
17073          { ac_try='test -s conftest.$ac_objext'
17074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17075   (eval $ac_try) 2>&5
17076   ac_status=$?
17077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17078   (exit $ac_status); }; }; then
17079   pgac_func_strerror_r_int=yes
17080 else
17081   echo "$as_me: failed program was:" >&5
17082 sed 's/^/| /' conftest.$ac_ext >&5
17083
17084 pgac_func_strerror_r_int=no
17085 fi
17086 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17087 fi
17088 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17089 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17090 if test x"$pgac_func_strerror_r_int" = xyes ; then
17091
17092 cat >>confdefs.h <<\_ACEOF
17093 #define STRERROR_R_INT
17094 _ACEOF
17095
17096 fi
17097
17098
17099 CFLAGS="$_CFLAGS"
17100 LIBS="$_LIBS"
17101
17102 else
17103 # do not use values from template file
17104 PTHREAD_CFLAGS=
17105 PTHREAD_LIBS=
17106 fi
17107
17108
17109
17110
17111
17112 # This test makes sure that run tests work at all.  Sometimes a shared
17113 # library is found by the linker, but the runtime linker can't find it.
17114 # This check should come after all modifications of compiler or linker
17115 # variables, and before any other run tests.
17116 echo "$as_me:$LINENO: checking test program" >&5
17117 echo $ECHO_N "checking test program... $ECHO_C" >&6
17118 if test "$cross_compiling" = yes; then
17119   echo "$as_me:$LINENO: result: cross-compiling" >&5
17120 echo "${ECHO_T}cross-compiling" >&6
17121 else
17122   cat >conftest.$ac_ext <<_ACEOF
17123 /* confdefs.h.  */
17124 _ACEOF
17125 cat confdefs.h >>conftest.$ac_ext
17126 cat >>conftest.$ac_ext <<_ACEOF
17127 /* end confdefs.h.  */
17128 int main() { return 0; }
17129 _ACEOF
17130 rm -f conftest$ac_exeext
17131 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17132   (eval $ac_link) 2>&5
17133   ac_status=$?
17134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17137   (eval $ac_try) 2>&5
17138   ac_status=$?
17139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17140   (exit $ac_status); }; }; then
17141   echo "$as_me:$LINENO: result: ok" >&5
17142 echo "${ECHO_T}ok" >&6
17143 else
17144   echo "$as_me: program exited with status $ac_status" >&5
17145 echo "$as_me: failed program was:" >&5
17146 sed 's/^/| /' conftest.$ac_ext >&5
17147
17148 ( exit $ac_status )
17149 echo "$as_me:$LINENO: result: failed" >&5
17150 echo "${ECHO_T}failed" >&6
17151 { { echo "$as_me:$LINENO: error:
17152 *** Could not execute a simple test program.  This may be a problem
17153 *** related to locating shared libraries.  Check the file 'config.log'
17154 *** for the exact reason." >&5
17155 echo "$as_me: error:
17156 *** Could not execute a simple test program.  This may be a problem
17157 *** related to locating shared libraries.  Check the file 'config.log'
17158 *** for the exact reason." >&2;}
17159    { (exit 1); exit 1; }; }
17160 fi
17161 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17162 fi
17163
17164
17165 # Force use of our snprintf if system's doesn't do arg control
17166 # This feature is used by NLS
17167 if test "$enable_nls" = yes &&
17168    test $pgac_need_repl_snprintf = no &&
17169 # On Win32, libintl replaces snprintf() with its own version that
17170 # understands arg control, so we don't need our own.  In fact, it
17171 # also uses macros that conflict with ours, so we _can't_ use
17172 # our own.
17173    test "$PORTNAME" != "win32"; then
17174   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17175 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17176 if test "${pgac_cv_printf_arg_control+set}" = set; then
17177   echo $ECHO_N "(cached) $ECHO_C" >&6
17178 else
17179   if test "$cross_compiling" = yes; then
17180   pgac_cv_printf_arg_control=cross
17181 else
17182   cat >conftest.$ac_ext <<_ACEOF
17183 /* confdefs.h.  */
17184 _ACEOF
17185 cat confdefs.h >>conftest.$ac_ext
17186 cat >>conftest.$ac_ext <<_ACEOF
17187 /* end confdefs.h.  */
17188 #include <stdio.h>
17189 #include <string.h>
17190
17191 int main()
17192 {
17193   char buf[100];
17194
17195   /* can it swap arguments? */
17196   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17197   if (strcmp(buf, "4 3") != 0)
17198     return 1;
17199   return 0;
17200 }
17201 _ACEOF
17202 rm -f conftest$ac_exeext
17203 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17204   (eval $ac_link) 2>&5
17205   ac_status=$?
17206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17207   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17209   (eval $ac_try) 2>&5
17210   ac_status=$?
17211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17212   (exit $ac_status); }; }; then
17213   pgac_cv_printf_arg_control=yes
17214 else
17215   echo "$as_me: program exited with status $ac_status" >&5
17216 echo "$as_me: failed program was:" >&5
17217 sed 's/^/| /' conftest.$ac_ext >&5
17218
17219 ( exit $ac_status )
17220 pgac_cv_printf_arg_control=no
17221 fi
17222 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17223 fi
17224
17225 fi
17226 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17227 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17228
17229   if test $pgac_cv_printf_arg_control != yes ; then
17230     pgac_need_repl_snprintf=yes
17231   fi
17232 fi
17233
17234
17235
17236 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17237 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17238 if test "${pgac_cv_type_long_int_64+set}" = set; then
17239   echo $ECHO_N "(cached) $ECHO_C" >&6
17240 else
17241   if test "$cross_compiling" = yes; then
17242   # If cross-compiling, check the size reported by the compiler and
17243 # trust that the arithmetic works.
17244 cat >conftest.$ac_ext <<_ACEOF
17245 /* confdefs.h.  */
17246 _ACEOF
17247 cat confdefs.h >>conftest.$ac_ext
17248 cat >>conftest.$ac_ext <<_ACEOF
17249 /* end confdefs.h.  */
17250
17251 int
17252 main ()
17253 {
17254 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17255 test_array [0] = 0
17256
17257   ;
17258   return 0;
17259 }
17260 _ACEOF
17261 rm -f conftest.$ac_objext
17262 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17263   (eval $ac_compile) 2>conftest.er1
17264   ac_status=$?
17265   grep -v '^ *+' conftest.er1 >conftest.err
17266   rm -f conftest.er1
17267   cat conftest.err >&5
17268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17269   (exit $ac_status); } &&
17270          { ac_try='test -z "$ac_c_werror_flag"
17271                          || test ! -s conftest.err'
17272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17273   (eval $ac_try) 2>&5
17274   ac_status=$?
17275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17276   (exit $ac_status); }; } &&
17277          { ac_try='test -s conftest.$ac_objext'
17278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17279   (eval $ac_try) 2>&5
17280   ac_status=$?
17281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17282   (exit $ac_status); }; }; then
17283   pgac_cv_type_long_int_64=yes
17284 else
17285   echo "$as_me: failed program was:" >&5
17286 sed 's/^/| /' conftest.$ac_ext >&5
17287
17288 pgac_cv_type_long_int_64=no
17289 fi
17290 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17291 else
17292   cat >conftest.$ac_ext <<_ACEOF
17293 /* confdefs.h.  */
17294 _ACEOF
17295 cat confdefs.h >>conftest.$ac_ext
17296 cat >>conftest.$ac_ext <<_ACEOF
17297 /* end confdefs.h.  */
17298 typedef long int ac_int64;
17299
17300 /*
17301  * These are globals to discourage the compiler from folding all the
17302  * arithmetic tests down to compile-time constants.
17303  */
17304 ac_int64 a = 20000001;
17305 ac_int64 b = 40000005;
17306
17307 int does_int64_work()
17308 {
17309   ac_int64 c,d;
17310
17311   if (sizeof(ac_int64) != 8)
17312     return 0;                   /* definitely not the right size */
17313
17314   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17315   c = a * b;
17316   d = (c + b) / b;
17317   if (d != a+1)
17318     return 0;
17319   return 1;
17320 }
17321 main() {
17322   exit(! does_int64_work());
17323 }
17324 _ACEOF
17325 rm -f conftest$ac_exeext
17326 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17327   (eval $ac_link) 2>&5
17328   ac_status=$?
17329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17330   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17332   (eval $ac_try) 2>&5
17333   ac_status=$?
17334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17335   (exit $ac_status); }; }; then
17336   pgac_cv_type_long_int_64=yes
17337 else
17338   echo "$as_me: program exited with status $ac_status" >&5
17339 echo "$as_me: failed program was:" >&5
17340 sed 's/^/| /' conftest.$ac_ext >&5
17341
17342 ( exit $ac_status )
17343 pgac_cv_type_long_int_64=no
17344 fi
17345 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17346 fi
17347 fi
17348 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17349 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17350
17351 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17352 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17353
17354 cat >>confdefs.h <<\_ACEOF
17355 #define HAVE_LONG_INT_64
17356 _ACEOF
17357
17358 fi
17359
17360
17361 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17362   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17363 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17364 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17365   echo $ECHO_N "(cached) $ECHO_C" >&6
17366 else
17367   if test "$cross_compiling" = yes; then
17368   # If cross-compiling, check the size reported by the compiler and
17369 # trust that the arithmetic works.
17370 cat >conftest.$ac_ext <<_ACEOF
17371 /* confdefs.h.  */
17372 _ACEOF
17373 cat confdefs.h >>conftest.$ac_ext
17374 cat >>conftest.$ac_ext <<_ACEOF
17375 /* end confdefs.h.  */
17376
17377 int
17378 main ()
17379 {
17380 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17381 test_array [0] = 0
17382
17383   ;
17384   return 0;
17385 }
17386 _ACEOF
17387 rm -f conftest.$ac_objext
17388 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17389   (eval $ac_compile) 2>conftest.er1
17390   ac_status=$?
17391   grep -v '^ *+' conftest.er1 >conftest.err
17392   rm -f conftest.er1
17393   cat conftest.err >&5
17394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17395   (exit $ac_status); } &&
17396          { ac_try='test -z "$ac_c_werror_flag"
17397                          || test ! -s conftest.err'
17398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17399   (eval $ac_try) 2>&5
17400   ac_status=$?
17401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17402   (exit $ac_status); }; } &&
17403          { ac_try='test -s conftest.$ac_objext'
17404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17405   (eval $ac_try) 2>&5
17406   ac_status=$?
17407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17408   (exit $ac_status); }; }; then
17409   pgac_cv_type_long_long_int_64=yes
17410 else
17411   echo "$as_me: failed program was:" >&5
17412 sed 's/^/| /' conftest.$ac_ext >&5
17413
17414 pgac_cv_type_long_long_int_64=no
17415 fi
17416 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17417 else
17418   cat >conftest.$ac_ext <<_ACEOF
17419 /* confdefs.h.  */
17420 _ACEOF
17421 cat confdefs.h >>conftest.$ac_ext
17422 cat >>conftest.$ac_ext <<_ACEOF
17423 /* end confdefs.h.  */
17424 typedef long long int ac_int64;
17425
17426 /*
17427  * These are globals to discourage the compiler from folding all the
17428  * arithmetic tests down to compile-time constants.
17429  */
17430 ac_int64 a = 20000001;
17431 ac_int64 b = 40000005;
17432
17433 int does_int64_work()
17434 {
17435   ac_int64 c,d;
17436
17437   if (sizeof(ac_int64) != 8)
17438     return 0;                   /* definitely not the right size */
17439
17440   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17441   c = a * b;
17442   d = (c + b) / b;
17443   if (d != a+1)
17444     return 0;
17445   return 1;
17446 }
17447 main() {
17448   exit(! does_int64_work());
17449 }
17450 _ACEOF
17451 rm -f conftest$ac_exeext
17452 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17453   (eval $ac_link) 2>&5
17454   ac_status=$?
17455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17456   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17458   (eval $ac_try) 2>&5
17459   ac_status=$?
17460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17461   (exit $ac_status); }; }; then
17462   pgac_cv_type_long_long_int_64=yes
17463 else
17464   echo "$as_me: program exited with status $ac_status" >&5
17465 echo "$as_me: failed program was:" >&5
17466 sed 's/^/| /' conftest.$ac_ext >&5
17467
17468 ( exit $ac_status )
17469 pgac_cv_type_long_long_int_64=no
17470 fi
17471 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17472 fi
17473 fi
17474 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17475 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17476
17477 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17478 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17479
17480 cat >>confdefs.h <<\_ACEOF
17481 #define HAVE_LONG_LONG_INT_64
17482 _ACEOF
17483
17484 fi
17485
17486 fi
17487
17488
17489
17490 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17491   cat >conftest.$ac_ext <<_ACEOF
17492 /* confdefs.h.  */
17493 _ACEOF
17494 cat confdefs.h >>conftest.$ac_ext
17495 cat >>conftest.$ac_ext <<_ACEOF
17496 /* end confdefs.h.  */
17497
17498 #define INT64CONST(x)  x##LL
17499 long long int foo = INT64CONST(0x1234567890123456);
17500
17501 int
17502 main ()
17503 {
17504
17505   ;
17506   return 0;
17507 }
17508 _ACEOF
17509 rm -f conftest.$ac_objext
17510 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17511   (eval $ac_compile) 2>conftest.er1
17512   ac_status=$?
17513   grep -v '^ *+' conftest.er1 >conftest.err
17514   rm -f conftest.er1
17515   cat conftest.err >&5
17516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17517   (exit $ac_status); } &&
17518          { ac_try='test -z "$ac_c_werror_flag"
17519                          || test ! -s conftest.err'
17520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17521   (eval $ac_try) 2>&5
17522   ac_status=$?
17523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17524   (exit $ac_status); }; } &&
17525          { ac_try='test -s conftest.$ac_objext'
17526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17527   (eval $ac_try) 2>&5
17528   ac_status=$?
17529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17530   (exit $ac_status); }; }; then
17531
17532 cat >>confdefs.h <<\_ACEOF
17533 #define HAVE_LL_CONSTANTS 1
17534 _ACEOF
17535
17536 else
17537   echo "$as_me: failed program was:" >&5
17538 sed 's/^/| /' conftest.$ac_ext >&5
17539
17540 fi
17541 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17542 fi
17543
17544
17545 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17546 # we found we need to use "long long int", better check.  We cope with
17547 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17548 # work, fall back to our own snprintf emulation (which we know uses %lld).
17549
17550 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17551   if test $pgac_need_repl_snprintf = no; then
17552     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17553 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17554 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17555   echo $ECHO_N "(cached) $ECHO_C" >&6
17556 else
17557   for pgac_format in '%lld' '%qd' '%I64d'; do
17558 if test "$cross_compiling" = yes; then
17559   pgac_cv_snprintf_long_long_int_format=cross; break
17560 else
17561   cat >conftest.$ac_ext <<_ACEOF
17562 /* confdefs.h.  */
17563 _ACEOF
17564 cat confdefs.h >>conftest.$ac_ext
17565 cat >>conftest.$ac_ext <<_ACEOF
17566 /* end confdefs.h.  */
17567 #include <stdio.h>
17568 typedef long long int ac_int64;
17569 #define INT64_FORMAT "$pgac_format"
17570
17571 ac_int64 a = 20000001;
17572 ac_int64 b = 40000005;
17573
17574 int does_int64_snprintf_work()
17575 {
17576   ac_int64 c;
17577   char buf[100];
17578
17579   if (sizeof(ac_int64) != 8)
17580     return 0;                   /* doesn't look like the right size */
17581
17582   c = a * b;
17583   snprintf(buf, 100, INT64_FORMAT, c);
17584   if (strcmp(buf, "800000140000005") != 0)
17585     return 0;                   /* either multiply or snprintf is busted */
17586   return 1;
17587 }
17588 main() {
17589   exit(! does_int64_snprintf_work());
17590 }
17591 _ACEOF
17592 rm -f conftest$ac_exeext
17593 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17594   (eval $ac_link) 2>&5
17595   ac_status=$?
17596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17597   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17599   (eval $ac_try) 2>&5
17600   ac_status=$?
17601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17602   (exit $ac_status); }; }; then
17603   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17604 else
17605   echo "$as_me: program exited with status $ac_status" >&5
17606 echo "$as_me: failed program was:" >&5
17607 sed 's/^/| /' conftest.$ac_ext >&5
17608
17609 fi
17610 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17611 fi
17612 done
17613 fi
17614
17615 LONG_LONG_INT_FORMAT=''
17616
17617 case $pgac_cv_snprintf_long_long_int_format in
17618   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17619 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17620   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17621 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17622          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17623   *)     echo "$as_me:$LINENO: result: none" >&5
17624 echo "${ECHO_T}none" >&6;;
17625 esac
17626     if test "$LONG_LONG_INT_FORMAT" = ""; then
17627       # Force usage of our own snprintf, since system snprintf is broken
17628       pgac_need_repl_snprintf=yes
17629       LONG_LONG_INT_FORMAT='%lld'
17630     fi
17631   else
17632     # Here if we previously decided we needed to use our own snprintf
17633     LONG_LONG_INT_FORMAT='%lld'
17634   fi
17635   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17636   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17637   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17638 else
17639   # Here if we are not using 'long long int' at all
17640   INT64_FORMAT='"%ld"'
17641   UINT64_FORMAT='"%lu"'
17642 fi
17643
17644
17645 cat >>confdefs.h <<_ACEOF
17646 #define INT64_FORMAT $INT64_FORMAT
17647 _ACEOF
17648
17649
17650
17651 cat >>confdefs.h <<_ACEOF
17652 #define UINT64_FORMAT $UINT64_FORMAT
17653 _ACEOF
17654
17655
17656 # Now we have checked all the reasons to replace snprintf
17657 if test $pgac_need_repl_snprintf = yes; then
17658
17659 cat >>confdefs.h <<\_ACEOF
17660 #define USE_SNPRINTF 1
17661 _ACEOF
17662
17663   case $LIBOBJS in
17664     "snprintf.$ac_objext"   | \
17665   *" snprintf.$ac_objext"   | \
17666     "snprintf.$ac_objext "* | \
17667   *" snprintf.$ac_objext "* ) ;;
17668   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17669 esac
17670
17671 fi
17672
17673 # Need a #define for the size of Datum (unsigned long)
17674 echo "$as_me:$LINENO: checking for unsigned long" >&5
17675 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17676 if test "${ac_cv_type_unsigned_long+set}" = set; then
17677   echo $ECHO_N "(cached) $ECHO_C" >&6
17678 else
17679   cat >conftest.$ac_ext <<_ACEOF
17680 /* confdefs.h.  */
17681 _ACEOF
17682 cat confdefs.h >>conftest.$ac_ext
17683 cat >>conftest.$ac_ext <<_ACEOF
17684 /* end confdefs.h.  */
17685 $ac_includes_default
17686 int
17687 main ()
17688 {
17689 if ((unsigned long *) 0)
17690   return 0;
17691 if (sizeof (unsigned long))
17692   return 0;
17693   ;
17694   return 0;
17695 }
17696 _ACEOF
17697 rm -f conftest.$ac_objext
17698 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17699   (eval $ac_compile) 2>conftest.er1
17700   ac_status=$?
17701   grep -v '^ *+' conftest.er1 >conftest.err
17702   rm -f conftest.er1
17703   cat conftest.err >&5
17704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17705   (exit $ac_status); } &&
17706          { ac_try='test -z "$ac_c_werror_flag"
17707                          || test ! -s conftest.err'
17708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17709   (eval $ac_try) 2>&5
17710   ac_status=$?
17711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17712   (exit $ac_status); }; } &&
17713          { ac_try='test -s conftest.$ac_objext'
17714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17715   (eval $ac_try) 2>&5
17716   ac_status=$?
17717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17718   (exit $ac_status); }; }; then
17719   ac_cv_type_unsigned_long=yes
17720 else
17721   echo "$as_me: failed program was:" >&5
17722 sed 's/^/| /' conftest.$ac_ext >&5
17723
17724 ac_cv_type_unsigned_long=no
17725 fi
17726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17727 fi
17728 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
17729 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
17730
17731 echo "$as_me:$LINENO: checking size of unsigned long" >&5
17732 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
17733 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
17734   echo $ECHO_N "(cached) $ECHO_C" >&6
17735 else
17736   if test "$ac_cv_type_unsigned_long" = yes; then
17737   # The cast to unsigned long works around a bug in the HP C Compiler
17738   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17739   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17740   # This bug is HP SR number 8606223364.
17741   if test "$cross_compiling" = yes; then
17742   # Depending upon the size, compute the lo and hi bounds.
17743 cat >conftest.$ac_ext <<_ACEOF
17744 /* confdefs.h.  */
17745 _ACEOF
17746 cat confdefs.h >>conftest.$ac_ext
17747 cat >>conftest.$ac_ext <<_ACEOF
17748 /* end confdefs.h.  */
17749 $ac_includes_default
17750 int
17751 main ()
17752 {
17753 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
17754 test_array [0] = 0
17755
17756   ;
17757   return 0;
17758 }
17759 _ACEOF
17760 rm -f conftest.$ac_objext
17761 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17762   (eval $ac_compile) 2>conftest.er1
17763   ac_status=$?
17764   grep -v '^ *+' conftest.er1 >conftest.err
17765   rm -f conftest.er1
17766   cat conftest.err >&5
17767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17768   (exit $ac_status); } &&
17769          { ac_try='test -z "$ac_c_werror_flag"
17770                          || test ! -s conftest.err'
17771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17772   (eval $ac_try) 2>&5
17773   ac_status=$?
17774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17775   (exit $ac_status); }; } &&
17776          { ac_try='test -s conftest.$ac_objext'
17777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17778   (eval $ac_try) 2>&5
17779   ac_status=$?
17780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17781   (exit $ac_status); }; }; then
17782   ac_lo=0 ac_mid=0
17783   while :; do
17784     cat >conftest.$ac_ext <<_ACEOF
17785 /* confdefs.h.  */
17786 _ACEOF
17787 cat confdefs.h >>conftest.$ac_ext
17788 cat >>conftest.$ac_ext <<_ACEOF
17789 /* end confdefs.h.  */
17790 $ac_includes_default
17791 int
17792 main ()
17793 {
17794 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17795 test_array [0] = 0
17796
17797   ;
17798   return 0;
17799 }
17800 _ACEOF
17801 rm -f conftest.$ac_objext
17802 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17803   (eval $ac_compile) 2>conftest.er1
17804   ac_status=$?
17805   grep -v '^ *+' conftest.er1 >conftest.err
17806   rm -f conftest.er1
17807   cat conftest.err >&5
17808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17809   (exit $ac_status); } &&
17810          { ac_try='test -z "$ac_c_werror_flag"
17811                          || test ! -s conftest.err'
17812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17813   (eval $ac_try) 2>&5
17814   ac_status=$?
17815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17816   (exit $ac_status); }; } &&
17817          { ac_try='test -s conftest.$ac_objext'
17818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17819   (eval $ac_try) 2>&5
17820   ac_status=$?
17821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17822   (exit $ac_status); }; }; then
17823   ac_hi=$ac_mid; break
17824 else
17825   echo "$as_me: failed program was:" >&5
17826 sed 's/^/| /' conftest.$ac_ext >&5
17827
17828 ac_lo=`expr $ac_mid + 1`
17829                     if test $ac_lo -le $ac_mid; then
17830                       ac_lo= ac_hi=
17831                       break
17832                     fi
17833                     ac_mid=`expr 2 '*' $ac_mid + 1`
17834 fi
17835 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17836   done
17837 else
17838   echo "$as_me: failed program was:" >&5
17839 sed 's/^/| /' conftest.$ac_ext >&5
17840
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 $ac_includes_default
17848 int
17849 main ()
17850 {
17851 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
17852 test_array [0] = 0
17853
17854   ;
17855   return 0;
17856 }
17857 _ACEOF
17858 rm -f conftest.$ac_objext
17859 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17860   (eval $ac_compile) 2>conftest.er1
17861   ac_status=$?
17862   grep -v '^ *+' conftest.er1 >conftest.err
17863   rm -f conftest.er1
17864   cat conftest.err >&5
17865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17866   (exit $ac_status); } &&
17867          { ac_try='test -z "$ac_c_werror_flag"
17868                          || test ! -s conftest.err'
17869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17870   (eval $ac_try) 2>&5
17871   ac_status=$?
17872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17873   (exit $ac_status); }; } &&
17874          { ac_try='test -s conftest.$ac_objext'
17875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17876   (eval $ac_try) 2>&5
17877   ac_status=$?
17878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17879   (exit $ac_status); }; }; then
17880   ac_hi=-1 ac_mid=-1
17881   while :; do
17882     cat >conftest.$ac_ext <<_ACEOF
17883 /* confdefs.h.  */
17884 _ACEOF
17885 cat confdefs.h >>conftest.$ac_ext
17886 cat >>conftest.$ac_ext <<_ACEOF
17887 /* end confdefs.h.  */
17888 $ac_includes_default
17889 int
17890 main ()
17891 {
17892 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
17893 test_array [0] = 0
17894
17895   ;
17896   return 0;
17897 }
17898 _ACEOF
17899 rm -f conftest.$ac_objext
17900 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17901   (eval $ac_compile) 2>conftest.er1
17902   ac_status=$?
17903   grep -v '^ *+' conftest.er1 >conftest.err
17904   rm -f conftest.er1
17905   cat conftest.err >&5
17906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17907   (exit $ac_status); } &&
17908          { ac_try='test -z "$ac_c_werror_flag"
17909                          || test ! -s conftest.err'
17910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17911   (eval $ac_try) 2>&5
17912   ac_status=$?
17913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17914   (exit $ac_status); }; } &&
17915          { ac_try='test -s conftest.$ac_objext'
17916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17917   (eval $ac_try) 2>&5
17918   ac_status=$?
17919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17920   (exit $ac_status); }; }; then
17921   ac_lo=$ac_mid; break
17922 else
17923   echo "$as_me: failed program was:" >&5
17924 sed 's/^/| /' conftest.$ac_ext >&5
17925
17926 ac_hi=`expr '(' $ac_mid ')' - 1`
17927                        if test $ac_mid -le $ac_hi; then
17928                          ac_lo= ac_hi=
17929                          break
17930                        fi
17931                        ac_mid=`expr 2 '*' $ac_mid`
17932 fi
17933 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17934   done
17935 else
17936   echo "$as_me: failed program was:" >&5
17937 sed 's/^/| /' conftest.$ac_ext >&5
17938
17939 ac_lo= ac_hi=
17940 fi
17941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17942 fi
17943 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17944 # Binary search between lo and hi bounds.
17945 while test "x$ac_lo" != "x$ac_hi"; do
17946   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17947   cat >conftest.$ac_ext <<_ACEOF
17948 /* confdefs.h.  */
17949 _ACEOF
17950 cat confdefs.h >>conftest.$ac_ext
17951 cat >>conftest.$ac_ext <<_ACEOF
17952 /* end confdefs.h.  */
17953 $ac_includes_default
17954 int
17955 main ()
17956 {
17957 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17958 test_array [0] = 0
17959
17960   ;
17961   return 0;
17962 }
17963 _ACEOF
17964 rm -f conftest.$ac_objext
17965 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17966   (eval $ac_compile) 2>conftest.er1
17967   ac_status=$?
17968   grep -v '^ *+' conftest.er1 >conftest.err
17969   rm -f conftest.er1
17970   cat conftest.err >&5
17971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17972   (exit $ac_status); } &&
17973          { ac_try='test -z "$ac_c_werror_flag"
17974                          || test ! -s conftest.err'
17975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17976   (eval $ac_try) 2>&5
17977   ac_status=$?
17978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17979   (exit $ac_status); }; } &&
17980          { ac_try='test -s conftest.$ac_objext'
17981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17982   (eval $ac_try) 2>&5
17983   ac_status=$?
17984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17985   (exit $ac_status); }; }; then
17986   ac_hi=$ac_mid
17987 else
17988   echo "$as_me: failed program was:" >&5
17989 sed 's/^/| /' conftest.$ac_ext >&5
17990
17991 ac_lo=`expr '(' $ac_mid ')' + 1`
17992 fi
17993 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17994 done
17995 case $ac_lo in
17996 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
17997 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
17998 See \`config.log' for more details." >&5
17999 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18000 See \`config.log' for more details." >&2;}
18001    { (exit 1); exit 1; }; } ;;
18002 esac
18003 else
18004   if test "$cross_compiling" = yes; then
18005   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18006 See \`config.log' for more details." >&5
18007 echo "$as_me: error: cannot run test program while cross compiling
18008 See \`config.log' for more details." >&2;}
18009    { (exit 1); exit 1; }; }
18010 else
18011   cat >conftest.$ac_ext <<_ACEOF
18012 /* confdefs.h.  */
18013 _ACEOF
18014 cat confdefs.h >>conftest.$ac_ext
18015 cat >>conftest.$ac_ext <<_ACEOF
18016 /* end confdefs.h.  */
18017 $ac_includes_default
18018 long longval () { return (long) (sizeof (unsigned long)); }
18019 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18020 #include <stdio.h>
18021 #include <stdlib.h>
18022 int
18023 main ()
18024 {
18025
18026   FILE *f = fopen ("conftest.val", "w");
18027   if (! f)
18028     exit (1);
18029   if (((long) (sizeof (unsigned long))) < 0)
18030     {
18031       long i = longval ();
18032       if (i != ((long) (sizeof (unsigned long))))
18033         exit (1);
18034       fprintf (f, "%ld\n", i);
18035     }
18036   else
18037     {
18038       unsigned long i = ulongval ();
18039       if (i != ((long) (sizeof (unsigned long))))
18040         exit (1);
18041       fprintf (f, "%lu\n", i);
18042     }
18043   exit (ferror (f) || fclose (f) != 0);
18044
18045   ;
18046   return 0;
18047 }
18048 _ACEOF
18049 rm -f conftest$ac_exeext
18050 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18051   (eval $ac_link) 2>&5
18052   ac_status=$?
18053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18054   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18056   (eval $ac_try) 2>&5
18057   ac_status=$?
18058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18059   (exit $ac_status); }; }; then
18060   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18061 else
18062   echo "$as_me: program exited with status $ac_status" >&5
18063 echo "$as_me: failed program was:" >&5
18064 sed 's/^/| /' conftest.$ac_ext >&5
18065
18066 ( exit $ac_status )
18067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18068 See \`config.log' for more details." >&5
18069 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18070 See \`config.log' for more details." >&2;}
18071    { (exit 1); exit 1; }; }
18072 fi
18073 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18074 fi
18075 fi
18076 rm -f conftest.val
18077 else
18078   ac_cv_sizeof_unsigned_long=0
18079 fi
18080 fi
18081 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18082 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18083 cat >>confdefs.h <<_ACEOF
18084 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18085 _ACEOF
18086
18087
18088
18089 # And one for the size of size_t (enables tweaks for > 32bit address space)
18090 echo "$as_me:$LINENO: checking for size_t" >&5
18091 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18092 if test "${ac_cv_type_size_t+set}" = set; then
18093   echo $ECHO_N "(cached) $ECHO_C" >&6
18094 else
18095   cat >conftest.$ac_ext <<_ACEOF
18096 /* confdefs.h.  */
18097 _ACEOF
18098 cat confdefs.h >>conftest.$ac_ext
18099 cat >>conftest.$ac_ext <<_ACEOF
18100 /* end confdefs.h.  */
18101 $ac_includes_default
18102 int
18103 main ()
18104 {
18105 if ((size_t *) 0)
18106   return 0;
18107 if (sizeof (size_t))
18108   return 0;
18109   ;
18110   return 0;
18111 }
18112 _ACEOF
18113 rm -f conftest.$ac_objext
18114 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18115   (eval $ac_compile) 2>conftest.er1
18116   ac_status=$?
18117   grep -v '^ *+' conftest.er1 >conftest.err
18118   rm -f conftest.er1
18119   cat conftest.err >&5
18120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18121   (exit $ac_status); } &&
18122          { ac_try='test -z "$ac_c_werror_flag"
18123                          || test ! -s conftest.err'
18124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18125   (eval $ac_try) 2>&5
18126   ac_status=$?
18127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18128   (exit $ac_status); }; } &&
18129          { ac_try='test -s conftest.$ac_objext'
18130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18131   (eval $ac_try) 2>&5
18132   ac_status=$?
18133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18134   (exit $ac_status); }; }; then
18135   ac_cv_type_size_t=yes
18136 else
18137   echo "$as_me: failed program was:" >&5
18138 sed 's/^/| /' conftest.$ac_ext >&5
18139
18140 ac_cv_type_size_t=no
18141 fi
18142 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18143 fi
18144 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18145 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18146
18147 echo "$as_me:$LINENO: checking size of size_t" >&5
18148 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18149 if test "${ac_cv_sizeof_size_t+set}" = set; then
18150   echo $ECHO_N "(cached) $ECHO_C" >&6
18151 else
18152   if test "$ac_cv_type_size_t" = yes; then
18153   # The cast to unsigned long works around a bug in the HP C Compiler
18154   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18155   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18156   # This bug is HP SR number 8606223364.
18157   if test "$cross_compiling" = yes; then
18158   # Depending upon the size, compute the lo and hi bounds.
18159 cat >conftest.$ac_ext <<_ACEOF
18160 /* confdefs.h.  */
18161 _ACEOF
18162 cat confdefs.h >>conftest.$ac_ext
18163 cat >>conftest.$ac_ext <<_ACEOF
18164 /* end confdefs.h.  */
18165 $ac_includes_default
18166 int
18167 main ()
18168 {
18169 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18170 test_array [0] = 0
18171
18172   ;
18173   return 0;
18174 }
18175 _ACEOF
18176 rm -f conftest.$ac_objext
18177 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18178   (eval $ac_compile) 2>conftest.er1
18179   ac_status=$?
18180   grep -v '^ *+' conftest.er1 >conftest.err
18181   rm -f conftest.er1
18182   cat conftest.err >&5
18183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18184   (exit $ac_status); } &&
18185          { ac_try='test -z "$ac_c_werror_flag"
18186                          || test ! -s conftest.err'
18187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18188   (eval $ac_try) 2>&5
18189   ac_status=$?
18190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18191   (exit $ac_status); }; } &&
18192          { ac_try='test -s conftest.$ac_objext'
18193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18194   (eval $ac_try) 2>&5
18195   ac_status=$?
18196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18197   (exit $ac_status); }; }; then
18198   ac_lo=0 ac_mid=0
18199   while :; do
18200     cat >conftest.$ac_ext <<_ACEOF
18201 /* confdefs.h.  */
18202 _ACEOF
18203 cat confdefs.h >>conftest.$ac_ext
18204 cat >>conftest.$ac_ext <<_ACEOF
18205 /* end confdefs.h.  */
18206 $ac_includes_default
18207 int
18208 main ()
18209 {
18210 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18211 test_array [0] = 0
18212
18213   ;
18214   return 0;
18215 }
18216 _ACEOF
18217 rm -f conftest.$ac_objext
18218 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18219   (eval $ac_compile) 2>conftest.er1
18220   ac_status=$?
18221   grep -v '^ *+' conftest.er1 >conftest.err
18222   rm -f conftest.er1
18223   cat conftest.err >&5
18224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18225   (exit $ac_status); } &&
18226          { ac_try='test -z "$ac_c_werror_flag"
18227                          || test ! -s conftest.err'
18228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18229   (eval $ac_try) 2>&5
18230   ac_status=$?
18231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18232   (exit $ac_status); }; } &&
18233          { ac_try='test -s conftest.$ac_objext'
18234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18235   (eval $ac_try) 2>&5
18236   ac_status=$?
18237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18238   (exit $ac_status); }; }; then
18239   ac_hi=$ac_mid; break
18240 else
18241   echo "$as_me: failed program was:" >&5
18242 sed 's/^/| /' conftest.$ac_ext >&5
18243
18244 ac_lo=`expr $ac_mid + 1`
18245                     if test $ac_lo -le $ac_mid; then
18246                       ac_lo= ac_hi=
18247                       break
18248                     fi
18249                     ac_mid=`expr 2 '*' $ac_mid + 1`
18250 fi
18251 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18252   done
18253 else
18254   echo "$as_me: failed program was:" >&5
18255 sed 's/^/| /' conftest.$ac_ext >&5
18256
18257 cat >conftest.$ac_ext <<_ACEOF
18258 /* confdefs.h.  */
18259 _ACEOF
18260 cat confdefs.h >>conftest.$ac_ext
18261 cat >>conftest.$ac_ext <<_ACEOF
18262 /* end confdefs.h.  */
18263 $ac_includes_default
18264 int
18265 main ()
18266 {
18267 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18268 test_array [0] = 0
18269
18270   ;
18271   return 0;
18272 }
18273 _ACEOF
18274 rm -f conftest.$ac_objext
18275 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18276   (eval $ac_compile) 2>conftest.er1
18277   ac_status=$?
18278   grep -v '^ *+' conftest.er1 >conftest.err
18279   rm -f conftest.er1
18280   cat conftest.err >&5
18281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18282   (exit $ac_status); } &&
18283          { ac_try='test -z "$ac_c_werror_flag"
18284                          || test ! -s conftest.err'
18285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18286   (eval $ac_try) 2>&5
18287   ac_status=$?
18288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18289   (exit $ac_status); }; } &&
18290          { ac_try='test -s conftest.$ac_objext'
18291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18292   (eval $ac_try) 2>&5
18293   ac_status=$?
18294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18295   (exit $ac_status); }; }; then
18296   ac_hi=-1 ac_mid=-1
18297   while :; do
18298     cat >conftest.$ac_ext <<_ACEOF
18299 /* confdefs.h.  */
18300 _ACEOF
18301 cat confdefs.h >>conftest.$ac_ext
18302 cat >>conftest.$ac_ext <<_ACEOF
18303 /* end confdefs.h.  */
18304 $ac_includes_default
18305 int
18306 main ()
18307 {
18308 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18309 test_array [0] = 0
18310
18311   ;
18312   return 0;
18313 }
18314 _ACEOF
18315 rm -f conftest.$ac_objext
18316 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18317   (eval $ac_compile) 2>conftest.er1
18318   ac_status=$?
18319   grep -v '^ *+' conftest.er1 >conftest.err
18320   rm -f conftest.er1
18321   cat conftest.err >&5
18322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18323   (exit $ac_status); } &&
18324          { ac_try='test -z "$ac_c_werror_flag"
18325                          || test ! -s conftest.err'
18326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18327   (eval $ac_try) 2>&5
18328   ac_status=$?
18329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18330   (exit $ac_status); }; } &&
18331          { ac_try='test -s conftest.$ac_objext'
18332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18333   (eval $ac_try) 2>&5
18334   ac_status=$?
18335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18336   (exit $ac_status); }; }; then
18337   ac_lo=$ac_mid; break
18338 else
18339   echo "$as_me: failed program was:" >&5
18340 sed 's/^/| /' conftest.$ac_ext >&5
18341
18342 ac_hi=`expr '(' $ac_mid ')' - 1`
18343                        if test $ac_mid -le $ac_hi; then
18344                          ac_lo= ac_hi=
18345                          break
18346                        fi
18347                        ac_mid=`expr 2 '*' $ac_mid`
18348 fi
18349 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18350   done
18351 else
18352   echo "$as_me: failed program was:" >&5
18353 sed 's/^/| /' conftest.$ac_ext >&5
18354
18355 ac_lo= ac_hi=
18356 fi
18357 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18358 fi
18359 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18360 # Binary search between lo and hi bounds.
18361 while test "x$ac_lo" != "x$ac_hi"; do
18362   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18363   cat >conftest.$ac_ext <<_ACEOF
18364 /* confdefs.h.  */
18365 _ACEOF
18366 cat confdefs.h >>conftest.$ac_ext
18367 cat >>conftest.$ac_ext <<_ACEOF
18368 /* end confdefs.h.  */
18369 $ac_includes_default
18370 int
18371 main ()
18372 {
18373 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18374 test_array [0] = 0
18375
18376   ;
18377   return 0;
18378 }
18379 _ACEOF
18380 rm -f conftest.$ac_objext
18381 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18382   (eval $ac_compile) 2>conftest.er1
18383   ac_status=$?
18384   grep -v '^ *+' conftest.er1 >conftest.err
18385   rm -f conftest.er1
18386   cat conftest.err >&5
18387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18388   (exit $ac_status); } &&
18389          { ac_try='test -z "$ac_c_werror_flag"
18390                          || test ! -s conftest.err'
18391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18392   (eval $ac_try) 2>&5
18393   ac_status=$?
18394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18395   (exit $ac_status); }; } &&
18396          { ac_try='test -s conftest.$ac_objext'
18397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18398   (eval $ac_try) 2>&5
18399   ac_status=$?
18400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18401   (exit $ac_status); }; }; then
18402   ac_hi=$ac_mid
18403 else
18404   echo "$as_me: failed program was:" >&5
18405 sed 's/^/| /' conftest.$ac_ext >&5
18406
18407 ac_lo=`expr '(' $ac_mid ')' + 1`
18408 fi
18409 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18410 done
18411 case $ac_lo in
18412 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18413 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18414 See \`config.log' for more details." >&5
18415 echo "$as_me: error: cannot compute sizeof (size_t), 77
18416 See \`config.log' for more details." >&2;}
18417    { (exit 1); exit 1; }; } ;;
18418 esac
18419 else
18420   if test "$cross_compiling" = yes; then
18421   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18422 See \`config.log' for more details." >&5
18423 echo "$as_me: error: cannot run test program while cross compiling
18424 See \`config.log' for more details." >&2;}
18425    { (exit 1); exit 1; }; }
18426 else
18427   cat >conftest.$ac_ext <<_ACEOF
18428 /* confdefs.h.  */
18429 _ACEOF
18430 cat confdefs.h >>conftest.$ac_ext
18431 cat >>conftest.$ac_ext <<_ACEOF
18432 /* end confdefs.h.  */
18433 $ac_includes_default
18434 long longval () { return (long) (sizeof (size_t)); }
18435 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18436 #include <stdio.h>
18437 #include <stdlib.h>
18438 int
18439 main ()
18440 {
18441
18442   FILE *f = fopen ("conftest.val", "w");
18443   if (! f)
18444     exit (1);
18445   if (((long) (sizeof (size_t))) < 0)
18446     {
18447       long i = longval ();
18448       if (i != ((long) (sizeof (size_t))))
18449         exit (1);
18450       fprintf (f, "%ld\n", i);
18451     }
18452   else
18453     {
18454       unsigned long i = ulongval ();
18455       if (i != ((long) (sizeof (size_t))))
18456         exit (1);
18457       fprintf (f, "%lu\n", i);
18458     }
18459   exit (ferror (f) || fclose (f) != 0);
18460
18461   ;
18462   return 0;
18463 }
18464 _ACEOF
18465 rm -f conftest$ac_exeext
18466 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18467   (eval $ac_link) 2>&5
18468   ac_status=$?
18469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18470   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18472   (eval $ac_try) 2>&5
18473   ac_status=$?
18474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18475   (exit $ac_status); }; }; then
18476   ac_cv_sizeof_size_t=`cat conftest.val`
18477 else
18478   echo "$as_me: program exited with status $ac_status" >&5
18479 echo "$as_me: failed program was:" >&5
18480 sed 's/^/| /' conftest.$ac_ext >&5
18481
18482 ( exit $ac_status )
18483 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18484 See \`config.log' for more details." >&5
18485 echo "$as_me: error: cannot compute sizeof (size_t), 77
18486 See \`config.log' for more details." >&2;}
18487    { (exit 1); exit 1; }; }
18488 fi
18489 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18490 fi
18491 fi
18492 rm -f conftest.val
18493 else
18494   ac_cv_sizeof_size_t=0
18495 fi
18496 fi
18497 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18498 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18499 cat >>confdefs.h <<_ACEOF
18500 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18501 _ACEOF
18502
18503
18504
18505 # Determine memory alignment requirements for the basic C data types.
18506
18507 echo "$as_me:$LINENO: checking for short" >&5
18508 echo $ECHO_N "checking for short... $ECHO_C" >&6
18509 if test "${ac_cv_type_short+set}" = set; then
18510   echo $ECHO_N "(cached) $ECHO_C" >&6
18511 else
18512   cat >conftest.$ac_ext <<_ACEOF
18513 /* confdefs.h.  */
18514 _ACEOF
18515 cat confdefs.h >>conftest.$ac_ext
18516 cat >>conftest.$ac_ext <<_ACEOF
18517 /* end confdefs.h.  */
18518 $ac_includes_default
18519 int
18520 main ()
18521 {
18522 if ((short *) 0)
18523   return 0;
18524 if (sizeof (short))
18525   return 0;
18526   ;
18527   return 0;
18528 }
18529 _ACEOF
18530 rm -f conftest.$ac_objext
18531 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18532   (eval $ac_compile) 2>conftest.er1
18533   ac_status=$?
18534   grep -v '^ *+' conftest.er1 >conftest.err
18535   rm -f conftest.er1
18536   cat conftest.err >&5
18537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18538   (exit $ac_status); } &&
18539          { ac_try='test -z "$ac_c_werror_flag"
18540                          || test ! -s conftest.err'
18541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18542   (eval $ac_try) 2>&5
18543   ac_status=$?
18544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18545   (exit $ac_status); }; } &&
18546          { ac_try='test -s conftest.$ac_objext'
18547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18548   (eval $ac_try) 2>&5
18549   ac_status=$?
18550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18551   (exit $ac_status); }; }; then
18552   ac_cv_type_short=yes
18553 else
18554   echo "$as_me: failed program was:" >&5
18555 sed 's/^/| /' conftest.$ac_ext >&5
18556
18557 ac_cv_type_short=no
18558 fi
18559 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18560 fi
18561 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18562 echo "${ECHO_T}$ac_cv_type_short" >&6
18563
18564 echo "$as_me:$LINENO: checking alignment of short" >&5
18565 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18566 if test "${pgac_cv_alignof_short+set}" = set; then
18567   echo $ECHO_N "(cached) $ECHO_C" >&6
18568 else
18569   if test "$ac_cv_type_short" = yes; then
18570   if test "$cross_compiling" = yes; then
18571   # Depending upon the size, compute the lo and hi bounds.
18572 cat >conftest.$ac_ext <<_ACEOF
18573 /* confdefs.h.  */
18574 _ACEOF
18575 cat confdefs.h >>conftest.$ac_ext
18576 cat >>conftest.$ac_ext <<_ACEOF
18577 /* end confdefs.h.  */
18578 $ac_includes_default
18579 struct { char filler; short field; } pgac_struct;
18580 int
18581 main ()
18582 {
18583 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18584 test_array [0] = 0
18585
18586   ;
18587   return 0;
18588 }
18589 _ACEOF
18590 rm -f conftest.$ac_objext
18591 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18592   (eval $ac_compile) 2>conftest.er1
18593   ac_status=$?
18594   grep -v '^ *+' conftest.er1 >conftest.err
18595   rm -f conftest.er1
18596   cat conftest.err >&5
18597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18598   (exit $ac_status); } &&
18599          { ac_try='test -z "$ac_c_werror_flag"
18600                          || test ! -s conftest.err'
18601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18602   (eval $ac_try) 2>&5
18603   ac_status=$?
18604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18605   (exit $ac_status); }; } &&
18606          { ac_try='test -s conftest.$ac_objext'
18607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18608   (eval $ac_try) 2>&5
18609   ac_status=$?
18610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18611   (exit $ac_status); }; }; then
18612   ac_lo=0 ac_mid=0
18613   while :; do
18614     cat >conftest.$ac_ext <<_ACEOF
18615 /* confdefs.h.  */
18616 _ACEOF
18617 cat confdefs.h >>conftest.$ac_ext
18618 cat >>conftest.$ac_ext <<_ACEOF
18619 /* end confdefs.h.  */
18620 $ac_includes_default
18621 struct { char filler; short field; } pgac_struct;
18622 int
18623 main ()
18624 {
18625 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18626 test_array [0] = 0
18627
18628   ;
18629   return 0;
18630 }
18631 _ACEOF
18632 rm -f conftest.$ac_objext
18633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18634   (eval $ac_compile) 2>conftest.er1
18635   ac_status=$?
18636   grep -v '^ *+' conftest.er1 >conftest.err
18637   rm -f conftest.er1
18638   cat conftest.err >&5
18639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18640   (exit $ac_status); } &&
18641          { ac_try='test -z "$ac_c_werror_flag"
18642                          || test ! -s conftest.err'
18643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18644   (eval $ac_try) 2>&5
18645   ac_status=$?
18646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18647   (exit $ac_status); }; } &&
18648          { ac_try='test -s conftest.$ac_objext'
18649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18650   (eval $ac_try) 2>&5
18651   ac_status=$?
18652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18653   (exit $ac_status); }; }; then
18654   ac_hi=$ac_mid; break
18655 else
18656   echo "$as_me: failed program was:" >&5
18657 sed 's/^/| /' conftest.$ac_ext >&5
18658
18659 ac_lo=`expr $ac_mid + 1`
18660                     if test $ac_lo -le $ac_mid; then
18661                       ac_lo= ac_hi=
18662                       break
18663                     fi
18664                     ac_mid=`expr 2 '*' $ac_mid + 1`
18665 fi
18666 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18667   done
18668 else
18669   echo "$as_me: failed program was:" >&5
18670 sed 's/^/| /' conftest.$ac_ext >&5
18671
18672 cat >conftest.$ac_ext <<_ACEOF
18673 /* confdefs.h.  */
18674 _ACEOF
18675 cat confdefs.h >>conftest.$ac_ext
18676 cat >>conftest.$ac_ext <<_ACEOF
18677 /* end confdefs.h.  */
18678 $ac_includes_default
18679 struct { char filler; short field; } pgac_struct;
18680 int
18681 main ()
18682 {
18683 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18684 test_array [0] = 0
18685
18686   ;
18687   return 0;
18688 }
18689 _ACEOF
18690 rm -f conftest.$ac_objext
18691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18692   (eval $ac_compile) 2>conftest.er1
18693   ac_status=$?
18694   grep -v '^ *+' conftest.er1 >conftest.err
18695   rm -f conftest.er1
18696   cat conftest.err >&5
18697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18698   (exit $ac_status); } &&
18699          { ac_try='test -z "$ac_c_werror_flag"
18700                          || test ! -s conftest.err'
18701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18702   (eval $ac_try) 2>&5
18703   ac_status=$?
18704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18705   (exit $ac_status); }; } &&
18706          { ac_try='test -s conftest.$ac_objext'
18707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18708   (eval $ac_try) 2>&5
18709   ac_status=$?
18710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18711   (exit $ac_status); }; }; then
18712   ac_hi=-1 ac_mid=-1
18713   while :; do
18714     cat >conftest.$ac_ext <<_ACEOF
18715 /* confdefs.h.  */
18716 _ACEOF
18717 cat confdefs.h >>conftest.$ac_ext
18718 cat >>conftest.$ac_ext <<_ACEOF
18719 /* end confdefs.h.  */
18720 $ac_includes_default
18721 struct { char filler; short field; } pgac_struct;
18722 int
18723 main ()
18724 {
18725 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18726 test_array [0] = 0
18727
18728   ;
18729   return 0;
18730 }
18731 _ACEOF
18732 rm -f conftest.$ac_objext
18733 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18734   (eval $ac_compile) 2>conftest.er1
18735   ac_status=$?
18736   grep -v '^ *+' conftest.er1 >conftest.err
18737   rm -f conftest.er1
18738   cat conftest.err >&5
18739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18740   (exit $ac_status); } &&
18741          { ac_try='test -z "$ac_c_werror_flag"
18742                          || test ! -s conftest.err'
18743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18744   (eval $ac_try) 2>&5
18745   ac_status=$?
18746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18747   (exit $ac_status); }; } &&
18748          { ac_try='test -s conftest.$ac_objext'
18749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18750   (eval $ac_try) 2>&5
18751   ac_status=$?
18752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18753   (exit $ac_status); }; }; then
18754   ac_lo=$ac_mid; break
18755 else
18756   echo "$as_me: failed program was:" >&5
18757 sed 's/^/| /' conftest.$ac_ext >&5
18758
18759 ac_hi=`expr '(' $ac_mid ')' - 1`
18760                        if test $ac_mid -le $ac_hi; then
18761                          ac_lo= ac_hi=
18762                          break
18763                        fi
18764                        ac_mid=`expr 2 '*' $ac_mid`
18765 fi
18766 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18767   done
18768 else
18769   echo "$as_me: failed program was:" >&5
18770 sed 's/^/| /' conftest.$ac_ext >&5
18771
18772 ac_lo= ac_hi=
18773 fi
18774 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18775 fi
18776 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18777 # Binary search between lo and hi bounds.
18778 while test "x$ac_lo" != "x$ac_hi"; do
18779   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18780   cat >conftest.$ac_ext <<_ACEOF
18781 /* confdefs.h.  */
18782 _ACEOF
18783 cat confdefs.h >>conftest.$ac_ext
18784 cat >>conftest.$ac_ext <<_ACEOF
18785 /* end confdefs.h.  */
18786 $ac_includes_default
18787 struct { char filler; short field; } pgac_struct;
18788 int
18789 main ()
18790 {
18791 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18792 test_array [0] = 0
18793
18794   ;
18795   return 0;
18796 }
18797 _ACEOF
18798 rm -f conftest.$ac_objext
18799 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18800   (eval $ac_compile) 2>conftest.er1
18801   ac_status=$?
18802   grep -v '^ *+' conftest.er1 >conftest.err
18803   rm -f conftest.er1
18804   cat conftest.err >&5
18805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18806   (exit $ac_status); } &&
18807          { ac_try='test -z "$ac_c_werror_flag"
18808                          || test ! -s conftest.err'
18809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18810   (eval $ac_try) 2>&5
18811   ac_status=$?
18812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18813   (exit $ac_status); }; } &&
18814          { ac_try='test -s conftest.$ac_objext'
18815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18816   (eval $ac_try) 2>&5
18817   ac_status=$?
18818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18819   (exit $ac_status); }; }; then
18820   ac_hi=$ac_mid
18821 else
18822   echo "$as_me: failed program was:" >&5
18823 sed 's/^/| /' conftest.$ac_ext >&5
18824
18825 ac_lo=`expr '(' $ac_mid ')' + 1`
18826 fi
18827 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18828 done
18829 case $ac_lo in
18830 ?*) pgac_cv_alignof_short=$ac_lo;;
18831 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18832 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18833    { (exit 1); exit 1; }; } ;;
18834 esac
18835 else
18836   if test "$cross_compiling" = yes; then
18837   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18838 See \`config.log' for more details." >&5
18839 echo "$as_me: error: cannot run test program while cross compiling
18840 See \`config.log' for more details." >&2;}
18841    { (exit 1); exit 1; }; }
18842 else
18843   cat >conftest.$ac_ext <<_ACEOF
18844 /* confdefs.h.  */
18845 _ACEOF
18846 cat confdefs.h >>conftest.$ac_ext
18847 cat >>conftest.$ac_ext <<_ACEOF
18848 /* end confdefs.h.  */
18849 $ac_includes_default
18850 struct { char filler; short field; } pgac_struct;
18851 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18852 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18853 #include <stdio.h>
18854 #include <stdlib.h>
18855 int
18856 main ()
18857 {
18858
18859   FILE *f = fopen ("conftest.val", "w");
18860   if (! f)
18861     exit (1);
18862   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
18863     {
18864       long i = longval ();
18865       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18866         exit (1);
18867       fprintf (f, "%ld\n", i);
18868     }
18869   else
18870     {
18871       unsigned long i = ulongval ();
18872       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18873         exit (1);
18874       fprintf (f, "%lu\n", i);
18875     }
18876   exit (ferror (f) || fclose (f) != 0);
18877
18878   ;
18879   return 0;
18880 }
18881 _ACEOF
18882 rm -f conftest$ac_exeext
18883 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18884   (eval $ac_link) 2>&5
18885   ac_status=$?
18886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18887   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18889   (eval $ac_try) 2>&5
18890   ac_status=$?
18891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18892   (exit $ac_status); }; }; then
18893   pgac_cv_alignof_short=`cat conftest.val`
18894 else
18895   echo "$as_me: program exited with status $ac_status" >&5
18896 echo "$as_me: failed program was:" >&5
18897 sed 's/^/| /' conftest.$ac_ext >&5
18898
18899 ( exit $ac_status )
18900 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18901 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18902    { (exit 1); exit 1; }; }
18903 fi
18904 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18905 fi
18906 fi
18907 rm -f conftest.val
18908 else
18909   pgac_cv_alignof_short=0
18910 fi
18911 fi
18912 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
18913 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
18914 cat >>confdefs.h <<_ACEOF
18915 #define ALIGNOF_SHORT $pgac_cv_alignof_short
18916 _ACEOF
18917
18918
18919 echo "$as_me:$LINENO: checking for int" >&5
18920 echo $ECHO_N "checking for int... $ECHO_C" >&6
18921 if test "${ac_cv_type_int+set}" = set; then
18922   echo $ECHO_N "(cached) $ECHO_C" >&6
18923 else
18924   cat >conftest.$ac_ext <<_ACEOF
18925 /* confdefs.h.  */
18926 _ACEOF
18927 cat confdefs.h >>conftest.$ac_ext
18928 cat >>conftest.$ac_ext <<_ACEOF
18929 /* end confdefs.h.  */
18930 $ac_includes_default
18931 int
18932 main ()
18933 {
18934 if ((int *) 0)
18935   return 0;
18936 if (sizeof (int))
18937   return 0;
18938   ;
18939   return 0;
18940 }
18941 _ACEOF
18942 rm -f conftest.$ac_objext
18943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18944   (eval $ac_compile) 2>conftest.er1
18945   ac_status=$?
18946   grep -v '^ *+' conftest.er1 >conftest.err
18947   rm -f conftest.er1
18948   cat conftest.err >&5
18949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18950   (exit $ac_status); } &&
18951          { ac_try='test -z "$ac_c_werror_flag"
18952                          || test ! -s conftest.err'
18953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18954   (eval $ac_try) 2>&5
18955   ac_status=$?
18956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18957   (exit $ac_status); }; } &&
18958          { ac_try='test -s conftest.$ac_objext'
18959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18960   (eval $ac_try) 2>&5
18961   ac_status=$?
18962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18963   (exit $ac_status); }; }; then
18964   ac_cv_type_int=yes
18965 else
18966   echo "$as_me: failed program was:" >&5
18967 sed 's/^/| /' conftest.$ac_ext >&5
18968
18969 ac_cv_type_int=no
18970 fi
18971 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18972 fi
18973 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
18974 echo "${ECHO_T}$ac_cv_type_int" >&6
18975
18976 echo "$as_me:$LINENO: checking alignment of int" >&5
18977 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
18978 if test "${pgac_cv_alignof_int+set}" = set; then
18979   echo $ECHO_N "(cached) $ECHO_C" >&6
18980 else
18981   if test "$ac_cv_type_int" = yes; then
18982   if test "$cross_compiling" = yes; then
18983   # Depending upon the size, compute the lo and hi bounds.
18984 cat >conftest.$ac_ext <<_ACEOF
18985 /* confdefs.h.  */
18986 _ACEOF
18987 cat confdefs.h >>conftest.$ac_ext
18988 cat >>conftest.$ac_ext <<_ACEOF
18989 /* end confdefs.h.  */
18990 $ac_includes_default
18991 struct { char filler; int field; } pgac_struct;
18992 int
18993 main ()
18994 {
18995 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18996 test_array [0] = 0
18997
18998   ;
18999   return 0;
19000 }
19001 _ACEOF
19002 rm -f conftest.$ac_objext
19003 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19004   (eval $ac_compile) 2>conftest.er1
19005   ac_status=$?
19006   grep -v '^ *+' conftest.er1 >conftest.err
19007   rm -f conftest.er1
19008   cat conftest.err >&5
19009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19010   (exit $ac_status); } &&
19011          { ac_try='test -z "$ac_c_werror_flag"
19012                          || test ! -s conftest.err'
19013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19014   (eval $ac_try) 2>&5
19015   ac_status=$?
19016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19017   (exit $ac_status); }; } &&
19018          { ac_try='test -s conftest.$ac_objext'
19019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19020   (eval $ac_try) 2>&5
19021   ac_status=$?
19022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19023   (exit $ac_status); }; }; then
19024   ac_lo=0 ac_mid=0
19025   while :; do
19026     cat >conftest.$ac_ext <<_ACEOF
19027 /* confdefs.h.  */
19028 _ACEOF
19029 cat confdefs.h >>conftest.$ac_ext
19030 cat >>conftest.$ac_ext <<_ACEOF
19031 /* end confdefs.h.  */
19032 $ac_includes_default
19033 struct { char filler; int field; } pgac_struct;
19034 int
19035 main ()
19036 {
19037 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19038 test_array [0] = 0
19039
19040   ;
19041   return 0;
19042 }
19043 _ACEOF
19044 rm -f conftest.$ac_objext
19045 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19046   (eval $ac_compile) 2>conftest.er1
19047   ac_status=$?
19048   grep -v '^ *+' conftest.er1 >conftest.err
19049   rm -f conftest.er1
19050   cat conftest.err >&5
19051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19052   (exit $ac_status); } &&
19053          { ac_try='test -z "$ac_c_werror_flag"
19054                          || test ! -s conftest.err'
19055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19056   (eval $ac_try) 2>&5
19057   ac_status=$?
19058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19059   (exit $ac_status); }; } &&
19060          { ac_try='test -s conftest.$ac_objext'
19061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19062   (eval $ac_try) 2>&5
19063   ac_status=$?
19064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19065   (exit $ac_status); }; }; then
19066   ac_hi=$ac_mid; break
19067 else
19068   echo "$as_me: failed program was:" >&5
19069 sed 's/^/| /' conftest.$ac_ext >&5
19070
19071 ac_lo=`expr $ac_mid + 1`
19072                     if test $ac_lo -le $ac_mid; then
19073                       ac_lo= ac_hi=
19074                       break
19075                     fi
19076                     ac_mid=`expr 2 '*' $ac_mid + 1`
19077 fi
19078 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19079   done
19080 else
19081   echo "$as_me: failed program was:" >&5
19082 sed 's/^/| /' conftest.$ac_ext >&5
19083
19084 cat >conftest.$ac_ext <<_ACEOF
19085 /* confdefs.h.  */
19086 _ACEOF
19087 cat confdefs.h >>conftest.$ac_ext
19088 cat >>conftest.$ac_ext <<_ACEOF
19089 /* end confdefs.h.  */
19090 $ac_includes_default
19091 struct { char filler; int field; } pgac_struct;
19092 int
19093 main ()
19094 {
19095 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19096 test_array [0] = 0
19097
19098   ;
19099   return 0;
19100 }
19101 _ACEOF
19102 rm -f conftest.$ac_objext
19103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19104   (eval $ac_compile) 2>conftest.er1
19105   ac_status=$?
19106   grep -v '^ *+' conftest.er1 >conftest.err
19107   rm -f conftest.er1
19108   cat conftest.err >&5
19109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19110   (exit $ac_status); } &&
19111          { ac_try='test -z "$ac_c_werror_flag"
19112                          || test ! -s conftest.err'
19113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19114   (eval $ac_try) 2>&5
19115   ac_status=$?
19116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19117   (exit $ac_status); }; } &&
19118          { ac_try='test -s conftest.$ac_objext'
19119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19120   (eval $ac_try) 2>&5
19121   ac_status=$?
19122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19123   (exit $ac_status); }; }; then
19124   ac_hi=-1 ac_mid=-1
19125   while :; do
19126     cat >conftest.$ac_ext <<_ACEOF
19127 /* confdefs.h.  */
19128 _ACEOF
19129 cat confdefs.h >>conftest.$ac_ext
19130 cat >>conftest.$ac_ext <<_ACEOF
19131 /* end confdefs.h.  */
19132 $ac_includes_default
19133 struct { char filler; int field; } pgac_struct;
19134 int
19135 main ()
19136 {
19137 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19138 test_array [0] = 0
19139
19140   ;
19141   return 0;
19142 }
19143 _ACEOF
19144 rm -f conftest.$ac_objext
19145 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19146   (eval $ac_compile) 2>conftest.er1
19147   ac_status=$?
19148   grep -v '^ *+' conftest.er1 >conftest.err
19149   rm -f conftest.er1
19150   cat conftest.err >&5
19151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19152   (exit $ac_status); } &&
19153          { ac_try='test -z "$ac_c_werror_flag"
19154                          || test ! -s conftest.err'
19155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19156   (eval $ac_try) 2>&5
19157   ac_status=$?
19158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19159   (exit $ac_status); }; } &&
19160          { ac_try='test -s conftest.$ac_objext'
19161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19162   (eval $ac_try) 2>&5
19163   ac_status=$?
19164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19165   (exit $ac_status); }; }; then
19166   ac_lo=$ac_mid; break
19167 else
19168   echo "$as_me: failed program was:" >&5
19169 sed 's/^/| /' conftest.$ac_ext >&5
19170
19171 ac_hi=`expr '(' $ac_mid ')' - 1`
19172                        if test $ac_mid -le $ac_hi; then
19173                          ac_lo= ac_hi=
19174                          break
19175                        fi
19176                        ac_mid=`expr 2 '*' $ac_mid`
19177 fi
19178 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19179   done
19180 else
19181   echo "$as_me: failed program was:" >&5
19182 sed 's/^/| /' conftest.$ac_ext >&5
19183
19184 ac_lo= ac_hi=
19185 fi
19186 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19187 fi
19188 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19189 # Binary search between lo and hi bounds.
19190 while test "x$ac_lo" != "x$ac_hi"; do
19191   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19192   cat >conftest.$ac_ext <<_ACEOF
19193 /* confdefs.h.  */
19194 _ACEOF
19195 cat confdefs.h >>conftest.$ac_ext
19196 cat >>conftest.$ac_ext <<_ACEOF
19197 /* end confdefs.h.  */
19198 $ac_includes_default
19199 struct { char filler; int field; } pgac_struct;
19200 int
19201 main ()
19202 {
19203 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19204 test_array [0] = 0
19205
19206   ;
19207   return 0;
19208 }
19209 _ACEOF
19210 rm -f conftest.$ac_objext
19211 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19212   (eval $ac_compile) 2>conftest.er1
19213   ac_status=$?
19214   grep -v '^ *+' conftest.er1 >conftest.err
19215   rm -f conftest.er1
19216   cat conftest.err >&5
19217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19218   (exit $ac_status); } &&
19219          { ac_try='test -z "$ac_c_werror_flag"
19220                          || test ! -s conftest.err'
19221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19222   (eval $ac_try) 2>&5
19223   ac_status=$?
19224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19225   (exit $ac_status); }; } &&
19226          { ac_try='test -s conftest.$ac_objext'
19227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19228   (eval $ac_try) 2>&5
19229   ac_status=$?
19230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19231   (exit $ac_status); }; }; then
19232   ac_hi=$ac_mid
19233 else
19234   echo "$as_me: failed program was:" >&5
19235 sed 's/^/| /' conftest.$ac_ext >&5
19236
19237 ac_lo=`expr '(' $ac_mid ')' + 1`
19238 fi
19239 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19240 done
19241 case $ac_lo in
19242 ?*) pgac_cv_alignof_int=$ac_lo;;
19243 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19244 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19245    { (exit 1); exit 1; }; } ;;
19246 esac
19247 else
19248   if test "$cross_compiling" = yes; then
19249   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19250 See \`config.log' for more details." >&5
19251 echo "$as_me: error: cannot run test program while cross compiling
19252 See \`config.log' for more details." >&2;}
19253    { (exit 1); exit 1; }; }
19254 else
19255   cat >conftest.$ac_ext <<_ACEOF
19256 /* confdefs.h.  */
19257 _ACEOF
19258 cat confdefs.h >>conftest.$ac_ext
19259 cat >>conftest.$ac_ext <<_ACEOF
19260 /* end confdefs.h.  */
19261 $ac_includes_default
19262 struct { char filler; int field; } pgac_struct;
19263 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19264 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19265 #include <stdio.h>
19266 #include <stdlib.h>
19267 int
19268 main ()
19269 {
19270
19271   FILE *f = fopen ("conftest.val", "w");
19272   if (! f)
19273     exit (1);
19274   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19275     {
19276       long i = longval ();
19277       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19278         exit (1);
19279       fprintf (f, "%ld\n", i);
19280     }
19281   else
19282     {
19283       unsigned long i = ulongval ();
19284       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19285         exit (1);
19286       fprintf (f, "%lu\n", i);
19287     }
19288   exit (ferror (f) || fclose (f) != 0);
19289
19290   ;
19291   return 0;
19292 }
19293 _ACEOF
19294 rm -f conftest$ac_exeext
19295 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19296   (eval $ac_link) 2>&5
19297   ac_status=$?
19298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19299   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19301   (eval $ac_try) 2>&5
19302   ac_status=$?
19303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19304   (exit $ac_status); }; }; then
19305   pgac_cv_alignof_int=`cat conftest.val`
19306 else
19307   echo "$as_me: program exited with status $ac_status" >&5
19308 echo "$as_me: failed program was:" >&5
19309 sed 's/^/| /' conftest.$ac_ext >&5
19310
19311 ( exit $ac_status )
19312 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19313 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19314    { (exit 1); exit 1; }; }
19315 fi
19316 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19317 fi
19318 fi
19319 rm -f conftest.val
19320 else
19321   pgac_cv_alignof_int=0
19322 fi
19323 fi
19324 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19325 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19326 cat >>confdefs.h <<_ACEOF
19327 #define ALIGNOF_INT $pgac_cv_alignof_int
19328 _ACEOF
19329
19330
19331 echo "$as_me:$LINENO: checking for long" >&5
19332 echo $ECHO_N "checking for long... $ECHO_C" >&6
19333 if test "${ac_cv_type_long+set}" = set; then
19334   echo $ECHO_N "(cached) $ECHO_C" >&6
19335 else
19336   cat >conftest.$ac_ext <<_ACEOF
19337 /* confdefs.h.  */
19338 _ACEOF
19339 cat confdefs.h >>conftest.$ac_ext
19340 cat >>conftest.$ac_ext <<_ACEOF
19341 /* end confdefs.h.  */
19342 $ac_includes_default
19343 int
19344 main ()
19345 {
19346 if ((long *) 0)
19347   return 0;
19348 if (sizeof (long))
19349   return 0;
19350   ;
19351   return 0;
19352 }
19353 _ACEOF
19354 rm -f conftest.$ac_objext
19355 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19356   (eval $ac_compile) 2>conftest.er1
19357   ac_status=$?
19358   grep -v '^ *+' conftest.er1 >conftest.err
19359   rm -f conftest.er1
19360   cat conftest.err >&5
19361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19362   (exit $ac_status); } &&
19363          { ac_try='test -z "$ac_c_werror_flag"
19364                          || test ! -s conftest.err'
19365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19366   (eval $ac_try) 2>&5
19367   ac_status=$?
19368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19369   (exit $ac_status); }; } &&
19370          { ac_try='test -s conftest.$ac_objext'
19371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19372   (eval $ac_try) 2>&5
19373   ac_status=$?
19374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19375   (exit $ac_status); }; }; then
19376   ac_cv_type_long=yes
19377 else
19378   echo "$as_me: failed program was:" >&5
19379 sed 's/^/| /' conftest.$ac_ext >&5
19380
19381 ac_cv_type_long=no
19382 fi
19383 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19384 fi
19385 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19386 echo "${ECHO_T}$ac_cv_type_long" >&6
19387
19388 echo "$as_me:$LINENO: checking alignment of long" >&5
19389 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19390 if test "${pgac_cv_alignof_long+set}" = set; then
19391   echo $ECHO_N "(cached) $ECHO_C" >&6
19392 else
19393   if test "$ac_cv_type_long" = yes; then
19394   if test "$cross_compiling" = yes; then
19395   # Depending upon the size, compute the lo and hi bounds.
19396 cat >conftest.$ac_ext <<_ACEOF
19397 /* confdefs.h.  */
19398 _ACEOF
19399 cat confdefs.h >>conftest.$ac_ext
19400 cat >>conftest.$ac_ext <<_ACEOF
19401 /* end confdefs.h.  */
19402 $ac_includes_default
19403 struct { char filler; long field; } pgac_struct;
19404 int
19405 main ()
19406 {
19407 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19408 test_array [0] = 0
19409
19410   ;
19411   return 0;
19412 }
19413 _ACEOF
19414 rm -f conftest.$ac_objext
19415 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19416   (eval $ac_compile) 2>conftest.er1
19417   ac_status=$?
19418   grep -v '^ *+' conftest.er1 >conftest.err
19419   rm -f conftest.er1
19420   cat conftest.err >&5
19421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19422   (exit $ac_status); } &&
19423          { ac_try='test -z "$ac_c_werror_flag"
19424                          || test ! -s conftest.err'
19425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19426   (eval $ac_try) 2>&5
19427   ac_status=$?
19428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19429   (exit $ac_status); }; } &&
19430          { ac_try='test -s conftest.$ac_objext'
19431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19432   (eval $ac_try) 2>&5
19433   ac_status=$?
19434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19435   (exit $ac_status); }; }; then
19436   ac_lo=0 ac_mid=0
19437   while :; do
19438     cat >conftest.$ac_ext <<_ACEOF
19439 /* confdefs.h.  */
19440 _ACEOF
19441 cat confdefs.h >>conftest.$ac_ext
19442 cat >>conftest.$ac_ext <<_ACEOF
19443 /* end confdefs.h.  */
19444 $ac_includes_default
19445 struct { char filler; long field; } pgac_struct;
19446 int
19447 main ()
19448 {
19449 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19450 test_array [0] = 0
19451
19452   ;
19453   return 0;
19454 }
19455 _ACEOF
19456 rm -f conftest.$ac_objext
19457 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19458   (eval $ac_compile) 2>conftest.er1
19459   ac_status=$?
19460   grep -v '^ *+' conftest.er1 >conftest.err
19461   rm -f conftest.er1
19462   cat conftest.err >&5
19463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19464   (exit $ac_status); } &&
19465          { ac_try='test -z "$ac_c_werror_flag"
19466                          || test ! -s conftest.err'
19467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19468   (eval $ac_try) 2>&5
19469   ac_status=$?
19470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19471   (exit $ac_status); }; } &&
19472          { ac_try='test -s conftest.$ac_objext'
19473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19474   (eval $ac_try) 2>&5
19475   ac_status=$?
19476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19477   (exit $ac_status); }; }; then
19478   ac_hi=$ac_mid; break
19479 else
19480   echo "$as_me: failed program was:" >&5
19481 sed 's/^/| /' conftest.$ac_ext >&5
19482
19483 ac_lo=`expr $ac_mid + 1`
19484                     if test $ac_lo -le $ac_mid; then
19485                       ac_lo= ac_hi=
19486                       break
19487                     fi
19488                     ac_mid=`expr 2 '*' $ac_mid + 1`
19489 fi
19490 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19491   done
19492 else
19493   echo "$as_me: failed program was:" >&5
19494 sed 's/^/| /' conftest.$ac_ext >&5
19495
19496 cat >conftest.$ac_ext <<_ACEOF
19497 /* confdefs.h.  */
19498 _ACEOF
19499 cat confdefs.h >>conftest.$ac_ext
19500 cat >>conftest.$ac_ext <<_ACEOF
19501 /* end confdefs.h.  */
19502 $ac_includes_default
19503 struct { char filler; long field; } pgac_struct;
19504 int
19505 main ()
19506 {
19507 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19508 test_array [0] = 0
19509
19510   ;
19511   return 0;
19512 }
19513 _ACEOF
19514 rm -f conftest.$ac_objext
19515 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19516   (eval $ac_compile) 2>conftest.er1
19517   ac_status=$?
19518   grep -v '^ *+' conftest.er1 >conftest.err
19519   rm -f conftest.er1
19520   cat conftest.err >&5
19521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19522   (exit $ac_status); } &&
19523          { ac_try='test -z "$ac_c_werror_flag"
19524                          || test ! -s conftest.err'
19525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19526   (eval $ac_try) 2>&5
19527   ac_status=$?
19528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19529   (exit $ac_status); }; } &&
19530          { ac_try='test -s conftest.$ac_objext'
19531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19532   (eval $ac_try) 2>&5
19533   ac_status=$?
19534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19535   (exit $ac_status); }; }; then
19536   ac_hi=-1 ac_mid=-1
19537   while :; do
19538     cat >conftest.$ac_ext <<_ACEOF
19539 /* confdefs.h.  */
19540 _ACEOF
19541 cat confdefs.h >>conftest.$ac_ext
19542 cat >>conftest.$ac_ext <<_ACEOF
19543 /* end confdefs.h.  */
19544 $ac_includes_default
19545 struct { char filler; long field; } pgac_struct;
19546 int
19547 main ()
19548 {
19549 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19550 test_array [0] = 0
19551
19552   ;
19553   return 0;
19554 }
19555 _ACEOF
19556 rm -f conftest.$ac_objext
19557 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19558   (eval $ac_compile) 2>conftest.er1
19559   ac_status=$?
19560   grep -v '^ *+' conftest.er1 >conftest.err
19561   rm -f conftest.er1
19562   cat conftest.err >&5
19563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19564   (exit $ac_status); } &&
19565          { ac_try='test -z "$ac_c_werror_flag"
19566                          || test ! -s conftest.err'
19567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19568   (eval $ac_try) 2>&5
19569   ac_status=$?
19570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19571   (exit $ac_status); }; } &&
19572          { ac_try='test -s conftest.$ac_objext'
19573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19574   (eval $ac_try) 2>&5
19575   ac_status=$?
19576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19577   (exit $ac_status); }; }; then
19578   ac_lo=$ac_mid; break
19579 else
19580   echo "$as_me: failed program was:" >&5
19581 sed 's/^/| /' conftest.$ac_ext >&5
19582
19583 ac_hi=`expr '(' $ac_mid ')' - 1`
19584                        if test $ac_mid -le $ac_hi; then
19585                          ac_lo= ac_hi=
19586                          break
19587                        fi
19588                        ac_mid=`expr 2 '*' $ac_mid`
19589 fi
19590 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19591   done
19592 else
19593   echo "$as_me: failed program was:" >&5
19594 sed 's/^/| /' conftest.$ac_ext >&5
19595
19596 ac_lo= ac_hi=
19597 fi
19598 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19599 fi
19600 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19601 # Binary search between lo and hi bounds.
19602 while test "x$ac_lo" != "x$ac_hi"; do
19603   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19604   cat >conftest.$ac_ext <<_ACEOF
19605 /* confdefs.h.  */
19606 _ACEOF
19607 cat confdefs.h >>conftest.$ac_ext
19608 cat >>conftest.$ac_ext <<_ACEOF
19609 /* end confdefs.h.  */
19610 $ac_includes_default
19611 struct { char filler; long field; } pgac_struct;
19612 int
19613 main ()
19614 {
19615 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19616 test_array [0] = 0
19617
19618   ;
19619   return 0;
19620 }
19621 _ACEOF
19622 rm -f conftest.$ac_objext
19623 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19624   (eval $ac_compile) 2>conftest.er1
19625   ac_status=$?
19626   grep -v '^ *+' conftest.er1 >conftest.err
19627   rm -f conftest.er1
19628   cat conftest.err >&5
19629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19630   (exit $ac_status); } &&
19631          { ac_try='test -z "$ac_c_werror_flag"
19632                          || test ! -s conftest.err'
19633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19634   (eval $ac_try) 2>&5
19635   ac_status=$?
19636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19637   (exit $ac_status); }; } &&
19638          { ac_try='test -s conftest.$ac_objext'
19639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19640   (eval $ac_try) 2>&5
19641   ac_status=$?
19642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19643   (exit $ac_status); }; }; then
19644   ac_hi=$ac_mid
19645 else
19646   echo "$as_me: failed program was:" >&5
19647 sed 's/^/| /' conftest.$ac_ext >&5
19648
19649 ac_lo=`expr '(' $ac_mid ')' + 1`
19650 fi
19651 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19652 done
19653 case $ac_lo in
19654 ?*) pgac_cv_alignof_long=$ac_lo;;
19655 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19656 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19657    { (exit 1); exit 1; }; } ;;
19658 esac
19659 else
19660   if test "$cross_compiling" = yes; then
19661   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19662 See \`config.log' for more details." >&5
19663 echo "$as_me: error: cannot run test program while cross compiling
19664 See \`config.log' for more details." >&2;}
19665    { (exit 1); exit 1; }; }
19666 else
19667   cat >conftest.$ac_ext <<_ACEOF
19668 /* confdefs.h.  */
19669 _ACEOF
19670 cat confdefs.h >>conftest.$ac_ext
19671 cat >>conftest.$ac_ext <<_ACEOF
19672 /* end confdefs.h.  */
19673 $ac_includes_default
19674 struct { char filler; long field; } pgac_struct;
19675 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19676 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19677 #include <stdio.h>
19678 #include <stdlib.h>
19679 int
19680 main ()
19681 {
19682
19683   FILE *f = fopen ("conftest.val", "w");
19684   if (! f)
19685     exit (1);
19686   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19687     {
19688       long i = longval ();
19689       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19690         exit (1);
19691       fprintf (f, "%ld\n", i);
19692     }
19693   else
19694     {
19695       unsigned long i = ulongval ();
19696       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19697         exit (1);
19698       fprintf (f, "%lu\n", i);
19699     }
19700   exit (ferror (f) || fclose (f) != 0);
19701
19702   ;
19703   return 0;
19704 }
19705 _ACEOF
19706 rm -f conftest$ac_exeext
19707 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19708   (eval $ac_link) 2>&5
19709   ac_status=$?
19710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19711   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19713   (eval $ac_try) 2>&5
19714   ac_status=$?
19715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19716   (exit $ac_status); }; }; then
19717   pgac_cv_alignof_long=`cat conftest.val`
19718 else
19719   echo "$as_me: program exited with status $ac_status" >&5
19720 echo "$as_me: failed program was:" >&5
19721 sed 's/^/| /' conftest.$ac_ext >&5
19722
19723 ( exit $ac_status )
19724 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19725 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19726    { (exit 1); exit 1; }; }
19727 fi
19728 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19729 fi
19730 fi
19731 rm -f conftest.val
19732 else
19733   pgac_cv_alignof_long=0
19734 fi
19735 fi
19736 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
19737 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
19738 cat >>confdefs.h <<_ACEOF
19739 #define ALIGNOF_LONG $pgac_cv_alignof_long
19740 _ACEOF
19741
19742
19743 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
19744   echo "$as_me:$LINENO: checking for long long int" >&5
19745 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
19746 if test "${ac_cv_type_long_long_int+set}" = set; then
19747   echo $ECHO_N "(cached) $ECHO_C" >&6
19748 else
19749   cat >conftest.$ac_ext <<_ACEOF
19750 /* confdefs.h.  */
19751 _ACEOF
19752 cat confdefs.h >>conftest.$ac_ext
19753 cat >>conftest.$ac_ext <<_ACEOF
19754 /* end confdefs.h.  */
19755 $ac_includes_default
19756 int
19757 main ()
19758 {
19759 if ((long long int *) 0)
19760   return 0;
19761 if (sizeof (long long int))
19762   return 0;
19763   ;
19764   return 0;
19765 }
19766 _ACEOF
19767 rm -f conftest.$ac_objext
19768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19769   (eval $ac_compile) 2>conftest.er1
19770   ac_status=$?
19771   grep -v '^ *+' conftest.er1 >conftest.err
19772   rm -f conftest.er1
19773   cat conftest.err >&5
19774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19775   (exit $ac_status); } &&
19776          { ac_try='test -z "$ac_c_werror_flag"
19777                          || test ! -s conftest.err'
19778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19779   (eval $ac_try) 2>&5
19780   ac_status=$?
19781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19782   (exit $ac_status); }; } &&
19783          { ac_try='test -s conftest.$ac_objext'
19784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19785   (eval $ac_try) 2>&5
19786   ac_status=$?
19787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19788   (exit $ac_status); }; }; then
19789   ac_cv_type_long_long_int=yes
19790 else
19791   echo "$as_me: failed program was:" >&5
19792 sed 's/^/| /' conftest.$ac_ext >&5
19793
19794 ac_cv_type_long_long_int=no
19795 fi
19796 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19797 fi
19798 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
19799 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
19800
19801 echo "$as_me:$LINENO: checking alignment of long long int" >&5
19802 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
19803 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
19804   echo $ECHO_N "(cached) $ECHO_C" >&6
19805 else
19806   if test "$ac_cv_type_long_long_int" = yes; then
19807   if test "$cross_compiling" = yes; then
19808   # Depending upon the size, compute the lo and hi bounds.
19809 cat >conftest.$ac_ext <<_ACEOF
19810 /* confdefs.h.  */
19811 _ACEOF
19812 cat confdefs.h >>conftest.$ac_ext
19813 cat >>conftest.$ac_ext <<_ACEOF
19814 /* end confdefs.h.  */
19815 $ac_includes_default
19816 struct { char filler; long long int field; } pgac_struct;
19817 int
19818 main ()
19819 {
19820 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19821 test_array [0] = 0
19822
19823   ;
19824   return 0;
19825 }
19826 _ACEOF
19827 rm -f conftest.$ac_objext
19828 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19829   (eval $ac_compile) 2>conftest.er1
19830   ac_status=$?
19831   grep -v '^ *+' conftest.er1 >conftest.err
19832   rm -f conftest.er1
19833   cat conftest.err >&5
19834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19835   (exit $ac_status); } &&
19836          { ac_try='test -z "$ac_c_werror_flag"
19837                          || test ! -s conftest.err'
19838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19839   (eval $ac_try) 2>&5
19840   ac_status=$?
19841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19842   (exit $ac_status); }; } &&
19843          { ac_try='test -s conftest.$ac_objext'
19844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19845   (eval $ac_try) 2>&5
19846   ac_status=$?
19847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19848   (exit $ac_status); }; }; then
19849   ac_lo=0 ac_mid=0
19850   while :; do
19851     cat >conftest.$ac_ext <<_ACEOF
19852 /* confdefs.h.  */
19853 _ACEOF
19854 cat confdefs.h >>conftest.$ac_ext
19855 cat >>conftest.$ac_ext <<_ACEOF
19856 /* end confdefs.h.  */
19857 $ac_includes_default
19858 struct { char filler; long long int field; } pgac_struct;
19859 int
19860 main ()
19861 {
19862 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19863 test_array [0] = 0
19864
19865   ;
19866   return 0;
19867 }
19868 _ACEOF
19869 rm -f conftest.$ac_objext
19870 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19871   (eval $ac_compile) 2>conftest.er1
19872   ac_status=$?
19873   grep -v '^ *+' conftest.er1 >conftest.err
19874   rm -f conftest.er1
19875   cat conftest.err >&5
19876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19877   (exit $ac_status); } &&
19878          { ac_try='test -z "$ac_c_werror_flag"
19879                          || test ! -s conftest.err'
19880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19881   (eval $ac_try) 2>&5
19882   ac_status=$?
19883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19884   (exit $ac_status); }; } &&
19885          { ac_try='test -s conftest.$ac_objext'
19886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19887   (eval $ac_try) 2>&5
19888   ac_status=$?
19889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19890   (exit $ac_status); }; }; then
19891   ac_hi=$ac_mid; break
19892 else
19893   echo "$as_me: failed program was:" >&5
19894 sed 's/^/| /' conftest.$ac_ext >&5
19895
19896 ac_lo=`expr $ac_mid + 1`
19897                     if test $ac_lo -le $ac_mid; then
19898                       ac_lo= ac_hi=
19899                       break
19900                     fi
19901                     ac_mid=`expr 2 '*' $ac_mid + 1`
19902 fi
19903 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19904   done
19905 else
19906   echo "$as_me: failed program was:" >&5
19907 sed 's/^/| /' conftest.$ac_ext >&5
19908
19909 cat >conftest.$ac_ext <<_ACEOF
19910 /* confdefs.h.  */
19911 _ACEOF
19912 cat confdefs.h >>conftest.$ac_ext
19913 cat >>conftest.$ac_ext <<_ACEOF
19914 /* end confdefs.h.  */
19915 $ac_includes_default
19916 struct { char filler; long long int field; } pgac_struct;
19917 int
19918 main ()
19919 {
19920 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19921 test_array [0] = 0
19922
19923   ;
19924   return 0;
19925 }
19926 _ACEOF
19927 rm -f conftest.$ac_objext
19928 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19929   (eval $ac_compile) 2>conftest.er1
19930   ac_status=$?
19931   grep -v '^ *+' conftest.er1 >conftest.err
19932   rm -f conftest.er1
19933   cat conftest.err >&5
19934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19935   (exit $ac_status); } &&
19936          { ac_try='test -z "$ac_c_werror_flag"
19937                          || test ! -s conftest.err'
19938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19939   (eval $ac_try) 2>&5
19940   ac_status=$?
19941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19942   (exit $ac_status); }; } &&
19943          { ac_try='test -s conftest.$ac_objext'
19944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19945   (eval $ac_try) 2>&5
19946   ac_status=$?
19947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19948   (exit $ac_status); }; }; then
19949   ac_hi=-1 ac_mid=-1
19950   while :; do
19951     cat >conftest.$ac_ext <<_ACEOF
19952 /* confdefs.h.  */
19953 _ACEOF
19954 cat confdefs.h >>conftest.$ac_ext
19955 cat >>conftest.$ac_ext <<_ACEOF
19956 /* end confdefs.h.  */
19957 $ac_includes_default
19958 struct { char filler; long long int field; } pgac_struct;
19959 int
19960 main ()
19961 {
19962 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19963 test_array [0] = 0
19964
19965   ;
19966   return 0;
19967 }
19968 _ACEOF
19969 rm -f conftest.$ac_objext
19970 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19971   (eval $ac_compile) 2>conftest.er1
19972   ac_status=$?
19973   grep -v '^ *+' conftest.er1 >conftest.err
19974   rm -f conftest.er1
19975   cat conftest.err >&5
19976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19977   (exit $ac_status); } &&
19978          { ac_try='test -z "$ac_c_werror_flag"
19979                          || test ! -s conftest.err'
19980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19981   (eval $ac_try) 2>&5
19982   ac_status=$?
19983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19984   (exit $ac_status); }; } &&
19985          { ac_try='test -s conftest.$ac_objext'
19986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19987   (eval $ac_try) 2>&5
19988   ac_status=$?
19989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19990   (exit $ac_status); }; }; then
19991   ac_lo=$ac_mid; break
19992 else
19993   echo "$as_me: failed program was:" >&5
19994 sed 's/^/| /' conftest.$ac_ext >&5
19995
19996 ac_hi=`expr '(' $ac_mid ')' - 1`
19997                        if test $ac_mid -le $ac_hi; then
19998                          ac_lo= ac_hi=
19999                          break
20000                        fi
20001                        ac_mid=`expr 2 '*' $ac_mid`
20002 fi
20003 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20004   done
20005 else
20006   echo "$as_me: failed program was:" >&5
20007 sed 's/^/| /' conftest.$ac_ext >&5
20008
20009 ac_lo= ac_hi=
20010 fi
20011 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20012 fi
20013 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20014 # Binary search between lo and hi bounds.
20015 while test "x$ac_lo" != "x$ac_hi"; do
20016   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20017   cat >conftest.$ac_ext <<_ACEOF
20018 /* confdefs.h.  */
20019 _ACEOF
20020 cat confdefs.h >>conftest.$ac_ext
20021 cat >>conftest.$ac_ext <<_ACEOF
20022 /* end confdefs.h.  */
20023 $ac_includes_default
20024 struct { char filler; long long int field; } pgac_struct;
20025 int
20026 main ()
20027 {
20028 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20029 test_array [0] = 0
20030
20031   ;
20032   return 0;
20033 }
20034 _ACEOF
20035 rm -f conftest.$ac_objext
20036 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20037   (eval $ac_compile) 2>conftest.er1
20038   ac_status=$?
20039   grep -v '^ *+' conftest.er1 >conftest.err
20040   rm -f conftest.er1
20041   cat conftest.err >&5
20042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20043   (exit $ac_status); } &&
20044          { ac_try='test -z "$ac_c_werror_flag"
20045                          || test ! -s conftest.err'
20046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20047   (eval $ac_try) 2>&5
20048   ac_status=$?
20049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20050   (exit $ac_status); }; } &&
20051          { ac_try='test -s conftest.$ac_objext'
20052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20053   (eval $ac_try) 2>&5
20054   ac_status=$?
20055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20056   (exit $ac_status); }; }; then
20057   ac_hi=$ac_mid
20058 else
20059   echo "$as_me: failed program was:" >&5
20060 sed 's/^/| /' conftest.$ac_ext >&5
20061
20062 ac_lo=`expr '(' $ac_mid ')' + 1`
20063 fi
20064 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20065 done
20066 case $ac_lo in
20067 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20068 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20069 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20070    { (exit 1); exit 1; }; } ;;
20071 esac
20072 else
20073   if test "$cross_compiling" = yes; then
20074   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20075 See \`config.log' for more details." >&5
20076 echo "$as_me: error: cannot run test program while cross compiling
20077 See \`config.log' for more details." >&2;}
20078    { (exit 1); exit 1; }; }
20079 else
20080   cat >conftest.$ac_ext <<_ACEOF
20081 /* confdefs.h.  */
20082 _ACEOF
20083 cat confdefs.h >>conftest.$ac_ext
20084 cat >>conftest.$ac_ext <<_ACEOF
20085 /* end confdefs.h.  */
20086 $ac_includes_default
20087 struct { char filler; long long int field; } pgac_struct;
20088 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20089 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20090 #include <stdio.h>
20091 #include <stdlib.h>
20092 int
20093 main ()
20094 {
20095
20096   FILE *f = fopen ("conftest.val", "w");
20097   if (! f)
20098     exit (1);
20099   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20100     {
20101       long i = longval ();
20102       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20103         exit (1);
20104       fprintf (f, "%ld\n", i);
20105     }
20106   else
20107     {
20108       unsigned long i = ulongval ();
20109       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20110         exit (1);
20111       fprintf (f, "%lu\n", i);
20112     }
20113   exit (ferror (f) || fclose (f) != 0);
20114
20115   ;
20116   return 0;
20117 }
20118 _ACEOF
20119 rm -f conftest$ac_exeext
20120 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20121   (eval $ac_link) 2>&5
20122   ac_status=$?
20123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20124   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20126   (eval $ac_try) 2>&5
20127   ac_status=$?
20128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20129   (exit $ac_status); }; }; then
20130   pgac_cv_alignof_long_long_int=`cat conftest.val`
20131 else
20132   echo "$as_me: program exited with status $ac_status" >&5
20133 echo "$as_me: failed program was:" >&5
20134 sed 's/^/| /' conftest.$ac_ext >&5
20135
20136 ( exit $ac_status )
20137 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20138 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20139    { (exit 1); exit 1; }; }
20140 fi
20141 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20142 fi
20143 fi
20144 rm -f conftest.val
20145 else
20146   pgac_cv_alignof_long_long_int=0
20147 fi
20148 fi
20149 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20150 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20151 cat >>confdefs.h <<_ACEOF
20152 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20153 _ACEOF
20154
20155
20156 fi
20157 echo "$as_me:$LINENO: checking for double" >&5
20158 echo $ECHO_N "checking for double... $ECHO_C" >&6
20159 if test "${ac_cv_type_double+set}" = set; then
20160   echo $ECHO_N "(cached) $ECHO_C" >&6
20161 else
20162   cat >conftest.$ac_ext <<_ACEOF
20163 /* confdefs.h.  */
20164 _ACEOF
20165 cat confdefs.h >>conftest.$ac_ext
20166 cat >>conftest.$ac_ext <<_ACEOF
20167 /* end confdefs.h.  */
20168 $ac_includes_default
20169 int
20170 main ()
20171 {
20172 if ((double *) 0)
20173   return 0;
20174 if (sizeof (double))
20175   return 0;
20176   ;
20177   return 0;
20178 }
20179 _ACEOF
20180 rm -f conftest.$ac_objext
20181 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20182   (eval $ac_compile) 2>conftest.er1
20183   ac_status=$?
20184   grep -v '^ *+' conftest.er1 >conftest.err
20185   rm -f conftest.er1
20186   cat conftest.err >&5
20187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20188   (exit $ac_status); } &&
20189          { ac_try='test -z "$ac_c_werror_flag"
20190                          || test ! -s conftest.err'
20191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20192   (eval $ac_try) 2>&5
20193   ac_status=$?
20194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20195   (exit $ac_status); }; } &&
20196          { ac_try='test -s conftest.$ac_objext'
20197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20198   (eval $ac_try) 2>&5
20199   ac_status=$?
20200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20201   (exit $ac_status); }; }; then
20202   ac_cv_type_double=yes
20203 else
20204   echo "$as_me: failed program was:" >&5
20205 sed 's/^/| /' conftest.$ac_ext >&5
20206
20207 ac_cv_type_double=no
20208 fi
20209 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20210 fi
20211 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20212 echo "${ECHO_T}$ac_cv_type_double" >&6
20213
20214 echo "$as_me:$LINENO: checking alignment of double" >&5
20215 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20216 if test "${pgac_cv_alignof_double+set}" = set; then
20217   echo $ECHO_N "(cached) $ECHO_C" >&6
20218 else
20219   if test "$ac_cv_type_double" = yes; then
20220   if test "$cross_compiling" = yes; then
20221   # Depending upon the size, compute the lo and hi bounds.
20222 cat >conftest.$ac_ext <<_ACEOF
20223 /* confdefs.h.  */
20224 _ACEOF
20225 cat confdefs.h >>conftest.$ac_ext
20226 cat >>conftest.$ac_ext <<_ACEOF
20227 /* end confdefs.h.  */
20228 $ac_includes_default
20229 struct { char filler; double field; } pgac_struct;
20230 int
20231 main ()
20232 {
20233 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20234 test_array [0] = 0
20235
20236   ;
20237   return 0;
20238 }
20239 _ACEOF
20240 rm -f conftest.$ac_objext
20241 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20242   (eval $ac_compile) 2>conftest.er1
20243   ac_status=$?
20244   grep -v '^ *+' conftest.er1 >conftest.err
20245   rm -f conftest.er1
20246   cat conftest.err >&5
20247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20248   (exit $ac_status); } &&
20249          { ac_try='test -z "$ac_c_werror_flag"
20250                          || test ! -s conftest.err'
20251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20252   (eval $ac_try) 2>&5
20253   ac_status=$?
20254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20255   (exit $ac_status); }; } &&
20256          { ac_try='test -s conftest.$ac_objext'
20257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20258   (eval $ac_try) 2>&5
20259   ac_status=$?
20260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20261   (exit $ac_status); }; }; then
20262   ac_lo=0 ac_mid=0
20263   while :; do
20264     cat >conftest.$ac_ext <<_ACEOF
20265 /* confdefs.h.  */
20266 _ACEOF
20267 cat confdefs.h >>conftest.$ac_ext
20268 cat >>conftest.$ac_ext <<_ACEOF
20269 /* end confdefs.h.  */
20270 $ac_includes_default
20271 struct { char filler; double field; } pgac_struct;
20272 int
20273 main ()
20274 {
20275 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20276 test_array [0] = 0
20277
20278   ;
20279   return 0;
20280 }
20281 _ACEOF
20282 rm -f conftest.$ac_objext
20283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20284   (eval $ac_compile) 2>conftest.er1
20285   ac_status=$?
20286   grep -v '^ *+' conftest.er1 >conftest.err
20287   rm -f conftest.er1
20288   cat conftest.err >&5
20289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20290   (exit $ac_status); } &&
20291          { ac_try='test -z "$ac_c_werror_flag"
20292                          || test ! -s conftest.err'
20293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20294   (eval $ac_try) 2>&5
20295   ac_status=$?
20296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20297   (exit $ac_status); }; } &&
20298          { ac_try='test -s conftest.$ac_objext'
20299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20300   (eval $ac_try) 2>&5
20301   ac_status=$?
20302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20303   (exit $ac_status); }; }; then
20304   ac_hi=$ac_mid; break
20305 else
20306   echo "$as_me: failed program was:" >&5
20307 sed 's/^/| /' conftest.$ac_ext >&5
20308
20309 ac_lo=`expr $ac_mid + 1`
20310                     if test $ac_lo -le $ac_mid; then
20311                       ac_lo= ac_hi=
20312                       break
20313                     fi
20314                     ac_mid=`expr 2 '*' $ac_mid + 1`
20315 fi
20316 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20317   done
20318 else
20319   echo "$as_me: failed program was:" >&5
20320 sed 's/^/| /' conftest.$ac_ext >&5
20321
20322 cat >conftest.$ac_ext <<_ACEOF
20323 /* confdefs.h.  */
20324 _ACEOF
20325 cat confdefs.h >>conftest.$ac_ext
20326 cat >>conftest.$ac_ext <<_ACEOF
20327 /* end confdefs.h.  */
20328 $ac_includes_default
20329 struct { char filler; double field; } pgac_struct;
20330 int
20331 main ()
20332 {
20333 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20334 test_array [0] = 0
20335
20336   ;
20337   return 0;
20338 }
20339 _ACEOF
20340 rm -f conftest.$ac_objext
20341 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20342   (eval $ac_compile) 2>conftest.er1
20343   ac_status=$?
20344   grep -v '^ *+' conftest.er1 >conftest.err
20345   rm -f conftest.er1
20346   cat conftest.err >&5
20347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20348   (exit $ac_status); } &&
20349          { ac_try='test -z "$ac_c_werror_flag"
20350                          || test ! -s conftest.err'
20351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20352   (eval $ac_try) 2>&5
20353   ac_status=$?
20354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20355   (exit $ac_status); }; } &&
20356          { ac_try='test -s conftest.$ac_objext'
20357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20358   (eval $ac_try) 2>&5
20359   ac_status=$?
20360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20361   (exit $ac_status); }; }; then
20362   ac_hi=-1 ac_mid=-1
20363   while :; do
20364     cat >conftest.$ac_ext <<_ACEOF
20365 /* confdefs.h.  */
20366 _ACEOF
20367 cat confdefs.h >>conftest.$ac_ext
20368 cat >>conftest.$ac_ext <<_ACEOF
20369 /* end confdefs.h.  */
20370 $ac_includes_default
20371 struct { char filler; double field; } pgac_struct;
20372 int
20373 main ()
20374 {
20375 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20376 test_array [0] = 0
20377
20378   ;
20379   return 0;
20380 }
20381 _ACEOF
20382 rm -f conftest.$ac_objext
20383 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20384   (eval $ac_compile) 2>conftest.er1
20385   ac_status=$?
20386   grep -v '^ *+' conftest.er1 >conftest.err
20387   rm -f conftest.er1
20388   cat conftest.err >&5
20389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20390   (exit $ac_status); } &&
20391          { ac_try='test -z "$ac_c_werror_flag"
20392                          || test ! -s conftest.err'
20393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20394   (eval $ac_try) 2>&5
20395   ac_status=$?
20396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20397   (exit $ac_status); }; } &&
20398          { ac_try='test -s conftest.$ac_objext'
20399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20400   (eval $ac_try) 2>&5
20401   ac_status=$?
20402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20403   (exit $ac_status); }; }; then
20404   ac_lo=$ac_mid; break
20405 else
20406   echo "$as_me: failed program was:" >&5
20407 sed 's/^/| /' conftest.$ac_ext >&5
20408
20409 ac_hi=`expr '(' $ac_mid ')' - 1`
20410                        if test $ac_mid -le $ac_hi; then
20411                          ac_lo= ac_hi=
20412                          break
20413                        fi
20414                        ac_mid=`expr 2 '*' $ac_mid`
20415 fi
20416 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20417   done
20418 else
20419   echo "$as_me: failed program was:" >&5
20420 sed 's/^/| /' conftest.$ac_ext >&5
20421
20422 ac_lo= ac_hi=
20423 fi
20424 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20425 fi
20426 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20427 # Binary search between lo and hi bounds.
20428 while test "x$ac_lo" != "x$ac_hi"; do
20429   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20430   cat >conftest.$ac_ext <<_ACEOF
20431 /* confdefs.h.  */
20432 _ACEOF
20433 cat confdefs.h >>conftest.$ac_ext
20434 cat >>conftest.$ac_ext <<_ACEOF
20435 /* end confdefs.h.  */
20436 $ac_includes_default
20437 struct { char filler; double field; } pgac_struct;
20438 int
20439 main ()
20440 {
20441 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20442 test_array [0] = 0
20443
20444   ;
20445   return 0;
20446 }
20447 _ACEOF
20448 rm -f conftest.$ac_objext
20449 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20450   (eval $ac_compile) 2>conftest.er1
20451   ac_status=$?
20452   grep -v '^ *+' conftest.er1 >conftest.err
20453   rm -f conftest.er1
20454   cat conftest.err >&5
20455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20456   (exit $ac_status); } &&
20457          { ac_try='test -z "$ac_c_werror_flag"
20458                          || test ! -s conftest.err'
20459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20460   (eval $ac_try) 2>&5
20461   ac_status=$?
20462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20463   (exit $ac_status); }; } &&
20464          { ac_try='test -s conftest.$ac_objext'
20465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20466   (eval $ac_try) 2>&5
20467   ac_status=$?
20468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20469   (exit $ac_status); }; }; then
20470   ac_hi=$ac_mid
20471 else
20472   echo "$as_me: failed program was:" >&5
20473 sed 's/^/| /' conftest.$ac_ext >&5
20474
20475 ac_lo=`expr '(' $ac_mid ')' + 1`
20476 fi
20477 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20478 done
20479 case $ac_lo in
20480 ?*) pgac_cv_alignof_double=$ac_lo;;
20481 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20482 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20483    { (exit 1); exit 1; }; } ;;
20484 esac
20485 else
20486   if test "$cross_compiling" = yes; then
20487   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20488 See \`config.log' for more details." >&5
20489 echo "$as_me: error: cannot run test program while cross compiling
20490 See \`config.log' for more details." >&2;}
20491    { (exit 1); exit 1; }; }
20492 else
20493   cat >conftest.$ac_ext <<_ACEOF
20494 /* confdefs.h.  */
20495 _ACEOF
20496 cat confdefs.h >>conftest.$ac_ext
20497 cat >>conftest.$ac_ext <<_ACEOF
20498 /* end confdefs.h.  */
20499 $ac_includes_default
20500 struct { char filler; double field; } pgac_struct;
20501 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20502 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20503 #include <stdio.h>
20504 #include <stdlib.h>
20505 int
20506 main ()
20507 {
20508
20509   FILE *f = fopen ("conftest.val", "w");
20510   if (! f)
20511     exit (1);
20512   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20513     {
20514       long i = longval ();
20515       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20516         exit (1);
20517       fprintf (f, "%ld\n", i);
20518     }
20519   else
20520     {
20521       unsigned long i = ulongval ();
20522       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20523         exit (1);
20524       fprintf (f, "%lu\n", i);
20525     }
20526   exit (ferror (f) || fclose (f) != 0);
20527
20528   ;
20529   return 0;
20530 }
20531 _ACEOF
20532 rm -f conftest$ac_exeext
20533 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20534   (eval $ac_link) 2>&5
20535   ac_status=$?
20536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20537   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20539   (eval $ac_try) 2>&5
20540   ac_status=$?
20541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20542   (exit $ac_status); }; }; then
20543   pgac_cv_alignof_double=`cat conftest.val`
20544 else
20545   echo "$as_me: program exited with status $ac_status" >&5
20546 echo "$as_me: failed program was:" >&5
20547 sed 's/^/| /' conftest.$ac_ext >&5
20548
20549 ( exit $ac_status )
20550 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20551 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20552    { (exit 1); exit 1; }; }
20553 fi
20554 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20555 fi
20556 fi
20557 rm -f conftest.val
20558 else
20559   pgac_cv_alignof_double=0
20560 fi
20561 fi
20562 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20563 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20564 cat >>confdefs.h <<_ACEOF
20565 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20566 _ACEOF
20567
20568
20569
20570 # Compute maximum alignment of any basic type.
20571 # We assume long's alignment is at least as strong as char, short, or int;
20572 # but we must check long long (if it exists) and double.
20573
20574 MAX_ALIGNOF=$pgac_cv_alignof_long
20575 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20576   MAX_ALIGNOF=$pgac_cv_alignof_double
20577 fi
20578 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20579   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20580 fi
20581
20582 cat >>confdefs.h <<_ACEOF
20583 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20584 _ACEOF
20585
20586
20587
20588 # Some platforms predefine the types int8, int16, etc.  Only check
20589 # a (hopefully) representative subset.
20590 echo "$as_me:$LINENO: checking for int8" >&5
20591 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20592 if test "${ac_cv_type_int8+set}" = set; then
20593   echo $ECHO_N "(cached) $ECHO_C" >&6
20594 else
20595   cat >conftest.$ac_ext <<_ACEOF
20596 /* confdefs.h.  */
20597 _ACEOF
20598 cat confdefs.h >>conftest.$ac_ext
20599 cat >>conftest.$ac_ext <<_ACEOF
20600 /* end confdefs.h.  */
20601 #include <stdio.h>
20602 #ifdef HAVE_SUPPORTDEFS_H
20603 #include <SupportDefs.h>
20604 #endif
20605
20606 int
20607 main ()
20608 {
20609 if ((int8 *) 0)
20610   return 0;
20611 if (sizeof (int8))
20612   return 0;
20613   ;
20614   return 0;
20615 }
20616 _ACEOF
20617 rm -f conftest.$ac_objext
20618 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20619   (eval $ac_compile) 2>conftest.er1
20620   ac_status=$?
20621   grep -v '^ *+' conftest.er1 >conftest.err
20622   rm -f conftest.er1
20623   cat conftest.err >&5
20624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20625   (exit $ac_status); } &&
20626          { ac_try='test -z "$ac_c_werror_flag"
20627                          || test ! -s conftest.err'
20628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20629   (eval $ac_try) 2>&5
20630   ac_status=$?
20631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20632   (exit $ac_status); }; } &&
20633          { ac_try='test -s conftest.$ac_objext'
20634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20635   (eval $ac_try) 2>&5
20636   ac_status=$?
20637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20638   (exit $ac_status); }; }; then
20639   ac_cv_type_int8=yes
20640 else
20641   echo "$as_me: failed program was:" >&5
20642 sed 's/^/| /' conftest.$ac_ext >&5
20643
20644 ac_cv_type_int8=no
20645 fi
20646 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20647 fi
20648 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20649 echo "${ECHO_T}$ac_cv_type_int8" >&6
20650 if test $ac_cv_type_int8 = yes; then
20651
20652 cat >>confdefs.h <<_ACEOF
20653 #define HAVE_INT8 1
20654 _ACEOF
20655
20656
20657 fi
20658 echo "$as_me:$LINENO: checking for uint8" >&5
20659 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20660 if test "${ac_cv_type_uint8+set}" = set; then
20661   echo $ECHO_N "(cached) $ECHO_C" >&6
20662 else
20663   cat >conftest.$ac_ext <<_ACEOF
20664 /* confdefs.h.  */
20665 _ACEOF
20666 cat confdefs.h >>conftest.$ac_ext
20667 cat >>conftest.$ac_ext <<_ACEOF
20668 /* end confdefs.h.  */
20669 #include <stdio.h>
20670 #ifdef HAVE_SUPPORTDEFS_H
20671 #include <SupportDefs.h>
20672 #endif
20673
20674 int
20675 main ()
20676 {
20677 if ((uint8 *) 0)
20678   return 0;
20679 if (sizeof (uint8))
20680   return 0;
20681   ;
20682   return 0;
20683 }
20684 _ACEOF
20685 rm -f conftest.$ac_objext
20686 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20687   (eval $ac_compile) 2>conftest.er1
20688   ac_status=$?
20689   grep -v '^ *+' conftest.er1 >conftest.err
20690   rm -f conftest.er1
20691   cat conftest.err >&5
20692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20693   (exit $ac_status); } &&
20694          { ac_try='test -z "$ac_c_werror_flag"
20695                          || test ! -s conftest.err'
20696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20697   (eval $ac_try) 2>&5
20698   ac_status=$?
20699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20700   (exit $ac_status); }; } &&
20701          { ac_try='test -s conftest.$ac_objext'
20702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20703   (eval $ac_try) 2>&5
20704   ac_status=$?
20705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20706   (exit $ac_status); }; }; then
20707   ac_cv_type_uint8=yes
20708 else
20709   echo "$as_me: failed program was:" >&5
20710 sed 's/^/| /' conftest.$ac_ext >&5
20711
20712 ac_cv_type_uint8=no
20713 fi
20714 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20715 fi
20716 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20717 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20718 if test $ac_cv_type_uint8 = yes; then
20719
20720 cat >>confdefs.h <<_ACEOF
20721 #define HAVE_UINT8 1
20722 _ACEOF
20723
20724
20725 fi
20726 echo "$as_me:$LINENO: checking for int64" >&5
20727 echo $ECHO_N "checking for int64... $ECHO_C" >&6
20728 if test "${ac_cv_type_int64+set}" = set; then
20729   echo $ECHO_N "(cached) $ECHO_C" >&6
20730 else
20731   cat >conftest.$ac_ext <<_ACEOF
20732 /* confdefs.h.  */
20733 _ACEOF
20734 cat confdefs.h >>conftest.$ac_ext
20735 cat >>conftest.$ac_ext <<_ACEOF
20736 /* end confdefs.h.  */
20737 #include <stdio.h>
20738 #ifdef HAVE_SUPPORTDEFS_H
20739 #include <SupportDefs.h>
20740 #endif
20741
20742 int
20743 main ()
20744 {
20745 if ((int64 *) 0)
20746   return 0;
20747 if (sizeof (int64))
20748   return 0;
20749   ;
20750   return 0;
20751 }
20752 _ACEOF
20753 rm -f conftest.$ac_objext
20754 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20755   (eval $ac_compile) 2>conftest.er1
20756   ac_status=$?
20757   grep -v '^ *+' conftest.er1 >conftest.err
20758   rm -f conftest.er1
20759   cat conftest.err >&5
20760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20761   (exit $ac_status); } &&
20762          { ac_try='test -z "$ac_c_werror_flag"
20763                          || test ! -s conftest.err'
20764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20765   (eval $ac_try) 2>&5
20766   ac_status=$?
20767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20768   (exit $ac_status); }; } &&
20769          { ac_try='test -s conftest.$ac_objext'
20770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20771   (eval $ac_try) 2>&5
20772   ac_status=$?
20773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20774   (exit $ac_status); }; }; then
20775   ac_cv_type_int64=yes
20776 else
20777   echo "$as_me: failed program was:" >&5
20778 sed 's/^/| /' conftest.$ac_ext >&5
20779
20780 ac_cv_type_int64=no
20781 fi
20782 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20783 fi
20784 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
20785 echo "${ECHO_T}$ac_cv_type_int64" >&6
20786 if test $ac_cv_type_int64 = yes; then
20787
20788 cat >>confdefs.h <<_ACEOF
20789 #define HAVE_INT64 1
20790 _ACEOF
20791
20792
20793 fi
20794 echo "$as_me:$LINENO: checking for uint64" >&5
20795 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
20796 if test "${ac_cv_type_uint64+set}" = set; then
20797   echo $ECHO_N "(cached) $ECHO_C" >&6
20798 else
20799   cat >conftest.$ac_ext <<_ACEOF
20800 /* confdefs.h.  */
20801 _ACEOF
20802 cat confdefs.h >>conftest.$ac_ext
20803 cat >>conftest.$ac_ext <<_ACEOF
20804 /* end confdefs.h.  */
20805 #include <stdio.h>
20806 #ifdef HAVE_SUPPORTDEFS_H
20807 #include <SupportDefs.h>
20808 #endif
20809
20810 int
20811 main ()
20812 {
20813 if ((uint64 *) 0)
20814   return 0;
20815 if (sizeof (uint64))
20816   return 0;
20817   ;
20818   return 0;
20819 }
20820 _ACEOF
20821 rm -f conftest.$ac_objext
20822 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20823   (eval $ac_compile) 2>conftest.er1
20824   ac_status=$?
20825   grep -v '^ *+' conftest.er1 >conftest.err
20826   rm -f conftest.er1
20827   cat conftest.err >&5
20828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20829   (exit $ac_status); } &&
20830          { ac_try='test -z "$ac_c_werror_flag"
20831                          || test ! -s conftest.err'
20832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20833   (eval $ac_try) 2>&5
20834   ac_status=$?
20835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20836   (exit $ac_status); }; } &&
20837          { ac_try='test -s conftest.$ac_objext'
20838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20839   (eval $ac_try) 2>&5
20840   ac_status=$?
20841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20842   (exit $ac_status); }; }; then
20843   ac_cv_type_uint64=yes
20844 else
20845   echo "$as_me: failed program was:" >&5
20846 sed 's/^/| /' conftest.$ac_ext >&5
20847
20848 ac_cv_type_uint64=no
20849 fi
20850 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20851 fi
20852 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
20853 echo "${ECHO_T}$ac_cv_type_uint64" >&6
20854 if test $ac_cv_type_uint64 = yes; then
20855
20856 cat >>confdefs.h <<_ACEOF
20857 #define HAVE_UINT64 1
20858 _ACEOF
20859
20860
20861 fi
20862
20863
20864 # We also check for sig_atomic_t, which *should* be defined per ANSI
20865 # C, but is missing on some old platforms.
20866 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
20867 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
20868 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
20869   echo $ECHO_N "(cached) $ECHO_C" >&6
20870 else
20871   cat >conftest.$ac_ext <<_ACEOF
20872 /* confdefs.h.  */
20873 _ACEOF
20874 cat confdefs.h >>conftest.$ac_ext
20875 cat >>conftest.$ac_ext <<_ACEOF
20876 /* end confdefs.h.  */
20877 #include <signal.h>
20878
20879 int
20880 main ()
20881 {
20882 if ((sig_atomic_t *) 0)
20883   return 0;
20884 if (sizeof (sig_atomic_t))
20885   return 0;
20886   ;
20887   return 0;
20888 }
20889 _ACEOF
20890 rm -f conftest.$ac_objext
20891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20892   (eval $ac_compile) 2>conftest.er1
20893   ac_status=$?
20894   grep -v '^ *+' conftest.er1 >conftest.err
20895   rm -f conftest.er1
20896   cat conftest.err >&5
20897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20898   (exit $ac_status); } &&
20899          { ac_try='test -z "$ac_c_werror_flag"
20900                          || test ! -s conftest.err'
20901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20902   (eval $ac_try) 2>&5
20903   ac_status=$?
20904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20905   (exit $ac_status); }; } &&
20906          { ac_try='test -s conftest.$ac_objext'
20907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20908   (eval $ac_try) 2>&5
20909   ac_status=$?
20910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20911   (exit $ac_status); }; }; then
20912   ac_cv_type_sig_atomic_t=yes
20913 else
20914   echo "$as_me: failed program was:" >&5
20915 sed 's/^/| /' conftest.$ac_ext >&5
20916
20917 ac_cv_type_sig_atomic_t=no
20918 fi
20919 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20920 fi
20921 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
20922 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
20923 if test $ac_cv_type_sig_atomic_t = yes; then
20924
20925 cat >>confdefs.h <<_ACEOF
20926 #define HAVE_SIG_ATOMIC_T 1
20927 _ACEOF
20928
20929
20930 fi
20931
20932
20933
20934 if test x"$template" != x"win32"
20935 then
20936 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
20937 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
20938 if test "${pgac_cv_func_posix_signals+set}" = set; then
20939   echo $ECHO_N "(cached) $ECHO_C" >&6
20940 else
20941   cat >conftest.$ac_ext <<_ACEOF
20942 /* confdefs.h.  */
20943 _ACEOF
20944 cat confdefs.h >>conftest.$ac_ext
20945 cat >>conftest.$ac_ext <<_ACEOF
20946 /* end confdefs.h.  */
20947 #include <signal.h>
20948
20949 int
20950 main ()
20951 {
20952 struct sigaction act, oact;
20953 sigemptyset(&act.sa_mask);
20954 act.sa_flags = SA_RESTART;
20955 sigaction(0, &act, &oact);
20956   ;
20957   return 0;
20958 }
20959 _ACEOF
20960 rm -f conftest.$ac_objext conftest$ac_exeext
20961 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20962   (eval $ac_link) 2>conftest.er1
20963   ac_status=$?
20964   grep -v '^ *+' conftest.er1 >conftest.err
20965   rm -f conftest.er1
20966   cat conftest.err >&5
20967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20968   (exit $ac_status); } &&
20969          { ac_try='test -z "$ac_c_werror_flag"
20970                          || test ! -s conftest.err'
20971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20972   (eval $ac_try) 2>&5
20973   ac_status=$?
20974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20975   (exit $ac_status); }; } &&
20976          { ac_try='test -s conftest$ac_exeext'
20977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20978   (eval $ac_try) 2>&5
20979   ac_status=$?
20980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20981   (exit $ac_status); }; }; then
20982   pgac_cv_func_posix_signals=yes
20983 else
20984   echo "$as_me: failed program was:" >&5
20985 sed 's/^/| /' conftest.$ac_ext >&5
20986
20987 pgac_cv_func_posix_signals=no
20988 fi
20989 rm -f conftest.err conftest.$ac_objext \
20990       conftest$ac_exeext conftest.$ac_ext
20991 fi
20992 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
20993 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
20994 if test x"$pgac_cv_func_posix_signals" = xyes ; then
20995
20996 cat >>confdefs.h <<\_ACEOF
20997 #define HAVE_POSIX_SIGNALS
20998 _ACEOF
20999
21000 fi
21001 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21002
21003 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21004   { { echo "$as_me:$LINENO: error:
21005 *** Thread-safety requires POSIX signals, which are not supported by your
21006 *** operating system.
21007 " >&5
21008 echo "$as_me: error:
21009 *** Thread-safety requires POSIX signals, which are not supported by your
21010 *** operating system.
21011 " >&2;}
21012    { (exit 1); exit 1; }; }
21013 fi
21014 fi
21015
21016 if test $ac_cv_func_fseeko = yes; then
21017 # Check whether --enable-largefile or --disable-largefile was given.
21018 if test "${enable_largefile+set}" = set; then
21019   enableval="$enable_largefile"
21020
21021 fi;
21022 if test "$enable_largefile" != no; then
21023
21024   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21025 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21026 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21027   echo $ECHO_N "(cached) $ECHO_C" >&6
21028 else
21029   ac_cv_sys_largefile_CC=no
21030      if test "$GCC" != yes; then
21031        ac_save_CC=$CC
21032        while :; do
21033          # IRIX 6.2 and later do not support large files by default,
21034          # so use the C compiler's -n32 option if that helps.
21035          cat >conftest.$ac_ext <<_ACEOF
21036 /* confdefs.h.  */
21037 _ACEOF
21038 cat confdefs.h >>conftest.$ac_ext
21039 cat >>conftest.$ac_ext <<_ACEOF
21040 /* end confdefs.h.  */
21041 #include <sys/types.h>
21042  /* Check that off_t can represent 2**63 - 1 correctly.
21043     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21044     since some C++ compilers masquerading as C compilers
21045     incorrectly reject 9223372036854775807.  */
21046 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21047   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21048                        && LARGE_OFF_T % 2147483647 == 1)
21049                       ? 1 : -1];
21050 int
21051 main ()
21052 {
21053
21054   ;
21055   return 0;
21056 }
21057 _ACEOF
21058          rm -f conftest.$ac_objext
21059 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21060   (eval $ac_compile) 2>conftest.er1
21061   ac_status=$?
21062   grep -v '^ *+' conftest.er1 >conftest.err
21063   rm -f conftest.er1
21064   cat conftest.err >&5
21065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21066   (exit $ac_status); } &&
21067          { ac_try='test -z "$ac_c_werror_flag"
21068                          || test ! -s conftest.err'
21069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21070   (eval $ac_try) 2>&5
21071   ac_status=$?
21072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21073   (exit $ac_status); }; } &&
21074          { ac_try='test -s conftest.$ac_objext'
21075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21076   (eval $ac_try) 2>&5
21077   ac_status=$?
21078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21079   (exit $ac_status); }; }; then
21080   break
21081 else
21082   echo "$as_me: failed program was:" >&5
21083 sed 's/^/| /' conftest.$ac_ext >&5
21084
21085 fi
21086 rm -f conftest.err conftest.$ac_objext
21087          CC="$CC -n32"
21088          rm -f conftest.$ac_objext
21089 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21090   (eval $ac_compile) 2>conftest.er1
21091   ac_status=$?
21092   grep -v '^ *+' conftest.er1 >conftest.err
21093   rm -f conftest.er1
21094   cat conftest.err >&5
21095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21096   (exit $ac_status); } &&
21097          { ac_try='test -z "$ac_c_werror_flag"
21098                          || test ! -s conftest.err'
21099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21100   (eval $ac_try) 2>&5
21101   ac_status=$?
21102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21103   (exit $ac_status); }; } &&
21104          { ac_try='test -s conftest.$ac_objext'
21105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21106   (eval $ac_try) 2>&5
21107   ac_status=$?
21108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21109   (exit $ac_status); }; }; then
21110   ac_cv_sys_largefile_CC=' -n32'; break
21111 else
21112   echo "$as_me: failed program was:" >&5
21113 sed 's/^/| /' conftest.$ac_ext >&5
21114
21115 fi
21116 rm -f conftest.err conftest.$ac_objext
21117          break
21118        done
21119        CC=$ac_save_CC
21120        rm -f conftest.$ac_ext
21121     fi
21122 fi
21123 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21124 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21125   if test "$ac_cv_sys_largefile_CC" != no; then
21126     CC=$CC$ac_cv_sys_largefile_CC
21127   fi
21128
21129   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21130 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21131 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21132   echo $ECHO_N "(cached) $ECHO_C" >&6
21133 else
21134   while :; do
21135   ac_cv_sys_file_offset_bits=no
21136   cat >conftest.$ac_ext <<_ACEOF
21137 /* confdefs.h.  */
21138 _ACEOF
21139 cat confdefs.h >>conftest.$ac_ext
21140 cat >>conftest.$ac_ext <<_ACEOF
21141 /* end confdefs.h.  */
21142 #include <sys/types.h>
21143  /* Check that off_t can represent 2**63 - 1 correctly.
21144     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21145     since some C++ compilers masquerading as C compilers
21146     incorrectly reject 9223372036854775807.  */
21147 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21148   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21149                        && LARGE_OFF_T % 2147483647 == 1)
21150                       ? 1 : -1];
21151 int
21152 main ()
21153 {
21154
21155   ;
21156   return 0;
21157 }
21158 _ACEOF
21159 rm -f conftest.$ac_objext
21160 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21161   (eval $ac_compile) 2>conftest.er1
21162   ac_status=$?
21163   grep -v '^ *+' conftest.er1 >conftest.err
21164   rm -f conftest.er1
21165   cat conftest.err >&5
21166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21167   (exit $ac_status); } &&
21168          { ac_try='test -z "$ac_c_werror_flag"
21169                          || test ! -s conftest.err'
21170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21171   (eval $ac_try) 2>&5
21172   ac_status=$?
21173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21174   (exit $ac_status); }; } &&
21175          { ac_try='test -s conftest.$ac_objext'
21176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21177   (eval $ac_try) 2>&5
21178   ac_status=$?
21179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21180   (exit $ac_status); }; }; then
21181   break
21182 else
21183   echo "$as_me: failed program was:" >&5
21184 sed 's/^/| /' conftest.$ac_ext >&5
21185
21186 fi
21187 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21188   cat >conftest.$ac_ext <<_ACEOF
21189 /* confdefs.h.  */
21190 _ACEOF
21191 cat confdefs.h >>conftest.$ac_ext
21192 cat >>conftest.$ac_ext <<_ACEOF
21193 /* end confdefs.h.  */
21194 #define _FILE_OFFSET_BITS 64
21195 #include <sys/types.h>
21196  /* Check that off_t can represent 2**63 - 1 correctly.
21197     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21198     since some C++ compilers masquerading as C compilers
21199     incorrectly reject 9223372036854775807.  */
21200 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21201   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21202                        && LARGE_OFF_T % 2147483647 == 1)
21203                       ? 1 : -1];
21204 int
21205 main ()
21206 {
21207
21208   ;
21209   return 0;
21210 }
21211 _ACEOF
21212 rm -f conftest.$ac_objext
21213 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21214   (eval $ac_compile) 2>conftest.er1
21215   ac_status=$?
21216   grep -v '^ *+' conftest.er1 >conftest.err
21217   rm -f conftest.er1
21218   cat conftest.err >&5
21219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21220   (exit $ac_status); } &&
21221          { ac_try='test -z "$ac_c_werror_flag"
21222                          || test ! -s conftest.err'
21223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21224   (eval $ac_try) 2>&5
21225   ac_status=$?
21226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21227   (exit $ac_status); }; } &&
21228          { ac_try='test -s conftest.$ac_objext'
21229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21230   (eval $ac_try) 2>&5
21231   ac_status=$?
21232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21233   (exit $ac_status); }; }; then
21234   ac_cv_sys_file_offset_bits=64; break
21235 else
21236   echo "$as_me: failed program was:" >&5
21237 sed 's/^/| /' conftest.$ac_ext >&5
21238
21239 fi
21240 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21241   break
21242 done
21243 fi
21244 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21245 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21246 if test "$ac_cv_sys_file_offset_bits" != no; then
21247
21248 cat >>confdefs.h <<_ACEOF
21249 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21250 _ACEOF
21251
21252 fi
21253 rm -f conftest*
21254   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21255 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21256 if test "${ac_cv_sys_large_files+set}" = set; then
21257   echo $ECHO_N "(cached) $ECHO_C" >&6
21258 else
21259   while :; do
21260   ac_cv_sys_large_files=no
21261   cat >conftest.$ac_ext <<_ACEOF
21262 /* confdefs.h.  */
21263 _ACEOF
21264 cat confdefs.h >>conftest.$ac_ext
21265 cat >>conftest.$ac_ext <<_ACEOF
21266 /* end confdefs.h.  */
21267 #include <sys/types.h>
21268  /* Check that off_t can represent 2**63 - 1 correctly.
21269     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21270     since some C++ compilers masquerading as C compilers
21271     incorrectly reject 9223372036854775807.  */
21272 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21273   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21274                        && LARGE_OFF_T % 2147483647 == 1)
21275                       ? 1 : -1];
21276 int
21277 main ()
21278 {
21279
21280   ;
21281   return 0;
21282 }
21283 _ACEOF
21284 rm -f conftest.$ac_objext
21285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21286   (eval $ac_compile) 2>conftest.er1
21287   ac_status=$?
21288   grep -v '^ *+' conftest.er1 >conftest.err
21289   rm -f conftest.er1
21290   cat conftest.err >&5
21291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21292   (exit $ac_status); } &&
21293          { ac_try='test -z "$ac_c_werror_flag"
21294                          || test ! -s conftest.err'
21295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21296   (eval $ac_try) 2>&5
21297   ac_status=$?
21298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21299   (exit $ac_status); }; } &&
21300          { ac_try='test -s conftest.$ac_objext'
21301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21302   (eval $ac_try) 2>&5
21303   ac_status=$?
21304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21305   (exit $ac_status); }; }; then
21306   break
21307 else
21308   echo "$as_me: failed program was:" >&5
21309 sed 's/^/| /' conftest.$ac_ext >&5
21310
21311 fi
21312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21313   cat >conftest.$ac_ext <<_ACEOF
21314 /* confdefs.h.  */
21315 _ACEOF
21316 cat confdefs.h >>conftest.$ac_ext
21317 cat >>conftest.$ac_ext <<_ACEOF
21318 /* end confdefs.h.  */
21319 #define _LARGE_FILES 1
21320 #include <sys/types.h>
21321  /* Check that off_t can represent 2**63 - 1 correctly.
21322     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21323     since some C++ compilers masquerading as C compilers
21324     incorrectly reject 9223372036854775807.  */
21325 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21326   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21327                        && LARGE_OFF_T % 2147483647 == 1)
21328                       ? 1 : -1];
21329 int
21330 main ()
21331 {
21332
21333   ;
21334   return 0;
21335 }
21336 _ACEOF
21337 rm -f conftest.$ac_objext
21338 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21339   (eval $ac_compile) 2>conftest.er1
21340   ac_status=$?
21341   grep -v '^ *+' conftest.er1 >conftest.err
21342   rm -f conftest.er1
21343   cat conftest.err >&5
21344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21345   (exit $ac_status); } &&
21346          { ac_try='test -z "$ac_c_werror_flag"
21347                          || test ! -s conftest.err'
21348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21349   (eval $ac_try) 2>&5
21350   ac_status=$?
21351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21352   (exit $ac_status); }; } &&
21353          { ac_try='test -s conftest.$ac_objext'
21354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21355   (eval $ac_try) 2>&5
21356   ac_status=$?
21357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21358   (exit $ac_status); }; }; then
21359   ac_cv_sys_large_files=1; break
21360 else
21361   echo "$as_me: failed program was:" >&5
21362 sed 's/^/| /' conftest.$ac_ext >&5
21363
21364 fi
21365 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21366   break
21367 done
21368 fi
21369 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21370 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21371 if test "$ac_cv_sys_large_files" != no; then
21372
21373 cat >>confdefs.h <<_ACEOF
21374 #define _LARGE_FILES $ac_cv_sys_large_files
21375 _ACEOF
21376
21377 fi
21378 rm -f conftest*
21379 fi
21380
21381 fi
21382
21383 # SunOS doesn't handle negative byte comparisons properly with +/- return
21384 echo "$as_me:$LINENO: checking for working memcmp" >&5
21385 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21386 if test "${ac_cv_func_memcmp_working+set}" = set; then
21387   echo $ECHO_N "(cached) $ECHO_C" >&6
21388 else
21389   if test "$cross_compiling" = yes; then
21390   ac_cv_func_memcmp_working=no
21391 else
21392   cat >conftest.$ac_ext <<_ACEOF
21393 /* confdefs.h.  */
21394 _ACEOF
21395 cat confdefs.h >>conftest.$ac_ext
21396 cat >>conftest.$ac_ext <<_ACEOF
21397 /* end confdefs.h.  */
21398 $ac_includes_default
21399 int
21400 main ()
21401 {
21402
21403   /* Some versions of memcmp are not 8-bit clean.  */
21404   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21405   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21406     exit (1);
21407
21408   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21409      or more and with at least one buffer not starting on a 4-byte boundary.
21410      William Lewis provided this test program.   */
21411   {
21412     char foo[21];
21413     char bar[21];
21414     int i;
21415     for (i = 0; i < 4; i++)
21416       {
21417         char *a = foo + i;
21418         char *b = bar + i;
21419         strcpy (a, "--------01111111");
21420         strcpy (b, "--------10000000");
21421         if (memcmp (a, b, 16) >= 0)
21422           exit (1);
21423       }
21424     exit (0);
21425   }
21426
21427   ;
21428   return 0;
21429 }
21430 _ACEOF
21431 rm -f conftest$ac_exeext
21432 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21433   (eval $ac_link) 2>&5
21434   ac_status=$?
21435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21436   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21438   (eval $ac_try) 2>&5
21439   ac_status=$?
21440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21441   (exit $ac_status); }; }; then
21442   ac_cv_func_memcmp_working=yes
21443 else
21444   echo "$as_me: program exited with status $ac_status" >&5
21445 echo "$as_me: failed program was:" >&5
21446 sed 's/^/| /' conftest.$ac_ext >&5
21447
21448 ( exit $ac_status )
21449 ac_cv_func_memcmp_working=no
21450 fi
21451 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21452 fi
21453 fi
21454 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21455 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21456 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21457     "memcmp.$ac_objext"   | \
21458   *" memcmp.$ac_objext"   | \
21459     "memcmp.$ac_objext "* | \
21460   *" memcmp.$ac_objext "* ) ;;
21461   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21462 esac
21463
21464
21465
21466
21467 # Select semaphore implementation type.
21468 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21469
21470 cat >>confdefs.h <<\_ACEOF
21471 #define USE_NAMED_POSIX_SEMAPHORES 1
21472 _ACEOF
21473
21474   SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21475 else
21476   if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21477
21478 cat >>confdefs.h <<\_ACEOF
21479 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21480 _ACEOF
21481
21482     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21483   else
21484
21485 cat >>confdefs.h <<\_ACEOF
21486 #define USE_SYSV_SEMAPHORES 1
21487 _ACEOF
21488
21489     SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21490   fi
21491 fi
21492
21493
21494 # Select shared-memory implementation type.
21495
21496 cat >>confdefs.h <<\_ACEOF
21497 #define USE_SYSV_SHARED_MEMORY 1
21498 _ACEOF
21499
21500 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21501
21502
21503 if test "$enable_nls" = yes ; then
21504
21505   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21506 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21507 if test "${ac_cv_search_gettext+set}" = set; then
21508   echo $ECHO_N "(cached) $ECHO_C" >&6
21509 else
21510   ac_func_search_save_LIBS=$LIBS
21511 ac_cv_search_gettext=no
21512 cat >conftest.$ac_ext <<_ACEOF
21513 /* confdefs.h.  */
21514 _ACEOF
21515 cat confdefs.h >>conftest.$ac_ext
21516 cat >>conftest.$ac_ext <<_ACEOF
21517 /* end confdefs.h.  */
21518
21519 /* Override any gcc2 internal prototype to avoid an error.  */
21520 #ifdef __cplusplus
21521 extern "C"
21522 #endif
21523 /* We use char because int might match the return type of a gcc2
21524    builtin and then its argument prototype would still apply.  */
21525 char gettext ();
21526 int
21527 main ()
21528 {
21529 gettext ();
21530   ;
21531   return 0;
21532 }
21533 _ACEOF
21534 rm -f conftest.$ac_objext conftest$ac_exeext
21535 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21536   (eval $ac_link) 2>conftest.er1
21537   ac_status=$?
21538   grep -v '^ *+' conftest.er1 >conftest.err
21539   rm -f conftest.er1
21540   cat conftest.err >&5
21541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21542   (exit $ac_status); } &&
21543          { ac_try='test -z "$ac_c_werror_flag"
21544                          || test ! -s conftest.err'
21545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21546   (eval $ac_try) 2>&5
21547   ac_status=$?
21548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21549   (exit $ac_status); }; } &&
21550          { ac_try='test -s conftest$ac_exeext'
21551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21552   (eval $ac_try) 2>&5
21553   ac_status=$?
21554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21555   (exit $ac_status); }; }; then
21556   ac_cv_search_gettext="none required"
21557 else
21558   echo "$as_me: failed program was:" >&5
21559 sed 's/^/| /' conftest.$ac_ext >&5
21560
21561 fi
21562 rm -f conftest.err conftest.$ac_objext \
21563       conftest$ac_exeext conftest.$ac_ext
21564 if test "$ac_cv_search_gettext" = no; then
21565   for ac_lib in intl; do
21566     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21567     cat >conftest.$ac_ext <<_ACEOF
21568 /* confdefs.h.  */
21569 _ACEOF
21570 cat confdefs.h >>conftest.$ac_ext
21571 cat >>conftest.$ac_ext <<_ACEOF
21572 /* end confdefs.h.  */
21573
21574 /* Override any gcc2 internal prototype to avoid an error.  */
21575 #ifdef __cplusplus
21576 extern "C"
21577 #endif
21578 /* We use char because int might match the return type of a gcc2
21579    builtin and then its argument prototype would still apply.  */
21580 char gettext ();
21581 int
21582 main ()
21583 {
21584 gettext ();
21585   ;
21586   return 0;
21587 }
21588 _ACEOF
21589 rm -f conftest.$ac_objext conftest$ac_exeext
21590 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21591   (eval $ac_link) 2>conftest.er1
21592   ac_status=$?
21593   grep -v '^ *+' conftest.er1 >conftest.err
21594   rm -f conftest.er1
21595   cat conftest.err >&5
21596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21597   (exit $ac_status); } &&
21598          { ac_try='test -z "$ac_c_werror_flag"
21599                          || test ! -s conftest.err'
21600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21601   (eval $ac_try) 2>&5
21602   ac_status=$?
21603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21604   (exit $ac_status); }; } &&
21605          { ac_try='test -s conftest$ac_exeext'
21606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21607   (eval $ac_try) 2>&5
21608   ac_status=$?
21609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21610   (exit $ac_status); }; }; then
21611   ac_cv_search_gettext="-l$ac_lib"
21612 break
21613 else
21614   echo "$as_me: failed program was:" >&5
21615 sed 's/^/| /' conftest.$ac_ext >&5
21616
21617 fi
21618 rm -f conftest.err conftest.$ac_objext \
21619       conftest$ac_exeext conftest.$ac_ext
21620   done
21621 fi
21622 LIBS=$ac_func_search_save_LIBS
21623 fi
21624 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21625 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21626 if test "$ac_cv_search_gettext" != no; then
21627   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21628
21629 else
21630   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21631 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21632    { (exit 1); exit 1; }; }
21633 fi
21634
21635   if test "${ac_cv_header_libintl_h+set}" = set; then
21636   echo "$as_me:$LINENO: checking for libintl.h" >&5
21637 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21638 if test "${ac_cv_header_libintl_h+set}" = set; then
21639   echo $ECHO_N "(cached) $ECHO_C" >&6
21640 fi
21641 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21642 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21643 else
21644   # Is the header compilable?
21645 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21646 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21647 cat >conftest.$ac_ext <<_ACEOF
21648 /* confdefs.h.  */
21649 _ACEOF
21650 cat confdefs.h >>conftest.$ac_ext
21651 cat >>conftest.$ac_ext <<_ACEOF
21652 /* end confdefs.h.  */
21653 $ac_includes_default
21654 #include <libintl.h>
21655 _ACEOF
21656 rm -f conftest.$ac_objext
21657 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21658   (eval $ac_compile) 2>conftest.er1
21659   ac_status=$?
21660   grep -v '^ *+' conftest.er1 >conftest.err
21661   rm -f conftest.er1
21662   cat conftest.err >&5
21663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21664   (exit $ac_status); } &&
21665          { ac_try='test -z "$ac_c_werror_flag"
21666                          || test ! -s conftest.err'
21667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21668   (eval $ac_try) 2>&5
21669   ac_status=$?
21670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21671   (exit $ac_status); }; } &&
21672          { ac_try='test -s conftest.$ac_objext'
21673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21674   (eval $ac_try) 2>&5
21675   ac_status=$?
21676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21677   (exit $ac_status); }; }; then
21678   ac_header_compiler=yes
21679 else
21680   echo "$as_me: failed program was:" >&5
21681 sed 's/^/| /' conftest.$ac_ext >&5
21682
21683 ac_header_compiler=no
21684 fi
21685 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21686 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21687 echo "${ECHO_T}$ac_header_compiler" >&6
21688
21689 # Is the header present?
21690 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21691 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21692 cat >conftest.$ac_ext <<_ACEOF
21693 /* confdefs.h.  */
21694 _ACEOF
21695 cat confdefs.h >>conftest.$ac_ext
21696 cat >>conftest.$ac_ext <<_ACEOF
21697 /* end confdefs.h.  */
21698 #include <libintl.h>
21699 _ACEOF
21700 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21701   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21702   ac_status=$?
21703   grep -v '^ *+' conftest.er1 >conftest.err
21704   rm -f conftest.er1
21705   cat conftest.err >&5
21706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21707   (exit $ac_status); } >/dev/null; then
21708   if test -s conftest.err; then
21709     ac_cpp_err=$ac_c_preproc_warn_flag
21710     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21711   else
21712     ac_cpp_err=
21713   fi
21714 else
21715   ac_cpp_err=yes
21716 fi
21717 if test -z "$ac_cpp_err"; then
21718   ac_header_preproc=yes
21719 else
21720   echo "$as_me: failed program was:" >&5
21721 sed 's/^/| /' conftest.$ac_ext >&5
21722
21723   ac_header_preproc=no
21724 fi
21725 rm -f conftest.err conftest.$ac_ext
21726 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21727 echo "${ECHO_T}$ac_header_preproc" >&6
21728
21729 # So?  What about this header?
21730 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21731   yes:no: )
21732     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21733 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21734     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
21735 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
21736     ac_header_preproc=yes
21737     ;;
21738   no:yes:* )
21739     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
21740 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
21741     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
21742 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
21743     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
21744 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
21745     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
21746 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21747     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
21748 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
21749     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
21750 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
21751     (
21752       cat <<\_ASBOX
21753 ## ---------------------------------------- ##
21754 ## Report this to pgsql-bugs@postgresql.org ##
21755 ## ---------------------------------------- ##
21756 _ASBOX
21757     ) |
21758       sed "s/^/$as_me: WARNING:     /" >&2
21759     ;;
21760 esac
21761 echo "$as_me:$LINENO: checking for libintl.h" >&5
21762 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21763 if test "${ac_cv_header_libintl_h+set}" = set; then
21764   echo $ECHO_N "(cached) $ECHO_C" >&6
21765 else
21766   ac_cv_header_libintl_h=$ac_header_preproc
21767 fi
21768 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21769 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21770
21771 fi
21772 if test $ac_cv_header_libintl_h = yes; then
21773   :
21774 else
21775   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
21776 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
21777    { (exit 1); exit 1; }; }
21778 fi
21779
21780
21781   for ac_prog in msgfmt
21782 do
21783   # Extract the first word of "$ac_prog", so it can be a program name with args.
21784 set dummy $ac_prog; ac_word=$2
21785 echo "$as_me:$LINENO: checking for $ac_word" >&5
21786 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21787 if test "${ac_cv_prog_MSGFMT+set}" = set; then
21788   echo $ECHO_N "(cached) $ECHO_C" >&6
21789 else
21790   if test -n "$MSGFMT"; then
21791   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
21792 else
21793 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21794 for as_dir in $PATH
21795 do
21796   IFS=$as_save_IFS
21797   test -z "$as_dir" && as_dir=.
21798   for ac_exec_ext in '' $ac_executable_extensions; do
21799   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21800     ac_cv_prog_MSGFMT="$ac_prog"
21801     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21802     break 2
21803   fi
21804 done
21805 done
21806
21807 fi
21808 fi
21809 MSGFMT=$ac_cv_prog_MSGFMT
21810 if test -n "$MSGFMT"; then
21811   echo "$as_me:$LINENO: result: $MSGFMT" >&5
21812 echo "${ECHO_T}$MSGFMT" >&6
21813 else
21814   echo "$as_me:$LINENO: result: no" >&5
21815 echo "${ECHO_T}no" >&6
21816 fi
21817
21818   test -n "$MSGFMT" && break
21819 done
21820
21821   if test -z "$MSGFMT"; then
21822     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
21823 echo "$as_me: error: msgfmt is required for NLS" >&2;}
21824    { (exit 1); exit 1; }; }
21825   fi
21826   for ac_prog in msgmerge
21827 do
21828   # Extract the first word of "$ac_prog", so it can be a program name with args.
21829 set dummy $ac_prog; ac_word=$2
21830 echo "$as_me:$LINENO: checking for $ac_word" >&5
21831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21832 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
21833   echo $ECHO_N "(cached) $ECHO_C" >&6
21834 else
21835   if test -n "$MSGMERGE"; then
21836   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
21837 else
21838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21839 for as_dir in $PATH
21840 do
21841   IFS=$as_save_IFS
21842   test -z "$as_dir" && as_dir=.
21843   for ac_exec_ext in '' $ac_executable_extensions; do
21844   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21845     ac_cv_prog_MSGMERGE="$ac_prog"
21846     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21847     break 2
21848   fi
21849 done
21850 done
21851
21852 fi
21853 fi
21854 MSGMERGE=$ac_cv_prog_MSGMERGE
21855 if test -n "$MSGMERGE"; then
21856   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
21857 echo "${ECHO_T}$MSGMERGE" >&6
21858 else
21859   echo "$as_me:$LINENO: result: no" >&5
21860 echo "${ECHO_T}no" >&6
21861 fi
21862
21863   test -n "$MSGMERGE" && break
21864 done
21865
21866   for ac_prog in xgettext
21867 do
21868   # Extract the first word of "$ac_prog", so it can be a program name with args.
21869 set dummy $ac_prog; ac_word=$2
21870 echo "$as_me:$LINENO: checking for $ac_word" >&5
21871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21872 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
21873   echo $ECHO_N "(cached) $ECHO_C" >&6
21874 else
21875   if test -n "$XGETTEXT"; then
21876   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
21877 else
21878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21879 for as_dir in $PATH
21880 do
21881   IFS=$as_save_IFS
21882   test -z "$as_dir" && as_dir=.
21883   for ac_exec_ext in '' $ac_executable_extensions; do
21884   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21885     ac_cv_prog_XGETTEXT="$ac_prog"
21886     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21887     break 2
21888   fi
21889 done
21890 done
21891
21892 fi
21893 fi
21894 XGETTEXT=$ac_cv_prog_XGETTEXT
21895 if test -n "$XGETTEXT"; then
21896   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
21897 echo "${ECHO_T}$XGETTEXT" >&6
21898 else
21899   echo "$as_me:$LINENO: result: no" >&5
21900 echo "${ECHO_T}no" >&6
21901 fi
21902
21903   test -n "$XGETTEXT" && break
21904 done
21905
21906
21907   # Note: share/locale is always the default, independent of $datadir
21908   localedir='${prefix}/share/locale'
21909   if test x"$prefix" = x"NONE"; then
21910     exp_localedir="$ac_default_prefix/share/locale"
21911   else
21912     exp_localedir="$prefix/share/locale"
21913   fi
21914
21915
21916
21917 cat >>confdefs.h <<_ACEOF
21918 #define LOCALEDIR "$exp_localedir"
21919 _ACEOF
21920
21921
21922 fi
21923
21924 # Check for Tcl configuration script tclConfig.sh
21925 if test "$with_tcl" = yes; then
21926     for ac_prog in tclsh tcl
21927 do
21928   # Extract the first word of "$ac_prog", so it can be a program name with args.
21929 set dummy $ac_prog; ac_word=$2
21930 echo "$as_me:$LINENO: checking for $ac_word" >&5
21931 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21932 if test "${ac_cv_path_TCLSH+set}" = set; then
21933   echo $ECHO_N "(cached) $ECHO_C" >&6
21934 else
21935   case $TCLSH in
21936   [\\/]* | ?:[\\/]*)
21937   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
21938   ;;
21939   *)
21940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21941 for as_dir in $PATH
21942 do
21943   IFS=$as_save_IFS
21944   test -z "$as_dir" && as_dir=.
21945   for ac_exec_ext in '' $ac_executable_extensions; do
21946   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21947     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
21948     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21949     break 2
21950   fi
21951 done
21952 done
21953
21954   ;;
21955 esac
21956 fi
21957 TCLSH=$ac_cv_path_TCLSH
21958
21959 if test -n "$TCLSH"; then
21960   echo "$as_me:$LINENO: result: $TCLSH" >&5
21961 echo "${ECHO_T}$TCLSH" >&6
21962 else
21963   echo "$as_me:$LINENO: result: no" >&5
21964 echo "${ECHO_T}no" >&6
21965 fi
21966
21967   test -n "$TCLSH" && break
21968 done
21969
21970 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
21971 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
21972 # Let user override test
21973 if test -z "$TCL_CONFIG_SH"; then
21974     pgac_test_dirs="$with_tclconfig"
21975
21976     set X $pgac_test_dirs; shift
21977     if test $# -eq 0; then
21978         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
21979 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
21980    { (exit 1); exit 1; }; }
21981         set X `echo 'puts $auto_path' | $TCLSH`; shift
21982     fi
21983
21984     for pgac_dir do
21985         if test -r "$pgac_dir/tclConfig.sh"; then
21986             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
21987             break
21988         fi
21989     done
21990 fi
21991
21992 if test -z "$TCL_CONFIG_SH"; then
21993     echo "$as_me:$LINENO: result: no" >&5
21994 echo "${ECHO_T}no" >&6
21995     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
21996 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
21997    { (exit 1); exit 1; }; }
21998 else
21999     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22000 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22001 fi
22002
22003
22004
22005     . "$TCL_CONFIG_SH"
22006 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22007 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22008 eval TCL_LIBS=\"$TCL_LIBS\"
22009 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22010 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22011
22012         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22013     ac_save_CPPFLAGS=$CPPFLAGS
22014     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22015     if test "${ac_cv_header_tcl_h+set}" = set; then
22016   echo "$as_me:$LINENO: checking for tcl.h" >&5
22017 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22018 if test "${ac_cv_header_tcl_h+set}" = set; then
22019   echo $ECHO_N "(cached) $ECHO_C" >&6
22020 fi
22021 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22022 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22023 else
22024   # Is the header compilable?
22025 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22026 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22027 cat >conftest.$ac_ext <<_ACEOF
22028 /* confdefs.h.  */
22029 _ACEOF
22030 cat confdefs.h >>conftest.$ac_ext
22031 cat >>conftest.$ac_ext <<_ACEOF
22032 /* end confdefs.h.  */
22033 $ac_includes_default
22034 #include <tcl.h>
22035 _ACEOF
22036 rm -f conftest.$ac_objext
22037 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22038   (eval $ac_compile) 2>conftest.er1
22039   ac_status=$?
22040   grep -v '^ *+' conftest.er1 >conftest.err
22041   rm -f conftest.er1
22042   cat conftest.err >&5
22043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22044   (exit $ac_status); } &&
22045          { ac_try='test -z "$ac_c_werror_flag"
22046                          || test ! -s conftest.err'
22047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22048   (eval $ac_try) 2>&5
22049   ac_status=$?
22050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22051   (exit $ac_status); }; } &&
22052          { ac_try='test -s conftest.$ac_objext'
22053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22054   (eval $ac_try) 2>&5
22055   ac_status=$?
22056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22057   (exit $ac_status); }; }; then
22058   ac_header_compiler=yes
22059 else
22060   echo "$as_me: failed program was:" >&5
22061 sed 's/^/| /' conftest.$ac_ext >&5
22062
22063 ac_header_compiler=no
22064 fi
22065 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22066 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22067 echo "${ECHO_T}$ac_header_compiler" >&6
22068
22069 # Is the header present?
22070 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22071 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22072 cat >conftest.$ac_ext <<_ACEOF
22073 /* confdefs.h.  */
22074 _ACEOF
22075 cat confdefs.h >>conftest.$ac_ext
22076 cat >>conftest.$ac_ext <<_ACEOF
22077 /* end confdefs.h.  */
22078 #include <tcl.h>
22079 _ACEOF
22080 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22081   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22082   ac_status=$?
22083   grep -v '^ *+' conftest.er1 >conftest.err
22084   rm -f conftest.er1
22085   cat conftest.err >&5
22086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22087   (exit $ac_status); } >/dev/null; then
22088   if test -s conftest.err; then
22089     ac_cpp_err=$ac_c_preproc_warn_flag
22090     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22091   else
22092     ac_cpp_err=
22093   fi
22094 else
22095   ac_cpp_err=yes
22096 fi
22097 if test -z "$ac_cpp_err"; then
22098   ac_header_preproc=yes
22099 else
22100   echo "$as_me: failed program was:" >&5
22101 sed 's/^/| /' conftest.$ac_ext >&5
22102
22103   ac_header_preproc=no
22104 fi
22105 rm -f conftest.err conftest.$ac_ext
22106 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22107 echo "${ECHO_T}$ac_header_preproc" >&6
22108
22109 # So?  What about this header?
22110 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22111   yes:no: )
22112     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22113 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22114     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22115 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22116     ac_header_preproc=yes
22117     ;;
22118   no:yes:* )
22119     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22120 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22121     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22122 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22123     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22124 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22125     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22126 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22127     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22128 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22129     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22130 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22131     (
22132       cat <<\_ASBOX
22133 ## ---------------------------------------- ##
22134 ## Report this to pgsql-bugs@postgresql.org ##
22135 ## ---------------------------------------- ##
22136 _ASBOX
22137     ) |
22138       sed "s/^/$as_me: WARNING:     /" >&2
22139     ;;
22140 esac
22141 echo "$as_me:$LINENO: checking for tcl.h" >&5
22142 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22143 if test "${ac_cv_header_tcl_h+set}" = set; then
22144   echo $ECHO_N "(cached) $ECHO_C" >&6
22145 else
22146   ac_cv_header_tcl_h=$ac_header_preproc
22147 fi
22148 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22149 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22150
22151 fi
22152 if test $ac_cv_header_tcl_h = yes; then
22153   :
22154 else
22155   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22156 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22157    { (exit 1); exit 1; }; }
22158 fi
22159
22160
22161     CPPFLAGS=$ac_save_CPPFLAGS
22162 fi
22163
22164 #
22165 # Check for DocBook and tools
22166 #
22167 for ac_prog in onsgmls nsgmls
22168 do
22169   # Extract the first word of "$ac_prog", so it can be a program name with args.
22170 set dummy $ac_prog; ac_word=$2
22171 echo "$as_me:$LINENO: checking for $ac_word" >&5
22172 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22173 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22174   echo $ECHO_N "(cached) $ECHO_C" >&6
22175 else
22176   if test -n "$NSGMLS"; then
22177   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22178 else
22179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22180 for as_dir in $PATH
22181 do
22182   IFS=$as_save_IFS
22183   test -z "$as_dir" && as_dir=.
22184   for ac_exec_ext in '' $ac_executable_extensions; do
22185   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22186     ac_cv_prog_NSGMLS="$ac_prog"
22187     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22188     break 2
22189   fi
22190 done
22191 done
22192
22193 fi
22194 fi
22195 NSGMLS=$ac_cv_prog_NSGMLS
22196 if test -n "$NSGMLS"; then
22197   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22198 echo "${ECHO_T}$NSGMLS" >&6
22199 else
22200   echo "$as_me:$LINENO: result: no" >&5
22201 echo "${ECHO_T}no" >&6
22202 fi
22203
22204   test -n "$NSGMLS" && break
22205 done
22206
22207 for ac_prog in openjade jade
22208 do
22209   # Extract the first word of "$ac_prog", so it can be a program name with args.
22210 set dummy $ac_prog; ac_word=$2
22211 echo "$as_me:$LINENO: checking for $ac_word" >&5
22212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22213 if test "${ac_cv_prog_JADE+set}" = set; then
22214   echo $ECHO_N "(cached) $ECHO_C" >&6
22215 else
22216   if test -n "$JADE"; then
22217   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22218 else
22219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22220 for as_dir in $PATH
22221 do
22222   IFS=$as_save_IFS
22223   test -z "$as_dir" && as_dir=.
22224   for ac_exec_ext in '' $ac_executable_extensions; do
22225   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22226     ac_cv_prog_JADE="$ac_prog"
22227     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22228     break 2
22229   fi
22230 done
22231 done
22232
22233 fi
22234 fi
22235 JADE=$ac_cv_prog_JADE
22236 if test -n "$JADE"; then
22237   echo "$as_me:$LINENO: result: $JADE" >&5
22238 echo "${ECHO_T}$JADE" >&6
22239 else
22240   echo "$as_me:$LINENO: result: no" >&5
22241 echo "${ECHO_T}no" >&6
22242 fi
22243
22244   test -n "$JADE" && break
22245 done
22246
22247
22248 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22249 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22250 if test "${pgac_cv_check_docbook+set}" = set; then
22251   echo $ECHO_N "(cached) $ECHO_C" >&6
22252 else
22253   cat >conftest.sgml <<EOF
22254 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22255 <book>
22256  <title>test</title>
22257  <chapter>
22258   <title>random</title>
22259    <sect1>
22260     <title>testsect</title>
22261     <para>text</para>
22262   </sect1>
22263  </chapter>
22264 </book>
22265 EOF
22266
22267 pgac_cv_check_docbook=no
22268
22269 if test -n "$NSGMLS"; then
22270   $NSGMLS -s conftest.sgml 1>&5 2>&1
22271   if test $? -eq 0; then
22272     pgac_cv_check_docbook=yes
22273   fi
22274 fi
22275 rm -f conftest.sgml
22276 fi
22277 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22278 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22279
22280 have_docbook=$pgac_cv_check_docbook
22281
22282
22283 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22284 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22285 if test "${pgac_cv_path_stylesheets+set}" = set; then
22286   echo $ECHO_N "(cached) $ECHO_C" >&6
22287 else
22288   if test -n "$DOCBOOKSTYLE"; then
22289   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22290 else
22291   for pgac_prefix in /usr /usr/local /opt; do
22292     for pgac_infix in share lib; do
22293       for pgac_postfix in \
22294         sgml/stylesheets/nwalsh-modular \
22295         sgml/stylesheets/docbook \
22296                 sgml/docbook-dsssl \
22297         sgml/docbook/dsssl/modular \
22298         sgml/docbook/stylesheet/dsssl/modular \
22299         sgml/docbook/dsssl-stylesheets
22300       do
22301         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22302         if test -r "$pgac_candidate/html/docbook.dsl" \
22303            && test -r "$pgac_candidate/print/docbook.dsl"
22304         then
22305           pgac_cv_path_stylesheets=$pgac_candidate
22306           break 3
22307         fi
22308       done
22309     done
22310   done
22311 fi
22312 fi
22313
22314 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22315
22316 if test -n "$DOCBOOKSTYLE"; then
22317   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22318 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22319 else
22320   echo "$as_me:$LINENO: result: no" >&5
22321 echo "${ECHO_T}no" >&6
22322 fi
22323 if test -n "$DOCBOOKSTYLE"; then
22324   for ac_prog in collateindex.pl
22325 do
22326   # Extract the first word of "$ac_prog", so it can be a program name with args.
22327 set dummy $ac_prog; ac_word=$2
22328 echo "$as_me:$LINENO: checking for $ac_word" >&5
22329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22330 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22331   echo $ECHO_N "(cached) $ECHO_C" >&6
22332 else
22333   case $COLLATEINDEX in
22334   [\\/]* | ?:[\\/]*)
22335   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22336   ;;
22337   *)
22338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22339 for as_dir in $DOCBOOKSTYLE/bin $PATH
22340 do
22341   IFS=$as_save_IFS
22342   test -z "$as_dir" && as_dir=.
22343   for ac_exec_ext in '' $ac_executable_extensions; do
22344   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22345     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22346     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22347     break 2
22348   fi
22349 done
22350 done
22351
22352   ;;
22353 esac
22354 fi
22355 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22356
22357 if test -n "$COLLATEINDEX"; then
22358   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22359 echo "${ECHO_T}$COLLATEINDEX" >&6
22360 else
22361   echo "$as_me:$LINENO: result: no" >&5
22362 echo "${ECHO_T}no" >&6
22363 fi
22364
22365   test -n "$COLLATEINDEX" && break
22366 done
22367
22368 else
22369   for ac_prog in collateindex.pl
22370 do
22371   # Extract the first word of "$ac_prog", so it can be a program name with args.
22372 set dummy $ac_prog; ac_word=$2
22373 echo "$as_me:$LINENO: checking for $ac_word" >&5
22374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22375 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22376   echo $ECHO_N "(cached) $ECHO_C" >&6
22377 else
22378   case $COLLATEINDEX in
22379   [\\/]* | ?:[\\/]*)
22380   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22381   ;;
22382   *)
22383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22384 for as_dir in $PATH
22385 do
22386   IFS=$as_save_IFS
22387   test -z "$as_dir" && as_dir=.
22388   for ac_exec_ext in '' $ac_executable_extensions; do
22389   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22390     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22391     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22392     break 2
22393   fi
22394 done
22395 done
22396
22397   ;;
22398 esac
22399 fi
22400 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22401
22402 if test -n "$COLLATEINDEX"; then
22403   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22404 echo "${ECHO_T}$COLLATEINDEX" >&6
22405 else
22406   echo "$as_me:$LINENO: result: no" >&5
22407 echo "${ECHO_T}no" >&6
22408 fi
22409
22410   test -n "$COLLATEINDEX" && break
22411 done
22412
22413 fi
22414 for ac_prog in sgmlspl
22415 do
22416   # Extract the first word of "$ac_prog", so it can be a program name with args.
22417 set dummy $ac_prog; ac_word=$2
22418 echo "$as_me:$LINENO: checking for $ac_word" >&5
22419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22420 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22421   echo $ECHO_N "(cached) $ECHO_C" >&6
22422 else
22423   if test -n "$SGMLSPL"; then
22424   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22425 else
22426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22427 for as_dir in $PATH
22428 do
22429   IFS=$as_save_IFS
22430   test -z "$as_dir" && as_dir=.
22431   for ac_exec_ext in '' $ac_executable_extensions; do
22432   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22433     ac_cv_prog_SGMLSPL="$ac_prog"
22434     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22435     break 2
22436   fi
22437 done
22438 done
22439
22440 fi
22441 fi
22442 SGMLSPL=$ac_cv_prog_SGMLSPL
22443 if test -n "$SGMLSPL"; then
22444   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22445 echo "${ECHO_T}$SGMLSPL" >&6
22446 else
22447   echo "$as_me:$LINENO: result: no" >&5
22448 echo "${ECHO_T}no" >&6
22449 fi
22450
22451   test -n "$SGMLSPL" && break
22452 done
22453
22454
22455 # Thread testing
22456
22457 # We have to run the thread test near the end so we have all our symbols
22458 # defined.  Cross compiling throws a warning.
22459 #
22460 if test "$enable_thread_safety_force" = yes; then
22461 if test x"$template" != x"win32"
22462 then
22463   { echo "$as_me:$LINENO: WARNING:
22464 *** Skipping thread test program.  --enable-thread-safety-force was used.
22465 *** Run the program in src/tools/thread on the your machine and add
22466 proper locking function calls to your applications to guarantee thread
22467 safety.
22468 " >&5
22469 echo "$as_me: WARNING:
22470 *** Skipping thread test program.  --enable-thread-safety-force was used.
22471 *** Run the program in src/tools/thread on the your machine and add
22472 proper locking function calls to your applications to guarantee thread
22473 safety.
22474 " >&2;}
22475 else
22476 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22477 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22478 fi
22479 elif test "$enable_thread_safety" = yes; then
22480 if test x"$template" != x"win32"
22481 then
22482 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22483 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22484
22485 _CFLAGS="$CFLAGS"
22486 _LIBS="$LIBS"
22487 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22488 LIBS="$LIBS $PTHREAD_LIBS"
22489 if test "$cross_compiling" = yes; then
22490   echo "$as_me:$LINENO: result: maybe" >&5
22491 echo "${ECHO_T}maybe" >&6
22492   { echo "$as_me:$LINENO: WARNING:
22493 *** Skipping thread test program because of cross-compile build.
22494 *** Run the program in src/tools/thread on the target machine.
22495 " >&5
22496 echo "$as_me: WARNING:
22497 *** Skipping thread test program because of cross-compile build.
22498 *** Run the program in src/tools/thread on the target machine.
22499 " >&2;}
22500 else
22501   cat >conftest.$ac_ext <<_ACEOF
22502 /* confdefs.h.  */
22503 _ACEOF
22504 cat confdefs.h >>conftest.$ac_ext
22505 cat >>conftest.$ac_ext <<_ACEOF
22506 /* end confdefs.h.  */
22507 #include "$srcdir/src/tools/thread/thread_test.c"
22508 _ACEOF
22509 rm -f conftest$ac_exeext
22510 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22511   (eval $ac_link) 2>&5
22512   ac_status=$?
22513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22514   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22516   (eval $ac_try) 2>&5
22517   ac_status=$?
22518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22519   (exit $ac_status); }; }; then
22520   echo "$as_me:$LINENO: result: yes" >&5
22521 echo "${ECHO_T}yes" >&6
22522 else
22523   echo "$as_me: program exited with status $ac_status" >&5
22524 echo "$as_me: failed program was:" >&5
22525 sed 's/^/| /' conftest.$ac_ext >&5
22526
22527 ( exit $ac_status )
22528 echo "$as_me:$LINENO: result: no" >&5
22529 echo "${ECHO_T}no" >&6
22530   { { echo "$as_me:$LINENO: error:
22531 *** Thread test program failed.  Your platform is not thread-safe.
22532 *** Check the file 'config.log'for the exact reason.
22533 ***
22534 *** You can use the configure option --enable-thread-safety-force
22535 *** to force threads to be enabled.  However, you must then run
22536 *** the program in src/tools/thread and add locking function calls
22537 *** to your applications to guarantee thread safety.
22538 " >&5
22539 echo "$as_me: error:
22540 *** Thread test program failed.  Your platform is not thread-safe.
22541 *** Check the file 'config.log'for the exact reason.
22542 ***
22543 *** You can use the configure option --enable-thread-safety-force
22544 *** to force threads to be enabled.  However, you must then run
22545 *** the program in src/tools/thread and add locking function calls
22546 *** to your applications to guarantee thread safety.
22547 " >&2;}
22548    { (exit 1); exit 1; }; }
22549 fi
22550 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22551 fi
22552 CFLAGS="$_CFLAGS"
22553 LIBS="$_LIBS"
22554 else
22555 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22556 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22557 fi
22558 fi
22559
22560 # prepare build tree if outside source tree
22561 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22562 # Note 2: /bin/pwd might be better than shell's built-in at getting
22563 #         a symlink-free name.
22564 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22565   vpath_build=no
22566 else
22567   vpath_build=yes
22568   if test "$no_create" != yes; then
22569     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22570     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22571     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22572       || { { echo "$as_me:$LINENO: error: failed" >&5
22573 echo "$as_me: error: failed" >&2;}
22574    { (exit 1); exit 1; }; }
22575     echo "$as_me:$LINENO: result: done" >&5
22576 echo "${ECHO_T}done" >&6
22577   fi
22578 fi
22579
22580
22581
22582                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22583
22584
22585                                                             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}"
22586
22587
22588 if test "$PORTNAME" = "win32"; then
22589           ac_config_commands="$ac_config_commands check_win32_symlinks"
22590
22591 fi
22592
22593           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22594
22595
22596 cat >confcache <<\_ACEOF
22597 # This file is a shell script that caches the results of configure
22598 # tests run on this system so they can be shared between configure
22599 # scripts and configure runs, see configure's option --config-cache.
22600 # It is not useful on other systems.  If it contains results you don't
22601 # want to keep, you may remove or edit it.
22602 #
22603 # config.status only pays attention to the cache file if you give it
22604 # the --recheck option to rerun configure.
22605 #
22606 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22607 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22608 # following values.
22609
22610 _ACEOF
22611
22612 # The following way of writing the cache mishandles newlines in values,
22613 # but we know of no workaround that is simple, portable, and efficient.
22614 # So, don't put newlines in cache variables' values.
22615 # Ultrix sh set writes to stderr and can't be redirected directly,
22616 # and sets the high bit in the cache file unless we assign to the vars.
22617 {
22618   (set) 2>&1 |
22619     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22620     *ac_space=\ *)
22621       # `set' does not quote correctly, so add quotes (double-quote
22622       # substitution turns \\\\ into \\, and sed turns \\ into \).
22623       sed -n \
22624         "s/'/'\\\\''/g;
22625           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22626       ;;
22627     *)
22628       # `set' quotes correctly as required by POSIX, so do not add quotes.
22629       sed -n \
22630         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22631       ;;
22632     esac;
22633 } |
22634   sed '
22635      t clear
22636      : clear
22637      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22638      t end
22639      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22640      : end' >>confcache
22641 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22642   if test -w $cache_file; then
22643     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22644     cat confcache >$cache_file
22645   else
22646     echo "not updating unwritable cache $cache_file"
22647   fi
22648 fi
22649 rm -f confcache
22650
22651 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22652 # Let make expand exec_prefix.
22653 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22654
22655 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22656 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22657 # trailing colons and then remove the whole line if VPATH becomes empty
22658 # (actually we leave an empty line to preserve line numbers).
22659 if test "x$srcdir" = x.; then
22660   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22661 s/:*\$(srcdir):*/:/;
22662 s/:*\${srcdir}:*/:/;
22663 s/:*@srcdir@:*/:/;
22664 s/^\([^=]*=[     ]*\):*/\1/;
22665 s/:*$//;
22666 s/^[^=]*=[       ]*$//;
22667 }'
22668 fi
22669
22670 DEFS=-DHAVE_CONFIG_H
22671
22672 ac_libobjs=
22673 ac_ltlibobjs=
22674 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22675   # 1. Remove the extension, and $U if already installed.
22676   ac_i=`echo "$ac_i" |
22677          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22678   # 2. Add them.
22679   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22680   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22681 done
22682 LIBOBJS=$ac_libobjs
22683
22684 LTLIBOBJS=$ac_ltlibobjs
22685
22686
22687
22688 : ${CONFIG_STATUS=./config.status}
22689 ac_clean_files_save=$ac_clean_files
22690 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22691 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22692 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22693 cat >$CONFIG_STATUS <<_ACEOF
22694 #! $SHELL
22695 # Generated by $as_me.
22696 # Run this file to recreate the current configuration.
22697 # Compiler output produced by configure, useful for debugging
22698 # configure, is in config.log if it exists.
22699
22700 debug=false
22701 ac_cs_recheck=false
22702 ac_cs_silent=false
22703 SHELL=\${CONFIG_SHELL-$SHELL}
22704 _ACEOF
22705
22706 cat >>$CONFIG_STATUS <<\_ACEOF
22707 ## --------------------- ##
22708 ## M4sh Initialization.  ##
22709 ## --------------------- ##
22710
22711 # Be Bourne compatible
22712 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22713   emulate sh
22714   NULLCMD=:
22715   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22716   # is contrary to our usage.  Disable this feature.
22717   alias -g '${1+"$@"}'='"$@"'
22718 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22719   set -o posix
22720 fi
22721 DUALCASE=1; export DUALCASE # for MKS sh
22722
22723 # Support unset when possible.
22724 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22725   as_unset=unset
22726 else
22727   as_unset=false
22728 fi
22729
22730
22731 # Work around bugs in pre-3.0 UWIN ksh.
22732 $as_unset ENV MAIL MAILPATH
22733 PS1='$ '
22734 PS2='> '
22735 PS4='+ '
22736
22737 # NLS nuisances.
22738 for as_var in \
22739   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22740   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22741   LC_TELEPHONE LC_TIME
22742 do
22743   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22744     eval $as_var=C; export $as_var
22745   else
22746     $as_unset $as_var
22747   fi
22748 done
22749
22750 # Required to use basename.
22751 if expr a : '\(a\)' >/dev/null 2>&1; then
22752   as_expr=expr
22753 else
22754   as_expr=false
22755 fi
22756
22757 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22758   as_basename=basename
22759 else
22760   as_basename=false
22761 fi
22762
22763
22764 # Name of the executable.
22765 as_me=`$as_basename "$0" ||
22766 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22767          X"$0" : 'X\(//\)$' \| \
22768          X"$0" : 'X\(/\)$' \| \
22769          .     : '\(.\)' 2>/dev/null ||
22770 echo X/"$0" |
22771     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22772           /^X\/\(\/\/\)$/{ s//\1/; q; }
22773           /^X\/\(\/\).*/{ s//\1/; q; }
22774           s/.*/./; q'`
22775
22776
22777 # PATH needs CR, and LINENO needs CR and PATH.
22778 # Avoid depending upon Character Ranges.
22779 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22780 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22781 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22782 as_cr_digits='0123456789'
22783 as_cr_alnum=$as_cr_Letters$as_cr_digits
22784
22785 # The user is always right.
22786 if test "${PATH_SEPARATOR+set}" != set; then
22787   echo "#! /bin/sh" >conf$$.sh
22788   echo  "exit 0"   >>conf$$.sh
22789   chmod +x conf$$.sh
22790   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22791     PATH_SEPARATOR=';'
22792   else
22793     PATH_SEPARATOR=:
22794   fi
22795   rm -f conf$$.sh
22796 fi
22797
22798
22799   as_lineno_1=$LINENO
22800   as_lineno_2=$LINENO
22801   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22802   test "x$as_lineno_1" != "x$as_lineno_2" &&
22803   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
22804   # Find who we are.  Look in the path if we contain no path at all
22805   # relative or not.
22806   case $0 in
22807     *[\\/]* ) as_myself=$0 ;;
22808     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22809 for as_dir in $PATH
22810 do
22811   IFS=$as_save_IFS
22812   test -z "$as_dir" && as_dir=.
22813   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22814 done
22815
22816        ;;
22817   esac
22818   # We did not find ourselves, most probably we were run as `sh COMMAND'
22819   # in which case we are not to be found in the path.
22820   if test "x$as_myself" = x; then
22821     as_myself=$0
22822   fi
22823   if test ! -f "$as_myself"; then
22824     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22825 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22826    { (exit 1); exit 1; }; }
22827   fi
22828   case $CONFIG_SHELL in
22829   '')
22830     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22831 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22832 do
22833   IFS=$as_save_IFS
22834   test -z "$as_dir" && as_dir=.
22835   for as_base in sh bash ksh sh5; do
22836          case $as_dir in
22837          /*)
22838            if ("$as_dir/$as_base" -c '
22839   as_lineno_1=$LINENO
22840   as_lineno_2=$LINENO
22841   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22842   test "x$as_lineno_1" != "x$as_lineno_2" &&
22843   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
22844              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22845              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22846              CONFIG_SHELL=$as_dir/$as_base
22847              export CONFIG_SHELL
22848              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22849            fi;;
22850          esac
22851        done
22852 done
22853 ;;
22854   esac
22855
22856   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22857   # uniformly replaced by the line number.  The first 'sed' inserts a
22858   # line-number line before each line; the second 'sed' does the real
22859   # work.  The second script uses 'N' to pair each line-number line
22860   # with the numbered line, and appends trailing '-' during
22861   # substitution so that $LINENO is not a special case at line end.
22862   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22863   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
22864   sed '=' <$as_myself |
22865     sed '
22866       N
22867       s,$,-,
22868       : loop
22869       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22870       t loop
22871       s,-$,,
22872       s,^['$as_cr_digits']*\n,,
22873     ' >$as_me.lineno &&
22874   chmod +x $as_me.lineno ||
22875     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22876 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22877    { (exit 1); exit 1; }; }
22878
22879   # Don't try to exec as it changes $[0], causing all sort of problems
22880   # (the dirname of $[0] is not the place where we might find the
22881   # original and so on.  Autoconf is especially sensible to this).
22882   . ./$as_me.lineno
22883   # Exit status is that of the last command.
22884   exit
22885 }
22886
22887
22888 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22889   *c*,-n*) ECHO_N= ECHO_C='
22890 ' ECHO_T='      ' ;;
22891   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22892   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
22893 esac
22894
22895 if expr a : '\(a\)' >/dev/null 2>&1; then
22896   as_expr=expr
22897 else
22898   as_expr=false
22899 fi
22900
22901 rm -f conf$$ conf$$.exe conf$$.file
22902 echo >conf$$.file
22903 if ln -s conf$$.file conf$$ 2>/dev/null; then
22904   # We could just check for DJGPP; but this test a) works b) is more generic
22905   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22906   if test -f conf$$.exe; then
22907     # Don't use ln at all; we don't have any links
22908     as_ln_s='cp -p'
22909   else
22910     as_ln_s='ln -s'
22911   fi
22912 elif ln conf$$.file conf$$ 2>/dev/null; then
22913   as_ln_s=ln
22914 else
22915   as_ln_s='cp -p'
22916 fi
22917 rm -f conf$$ conf$$.exe conf$$.file
22918
22919 if mkdir -p . 2>/dev/null; then
22920   as_mkdir_p=:
22921 else
22922   test -d ./-p && rmdir ./-p
22923   as_mkdir_p=false
22924 fi
22925
22926 as_executable_p="test -f"
22927
22928 # Sed expression to map a string onto a valid CPP name.
22929 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22930
22931 # Sed expression to map a string onto a valid variable name.
22932 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22933
22934
22935 # IFS
22936 # We need space, tab and new line, in precisely that order.
22937 as_nl='
22938 '
22939 IFS="   $as_nl"
22940
22941 # CDPATH.
22942 $as_unset CDPATH
22943
22944 exec 6>&1
22945
22946 # Open the log real soon, to keep \$[0] and so on meaningful, and to
22947 # report actual input values of CONFIG_FILES etc. instead of their
22948 # values after options handling.  Logging --version etc. is OK.
22949 exec 5>>config.log
22950 {
22951   echo
22952   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22953 ## Running $as_me. ##
22954 _ASBOX
22955 } >&5
22956 cat >&5 <<_CSEOF
22957
22958 This file was extended by PostgreSQL $as_me 8.1beta2, which was
22959 generated by GNU Autoconf 2.59.  Invocation command line was
22960
22961   CONFIG_FILES    = $CONFIG_FILES
22962   CONFIG_HEADERS  = $CONFIG_HEADERS
22963   CONFIG_LINKS    = $CONFIG_LINKS
22964   CONFIG_COMMANDS = $CONFIG_COMMANDS
22965   $ $0 $@
22966
22967 _CSEOF
22968 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22969 echo >&5
22970 _ACEOF
22971
22972 # Files that config.status was made for.
22973 if test -n "$ac_config_files"; then
22974   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22975 fi
22976
22977 if test -n "$ac_config_headers"; then
22978   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22979 fi
22980
22981 if test -n "$ac_config_links"; then
22982   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22983 fi
22984
22985 if test -n "$ac_config_commands"; then
22986   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22987 fi
22988
22989 cat >>$CONFIG_STATUS <<\_ACEOF
22990
22991 ac_cs_usage="\
22992 \`$as_me' instantiates files from templates according to the
22993 current configuration.
22994
22995 Usage: $0 [OPTIONS] [FILE]...
22996
22997   -h, --help       print this help, then exit
22998   -V, --version    print version number, then exit
22999   -q, --quiet      do not print progress messages
23000   -d, --debug      don't remove temporary files
23001       --recheck    update $as_me by reconfiguring in the same conditions
23002   --file=FILE[:TEMPLATE]
23003                    instantiate the configuration file FILE
23004   --header=FILE[:TEMPLATE]
23005                    instantiate the configuration header FILE
23006
23007 Configuration files:
23008 $config_files
23009
23010 Configuration headers:
23011 $config_headers
23012
23013 Configuration links:
23014 $config_links
23015
23016 Configuration commands:
23017 $config_commands
23018
23019 Report bugs to <bug-autoconf@gnu.org>."
23020 _ACEOF
23021
23022 cat >>$CONFIG_STATUS <<_ACEOF
23023 ac_cs_version="\\
23024 PostgreSQL config.status 8.1beta2
23025 configured by $0, generated by GNU Autoconf 2.59,
23026   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23027
23028 Copyright (C) 2003 Free Software Foundation, Inc.
23029 This config.status script is free software; the Free Software Foundation
23030 gives unlimited permission to copy, distribute and modify it."
23031 srcdir=$srcdir
23032 _ACEOF
23033
23034 cat >>$CONFIG_STATUS <<\_ACEOF
23035 # If no file are specified by the user, then we need to provide default
23036 # value.  By we need to know if files were specified by the user.
23037 ac_need_defaults=:
23038 while test $# != 0
23039 do
23040   case $1 in
23041   --*=*)
23042     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23043     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23044     ac_shift=:
23045     ;;
23046   -*)
23047     ac_option=$1
23048     ac_optarg=$2
23049     ac_shift=shift
23050     ;;
23051   *) # This is not an option, so the user has probably given explicit
23052      # arguments.
23053      ac_option=$1
23054      ac_need_defaults=false;;
23055   esac
23056
23057   case $ac_option in
23058   # Handling of the options.
23059 _ACEOF
23060 cat >>$CONFIG_STATUS <<\_ACEOF
23061   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23062     ac_cs_recheck=: ;;
23063   --version | --vers* | -V )
23064     echo "$ac_cs_version"; exit 0 ;;
23065   --he | --h)
23066     # Conflict between --help and --header
23067     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23068 Try \`$0 --help' for more information." >&5
23069 echo "$as_me: error: ambiguous option: $1
23070 Try \`$0 --help' for more information." >&2;}
23071    { (exit 1); exit 1; }; };;
23072   --help | --hel | -h )
23073     echo "$ac_cs_usage"; exit 0 ;;
23074   --debug | --d* | -d )
23075     debug=: ;;
23076   --file | --fil | --fi | --f )
23077     $ac_shift
23078     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23079     ac_need_defaults=false;;
23080   --header | --heade | --head | --hea )
23081     $ac_shift
23082     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23083     ac_need_defaults=false;;
23084   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23085   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23086     ac_cs_silent=: ;;
23087
23088   # This is an error.
23089   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23090 Try \`$0 --help' for more information." >&5
23091 echo "$as_me: error: unrecognized option: $1
23092 Try \`$0 --help' for more information." >&2;}
23093    { (exit 1); exit 1; }; } ;;
23094
23095   *) ac_config_targets="$ac_config_targets $1" ;;
23096
23097   esac
23098   shift
23099 done
23100
23101 ac_configure_extra_args=
23102
23103 if $ac_cs_silent; then
23104   exec 6>/dev/null
23105   ac_configure_extra_args="$ac_configure_extra_args --silent"
23106 fi
23107
23108 _ACEOF
23109 cat >>$CONFIG_STATUS <<_ACEOF
23110 if \$ac_cs_recheck; then
23111   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23112   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23113 fi
23114
23115 _ACEOF
23116
23117
23118
23119
23120
23121 cat >>$CONFIG_STATUS <<\_ACEOF
23122 for ac_config_target in $ac_config_targets
23123 do
23124   case "$ac_config_target" in
23125   # Handling of arguments.
23126   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23127   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23128   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23129   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23130   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23131   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23132   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23133   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23134   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23135   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23136   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23137   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23138 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23139    { (exit 1); exit 1; }; };;
23140   esac
23141 done
23142
23143 # If the user did not use the arguments to specify the items to instantiate,
23144 # then the envvar interface is used.  Set only those that are not.
23145 # We use the long form for the default assignment because of an extremely
23146 # bizarre bug on SunOS 4.1.3.
23147 if $ac_need_defaults; then
23148   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23149   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23150   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23151   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23152 fi
23153
23154 # Have a temporary directory for convenience.  Make it in the build tree
23155 # simply because there is no reason to put it here, and in addition,
23156 # creating and moving files from /tmp can sometimes cause problems.
23157 # Create a temporary directory, and hook for its removal unless debugging.
23158 $debug ||
23159 {
23160   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23161   trap '{ (exit 1); exit 1; }' 1 2 13 15
23162 }
23163
23164 # Create a (secure) tmp directory for tmp files.
23165
23166 {
23167   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23168   test -n "$tmp" && test -d "$tmp"
23169 }  ||
23170 {
23171   tmp=./confstat$$-$RANDOM
23172   (umask 077 && mkdir $tmp)
23173 } ||
23174 {
23175    echo "$me: cannot create a temporary directory in ." >&2
23176    { (exit 1); exit 1; }
23177 }
23178
23179 _ACEOF
23180
23181 cat >>$CONFIG_STATUS <<_ACEOF
23182
23183 #
23184 # CONFIG_FILES section.
23185 #
23186
23187 # No need to generate the scripts if there are no CONFIG_FILES.
23188 # This happens for instance when ./config.status config.h
23189 if test -n "\$CONFIG_FILES"; then
23190   # Protect against being on the right side of a sed subst in config.status.
23191   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23192    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23193 s,@SHELL@,$SHELL,;t t
23194 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23195 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23196 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23197 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23198 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23199 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23200 s,@exec_prefix@,$exec_prefix,;t t
23201 s,@prefix@,$prefix,;t t
23202 s,@program_transform_name@,$program_transform_name,;t t
23203 s,@bindir@,$bindir,;t t
23204 s,@sbindir@,$sbindir,;t t
23205 s,@libexecdir@,$libexecdir,;t t
23206 s,@datadir@,$datadir,;t t
23207 s,@sysconfdir@,$sysconfdir,;t t
23208 s,@sharedstatedir@,$sharedstatedir,;t t
23209 s,@localstatedir@,$localstatedir,;t t
23210 s,@libdir@,$libdir,;t t
23211 s,@includedir@,$includedir,;t t
23212 s,@oldincludedir@,$oldincludedir,;t t
23213 s,@infodir@,$infodir,;t t
23214 s,@mandir@,$mandir,;t t
23215 s,@build_alias@,$build_alias,;t t
23216 s,@host_alias@,$host_alias,;t t
23217 s,@target_alias@,$target_alias,;t t
23218 s,@DEFS@,$DEFS,;t t
23219 s,@ECHO_C@,$ECHO_C,;t t
23220 s,@ECHO_N@,$ECHO_N,;t t
23221 s,@ECHO_T@,$ECHO_T,;t t
23222 s,@LIBS@,$LIBS,;t t
23223 s,@configure_args@,$configure_args,;t t
23224 s,@build@,$build,;t t
23225 s,@build_cpu@,$build_cpu,;t t
23226 s,@build_vendor@,$build_vendor,;t t
23227 s,@build_os@,$build_os,;t t
23228 s,@host@,$host,;t t
23229 s,@host_cpu@,$host_cpu,;t t
23230 s,@host_vendor@,$host_vendor,;t t
23231 s,@host_os@,$host_os,;t t
23232 s,@PORTNAME@,$PORTNAME,;t t
23233 s,@docdir@,$docdir,;t t
23234 s,@enable_nls@,$enable_nls,;t t
23235 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23236 s,@default_port@,$default_port,;t t
23237 s,@enable_shared@,$enable_shared,;t t
23238 s,@enable_rpath@,$enable_rpath,;t t
23239 s,@enable_debug@,$enable_debug,;t t
23240 s,@CC@,$CC,;t t
23241 s,@CFLAGS@,$CFLAGS,;t t
23242 s,@LDFLAGS@,$LDFLAGS,;t t
23243 s,@CPPFLAGS@,$CPPFLAGS,;t t
23244 s,@ac_ct_CC@,$ac_ct_CC,;t t
23245 s,@EXEEXT@,$EXEEXT,;t t
23246 s,@OBJEXT@,$OBJEXT,;t t
23247 s,@CPP@,$CPP,;t t
23248 s,@GCC@,$GCC,;t t
23249 s,@TAS@,$TAS,;t t
23250 s,@autodepend@,$autodepend,;t t
23251 s,@INCLUDES@,$INCLUDES,;t t
23252 s,@enable_thread_safety@,$enable_thread_safety,;t t
23253 s,@with_tcl@,$with_tcl,;t t
23254 s,@with_perl@,$with_perl,;t t
23255 s,@with_python@,$with_python,;t t
23256 s,@with_krb5@,$with_krb5,;t t
23257 s,@krb_srvtab@,$krb_srvtab,;t t
23258 s,@with_pam@,$with_pam,;t t
23259 s,@with_bonjour@,$with_bonjour,;t t
23260 s,@with_openssl@,$with_openssl,;t t
23261 s,@with_zlib@,$with_zlib,;t t
23262 s,@EGREP@,$EGREP,;t t
23263 s,@ELF_SYS@,$ELF_SYS,;t t
23264 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23265 s,@AWK@,$AWK,;t t
23266 s,@FLEX@,$FLEX,;t t
23267 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23268 s,@LN_S@,$LN_S,;t t
23269 s,@LD@,$LD,;t t
23270 s,@with_gnu_ld@,$with_gnu_ld,;t t
23271 s,@ld_R_works@,$ld_R_works,;t t
23272 s,@RANLIB@,$RANLIB,;t t
23273 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23274 s,@LORDER@,$LORDER,;t t
23275 s,@TAR@,$TAR,;t t
23276 s,@STRIP@,$STRIP,;t t
23277 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23278 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23279 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23280 s,@YACC@,$YACC,;t t
23281 s,@YFLAGS@,$YFLAGS,;t t
23282 s,@PERL@,$PERL,;t t
23283 s,@perl_archlibexp@,$perl_archlibexp,;t t
23284 s,@perl_privlibexp@,$perl_privlibexp,;t t
23285 s,@perl_useshrplib@,$perl_useshrplib,;t t
23286 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23287 s,@PYTHON@,$PYTHON,;t t
23288 s,@python_version@,$python_version,;t t
23289 s,@python_configdir@,$python_configdir,;t t
23290 s,@python_includespec@,$python_includespec,;t t
23291 s,@python_libdir@,$python_libdir,;t t
23292 s,@python_libspec@,$python_libspec,;t t
23293 s,@python_additional_libs@,$python_additional_libs,;t t
23294 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23295 s,@LIBOBJS@,$LIBOBJS,;t t
23296 s,@acx_pthread_config@,$acx_pthread_config,;t t
23297 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23298 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23299 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23300 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23301 s,@MSGFMT@,$MSGFMT,;t t
23302 s,@MSGMERGE@,$MSGMERGE,;t t
23303 s,@XGETTEXT@,$XGETTEXT,;t t
23304 s,@localedir@,$localedir,;t t
23305 s,@TCLSH@,$TCLSH,;t t
23306 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23307 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23308 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23309 s,@TCL_LIBS@,$TCL_LIBS,;t t
23310 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23311 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23312 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23313 s,@NSGMLS@,$NSGMLS,;t t
23314 s,@JADE@,$JADE,;t t
23315 s,@have_docbook@,$have_docbook,;t t
23316 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23317 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23318 s,@SGMLSPL@,$SGMLSPL,;t t
23319 s,@vpath_build@,$vpath_build,;t t
23320 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23321 CEOF
23322
23323 _ACEOF
23324
23325   cat >>$CONFIG_STATUS <<\_ACEOF
23326   # Split the substitutions into bite-sized pieces for seds with
23327   # small command number limits, like on Digital OSF/1 and HP-UX.
23328   ac_max_sed_lines=48
23329   ac_sed_frag=1 # Number of current file.
23330   ac_beg=1 # First line for current file.
23331   ac_end=$ac_max_sed_lines # Line after last line for current file.
23332   ac_more_lines=:
23333   ac_sed_cmds=
23334   while $ac_more_lines; do
23335     if test $ac_beg -gt 1; then
23336       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23337     else
23338       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23339     fi
23340     if test ! -s $tmp/subs.frag; then
23341       ac_more_lines=false
23342     else
23343       # The purpose of the label and of the branching condition is to
23344       # speed up the sed processing (if there are no `@' at all, there
23345       # is no need to browse any of the substitutions).
23346       # These are the two extra sed commands mentioned above.
23347       (echo ':t
23348   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23349       if test -z "$ac_sed_cmds"; then
23350         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23351       else
23352         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23353       fi
23354       ac_sed_frag=`expr $ac_sed_frag + 1`
23355       ac_beg=$ac_end
23356       ac_end=`expr $ac_end + $ac_max_sed_lines`
23357     fi
23358   done
23359   if test -z "$ac_sed_cmds"; then
23360     ac_sed_cmds=cat
23361   fi
23362 fi # test -n "$CONFIG_FILES"
23363
23364 _ACEOF
23365 cat >>$CONFIG_STATUS <<\_ACEOF
23366 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23367   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23368   case $ac_file in
23369   - | *:- | *:-:* ) # input from stdin
23370         cat >$tmp/stdin
23371         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23372         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23373   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23374         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23375   * )   ac_file_in=$ac_file.in ;;
23376   esac
23377
23378   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23379   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23380 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23381          X"$ac_file" : 'X\(//\)[^/]' \| \
23382          X"$ac_file" : 'X\(//\)$' \| \
23383          X"$ac_file" : 'X\(/\)' \| \
23384          .     : '\(.\)' 2>/dev/null ||
23385 echo X"$ac_file" |
23386     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23387           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23388           /^X\(\/\/\)$/{ s//\1/; q; }
23389           /^X\(\/\).*/{ s//\1/; q; }
23390           s/.*/./; q'`
23391   { if $as_mkdir_p; then
23392     mkdir -p "$ac_dir"
23393   else
23394     as_dir="$ac_dir"
23395     as_dirs=
23396     while test ! -d "$as_dir"; do
23397       as_dirs="$as_dir $as_dirs"
23398       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23399 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23400          X"$as_dir" : 'X\(//\)[^/]' \| \
23401          X"$as_dir" : 'X\(//\)$' \| \
23402          X"$as_dir" : 'X\(/\)' \| \
23403          .     : '\(.\)' 2>/dev/null ||
23404 echo X"$as_dir" |
23405     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23406           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23407           /^X\(\/\/\)$/{ s//\1/; q; }
23408           /^X\(\/\).*/{ s//\1/; q; }
23409           s/.*/./; q'`
23410     done
23411     test ! -n "$as_dirs" || mkdir $as_dirs
23412   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23413 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23414    { (exit 1); exit 1; }; }; }
23415
23416   ac_builddir=.
23417
23418 if test "$ac_dir" != .; then
23419   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23420   # A "../" for each directory in $ac_dir_suffix.
23421   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23422 else
23423   ac_dir_suffix= ac_top_builddir=
23424 fi
23425
23426 case $srcdir in
23427   .)  # No --srcdir option.  We are building in place.
23428     ac_srcdir=.
23429     if test -z "$ac_top_builddir"; then
23430        ac_top_srcdir=.
23431     else
23432        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23433     fi ;;
23434   [\\/]* | ?:[\\/]* )  # Absolute path.
23435     ac_srcdir=$srcdir$ac_dir_suffix;
23436     ac_top_srcdir=$srcdir ;;
23437   *) # Relative path.
23438     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23439     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23440 esac
23441
23442 # Do not use `cd foo && pwd` to compute absolute paths, because
23443 # the directories may not exist.
23444 case `pwd` in
23445 .) ac_abs_builddir="$ac_dir";;
23446 *)
23447   case "$ac_dir" in
23448   .) ac_abs_builddir=`pwd`;;
23449   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23450   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23451   esac;;
23452 esac
23453 case $ac_abs_builddir in
23454 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23455 *)
23456   case ${ac_top_builddir}. in
23457   .) ac_abs_top_builddir=$ac_abs_builddir;;
23458   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23459   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23460   esac;;
23461 esac
23462 case $ac_abs_builddir in
23463 .) ac_abs_srcdir=$ac_srcdir;;
23464 *)
23465   case $ac_srcdir in
23466   .) ac_abs_srcdir=$ac_abs_builddir;;
23467   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23468   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23469   esac;;
23470 esac
23471 case $ac_abs_builddir in
23472 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23473 *)
23474   case $ac_top_srcdir in
23475   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23476   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23477   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23478   esac;;
23479 esac
23480
23481
23482
23483   if test x"$ac_file" != x-; then
23484     { echo "$as_me:$LINENO: creating $ac_file" >&5
23485 echo "$as_me: creating $ac_file" >&6;}
23486     rm -f "$ac_file"
23487   fi
23488   # Let's still pretend it is `configure' which instantiates (i.e., don't
23489   # use $as_me), people would be surprised to read:
23490   #    /* config.h.  Generated by config.status.  */
23491   if test x"$ac_file" = x-; then
23492     configure_input=
23493   else
23494     configure_input="$ac_file.  "
23495   fi
23496   configure_input=$configure_input"Generated from `echo $ac_file_in |
23497                                      sed 's,.*/,,'` by configure."
23498
23499   # First look for the input files in the build tree, otherwise in the
23500   # src tree.
23501   ac_file_inputs=`IFS=:
23502     for f in $ac_file_in; do
23503       case $f in
23504       -) echo $tmp/stdin ;;
23505       [\\/$]*)
23506          # Absolute (can't be DOS-style, as IFS=:)
23507          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23508 echo "$as_me: error: cannot find input file: $f" >&2;}
23509    { (exit 1); exit 1; }; }
23510          echo "$f";;
23511       *) # Relative
23512          if test -f "$f"; then
23513            # Build tree
23514            echo "$f"
23515          elif test -f "$srcdir/$f"; then
23516            # Source tree
23517            echo "$srcdir/$f"
23518          else
23519            # /dev/null tree
23520            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23521 echo "$as_me: error: cannot find input file: $f" >&2;}
23522    { (exit 1); exit 1; }; }
23523          fi;;
23524       esac
23525     done` || { (exit 1); exit 1; }
23526 _ACEOF
23527 cat >>$CONFIG_STATUS <<_ACEOF
23528   sed "$ac_vpsub
23529 $extrasub
23530 _ACEOF
23531 cat >>$CONFIG_STATUS <<\_ACEOF
23532 :t
23533 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23534 s,@configure_input@,$configure_input,;t t
23535 s,@srcdir@,$ac_srcdir,;t t
23536 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23537 s,@top_srcdir@,$ac_top_srcdir,;t t
23538 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23539 s,@builddir@,$ac_builddir,;t t
23540 s,@abs_builddir@,$ac_abs_builddir,;t t
23541 s,@top_builddir@,$ac_top_builddir,;t t
23542 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23543 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23544   rm -f $tmp/stdin
23545   if test x"$ac_file" != x-; then
23546     mv $tmp/out $ac_file
23547   else
23548     cat $tmp/out
23549     rm -f $tmp/out
23550   fi
23551
23552 done
23553 _ACEOF
23554 cat >>$CONFIG_STATUS <<\_ACEOF
23555
23556 #
23557 # CONFIG_HEADER section.
23558 #
23559
23560 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23561 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23562 #
23563 # ac_d sets the value in "#define NAME VALUE" lines.
23564 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23565 ac_dB='[         ].*$,\1#\2'
23566 ac_dC=' '
23567 ac_dD=',;t'
23568 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23569 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23570 ac_uB='$,\1#\2define\3'
23571 ac_uC=' '
23572 ac_uD=',;t'
23573
23574 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23575   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23576   case $ac_file in
23577   - | *:- | *:-:* ) # input from stdin
23578         cat >$tmp/stdin
23579         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23580         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23581   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23582         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23583   * )   ac_file_in=$ac_file.in ;;
23584   esac
23585
23586   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23587 echo "$as_me: creating $ac_file" >&6;}
23588
23589   # First look for the input files in the build tree, otherwise in the
23590   # src tree.
23591   ac_file_inputs=`IFS=:
23592     for f in $ac_file_in; do
23593       case $f in
23594       -) echo $tmp/stdin ;;
23595       [\\/$]*)
23596          # Absolute (can't be DOS-style, as IFS=:)
23597          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23598 echo "$as_me: error: cannot find input file: $f" >&2;}
23599    { (exit 1); exit 1; }; }
23600          # Do quote $f, to prevent DOS paths from being IFS'd.
23601          echo "$f";;
23602       *) # Relative
23603          if test -f "$f"; then
23604            # Build tree
23605            echo "$f"
23606          elif test -f "$srcdir/$f"; then
23607            # Source tree
23608            echo "$srcdir/$f"
23609          else
23610            # /dev/null tree
23611            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23612 echo "$as_me: error: cannot find input file: $f" >&2;}
23613    { (exit 1); exit 1; }; }
23614          fi;;
23615       esac
23616     done` || { (exit 1); exit 1; }
23617   # Remove the trailing spaces.
23618   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23619
23620 _ACEOF
23621
23622 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23623 # `conftest.undefs', that substitutes the proper values into
23624 # config.h.in to produce config.h.  The first handles `#define'
23625 # templates, and the second `#undef' templates.
23626 # And first: Protect against being on the right side of a sed subst in
23627 # config.status.  Protect against being in an unquoted here document
23628 # in config.status.
23629 rm -f conftest.defines conftest.undefs
23630 # Using a here document instead of a string reduces the quoting nightmare.
23631 # Putting comments in sed scripts is not portable.
23632 #
23633 # `end' is used to avoid that the second main sed command (meant for
23634 # 0-ary CPP macros) applies to n-ary macro definitions.
23635 # See the Autoconf documentation for `clear'.
23636 cat >confdef2sed.sed <<\_ACEOF
23637 s/[\\&,]/\\&/g
23638 s,[\\$`],\\&,g
23639 t clear
23640 : clear
23641 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23642 t end
23643 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23644 : end
23645 _ACEOF
23646 # If some macros were called several times there might be several times
23647 # the same #defines, which is useless.  Nevertheless, we may not want to
23648 # sort them, since we want the *last* AC-DEFINE to be honored.
23649 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23650 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23651 rm -f confdef2sed.sed
23652
23653 # This sed command replaces #undef with comments.  This is necessary, for
23654 # example, in the case of _POSIX_SOURCE, which is predefined and required
23655 # on some systems where configure will not decide to define it.
23656 cat >>conftest.undefs <<\_ACEOF
23657 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23658 _ACEOF
23659
23660 # Break up conftest.defines because some shells have a limit on the size
23661 # of here documents, and old seds have small limits too (100 cmds).
23662 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23663 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23664 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23665 echo '  :' >>$CONFIG_STATUS
23666 rm -f conftest.tail
23667 while grep . conftest.defines >/dev/null
23668 do
23669   # Write a limited-size here document to $tmp/defines.sed.
23670   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23671   # Speed up: don't consider the non `#define' lines.
23672   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23673   # Work around the forget-to-reset-the-flag bug.
23674   echo 't clr' >>$CONFIG_STATUS
23675   echo ': clr' >>$CONFIG_STATUS
23676   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23677   echo 'CEOF
23678   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23679   rm -f $tmp/in
23680   mv $tmp/out $tmp/in
23681 ' >>$CONFIG_STATUS
23682   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23683   rm -f conftest.defines
23684   mv conftest.tail conftest.defines
23685 done
23686 rm -f conftest.defines
23687 echo '  fi # grep' >>$CONFIG_STATUS
23688 echo >>$CONFIG_STATUS
23689
23690 # Break up conftest.undefs because some shells have a limit on the size
23691 # of here documents, and old seds have small limits too (100 cmds).
23692 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23693 rm -f conftest.tail
23694 while grep . conftest.undefs >/dev/null
23695 do
23696   # Write a limited-size here document to $tmp/undefs.sed.
23697   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23698   # Speed up: don't consider the non `#undef'
23699   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23700   # Work around the forget-to-reset-the-flag bug.
23701   echo 't clr' >>$CONFIG_STATUS
23702   echo ': clr' >>$CONFIG_STATUS
23703   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23704   echo 'CEOF
23705   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23706   rm -f $tmp/in
23707   mv $tmp/out $tmp/in
23708 ' >>$CONFIG_STATUS
23709   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23710   rm -f conftest.undefs
23711   mv conftest.tail conftest.undefs
23712 done
23713 rm -f conftest.undefs
23714
23715 cat >>$CONFIG_STATUS <<\_ACEOF
23716   # Let's still pretend it is `configure' which instantiates (i.e., don't
23717   # use $as_me), people would be surprised to read:
23718   #    /* config.h.  Generated by config.status.  */
23719   if test x"$ac_file" = x-; then
23720     echo "/* Generated by configure.  */" >$tmp/config.h
23721   else
23722     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
23723   fi
23724   cat $tmp/in >>$tmp/config.h
23725   rm -f $tmp/in
23726   if test x"$ac_file" != x-; then
23727     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
23728       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23729 echo "$as_me: $ac_file is unchanged" >&6;}
23730     else
23731       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23732 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23733          X"$ac_file" : 'X\(//\)[^/]' \| \
23734          X"$ac_file" : 'X\(//\)$' \| \
23735          X"$ac_file" : 'X\(/\)' \| \
23736          .     : '\(.\)' 2>/dev/null ||
23737 echo X"$ac_file" |
23738     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23739           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23740           /^X\(\/\/\)$/{ s//\1/; q; }
23741           /^X\(\/\).*/{ s//\1/; q; }
23742           s/.*/./; q'`
23743       { if $as_mkdir_p; then
23744     mkdir -p "$ac_dir"
23745   else
23746     as_dir="$ac_dir"
23747     as_dirs=
23748     while test ! -d "$as_dir"; do
23749       as_dirs="$as_dir $as_dirs"
23750       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23751 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23752          X"$as_dir" : 'X\(//\)[^/]' \| \
23753          X"$as_dir" : 'X\(//\)$' \| \
23754          X"$as_dir" : 'X\(/\)' \| \
23755          .     : '\(.\)' 2>/dev/null ||
23756 echo X"$as_dir" |
23757     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23758           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23759           /^X\(\/\/\)$/{ s//\1/; q; }
23760           /^X\(\/\).*/{ s//\1/; q; }
23761           s/.*/./; q'`
23762     done
23763     test ! -n "$as_dirs" || mkdir $as_dirs
23764   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23765 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23766    { (exit 1); exit 1; }; }; }
23767
23768       rm -f $ac_file
23769       mv $tmp/config.h $ac_file
23770     fi
23771   else
23772     cat $tmp/config.h
23773     rm -f $tmp/config.h
23774   fi
23775   # Run the commands associated with the file.
23776   case $ac_file in
23777     src/include/pg_config.h )
23778 # Update timestamp for pg_config.h (see Makefile.global)
23779 echo >src/include/stamp-h
23780  ;;
23781   esac
23782 done
23783 _ACEOF
23784 cat >>$CONFIG_STATUS <<\_ACEOF
23785
23786 #
23787 # CONFIG_LINKS section.
23788 #
23789
23790 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23791   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23792   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23793
23794   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23795 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
23796
23797   if test ! -r $srcdir/$ac_source; then
23798     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23799 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23800    { (exit 1); exit 1; }; }
23801   fi
23802   rm -f $ac_dest
23803
23804   # Make relative symlinks.
23805   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
23806 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23807          X"$ac_dest" : 'X\(//\)[^/]' \| \
23808          X"$ac_dest" : 'X\(//\)$' \| \
23809          X"$ac_dest" : 'X\(/\)' \| \
23810          .     : '\(.\)' 2>/dev/null ||
23811 echo X"$ac_dest" |
23812     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23813           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23814           /^X\(\/\/\)$/{ s//\1/; q; }
23815           /^X\(\/\).*/{ s//\1/; q; }
23816           s/.*/./; q'`
23817   { if $as_mkdir_p; then
23818     mkdir -p "$ac_dest_dir"
23819   else
23820     as_dir="$ac_dest_dir"
23821     as_dirs=
23822     while test ! -d "$as_dir"; do
23823       as_dirs="$as_dir $as_dirs"
23824       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23825 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23826          X"$as_dir" : 'X\(//\)[^/]' \| \
23827          X"$as_dir" : 'X\(//\)$' \| \
23828          X"$as_dir" : 'X\(/\)' \| \
23829          .     : '\(.\)' 2>/dev/null ||
23830 echo X"$as_dir" |
23831     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23832           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23833           /^X\(\/\/\)$/{ s//\1/; q; }
23834           /^X\(\/\).*/{ s//\1/; q; }
23835           s/.*/./; q'`
23836     done
23837     test ! -n "$as_dirs" || mkdir $as_dirs
23838   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
23839 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
23840    { (exit 1); exit 1; }; }; }
23841
23842   ac_builddir=.
23843
23844 if test "$ac_dest_dir" != .; then
23845   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
23846   # A "../" for each directory in $ac_dir_suffix.
23847   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23848 else
23849   ac_dir_suffix= ac_top_builddir=
23850 fi
23851
23852 case $srcdir in
23853   .)  # No --srcdir option.  We are building in place.
23854     ac_srcdir=.
23855     if test -z "$ac_top_builddir"; then
23856        ac_top_srcdir=.
23857     else
23858        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23859     fi ;;
23860   [\\/]* | ?:[\\/]* )  # Absolute path.
23861     ac_srcdir=$srcdir$ac_dir_suffix;
23862     ac_top_srcdir=$srcdir ;;
23863   *) # Relative path.
23864     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23865     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23866 esac
23867
23868 # Do not use `cd foo && pwd` to compute absolute paths, because
23869 # the directories may not exist.
23870 case `pwd` in
23871 .) ac_abs_builddir="$ac_dest_dir";;
23872 *)
23873   case "$ac_dest_dir" in
23874   .) ac_abs_builddir=`pwd`;;
23875   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
23876   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
23877   esac;;
23878 esac
23879 case $ac_abs_builddir in
23880 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23881 *)
23882   case ${ac_top_builddir}. in
23883   .) ac_abs_top_builddir=$ac_abs_builddir;;
23884   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23885   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23886   esac;;
23887 esac
23888 case $ac_abs_builddir in
23889 .) ac_abs_srcdir=$ac_srcdir;;
23890 *)
23891   case $ac_srcdir in
23892   .) ac_abs_srcdir=$ac_abs_builddir;;
23893   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23894   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23895   esac;;
23896 esac
23897 case $ac_abs_builddir in
23898 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23899 *)
23900   case $ac_top_srcdir in
23901   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23902   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23903   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23904   esac;;
23905 esac
23906
23907
23908   case $srcdir in
23909   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
23910       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
23911   esac
23912
23913   # Try a symlink, then a hard link, then a copy.
23914   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
23915     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
23916     cp -p $srcdir/$ac_source $ac_dest ||
23917     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
23918 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
23919    { (exit 1); exit 1; }; }
23920 done
23921 _ACEOF
23922 cat >>$CONFIG_STATUS <<\_ACEOF
23923
23924 #
23925 # CONFIG_COMMANDS section.
23926 #
23927 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23928   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23929   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23930   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23931 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23932          X"$ac_dest" : 'X\(//\)[^/]' \| \
23933          X"$ac_dest" : 'X\(//\)$' \| \
23934          X"$ac_dest" : 'X\(/\)' \| \
23935          .     : '\(.\)' 2>/dev/null ||
23936 echo X"$ac_dest" |
23937     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23938           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23939           /^X\(\/\/\)$/{ s//\1/; q; }
23940           /^X\(\/\).*/{ s//\1/; q; }
23941           s/.*/./; q'`
23942   { if $as_mkdir_p; then
23943     mkdir -p "$ac_dir"
23944   else
23945     as_dir="$ac_dir"
23946     as_dirs=
23947     while test ! -d "$as_dir"; do
23948       as_dirs="$as_dir $as_dirs"
23949       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23950 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23951          X"$as_dir" : 'X\(//\)[^/]' \| \
23952          X"$as_dir" : 'X\(//\)$' \| \
23953          X"$as_dir" : 'X\(/\)' \| \
23954          .     : '\(.\)' 2>/dev/null ||
23955 echo X"$as_dir" |
23956     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23957           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23958           /^X\(\/\/\)$/{ s//\1/; q; }
23959           /^X\(\/\).*/{ s//\1/; q; }
23960           s/.*/./; q'`
23961     done
23962     test ! -n "$as_dirs" || mkdir $as_dirs
23963   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23964 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23965    { (exit 1); exit 1; }; }; }
23966
23967   ac_builddir=.
23968
23969 if test "$ac_dir" != .; then
23970   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23971   # A "../" for each directory in $ac_dir_suffix.
23972   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23973 else
23974   ac_dir_suffix= ac_top_builddir=
23975 fi
23976
23977 case $srcdir in
23978   .)  # No --srcdir option.  We are building in place.
23979     ac_srcdir=.
23980     if test -z "$ac_top_builddir"; then
23981        ac_top_srcdir=.
23982     else
23983        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23984     fi ;;
23985   [\\/]* | ?:[\\/]* )  # Absolute path.
23986     ac_srcdir=$srcdir$ac_dir_suffix;
23987     ac_top_srcdir=$srcdir ;;
23988   *) # Relative path.
23989     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23990     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23991 esac
23992
23993 # Do not use `cd foo && pwd` to compute absolute paths, because
23994 # the directories may not exist.
23995 case `pwd` in
23996 .) ac_abs_builddir="$ac_dir";;
23997 *)
23998   case "$ac_dir" in
23999   .) ac_abs_builddir=`pwd`;;
24000   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24001   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24002   esac;;
24003 esac
24004 case $ac_abs_builddir in
24005 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24006 *)
24007   case ${ac_top_builddir}. in
24008   .) ac_abs_top_builddir=$ac_abs_builddir;;
24009   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24010   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24011   esac;;
24012 esac
24013 case $ac_abs_builddir in
24014 .) ac_abs_srcdir=$ac_srcdir;;
24015 *)
24016   case $ac_srcdir in
24017   .) ac_abs_srcdir=$ac_abs_builddir;;
24018   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24019   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24020   esac;;
24021 esac
24022 case $ac_abs_builddir in
24023 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24024 *)
24025   case $ac_top_srcdir in
24026   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24027   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24028   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24029   esac;;
24030 esac
24031
24032
24033   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24034 echo "$as_me: executing $ac_dest commands" >&6;}
24035   case $ac_dest in
24036     check_win32_symlinks )
24037 # Links sometimes fail undetected on Mingw -
24038 # so here we detect it and warn the user
24039 for FILE in $CONFIG_LINKS
24040  do
24041         # test -e works for symlinks in the MinGW console
24042         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24043 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24044  done
24045  ;;
24046   esac
24047 done
24048 _ACEOF
24049
24050 cat >>$CONFIG_STATUS <<\_ACEOF
24051
24052 { (exit 0); exit 0; }
24053 _ACEOF
24054 chmod +x $CONFIG_STATUS
24055 ac_clean_files=$ac_clean_files_save
24056
24057
24058 # configure is writing to config.log, and then calls config.status.
24059 # config.status does its own redirection, appending to config.log.
24060 # Unfortunately, on DOS this fails, as config.log is still kept open
24061 # by configure, so config.status won't be able to write to it; its
24062 # output is simply discarded.  So we exec the FD to /dev/null,
24063 # effectively closing config.log, so it can be properly (re)opened and
24064 # appended to by config.status.  When coming back to configure, we
24065 # need to make the FD available again.
24066 if test "$no_create" != yes; then
24067   ac_cs_success=:
24068   ac_config_status_args=
24069   test "$silent" = yes &&
24070     ac_config_status_args="$ac_config_status_args --quiet"
24071   exec 5>/dev/null
24072   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24073   exec 5>>config.log
24074   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24075   # would make configure fail if this is the last instruction.
24076   $ac_cs_success || { (exit 1); exit 1; }
24077 fi
24078
24079