]> granicus.if.org Git - postgresql/blob - configure
Add documentation on the use of *printf() macros and libintl.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.2devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 2003 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright (c) 1996-2005, PostgreSQL Global Development Group
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248 # Name of the host.
249 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
250 # so uname gets run too.
251 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252
253 exec 6>&1
254
255 #
256 # Initializations.
257 #
258 ac_default_prefix=/usr/local
259 ac_config_libobj_dir=.
260 cross_compiling=no
261 subdirs=
262 MFLAGS=
263 MAKEFLAGS=
264 SHELL=${CONFIG_SHELL-/bin/sh}
265
266 # Maximum number of lines to put in a shell here document.
267 # This variable seems obsolete.  It should probably be removed, and
268 # only ac_max_sed_lines should be used.
269 : ${ac_max_here_lines=38}
270
271 # Identity of this package.
272 PACKAGE_NAME='PostgreSQL'
273 PACKAGE_TARNAME='postgresql'
274 PACKAGE_VERSION='8.2devel'
275 PACKAGE_STRING='PostgreSQL 8.2devel'
276 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
277
278 ac_unique_file="src/backend/access/common/heaptuple.c"
279 ac_default_prefix=/usr/local/pgsql
280 # Factoring default headers for most tests.
281 ac_includes_default="\
282 #include <stdio.h>
283 #if HAVE_SYS_TYPES_H
284 # include <sys/types.h>
285 #endif
286 #if HAVE_SYS_STAT_H
287 # include <sys/stat.h>
288 #endif
289 #if STDC_HEADERS
290 # include <stdlib.h>
291 # include <stddef.h>
292 #else
293 # if HAVE_STDLIB_H
294 #  include <stdlib.h>
295 # endif
296 #endif
297 #if HAVE_STRING_H
298 # if !STDC_HEADERS && HAVE_MEMORY_H
299 #  include <memory.h>
300 # endif
301 # include <string.h>
302 #endif
303 #if HAVE_STRINGS_H
304 # include <strings.h>
305 #endif
306 #if HAVE_INTTYPES_H
307 # include <inttypes.h>
308 #else
309 # if HAVE_STDINT_H
310 #  include <stdint.h>
311 # endif
312 #endif
313 #if HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif"
316
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318 ac_subst_files=''
319
320 # Initialize some variables set by options.
321 ac_init_help=
322 ac_init_version=false
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 cache_file=/dev/null
326 exec_prefix=NONE
327 no_create=
328 no_recursion=
329 prefix=NONE
330 program_prefix=NONE
331 program_suffix=NONE
332 program_transform_name=s,x,x,
333 silent=
334 site=
335 srcdir=
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339
340 # Installation directory options.
341 # These are left unexpanded so users can "make install exec_prefix=/foo"
342 # and all the variables that are supposed to be based on exec_prefix
343 # by default will actually change.
344 # Use braces instead of parens because sh, perl, etc. also accept them.
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 ac_prev=
359 for ac_option
360 do
361   # If the previous option needs an argument, assign it.
362   if test -n "$ac_prev"; then
363     eval "$ac_prev=\$ac_option"
364     ac_prev=
365     continue
366   fi
367
368   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
369
370   # Accept the important Cygnus configure options, so we can diagnose typos.
371
372   case $ac_option in
373
374   -bindir | --bindir | --bindi | --bind | --bin | --bi)
375     ac_prev=bindir ;;
376   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
377     bindir=$ac_optarg ;;
378
379   -build | --build | --buil | --bui | --bu)
380     ac_prev=build_alias ;;
381   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
382     build_alias=$ac_optarg ;;
383
384   -cache-file | --cache-file | --cache-fil | --cache-fi \
385   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
386     ac_prev=cache_file ;;
387   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
388   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
389     cache_file=$ac_optarg ;;
390
391   --config-cache | -C)
392     cache_file=config.cache ;;
393
394   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
395     ac_prev=datadir ;;
396   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
397   | --da=*)
398     datadir=$ac_optarg ;;
399
400   -disable-* | --disable-*)
401     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
405    { (exit 1); exit 1; }; }
406     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
407     eval "enable_$ac_feature=no" ;;
408
409   -enable-* | --enable-*)
410     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
414    { (exit 1); exit 1; }; }
415     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
416     case $ac_option in
417       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418       *) ac_optarg=yes ;;
419     esac
420     eval "enable_$ac_feature='$ac_optarg'" ;;
421
422   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
423   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
424   | --exec | --exe | --ex)
425     ac_prev=exec_prefix ;;
426   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
427   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
428   | --exec=* | --exe=* | --ex=*)
429     exec_prefix=$ac_optarg ;;
430
431   -gas | --gas | --ga | --g)
432     # Obsolete; use --with-gas.
433     with_gas=yes ;;
434
435   -help | --help | --hel | --he | -h)
436     ac_init_help=long ;;
437   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
438     ac_init_help=recursive ;;
439   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
440     ac_init_help=short ;;
441
442   -host | --host | --hos | --ho)
443     ac_prev=host_alias ;;
444   -host=* | --host=* | --hos=* | --ho=*)
445     host_alias=$ac_optarg ;;
446
447   -includedir | --includedir | --includedi | --included | --include \
448   | --includ | --inclu | --incl | --inc)
449     ac_prev=includedir ;;
450   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
451   | --includ=* | --inclu=* | --incl=* | --inc=*)
452     includedir=$ac_optarg ;;
453
454   -infodir | --infodir | --infodi | --infod | --info | --inf)
455     ac_prev=infodir ;;
456   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
457     infodir=$ac_optarg ;;
458
459   -libdir | --libdir | --libdi | --libd)
460     ac_prev=libdir ;;
461   -libdir=* | --libdir=* | --libdi=* | --libd=*)
462     libdir=$ac_optarg ;;
463
464   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
465   | --libexe | --libex | --libe)
466     ac_prev=libexecdir ;;
467   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
468   | --libexe=* | --libex=* | --libe=*)
469     libexecdir=$ac_optarg ;;
470
471   -localstatedir | --localstatedir | --localstatedi | --localstated \
472   | --localstate | --localstat | --localsta | --localst \
473   | --locals | --local | --loca | --loc | --lo)
474     ac_prev=localstatedir ;;
475   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
476   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
477   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
478     localstatedir=$ac_optarg ;;
479
480   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
481     ac_prev=mandir ;;
482   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
483     mandir=$ac_optarg ;;
484
485   -nfp | --nfp | --nf)
486     # Obsolete; use --without-fp.
487     with_fp=no ;;
488
489   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
490   | --no-cr | --no-c | -n)
491     no_create=yes ;;
492
493   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
495     no_recursion=yes ;;
496
497   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
498   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
499   | --oldin | --oldi | --old | --ol | --o)
500     ac_prev=oldincludedir ;;
501   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
502   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
503   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
504     oldincludedir=$ac_optarg ;;
505
506   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
507     ac_prev=prefix ;;
508   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
509     prefix=$ac_optarg ;;
510
511   -program-prefix | --program-prefix | --program-prefi | --program-pref \
512   | --program-pre | --program-pr | --program-p)
513     ac_prev=program_prefix ;;
514   -program-prefix=* | --program-prefix=* | --program-prefi=* \
515   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
516     program_prefix=$ac_optarg ;;
517
518   -program-suffix | --program-suffix | --program-suffi | --program-suff \
519   | --program-suf | --program-su | --program-s)
520     ac_prev=program_suffix ;;
521   -program-suffix=* | --program-suffix=* | --program-suffi=* \
522   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
523     program_suffix=$ac_optarg ;;
524
525   -program-transform-name | --program-transform-name \
526   | --program-transform-nam | --program-transform-na \
527   | --program-transform-n | --program-transform- \
528   | --program-transform | --program-transfor \
529   | --program-transfo | --program-transf \
530   | --program-trans | --program-tran \
531   | --progr-tra | --program-tr | --program-t)
532     ac_prev=program_transform_name ;;
533   -program-transform-name=* | --program-transform-name=* \
534   | --program-transform-nam=* | --program-transform-na=* \
535   | --program-transform-n=* | --program-transform-=* \
536   | --program-transform=* | --program-transfor=* \
537   | --program-transfo=* | --program-transf=* \
538   | --program-trans=* | --program-tran=* \
539   | --progr-tra=* | --program-tr=* | --program-t=*)
540     program_transform_name=$ac_optarg ;;
541
542   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
543   | -silent | --silent | --silen | --sile | --sil)
544     silent=yes ;;
545
546   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
547     ac_prev=sbindir ;;
548   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
549   | --sbi=* | --sb=*)
550     sbindir=$ac_optarg ;;
551
552   -sharedstatedir | --sharedstatedir | --sharedstatedi \
553   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
554   | --sharedst | --shareds | --shared | --share | --shar \
555   | --sha | --sh)
556     ac_prev=sharedstatedir ;;
557   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
558   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
559   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
560   | --sha=* | --sh=*)
561     sharedstatedir=$ac_optarg ;;
562
563   -site | --site | --sit)
564     ac_prev=site ;;
565   -site=* | --site=* | --sit=*)
566     site=$ac_optarg ;;
567
568   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
569     ac_prev=srcdir ;;
570   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
571     srcdir=$ac_optarg ;;
572
573   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
574   | --syscon | --sysco | --sysc | --sys | --sy)
575     ac_prev=sysconfdir ;;
576   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
577   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
578     sysconfdir=$ac_optarg ;;
579
580   -target | --target | --targe | --targ | --tar | --ta | --t)
581     ac_prev=target_alias ;;
582   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
583     target_alias=$ac_optarg ;;
584
585   -v | -verbose | --verbose | --verbos | --verbo | --verb)
586     verbose=yes ;;
587
588   -version | --version | --versio | --versi | --vers | -V)
589     ac_init_version=: ;;
590
591   -with-* | --with-*)
592     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
593     # Reject names that are not valid shell variable names.
594     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
595       { echo "$as_me: error: invalid package name: $ac_package" >&2
596    { (exit 1); exit 1; }; }
597     ac_package=`echo $ac_package| sed 's/-/_/g'`
598     case $ac_option in
599       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
600       *) ac_optarg=yes ;;
601     esac
602     eval "with_$ac_package='$ac_optarg'" ;;
603
604   -without-* | --without-*)
605     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
606     # Reject names that are not valid shell variable names.
607     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
608       { echo "$as_me: error: invalid package name: $ac_package" >&2
609    { (exit 1); exit 1; }; }
610     ac_package=`echo $ac_package | sed 's/-/_/g'`
611     eval "with_$ac_package=no" ;;
612
613   --x)
614     # Obsolete; use --with-x.
615     with_x=yes ;;
616
617   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
618   | --x-incl | --x-inc | --x-in | --x-i)
619     ac_prev=x_includes ;;
620   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
621   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
622     x_includes=$ac_optarg ;;
623
624   -x-libraries | --x-libraries | --x-librarie | --x-librari \
625   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
626     ac_prev=x_libraries ;;
627   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
628   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
629     x_libraries=$ac_optarg ;;
630
631   -*) { echo "$as_me: error: unrecognized option: $ac_option
632 Try \`$0 --help' for more information." >&2
633    { (exit 1); exit 1; }; }
634     ;;
635
636   *=*)
637     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
638     # Reject names that are not valid shell variable names.
639     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
640       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
641    { (exit 1); exit 1; }; }
642     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
643     eval "$ac_envvar='$ac_optarg'"
644     export $ac_envvar ;;
645
646   *)
647     # FIXME: should be removed in autoconf 3.0.
648     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
649     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
650       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
651     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
652     ;;
653
654   esac
655 done
656
657 if test -n "$ac_prev"; then
658   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
659   { echo "$as_me: error: missing argument to $ac_option" >&2
660    { (exit 1); exit 1; }; }
661 fi
662
663 # Be sure to have absolute paths.
664 for ac_var in exec_prefix prefix
665 do
666   eval ac_val=$`echo $ac_var`
667   case $ac_val in
668     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
669     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
670    { (exit 1); exit 1; }; };;
671   esac
672 done
673
674 # Be sure to have absolute paths.
675 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
676               localstatedir libdir includedir oldincludedir infodir mandir
677 do
678   eval ac_val=$`echo $ac_var`
679   case $ac_val in
680     [\\/$]* | ?:[\\/]* ) ;;
681     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
682    { (exit 1); exit 1; }; };;
683   esac
684 done
685
686 # There might be people who depend on the old broken behavior: `$host'
687 # used to hold the argument of --host etc.
688 # FIXME: To remove some day.
689 build=$build_alias
690 host=$host_alias
691 target=$target_alias
692
693 # FIXME: To remove some day.
694 if test "x$host_alias" != x; then
695   if test "x$build_alias" = x; then
696     cross_compiling=maybe
697     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
698     If a cross compiler is detected then cross compile mode will be used." >&2
699   elif test "x$build_alias" != "x$host_alias"; then
700     cross_compiling=yes
701   fi
702 fi
703
704 ac_tool_prefix=
705 test -n "$host_alias" && ac_tool_prefix=$host_alias-
706
707 test "$silent" = yes && exec 6>/dev/null
708
709
710 # Find the source files, if location was not specified.
711 if test -z "$srcdir"; then
712   ac_srcdir_defaulted=yes
713   # Try the directory containing this script, then its parent.
714   ac_confdir=`(dirname "$0") 2>/dev/null ||
715 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
716          X"$0" : 'X\(//\)[^/]' \| \
717          X"$0" : 'X\(//\)$' \| \
718          X"$0" : 'X\(/\)' \| \
719          .     : '\(.\)' 2>/dev/null ||
720 echo X"$0" |
721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
722           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
723           /^X\(\/\/\)$/{ s//\1/; q; }
724           /^X\(\/\).*/{ s//\1/; q; }
725           s/.*/./; q'`
726   srcdir=$ac_confdir
727   if test ! -r $srcdir/$ac_unique_file; then
728     srcdir=..
729   fi
730 else
731   ac_srcdir_defaulted=no
732 fi
733 if test ! -r $srcdir/$ac_unique_file; then
734   if test "$ac_srcdir_defaulted" = yes; then
735     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
736    { (exit 1); exit 1; }; }
737   else
738     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
739    { (exit 1); exit 1; }; }
740   fi
741 fi
742 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
743   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
744    { (exit 1); exit 1; }; }
745 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
746 ac_env_build_alias_set=${build_alias+set}
747 ac_env_build_alias_value=$build_alias
748 ac_cv_env_build_alias_set=${build_alias+set}
749 ac_cv_env_build_alias_value=$build_alias
750 ac_env_host_alias_set=${host_alias+set}
751 ac_env_host_alias_value=$host_alias
752 ac_cv_env_host_alias_set=${host_alias+set}
753 ac_cv_env_host_alias_value=$host_alias
754 ac_env_target_alias_set=${target_alias+set}
755 ac_env_target_alias_value=$target_alias
756 ac_cv_env_target_alias_set=${target_alias+set}
757 ac_cv_env_target_alias_value=$target_alias
758 ac_env_CC_set=${CC+set}
759 ac_env_CC_value=$CC
760 ac_cv_env_CC_set=${CC+set}
761 ac_cv_env_CC_value=$CC
762 ac_env_CFLAGS_set=${CFLAGS+set}
763 ac_env_CFLAGS_value=$CFLAGS
764 ac_cv_env_CFLAGS_set=${CFLAGS+set}
765 ac_cv_env_CFLAGS_value=$CFLAGS
766 ac_env_LDFLAGS_set=${LDFLAGS+set}
767 ac_env_LDFLAGS_value=$LDFLAGS
768 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
769 ac_cv_env_LDFLAGS_value=$LDFLAGS
770 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
771 ac_env_CPPFLAGS_value=$CPPFLAGS
772 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
773 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
774 ac_env_CPP_set=${CPP+set}
775 ac_env_CPP_value=$CPP
776 ac_cv_env_CPP_set=${CPP+set}
777 ac_cv_env_CPP_value=$CPP
778 ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
779 ac_env_LDFLAGS_SL_value=$LDFLAGS_SL
780 ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
781 ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL
782 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
783 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
784 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
785 ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
786
787 #
788 # Report the --help message.
789 #
790 if test "$ac_init_help" = "long"; then
791   # Omit some internal or obsolete options to make the list less imposing.
792   # This message is too long to be a string in the A/UX 3.1 sh.
793   cat <<_ACEOF
794 \`configure' configures PostgreSQL 8.2devel to adapt to many kinds of systems.
795
796 Usage: $0 [OPTION]... [VAR=VALUE]...
797
798 To assign environment variables (e.g., CC, CFLAGS...), specify them as
799 VAR=VALUE.  See below for descriptions of some of the useful variables.
800
801 Defaults for the options are specified in brackets.
802
803 Configuration:
804   -h, --help              display this help and exit
805       --help=short        display options specific to this package
806       --help=recursive    display the short help of all the included packages
807   -V, --version           display version information and exit
808   -q, --quiet, --silent   do not print \`checking...' messages
809       --cache-file=FILE   cache test results in FILE [disabled]
810   -C, --config-cache      alias for \`--cache-file=config.cache'
811   -n, --no-create         do not create output files
812       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
813
814 _ACEOF
815
816   cat <<_ACEOF
817 Installation directories:
818   --prefix=PREFIX         install architecture-independent files in PREFIX
819                           [$ac_default_prefix]
820   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
821                           [PREFIX]
822
823 By default, \`make install' will install all the files in
824 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
825 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
826 for instance \`--prefix=\$HOME'.
827
828 For better control, use the options below.
829
830 Fine tuning of the installation directories:
831   --bindir=DIR           user executables [EPREFIX/bin]
832   --sbindir=DIR          system admin executables [EPREFIX/sbin]
833   --libexecdir=DIR       program executables [EPREFIX/libexec]
834   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
835   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
836   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
837   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
838   --libdir=DIR           object code libraries [EPREFIX/lib]
839   --includedir=DIR       C header files [PREFIX/include]
840   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
841   --infodir=DIR          info documentation [PREFIX/info]
842   --mandir=DIR           man documentation [PREFIX/man]
843 _ACEOF
844
845   cat <<\_ACEOF
846
847 System types:
848   --build=BUILD     configure for building on BUILD [guessed]
849   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
850 _ACEOF
851 fi
852
853 if test -n "$ac_init_help"; then
854   case $ac_init_help in
855      short | recursive ) echo "Configuration of PostgreSQL 8.2devel:";;
856    esac
857   cat <<\_ACEOF
858
859 Optional Features:
860   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
861   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
862   --enable-integer-datetimes  enable 64-bit integer date/time support
863   --enable-nls[=LANGUAGES]  enable Native Language Support
864   --disable-shared        do not build shared libraries
865   --disable-rpath         do not embed shared library search path in executables
866   --disable-spinlocks     do not use spinlocks
867   --enable-debug          build with debugging symbols (-g)
868   --enable-depend         turn on automatic dependency tracking
869   --enable-cassert        enable assertion checks (for debugging)
870   --enable-thread-safety  make client libraries thread-safe
871   --enable-thread-safety-force  force thread-safety in spite of thread test failure
872   --disable-largefile     omit support for large files
873
874 Optional Packages:
875   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
876   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
877
878   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
879   --without-docdir        do not install the documentation
880   --with-includes=DIRS    look for additional header files in DIRS
881   --with-libraries=DIRS   look for additional libraries in DIRS
882   --with-libs=DIRS        alternative spelling of --with-libraries
883   --with-pgport=PORTNUM   change default port number 5432
884   --with-tcl              build Tcl modules (PL/Tcl)
885   --with-tclconfig=DIR    tclConfig.sh is in DIR
886   --with-perl             build Perl modules (PL/Perl)
887   --with-python           build Python modules (PL/Python)
888   --with-krb5             build with Kerberos 5 support
889   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
890   --with-pam              build with PAM support
891   --with-bonjour          build with Bonjour support
892   --with-openssl          build with OpenSSL support
893   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
894   --without-readline      do not use GNU Readline / BSD Libedit line editing
895   --without-zlib          do not use Zlib
896   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
897
898 Some influential environment variables:
899   CC          C compiler command
900   CFLAGS      C compiler flags
901   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
902               nonstandard directory <lib dir>
903   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
904               headers in a nonstandard directory <include dir>
905   CPP         C preprocessor
906   LDFLAGS_SL
907   DOCBOOKSTYLE
908               location of DocBook stylesheets
909
910 Use these variables to override the choices made by `configure' or to help
911 it to find libraries and programs with nonstandard names/locations.
912
913 Report bugs to <pgsql-bugs@postgresql.org>.
914 _ACEOF
915 fi
916
917 if test "$ac_init_help" = "recursive"; then
918   # If there are subdirs, report their specific --help.
919   ac_popdir=`pwd`
920   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
921     test -d $ac_dir || continue
922     ac_builddir=.
923
924 if test "$ac_dir" != .; then
925   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
926   # A "../" for each directory in $ac_dir_suffix.
927   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
928 else
929   ac_dir_suffix= ac_top_builddir=
930 fi
931
932 case $srcdir in
933   .)  # No --srcdir option.  We are building in place.
934     ac_srcdir=.
935     if test -z "$ac_top_builddir"; then
936        ac_top_srcdir=.
937     else
938        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
939     fi ;;
940   [\\/]* | ?:[\\/]* )  # Absolute path.
941     ac_srcdir=$srcdir$ac_dir_suffix;
942     ac_top_srcdir=$srcdir ;;
943   *) # Relative path.
944     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
945     ac_top_srcdir=$ac_top_builddir$srcdir ;;
946 esac
947
948 # Do not use `cd foo && pwd` to compute absolute paths, because
949 # the directories may not exist.
950 case `pwd` in
951 .) ac_abs_builddir="$ac_dir";;
952 *)
953   case "$ac_dir" in
954   .) ac_abs_builddir=`pwd`;;
955   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
956   *) ac_abs_builddir=`pwd`/"$ac_dir";;
957   esac;;
958 esac
959 case $ac_abs_builddir in
960 .) ac_abs_top_builddir=${ac_top_builddir}.;;
961 *)
962   case ${ac_top_builddir}. in
963   .) ac_abs_top_builddir=$ac_abs_builddir;;
964   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
965   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
966   esac;;
967 esac
968 case $ac_abs_builddir in
969 .) ac_abs_srcdir=$ac_srcdir;;
970 *)
971   case $ac_srcdir in
972   .) ac_abs_srcdir=$ac_abs_builddir;;
973   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
974   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
975   esac;;
976 esac
977 case $ac_abs_builddir in
978 .) ac_abs_top_srcdir=$ac_top_srcdir;;
979 *)
980   case $ac_top_srcdir in
981   .) ac_abs_top_srcdir=$ac_abs_builddir;;
982   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
983   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
984   esac;;
985 esac
986
987     cd $ac_dir
988     # Check for guested configure; otherwise get Cygnus style configure.
989     if test -f $ac_srcdir/configure.gnu; then
990       echo
991       $SHELL $ac_srcdir/configure.gnu  --help=recursive
992     elif test -f $ac_srcdir/configure; then
993       echo
994       $SHELL $ac_srcdir/configure  --help=recursive
995     elif test -f $ac_srcdir/configure.ac ||
996            test -f $ac_srcdir/configure.in; then
997       echo
998       $ac_configure --help
999     else
1000       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1001     fi
1002     cd $ac_popdir
1003   done
1004 fi
1005
1006 test -n "$ac_init_help" && exit 0
1007 if $ac_init_version; then
1008   cat <<\_ACEOF
1009 PostgreSQL configure 8.2devel
1010 generated by GNU Autoconf 2.59
1011
1012 Copyright (C) 2003 Free Software Foundation, Inc.
1013 This configure script is free software; the Free Software Foundation
1014 gives unlimited permission to copy, distribute and modify it.
1015
1016 Copyright (c) 1996-2005, PostgreSQL Global Development Group
1017 _ACEOF
1018   exit 0
1019 fi
1020 exec 5>config.log
1021 cat >&5 <<_ACEOF
1022 This file contains any messages produced by compilers while
1023 running configure, to aid debugging if configure makes a mistake.
1024
1025 It was created by PostgreSQL $as_me 8.2devel, which was
1026 generated by GNU Autoconf 2.59.  Invocation command line was
1027
1028   $ $0 $@
1029
1030 _ACEOF
1031 {
1032 cat <<_ASUNAME
1033 ## --------- ##
1034 ## Platform. ##
1035 ## --------- ##
1036
1037 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1038 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1039 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1040 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1041 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1042
1043 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1044 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1045
1046 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1047 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1048 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1049 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1050 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1051 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1052 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1053
1054 _ASUNAME
1055
1056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1057 for as_dir in $PATH
1058 do
1059   IFS=$as_save_IFS
1060   test -z "$as_dir" && as_dir=.
1061   echo "PATH: $as_dir"
1062 done
1063
1064 } >&5
1065
1066 cat >&5 <<_ACEOF
1067
1068
1069 ## ----------- ##
1070 ## Core tests. ##
1071 ## ----------- ##
1072
1073 _ACEOF
1074
1075
1076 # Keep a trace of the command line.
1077 # Strip out --no-create and --no-recursion so they do not pile up.
1078 # Strip out --silent because we don't want to record it for future runs.
1079 # Also quote any args containing shell meta-characters.
1080 # Make two passes to allow for proper duplicate-argument suppression.
1081 ac_configure_args=
1082 ac_configure_args0=
1083 ac_configure_args1=
1084 ac_sep=
1085 ac_must_keep_next=false
1086 for ac_pass in 1 2
1087 do
1088   for ac_arg
1089   do
1090     case $ac_arg in
1091     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1092     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1093     | -silent | --silent | --silen | --sile | --sil)
1094       continue ;;
1095     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1096       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1097     esac
1098     case $ac_pass in
1099     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1100     2)
1101       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1102       if test $ac_must_keep_next = true; then
1103         ac_must_keep_next=false # Got value, back to normal.
1104       else
1105         case $ac_arg in
1106           *=* | --config-cache | -C | -disable-* | --disable-* \
1107           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1108           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1109           | -with-* | --with-* | -without-* | --without-* | --x)
1110             case "$ac_configure_args0 " in
1111               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1112             esac
1113             ;;
1114           -* ) ac_must_keep_next=true ;;
1115         esac
1116       fi
1117       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1118       # Get rid of the leading space.
1119       ac_sep=" "
1120       ;;
1121     esac
1122   done
1123 done
1124 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1125 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1126
1127 # When interrupted or exit'd, cleanup temporary files, and complete
1128 # config.log.  We remove comments because anyway the quotes in there
1129 # would cause problems or look ugly.
1130 # WARNING: Be sure not to use single quotes in there, as some shells,
1131 # such as our DU 5.0 friend, will then `close' the trap.
1132 trap 'exit_status=$?
1133   # Save into config.log some information that might help in debugging.
1134   {
1135     echo
1136
1137     cat <<\_ASBOX
1138 ## ---------------- ##
1139 ## Cache variables. ##
1140 ## ---------------- ##
1141 _ASBOX
1142     echo
1143     # The following way of writing the cache mishandles newlines in values,
1144 {
1145   (set) 2>&1 |
1146     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1147     *ac_space=\ *)
1148       sed -n \
1149         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1150           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1151       ;;
1152     *)
1153       sed -n \
1154         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1155       ;;
1156     esac;
1157 }
1158     echo
1159
1160     cat <<\_ASBOX
1161 ## ----------------- ##
1162 ## Output variables. ##
1163 ## ----------------- ##
1164 _ASBOX
1165     echo
1166     for ac_var in $ac_subst_vars
1167     do
1168       eval ac_val=$`echo $ac_var`
1169       echo "$ac_var='"'"'$ac_val'"'"'"
1170     done | sort
1171     echo
1172
1173     if test -n "$ac_subst_files"; then
1174       cat <<\_ASBOX
1175 ## ------------- ##
1176 ## Output files. ##
1177 ## ------------- ##
1178 _ASBOX
1179       echo
1180       for ac_var in $ac_subst_files
1181       do
1182         eval ac_val=$`echo $ac_var`
1183         echo "$ac_var='"'"'$ac_val'"'"'"
1184       done | sort
1185       echo
1186     fi
1187
1188     if test -s confdefs.h; then
1189       cat <<\_ASBOX
1190 ## ----------- ##
1191 ## confdefs.h. ##
1192 ## ----------- ##
1193 _ASBOX
1194       echo
1195       sed "/^$/d" confdefs.h | sort
1196       echo
1197     fi
1198     test "$ac_signal" != 0 &&
1199       echo "$as_me: caught signal $ac_signal"
1200     echo "$as_me: exit $exit_status"
1201   } >&5
1202   rm -f core *.core &&
1203   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1204     exit $exit_status
1205      ' 0
1206 for ac_signal in 1 2 13 15; do
1207   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1208 done
1209 ac_signal=0
1210
1211 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1212 rm -rf conftest* confdefs.h
1213 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1214 echo >confdefs.h
1215
1216 # Predefined preprocessor variables.
1217
1218 cat >>confdefs.h <<_ACEOF
1219 #define PACKAGE_NAME "$PACKAGE_NAME"
1220 _ACEOF
1221
1222
1223 cat >>confdefs.h <<_ACEOF
1224 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1225 _ACEOF
1226
1227
1228 cat >>confdefs.h <<_ACEOF
1229 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1230 _ACEOF
1231
1232
1233 cat >>confdefs.h <<_ACEOF
1234 #define PACKAGE_STRING "$PACKAGE_STRING"
1235 _ACEOF
1236
1237
1238 cat >>confdefs.h <<_ACEOF
1239 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1240 _ACEOF
1241
1242
1243 # Let the site file select an alternate cache file if it wants to.
1244 # Prefer explicitly selected file to automatically selected ones.
1245 if test -z "$CONFIG_SITE"; then
1246   if test "x$prefix" != xNONE; then
1247     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1248   else
1249     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1250   fi
1251 fi
1252 for ac_site_file in $CONFIG_SITE; do
1253   if test -r "$ac_site_file"; then
1254     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1255 echo "$as_me: loading site script $ac_site_file" >&6;}
1256     sed 's/^/| /' "$ac_site_file" >&5
1257     . "$ac_site_file"
1258   fi
1259 done
1260
1261 if test -r "$cache_file"; then
1262   # Some versions of bash will fail to source /dev/null (special
1263   # files actually), so we avoid doing that.
1264   if test -f "$cache_file"; then
1265     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1266 echo "$as_me: loading cache $cache_file" >&6;}
1267     case $cache_file in
1268       [\\/]* | ?:[\\/]* ) . $cache_file;;
1269       *)                      . ./$cache_file;;
1270     esac
1271   fi
1272 else
1273   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1274 echo "$as_me: creating cache $cache_file" >&6;}
1275   >$cache_file
1276 fi
1277
1278 # Check that the precious variables saved in the cache have kept the same
1279 # value.
1280 ac_cache_corrupted=false
1281 for ac_var in `(set) 2>&1 |
1282                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1283   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1284   eval ac_new_set=\$ac_env_${ac_var}_set
1285   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1286   eval ac_new_val="\$ac_env_${ac_var}_value"
1287   case $ac_old_set,$ac_new_set in
1288     set,)
1289       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1290 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1291       ac_cache_corrupted=: ;;
1292     ,set)
1293       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1294 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1295       ac_cache_corrupted=: ;;
1296     ,);;
1297     *)
1298       if test "x$ac_old_val" != "x$ac_new_val"; then
1299         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1300 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1301         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1302 echo "$as_me:   former value:  $ac_old_val" >&2;}
1303         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1304 echo "$as_me:   current value: $ac_new_val" >&2;}
1305         ac_cache_corrupted=:
1306       fi;;
1307   esac
1308   # Pass precious variables to config.status.
1309   if test "$ac_new_set" = set; then
1310     case $ac_new_val in
1311     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1312       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1313     *) ac_arg=$ac_var=$ac_new_val ;;
1314     esac
1315     case " $ac_configure_args " in
1316       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1317       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1318     esac
1319   fi
1320 done
1321 if $ac_cache_corrupted; then
1322   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1323 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1324   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1325 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1326    { (exit 1); exit 1; }; }
1327 fi
1328
1329 ac_ext=c
1330 ac_cpp='$CPP $CPPFLAGS'
1331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365 ac_aux_dir=
1366 for ac_dir in config $srcdir/config; do
1367   if test -f $ac_dir/install-sh; then
1368     ac_aux_dir=$ac_dir
1369     ac_install_sh="$ac_aux_dir/install-sh -c"
1370     break
1371   elif test -f $ac_dir/install.sh; then
1372     ac_aux_dir=$ac_dir
1373     ac_install_sh="$ac_aux_dir/install.sh -c"
1374     break
1375   elif test -f $ac_dir/shtool; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/shtool install -c"
1378     break
1379   fi
1380 done
1381 if test -z "$ac_aux_dir"; then
1382   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1383 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1384    { (exit 1); exit 1; }; }
1385 fi
1386 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1387 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1388 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1389
1390
1391 configure_args=$ac_configure_args
1392
1393
1394
1395 cat >>confdefs.h <<_ACEOF
1396 #define PG_VERSION "$PACKAGE_VERSION"
1397 _ACEOF
1398
1399
1400 # Make sure we can run config.sub.
1401 $ac_config_sub sun4 >/dev/null 2>&1 ||
1402   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1403 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1404    { (exit 1); exit 1; }; }
1405
1406 echo "$as_me:$LINENO: checking build system type" >&5
1407 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1408 if test "${ac_cv_build+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_build_alias=$build_alias
1412 test -z "$ac_cv_build_alias" &&
1413   ac_cv_build_alias=`$ac_config_guess`
1414 test -z "$ac_cv_build_alias" &&
1415   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1416 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1417    { (exit 1); exit 1; }; }
1418 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1419   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1425 echo "${ECHO_T}$ac_cv_build" >&6
1426 build=$ac_cv_build
1427 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431
1432 echo "$as_me:$LINENO: checking host system type" >&5
1433 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1434 if test "${ac_cv_host+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_host_alias=$host_alias
1438 test -z "$ac_cv_host_alias" &&
1439   ac_cv_host_alias=$ac_cv_build_alias
1440 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1441   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1447 echo "${ECHO_T}$ac_cv_host" >&6
1448 host=$ac_cv_host
1449 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453
1454
1455 template=
1456 echo "$as_me:$LINENO: checking which template to use" >&5
1457 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1458
1459
1460
1461
1462 # Check whether --with-template or --without-template was given.
1463 if test "${with_template+set}" = set; then
1464   withval="$with_template"
1465
1466   case $withval in
1467     yes)
1468       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1469 echo "$as_me: error: argument required for --with-template option" >&2;}
1470    { (exit 1); exit 1; }; }
1471       ;;
1472     no)
1473       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1474 echo "$as_me: error: argument required for --with-template option" >&2;}
1475    { (exit 1); exit 1; }; }
1476       ;;
1477     *)
1478
1479   case $withval in
1480     list)   echo; ls "$srcdir/src/template"; exit;;
1481     *)      if test -f "$srcdir/src/template/$with_template" ; then
1482               template=$withval
1483             else
1484               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1485 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1486    { (exit 1); exit 1; }; }
1487             fi;;
1488   esac
1489
1490       ;;
1491   esac
1492
1493 else
1494
1495 # --with-template not given
1496
1497 case $host_os in
1498      aix*) template=aix ;;
1499     beos*) template=beos ;;
1500     bsdi*) template=bsdi ;;
1501   cygwin*) template=cygwin ;;
1502   darwin*) template=darwin ;;
1503     dgux*) template=dgux ;;
1504  freebsd*) template=freebsd ;;
1505     hpux*) template=hpux ;;
1506     irix*) template=irix ;;
1507  linux*|gnu*|k*bsd*-gnu)
1508            template=linux ;;
1509    mingw*) template=win32 ;;
1510   netbsd*) template=netbsd ;;
1511 nextstep*) template=nextstep ;;
1512  openbsd*) template=openbsd ;;
1513      osf*) template=osf ;;
1514      qnx*) template=qnx4 ;;
1515      sco*) template=sco ;;
1516  solaris*) template=solaris ;;
1517    sunos*) template=sunos4 ;;
1518  sysv4.2*)
1519         case $host_vendor in
1520           univel) template=univel ;;
1521         esac ;;
1522    sysv4*) template=svr4 ;;
1523    sysv5*) template=unixware ;;
1524   ultrix*) template=ultrix4 ;;
1525 esac
1526
1527   if test x"$template" = x"" ; then
1528     { { echo "$as_me:$LINENO: error:
1529 *******************************************************************
1530 PostgreSQL has apparently not been ported to your platform yet.
1531 To try a manual configuration, look into the src/template directory
1532 for a similar platform and use the '--with-template=' option.
1533
1534 Please also contact <pgsql-ports@postgresql.org> to see about
1535 rectifying this.  Include the above 'checking host system type...'
1536 line.
1537 *******************************************************************
1538 " >&5
1539 echo "$as_me: error:
1540 *******************************************************************
1541 PostgreSQL has apparently not been ported to your platform yet.
1542 To try a manual configuration, look into the src/template directory
1543 for a similar platform and use the '--with-template=' option.
1544
1545 Please also contact <pgsql-ports@postgresql.org> to see about
1546 rectifying this.  Include the above 'checking host system type...'
1547 line.
1548 *******************************************************************
1549 " >&2;}
1550    { (exit 1); exit 1; }; }
1551   fi
1552
1553
1554 fi;
1555
1556
1557 echo "$as_me:$LINENO: result: $template" >&5
1558 echo "${ECHO_T}$template" >&6
1559
1560 PORTNAME=$template
1561
1562
1563 # Initialize default assumption that we do not need separate assembly code
1564 # for TAS (test-and-set).  This can be overridden by the template file
1565 # when it's executed.
1566 need_tas=no
1567 tas_file=dummy.s
1568
1569
1570
1571 ##
1572 ## Command line options
1573 ##
1574
1575 #
1576 # Installation directory for documentation
1577 #
1578
1579
1580
1581 # Check whether --with-docdir or --without-docdir was given.
1582 if test "${with_docdir+set}" = set; then
1583   withval="$with_docdir"
1584
1585   case $withval in
1586     yes)
1587       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1588 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1589    { (exit 1); exit 1; }; }
1590       ;;
1591     no)
1592       docdir=
1593       ;;
1594     *)
1595       docdir=$withval
1596       ;;
1597   esac
1598
1599 else
1600   docdir='${prefix}/doc'
1601 fi;
1602
1603
1604
1605
1606 #
1607 # Add non-standard directories to the include path
1608 #
1609
1610
1611
1612 # Check whether --with-includes or --without-includes was given.
1613 if test "${with_includes+set}" = set; then
1614   withval="$with_includes"
1615
1616   case $withval in
1617     yes)
1618       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1619 echo "$as_me: error: argument required for --with-includes option" >&2;}
1620    { (exit 1); exit 1; }; }
1621       ;;
1622     no)
1623       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1624 echo "$as_me: error: argument required for --with-includes option" >&2;}
1625    { (exit 1); exit 1; }; }
1626       ;;
1627     *)
1628
1629       ;;
1630   esac
1631
1632 fi;
1633
1634
1635
1636 #
1637 # Add non-standard directories to the library search path
1638 #
1639
1640
1641
1642 # Check whether --with-libraries or --without-libraries was given.
1643 if test "${with_libraries+set}" = set; then
1644   withval="$with_libraries"
1645
1646   case $withval in
1647     yes)
1648       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1649 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1650    { (exit 1); exit 1; }; }
1651       ;;
1652     no)
1653       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1654 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1655    { (exit 1); exit 1; }; }
1656       ;;
1657     *)
1658       LIBRARY_DIRS=$withval
1659       ;;
1660   esac
1661
1662 fi;
1663
1664
1665
1666
1667
1668 # Check whether --with-libs or --without-libs was given.
1669 if test "${with_libs+set}" = set; then
1670   withval="$with_libs"
1671
1672   case $withval in
1673     yes)
1674       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1675 echo "$as_me: error: argument required for --with-libs option" >&2;}
1676    { (exit 1); exit 1; }; }
1677       ;;
1678     no)
1679       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1680 echo "$as_me: error: argument required for --with-libs option" >&2;}
1681    { (exit 1); exit 1; }; }
1682       ;;
1683     *)
1684       LIBRARY_DIRS=$withval
1685       ;;
1686   esac
1687
1688 fi;
1689
1690
1691
1692 #
1693 # 64-bit integer date/time storage (--enable-integer-datetimes)
1694 #
1695 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1696 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1697
1698
1699 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1700 if test "${enable_integer_datetimes+set}" = set; then
1701   enableval="$enable_integer_datetimes"
1702
1703   case $enableval in
1704     yes)
1705
1706 cat >>confdefs.h <<\_ACEOF
1707 #define USE_INTEGER_DATETIMES 1
1708 _ACEOF
1709
1710       ;;
1711     no)
1712       :
1713       ;;
1714     *)
1715       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1716 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1717    { (exit 1); exit 1; }; }
1718       ;;
1719   esac
1720
1721 else
1722   enable_integer_datetimes=no
1723
1724 fi;
1725
1726 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1727 echo "${ECHO_T}$enable_integer_datetimes" >&6
1728
1729
1730 #
1731 # NLS
1732 #
1733 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1734 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1735
1736
1737 # Check whether --enable-nls or --disable-nls was given.
1738 if test "${enable_nls+set}" = set; then
1739   enableval="$enable_nls"
1740
1741   case $enableval in
1742     yes)
1743       :
1744       ;;
1745     no)
1746       :
1747       ;;
1748     *)
1749       enable_nls=yes
1750 WANTED_LANGUAGES=$enableval
1751       ;;
1752   esac
1753
1754 else
1755   enable_nls=no
1756 fi;
1757
1758
1759 if test "$enable_nls" = yes; then
1760
1761 cat >>confdefs.h <<\_ACEOF
1762 #define ENABLE_NLS 1
1763 _ACEOF
1764
1765 fi
1766
1767 echo "$as_me:$LINENO: result: $enable_nls" >&5
1768 echo "${ECHO_T}$enable_nls" >&6
1769
1770
1771
1772 #
1773 # Default port number (--with-pgport), default 5432
1774 #
1775 echo "$as_me:$LINENO: checking for default port number" >&5
1776 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1777
1778
1779
1780 # Check whether --with-pgport or --without-pgport was given.
1781 if test "${with_pgport+set}" = set; then
1782   withval="$with_pgport"
1783
1784   case $withval in
1785     yes)
1786       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1787 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1788    { (exit 1); exit 1; }; }
1789       ;;
1790     no)
1791       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1792 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1793    { (exit 1); exit 1; }; }
1794       ;;
1795     *)
1796       default_port=$withval
1797       ;;
1798   esac
1799
1800 else
1801   default_port=5432
1802 fi;
1803
1804 echo "$as_me:$LINENO: result: $default_port" >&5
1805 echo "${ECHO_T}$default_port" >&6
1806 # Need both of these because some places want an integer and some a string
1807
1808 cat >>confdefs.h <<_ACEOF
1809 #define DEF_PGPORT ${default_port}
1810 _ACEOF
1811
1812
1813 cat >>confdefs.h <<_ACEOF
1814 #define DEF_PGPORT_STR "${default_port}"
1815 _ACEOF
1816
1817
1818
1819 #
1820 # Option to disable shared libraries
1821 #
1822
1823
1824 # Check whether --enable-shared or --disable-shared was given.
1825 if test "${enable_shared+set}" = set; then
1826   enableval="$enable_shared"
1827
1828   case $enableval in
1829     yes)
1830       :
1831       ;;
1832     no)
1833       :
1834       ;;
1835     *)
1836       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1837 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1838    { (exit 1); exit 1; }; }
1839       ;;
1840   esac
1841
1842 else
1843   enable_shared=yes
1844
1845 fi;
1846
1847
1848
1849 #
1850 # '-rpath'-like feature can be disabled
1851 #
1852
1853
1854 # Check whether --enable-rpath or --disable-rpath was given.
1855 if test "${enable_rpath+set}" = set; then
1856   enableval="$enable_rpath"
1857
1858   case $enableval in
1859     yes)
1860       :
1861       ;;
1862     no)
1863       :
1864       ;;
1865     *)
1866       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1867 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1868    { (exit 1); exit 1; }; }
1869       ;;
1870   esac
1871
1872 else
1873   enable_rpath=yes
1874
1875 fi;
1876
1877
1878
1879 #
1880 # Spinlocks
1881 #
1882
1883
1884 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1885 if test "${enable_spinlocks+set}" = set; then
1886   enableval="$enable_spinlocks"
1887
1888   case $enableval in
1889     yes)
1890       :
1891       ;;
1892     no)
1893       :
1894       ;;
1895     *)
1896       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1897 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1898    { (exit 1); exit 1; }; }
1899       ;;
1900   esac
1901
1902 else
1903   enable_spinlocks=yes
1904
1905 fi;
1906
1907
1908 #
1909 # --enable-debug adds -g to compiler flags
1910 #
1911
1912
1913 # Check whether --enable-debug or --disable-debug was given.
1914 if test "${enable_debug+set}" = set; then
1915   enableval="$enable_debug"
1916
1917   case $enableval in
1918     yes)
1919       :
1920       ;;
1921     no)
1922       :
1923       ;;
1924     *)
1925       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1926 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1927    { (exit 1); exit 1; }; }
1928       ;;
1929   esac
1930
1931 else
1932   enable_debug=no
1933
1934 fi;
1935
1936
1937
1938 #
1939 # C compiler
1940 #
1941
1942 # For historical reasons you can also use --with-CC to specify the C compiler
1943 # to use, although the standard way to do this is to set the CC environment
1944 # variable.
1945
1946
1947
1948 # Check whether --with-CC or --without-CC was given.
1949 if test "${with_CC+set}" = set; then
1950   withval="$with_CC"
1951
1952   case $withval in
1953     yes)
1954       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1955 echo "$as_me: error: argument required for --with-CC option" >&2;}
1956    { (exit 1); exit 1; }; }
1957       ;;
1958     no)
1959       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1960 echo "$as_me: error: argument required for --with-CC option" >&2;}
1961    { (exit 1); exit 1; }; }
1962       ;;
1963     *)
1964       CC=$with_CC
1965       ;;
1966   esac
1967
1968 fi;
1969
1970
1971 case $template in
1972   aix) pgac_cc_list="gcc xlc";;
1973  irix) pgac_cc_list="cc";; # no gcc
1974     *) pgac_cc_list="gcc cc";;
1975 esac
1976
1977 ac_ext=c
1978 ac_cpp='$CPP $CPPFLAGS'
1979 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1980 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1981 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1982 if test -n "$ac_tool_prefix"; then
1983   for ac_prog in $pgac_cc_list
1984   do
1985     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1986 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1987 echo "$as_me:$LINENO: checking for $ac_word" >&5
1988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1989 if test "${ac_cv_prog_CC+set}" = set; then
1990   echo $ECHO_N "(cached) $ECHO_C" >&6
1991 else
1992   if test -n "$CC"; then
1993   ac_cv_prog_CC="$CC" # Let the user override the test.
1994 else
1995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1996 for as_dir in $PATH
1997 do
1998   IFS=$as_save_IFS
1999   test -z "$as_dir" && as_dir=.
2000   for ac_exec_ext in '' $ac_executable_extensions; do
2001   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2002     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2003     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2004     break 2
2005   fi
2006 done
2007 done
2008
2009 fi
2010 fi
2011 CC=$ac_cv_prog_CC
2012 if test -n "$CC"; then
2013   echo "$as_me:$LINENO: result: $CC" >&5
2014 echo "${ECHO_T}$CC" >&6
2015 else
2016   echo "$as_me:$LINENO: result: no" >&5
2017 echo "${ECHO_T}no" >&6
2018 fi
2019
2020     test -n "$CC" && break
2021   done
2022 fi
2023 if test -z "$CC"; then
2024   ac_ct_CC=$CC
2025   for ac_prog in $pgac_cc_list
2026 do
2027   # Extract the first word of "$ac_prog", so it can be a program name with args.
2028 set dummy $ac_prog; ac_word=$2
2029 echo "$as_me:$LINENO: checking for $ac_word" >&5
2030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2031 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2032   echo $ECHO_N "(cached) $ECHO_C" >&6
2033 else
2034   if test -n "$ac_ct_CC"; then
2035   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2036 else
2037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2038 for as_dir in $PATH
2039 do
2040   IFS=$as_save_IFS
2041   test -z "$as_dir" && as_dir=.
2042   for ac_exec_ext in '' $ac_executable_extensions; do
2043   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2044     ac_cv_prog_ac_ct_CC="$ac_prog"
2045     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2046     break 2
2047   fi
2048 done
2049 done
2050
2051 fi
2052 fi
2053 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2054 if test -n "$ac_ct_CC"; then
2055   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2056 echo "${ECHO_T}$ac_ct_CC" >&6
2057 else
2058   echo "$as_me:$LINENO: result: no" >&5
2059 echo "${ECHO_T}no" >&6
2060 fi
2061
2062   test -n "$ac_ct_CC" && break
2063 done
2064
2065   CC=$ac_ct_CC
2066 fi
2067
2068
2069 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2070 See \`config.log' for more details." >&5
2071 echo "$as_me: error: no acceptable C compiler found in \$PATH
2072 See \`config.log' for more details." >&2;}
2073    { (exit 1); exit 1; }; }
2074
2075 # Provide some information about the compiler.
2076 echo "$as_me:$LINENO:" \
2077      "checking for C compiler version" >&5
2078 ac_compiler=`set X $ac_compile; echo $2`
2079 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2080   (eval $ac_compiler --version </dev/null >&5) 2>&5
2081   ac_status=$?
2082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2083   (exit $ac_status); }
2084 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2085   (eval $ac_compiler -v </dev/null >&5) 2>&5
2086   ac_status=$?
2087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2088   (exit $ac_status); }
2089 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2090   (eval $ac_compiler -V </dev/null >&5) 2>&5
2091   ac_status=$?
2092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2093   (exit $ac_status); }
2094
2095 cat >conftest.$ac_ext <<_ACEOF
2096 /* confdefs.h.  */
2097 _ACEOF
2098 cat confdefs.h >>conftest.$ac_ext
2099 cat >>conftest.$ac_ext <<_ACEOF
2100 /* end confdefs.h.  */
2101
2102 int
2103 main ()
2104 {
2105
2106   ;
2107   return 0;
2108 }
2109 _ACEOF
2110 ac_clean_files_save=$ac_clean_files
2111 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2112 # Try to create an executable without -o first, disregard a.out.
2113 # It will help us diagnose broken compilers, and finding out an intuition
2114 # of exeext.
2115 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2116 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2117 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2118 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2119   (eval $ac_link_default) 2>&5
2120   ac_status=$?
2121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2122   (exit $ac_status); }; then
2123   # Find the output, starting from the most likely.  This scheme is
2124 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2125 # resort.
2126
2127 # Be careful to initialize this variable, since it used to be cached.
2128 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2129 ac_cv_exeext=
2130 # b.out is created by i960 compilers.
2131 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2132 do
2133   test -f "$ac_file" || continue
2134   case $ac_file in
2135     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2136         ;;
2137     conftest.$ac_ext )
2138         # This is the source file.
2139         ;;
2140     [ab].out )
2141         # We found the default executable, but exeext='' is most
2142         # certainly right.
2143         break;;
2144     *.* )
2145         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2146         # FIXME: I believe we export ac_cv_exeext for Libtool,
2147         # but it would be cool to find out if it's true.  Does anybody
2148         # maintain Libtool? --akim.
2149         export ac_cv_exeext
2150         break;;
2151     * )
2152         break;;
2153   esac
2154 done
2155 else
2156   echo "$as_me: failed program was:" >&5
2157 sed 's/^/| /' conftest.$ac_ext >&5
2158
2159 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2160 See \`config.log' for more details." >&5
2161 echo "$as_me: error: C compiler cannot create executables
2162 See \`config.log' for more details." >&2;}
2163    { (exit 77); exit 77; }; }
2164 fi
2165
2166 ac_exeext=$ac_cv_exeext
2167 echo "$as_me:$LINENO: result: $ac_file" >&5
2168 echo "${ECHO_T}$ac_file" >&6
2169
2170 # Check the compiler produces executables we can run.  If not, either
2171 # the compiler is broken, or we cross compile.
2172 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2173 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2174 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2175 # If not cross compiling, check that we can run a simple program.
2176 if test "$cross_compiling" != yes; then
2177   if { ac_try='./$ac_file'
2178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2179   (eval $ac_try) 2>&5
2180   ac_status=$?
2181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182   (exit $ac_status); }; }; then
2183     cross_compiling=no
2184   else
2185     if test "$cross_compiling" = maybe; then
2186         cross_compiling=yes
2187     else
2188         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2189 If you meant to cross compile, use \`--host'.
2190 See \`config.log' for more details." >&5
2191 echo "$as_me: error: cannot run C compiled programs.
2192 If you meant to cross compile, use \`--host'.
2193 See \`config.log' for more details." >&2;}
2194    { (exit 1); exit 1; }; }
2195     fi
2196   fi
2197 fi
2198 echo "$as_me:$LINENO: result: yes" >&5
2199 echo "${ECHO_T}yes" >&6
2200
2201 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2202 ac_clean_files=$ac_clean_files_save
2203 # Check the compiler produces executables we can run.  If not, either
2204 # the compiler is broken, or we cross compile.
2205 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2206 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2207 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2208 echo "${ECHO_T}$cross_compiling" >&6
2209
2210 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2211 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2213   (eval $ac_link) 2>&5
2214   ac_status=$?
2215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2216   (exit $ac_status); }; then
2217   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2218 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2219 # work properly (i.e., refer to `conftest.exe'), while it won't with
2220 # `rm'.
2221 for ac_file in conftest.exe conftest conftest.*; do
2222   test -f "$ac_file" || continue
2223   case $ac_file in
2224     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2225     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2226           export ac_cv_exeext
2227           break;;
2228     * ) break;;
2229   esac
2230 done
2231 else
2232   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2233 See \`config.log' for more details." >&5
2234 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2235 See \`config.log' for more details." >&2;}
2236    { (exit 1); exit 1; }; }
2237 fi
2238
2239 rm -f conftest$ac_cv_exeext
2240 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2241 echo "${ECHO_T}$ac_cv_exeext" >&6
2242
2243 rm -f conftest.$ac_ext
2244 EXEEXT=$ac_cv_exeext
2245 ac_exeext=$EXEEXT
2246 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2247 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2248 if test "${ac_cv_objext+set}" = set; then
2249   echo $ECHO_N "(cached) $ECHO_C" >&6
2250 else
2251   cat >conftest.$ac_ext <<_ACEOF
2252 /* confdefs.h.  */
2253 _ACEOF
2254 cat confdefs.h >>conftest.$ac_ext
2255 cat >>conftest.$ac_ext <<_ACEOF
2256 /* end confdefs.h.  */
2257
2258 int
2259 main ()
2260 {
2261
2262   ;
2263   return 0;
2264 }
2265 _ACEOF
2266 rm -f conftest.o conftest.obj
2267 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2268   (eval $ac_compile) 2>&5
2269   ac_status=$?
2270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2271   (exit $ac_status); }; then
2272   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2273   case $ac_file in
2274     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2275     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2276        break;;
2277   esac
2278 done
2279 else
2280   echo "$as_me: failed program was:" >&5
2281 sed 's/^/| /' conftest.$ac_ext >&5
2282
2283 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2284 See \`config.log' for more details." >&5
2285 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2286 See \`config.log' for more details." >&2;}
2287    { (exit 1); exit 1; }; }
2288 fi
2289
2290 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2291 fi
2292 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2293 echo "${ECHO_T}$ac_cv_objext" >&6
2294 OBJEXT=$ac_cv_objext
2295 ac_objext=$OBJEXT
2296 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2297 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2298 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2299   echo $ECHO_N "(cached) $ECHO_C" >&6
2300 else
2301   cat >conftest.$ac_ext <<_ACEOF
2302 /* confdefs.h.  */
2303 _ACEOF
2304 cat confdefs.h >>conftest.$ac_ext
2305 cat >>conftest.$ac_ext <<_ACEOF
2306 /* end confdefs.h.  */
2307
2308 int
2309 main ()
2310 {
2311 #ifndef __GNUC__
2312        choke me
2313 #endif
2314
2315   ;
2316   return 0;
2317 }
2318 _ACEOF
2319 rm -f conftest.$ac_objext
2320 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2321   (eval $ac_compile) 2>conftest.er1
2322   ac_status=$?
2323   grep -v '^ *+' conftest.er1 >conftest.err
2324   rm -f conftest.er1
2325   cat conftest.err >&5
2326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2327   (exit $ac_status); } &&
2328          { ac_try='test -z "$ac_c_werror_flag"
2329                          || test ! -s conftest.err'
2330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2331   (eval $ac_try) 2>&5
2332   ac_status=$?
2333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2334   (exit $ac_status); }; } &&
2335          { ac_try='test -s conftest.$ac_objext'
2336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2337   (eval $ac_try) 2>&5
2338   ac_status=$?
2339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2340   (exit $ac_status); }; }; then
2341   ac_compiler_gnu=yes
2342 else
2343   echo "$as_me: failed program was:" >&5
2344 sed 's/^/| /' conftest.$ac_ext >&5
2345
2346 ac_compiler_gnu=no
2347 fi
2348 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2349 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2350
2351 fi
2352 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2353 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2354 GCC=`test $ac_compiler_gnu = yes && echo yes`
2355 ac_test_CFLAGS=${CFLAGS+set}
2356 ac_save_CFLAGS=$CFLAGS
2357 CFLAGS="-g"
2358 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2359 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2360 if test "${ac_cv_prog_cc_g+set}" = set; then
2361   echo $ECHO_N "(cached) $ECHO_C" >&6
2362 else
2363   cat >conftest.$ac_ext <<_ACEOF
2364 /* confdefs.h.  */
2365 _ACEOF
2366 cat confdefs.h >>conftest.$ac_ext
2367 cat >>conftest.$ac_ext <<_ACEOF
2368 /* end confdefs.h.  */
2369
2370 int
2371 main ()
2372 {
2373
2374   ;
2375   return 0;
2376 }
2377 _ACEOF
2378 rm -f conftest.$ac_objext
2379 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2380   (eval $ac_compile) 2>conftest.er1
2381   ac_status=$?
2382   grep -v '^ *+' conftest.er1 >conftest.err
2383   rm -f conftest.er1
2384   cat conftest.err >&5
2385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2386   (exit $ac_status); } &&
2387          { ac_try='test -z "$ac_c_werror_flag"
2388                          || test ! -s conftest.err'
2389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2390   (eval $ac_try) 2>&5
2391   ac_status=$?
2392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2393   (exit $ac_status); }; } &&
2394          { ac_try='test -s conftest.$ac_objext'
2395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2396   (eval $ac_try) 2>&5
2397   ac_status=$?
2398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2399   (exit $ac_status); }; }; then
2400   ac_cv_prog_cc_g=yes
2401 else
2402   echo "$as_me: failed program was:" >&5
2403 sed 's/^/| /' conftest.$ac_ext >&5
2404
2405 ac_cv_prog_cc_g=no
2406 fi
2407 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2408 fi
2409 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2410 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2411 if test "$ac_test_CFLAGS" = set; then
2412   CFLAGS=$ac_save_CFLAGS
2413 elif test $ac_cv_prog_cc_g = yes; then
2414   if test "$GCC" = yes; then
2415     CFLAGS="-g -O2"
2416   else
2417     CFLAGS="-g"
2418   fi
2419 else
2420   if test "$GCC" = yes; then
2421     CFLAGS="-O2"
2422   else
2423     CFLAGS=
2424   fi
2425 fi
2426 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2427 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2428 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2429   echo $ECHO_N "(cached) $ECHO_C" >&6
2430 else
2431   ac_cv_prog_cc_stdc=no
2432 ac_save_CC=$CC
2433 cat >conftest.$ac_ext <<_ACEOF
2434 /* confdefs.h.  */
2435 _ACEOF
2436 cat confdefs.h >>conftest.$ac_ext
2437 cat >>conftest.$ac_ext <<_ACEOF
2438 /* end confdefs.h.  */
2439 #include <stdarg.h>
2440 #include <stdio.h>
2441 #include <sys/types.h>
2442 #include <sys/stat.h>
2443 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2444 struct buf { int x; };
2445 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2446 static char *e (p, i)
2447      char **p;
2448      int i;
2449 {
2450   return p[i];
2451 }
2452 static char *f (char * (*g) (char **, int), char **p, ...)
2453 {
2454   char *s;
2455   va_list v;
2456   va_start (v,p);
2457   s = g (p, va_arg (v,int));
2458   va_end (v);
2459   return s;
2460 }
2461
2462 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2463    function prototypes and stuff, but not '\xHH' hex character constants.
2464    These don't provoke an error unfortunately, instead are silently treated
2465    as 'x'.  The following induces an error, until -std1 is added to get
2466    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2467    array size at least.  It's necessary to write '\x00'==0 to get something
2468    that's true only with -std1.  */
2469 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2470
2471 int test (int i, double x);
2472 struct s1 {int (*f) (int a);};
2473 struct s2 {int (*f) (double a);};
2474 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2475 int argc;
2476 char **argv;
2477 int
2478 main ()
2479 {
2480 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2481   ;
2482   return 0;
2483 }
2484 _ACEOF
2485 # Don't try gcc -ansi; that turns off useful extensions and
2486 # breaks some systems' header files.
2487 # AIX                   -qlanglvl=ansi
2488 # Ultrix and OSF/1      -std1
2489 # HP-UX 10.20 and later -Ae
2490 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2491 # SVR4                  -Xc -D__EXTENSIONS__
2492 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2493 do
2494   CC="$ac_save_CC $ac_arg"
2495   rm -f conftest.$ac_objext
2496 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2497   (eval $ac_compile) 2>conftest.er1
2498   ac_status=$?
2499   grep -v '^ *+' conftest.er1 >conftest.err
2500   rm -f conftest.er1
2501   cat conftest.err >&5
2502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2503   (exit $ac_status); } &&
2504          { ac_try='test -z "$ac_c_werror_flag"
2505                          || test ! -s conftest.err'
2506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2507   (eval $ac_try) 2>&5
2508   ac_status=$?
2509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2510   (exit $ac_status); }; } &&
2511          { ac_try='test -s conftest.$ac_objext'
2512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2513   (eval $ac_try) 2>&5
2514   ac_status=$?
2515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2516   (exit $ac_status); }; }; then
2517   ac_cv_prog_cc_stdc=$ac_arg
2518 break
2519 else
2520   echo "$as_me: failed program was:" >&5
2521 sed 's/^/| /' conftest.$ac_ext >&5
2522
2523 fi
2524 rm -f conftest.err conftest.$ac_objext
2525 done
2526 rm -f conftest.$ac_ext conftest.$ac_objext
2527 CC=$ac_save_CC
2528
2529 fi
2530
2531 case "x$ac_cv_prog_cc_stdc" in
2532   x|xno)
2533     echo "$as_me:$LINENO: result: none needed" >&5
2534 echo "${ECHO_T}none needed" >&6 ;;
2535   *)
2536     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2537 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2538     CC="$CC $ac_cv_prog_cc_stdc" ;;
2539 esac
2540
2541 # Some people use a C++ compiler to compile C.  Since we use `exit',
2542 # in C++ we need to declare it.  In case someone uses the same compiler
2543 # for both compiling C and C++ we need to have the C++ compiler decide
2544 # the declaration of exit, since it's the most demanding environment.
2545 cat >conftest.$ac_ext <<_ACEOF
2546 #ifndef __cplusplus
2547   choke me
2548 #endif
2549 _ACEOF
2550 rm -f conftest.$ac_objext
2551 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2552   (eval $ac_compile) 2>conftest.er1
2553   ac_status=$?
2554   grep -v '^ *+' conftest.er1 >conftest.err
2555   rm -f conftest.er1
2556   cat conftest.err >&5
2557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558   (exit $ac_status); } &&
2559          { ac_try='test -z "$ac_c_werror_flag"
2560                          || test ! -s conftest.err'
2561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2562   (eval $ac_try) 2>&5
2563   ac_status=$?
2564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2565   (exit $ac_status); }; } &&
2566          { ac_try='test -s conftest.$ac_objext'
2567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2568   (eval $ac_try) 2>&5
2569   ac_status=$?
2570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571   (exit $ac_status); }; }; then
2572   for ac_declaration in \
2573    '' \
2574    'extern "C" void std::exit (int) throw (); using std::exit;' \
2575    'extern "C" void std::exit (int); using std::exit;' \
2576    'extern "C" void exit (int) throw ();' \
2577    'extern "C" void exit (int);' \
2578    'void exit (int);'
2579 do
2580   cat >conftest.$ac_ext <<_ACEOF
2581 /* confdefs.h.  */
2582 _ACEOF
2583 cat confdefs.h >>conftest.$ac_ext
2584 cat >>conftest.$ac_ext <<_ACEOF
2585 /* end confdefs.h.  */
2586 $ac_declaration
2587 #include <stdlib.h>
2588 int
2589 main ()
2590 {
2591 exit (42);
2592   ;
2593   return 0;
2594 }
2595 _ACEOF
2596 rm -f conftest.$ac_objext
2597 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2598   (eval $ac_compile) 2>conftest.er1
2599   ac_status=$?
2600   grep -v '^ *+' conftest.er1 >conftest.err
2601   rm -f conftest.er1
2602   cat conftest.err >&5
2603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2604   (exit $ac_status); } &&
2605          { ac_try='test -z "$ac_c_werror_flag"
2606                          || test ! -s conftest.err'
2607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2608   (eval $ac_try) 2>&5
2609   ac_status=$?
2610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2611   (exit $ac_status); }; } &&
2612          { ac_try='test -s conftest.$ac_objext'
2613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2614   (eval $ac_try) 2>&5
2615   ac_status=$?
2616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2617   (exit $ac_status); }; }; then
2618   :
2619 else
2620   echo "$as_me: failed program was:" >&5
2621 sed 's/^/| /' conftest.$ac_ext >&5
2622
2623 continue
2624 fi
2625 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2626   cat >conftest.$ac_ext <<_ACEOF
2627 /* confdefs.h.  */
2628 _ACEOF
2629 cat confdefs.h >>conftest.$ac_ext
2630 cat >>conftest.$ac_ext <<_ACEOF
2631 /* end confdefs.h.  */
2632 $ac_declaration
2633 int
2634 main ()
2635 {
2636 exit (42);
2637   ;
2638   return 0;
2639 }
2640 _ACEOF
2641 rm -f conftest.$ac_objext
2642 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2643   (eval $ac_compile) 2>conftest.er1
2644   ac_status=$?
2645   grep -v '^ *+' conftest.er1 >conftest.err
2646   rm -f conftest.er1
2647   cat conftest.err >&5
2648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2649   (exit $ac_status); } &&
2650          { ac_try='test -z "$ac_c_werror_flag"
2651                          || test ! -s conftest.err'
2652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2653   (eval $ac_try) 2>&5
2654   ac_status=$?
2655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2656   (exit $ac_status); }; } &&
2657          { ac_try='test -s conftest.$ac_objext'
2658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2659   (eval $ac_try) 2>&5
2660   ac_status=$?
2661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2662   (exit $ac_status); }; }; then
2663   break
2664 else
2665   echo "$as_me: failed program was:" >&5
2666 sed 's/^/| /' conftest.$ac_ext >&5
2667
2668 fi
2669 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2670 done
2671 rm -f conftest*
2672 if test -n "$ac_declaration"; then
2673   echo '#ifdef __cplusplus' >>confdefs.h
2674   echo $ac_declaration      >>confdefs.h
2675   echo '#endif'             >>confdefs.h
2676 fi
2677
2678 else
2679   echo "$as_me: failed program was:" >&5
2680 sed 's/^/| /' conftest.$ac_ext >&5
2681
2682 fi
2683 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2684 ac_ext=c
2685 ac_cpp='$CPP $CPPFLAGS'
2686 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2689
2690
2691 unset CFLAGS
2692
2693 #
2694 # Read the template
2695 #
2696 . "$srcdir/src/template/$template" || exit
2697
2698 # CFLAGS are selected so:
2699 # If the user specifies something in the environment, that is used.
2700 # else:  If the template file set something, that is used.
2701 # else:  If the compiler is GCC, then we use -O2.
2702 # else:  If the compiler is something else, then we use -0.
2703
2704 if test "$ac_env_CFLAGS_set" = set; then
2705   CFLAGS=$ac_env_CFLAGS_value
2706 elif test "${CFLAGS+set}" = set; then
2707   : # (keep what template set)
2708 elif test "$GCC" = yes; then
2709   CFLAGS="-O2"
2710 else
2711   # if the user selected debug mode, don't use -O
2712   if test "$enable_debug" != yes; then
2713     CFLAGS="-O"
2714   fi
2715 fi
2716
2717 if test "$GCC" = yes; then
2718   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2719
2720   # Some versions of GCC support some additional useful warning flags.
2721   # Check whether they are supported, and add them to CFLAGS if so.
2722   echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2723 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2724 pgac_save_CFLAGS=$CFLAGS
2725 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2726 cat >conftest.$ac_ext <<_ACEOF
2727 /* confdefs.h.  */
2728 _ACEOF
2729 cat confdefs.h >>conftest.$ac_ext
2730 cat >>conftest.$ac_ext <<_ACEOF
2731 /* end confdefs.h.  */
2732
2733 int
2734 main ()
2735 {
2736
2737   ;
2738   return 0;
2739 }
2740 _ACEOF
2741 rm -f conftest.$ac_objext
2742 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2743   (eval $ac_compile) 2>conftest.er1
2744   ac_status=$?
2745   grep -v '^ *+' conftest.er1 >conftest.err
2746   rm -f conftest.er1
2747   cat conftest.err >&5
2748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2749   (exit $ac_status); } &&
2750          { ac_try='test -z "$ac_c_werror_flag"
2751                          || test ! -s conftest.err'
2752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2753   (eval $ac_try) 2>&5
2754   ac_status=$?
2755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2756   (exit $ac_status); }; } &&
2757          { ac_try='test -s conftest.$ac_objext'
2758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2759   (eval $ac_try) 2>&5
2760   ac_status=$?
2761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2762   (exit $ac_status); }; }; then
2763   echo "$as_me:$LINENO: result: yes" >&5
2764 echo "${ECHO_T}yes" >&6
2765 else
2766   echo "$as_me: failed program was:" >&5
2767 sed 's/^/| /' conftest.$ac_ext >&5
2768
2769 CFLAGS="$pgac_save_CFLAGS"
2770                     echo "$as_me:$LINENO: result: no" >&5
2771 echo "${ECHO_T}no" >&6
2772 fi
2773 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2774
2775   echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2776 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2777 pgac_save_CFLAGS=$CFLAGS
2778 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2779 cat >conftest.$ac_ext <<_ACEOF
2780 /* confdefs.h.  */
2781 _ACEOF
2782 cat confdefs.h >>conftest.$ac_ext
2783 cat >>conftest.$ac_ext <<_ACEOF
2784 /* end confdefs.h.  */
2785
2786 int
2787 main ()
2788 {
2789
2790   ;
2791   return 0;
2792 }
2793 _ACEOF
2794 rm -f conftest.$ac_objext
2795 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2796   (eval $ac_compile) 2>conftest.er1
2797   ac_status=$?
2798   grep -v '^ *+' conftest.er1 >conftest.err
2799   rm -f conftest.er1
2800   cat conftest.err >&5
2801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2802   (exit $ac_status); } &&
2803          { ac_try='test -z "$ac_c_werror_flag"
2804                          || test ! -s conftest.err'
2805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2806   (eval $ac_try) 2>&5
2807   ac_status=$?
2808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2809   (exit $ac_status); }; } &&
2810          { ac_try='test -s conftest.$ac_objext'
2811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2812   (eval $ac_try) 2>&5
2813   ac_status=$?
2814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2815   (exit $ac_status); }; }; then
2816   echo "$as_me:$LINENO: result: yes" >&5
2817 echo "${ECHO_T}yes" >&6
2818 else
2819   echo "$as_me: failed program was:" >&5
2820 sed 's/^/| /' conftest.$ac_ext >&5
2821
2822 CFLAGS="$pgac_save_CFLAGS"
2823                     echo "$as_me:$LINENO: result: no" >&5
2824 echo "${ECHO_T}no" >&6
2825 fi
2826 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2827
2828
2829   # Disable strict-aliasing rules; needed for gcc 3.3+
2830   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
2831 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
2832 pgac_save_CFLAGS=$CFLAGS
2833 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
2834 cat >conftest.$ac_ext <<_ACEOF
2835 /* confdefs.h.  */
2836 _ACEOF
2837 cat confdefs.h >>conftest.$ac_ext
2838 cat >>conftest.$ac_ext <<_ACEOF
2839 /* end confdefs.h.  */
2840
2841 int
2842 main ()
2843 {
2844
2845   ;
2846   return 0;
2847 }
2848 _ACEOF
2849 rm -f conftest.$ac_objext
2850 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2851   (eval $ac_compile) 2>conftest.er1
2852   ac_status=$?
2853   grep -v '^ *+' conftest.er1 >conftest.err
2854   rm -f conftest.er1
2855   cat conftest.err >&5
2856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2857   (exit $ac_status); } &&
2858          { ac_try='test -z "$ac_c_werror_flag"
2859                          || test ! -s conftest.err'
2860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2861   (eval $ac_try) 2>&5
2862   ac_status=$?
2863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2864   (exit $ac_status); }; } &&
2865          { ac_try='test -s conftest.$ac_objext'
2866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2867   (eval $ac_try) 2>&5
2868   ac_status=$?
2869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2870   (exit $ac_status); }; }; then
2871   echo "$as_me:$LINENO: result: yes" >&5
2872 echo "${ECHO_T}yes" >&6
2873 else
2874   echo "$as_me: failed program was:" >&5
2875 sed 's/^/| /' conftest.$ac_ext >&5
2876
2877 CFLAGS="$pgac_save_CFLAGS"
2878                     echo "$as_me:$LINENO: result: no" >&5
2879 echo "${ECHO_T}no" >&6
2880 fi
2881 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2882
2883 fi
2884
2885 # supply -g if --enable-debug
2886 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2887   CFLAGS="$CFLAGS -g"
2888 fi
2889
2890 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2891 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2892
2893 # We already have this in Makefile.win32, but configure needs it too
2894 if test "$PORTNAME" = "win32"; then
2895   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
2896 fi
2897
2898 # Check if the compiler still works with the template settings
2899 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2900 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2901
2902 cat >conftest.$ac_ext <<_ACEOF
2903 /* confdefs.h.  */
2904 _ACEOF
2905 cat confdefs.h >>conftest.$ac_ext
2906 cat >>conftest.$ac_ext <<_ACEOF
2907 /* end confdefs.h.  */
2908
2909 int
2910 main ()
2911 {
2912 return 0;
2913   ;
2914   return 0;
2915 }
2916 _ACEOF
2917 rm -f conftest.$ac_objext conftest$ac_exeext
2918 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2919   (eval $ac_link) 2>conftest.er1
2920   ac_status=$?
2921   grep -v '^ *+' conftest.er1 >conftest.err
2922   rm -f conftest.er1
2923   cat conftest.err >&5
2924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2925   (exit $ac_status); } &&
2926          { ac_try='test -z "$ac_c_werror_flag"
2927                          || test ! -s conftest.err'
2928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2929   (eval $ac_try) 2>&5
2930   ac_status=$?
2931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2932   (exit $ac_status); }; } &&
2933          { ac_try='test -s conftest$ac_exeext'
2934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2935   (eval $ac_try) 2>&5
2936   ac_status=$?
2937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2938   (exit $ac_status); }; }; then
2939   echo "$as_me:$LINENO: result: yes" >&5
2940 echo "${ECHO_T}yes" >&6
2941 else
2942   echo "$as_me: failed program was:" >&5
2943 sed 's/^/| /' conftest.$ac_ext >&5
2944
2945 echo "$as_me:$LINENO: result: no" >&5
2946 echo "${ECHO_T}no" >&6
2947    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
2948 echo "$as_me: error: cannot proceed" >&2;}
2949    { (exit 1); exit 1; }; }
2950 fi
2951 rm -f conftest.err conftest.$ac_objext \
2952       conftest$ac_exeext conftest.$ac_ext
2953
2954 # Defend against gcc -ffast-math
2955 if test "$GCC" = yes; then
2956 cat >conftest.$ac_ext <<_ACEOF
2957 /* confdefs.h.  */
2958 _ACEOF
2959 cat confdefs.h >>conftest.$ac_ext
2960 cat >>conftest.$ac_ext <<_ACEOF
2961 /* end confdefs.h.  */
2962
2963 int
2964 main ()
2965 {
2966 #ifdef __FAST_MATH__
2967 choke me
2968 #endif
2969   ;
2970   return 0;
2971 }
2972 _ACEOF
2973 rm -f conftest.$ac_objext
2974 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2975   (eval $ac_compile) 2>conftest.er1
2976   ac_status=$?
2977   grep -v '^ *+' conftest.er1 >conftest.err
2978   rm -f conftest.er1
2979   cat conftest.err >&5
2980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2981   (exit $ac_status); } &&
2982          { ac_try='test -z "$ac_c_werror_flag"
2983                          || test ! -s conftest.err'
2984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2985   (eval $ac_try) 2>&5
2986   ac_status=$?
2987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2988   (exit $ac_status); }; } &&
2989          { ac_try='test -s conftest.$ac_objext'
2990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2991   (eval $ac_try) 2>&5
2992   ac_status=$?
2993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2994   (exit $ac_status); }; }; then
2995   :
2996 else
2997   echo "$as_me: failed program was:" >&5
2998 sed 's/^/| /' conftest.$ac_ext >&5
2999
3000 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3001 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3002    { (exit 1); exit 1; }; }
3003 fi
3004 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3005 fi
3006
3007 ac_ext=c
3008 ac_cpp='$CPP $CPPFLAGS'
3009 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3010 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3011 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3012 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3013 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3014 # On Suns, sometimes $CPP names a directory.
3015 if test -n "$CPP" && test -d "$CPP"; then
3016   CPP=
3017 fi
3018 if test -z "$CPP"; then
3019   if test "${ac_cv_prog_CPP+set}" = set; then
3020   echo $ECHO_N "(cached) $ECHO_C" >&6
3021 else
3022       # Double quotes because CPP needs to be expanded
3023     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3024     do
3025       ac_preproc_ok=false
3026 for ac_c_preproc_warn_flag in '' yes
3027 do
3028   # Use a header file that comes with gcc, so configuring glibc
3029   # with a fresh cross-compiler works.
3030   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3031   # <limits.h> exists even on freestanding compilers.
3032   # On the NeXT, cc -E runs the code through the compiler's parser,
3033   # not just through cpp. "Syntax error" is here to catch this case.
3034   cat >conftest.$ac_ext <<_ACEOF
3035 /* confdefs.h.  */
3036 _ACEOF
3037 cat confdefs.h >>conftest.$ac_ext
3038 cat >>conftest.$ac_ext <<_ACEOF
3039 /* end confdefs.h.  */
3040 #ifdef __STDC__
3041 # include <limits.h>
3042 #else
3043 # include <assert.h>
3044 #endif
3045                      Syntax error
3046 _ACEOF
3047 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3048   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3049   ac_status=$?
3050   grep -v '^ *+' conftest.er1 >conftest.err
3051   rm -f conftest.er1
3052   cat conftest.err >&5
3053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3054   (exit $ac_status); } >/dev/null; then
3055   if test -s conftest.err; then
3056     ac_cpp_err=$ac_c_preproc_warn_flag
3057     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3058   else
3059     ac_cpp_err=
3060   fi
3061 else
3062   ac_cpp_err=yes
3063 fi
3064 if test -z "$ac_cpp_err"; then
3065   :
3066 else
3067   echo "$as_me: failed program was:" >&5
3068 sed 's/^/| /' conftest.$ac_ext >&5
3069
3070   # Broken: fails on valid input.
3071 continue
3072 fi
3073 rm -f conftest.err conftest.$ac_ext
3074
3075   # OK, works on sane cases.  Now check whether non-existent headers
3076   # can be detected and how.
3077   cat >conftest.$ac_ext <<_ACEOF
3078 /* confdefs.h.  */
3079 _ACEOF
3080 cat confdefs.h >>conftest.$ac_ext
3081 cat >>conftest.$ac_ext <<_ACEOF
3082 /* end confdefs.h.  */
3083 #include <ac_nonexistent.h>
3084 _ACEOF
3085 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3086   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3087   ac_status=$?
3088   grep -v '^ *+' conftest.er1 >conftest.err
3089   rm -f conftest.er1
3090   cat conftest.err >&5
3091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3092   (exit $ac_status); } >/dev/null; then
3093   if test -s conftest.err; then
3094     ac_cpp_err=$ac_c_preproc_warn_flag
3095     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3096   else
3097     ac_cpp_err=
3098   fi
3099 else
3100   ac_cpp_err=yes
3101 fi
3102 if test -z "$ac_cpp_err"; then
3103   # Broken: success on invalid input.
3104 continue
3105 else
3106   echo "$as_me: failed program was:" >&5
3107 sed 's/^/| /' conftest.$ac_ext >&5
3108
3109   # Passes both tests.
3110 ac_preproc_ok=:
3111 break
3112 fi
3113 rm -f conftest.err conftest.$ac_ext
3114
3115 done
3116 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3117 rm -f conftest.err conftest.$ac_ext
3118 if $ac_preproc_ok; then
3119   break
3120 fi
3121
3122     done
3123     ac_cv_prog_CPP=$CPP
3124
3125 fi
3126   CPP=$ac_cv_prog_CPP
3127 else
3128   ac_cv_prog_CPP=$CPP
3129 fi
3130 echo "$as_me:$LINENO: result: $CPP" >&5
3131 echo "${ECHO_T}$CPP" >&6
3132 ac_preproc_ok=false
3133 for ac_c_preproc_warn_flag in '' yes
3134 do
3135   # Use a header file that comes with gcc, so configuring glibc
3136   # with a fresh cross-compiler works.
3137   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3138   # <limits.h> exists even on freestanding compilers.
3139   # On the NeXT, cc -E runs the code through the compiler's parser,
3140   # not just through cpp. "Syntax error" is here to catch this case.
3141   cat >conftest.$ac_ext <<_ACEOF
3142 /* confdefs.h.  */
3143 _ACEOF
3144 cat confdefs.h >>conftest.$ac_ext
3145 cat >>conftest.$ac_ext <<_ACEOF
3146 /* end confdefs.h.  */
3147 #ifdef __STDC__
3148 # include <limits.h>
3149 #else
3150 # include <assert.h>
3151 #endif
3152                      Syntax error
3153 _ACEOF
3154 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3155   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3156   ac_status=$?
3157   grep -v '^ *+' conftest.er1 >conftest.err
3158   rm -f conftest.er1
3159   cat conftest.err >&5
3160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3161   (exit $ac_status); } >/dev/null; then
3162   if test -s conftest.err; then
3163     ac_cpp_err=$ac_c_preproc_warn_flag
3164     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3165   else
3166     ac_cpp_err=
3167   fi
3168 else
3169   ac_cpp_err=yes
3170 fi
3171 if test -z "$ac_cpp_err"; then
3172   :
3173 else
3174   echo "$as_me: failed program was:" >&5
3175 sed 's/^/| /' conftest.$ac_ext >&5
3176
3177   # Broken: fails on valid input.
3178 continue
3179 fi
3180 rm -f conftest.err conftest.$ac_ext
3181
3182   # OK, works on sane cases.  Now check whether non-existent headers
3183   # can be detected and how.
3184   cat >conftest.$ac_ext <<_ACEOF
3185 /* confdefs.h.  */
3186 _ACEOF
3187 cat confdefs.h >>conftest.$ac_ext
3188 cat >>conftest.$ac_ext <<_ACEOF
3189 /* end confdefs.h.  */
3190 #include <ac_nonexistent.h>
3191 _ACEOF
3192 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3193   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3194   ac_status=$?
3195   grep -v '^ *+' conftest.er1 >conftest.err
3196   rm -f conftest.er1
3197   cat conftest.err >&5
3198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3199   (exit $ac_status); } >/dev/null; then
3200   if test -s conftest.err; then
3201     ac_cpp_err=$ac_c_preproc_warn_flag
3202     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3203   else
3204     ac_cpp_err=
3205   fi
3206 else
3207   ac_cpp_err=yes
3208 fi
3209 if test -z "$ac_cpp_err"; then
3210   # Broken: success on invalid input.
3211 continue
3212 else
3213   echo "$as_me: failed program was:" >&5
3214 sed 's/^/| /' conftest.$ac_ext >&5
3215
3216   # Passes both tests.
3217 ac_preproc_ok=:
3218 break
3219 fi
3220 rm -f conftest.err conftest.$ac_ext
3221
3222 done
3223 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3224 rm -f conftest.err conftest.$ac_ext
3225 if $ac_preproc_ok; then
3226   :
3227 else
3228   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3229 See \`config.log' for more details." >&5
3230 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3231 See \`config.log' for more details." >&2;}
3232    { (exit 1); exit 1; }; }
3233 fi
3234
3235 ac_ext=c
3236 ac_cpp='$CPP $CPPFLAGS'
3237 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3238 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3239 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3240
3241
3242
3243 # Create compiler version string
3244 if test x"$GCC" = x"yes" ; then
3245   cc_string="GCC `${CC} --version | sed q`"
3246 else
3247   cc_string=$CC
3248 fi
3249
3250 cat >>confdefs.h <<_ACEOF
3251 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3252 _ACEOF
3253
3254
3255
3256 #
3257 # Set up TAS assembly code if needed; the template file has now had its
3258 # chance to request this.
3259 #
3260           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3261
3262
3263 if test "$need_tas" = yes ; then
3264   TAS=tas.o
3265 else
3266   TAS=""
3267 fi
3268
3269
3270
3271 #
3272 # Automatic dependency tracking
3273 #
3274
3275
3276 # Check whether --enable-depend or --disable-depend was given.
3277 if test "${enable_depend+set}" = set; then
3278   enableval="$enable_depend"
3279
3280   case $enableval in
3281     yes)
3282       autodepend=yes
3283       ;;
3284     no)
3285       :
3286       ;;
3287     *)
3288       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3289 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3290    { (exit 1); exit 1; }; }
3291       ;;
3292   esac
3293
3294 else
3295   enable_depend=no
3296
3297 fi;
3298
3299
3300
3301
3302 #
3303 # Enable assert checks
3304 #
3305
3306
3307 # Check whether --enable-cassert or --disable-cassert was given.
3308 if test "${enable_cassert+set}" = set; then
3309   enableval="$enable_cassert"
3310
3311   case $enableval in
3312     yes)
3313
3314 cat >>confdefs.h <<\_ACEOF
3315 #define USE_ASSERT_CHECKING 1
3316 _ACEOF
3317
3318       ;;
3319     no)
3320       :
3321       ;;
3322     *)
3323       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3324 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3325    { (exit 1); exit 1; }; }
3326       ;;
3327   esac
3328
3329 else
3330   enable_cassert=no
3331
3332 fi;
3333
3334
3335
3336 #
3337 # Include directories
3338 #
3339 ac_save_IFS=$IFS
3340 IFS="${IFS}${PATH_SEPARATOR}"
3341 # SRCH_INC comes from the template file
3342 for dir in $with_includes $SRCH_INC; do
3343   if test -d "$dir"; then
3344     INCLUDES="$INCLUDES -I$dir"
3345   else
3346     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3347 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3348   fi
3349 done
3350 IFS=$ac_save_IFS
3351
3352
3353
3354 #
3355 # Library directories
3356 #
3357 ac_save_IFS=$IFS
3358 IFS="${IFS}${PATH_SEPARATOR}"
3359 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3360 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3361   if test -d "$dir"; then
3362     LIBDIRS="$LIBDIRS -L$dir"
3363   else
3364     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3365 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3366   fi
3367 done
3368 IFS=$ac_save_IFS
3369
3370 #
3371 # Enable thread-safe client libraries
3372 #
3373 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3374 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3375
3376
3377 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3378 if test "${enable_thread_safety+set}" = set; then
3379   enableval="$enable_thread_safety"
3380
3381   case $enableval in
3382     yes)
3383       :
3384       ;;
3385     no)
3386       :
3387       ;;
3388     *)
3389       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3390 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3391    { (exit 1); exit 1; }; }
3392       ;;
3393   esac
3394
3395 else
3396   enable_thread_safety=no
3397
3398 fi;
3399
3400
3401
3402 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3403 if test "${enable_thread_safety_force+set}" = set; then
3404   enableval="$enable_thread_safety_force"
3405
3406   case $enableval in
3407     yes)
3408       :
3409       ;;
3410     no)
3411       :
3412       ;;
3413     *)
3414       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3415 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3416    { (exit 1); exit 1; }; }
3417       ;;
3418   esac
3419
3420 else
3421   enable_thread_safety_force=no
3422
3423 fi;
3424
3425 if test "$enable_thread_safety" = yes -o \
3426         "$enable_thread_safety_force" = yes; then
3427   enable_thread_safety="yes"    # for 'force'
3428
3429 cat >>confdefs.h <<\_ACEOF
3430 #define ENABLE_THREAD_SAFETY 1
3431 _ACEOF
3432
3433 fi
3434 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3435 echo "${ECHO_T}$enable_thread_safety" >&6
3436
3437
3438 #
3439 # Optionally build Tcl modules (PL/Tcl)
3440 #
3441 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3442 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3443
3444
3445
3446 # Check whether --with-tcl or --without-tcl was given.
3447 if test "${with_tcl+set}" = set; then
3448   withval="$with_tcl"
3449
3450   case $withval in
3451     yes)
3452       :
3453       ;;
3454     no)
3455       :
3456       ;;
3457     *)
3458       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3459 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3460    { (exit 1); exit 1; }; }
3461       ;;
3462   esac
3463
3464 else
3465   with_tcl=no
3466
3467 fi;
3468
3469 echo "$as_me:$LINENO: result: $with_tcl" >&5
3470 echo "${ECHO_T}$with_tcl" >&6
3471
3472
3473 # We see if the path to the Tcl/Tk configuration scripts is specified.
3474 # This will override the use of tclsh to find the paths to search.
3475
3476
3477
3478
3479 # Check whether --with-tclconfig or --without-tclconfig was given.
3480 if test "${with_tclconfig+set}" = set; then
3481   withval="$with_tclconfig"
3482
3483   case $withval in
3484     yes)
3485       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3486 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3487    { (exit 1); exit 1; }; }
3488       ;;
3489     no)
3490       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3491 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3492    { (exit 1); exit 1; }; }
3493       ;;
3494     *)
3495
3496       ;;
3497   esac
3498
3499 fi;
3500
3501
3502 #
3503 # Optionally build Perl modules (PL/Perl)
3504 #
3505 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3506 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3507
3508
3509
3510 # Check whether --with-perl or --without-perl was given.
3511 if test "${with_perl+set}" = set; then
3512   withval="$with_perl"
3513
3514   case $withval in
3515     yes)
3516       :
3517       ;;
3518     no)
3519       :
3520       ;;
3521     *)
3522       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3523 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3524    { (exit 1); exit 1; }; }
3525       ;;
3526   esac
3527
3528 else
3529   with_perl=no
3530
3531 fi;
3532
3533 echo "$as_me:$LINENO: result: $with_perl" >&5
3534 echo "${ECHO_T}$with_perl" >&6
3535
3536
3537 #
3538 # Optionally build Python modules (PL/Python)
3539 #
3540 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3541 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3542
3543
3544
3545 # Check whether --with-python or --without-python was given.
3546 if test "${with_python+set}" = set; then
3547   withval="$with_python"
3548
3549   case $withval in
3550     yes)
3551       :
3552       ;;
3553     no)
3554       :
3555       ;;
3556     *)
3557       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3558 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3559    { (exit 1); exit 1; }; }
3560       ;;
3561   esac
3562
3563 else
3564   with_python=no
3565
3566 fi;
3567
3568 echo "$as_me:$LINENO: result: $with_python" >&5
3569 echo "${ECHO_T}$with_python" >&6
3570
3571
3572 #
3573 # Kerberos 5
3574 #
3575 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3576 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3577
3578
3579
3580 # Check whether --with-krb5 or --without-krb5 was given.
3581 if test "${with_krb5+set}" = set; then
3582   withval="$with_krb5"
3583
3584   case $withval in
3585     yes)
3586
3587
3588 cat >>confdefs.h <<\_ACEOF
3589 #define KRB5 1
3590 _ACEOF
3591
3592   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3593
3594       ;;
3595     no)
3596       :
3597       ;;
3598     *)
3599       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3600 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3601    { (exit 1); exit 1; }; }
3602       ;;
3603   esac
3604
3605 else
3606   with_krb5=no
3607
3608 fi;
3609
3610 echo "$as_me:$LINENO: result: $with_krb5" >&5
3611 echo "${ECHO_T}$with_krb5" >&6
3612
3613
3614
3615
3616
3617
3618 #
3619 # Kerberos configuration parameters
3620 #
3621
3622
3623
3624 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3625 if test "${with_krb_srvnam+set}" = set; then
3626   withval="$with_krb_srvnam"
3627
3628   case $withval in
3629     yes)
3630       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3631 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3632    { (exit 1); exit 1; }; }
3633       ;;
3634     no)
3635       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3636 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3637    { (exit 1); exit 1; }; }
3638       ;;
3639     *)
3640
3641       ;;
3642   esac
3643
3644 else
3645   with_krb_srvnam="postgres"
3646 fi;
3647
3648
3649 cat >>confdefs.h <<_ACEOF
3650 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3651 _ACEOF
3652
3653
3654
3655 #
3656 # PAM
3657 #
3658 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3659 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3660
3661
3662
3663 # Check whether --with-pam or --without-pam was given.
3664 if test "${with_pam+set}" = set; then
3665   withval="$with_pam"
3666
3667   case $withval in
3668     yes)
3669
3670 cat >>confdefs.h <<\_ACEOF
3671 #define USE_PAM 1
3672 _ACEOF
3673
3674       ;;
3675     no)
3676       :
3677       ;;
3678     *)
3679       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3680 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3681    { (exit 1); exit 1; }; }
3682       ;;
3683   esac
3684
3685 else
3686   with_pam=no
3687
3688 fi;
3689
3690 echo "$as_me:$LINENO: result: $with_pam" >&5
3691 echo "${ECHO_T}$with_pam" >&6
3692
3693
3694
3695 #
3696 # Bonjour
3697 #
3698 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
3699 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
3700
3701
3702
3703 # Check whether --with-bonjour or --without-bonjour was given.
3704 if test "${with_bonjour+set}" = set; then
3705   withval="$with_bonjour"
3706
3707   case $withval in
3708     yes)
3709
3710 cat >>confdefs.h <<\_ACEOF
3711 #define USE_BONJOUR 1
3712 _ACEOF
3713
3714       ;;
3715     no)
3716       :
3717       ;;
3718     *)
3719       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
3720 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
3721    { (exit 1); exit 1; }; }
3722       ;;
3723   esac
3724
3725 else
3726   with_bonjour=no
3727
3728 fi;
3729
3730 echo "$as_me:$LINENO: result: $with_bonjour" >&5
3731 echo "${ECHO_T}$with_bonjour" >&6
3732
3733
3734
3735 #
3736 # OpenSSL
3737 #
3738 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3739 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
3740
3741
3742
3743 # Check whether --with-openssl or --without-openssl was given.
3744 if test "${with_openssl+set}" = set; then
3745   withval="$with_openssl"
3746
3747   case $withval in
3748     yes)
3749
3750 cat >>confdefs.h <<\_ACEOF
3751 #define USE_SSL 1
3752 _ACEOF
3753
3754       ;;
3755     no)
3756       :
3757       ;;
3758     *)
3759       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3760 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3761    { (exit 1); exit 1; }; }
3762       ;;
3763   esac
3764
3765 else
3766   with_openssl=no
3767
3768 fi;
3769
3770 echo "$as_me:$LINENO: result: $with_openssl" >&5
3771 echo "${ECHO_T}$with_openssl" >&6
3772
3773
3774
3775 #
3776 # Prefer libedit
3777 #
3778
3779
3780
3781 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
3782 if test "${with_libedit_preferred+set}" = set; then
3783   withval="$with_libedit_preferred"
3784
3785   case $withval in
3786     yes)
3787       :
3788       ;;
3789     no)
3790       :
3791       ;;
3792     *)
3793       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
3794 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
3795    { (exit 1); exit 1; }; }
3796       ;;
3797   esac
3798
3799 else
3800   with_libedit_preferred=no
3801
3802 fi;
3803
3804
3805
3806 #
3807 # Readline
3808 #
3809
3810
3811
3812 # Check whether --with-readline or --without-readline was given.
3813 if test "${with_readline+set}" = set; then
3814   withval="$with_readline"
3815
3816   case $withval in
3817     yes)
3818       :
3819       ;;
3820     no)
3821       :
3822       ;;
3823     *)
3824       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
3825 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
3826    { (exit 1); exit 1; }; }
3827       ;;
3828   esac
3829
3830 else
3831   with_readline=yes
3832
3833 fi;
3834
3835 # readline on MinGW has problems with backslashes in psql and other bugs.
3836 # This is particularly a problem with non-US code pages.
3837 # Therefore disable its use until we understand the cause. 2004-07-20
3838 if test "$PORTNAME" = "win32"; then
3839   if test "$with_readline" = yes; then
3840     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
3841 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
3842     with_readline=no
3843   fi
3844 fi
3845
3846
3847 #
3848 # Zlib
3849 #
3850
3851
3852
3853 # Check whether --with-zlib or --without-zlib was given.
3854 if test "${with_zlib+set}" = set; then
3855   withval="$with_zlib"
3856
3857   case $withval in
3858     yes)
3859       :
3860       ;;
3861     no)
3862       :
3863       ;;
3864     *)
3865       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
3866 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
3867    { (exit 1); exit 1; }; }
3868       ;;
3869   esac
3870
3871 else
3872   with_zlib=yes
3873
3874 fi;
3875
3876
3877
3878 #
3879 # Elf
3880 #
3881
3882 # Assume system is ELF if it predefines __ELF__ as 1,
3883 # otherwise believe host_os based default.
3884 case $host_os in
3885     freebsd1*|freebsd2*) elf=no;;
3886     freebsd3*|freebsd4*) elf=yes;;
3887 esac
3888
3889
3890 echo "$as_me:$LINENO: checking for egrep" >&5
3891 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3892 if test "${ac_cv_prog_egrep+set}" = set; then
3893   echo $ECHO_N "(cached) $ECHO_C" >&6
3894 else
3895   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3896     then ac_cv_prog_egrep='grep -E'
3897     else ac_cv_prog_egrep='egrep'
3898     fi
3899 fi
3900 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3901 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3902  EGREP=$ac_cv_prog_egrep
3903
3904
3905 cat >conftest.$ac_ext <<_ACEOF
3906 /* confdefs.h.  */
3907 _ACEOF
3908 cat confdefs.h >>conftest.$ac_ext
3909 cat >>conftest.$ac_ext <<_ACEOF
3910 /* end confdefs.h.  */
3911 #if __ELF__
3912   yes
3913 #endif
3914
3915 _ACEOF
3916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3917   $EGREP "yes" >/dev/null 2>&1; then
3918   ELF_SYS=true
3919 else
3920   if test "X$elf" = "Xyes" ; then
3921   ELF_SYS=true
3922 else
3923   ELF_SYS=
3924 fi
3925 fi
3926 rm -f conftest*
3927
3928
3929
3930 #
3931 # Assignments
3932 #
3933
3934 CPPFLAGS="$CPPFLAGS $INCLUDES"
3935 LDFLAGS="$LDFLAGS $LIBDIRS"
3936
3937 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
3938 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
3939 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
3940 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
3941
3942
3943
3944 for ac_prog in gawk mawk nawk awk
3945 do
3946   # Extract the first word of "$ac_prog", so it can be a program name with args.
3947 set dummy $ac_prog; ac_word=$2
3948 echo "$as_me:$LINENO: checking for $ac_word" >&5
3949 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3950 if test "${ac_cv_prog_AWK+set}" = set; then
3951   echo $ECHO_N "(cached) $ECHO_C" >&6
3952 else
3953   if test -n "$AWK"; then
3954   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3955 else
3956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957 for as_dir in $PATH
3958 do
3959   IFS=$as_save_IFS
3960   test -z "$as_dir" && as_dir=.
3961   for ac_exec_ext in '' $ac_executable_extensions; do
3962   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3963     ac_cv_prog_AWK="$ac_prog"
3964     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3965     break 2
3966   fi
3967 done
3968 done
3969
3970 fi
3971 fi
3972 AWK=$ac_cv_prog_AWK
3973 if test -n "$AWK"; then
3974   echo "$as_me:$LINENO: result: $AWK" >&5
3975 echo "${ECHO_T}$AWK" >&6
3976 else
3977   echo "$as_me:$LINENO: result: no" >&5
3978 echo "${ECHO_T}no" >&6
3979 fi
3980
3981   test -n "$AWK" && break
3982 done
3983
3984 echo "$as_me:$LINENO: checking for flex" >&5
3985 echo $ECHO_N "checking for flex... $ECHO_C" >&6
3986 if test "${pgac_cv_path_flex+set}" = set; then
3987   echo $ECHO_N "(cached) $ECHO_C" >&6
3988 else
3989   # Let the user override the test
3990 if test -n "$FLEX"; then
3991   pgac_cv_path_flex=$FLEX
3992 else
3993   pgac_save_IFS=$IFS
3994   IFS=$PATH_SEPARATOR
3995   for pgac_dir in $PATH; do
3996     IFS=$pgac_save_IFS
3997     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
3998       pgac_dir=`pwd`
3999     fi
4000     for pgac_prog in flex lex; do
4001       pgac_candidate="$pgac_dir/$pgac_prog"
4002       if test -f "$pgac_candidate" \
4003         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4004       then
4005         echo '%%'  > conftest.l
4006         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4007           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4008             pgac_broken_flex=$pgac_candidate
4009             continue
4010           fi
4011
4012           pgac_cv_path_flex=$pgac_candidate
4013           break 2
4014         fi
4015       fi
4016     done
4017   done
4018   rm -f conftest.l lex.yy.c
4019   : ${pgac_cv_path_flex=no}
4020 fi
4021
4022 fi
4023 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4024 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4025 if test x"$pgac_cv_path_flex" = x"no"; then
4026   if test -n "$pgac_broken_flex"; then
4027     { echo "$as_me:$LINENO: WARNING:
4028 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4029 *** should get version 2.5.4 or later." >&5
4030 echo "$as_me: WARNING:
4031 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4032 *** should get version 2.5.4 or later." >&2;}
4033   fi
4034
4035   { echo "$as_me:$LINENO: WARNING:
4036 *** Without Flex you will not be able to build PostgreSQL from CVS or
4037 *** change any of the scanner definition files.  You can obtain Flex from
4038 *** a GNU mirror site.  (If you are using the official distribution of
4039 *** PostgreSQL then you do not need to worry about this because the Flex
4040 *** output is pre-generated.)" >&5
4041 echo "$as_me: WARNING:
4042 *** Without Flex you will not be able to build PostgreSQL from CVS or
4043 *** change any of the scanner definition files.  You can obtain Flex from
4044 *** a GNU mirror site.  (If you are using the official distribution of
4045 *** PostgreSQL then you do not need to worry about this because the Flex
4046 *** output is pre-generated.)" >&2;}
4047 fi
4048
4049 if test x"$pgac_cv_path_flex" = x"no"; then
4050   FLEX=
4051 else
4052   FLEX=$pgac_cv_path_flex
4053 fi
4054
4055
4056
4057
4058 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4059 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4060 LN_S=$as_ln_s
4061 if test "$LN_S" = "ln -s"; then
4062   echo "$as_me:$LINENO: result: yes" >&5
4063 echo "${ECHO_T}yes" >&6
4064 else
4065   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4066 echo "${ECHO_T}no, using $LN_S" >&6
4067 fi
4068
4069
4070 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4071 if test "${with_gnu_ld+set}" = set; then
4072   withval="$with_gnu_ld"
4073   test "$withval" = no || with_gnu_ld=yes
4074 else
4075   with_gnu_ld=no
4076 fi;
4077 ac_prog=ld
4078 if test "$GCC" = yes; then
4079   # Check if gcc -print-prog-name=ld gives a path.
4080   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4081 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4082   case $host in
4083   *-*-mingw*)
4084     # gcc leaves a trailing carriage return which upsets mingw
4085     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4086   *)
4087     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4088   esac
4089   case "$ac_prog" in
4090     # Accept absolute paths.
4091     [\\/]* | [A-Za-z]:[\\/]*)
4092       re_direlt='/[^/][^/]*/\.\./'
4093       # Canonicalize the path of ld
4094       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4095       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4096         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4097       done
4098       test -z "$LD" && LD="$ac_prog"
4099       ;;
4100   "")
4101     # If it fails, then pretend we aren't using GCC.
4102     ac_prog=ld
4103     ;;
4104   *)
4105     # If it is relative, then search for the first ld in PATH.
4106     with_gnu_ld=unknown
4107     ;;
4108   esac
4109 elif test "$with_gnu_ld" = yes; then
4110   echo "$as_me:$LINENO: checking for GNU ld" >&5
4111 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4112 else
4113   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4114 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4115 fi
4116 if test "${ac_cv_path_LD+set}" = set; then
4117   echo $ECHO_N "(cached) $ECHO_C" >&6
4118 else
4119   if test -z "$LD"; then
4120   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4121   for ac_dir in $PATH; do
4122     test -z "$ac_dir" && ac_dir=.
4123     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4124       ac_cv_path_LD="$ac_dir/$ac_prog"
4125       # Check to see if the program is GNU ld.  I'd rather use --version,
4126       # but apparently some GNU ld's only accept -v.
4127       # Break only if it was the GNU/non-GNU ld that we prefer.
4128       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4129         test "$with_gnu_ld" != no && break
4130       else
4131         test "$with_gnu_ld" != yes && break
4132       fi
4133     fi
4134   done
4135   IFS="$ac_save_ifs"
4136 else
4137   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4138 fi
4139 fi
4140
4141 LD="$ac_cv_path_LD"
4142 if test -n "$LD"; then
4143   echo "$as_me:$LINENO: result: $LD" >&5
4144 echo "${ECHO_T}$LD" >&6
4145 else
4146   echo "$as_me:$LINENO: result: no" >&5
4147 echo "${ECHO_T}no" >&6
4148 fi
4149 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4150 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4151    { (exit 1); exit 1; }; }
4152 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4153 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4154 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4155   echo $ECHO_N "(cached) $ECHO_C" >&6
4156 else
4157   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4158 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4159   ac_cv_prog_gnu_ld=yes
4160 else
4161   ac_cv_prog_gnu_ld=no
4162 fi
4163 fi
4164 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4165 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4166 with_gnu_ld=$ac_cv_prog_gnu_ld
4167
4168
4169
4170
4171 case $host_os in sysv5*)
4172   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4173 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4174 if test "${pgac_cv_prog_ld_R+set}" = set; then
4175   echo $ECHO_N "(cached) $ECHO_C" >&6
4176 else
4177
4178     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4179     cat >conftest.$ac_ext <<_ACEOF
4180 /* confdefs.h.  */
4181 _ACEOF
4182 cat confdefs.h >>conftest.$ac_ext
4183 cat >>conftest.$ac_ext <<_ACEOF
4184 /* end confdefs.h.  */
4185
4186 int
4187 main ()
4188 {
4189
4190   ;
4191   return 0;
4192 }
4193 _ACEOF
4194 rm -f conftest.$ac_objext conftest$ac_exeext
4195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4196   (eval $ac_link) 2>conftest.er1
4197   ac_status=$?
4198   grep -v '^ *+' conftest.er1 >conftest.err
4199   rm -f conftest.er1
4200   cat conftest.err >&5
4201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202   (exit $ac_status); } &&
4203          { ac_try='test -z "$ac_c_werror_flag"
4204                          || test ! -s conftest.err'
4205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206   (eval $ac_try) 2>&5
4207   ac_status=$?
4208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209   (exit $ac_status); }; } &&
4210          { ac_try='test -s conftest$ac_exeext'
4211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4212   (eval $ac_try) 2>&5
4213   ac_status=$?
4214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215   (exit $ac_status); }; }; then
4216   pgac_cv_prog_ld_R=yes
4217 else
4218   echo "$as_me: failed program was:" >&5
4219 sed 's/^/| /' conftest.$ac_ext >&5
4220
4221 pgac_cv_prog_ld_R=no
4222 fi
4223 rm -f conftest.err conftest.$ac_objext \
4224       conftest$ac_exeext conftest.$ac_ext
4225     LDFLAGS=$pgac_save_LDFLAGS
4226
4227 fi
4228 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4229 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4230   ld_R_works=$pgac_cv_prog_ld_R
4231
4232 esac
4233 if test -n "$ac_tool_prefix"; then
4234   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4235 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4236 echo "$as_me:$LINENO: checking for $ac_word" >&5
4237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4238 if test "${ac_cv_prog_RANLIB+set}" = set; then
4239   echo $ECHO_N "(cached) $ECHO_C" >&6
4240 else
4241   if test -n "$RANLIB"; then
4242   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4243 else
4244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245 for as_dir in $PATH
4246 do
4247   IFS=$as_save_IFS
4248   test -z "$as_dir" && as_dir=.
4249   for ac_exec_ext in '' $ac_executable_extensions; do
4250   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4251     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4252     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4253     break 2
4254   fi
4255 done
4256 done
4257
4258 fi
4259 fi
4260 RANLIB=$ac_cv_prog_RANLIB
4261 if test -n "$RANLIB"; then
4262   echo "$as_me:$LINENO: result: $RANLIB" >&5
4263 echo "${ECHO_T}$RANLIB" >&6
4264 else
4265   echo "$as_me:$LINENO: result: no" >&5
4266 echo "${ECHO_T}no" >&6
4267 fi
4268
4269 fi
4270 if test -z "$ac_cv_prog_RANLIB"; then
4271   ac_ct_RANLIB=$RANLIB
4272   # Extract the first word of "ranlib", so it can be a program name with args.
4273 set dummy ranlib; ac_word=$2
4274 echo "$as_me:$LINENO: checking for $ac_word" >&5
4275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4276 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4277   echo $ECHO_N "(cached) $ECHO_C" >&6
4278 else
4279   if test -n "$ac_ct_RANLIB"; then
4280   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4281 else
4282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4283 for as_dir in $PATH
4284 do
4285   IFS=$as_save_IFS
4286   test -z "$as_dir" && as_dir=.
4287   for ac_exec_ext in '' $ac_executable_extensions; do
4288   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4289     ac_cv_prog_ac_ct_RANLIB="ranlib"
4290     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4291     break 2
4292   fi
4293 done
4294 done
4295
4296   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4297 fi
4298 fi
4299 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4300 if test -n "$ac_ct_RANLIB"; then
4301   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4302 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4303 else
4304   echo "$as_me:$LINENO: result: no" >&5
4305 echo "${ECHO_T}no" >&6
4306 fi
4307
4308   RANLIB=$ac_ct_RANLIB
4309 else
4310   RANLIB="$ac_cv_prog_RANLIB"
4311 fi
4312
4313 for ac_prog in lorder
4314 do
4315   # Extract the first word of "$ac_prog", so it can be a program name with args.
4316 set dummy $ac_prog; ac_word=$2
4317 echo "$as_me:$LINENO: checking for $ac_word" >&5
4318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4319 if test "${ac_cv_prog_LORDER+set}" = set; then
4320   echo $ECHO_N "(cached) $ECHO_C" >&6
4321 else
4322   if test -n "$LORDER"; then
4323   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
4324 else
4325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326 for as_dir in $PATH
4327 do
4328   IFS=$as_save_IFS
4329   test -z "$as_dir" && as_dir=.
4330   for ac_exec_ext in '' $ac_executable_extensions; do
4331   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4332     ac_cv_prog_LORDER="$ac_prog"
4333     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4334     break 2
4335   fi
4336 done
4337 done
4338
4339 fi
4340 fi
4341 LORDER=$ac_cv_prog_LORDER
4342 if test -n "$LORDER"; then
4343   echo "$as_me:$LINENO: result: $LORDER" >&5
4344 echo "${ECHO_T}$LORDER" >&6
4345 else
4346   echo "$as_me:$LINENO: result: no" >&5
4347 echo "${ECHO_T}no" >&6
4348 fi
4349
4350   test -n "$LORDER" && break
4351 done
4352
4353 # Extract the first word of "tar", so it can be a program name with args.
4354 set dummy tar; ac_word=$2
4355 echo "$as_me:$LINENO: checking for $ac_word" >&5
4356 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4357 if test "${ac_cv_path_TAR+set}" = set; then
4358   echo $ECHO_N "(cached) $ECHO_C" >&6
4359 else
4360   case $TAR in
4361   [\\/]* | ?:[\\/]*)
4362   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4363   ;;
4364   *)
4365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4366 for as_dir in $PATH
4367 do
4368   IFS=$as_save_IFS
4369   test -z "$as_dir" && as_dir=.
4370   for ac_exec_ext in '' $ac_executable_extensions; do
4371   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4372     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4373     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4374     break 2
4375   fi
4376 done
4377 done
4378
4379   ;;
4380 esac
4381 fi
4382 TAR=$ac_cv_path_TAR
4383
4384 if test -n "$TAR"; then
4385   echo "$as_me:$LINENO: result: $TAR" >&5
4386 echo "${ECHO_T}$TAR" >&6
4387 else
4388   echo "$as_me:$LINENO: result: no" >&5
4389 echo "${ECHO_T}no" >&6
4390 fi
4391
4392
4393   if test -n "$ac_tool_prefix"; then
4394   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4395 set dummy ${ac_tool_prefix}strip; ac_word=$2
4396 echo "$as_me:$LINENO: checking for $ac_word" >&5
4397 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4398 if test "${ac_cv_prog_STRIP+set}" = set; then
4399   echo $ECHO_N "(cached) $ECHO_C" >&6
4400 else
4401   if test -n "$STRIP"; then
4402   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4403 else
4404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4405 for as_dir in $PATH
4406 do
4407   IFS=$as_save_IFS
4408   test -z "$as_dir" && as_dir=.
4409   for ac_exec_ext in '' $ac_executable_extensions; do
4410   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4411     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4412     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4413     break 2
4414   fi
4415 done
4416 done
4417
4418 fi
4419 fi
4420 STRIP=$ac_cv_prog_STRIP
4421 if test -n "$STRIP"; then
4422   echo "$as_me:$LINENO: result: $STRIP" >&5
4423 echo "${ECHO_T}$STRIP" >&6
4424 else
4425   echo "$as_me:$LINENO: result: no" >&5
4426 echo "${ECHO_T}no" >&6
4427 fi
4428
4429 fi
4430 if test -z "$ac_cv_prog_STRIP"; then
4431   ac_ct_STRIP=$STRIP
4432   # Extract the first word of "strip", so it can be a program name with args.
4433 set dummy strip; ac_word=$2
4434 echo "$as_me:$LINENO: checking for $ac_word" >&5
4435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4436 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   if test -n "$ac_ct_STRIP"; then
4440   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4441 else
4442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443 for as_dir in $PATH
4444 do
4445   IFS=$as_save_IFS
4446   test -z "$as_dir" && as_dir=.
4447   for ac_exec_ext in '' $ac_executable_extensions; do
4448   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4449     ac_cv_prog_ac_ct_STRIP="strip"
4450     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4451     break 2
4452   fi
4453 done
4454 done
4455
4456   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4457 fi
4458 fi
4459 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4460 if test -n "$ac_ct_STRIP"; then
4461   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4462 echo "${ECHO_T}$ac_ct_STRIP" >&6
4463 else
4464   echo "$as_me:$LINENO: result: no" >&5
4465 echo "${ECHO_T}no" >&6
4466 fi
4467
4468   STRIP=$ac_ct_STRIP
4469 else
4470   STRIP="$ac_cv_prog_STRIP"
4471 fi
4472
4473
4474   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4475 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4476   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4477     STRIP_STATIC_LIB="$STRIP -x"
4478     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4479     echo "$as_me:$LINENO: result: yes" >&5
4480 echo "${ECHO_T}yes" >&6
4481   else
4482     STRIP_STATIC_LIB=:
4483     STRIP_SHARED_LIB=:
4484     echo "$as_me:$LINENO: result: no" >&5
4485 echo "${ECHO_T}no" >&6
4486   fi
4487
4488
4489
4490
4491 for ac_prog in 'bison -y'
4492 do
4493   # Extract the first word of "$ac_prog", so it can be a program name with args.
4494 set dummy $ac_prog; ac_word=$2
4495 echo "$as_me:$LINENO: checking for $ac_word" >&5
4496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4497 if test "${ac_cv_prog_YACC+set}" = set; then
4498   echo $ECHO_N "(cached) $ECHO_C" >&6
4499 else
4500   if test -n "$YACC"; then
4501   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4502 else
4503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4504 for as_dir in $PATH
4505 do
4506   IFS=$as_save_IFS
4507   test -z "$as_dir" && as_dir=.
4508   for ac_exec_ext in '' $ac_executable_extensions; do
4509   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4510     ac_cv_prog_YACC="$ac_prog"
4511     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4512     break 2
4513   fi
4514 done
4515 done
4516
4517 fi
4518 fi
4519 YACC=$ac_cv_prog_YACC
4520 if test -n "$YACC"; then
4521   echo "$as_me:$LINENO: result: $YACC" >&5
4522 echo "${ECHO_T}$YACC" >&6
4523 else
4524   echo "$as_me:$LINENO: result: no" >&5
4525 echo "${ECHO_T}no" >&6
4526 fi
4527
4528   test -n "$YACC" && break
4529 done
4530
4531
4532 if test "$YACC"; then
4533   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4534     { echo "$as_me:$LINENO: WARNING:
4535 *** If you are going to modify the grammar files or build from CVS, the installed
4536 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4537 echo "$as_me: WARNING:
4538 *** If you are going to modify the grammar files or build from CVS, the installed
4539 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4540   fi
4541 fi
4542
4543 if test -z "$YACC"; then
4544   { echo "$as_me:$LINENO: WARNING:
4545 *** Without Bison you will not be able to build PostgreSQL from CVS or
4546 *** change any of the parser definition files.  You can obtain Bison from
4547 *** a GNU mirror site.  (If you are using the official distribution of
4548 *** PostgreSQL then you do not need to worry about this because the Bison
4549 *** output is pre-generated.)  To use a different yacc program (possible,
4550 *** but not recommended), set the environment variable YACC before running
4551 *** 'configure'." >&5
4552 echo "$as_me: WARNING:
4553 *** Without Bison you will not be able to build PostgreSQL from CVS or
4554 *** change any of the parser definition files.  You can obtain Bison from
4555 *** a GNU mirror site.  (If you are using the official distribution of
4556 *** PostgreSQL then you do not need to worry about this because the Bison
4557 *** output is pre-generated.)  To use a different yacc program (possible,
4558 *** but not recommended), set the environment variable YACC before running
4559 *** 'configure'." >&2;}
4560 fi
4561
4562
4563 # Extract the first word of "perl", so it can be a program name with args.
4564 set dummy perl; ac_word=$2
4565 echo "$as_me:$LINENO: checking for $ac_word" >&5
4566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4567 if test "${ac_cv_path_PERL+set}" = set; then
4568   echo $ECHO_N "(cached) $ECHO_C" >&6
4569 else
4570   case $PERL in
4571   [\\/]* | ?:[\\/]*)
4572   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4573   ;;
4574   *)
4575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4576 for as_dir in $PATH
4577 do
4578   IFS=$as_save_IFS
4579   test -z "$as_dir" && as_dir=.
4580   for ac_exec_ext in '' $ac_executable_extensions; do
4581   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4582     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4583     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4584     break 2
4585   fi
4586 done
4587 done
4588
4589   ;;
4590 esac
4591 fi
4592 PERL=$ac_cv_path_PERL
4593
4594 if test -n "$PERL"; then
4595   echo "$as_me:$LINENO: result: $PERL" >&5
4596 echo "${ECHO_T}$PERL" >&6
4597 else
4598   echo "$as_me:$LINENO: result: no" >&5
4599 echo "${ECHO_T}no" >&6
4600 fi
4601
4602 if test "$with_perl" = yes; then
4603
4604 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4605 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4606 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4607 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4608 echo "${ECHO_T}$perl_archlibexp" >&6
4609 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4610 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4611 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4612 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4613 echo "${ECHO_T}$perl_privlibexp" >&6
4614 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4615 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4616 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4617 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4618 echo "${ECHO_T}$perl_useshrplib" >&6
4619
4620 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4621 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4622 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4623 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4624 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4625 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4626 echo "${ECHO_T}$perl_embed_ldflags" >&6
4627 fi
4628
4629 if test "$with_python" = yes; then
4630   # Extract the first word of "python", so it can be a program name with args.
4631 set dummy python; ac_word=$2
4632 echo "$as_me:$LINENO: checking for $ac_word" >&5
4633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4634 if test "${ac_cv_path_PYTHON+set}" = set; then
4635   echo $ECHO_N "(cached) $ECHO_C" >&6
4636 else
4637   case $PYTHON in
4638   [\\/]* | ?:[\\/]*)
4639   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4640   ;;
4641   *)
4642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643 for as_dir in $PATH
4644 do
4645   IFS=$as_save_IFS
4646   test -z "$as_dir" && as_dir=.
4647   for ac_exec_ext in '' $ac_executable_extensions; do
4648   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4649     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4650     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4651     break 2
4652   fi
4653 done
4654 done
4655
4656   ;;
4657 esac
4658 fi
4659 PYTHON=$ac_cv_path_PYTHON
4660
4661 if test -n "$PYTHON"; then
4662   echo "$as_me:$LINENO: result: $PYTHON" >&5
4663 echo "${ECHO_T}$PYTHON" >&6
4664 else
4665   echo "$as_me:$LINENO: result: no" >&5
4666 echo "${ECHO_T}no" >&6
4667 fi
4668
4669 if test x"$PYTHON" = x""; then
4670   { { echo "$as_me:$LINENO: error: Python not found" >&5
4671 echo "$as_me: error: Python not found" >&2;}
4672    { (exit 1); exit 1; }; }
4673 fi
4674
4675
4676 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4677 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4678 if "${PYTHON}" 2>&- -c 'import distutils'
4679 then
4680     echo "$as_me:$LINENO: result: yes" >&5
4681 echo "${ECHO_T}yes" >&6
4682 else
4683     echo "$as_me:$LINENO: result: no" >&5
4684 echo "${ECHO_T}no" >&6
4685     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4686 echo "$as_me: error: distutils module not found" >&2;}
4687    { (exit 1); exit 1; }; }
4688 fi
4689 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4690 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4691 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4692 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')"`
4693 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4694
4695 # This should be enough of a message.
4696 echo "$as_me:$LINENO: result: $python_configdir" >&5
4697 echo "${ECHO_T}$python_configdir" >&6
4698
4699
4700 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4701 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4702
4703 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4704 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4705 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4706 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4707
4708 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4709 then
4710         # New way: use the official shared library
4711         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4712         python_libspec="-L${python_libdir} -l${ldlibrary}"
4713 else
4714         # Old way: use libpython from python_configdir
4715         python_libdir="${python_configdir}"
4716         python_libspec="-L${python_libdir} -lpython${python_version}"
4717 fi
4718
4719 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4720
4721 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4722 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4723
4724
4725 # threaded python is not supported on bsd's
4726 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4727 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
4728 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
4729 if test "$pythreads" = "1"; then
4730   echo "$as_me:$LINENO: result: yes" >&5
4731 echo "${ECHO_T}yes" >&6
4732   case $host_os in
4733   openbsd*|freebsd4*)
4734     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
4735 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
4736    { (exit 1); exit 1; }; }
4737     ;;
4738   esac
4739 else
4740   echo "$as_me:$LINENO: result: no" >&5
4741 echo "${ECHO_T}no" >&6
4742 fi
4743
4744
4745 fi
4746
4747
4748 ##
4749 ## Libraries
4750 ##
4751
4752 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
4753 then
4754
4755 echo "$as_me:$LINENO: checking for main in -lbsd" >&5
4756 echo $ECHO_N "checking for main in -lbsd... $ECHO_C" >&6
4757 if test "${ac_cv_lib_bsd_main+set}" = set; then
4758   echo $ECHO_N "(cached) $ECHO_C" >&6
4759 else
4760   ac_check_lib_save_LIBS=$LIBS
4761 LIBS="-lbsd  $LIBS"
4762 cat >conftest.$ac_ext <<_ACEOF
4763 /* confdefs.h.  */
4764 _ACEOF
4765 cat confdefs.h >>conftest.$ac_ext
4766 cat >>conftest.$ac_ext <<_ACEOF
4767 /* end confdefs.h.  */
4768
4769
4770 int
4771 main ()
4772 {
4773 main ();
4774   ;
4775   return 0;
4776 }
4777 _ACEOF
4778 rm -f conftest.$ac_objext conftest$ac_exeext
4779 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4780   (eval $ac_link) 2>conftest.er1
4781   ac_status=$?
4782   grep -v '^ *+' conftest.er1 >conftest.err
4783   rm -f conftest.er1
4784   cat conftest.err >&5
4785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4786   (exit $ac_status); } &&
4787          { ac_try='test -z "$ac_c_werror_flag"
4788                          || test ! -s conftest.err'
4789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4790   (eval $ac_try) 2>&5
4791   ac_status=$?
4792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4793   (exit $ac_status); }; } &&
4794          { ac_try='test -s conftest$ac_exeext'
4795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4796   (eval $ac_try) 2>&5
4797   ac_status=$?
4798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4799   (exit $ac_status); }; }; then
4800   ac_cv_lib_bsd_main=yes
4801 else
4802   echo "$as_me: failed program was:" >&5
4803 sed 's/^/| /' conftest.$ac_ext >&5
4804
4805 ac_cv_lib_bsd_main=no
4806 fi
4807 rm -f conftest.err conftest.$ac_objext \
4808       conftest$ac_exeext conftest.$ac_ext
4809 LIBS=$ac_check_lib_save_LIBS
4810 fi
4811 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_main" >&5
4812 echo "${ECHO_T}$ac_cv_lib_bsd_main" >&6
4813 if test $ac_cv_lib_bsd_main = yes; then
4814   cat >>confdefs.h <<_ACEOF
4815 #define HAVE_LIBBSD 1
4816 _ACEOF
4817
4818   LIBS="-lbsd $LIBS"
4819
4820 fi
4821
4822 fi
4823
4824 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
4825 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
4826 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
4827   echo $ECHO_N "(cached) $ECHO_C" >&6
4828 else
4829   ac_check_lib_save_LIBS=$LIBS
4830 LIBS="-lutil  $LIBS"
4831 cat >conftest.$ac_ext <<_ACEOF
4832 /* confdefs.h.  */
4833 _ACEOF
4834 cat confdefs.h >>conftest.$ac_ext
4835 cat >>conftest.$ac_ext <<_ACEOF
4836 /* end confdefs.h.  */
4837
4838 /* Override any gcc2 internal prototype to avoid an error.  */
4839 #ifdef __cplusplus
4840 extern "C"
4841 #endif
4842 /* We use char because int might match the return type of a gcc2
4843    builtin and then its argument prototype would still apply.  */
4844 char setproctitle ();
4845 int
4846 main ()
4847 {
4848 setproctitle ();
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 rm -f conftest.$ac_objext conftest$ac_exeext
4854 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4855   (eval $ac_link) 2>conftest.er1
4856   ac_status=$?
4857   grep -v '^ *+' conftest.er1 >conftest.err
4858   rm -f conftest.er1
4859   cat conftest.err >&5
4860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4861   (exit $ac_status); } &&
4862          { ac_try='test -z "$ac_c_werror_flag"
4863                          || test ! -s conftest.err'
4864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4865   (eval $ac_try) 2>&5
4866   ac_status=$?
4867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868   (exit $ac_status); }; } &&
4869          { ac_try='test -s conftest$ac_exeext'
4870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4871   (eval $ac_try) 2>&5
4872   ac_status=$?
4873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874   (exit $ac_status); }; }; then
4875   ac_cv_lib_util_setproctitle=yes
4876 else
4877   echo "$as_me: failed program was:" >&5
4878 sed 's/^/| /' conftest.$ac_ext >&5
4879
4880 ac_cv_lib_util_setproctitle=no
4881 fi
4882 rm -f conftest.err conftest.$ac_objext \
4883       conftest$ac_exeext conftest.$ac_ext
4884 LIBS=$ac_check_lib_save_LIBS
4885 fi
4886 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
4887 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
4888 if test $ac_cv_lib_util_setproctitle = yes; then
4889   cat >>confdefs.h <<_ACEOF
4890 #define HAVE_LIBUTIL 1
4891 _ACEOF
4892
4893   LIBS="-lutil $LIBS"
4894
4895 fi
4896
4897
4898 echo "$as_me:$LINENO: checking for main in -lm" >&5
4899 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
4900 if test "${ac_cv_lib_m_main+set}" = set; then
4901   echo $ECHO_N "(cached) $ECHO_C" >&6
4902 else
4903   ac_check_lib_save_LIBS=$LIBS
4904 LIBS="-lm  $LIBS"
4905 cat >conftest.$ac_ext <<_ACEOF
4906 /* confdefs.h.  */
4907 _ACEOF
4908 cat confdefs.h >>conftest.$ac_ext
4909 cat >>conftest.$ac_ext <<_ACEOF
4910 /* end confdefs.h.  */
4911
4912
4913 int
4914 main ()
4915 {
4916 main ();
4917   ;
4918   return 0;
4919 }
4920 _ACEOF
4921 rm -f conftest.$ac_objext conftest$ac_exeext
4922 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4923   (eval $ac_link) 2>conftest.er1
4924   ac_status=$?
4925   grep -v '^ *+' conftest.er1 >conftest.err
4926   rm -f conftest.er1
4927   cat conftest.err >&5
4928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4929   (exit $ac_status); } &&
4930          { ac_try='test -z "$ac_c_werror_flag"
4931                          || test ! -s conftest.err'
4932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4933   (eval $ac_try) 2>&5
4934   ac_status=$?
4935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4936   (exit $ac_status); }; } &&
4937          { ac_try='test -s conftest$ac_exeext'
4938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4939   (eval $ac_try) 2>&5
4940   ac_status=$?
4941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4942   (exit $ac_status); }; }; then
4943   ac_cv_lib_m_main=yes
4944 else
4945   echo "$as_me: failed program was:" >&5
4946 sed 's/^/| /' conftest.$ac_ext >&5
4947
4948 ac_cv_lib_m_main=no
4949 fi
4950 rm -f conftest.err conftest.$ac_objext \
4951       conftest$ac_exeext conftest.$ac_ext
4952 LIBS=$ac_check_lib_save_LIBS
4953 fi
4954 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
4955 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
4956 if test $ac_cv_lib_m_main = yes; then
4957   cat >>confdefs.h <<_ACEOF
4958 #define HAVE_LIBM 1
4959 _ACEOF
4960
4961   LIBS="-lm $LIBS"
4962
4963 fi
4964
4965
4966 echo "$as_me:$LINENO: checking for main in -ldl" >&5
4967 echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
4968 if test "${ac_cv_lib_dl_main+set}" = set; then
4969   echo $ECHO_N "(cached) $ECHO_C" >&6
4970 else
4971   ac_check_lib_save_LIBS=$LIBS
4972 LIBS="-ldl  $LIBS"
4973 cat >conftest.$ac_ext <<_ACEOF
4974 /* confdefs.h.  */
4975 _ACEOF
4976 cat confdefs.h >>conftest.$ac_ext
4977 cat >>conftest.$ac_ext <<_ACEOF
4978 /* end confdefs.h.  */
4979
4980
4981 int
4982 main ()
4983 {
4984 main ();
4985   ;
4986   return 0;
4987 }
4988 _ACEOF
4989 rm -f conftest.$ac_objext conftest$ac_exeext
4990 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4991   (eval $ac_link) 2>conftest.er1
4992   ac_status=$?
4993   grep -v '^ *+' conftest.er1 >conftest.err
4994   rm -f conftest.er1
4995   cat conftest.err >&5
4996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997   (exit $ac_status); } &&
4998          { ac_try='test -z "$ac_c_werror_flag"
4999                          || test ! -s conftest.err'
5000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5001   (eval $ac_try) 2>&5
5002   ac_status=$?
5003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004   (exit $ac_status); }; } &&
5005          { ac_try='test -s conftest$ac_exeext'
5006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5007   (eval $ac_try) 2>&5
5008   ac_status=$?
5009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5010   (exit $ac_status); }; }; then
5011   ac_cv_lib_dl_main=yes
5012 else
5013   echo "$as_me: failed program was:" >&5
5014 sed 's/^/| /' conftest.$ac_ext >&5
5015
5016 ac_cv_lib_dl_main=no
5017 fi
5018 rm -f conftest.err conftest.$ac_objext \
5019       conftest$ac_exeext conftest.$ac_ext
5020 LIBS=$ac_check_lib_save_LIBS
5021 fi
5022 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5
5023 echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
5024 if test $ac_cv_lib_dl_main = yes; then
5025   cat >>confdefs.h <<_ACEOF
5026 #define HAVE_LIBDL 1
5027 _ACEOF
5028
5029   LIBS="-ldl $LIBS"
5030
5031 fi
5032
5033
5034 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
5035 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
5036 if test "${ac_cv_lib_nsl_main+set}" = set; then
5037   echo $ECHO_N "(cached) $ECHO_C" >&6
5038 else
5039   ac_check_lib_save_LIBS=$LIBS
5040 LIBS="-lnsl  $LIBS"
5041 cat >conftest.$ac_ext <<_ACEOF
5042 /* confdefs.h.  */
5043 _ACEOF
5044 cat confdefs.h >>conftest.$ac_ext
5045 cat >>conftest.$ac_ext <<_ACEOF
5046 /* end confdefs.h.  */
5047
5048
5049 int
5050 main ()
5051 {
5052 main ();
5053   ;
5054   return 0;
5055 }
5056 _ACEOF
5057 rm -f conftest.$ac_objext conftest$ac_exeext
5058 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5059   (eval $ac_link) 2>conftest.er1
5060   ac_status=$?
5061   grep -v '^ *+' conftest.er1 >conftest.err
5062   rm -f conftest.er1
5063   cat conftest.err >&5
5064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065   (exit $ac_status); } &&
5066          { ac_try='test -z "$ac_c_werror_flag"
5067                          || test ! -s conftest.err'
5068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5069   (eval $ac_try) 2>&5
5070   ac_status=$?
5071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072   (exit $ac_status); }; } &&
5073          { ac_try='test -s conftest$ac_exeext'
5074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5075   (eval $ac_try) 2>&5
5076   ac_status=$?
5077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078   (exit $ac_status); }; }; then
5079   ac_cv_lib_nsl_main=yes
5080 else
5081   echo "$as_me: failed program was:" >&5
5082 sed 's/^/| /' conftest.$ac_ext >&5
5083
5084 ac_cv_lib_nsl_main=no
5085 fi
5086 rm -f conftest.err conftest.$ac_objext \
5087       conftest$ac_exeext conftest.$ac_ext
5088 LIBS=$ac_check_lib_save_LIBS
5089 fi
5090 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
5091 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
5092 if test $ac_cv_lib_nsl_main = yes; then
5093   cat >>confdefs.h <<_ACEOF
5094 #define HAVE_LIBNSL 1
5095 _ACEOF
5096
5097   LIBS="-lnsl $LIBS"
5098
5099 fi
5100
5101
5102 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
5103 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
5104 if test "${ac_cv_lib_socket_main+set}" = set; then
5105   echo $ECHO_N "(cached) $ECHO_C" >&6
5106 else
5107   ac_check_lib_save_LIBS=$LIBS
5108 LIBS="-lsocket  $LIBS"
5109 cat >conftest.$ac_ext <<_ACEOF
5110 /* confdefs.h.  */
5111 _ACEOF
5112 cat confdefs.h >>conftest.$ac_ext
5113 cat >>conftest.$ac_ext <<_ACEOF
5114 /* end confdefs.h.  */
5115
5116
5117 int
5118 main ()
5119 {
5120 main ();
5121   ;
5122   return 0;
5123 }
5124 _ACEOF
5125 rm -f conftest.$ac_objext conftest$ac_exeext
5126 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5127   (eval $ac_link) 2>conftest.er1
5128   ac_status=$?
5129   grep -v '^ *+' conftest.er1 >conftest.err
5130   rm -f conftest.er1
5131   cat conftest.err >&5
5132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133   (exit $ac_status); } &&
5134          { ac_try='test -z "$ac_c_werror_flag"
5135                          || test ! -s conftest.err'
5136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5137   (eval $ac_try) 2>&5
5138   ac_status=$?
5139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5140   (exit $ac_status); }; } &&
5141          { ac_try='test -s conftest$ac_exeext'
5142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5143   (eval $ac_try) 2>&5
5144   ac_status=$?
5145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5146   (exit $ac_status); }; }; then
5147   ac_cv_lib_socket_main=yes
5148 else
5149   echo "$as_me: failed program was:" >&5
5150 sed 's/^/| /' conftest.$ac_ext >&5
5151
5152 ac_cv_lib_socket_main=no
5153 fi
5154 rm -f conftest.err conftest.$ac_objext \
5155       conftest$ac_exeext conftest.$ac_ext
5156 LIBS=$ac_check_lib_save_LIBS
5157 fi
5158 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
5159 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
5160 if test $ac_cv_lib_socket_main = yes; then
5161   cat >>confdefs.h <<_ACEOF
5162 #define HAVE_LIBSOCKET 1
5163 _ACEOF
5164
5165   LIBS="-lsocket $LIBS"
5166
5167 fi
5168
5169
5170 echo "$as_me:$LINENO: checking for main in -lipc" >&5
5171 echo $ECHO_N "checking for main in -lipc... $ECHO_C" >&6
5172 if test "${ac_cv_lib_ipc_main+set}" = set; then
5173   echo $ECHO_N "(cached) $ECHO_C" >&6
5174 else
5175   ac_check_lib_save_LIBS=$LIBS
5176 LIBS="-lipc  $LIBS"
5177 cat >conftest.$ac_ext <<_ACEOF
5178 /* confdefs.h.  */
5179 _ACEOF
5180 cat confdefs.h >>conftest.$ac_ext
5181 cat >>conftest.$ac_ext <<_ACEOF
5182 /* end confdefs.h.  */
5183
5184
5185 int
5186 main ()
5187 {
5188 main ();
5189   ;
5190   return 0;
5191 }
5192 _ACEOF
5193 rm -f conftest.$ac_objext conftest$ac_exeext
5194 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5195   (eval $ac_link) 2>conftest.er1
5196   ac_status=$?
5197   grep -v '^ *+' conftest.er1 >conftest.err
5198   rm -f conftest.er1
5199   cat conftest.err >&5
5200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201   (exit $ac_status); } &&
5202          { ac_try='test -z "$ac_c_werror_flag"
5203                          || test ! -s conftest.err'
5204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5205   (eval $ac_try) 2>&5
5206   ac_status=$?
5207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208   (exit $ac_status); }; } &&
5209          { ac_try='test -s conftest$ac_exeext'
5210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5211   (eval $ac_try) 2>&5
5212   ac_status=$?
5213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5214   (exit $ac_status); }; }; then
5215   ac_cv_lib_ipc_main=yes
5216 else
5217   echo "$as_me: failed program was:" >&5
5218 sed 's/^/| /' conftest.$ac_ext >&5
5219
5220 ac_cv_lib_ipc_main=no
5221 fi
5222 rm -f conftest.err conftest.$ac_objext \
5223       conftest$ac_exeext conftest.$ac_ext
5224 LIBS=$ac_check_lib_save_LIBS
5225 fi
5226 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_main" >&5
5227 echo "${ECHO_T}$ac_cv_lib_ipc_main" >&6
5228 if test $ac_cv_lib_ipc_main = yes; then
5229   cat >>confdefs.h <<_ACEOF
5230 #define HAVE_LIBIPC 1
5231 _ACEOF
5232
5233   LIBS="-lipc $LIBS"
5234
5235 fi
5236
5237
5238 echo "$as_me:$LINENO: checking for main in -lIPC" >&5
5239 echo $ECHO_N "checking for main in -lIPC... $ECHO_C" >&6
5240 if test "${ac_cv_lib_IPC_main+set}" = set; then
5241   echo $ECHO_N "(cached) $ECHO_C" >&6
5242 else
5243   ac_check_lib_save_LIBS=$LIBS
5244 LIBS="-lIPC  $LIBS"
5245 cat >conftest.$ac_ext <<_ACEOF
5246 /* confdefs.h.  */
5247 _ACEOF
5248 cat confdefs.h >>conftest.$ac_ext
5249 cat >>conftest.$ac_ext <<_ACEOF
5250 /* end confdefs.h.  */
5251
5252
5253 int
5254 main ()
5255 {
5256 main ();
5257   ;
5258   return 0;
5259 }
5260 _ACEOF
5261 rm -f conftest.$ac_objext conftest$ac_exeext
5262 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5263   (eval $ac_link) 2>conftest.er1
5264   ac_status=$?
5265   grep -v '^ *+' conftest.er1 >conftest.err
5266   rm -f conftest.er1
5267   cat conftest.err >&5
5268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269   (exit $ac_status); } &&
5270          { ac_try='test -z "$ac_c_werror_flag"
5271                          || test ! -s conftest.err'
5272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5273   (eval $ac_try) 2>&5
5274   ac_status=$?
5275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276   (exit $ac_status); }; } &&
5277          { ac_try='test -s conftest$ac_exeext'
5278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5279   (eval $ac_try) 2>&5
5280   ac_status=$?
5281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5282   (exit $ac_status); }; }; then
5283   ac_cv_lib_IPC_main=yes
5284 else
5285   echo "$as_me: failed program was:" >&5
5286 sed 's/^/| /' conftest.$ac_ext >&5
5287
5288 ac_cv_lib_IPC_main=no
5289 fi
5290 rm -f conftest.err conftest.$ac_objext \
5291       conftest$ac_exeext conftest.$ac_ext
5292 LIBS=$ac_check_lib_save_LIBS
5293 fi
5294 echo "$as_me:$LINENO: result: $ac_cv_lib_IPC_main" >&5
5295 echo "${ECHO_T}$ac_cv_lib_IPC_main" >&6
5296 if test $ac_cv_lib_IPC_main = yes; then
5297   cat >>confdefs.h <<_ACEOF
5298 #define HAVE_LIBIPC 1
5299 _ACEOF
5300
5301   LIBS="-lIPC $LIBS"
5302
5303 fi
5304
5305
5306 echo "$as_me:$LINENO: checking for main in -llc" >&5
5307 echo $ECHO_N "checking for main in -llc... $ECHO_C" >&6
5308 if test "${ac_cv_lib_lc_main+set}" = set; then
5309   echo $ECHO_N "(cached) $ECHO_C" >&6
5310 else
5311   ac_check_lib_save_LIBS=$LIBS
5312 LIBS="-llc  $LIBS"
5313 cat >conftest.$ac_ext <<_ACEOF
5314 /* confdefs.h.  */
5315 _ACEOF
5316 cat confdefs.h >>conftest.$ac_ext
5317 cat >>conftest.$ac_ext <<_ACEOF
5318 /* end confdefs.h.  */
5319
5320
5321 int
5322 main ()
5323 {
5324 main ();
5325   ;
5326   return 0;
5327 }
5328 _ACEOF
5329 rm -f conftest.$ac_objext conftest$ac_exeext
5330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5331   (eval $ac_link) 2>conftest.er1
5332   ac_status=$?
5333   grep -v '^ *+' conftest.er1 >conftest.err
5334   rm -f conftest.er1
5335   cat conftest.err >&5
5336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5337   (exit $ac_status); } &&
5338          { ac_try='test -z "$ac_c_werror_flag"
5339                          || test ! -s conftest.err'
5340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341   (eval $ac_try) 2>&5
5342   ac_status=$?
5343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344   (exit $ac_status); }; } &&
5345          { ac_try='test -s conftest$ac_exeext'
5346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5347   (eval $ac_try) 2>&5
5348   ac_status=$?
5349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350   (exit $ac_status); }; }; then
5351   ac_cv_lib_lc_main=yes
5352 else
5353   echo "$as_me: failed program was:" >&5
5354 sed 's/^/| /' conftest.$ac_ext >&5
5355
5356 ac_cv_lib_lc_main=no
5357 fi
5358 rm -f conftest.err conftest.$ac_objext \
5359       conftest$ac_exeext conftest.$ac_ext
5360 LIBS=$ac_check_lib_save_LIBS
5361 fi
5362 echo "$as_me:$LINENO: result: $ac_cv_lib_lc_main" >&5
5363 echo "${ECHO_T}$ac_cv_lib_lc_main" >&6
5364 if test $ac_cv_lib_lc_main = yes; then
5365   cat >>confdefs.h <<_ACEOF
5366 #define HAVE_LIBLC 1
5367 _ACEOF
5368
5369   LIBS="-llc $LIBS"
5370
5371 fi
5372
5373
5374 echo "$as_me:$LINENO: checking for main in -ldld" >&5
5375 echo $ECHO_N "checking for main in -ldld... $ECHO_C" >&6
5376 if test "${ac_cv_lib_dld_main+set}" = set; then
5377   echo $ECHO_N "(cached) $ECHO_C" >&6
5378 else
5379   ac_check_lib_save_LIBS=$LIBS
5380 LIBS="-ldld  $LIBS"
5381 cat >conftest.$ac_ext <<_ACEOF
5382 /* confdefs.h.  */
5383 _ACEOF
5384 cat confdefs.h >>conftest.$ac_ext
5385 cat >>conftest.$ac_ext <<_ACEOF
5386 /* end confdefs.h.  */
5387
5388
5389 int
5390 main ()
5391 {
5392 main ();
5393   ;
5394   return 0;
5395 }
5396 _ACEOF
5397 rm -f conftest.$ac_objext conftest$ac_exeext
5398 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5399   (eval $ac_link) 2>conftest.er1
5400   ac_status=$?
5401   grep -v '^ *+' conftest.er1 >conftest.err
5402   rm -f conftest.er1
5403   cat conftest.err >&5
5404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405   (exit $ac_status); } &&
5406          { ac_try='test -z "$ac_c_werror_flag"
5407                          || test ! -s conftest.err'
5408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409   (eval $ac_try) 2>&5
5410   ac_status=$?
5411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412   (exit $ac_status); }; } &&
5413          { ac_try='test -s conftest$ac_exeext'
5414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5415   (eval $ac_try) 2>&5
5416   ac_status=$?
5417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418   (exit $ac_status); }; }; then
5419   ac_cv_lib_dld_main=yes
5420 else
5421   echo "$as_me: failed program was:" >&5
5422 sed 's/^/| /' conftest.$ac_ext >&5
5423
5424 ac_cv_lib_dld_main=no
5425 fi
5426 rm -f conftest.err conftest.$ac_objext \
5427       conftest$ac_exeext conftest.$ac_ext
5428 LIBS=$ac_check_lib_save_LIBS
5429 fi
5430 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_main" >&5
5431 echo "${ECHO_T}$ac_cv_lib_dld_main" >&6
5432 if test $ac_cv_lib_dld_main = yes; then
5433   cat >>confdefs.h <<_ACEOF
5434 #define HAVE_LIBDLD 1
5435 _ACEOF
5436
5437   LIBS="-ldld $LIBS"
5438
5439 fi
5440
5441
5442 echo "$as_me:$LINENO: checking for main in -lld" >&5
5443 echo $ECHO_N "checking for main in -lld... $ECHO_C" >&6
5444 if test "${ac_cv_lib_ld_main+set}" = set; then
5445   echo $ECHO_N "(cached) $ECHO_C" >&6
5446 else
5447   ac_check_lib_save_LIBS=$LIBS
5448 LIBS="-lld  $LIBS"
5449 cat >conftest.$ac_ext <<_ACEOF
5450 /* confdefs.h.  */
5451 _ACEOF
5452 cat confdefs.h >>conftest.$ac_ext
5453 cat >>conftest.$ac_ext <<_ACEOF
5454 /* end confdefs.h.  */
5455
5456
5457 int
5458 main ()
5459 {
5460 main ();
5461   ;
5462   return 0;
5463 }
5464 _ACEOF
5465 rm -f conftest.$ac_objext conftest$ac_exeext
5466 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5467   (eval $ac_link) 2>conftest.er1
5468   ac_status=$?
5469   grep -v '^ *+' conftest.er1 >conftest.err
5470   rm -f conftest.er1
5471   cat conftest.err >&5
5472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5473   (exit $ac_status); } &&
5474          { ac_try='test -z "$ac_c_werror_flag"
5475                          || test ! -s conftest.err'
5476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5477   (eval $ac_try) 2>&5
5478   ac_status=$?
5479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5480   (exit $ac_status); }; } &&
5481          { ac_try='test -s conftest$ac_exeext'
5482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5483   (eval $ac_try) 2>&5
5484   ac_status=$?
5485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486   (exit $ac_status); }; }; then
5487   ac_cv_lib_ld_main=yes
5488 else
5489   echo "$as_me: failed program was:" >&5
5490 sed 's/^/| /' conftest.$ac_ext >&5
5491
5492 ac_cv_lib_ld_main=no
5493 fi
5494 rm -f conftest.err conftest.$ac_objext \
5495       conftest$ac_exeext conftest.$ac_ext
5496 LIBS=$ac_check_lib_save_LIBS
5497 fi
5498 echo "$as_me:$LINENO: result: $ac_cv_lib_ld_main" >&5
5499 echo "${ECHO_T}$ac_cv_lib_ld_main" >&6
5500 if test $ac_cv_lib_ld_main = yes; then
5501   cat >>confdefs.h <<_ACEOF
5502 #define HAVE_LIBLD 1
5503 _ACEOF
5504
5505   LIBS="-lld $LIBS"
5506
5507 fi
5508
5509
5510 echo "$as_me:$LINENO: checking for main in -lcompat" >&5
5511 echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
5512 if test "${ac_cv_lib_compat_main+set}" = set; then
5513   echo $ECHO_N "(cached) $ECHO_C" >&6
5514 else
5515   ac_check_lib_save_LIBS=$LIBS
5516 LIBS="-lcompat  $LIBS"
5517 cat >conftest.$ac_ext <<_ACEOF
5518 /* confdefs.h.  */
5519 _ACEOF
5520 cat confdefs.h >>conftest.$ac_ext
5521 cat >>conftest.$ac_ext <<_ACEOF
5522 /* end confdefs.h.  */
5523
5524
5525 int
5526 main ()
5527 {
5528 main ();
5529   ;
5530   return 0;
5531 }
5532 _ACEOF
5533 rm -f conftest.$ac_objext conftest$ac_exeext
5534 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5535   (eval $ac_link) 2>conftest.er1
5536   ac_status=$?
5537   grep -v '^ *+' conftest.er1 >conftest.err
5538   rm -f conftest.er1
5539   cat conftest.err >&5
5540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5541   (exit $ac_status); } &&
5542          { ac_try='test -z "$ac_c_werror_flag"
5543                          || test ! -s conftest.err'
5544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5545   (eval $ac_try) 2>&5
5546   ac_status=$?
5547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548   (exit $ac_status); }; } &&
5549          { ac_try='test -s conftest$ac_exeext'
5550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5551   (eval $ac_try) 2>&5
5552   ac_status=$?
5553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5554   (exit $ac_status); }; }; then
5555   ac_cv_lib_compat_main=yes
5556 else
5557   echo "$as_me: failed program was:" >&5
5558 sed 's/^/| /' conftest.$ac_ext >&5
5559
5560 ac_cv_lib_compat_main=no
5561 fi
5562 rm -f conftest.err conftest.$ac_objext \
5563       conftest$ac_exeext conftest.$ac_ext
5564 LIBS=$ac_check_lib_save_LIBS
5565 fi
5566 echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
5567 echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
5568 if test $ac_cv_lib_compat_main = yes; then
5569   cat >>confdefs.h <<_ACEOF
5570 #define HAVE_LIBCOMPAT 1
5571 _ACEOF
5572
5573   LIBS="-lcompat $LIBS"
5574
5575 fi
5576
5577
5578 echo "$as_me:$LINENO: checking for main in -lBSD" >&5
5579 echo $ECHO_N "checking for main in -lBSD... $ECHO_C" >&6
5580 if test "${ac_cv_lib_BSD_main+set}" = set; then
5581   echo $ECHO_N "(cached) $ECHO_C" >&6
5582 else
5583   ac_check_lib_save_LIBS=$LIBS
5584 LIBS="-lBSD  $LIBS"
5585 cat >conftest.$ac_ext <<_ACEOF
5586 /* confdefs.h.  */
5587 _ACEOF
5588 cat confdefs.h >>conftest.$ac_ext
5589 cat >>conftest.$ac_ext <<_ACEOF
5590 /* end confdefs.h.  */
5591
5592
5593 int
5594 main ()
5595 {
5596 main ();
5597   ;
5598   return 0;
5599 }
5600 _ACEOF
5601 rm -f conftest.$ac_objext conftest$ac_exeext
5602 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5603   (eval $ac_link) 2>conftest.er1
5604   ac_status=$?
5605   grep -v '^ *+' conftest.er1 >conftest.err
5606   rm -f conftest.er1
5607   cat conftest.err >&5
5608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5609   (exit $ac_status); } &&
5610          { ac_try='test -z "$ac_c_werror_flag"
5611                          || test ! -s conftest.err'
5612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5613   (eval $ac_try) 2>&5
5614   ac_status=$?
5615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616   (exit $ac_status); }; } &&
5617          { ac_try='test -s conftest$ac_exeext'
5618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5619   (eval $ac_try) 2>&5
5620   ac_status=$?
5621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622   (exit $ac_status); }; }; then
5623   ac_cv_lib_BSD_main=yes
5624 else
5625   echo "$as_me: failed program was:" >&5
5626 sed 's/^/| /' conftest.$ac_ext >&5
5627
5628 ac_cv_lib_BSD_main=no
5629 fi
5630 rm -f conftest.err conftest.$ac_objext \
5631       conftest$ac_exeext conftest.$ac_ext
5632 LIBS=$ac_check_lib_save_LIBS
5633 fi
5634 echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_main" >&5
5635 echo "${ECHO_T}$ac_cv_lib_BSD_main" >&6
5636 if test $ac_cv_lib_BSD_main = yes; then
5637   cat >>confdefs.h <<_ACEOF
5638 #define HAVE_LIBBSD 1
5639 _ACEOF
5640
5641   LIBS="-lBSD $LIBS"
5642
5643 fi
5644
5645
5646 echo "$as_me:$LINENO: checking for main in -lgen" >&5
5647 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
5648 if test "${ac_cv_lib_gen_main+set}" = set; then
5649   echo $ECHO_N "(cached) $ECHO_C" >&6
5650 else
5651   ac_check_lib_save_LIBS=$LIBS
5652 LIBS="-lgen  $LIBS"
5653 cat >conftest.$ac_ext <<_ACEOF
5654 /* confdefs.h.  */
5655 _ACEOF
5656 cat confdefs.h >>conftest.$ac_ext
5657 cat >>conftest.$ac_ext <<_ACEOF
5658 /* end confdefs.h.  */
5659
5660
5661 int
5662 main ()
5663 {
5664 main ();
5665   ;
5666   return 0;
5667 }
5668 _ACEOF
5669 rm -f conftest.$ac_objext conftest$ac_exeext
5670 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5671   (eval $ac_link) 2>conftest.er1
5672   ac_status=$?
5673   grep -v '^ *+' conftest.er1 >conftest.err
5674   rm -f conftest.er1
5675   cat conftest.err >&5
5676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -z "$ac_c_werror_flag"
5679                          || test ! -s conftest.err'
5680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681   (eval $ac_try) 2>&5
5682   ac_status=$?
5683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684   (exit $ac_status); }; } &&
5685          { ac_try='test -s conftest$ac_exeext'
5686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5687   (eval $ac_try) 2>&5
5688   ac_status=$?
5689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690   (exit $ac_status); }; }; then
5691   ac_cv_lib_gen_main=yes
5692 else
5693   echo "$as_me: failed program was:" >&5
5694 sed 's/^/| /' conftest.$ac_ext >&5
5695
5696 ac_cv_lib_gen_main=no
5697 fi
5698 rm -f conftest.err conftest.$ac_objext \
5699       conftest$ac_exeext conftest.$ac_ext
5700 LIBS=$ac_check_lib_save_LIBS
5701 fi
5702 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
5703 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
5704 if test $ac_cv_lib_gen_main = yes; then
5705   cat >>confdefs.h <<_ACEOF
5706 #define HAVE_LIBGEN 1
5707 _ACEOF
5708
5709   LIBS="-lgen $LIBS"
5710
5711 fi
5712
5713
5714 echo "$as_me:$LINENO: checking for main in -lPW" >&5
5715 echo $ECHO_N "checking for main in -lPW... $ECHO_C" >&6
5716 if test "${ac_cv_lib_PW_main+set}" = set; then
5717   echo $ECHO_N "(cached) $ECHO_C" >&6
5718 else
5719   ac_check_lib_save_LIBS=$LIBS
5720 LIBS="-lPW  $LIBS"
5721 cat >conftest.$ac_ext <<_ACEOF
5722 /* confdefs.h.  */
5723 _ACEOF
5724 cat confdefs.h >>conftest.$ac_ext
5725 cat >>conftest.$ac_ext <<_ACEOF
5726 /* end confdefs.h.  */
5727
5728
5729 int
5730 main ()
5731 {
5732 main ();
5733   ;
5734   return 0;
5735 }
5736 _ACEOF
5737 rm -f conftest.$ac_objext conftest$ac_exeext
5738 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5739   (eval $ac_link) 2>conftest.er1
5740   ac_status=$?
5741   grep -v '^ *+' conftest.er1 >conftest.err
5742   rm -f conftest.er1
5743   cat conftest.err >&5
5744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745   (exit $ac_status); } &&
5746          { ac_try='test -z "$ac_c_werror_flag"
5747                          || test ! -s conftest.err'
5748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5749   (eval $ac_try) 2>&5
5750   ac_status=$?
5751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5752   (exit $ac_status); }; } &&
5753          { ac_try='test -s conftest$ac_exeext'
5754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5755   (eval $ac_try) 2>&5
5756   ac_status=$?
5757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758   (exit $ac_status); }; }; then
5759   ac_cv_lib_PW_main=yes
5760 else
5761   echo "$as_me: failed program was:" >&5
5762 sed 's/^/| /' conftest.$ac_ext >&5
5763
5764 ac_cv_lib_PW_main=no
5765 fi
5766 rm -f conftest.err conftest.$ac_objext \
5767       conftest$ac_exeext conftest.$ac_ext
5768 LIBS=$ac_check_lib_save_LIBS
5769 fi
5770 echo "$as_me:$LINENO: result: $ac_cv_lib_PW_main" >&5
5771 echo "${ECHO_T}$ac_cv_lib_PW_main" >&6
5772 if test $ac_cv_lib_PW_main = yes; then
5773   cat >>confdefs.h <<_ACEOF
5774 #define HAVE_LIBPW 1
5775 _ACEOF
5776
5777   LIBS="-lPW $LIBS"
5778
5779 fi
5780
5781
5782 echo "$as_me:$LINENO: checking for main in -lresolv" >&5
5783 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
5784 if test "${ac_cv_lib_resolv_main+set}" = set; then
5785   echo $ECHO_N "(cached) $ECHO_C" >&6
5786 else
5787   ac_check_lib_save_LIBS=$LIBS
5788 LIBS="-lresolv  $LIBS"
5789 cat >conftest.$ac_ext <<_ACEOF
5790 /* confdefs.h.  */
5791 _ACEOF
5792 cat confdefs.h >>conftest.$ac_ext
5793 cat >>conftest.$ac_ext <<_ACEOF
5794 /* end confdefs.h.  */
5795
5796
5797 int
5798 main ()
5799 {
5800 main ();
5801   ;
5802   return 0;
5803 }
5804 _ACEOF
5805 rm -f conftest.$ac_objext conftest$ac_exeext
5806 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5807   (eval $ac_link) 2>conftest.er1
5808   ac_status=$?
5809   grep -v '^ *+' conftest.er1 >conftest.err
5810   rm -f conftest.er1
5811   cat conftest.err >&5
5812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5813   (exit $ac_status); } &&
5814          { ac_try='test -z "$ac_c_werror_flag"
5815                          || test ! -s conftest.err'
5816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5817   (eval $ac_try) 2>&5
5818   ac_status=$?
5819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820   (exit $ac_status); }; } &&
5821          { ac_try='test -s conftest$ac_exeext'
5822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5823   (eval $ac_try) 2>&5
5824   ac_status=$?
5825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826   (exit $ac_status); }; }; then
5827   ac_cv_lib_resolv_main=yes
5828 else
5829   echo "$as_me: failed program was:" >&5
5830 sed 's/^/| /' conftest.$ac_ext >&5
5831
5832 ac_cv_lib_resolv_main=no
5833 fi
5834 rm -f conftest.err conftest.$ac_objext \
5835       conftest$ac_exeext conftest.$ac_ext
5836 LIBS=$ac_check_lib_save_LIBS
5837 fi
5838 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
5839 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
5840 if test $ac_cv_lib_resolv_main = yes; then
5841   cat >>confdefs.h <<_ACEOF
5842 #define HAVE_LIBRESOLV 1
5843 _ACEOF
5844
5845   LIBS="-lresolv $LIBS"
5846
5847 fi
5848
5849 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5850 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5851 if test "${ac_cv_search_getopt_long+set}" = set; then
5852   echo $ECHO_N "(cached) $ECHO_C" >&6
5853 else
5854   ac_func_search_save_LIBS=$LIBS
5855 ac_cv_search_getopt_long=no
5856 cat >conftest.$ac_ext <<_ACEOF
5857 /* confdefs.h.  */
5858 _ACEOF
5859 cat confdefs.h >>conftest.$ac_ext
5860 cat >>conftest.$ac_ext <<_ACEOF
5861 /* end confdefs.h.  */
5862
5863 /* Override any gcc2 internal prototype to avoid an error.  */
5864 #ifdef __cplusplus
5865 extern "C"
5866 #endif
5867 /* We use char because int might match the return type of a gcc2
5868    builtin and then its argument prototype would still apply.  */
5869 char getopt_long ();
5870 int
5871 main ()
5872 {
5873 getopt_long ();
5874   ;
5875   return 0;
5876 }
5877 _ACEOF
5878 rm -f conftest.$ac_objext conftest$ac_exeext
5879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5880   (eval $ac_link) 2>conftest.er1
5881   ac_status=$?
5882   grep -v '^ *+' conftest.er1 >conftest.err
5883   rm -f conftest.er1
5884   cat conftest.err >&5
5885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886   (exit $ac_status); } &&
5887          { ac_try='test -z "$ac_c_werror_flag"
5888                          || test ! -s conftest.err'
5889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5890   (eval $ac_try) 2>&5
5891   ac_status=$?
5892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5893   (exit $ac_status); }; } &&
5894          { ac_try='test -s conftest$ac_exeext'
5895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5896   (eval $ac_try) 2>&5
5897   ac_status=$?
5898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899   (exit $ac_status); }; }; then
5900   ac_cv_search_getopt_long="none required"
5901 else
5902   echo "$as_me: failed program was:" >&5
5903 sed 's/^/| /' conftest.$ac_ext >&5
5904
5905 fi
5906 rm -f conftest.err conftest.$ac_objext \
5907       conftest$ac_exeext conftest.$ac_ext
5908 if test "$ac_cv_search_getopt_long" = no; then
5909   for ac_lib in getopt gnugetopt; do
5910     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5911     cat >conftest.$ac_ext <<_ACEOF
5912 /* confdefs.h.  */
5913 _ACEOF
5914 cat confdefs.h >>conftest.$ac_ext
5915 cat >>conftest.$ac_ext <<_ACEOF
5916 /* end confdefs.h.  */
5917
5918 /* Override any gcc2 internal prototype to avoid an error.  */
5919 #ifdef __cplusplus
5920 extern "C"
5921 #endif
5922 /* We use char because int might match the return type of a gcc2
5923    builtin and then its argument prototype would still apply.  */
5924 char getopt_long ();
5925 int
5926 main ()
5927 {
5928 getopt_long ();
5929   ;
5930   return 0;
5931 }
5932 _ACEOF
5933 rm -f conftest.$ac_objext conftest$ac_exeext
5934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5935   (eval $ac_link) 2>conftest.er1
5936   ac_status=$?
5937   grep -v '^ *+' conftest.er1 >conftest.err
5938   rm -f conftest.er1
5939   cat conftest.err >&5
5940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941   (exit $ac_status); } &&
5942          { ac_try='test -z "$ac_c_werror_flag"
5943                          || test ! -s conftest.err'
5944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5945   (eval $ac_try) 2>&5
5946   ac_status=$?
5947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5948   (exit $ac_status); }; } &&
5949          { ac_try='test -s conftest$ac_exeext'
5950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5951   (eval $ac_try) 2>&5
5952   ac_status=$?
5953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5954   (exit $ac_status); }; }; then
5955   ac_cv_search_getopt_long="-l$ac_lib"
5956 break
5957 else
5958   echo "$as_me: failed program was:" >&5
5959 sed 's/^/| /' conftest.$ac_ext >&5
5960
5961 fi
5962 rm -f conftest.err conftest.$ac_objext \
5963       conftest$ac_exeext conftest.$ac_ext
5964   done
5965 fi
5966 LIBS=$ac_func_search_save_LIBS
5967 fi
5968 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5969 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5970 if test "$ac_cv_search_getopt_long" != no; then
5971   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5972
5973 fi
5974
5975 # QNX:
5976
5977 echo "$as_me:$LINENO: checking for main in -lunix" >&5
5978 echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
5979 if test "${ac_cv_lib_unix_main+set}" = set; then
5980   echo $ECHO_N "(cached) $ECHO_C" >&6
5981 else
5982   ac_check_lib_save_LIBS=$LIBS
5983 LIBS="-lunix  $LIBS"
5984 cat >conftest.$ac_ext <<_ACEOF
5985 /* confdefs.h.  */
5986 _ACEOF
5987 cat confdefs.h >>conftest.$ac_ext
5988 cat >>conftest.$ac_ext <<_ACEOF
5989 /* end confdefs.h.  */
5990
5991
5992 int
5993 main ()
5994 {
5995 main ();
5996   ;
5997   return 0;
5998 }
5999 _ACEOF
6000 rm -f conftest.$ac_objext conftest$ac_exeext
6001 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6002   (eval $ac_link) 2>conftest.er1
6003   ac_status=$?
6004   grep -v '^ *+' conftest.er1 >conftest.err
6005   rm -f conftest.er1
6006   cat conftest.err >&5
6007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008   (exit $ac_status); } &&
6009          { ac_try='test -z "$ac_c_werror_flag"
6010                          || test ! -s conftest.err'
6011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6012   (eval $ac_try) 2>&5
6013   ac_status=$?
6014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6015   (exit $ac_status); }; } &&
6016          { ac_try='test -s conftest$ac_exeext'
6017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6018   (eval $ac_try) 2>&5
6019   ac_status=$?
6020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021   (exit $ac_status); }; }; then
6022   ac_cv_lib_unix_main=yes
6023 else
6024   echo "$as_me: failed program was:" >&5
6025 sed 's/^/| /' conftest.$ac_ext >&5
6026
6027 ac_cv_lib_unix_main=no
6028 fi
6029 rm -f conftest.err conftest.$ac_objext \
6030       conftest$ac_exeext conftest.$ac_ext
6031 LIBS=$ac_check_lib_save_LIBS
6032 fi
6033 echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
6034 echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
6035 if test $ac_cv_lib_unix_main = yes; then
6036   cat >>confdefs.h <<_ACEOF
6037 #define HAVE_LIBUNIX 1
6038 _ACEOF
6039
6040   LIBS="-lunix $LIBS"
6041
6042 fi
6043
6044 echo "$as_me:$LINENO: checking for library containing crypt" >&5
6045 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
6046 if test "${ac_cv_search_crypt+set}" = set; then
6047   echo $ECHO_N "(cached) $ECHO_C" >&6
6048 else
6049   ac_func_search_save_LIBS=$LIBS
6050 ac_cv_search_crypt=no
6051 cat >conftest.$ac_ext <<_ACEOF
6052 /* confdefs.h.  */
6053 _ACEOF
6054 cat confdefs.h >>conftest.$ac_ext
6055 cat >>conftest.$ac_ext <<_ACEOF
6056 /* end confdefs.h.  */
6057
6058 /* Override any gcc2 internal prototype to avoid an error.  */
6059 #ifdef __cplusplus
6060 extern "C"
6061 #endif
6062 /* We use char because int might match the return type of a gcc2
6063    builtin and then its argument prototype would still apply.  */
6064 char crypt ();
6065 int
6066 main ()
6067 {
6068 crypt ();
6069   ;
6070   return 0;
6071 }
6072 _ACEOF
6073 rm -f conftest.$ac_objext conftest$ac_exeext
6074 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6075   (eval $ac_link) 2>conftest.er1
6076   ac_status=$?
6077   grep -v '^ *+' conftest.er1 >conftest.err
6078   rm -f conftest.er1
6079   cat conftest.err >&5
6080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6081   (exit $ac_status); } &&
6082          { ac_try='test -z "$ac_c_werror_flag"
6083                          || test ! -s conftest.err'
6084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6085   (eval $ac_try) 2>&5
6086   ac_status=$?
6087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088   (exit $ac_status); }; } &&
6089          { ac_try='test -s conftest$ac_exeext'
6090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091   (eval $ac_try) 2>&5
6092   ac_status=$?
6093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094   (exit $ac_status); }; }; then
6095   ac_cv_search_crypt="none required"
6096 else
6097   echo "$as_me: failed program was:" >&5
6098 sed 's/^/| /' conftest.$ac_ext >&5
6099
6100 fi
6101 rm -f conftest.err conftest.$ac_objext \
6102       conftest$ac_exeext conftest.$ac_ext
6103 if test "$ac_cv_search_crypt" = no; then
6104   for ac_lib in crypt; do
6105     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6106     cat >conftest.$ac_ext <<_ACEOF
6107 /* confdefs.h.  */
6108 _ACEOF
6109 cat confdefs.h >>conftest.$ac_ext
6110 cat >>conftest.$ac_ext <<_ACEOF
6111 /* end confdefs.h.  */
6112
6113 /* Override any gcc2 internal prototype to avoid an error.  */
6114 #ifdef __cplusplus
6115 extern "C"
6116 #endif
6117 /* We use char because int might match the return type of a gcc2
6118    builtin and then its argument prototype would still apply.  */
6119 char crypt ();
6120 int
6121 main ()
6122 {
6123 crypt ();
6124   ;
6125   return 0;
6126 }
6127 _ACEOF
6128 rm -f conftest.$ac_objext conftest$ac_exeext
6129 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6130   (eval $ac_link) 2>conftest.er1
6131   ac_status=$?
6132   grep -v '^ *+' conftest.er1 >conftest.err
6133   rm -f conftest.er1
6134   cat conftest.err >&5
6135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6136   (exit $ac_status); } &&
6137          { ac_try='test -z "$ac_c_werror_flag"
6138                          || test ! -s conftest.err'
6139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6143   (exit $ac_status); }; } &&
6144          { ac_try='test -s conftest$ac_exeext'
6145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6146   (eval $ac_try) 2>&5
6147   ac_status=$?
6148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6149   (exit $ac_status); }; }; then
6150   ac_cv_search_crypt="-l$ac_lib"
6151 break
6152 else
6153   echo "$as_me: failed program was:" >&5
6154 sed 's/^/| /' conftest.$ac_ext >&5
6155
6156 fi
6157 rm -f conftest.err conftest.$ac_objext \
6158       conftest$ac_exeext conftest.$ac_ext
6159   done
6160 fi
6161 LIBS=$ac_func_search_save_LIBS
6162 fi
6163 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6164 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6165 if test "$ac_cv_search_crypt" != no; then
6166   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6167
6168 fi
6169
6170 # BeOS:
6171 if test "$PORTNAME" = "beos"
6172 then
6173
6174 echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
6175 echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
6176 if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
6177   echo $ECHO_N "(cached) $ECHO_C" >&6
6178 else
6179   ac_check_lib_save_LIBS=$LIBS
6180 LIBS="-lbind  $LIBS"
6181 cat >conftest.$ac_ext <<_ACEOF
6182 /* confdefs.h.  */
6183 _ACEOF
6184 cat confdefs.h >>conftest.$ac_ext
6185 cat >>conftest.$ac_ext <<_ACEOF
6186 /* end confdefs.h.  */
6187
6188 /* Override any gcc2 internal prototype to avoid an error.  */
6189 #ifdef __cplusplus
6190 extern "C"
6191 #endif
6192 /* We use char because int might match the return type of a gcc2
6193    builtin and then its argument prototype would still apply.  */
6194 char __inet_ntoa ();
6195 int
6196 main ()
6197 {
6198 __inet_ntoa ();
6199   ;
6200   return 0;
6201 }
6202 _ACEOF
6203 rm -f conftest.$ac_objext conftest$ac_exeext
6204 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6205   (eval $ac_link) 2>conftest.er1
6206   ac_status=$?
6207   grep -v '^ *+' conftest.er1 >conftest.err
6208   rm -f conftest.er1
6209   cat conftest.err >&5
6210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6211   (exit $ac_status); } &&
6212          { ac_try='test -z "$ac_c_werror_flag"
6213                          || test ! -s conftest.err'
6214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6215   (eval $ac_try) 2>&5
6216   ac_status=$?
6217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6218   (exit $ac_status); }; } &&
6219          { ac_try='test -s conftest$ac_exeext'
6220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6221   (eval $ac_try) 2>&5
6222   ac_status=$?
6223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224   (exit $ac_status); }; }; then
6225   ac_cv_lib_bind___inet_ntoa=yes
6226 else
6227   echo "$as_me: failed program was:" >&5
6228 sed 's/^/| /' conftest.$ac_ext >&5
6229
6230 ac_cv_lib_bind___inet_ntoa=no
6231 fi
6232 rm -f conftest.err conftest.$ac_objext \
6233       conftest$ac_exeext conftest.$ac_ext
6234 LIBS=$ac_check_lib_save_LIBS
6235 fi
6236 echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
6237 echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
6238 if test $ac_cv_lib_bind___inet_ntoa = yes; then
6239   cat >>confdefs.h <<_ACEOF
6240 #define HAVE_LIBBIND 1
6241 _ACEOF
6242
6243   LIBS="-lbind $LIBS"
6244
6245 fi
6246
6247 fi
6248 # Solaris:
6249 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6250 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6251 if test "${ac_cv_search_fdatasync+set}" = set; then
6252   echo $ECHO_N "(cached) $ECHO_C" >&6
6253 else
6254   ac_func_search_save_LIBS=$LIBS
6255 ac_cv_search_fdatasync=no
6256 cat >conftest.$ac_ext <<_ACEOF
6257 /* confdefs.h.  */
6258 _ACEOF
6259 cat confdefs.h >>conftest.$ac_ext
6260 cat >>conftest.$ac_ext <<_ACEOF
6261 /* end confdefs.h.  */
6262
6263 /* Override any gcc2 internal prototype to avoid an error.  */
6264 #ifdef __cplusplus
6265 extern "C"
6266 #endif
6267 /* We use char because int might match the return type of a gcc2
6268    builtin and then its argument prototype would still apply.  */
6269 char fdatasync ();
6270 int
6271 main ()
6272 {
6273 fdatasync ();
6274   ;
6275   return 0;
6276 }
6277 _ACEOF
6278 rm -f conftest.$ac_objext conftest$ac_exeext
6279 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6280   (eval $ac_link) 2>conftest.er1
6281   ac_status=$?
6282   grep -v '^ *+' conftest.er1 >conftest.err
6283   rm -f conftest.er1
6284   cat conftest.err >&5
6285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6286   (exit $ac_status); } &&
6287          { ac_try='test -z "$ac_c_werror_flag"
6288                          || test ! -s conftest.err'
6289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6290   (eval $ac_try) 2>&5
6291   ac_status=$?
6292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293   (exit $ac_status); }; } &&
6294          { ac_try='test -s conftest$ac_exeext'
6295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6296   (eval $ac_try) 2>&5
6297   ac_status=$?
6298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299   (exit $ac_status); }; }; then
6300   ac_cv_search_fdatasync="none required"
6301 else
6302   echo "$as_me: failed program was:" >&5
6303 sed 's/^/| /' conftest.$ac_ext >&5
6304
6305 fi
6306 rm -f conftest.err conftest.$ac_objext \
6307       conftest$ac_exeext conftest.$ac_ext
6308 if test "$ac_cv_search_fdatasync" = no; then
6309   for ac_lib in rt posix4; do
6310     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6311     cat >conftest.$ac_ext <<_ACEOF
6312 /* confdefs.h.  */
6313 _ACEOF
6314 cat confdefs.h >>conftest.$ac_ext
6315 cat >>conftest.$ac_ext <<_ACEOF
6316 /* end confdefs.h.  */
6317
6318 /* Override any gcc2 internal prototype to avoid an error.  */
6319 #ifdef __cplusplus
6320 extern "C"
6321 #endif
6322 /* We use char because int might match the return type of a gcc2
6323    builtin and then its argument prototype would still apply.  */
6324 char fdatasync ();
6325 int
6326 main ()
6327 {
6328 fdatasync ();
6329   ;
6330   return 0;
6331 }
6332 _ACEOF
6333 rm -f conftest.$ac_objext conftest$ac_exeext
6334 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6335   (eval $ac_link) 2>conftest.er1
6336   ac_status=$?
6337   grep -v '^ *+' conftest.er1 >conftest.err
6338   rm -f conftest.er1
6339   cat conftest.err >&5
6340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341   (exit $ac_status); } &&
6342          { ac_try='test -z "$ac_c_werror_flag"
6343                          || test ! -s conftest.err'
6344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6345   (eval $ac_try) 2>&5
6346   ac_status=$?
6347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6348   (exit $ac_status); }; } &&
6349          { ac_try='test -s conftest$ac_exeext'
6350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6351   (eval $ac_try) 2>&5
6352   ac_status=$?
6353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354   (exit $ac_status); }; }; then
6355   ac_cv_search_fdatasync="-l$ac_lib"
6356 break
6357 else
6358   echo "$as_me: failed program was:" >&5
6359 sed 's/^/| /' conftest.$ac_ext >&5
6360
6361 fi
6362 rm -f conftest.err conftest.$ac_objext \
6363       conftest$ac_exeext conftest.$ac_ext
6364   done
6365 fi
6366 LIBS=$ac_func_search_save_LIBS
6367 fi
6368 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6369 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6370 if test "$ac_cv_search_fdatasync" != no; then
6371   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6372
6373 fi
6374
6375 # Cygwin:
6376
6377 echo "$as_me:$LINENO: checking for shmget in -lcygipc" >&5
6378 echo $ECHO_N "checking for shmget in -lcygipc... $ECHO_C" >&6
6379 if test "${ac_cv_lib_cygipc_shmget+set}" = set; then
6380   echo $ECHO_N "(cached) $ECHO_C" >&6
6381 else
6382   ac_check_lib_save_LIBS=$LIBS
6383 LIBS="-lcygipc  $LIBS"
6384 cat >conftest.$ac_ext <<_ACEOF
6385 /* confdefs.h.  */
6386 _ACEOF
6387 cat confdefs.h >>conftest.$ac_ext
6388 cat >>conftest.$ac_ext <<_ACEOF
6389 /* end confdefs.h.  */
6390
6391 /* Override any gcc2 internal prototype to avoid an error.  */
6392 #ifdef __cplusplus
6393 extern "C"
6394 #endif
6395 /* We use char because int might match the return type of a gcc2
6396    builtin and then its argument prototype would still apply.  */
6397 char shmget ();
6398 int
6399 main ()
6400 {
6401 shmget ();
6402   ;
6403   return 0;
6404 }
6405 _ACEOF
6406 rm -f conftest.$ac_objext conftest$ac_exeext
6407 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6408   (eval $ac_link) 2>conftest.er1
6409   ac_status=$?
6410   grep -v '^ *+' conftest.er1 >conftest.err
6411   rm -f conftest.er1
6412   cat conftest.err >&5
6413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6414   (exit $ac_status); } &&
6415          { ac_try='test -z "$ac_c_werror_flag"
6416                          || test ! -s conftest.err'
6417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6418   (eval $ac_try) 2>&5
6419   ac_status=$?
6420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6421   (exit $ac_status); }; } &&
6422          { ac_try='test -s conftest$ac_exeext'
6423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6424   (eval $ac_try) 2>&5
6425   ac_status=$?
6426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6427   (exit $ac_status); }; }; then
6428   ac_cv_lib_cygipc_shmget=yes
6429 else
6430   echo "$as_me: failed program was:" >&5
6431 sed 's/^/| /' conftest.$ac_ext >&5
6432
6433 ac_cv_lib_cygipc_shmget=no
6434 fi
6435 rm -f conftest.err conftest.$ac_objext \
6436       conftest$ac_exeext conftest.$ac_ext
6437 LIBS=$ac_check_lib_save_LIBS
6438 fi
6439 echo "$as_me:$LINENO: result: $ac_cv_lib_cygipc_shmget" >&5
6440 echo "${ECHO_T}$ac_cv_lib_cygipc_shmget" >&6
6441 if test $ac_cv_lib_cygipc_shmget = yes; then
6442   cat >>confdefs.h <<_ACEOF
6443 #define HAVE_LIBCYGIPC 1
6444 _ACEOF
6445
6446   LIBS="-lcygipc $LIBS"
6447
6448 fi
6449
6450 # WIN32:
6451 if test "$PORTNAME" = "win32"
6452 then
6453
6454 echo "$as_me:$LINENO: checking for main in -lwsock32" >&5
6455 echo $ECHO_N "checking for main in -lwsock32... $ECHO_C" >&6
6456 if test "${ac_cv_lib_wsock32_main+set}" = set; then
6457   echo $ECHO_N "(cached) $ECHO_C" >&6
6458 else
6459   ac_check_lib_save_LIBS=$LIBS
6460 LIBS="-lwsock32  $LIBS"
6461 cat >conftest.$ac_ext <<_ACEOF
6462 /* confdefs.h.  */
6463 _ACEOF
6464 cat confdefs.h >>conftest.$ac_ext
6465 cat >>conftest.$ac_ext <<_ACEOF
6466 /* end confdefs.h.  */
6467
6468
6469 int
6470 main ()
6471 {
6472 main ();
6473   ;
6474   return 0;
6475 }
6476 _ACEOF
6477 rm -f conftest.$ac_objext conftest$ac_exeext
6478 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6479   (eval $ac_link) 2>conftest.er1
6480   ac_status=$?
6481   grep -v '^ *+' conftest.er1 >conftest.err
6482   rm -f conftest.er1
6483   cat conftest.err >&5
6484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6485   (exit $ac_status); } &&
6486          { ac_try='test -z "$ac_c_werror_flag"
6487                          || test ! -s conftest.err'
6488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6489   (eval $ac_try) 2>&5
6490   ac_status=$?
6491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6492   (exit $ac_status); }; } &&
6493          { ac_try='test -s conftest$ac_exeext'
6494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6495   (eval $ac_try) 2>&5
6496   ac_status=$?
6497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6498   (exit $ac_status); }; }; then
6499   ac_cv_lib_wsock32_main=yes
6500 else
6501   echo "$as_me: failed program was:" >&5
6502 sed 's/^/| /' conftest.$ac_ext >&5
6503
6504 ac_cv_lib_wsock32_main=no
6505 fi
6506 rm -f conftest.err conftest.$ac_objext \
6507       conftest$ac_exeext conftest.$ac_ext
6508 LIBS=$ac_check_lib_save_LIBS
6509 fi
6510 echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_main" >&5
6511 echo "${ECHO_T}$ac_cv_lib_wsock32_main" >&6
6512 if test $ac_cv_lib_wsock32_main = yes; then
6513   cat >>confdefs.h <<_ACEOF
6514 #define HAVE_LIBWSOCK32 1
6515 _ACEOF
6516
6517   LIBS="-lwsock32 $LIBS"
6518
6519 fi
6520
6521 fi
6522
6523 if test "$with_readline" = yes; then
6524
6525
6526 if test "${pgac_cv_check_readline+set}" = set; then
6527   echo $ECHO_N "(cached) $ECHO_C" >&6
6528 else
6529   pgac_cv_check_readline=no
6530 pgac_save_LIBS=$LIBS
6531 if test x"$with_libedit_preferred" != x"yes"
6532 then    READLINE_ORDER="-lreadline -ledit"
6533 else    READLINE_ORDER="-ledit -lreadline"
6534 fi
6535 for pgac_rllib in $READLINE_ORDER ; do
6536   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6537 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6538   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6539     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6540     cat >conftest.$ac_ext <<_ACEOF
6541 /* confdefs.h.  */
6542 _ACEOF
6543 cat confdefs.h >>conftest.$ac_ext
6544 cat >>conftest.$ac_ext <<_ACEOF
6545 /* end confdefs.h.  */
6546
6547 /* Override any gcc2 internal prototype to avoid an error.  */
6548 #ifdef __cplusplus
6549 extern "C"
6550 #endif
6551 /* We use char because int might match the return type of a gcc2
6552    builtin and then its argument prototype would still apply.  */
6553 char readline ();
6554 int
6555 main ()
6556 {
6557 readline ();
6558   ;
6559   return 0;
6560 }
6561 _ACEOF
6562 rm -f conftest.$ac_objext conftest$ac_exeext
6563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6564   (eval $ac_link) 2>conftest.er1
6565   ac_status=$?
6566   grep -v '^ *+' conftest.er1 >conftest.err
6567   rm -f conftest.er1
6568   cat conftest.err >&5
6569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6570   (exit $ac_status); } &&
6571          { ac_try='test -z "$ac_c_werror_flag"
6572                          || test ! -s conftest.err'
6573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6574   (eval $ac_try) 2>&5
6575   ac_status=$?
6576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577   (exit $ac_status); }; } &&
6578          { ac_try='test -s conftest$ac_exeext'
6579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6580   (eval $ac_try) 2>&5
6581   ac_status=$?
6582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583   (exit $ac_status); }; }; then
6584
6585       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6586       # recognize dependent libraries; assume curses is needed if we didn't
6587       # find any dependency.
6588       case $host_os in
6589         netbsd* | openbsd* | irix*)
6590           if test x"$pgac_lib" = x"" ; then
6591             pgac_lib=" -lcurses"
6592           fi ;;
6593       esac
6594
6595       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6596       break
6597
6598 else
6599   echo "$as_me: failed program was:" >&5
6600 sed 's/^/| /' conftest.$ac_ext >&5
6601
6602 fi
6603 rm -f conftest.err conftest.$ac_objext \
6604       conftest$ac_exeext conftest.$ac_ext
6605   done
6606   if test "$pgac_cv_check_readline" != no ; then
6607     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6608 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6609     break
6610   else
6611     echo "$as_me:$LINENO: result: no" >&5
6612 echo "${ECHO_T}no" >&6
6613   fi
6614 done
6615 LIBS=$pgac_save_LIBS
6616
6617 fi
6618
6619 if test "$pgac_cv_check_readline" != no ; then
6620   LIBS="$pgac_cv_check_readline $LIBS"
6621
6622 cat >>confdefs.h <<\_ACEOF
6623 #define HAVE_LIBREADLINE 1
6624 _ACEOF
6625
6626 fi
6627
6628
6629   if test x"$pgac_cv_check_readline" = x"no"; then
6630     { { echo "$as_me:$LINENO: error: readline library not found
6631 If you have readline already installed, see config.log for details on the
6632 failure.  It is possible the compiler isn't looking in the proper directory.
6633 Use --without-readline to disable readline support." >&5
6634 echo "$as_me: error: readline library not found
6635 If you have readline already installed, see config.log for details on the
6636 failure.  It is possible the compiler isn't looking in the proper directory.
6637 Use --without-readline to disable readline support." >&2;}
6638    { (exit 1); exit 1; }; }
6639   fi
6640 fi
6641
6642 if test "$with_zlib" = yes; then
6643
6644 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6645 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6646 if test "${ac_cv_lib_z_inflate+set}" = set; then
6647   echo $ECHO_N "(cached) $ECHO_C" >&6
6648 else
6649   ac_check_lib_save_LIBS=$LIBS
6650 LIBS="-lz  $LIBS"
6651 cat >conftest.$ac_ext <<_ACEOF
6652 /* confdefs.h.  */
6653 _ACEOF
6654 cat confdefs.h >>conftest.$ac_ext
6655 cat >>conftest.$ac_ext <<_ACEOF
6656 /* end confdefs.h.  */
6657
6658 /* Override any gcc2 internal prototype to avoid an error.  */
6659 #ifdef __cplusplus
6660 extern "C"
6661 #endif
6662 /* We use char because int might match the return type of a gcc2
6663    builtin and then its argument prototype would still apply.  */
6664 char inflate ();
6665 int
6666 main ()
6667 {
6668 inflate ();
6669   ;
6670   return 0;
6671 }
6672 _ACEOF
6673 rm -f conftest.$ac_objext conftest$ac_exeext
6674 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6675   (eval $ac_link) 2>conftest.er1
6676   ac_status=$?
6677   grep -v '^ *+' conftest.er1 >conftest.err
6678   rm -f conftest.er1
6679   cat conftest.err >&5
6680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681   (exit $ac_status); } &&
6682          { ac_try='test -z "$ac_c_werror_flag"
6683                          || test ! -s conftest.err'
6684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6685   (eval $ac_try) 2>&5
6686   ac_status=$?
6687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688   (exit $ac_status); }; } &&
6689          { ac_try='test -s conftest$ac_exeext'
6690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6691   (eval $ac_try) 2>&5
6692   ac_status=$?
6693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6694   (exit $ac_status); }; }; then
6695   ac_cv_lib_z_inflate=yes
6696 else
6697   echo "$as_me: failed program was:" >&5
6698 sed 's/^/| /' conftest.$ac_ext >&5
6699
6700 ac_cv_lib_z_inflate=no
6701 fi
6702 rm -f conftest.err conftest.$ac_objext \
6703       conftest$ac_exeext conftest.$ac_ext
6704 LIBS=$ac_check_lib_save_LIBS
6705 fi
6706 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6707 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6708 if test $ac_cv_lib_z_inflate = yes; then
6709   cat >>confdefs.h <<_ACEOF
6710 #define HAVE_LIBZ 1
6711 _ACEOF
6712
6713   LIBS="-lz $LIBS"
6714
6715 else
6716   { { echo "$as_me:$LINENO: error: zlib library not found
6717 If you have zlib already installed, see config.log for details on the
6718 failure.  It is possible the compiler isn't looking in the proper directory.
6719 Use --without-zlib to disable zlib support." >&5
6720 echo "$as_me: error: zlib library not found
6721 If you have zlib already installed, see config.log for details on the
6722 failure.  It is possible the compiler isn't looking in the proper directory.
6723 Use --without-zlib to disable zlib support." >&2;}
6724    { (exit 1); exit 1; }; }
6725 fi
6726
6727 fi
6728
6729 if test "$enable_spinlocks" = yes; then
6730
6731 cat >>confdefs.h <<\_ACEOF
6732 #define HAVE_SPINLOCKS 1
6733 _ACEOF
6734
6735 else
6736   { echo "$as_me:$LINENO: WARNING:
6737 *** Not using spinlocks will cause poor performance." >&5
6738 echo "$as_me: WARNING:
6739 *** Not using spinlocks will cause poor performance." >&2;}
6740 fi
6741
6742 if test "$with_krb5" = yes ; then
6743   if test "$PORTNAME" != "win32"; then
6744      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6745 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6746 if test "${ac_cv_search_com_err+set}" = set; then
6747   echo $ECHO_N "(cached) $ECHO_C" >&6
6748 else
6749   ac_func_search_save_LIBS=$LIBS
6750 ac_cv_search_com_err=no
6751 cat >conftest.$ac_ext <<_ACEOF
6752 /* confdefs.h.  */
6753 _ACEOF
6754 cat confdefs.h >>conftest.$ac_ext
6755 cat >>conftest.$ac_ext <<_ACEOF
6756 /* end confdefs.h.  */
6757
6758 /* Override any gcc2 internal prototype to avoid an error.  */
6759 #ifdef __cplusplus
6760 extern "C"
6761 #endif
6762 /* We use char because int might match the return type of a gcc2
6763    builtin and then its argument prototype would still apply.  */
6764 char com_err ();
6765 int
6766 main ()
6767 {
6768 com_err ();
6769   ;
6770   return 0;
6771 }
6772 _ACEOF
6773 rm -f conftest.$ac_objext conftest$ac_exeext
6774 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6775   (eval $ac_link) 2>conftest.er1
6776   ac_status=$?
6777   grep -v '^ *+' conftest.er1 >conftest.err
6778   rm -f conftest.er1
6779   cat conftest.err >&5
6780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6781   (exit $ac_status); } &&
6782          { ac_try='test -z "$ac_c_werror_flag"
6783                          || test ! -s conftest.err'
6784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6785   (eval $ac_try) 2>&5
6786   ac_status=$?
6787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6788   (exit $ac_status); }; } &&
6789          { ac_try='test -s conftest$ac_exeext'
6790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6791   (eval $ac_try) 2>&5
6792   ac_status=$?
6793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6794   (exit $ac_status); }; }; then
6795   ac_cv_search_com_err="none required"
6796 else
6797   echo "$as_me: failed program was:" >&5
6798 sed 's/^/| /' conftest.$ac_ext >&5
6799
6800 fi
6801 rm -f conftest.err conftest.$ac_objext \
6802       conftest$ac_exeext conftest.$ac_ext
6803 if test "$ac_cv_search_com_err" = no; then
6804   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6805     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6806     cat >conftest.$ac_ext <<_ACEOF
6807 /* confdefs.h.  */
6808 _ACEOF
6809 cat confdefs.h >>conftest.$ac_ext
6810 cat >>conftest.$ac_ext <<_ACEOF
6811 /* end confdefs.h.  */
6812
6813 /* Override any gcc2 internal prototype to avoid an error.  */
6814 #ifdef __cplusplus
6815 extern "C"
6816 #endif
6817 /* We use char because int might match the return type of a gcc2
6818    builtin and then its argument prototype would still apply.  */
6819 char com_err ();
6820 int
6821 main ()
6822 {
6823 com_err ();
6824   ;
6825   return 0;
6826 }
6827 _ACEOF
6828 rm -f conftest.$ac_objext conftest$ac_exeext
6829 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6830   (eval $ac_link) 2>conftest.er1
6831   ac_status=$?
6832   grep -v '^ *+' conftest.er1 >conftest.err
6833   rm -f conftest.er1
6834   cat conftest.err >&5
6835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836   (exit $ac_status); } &&
6837          { ac_try='test -z "$ac_c_werror_flag"
6838                          || test ! -s conftest.err'
6839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6840   (eval $ac_try) 2>&5
6841   ac_status=$?
6842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6843   (exit $ac_status); }; } &&
6844          { ac_try='test -s conftest$ac_exeext'
6845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6846   (eval $ac_try) 2>&5
6847   ac_status=$?
6848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6849   (exit $ac_status); }; }; then
6850   ac_cv_search_com_err="-l$ac_lib"
6851 break
6852 else
6853   echo "$as_me: failed program was:" >&5
6854 sed 's/^/| /' conftest.$ac_ext >&5
6855
6856 fi
6857 rm -f conftest.err conftest.$ac_objext \
6858       conftest$ac_exeext conftest.$ac_ext
6859   done
6860 fi
6861 LIBS=$ac_func_search_save_LIBS
6862 fi
6863 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6864 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6865 if test "$ac_cv_search_com_err" != no; then
6866   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6867
6868 else
6869   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6870 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6871    { (exit 1); exit 1; }; }
6872 fi
6873
6874      echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
6875 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
6876 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
6877   echo $ECHO_N "(cached) $ECHO_C" >&6
6878 else
6879   ac_func_search_save_LIBS=$LIBS
6880 ac_cv_search_krb5_encrypt=no
6881 cat >conftest.$ac_ext <<_ACEOF
6882 /* confdefs.h.  */
6883 _ACEOF
6884 cat confdefs.h >>conftest.$ac_ext
6885 cat >>conftest.$ac_ext <<_ACEOF
6886 /* end confdefs.h.  */
6887
6888 /* Override any gcc2 internal prototype to avoid an error.  */
6889 #ifdef __cplusplus
6890 extern "C"
6891 #endif
6892 /* We use char because int might match the return type of a gcc2
6893    builtin and then its argument prototype would still apply.  */
6894 char krb5_encrypt ();
6895 int
6896 main ()
6897 {
6898 krb5_encrypt ();
6899   ;
6900   return 0;
6901 }
6902 _ACEOF
6903 rm -f conftest.$ac_objext conftest$ac_exeext
6904 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6905   (eval $ac_link) 2>conftest.er1
6906   ac_status=$?
6907   grep -v '^ *+' conftest.er1 >conftest.err
6908   rm -f conftest.er1
6909   cat conftest.err >&5
6910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911   (exit $ac_status); } &&
6912          { ac_try='test -z "$ac_c_werror_flag"
6913                          || test ! -s conftest.err'
6914   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6915   (eval $ac_try) 2>&5
6916   ac_status=$?
6917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6918   (exit $ac_status); }; } &&
6919          { ac_try='test -s conftest$ac_exeext'
6920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6921   (eval $ac_try) 2>&5
6922   ac_status=$?
6923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6924   (exit $ac_status); }; }; then
6925   ac_cv_search_krb5_encrypt="none required"
6926 else
6927   echo "$as_me: failed program was:" >&5
6928 sed 's/^/| /' conftest.$ac_ext >&5
6929
6930 fi
6931 rm -f conftest.err conftest.$ac_objext \
6932       conftest$ac_exeext conftest.$ac_ext
6933 if test "$ac_cv_search_krb5_encrypt" = no; then
6934   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
6935     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6936     cat >conftest.$ac_ext <<_ACEOF
6937 /* confdefs.h.  */
6938 _ACEOF
6939 cat confdefs.h >>conftest.$ac_ext
6940 cat >>conftest.$ac_ext <<_ACEOF
6941 /* end confdefs.h.  */
6942
6943 /* Override any gcc2 internal prototype to avoid an error.  */
6944 #ifdef __cplusplus
6945 extern "C"
6946 #endif
6947 /* We use char because int might match the return type of a gcc2
6948    builtin and then its argument prototype would still apply.  */
6949 char krb5_encrypt ();
6950 int
6951 main ()
6952 {
6953 krb5_encrypt ();
6954   ;
6955   return 0;
6956 }
6957 _ACEOF
6958 rm -f conftest.$ac_objext conftest$ac_exeext
6959 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6960   (eval $ac_link) 2>conftest.er1
6961   ac_status=$?
6962   grep -v '^ *+' conftest.er1 >conftest.err
6963   rm -f conftest.er1
6964   cat conftest.err >&5
6965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966   (exit $ac_status); } &&
6967          { ac_try='test -z "$ac_c_werror_flag"
6968                          || test ! -s conftest.err'
6969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6970   (eval $ac_try) 2>&5
6971   ac_status=$?
6972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6973   (exit $ac_status); }; } &&
6974          { ac_try='test -s conftest$ac_exeext'
6975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6976   (eval $ac_try) 2>&5
6977   ac_status=$?
6978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6979   (exit $ac_status); }; }; then
6980   ac_cv_search_krb5_encrypt="-l$ac_lib"
6981 break
6982 else
6983   echo "$as_me: failed program was:" >&5
6984 sed 's/^/| /' conftest.$ac_ext >&5
6985
6986 fi
6987 rm -f conftest.err conftest.$ac_objext \
6988       conftest$ac_exeext conftest.$ac_ext
6989   done
6990 fi
6991 LIBS=$ac_func_search_save_LIBS
6992 fi
6993 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
6994 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
6995 if test "$ac_cv_search_krb5_encrypt" != no; then
6996   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
6997
6998 else
6999   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
7000 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
7001    { (exit 1); exit 1; }; }
7002 fi
7003
7004      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
7005 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
7006 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7007   echo $ECHO_N "(cached) $ECHO_C" >&6
7008 else
7009   ac_func_search_save_LIBS=$LIBS
7010 ac_cv_search_krb5_sendauth=no
7011 cat >conftest.$ac_ext <<_ACEOF
7012 /* confdefs.h.  */
7013 _ACEOF
7014 cat confdefs.h >>conftest.$ac_ext
7015 cat >>conftest.$ac_ext <<_ACEOF
7016 /* end confdefs.h.  */
7017
7018 /* Override any gcc2 internal prototype to avoid an error.  */
7019 #ifdef __cplusplus
7020 extern "C"
7021 #endif
7022 /* We use char because int might match the return type of a gcc2
7023    builtin and then its argument prototype would still apply.  */
7024 char krb5_sendauth ();
7025 int
7026 main ()
7027 {
7028 krb5_sendauth ();
7029   ;
7030   return 0;
7031 }
7032 _ACEOF
7033 rm -f conftest.$ac_objext conftest$ac_exeext
7034 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7035   (eval $ac_link) 2>conftest.er1
7036   ac_status=$?
7037   grep -v '^ *+' conftest.er1 >conftest.err
7038   rm -f conftest.er1
7039   cat conftest.err >&5
7040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7041   (exit $ac_status); } &&
7042          { ac_try='test -z "$ac_c_werror_flag"
7043                          || test ! -s conftest.err'
7044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7045   (eval $ac_try) 2>&5
7046   ac_status=$?
7047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7048   (exit $ac_status); }; } &&
7049          { ac_try='test -s conftest$ac_exeext'
7050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7051   (eval $ac_try) 2>&5
7052   ac_status=$?
7053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054   (exit $ac_status); }; }; then
7055   ac_cv_search_krb5_sendauth="none required"
7056 else
7057   echo "$as_me: failed program was:" >&5
7058 sed 's/^/| /' conftest.$ac_ext >&5
7059
7060 fi
7061 rm -f conftest.err conftest.$ac_objext \
7062       conftest$ac_exeext conftest.$ac_ext
7063 if test "$ac_cv_search_krb5_sendauth" = no; then
7064   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
7065     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7066     cat >conftest.$ac_ext <<_ACEOF
7067 /* confdefs.h.  */
7068 _ACEOF
7069 cat confdefs.h >>conftest.$ac_ext
7070 cat >>conftest.$ac_ext <<_ACEOF
7071 /* end confdefs.h.  */
7072
7073 /* Override any gcc2 internal prototype to avoid an error.  */
7074 #ifdef __cplusplus
7075 extern "C"
7076 #endif
7077 /* We use char because int might match the return type of a gcc2
7078    builtin and then its argument prototype would still apply.  */
7079 char krb5_sendauth ();
7080 int
7081 main ()
7082 {
7083 krb5_sendauth ();
7084   ;
7085   return 0;
7086 }
7087 _ACEOF
7088 rm -f conftest.$ac_objext conftest$ac_exeext
7089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7090   (eval $ac_link) 2>conftest.er1
7091   ac_status=$?
7092   grep -v '^ *+' conftest.er1 >conftest.err
7093   rm -f conftest.er1
7094   cat conftest.err >&5
7095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7096   (exit $ac_status); } &&
7097          { ac_try='test -z "$ac_c_werror_flag"
7098                          || test ! -s conftest.err'
7099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7100   (eval $ac_try) 2>&5
7101   ac_status=$?
7102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7103   (exit $ac_status); }; } &&
7104          { ac_try='test -s conftest$ac_exeext'
7105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7106   (eval $ac_try) 2>&5
7107   ac_status=$?
7108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7109   (exit $ac_status); }; }; then
7110   ac_cv_search_krb5_sendauth="-l$ac_lib"
7111 break
7112 else
7113   echo "$as_me: failed program was:" >&5
7114 sed 's/^/| /' conftest.$ac_ext >&5
7115
7116 fi
7117 rm -f conftest.err conftest.$ac_objext \
7118       conftest$ac_exeext conftest.$ac_ext
7119   done
7120 fi
7121 LIBS=$ac_func_search_save_LIBS
7122 fi
7123 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7124 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
7125 if test "$ac_cv_search_krb5_sendauth" != no; then
7126   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
7127
7128 else
7129   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7130 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7131    { (exit 1); exit 1; }; }
7132 fi
7133
7134   else
7135      echo "$as_me:$LINENO: checking for library containing com_err" >&5
7136 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
7137 if test "${ac_cv_search_com_err+set}" = set; then
7138   echo $ECHO_N "(cached) $ECHO_C" >&6
7139 else
7140   ac_func_search_save_LIBS=$LIBS
7141 ac_cv_search_com_err=no
7142 cat >conftest.$ac_ext <<_ACEOF
7143 /* confdefs.h.  */
7144 _ACEOF
7145 cat confdefs.h >>conftest.$ac_ext
7146 cat >>conftest.$ac_ext <<_ACEOF
7147 /* end confdefs.h.  */
7148
7149 /* Override any gcc2 internal prototype to avoid an error.  */
7150 #ifdef __cplusplus
7151 extern "C"
7152 #endif
7153 /* We use char because int might match the return type of a gcc2
7154    builtin and then its argument prototype would still apply.  */
7155 char com_err ();
7156 int
7157 main ()
7158 {
7159 com_err ();
7160   ;
7161   return 0;
7162 }
7163 _ACEOF
7164 rm -f conftest.$ac_objext conftest$ac_exeext
7165 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7166   (eval $ac_link) 2>conftest.er1
7167   ac_status=$?
7168   grep -v '^ *+' conftest.er1 >conftest.err
7169   rm -f conftest.er1
7170   cat conftest.err >&5
7171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7172   (exit $ac_status); } &&
7173          { ac_try='test -z "$ac_c_werror_flag"
7174                          || test ! -s conftest.err'
7175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7176   (eval $ac_try) 2>&5
7177   ac_status=$?
7178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7179   (exit $ac_status); }; } &&
7180          { ac_try='test -s conftest$ac_exeext'
7181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7182   (eval $ac_try) 2>&5
7183   ac_status=$?
7184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7185   (exit $ac_status); }; }; then
7186   ac_cv_search_com_err="none required"
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 sed 's/^/| /' conftest.$ac_ext >&5
7190
7191 fi
7192 rm -f conftest.err conftest.$ac_objext \
7193       conftest$ac_exeext conftest.$ac_ext
7194 if test "$ac_cv_search_com_err" = no; then
7195   for ac_lib in 'comerr32 -lkrb5_32'; do
7196     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7197     cat >conftest.$ac_ext <<_ACEOF
7198 /* confdefs.h.  */
7199 _ACEOF
7200 cat confdefs.h >>conftest.$ac_ext
7201 cat >>conftest.$ac_ext <<_ACEOF
7202 /* end confdefs.h.  */
7203
7204 /* Override any gcc2 internal prototype to avoid an error.  */
7205 #ifdef __cplusplus
7206 extern "C"
7207 #endif
7208 /* We use char because int might match the return type of a gcc2
7209    builtin and then its argument prototype would still apply.  */
7210 char com_err ();
7211 int
7212 main ()
7213 {
7214 com_err ();
7215   ;
7216   return 0;
7217 }
7218 _ACEOF
7219 rm -f conftest.$ac_objext conftest$ac_exeext
7220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7221   (eval $ac_link) 2>conftest.er1
7222   ac_status=$?
7223   grep -v '^ *+' conftest.er1 >conftest.err
7224   rm -f conftest.er1
7225   cat conftest.err >&5
7226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7227   (exit $ac_status); } &&
7228          { ac_try='test -z "$ac_c_werror_flag"
7229                          || test ! -s conftest.err'
7230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7231   (eval $ac_try) 2>&5
7232   ac_status=$?
7233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7234   (exit $ac_status); }; } &&
7235          { ac_try='test -s conftest$ac_exeext'
7236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7237   (eval $ac_try) 2>&5
7238   ac_status=$?
7239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7240   (exit $ac_status); }; }; then
7241   ac_cv_search_com_err="-l$ac_lib"
7242 break
7243 else
7244   echo "$as_me: failed program was:" >&5
7245 sed 's/^/| /' conftest.$ac_ext >&5
7246
7247 fi
7248 rm -f conftest.err conftest.$ac_objext \
7249       conftest$ac_exeext conftest.$ac_ext
7250   done
7251 fi
7252 LIBS=$ac_func_search_save_LIBS
7253 fi
7254 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7255 echo "${ECHO_T}$ac_cv_search_com_err" >&6
7256 if test "$ac_cv_search_com_err" != no; then
7257   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
7258
7259 else
7260   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7261 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7262    { (exit 1); exit 1; }; }
7263 fi
7264
7265   fi
7266 fi
7267
7268 if test "$with_openssl" = yes ; then
7269     if test "$PORTNAME" != "win32"; then
7270
7271 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7272 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
7273 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7274   echo $ECHO_N "(cached) $ECHO_C" >&6
7275 else
7276   ac_check_lib_save_LIBS=$LIBS
7277 LIBS="-lcrypto  $LIBS"
7278 cat >conftest.$ac_ext <<_ACEOF
7279 /* confdefs.h.  */
7280 _ACEOF
7281 cat confdefs.h >>conftest.$ac_ext
7282 cat >>conftest.$ac_ext <<_ACEOF
7283 /* end confdefs.h.  */
7284
7285 /* Override any gcc2 internal prototype to avoid an error.  */
7286 #ifdef __cplusplus
7287 extern "C"
7288 #endif
7289 /* We use char because int might match the return type of a gcc2
7290    builtin and then its argument prototype would still apply.  */
7291 char CRYPTO_new_ex_data ();
7292 int
7293 main ()
7294 {
7295 CRYPTO_new_ex_data ();
7296   ;
7297   return 0;
7298 }
7299 _ACEOF
7300 rm -f conftest.$ac_objext conftest$ac_exeext
7301 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7302   (eval $ac_link) 2>conftest.er1
7303   ac_status=$?
7304   grep -v '^ *+' conftest.er1 >conftest.err
7305   rm -f conftest.er1
7306   cat conftest.err >&5
7307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7308   (exit $ac_status); } &&
7309          { ac_try='test -z "$ac_c_werror_flag"
7310                          || test ! -s conftest.err'
7311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7312   (eval $ac_try) 2>&5
7313   ac_status=$?
7314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7315   (exit $ac_status); }; } &&
7316          { ac_try='test -s conftest$ac_exeext'
7317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7318   (eval $ac_try) 2>&5
7319   ac_status=$?
7320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321   (exit $ac_status); }; }; then
7322   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7323 else
7324   echo "$as_me: failed program was:" >&5
7325 sed 's/^/| /' conftest.$ac_ext >&5
7326
7327 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7328 fi
7329 rm -f conftest.err conftest.$ac_objext \
7330       conftest$ac_exeext conftest.$ac_ext
7331 LIBS=$ac_check_lib_save_LIBS
7332 fi
7333 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7334 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
7335 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7336   cat >>confdefs.h <<_ACEOF
7337 #define HAVE_LIBCRYPTO 1
7338 _ACEOF
7339
7340   LIBS="-lcrypto $LIBS"
7341
7342 else
7343   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7344 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7345    { (exit 1); exit 1; }; }
7346 fi
7347
7348
7349 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7350 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7351 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7352   echo $ECHO_N "(cached) $ECHO_C" >&6
7353 else
7354   ac_check_lib_save_LIBS=$LIBS
7355 LIBS="-lssl  $LIBS"
7356 cat >conftest.$ac_ext <<_ACEOF
7357 /* confdefs.h.  */
7358 _ACEOF
7359 cat confdefs.h >>conftest.$ac_ext
7360 cat >>conftest.$ac_ext <<_ACEOF
7361 /* end confdefs.h.  */
7362
7363 /* Override any gcc2 internal prototype to avoid an error.  */
7364 #ifdef __cplusplus
7365 extern "C"
7366 #endif
7367 /* We use char because int might match the return type of a gcc2
7368    builtin and then its argument prototype would still apply.  */
7369 char SSL_library_init ();
7370 int
7371 main ()
7372 {
7373 SSL_library_init ();
7374   ;
7375   return 0;
7376 }
7377 _ACEOF
7378 rm -f conftest.$ac_objext conftest$ac_exeext
7379 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7380   (eval $ac_link) 2>conftest.er1
7381   ac_status=$?
7382   grep -v '^ *+' conftest.er1 >conftest.err
7383   rm -f conftest.er1
7384   cat conftest.err >&5
7385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386   (exit $ac_status); } &&
7387          { ac_try='test -z "$ac_c_werror_flag"
7388                          || test ! -s conftest.err'
7389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7390   (eval $ac_try) 2>&5
7391   ac_status=$?
7392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393   (exit $ac_status); }; } &&
7394          { ac_try='test -s conftest$ac_exeext'
7395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7396   (eval $ac_try) 2>&5
7397   ac_status=$?
7398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399   (exit $ac_status); }; }; then
7400   ac_cv_lib_ssl_SSL_library_init=yes
7401 else
7402   echo "$as_me: failed program was:" >&5
7403 sed 's/^/| /' conftest.$ac_ext >&5
7404
7405 ac_cv_lib_ssl_SSL_library_init=no
7406 fi
7407 rm -f conftest.err conftest.$ac_objext \
7408       conftest$ac_exeext conftest.$ac_ext
7409 LIBS=$ac_check_lib_save_LIBS
7410 fi
7411 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7412 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7413 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7414   cat >>confdefs.h <<_ACEOF
7415 #define HAVE_LIBSSL 1
7416 _ACEOF
7417
7418   LIBS="-lssl $LIBS"
7419
7420 else
7421   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7422 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7423    { (exit 1); exit 1; }; }
7424 fi
7425
7426   else
7427
7428 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7429 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7430 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7431   echo $ECHO_N "(cached) $ECHO_C" >&6
7432 else
7433   ac_check_lib_save_LIBS=$LIBS
7434 LIBS="-leay32  $LIBS"
7435 cat >conftest.$ac_ext <<_ACEOF
7436 /* confdefs.h.  */
7437 _ACEOF
7438 cat confdefs.h >>conftest.$ac_ext
7439 cat >>conftest.$ac_ext <<_ACEOF
7440 /* end confdefs.h.  */
7441
7442 /* Override any gcc2 internal prototype to avoid an error.  */
7443 #ifdef __cplusplus
7444 extern "C"
7445 #endif
7446 /* We use char because int might match the return type of a gcc2
7447    builtin and then its argument prototype would still apply.  */
7448 char CRYPTO_new_ex_data ();
7449 int
7450 main ()
7451 {
7452 CRYPTO_new_ex_data ();
7453   ;
7454   return 0;
7455 }
7456 _ACEOF
7457 rm -f conftest.$ac_objext conftest$ac_exeext
7458 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7459   (eval $ac_link) 2>conftest.er1
7460   ac_status=$?
7461   grep -v '^ *+' conftest.er1 >conftest.err
7462   rm -f conftest.er1
7463   cat conftest.err >&5
7464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7465   (exit $ac_status); } &&
7466          { ac_try='test -z "$ac_c_werror_flag"
7467                          || test ! -s conftest.err'
7468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7469   (eval $ac_try) 2>&5
7470   ac_status=$?
7471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7472   (exit $ac_status); }; } &&
7473          { ac_try='test -s conftest$ac_exeext'
7474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7475   (eval $ac_try) 2>&5
7476   ac_status=$?
7477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478   (exit $ac_status); }; }; then
7479   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7480 else
7481   echo "$as_me: failed program was:" >&5
7482 sed 's/^/| /' conftest.$ac_ext >&5
7483
7484 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7485 fi
7486 rm -f conftest.err conftest.$ac_objext \
7487       conftest$ac_exeext conftest.$ac_ext
7488 LIBS=$ac_check_lib_save_LIBS
7489 fi
7490 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7491 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7492 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7493   cat >>confdefs.h <<_ACEOF
7494 #define HAVE_LIBEAY32 1
7495 _ACEOF
7496
7497   LIBS="-leay32 $LIBS"
7498
7499 else
7500   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7501 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7502    { (exit 1); exit 1; }; }
7503 fi
7504
7505
7506 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7507 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7508 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7509   echo $ECHO_N "(cached) $ECHO_C" >&6
7510 else
7511   ac_check_lib_save_LIBS=$LIBS
7512 LIBS="-lssleay32  $LIBS"
7513 cat >conftest.$ac_ext <<_ACEOF
7514 /* confdefs.h.  */
7515 _ACEOF
7516 cat confdefs.h >>conftest.$ac_ext
7517 cat >>conftest.$ac_ext <<_ACEOF
7518 /* end confdefs.h.  */
7519
7520 /* Override any gcc2 internal prototype to avoid an error.  */
7521 #ifdef __cplusplus
7522 extern "C"
7523 #endif
7524 /* We use char because int might match the return type of a gcc2
7525    builtin and then its argument prototype would still apply.  */
7526 char SSL_library_init ();
7527 int
7528 main ()
7529 {
7530 SSL_library_init ();
7531   ;
7532   return 0;
7533 }
7534 _ACEOF
7535 rm -f conftest.$ac_objext conftest$ac_exeext
7536 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7537   (eval $ac_link) 2>conftest.er1
7538   ac_status=$?
7539   grep -v '^ *+' conftest.er1 >conftest.err
7540   rm -f conftest.er1
7541   cat conftest.err >&5
7542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543   (exit $ac_status); } &&
7544          { ac_try='test -z "$ac_c_werror_flag"
7545                          || test ! -s conftest.err'
7546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7547   (eval $ac_try) 2>&5
7548   ac_status=$?
7549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550   (exit $ac_status); }; } &&
7551          { ac_try='test -s conftest$ac_exeext'
7552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556   (exit $ac_status); }; }; then
7557   ac_cv_lib_ssleay32_SSL_library_init=yes
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 sed 's/^/| /' conftest.$ac_ext >&5
7561
7562 ac_cv_lib_ssleay32_SSL_library_init=no
7563 fi
7564 rm -f conftest.err conftest.$ac_objext \
7565       conftest$ac_exeext conftest.$ac_ext
7566 LIBS=$ac_check_lib_save_LIBS
7567 fi
7568 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7569 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7570 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7571   cat >>confdefs.h <<_ACEOF
7572 #define HAVE_LIBSSLEAY32 1
7573 _ACEOF
7574
7575   LIBS="-lssleay32 $LIBS"
7576
7577 else
7578   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7579 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7580    { (exit 1); exit 1; }; }
7581 fi
7582
7583   fi
7584 fi
7585
7586 if test "$with_pam" = yes ; then
7587
7588 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7589 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7590 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7591   echo $ECHO_N "(cached) $ECHO_C" >&6
7592 else
7593   ac_check_lib_save_LIBS=$LIBS
7594 LIBS="-lpam  $LIBS"
7595 cat >conftest.$ac_ext <<_ACEOF
7596 /* confdefs.h.  */
7597 _ACEOF
7598 cat confdefs.h >>conftest.$ac_ext
7599 cat >>conftest.$ac_ext <<_ACEOF
7600 /* end confdefs.h.  */
7601
7602 /* Override any gcc2 internal prototype to avoid an error.  */
7603 #ifdef __cplusplus
7604 extern "C"
7605 #endif
7606 /* We use char because int might match the return type of a gcc2
7607    builtin and then its argument prototype would still apply.  */
7608 char pam_start ();
7609 int
7610 main ()
7611 {
7612 pam_start ();
7613   ;
7614   return 0;
7615 }
7616 _ACEOF
7617 rm -f conftest.$ac_objext conftest$ac_exeext
7618 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7619   (eval $ac_link) 2>conftest.er1
7620   ac_status=$?
7621   grep -v '^ *+' conftest.er1 >conftest.err
7622   rm -f conftest.er1
7623   cat conftest.err >&5
7624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625   (exit $ac_status); } &&
7626          { ac_try='test -z "$ac_c_werror_flag"
7627                          || test ! -s conftest.err'
7628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7629   (eval $ac_try) 2>&5
7630   ac_status=$?
7631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632   (exit $ac_status); }; } &&
7633          { ac_try='test -s conftest$ac_exeext'
7634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7635   (eval $ac_try) 2>&5
7636   ac_status=$?
7637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638   (exit $ac_status); }; }; then
7639   ac_cv_lib_pam_pam_start=yes
7640 else
7641   echo "$as_me: failed program was:" >&5
7642 sed 's/^/| /' conftest.$ac_ext >&5
7643
7644 ac_cv_lib_pam_pam_start=no
7645 fi
7646 rm -f conftest.err conftest.$ac_objext \
7647       conftest$ac_exeext conftest.$ac_ext
7648 LIBS=$ac_check_lib_save_LIBS
7649 fi
7650 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7651 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7652 if test $ac_cv_lib_pam_pam_start = yes; then
7653   cat >>confdefs.h <<_ACEOF
7654 #define HAVE_LIBPAM 1
7655 _ACEOF
7656
7657   LIBS="-lpam $LIBS"
7658
7659 else
7660   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7661 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7662    { (exit 1); exit 1; }; }
7663 fi
7664
7665 fi
7666
7667
7668 ##
7669 ## Header files
7670 ##
7671
7672 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7673 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7674 if test "${ac_cv_header_stdc+set}" = set; then
7675   echo $ECHO_N "(cached) $ECHO_C" >&6
7676 else
7677   cat >conftest.$ac_ext <<_ACEOF
7678 /* confdefs.h.  */
7679 _ACEOF
7680 cat confdefs.h >>conftest.$ac_ext
7681 cat >>conftest.$ac_ext <<_ACEOF
7682 /* end confdefs.h.  */
7683 #include <stdlib.h>
7684 #include <stdarg.h>
7685 #include <string.h>
7686 #include <float.h>
7687
7688 int
7689 main ()
7690 {
7691
7692   ;
7693   return 0;
7694 }
7695 _ACEOF
7696 rm -f conftest.$ac_objext
7697 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7698   (eval $ac_compile) 2>conftest.er1
7699   ac_status=$?
7700   grep -v '^ *+' conftest.er1 >conftest.err
7701   rm -f conftest.er1
7702   cat conftest.err >&5
7703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704   (exit $ac_status); } &&
7705          { ac_try='test -z "$ac_c_werror_flag"
7706                          || test ! -s conftest.err'
7707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7708   (eval $ac_try) 2>&5
7709   ac_status=$?
7710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711   (exit $ac_status); }; } &&
7712          { ac_try='test -s conftest.$ac_objext'
7713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7714   (eval $ac_try) 2>&5
7715   ac_status=$?
7716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7717   (exit $ac_status); }; }; then
7718   ac_cv_header_stdc=yes
7719 else
7720   echo "$as_me: failed program was:" >&5
7721 sed 's/^/| /' conftest.$ac_ext >&5
7722
7723 ac_cv_header_stdc=no
7724 fi
7725 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7726
7727 if test $ac_cv_header_stdc = yes; then
7728   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7729   cat >conftest.$ac_ext <<_ACEOF
7730 /* confdefs.h.  */
7731 _ACEOF
7732 cat confdefs.h >>conftest.$ac_ext
7733 cat >>conftest.$ac_ext <<_ACEOF
7734 /* end confdefs.h.  */
7735 #include <string.h>
7736
7737 _ACEOF
7738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7739   $EGREP "memchr" >/dev/null 2>&1; then
7740   :
7741 else
7742   ac_cv_header_stdc=no
7743 fi
7744 rm -f conftest*
7745
7746 fi
7747
7748 if test $ac_cv_header_stdc = yes; then
7749   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7750   cat >conftest.$ac_ext <<_ACEOF
7751 /* confdefs.h.  */
7752 _ACEOF
7753 cat confdefs.h >>conftest.$ac_ext
7754 cat >>conftest.$ac_ext <<_ACEOF
7755 /* end confdefs.h.  */
7756 #include <stdlib.h>
7757
7758 _ACEOF
7759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7760   $EGREP "free" >/dev/null 2>&1; then
7761   :
7762 else
7763   ac_cv_header_stdc=no
7764 fi
7765 rm -f conftest*
7766
7767 fi
7768
7769 if test $ac_cv_header_stdc = yes; then
7770   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7771   if test "$cross_compiling" = yes; then
7772   :
7773 else
7774   cat >conftest.$ac_ext <<_ACEOF
7775 /* confdefs.h.  */
7776 _ACEOF
7777 cat confdefs.h >>conftest.$ac_ext
7778 cat >>conftest.$ac_ext <<_ACEOF
7779 /* end confdefs.h.  */
7780 #include <ctype.h>
7781 #if ((' ' & 0x0FF) == 0x020)
7782 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7783 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7784 #else
7785 # define ISLOWER(c) \
7786                    (('a' <= (c) && (c) <= 'i') \
7787                      || ('j' <= (c) && (c) <= 'r') \
7788                      || ('s' <= (c) && (c) <= 'z'))
7789 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7790 #endif
7791
7792 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7793 int
7794 main ()
7795 {
7796   int i;
7797   for (i = 0; i < 256; i++)
7798     if (XOR (islower (i), ISLOWER (i))
7799         || toupper (i) != TOUPPER (i))
7800       exit(2);
7801   exit (0);
7802 }
7803 _ACEOF
7804 rm -f conftest$ac_exeext
7805 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7806   (eval $ac_link) 2>&5
7807   ac_status=$?
7808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7809   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7811   (eval $ac_try) 2>&5
7812   ac_status=$?
7813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7814   (exit $ac_status); }; }; then
7815   :
7816 else
7817   echo "$as_me: program exited with status $ac_status" >&5
7818 echo "$as_me: failed program was:" >&5
7819 sed 's/^/| /' conftest.$ac_ext >&5
7820
7821 ( exit $ac_status )
7822 ac_cv_header_stdc=no
7823 fi
7824 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7825 fi
7826 fi
7827 fi
7828 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7829 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7830 if test $ac_cv_header_stdc = yes; then
7831
7832 cat >>confdefs.h <<\_ACEOF
7833 #define STDC_HEADERS 1
7834 _ACEOF
7835
7836 fi
7837
7838 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7849                   inttypes.h stdint.h unistd.h
7850 do
7851 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7852 echo "$as_me:$LINENO: checking for $ac_header" >&5
7853 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7854 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7855   echo $ECHO_N "(cached) $ECHO_C" >&6
7856 else
7857   cat >conftest.$ac_ext <<_ACEOF
7858 /* confdefs.h.  */
7859 _ACEOF
7860 cat confdefs.h >>conftest.$ac_ext
7861 cat >>conftest.$ac_ext <<_ACEOF
7862 /* end confdefs.h.  */
7863 $ac_includes_default
7864
7865 #include <$ac_header>
7866 _ACEOF
7867 rm -f conftest.$ac_objext
7868 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7869   (eval $ac_compile) 2>conftest.er1
7870   ac_status=$?
7871   grep -v '^ *+' conftest.er1 >conftest.err
7872   rm -f conftest.er1
7873   cat conftest.err >&5
7874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7875   (exit $ac_status); } &&
7876          { ac_try='test -z "$ac_c_werror_flag"
7877                          || test ! -s conftest.err'
7878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7879   (eval $ac_try) 2>&5
7880   ac_status=$?
7881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882   (exit $ac_status); }; } &&
7883          { ac_try='test -s conftest.$ac_objext'
7884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7885   (eval $ac_try) 2>&5
7886   ac_status=$?
7887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7888   (exit $ac_status); }; }; then
7889   eval "$as_ac_Header=yes"
7890 else
7891   echo "$as_me: failed program was:" >&5
7892 sed 's/^/| /' conftest.$ac_ext >&5
7893
7894 eval "$as_ac_Header=no"
7895 fi
7896 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7897 fi
7898 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7899 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7900 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7901   cat >>confdefs.h <<_ACEOF
7902 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7903 _ACEOF
7904
7905 fi
7906
7907 done
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935 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
7936 do
7937 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7938 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7939   echo "$as_me:$LINENO: checking for $ac_header" >&5
7940 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7941 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7942   echo $ECHO_N "(cached) $ECHO_C" >&6
7943 fi
7944 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7945 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7946 else
7947   # Is the header compilable?
7948 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7949 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7950 cat >conftest.$ac_ext <<_ACEOF
7951 /* confdefs.h.  */
7952 _ACEOF
7953 cat confdefs.h >>conftest.$ac_ext
7954 cat >>conftest.$ac_ext <<_ACEOF
7955 /* end confdefs.h.  */
7956 $ac_includes_default
7957 #include <$ac_header>
7958 _ACEOF
7959 rm -f conftest.$ac_objext
7960 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7961   (eval $ac_compile) 2>conftest.er1
7962   ac_status=$?
7963   grep -v '^ *+' conftest.er1 >conftest.err
7964   rm -f conftest.er1
7965   cat conftest.err >&5
7966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967   (exit $ac_status); } &&
7968          { ac_try='test -z "$ac_c_werror_flag"
7969                          || test ! -s conftest.err'
7970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7971   (eval $ac_try) 2>&5
7972   ac_status=$?
7973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974   (exit $ac_status); }; } &&
7975          { ac_try='test -s conftest.$ac_objext'
7976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7977   (eval $ac_try) 2>&5
7978   ac_status=$?
7979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980   (exit $ac_status); }; }; then
7981   ac_header_compiler=yes
7982 else
7983   echo "$as_me: failed program was:" >&5
7984 sed 's/^/| /' conftest.$ac_ext >&5
7985
7986 ac_header_compiler=no
7987 fi
7988 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7989 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7990 echo "${ECHO_T}$ac_header_compiler" >&6
7991
7992 # Is the header present?
7993 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7994 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7995 cat >conftest.$ac_ext <<_ACEOF
7996 /* confdefs.h.  */
7997 _ACEOF
7998 cat confdefs.h >>conftest.$ac_ext
7999 cat >>conftest.$ac_ext <<_ACEOF
8000 /* end confdefs.h.  */
8001 #include <$ac_header>
8002 _ACEOF
8003 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8004   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8005   ac_status=$?
8006   grep -v '^ *+' conftest.er1 >conftest.err
8007   rm -f conftest.er1
8008   cat conftest.err >&5
8009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8010   (exit $ac_status); } >/dev/null; then
8011   if test -s conftest.err; then
8012     ac_cpp_err=$ac_c_preproc_warn_flag
8013     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8014   else
8015     ac_cpp_err=
8016   fi
8017 else
8018   ac_cpp_err=yes
8019 fi
8020 if test -z "$ac_cpp_err"; then
8021   ac_header_preproc=yes
8022 else
8023   echo "$as_me: failed program was:" >&5
8024 sed 's/^/| /' conftest.$ac_ext >&5
8025
8026   ac_header_preproc=no
8027 fi
8028 rm -f conftest.err conftest.$ac_ext
8029 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8030 echo "${ECHO_T}$ac_header_preproc" >&6
8031
8032 # So?  What about this header?
8033 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8034   yes:no: )
8035     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8036 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8037     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8038 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8039     ac_header_preproc=yes
8040     ;;
8041   no:yes:* )
8042     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8043 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8044     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8045 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8046     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8047 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8048     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8049 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8050     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8051 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8052     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8053 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8054     (
8055       cat <<\_ASBOX
8056 ## ---------------------------------------- ##
8057 ## Report this to pgsql-bugs@postgresql.org ##
8058 ## ---------------------------------------- ##
8059 _ASBOX
8060     ) |
8061       sed "s/^/$as_me: WARNING:     /" >&2
8062     ;;
8063 esac
8064 echo "$as_me:$LINENO: checking for $ac_header" >&5
8065 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8066 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8067   echo $ECHO_N "(cached) $ECHO_C" >&6
8068 else
8069   eval "$as_ac_Header=\$ac_header_preproc"
8070 fi
8071 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8072 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8073
8074 fi
8075 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8076   cat >>confdefs.h <<_ACEOF
8077 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8078 _ACEOF
8079
8080 fi
8081
8082 done
8083
8084
8085 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
8086 # netinet/in.h is included first.
8087
8088 for ac_header in netinet/in.h
8089 do
8090 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8091 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8092   echo "$as_me:$LINENO: checking for $ac_header" >&5
8093 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8094 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8095   echo $ECHO_N "(cached) $ECHO_C" >&6
8096 fi
8097 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8098 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8099 else
8100   # Is the header compilable?
8101 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8102 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8103 cat >conftest.$ac_ext <<_ACEOF
8104 /* confdefs.h.  */
8105 _ACEOF
8106 cat confdefs.h >>conftest.$ac_ext
8107 cat >>conftest.$ac_ext <<_ACEOF
8108 /* end confdefs.h.  */
8109 $ac_includes_default
8110 #include <$ac_header>
8111 _ACEOF
8112 rm -f conftest.$ac_objext
8113 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8114   (eval $ac_compile) 2>conftest.er1
8115   ac_status=$?
8116   grep -v '^ *+' conftest.er1 >conftest.err
8117   rm -f conftest.er1
8118   cat conftest.err >&5
8119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8120   (exit $ac_status); } &&
8121          { ac_try='test -z "$ac_c_werror_flag"
8122                          || test ! -s conftest.err'
8123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8124   (eval $ac_try) 2>&5
8125   ac_status=$?
8126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127   (exit $ac_status); }; } &&
8128          { ac_try='test -s conftest.$ac_objext'
8129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8130   (eval $ac_try) 2>&5
8131   ac_status=$?
8132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8133   (exit $ac_status); }; }; then
8134   ac_header_compiler=yes
8135 else
8136   echo "$as_me: failed program was:" >&5
8137 sed 's/^/| /' conftest.$ac_ext >&5
8138
8139 ac_header_compiler=no
8140 fi
8141 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8142 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8143 echo "${ECHO_T}$ac_header_compiler" >&6
8144
8145 # Is the header present?
8146 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8147 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8148 cat >conftest.$ac_ext <<_ACEOF
8149 /* confdefs.h.  */
8150 _ACEOF
8151 cat confdefs.h >>conftest.$ac_ext
8152 cat >>conftest.$ac_ext <<_ACEOF
8153 /* end confdefs.h.  */
8154 #include <$ac_header>
8155 _ACEOF
8156 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8157   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8158   ac_status=$?
8159   grep -v '^ *+' conftest.er1 >conftest.err
8160   rm -f conftest.er1
8161   cat conftest.err >&5
8162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8163   (exit $ac_status); } >/dev/null; then
8164   if test -s conftest.err; then
8165     ac_cpp_err=$ac_c_preproc_warn_flag
8166     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8167   else
8168     ac_cpp_err=
8169   fi
8170 else
8171   ac_cpp_err=yes
8172 fi
8173 if test -z "$ac_cpp_err"; then
8174   ac_header_preproc=yes
8175 else
8176   echo "$as_me: failed program was:" >&5
8177 sed 's/^/| /' conftest.$ac_ext >&5
8178
8179   ac_header_preproc=no
8180 fi
8181 rm -f conftest.err conftest.$ac_ext
8182 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8183 echo "${ECHO_T}$ac_header_preproc" >&6
8184
8185 # So?  What about this header?
8186 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8187   yes:no: )
8188     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8189 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8190     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8191 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8192     ac_header_preproc=yes
8193     ;;
8194   no:yes:* )
8195     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8196 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8197     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8198 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8199     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8200 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8201     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8202 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8203     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8204 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8205     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8206 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8207     (
8208       cat <<\_ASBOX
8209 ## ---------------------------------------- ##
8210 ## Report this to pgsql-bugs@postgresql.org ##
8211 ## ---------------------------------------- ##
8212 _ASBOX
8213     ) |
8214       sed "s/^/$as_me: WARNING:     /" >&2
8215     ;;
8216 esac
8217 echo "$as_me:$LINENO: checking for $ac_header" >&5
8218 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8219 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8220   echo $ECHO_N "(cached) $ECHO_C" >&6
8221 else
8222   eval "$as_ac_Header=\$ac_header_preproc"
8223 fi
8224 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8225 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8226
8227 fi
8228 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8229   cat >>confdefs.h <<_ACEOF
8230 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8231 _ACEOF
8232
8233 fi
8234
8235 done
8236
8237
8238 for ac_header in netinet/tcp.h
8239 do
8240 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8241 echo "$as_me:$LINENO: checking for $ac_header" >&5
8242 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8243 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8244   echo $ECHO_N "(cached) $ECHO_C" >&6
8245 else
8246   cat >conftest.$ac_ext <<_ACEOF
8247 /* confdefs.h.  */
8248 _ACEOF
8249 cat confdefs.h >>conftest.$ac_ext
8250 cat >>conftest.$ac_ext <<_ACEOF
8251 /* end confdefs.h.  */
8252 $ac_includes_default
8253 #ifdef HAVE_NETINET_IN_H
8254 #include <netinet/in.h>
8255 #endif
8256
8257
8258 #include <$ac_header>
8259 _ACEOF
8260 rm -f conftest.$ac_objext
8261 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8262   (eval $ac_compile) 2>conftest.er1
8263   ac_status=$?
8264   grep -v '^ *+' conftest.er1 >conftest.err
8265   rm -f conftest.er1
8266   cat conftest.err >&5
8267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8268   (exit $ac_status); } &&
8269          { ac_try='test -z "$ac_c_werror_flag"
8270                          || test ! -s conftest.err'
8271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8272   (eval $ac_try) 2>&5
8273   ac_status=$?
8274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8275   (exit $ac_status); }; } &&
8276          { ac_try='test -s conftest.$ac_objext'
8277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8278   (eval $ac_try) 2>&5
8279   ac_status=$?
8280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8281   (exit $ac_status); }; }; then
8282   eval "$as_ac_Header=yes"
8283 else
8284   echo "$as_me: failed program was:" >&5
8285 sed 's/^/| /' conftest.$ac_ext >&5
8286
8287 eval "$as_ac_Header=no"
8288 fi
8289 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8290 fi
8291 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8292 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8293 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8294   cat >>confdefs.h <<_ACEOF
8295 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8296 _ACEOF
8297
8298 fi
8299
8300 done
8301
8302
8303 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8304
8305 for ac_header in readline/readline.h
8306 do
8307 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8309   echo "$as_me:$LINENO: checking for $ac_header" >&5
8310 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8311 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8312   echo $ECHO_N "(cached) $ECHO_C" >&6
8313 fi
8314 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8315 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8316 else
8317   # Is the header compilable?
8318 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8319 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8320 cat >conftest.$ac_ext <<_ACEOF
8321 /* confdefs.h.  */
8322 _ACEOF
8323 cat confdefs.h >>conftest.$ac_ext
8324 cat >>conftest.$ac_ext <<_ACEOF
8325 /* end confdefs.h.  */
8326 $ac_includes_default
8327 #include <$ac_header>
8328 _ACEOF
8329 rm -f conftest.$ac_objext
8330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8331   (eval $ac_compile) 2>conftest.er1
8332   ac_status=$?
8333   grep -v '^ *+' conftest.er1 >conftest.err
8334   rm -f conftest.er1
8335   cat conftest.err >&5
8336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337   (exit $ac_status); } &&
8338          { ac_try='test -z "$ac_c_werror_flag"
8339                          || test ! -s conftest.err'
8340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8341   (eval $ac_try) 2>&5
8342   ac_status=$?
8343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344   (exit $ac_status); }; } &&
8345          { ac_try='test -s conftest.$ac_objext'
8346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8347   (eval $ac_try) 2>&5
8348   ac_status=$?
8349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350   (exit $ac_status); }; }; then
8351   ac_header_compiler=yes
8352 else
8353   echo "$as_me: failed program was:" >&5
8354 sed 's/^/| /' conftest.$ac_ext >&5
8355
8356 ac_header_compiler=no
8357 fi
8358 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8359 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8360 echo "${ECHO_T}$ac_header_compiler" >&6
8361
8362 # Is the header present?
8363 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8364 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8365 cat >conftest.$ac_ext <<_ACEOF
8366 /* confdefs.h.  */
8367 _ACEOF
8368 cat confdefs.h >>conftest.$ac_ext
8369 cat >>conftest.$ac_ext <<_ACEOF
8370 /* end confdefs.h.  */
8371 #include <$ac_header>
8372 _ACEOF
8373 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8374   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8375   ac_status=$?
8376   grep -v '^ *+' conftest.er1 >conftest.err
8377   rm -f conftest.er1
8378   cat conftest.err >&5
8379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8380   (exit $ac_status); } >/dev/null; then
8381   if test -s conftest.err; then
8382     ac_cpp_err=$ac_c_preproc_warn_flag
8383     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8384   else
8385     ac_cpp_err=
8386   fi
8387 else
8388   ac_cpp_err=yes
8389 fi
8390 if test -z "$ac_cpp_err"; then
8391   ac_header_preproc=yes
8392 else
8393   echo "$as_me: failed program was:" >&5
8394 sed 's/^/| /' conftest.$ac_ext >&5
8395
8396   ac_header_preproc=no
8397 fi
8398 rm -f conftest.err conftest.$ac_ext
8399 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8400 echo "${ECHO_T}$ac_header_preproc" >&6
8401
8402 # So?  What about this header?
8403 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8404   yes:no: )
8405     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8406 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8407     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8408 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8409     ac_header_preproc=yes
8410     ;;
8411   no:yes:* )
8412     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8413 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8414     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8415 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8416     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8417 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8418     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8419 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8420     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8421 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8422     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8423 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8424     (
8425       cat <<\_ASBOX
8426 ## ---------------------------------------- ##
8427 ## Report this to pgsql-bugs@postgresql.org ##
8428 ## ---------------------------------------- ##
8429 _ASBOX
8430     ) |
8431       sed "s/^/$as_me: WARNING:     /" >&2
8432     ;;
8433 esac
8434 echo "$as_me:$LINENO: checking for $ac_header" >&5
8435 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8436 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8437   echo $ECHO_N "(cached) $ECHO_C" >&6
8438 else
8439   eval "$as_ac_Header=\$ac_header_preproc"
8440 fi
8441 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8442 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8443
8444 fi
8445 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8446   cat >>confdefs.h <<_ACEOF
8447 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8448 _ACEOF
8449
8450 else
8451
8452 for ac_header in readline.h
8453 do
8454 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8455 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8456   echo "$as_me:$LINENO: checking for $ac_header" >&5
8457 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8458 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8459   echo $ECHO_N "(cached) $ECHO_C" >&6
8460 fi
8461 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8462 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8463 else
8464   # Is the header compilable?
8465 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8466 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8467 cat >conftest.$ac_ext <<_ACEOF
8468 /* confdefs.h.  */
8469 _ACEOF
8470 cat confdefs.h >>conftest.$ac_ext
8471 cat >>conftest.$ac_ext <<_ACEOF
8472 /* end confdefs.h.  */
8473 $ac_includes_default
8474 #include <$ac_header>
8475 _ACEOF
8476 rm -f conftest.$ac_objext
8477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8478   (eval $ac_compile) 2>conftest.er1
8479   ac_status=$?
8480   grep -v '^ *+' conftest.er1 >conftest.err
8481   rm -f conftest.er1
8482   cat conftest.err >&5
8483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484   (exit $ac_status); } &&
8485          { ac_try='test -z "$ac_c_werror_flag"
8486                          || test ! -s conftest.err'
8487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8488   (eval $ac_try) 2>&5
8489   ac_status=$?
8490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491   (exit $ac_status); }; } &&
8492          { ac_try='test -s conftest.$ac_objext'
8493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8494   (eval $ac_try) 2>&5
8495   ac_status=$?
8496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497   (exit $ac_status); }; }; then
8498   ac_header_compiler=yes
8499 else
8500   echo "$as_me: failed program was:" >&5
8501 sed 's/^/| /' conftest.$ac_ext >&5
8502
8503 ac_header_compiler=no
8504 fi
8505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8506 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8507 echo "${ECHO_T}$ac_header_compiler" >&6
8508
8509 # Is the header present?
8510 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8511 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8512 cat >conftest.$ac_ext <<_ACEOF
8513 /* confdefs.h.  */
8514 _ACEOF
8515 cat confdefs.h >>conftest.$ac_ext
8516 cat >>conftest.$ac_ext <<_ACEOF
8517 /* end confdefs.h.  */
8518 #include <$ac_header>
8519 _ACEOF
8520 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8521   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8522   ac_status=$?
8523   grep -v '^ *+' conftest.er1 >conftest.err
8524   rm -f conftest.er1
8525   cat conftest.err >&5
8526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527   (exit $ac_status); } >/dev/null; then
8528   if test -s conftest.err; then
8529     ac_cpp_err=$ac_c_preproc_warn_flag
8530     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8531   else
8532     ac_cpp_err=
8533   fi
8534 else
8535   ac_cpp_err=yes
8536 fi
8537 if test -z "$ac_cpp_err"; then
8538   ac_header_preproc=yes
8539 else
8540   echo "$as_me: failed program was:" >&5
8541 sed 's/^/| /' conftest.$ac_ext >&5
8542
8543   ac_header_preproc=no
8544 fi
8545 rm -f conftest.err conftest.$ac_ext
8546 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8547 echo "${ECHO_T}$ac_header_preproc" >&6
8548
8549 # So?  What about this header?
8550 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8551   yes:no: )
8552     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8553 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8554     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8555 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8556     ac_header_preproc=yes
8557     ;;
8558   no:yes:* )
8559     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8560 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8561     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8562 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8563     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8564 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8565     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8566 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8567     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8568 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8569     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8570 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8571     (
8572       cat <<\_ASBOX
8573 ## ---------------------------------------- ##
8574 ## Report this to pgsql-bugs@postgresql.org ##
8575 ## ---------------------------------------- ##
8576 _ASBOX
8577     ) |
8578       sed "s/^/$as_me: WARNING:     /" >&2
8579     ;;
8580 esac
8581 echo "$as_me:$LINENO: checking for $ac_header" >&5
8582 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8583 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8584   echo $ECHO_N "(cached) $ECHO_C" >&6
8585 else
8586   eval "$as_ac_Header=\$ac_header_preproc"
8587 fi
8588 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8589 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8590
8591 fi
8592 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8593   cat >>confdefs.h <<_ACEOF
8594 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8595 _ACEOF
8596
8597 else
8598   { { echo "$as_me:$LINENO: error: readline header not found
8599 If you have readline already installed, see config.log for details on the
8600 failure.  It is possible the compiler isn't looking in the proper directory.
8601 Use --without-readline to disable readline support." >&5
8602 echo "$as_me: error: readline header not found
8603 If you have readline already installed, see config.log for details on the
8604 failure.  It is possible the compiler isn't looking in the proper directory.
8605 Use --without-readline to disable readline support." >&2;}
8606    { (exit 1); exit 1; }; }
8607 fi
8608
8609 done
8610
8611 fi
8612
8613 done
8614
8615
8616 for ac_header in readline/history.h
8617 do
8618 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8620   echo "$as_me:$LINENO: checking for $ac_header" >&5
8621 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8622 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8623   echo $ECHO_N "(cached) $ECHO_C" >&6
8624 fi
8625 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8626 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8627 else
8628   # Is the header compilable?
8629 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8630 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8631 cat >conftest.$ac_ext <<_ACEOF
8632 /* confdefs.h.  */
8633 _ACEOF
8634 cat confdefs.h >>conftest.$ac_ext
8635 cat >>conftest.$ac_ext <<_ACEOF
8636 /* end confdefs.h.  */
8637 $ac_includes_default
8638 #include <$ac_header>
8639 _ACEOF
8640 rm -f conftest.$ac_objext
8641 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8642   (eval $ac_compile) 2>conftest.er1
8643   ac_status=$?
8644   grep -v '^ *+' conftest.er1 >conftest.err
8645   rm -f conftest.er1
8646   cat conftest.err >&5
8647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648   (exit $ac_status); } &&
8649          { ac_try='test -z "$ac_c_werror_flag"
8650                          || test ! -s conftest.err'
8651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8652   (eval $ac_try) 2>&5
8653   ac_status=$?
8654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8655   (exit $ac_status); }; } &&
8656          { ac_try='test -s conftest.$ac_objext'
8657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8658   (eval $ac_try) 2>&5
8659   ac_status=$?
8660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8661   (exit $ac_status); }; }; then
8662   ac_header_compiler=yes
8663 else
8664   echo "$as_me: failed program was:" >&5
8665 sed 's/^/| /' conftest.$ac_ext >&5
8666
8667 ac_header_compiler=no
8668 fi
8669 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8670 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8671 echo "${ECHO_T}$ac_header_compiler" >&6
8672
8673 # Is the header present?
8674 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8675 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8676 cat >conftest.$ac_ext <<_ACEOF
8677 /* confdefs.h.  */
8678 _ACEOF
8679 cat confdefs.h >>conftest.$ac_ext
8680 cat >>conftest.$ac_ext <<_ACEOF
8681 /* end confdefs.h.  */
8682 #include <$ac_header>
8683 _ACEOF
8684 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8685   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8686   ac_status=$?
8687   grep -v '^ *+' conftest.er1 >conftest.err
8688   rm -f conftest.er1
8689   cat conftest.err >&5
8690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8691   (exit $ac_status); } >/dev/null; then
8692   if test -s conftest.err; then
8693     ac_cpp_err=$ac_c_preproc_warn_flag
8694     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8695   else
8696     ac_cpp_err=
8697   fi
8698 else
8699   ac_cpp_err=yes
8700 fi
8701 if test -z "$ac_cpp_err"; then
8702   ac_header_preproc=yes
8703 else
8704   echo "$as_me: failed program was:" >&5
8705 sed 's/^/| /' conftest.$ac_ext >&5
8706
8707   ac_header_preproc=no
8708 fi
8709 rm -f conftest.err conftest.$ac_ext
8710 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8711 echo "${ECHO_T}$ac_header_preproc" >&6
8712
8713 # So?  What about this header?
8714 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8715   yes:no: )
8716     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8717 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8718     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8719 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8720     ac_header_preproc=yes
8721     ;;
8722   no:yes:* )
8723     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8724 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8725     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8726 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8727     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8728 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8729     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8730 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8731     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8732 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8733     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8734 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8735     (
8736       cat <<\_ASBOX
8737 ## ---------------------------------------- ##
8738 ## Report this to pgsql-bugs@postgresql.org ##
8739 ## ---------------------------------------- ##
8740 _ASBOX
8741     ) |
8742       sed "s/^/$as_me: WARNING:     /" >&2
8743     ;;
8744 esac
8745 echo "$as_me:$LINENO: checking for $ac_header" >&5
8746 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8747 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8748   echo $ECHO_N "(cached) $ECHO_C" >&6
8749 else
8750   eval "$as_ac_Header=\$ac_header_preproc"
8751 fi
8752 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8753 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8754
8755 fi
8756 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8757   cat >>confdefs.h <<_ACEOF
8758 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8759 _ACEOF
8760
8761 else
8762
8763 for ac_header in history.h
8764 do
8765 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8766 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8767   echo "$as_me:$LINENO: checking for $ac_header" >&5
8768 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8769 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8770   echo $ECHO_N "(cached) $ECHO_C" >&6
8771 fi
8772 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8773 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8774 else
8775   # Is the header compilable?
8776 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8777 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8778 cat >conftest.$ac_ext <<_ACEOF
8779 /* confdefs.h.  */
8780 _ACEOF
8781 cat confdefs.h >>conftest.$ac_ext
8782 cat >>conftest.$ac_ext <<_ACEOF
8783 /* end confdefs.h.  */
8784 $ac_includes_default
8785 #include <$ac_header>
8786 _ACEOF
8787 rm -f conftest.$ac_objext
8788 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8789   (eval $ac_compile) 2>conftest.er1
8790   ac_status=$?
8791   grep -v '^ *+' conftest.er1 >conftest.err
8792   rm -f conftest.er1
8793   cat conftest.err >&5
8794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8795   (exit $ac_status); } &&
8796          { ac_try='test -z "$ac_c_werror_flag"
8797                          || test ! -s conftest.err'
8798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799   (eval $ac_try) 2>&5
8800   ac_status=$?
8801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8802   (exit $ac_status); }; } &&
8803          { ac_try='test -s conftest.$ac_objext'
8804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8805   (eval $ac_try) 2>&5
8806   ac_status=$?
8807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8808   (exit $ac_status); }; }; then
8809   ac_header_compiler=yes
8810 else
8811   echo "$as_me: failed program was:" >&5
8812 sed 's/^/| /' conftest.$ac_ext >&5
8813
8814 ac_header_compiler=no
8815 fi
8816 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8817 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8818 echo "${ECHO_T}$ac_header_compiler" >&6
8819
8820 # Is the header present?
8821 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8822 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8823 cat >conftest.$ac_ext <<_ACEOF
8824 /* confdefs.h.  */
8825 _ACEOF
8826 cat confdefs.h >>conftest.$ac_ext
8827 cat >>conftest.$ac_ext <<_ACEOF
8828 /* end confdefs.h.  */
8829 #include <$ac_header>
8830 _ACEOF
8831 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8832   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8833   ac_status=$?
8834   grep -v '^ *+' conftest.er1 >conftest.err
8835   rm -f conftest.er1
8836   cat conftest.err >&5
8837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8838   (exit $ac_status); } >/dev/null; then
8839   if test -s conftest.err; then
8840     ac_cpp_err=$ac_c_preproc_warn_flag
8841     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8842   else
8843     ac_cpp_err=
8844   fi
8845 else
8846   ac_cpp_err=yes
8847 fi
8848 if test -z "$ac_cpp_err"; then
8849   ac_header_preproc=yes
8850 else
8851   echo "$as_me: failed program was:" >&5
8852 sed 's/^/| /' conftest.$ac_ext >&5
8853
8854   ac_header_preproc=no
8855 fi
8856 rm -f conftest.err conftest.$ac_ext
8857 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8858 echo "${ECHO_T}$ac_header_preproc" >&6
8859
8860 # So?  What about this header?
8861 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8862   yes:no: )
8863     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8864 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8865     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8866 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8867     ac_header_preproc=yes
8868     ;;
8869   no:yes:* )
8870     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8871 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8872     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8873 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8874     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8875 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8876     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8877 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8878     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8879 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8880     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8881 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8882     (
8883       cat <<\_ASBOX
8884 ## ---------------------------------------- ##
8885 ## Report this to pgsql-bugs@postgresql.org ##
8886 ## ---------------------------------------- ##
8887 _ASBOX
8888     ) |
8889       sed "s/^/$as_me: WARNING:     /" >&2
8890     ;;
8891 esac
8892 echo "$as_me:$LINENO: checking for $ac_header" >&5
8893 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8894 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8895   echo $ECHO_N "(cached) $ECHO_C" >&6
8896 else
8897   eval "$as_ac_Header=\$ac_header_preproc"
8898 fi
8899 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8900 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8901
8902 fi
8903 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8904   cat >>confdefs.h <<_ACEOF
8905 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8906 _ACEOF
8907
8908 else
8909   { { echo "$as_me:$LINENO: error: history header not found
8910 If you have readline already installed, see config.log for details on the
8911 failure.  It is possible the compiler isn't looking in the proper directory.
8912 Use --without-readline to disable readline support." >&5
8913 echo "$as_me: error: history header not found
8914 If you have readline already installed, see config.log for details on the
8915 failure.  It is possible the compiler isn't looking in the proper directory.
8916 Use --without-readline to disable readline support." >&2;}
8917    { (exit 1); exit 1; }; }
8918 fi
8919
8920 done
8921
8922 fi
8923
8924 done
8925
8926 fi
8927
8928 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8929 # Some installations of libedit usurp /usr/include/readline/, which seems
8930 # bad practice, since in combined installations readline will have its headers
8931 # there.  We might have to resort to AC_EGREP checks to make sure we found
8932 # the proper header...
8933
8934 for ac_header in editline/readline.h
8935 do
8936 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8937 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8938   echo "$as_me:$LINENO: checking for $ac_header" >&5
8939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8940 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8941   echo $ECHO_N "(cached) $ECHO_C" >&6
8942 fi
8943 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8944 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8945 else
8946   # Is the header compilable?
8947 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8948 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8949 cat >conftest.$ac_ext <<_ACEOF
8950 /* confdefs.h.  */
8951 _ACEOF
8952 cat confdefs.h >>conftest.$ac_ext
8953 cat >>conftest.$ac_ext <<_ACEOF
8954 /* end confdefs.h.  */
8955 $ac_includes_default
8956 #include <$ac_header>
8957 _ACEOF
8958 rm -f conftest.$ac_objext
8959 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8960   (eval $ac_compile) 2>conftest.er1
8961   ac_status=$?
8962   grep -v '^ *+' conftest.er1 >conftest.err
8963   rm -f conftest.er1
8964   cat conftest.err >&5
8965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8966   (exit $ac_status); } &&
8967          { ac_try='test -z "$ac_c_werror_flag"
8968                          || test ! -s conftest.err'
8969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8970   (eval $ac_try) 2>&5
8971   ac_status=$?
8972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8973   (exit $ac_status); }; } &&
8974          { ac_try='test -s conftest.$ac_objext'
8975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8976   (eval $ac_try) 2>&5
8977   ac_status=$?
8978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8979   (exit $ac_status); }; }; then
8980   ac_header_compiler=yes
8981 else
8982   echo "$as_me: failed program was:" >&5
8983 sed 's/^/| /' conftest.$ac_ext >&5
8984
8985 ac_header_compiler=no
8986 fi
8987 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8988 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8989 echo "${ECHO_T}$ac_header_compiler" >&6
8990
8991 # Is the header present?
8992 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8993 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8994 cat >conftest.$ac_ext <<_ACEOF
8995 /* confdefs.h.  */
8996 _ACEOF
8997 cat confdefs.h >>conftest.$ac_ext
8998 cat >>conftest.$ac_ext <<_ACEOF
8999 /* end confdefs.h.  */
9000 #include <$ac_header>
9001 _ACEOF
9002 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9003   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9004   ac_status=$?
9005   grep -v '^ *+' conftest.er1 >conftest.err
9006   rm -f conftest.er1
9007   cat conftest.err >&5
9008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9009   (exit $ac_status); } >/dev/null; then
9010   if test -s conftest.err; then
9011     ac_cpp_err=$ac_c_preproc_warn_flag
9012     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9013   else
9014     ac_cpp_err=
9015   fi
9016 else
9017   ac_cpp_err=yes
9018 fi
9019 if test -z "$ac_cpp_err"; then
9020   ac_header_preproc=yes
9021 else
9022   echo "$as_me: failed program was:" >&5
9023 sed 's/^/| /' conftest.$ac_ext >&5
9024
9025   ac_header_preproc=no
9026 fi
9027 rm -f conftest.err conftest.$ac_ext
9028 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9029 echo "${ECHO_T}$ac_header_preproc" >&6
9030
9031 # So?  What about this header?
9032 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9033   yes:no: )
9034     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9035 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9036     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9037 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9038     ac_header_preproc=yes
9039     ;;
9040   no:yes:* )
9041     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9042 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9043     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9044 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9045     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9046 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9047     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9048 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9049     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9050 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9051     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9052 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9053     (
9054       cat <<\_ASBOX
9055 ## ---------------------------------------- ##
9056 ## Report this to pgsql-bugs@postgresql.org ##
9057 ## ---------------------------------------- ##
9058 _ASBOX
9059     ) |
9060       sed "s/^/$as_me: WARNING:     /" >&2
9061     ;;
9062 esac
9063 echo "$as_me:$LINENO: checking for $ac_header" >&5
9064 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9065 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9066   echo $ECHO_N "(cached) $ECHO_C" >&6
9067 else
9068   eval "$as_ac_Header=\$ac_header_preproc"
9069 fi
9070 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9071 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9072
9073 fi
9074 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9075   cat >>confdefs.h <<_ACEOF
9076 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9077 _ACEOF
9078
9079 else
9080
9081 for ac_header in readline.h
9082 do
9083 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9084 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9085   echo "$as_me:$LINENO: checking for $ac_header" >&5
9086 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9087 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9088   echo $ECHO_N "(cached) $ECHO_C" >&6
9089 fi
9090 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9091 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9092 else
9093   # Is the header compilable?
9094 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9095 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9096 cat >conftest.$ac_ext <<_ACEOF
9097 /* confdefs.h.  */
9098 _ACEOF
9099 cat confdefs.h >>conftest.$ac_ext
9100 cat >>conftest.$ac_ext <<_ACEOF
9101 /* end confdefs.h.  */
9102 $ac_includes_default
9103 #include <$ac_header>
9104 _ACEOF
9105 rm -f conftest.$ac_objext
9106 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9107   (eval $ac_compile) 2>conftest.er1
9108   ac_status=$?
9109   grep -v '^ *+' conftest.er1 >conftest.err
9110   rm -f conftest.er1
9111   cat conftest.err >&5
9112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9113   (exit $ac_status); } &&
9114          { ac_try='test -z "$ac_c_werror_flag"
9115                          || test ! -s conftest.err'
9116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9117   (eval $ac_try) 2>&5
9118   ac_status=$?
9119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9120   (exit $ac_status); }; } &&
9121          { ac_try='test -s conftest.$ac_objext'
9122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9123   (eval $ac_try) 2>&5
9124   ac_status=$?
9125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126   (exit $ac_status); }; }; then
9127   ac_header_compiler=yes
9128 else
9129   echo "$as_me: failed program was:" >&5
9130 sed 's/^/| /' conftest.$ac_ext >&5
9131
9132 ac_header_compiler=no
9133 fi
9134 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9135 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9136 echo "${ECHO_T}$ac_header_compiler" >&6
9137
9138 # Is the header present?
9139 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9140 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9141 cat >conftest.$ac_ext <<_ACEOF
9142 /* confdefs.h.  */
9143 _ACEOF
9144 cat confdefs.h >>conftest.$ac_ext
9145 cat >>conftest.$ac_ext <<_ACEOF
9146 /* end confdefs.h.  */
9147 #include <$ac_header>
9148 _ACEOF
9149 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9150   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9151   ac_status=$?
9152   grep -v '^ *+' conftest.er1 >conftest.err
9153   rm -f conftest.er1
9154   cat conftest.err >&5
9155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9156   (exit $ac_status); } >/dev/null; then
9157   if test -s conftest.err; then
9158     ac_cpp_err=$ac_c_preproc_warn_flag
9159     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9160   else
9161     ac_cpp_err=
9162   fi
9163 else
9164   ac_cpp_err=yes
9165 fi
9166 if test -z "$ac_cpp_err"; then
9167   ac_header_preproc=yes
9168 else
9169   echo "$as_me: failed program was:" >&5
9170 sed 's/^/| /' conftest.$ac_ext >&5
9171
9172   ac_header_preproc=no
9173 fi
9174 rm -f conftest.err conftest.$ac_ext
9175 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9176 echo "${ECHO_T}$ac_header_preproc" >&6
9177
9178 # So?  What about this header?
9179 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9180   yes:no: )
9181     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9182 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9183     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9184 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9185     ac_header_preproc=yes
9186     ;;
9187   no:yes:* )
9188     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9189 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9190     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9191 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9192     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9193 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9194     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9195 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9196     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9197 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9198     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9199 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9200     (
9201       cat <<\_ASBOX
9202 ## ---------------------------------------- ##
9203 ## Report this to pgsql-bugs@postgresql.org ##
9204 ## ---------------------------------------- ##
9205 _ASBOX
9206     ) |
9207       sed "s/^/$as_me: WARNING:     /" >&2
9208     ;;
9209 esac
9210 echo "$as_me:$LINENO: checking for $ac_header" >&5
9211 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9212 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9213   echo $ECHO_N "(cached) $ECHO_C" >&6
9214 else
9215   eval "$as_ac_Header=\$ac_header_preproc"
9216 fi
9217 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9218 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9219
9220 fi
9221 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9222   cat >>confdefs.h <<_ACEOF
9223 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9224 _ACEOF
9225
9226 else
9227
9228 for ac_header in readline/readline.h
9229 do
9230 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9231 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9232   echo "$as_me:$LINENO: checking for $ac_header" >&5
9233 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9234 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9235   echo $ECHO_N "(cached) $ECHO_C" >&6
9236 fi
9237 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9238 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9239 else
9240   # Is the header compilable?
9241 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9242 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9243 cat >conftest.$ac_ext <<_ACEOF
9244 /* confdefs.h.  */
9245 _ACEOF
9246 cat confdefs.h >>conftest.$ac_ext
9247 cat >>conftest.$ac_ext <<_ACEOF
9248 /* end confdefs.h.  */
9249 $ac_includes_default
9250 #include <$ac_header>
9251 _ACEOF
9252 rm -f conftest.$ac_objext
9253 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9254   (eval $ac_compile) 2>conftest.er1
9255   ac_status=$?
9256   grep -v '^ *+' conftest.er1 >conftest.err
9257   rm -f conftest.er1
9258   cat conftest.err >&5
9259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9260   (exit $ac_status); } &&
9261          { ac_try='test -z "$ac_c_werror_flag"
9262                          || test ! -s conftest.err'
9263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9264   (eval $ac_try) 2>&5
9265   ac_status=$?
9266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9267   (exit $ac_status); }; } &&
9268          { ac_try='test -s conftest.$ac_objext'
9269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9270   (eval $ac_try) 2>&5
9271   ac_status=$?
9272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9273   (exit $ac_status); }; }; then
9274   ac_header_compiler=yes
9275 else
9276   echo "$as_me: failed program was:" >&5
9277 sed 's/^/| /' conftest.$ac_ext >&5
9278
9279 ac_header_compiler=no
9280 fi
9281 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9282 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9283 echo "${ECHO_T}$ac_header_compiler" >&6
9284
9285 # Is the header present?
9286 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9287 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9288 cat >conftest.$ac_ext <<_ACEOF
9289 /* confdefs.h.  */
9290 _ACEOF
9291 cat confdefs.h >>conftest.$ac_ext
9292 cat >>conftest.$ac_ext <<_ACEOF
9293 /* end confdefs.h.  */
9294 #include <$ac_header>
9295 _ACEOF
9296 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9297   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9298   ac_status=$?
9299   grep -v '^ *+' conftest.er1 >conftest.err
9300   rm -f conftest.er1
9301   cat conftest.err >&5
9302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9303   (exit $ac_status); } >/dev/null; then
9304   if test -s conftest.err; then
9305     ac_cpp_err=$ac_c_preproc_warn_flag
9306     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9307   else
9308     ac_cpp_err=
9309   fi
9310 else
9311   ac_cpp_err=yes
9312 fi
9313 if test -z "$ac_cpp_err"; then
9314   ac_header_preproc=yes
9315 else
9316   echo "$as_me: failed program was:" >&5
9317 sed 's/^/| /' conftest.$ac_ext >&5
9318
9319   ac_header_preproc=no
9320 fi
9321 rm -f conftest.err conftest.$ac_ext
9322 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9323 echo "${ECHO_T}$ac_header_preproc" >&6
9324
9325 # So?  What about this header?
9326 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9327   yes:no: )
9328     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9329 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9330     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9331 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9332     ac_header_preproc=yes
9333     ;;
9334   no:yes:* )
9335     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9336 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9337     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9338 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9339     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9340 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9341     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9342 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9343     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9344 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9345     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9346 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9347     (
9348       cat <<\_ASBOX
9349 ## ---------------------------------------- ##
9350 ## Report this to pgsql-bugs@postgresql.org ##
9351 ## ---------------------------------------- ##
9352 _ASBOX
9353     ) |
9354       sed "s/^/$as_me: WARNING:     /" >&2
9355     ;;
9356 esac
9357 echo "$as_me:$LINENO: checking for $ac_header" >&5
9358 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9359 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9360   echo $ECHO_N "(cached) $ECHO_C" >&6
9361 else
9362   eval "$as_ac_Header=\$ac_header_preproc"
9363 fi
9364 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9365 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9366
9367 fi
9368 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9369   cat >>confdefs.h <<_ACEOF
9370 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9371 _ACEOF
9372
9373 else
9374   { { echo "$as_me:$LINENO: error: readline header not found
9375 If you have libedit already installed, see config.log for details on the
9376 failure.  It is possible the compiler isn't looking in the proper directory.
9377 Use --without-readline to disable libedit support." >&5
9378 echo "$as_me: error: readline header not found
9379 If you have libedit already installed, see config.log for details on the
9380 failure.  It is possible the compiler isn't looking in the proper directory.
9381 Use --without-readline to disable libedit support." >&2;}
9382    { (exit 1); exit 1; }; }
9383 fi
9384
9385 done
9386
9387 fi
9388
9389 done
9390
9391 fi
9392
9393 done
9394
9395
9396 for ac_header in editline/history.h
9397 do
9398 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9399 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9400   echo "$as_me:$LINENO: checking for $ac_header" >&5
9401 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9402 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9403   echo $ECHO_N "(cached) $ECHO_C" >&6
9404 fi
9405 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9406 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9407 else
9408   # Is the header compilable?
9409 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9410 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9411 cat >conftest.$ac_ext <<_ACEOF
9412 /* confdefs.h.  */
9413 _ACEOF
9414 cat confdefs.h >>conftest.$ac_ext
9415 cat >>conftest.$ac_ext <<_ACEOF
9416 /* end confdefs.h.  */
9417 $ac_includes_default
9418 #include <$ac_header>
9419 _ACEOF
9420 rm -f conftest.$ac_objext
9421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9422   (eval $ac_compile) 2>conftest.er1
9423   ac_status=$?
9424   grep -v '^ *+' conftest.er1 >conftest.err
9425   rm -f conftest.er1
9426   cat conftest.err >&5
9427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9428   (exit $ac_status); } &&
9429          { ac_try='test -z "$ac_c_werror_flag"
9430                          || test ! -s conftest.err'
9431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9432   (eval $ac_try) 2>&5
9433   ac_status=$?
9434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435   (exit $ac_status); }; } &&
9436          { ac_try='test -s conftest.$ac_objext'
9437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9438   (eval $ac_try) 2>&5
9439   ac_status=$?
9440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441   (exit $ac_status); }; }; then
9442   ac_header_compiler=yes
9443 else
9444   echo "$as_me: failed program was:" >&5
9445 sed 's/^/| /' conftest.$ac_ext >&5
9446
9447 ac_header_compiler=no
9448 fi
9449 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9450 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9451 echo "${ECHO_T}$ac_header_compiler" >&6
9452
9453 # Is the header present?
9454 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9455 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9456 cat >conftest.$ac_ext <<_ACEOF
9457 /* confdefs.h.  */
9458 _ACEOF
9459 cat confdefs.h >>conftest.$ac_ext
9460 cat >>conftest.$ac_ext <<_ACEOF
9461 /* end confdefs.h.  */
9462 #include <$ac_header>
9463 _ACEOF
9464 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9465   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9466   ac_status=$?
9467   grep -v '^ *+' conftest.er1 >conftest.err
9468   rm -f conftest.er1
9469   cat conftest.err >&5
9470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9471   (exit $ac_status); } >/dev/null; then
9472   if test -s conftest.err; then
9473     ac_cpp_err=$ac_c_preproc_warn_flag
9474     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9475   else
9476     ac_cpp_err=
9477   fi
9478 else
9479   ac_cpp_err=yes
9480 fi
9481 if test -z "$ac_cpp_err"; then
9482   ac_header_preproc=yes
9483 else
9484   echo "$as_me: failed program was:" >&5
9485 sed 's/^/| /' conftest.$ac_ext >&5
9486
9487   ac_header_preproc=no
9488 fi
9489 rm -f conftest.err conftest.$ac_ext
9490 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9491 echo "${ECHO_T}$ac_header_preproc" >&6
9492
9493 # So?  What about this header?
9494 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9495   yes:no: )
9496     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9497 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9498     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9499 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9500     ac_header_preproc=yes
9501     ;;
9502   no:yes:* )
9503     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9504 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9505     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9506 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9507     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9508 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9509     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9510 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9511     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9512 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9513     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9514 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9515     (
9516       cat <<\_ASBOX
9517 ## ---------------------------------------- ##
9518 ## Report this to pgsql-bugs@postgresql.org ##
9519 ## ---------------------------------------- ##
9520 _ASBOX
9521     ) |
9522       sed "s/^/$as_me: WARNING:     /" >&2
9523     ;;
9524 esac
9525 echo "$as_me:$LINENO: checking for $ac_header" >&5
9526 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9527 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9528   echo $ECHO_N "(cached) $ECHO_C" >&6
9529 else
9530   eval "$as_ac_Header=\$ac_header_preproc"
9531 fi
9532 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9533 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9534
9535 fi
9536 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9537   cat >>confdefs.h <<_ACEOF
9538 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9539 _ACEOF
9540
9541 else
9542
9543 for ac_header in history.h
9544 do
9545 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9546 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9547   echo "$as_me:$LINENO: checking for $ac_header" >&5
9548 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9549 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9550   echo $ECHO_N "(cached) $ECHO_C" >&6
9551 fi
9552 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9553 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9554 else
9555   # Is the header compilable?
9556 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9557 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9558 cat >conftest.$ac_ext <<_ACEOF
9559 /* confdefs.h.  */
9560 _ACEOF
9561 cat confdefs.h >>conftest.$ac_ext
9562 cat >>conftest.$ac_ext <<_ACEOF
9563 /* end confdefs.h.  */
9564 $ac_includes_default
9565 #include <$ac_header>
9566 _ACEOF
9567 rm -f conftest.$ac_objext
9568 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9569   (eval $ac_compile) 2>conftest.er1
9570   ac_status=$?
9571   grep -v '^ *+' conftest.er1 >conftest.err
9572   rm -f conftest.er1
9573   cat conftest.err >&5
9574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9575   (exit $ac_status); } &&
9576          { ac_try='test -z "$ac_c_werror_flag"
9577                          || test ! -s conftest.err'
9578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9579   (eval $ac_try) 2>&5
9580   ac_status=$?
9581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9582   (exit $ac_status); }; } &&
9583          { ac_try='test -s conftest.$ac_objext'
9584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9585   (eval $ac_try) 2>&5
9586   ac_status=$?
9587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9588   (exit $ac_status); }; }; then
9589   ac_header_compiler=yes
9590 else
9591   echo "$as_me: failed program was:" >&5
9592 sed 's/^/| /' conftest.$ac_ext >&5
9593
9594 ac_header_compiler=no
9595 fi
9596 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9597 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9598 echo "${ECHO_T}$ac_header_compiler" >&6
9599
9600 # Is the header present?
9601 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9602 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9603 cat >conftest.$ac_ext <<_ACEOF
9604 /* confdefs.h.  */
9605 _ACEOF
9606 cat confdefs.h >>conftest.$ac_ext
9607 cat >>conftest.$ac_ext <<_ACEOF
9608 /* end confdefs.h.  */
9609 #include <$ac_header>
9610 _ACEOF
9611 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9612   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9613   ac_status=$?
9614   grep -v '^ *+' conftest.er1 >conftest.err
9615   rm -f conftest.er1
9616   cat conftest.err >&5
9617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9618   (exit $ac_status); } >/dev/null; then
9619   if test -s conftest.err; then
9620     ac_cpp_err=$ac_c_preproc_warn_flag
9621     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9622   else
9623     ac_cpp_err=
9624   fi
9625 else
9626   ac_cpp_err=yes
9627 fi
9628 if test -z "$ac_cpp_err"; then
9629   ac_header_preproc=yes
9630 else
9631   echo "$as_me: failed program was:" >&5
9632 sed 's/^/| /' conftest.$ac_ext >&5
9633
9634   ac_header_preproc=no
9635 fi
9636 rm -f conftest.err conftest.$ac_ext
9637 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9638 echo "${ECHO_T}$ac_header_preproc" >&6
9639
9640 # So?  What about this header?
9641 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9642   yes:no: )
9643     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9644 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9645     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9646 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9647     ac_header_preproc=yes
9648     ;;
9649   no:yes:* )
9650     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9651 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9652     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9653 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9654     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9655 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9656     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9657 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9658     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9659 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9660     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9661 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9662     (
9663       cat <<\_ASBOX
9664 ## ---------------------------------------- ##
9665 ## Report this to pgsql-bugs@postgresql.org ##
9666 ## ---------------------------------------- ##
9667 _ASBOX
9668     ) |
9669       sed "s/^/$as_me: WARNING:     /" >&2
9670     ;;
9671 esac
9672 echo "$as_me:$LINENO: checking for $ac_header" >&5
9673 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9674 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9675   echo $ECHO_N "(cached) $ECHO_C" >&6
9676 else
9677   eval "$as_ac_Header=\$ac_header_preproc"
9678 fi
9679 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9680 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9681
9682 fi
9683 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9684   cat >>confdefs.h <<_ACEOF
9685 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9686 _ACEOF
9687
9688 else
9689
9690 for ac_header in readline/history.h
9691 do
9692 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9693 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9694   echo "$as_me:$LINENO: checking for $ac_header" >&5
9695 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9696 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9697   echo $ECHO_N "(cached) $ECHO_C" >&6
9698 fi
9699 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9700 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9701 else
9702   # Is the header compilable?
9703 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9704 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9705 cat >conftest.$ac_ext <<_ACEOF
9706 /* confdefs.h.  */
9707 _ACEOF
9708 cat confdefs.h >>conftest.$ac_ext
9709 cat >>conftest.$ac_ext <<_ACEOF
9710 /* end confdefs.h.  */
9711 $ac_includes_default
9712 #include <$ac_header>
9713 _ACEOF
9714 rm -f conftest.$ac_objext
9715 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9716   (eval $ac_compile) 2>conftest.er1
9717   ac_status=$?
9718   grep -v '^ *+' conftest.er1 >conftest.err
9719   rm -f conftest.er1
9720   cat conftest.err >&5
9721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722   (exit $ac_status); } &&
9723          { ac_try='test -z "$ac_c_werror_flag"
9724                          || test ! -s conftest.err'
9725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9726   (eval $ac_try) 2>&5
9727   ac_status=$?
9728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729   (exit $ac_status); }; } &&
9730          { ac_try='test -s conftest.$ac_objext'
9731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9732   (eval $ac_try) 2>&5
9733   ac_status=$?
9734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9735   (exit $ac_status); }; }; then
9736   ac_header_compiler=yes
9737 else
9738   echo "$as_me: failed program was:" >&5
9739 sed 's/^/| /' conftest.$ac_ext >&5
9740
9741 ac_header_compiler=no
9742 fi
9743 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9744 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9745 echo "${ECHO_T}$ac_header_compiler" >&6
9746
9747 # Is the header present?
9748 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9749 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9750 cat >conftest.$ac_ext <<_ACEOF
9751 /* confdefs.h.  */
9752 _ACEOF
9753 cat confdefs.h >>conftest.$ac_ext
9754 cat >>conftest.$ac_ext <<_ACEOF
9755 /* end confdefs.h.  */
9756 #include <$ac_header>
9757 _ACEOF
9758 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9759   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9760   ac_status=$?
9761   grep -v '^ *+' conftest.er1 >conftest.err
9762   rm -f conftest.er1
9763   cat conftest.err >&5
9764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9765   (exit $ac_status); } >/dev/null; then
9766   if test -s conftest.err; then
9767     ac_cpp_err=$ac_c_preproc_warn_flag
9768     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9769   else
9770     ac_cpp_err=
9771   fi
9772 else
9773   ac_cpp_err=yes
9774 fi
9775 if test -z "$ac_cpp_err"; then
9776   ac_header_preproc=yes
9777 else
9778   echo "$as_me: failed program was:" >&5
9779 sed 's/^/| /' conftest.$ac_ext >&5
9780
9781   ac_header_preproc=no
9782 fi
9783 rm -f conftest.err conftest.$ac_ext
9784 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9785 echo "${ECHO_T}$ac_header_preproc" >&6
9786
9787 # So?  What about this header?
9788 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9789   yes:no: )
9790     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9791 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9792     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9793 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9794     ac_header_preproc=yes
9795     ;;
9796   no:yes:* )
9797     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9798 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9799     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9800 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9801     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9802 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9803     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9804 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9805     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9806 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9807     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9808 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9809     (
9810       cat <<\_ASBOX
9811 ## ---------------------------------------- ##
9812 ## Report this to pgsql-bugs@postgresql.org ##
9813 ## ---------------------------------------- ##
9814 _ASBOX
9815     ) |
9816       sed "s/^/$as_me: WARNING:     /" >&2
9817     ;;
9818 esac
9819 echo "$as_me:$LINENO: checking for $ac_header" >&5
9820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9821 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9822   echo $ECHO_N "(cached) $ECHO_C" >&6
9823 else
9824   eval "$as_ac_Header=\$ac_header_preproc"
9825 fi
9826 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9827 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9828
9829 fi
9830 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9831   cat >>confdefs.h <<_ACEOF
9832 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9833 _ACEOF
9834
9835 else
9836   { { echo "$as_me:$LINENO: error: history header not found
9837 If you have libedit already installed, see config.log for details on the
9838 failure.  It is possible the compiler isn't looking in the proper directory.
9839 Use --without-readline to disable libedit support." >&5
9840 echo "$as_me: error: history header not found
9841 If you have libedit already installed, see config.log for details on the
9842 failure.  It is possible the compiler isn't looking in the proper directory.
9843 Use --without-readline to disable libedit support." >&2;}
9844    { (exit 1); exit 1; }; }
9845 fi
9846
9847 done
9848
9849 fi
9850
9851 done
9852
9853 fi
9854
9855 done
9856
9857 fi
9858
9859 if test "$with_zlib" = yes; then
9860   if test "${ac_cv_header_zlib_h+set}" = set; then
9861   echo "$as_me:$LINENO: checking for zlib.h" >&5
9862 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9863 if test "${ac_cv_header_zlib_h+set}" = set; then
9864   echo $ECHO_N "(cached) $ECHO_C" >&6
9865 fi
9866 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9867 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9868 else
9869   # Is the header compilable?
9870 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9871 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9872 cat >conftest.$ac_ext <<_ACEOF
9873 /* confdefs.h.  */
9874 _ACEOF
9875 cat confdefs.h >>conftest.$ac_ext
9876 cat >>conftest.$ac_ext <<_ACEOF
9877 /* end confdefs.h.  */
9878 $ac_includes_default
9879 #include <zlib.h>
9880 _ACEOF
9881 rm -f conftest.$ac_objext
9882 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9883   (eval $ac_compile) 2>conftest.er1
9884   ac_status=$?
9885   grep -v '^ *+' conftest.er1 >conftest.err
9886   rm -f conftest.er1
9887   cat conftest.err >&5
9888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9889   (exit $ac_status); } &&
9890          { ac_try='test -z "$ac_c_werror_flag"
9891                          || test ! -s conftest.err'
9892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9893   (eval $ac_try) 2>&5
9894   ac_status=$?
9895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9896   (exit $ac_status); }; } &&
9897          { ac_try='test -s conftest.$ac_objext'
9898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9899   (eval $ac_try) 2>&5
9900   ac_status=$?
9901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9902   (exit $ac_status); }; }; then
9903   ac_header_compiler=yes
9904 else
9905   echo "$as_me: failed program was:" >&5
9906 sed 's/^/| /' conftest.$ac_ext >&5
9907
9908 ac_header_compiler=no
9909 fi
9910 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9911 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9912 echo "${ECHO_T}$ac_header_compiler" >&6
9913
9914 # Is the header present?
9915 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9916 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9917 cat >conftest.$ac_ext <<_ACEOF
9918 /* confdefs.h.  */
9919 _ACEOF
9920 cat confdefs.h >>conftest.$ac_ext
9921 cat >>conftest.$ac_ext <<_ACEOF
9922 /* end confdefs.h.  */
9923 #include <zlib.h>
9924 _ACEOF
9925 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9926   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9927   ac_status=$?
9928   grep -v '^ *+' conftest.er1 >conftest.err
9929   rm -f conftest.er1
9930   cat conftest.err >&5
9931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9932   (exit $ac_status); } >/dev/null; then
9933   if test -s conftest.err; then
9934     ac_cpp_err=$ac_c_preproc_warn_flag
9935     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9936   else
9937     ac_cpp_err=
9938   fi
9939 else
9940   ac_cpp_err=yes
9941 fi
9942 if test -z "$ac_cpp_err"; then
9943   ac_header_preproc=yes
9944 else
9945   echo "$as_me: failed program was:" >&5
9946 sed 's/^/| /' conftest.$ac_ext >&5
9947
9948   ac_header_preproc=no
9949 fi
9950 rm -f conftest.err conftest.$ac_ext
9951 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9952 echo "${ECHO_T}$ac_header_preproc" >&6
9953
9954 # So?  What about this header?
9955 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9956   yes:no: )
9957     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9958 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9959     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9960 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9961     ac_header_preproc=yes
9962     ;;
9963   no:yes:* )
9964     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9965 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9966     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9967 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9968     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9969 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9970     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9971 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9972     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9973 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9974     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9975 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9976     (
9977       cat <<\_ASBOX
9978 ## ---------------------------------------- ##
9979 ## Report this to pgsql-bugs@postgresql.org ##
9980 ## ---------------------------------------- ##
9981 _ASBOX
9982     ) |
9983       sed "s/^/$as_me: WARNING:     /" >&2
9984     ;;
9985 esac
9986 echo "$as_me:$LINENO: checking for zlib.h" >&5
9987 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9988 if test "${ac_cv_header_zlib_h+set}" = set; then
9989   echo $ECHO_N "(cached) $ECHO_C" >&6
9990 else
9991   ac_cv_header_zlib_h=$ac_header_preproc
9992 fi
9993 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9994 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9995
9996 fi
9997 if test $ac_cv_header_zlib_h = yes; then
9998   :
9999 else
10000   { { echo "$as_me:$LINENO: error: zlib header not found
10001 If you have zlib already installed, see config.log for details on the
10002 failure.  It is possible the compiler isn't looking in the proper directory.
10003 Use --without-zlib to disable zlib support." >&5
10004 echo "$as_me: error: zlib header not found
10005 If you have zlib already installed, see config.log for details on the
10006 failure.  It is possible the compiler isn't looking in the proper directory.
10007 Use --without-zlib to disable zlib support." >&2;}
10008    { (exit 1); exit 1; }; }
10009 fi
10010
10011
10012 fi
10013
10014 if test "$with_krb5" = yes ; then
10015   if test "${ac_cv_header_krb5_h+set}" = set; then
10016   echo "$as_me:$LINENO: checking for krb5.h" >&5
10017 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10018 if test "${ac_cv_header_krb5_h+set}" = set; then
10019   echo $ECHO_N "(cached) $ECHO_C" >&6
10020 fi
10021 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10022 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10023 else
10024   # Is the header compilable?
10025 echo "$as_me:$LINENO: checking krb5.h usability" >&5
10026 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
10027 cat >conftest.$ac_ext <<_ACEOF
10028 /* confdefs.h.  */
10029 _ACEOF
10030 cat confdefs.h >>conftest.$ac_ext
10031 cat >>conftest.$ac_ext <<_ACEOF
10032 /* end confdefs.h.  */
10033 $ac_includes_default
10034 #include <krb5.h>
10035 _ACEOF
10036 rm -f conftest.$ac_objext
10037 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10038   (eval $ac_compile) 2>conftest.er1
10039   ac_status=$?
10040   grep -v '^ *+' conftest.er1 >conftest.err
10041   rm -f conftest.er1
10042   cat conftest.err >&5
10043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10044   (exit $ac_status); } &&
10045          { ac_try='test -z "$ac_c_werror_flag"
10046                          || test ! -s conftest.err'
10047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10048   (eval $ac_try) 2>&5
10049   ac_status=$?
10050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10051   (exit $ac_status); }; } &&
10052          { ac_try='test -s conftest.$ac_objext'
10053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10054   (eval $ac_try) 2>&5
10055   ac_status=$?
10056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10057   (exit $ac_status); }; }; then
10058   ac_header_compiler=yes
10059 else
10060   echo "$as_me: failed program was:" >&5
10061 sed 's/^/| /' conftest.$ac_ext >&5
10062
10063 ac_header_compiler=no
10064 fi
10065 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10066 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10067 echo "${ECHO_T}$ac_header_compiler" >&6
10068
10069 # Is the header present?
10070 echo "$as_me:$LINENO: checking krb5.h presence" >&5
10071 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
10072 cat >conftest.$ac_ext <<_ACEOF
10073 /* confdefs.h.  */
10074 _ACEOF
10075 cat confdefs.h >>conftest.$ac_ext
10076 cat >>conftest.$ac_ext <<_ACEOF
10077 /* end confdefs.h.  */
10078 #include <krb5.h>
10079 _ACEOF
10080 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10081   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10082   ac_status=$?
10083   grep -v '^ *+' conftest.er1 >conftest.err
10084   rm -f conftest.er1
10085   cat conftest.err >&5
10086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087   (exit $ac_status); } >/dev/null; then
10088   if test -s conftest.err; then
10089     ac_cpp_err=$ac_c_preproc_warn_flag
10090     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10091   else
10092     ac_cpp_err=
10093   fi
10094 else
10095   ac_cpp_err=yes
10096 fi
10097 if test -z "$ac_cpp_err"; then
10098   ac_header_preproc=yes
10099 else
10100   echo "$as_me: failed program was:" >&5
10101 sed 's/^/| /' conftest.$ac_ext >&5
10102
10103   ac_header_preproc=no
10104 fi
10105 rm -f conftest.err conftest.$ac_ext
10106 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10107 echo "${ECHO_T}$ac_header_preproc" >&6
10108
10109 # So?  What about this header?
10110 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10111   yes:no: )
10112     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
10113 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10114     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
10115 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
10116     ac_header_preproc=yes
10117     ;;
10118   no:yes:* )
10119     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
10120 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
10121     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
10122 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
10123     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
10124 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
10125     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
10126 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10127     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
10128 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
10129     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
10130 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
10131     (
10132       cat <<\_ASBOX
10133 ## ---------------------------------------- ##
10134 ## Report this to pgsql-bugs@postgresql.org ##
10135 ## ---------------------------------------- ##
10136 _ASBOX
10137     ) |
10138       sed "s/^/$as_me: WARNING:     /" >&2
10139     ;;
10140 esac
10141 echo "$as_me:$LINENO: checking for krb5.h" >&5
10142 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10143 if test "${ac_cv_header_krb5_h+set}" = set; then
10144   echo $ECHO_N "(cached) $ECHO_C" >&6
10145 else
10146   ac_cv_header_krb5_h=$ac_header_preproc
10147 fi
10148 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10149 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10150
10151 fi
10152 if test $ac_cv_header_krb5_h = yes; then
10153   :
10154 else
10155   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
10156 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
10157    { (exit 1); exit 1; }; }
10158 fi
10159
10160
10161 fi
10162
10163 if test "$with_openssl" = yes ; then
10164   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10165   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10166 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10167 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10168   echo $ECHO_N "(cached) $ECHO_C" >&6
10169 fi
10170 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10171 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10172 else
10173   # Is the header compilable?
10174 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
10175 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
10176 cat >conftest.$ac_ext <<_ACEOF
10177 /* confdefs.h.  */
10178 _ACEOF
10179 cat confdefs.h >>conftest.$ac_ext
10180 cat >>conftest.$ac_ext <<_ACEOF
10181 /* end confdefs.h.  */
10182 $ac_includes_default
10183 #include <openssl/ssl.h>
10184 _ACEOF
10185 rm -f conftest.$ac_objext
10186 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10187   (eval $ac_compile) 2>conftest.er1
10188   ac_status=$?
10189   grep -v '^ *+' conftest.er1 >conftest.err
10190   rm -f conftest.er1
10191   cat conftest.err >&5
10192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10193   (exit $ac_status); } &&
10194          { ac_try='test -z "$ac_c_werror_flag"
10195                          || test ! -s conftest.err'
10196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10197   (eval $ac_try) 2>&5
10198   ac_status=$?
10199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10200   (exit $ac_status); }; } &&
10201          { ac_try='test -s conftest.$ac_objext'
10202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10203   (eval $ac_try) 2>&5
10204   ac_status=$?
10205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10206   (exit $ac_status); }; }; then
10207   ac_header_compiler=yes
10208 else
10209   echo "$as_me: failed program was:" >&5
10210 sed 's/^/| /' conftest.$ac_ext >&5
10211
10212 ac_header_compiler=no
10213 fi
10214 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10215 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10216 echo "${ECHO_T}$ac_header_compiler" >&6
10217
10218 # Is the header present?
10219 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10220 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
10221 cat >conftest.$ac_ext <<_ACEOF
10222 /* confdefs.h.  */
10223 _ACEOF
10224 cat confdefs.h >>conftest.$ac_ext
10225 cat >>conftest.$ac_ext <<_ACEOF
10226 /* end confdefs.h.  */
10227 #include <openssl/ssl.h>
10228 _ACEOF
10229 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10230   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10231   ac_status=$?
10232   grep -v '^ *+' conftest.er1 >conftest.err
10233   rm -f conftest.er1
10234   cat conftest.err >&5
10235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10236   (exit $ac_status); } >/dev/null; then
10237   if test -s conftest.err; then
10238     ac_cpp_err=$ac_c_preproc_warn_flag
10239     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10240   else
10241     ac_cpp_err=
10242   fi
10243 else
10244   ac_cpp_err=yes
10245 fi
10246 if test -z "$ac_cpp_err"; then
10247   ac_header_preproc=yes
10248 else
10249   echo "$as_me: failed program was:" >&5
10250 sed 's/^/| /' conftest.$ac_ext >&5
10251
10252   ac_header_preproc=no
10253 fi
10254 rm -f conftest.err conftest.$ac_ext
10255 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10256 echo "${ECHO_T}$ac_header_preproc" >&6
10257
10258 # So?  What about this header?
10259 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10260   yes:no: )
10261     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10262 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10263     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10264 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10265     ac_header_preproc=yes
10266     ;;
10267   no:yes:* )
10268     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10269 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10270     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10271 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10272     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10273 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10274     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10275 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10276     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10277 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10278     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10279 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10280     (
10281       cat <<\_ASBOX
10282 ## ---------------------------------------- ##
10283 ## Report this to pgsql-bugs@postgresql.org ##
10284 ## ---------------------------------------- ##
10285 _ASBOX
10286     ) |
10287       sed "s/^/$as_me: WARNING:     /" >&2
10288     ;;
10289 esac
10290 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10291 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10292 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10293   echo $ECHO_N "(cached) $ECHO_C" >&6
10294 else
10295   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10296 fi
10297 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10298 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10299
10300 fi
10301 if test $ac_cv_header_openssl_ssl_h = yes; then
10302   :
10303 else
10304   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10305 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10306    { (exit 1); exit 1; }; }
10307 fi
10308
10309
10310   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10311   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10312 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10313 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10314   echo $ECHO_N "(cached) $ECHO_C" >&6
10315 fi
10316 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10317 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10318 else
10319   # Is the header compilable?
10320 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10321 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10322 cat >conftest.$ac_ext <<_ACEOF
10323 /* confdefs.h.  */
10324 _ACEOF
10325 cat confdefs.h >>conftest.$ac_ext
10326 cat >>conftest.$ac_ext <<_ACEOF
10327 /* end confdefs.h.  */
10328 $ac_includes_default
10329 #include <openssl/err.h>
10330 _ACEOF
10331 rm -f conftest.$ac_objext
10332 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10333   (eval $ac_compile) 2>conftest.er1
10334   ac_status=$?
10335   grep -v '^ *+' conftest.er1 >conftest.err
10336   rm -f conftest.er1
10337   cat conftest.err >&5
10338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10339   (exit $ac_status); } &&
10340          { ac_try='test -z "$ac_c_werror_flag"
10341                          || test ! -s conftest.err'
10342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10343   (eval $ac_try) 2>&5
10344   ac_status=$?
10345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10346   (exit $ac_status); }; } &&
10347          { ac_try='test -s conftest.$ac_objext'
10348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10349   (eval $ac_try) 2>&5
10350   ac_status=$?
10351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10352   (exit $ac_status); }; }; then
10353   ac_header_compiler=yes
10354 else
10355   echo "$as_me: failed program was:" >&5
10356 sed 's/^/| /' conftest.$ac_ext >&5
10357
10358 ac_header_compiler=no
10359 fi
10360 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10361 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10362 echo "${ECHO_T}$ac_header_compiler" >&6
10363
10364 # Is the header present?
10365 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10366 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10367 cat >conftest.$ac_ext <<_ACEOF
10368 /* confdefs.h.  */
10369 _ACEOF
10370 cat confdefs.h >>conftest.$ac_ext
10371 cat >>conftest.$ac_ext <<_ACEOF
10372 /* end confdefs.h.  */
10373 #include <openssl/err.h>
10374 _ACEOF
10375 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10376   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10377   ac_status=$?
10378   grep -v '^ *+' conftest.er1 >conftest.err
10379   rm -f conftest.er1
10380   cat conftest.err >&5
10381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382   (exit $ac_status); } >/dev/null; then
10383   if test -s conftest.err; then
10384     ac_cpp_err=$ac_c_preproc_warn_flag
10385     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10386   else
10387     ac_cpp_err=
10388   fi
10389 else
10390   ac_cpp_err=yes
10391 fi
10392 if test -z "$ac_cpp_err"; then
10393   ac_header_preproc=yes
10394 else
10395   echo "$as_me: failed program was:" >&5
10396 sed 's/^/| /' conftest.$ac_ext >&5
10397
10398   ac_header_preproc=no
10399 fi
10400 rm -f conftest.err conftest.$ac_ext
10401 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10402 echo "${ECHO_T}$ac_header_preproc" >&6
10403
10404 # So?  What about this header?
10405 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10406   yes:no: )
10407     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10408 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10409     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10410 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10411     ac_header_preproc=yes
10412     ;;
10413   no:yes:* )
10414     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10415 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10416     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10417 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10418     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10419 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10420     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10421 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10422     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10423 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10424     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10425 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10426     (
10427       cat <<\_ASBOX
10428 ## ---------------------------------------- ##
10429 ## Report this to pgsql-bugs@postgresql.org ##
10430 ## ---------------------------------------- ##
10431 _ASBOX
10432     ) |
10433       sed "s/^/$as_me: WARNING:     /" >&2
10434     ;;
10435 esac
10436 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10437 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10438 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10439   echo $ECHO_N "(cached) $ECHO_C" >&6
10440 else
10441   ac_cv_header_openssl_err_h=$ac_header_preproc
10442 fi
10443 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10444 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10445
10446 fi
10447 if test $ac_cv_header_openssl_err_h = yes; then
10448   :
10449 else
10450   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10451 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10452    { (exit 1); exit 1; }; }
10453 fi
10454
10455
10456 fi
10457
10458 if test "$with_pam" = yes ; then
10459
10460 for ac_header in security/pam_appl.h
10461 do
10462 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10463 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10464   echo "$as_me:$LINENO: checking for $ac_header" >&5
10465 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10466 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10467   echo $ECHO_N "(cached) $ECHO_C" >&6
10468 fi
10469 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10470 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10471 else
10472   # Is the header compilable?
10473 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10474 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10475 cat >conftest.$ac_ext <<_ACEOF
10476 /* confdefs.h.  */
10477 _ACEOF
10478 cat confdefs.h >>conftest.$ac_ext
10479 cat >>conftest.$ac_ext <<_ACEOF
10480 /* end confdefs.h.  */
10481 $ac_includes_default
10482 #include <$ac_header>
10483 _ACEOF
10484 rm -f conftest.$ac_objext
10485 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10486   (eval $ac_compile) 2>conftest.er1
10487   ac_status=$?
10488   grep -v '^ *+' conftest.er1 >conftest.err
10489   rm -f conftest.er1
10490   cat conftest.err >&5
10491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10492   (exit $ac_status); } &&
10493          { ac_try='test -z "$ac_c_werror_flag"
10494                          || test ! -s conftest.err'
10495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10496   (eval $ac_try) 2>&5
10497   ac_status=$?
10498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10499   (exit $ac_status); }; } &&
10500          { ac_try='test -s conftest.$ac_objext'
10501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10502   (eval $ac_try) 2>&5
10503   ac_status=$?
10504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10505   (exit $ac_status); }; }; then
10506   ac_header_compiler=yes
10507 else
10508   echo "$as_me: failed program was:" >&5
10509 sed 's/^/| /' conftest.$ac_ext >&5
10510
10511 ac_header_compiler=no
10512 fi
10513 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10514 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10515 echo "${ECHO_T}$ac_header_compiler" >&6
10516
10517 # Is the header present?
10518 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10519 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10520 cat >conftest.$ac_ext <<_ACEOF
10521 /* confdefs.h.  */
10522 _ACEOF
10523 cat confdefs.h >>conftest.$ac_ext
10524 cat >>conftest.$ac_ext <<_ACEOF
10525 /* end confdefs.h.  */
10526 #include <$ac_header>
10527 _ACEOF
10528 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10530   ac_status=$?
10531   grep -v '^ *+' conftest.er1 >conftest.err
10532   rm -f conftest.er1
10533   cat conftest.err >&5
10534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10535   (exit $ac_status); } >/dev/null; then
10536   if test -s conftest.err; then
10537     ac_cpp_err=$ac_c_preproc_warn_flag
10538     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10539   else
10540     ac_cpp_err=
10541   fi
10542 else
10543   ac_cpp_err=yes
10544 fi
10545 if test -z "$ac_cpp_err"; then
10546   ac_header_preproc=yes
10547 else
10548   echo "$as_me: failed program was:" >&5
10549 sed 's/^/| /' conftest.$ac_ext >&5
10550
10551   ac_header_preproc=no
10552 fi
10553 rm -f conftest.err conftest.$ac_ext
10554 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10555 echo "${ECHO_T}$ac_header_preproc" >&6
10556
10557 # So?  What about this header?
10558 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10559   yes:no: )
10560     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10561 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10562     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10563 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10564     ac_header_preproc=yes
10565     ;;
10566   no:yes:* )
10567     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10568 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10569     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10570 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10571     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10572 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10573     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10574 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10575     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10576 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10577     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10578 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10579     (
10580       cat <<\_ASBOX
10581 ## ---------------------------------------- ##
10582 ## Report this to pgsql-bugs@postgresql.org ##
10583 ## ---------------------------------------- ##
10584 _ASBOX
10585     ) |
10586       sed "s/^/$as_me: WARNING:     /" >&2
10587     ;;
10588 esac
10589 echo "$as_me:$LINENO: checking for $ac_header" >&5
10590 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10591 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10592   echo $ECHO_N "(cached) $ECHO_C" >&6
10593 else
10594   eval "$as_ac_Header=\$ac_header_preproc"
10595 fi
10596 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10597 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10598
10599 fi
10600 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10601   cat >>confdefs.h <<_ACEOF
10602 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10603 _ACEOF
10604
10605 else
10606
10607 for ac_header in pam/pam_appl.h
10608 do
10609 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10610 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10611   echo "$as_me:$LINENO: checking for $ac_header" >&5
10612 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10613 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10614   echo $ECHO_N "(cached) $ECHO_C" >&6
10615 fi
10616 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10617 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10618 else
10619   # Is the header compilable?
10620 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10621 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10622 cat >conftest.$ac_ext <<_ACEOF
10623 /* confdefs.h.  */
10624 _ACEOF
10625 cat confdefs.h >>conftest.$ac_ext
10626 cat >>conftest.$ac_ext <<_ACEOF
10627 /* end confdefs.h.  */
10628 $ac_includes_default
10629 #include <$ac_header>
10630 _ACEOF
10631 rm -f conftest.$ac_objext
10632 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10633   (eval $ac_compile) 2>conftest.er1
10634   ac_status=$?
10635   grep -v '^ *+' conftest.er1 >conftest.err
10636   rm -f conftest.er1
10637   cat conftest.err >&5
10638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10639   (exit $ac_status); } &&
10640          { ac_try='test -z "$ac_c_werror_flag"
10641                          || test ! -s conftest.err'
10642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10643   (eval $ac_try) 2>&5
10644   ac_status=$?
10645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10646   (exit $ac_status); }; } &&
10647          { ac_try='test -s conftest.$ac_objext'
10648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10649   (eval $ac_try) 2>&5
10650   ac_status=$?
10651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10652   (exit $ac_status); }; }; then
10653   ac_header_compiler=yes
10654 else
10655   echo "$as_me: failed program was:" >&5
10656 sed 's/^/| /' conftest.$ac_ext >&5
10657
10658 ac_header_compiler=no
10659 fi
10660 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10661 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10662 echo "${ECHO_T}$ac_header_compiler" >&6
10663
10664 # Is the header present?
10665 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10666 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10667 cat >conftest.$ac_ext <<_ACEOF
10668 /* confdefs.h.  */
10669 _ACEOF
10670 cat confdefs.h >>conftest.$ac_ext
10671 cat >>conftest.$ac_ext <<_ACEOF
10672 /* end confdefs.h.  */
10673 #include <$ac_header>
10674 _ACEOF
10675 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10677   ac_status=$?
10678   grep -v '^ *+' conftest.er1 >conftest.err
10679   rm -f conftest.er1
10680   cat conftest.err >&5
10681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10682   (exit $ac_status); } >/dev/null; then
10683   if test -s conftest.err; then
10684     ac_cpp_err=$ac_c_preproc_warn_flag
10685     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10686   else
10687     ac_cpp_err=
10688   fi
10689 else
10690   ac_cpp_err=yes
10691 fi
10692 if test -z "$ac_cpp_err"; then
10693   ac_header_preproc=yes
10694 else
10695   echo "$as_me: failed program was:" >&5
10696 sed 's/^/| /' conftest.$ac_ext >&5
10697
10698   ac_header_preproc=no
10699 fi
10700 rm -f conftest.err conftest.$ac_ext
10701 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10702 echo "${ECHO_T}$ac_header_preproc" >&6
10703
10704 # So?  What about this header?
10705 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10706   yes:no: )
10707     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10708 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10709     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10710 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10711     ac_header_preproc=yes
10712     ;;
10713   no:yes:* )
10714     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10715 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10716     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10717 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10718     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10719 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10720     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10721 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10722     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10723 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10724     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10725 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10726     (
10727       cat <<\_ASBOX
10728 ## ---------------------------------------- ##
10729 ## Report this to pgsql-bugs@postgresql.org ##
10730 ## ---------------------------------------- ##
10731 _ASBOX
10732     ) |
10733       sed "s/^/$as_me: WARNING:     /" >&2
10734     ;;
10735 esac
10736 echo "$as_me:$LINENO: checking for $ac_header" >&5
10737 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10738 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10739   echo $ECHO_N "(cached) $ECHO_C" >&6
10740 else
10741   eval "$as_ac_Header=\$ac_header_preproc"
10742 fi
10743 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10744 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10745
10746 fi
10747 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10748   cat >>confdefs.h <<_ACEOF
10749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10750 _ACEOF
10751
10752 else
10753   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10754 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10755    { (exit 1); exit 1; }; }
10756 fi
10757
10758 done
10759
10760 fi
10761
10762 done
10763
10764 fi
10765
10766 if test "$with_bonjour" = yes ; then
10767   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10768   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10769 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10770 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10771   echo $ECHO_N "(cached) $ECHO_C" >&6
10772 fi
10773 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10774 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10775 else
10776   # Is the header compilable?
10777 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10778 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10779 cat >conftest.$ac_ext <<_ACEOF
10780 /* confdefs.h.  */
10781 _ACEOF
10782 cat confdefs.h >>conftest.$ac_ext
10783 cat >>conftest.$ac_ext <<_ACEOF
10784 /* end confdefs.h.  */
10785 $ac_includes_default
10786 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10787 _ACEOF
10788 rm -f conftest.$ac_objext
10789 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10790   (eval $ac_compile) 2>conftest.er1
10791   ac_status=$?
10792   grep -v '^ *+' conftest.er1 >conftest.err
10793   rm -f conftest.er1
10794   cat conftest.err >&5
10795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10796   (exit $ac_status); } &&
10797          { ac_try='test -z "$ac_c_werror_flag"
10798                          || test ! -s conftest.err'
10799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10800   (eval $ac_try) 2>&5
10801   ac_status=$?
10802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10803   (exit $ac_status); }; } &&
10804          { ac_try='test -s conftest.$ac_objext'
10805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10806   (eval $ac_try) 2>&5
10807   ac_status=$?
10808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10809   (exit $ac_status); }; }; then
10810   ac_header_compiler=yes
10811 else
10812   echo "$as_me: failed program was:" >&5
10813 sed 's/^/| /' conftest.$ac_ext >&5
10814
10815 ac_header_compiler=no
10816 fi
10817 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10818 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10819 echo "${ECHO_T}$ac_header_compiler" >&6
10820
10821 # Is the header present?
10822 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10823 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10824 cat >conftest.$ac_ext <<_ACEOF
10825 /* confdefs.h.  */
10826 _ACEOF
10827 cat confdefs.h >>conftest.$ac_ext
10828 cat >>conftest.$ac_ext <<_ACEOF
10829 /* end confdefs.h.  */
10830 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10831 _ACEOF
10832 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10833   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10834   ac_status=$?
10835   grep -v '^ *+' conftest.er1 >conftest.err
10836   rm -f conftest.er1
10837   cat conftest.err >&5
10838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10839   (exit $ac_status); } >/dev/null; then
10840   if test -s conftest.err; then
10841     ac_cpp_err=$ac_c_preproc_warn_flag
10842     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10843   else
10844     ac_cpp_err=
10845   fi
10846 else
10847   ac_cpp_err=yes
10848 fi
10849 if test -z "$ac_cpp_err"; then
10850   ac_header_preproc=yes
10851 else
10852   echo "$as_me: failed program was:" >&5
10853 sed 's/^/| /' conftest.$ac_ext >&5
10854
10855   ac_header_preproc=no
10856 fi
10857 rm -f conftest.err conftest.$ac_ext
10858 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10859 echo "${ECHO_T}$ac_header_preproc" >&6
10860
10861 # So?  What about this header?
10862 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10863   yes:no: )
10864     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10865 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10866     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10867 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10868     ac_header_preproc=yes
10869     ;;
10870   no:yes:* )
10871     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10872 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10873     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10874 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10875     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10876 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10877     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10878 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10879     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10880 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10881     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10882 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10883     (
10884       cat <<\_ASBOX
10885 ## ---------------------------------------- ##
10886 ## Report this to pgsql-bugs@postgresql.org ##
10887 ## ---------------------------------------- ##
10888 _ASBOX
10889     ) |
10890       sed "s/^/$as_me: WARNING:     /" >&2
10891     ;;
10892 esac
10893 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10894 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10895 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10896   echo $ECHO_N "(cached) $ECHO_C" >&6
10897 else
10898   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10899 fi
10900 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10901 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10902
10903 fi
10904 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10905   :
10906 else
10907   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10908 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10909    { (exit 1); exit 1; }; }
10910 fi
10911
10912
10913 fi
10914
10915
10916 ##
10917 ## Types, structures, compiler characteristics
10918 ##
10919
10920  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10921 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10922 if test "${ac_cv_c_const+set}" = set; then
10923   echo $ECHO_N "(cached) $ECHO_C" >&6
10924 else
10925   cat >conftest.$ac_ext <<_ACEOF
10926 /* confdefs.h.  */
10927 _ACEOF
10928 cat confdefs.h >>conftest.$ac_ext
10929 cat >>conftest.$ac_ext <<_ACEOF
10930 /* end confdefs.h.  */
10931
10932 int
10933 main ()
10934 {
10935 /* FIXME: Include the comments suggested by Paul. */
10936 #ifndef __cplusplus
10937   /* Ultrix mips cc rejects this.  */
10938   typedef int charset[2];
10939   const charset x;
10940   /* SunOS 4.1.1 cc rejects this.  */
10941   char const *const *ccp;
10942   char **p;
10943   /* NEC SVR4.0.2 mips cc rejects this.  */
10944   struct point {int x, y;};
10945   static struct point const zero = {0,0};
10946   /* AIX XL C 1.02.0.0 rejects this.
10947      It does not let you subtract one const X* pointer from another in
10948      an arm of an if-expression whose if-part is not a constant
10949      expression */
10950   const char *g = "string";
10951   ccp = &g + (g ? g-g : 0);
10952   /* HPUX 7.0 cc rejects these. */
10953   ++ccp;
10954   p = (char**) ccp;
10955   ccp = (char const *const *) p;
10956   { /* SCO 3.2v4 cc rejects this.  */
10957     char *t;
10958     char const *s = 0 ? (char *) 0 : (char const *) 0;
10959
10960     *t++ = 0;
10961   }
10962   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10963     int x[] = {25, 17};
10964     const int *foo = &x[0];
10965     ++foo;
10966   }
10967   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10968     typedef const int *iptr;
10969     iptr p = 0;
10970     ++p;
10971   }
10972   { /* AIX XL C 1.02.0.0 rejects this saying
10973        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10974     struct s { int j; const int *ap[3]; };
10975     struct s *b; b->j = 5;
10976   }
10977   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10978     const int foo = 10;
10979   }
10980 #endif
10981
10982   ;
10983   return 0;
10984 }
10985 _ACEOF
10986 rm -f conftest.$ac_objext
10987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10988   (eval $ac_compile) 2>conftest.er1
10989   ac_status=$?
10990   grep -v '^ *+' conftest.er1 >conftest.err
10991   rm -f conftest.er1
10992   cat conftest.err >&5
10993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10994   (exit $ac_status); } &&
10995          { ac_try='test -z "$ac_c_werror_flag"
10996                          || test ! -s conftest.err'
10997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10998   (eval $ac_try) 2>&5
10999   ac_status=$?
11000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11001   (exit $ac_status); }; } &&
11002          { ac_try='test -s conftest.$ac_objext'
11003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11004   (eval $ac_try) 2>&5
11005   ac_status=$?
11006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11007   (exit $ac_status); }; }; then
11008   ac_cv_c_const=yes
11009 else
11010   echo "$as_me: failed program was:" >&5
11011 sed 's/^/| /' conftest.$ac_ext >&5
11012
11013 ac_cv_c_const=no
11014 fi
11015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11016 fi
11017 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
11018 echo "${ECHO_T}$ac_cv_c_const" >&6
11019 if test $ac_cv_c_const = no; then
11020
11021 cat >>confdefs.h <<\_ACEOF
11022 #define const
11023 _ACEOF
11024
11025 fi
11026
11027
11028 echo "$as_me:$LINENO: checking for inline" >&5
11029 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11030 if test "${ac_cv_c_inline+set}" = set; then
11031   echo $ECHO_N "(cached) $ECHO_C" >&6
11032 else
11033   ac_cv_c_inline=no
11034 for ac_kw in inline __inline__ __inline; do
11035   cat >conftest.$ac_ext <<_ACEOF
11036 /* confdefs.h.  */
11037 _ACEOF
11038 cat confdefs.h >>conftest.$ac_ext
11039 cat >>conftest.$ac_ext <<_ACEOF
11040 /* end confdefs.h.  */
11041 #ifndef __cplusplus
11042 typedef int foo_t;
11043 static $ac_kw foo_t static_foo () {return 0; }
11044 $ac_kw int foo () {return 0; }
11045 #endif
11046
11047 _ACEOF
11048 rm -f conftest.$ac_objext
11049 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11050   (eval $ac_compile) 2>conftest.er1
11051   ac_status=$?
11052   grep -v '^ *+' conftest.er1 >conftest.err
11053   rm -f conftest.er1
11054   cat conftest.err >&5
11055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11056   (exit $ac_status); } &&
11057          { ac_try='test -z "$ac_c_werror_flag"
11058                          || test ! -s conftest.err'
11059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11060   (eval $ac_try) 2>&5
11061   ac_status=$?
11062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11063   (exit $ac_status); }; } &&
11064          { ac_try='test -s conftest.$ac_objext'
11065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11066   (eval $ac_try) 2>&5
11067   ac_status=$?
11068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11069   (exit $ac_status); }; }; then
11070   ac_cv_c_inline=$ac_kw; break
11071 else
11072   echo "$as_me: failed program was:" >&5
11073 sed 's/^/| /' conftest.$ac_ext >&5
11074
11075 fi
11076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11077 done
11078
11079 fi
11080 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11081 echo "${ECHO_T}$ac_cv_c_inline" >&6
11082 case $ac_cv_c_inline in
11083   inline | yes) ;;
11084   no)
11085 cat >>confdefs.h <<\_ACEOF
11086 #define inline
11087 _ACEOF
11088  ;;
11089   *)  cat >>confdefs.h <<_ACEOF
11090 #define inline $ac_cv_c_inline
11091 _ACEOF
11092  ;;
11093 esac
11094
11095 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11096 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11097 if test "${ac_cv_c_stringize+set}" = set; then
11098   echo $ECHO_N "(cached) $ECHO_C" >&6
11099 else
11100   cat >conftest.$ac_ext <<_ACEOF
11101 /* confdefs.h.  */
11102 _ACEOF
11103 cat confdefs.h >>conftest.$ac_ext
11104 cat >>conftest.$ac_ext <<_ACEOF
11105 /* end confdefs.h.  */
11106 #define x(y) #y
11107
11108 char *s = x(teststring);
11109 _ACEOF
11110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11111   $EGREP "#teststring" >/dev/null 2>&1; then
11112   ac_cv_c_stringize=no
11113 else
11114   ac_cv_c_stringize=yes
11115 fi
11116 rm -f conftest*
11117
11118 fi
11119 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11120 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11121 if test $ac_cv_c_stringize = yes; then
11122
11123 cat >>confdefs.h <<\_ACEOF
11124 #define HAVE_STRINGIZE 1
11125 _ACEOF
11126
11127 fi
11128
11129 echo "$as_me:$LINENO: checking for signed types" >&5
11130 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11131 if test "${pgac_cv_c_signed+set}" = set; then
11132   echo $ECHO_N "(cached) $ECHO_C" >&6
11133 else
11134   cat >conftest.$ac_ext <<_ACEOF
11135 /* confdefs.h.  */
11136 _ACEOF
11137 cat confdefs.h >>conftest.$ac_ext
11138 cat >>conftest.$ac_ext <<_ACEOF
11139 /* end confdefs.h.  */
11140
11141 int
11142 main ()
11143 {
11144 signed char c; signed short s; signed int i;
11145   ;
11146   return 0;
11147 }
11148 _ACEOF
11149 rm -f conftest.$ac_objext
11150 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11151   (eval $ac_compile) 2>conftest.er1
11152   ac_status=$?
11153   grep -v '^ *+' conftest.er1 >conftest.err
11154   rm -f conftest.er1
11155   cat conftest.err >&5
11156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11157   (exit $ac_status); } &&
11158          { ac_try='test -z "$ac_c_werror_flag"
11159                          || test ! -s conftest.err'
11160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11161   (eval $ac_try) 2>&5
11162   ac_status=$?
11163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11164   (exit $ac_status); }; } &&
11165          { ac_try='test -s conftest.$ac_objext'
11166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11167   (eval $ac_try) 2>&5
11168   ac_status=$?
11169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11170   (exit $ac_status); }; }; then
11171   pgac_cv_c_signed=yes
11172 else
11173   echo "$as_me: failed program was:" >&5
11174 sed 's/^/| /' conftest.$ac_ext >&5
11175
11176 pgac_cv_c_signed=no
11177 fi
11178 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11179 fi
11180 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11181 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11182 if test x"$pgac_cv_c_signed" = xno ; then
11183
11184 cat >>confdefs.h <<\_ACEOF
11185 #define signed
11186 _ACEOF
11187
11188 fi
11189 echo "$as_me:$LINENO: checking for working volatile" >&5
11190 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11191 if test "${ac_cv_c_volatile+set}" = set; then
11192   echo $ECHO_N "(cached) $ECHO_C" >&6
11193 else
11194   cat >conftest.$ac_ext <<_ACEOF
11195 /* confdefs.h.  */
11196 _ACEOF
11197 cat confdefs.h >>conftest.$ac_ext
11198 cat >>conftest.$ac_ext <<_ACEOF
11199 /* end confdefs.h.  */
11200
11201 int
11202 main ()
11203 {
11204
11205 volatile int x;
11206 int * volatile y;
11207   ;
11208   return 0;
11209 }
11210 _ACEOF
11211 rm -f conftest.$ac_objext
11212 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11213   (eval $ac_compile) 2>conftest.er1
11214   ac_status=$?
11215   grep -v '^ *+' conftest.er1 >conftest.err
11216   rm -f conftest.er1
11217   cat conftest.err >&5
11218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11219   (exit $ac_status); } &&
11220          { ac_try='test -z "$ac_c_werror_flag"
11221                          || test ! -s conftest.err'
11222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11223   (eval $ac_try) 2>&5
11224   ac_status=$?
11225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11226   (exit $ac_status); }; } &&
11227          { ac_try='test -s conftest.$ac_objext'
11228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11229   (eval $ac_try) 2>&5
11230   ac_status=$?
11231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232   (exit $ac_status); }; }; then
11233   ac_cv_c_volatile=yes
11234 else
11235   echo "$as_me: failed program was:" >&5
11236 sed 's/^/| /' conftest.$ac_ext >&5
11237
11238 ac_cv_c_volatile=no
11239 fi
11240 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11241 fi
11242 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11243 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11244 if test $ac_cv_c_volatile = no; then
11245
11246 cat >>confdefs.h <<\_ACEOF
11247 #define volatile
11248 _ACEOF
11249
11250 fi
11251
11252 echo "$as_me:$LINENO: checking for __func__" >&5
11253 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11254 if test "${pgac_cv_funcname_func_support+set}" = set; then
11255   echo $ECHO_N "(cached) $ECHO_C" >&6
11256 else
11257   cat >conftest.$ac_ext <<_ACEOF
11258 /* confdefs.h.  */
11259 _ACEOF
11260 cat confdefs.h >>conftest.$ac_ext
11261 cat >>conftest.$ac_ext <<_ACEOF
11262 /* end confdefs.h.  */
11263 #include <stdio.h>
11264 int
11265 main ()
11266 {
11267 printf("%s\n", __func__);
11268   ;
11269   return 0;
11270 }
11271 _ACEOF
11272 rm -f conftest.$ac_objext
11273 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11274   (eval $ac_compile) 2>conftest.er1
11275   ac_status=$?
11276   grep -v '^ *+' conftest.er1 >conftest.err
11277   rm -f conftest.er1
11278   cat conftest.err >&5
11279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11280   (exit $ac_status); } &&
11281          { ac_try='test -z "$ac_c_werror_flag"
11282                          || test ! -s conftest.err'
11283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11284   (eval $ac_try) 2>&5
11285   ac_status=$?
11286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11287   (exit $ac_status); }; } &&
11288          { ac_try='test -s conftest.$ac_objext'
11289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11290   (eval $ac_try) 2>&5
11291   ac_status=$?
11292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11293   (exit $ac_status); }; }; then
11294   pgac_cv_funcname_func_support=yes
11295 else
11296   echo "$as_me: failed program was:" >&5
11297 sed 's/^/| /' conftest.$ac_ext >&5
11298
11299 pgac_cv_funcname_func_support=no
11300 fi
11301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11302 fi
11303 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11304 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11305 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11306
11307 cat >>confdefs.h <<\_ACEOF
11308 #define HAVE_FUNCNAME__FUNC 1
11309 _ACEOF
11310
11311 else
11312 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11313 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11314 if test "${pgac_cv_funcname_function_support+set}" = set; then
11315   echo $ECHO_N "(cached) $ECHO_C" >&6
11316 else
11317   cat >conftest.$ac_ext <<_ACEOF
11318 /* confdefs.h.  */
11319 _ACEOF
11320 cat confdefs.h >>conftest.$ac_ext
11321 cat >>conftest.$ac_ext <<_ACEOF
11322 /* end confdefs.h.  */
11323 #include <stdio.h>
11324 int
11325 main ()
11326 {
11327 printf("%s\n", __FUNCTION__);
11328   ;
11329   return 0;
11330 }
11331 _ACEOF
11332 rm -f conftest.$ac_objext
11333 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11334   (eval $ac_compile) 2>conftest.er1
11335   ac_status=$?
11336   grep -v '^ *+' conftest.er1 >conftest.err
11337   rm -f conftest.er1
11338   cat conftest.err >&5
11339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11340   (exit $ac_status); } &&
11341          { ac_try='test -z "$ac_c_werror_flag"
11342                          || test ! -s conftest.err'
11343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11344   (eval $ac_try) 2>&5
11345   ac_status=$?
11346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11347   (exit $ac_status); }; } &&
11348          { ac_try='test -s conftest.$ac_objext'
11349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11350   (eval $ac_try) 2>&5
11351   ac_status=$?
11352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11353   (exit $ac_status); }; }; then
11354   pgac_cv_funcname_function_support=yes
11355 else
11356   echo "$as_me: failed program was:" >&5
11357 sed 's/^/| /' conftest.$ac_ext >&5
11358
11359 pgac_cv_funcname_function_support=no
11360 fi
11361 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11362 fi
11363 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11364 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11365 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11366
11367 cat >>confdefs.h <<\_ACEOF
11368 #define HAVE_FUNCNAME__FUNCTION 1
11369 _ACEOF
11370
11371 fi
11372 fi
11373 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11374 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11375 if test "${ac_cv_struct_tm+set}" = set; then
11376   echo $ECHO_N "(cached) $ECHO_C" >&6
11377 else
11378   cat >conftest.$ac_ext <<_ACEOF
11379 /* confdefs.h.  */
11380 _ACEOF
11381 cat confdefs.h >>conftest.$ac_ext
11382 cat >>conftest.$ac_ext <<_ACEOF
11383 /* end confdefs.h.  */
11384 #include <sys/types.h>
11385 #include <time.h>
11386
11387 int
11388 main ()
11389 {
11390 struct tm *tp; tp->tm_sec;
11391   ;
11392   return 0;
11393 }
11394 _ACEOF
11395 rm -f conftest.$ac_objext
11396 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11397   (eval $ac_compile) 2>conftest.er1
11398   ac_status=$?
11399   grep -v '^ *+' conftest.er1 >conftest.err
11400   rm -f conftest.er1
11401   cat conftest.err >&5
11402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11403   (exit $ac_status); } &&
11404          { ac_try='test -z "$ac_c_werror_flag"
11405                          || test ! -s conftest.err'
11406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11407   (eval $ac_try) 2>&5
11408   ac_status=$?
11409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410   (exit $ac_status); }; } &&
11411          { ac_try='test -s conftest.$ac_objext'
11412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11413   (eval $ac_try) 2>&5
11414   ac_status=$?
11415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416   (exit $ac_status); }; }; then
11417   ac_cv_struct_tm=time.h
11418 else
11419   echo "$as_me: failed program was:" >&5
11420 sed 's/^/| /' conftest.$ac_ext >&5
11421
11422 ac_cv_struct_tm=sys/time.h
11423 fi
11424 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11425 fi
11426 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11427 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11428 if test $ac_cv_struct_tm = sys/time.h; then
11429
11430 cat >>confdefs.h <<\_ACEOF
11431 #define TM_IN_SYS_TIME 1
11432 _ACEOF
11433
11434 fi
11435
11436 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11437 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11438 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11439   echo $ECHO_N "(cached) $ECHO_C" >&6
11440 else
11441   cat >conftest.$ac_ext <<_ACEOF
11442 /* confdefs.h.  */
11443 _ACEOF
11444 cat confdefs.h >>conftest.$ac_ext
11445 cat >>conftest.$ac_ext <<_ACEOF
11446 /* end confdefs.h.  */
11447 #include <sys/types.h>
11448 #include <$ac_cv_struct_tm>
11449
11450
11451 int
11452 main ()
11453 {
11454 static struct tm ac_aggr;
11455 if (ac_aggr.tm_zone)
11456 return 0;
11457   ;
11458   return 0;
11459 }
11460 _ACEOF
11461 rm -f conftest.$ac_objext
11462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11463   (eval $ac_compile) 2>conftest.er1
11464   ac_status=$?
11465   grep -v '^ *+' conftest.er1 >conftest.err
11466   rm -f conftest.er1
11467   cat conftest.err >&5
11468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469   (exit $ac_status); } &&
11470          { ac_try='test -z "$ac_c_werror_flag"
11471                          || test ! -s conftest.err'
11472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11473   (eval $ac_try) 2>&5
11474   ac_status=$?
11475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476   (exit $ac_status); }; } &&
11477          { ac_try='test -s conftest.$ac_objext'
11478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11479   (eval $ac_try) 2>&5
11480   ac_status=$?
11481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482   (exit $ac_status); }; }; then
11483   ac_cv_member_struct_tm_tm_zone=yes
11484 else
11485   echo "$as_me: failed program was:" >&5
11486 sed 's/^/| /' conftest.$ac_ext >&5
11487
11488 cat >conftest.$ac_ext <<_ACEOF
11489 /* confdefs.h.  */
11490 _ACEOF
11491 cat confdefs.h >>conftest.$ac_ext
11492 cat >>conftest.$ac_ext <<_ACEOF
11493 /* end confdefs.h.  */
11494 #include <sys/types.h>
11495 #include <$ac_cv_struct_tm>
11496
11497
11498 int
11499 main ()
11500 {
11501 static struct tm ac_aggr;
11502 if (sizeof ac_aggr.tm_zone)
11503 return 0;
11504   ;
11505   return 0;
11506 }
11507 _ACEOF
11508 rm -f conftest.$ac_objext
11509 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11510   (eval $ac_compile) 2>conftest.er1
11511   ac_status=$?
11512   grep -v '^ *+' conftest.er1 >conftest.err
11513   rm -f conftest.er1
11514   cat conftest.err >&5
11515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11516   (exit $ac_status); } &&
11517          { ac_try='test -z "$ac_c_werror_flag"
11518                          || test ! -s conftest.err'
11519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11520   (eval $ac_try) 2>&5
11521   ac_status=$?
11522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11523   (exit $ac_status); }; } &&
11524          { ac_try='test -s conftest.$ac_objext'
11525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11526   (eval $ac_try) 2>&5
11527   ac_status=$?
11528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11529   (exit $ac_status); }; }; then
11530   ac_cv_member_struct_tm_tm_zone=yes
11531 else
11532   echo "$as_me: failed program was:" >&5
11533 sed 's/^/| /' conftest.$ac_ext >&5
11534
11535 ac_cv_member_struct_tm_tm_zone=no
11536 fi
11537 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11538 fi
11539 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11540 fi
11541 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11542 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11543 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11544
11545 cat >>confdefs.h <<_ACEOF
11546 #define HAVE_STRUCT_TM_TM_ZONE 1
11547 _ACEOF
11548
11549
11550 fi
11551
11552 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11553
11554 cat >>confdefs.h <<\_ACEOF
11555 #define HAVE_TM_ZONE 1
11556 _ACEOF
11557
11558 fi
11559 echo "$as_me:$LINENO: checking for tzname" >&5
11560 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11561 if test "${ac_cv_var_tzname+set}" = set; then
11562   echo $ECHO_N "(cached) $ECHO_C" >&6
11563 else
11564   cat >conftest.$ac_ext <<_ACEOF
11565 /* confdefs.h.  */
11566 _ACEOF
11567 cat confdefs.h >>conftest.$ac_ext
11568 cat >>conftest.$ac_ext <<_ACEOF
11569 /* end confdefs.h.  */
11570 #include <time.h>
11571 #ifndef tzname /* For SGI.  */
11572 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11573 #endif
11574
11575 int
11576 main ()
11577 {
11578 atoi(*tzname);
11579   ;
11580   return 0;
11581 }
11582 _ACEOF
11583 rm -f conftest.$ac_objext conftest$ac_exeext
11584 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11585   (eval $ac_link) 2>conftest.er1
11586   ac_status=$?
11587   grep -v '^ *+' conftest.er1 >conftest.err
11588   rm -f conftest.er1
11589   cat conftest.err >&5
11590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591   (exit $ac_status); } &&
11592          { ac_try='test -z "$ac_c_werror_flag"
11593                          || test ! -s conftest.err'
11594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11595   (eval $ac_try) 2>&5
11596   ac_status=$?
11597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598   (exit $ac_status); }; } &&
11599          { ac_try='test -s conftest$ac_exeext'
11600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11601   (eval $ac_try) 2>&5
11602   ac_status=$?
11603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604   (exit $ac_status); }; }; then
11605   ac_cv_var_tzname=yes
11606 else
11607   echo "$as_me: failed program was:" >&5
11608 sed 's/^/| /' conftest.$ac_ext >&5
11609
11610 ac_cv_var_tzname=no
11611 fi
11612 rm -f conftest.err conftest.$ac_objext \
11613       conftest$ac_exeext conftest.$ac_ext
11614 fi
11615 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11616 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11617 if test $ac_cv_var_tzname = yes; then
11618
11619 cat >>confdefs.h <<\_ACEOF
11620 #define HAVE_TZNAME 1
11621 _ACEOF
11622
11623 fi
11624
11625 echo "$as_me:$LINENO: checking for union semun" >&5
11626 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11627 if test "${ac_cv_type_union_semun+set}" = set; then
11628   echo $ECHO_N "(cached) $ECHO_C" >&6
11629 else
11630   cat >conftest.$ac_ext <<_ACEOF
11631 /* confdefs.h.  */
11632 _ACEOF
11633 cat confdefs.h >>conftest.$ac_ext
11634 cat >>conftest.$ac_ext <<_ACEOF
11635 /* end confdefs.h.  */
11636 #include <sys/types.h>
11637 #include <sys/ipc.h>
11638 #include <sys/sem.h>
11639
11640 int
11641 main ()
11642 {
11643 if ((union semun *) 0)
11644   return 0;
11645 if (sizeof (union semun))
11646   return 0;
11647   ;
11648   return 0;
11649 }
11650 _ACEOF
11651 rm -f conftest.$ac_objext
11652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11653   (eval $ac_compile) 2>conftest.er1
11654   ac_status=$?
11655   grep -v '^ *+' conftest.er1 >conftest.err
11656   rm -f conftest.er1
11657   cat conftest.err >&5
11658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11659   (exit $ac_status); } &&
11660          { ac_try='test -z "$ac_c_werror_flag"
11661                          || test ! -s conftest.err'
11662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11663   (eval $ac_try) 2>&5
11664   ac_status=$?
11665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666   (exit $ac_status); }; } &&
11667          { ac_try='test -s conftest.$ac_objext'
11668   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11669   (eval $ac_try) 2>&5
11670   ac_status=$?
11671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672   (exit $ac_status); }; }; then
11673   ac_cv_type_union_semun=yes
11674 else
11675   echo "$as_me: failed program was:" >&5
11676 sed 's/^/| /' conftest.$ac_ext >&5
11677
11678 ac_cv_type_union_semun=no
11679 fi
11680 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11681 fi
11682 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11683 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11684 if test $ac_cv_type_union_semun = yes; then
11685
11686 cat >>confdefs.h <<_ACEOF
11687 #define HAVE_UNION_SEMUN 1
11688 _ACEOF
11689
11690
11691 fi
11692
11693 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11694 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11695 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11696   echo $ECHO_N "(cached) $ECHO_C" >&6
11697 else
11698   cat >conftest.$ac_ext <<_ACEOF
11699 /* confdefs.h.  */
11700 _ACEOF
11701 cat confdefs.h >>conftest.$ac_ext
11702 cat >>conftest.$ac_ext <<_ACEOF
11703 /* end confdefs.h.  */
11704 #include <sys/types.h>
11705 #ifdef HAVE_SYS_UN_H
11706 #include <sys/un.h>
11707 #endif
11708
11709
11710 int
11711 main ()
11712 {
11713 if ((struct sockaddr_un *) 0)
11714   return 0;
11715 if (sizeof (struct sockaddr_un))
11716   return 0;
11717   ;
11718   return 0;
11719 }
11720 _ACEOF
11721 rm -f conftest.$ac_objext
11722 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11723   (eval $ac_compile) 2>conftest.er1
11724   ac_status=$?
11725   grep -v '^ *+' conftest.er1 >conftest.err
11726   rm -f conftest.er1
11727   cat conftest.err >&5
11728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11729   (exit $ac_status); } &&
11730          { ac_try='test -z "$ac_c_werror_flag"
11731                          || test ! -s conftest.err'
11732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11733   (eval $ac_try) 2>&5
11734   ac_status=$?
11735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11736   (exit $ac_status); }; } &&
11737          { ac_try='test -s conftest.$ac_objext'
11738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11739   (eval $ac_try) 2>&5
11740   ac_status=$?
11741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11742   (exit $ac_status); }; }; then
11743   ac_cv_type_struct_sockaddr_un=yes
11744 else
11745   echo "$as_me: failed program was:" >&5
11746 sed 's/^/| /' conftest.$ac_ext >&5
11747
11748 ac_cv_type_struct_sockaddr_un=no
11749 fi
11750 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11751 fi
11752 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11753 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11754 if test $ac_cv_type_struct_sockaddr_un = yes; then
11755
11756 cat >>confdefs.h <<_ACEOF
11757 #define HAVE_STRUCT_SOCKADDR_UN 1
11758 _ACEOF
11759
11760
11761 cat >>confdefs.h <<\_ACEOF
11762 #define HAVE_UNIX_SOCKETS 1
11763 _ACEOF
11764
11765 fi
11766
11767 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11768 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11769 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11770   echo $ECHO_N "(cached) $ECHO_C" >&6
11771 else
11772   cat >conftest.$ac_ext <<_ACEOF
11773 /* confdefs.h.  */
11774 _ACEOF
11775 cat confdefs.h >>conftest.$ac_ext
11776 cat >>conftest.$ac_ext <<_ACEOF
11777 /* end confdefs.h.  */
11778 #include <sys/types.h>
11779 #ifdef HAVE_SYS_SOCKET_H
11780 #include <sys/socket.h>
11781 #endif
11782
11783
11784 int
11785 main ()
11786 {
11787 if ((struct sockaddr_storage *) 0)
11788   return 0;
11789 if (sizeof (struct sockaddr_storage))
11790   return 0;
11791   ;
11792   return 0;
11793 }
11794 _ACEOF
11795 rm -f conftest.$ac_objext
11796 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11797   (eval $ac_compile) 2>conftest.er1
11798   ac_status=$?
11799   grep -v '^ *+' conftest.er1 >conftest.err
11800   rm -f conftest.er1
11801   cat conftest.err >&5
11802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11803   (exit $ac_status); } &&
11804          { ac_try='test -z "$ac_c_werror_flag"
11805                          || test ! -s conftest.err'
11806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11807   (eval $ac_try) 2>&5
11808   ac_status=$?
11809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11810   (exit $ac_status); }; } &&
11811          { ac_try='test -s conftest.$ac_objext'
11812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11813   (eval $ac_try) 2>&5
11814   ac_status=$?
11815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11816   (exit $ac_status); }; }; then
11817   ac_cv_type_struct_sockaddr_storage=yes
11818 else
11819   echo "$as_me: failed program was:" >&5
11820 sed 's/^/| /' conftest.$ac_ext >&5
11821
11822 ac_cv_type_struct_sockaddr_storage=no
11823 fi
11824 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11825 fi
11826 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11827 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11828 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11829
11830 cat >>confdefs.h <<_ACEOF
11831 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11832 _ACEOF
11833
11834
11835 fi
11836
11837 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11838 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11839 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11840   echo $ECHO_N "(cached) $ECHO_C" >&6
11841 else
11842   cat >conftest.$ac_ext <<_ACEOF
11843 /* confdefs.h.  */
11844 _ACEOF
11845 cat confdefs.h >>conftest.$ac_ext
11846 cat >>conftest.$ac_ext <<_ACEOF
11847 /* end confdefs.h.  */
11848 #include <sys/types.h>
11849 #ifdef HAVE_SYS_SOCKET_H
11850 #include <sys/socket.h>
11851 #endif
11852
11853
11854 int
11855 main ()
11856 {
11857 static struct sockaddr_storage ac_aggr;
11858 if (ac_aggr.ss_family)
11859 return 0;
11860   ;
11861   return 0;
11862 }
11863 _ACEOF
11864 rm -f conftest.$ac_objext
11865 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11866   (eval $ac_compile) 2>conftest.er1
11867   ac_status=$?
11868   grep -v '^ *+' conftest.er1 >conftest.err
11869   rm -f conftest.er1
11870   cat conftest.err >&5
11871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11872   (exit $ac_status); } &&
11873          { ac_try='test -z "$ac_c_werror_flag"
11874                          || test ! -s conftest.err'
11875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11876   (eval $ac_try) 2>&5
11877   ac_status=$?
11878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11879   (exit $ac_status); }; } &&
11880          { ac_try='test -s conftest.$ac_objext'
11881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11882   (eval $ac_try) 2>&5
11883   ac_status=$?
11884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885   (exit $ac_status); }; }; then
11886   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11887 else
11888   echo "$as_me: failed program was:" >&5
11889 sed 's/^/| /' conftest.$ac_ext >&5
11890
11891 cat >conftest.$ac_ext <<_ACEOF
11892 /* confdefs.h.  */
11893 _ACEOF
11894 cat confdefs.h >>conftest.$ac_ext
11895 cat >>conftest.$ac_ext <<_ACEOF
11896 /* end confdefs.h.  */
11897 #include <sys/types.h>
11898 #ifdef HAVE_SYS_SOCKET_H
11899 #include <sys/socket.h>
11900 #endif
11901
11902
11903 int
11904 main ()
11905 {
11906 static struct sockaddr_storage ac_aggr;
11907 if (sizeof ac_aggr.ss_family)
11908 return 0;
11909   ;
11910   return 0;
11911 }
11912 _ACEOF
11913 rm -f conftest.$ac_objext
11914 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11915   (eval $ac_compile) 2>conftest.er1
11916   ac_status=$?
11917   grep -v '^ *+' conftest.er1 >conftest.err
11918   rm -f conftest.er1
11919   cat conftest.err >&5
11920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11921   (exit $ac_status); } &&
11922          { ac_try='test -z "$ac_c_werror_flag"
11923                          || test ! -s conftest.err'
11924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11925   (eval $ac_try) 2>&5
11926   ac_status=$?
11927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11928   (exit $ac_status); }; } &&
11929          { ac_try='test -s conftest.$ac_objext'
11930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11931   (eval $ac_try) 2>&5
11932   ac_status=$?
11933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11934   (exit $ac_status); }; }; then
11935   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11936 else
11937   echo "$as_me: failed program was:" >&5
11938 sed 's/^/| /' conftest.$ac_ext >&5
11939
11940 ac_cv_member_struct_sockaddr_storage_ss_family=no
11941 fi
11942 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11943 fi
11944 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11945 fi
11946 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11947 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11948 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11949
11950 cat >>confdefs.h <<_ACEOF
11951 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11952 _ACEOF
11953
11954
11955 fi
11956 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11957 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11958 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11959   echo $ECHO_N "(cached) $ECHO_C" >&6
11960 else
11961   cat >conftest.$ac_ext <<_ACEOF
11962 /* confdefs.h.  */
11963 _ACEOF
11964 cat confdefs.h >>conftest.$ac_ext
11965 cat >>conftest.$ac_ext <<_ACEOF
11966 /* end confdefs.h.  */
11967 #include <sys/types.h>
11968 #ifdef HAVE_SYS_SOCKET_H
11969 #include <sys/socket.h>
11970 #endif
11971
11972
11973 int
11974 main ()
11975 {
11976 static struct sockaddr_storage ac_aggr;
11977 if (ac_aggr.__ss_family)
11978 return 0;
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 rm -f conftest.$ac_objext
11984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11985   (eval $ac_compile) 2>conftest.er1
11986   ac_status=$?
11987   grep -v '^ *+' conftest.er1 >conftest.err
11988   rm -f conftest.er1
11989   cat conftest.err >&5
11990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11991   (exit $ac_status); } &&
11992          { ac_try='test -z "$ac_c_werror_flag"
11993                          || test ! -s conftest.err'
11994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11995   (eval $ac_try) 2>&5
11996   ac_status=$?
11997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11998   (exit $ac_status); }; } &&
11999          { ac_try='test -s conftest.$ac_objext'
12000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12001   (eval $ac_try) 2>&5
12002   ac_status=$?
12003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12004   (exit $ac_status); }; }; then
12005   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12006 else
12007   echo "$as_me: failed program was:" >&5
12008 sed 's/^/| /' conftest.$ac_ext >&5
12009
12010 cat >conftest.$ac_ext <<_ACEOF
12011 /* confdefs.h.  */
12012 _ACEOF
12013 cat confdefs.h >>conftest.$ac_ext
12014 cat >>conftest.$ac_ext <<_ACEOF
12015 /* end confdefs.h.  */
12016 #include <sys/types.h>
12017 #ifdef HAVE_SYS_SOCKET_H
12018 #include <sys/socket.h>
12019 #endif
12020
12021
12022 int
12023 main ()
12024 {
12025 static struct sockaddr_storage ac_aggr;
12026 if (sizeof ac_aggr.__ss_family)
12027 return 0;
12028   ;
12029   return 0;
12030 }
12031 _ACEOF
12032 rm -f conftest.$ac_objext
12033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12034   (eval $ac_compile) 2>conftest.er1
12035   ac_status=$?
12036   grep -v '^ *+' conftest.er1 >conftest.err
12037   rm -f conftest.er1
12038   cat conftest.err >&5
12039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12040   (exit $ac_status); } &&
12041          { ac_try='test -z "$ac_c_werror_flag"
12042                          || test ! -s conftest.err'
12043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12044   (eval $ac_try) 2>&5
12045   ac_status=$?
12046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12047   (exit $ac_status); }; } &&
12048          { ac_try='test -s conftest.$ac_objext'
12049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12050   (eval $ac_try) 2>&5
12051   ac_status=$?
12052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12053   (exit $ac_status); }; }; then
12054   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12055 else
12056   echo "$as_me: failed program was:" >&5
12057 sed 's/^/| /' conftest.$ac_ext >&5
12058
12059 ac_cv_member_struct_sockaddr_storage___ss_family=no
12060 fi
12061 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12062 fi
12063 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12064 fi
12065 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12066 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12067 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12068
12069 cat >>confdefs.h <<_ACEOF
12070 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12071 _ACEOF
12072
12073
12074 fi
12075 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12076 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12077 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12078   echo $ECHO_N "(cached) $ECHO_C" >&6
12079 else
12080   cat >conftest.$ac_ext <<_ACEOF
12081 /* confdefs.h.  */
12082 _ACEOF
12083 cat confdefs.h >>conftest.$ac_ext
12084 cat >>conftest.$ac_ext <<_ACEOF
12085 /* end confdefs.h.  */
12086 #include <sys/types.h>
12087 #ifdef HAVE_SYS_SOCKET_H
12088 #include <sys/socket.h>
12089 #endif
12090
12091
12092 int
12093 main ()
12094 {
12095 static struct sockaddr_storage ac_aggr;
12096 if (ac_aggr.ss_len)
12097 return 0;
12098   ;
12099   return 0;
12100 }
12101 _ACEOF
12102 rm -f conftest.$ac_objext
12103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12104   (eval $ac_compile) 2>conftest.er1
12105   ac_status=$?
12106   grep -v '^ *+' conftest.er1 >conftest.err
12107   rm -f conftest.er1
12108   cat conftest.err >&5
12109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110   (exit $ac_status); } &&
12111          { ac_try='test -z "$ac_c_werror_flag"
12112                          || test ! -s conftest.err'
12113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12114   (eval $ac_try) 2>&5
12115   ac_status=$?
12116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117   (exit $ac_status); }; } &&
12118          { ac_try='test -s conftest.$ac_objext'
12119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12120   (eval $ac_try) 2>&5
12121   ac_status=$?
12122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123   (exit $ac_status); }; }; then
12124   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12125 else
12126   echo "$as_me: failed program was:" >&5
12127 sed 's/^/| /' conftest.$ac_ext >&5
12128
12129 cat >conftest.$ac_ext <<_ACEOF
12130 /* confdefs.h.  */
12131 _ACEOF
12132 cat confdefs.h >>conftest.$ac_ext
12133 cat >>conftest.$ac_ext <<_ACEOF
12134 /* end confdefs.h.  */
12135 #include <sys/types.h>
12136 #ifdef HAVE_SYS_SOCKET_H
12137 #include <sys/socket.h>
12138 #endif
12139
12140
12141 int
12142 main ()
12143 {
12144 static struct sockaddr_storage ac_aggr;
12145 if (sizeof ac_aggr.ss_len)
12146 return 0;
12147   ;
12148   return 0;
12149 }
12150 _ACEOF
12151 rm -f conftest.$ac_objext
12152 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12153   (eval $ac_compile) 2>conftest.er1
12154   ac_status=$?
12155   grep -v '^ *+' conftest.er1 >conftest.err
12156   rm -f conftest.er1
12157   cat conftest.err >&5
12158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12159   (exit $ac_status); } &&
12160          { ac_try='test -z "$ac_c_werror_flag"
12161                          || test ! -s conftest.err'
12162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12163   (eval $ac_try) 2>&5
12164   ac_status=$?
12165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166   (exit $ac_status); }; } &&
12167          { ac_try='test -s conftest.$ac_objext'
12168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12169   (eval $ac_try) 2>&5
12170   ac_status=$?
12171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12172   (exit $ac_status); }; }; then
12173   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12174 else
12175   echo "$as_me: failed program was:" >&5
12176 sed 's/^/| /' conftest.$ac_ext >&5
12177
12178 ac_cv_member_struct_sockaddr_storage_ss_len=no
12179 fi
12180 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12181 fi
12182 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12183 fi
12184 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12185 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12186 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12187
12188 cat >>confdefs.h <<_ACEOF
12189 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12190 _ACEOF
12191
12192
12193 fi
12194 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12195 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12196 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12197   echo $ECHO_N "(cached) $ECHO_C" >&6
12198 else
12199   cat >conftest.$ac_ext <<_ACEOF
12200 /* confdefs.h.  */
12201 _ACEOF
12202 cat confdefs.h >>conftest.$ac_ext
12203 cat >>conftest.$ac_ext <<_ACEOF
12204 /* end confdefs.h.  */
12205 #include <sys/types.h>
12206 #ifdef HAVE_SYS_SOCKET_H
12207 #include <sys/socket.h>
12208 #endif
12209
12210
12211 int
12212 main ()
12213 {
12214 static struct sockaddr_storage ac_aggr;
12215 if (ac_aggr.__ss_len)
12216 return 0;
12217   ;
12218   return 0;
12219 }
12220 _ACEOF
12221 rm -f conftest.$ac_objext
12222 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12223   (eval $ac_compile) 2>conftest.er1
12224   ac_status=$?
12225   grep -v '^ *+' conftest.er1 >conftest.err
12226   rm -f conftest.er1
12227   cat conftest.err >&5
12228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12229   (exit $ac_status); } &&
12230          { ac_try='test -z "$ac_c_werror_flag"
12231                          || test ! -s conftest.err'
12232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12233   (eval $ac_try) 2>&5
12234   ac_status=$?
12235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12236   (exit $ac_status); }; } &&
12237          { ac_try='test -s conftest.$ac_objext'
12238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12239   (eval $ac_try) 2>&5
12240   ac_status=$?
12241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12242   (exit $ac_status); }; }; then
12243   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12244 else
12245   echo "$as_me: failed program was:" >&5
12246 sed 's/^/| /' conftest.$ac_ext >&5
12247
12248 cat >conftest.$ac_ext <<_ACEOF
12249 /* confdefs.h.  */
12250 _ACEOF
12251 cat confdefs.h >>conftest.$ac_ext
12252 cat >>conftest.$ac_ext <<_ACEOF
12253 /* end confdefs.h.  */
12254 #include <sys/types.h>
12255 #ifdef HAVE_SYS_SOCKET_H
12256 #include <sys/socket.h>
12257 #endif
12258
12259
12260 int
12261 main ()
12262 {
12263 static struct sockaddr_storage ac_aggr;
12264 if (sizeof ac_aggr.__ss_len)
12265 return 0;
12266   ;
12267   return 0;
12268 }
12269 _ACEOF
12270 rm -f conftest.$ac_objext
12271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12272   (eval $ac_compile) 2>conftest.er1
12273   ac_status=$?
12274   grep -v '^ *+' conftest.er1 >conftest.err
12275   rm -f conftest.er1
12276   cat conftest.err >&5
12277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12278   (exit $ac_status); } &&
12279          { ac_try='test -z "$ac_c_werror_flag"
12280                          || test ! -s conftest.err'
12281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12282   (eval $ac_try) 2>&5
12283   ac_status=$?
12284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12285   (exit $ac_status); }; } &&
12286          { ac_try='test -s conftest.$ac_objext'
12287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12288   (eval $ac_try) 2>&5
12289   ac_status=$?
12290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12291   (exit $ac_status); }; }; then
12292   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12293 else
12294   echo "$as_me: failed program was:" >&5
12295 sed 's/^/| /' conftest.$ac_ext >&5
12296
12297 ac_cv_member_struct_sockaddr_storage___ss_len=no
12298 fi
12299 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12300 fi
12301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12302 fi
12303 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12304 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12305 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12306
12307 cat >>confdefs.h <<_ACEOF
12308 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12309 _ACEOF
12310
12311
12312 fi
12313 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12314 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12315 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12316   echo $ECHO_N "(cached) $ECHO_C" >&6
12317 else
12318   cat >conftest.$ac_ext <<_ACEOF
12319 /* confdefs.h.  */
12320 _ACEOF
12321 cat confdefs.h >>conftest.$ac_ext
12322 cat >>conftest.$ac_ext <<_ACEOF
12323 /* end confdefs.h.  */
12324 #include <sys/types.h>
12325 #ifdef HAVE_SYS_SOCKET_H
12326 #include <sys/socket.h>
12327 #endif
12328
12329
12330 int
12331 main ()
12332 {
12333 static struct sockaddr ac_aggr;
12334 if (ac_aggr.sa_len)
12335 return 0;
12336   ;
12337   return 0;
12338 }
12339 _ACEOF
12340 rm -f conftest.$ac_objext
12341 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12342   (eval $ac_compile) 2>conftest.er1
12343   ac_status=$?
12344   grep -v '^ *+' conftest.er1 >conftest.err
12345   rm -f conftest.er1
12346   cat conftest.err >&5
12347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12348   (exit $ac_status); } &&
12349          { ac_try='test -z "$ac_c_werror_flag"
12350                          || test ! -s conftest.err'
12351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12352   (eval $ac_try) 2>&5
12353   ac_status=$?
12354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12355   (exit $ac_status); }; } &&
12356          { ac_try='test -s conftest.$ac_objext'
12357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12358   (eval $ac_try) 2>&5
12359   ac_status=$?
12360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12361   (exit $ac_status); }; }; then
12362   ac_cv_member_struct_sockaddr_sa_len=yes
12363 else
12364   echo "$as_me: failed program was:" >&5
12365 sed 's/^/| /' conftest.$ac_ext >&5
12366
12367 cat >conftest.$ac_ext <<_ACEOF
12368 /* confdefs.h.  */
12369 _ACEOF
12370 cat confdefs.h >>conftest.$ac_ext
12371 cat >>conftest.$ac_ext <<_ACEOF
12372 /* end confdefs.h.  */
12373 #include <sys/types.h>
12374 #ifdef HAVE_SYS_SOCKET_H
12375 #include <sys/socket.h>
12376 #endif
12377
12378
12379 int
12380 main ()
12381 {
12382 static struct sockaddr ac_aggr;
12383 if (sizeof ac_aggr.sa_len)
12384 return 0;
12385   ;
12386   return 0;
12387 }
12388 _ACEOF
12389 rm -f conftest.$ac_objext
12390 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12391   (eval $ac_compile) 2>conftest.er1
12392   ac_status=$?
12393   grep -v '^ *+' conftest.er1 >conftest.err
12394   rm -f conftest.er1
12395   cat conftest.err >&5
12396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12397   (exit $ac_status); } &&
12398          { ac_try='test -z "$ac_c_werror_flag"
12399                          || test ! -s conftest.err'
12400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12401   (eval $ac_try) 2>&5
12402   ac_status=$?
12403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12404   (exit $ac_status); }; } &&
12405          { ac_try='test -s conftest.$ac_objext'
12406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12407   (eval $ac_try) 2>&5
12408   ac_status=$?
12409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12410   (exit $ac_status); }; }; then
12411   ac_cv_member_struct_sockaddr_sa_len=yes
12412 else
12413   echo "$as_me: failed program was:" >&5
12414 sed 's/^/| /' conftest.$ac_ext >&5
12415
12416 ac_cv_member_struct_sockaddr_sa_len=no
12417 fi
12418 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12419 fi
12420 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12421 fi
12422 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12423 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12424 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12425
12426 cat >>confdefs.h <<_ACEOF
12427 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12428 _ACEOF
12429
12430
12431 fi
12432
12433 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12434 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12435 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12436   echo $ECHO_N "(cached) $ECHO_C" >&6
12437 else
12438   cat >conftest.$ac_ext <<_ACEOF
12439 /* confdefs.h.  */
12440 _ACEOF
12441 cat confdefs.h >>conftest.$ac_ext
12442 cat >>conftest.$ac_ext <<_ACEOF
12443 /* end confdefs.h.  */
12444 #include <sys/types.h>
12445 #include <sys/socket.h>
12446 #include <netdb.h>
12447
12448
12449 int
12450 main ()
12451 {
12452 if ((struct addrinfo *) 0)
12453   return 0;
12454 if (sizeof (struct addrinfo))
12455   return 0;
12456   ;
12457   return 0;
12458 }
12459 _ACEOF
12460 rm -f conftest.$ac_objext
12461 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12462   (eval $ac_compile) 2>conftest.er1
12463   ac_status=$?
12464   grep -v '^ *+' conftest.er1 >conftest.err
12465   rm -f conftest.er1
12466   cat conftest.err >&5
12467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12468   (exit $ac_status); } &&
12469          { ac_try='test -z "$ac_c_werror_flag"
12470                          || test ! -s conftest.err'
12471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12472   (eval $ac_try) 2>&5
12473   ac_status=$?
12474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475   (exit $ac_status); }; } &&
12476          { ac_try='test -s conftest.$ac_objext'
12477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12478   (eval $ac_try) 2>&5
12479   ac_status=$?
12480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481   (exit $ac_status); }; }; then
12482   ac_cv_type_struct_addrinfo=yes
12483 else
12484   echo "$as_me: failed program was:" >&5
12485 sed 's/^/| /' conftest.$ac_ext >&5
12486
12487 ac_cv_type_struct_addrinfo=no
12488 fi
12489 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12490 fi
12491 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12492 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12493 if test $ac_cv_type_struct_addrinfo = yes; then
12494
12495 cat >>confdefs.h <<_ACEOF
12496 #define HAVE_STRUCT_ADDRINFO 1
12497 _ACEOF
12498
12499
12500 fi
12501
12502
12503 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12504 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12505 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12506   echo $ECHO_N "(cached) $ECHO_C" >&6
12507 else
12508   cat >conftest.$ac_ext <<_ACEOF
12509 /* confdefs.h.  */
12510 _ACEOF
12511 cat confdefs.h >>conftest.$ac_ext
12512 cat >>conftest.$ac_ext <<_ACEOF
12513 /* end confdefs.h.  */
12514 #include <sys/param.h>
12515 #include <sys/types.h>
12516 #include <sys/socket.h>
12517 #include <sys/ucred.h>
12518
12519 int
12520 main ()
12521 {
12522 if ((struct cmsgcred *) 0)
12523   return 0;
12524 if (sizeof (struct cmsgcred))
12525   return 0;
12526   ;
12527   return 0;
12528 }
12529 _ACEOF
12530 rm -f conftest.$ac_objext
12531 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12532   (eval $ac_compile) 2>conftest.er1
12533   ac_status=$?
12534   grep -v '^ *+' conftest.er1 >conftest.err
12535   rm -f conftest.er1
12536   cat conftest.err >&5
12537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12538   (exit $ac_status); } &&
12539          { ac_try='test -z "$ac_c_werror_flag"
12540                          || test ! -s conftest.err'
12541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12542   (eval $ac_try) 2>&5
12543   ac_status=$?
12544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545   (exit $ac_status); }; } &&
12546          { ac_try='test -s conftest.$ac_objext'
12547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12548   (eval $ac_try) 2>&5
12549   ac_status=$?
12550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12551   (exit $ac_status); }; }; then
12552   ac_cv_type_struct_cmsgcred=yes
12553 else
12554   echo "$as_me: failed program was:" >&5
12555 sed 's/^/| /' conftest.$ac_ext >&5
12556
12557 ac_cv_type_struct_cmsgcred=no
12558 fi
12559 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12560 fi
12561 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12562 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12563 if test $ac_cv_type_struct_cmsgcred = yes; then
12564
12565 cat >>confdefs.h <<_ACEOF
12566 #define HAVE_STRUCT_CMSGCRED 1
12567 _ACEOF
12568
12569
12570 fi
12571 echo "$as_me:$LINENO: checking for struct fcred" >&5
12572 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12573 if test "${ac_cv_type_struct_fcred+set}" = set; then
12574   echo $ECHO_N "(cached) $ECHO_C" >&6
12575 else
12576   cat >conftest.$ac_ext <<_ACEOF
12577 /* confdefs.h.  */
12578 _ACEOF
12579 cat confdefs.h >>conftest.$ac_ext
12580 cat >>conftest.$ac_ext <<_ACEOF
12581 /* end confdefs.h.  */
12582 #include <sys/param.h>
12583 #include <sys/types.h>
12584 #include <sys/socket.h>
12585 #include <sys/ucred.h>
12586
12587 int
12588 main ()
12589 {
12590 if ((struct fcred *) 0)
12591   return 0;
12592 if (sizeof (struct fcred))
12593   return 0;
12594   ;
12595   return 0;
12596 }
12597 _ACEOF
12598 rm -f conftest.$ac_objext
12599 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12600   (eval $ac_compile) 2>conftest.er1
12601   ac_status=$?
12602   grep -v '^ *+' conftest.er1 >conftest.err
12603   rm -f conftest.er1
12604   cat conftest.err >&5
12605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12606   (exit $ac_status); } &&
12607          { ac_try='test -z "$ac_c_werror_flag"
12608                          || test ! -s conftest.err'
12609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12610   (eval $ac_try) 2>&5
12611   ac_status=$?
12612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12613   (exit $ac_status); }; } &&
12614          { ac_try='test -s conftest.$ac_objext'
12615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12616   (eval $ac_try) 2>&5
12617   ac_status=$?
12618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12619   (exit $ac_status); }; }; then
12620   ac_cv_type_struct_fcred=yes
12621 else
12622   echo "$as_me: failed program was:" >&5
12623 sed 's/^/| /' conftest.$ac_ext >&5
12624
12625 ac_cv_type_struct_fcred=no
12626 fi
12627 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12628 fi
12629 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12630 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12631 if test $ac_cv_type_struct_fcred = yes; then
12632
12633 cat >>confdefs.h <<_ACEOF
12634 #define HAVE_STRUCT_FCRED 1
12635 _ACEOF
12636
12637
12638 fi
12639 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12640 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12641 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12642   echo $ECHO_N "(cached) $ECHO_C" >&6
12643 else
12644   cat >conftest.$ac_ext <<_ACEOF
12645 /* confdefs.h.  */
12646 _ACEOF
12647 cat confdefs.h >>conftest.$ac_ext
12648 cat >>conftest.$ac_ext <<_ACEOF
12649 /* end confdefs.h.  */
12650 #include <sys/param.h>
12651 #include <sys/types.h>
12652 #include <sys/socket.h>
12653 #include <sys/ucred.h>
12654
12655 int
12656 main ()
12657 {
12658 if ((struct sockcred *) 0)
12659   return 0;
12660 if (sizeof (struct sockcred))
12661   return 0;
12662   ;
12663   return 0;
12664 }
12665 _ACEOF
12666 rm -f conftest.$ac_objext
12667 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12668   (eval $ac_compile) 2>conftest.er1
12669   ac_status=$?
12670   grep -v '^ *+' conftest.er1 >conftest.err
12671   rm -f conftest.er1
12672   cat conftest.err >&5
12673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12674   (exit $ac_status); } &&
12675          { ac_try='test -z "$ac_c_werror_flag"
12676                          || test ! -s conftest.err'
12677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12678   (eval $ac_try) 2>&5
12679   ac_status=$?
12680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12681   (exit $ac_status); }; } &&
12682          { ac_try='test -s conftest.$ac_objext'
12683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12684   (eval $ac_try) 2>&5
12685   ac_status=$?
12686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12687   (exit $ac_status); }; }; then
12688   ac_cv_type_struct_sockcred=yes
12689 else
12690   echo "$as_me: failed program was:" >&5
12691 sed 's/^/| /' conftest.$ac_ext >&5
12692
12693 ac_cv_type_struct_sockcred=no
12694 fi
12695 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12696 fi
12697 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12698 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12699 if test $ac_cv_type_struct_sockcred = yes; then
12700
12701 cat >>confdefs.h <<_ACEOF
12702 #define HAVE_STRUCT_SOCKCRED 1
12703 _ACEOF
12704
12705
12706 fi
12707
12708
12709 echo "$as_me:$LINENO: checking for struct option" >&5
12710 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12711 if test "${ac_cv_type_struct_option+set}" = set; then
12712   echo $ECHO_N "(cached) $ECHO_C" >&6
12713 else
12714   cat >conftest.$ac_ext <<_ACEOF
12715 /* confdefs.h.  */
12716 _ACEOF
12717 cat confdefs.h >>conftest.$ac_ext
12718 cat >>conftest.$ac_ext <<_ACEOF
12719 /* end confdefs.h.  */
12720 #ifdef HAVE_GETOPT_H
12721 #include <getopt.h>
12722 #endif
12723
12724 int
12725 main ()
12726 {
12727 if ((struct option *) 0)
12728   return 0;
12729 if (sizeof (struct option))
12730   return 0;
12731   ;
12732   return 0;
12733 }
12734 _ACEOF
12735 rm -f conftest.$ac_objext
12736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12737   (eval $ac_compile) 2>conftest.er1
12738   ac_status=$?
12739   grep -v '^ *+' conftest.er1 >conftest.err
12740   rm -f conftest.er1
12741   cat conftest.err >&5
12742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12743   (exit $ac_status); } &&
12744          { ac_try='test -z "$ac_c_werror_flag"
12745                          || test ! -s conftest.err'
12746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12747   (eval $ac_try) 2>&5
12748   ac_status=$?
12749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750   (exit $ac_status); }; } &&
12751          { ac_try='test -s conftest.$ac_objext'
12752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12753   (eval $ac_try) 2>&5
12754   ac_status=$?
12755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12756   (exit $ac_status); }; }; then
12757   ac_cv_type_struct_option=yes
12758 else
12759   echo "$as_me: failed program was:" >&5
12760 sed 's/^/| /' conftest.$ac_ext >&5
12761
12762 ac_cv_type_struct_option=no
12763 fi
12764 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12765 fi
12766 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12767 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12768 if test $ac_cv_type_struct_option = yes; then
12769
12770 cat >>confdefs.h <<_ACEOF
12771 #define HAVE_STRUCT_OPTION 1
12772 _ACEOF
12773
12774
12775 fi
12776
12777
12778 if test "$with_zlib" = yes; then
12779   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12780   # did not).  While we could work around the lack of z_streamp, it
12781   # seems unwise to encourage people to use such old zlib versions...
12782   echo "$as_me:$LINENO: checking for z_streamp" >&5
12783 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12784 if test "${ac_cv_type_z_streamp+set}" = set; then
12785   echo $ECHO_N "(cached) $ECHO_C" >&6
12786 else
12787   cat >conftest.$ac_ext <<_ACEOF
12788 /* confdefs.h.  */
12789 _ACEOF
12790 cat confdefs.h >>conftest.$ac_ext
12791 cat >>conftest.$ac_ext <<_ACEOF
12792 /* end confdefs.h.  */
12793 #include <zlib.h>
12794
12795 int
12796 main ()
12797 {
12798 if ((z_streamp *) 0)
12799   return 0;
12800 if (sizeof (z_streamp))
12801   return 0;
12802   ;
12803   return 0;
12804 }
12805 _ACEOF
12806 rm -f conftest.$ac_objext
12807 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12808   (eval $ac_compile) 2>conftest.er1
12809   ac_status=$?
12810   grep -v '^ *+' conftest.er1 >conftest.err
12811   rm -f conftest.er1
12812   cat conftest.err >&5
12813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12814   (exit $ac_status); } &&
12815          { ac_try='test -z "$ac_c_werror_flag"
12816                          || test ! -s conftest.err'
12817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12818   (eval $ac_try) 2>&5
12819   ac_status=$?
12820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821   (exit $ac_status); }; } &&
12822          { ac_try='test -s conftest.$ac_objext'
12823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824   (eval $ac_try) 2>&5
12825   ac_status=$?
12826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827   (exit $ac_status); }; }; then
12828   ac_cv_type_z_streamp=yes
12829 else
12830   echo "$as_me: failed program was:" >&5
12831 sed 's/^/| /' conftest.$ac_ext >&5
12832
12833 ac_cv_type_z_streamp=no
12834 fi
12835 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12836 fi
12837 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12838 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12839 if test $ac_cv_type_z_streamp = yes; then
12840   :
12841 else
12842   { { echo "$as_me:$LINENO: error: zlib version is too old
12843 Use --without-zlib to disable zlib support." >&5
12844 echo "$as_me: error: zlib version is too old
12845 Use --without-zlib to disable zlib support." >&2;}
12846    { (exit 1); exit 1; }; }
12847 fi
12848
12849 fi
12850
12851 if test "$with_krb5" = yes; then
12852 # Check for differences between MIT and Heimdal (KTH) releases
12853   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12854 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12855 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12856   echo $ECHO_N "(cached) $ECHO_C" >&6
12857 else
12858   cat >conftest.$ac_ext <<_ACEOF
12859 /* confdefs.h.  */
12860 _ACEOF
12861 cat confdefs.h >>conftest.$ac_ext
12862 cat >>conftest.$ac_ext <<_ACEOF
12863 /* end confdefs.h.  */
12864 #include <krb5.h>
12865
12866 int
12867 main ()
12868 {
12869 static krb5_ticket ac_aggr;
12870 if (ac_aggr.enc_part2)
12871 return 0;
12872   ;
12873   return 0;
12874 }
12875 _ACEOF
12876 rm -f conftest.$ac_objext
12877 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12878   (eval $ac_compile) 2>conftest.er1
12879   ac_status=$?
12880   grep -v '^ *+' conftest.er1 >conftest.err
12881   rm -f conftest.er1
12882   cat conftest.err >&5
12883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12884   (exit $ac_status); } &&
12885          { ac_try='test -z "$ac_c_werror_flag"
12886                          || test ! -s conftest.err'
12887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12888   (eval $ac_try) 2>&5
12889   ac_status=$?
12890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12891   (exit $ac_status); }; } &&
12892          { ac_try='test -s conftest.$ac_objext'
12893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12894   (eval $ac_try) 2>&5
12895   ac_status=$?
12896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12897   (exit $ac_status); }; }; then
12898   ac_cv_member_krb5_ticket_enc_part2=yes
12899 else
12900   echo "$as_me: failed program was:" >&5
12901 sed 's/^/| /' conftest.$ac_ext >&5
12902
12903 cat >conftest.$ac_ext <<_ACEOF
12904 /* confdefs.h.  */
12905 _ACEOF
12906 cat confdefs.h >>conftest.$ac_ext
12907 cat >>conftest.$ac_ext <<_ACEOF
12908 /* end confdefs.h.  */
12909 #include <krb5.h>
12910
12911 int
12912 main ()
12913 {
12914 static krb5_ticket ac_aggr;
12915 if (sizeof ac_aggr.enc_part2)
12916 return 0;
12917   ;
12918   return 0;
12919 }
12920 _ACEOF
12921 rm -f conftest.$ac_objext
12922 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12923   (eval $ac_compile) 2>conftest.er1
12924   ac_status=$?
12925   grep -v '^ *+' conftest.er1 >conftest.err
12926   rm -f conftest.er1
12927   cat conftest.err >&5
12928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929   (exit $ac_status); } &&
12930          { ac_try='test -z "$ac_c_werror_flag"
12931                          || test ! -s conftest.err'
12932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12933   (eval $ac_try) 2>&5
12934   ac_status=$?
12935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12936   (exit $ac_status); }; } &&
12937          { ac_try='test -s conftest.$ac_objext'
12938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12939   (eval $ac_try) 2>&5
12940   ac_status=$?
12941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12942   (exit $ac_status); }; }; then
12943   ac_cv_member_krb5_ticket_enc_part2=yes
12944 else
12945   echo "$as_me: failed program was:" >&5
12946 sed 's/^/| /' conftest.$ac_ext >&5
12947
12948 ac_cv_member_krb5_ticket_enc_part2=no
12949 fi
12950 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12951 fi
12952 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12953 fi
12954 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12955 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12956 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12957
12958 cat >>confdefs.h <<_ACEOF
12959 #define HAVE_KRB5_TICKET_ENC_PART2 1
12960 _ACEOF
12961
12962
12963 else
12964   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12965 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12966 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12967   echo $ECHO_N "(cached) $ECHO_C" >&6
12968 else
12969   cat >conftest.$ac_ext <<_ACEOF
12970 /* confdefs.h.  */
12971 _ACEOF
12972 cat confdefs.h >>conftest.$ac_ext
12973 cat >>conftest.$ac_ext <<_ACEOF
12974 /* end confdefs.h.  */
12975 #include <krb5.h>
12976
12977 int
12978 main ()
12979 {
12980 static krb5_ticket ac_aggr;
12981 if (ac_aggr.client)
12982 return 0;
12983   ;
12984   return 0;
12985 }
12986 _ACEOF
12987 rm -f conftest.$ac_objext
12988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12989   (eval $ac_compile) 2>conftest.er1
12990   ac_status=$?
12991   grep -v '^ *+' conftest.er1 >conftest.err
12992   rm -f conftest.er1
12993   cat conftest.err >&5
12994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995   (exit $ac_status); } &&
12996          { ac_try='test -z "$ac_c_werror_flag"
12997                          || test ! -s conftest.err'
12998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12999   (eval $ac_try) 2>&5
13000   ac_status=$?
13001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13002   (exit $ac_status); }; } &&
13003          { ac_try='test -s conftest.$ac_objext'
13004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13005   (eval $ac_try) 2>&5
13006   ac_status=$?
13007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13008   (exit $ac_status); }; }; then
13009   ac_cv_member_krb5_ticket_client=yes
13010 else
13011   echo "$as_me: failed program was:" >&5
13012 sed 's/^/| /' conftest.$ac_ext >&5
13013
13014 cat >conftest.$ac_ext <<_ACEOF
13015 /* confdefs.h.  */
13016 _ACEOF
13017 cat confdefs.h >>conftest.$ac_ext
13018 cat >>conftest.$ac_ext <<_ACEOF
13019 /* end confdefs.h.  */
13020 #include <krb5.h>
13021
13022 int
13023 main ()
13024 {
13025 static krb5_ticket ac_aggr;
13026 if (sizeof ac_aggr.client)
13027 return 0;
13028   ;
13029   return 0;
13030 }
13031 _ACEOF
13032 rm -f conftest.$ac_objext
13033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13034   (eval $ac_compile) 2>conftest.er1
13035   ac_status=$?
13036   grep -v '^ *+' conftest.er1 >conftest.err
13037   rm -f conftest.er1
13038   cat conftest.err >&5
13039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13040   (exit $ac_status); } &&
13041          { ac_try='test -z "$ac_c_werror_flag"
13042                          || test ! -s conftest.err'
13043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13044   (eval $ac_try) 2>&5
13045   ac_status=$?
13046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13047   (exit $ac_status); }; } &&
13048          { ac_try='test -s conftest.$ac_objext'
13049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13050   (eval $ac_try) 2>&5
13051   ac_status=$?
13052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13053   (exit $ac_status); }; }; then
13054   ac_cv_member_krb5_ticket_client=yes
13055 else
13056   echo "$as_me: failed program was:" >&5
13057 sed 's/^/| /' conftest.$ac_ext >&5
13058
13059 ac_cv_member_krb5_ticket_client=no
13060 fi
13061 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13062 fi
13063 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13064 fi
13065 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13066 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13067 if test $ac_cv_member_krb5_ticket_client = yes; then
13068
13069 cat >>confdefs.h <<_ACEOF
13070 #define HAVE_KRB5_TICKET_CLIENT 1
13071 _ACEOF
13072
13073
13074 else
13075   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13076 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13077    { (exit 1); exit 1; }; }
13078 fi
13079
13080 fi
13081
13082   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13083 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13084 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13085   echo $ECHO_N "(cached) $ECHO_C" >&6
13086 else
13087   cat >conftest.$ac_ext <<_ACEOF
13088 /* confdefs.h.  */
13089 _ACEOF
13090 cat confdefs.h >>conftest.$ac_ext
13091 cat >>conftest.$ac_ext <<_ACEOF
13092 /* end confdefs.h.  */
13093 #include <krb5.h>
13094
13095 int
13096 main ()
13097 {
13098 static krb5_error ac_aggr;
13099 if (ac_aggr.text.data)
13100 return 0;
13101   ;
13102   return 0;
13103 }
13104 _ACEOF
13105 rm -f conftest.$ac_objext
13106 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13107   (eval $ac_compile) 2>conftest.er1
13108   ac_status=$?
13109   grep -v '^ *+' conftest.er1 >conftest.err
13110   rm -f conftest.er1
13111   cat conftest.err >&5
13112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113   (exit $ac_status); } &&
13114          { ac_try='test -z "$ac_c_werror_flag"
13115                          || test ! -s conftest.err'
13116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13117   (eval $ac_try) 2>&5
13118   ac_status=$?
13119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13120   (exit $ac_status); }; } &&
13121          { ac_try='test -s conftest.$ac_objext'
13122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13123   (eval $ac_try) 2>&5
13124   ac_status=$?
13125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13126   (exit $ac_status); }; }; then
13127   ac_cv_member_krb5_error_text_data=yes
13128 else
13129   echo "$as_me: failed program was:" >&5
13130 sed 's/^/| /' conftest.$ac_ext >&5
13131
13132 cat >conftest.$ac_ext <<_ACEOF
13133 /* confdefs.h.  */
13134 _ACEOF
13135 cat confdefs.h >>conftest.$ac_ext
13136 cat >>conftest.$ac_ext <<_ACEOF
13137 /* end confdefs.h.  */
13138 #include <krb5.h>
13139
13140 int
13141 main ()
13142 {
13143 static krb5_error ac_aggr;
13144 if (sizeof ac_aggr.text.data)
13145 return 0;
13146   ;
13147   return 0;
13148 }
13149 _ACEOF
13150 rm -f conftest.$ac_objext
13151 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13152   (eval $ac_compile) 2>conftest.er1
13153   ac_status=$?
13154   grep -v '^ *+' conftest.er1 >conftest.err
13155   rm -f conftest.er1
13156   cat conftest.err >&5
13157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13158   (exit $ac_status); } &&
13159          { ac_try='test -z "$ac_c_werror_flag"
13160                          || test ! -s conftest.err'
13161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13162   (eval $ac_try) 2>&5
13163   ac_status=$?
13164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165   (exit $ac_status); }; } &&
13166          { ac_try='test -s conftest.$ac_objext'
13167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13168   (eval $ac_try) 2>&5
13169   ac_status=$?
13170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13171   (exit $ac_status); }; }; then
13172   ac_cv_member_krb5_error_text_data=yes
13173 else
13174   echo "$as_me: failed program was:" >&5
13175 sed 's/^/| /' conftest.$ac_ext >&5
13176
13177 ac_cv_member_krb5_error_text_data=no
13178 fi
13179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13180 fi
13181 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13182 fi
13183 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13184 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13185 if test $ac_cv_member_krb5_error_text_data = yes; then
13186
13187 cat >>confdefs.h <<_ACEOF
13188 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13189 _ACEOF
13190
13191
13192 else
13193   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13194 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13195 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13196   echo $ECHO_N "(cached) $ECHO_C" >&6
13197 else
13198   cat >conftest.$ac_ext <<_ACEOF
13199 /* confdefs.h.  */
13200 _ACEOF
13201 cat confdefs.h >>conftest.$ac_ext
13202 cat >>conftest.$ac_ext <<_ACEOF
13203 /* end confdefs.h.  */
13204 #include <krb5.h>
13205
13206 int
13207 main ()
13208 {
13209 static krb5_error ac_aggr;
13210 if (ac_aggr.e_data)
13211 return 0;
13212   ;
13213   return 0;
13214 }
13215 _ACEOF
13216 rm -f conftest.$ac_objext
13217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13218   (eval $ac_compile) 2>conftest.er1
13219   ac_status=$?
13220   grep -v '^ *+' conftest.er1 >conftest.err
13221   rm -f conftest.er1
13222   cat conftest.err >&5
13223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13224   (exit $ac_status); } &&
13225          { ac_try='test -z "$ac_c_werror_flag"
13226                          || test ! -s conftest.err'
13227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13231   (exit $ac_status); }; } &&
13232          { ac_try='test -s conftest.$ac_objext'
13233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13234   (eval $ac_try) 2>&5
13235   ac_status=$?
13236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13237   (exit $ac_status); }; }; then
13238   ac_cv_member_krb5_error_e_data=yes
13239 else
13240   echo "$as_me: failed program was:" >&5
13241 sed 's/^/| /' conftest.$ac_ext >&5
13242
13243 cat >conftest.$ac_ext <<_ACEOF
13244 /* confdefs.h.  */
13245 _ACEOF
13246 cat confdefs.h >>conftest.$ac_ext
13247 cat >>conftest.$ac_ext <<_ACEOF
13248 /* end confdefs.h.  */
13249 #include <krb5.h>
13250
13251 int
13252 main ()
13253 {
13254 static krb5_error ac_aggr;
13255 if (sizeof ac_aggr.e_data)
13256 return 0;
13257   ;
13258   return 0;
13259 }
13260 _ACEOF
13261 rm -f conftest.$ac_objext
13262 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13263   (eval $ac_compile) 2>conftest.er1
13264   ac_status=$?
13265   grep -v '^ *+' conftest.er1 >conftest.err
13266   rm -f conftest.er1
13267   cat conftest.err >&5
13268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269   (exit $ac_status); } &&
13270          { ac_try='test -z "$ac_c_werror_flag"
13271                          || test ! -s conftest.err'
13272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13273   (eval $ac_try) 2>&5
13274   ac_status=$?
13275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13276   (exit $ac_status); }; } &&
13277          { ac_try='test -s conftest.$ac_objext'
13278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13279   (eval $ac_try) 2>&5
13280   ac_status=$?
13281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13282   (exit $ac_status); }; }; then
13283   ac_cv_member_krb5_error_e_data=yes
13284 else
13285   echo "$as_me: failed program was:" >&5
13286 sed 's/^/| /' conftest.$ac_ext >&5
13287
13288 ac_cv_member_krb5_error_e_data=no
13289 fi
13290 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13291 fi
13292 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13293 fi
13294 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13295 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13296 if test $ac_cv_member_krb5_error_e_data = yes; then
13297
13298 cat >>confdefs.h <<_ACEOF
13299 #define HAVE_KRB5_ERROR_E_DATA 1
13300 _ACEOF
13301
13302
13303 else
13304   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13305 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13306    { (exit 1); exit 1; }; }
13307 fi
13308
13309 fi
13310
13311 fi
13312
13313 ##
13314 ## Functions, global variables
13315 ##
13316
13317 echo "$as_me:$LINENO: checking for int timezone" >&5
13318 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13319 if test "${pgac_cv_var_int_timezone+set}" = set; then
13320   echo $ECHO_N "(cached) $ECHO_C" >&6
13321 else
13322   cat >conftest.$ac_ext <<_ACEOF
13323 /* confdefs.h.  */
13324 _ACEOF
13325 cat confdefs.h >>conftest.$ac_ext
13326 cat >>conftest.$ac_ext <<_ACEOF
13327 /* end confdefs.h.  */
13328 #include <time.h>
13329 int res;
13330 int
13331 main ()
13332 {
13333 #ifndef __CYGWIN__
13334 res = timezone / 60;
13335 #else
13336 res = _timezone / 60;
13337 #endif
13338   ;
13339   return 0;
13340 }
13341 _ACEOF
13342 rm -f conftest.$ac_objext conftest$ac_exeext
13343 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13344   (eval $ac_link) 2>conftest.er1
13345   ac_status=$?
13346   grep -v '^ *+' conftest.er1 >conftest.err
13347   rm -f conftest.er1
13348   cat conftest.err >&5
13349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13350   (exit $ac_status); } &&
13351          { ac_try='test -z "$ac_c_werror_flag"
13352                          || test ! -s conftest.err'
13353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13354   (eval $ac_try) 2>&5
13355   ac_status=$?
13356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13357   (exit $ac_status); }; } &&
13358          { ac_try='test -s conftest$ac_exeext'
13359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13360   (eval $ac_try) 2>&5
13361   ac_status=$?
13362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13363   (exit $ac_status); }; }; then
13364   pgac_cv_var_int_timezone=yes
13365 else
13366   echo "$as_me: failed program was:" >&5
13367 sed 's/^/| /' conftest.$ac_ext >&5
13368
13369 pgac_cv_var_int_timezone=no
13370 fi
13371 rm -f conftest.err conftest.$ac_objext \
13372       conftest$ac_exeext conftest.$ac_ext
13373 fi
13374 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13375 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13376 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13377
13378 cat >>confdefs.h <<\_ACEOF
13379 #define HAVE_INT_TIMEZONE
13380 _ACEOF
13381
13382 fi
13383 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13384 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13385  if test "${ac_cv_func_accept_return+set}" = set; then
13386   echo $ECHO_N "(cached) $ECHO_C" >&6
13387 else
13388    if test "${ac_cv_func_accept_arg1+set}" = set; then
13389   echo $ECHO_N "(cached) $ECHO_C" >&6
13390 else
13391     if test "${ac_cv_func_accept_arg2+set}" = set; then
13392   echo $ECHO_N "(cached) $ECHO_C" >&6
13393 else
13394      if test "${ac_cv_func_accept_arg3+set}" = set; then
13395   echo $ECHO_N "(cached) $ECHO_C" >&6
13396 else
13397       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13398       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13399        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13400         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13401          cat >conftest.$ac_ext <<_ACEOF
13402 /* confdefs.h.  */
13403 _ACEOF
13404 cat confdefs.h >>conftest.$ac_ext
13405 cat >>conftest.$ac_ext <<_ACEOF
13406 /* end confdefs.h.  */
13407 #ifdef HAVE_SYS_TYPES_H
13408 #include <sys/types.h>
13409 #endif
13410 #ifdef HAVE_SYS_SOCKET_H
13411 #include <sys/socket.h>
13412 #endif
13413 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13414 int
13415 main ()
13416 {
13417
13418   ;
13419   return 0;
13420 }
13421 _ACEOF
13422 rm -f conftest.$ac_objext
13423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13424   (eval $ac_compile) 2>conftest.er1
13425   ac_status=$?
13426   grep -v '^ *+' conftest.er1 >conftest.err
13427   rm -f conftest.er1
13428   cat conftest.err >&5
13429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430   (exit $ac_status); } &&
13431          { ac_try='test -z "$ac_c_werror_flag"
13432                          || test ! -s conftest.err'
13433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13434   (eval $ac_try) 2>&5
13435   ac_status=$?
13436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13437   (exit $ac_status); }; } &&
13438          { ac_try='test -s conftest.$ac_objext'
13439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13440   (eval $ac_try) 2>&5
13441   ac_status=$?
13442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13443   (exit $ac_status); }; }; then
13444   ac_not_found=no; break 4
13445 else
13446   echo "$as_me: failed program was:" >&5
13447 sed 's/^/| /' conftest.$ac_ext >&5
13448
13449 ac_not_found=yes
13450 fi
13451 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13452        done
13453       done
13454      done
13455     done
13456     if test "$ac_not_found" = yes; then
13457       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13458 echo "$as_me: error: could not determine argument types" >&2;}
13459    { (exit 1); exit 1; }; }
13460     fi
13461     if test "$ac_cv_func_accept_arg3" = "void"; then
13462       ac_cv_func_accept_arg3=int
13463     fi
13464
13465 fi
13466
13467 fi
13468
13469 fi
13470
13471 fi
13472  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
13473 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13474
13475 cat >>confdefs.h <<_ACEOF
13476 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13477 _ACEOF
13478
13479
13480 cat >>confdefs.h <<_ACEOF
13481 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13482 _ACEOF
13483
13484
13485 cat >>confdefs.h <<_ACEOF
13486 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13487 _ACEOF
13488
13489
13490 cat >>confdefs.h <<_ACEOF
13491 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13492 _ACEOF
13493
13494
13495 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13496 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13497 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13498   echo $ECHO_N "(cached) $ECHO_C" >&6
13499 else
13500   cat >conftest.$ac_ext <<_ACEOF
13501 /* confdefs.h.  */
13502 _ACEOF
13503 cat confdefs.h >>conftest.$ac_ext
13504 cat >>conftest.$ac_ext <<_ACEOF
13505 /* end confdefs.h.  */
13506 #include <sys/time.h>
13507 int
13508 main ()
13509 {
13510 struct timeval *tp;
13511 struct timezone *tzp;
13512 gettimeofday(tp,tzp);
13513   ;
13514   return 0;
13515 }
13516 _ACEOF
13517 rm -f conftest.$ac_objext
13518 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13519   (eval $ac_compile) 2>conftest.er1
13520   ac_status=$?
13521   grep -v '^ *+' conftest.er1 >conftest.err
13522   rm -f conftest.er1
13523   cat conftest.err >&5
13524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13525   (exit $ac_status); } &&
13526          { ac_try='test -z "$ac_c_werror_flag"
13527                          || test ! -s conftest.err'
13528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13529   (eval $ac_try) 2>&5
13530   ac_status=$?
13531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13532   (exit $ac_status); }; } &&
13533          { ac_try='test -s conftest.$ac_objext'
13534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13535   (eval $ac_try) 2>&5
13536   ac_status=$?
13537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13538   (exit $ac_status); }; }; then
13539   pgac_cv_func_gettimeofday_1arg=no
13540 else
13541   echo "$as_me: failed program was:" >&5
13542 sed 's/^/| /' conftest.$ac_ext >&5
13543
13544 pgac_cv_func_gettimeofday_1arg=yes
13545 fi
13546 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13547 fi
13548 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13549 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13550 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13551
13552 cat >>confdefs.h <<\_ACEOF
13553 #define GETTIMEOFDAY_1ARG
13554 _ACEOF
13555
13556 fi
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13580 do
13581 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13582 echo "$as_me:$LINENO: checking for $ac_func" >&5
13583 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13584 if eval "test \"\${$as_ac_var+set}\" = set"; then
13585   echo $ECHO_N "(cached) $ECHO_C" >&6
13586 else
13587   cat >conftest.$ac_ext <<_ACEOF
13588 /* confdefs.h.  */
13589 _ACEOF
13590 cat confdefs.h >>conftest.$ac_ext
13591 cat >>conftest.$ac_ext <<_ACEOF
13592 /* end confdefs.h.  */
13593 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13594    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13595 #define $ac_func innocuous_$ac_func
13596
13597 /* System header to define __stub macros and hopefully few prototypes,
13598     which can conflict with char $ac_func (); below.
13599     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13600     <limits.h> exists even on freestanding compilers.  */
13601
13602 #ifdef __STDC__
13603 # include <limits.h>
13604 #else
13605 # include <assert.h>
13606 #endif
13607
13608 #undef $ac_func
13609
13610 /* Override any gcc2 internal prototype to avoid an error.  */
13611 #ifdef __cplusplus
13612 extern "C"
13613 {
13614 #endif
13615 /* We use char because int might match the return type of a gcc2
13616    builtin and then its argument prototype would still apply.  */
13617 char $ac_func ();
13618 /* The GNU C library defines this for functions which it implements
13619     to always fail with ENOSYS.  Some functions are actually named
13620     something starting with __ and the normal name is an alias.  */
13621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13622 choke me
13623 #else
13624 char (*f) () = $ac_func;
13625 #endif
13626 #ifdef __cplusplus
13627 }
13628 #endif
13629
13630 int
13631 main ()
13632 {
13633 return f != $ac_func;
13634   ;
13635   return 0;
13636 }
13637 _ACEOF
13638 rm -f conftest.$ac_objext conftest$ac_exeext
13639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13640   (eval $ac_link) 2>conftest.er1
13641   ac_status=$?
13642   grep -v '^ *+' conftest.er1 >conftest.err
13643   rm -f conftest.er1
13644   cat conftest.err >&5
13645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13646   (exit $ac_status); } &&
13647          { ac_try='test -z "$ac_c_werror_flag"
13648                          || test ! -s conftest.err'
13649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13650   (eval $ac_try) 2>&5
13651   ac_status=$?
13652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13653   (exit $ac_status); }; } &&
13654          { ac_try='test -s conftest$ac_exeext'
13655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13656   (eval $ac_try) 2>&5
13657   ac_status=$?
13658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13659   (exit $ac_status); }; }; then
13660   eval "$as_ac_var=yes"
13661 else
13662   echo "$as_me: failed program was:" >&5
13663 sed 's/^/| /' conftest.$ac_ext >&5
13664
13665 eval "$as_ac_var=no"
13666 fi
13667 rm -f conftest.err conftest.$ac_objext \
13668       conftest$ac_exeext conftest.$ac_ext
13669 fi
13670 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13671 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13672 if test `eval echo '${'$as_ac_var'}'` = yes; then
13673   cat >>confdefs.h <<_ACEOF
13674 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13675 _ACEOF
13676
13677 fi
13678 done
13679
13680
13681 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13682 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13683 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13684   echo $ECHO_N "(cached) $ECHO_C" >&6
13685 else
13686   cat >conftest.$ac_ext <<_ACEOF
13687 /* confdefs.h.  */
13688 _ACEOF
13689 cat confdefs.h >>conftest.$ac_ext
13690 cat >>conftest.$ac_ext <<_ACEOF
13691 /* end confdefs.h.  */
13692 #include <unistd.h>
13693
13694 int
13695 main ()
13696 {
13697 #ifndef fdatasync
13698   char *p = (char *) fdatasync;
13699 #endif
13700
13701   ;
13702   return 0;
13703 }
13704 _ACEOF
13705 rm -f conftest.$ac_objext
13706 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13707   (eval $ac_compile) 2>conftest.er1
13708   ac_status=$?
13709   grep -v '^ *+' conftest.er1 >conftest.err
13710   rm -f conftest.er1
13711   cat conftest.err >&5
13712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713   (exit $ac_status); } &&
13714          { ac_try='test -z "$ac_c_werror_flag"
13715                          || test ! -s conftest.err'
13716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13717   (eval $ac_try) 2>&5
13718   ac_status=$?
13719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720   (exit $ac_status); }; } &&
13721          { ac_try='test -s conftest.$ac_objext'
13722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13723   (eval $ac_try) 2>&5
13724   ac_status=$?
13725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13726   (exit $ac_status); }; }; then
13727   ac_cv_have_decl_fdatasync=yes
13728 else
13729   echo "$as_me: failed program was:" >&5
13730 sed 's/^/| /' conftest.$ac_ext >&5
13731
13732 ac_cv_have_decl_fdatasync=no
13733 fi
13734 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13735 fi
13736 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13737 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13738 if test $ac_cv_have_decl_fdatasync = yes; then
13739
13740 cat >>confdefs.h <<_ACEOF
13741 #define HAVE_DECL_FDATASYNC 1
13742 _ACEOF
13743
13744
13745 else
13746   cat >>confdefs.h <<_ACEOF
13747 #define HAVE_DECL_FDATASYNC 0
13748 _ACEOF
13749
13750
13751 fi
13752
13753
13754
13755 HAVE_IPV6=no
13756 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13757 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13758 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13759   echo $ECHO_N "(cached) $ECHO_C" >&6
13760 else
13761   cat >conftest.$ac_ext <<_ACEOF
13762 /* confdefs.h.  */
13763 _ACEOF
13764 cat confdefs.h >>conftest.$ac_ext
13765 cat >>conftest.$ac_ext <<_ACEOF
13766 /* end confdefs.h.  */
13767 $ac_includes_default
13768 #include <netinet/in.h>
13769
13770 int
13771 main ()
13772 {
13773 if ((struct sockaddr_in6 *) 0)
13774   return 0;
13775 if (sizeof (struct sockaddr_in6))
13776   return 0;
13777   ;
13778   return 0;
13779 }
13780 _ACEOF
13781 rm -f conftest.$ac_objext
13782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13783   (eval $ac_compile) 2>conftest.er1
13784   ac_status=$?
13785   grep -v '^ *+' conftest.er1 >conftest.err
13786   rm -f conftest.er1
13787   cat conftest.err >&5
13788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13789   (exit $ac_status); } &&
13790          { ac_try='test -z "$ac_c_werror_flag"
13791                          || test ! -s conftest.err'
13792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13793   (eval $ac_try) 2>&5
13794   ac_status=$?
13795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13796   (exit $ac_status); }; } &&
13797          { ac_try='test -s conftest.$ac_objext'
13798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13799   (eval $ac_try) 2>&5
13800   ac_status=$?
13801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13802   (exit $ac_status); }; }; then
13803   ac_cv_type_struct_sockaddr_in6=yes
13804 else
13805   echo "$as_me: failed program was:" >&5
13806 sed 's/^/| /' conftest.$ac_ext >&5
13807
13808 ac_cv_type_struct_sockaddr_in6=no
13809 fi
13810 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13811 fi
13812 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13813 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13814 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13815
13816 cat >>confdefs.h <<\_ACEOF
13817 #define HAVE_IPV6 1
13818 _ACEOF
13819
13820          HAVE_IPV6=yes
13821 fi
13822
13823
13824
13825 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13826 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13827 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13828   echo $ECHO_N "(cached) $ECHO_C" >&6
13829 else
13830   cat >conftest.$ac_ext <<_ACEOF
13831 /* confdefs.h.  */
13832 _ACEOF
13833 cat confdefs.h >>conftest.$ac_ext
13834 cat >>conftest.$ac_ext <<_ACEOF
13835 /* end confdefs.h.  */
13836 #include <machine/vmparam.h>
13837 #include <sys/exec.h>
13838
13839 int
13840 main ()
13841 {
13842 PS_STRINGS->ps_nargvstr = 1;
13843 PS_STRINGS->ps_argvstr = "foo";
13844   ;
13845   return 0;
13846 }
13847 _ACEOF
13848 rm -f conftest.$ac_objext conftest$ac_exeext
13849 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13850   (eval $ac_link) 2>conftest.er1
13851   ac_status=$?
13852   grep -v '^ *+' conftest.er1 >conftest.err
13853   rm -f conftest.er1
13854   cat conftest.err >&5
13855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13856   (exit $ac_status); } &&
13857          { ac_try='test -z "$ac_c_werror_flag"
13858                          || test ! -s conftest.err'
13859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13860   (eval $ac_try) 2>&5
13861   ac_status=$?
13862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13863   (exit $ac_status); }; } &&
13864          { ac_try='test -s conftest$ac_exeext'
13865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13866   (eval $ac_try) 2>&5
13867   ac_status=$?
13868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869   (exit $ac_status); }; }; then
13870   pgac_cv_var_PS_STRINGS=yes
13871 else
13872   echo "$as_me: failed program was:" >&5
13873 sed 's/^/| /' conftest.$ac_ext >&5
13874
13875 pgac_cv_var_PS_STRINGS=no
13876 fi
13877 rm -f conftest.err conftest.$ac_objext \
13878       conftest$ac_exeext conftest.$ac_ext
13879 fi
13880 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13881 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13882 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13883
13884 cat >>confdefs.h <<\_ACEOF
13885 #define HAVE_PS_STRINGS
13886 _ACEOF
13887
13888 fi
13889
13890
13891 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13892 # is missing.  Yes, there are machines that have only one.  We may
13893 # also decide to use snprintf.c if snprintf() is present but does not
13894 # have all the features we need --- see below.
13895
13896 if test "$PORTNAME" = "win32"; then
13897   # Win32 gets snprintf.c built unconditionally.
13898   #
13899   # To properly translate all NLS languages strings, we must support the
13900   # *printf() %$ format, which allows *printf() arguments to be selected
13901   # by position in the translated string.
13902   #
13903   # libintl versions < 0.13 use the native *printf() functions, and Win32
13904   # *printf() doesn't understand %$, so we must use our /port versions,
13905   # which do understand %$. libintl versions >= 0.13 include their own
13906   # *printf versions on Win32.  The libintl 0.13 release note text is:
13907   #
13908   #   C format strings with positions, as they arise when a translator
13909   #   needs to reorder a sentence, are now supported on all platforms.
13910   #   On those few platforms (NetBSD and Woe32) for which the native
13911   #   printf()/fprintf()/... functions don't support such format
13912   #   strings, replacements are provided through <libintl.h>.
13913   #
13914   # We could use libintl >= 0.13's *printf() if we were sure that we had
13915   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13916   # to guarantee that, it is best to just use our own, so we are sure to
13917   # get %$ support. In include/port.h we disable the *printf() macros
13918   # that might have been defined by libintl.
13919   #
13920   # We do this unconditionally whether NLS is used or not so we are sure
13921   # that all Win32 libraries and binaries behave the same.
13922   pgac_need_repl_snprintf=yes
13923 else
13924   pgac_need_repl_snprintf=no
13925
13926 for ac_func in snprintf
13927 do
13928 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13929 echo "$as_me:$LINENO: checking for $ac_func" >&5
13930 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13931 if eval "test \"\${$as_ac_var+set}\" = set"; then
13932   echo $ECHO_N "(cached) $ECHO_C" >&6
13933 else
13934   cat >conftest.$ac_ext <<_ACEOF
13935 /* confdefs.h.  */
13936 _ACEOF
13937 cat confdefs.h >>conftest.$ac_ext
13938 cat >>conftest.$ac_ext <<_ACEOF
13939 /* end confdefs.h.  */
13940 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13941    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13942 #define $ac_func innocuous_$ac_func
13943
13944 /* System header to define __stub macros and hopefully few prototypes,
13945     which can conflict with char $ac_func (); below.
13946     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13947     <limits.h> exists even on freestanding compilers.  */
13948
13949 #ifdef __STDC__
13950 # include <limits.h>
13951 #else
13952 # include <assert.h>
13953 #endif
13954
13955 #undef $ac_func
13956
13957 /* Override any gcc2 internal prototype to avoid an error.  */
13958 #ifdef __cplusplus
13959 extern "C"
13960 {
13961 #endif
13962 /* We use char because int might match the return type of a gcc2
13963    builtin and then its argument prototype would still apply.  */
13964 char $ac_func ();
13965 /* The GNU C library defines this for functions which it implements
13966     to always fail with ENOSYS.  Some functions are actually named
13967     something starting with __ and the normal name is an alias.  */
13968 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13969 choke me
13970 #else
13971 char (*f) () = $ac_func;
13972 #endif
13973 #ifdef __cplusplus
13974 }
13975 #endif
13976
13977 int
13978 main ()
13979 {
13980 return f != $ac_func;
13981   ;
13982   return 0;
13983 }
13984 _ACEOF
13985 rm -f conftest.$ac_objext conftest$ac_exeext
13986 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13987   (eval $ac_link) 2>conftest.er1
13988   ac_status=$?
13989   grep -v '^ *+' conftest.er1 >conftest.err
13990   rm -f conftest.er1
13991   cat conftest.err >&5
13992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13993   (exit $ac_status); } &&
13994          { ac_try='test -z "$ac_c_werror_flag"
13995                          || test ! -s conftest.err'
13996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13997   (eval $ac_try) 2>&5
13998   ac_status=$?
13999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14000   (exit $ac_status); }; } &&
14001          { ac_try='test -s conftest$ac_exeext'
14002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14003   (eval $ac_try) 2>&5
14004   ac_status=$?
14005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14006   (exit $ac_status); }; }; then
14007   eval "$as_ac_var=yes"
14008 else
14009   echo "$as_me: failed program was:" >&5
14010 sed 's/^/| /' conftest.$ac_ext >&5
14011
14012 eval "$as_ac_var=no"
14013 fi
14014 rm -f conftest.err conftest.$ac_objext \
14015       conftest$ac_exeext conftest.$ac_ext
14016 fi
14017 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14018 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14019 if test `eval echo '${'$as_ac_var'}'` = yes; then
14020   cat >>confdefs.h <<_ACEOF
14021 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14022 _ACEOF
14023
14024 else
14025   pgac_need_repl_snprintf=yes
14026 fi
14027 done
14028
14029
14030 for ac_func in vsnprintf
14031 do
14032 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14033 echo "$as_me:$LINENO: checking for $ac_func" >&5
14034 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14035 if eval "test \"\${$as_ac_var+set}\" = set"; then
14036   echo $ECHO_N "(cached) $ECHO_C" >&6
14037 else
14038   cat >conftest.$ac_ext <<_ACEOF
14039 /* confdefs.h.  */
14040 _ACEOF
14041 cat confdefs.h >>conftest.$ac_ext
14042 cat >>conftest.$ac_ext <<_ACEOF
14043 /* end confdefs.h.  */
14044 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14045    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14046 #define $ac_func innocuous_$ac_func
14047
14048 /* System header to define __stub macros and hopefully few prototypes,
14049     which can conflict with char $ac_func (); below.
14050     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14051     <limits.h> exists even on freestanding compilers.  */
14052
14053 #ifdef __STDC__
14054 # include <limits.h>
14055 #else
14056 # include <assert.h>
14057 #endif
14058
14059 #undef $ac_func
14060
14061 /* Override any gcc2 internal prototype to avoid an error.  */
14062 #ifdef __cplusplus
14063 extern "C"
14064 {
14065 #endif
14066 /* We use char because int might match the return type of a gcc2
14067    builtin and then its argument prototype would still apply.  */
14068 char $ac_func ();
14069 /* The GNU C library defines this for functions which it implements
14070     to always fail with ENOSYS.  Some functions are actually named
14071     something starting with __ and the normal name is an alias.  */
14072 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14073 choke me
14074 #else
14075 char (*f) () = $ac_func;
14076 #endif
14077 #ifdef __cplusplus
14078 }
14079 #endif
14080
14081 int
14082 main ()
14083 {
14084 return f != $ac_func;
14085   ;
14086   return 0;
14087 }
14088 _ACEOF
14089 rm -f conftest.$ac_objext conftest$ac_exeext
14090 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14091   (eval $ac_link) 2>conftest.er1
14092   ac_status=$?
14093   grep -v '^ *+' conftest.er1 >conftest.err
14094   rm -f conftest.er1
14095   cat conftest.err >&5
14096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14097   (exit $ac_status); } &&
14098          { ac_try='test -z "$ac_c_werror_flag"
14099                          || test ! -s conftest.err'
14100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14101   (eval $ac_try) 2>&5
14102   ac_status=$?
14103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14104   (exit $ac_status); }; } &&
14105          { ac_try='test -s conftest$ac_exeext'
14106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14107   (eval $ac_try) 2>&5
14108   ac_status=$?
14109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14110   (exit $ac_status); }; }; then
14111   eval "$as_ac_var=yes"
14112 else
14113   echo "$as_me: failed program was:" >&5
14114 sed 's/^/| /' conftest.$ac_ext >&5
14115
14116 eval "$as_ac_var=no"
14117 fi
14118 rm -f conftest.err conftest.$ac_objext \
14119       conftest$ac_exeext conftest.$ac_ext
14120 fi
14121 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14122 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14123 if test `eval echo '${'$as_ac_var'}'` = yes; then
14124   cat >>confdefs.h <<_ACEOF
14125 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14126 _ACEOF
14127
14128 else
14129   pgac_need_repl_snprintf=yes
14130 fi
14131 done
14132
14133 fi
14134
14135
14136 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14137 # include/c.h will provide declarations.  Note this is a separate test
14138 # from whether the functions exist in the C library --- there are
14139 # systems that have the functions but don't bother to declare them :-(
14140
14141 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14142 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14143 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14144   echo $ECHO_N "(cached) $ECHO_C" >&6
14145 else
14146   cat >conftest.$ac_ext <<_ACEOF
14147 /* confdefs.h.  */
14148 _ACEOF
14149 cat confdefs.h >>conftest.$ac_ext
14150 cat >>conftest.$ac_ext <<_ACEOF
14151 /* end confdefs.h.  */
14152 $ac_includes_default
14153 int
14154 main ()
14155 {
14156 #ifndef snprintf
14157   char *p = (char *) snprintf;
14158 #endif
14159
14160   ;
14161   return 0;
14162 }
14163 _ACEOF
14164 rm -f conftest.$ac_objext
14165 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14166   (eval $ac_compile) 2>conftest.er1
14167   ac_status=$?
14168   grep -v '^ *+' conftest.er1 >conftest.err
14169   rm -f conftest.er1
14170   cat conftest.err >&5
14171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14172   (exit $ac_status); } &&
14173          { ac_try='test -z "$ac_c_werror_flag"
14174                          || test ! -s conftest.err'
14175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14176   (eval $ac_try) 2>&5
14177   ac_status=$?
14178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14179   (exit $ac_status); }; } &&
14180          { ac_try='test -s conftest.$ac_objext'
14181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14182   (eval $ac_try) 2>&5
14183   ac_status=$?
14184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185   (exit $ac_status); }; }; then
14186   ac_cv_have_decl_snprintf=yes
14187 else
14188   echo "$as_me: failed program was:" >&5
14189 sed 's/^/| /' conftest.$ac_ext >&5
14190
14191 ac_cv_have_decl_snprintf=no
14192 fi
14193 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14194 fi
14195 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14196 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14197 if test $ac_cv_have_decl_snprintf = yes; then
14198
14199 cat >>confdefs.h <<_ACEOF
14200 #define HAVE_DECL_SNPRINTF 1
14201 _ACEOF
14202
14203
14204 else
14205   cat >>confdefs.h <<_ACEOF
14206 #define HAVE_DECL_SNPRINTF 0
14207 _ACEOF
14208
14209
14210 fi
14211 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14212 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14213 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14214   echo $ECHO_N "(cached) $ECHO_C" >&6
14215 else
14216   cat >conftest.$ac_ext <<_ACEOF
14217 /* confdefs.h.  */
14218 _ACEOF
14219 cat confdefs.h >>conftest.$ac_ext
14220 cat >>conftest.$ac_ext <<_ACEOF
14221 /* end confdefs.h.  */
14222 $ac_includes_default
14223 int
14224 main ()
14225 {
14226 #ifndef vsnprintf
14227   char *p = (char *) vsnprintf;
14228 #endif
14229
14230   ;
14231   return 0;
14232 }
14233 _ACEOF
14234 rm -f conftest.$ac_objext
14235 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14236   (eval $ac_compile) 2>conftest.er1
14237   ac_status=$?
14238   grep -v '^ *+' conftest.er1 >conftest.err
14239   rm -f conftest.er1
14240   cat conftest.err >&5
14241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14242   (exit $ac_status); } &&
14243          { ac_try='test -z "$ac_c_werror_flag"
14244                          || test ! -s conftest.err'
14245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14246   (eval $ac_try) 2>&5
14247   ac_status=$?
14248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14249   (exit $ac_status); }; } &&
14250          { ac_try='test -s conftest.$ac_objext'
14251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14252   (eval $ac_try) 2>&5
14253   ac_status=$?
14254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255   (exit $ac_status); }; }; then
14256   ac_cv_have_decl_vsnprintf=yes
14257 else
14258   echo "$as_me: failed program was:" >&5
14259 sed 's/^/| /' conftest.$ac_ext >&5
14260
14261 ac_cv_have_decl_vsnprintf=no
14262 fi
14263 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14264 fi
14265 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14266 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14267 if test $ac_cv_have_decl_vsnprintf = yes; then
14268
14269 cat >>confdefs.h <<_ACEOF
14270 #define HAVE_DECL_VSNPRINTF 1
14271 _ACEOF
14272
14273
14274 else
14275   cat >>confdefs.h <<_ACEOF
14276 #define HAVE_DECL_VSNPRINTF 0
14277 _ACEOF
14278
14279
14280 fi
14281
14282
14283
14284
14285 # do this one the hard way in case isinf() is a macro
14286 echo "$as_me:$LINENO: checking for isinf" >&5
14287 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14288 if test "${ac_cv_func_isinf+set}" = set; then
14289   echo $ECHO_N "(cached) $ECHO_C" >&6
14290 else
14291   cat >conftest.$ac_ext <<_ACEOF
14292 /* confdefs.h.  */
14293 _ACEOF
14294 cat confdefs.h >>conftest.$ac_ext
14295 cat >>conftest.$ac_ext <<_ACEOF
14296 /* end confdefs.h.  */
14297 #include <math.h>
14298
14299 int
14300 main ()
14301 {
14302 double x = 0.0; int res = isinf(x);
14303   ;
14304   return 0;
14305 }
14306 _ACEOF
14307 rm -f conftest.$ac_objext conftest$ac_exeext
14308 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14309   (eval $ac_link) 2>conftest.er1
14310   ac_status=$?
14311   grep -v '^ *+' conftest.er1 >conftest.err
14312   rm -f conftest.er1
14313   cat conftest.err >&5
14314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14315   (exit $ac_status); } &&
14316          { ac_try='test -z "$ac_c_werror_flag"
14317                          || test ! -s conftest.err'
14318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14319   (eval $ac_try) 2>&5
14320   ac_status=$?
14321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14322   (exit $ac_status); }; } &&
14323          { ac_try='test -s conftest$ac_exeext'
14324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14325   (eval $ac_try) 2>&5
14326   ac_status=$?
14327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14328   (exit $ac_status); }; }; then
14329   ac_cv_func_isinf=yes
14330 else
14331   echo "$as_me: failed program was:" >&5
14332 sed 's/^/| /' conftest.$ac_ext >&5
14333
14334 ac_cv_func_isinf=no
14335 fi
14336 rm -f conftest.err conftest.$ac_objext \
14337       conftest$ac_exeext conftest.$ac_ext
14338 fi
14339 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14340 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14341
14342 if test $ac_cv_func_isinf = yes ; then
14343
14344 cat >>confdefs.h <<\_ACEOF
14345 #define HAVE_ISINF 1
14346 _ACEOF
14347
14348 else
14349   case $LIBOBJS in
14350     "isinf.$ac_objext"   | \
14351   *" isinf.$ac_objext"   | \
14352     "isinf.$ac_objext "* | \
14353   *" isinf.$ac_objext "* ) ;;
14354   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14355 esac
14356
14357   # Look for a way to implement a substitute for isinf()
14358
14359
14360
14361
14362 for ac_func in fpclass fp_class fp_class_d class
14363 do
14364 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14365 echo "$as_me:$LINENO: checking for $ac_func" >&5
14366 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14367 if eval "test \"\${$as_ac_var+set}\" = set"; then
14368   echo $ECHO_N "(cached) $ECHO_C" >&6
14369 else
14370   cat >conftest.$ac_ext <<_ACEOF
14371 /* confdefs.h.  */
14372 _ACEOF
14373 cat confdefs.h >>conftest.$ac_ext
14374 cat >>conftest.$ac_ext <<_ACEOF
14375 /* end confdefs.h.  */
14376 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14377    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14378 #define $ac_func innocuous_$ac_func
14379
14380 /* System header to define __stub macros and hopefully few prototypes,
14381     which can conflict with char $ac_func (); below.
14382     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14383     <limits.h> exists even on freestanding compilers.  */
14384
14385 #ifdef __STDC__
14386 # include <limits.h>
14387 #else
14388 # include <assert.h>
14389 #endif
14390
14391 #undef $ac_func
14392
14393 /* Override any gcc2 internal prototype to avoid an error.  */
14394 #ifdef __cplusplus
14395 extern "C"
14396 {
14397 #endif
14398 /* We use char because int might match the return type of a gcc2
14399    builtin and then its argument prototype would still apply.  */
14400 char $ac_func ();
14401 /* The GNU C library defines this for functions which it implements
14402     to always fail with ENOSYS.  Some functions are actually named
14403     something starting with __ and the normal name is an alias.  */
14404 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14405 choke me
14406 #else
14407 char (*f) () = $ac_func;
14408 #endif
14409 #ifdef __cplusplus
14410 }
14411 #endif
14412
14413 int
14414 main ()
14415 {
14416 return f != $ac_func;
14417   ;
14418   return 0;
14419 }
14420 _ACEOF
14421 rm -f conftest.$ac_objext conftest$ac_exeext
14422 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14423   (eval $ac_link) 2>conftest.er1
14424   ac_status=$?
14425   grep -v '^ *+' conftest.er1 >conftest.err
14426   rm -f conftest.er1
14427   cat conftest.err >&5
14428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14429   (exit $ac_status); } &&
14430          { ac_try='test -z "$ac_c_werror_flag"
14431                          || test ! -s conftest.err'
14432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14433   (eval $ac_try) 2>&5
14434   ac_status=$?
14435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14436   (exit $ac_status); }; } &&
14437          { ac_try='test -s conftest$ac_exeext'
14438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14439   (eval $ac_try) 2>&5
14440   ac_status=$?
14441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14442   (exit $ac_status); }; }; then
14443   eval "$as_ac_var=yes"
14444 else
14445   echo "$as_me: failed program was:" >&5
14446 sed 's/^/| /' conftest.$ac_ext >&5
14447
14448 eval "$as_ac_var=no"
14449 fi
14450 rm -f conftest.err conftest.$ac_objext \
14451       conftest$ac_exeext conftest.$ac_ext
14452 fi
14453 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14454 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14455 if test `eval echo '${'$as_ac_var'}'` = yes; then
14456   cat >>confdefs.h <<_ACEOF
14457 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14458 _ACEOF
14459  break
14460 fi
14461 done
14462
14463 fi
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14479 do
14480 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14481 echo "$as_me:$LINENO: checking for $ac_func" >&5
14482 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14483 if eval "test \"\${$as_ac_var+set}\" = set"; then
14484   echo $ECHO_N "(cached) $ECHO_C" >&6
14485 else
14486   cat >conftest.$ac_ext <<_ACEOF
14487 /* confdefs.h.  */
14488 _ACEOF
14489 cat confdefs.h >>conftest.$ac_ext
14490 cat >>conftest.$ac_ext <<_ACEOF
14491 /* end confdefs.h.  */
14492 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14493    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14494 #define $ac_func innocuous_$ac_func
14495
14496 /* System header to define __stub macros and hopefully few prototypes,
14497     which can conflict with char $ac_func (); below.
14498     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14499     <limits.h> exists even on freestanding compilers.  */
14500
14501 #ifdef __STDC__
14502 # include <limits.h>
14503 #else
14504 # include <assert.h>
14505 #endif
14506
14507 #undef $ac_func
14508
14509 /* Override any gcc2 internal prototype to avoid an error.  */
14510 #ifdef __cplusplus
14511 extern "C"
14512 {
14513 #endif
14514 /* We use char because int might match the return type of a gcc2
14515    builtin and then its argument prototype would still apply.  */
14516 char $ac_func ();
14517 /* The GNU C library defines this for functions which it implements
14518     to always fail with ENOSYS.  Some functions are actually named
14519     something starting with __ and the normal name is an alias.  */
14520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14521 choke me
14522 #else
14523 char (*f) () = $ac_func;
14524 #endif
14525 #ifdef __cplusplus
14526 }
14527 #endif
14528
14529 int
14530 main ()
14531 {
14532 return f != $ac_func;
14533   ;
14534   return 0;
14535 }
14536 _ACEOF
14537 rm -f conftest.$ac_objext conftest$ac_exeext
14538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14539   (eval $ac_link) 2>conftest.er1
14540   ac_status=$?
14541   grep -v '^ *+' conftest.er1 >conftest.err
14542   rm -f conftest.er1
14543   cat conftest.err >&5
14544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545   (exit $ac_status); } &&
14546          { ac_try='test -z "$ac_c_werror_flag"
14547                          || test ! -s conftest.err'
14548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14549   (eval $ac_try) 2>&5
14550   ac_status=$?
14551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552   (exit $ac_status); }; } &&
14553          { ac_try='test -s conftest$ac_exeext'
14554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14555   (eval $ac_try) 2>&5
14556   ac_status=$?
14557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14558   (exit $ac_status); }; }; then
14559   eval "$as_ac_var=yes"
14560 else
14561   echo "$as_me: failed program was:" >&5
14562 sed 's/^/| /' conftest.$ac_ext >&5
14563
14564 eval "$as_ac_var=no"
14565 fi
14566 rm -f conftest.err conftest.$ac_objext \
14567       conftest$ac_exeext conftest.$ac_ext
14568 fi
14569 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14570 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14571 if test `eval echo '${'$as_ac_var'}'` = yes; then
14572   cat >>confdefs.h <<_ACEOF
14573 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14574 _ACEOF
14575
14576 else
14577   case $LIBOBJS in
14578     "$ac_func.$ac_objext"   | \
14579   *" $ac_func.$ac_objext"   | \
14580     "$ac_func.$ac_objext "* | \
14581   *" $ac_func.$ac_objext "* ) ;;
14582   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14583 esac
14584
14585 fi
14586 done
14587
14588
14589
14590 # System's version of getaddrinfo(), if any, may be used only if we found
14591 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14592 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14593 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14594 # because we want to use our own getaddrinfo.c on Windows anyway.)
14595 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14596
14597 for ac_func in getaddrinfo
14598 do
14599 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14600 echo "$as_me:$LINENO: checking for $ac_func" >&5
14601 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14602 if eval "test \"\${$as_ac_var+set}\" = set"; then
14603   echo $ECHO_N "(cached) $ECHO_C" >&6
14604 else
14605   cat >conftest.$ac_ext <<_ACEOF
14606 /* confdefs.h.  */
14607 _ACEOF
14608 cat confdefs.h >>conftest.$ac_ext
14609 cat >>conftest.$ac_ext <<_ACEOF
14610 /* end confdefs.h.  */
14611 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14612    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14613 #define $ac_func innocuous_$ac_func
14614
14615 /* System header to define __stub macros and hopefully few prototypes,
14616     which can conflict with char $ac_func (); below.
14617     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14618     <limits.h> exists even on freestanding compilers.  */
14619
14620 #ifdef __STDC__
14621 # include <limits.h>
14622 #else
14623 # include <assert.h>
14624 #endif
14625
14626 #undef $ac_func
14627
14628 /* Override any gcc2 internal prototype to avoid an error.  */
14629 #ifdef __cplusplus
14630 extern "C"
14631 {
14632 #endif
14633 /* We use char because int might match the return type of a gcc2
14634    builtin and then its argument prototype would still apply.  */
14635 char $ac_func ();
14636 /* The GNU C library defines this for functions which it implements
14637     to always fail with ENOSYS.  Some functions are actually named
14638     something starting with __ and the normal name is an alias.  */
14639 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14640 choke me
14641 #else
14642 char (*f) () = $ac_func;
14643 #endif
14644 #ifdef __cplusplus
14645 }
14646 #endif
14647
14648 int
14649 main ()
14650 {
14651 return f != $ac_func;
14652   ;
14653   return 0;
14654 }
14655 _ACEOF
14656 rm -f conftest.$ac_objext conftest$ac_exeext
14657 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14658   (eval $ac_link) 2>conftest.er1
14659   ac_status=$?
14660   grep -v '^ *+' conftest.er1 >conftest.err
14661   rm -f conftest.er1
14662   cat conftest.err >&5
14663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14664   (exit $ac_status); } &&
14665          { ac_try='test -z "$ac_c_werror_flag"
14666                          || test ! -s conftest.err'
14667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14668   (eval $ac_try) 2>&5
14669   ac_status=$?
14670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14671   (exit $ac_status); }; } &&
14672          { ac_try='test -s conftest$ac_exeext'
14673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14674   (eval $ac_try) 2>&5
14675   ac_status=$?
14676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14677   (exit $ac_status); }; }; then
14678   eval "$as_ac_var=yes"
14679 else
14680   echo "$as_me: failed program was:" >&5
14681 sed 's/^/| /' conftest.$ac_ext >&5
14682
14683 eval "$as_ac_var=no"
14684 fi
14685 rm -f conftest.err conftest.$ac_objext \
14686       conftest$ac_exeext conftest.$ac_ext
14687 fi
14688 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14689 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14690 if test `eval echo '${'$as_ac_var'}'` = yes; then
14691   cat >>confdefs.h <<_ACEOF
14692 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14693 _ACEOF
14694
14695 else
14696   case $LIBOBJS in
14697     "$ac_func.$ac_objext"   | \
14698   *" $ac_func.$ac_objext"   | \
14699     "$ac_func.$ac_objext "* | \
14700   *" $ac_func.$ac_objext "* ) ;;
14701   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14702 esac
14703
14704 fi
14705 done
14706
14707
14708 else
14709   case $LIBOBJS in
14710     "getaddrinfo.$ac_objext"   | \
14711   *" getaddrinfo.$ac_objext"   | \
14712     "getaddrinfo.$ac_objext "* | \
14713   *" getaddrinfo.$ac_objext "* ) ;;
14714   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14715 esac
14716
14717 fi
14718
14719 # similarly, use system's getopt_long() only if system provides struct option.
14720 if test x"$ac_cv_type_struct_option" = xyes ; then
14721
14722 for ac_func in getopt_long
14723 do
14724 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14725 echo "$as_me:$LINENO: checking for $ac_func" >&5
14726 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14727 if eval "test \"\${$as_ac_var+set}\" = set"; then
14728   echo $ECHO_N "(cached) $ECHO_C" >&6
14729 else
14730   cat >conftest.$ac_ext <<_ACEOF
14731 /* confdefs.h.  */
14732 _ACEOF
14733 cat confdefs.h >>conftest.$ac_ext
14734 cat >>conftest.$ac_ext <<_ACEOF
14735 /* end confdefs.h.  */
14736 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14737    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14738 #define $ac_func innocuous_$ac_func
14739
14740 /* System header to define __stub macros and hopefully few prototypes,
14741     which can conflict with char $ac_func (); below.
14742     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14743     <limits.h> exists even on freestanding compilers.  */
14744
14745 #ifdef __STDC__
14746 # include <limits.h>
14747 #else
14748 # include <assert.h>
14749 #endif
14750
14751 #undef $ac_func
14752
14753 /* Override any gcc2 internal prototype to avoid an error.  */
14754 #ifdef __cplusplus
14755 extern "C"
14756 {
14757 #endif
14758 /* We use char because int might match the return type of a gcc2
14759    builtin and then its argument prototype would still apply.  */
14760 char $ac_func ();
14761 /* The GNU C library defines this for functions which it implements
14762     to always fail with ENOSYS.  Some functions are actually named
14763     something starting with __ and the normal name is an alias.  */
14764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14765 choke me
14766 #else
14767 char (*f) () = $ac_func;
14768 #endif
14769 #ifdef __cplusplus
14770 }
14771 #endif
14772
14773 int
14774 main ()
14775 {
14776 return f != $ac_func;
14777   ;
14778   return 0;
14779 }
14780 _ACEOF
14781 rm -f conftest.$ac_objext conftest$ac_exeext
14782 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14783   (eval $ac_link) 2>conftest.er1
14784   ac_status=$?
14785   grep -v '^ *+' conftest.er1 >conftest.err
14786   rm -f conftest.er1
14787   cat conftest.err >&5
14788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789   (exit $ac_status); } &&
14790          { ac_try='test -z "$ac_c_werror_flag"
14791                          || test ! -s conftest.err'
14792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14793   (eval $ac_try) 2>&5
14794   ac_status=$?
14795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796   (exit $ac_status); }; } &&
14797          { ac_try='test -s conftest$ac_exeext'
14798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14799   (eval $ac_try) 2>&5
14800   ac_status=$?
14801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802   (exit $ac_status); }; }; then
14803   eval "$as_ac_var=yes"
14804 else
14805   echo "$as_me: failed program was:" >&5
14806 sed 's/^/| /' conftest.$ac_ext >&5
14807
14808 eval "$as_ac_var=no"
14809 fi
14810 rm -f conftest.err conftest.$ac_objext \
14811       conftest$ac_exeext conftest.$ac_ext
14812 fi
14813 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14814 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14815 if test `eval echo '${'$as_ac_var'}'` = yes; then
14816   cat >>confdefs.h <<_ACEOF
14817 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14818 _ACEOF
14819
14820 else
14821   case $LIBOBJS in
14822     "$ac_func.$ac_objext"   | \
14823   *" $ac_func.$ac_objext"   | \
14824     "$ac_func.$ac_objext "* | \
14825   *" $ac_func.$ac_objext "* ) ;;
14826   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14827 esac
14828
14829 fi
14830 done
14831
14832
14833 else
14834   case $LIBOBJS in
14835     "getopt_long.$ac_objext"   | \
14836   *" getopt_long.$ac_objext"   | \
14837     "getopt_long.$ac_objext "* | \
14838   *" getopt_long.$ac_objext "* ) ;;
14839   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14840 esac
14841
14842 fi
14843
14844 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14845 # We override the previous test that said fseeko/ftello didn't exist
14846 # OS tests are also done in include/c.h and port/fseeko.c
14847 case $host_os in bsdi*|netbsd*)
14848 ac_cv_func_fseeko=yes
14849 esac
14850
14851 # Solaris has a very slow qsort in certain cases, so we replace it.
14852 if test "$PORTNAME" = "solaris"; then
14853 case $LIBOBJS in
14854     "qsort.$ac_objext"   | \
14855   *" qsort.$ac_objext"   | \
14856     "qsort.$ac_objext "* | \
14857   *" qsort.$ac_objext "* ) ;;
14858   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
14859 esac
14860
14861 fi
14862
14863 # Win32 support
14864 if test "$PORTNAME" = "win32"; then
14865 case $LIBOBJS in
14866     "gettimeofday.$ac_objext"   | \
14867   *" gettimeofday.$ac_objext"   | \
14868     "gettimeofday.$ac_objext "* | \
14869   *" gettimeofday.$ac_objext "* ) ;;
14870   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14871 esac
14872
14873 case $LIBOBJS in
14874     "kill.$ac_objext"   | \
14875   *" kill.$ac_objext"   | \
14876     "kill.$ac_objext "* | \
14877   *" kill.$ac_objext "* ) ;;
14878   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14879 esac
14880
14881 case $LIBOBJS in
14882     "open.$ac_objext"   | \
14883   *" open.$ac_objext"   | \
14884     "open.$ac_objext "* | \
14885   *" open.$ac_objext "* ) ;;
14886   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14887 esac
14888
14889 case $LIBOBJS in
14890     "rand.$ac_objext"   | \
14891   *" rand.$ac_objext"   | \
14892     "rand.$ac_objext "* | \
14893   *" rand.$ac_objext "* ) ;;
14894   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14895 esac
14896
14897
14898 cat >>confdefs.h <<\_ACEOF
14899 #define HAVE_SYMLINK 1
14900 _ACEOF
14901
14902 fi
14903
14904 if test "$with_readline" = yes; then
14905   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
14906 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
14907 cat >conftest.$ac_ext <<_ACEOF
14908 /* confdefs.h.  */
14909 _ACEOF
14910 cat confdefs.h >>conftest.$ac_ext
14911 cat >>conftest.$ac_ext <<_ACEOF
14912 /* end confdefs.h.  */
14913 #include <stdio.h>
14914 #ifdef HAVE_READLINE_READLINE_H
14915 # include <readline/readline.h>
14916 #elif defined(HAVE_READLINE_H)
14917 # include <readline.h>
14918 #endif
14919
14920 int
14921 main ()
14922 {
14923 rl_completion_append_character = 'x';
14924   ;
14925   return 0;
14926 }
14927 _ACEOF
14928 rm -f conftest.$ac_objext conftest$ac_exeext
14929 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14930   (eval $ac_link) 2>conftest.er1
14931   ac_status=$?
14932   grep -v '^ *+' conftest.er1 >conftest.err
14933   rm -f conftest.er1
14934   cat conftest.err >&5
14935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14936   (exit $ac_status); } &&
14937          { ac_try='test -z "$ac_c_werror_flag"
14938                          || test ! -s conftest.err'
14939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14940   (eval $ac_try) 2>&5
14941   ac_status=$?
14942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14943   (exit $ac_status); }; } &&
14944          { ac_try='test -s conftest$ac_exeext'
14945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14946   (eval $ac_try) 2>&5
14947   ac_status=$?
14948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14949   (exit $ac_status); }; }; then
14950   echo "$as_me:$LINENO: result: yes" >&5
14951 echo "${ECHO_T}yes" >&6
14952
14953 cat >>confdefs.h <<\_ACEOF
14954 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
14955 _ACEOF
14956
14957 else
14958   echo "$as_me: failed program was:" >&5
14959 sed 's/^/| /' conftest.$ac_ext >&5
14960
14961 echo "$as_me:$LINENO: result: no" >&5
14962 echo "${ECHO_T}no" >&6
14963 fi
14964 rm -f conftest.err conftest.$ac_objext \
14965       conftest$ac_exeext conftest.$ac_ext
14966
14967
14968 for ac_func in rl_completion_matches rl_filename_completion_function
14969 do
14970 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14971 echo "$as_me:$LINENO: checking for $ac_func" >&5
14972 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14973 if eval "test \"\${$as_ac_var+set}\" = set"; then
14974   echo $ECHO_N "(cached) $ECHO_C" >&6
14975 else
14976   cat >conftest.$ac_ext <<_ACEOF
14977 /* confdefs.h.  */
14978 _ACEOF
14979 cat confdefs.h >>conftest.$ac_ext
14980 cat >>conftest.$ac_ext <<_ACEOF
14981 /* end confdefs.h.  */
14982 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14983    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14984 #define $ac_func innocuous_$ac_func
14985
14986 /* System header to define __stub macros and hopefully few prototypes,
14987     which can conflict with char $ac_func (); below.
14988     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14989     <limits.h> exists even on freestanding compilers.  */
14990
14991 #ifdef __STDC__
14992 # include <limits.h>
14993 #else
14994 # include <assert.h>
14995 #endif
14996
14997 #undef $ac_func
14998
14999 /* Override any gcc2 internal prototype to avoid an error.  */
15000 #ifdef __cplusplus
15001 extern "C"
15002 {
15003 #endif
15004 /* We use char because int might match the return type of a gcc2
15005    builtin and then its argument prototype would still apply.  */
15006 char $ac_func ();
15007 /* The GNU C library defines this for functions which it implements
15008     to always fail with ENOSYS.  Some functions are actually named
15009     something starting with __ and the normal name is an alias.  */
15010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15011 choke me
15012 #else
15013 char (*f) () = $ac_func;
15014 #endif
15015 #ifdef __cplusplus
15016 }
15017 #endif
15018
15019 int
15020 main ()
15021 {
15022 return f != $ac_func;
15023   ;
15024   return 0;
15025 }
15026 _ACEOF
15027 rm -f conftest.$ac_objext conftest$ac_exeext
15028 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15029   (eval $ac_link) 2>conftest.er1
15030   ac_status=$?
15031   grep -v '^ *+' conftest.er1 >conftest.err
15032   rm -f conftest.er1
15033   cat conftest.err >&5
15034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15035   (exit $ac_status); } &&
15036          { ac_try='test -z "$ac_c_werror_flag"
15037                          || test ! -s conftest.err'
15038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15039   (eval $ac_try) 2>&5
15040   ac_status=$?
15041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15042   (exit $ac_status); }; } &&
15043          { ac_try='test -s conftest$ac_exeext'
15044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15045   (eval $ac_try) 2>&5
15046   ac_status=$?
15047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15048   (exit $ac_status); }; }; then
15049   eval "$as_ac_var=yes"
15050 else
15051   echo "$as_me: failed program was:" >&5
15052 sed 's/^/| /' conftest.$ac_ext >&5
15053
15054 eval "$as_ac_var=no"
15055 fi
15056 rm -f conftest.err conftest.$ac_objext \
15057       conftest$ac_exeext conftest.$ac_ext
15058 fi
15059 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15060 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15061 if test `eval echo '${'$as_ac_var'}'` = yes; then
15062   cat >>confdefs.h <<_ACEOF
15063 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15064 _ACEOF
15065
15066 fi
15067 done
15068
15069
15070 for ac_func in replace_history_entry
15071 do
15072 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15073 echo "$as_me:$LINENO: checking for $ac_func" >&5
15074 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15075 if eval "test \"\${$as_ac_var+set}\" = set"; then
15076   echo $ECHO_N "(cached) $ECHO_C" >&6
15077 else
15078   cat >conftest.$ac_ext <<_ACEOF
15079 /* confdefs.h.  */
15080 _ACEOF
15081 cat confdefs.h >>conftest.$ac_ext
15082 cat >>conftest.$ac_ext <<_ACEOF
15083 /* end confdefs.h.  */
15084 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15085    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15086 #define $ac_func innocuous_$ac_func
15087
15088 /* System header to define __stub macros and hopefully few prototypes,
15089     which can conflict with char $ac_func (); below.
15090     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15091     <limits.h> exists even on freestanding compilers.  */
15092
15093 #ifdef __STDC__
15094 # include <limits.h>
15095 #else
15096 # include <assert.h>
15097 #endif
15098
15099 #undef $ac_func
15100
15101 /* Override any gcc2 internal prototype to avoid an error.  */
15102 #ifdef __cplusplus
15103 extern "C"
15104 {
15105 #endif
15106 /* We use char because int might match the return type of a gcc2
15107    builtin and then its argument prototype would still apply.  */
15108 char $ac_func ();
15109 /* The GNU C library defines this for functions which it implements
15110     to always fail with ENOSYS.  Some functions are actually named
15111     something starting with __ and the normal name is an alias.  */
15112 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15113 choke me
15114 #else
15115 char (*f) () = $ac_func;
15116 #endif
15117 #ifdef __cplusplus
15118 }
15119 #endif
15120
15121 int
15122 main ()
15123 {
15124 return f != $ac_func;
15125   ;
15126   return 0;
15127 }
15128 _ACEOF
15129 rm -f conftest.$ac_objext conftest$ac_exeext
15130 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15131   (eval $ac_link) 2>conftest.er1
15132   ac_status=$?
15133   grep -v '^ *+' conftest.er1 >conftest.err
15134   rm -f conftest.er1
15135   cat conftest.err >&5
15136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15137   (exit $ac_status); } &&
15138          { ac_try='test -z "$ac_c_werror_flag"
15139                          || test ! -s conftest.err'
15140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15141   (eval $ac_try) 2>&5
15142   ac_status=$?
15143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15144   (exit $ac_status); }; } &&
15145          { ac_try='test -s conftest$ac_exeext'
15146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15147   (eval $ac_try) 2>&5
15148   ac_status=$?
15149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15150   (exit $ac_status); }; }; then
15151   eval "$as_ac_var=yes"
15152 else
15153   echo "$as_me: failed program was:" >&5
15154 sed 's/^/| /' conftest.$ac_ext >&5
15155
15156 eval "$as_ac_var=no"
15157 fi
15158 rm -f conftest.err conftest.$ac_objext \
15159       conftest$ac_exeext conftest.$ac_ext
15160 fi
15161 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15162 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15163 if test `eval echo '${'$as_ac_var'}'` = yes; then
15164   cat >>confdefs.h <<_ACEOF
15165 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15166 _ACEOF
15167
15168 fi
15169 done
15170
15171 fi
15172
15173
15174 echo "$as_me:$LINENO: checking for finite" >&5
15175 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15176 cat >conftest.$ac_ext <<_ACEOF
15177 /* confdefs.h.  */
15178 _ACEOF
15179 cat confdefs.h >>conftest.$ac_ext
15180 cat >>conftest.$ac_ext <<_ACEOF
15181 /* end confdefs.h.  */
15182 #include <math.h>
15183 int
15184 main ()
15185 {
15186 int dummy=finite(1.0);
15187   ;
15188   return 0;
15189 }
15190 _ACEOF
15191 rm -f conftest.$ac_objext conftest$ac_exeext
15192 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15193   (eval $ac_link) 2>conftest.er1
15194   ac_status=$?
15195   grep -v '^ *+' conftest.er1 >conftest.err
15196   rm -f conftest.er1
15197   cat conftest.err >&5
15198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15199   (exit $ac_status); } &&
15200          { ac_try='test -z "$ac_c_werror_flag"
15201                          || test ! -s conftest.err'
15202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15203   (eval $ac_try) 2>&5
15204   ac_status=$?
15205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15206   (exit $ac_status); }; } &&
15207          { ac_try='test -s conftest$ac_exeext'
15208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15209   (eval $ac_try) 2>&5
15210   ac_status=$?
15211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15212   (exit $ac_status); }; }; then
15213
15214 cat >>confdefs.h <<\_ACEOF
15215 #define HAVE_FINITE 1
15216 _ACEOF
15217
15218 echo "$as_me:$LINENO: result: yes" >&5
15219 echo "${ECHO_T}yes" >&6
15220 else
15221   echo "$as_me: failed program was:" >&5
15222 sed 's/^/| /' conftest.$ac_ext >&5
15223
15224 echo "$as_me:$LINENO: result: no" >&5
15225 echo "${ECHO_T}no" >&6
15226 fi
15227 rm -f conftest.err conftest.$ac_objext \
15228       conftest$ac_exeext conftest.$ac_ext
15229
15230 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15231 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15232 cat >conftest.$ac_ext <<_ACEOF
15233 /* confdefs.h.  */
15234 _ACEOF
15235 cat confdefs.h >>conftest.$ac_ext
15236 cat >>conftest.$ac_ext <<_ACEOF
15237 /* end confdefs.h.  */
15238 #include <setjmp.h>
15239 int
15240 main ()
15241 {
15242 sigjmp_buf x; sigsetjmp(x, 1);
15243   ;
15244   return 0;
15245 }
15246 _ACEOF
15247 rm -f conftest.$ac_objext conftest$ac_exeext
15248 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15249   (eval $ac_link) 2>conftest.er1
15250   ac_status=$?
15251   grep -v '^ *+' conftest.er1 >conftest.err
15252   rm -f conftest.er1
15253   cat conftest.err >&5
15254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255   (exit $ac_status); } &&
15256          { ac_try='test -z "$ac_c_werror_flag"
15257                          || test ! -s conftest.err'
15258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15259   (eval $ac_try) 2>&5
15260   ac_status=$?
15261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15262   (exit $ac_status); }; } &&
15263          { ac_try='test -s conftest$ac_exeext'
15264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15265   (eval $ac_try) 2>&5
15266   ac_status=$?
15267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15268   (exit $ac_status); }; }; then
15269
15270 cat >>confdefs.h <<\_ACEOF
15271 #define HAVE_SIGSETJMP 1
15272 _ACEOF
15273
15274 echo "$as_me:$LINENO: result: yes" >&5
15275 echo "${ECHO_T}yes" >&6
15276 else
15277   echo "$as_me: failed program was:" >&5
15278 sed 's/^/| /' conftest.$ac_ext >&5
15279
15280 echo "$as_me:$LINENO: result: no" >&5
15281 echo "${ECHO_T}no" >&6
15282 fi
15283 rm -f conftest.err conftest.$ac_objext \
15284       conftest$ac_exeext conftest.$ac_ext
15285
15286 echo "$as_me:$LINENO: checking for syslog" >&5
15287 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15288 if test "${ac_cv_func_syslog+set}" = set; then
15289   echo $ECHO_N "(cached) $ECHO_C" >&6
15290 else
15291   cat >conftest.$ac_ext <<_ACEOF
15292 /* confdefs.h.  */
15293 _ACEOF
15294 cat confdefs.h >>conftest.$ac_ext
15295 cat >>conftest.$ac_ext <<_ACEOF
15296 /* end confdefs.h.  */
15297 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15298    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15299 #define syslog innocuous_syslog
15300
15301 /* System header to define __stub macros and hopefully few prototypes,
15302     which can conflict with char syslog (); below.
15303     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15304     <limits.h> exists even on freestanding compilers.  */
15305
15306 #ifdef __STDC__
15307 # include <limits.h>
15308 #else
15309 # include <assert.h>
15310 #endif
15311
15312 #undef syslog
15313
15314 /* Override any gcc2 internal prototype to avoid an error.  */
15315 #ifdef __cplusplus
15316 extern "C"
15317 {
15318 #endif
15319 /* We use char because int might match the return type of a gcc2
15320    builtin and then its argument prototype would still apply.  */
15321 char syslog ();
15322 /* The GNU C library defines this for functions which it implements
15323     to always fail with ENOSYS.  Some functions are actually named
15324     something starting with __ and the normal name is an alias.  */
15325 #if defined (__stub_syslog) || defined (__stub___syslog)
15326 choke me
15327 #else
15328 char (*f) () = syslog;
15329 #endif
15330 #ifdef __cplusplus
15331 }
15332 #endif
15333
15334 int
15335 main ()
15336 {
15337 return f != syslog;
15338   ;
15339   return 0;
15340 }
15341 _ACEOF
15342 rm -f conftest.$ac_objext conftest$ac_exeext
15343 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15344   (eval $ac_link) 2>conftest.er1
15345   ac_status=$?
15346   grep -v '^ *+' conftest.er1 >conftest.err
15347   rm -f conftest.er1
15348   cat conftest.err >&5
15349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15350   (exit $ac_status); } &&
15351          { ac_try='test -z "$ac_c_werror_flag"
15352                          || test ! -s conftest.err'
15353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15354   (eval $ac_try) 2>&5
15355   ac_status=$?
15356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15357   (exit $ac_status); }; } &&
15358          { ac_try='test -s conftest$ac_exeext'
15359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15360   (eval $ac_try) 2>&5
15361   ac_status=$?
15362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15363   (exit $ac_status); }; }; then
15364   ac_cv_func_syslog=yes
15365 else
15366   echo "$as_me: failed program was:" >&5
15367 sed 's/^/| /' conftest.$ac_ext >&5
15368
15369 ac_cv_func_syslog=no
15370 fi
15371 rm -f conftest.err conftest.$ac_objext \
15372       conftest$ac_exeext conftest.$ac_ext
15373 fi
15374 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15375 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15376 if test $ac_cv_func_syslog = yes; then
15377   if test "${ac_cv_header_syslog_h+set}" = set; then
15378   echo "$as_me:$LINENO: checking for syslog.h" >&5
15379 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15380 if test "${ac_cv_header_syslog_h+set}" = set; then
15381   echo $ECHO_N "(cached) $ECHO_C" >&6
15382 fi
15383 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15384 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15385 else
15386   # Is the header compilable?
15387 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15388 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15389 cat >conftest.$ac_ext <<_ACEOF
15390 /* confdefs.h.  */
15391 _ACEOF
15392 cat confdefs.h >>conftest.$ac_ext
15393 cat >>conftest.$ac_ext <<_ACEOF
15394 /* end confdefs.h.  */
15395 $ac_includes_default
15396 #include <syslog.h>
15397 _ACEOF
15398 rm -f conftest.$ac_objext
15399 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15400   (eval $ac_compile) 2>conftest.er1
15401   ac_status=$?
15402   grep -v '^ *+' conftest.er1 >conftest.err
15403   rm -f conftest.er1
15404   cat conftest.err >&5
15405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15406   (exit $ac_status); } &&
15407          { ac_try='test -z "$ac_c_werror_flag"
15408                          || test ! -s conftest.err'
15409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15410   (eval $ac_try) 2>&5
15411   ac_status=$?
15412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15413   (exit $ac_status); }; } &&
15414          { ac_try='test -s conftest.$ac_objext'
15415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15416   (eval $ac_try) 2>&5
15417   ac_status=$?
15418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15419   (exit $ac_status); }; }; then
15420   ac_header_compiler=yes
15421 else
15422   echo "$as_me: failed program was:" >&5
15423 sed 's/^/| /' conftest.$ac_ext >&5
15424
15425 ac_header_compiler=no
15426 fi
15427 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15428 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15429 echo "${ECHO_T}$ac_header_compiler" >&6
15430
15431 # Is the header present?
15432 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15433 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15434 cat >conftest.$ac_ext <<_ACEOF
15435 /* confdefs.h.  */
15436 _ACEOF
15437 cat confdefs.h >>conftest.$ac_ext
15438 cat >>conftest.$ac_ext <<_ACEOF
15439 /* end confdefs.h.  */
15440 #include <syslog.h>
15441 _ACEOF
15442 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15443   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15444   ac_status=$?
15445   grep -v '^ *+' conftest.er1 >conftest.err
15446   rm -f conftest.er1
15447   cat conftest.err >&5
15448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15449   (exit $ac_status); } >/dev/null; then
15450   if test -s conftest.err; then
15451     ac_cpp_err=$ac_c_preproc_warn_flag
15452     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15453   else
15454     ac_cpp_err=
15455   fi
15456 else
15457   ac_cpp_err=yes
15458 fi
15459 if test -z "$ac_cpp_err"; then
15460   ac_header_preproc=yes
15461 else
15462   echo "$as_me: failed program was:" >&5
15463 sed 's/^/| /' conftest.$ac_ext >&5
15464
15465   ac_header_preproc=no
15466 fi
15467 rm -f conftest.err conftest.$ac_ext
15468 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15469 echo "${ECHO_T}$ac_header_preproc" >&6
15470
15471 # So?  What about this header?
15472 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15473   yes:no: )
15474     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15475 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15476     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15477 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15478     ac_header_preproc=yes
15479     ;;
15480   no:yes:* )
15481     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15482 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15483     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15484 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15485     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15486 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15487     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15488 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15489     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15490 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15491     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15492 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15493     (
15494       cat <<\_ASBOX
15495 ## ---------------------------------------- ##
15496 ## Report this to pgsql-bugs@postgresql.org ##
15497 ## ---------------------------------------- ##
15498 _ASBOX
15499     ) |
15500       sed "s/^/$as_me: WARNING:     /" >&2
15501     ;;
15502 esac
15503 echo "$as_me:$LINENO: checking for syslog.h" >&5
15504 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15505 if test "${ac_cv_header_syslog_h+set}" = set; then
15506   echo $ECHO_N "(cached) $ECHO_C" >&6
15507 else
15508   ac_cv_header_syslog_h=$ac_header_preproc
15509 fi
15510 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15511 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15512
15513 fi
15514 if test $ac_cv_header_syslog_h = yes; then
15515
15516 cat >>confdefs.h <<\_ACEOF
15517 #define HAVE_SYSLOG 1
15518 _ACEOF
15519
15520 fi
15521
15522
15523 fi
15524
15525
15526 echo "$as_me:$LINENO: checking for optreset" >&5
15527 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15528 if test "${pgac_cv_var_int_optreset+set}" = set; then
15529   echo $ECHO_N "(cached) $ECHO_C" >&6
15530 else
15531   cat >conftest.$ac_ext <<_ACEOF
15532 /* confdefs.h.  */
15533 _ACEOF
15534 cat confdefs.h >>conftest.$ac_ext
15535 cat >>conftest.$ac_ext <<_ACEOF
15536 /* end confdefs.h.  */
15537 #include <unistd.h>
15538 int
15539 main ()
15540 {
15541 extern int optreset; optreset = 1;
15542   ;
15543   return 0;
15544 }
15545 _ACEOF
15546 rm -f conftest.$ac_objext conftest$ac_exeext
15547 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15548   (eval $ac_link) 2>conftest.er1
15549   ac_status=$?
15550   grep -v '^ *+' conftest.er1 >conftest.err
15551   rm -f conftest.er1
15552   cat conftest.err >&5
15553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15554   (exit $ac_status); } &&
15555          { ac_try='test -z "$ac_c_werror_flag"
15556                          || test ! -s conftest.err'
15557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15558   (eval $ac_try) 2>&5
15559   ac_status=$?
15560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15561   (exit $ac_status); }; } &&
15562          { ac_try='test -s conftest$ac_exeext'
15563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15564   (eval $ac_try) 2>&5
15565   ac_status=$?
15566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15567   (exit $ac_status); }; }; then
15568   pgac_cv_var_int_optreset=yes
15569 else
15570   echo "$as_me: failed program was:" >&5
15571 sed 's/^/| /' conftest.$ac_ext >&5
15572
15573 pgac_cv_var_int_optreset=no
15574 fi
15575 rm -f conftest.err conftest.$ac_objext \
15576       conftest$ac_exeext conftest.$ac_ext
15577 fi
15578 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15579 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15580 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15581
15582 cat >>confdefs.h <<\_ACEOF
15583 #define HAVE_INT_OPTRESET 1
15584 _ACEOF
15585
15586 fi
15587
15588
15589
15590 for ac_func in strtoll strtoq
15591 do
15592 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15593 echo "$as_me:$LINENO: checking for $ac_func" >&5
15594 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15595 if eval "test \"\${$as_ac_var+set}\" = set"; then
15596   echo $ECHO_N "(cached) $ECHO_C" >&6
15597 else
15598   cat >conftest.$ac_ext <<_ACEOF
15599 /* confdefs.h.  */
15600 _ACEOF
15601 cat confdefs.h >>conftest.$ac_ext
15602 cat >>conftest.$ac_ext <<_ACEOF
15603 /* end confdefs.h.  */
15604 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15605    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15606 #define $ac_func innocuous_$ac_func
15607
15608 /* System header to define __stub macros and hopefully few prototypes,
15609     which can conflict with char $ac_func (); below.
15610     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15611     <limits.h> exists even on freestanding compilers.  */
15612
15613 #ifdef __STDC__
15614 # include <limits.h>
15615 #else
15616 # include <assert.h>
15617 #endif
15618
15619 #undef $ac_func
15620
15621 /* Override any gcc2 internal prototype to avoid an error.  */
15622 #ifdef __cplusplus
15623 extern "C"
15624 {
15625 #endif
15626 /* We use char because int might match the return type of a gcc2
15627    builtin and then its argument prototype would still apply.  */
15628 char $ac_func ();
15629 /* The GNU C library defines this for functions which it implements
15630     to always fail with ENOSYS.  Some functions are actually named
15631     something starting with __ and the normal name is an alias.  */
15632 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15633 choke me
15634 #else
15635 char (*f) () = $ac_func;
15636 #endif
15637 #ifdef __cplusplus
15638 }
15639 #endif
15640
15641 int
15642 main ()
15643 {
15644 return f != $ac_func;
15645   ;
15646   return 0;
15647 }
15648 _ACEOF
15649 rm -f conftest.$ac_objext conftest$ac_exeext
15650 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15651   (eval $ac_link) 2>conftest.er1
15652   ac_status=$?
15653   grep -v '^ *+' conftest.er1 >conftest.err
15654   rm -f conftest.er1
15655   cat conftest.err >&5
15656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15657   (exit $ac_status); } &&
15658          { ac_try='test -z "$ac_c_werror_flag"
15659                          || test ! -s conftest.err'
15660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15661   (eval $ac_try) 2>&5
15662   ac_status=$?
15663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15664   (exit $ac_status); }; } &&
15665          { ac_try='test -s conftest$ac_exeext'
15666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15667   (eval $ac_try) 2>&5
15668   ac_status=$?
15669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15670   (exit $ac_status); }; }; then
15671   eval "$as_ac_var=yes"
15672 else
15673   echo "$as_me: failed program was:" >&5
15674 sed 's/^/| /' conftest.$ac_ext >&5
15675
15676 eval "$as_ac_var=no"
15677 fi
15678 rm -f conftest.err conftest.$ac_objext \
15679       conftest$ac_exeext conftest.$ac_ext
15680 fi
15681 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15682 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15683 if test `eval echo '${'$as_ac_var'}'` = yes; then
15684   cat >>confdefs.h <<_ACEOF
15685 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15686 _ACEOF
15687  break
15688 fi
15689 done
15690
15691
15692
15693 for ac_func in strtoull strtouq
15694 do
15695 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15696 echo "$as_me:$LINENO: checking for $ac_func" >&5
15697 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15698 if eval "test \"\${$as_ac_var+set}\" = set"; then
15699   echo $ECHO_N "(cached) $ECHO_C" >&6
15700 else
15701   cat >conftest.$ac_ext <<_ACEOF
15702 /* confdefs.h.  */
15703 _ACEOF
15704 cat confdefs.h >>conftest.$ac_ext
15705 cat >>conftest.$ac_ext <<_ACEOF
15706 /* end confdefs.h.  */
15707 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15708    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15709 #define $ac_func innocuous_$ac_func
15710
15711 /* System header to define __stub macros and hopefully few prototypes,
15712     which can conflict with char $ac_func (); below.
15713     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15714     <limits.h> exists even on freestanding compilers.  */
15715
15716 #ifdef __STDC__
15717 # include <limits.h>
15718 #else
15719 # include <assert.h>
15720 #endif
15721
15722 #undef $ac_func
15723
15724 /* Override any gcc2 internal prototype to avoid an error.  */
15725 #ifdef __cplusplus
15726 extern "C"
15727 {
15728 #endif
15729 /* We use char because int might match the return type of a gcc2
15730    builtin and then its argument prototype would still apply.  */
15731 char $ac_func ();
15732 /* The GNU C library defines this for functions which it implements
15733     to always fail with ENOSYS.  Some functions are actually named
15734     something starting with __ and the normal name is an alias.  */
15735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15736 choke me
15737 #else
15738 char (*f) () = $ac_func;
15739 #endif
15740 #ifdef __cplusplus
15741 }
15742 #endif
15743
15744 int
15745 main ()
15746 {
15747 return f != $ac_func;
15748   ;
15749   return 0;
15750 }
15751 _ACEOF
15752 rm -f conftest.$ac_objext conftest$ac_exeext
15753 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15754   (eval $ac_link) 2>conftest.er1
15755   ac_status=$?
15756   grep -v '^ *+' conftest.er1 >conftest.err
15757   rm -f conftest.er1
15758   cat conftest.err >&5
15759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15760   (exit $ac_status); } &&
15761          { ac_try='test -z "$ac_c_werror_flag"
15762                          || test ! -s conftest.err'
15763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15764   (eval $ac_try) 2>&5
15765   ac_status=$?
15766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15767   (exit $ac_status); }; } &&
15768          { ac_try='test -s conftest$ac_exeext'
15769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15770   (eval $ac_try) 2>&5
15771   ac_status=$?
15772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15773   (exit $ac_status); }; }; then
15774   eval "$as_ac_var=yes"
15775 else
15776   echo "$as_me: failed program was:" >&5
15777 sed 's/^/| /' conftest.$ac_ext >&5
15778
15779 eval "$as_ac_var=no"
15780 fi
15781 rm -f conftest.err conftest.$ac_objext \
15782       conftest$ac_exeext conftest.$ac_ext
15783 fi
15784 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15785 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15786 if test `eval echo '${'$as_ac_var'}'` = yes; then
15787   cat >>confdefs.h <<_ACEOF
15788 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15789 _ACEOF
15790  break
15791 fi
15792 done
15793
15794
15795 # Check for one of atexit() or on_exit()
15796
15797 for ac_func in atexit
15798 do
15799 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15800 echo "$as_me:$LINENO: checking for $ac_func" >&5
15801 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15802 if eval "test \"\${$as_ac_var+set}\" = set"; then
15803   echo $ECHO_N "(cached) $ECHO_C" >&6
15804 else
15805   cat >conftest.$ac_ext <<_ACEOF
15806 /* confdefs.h.  */
15807 _ACEOF
15808 cat confdefs.h >>conftest.$ac_ext
15809 cat >>conftest.$ac_ext <<_ACEOF
15810 /* end confdefs.h.  */
15811 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15812    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15813 #define $ac_func innocuous_$ac_func
15814
15815 /* System header to define __stub macros and hopefully few prototypes,
15816     which can conflict with char $ac_func (); below.
15817     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15818     <limits.h> exists even on freestanding compilers.  */
15819
15820 #ifdef __STDC__
15821 # include <limits.h>
15822 #else
15823 # include <assert.h>
15824 #endif
15825
15826 #undef $ac_func
15827
15828 /* Override any gcc2 internal prototype to avoid an error.  */
15829 #ifdef __cplusplus
15830 extern "C"
15831 {
15832 #endif
15833 /* We use char because int might match the return type of a gcc2
15834    builtin and then its argument prototype would still apply.  */
15835 char $ac_func ();
15836 /* The GNU C library defines this for functions which it implements
15837     to always fail with ENOSYS.  Some functions are actually named
15838     something starting with __ and the normal name is an alias.  */
15839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15840 choke me
15841 #else
15842 char (*f) () = $ac_func;
15843 #endif
15844 #ifdef __cplusplus
15845 }
15846 #endif
15847
15848 int
15849 main ()
15850 {
15851 return f != $ac_func;
15852   ;
15853   return 0;
15854 }
15855 _ACEOF
15856 rm -f conftest.$ac_objext conftest$ac_exeext
15857 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15858   (eval $ac_link) 2>conftest.er1
15859   ac_status=$?
15860   grep -v '^ *+' conftest.er1 >conftest.err
15861   rm -f conftest.er1
15862   cat conftest.err >&5
15863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15864   (exit $ac_status); } &&
15865          { ac_try='test -z "$ac_c_werror_flag"
15866                          || test ! -s conftest.err'
15867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15868   (eval $ac_try) 2>&5
15869   ac_status=$?
15870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15871   (exit $ac_status); }; } &&
15872          { ac_try='test -s conftest$ac_exeext'
15873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15874   (eval $ac_try) 2>&5
15875   ac_status=$?
15876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15877   (exit $ac_status); }; }; then
15878   eval "$as_ac_var=yes"
15879 else
15880   echo "$as_me: failed program was:" >&5
15881 sed 's/^/| /' conftest.$ac_ext >&5
15882
15883 eval "$as_ac_var=no"
15884 fi
15885 rm -f conftest.err conftest.$ac_objext \
15886       conftest$ac_exeext conftest.$ac_ext
15887 fi
15888 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15889 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15890 if test `eval echo '${'$as_ac_var'}'` = yes; then
15891   cat >>confdefs.h <<_ACEOF
15892 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15893 _ACEOF
15894
15895 else
15896
15897 for ac_func in on_exit
15898 do
15899 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15900 echo "$as_me:$LINENO: checking for $ac_func" >&5
15901 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15902 if eval "test \"\${$as_ac_var+set}\" = set"; then
15903   echo $ECHO_N "(cached) $ECHO_C" >&6
15904 else
15905   cat >conftest.$ac_ext <<_ACEOF
15906 /* confdefs.h.  */
15907 _ACEOF
15908 cat confdefs.h >>conftest.$ac_ext
15909 cat >>conftest.$ac_ext <<_ACEOF
15910 /* end confdefs.h.  */
15911 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15912    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15913 #define $ac_func innocuous_$ac_func
15914
15915 /* System header to define __stub macros and hopefully few prototypes,
15916     which can conflict with char $ac_func (); below.
15917     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15918     <limits.h> exists even on freestanding compilers.  */
15919
15920 #ifdef __STDC__
15921 # include <limits.h>
15922 #else
15923 # include <assert.h>
15924 #endif
15925
15926 #undef $ac_func
15927
15928 /* Override any gcc2 internal prototype to avoid an error.  */
15929 #ifdef __cplusplus
15930 extern "C"
15931 {
15932 #endif
15933 /* We use char because int might match the return type of a gcc2
15934    builtin and then its argument prototype would still apply.  */
15935 char $ac_func ();
15936 /* The GNU C library defines this for functions which it implements
15937     to always fail with ENOSYS.  Some functions are actually named
15938     something starting with __ and the normal name is an alias.  */
15939 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15940 choke me
15941 #else
15942 char (*f) () = $ac_func;
15943 #endif
15944 #ifdef __cplusplus
15945 }
15946 #endif
15947
15948 int
15949 main ()
15950 {
15951 return f != $ac_func;
15952   ;
15953   return 0;
15954 }
15955 _ACEOF
15956 rm -f conftest.$ac_objext conftest$ac_exeext
15957 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15958   (eval $ac_link) 2>conftest.er1
15959   ac_status=$?
15960   grep -v '^ *+' conftest.er1 >conftest.err
15961   rm -f conftest.er1
15962   cat conftest.err >&5
15963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964   (exit $ac_status); } &&
15965          { ac_try='test -z "$ac_c_werror_flag"
15966                          || test ! -s conftest.err'
15967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15968   (eval $ac_try) 2>&5
15969   ac_status=$?
15970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15971   (exit $ac_status); }; } &&
15972          { ac_try='test -s conftest$ac_exeext'
15973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15974   (eval $ac_try) 2>&5
15975   ac_status=$?
15976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15977   (exit $ac_status); }; }; then
15978   eval "$as_ac_var=yes"
15979 else
15980   echo "$as_me: failed program was:" >&5
15981 sed 's/^/| /' conftest.$ac_ext >&5
15982
15983 eval "$as_ac_var=no"
15984 fi
15985 rm -f conftest.err conftest.$ac_objext \
15986       conftest$ac_exeext conftest.$ac_ext
15987 fi
15988 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15989 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15990 if test `eval echo '${'$as_ac_var'}'` = yes; then
15991   cat >>confdefs.h <<_ACEOF
15992 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15993 _ACEOF
15994
15995 else
15996   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
15997 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
15998    { (exit 1); exit 1; }; }
15999 fi
16000 done
16001
16002 fi
16003 done
16004
16005
16006 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16007 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16008 if test "${ac_cv_sys_largefile_source+set}" = set; then
16009   echo $ECHO_N "(cached) $ECHO_C" >&6
16010 else
16011   while :; do
16012   ac_cv_sys_largefile_source=no
16013   cat >conftest.$ac_ext <<_ACEOF
16014 /* confdefs.h.  */
16015 _ACEOF
16016 cat confdefs.h >>conftest.$ac_ext
16017 cat >>conftest.$ac_ext <<_ACEOF
16018 /* end confdefs.h.  */
16019 #include <stdio.h>
16020 int
16021 main ()
16022 {
16023 return !fseeko;
16024   ;
16025   return 0;
16026 }
16027 _ACEOF
16028 rm -f conftest.$ac_objext
16029 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16030   (eval $ac_compile) 2>conftest.er1
16031   ac_status=$?
16032   grep -v '^ *+' conftest.er1 >conftest.err
16033   rm -f conftest.er1
16034   cat conftest.err >&5
16035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036   (exit $ac_status); } &&
16037          { ac_try='test -z "$ac_c_werror_flag"
16038                          || test ! -s conftest.err'
16039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16040   (eval $ac_try) 2>&5
16041   ac_status=$?
16042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16043   (exit $ac_status); }; } &&
16044          { ac_try='test -s conftest.$ac_objext'
16045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16046   (eval $ac_try) 2>&5
16047   ac_status=$?
16048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16049   (exit $ac_status); }; }; then
16050   break
16051 else
16052   echo "$as_me: failed program was:" >&5
16053 sed 's/^/| /' conftest.$ac_ext >&5
16054
16055 fi
16056 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16057   cat >conftest.$ac_ext <<_ACEOF
16058 /* confdefs.h.  */
16059 _ACEOF
16060 cat confdefs.h >>conftest.$ac_ext
16061 cat >>conftest.$ac_ext <<_ACEOF
16062 /* end confdefs.h.  */
16063 #define _LARGEFILE_SOURCE 1
16064 #include <stdio.h>
16065 int
16066 main ()
16067 {
16068 return !fseeko;
16069   ;
16070   return 0;
16071 }
16072 _ACEOF
16073 rm -f conftest.$ac_objext
16074 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16075   (eval $ac_compile) 2>conftest.er1
16076   ac_status=$?
16077   grep -v '^ *+' conftest.er1 >conftest.err
16078   rm -f conftest.er1
16079   cat conftest.err >&5
16080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16081   (exit $ac_status); } &&
16082          { ac_try='test -z "$ac_c_werror_flag"
16083                          || test ! -s conftest.err'
16084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16085   (eval $ac_try) 2>&5
16086   ac_status=$?
16087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16088   (exit $ac_status); }; } &&
16089          { ac_try='test -s conftest.$ac_objext'
16090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16091   (eval $ac_try) 2>&5
16092   ac_status=$?
16093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16094   (exit $ac_status); }; }; then
16095   ac_cv_sys_largefile_source=1; break
16096 else
16097   echo "$as_me: failed program was:" >&5
16098 sed 's/^/| /' conftest.$ac_ext >&5
16099
16100 fi
16101 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16102   break
16103 done
16104 fi
16105 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16106 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16107 if test "$ac_cv_sys_largefile_source" != no; then
16108
16109 cat >>confdefs.h <<_ACEOF
16110 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16111 _ACEOF
16112
16113 fi
16114 rm -f conftest*
16115
16116 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16117 # in glibc 2.1.3, but that breaks too many other things.
16118 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16119 echo "$as_me:$LINENO: checking for fseeko" >&5
16120 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16121 if test "${ac_cv_func_fseeko+set}" = set; then
16122   echo $ECHO_N "(cached) $ECHO_C" >&6
16123 else
16124   cat >conftest.$ac_ext <<_ACEOF
16125 /* confdefs.h.  */
16126 _ACEOF
16127 cat confdefs.h >>conftest.$ac_ext
16128 cat >>conftest.$ac_ext <<_ACEOF
16129 /* end confdefs.h.  */
16130 #include <stdio.h>
16131 int
16132 main ()
16133 {
16134 return fseeko && fseeko (stdin, 0, 0);
16135   ;
16136   return 0;
16137 }
16138 _ACEOF
16139 rm -f conftest.$ac_objext conftest$ac_exeext
16140 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16141   (eval $ac_link) 2>conftest.er1
16142   ac_status=$?
16143   grep -v '^ *+' conftest.er1 >conftest.err
16144   rm -f conftest.er1
16145   cat conftest.err >&5
16146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16147   (exit $ac_status); } &&
16148          { ac_try='test -z "$ac_c_werror_flag"
16149                          || test ! -s conftest.err'
16150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16151   (eval $ac_try) 2>&5
16152   ac_status=$?
16153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16154   (exit $ac_status); }; } &&
16155          { ac_try='test -s conftest$ac_exeext'
16156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16157   (eval $ac_try) 2>&5
16158   ac_status=$?
16159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16160   (exit $ac_status); }; }; then
16161   ac_cv_func_fseeko=yes
16162 else
16163   echo "$as_me: failed program was:" >&5
16164 sed 's/^/| /' conftest.$ac_ext >&5
16165
16166 ac_cv_func_fseeko=no
16167 fi
16168 rm -f conftest.err conftest.$ac_objext \
16169       conftest$ac_exeext conftest.$ac_ext
16170 fi
16171 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16172 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16173 if test $ac_cv_func_fseeko = yes; then
16174
16175 cat >>confdefs.h <<\_ACEOF
16176 #define HAVE_FSEEKO 1
16177 _ACEOF
16178
16179 fi
16180
16181
16182 #
16183 # Pthreads
16184 #
16185 # For each platform, we need to know about any special compile and link
16186 # libraries, and whether the normal C function names are thread-safe.
16187 # See the comment at the top of src/port/thread.c for more information.
16188 #
16189 if test "$enable_thread_safety" = yes; then
16190
16191
16192
16193
16194 ac_ext=c
16195 ac_cpp='$CPP $CPPFLAGS'
16196 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16197 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16198 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16199
16200 acx_pthread_ok=no
16201
16202 # We used to check for pthread.h first, but this fails if pthread.h
16203 # requires special compiler flags (e.g. on True64 or Sequent).
16204 # It gets checked for in the link test anyway.
16205
16206 # First of all, check if the user has set any of the PTHREAD_LIBS,
16207 # etcetera environment variables, and if threads linking works using
16208 # them:
16209 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16210         save_CFLAGS="$CFLAGS"
16211         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16212         save_LIBS="$LIBS"
16213         LIBS="$PTHREAD_LIBS $LIBS"
16214         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16215 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16216         cat >conftest.$ac_ext <<_ACEOF
16217 /* confdefs.h.  */
16218 _ACEOF
16219 cat confdefs.h >>conftest.$ac_ext
16220 cat >>conftest.$ac_ext <<_ACEOF
16221 /* end confdefs.h.  */
16222
16223 /* Override any gcc2 internal prototype to avoid an error.  */
16224 #ifdef __cplusplus
16225 extern "C"
16226 #endif
16227 /* We use char because int might match the return type of a gcc2
16228    builtin and then its argument prototype would still apply.  */
16229 char pthread_join ();
16230 int
16231 main ()
16232 {
16233 pthread_join ();
16234   ;
16235   return 0;
16236 }
16237 _ACEOF
16238 rm -f conftest.$ac_objext conftest$ac_exeext
16239 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16240   (eval $ac_link) 2>conftest.er1
16241   ac_status=$?
16242   grep -v '^ *+' conftest.er1 >conftest.err
16243   rm -f conftest.er1
16244   cat conftest.err >&5
16245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16246   (exit $ac_status); } &&
16247          { ac_try='test -z "$ac_c_werror_flag"
16248                          || test ! -s conftest.err'
16249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16250   (eval $ac_try) 2>&5
16251   ac_status=$?
16252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16253   (exit $ac_status); }; } &&
16254          { ac_try='test -s conftest$ac_exeext'
16255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16256   (eval $ac_try) 2>&5
16257   ac_status=$?
16258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16259   (exit $ac_status); }; }; then
16260   acx_pthread_ok=yes
16261 else
16262   echo "$as_me: failed program was:" >&5
16263 sed 's/^/| /' conftest.$ac_ext >&5
16264
16265 fi
16266 rm -f conftest.err conftest.$ac_objext \
16267       conftest$ac_exeext conftest.$ac_ext
16268         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16269 echo "${ECHO_T}$acx_pthread_ok" >&6
16270         if test x"$acx_pthread_ok" = xno; then
16271                 PTHREAD_LIBS=""
16272                 PTHREAD_CFLAGS=""
16273         fi
16274         LIBS="$save_LIBS"
16275         CFLAGS="$save_CFLAGS"
16276 fi
16277
16278 # We must check for the threads library under a number of different
16279 # names; the ordering is very important because some systems
16280 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16281 # libraries is broken (non-POSIX).
16282
16283 # Create a list of thread flags to try.  Items starting with a "-" are
16284 # C compiler flags, and other items are library names, except for "none"
16285 # which indicates that we try without any flags at all, and "pthread-config"
16286 # which is a program returning the flags for the Pth emulation library.
16287
16288 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16289
16290 # The ordering *is* (sometimes) important.  Some notes on the
16291 # individual items follow:
16292
16293 # pthreads: AIX (must check this before -lpthread)
16294 # none: in case threads are in libc; should be tried before -Kthread and
16295 #       other compiler flags to prevent continual compiler warnings
16296 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16297 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16298 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16299 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16300 # -pthreads: Solaris/gcc
16301 # -mthreads: Mingw32/gcc, Lynx/gcc
16302 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16303 #      doesn't hurt to check since this sometimes defines pthreads too;
16304 #      also defines -D_REENTRANT)
16305 # pthread: Linux, etcetera
16306 # --thread-safe: KAI C++
16307 # pthread-config: use pthread-config program (for GNU Pth library)
16308
16309 case "${host_cpu}-${host_os}" in
16310         *solaris*)
16311
16312         # On Solaris (at least, for some versions), libc contains stubbed
16313         # (non-functional) versions of the pthreads routines, so link-based
16314         # tests will erroneously succeed.  (We need to link with -pthread or
16315         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16316         # a function called by this macro, so we could check for that, but
16317         # who knows whether they'll stub that too in a future libc.)  So,
16318         # we'll just look for -pthreads and -lpthread first:
16319
16320         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16321         ;;
16322 esac
16323
16324 if test x"$acx_pthread_ok" = xno; then
16325 for flag in $acx_pthread_flags; do
16326
16327         tryPTHREAD_CFLAGS=""
16328         tryPTHREAD_LIBS=""
16329         case $flag in
16330                 none)
16331                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16332 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16333                 ;;
16334
16335                 -*)
16336                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16337 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16338                 tryPTHREAD_CFLAGS="$flag"
16339                 ;;
16340
16341                 pthread-config)
16342                 # skip this if we already have flags defined, for PostgreSQL
16343                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16344                 # Extract the first word of "pthread-config", so it can be a program name with args.
16345 set dummy pthread-config; ac_word=$2
16346 echo "$as_me:$LINENO: checking for $ac_word" >&5
16347 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16348 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16349   echo $ECHO_N "(cached) $ECHO_C" >&6
16350 else
16351   if test -n "$acx_pthread_config"; then
16352   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16353 else
16354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16355 for as_dir in $PATH
16356 do
16357   IFS=$as_save_IFS
16358   test -z "$as_dir" && as_dir=.
16359   for ac_exec_ext in '' $ac_executable_extensions; do
16360   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16361     ac_cv_prog_acx_pthread_config="yes"
16362     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16363     break 2
16364   fi
16365 done
16366 done
16367
16368   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16369 fi
16370 fi
16371 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16372 if test -n "$acx_pthread_config"; then
16373   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16374 echo "${ECHO_T}$acx_pthread_config" >&6
16375 else
16376   echo "$as_me:$LINENO: result: no" >&5
16377 echo "${ECHO_T}no" >&6
16378 fi
16379
16380                 if test x"$acx_pthread_config" = xno; then continue; fi
16381                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16382                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16383                 ;;
16384
16385                 *)
16386                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16387 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16388                 tryPTHREAD_LIBS="-l$flag"
16389                 ;;
16390         esac
16391
16392         save_LIBS="$LIBS"
16393         save_CFLAGS="$CFLAGS"
16394         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16395         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16396
16397         # Check for various functions.  We must include pthread.h,
16398         # since some functions may be macros.  (On the Sequent, we
16399         # need a special flag -Kthread to make this header compile.)
16400         # We check for pthread_join because it is in -lpthread on IRIX
16401         # while pthread_create is in libc.  We check for pthread_attr_init
16402         # due to DEC craziness with -lpthreads.  We check for
16403         # pthread_cleanup_push because it is one of the few pthread
16404         # functions on Solaris that doesn't have a non-functional libc stub.
16405         # We try pthread_create on general principles.
16406         cat >conftest.$ac_ext <<_ACEOF
16407 /* confdefs.h.  */
16408 _ACEOF
16409 cat confdefs.h >>conftest.$ac_ext
16410 cat >>conftest.$ac_ext <<_ACEOF
16411 /* end confdefs.h.  */
16412 #include <pthread.h>
16413 int
16414 main ()
16415 {
16416 pthread_t th; pthread_join(th, 0);
16417                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16418                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16419   ;
16420   return 0;
16421 }
16422 _ACEOF
16423 rm -f conftest.$ac_objext conftest$ac_exeext
16424 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16425   (eval $ac_link) 2>conftest.er1
16426   ac_status=$?
16427   grep -v '^ *+' conftest.er1 >conftest.err
16428   rm -f conftest.er1
16429   cat conftest.err >&5
16430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16431   (exit $ac_status); } &&
16432          { ac_try='test -z "$ac_c_werror_flag"
16433                          || test ! -s conftest.err'
16434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16435   (eval $ac_try) 2>&5
16436   ac_status=$?
16437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16438   (exit $ac_status); }; } &&
16439          { ac_try='test -s conftest$ac_exeext'
16440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16441   (eval $ac_try) 2>&5
16442   ac_status=$?
16443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16444   (exit $ac_status); }; }; then
16445   acx_pthread_ok=yes
16446 else
16447   echo "$as_me: failed program was:" >&5
16448 sed 's/^/| /' conftest.$ac_ext >&5
16449
16450 acx_pthread_ok=no
16451 fi
16452 rm -f conftest.err conftest.$ac_objext \
16453       conftest$ac_exeext conftest.$ac_ext
16454
16455         if test "x$acx_pthread_ok" = xyes; then
16456             # Don't use options that are ignored by the compiler.
16457             # We find them by checking stderror.
16458             cat >conftest.$ac_ext <<_ACEOF
16459 int
16460 main (int argc, char **argv)
16461 {
16462   (void) argc;
16463   (void) argv;
16464   return 0;
16465 }
16466 _ACEOF
16467             rm -f conftest.$ac_objext conftest$ac_exeext
16468             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16469                 # we continue with more flags because Linux needs -lpthread
16470                 # for libpq builds on PostgreSQL.  The test above only
16471                 # tests for building binaries, not shared libraries.
16472                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16473                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16474             else   acx_pthread_ok=no
16475             fi
16476         fi
16477
16478         LIBS="$save_LIBS"
16479         CFLAGS="$save_CFLAGS"
16480
16481         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16482 echo "${ECHO_T}$acx_pthread_ok" >&6
16483 done
16484 fi
16485
16486 # Various other checks:
16487 if test "x$acx_pthread_ok" = xyes; then
16488         save_LIBS="$LIBS"
16489         LIBS="$PTHREAD_LIBS $LIBS"
16490         save_CFLAGS="$CFLAGS"
16491         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16492
16493         # Detect AIX lossage: threads are created detached by default
16494         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16495         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16496 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16497         cat >conftest.$ac_ext <<_ACEOF
16498 /* confdefs.h.  */
16499 _ACEOF
16500 cat confdefs.h >>conftest.$ac_ext
16501 cat >>conftest.$ac_ext <<_ACEOF
16502 /* end confdefs.h.  */
16503 #include <pthread.h>
16504 int
16505 main ()
16506 {
16507 int attr=PTHREAD_CREATE_JOINABLE;
16508   ;
16509   return 0;
16510 }
16511 _ACEOF
16512 rm -f conftest.$ac_objext conftest$ac_exeext
16513 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16514   (eval $ac_link) 2>conftest.er1
16515   ac_status=$?
16516   grep -v '^ *+' conftest.er1 >conftest.err
16517   rm -f conftest.er1
16518   cat conftest.err >&5
16519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16520   (exit $ac_status); } &&
16521          { ac_try='test -z "$ac_c_werror_flag"
16522                          || test ! -s conftest.err'
16523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16524   (eval $ac_try) 2>&5
16525   ac_status=$?
16526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16527   (exit $ac_status); }; } &&
16528          { ac_try='test -s conftest$ac_exeext'
16529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16530   (eval $ac_try) 2>&5
16531   ac_status=$?
16532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16533   (exit $ac_status); }; }; then
16534   ok=PTHREAD_CREATE_JOINABLE
16535 else
16536   echo "$as_me: failed program was:" >&5
16537 sed 's/^/| /' conftest.$ac_ext >&5
16538
16539 ok=unknown
16540 fi
16541 rm -f conftest.err conftest.$ac_objext \
16542       conftest$ac_exeext conftest.$ac_ext
16543         if test x"$ok" = xunknown; then
16544                 cat >conftest.$ac_ext <<_ACEOF
16545 /* confdefs.h.  */
16546 _ACEOF
16547 cat confdefs.h >>conftest.$ac_ext
16548 cat >>conftest.$ac_ext <<_ACEOF
16549 /* end confdefs.h.  */
16550 #include <pthread.h>
16551 int
16552 main ()
16553 {
16554 int attr=PTHREAD_CREATE_UNDETACHED;
16555   ;
16556   return 0;
16557 }
16558 _ACEOF
16559 rm -f conftest.$ac_objext conftest$ac_exeext
16560 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16561   (eval $ac_link) 2>conftest.er1
16562   ac_status=$?
16563   grep -v '^ *+' conftest.er1 >conftest.err
16564   rm -f conftest.er1
16565   cat conftest.err >&5
16566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16567   (exit $ac_status); } &&
16568          { ac_try='test -z "$ac_c_werror_flag"
16569                          || test ! -s conftest.err'
16570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16571   (eval $ac_try) 2>&5
16572   ac_status=$?
16573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16574   (exit $ac_status); }; } &&
16575          { ac_try='test -s conftest$ac_exeext'
16576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16577   (eval $ac_try) 2>&5
16578   ac_status=$?
16579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16580   (exit $ac_status); }; }; then
16581   ok=PTHREAD_CREATE_UNDETACHED
16582 else
16583   echo "$as_me: failed program was:" >&5
16584 sed 's/^/| /' conftest.$ac_ext >&5
16585
16586 ok=unknown
16587 fi
16588 rm -f conftest.err conftest.$ac_objext \
16589       conftest$ac_exeext conftest.$ac_ext
16590         fi
16591         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16592
16593 cat >>confdefs.h <<\_ACEOF
16594 #define PTHREAD_CREATE_JOINABLE $ok
16595 _ACEOF
16596
16597         fi
16598         echo "$as_me:$LINENO: result: ${ok}" >&5
16599 echo "${ECHO_T}${ok}" >&6
16600         if test x"$ok" = xunknown; then
16601                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16602 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16603         fi
16604
16605         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16606 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16607         flag=no
16608 # We always add these in PostgreSQL
16609 #       case "${host_cpu}-${host_os}" in
16610 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16611 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16612 #       esac
16613         echo "$as_me:$LINENO: result: ${flag}" >&5
16614 echo "${ECHO_T}${flag}" >&6
16615         if test "x$flag" != xno; then
16616                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16617         fi
16618
16619         LIBS="$save_LIBS"
16620         CFLAGS="$save_CFLAGS"
16621
16622 # Supporting cc_r would require a special CC in all places that
16623 # use libpq, and that is ugly, so we don't do it.  Users can still
16624 # define their compiler as cc_r to do thread builds of everything.
16625         # More AIX lossage: must compile with cc_r
16626         # Extract the first word of "cc_r", so it can be a program name with args.
16627 set dummy cc_r; ac_word=$2
16628 echo "$as_me:$LINENO: checking for $ac_word" >&5
16629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16630 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16631   echo $ECHO_N "(cached) $ECHO_C" >&6
16632 else
16633   if test -n "$PTHREAD_CC"; then
16634   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16635 else
16636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16637 for as_dir in $PATH
16638 do
16639   IFS=$as_save_IFS
16640   test -z "$as_dir" && as_dir=.
16641   for ac_exec_ext in '' $ac_executable_extensions; do
16642   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16643     ac_cv_prog_PTHREAD_CC="cc_r"
16644     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16645     break 2
16646   fi
16647 done
16648 done
16649
16650   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16651 fi
16652 fi
16653 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16654 if test -n "$PTHREAD_CC"; then
16655   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16656 echo "${ECHO_T}$PTHREAD_CC" >&6
16657 else
16658   echo "$as_me:$LINENO: result: no" >&5
16659 echo "${ECHO_T}no" >&6
16660 fi
16661
16662 else
16663         PTHREAD_CC="$CC"
16664 fi
16665
16666
16667
16668
16669
16670 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16671 if test x"$acx_pthread_ok" = xyes; then
16672
16673 cat >>confdefs.h <<\_ACEOF
16674 #define HAVE_PTHREAD 1
16675 _ACEOF
16676
16677         :
16678 else
16679         acx_pthread_ok=no
16680
16681 fi
16682 ac_ext=c
16683 ac_cpp='$CPP $CPPFLAGS'
16684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16687
16688         # set thread flags
16689
16690 # Some platforms use these, so just defineed them.  They can't hurt if they
16691 # are not supported.
16692 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16693
16694
16695 # At this point, we don't want to muck with the compiler name for threading.
16696 # Let's see who fails, perhaps AIX.  2004-04-23
16697 if test "$PTHREAD_CC" != "$CC"; then
16698 { { echo "$as_me:$LINENO: error:
16699 PostgreSQL does not support platforms that require a special
16700 compiler binary for thread-safety.
16701 " >&5
16702 echo "$as_me: error:
16703 PostgreSQL does not support platforms that require a special
16704 compiler binary for thread-safety.
16705 " >&2;}
16706    { (exit 1); exit 1; }; }
16707 fi
16708
16709 if test "$THREAD_SUPPORT" = no; then
16710 { { echo "$as_me:$LINENO: error:
16711 Cannot enable threads on your platform.
16712 Your platform is known to not support thread-safe programs.
16713 For details, compile and run src/bin/pg_thread_test.
16714 " >&5
16715 echo "$as_me: error:
16716 Cannot enable threads on your platform.
16717 Your platform is known to not support thread-safe programs.
16718 For details, compile and run src/bin/pg_thread_test.
16719 " >&2;}
16720    { (exit 1); exit 1; }; }
16721 fi
16722
16723 # Check for *_r functions
16724 _CFLAGS="$CFLAGS"
16725 _LIBS="$LIBS"
16726 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16727 LIBS="$LIBS $PTHREAD_LIBS"
16728
16729 if test "${ac_cv_header_pthread_h+set}" = set; then
16730   echo "$as_me:$LINENO: checking for pthread.h" >&5
16731 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16732 if test "${ac_cv_header_pthread_h+set}" = set; then
16733   echo $ECHO_N "(cached) $ECHO_C" >&6
16734 fi
16735 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16736 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16737 else
16738   # Is the header compilable?
16739 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16740 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16741 cat >conftest.$ac_ext <<_ACEOF
16742 /* confdefs.h.  */
16743 _ACEOF
16744 cat confdefs.h >>conftest.$ac_ext
16745 cat >>conftest.$ac_ext <<_ACEOF
16746 /* end confdefs.h.  */
16747 $ac_includes_default
16748 #include <pthread.h>
16749 _ACEOF
16750 rm -f conftest.$ac_objext
16751 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16752   (eval $ac_compile) 2>conftest.er1
16753   ac_status=$?
16754   grep -v '^ *+' conftest.er1 >conftest.err
16755   rm -f conftest.er1
16756   cat conftest.err >&5
16757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16758   (exit $ac_status); } &&
16759          { ac_try='test -z "$ac_c_werror_flag"
16760                          || test ! -s conftest.err'
16761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16762   (eval $ac_try) 2>&5
16763   ac_status=$?
16764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16765   (exit $ac_status); }; } &&
16766          { ac_try='test -s conftest.$ac_objext'
16767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16768   (eval $ac_try) 2>&5
16769   ac_status=$?
16770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771   (exit $ac_status); }; }; then
16772   ac_header_compiler=yes
16773 else
16774   echo "$as_me: failed program was:" >&5
16775 sed 's/^/| /' conftest.$ac_ext >&5
16776
16777 ac_header_compiler=no
16778 fi
16779 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16780 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16781 echo "${ECHO_T}$ac_header_compiler" >&6
16782
16783 # Is the header present?
16784 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16785 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16786 cat >conftest.$ac_ext <<_ACEOF
16787 /* confdefs.h.  */
16788 _ACEOF
16789 cat confdefs.h >>conftest.$ac_ext
16790 cat >>conftest.$ac_ext <<_ACEOF
16791 /* end confdefs.h.  */
16792 #include <pthread.h>
16793 _ACEOF
16794 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16795   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16796   ac_status=$?
16797   grep -v '^ *+' conftest.er1 >conftest.err
16798   rm -f conftest.er1
16799   cat conftest.err >&5
16800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16801   (exit $ac_status); } >/dev/null; then
16802   if test -s conftest.err; then
16803     ac_cpp_err=$ac_c_preproc_warn_flag
16804     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16805   else
16806     ac_cpp_err=
16807   fi
16808 else
16809   ac_cpp_err=yes
16810 fi
16811 if test -z "$ac_cpp_err"; then
16812   ac_header_preproc=yes
16813 else
16814   echo "$as_me: failed program was:" >&5
16815 sed 's/^/| /' conftest.$ac_ext >&5
16816
16817   ac_header_preproc=no
16818 fi
16819 rm -f conftest.err conftest.$ac_ext
16820 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16821 echo "${ECHO_T}$ac_header_preproc" >&6
16822
16823 # So?  What about this header?
16824 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16825   yes:no: )
16826     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16827 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16828     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16829 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16830     ac_header_preproc=yes
16831     ;;
16832   no:yes:* )
16833     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16834 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16835     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16836 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16837     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16838 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16839     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16840 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16841     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16842 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16843     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16844 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16845     (
16846       cat <<\_ASBOX
16847 ## ---------------------------------------- ##
16848 ## Report this to pgsql-bugs@postgresql.org ##
16849 ## ---------------------------------------- ##
16850 _ASBOX
16851     ) |
16852       sed "s/^/$as_me: WARNING:     /" >&2
16853     ;;
16854 esac
16855 echo "$as_me:$LINENO: checking for pthread.h" >&5
16856 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16857 if test "${ac_cv_header_pthread_h+set}" = set; then
16858   echo $ECHO_N "(cached) $ECHO_C" >&6
16859 else
16860   ac_cv_header_pthread_h=$ac_header_preproc
16861 fi
16862 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16863 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16864
16865 fi
16866 if test $ac_cv_header_pthread_h = yes; then
16867   :
16868 else
16869   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16870 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16871    { (exit 1); exit 1; }; }
16872 fi
16873
16874
16875
16876
16877
16878
16879 for ac_func in strerror_r getpwuid_r gethostbyname_r
16880 do
16881 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16882 echo "$as_me:$LINENO: checking for $ac_func" >&5
16883 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16884 if eval "test \"\${$as_ac_var+set}\" = set"; then
16885   echo $ECHO_N "(cached) $ECHO_C" >&6
16886 else
16887   cat >conftest.$ac_ext <<_ACEOF
16888 /* confdefs.h.  */
16889 _ACEOF
16890 cat confdefs.h >>conftest.$ac_ext
16891 cat >>conftest.$ac_ext <<_ACEOF
16892 /* end confdefs.h.  */
16893 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16894    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16895 #define $ac_func innocuous_$ac_func
16896
16897 /* System header to define __stub macros and hopefully few prototypes,
16898     which can conflict with char $ac_func (); below.
16899     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16900     <limits.h> exists even on freestanding compilers.  */
16901
16902 #ifdef __STDC__
16903 # include <limits.h>
16904 #else
16905 # include <assert.h>
16906 #endif
16907
16908 #undef $ac_func
16909
16910 /* Override any gcc2 internal prototype to avoid an error.  */
16911 #ifdef __cplusplus
16912 extern "C"
16913 {
16914 #endif
16915 /* We use char because int might match the return type of a gcc2
16916    builtin and then its argument prototype would still apply.  */
16917 char $ac_func ();
16918 /* The GNU C library defines this for functions which it implements
16919     to always fail with ENOSYS.  Some functions are actually named
16920     something starting with __ and the normal name is an alias.  */
16921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16922 choke me
16923 #else
16924 char (*f) () = $ac_func;
16925 #endif
16926 #ifdef __cplusplus
16927 }
16928 #endif
16929
16930 int
16931 main ()
16932 {
16933 return f != $ac_func;
16934   ;
16935   return 0;
16936 }
16937 _ACEOF
16938 rm -f conftest.$ac_objext conftest$ac_exeext
16939 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16940   (eval $ac_link) 2>conftest.er1
16941   ac_status=$?
16942   grep -v '^ *+' conftest.er1 >conftest.err
16943   rm -f conftest.er1
16944   cat conftest.err >&5
16945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16946   (exit $ac_status); } &&
16947          { ac_try='test -z "$ac_c_werror_flag"
16948                          || test ! -s conftest.err'
16949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16950   (eval $ac_try) 2>&5
16951   ac_status=$?
16952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16953   (exit $ac_status); }; } &&
16954          { ac_try='test -s conftest$ac_exeext'
16955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16956   (eval $ac_try) 2>&5
16957   ac_status=$?
16958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16959   (exit $ac_status); }; }; then
16960   eval "$as_ac_var=yes"
16961 else
16962   echo "$as_me: failed program was:" >&5
16963 sed 's/^/| /' conftest.$ac_ext >&5
16964
16965 eval "$as_ac_var=no"
16966 fi
16967 rm -f conftest.err conftest.$ac_objext \
16968       conftest$ac_exeext conftest.$ac_ext
16969 fi
16970 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16971 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16972 if test `eval echo '${'$as_ac_var'}'` = yes; then
16973   cat >>confdefs.h <<_ACEOF
16974 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16975 _ACEOF
16976
16977 fi
16978 done
16979
16980
16981 # Do test here with the proper thread flags
16982 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
16983 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
16984 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
16985   echo $ECHO_N "(cached) $ECHO_C" >&6
16986 else
16987   cat >conftest.$ac_ext <<_ACEOF
16988 /* confdefs.h.  */
16989 _ACEOF
16990 cat confdefs.h >>conftest.$ac_ext
16991 cat >>conftest.$ac_ext <<_ACEOF
16992 /* end confdefs.h.  */
16993 #include <sys/types.h>
16994 #include <pwd.h>
16995 int
16996 main ()
16997 {
16998 uid_t uid;
16999 struct passwd *space;
17000 char *buf;
17001 size_t bufsize;
17002 struct passwd **result;
17003 getpwuid_r(uid, space, buf, bufsize, result);
17004   ;
17005   return 0;
17006 }
17007 _ACEOF
17008 rm -f conftest.$ac_objext
17009 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17010   (eval $ac_compile) 2>conftest.er1
17011   ac_status=$?
17012   grep -v '^ *+' conftest.er1 >conftest.err
17013   rm -f conftest.er1
17014   cat conftest.err >&5
17015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17016   (exit $ac_status); } &&
17017          { ac_try='test -z "$ac_c_werror_flag"
17018                          || test ! -s conftest.err'
17019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17020   (eval $ac_try) 2>&5
17021   ac_status=$?
17022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17023   (exit $ac_status); }; } &&
17024          { ac_try='test -s conftest.$ac_objext'
17025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17026   (eval $ac_try) 2>&5
17027   ac_status=$?
17028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17029   (exit $ac_status); }; }; then
17030   pgac_func_getpwuid_r_5arg=yes
17031 else
17032   echo "$as_me: failed program was:" >&5
17033 sed 's/^/| /' conftest.$ac_ext >&5
17034
17035 pgac_func_getpwuid_r_5arg=no
17036 fi
17037 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17038 fi
17039 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17040 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17041 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17042
17043 cat >>confdefs.h <<\_ACEOF
17044 #define GETPWUID_R_5ARG
17045 _ACEOF
17046
17047 fi
17048
17049 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17050 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17051 if test "${pgac_func_strerror_r_int+set}" = set; then
17052   echo $ECHO_N "(cached) $ECHO_C" >&6
17053 else
17054   cat >conftest.$ac_ext <<_ACEOF
17055 /* confdefs.h.  */
17056 _ACEOF
17057 cat confdefs.h >>conftest.$ac_ext
17058 cat >>conftest.$ac_ext <<_ACEOF
17059 /* end confdefs.h.  */
17060 #include <string.h>
17061 int
17062 main ()
17063 {
17064 #ifndef _AIX
17065 int strerror_r(int, char *, size_t);
17066 #else
17067 /* Older AIX has 'int' for the third argument so we don't test the args. */
17068 int strerror_r();
17069 #endif
17070   ;
17071   return 0;
17072 }
17073 _ACEOF
17074 rm -f conftest.$ac_objext
17075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17076   (eval $ac_compile) 2>conftest.er1
17077   ac_status=$?
17078   grep -v '^ *+' conftest.er1 >conftest.err
17079   rm -f conftest.er1
17080   cat conftest.err >&5
17081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17082   (exit $ac_status); } &&
17083          { ac_try='test -z "$ac_c_werror_flag"
17084                          || test ! -s conftest.err'
17085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17086   (eval $ac_try) 2>&5
17087   ac_status=$?
17088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17089   (exit $ac_status); }; } &&
17090          { ac_try='test -s conftest.$ac_objext'
17091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17092   (eval $ac_try) 2>&5
17093   ac_status=$?
17094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17095   (exit $ac_status); }; }; then
17096   pgac_func_strerror_r_int=yes
17097 else
17098   echo "$as_me: failed program was:" >&5
17099 sed 's/^/| /' conftest.$ac_ext >&5
17100
17101 pgac_func_strerror_r_int=no
17102 fi
17103 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17104 fi
17105 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17106 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17107 if test x"$pgac_func_strerror_r_int" = xyes ; then
17108
17109 cat >>confdefs.h <<\_ACEOF
17110 #define STRERROR_R_INT
17111 _ACEOF
17112
17113 fi
17114
17115
17116 CFLAGS="$_CFLAGS"
17117 LIBS="$_LIBS"
17118
17119 else
17120 # do not use values from template file
17121 PTHREAD_CFLAGS=
17122 PTHREAD_LIBS=
17123 fi
17124
17125
17126
17127
17128
17129 # This test makes sure that run tests work at all.  Sometimes a shared
17130 # library is found by the linker, but the runtime linker can't find it.
17131 # This check should come after all modifications of compiler or linker
17132 # variables, and before any other run tests.
17133 echo "$as_me:$LINENO: checking test program" >&5
17134 echo $ECHO_N "checking test program... $ECHO_C" >&6
17135 if test "$cross_compiling" = yes; then
17136   echo "$as_me:$LINENO: result: cross-compiling" >&5
17137 echo "${ECHO_T}cross-compiling" >&6
17138 else
17139   cat >conftest.$ac_ext <<_ACEOF
17140 /* confdefs.h.  */
17141 _ACEOF
17142 cat confdefs.h >>conftest.$ac_ext
17143 cat >>conftest.$ac_ext <<_ACEOF
17144 /* end confdefs.h.  */
17145 int main() { return 0; }
17146 _ACEOF
17147 rm -f conftest$ac_exeext
17148 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17149   (eval $ac_link) 2>&5
17150   ac_status=$?
17151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17152   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17154   (eval $ac_try) 2>&5
17155   ac_status=$?
17156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17157   (exit $ac_status); }; }; then
17158   echo "$as_me:$LINENO: result: ok" >&5
17159 echo "${ECHO_T}ok" >&6
17160 else
17161   echo "$as_me: program exited with status $ac_status" >&5
17162 echo "$as_me: failed program was:" >&5
17163 sed 's/^/| /' conftest.$ac_ext >&5
17164
17165 ( exit $ac_status )
17166 echo "$as_me:$LINENO: result: failed" >&5
17167 echo "${ECHO_T}failed" >&6
17168 { { echo "$as_me:$LINENO: error:
17169 *** Could not execute a simple test program.  This may be a problem
17170 *** related to locating shared libraries.  Check the file 'config.log'
17171 *** for the exact reason." >&5
17172 echo "$as_me: error:
17173 *** Could not execute a simple test program.  This may be a problem
17174 *** related to locating shared libraries.  Check the file 'config.log'
17175 *** for the exact reason." >&2;}
17176    { (exit 1); exit 1; }; }
17177 fi
17178 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17179 fi
17180
17181 # --------------------
17182 # Run tests below here
17183 # --------------------
17184
17185 # Force use of our snprintf if system's doesn't do arg control
17186 # See comment above at snprintf test for details.
17187 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17188   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17189 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17190 if test "${pgac_cv_printf_arg_control+set}" = set; then
17191   echo $ECHO_N "(cached) $ECHO_C" >&6
17192 else
17193   if test "$cross_compiling" = yes; then
17194   pgac_cv_printf_arg_control=cross
17195 else
17196   cat >conftest.$ac_ext <<_ACEOF
17197 /* confdefs.h.  */
17198 _ACEOF
17199 cat confdefs.h >>conftest.$ac_ext
17200 cat >>conftest.$ac_ext <<_ACEOF
17201 /* end confdefs.h.  */
17202 #include <stdio.h>
17203 #include <string.h>
17204
17205 int main()
17206 {
17207   char buf[100];
17208
17209   /* can it swap arguments? */
17210   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17211   if (strcmp(buf, "4 3") != 0)
17212     return 1;
17213   return 0;
17214 }
17215 _ACEOF
17216 rm -f conftest$ac_exeext
17217 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17218   (eval $ac_link) 2>&5
17219   ac_status=$?
17220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17221   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17223   (eval $ac_try) 2>&5
17224   ac_status=$?
17225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17226   (exit $ac_status); }; }; then
17227   pgac_cv_printf_arg_control=yes
17228 else
17229   echo "$as_me: program exited with status $ac_status" >&5
17230 echo "$as_me: failed program was:" >&5
17231 sed 's/^/| /' conftest.$ac_ext >&5
17232
17233 ( exit $ac_status )
17234 pgac_cv_printf_arg_control=no
17235 fi
17236 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17237 fi
17238
17239 fi
17240 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17241 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17242
17243   if test $pgac_cv_printf_arg_control != yes ; then
17244     pgac_need_repl_snprintf=yes
17245   fi
17246 fi
17247
17248
17249
17250 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17251 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17252 if test "${pgac_cv_type_long_int_64+set}" = set; then
17253   echo $ECHO_N "(cached) $ECHO_C" >&6
17254 else
17255   if test "$cross_compiling" = yes; then
17256   # If cross-compiling, check the size reported by the compiler and
17257 # trust that the arithmetic works.
17258 cat >conftest.$ac_ext <<_ACEOF
17259 /* confdefs.h.  */
17260 _ACEOF
17261 cat confdefs.h >>conftest.$ac_ext
17262 cat >>conftest.$ac_ext <<_ACEOF
17263 /* end confdefs.h.  */
17264
17265 int
17266 main ()
17267 {
17268 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17269 test_array [0] = 0
17270
17271   ;
17272   return 0;
17273 }
17274 _ACEOF
17275 rm -f conftest.$ac_objext
17276 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17277   (eval $ac_compile) 2>conftest.er1
17278   ac_status=$?
17279   grep -v '^ *+' conftest.er1 >conftest.err
17280   rm -f conftest.er1
17281   cat conftest.err >&5
17282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17283   (exit $ac_status); } &&
17284          { ac_try='test -z "$ac_c_werror_flag"
17285                          || test ! -s conftest.err'
17286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17287   (eval $ac_try) 2>&5
17288   ac_status=$?
17289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17290   (exit $ac_status); }; } &&
17291          { ac_try='test -s conftest.$ac_objext'
17292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17293   (eval $ac_try) 2>&5
17294   ac_status=$?
17295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17296   (exit $ac_status); }; }; then
17297   pgac_cv_type_long_int_64=yes
17298 else
17299   echo "$as_me: failed program was:" >&5
17300 sed 's/^/| /' conftest.$ac_ext >&5
17301
17302 pgac_cv_type_long_int_64=no
17303 fi
17304 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17305 else
17306   cat >conftest.$ac_ext <<_ACEOF
17307 /* confdefs.h.  */
17308 _ACEOF
17309 cat confdefs.h >>conftest.$ac_ext
17310 cat >>conftest.$ac_ext <<_ACEOF
17311 /* end confdefs.h.  */
17312 typedef long int ac_int64;
17313
17314 /*
17315  * These are globals to discourage the compiler from folding all the
17316  * arithmetic tests down to compile-time constants.
17317  */
17318 ac_int64 a = 20000001;
17319 ac_int64 b = 40000005;
17320
17321 int does_int64_work()
17322 {
17323   ac_int64 c,d;
17324
17325   if (sizeof(ac_int64) != 8)
17326     return 0;                   /* definitely not the right size */
17327
17328   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17329   c = a * b;
17330   d = (c + b) / b;
17331   if (d != a+1)
17332     return 0;
17333   return 1;
17334 }
17335 main() {
17336   exit(! does_int64_work());
17337 }
17338 _ACEOF
17339 rm -f conftest$ac_exeext
17340 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17341   (eval $ac_link) 2>&5
17342   ac_status=$?
17343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17344   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17346   (eval $ac_try) 2>&5
17347   ac_status=$?
17348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17349   (exit $ac_status); }; }; then
17350   pgac_cv_type_long_int_64=yes
17351 else
17352   echo "$as_me: program exited with status $ac_status" >&5
17353 echo "$as_me: failed program was:" >&5
17354 sed 's/^/| /' conftest.$ac_ext >&5
17355
17356 ( exit $ac_status )
17357 pgac_cv_type_long_int_64=no
17358 fi
17359 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17360 fi
17361 fi
17362 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17363 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17364
17365 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17366 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17367
17368 cat >>confdefs.h <<\_ACEOF
17369 #define HAVE_LONG_INT_64
17370 _ACEOF
17371
17372 fi
17373
17374
17375 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17376   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17377 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17378 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17379   echo $ECHO_N "(cached) $ECHO_C" >&6
17380 else
17381   if test "$cross_compiling" = yes; then
17382   # If cross-compiling, check the size reported by the compiler and
17383 # trust that the arithmetic works.
17384 cat >conftest.$ac_ext <<_ACEOF
17385 /* confdefs.h.  */
17386 _ACEOF
17387 cat confdefs.h >>conftest.$ac_ext
17388 cat >>conftest.$ac_ext <<_ACEOF
17389 /* end confdefs.h.  */
17390
17391 int
17392 main ()
17393 {
17394 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17395 test_array [0] = 0
17396
17397   ;
17398   return 0;
17399 }
17400 _ACEOF
17401 rm -f conftest.$ac_objext
17402 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17403   (eval $ac_compile) 2>conftest.er1
17404   ac_status=$?
17405   grep -v '^ *+' conftest.er1 >conftest.err
17406   rm -f conftest.er1
17407   cat conftest.err >&5
17408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17409   (exit $ac_status); } &&
17410          { ac_try='test -z "$ac_c_werror_flag"
17411                          || test ! -s conftest.err'
17412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17413   (eval $ac_try) 2>&5
17414   ac_status=$?
17415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17416   (exit $ac_status); }; } &&
17417          { ac_try='test -s conftest.$ac_objext'
17418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17419   (eval $ac_try) 2>&5
17420   ac_status=$?
17421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422   (exit $ac_status); }; }; then
17423   pgac_cv_type_long_long_int_64=yes
17424 else
17425   echo "$as_me: failed program was:" >&5
17426 sed 's/^/| /' conftest.$ac_ext >&5
17427
17428 pgac_cv_type_long_long_int_64=no
17429 fi
17430 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17431 else
17432   cat >conftest.$ac_ext <<_ACEOF
17433 /* confdefs.h.  */
17434 _ACEOF
17435 cat confdefs.h >>conftest.$ac_ext
17436 cat >>conftest.$ac_ext <<_ACEOF
17437 /* end confdefs.h.  */
17438 typedef long long int ac_int64;
17439
17440 /*
17441  * These are globals to discourage the compiler from folding all the
17442  * arithmetic tests down to compile-time constants.
17443  */
17444 ac_int64 a = 20000001;
17445 ac_int64 b = 40000005;
17446
17447 int does_int64_work()
17448 {
17449   ac_int64 c,d;
17450
17451   if (sizeof(ac_int64) != 8)
17452     return 0;                   /* definitely not the right size */
17453
17454   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17455   c = a * b;
17456   d = (c + b) / b;
17457   if (d != a+1)
17458     return 0;
17459   return 1;
17460 }
17461 main() {
17462   exit(! does_int64_work());
17463 }
17464 _ACEOF
17465 rm -f conftest$ac_exeext
17466 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17467   (eval $ac_link) 2>&5
17468   ac_status=$?
17469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17470   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17472   (eval $ac_try) 2>&5
17473   ac_status=$?
17474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17475   (exit $ac_status); }; }; then
17476   pgac_cv_type_long_long_int_64=yes
17477 else
17478   echo "$as_me: program exited with status $ac_status" >&5
17479 echo "$as_me: failed program was:" >&5
17480 sed 's/^/| /' conftest.$ac_ext >&5
17481
17482 ( exit $ac_status )
17483 pgac_cv_type_long_long_int_64=no
17484 fi
17485 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17486 fi
17487 fi
17488 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17489 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17490
17491 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17492 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17493
17494 cat >>confdefs.h <<\_ACEOF
17495 #define HAVE_LONG_LONG_INT_64
17496 _ACEOF
17497
17498 fi
17499
17500 fi
17501
17502
17503
17504 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17505   cat >conftest.$ac_ext <<_ACEOF
17506 /* confdefs.h.  */
17507 _ACEOF
17508 cat confdefs.h >>conftest.$ac_ext
17509 cat >>conftest.$ac_ext <<_ACEOF
17510 /* end confdefs.h.  */
17511
17512 #define INT64CONST(x)  x##LL
17513 long long int foo = INT64CONST(0x1234567890123456);
17514
17515 int
17516 main ()
17517 {
17518
17519   ;
17520   return 0;
17521 }
17522 _ACEOF
17523 rm -f conftest.$ac_objext
17524 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17525   (eval $ac_compile) 2>conftest.er1
17526   ac_status=$?
17527   grep -v '^ *+' conftest.er1 >conftest.err
17528   rm -f conftest.er1
17529   cat conftest.err >&5
17530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17531   (exit $ac_status); } &&
17532          { ac_try='test -z "$ac_c_werror_flag"
17533                          || test ! -s conftest.err'
17534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17535   (eval $ac_try) 2>&5
17536   ac_status=$?
17537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17538   (exit $ac_status); }; } &&
17539          { ac_try='test -s conftest.$ac_objext'
17540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17541   (eval $ac_try) 2>&5
17542   ac_status=$?
17543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17544   (exit $ac_status); }; }; then
17545
17546 cat >>confdefs.h <<\_ACEOF
17547 #define HAVE_LL_CONSTANTS 1
17548 _ACEOF
17549
17550 else
17551   echo "$as_me: failed program was:" >&5
17552 sed 's/^/| /' conftest.$ac_ext >&5
17553
17554 fi
17555 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17556 fi
17557
17558
17559 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17560 # we found we need to use "long long int", better check.  We cope with
17561 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17562 # work, fall back to our own snprintf emulation (which we know uses %lld).
17563
17564 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17565   if test $pgac_need_repl_snprintf = no; then
17566     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17567 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17568 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17569   echo $ECHO_N "(cached) $ECHO_C" >&6
17570 else
17571   for pgac_format in '%lld' '%qd' '%I64d'; do
17572 if test "$cross_compiling" = yes; then
17573   pgac_cv_snprintf_long_long_int_format=cross; break
17574 else
17575   cat >conftest.$ac_ext <<_ACEOF
17576 /* confdefs.h.  */
17577 _ACEOF
17578 cat confdefs.h >>conftest.$ac_ext
17579 cat >>conftest.$ac_ext <<_ACEOF
17580 /* end confdefs.h.  */
17581 #include <stdio.h>
17582 typedef long long int ac_int64;
17583 #define INT64_FORMAT "$pgac_format"
17584
17585 ac_int64 a = 20000001;
17586 ac_int64 b = 40000005;
17587
17588 int does_int64_snprintf_work()
17589 {
17590   ac_int64 c;
17591   char buf[100];
17592
17593   if (sizeof(ac_int64) != 8)
17594     return 0;                   /* doesn't look like the right size */
17595
17596   c = a * b;
17597   snprintf(buf, 100, INT64_FORMAT, c);
17598   if (strcmp(buf, "800000140000005") != 0)
17599     return 0;                   /* either multiply or snprintf is busted */
17600   return 1;
17601 }
17602 main() {
17603   exit(! does_int64_snprintf_work());
17604 }
17605 _ACEOF
17606 rm -f conftest$ac_exeext
17607 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17608   (eval $ac_link) 2>&5
17609   ac_status=$?
17610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17611   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17613   (eval $ac_try) 2>&5
17614   ac_status=$?
17615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17616   (exit $ac_status); }; }; then
17617   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17618 else
17619   echo "$as_me: program exited with status $ac_status" >&5
17620 echo "$as_me: failed program was:" >&5
17621 sed 's/^/| /' conftest.$ac_ext >&5
17622
17623 fi
17624 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17625 fi
17626 done
17627 fi
17628
17629 LONG_LONG_INT_FORMAT=''
17630
17631 case $pgac_cv_snprintf_long_long_int_format in
17632   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17633 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17634   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17635 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17636          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17637   *)     echo "$as_me:$LINENO: result: none" >&5
17638 echo "${ECHO_T}none" >&6;;
17639 esac
17640     if test "$LONG_LONG_INT_FORMAT" = ""; then
17641       # Force usage of our own snprintf, since system snprintf is broken
17642       pgac_need_repl_snprintf=yes
17643       LONG_LONG_INT_FORMAT='%lld'
17644     fi
17645   else
17646     # Here if we previously decided we needed to use our own snprintf
17647     LONG_LONG_INT_FORMAT='%lld'
17648   fi
17649   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17650   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17651   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17652 else
17653   # Here if we are not using 'long long int' at all
17654   INT64_FORMAT='"%ld"'
17655   UINT64_FORMAT='"%lu"'
17656 fi
17657
17658
17659 cat >>confdefs.h <<_ACEOF
17660 #define INT64_FORMAT $INT64_FORMAT
17661 _ACEOF
17662
17663
17664
17665 cat >>confdefs.h <<_ACEOF
17666 #define UINT64_FORMAT $UINT64_FORMAT
17667 _ACEOF
17668
17669
17670 # Now we have checked all the reasons to replace snprintf
17671 if test $pgac_need_repl_snprintf = yes; then
17672
17673 cat >>confdefs.h <<\_ACEOF
17674 #define USE_REPL_SNPRINTF 1
17675 _ACEOF
17676
17677   case $LIBOBJS in
17678     "snprintf.$ac_objext"   | \
17679   *" snprintf.$ac_objext"   | \
17680     "snprintf.$ac_objext "* | \
17681   *" snprintf.$ac_objext "* ) ;;
17682   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17683 esac
17684
17685 fi
17686
17687 # Need a #define for the size of Datum (unsigned long)
17688 echo "$as_me:$LINENO: checking for unsigned long" >&5
17689 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17690 if test "${ac_cv_type_unsigned_long+set}" = set; then
17691   echo $ECHO_N "(cached) $ECHO_C" >&6
17692 else
17693   cat >conftest.$ac_ext <<_ACEOF
17694 /* confdefs.h.  */
17695 _ACEOF
17696 cat confdefs.h >>conftest.$ac_ext
17697 cat >>conftest.$ac_ext <<_ACEOF
17698 /* end confdefs.h.  */
17699 $ac_includes_default
17700 int
17701 main ()
17702 {
17703 if ((unsigned long *) 0)
17704   return 0;
17705 if (sizeof (unsigned long))
17706   return 0;
17707   ;
17708   return 0;
17709 }
17710 _ACEOF
17711 rm -f conftest.$ac_objext
17712 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17713   (eval $ac_compile) 2>conftest.er1
17714   ac_status=$?
17715   grep -v '^ *+' conftest.er1 >conftest.err
17716   rm -f conftest.er1
17717   cat conftest.err >&5
17718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17719   (exit $ac_status); } &&
17720          { ac_try='test -z "$ac_c_werror_flag"
17721                          || test ! -s conftest.err'
17722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17723   (eval $ac_try) 2>&5
17724   ac_status=$?
17725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17726   (exit $ac_status); }; } &&
17727          { ac_try='test -s conftest.$ac_objext'
17728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17729   (eval $ac_try) 2>&5
17730   ac_status=$?
17731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17732   (exit $ac_status); }; }; then
17733   ac_cv_type_unsigned_long=yes
17734 else
17735   echo "$as_me: failed program was:" >&5
17736 sed 's/^/| /' conftest.$ac_ext >&5
17737
17738 ac_cv_type_unsigned_long=no
17739 fi
17740 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17741 fi
17742 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
17743 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
17744
17745 echo "$as_me:$LINENO: checking size of unsigned long" >&5
17746 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
17747 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
17748   echo $ECHO_N "(cached) $ECHO_C" >&6
17749 else
17750   if test "$ac_cv_type_unsigned_long" = yes; then
17751   # The cast to unsigned long works around a bug in the HP C Compiler
17752   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17753   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17754   # This bug is HP SR number 8606223364.
17755   if test "$cross_compiling" = yes; then
17756   # Depending upon the size, compute the lo and hi bounds.
17757 cat >conftest.$ac_ext <<_ACEOF
17758 /* confdefs.h.  */
17759 _ACEOF
17760 cat confdefs.h >>conftest.$ac_ext
17761 cat >>conftest.$ac_ext <<_ACEOF
17762 /* end confdefs.h.  */
17763 $ac_includes_default
17764 int
17765 main ()
17766 {
17767 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
17768 test_array [0] = 0
17769
17770   ;
17771   return 0;
17772 }
17773 _ACEOF
17774 rm -f conftest.$ac_objext
17775 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17776   (eval $ac_compile) 2>conftest.er1
17777   ac_status=$?
17778   grep -v '^ *+' conftest.er1 >conftest.err
17779   rm -f conftest.er1
17780   cat conftest.err >&5
17781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17782   (exit $ac_status); } &&
17783          { ac_try='test -z "$ac_c_werror_flag"
17784                          || test ! -s conftest.err'
17785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17786   (eval $ac_try) 2>&5
17787   ac_status=$?
17788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17789   (exit $ac_status); }; } &&
17790          { ac_try='test -s conftest.$ac_objext'
17791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17792   (eval $ac_try) 2>&5
17793   ac_status=$?
17794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17795   (exit $ac_status); }; }; then
17796   ac_lo=0 ac_mid=0
17797   while :; do
17798     cat >conftest.$ac_ext <<_ACEOF
17799 /* confdefs.h.  */
17800 _ACEOF
17801 cat confdefs.h >>conftest.$ac_ext
17802 cat >>conftest.$ac_ext <<_ACEOF
17803 /* end confdefs.h.  */
17804 $ac_includes_default
17805 int
17806 main ()
17807 {
17808 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17809 test_array [0] = 0
17810
17811   ;
17812   return 0;
17813 }
17814 _ACEOF
17815 rm -f conftest.$ac_objext
17816 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17817   (eval $ac_compile) 2>conftest.er1
17818   ac_status=$?
17819   grep -v '^ *+' conftest.er1 >conftest.err
17820   rm -f conftest.er1
17821   cat conftest.err >&5
17822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17823   (exit $ac_status); } &&
17824          { ac_try='test -z "$ac_c_werror_flag"
17825                          || test ! -s conftest.err'
17826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17827   (eval $ac_try) 2>&5
17828   ac_status=$?
17829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17830   (exit $ac_status); }; } &&
17831          { ac_try='test -s conftest.$ac_objext'
17832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17833   (eval $ac_try) 2>&5
17834   ac_status=$?
17835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17836   (exit $ac_status); }; }; then
17837   ac_hi=$ac_mid; break
17838 else
17839   echo "$as_me: failed program was:" >&5
17840 sed 's/^/| /' conftest.$ac_ext >&5
17841
17842 ac_lo=`expr $ac_mid + 1`
17843                     if test $ac_lo -le $ac_mid; then
17844                       ac_lo= ac_hi=
17845                       break
17846                     fi
17847                     ac_mid=`expr 2 '*' $ac_mid + 1`
17848 fi
17849 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17850   done
17851 else
17852   echo "$as_me: failed program was:" >&5
17853 sed 's/^/| /' conftest.$ac_ext >&5
17854
17855 cat >conftest.$ac_ext <<_ACEOF
17856 /* confdefs.h.  */
17857 _ACEOF
17858 cat confdefs.h >>conftest.$ac_ext
17859 cat >>conftest.$ac_ext <<_ACEOF
17860 /* end confdefs.h.  */
17861 $ac_includes_default
17862 int
17863 main ()
17864 {
17865 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
17866 test_array [0] = 0
17867
17868   ;
17869   return 0;
17870 }
17871 _ACEOF
17872 rm -f conftest.$ac_objext
17873 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17874   (eval $ac_compile) 2>conftest.er1
17875   ac_status=$?
17876   grep -v '^ *+' conftest.er1 >conftest.err
17877   rm -f conftest.er1
17878   cat conftest.err >&5
17879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17880   (exit $ac_status); } &&
17881          { ac_try='test -z "$ac_c_werror_flag"
17882                          || test ! -s conftest.err'
17883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17884   (eval $ac_try) 2>&5
17885   ac_status=$?
17886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17887   (exit $ac_status); }; } &&
17888          { ac_try='test -s conftest.$ac_objext'
17889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17890   (eval $ac_try) 2>&5
17891   ac_status=$?
17892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17893   (exit $ac_status); }; }; then
17894   ac_hi=-1 ac_mid=-1
17895   while :; do
17896     cat >conftest.$ac_ext <<_ACEOF
17897 /* confdefs.h.  */
17898 _ACEOF
17899 cat confdefs.h >>conftest.$ac_ext
17900 cat >>conftest.$ac_ext <<_ACEOF
17901 /* end confdefs.h.  */
17902 $ac_includes_default
17903 int
17904 main ()
17905 {
17906 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
17907 test_array [0] = 0
17908
17909   ;
17910   return 0;
17911 }
17912 _ACEOF
17913 rm -f conftest.$ac_objext
17914 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17915   (eval $ac_compile) 2>conftest.er1
17916   ac_status=$?
17917   grep -v '^ *+' conftest.er1 >conftest.err
17918   rm -f conftest.er1
17919   cat conftest.err >&5
17920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17921   (exit $ac_status); } &&
17922          { ac_try='test -z "$ac_c_werror_flag"
17923                          || test ! -s conftest.err'
17924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17925   (eval $ac_try) 2>&5
17926   ac_status=$?
17927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17928   (exit $ac_status); }; } &&
17929          { ac_try='test -s conftest.$ac_objext'
17930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17931   (eval $ac_try) 2>&5
17932   ac_status=$?
17933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17934   (exit $ac_status); }; }; then
17935   ac_lo=$ac_mid; break
17936 else
17937   echo "$as_me: failed program was:" >&5
17938 sed 's/^/| /' conftest.$ac_ext >&5
17939
17940 ac_hi=`expr '(' $ac_mid ')' - 1`
17941                        if test $ac_mid -le $ac_hi; then
17942                          ac_lo= ac_hi=
17943                          break
17944                        fi
17945                        ac_mid=`expr 2 '*' $ac_mid`
17946 fi
17947 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17948   done
17949 else
17950   echo "$as_me: failed program was:" >&5
17951 sed 's/^/| /' conftest.$ac_ext >&5
17952
17953 ac_lo= ac_hi=
17954 fi
17955 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17956 fi
17957 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17958 # Binary search between lo and hi bounds.
17959 while test "x$ac_lo" != "x$ac_hi"; do
17960   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17961   cat >conftest.$ac_ext <<_ACEOF
17962 /* confdefs.h.  */
17963 _ACEOF
17964 cat confdefs.h >>conftest.$ac_ext
17965 cat >>conftest.$ac_ext <<_ACEOF
17966 /* end confdefs.h.  */
17967 $ac_includes_default
17968 int
17969 main ()
17970 {
17971 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17972 test_array [0] = 0
17973
17974   ;
17975   return 0;
17976 }
17977 _ACEOF
17978 rm -f conftest.$ac_objext
17979 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17980   (eval $ac_compile) 2>conftest.er1
17981   ac_status=$?
17982   grep -v '^ *+' conftest.er1 >conftest.err
17983   rm -f conftest.er1
17984   cat conftest.err >&5
17985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17986   (exit $ac_status); } &&
17987          { ac_try='test -z "$ac_c_werror_flag"
17988                          || test ! -s conftest.err'
17989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17990   (eval $ac_try) 2>&5
17991   ac_status=$?
17992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17993   (exit $ac_status); }; } &&
17994          { ac_try='test -s conftest.$ac_objext'
17995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17996   (eval $ac_try) 2>&5
17997   ac_status=$?
17998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17999   (exit $ac_status); }; }; then
18000   ac_hi=$ac_mid
18001 else
18002   echo "$as_me: failed program was:" >&5
18003 sed 's/^/| /' conftest.$ac_ext >&5
18004
18005 ac_lo=`expr '(' $ac_mid ')' + 1`
18006 fi
18007 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18008 done
18009 case $ac_lo in
18010 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18011 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18012 See \`config.log' for more details." >&5
18013 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18014 See \`config.log' for more details." >&2;}
18015    { (exit 1); exit 1; }; } ;;
18016 esac
18017 else
18018   if test "$cross_compiling" = yes; then
18019   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18020 See \`config.log' for more details." >&5
18021 echo "$as_me: error: cannot run test program while cross compiling
18022 See \`config.log' for more details." >&2;}
18023    { (exit 1); exit 1; }; }
18024 else
18025   cat >conftest.$ac_ext <<_ACEOF
18026 /* confdefs.h.  */
18027 _ACEOF
18028 cat confdefs.h >>conftest.$ac_ext
18029 cat >>conftest.$ac_ext <<_ACEOF
18030 /* end confdefs.h.  */
18031 $ac_includes_default
18032 long longval () { return (long) (sizeof (unsigned long)); }
18033 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18034 #include <stdio.h>
18035 #include <stdlib.h>
18036 int
18037 main ()
18038 {
18039
18040   FILE *f = fopen ("conftest.val", "w");
18041   if (! f)
18042     exit (1);
18043   if (((long) (sizeof (unsigned long))) < 0)
18044     {
18045       long i = longval ();
18046       if (i != ((long) (sizeof (unsigned long))))
18047         exit (1);
18048       fprintf (f, "%ld\n", i);
18049     }
18050   else
18051     {
18052       unsigned long i = ulongval ();
18053       if (i != ((long) (sizeof (unsigned long))))
18054         exit (1);
18055       fprintf (f, "%lu\n", i);
18056     }
18057   exit (ferror (f) || fclose (f) != 0);
18058
18059   ;
18060   return 0;
18061 }
18062 _ACEOF
18063 rm -f conftest$ac_exeext
18064 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18065   (eval $ac_link) 2>&5
18066   ac_status=$?
18067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18070   (eval $ac_try) 2>&5
18071   ac_status=$?
18072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18073   (exit $ac_status); }; }; then
18074   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18075 else
18076   echo "$as_me: program exited with status $ac_status" >&5
18077 echo "$as_me: failed program was:" >&5
18078 sed 's/^/| /' conftest.$ac_ext >&5
18079
18080 ( exit $ac_status )
18081 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18082 See \`config.log' for more details." >&5
18083 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18084 See \`config.log' for more details." >&2;}
18085    { (exit 1); exit 1; }; }
18086 fi
18087 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18088 fi
18089 fi
18090 rm -f conftest.val
18091 else
18092   ac_cv_sizeof_unsigned_long=0
18093 fi
18094 fi
18095 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18096 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18097 cat >>confdefs.h <<_ACEOF
18098 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18099 _ACEOF
18100
18101
18102
18103 # And one for the size of size_t (enables tweaks for > 32bit address space)
18104 echo "$as_me:$LINENO: checking for size_t" >&5
18105 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18106 if test "${ac_cv_type_size_t+set}" = set; then
18107   echo $ECHO_N "(cached) $ECHO_C" >&6
18108 else
18109   cat >conftest.$ac_ext <<_ACEOF
18110 /* confdefs.h.  */
18111 _ACEOF
18112 cat confdefs.h >>conftest.$ac_ext
18113 cat >>conftest.$ac_ext <<_ACEOF
18114 /* end confdefs.h.  */
18115 $ac_includes_default
18116 int
18117 main ()
18118 {
18119 if ((size_t *) 0)
18120   return 0;
18121 if (sizeof (size_t))
18122   return 0;
18123   ;
18124   return 0;
18125 }
18126 _ACEOF
18127 rm -f conftest.$ac_objext
18128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18129   (eval $ac_compile) 2>conftest.er1
18130   ac_status=$?
18131   grep -v '^ *+' conftest.er1 >conftest.err
18132   rm -f conftest.er1
18133   cat conftest.err >&5
18134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18135   (exit $ac_status); } &&
18136          { ac_try='test -z "$ac_c_werror_flag"
18137                          || test ! -s conftest.err'
18138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18139   (eval $ac_try) 2>&5
18140   ac_status=$?
18141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18142   (exit $ac_status); }; } &&
18143          { ac_try='test -s conftest.$ac_objext'
18144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18145   (eval $ac_try) 2>&5
18146   ac_status=$?
18147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18148   (exit $ac_status); }; }; then
18149   ac_cv_type_size_t=yes
18150 else
18151   echo "$as_me: failed program was:" >&5
18152 sed 's/^/| /' conftest.$ac_ext >&5
18153
18154 ac_cv_type_size_t=no
18155 fi
18156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18157 fi
18158 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18159 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18160
18161 echo "$as_me:$LINENO: checking size of size_t" >&5
18162 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18163 if test "${ac_cv_sizeof_size_t+set}" = set; then
18164   echo $ECHO_N "(cached) $ECHO_C" >&6
18165 else
18166   if test "$ac_cv_type_size_t" = yes; then
18167   # The cast to unsigned long works around a bug in the HP C Compiler
18168   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18169   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18170   # This bug is HP SR number 8606223364.
18171   if test "$cross_compiling" = yes; then
18172   # Depending upon the size, compute the lo and hi bounds.
18173 cat >conftest.$ac_ext <<_ACEOF
18174 /* confdefs.h.  */
18175 _ACEOF
18176 cat confdefs.h >>conftest.$ac_ext
18177 cat >>conftest.$ac_ext <<_ACEOF
18178 /* end confdefs.h.  */
18179 $ac_includes_default
18180 int
18181 main ()
18182 {
18183 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18184 test_array [0] = 0
18185
18186   ;
18187   return 0;
18188 }
18189 _ACEOF
18190 rm -f conftest.$ac_objext
18191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18192   (eval $ac_compile) 2>conftest.er1
18193   ac_status=$?
18194   grep -v '^ *+' conftest.er1 >conftest.err
18195   rm -f conftest.er1
18196   cat conftest.err >&5
18197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18198   (exit $ac_status); } &&
18199          { ac_try='test -z "$ac_c_werror_flag"
18200                          || test ! -s conftest.err'
18201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18202   (eval $ac_try) 2>&5
18203   ac_status=$?
18204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18205   (exit $ac_status); }; } &&
18206          { ac_try='test -s conftest.$ac_objext'
18207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18208   (eval $ac_try) 2>&5
18209   ac_status=$?
18210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18211   (exit $ac_status); }; }; then
18212   ac_lo=0 ac_mid=0
18213   while :; do
18214     cat >conftest.$ac_ext <<_ACEOF
18215 /* confdefs.h.  */
18216 _ACEOF
18217 cat confdefs.h >>conftest.$ac_ext
18218 cat >>conftest.$ac_ext <<_ACEOF
18219 /* end confdefs.h.  */
18220 $ac_includes_default
18221 int
18222 main ()
18223 {
18224 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18225 test_array [0] = 0
18226
18227   ;
18228   return 0;
18229 }
18230 _ACEOF
18231 rm -f conftest.$ac_objext
18232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18233   (eval $ac_compile) 2>conftest.er1
18234   ac_status=$?
18235   grep -v '^ *+' conftest.er1 >conftest.err
18236   rm -f conftest.er1
18237   cat conftest.err >&5
18238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18239   (exit $ac_status); } &&
18240          { ac_try='test -z "$ac_c_werror_flag"
18241                          || test ! -s conftest.err'
18242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18243   (eval $ac_try) 2>&5
18244   ac_status=$?
18245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18246   (exit $ac_status); }; } &&
18247          { ac_try='test -s conftest.$ac_objext'
18248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18249   (eval $ac_try) 2>&5
18250   ac_status=$?
18251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18252   (exit $ac_status); }; }; then
18253   ac_hi=$ac_mid; break
18254 else
18255   echo "$as_me: failed program was:" >&5
18256 sed 's/^/| /' conftest.$ac_ext >&5
18257
18258 ac_lo=`expr $ac_mid + 1`
18259                     if test $ac_lo -le $ac_mid; then
18260                       ac_lo= ac_hi=
18261                       break
18262                     fi
18263                     ac_mid=`expr 2 '*' $ac_mid + 1`
18264 fi
18265 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18266   done
18267 else
18268   echo "$as_me: failed program was:" >&5
18269 sed 's/^/| /' conftest.$ac_ext >&5
18270
18271 cat >conftest.$ac_ext <<_ACEOF
18272 /* confdefs.h.  */
18273 _ACEOF
18274 cat confdefs.h >>conftest.$ac_ext
18275 cat >>conftest.$ac_ext <<_ACEOF
18276 /* end confdefs.h.  */
18277 $ac_includes_default
18278 int
18279 main ()
18280 {
18281 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18282 test_array [0] = 0
18283
18284   ;
18285   return 0;
18286 }
18287 _ACEOF
18288 rm -f conftest.$ac_objext
18289 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18290   (eval $ac_compile) 2>conftest.er1
18291   ac_status=$?
18292   grep -v '^ *+' conftest.er1 >conftest.err
18293   rm -f conftest.er1
18294   cat conftest.err >&5
18295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18296   (exit $ac_status); } &&
18297          { ac_try='test -z "$ac_c_werror_flag"
18298                          || test ! -s conftest.err'
18299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18300   (eval $ac_try) 2>&5
18301   ac_status=$?
18302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18303   (exit $ac_status); }; } &&
18304          { ac_try='test -s conftest.$ac_objext'
18305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18306   (eval $ac_try) 2>&5
18307   ac_status=$?
18308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18309   (exit $ac_status); }; }; then
18310   ac_hi=-1 ac_mid=-1
18311   while :; do
18312     cat >conftest.$ac_ext <<_ACEOF
18313 /* confdefs.h.  */
18314 _ACEOF
18315 cat confdefs.h >>conftest.$ac_ext
18316 cat >>conftest.$ac_ext <<_ACEOF
18317 /* end confdefs.h.  */
18318 $ac_includes_default
18319 int
18320 main ()
18321 {
18322 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18323 test_array [0] = 0
18324
18325   ;
18326   return 0;
18327 }
18328 _ACEOF
18329 rm -f conftest.$ac_objext
18330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18331   (eval $ac_compile) 2>conftest.er1
18332   ac_status=$?
18333   grep -v '^ *+' conftest.er1 >conftest.err
18334   rm -f conftest.er1
18335   cat conftest.err >&5
18336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18337   (exit $ac_status); } &&
18338          { ac_try='test -z "$ac_c_werror_flag"
18339                          || test ! -s conftest.err'
18340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18341   (eval $ac_try) 2>&5
18342   ac_status=$?
18343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18344   (exit $ac_status); }; } &&
18345          { ac_try='test -s conftest.$ac_objext'
18346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18347   (eval $ac_try) 2>&5
18348   ac_status=$?
18349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18350   (exit $ac_status); }; }; then
18351   ac_lo=$ac_mid; break
18352 else
18353   echo "$as_me: failed program was:" >&5
18354 sed 's/^/| /' conftest.$ac_ext >&5
18355
18356 ac_hi=`expr '(' $ac_mid ')' - 1`
18357                        if test $ac_mid -le $ac_hi; then
18358                          ac_lo= ac_hi=
18359                          break
18360                        fi
18361                        ac_mid=`expr 2 '*' $ac_mid`
18362 fi
18363 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18364   done
18365 else
18366   echo "$as_me: failed program was:" >&5
18367 sed 's/^/| /' conftest.$ac_ext >&5
18368
18369 ac_lo= ac_hi=
18370 fi
18371 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18372 fi
18373 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18374 # Binary search between lo and hi bounds.
18375 while test "x$ac_lo" != "x$ac_hi"; do
18376   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18377   cat >conftest.$ac_ext <<_ACEOF
18378 /* confdefs.h.  */
18379 _ACEOF
18380 cat confdefs.h >>conftest.$ac_ext
18381 cat >>conftest.$ac_ext <<_ACEOF
18382 /* end confdefs.h.  */
18383 $ac_includes_default
18384 int
18385 main ()
18386 {
18387 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18388 test_array [0] = 0
18389
18390   ;
18391   return 0;
18392 }
18393 _ACEOF
18394 rm -f conftest.$ac_objext
18395 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18396   (eval $ac_compile) 2>conftest.er1
18397   ac_status=$?
18398   grep -v '^ *+' conftest.er1 >conftest.err
18399   rm -f conftest.er1
18400   cat conftest.err >&5
18401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18402   (exit $ac_status); } &&
18403          { ac_try='test -z "$ac_c_werror_flag"
18404                          || test ! -s conftest.err'
18405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18406   (eval $ac_try) 2>&5
18407   ac_status=$?
18408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18409   (exit $ac_status); }; } &&
18410          { ac_try='test -s conftest.$ac_objext'
18411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18412   (eval $ac_try) 2>&5
18413   ac_status=$?
18414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18415   (exit $ac_status); }; }; then
18416   ac_hi=$ac_mid
18417 else
18418   echo "$as_me: failed program was:" >&5
18419 sed 's/^/| /' conftest.$ac_ext >&5
18420
18421 ac_lo=`expr '(' $ac_mid ')' + 1`
18422 fi
18423 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18424 done
18425 case $ac_lo in
18426 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18427 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18428 See \`config.log' for more details." >&5
18429 echo "$as_me: error: cannot compute sizeof (size_t), 77
18430 See \`config.log' for more details." >&2;}
18431    { (exit 1); exit 1; }; } ;;
18432 esac
18433 else
18434   if test "$cross_compiling" = yes; then
18435   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18436 See \`config.log' for more details." >&5
18437 echo "$as_me: error: cannot run test program while cross compiling
18438 See \`config.log' for more details." >&2;}
18439    { (exit 1); exit 1; }; }
18440 else
18441   cat >conftest.$ac_ext <<_ACEOF
18442 /* confdefs.h.  */
18443 _ACEOF
18444 cat confdefs.h >>conftest.$ac_ext
18445 cat >>conftest.$ac_ext <<_ACEOF
18446 /* end confdefs.h.  */
18447 $ac_includes_default
18448 long longval () { return (long) (sizeof (size_t)); }
18449 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18450 #include <stdio.h>
18451 #include <stdlib.h>
18452 int
18453 main ()
18454 {
18455
18456   FILE *f = fopen ("conftest.val", "w");
18457   if (! f)
18458     exit (1);
18459   if (((long) (sizeof (size_t))) < 0)
18460     {
18461       long i = longval ();
18462       if (i != ((long) (sizeof (size_t))))
18463         exit (1);
18464       fprintf (f, "%ld\n", i);
18465     }
18466   else
18467     {
18468       unsigned long i = ulongval ();
18469       if (i != ((long) (sizeof (size_t))))
18470         exit (1);
18471       fprintf (f, "%lu\n", i);
18472     }
18473   exit (ferror (f) || fclose (f) != 0);
18474
18475   ;
18476   return 0;
18477 }
18478 _ACEOF
18479 rm -f conftest$ac_exeext
18480 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18481   (eval $ac_link) 2>&5
18482   ac_status=$?
18483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18484   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18486   (eval $ac_try) 2>&5
18487   ac_status=$?
18488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18489   (exit $ac_status); }; }; then
18490   ac_cv_sizeof_size_t=`cat conftest.val`
18491 else
18492   echo "$as_me: program exited with status $ac_status" >&5
18493 echo "$as_me: failed program was:" >&5
18494 sed 's/^/| /' conftest.$ac_ext >&5
18495
18496 ( exit $ac_status )
18497 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18498 See \`config.log' for more details." >&5
18499 echo "$as_me: error: cannot compute sizeof (size_t), 77
18500 See \`config.log' for more details." >&2;}
18501    { (exit 1); exit 1; }; }
18502 fi
18503 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18504 fi
18505 fi
18506 rm -f conftest.val
18507 else
18508   ac_cv_sizeof_size_t=0
18509 fi
18510 fi
18511 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18512 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18513 cat >>confdefs.h <<_ACEOF
18514 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18515 _ACEOF
18516
18517
18518
18519 # Determine memory alignment requirements for the basic C data types.
18520
18521 echo "$as_me:$LINENO: checking for short" >&5
18522 echo $ECHO_N "checking for short... $ECHO_C" >&6
18523 if test "${ac_cv_type_short+set}" = set; then
18524   echo $ECHO_N "(cached) $ECHO_C" >&6
18525 else
18526   cat >conftest.$ac_ext <<_ACEOF
18527 /* confdefs.h.  */
18528 _ACEOF
18529 cat confdefs.h >>conftest.$ac_ext
18530 cat >>conftest.$ac_ext <<_ACEOF
18531 /* end confdefs.h.  */
18532 $ac_includes_default
18533 int
18534 main ()
18535 {
18536 if ((short *) 0)
18537   return 0;
18538 if (sizeof (short))
18539   return 0;
18540   ;
18541   return 0;
18542 }
18543 _ACEOF
18544 rm -f conftest.$ac_objext
18545 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18546   (eval $ac_compile) 2>conftest.er1
18547   ac_status=$?
18548   grep -v '^ *+' conftest.er1 >conftest.err
18549   rm -f conftest.er1
18550   cat conftest.err >&5
18551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18552   (exit $ac_status); } &&
18553          { ac_try='test -z "$ac_c_werror_flag"
18554                          || test ! -s conftest.err'
18555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18556   (eval $ac_try) 2>&5
18557   ac_status=$?
18558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18559   (exit $ac_status); }; } &&
18560          { ac_try='test -s conftest.$ac_objext'
18561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18562   (eval $ac_try) 2>&5
18563   ac_status=$?
18564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18565   (exit $ac_status); }; }; then
18566   ac_cv_type_short=yes
18567 else
18568   echo "$as_me: failed program was:" >&5
18569 sed 's/^/| /' conftest.$ac_ext >&5
18570
18571 ac_cv_type_short=no
18572 fi
18573 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18574 fi
18575 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18576 echo "${ECHO_T}$ac_cv_type_short" >&6
18577
18578 echo "$as_me:$LINENO: checking alignment of short" >&5
18579 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18580 if test "${pgac_cv_alignof_short+set}" = set; then
18581   echo $ECHO_N "(cached) $ECHO_C" >&6
18582 else
18583   if test "$ac_cv_type_short" = yes; then
18584   if test "$cross_compiling" = yes; then
18585   # Depending upon the size, compute the lo and hi bounds.
18586 cat >conftest.$ac_ext <<_ACEOF
18587 /* confdefs.h.  */
18588 _ACEOF
18589 cat confdefs.h >>conftest.$ac_ext
18590 cat >>conftest.$ac_ext <<_ACEOF
18591 /* end confdefs.h.  */
18592 $ac_includes_default
18593 struct { char filler; short field; } pgac_struct;
18594 int
18595 main ()
18596 {
18597 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18598 test_array [0] = 0
18599
18600   ;
18601   return 0;
18602 }
18603 _ACEOF
18604 rm -f conftest.$ac_objext
18605 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18606   (eval $ac_compile) 2>conftest.er1
18607   ac_status=$?
18608   grep -v '^ *+' conftest.er1 >conftest.err
18609   rm -f conftest.er1
18610   cat conftest.err >&5
18611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18612   (exit $ac_status); } &&
18613          { ac_try='test -z "$ac_c_werror_flag"
18614                          || test ! -s conftest.err'
18615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18616   (eval $ac_try) 2>&5
18617   ac_status=$?
18618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18619   (exit $ac_status); }; } &&
18620          { ac_try='test -s conftest.$ac_objext'
18621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18622   (eval $ac_try) 2>&5
18623   ac_status=$?
18624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18625   (exit $ac_status); }; }; then
18626   ac_lo=0 ac_mid=0
18627   while :; do
18628     cat >conftest.$ac_ext <<_ACEOF
18629 /* confdefs.h.  */
18630 _ACEOF
18631 cat confdefs.h >>conftest.$ac_ext
18632 cat >>conftest.$ac_ext <<_ACEOF
18633 /* end confdefs.h.  */
18634 $ac_includes_default
18635 struct { char filler; short field; } pgac_struct;
18636 int
18637 main ()
18638 {
18639 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18640 test_array [0] = 0
18641
18642   ;
18643   return 0;
18644 }
18645 _ACEOF
18646 rm -f conftest.$ac_objext
18647 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18648   (eval $ac_compile) 2>conftest.er1
18649   ac_status=$?
18650   grep -v '^ *+' conftest.er1 >conftest.err
18651   rm -f conftest.er1
18652   cat conftest.err >&5
18653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18654   (exit $ac_status); } &&
18655          { ac_try='test -z "$ac_c_werror_flag"
18656                          || test ! -s conftest.err'
18657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18658   (eval $ac_try) 2>&5
18659   ac_status=$?
18660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18661   (exit $ac_status); }; } &&
18662          { ac_try='test -s conftest.$ac_objext'
18663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18664   (eval $ac_try) 2>&5
18665   ac_status=$?
18666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18667   (exit $ac_status); }; }; then
18668   ac_hi=$ac_mid; break
18669 else
18670   echo "$as_me: failed program was:" >&5
18671 sed 's/^/| /' conftest.$ac_ext >&5
18672
18673 ac_lo=`expr $ac_mid + 1`
18674                     if test $ac_lo -le $ac_mid; then
18675                       ac_lo= ac_hi=
18676                       break
18677                     fi
18678                     ac_mid=`expr 2 '*' $ac_mid + 1`
18679 fi
18680 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18681   done
18682 else
18683   echo "$as_me: failed program was:" >&5
18684 sed 's/^/| /' conftest.$ac_ext >&5
18685
18686 cat >conftest.$ac_ext <<_ACEOF
18687 /* confdefs.h.  */
18688 _ACEOF
18689 cat confdefs.h >>conftest.$ac_ext
18690 cat >>conftest.$ac_ext <<_ACEOF
18691 /* end confdefs.h.  */
18692 $ac_includes_default
18693 struct { char filler; short field; } pgac_struct;
18694 int
18695 main ()
18696 {
18697 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18698 test_array [0] = 0
18699
18700   ;
18701   return 0;
18702 }
18703 _ACEOF
18704 rm -f conftest.$ac_objext
18705 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18706   (eval $ac_compile) 2>conftest.er1
18707   ac_status=$?
18708   grep -v '^ *+' conftest.er1 >conftest.err
18709   rm -f conftest.er1
18710   cat conftest.err >&5
18711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18712   (exit $ac_status); } &&
18713          { ac_try='test -z "$ac_c_werror_flag"
18714                          || test ! -s conftest.err'
18715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18716   (eval $ac_try) 2>&5
18717   ac_status=$?
18718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18719   (exit $ac_status); }; } &&
18720          { ac_try='test -s conftest.$ac_objext'
18721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18722   (eval $ac_try) 2>&5
18723   ac_status=$?
18724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18725   (exit $ac_status); }; }; then
18726   ac_hi=-1 ac_mid=-1
18727   while :; do
18728     cat >conftest.$ac_ext <<_ACEOF
18729 /* confdefs.h.  */
18730 _ACEOF
18731 cat confdefs.h >>conftest.$ac_ext
18732 cat >>conftest.$ac_ext <<_ACEOF
18733 /* end confdefs.h.  */
18734 $ac_includes_default
18735 struct { char filler; short field; } pgac_struct;
18736 int
18737 main ()
18738 {
18739 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18740 test_array [0] = 0
18741
18742   ;
18743   return 0;
18744 }
18745 _ACEOF
18746 rm -f conftest.$ac_objext
18747 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18748   (eval $ac_compile) 2>conftest.er1
18749   ac_status=$?
18750   grep -v '^ *+' conftest.er1 >conftest.err
18751   rm -f conftest.er1
18752   cat conftest.err >&5
18753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18754   (exit $ac_status); } &&
18755          { ac_try='test -z "$ac_c_werror_flag"
18756                          || test ! -s conftest.err'
18757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18758   (eval $ac_try) 2>&5
18759   ac_status=$?
18760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18761   (exit $ac_status); }; } &&
18762          { ac_try='test -s conftest.$ac_objext'
18763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18764   (eval $ac_try) 2>&5
18765   ac_status=$?
18766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18767   (exit $ac_status); }; }; then
18768   ac_lo=$ac_mid; break
18769 else
18770   echo "$as_me: failed program was:" >&5
18771 sed 's/^/| /' conftest.$ac_ext >&5
18772
18773 ac_hi=`expr '(' $ac_mid ')' - 1`
18774                        if test $ac_mid -le $ac_hi; then
18775                          ac_lo= ac_hi=
18776                          break
18777                        fi
18778                        ac_mid=`expr 2 '*' $ac_mid`
18779 fi
18780 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18781   done
18782 else
18783   echo "$as_me: failed program was:" >&5
18784 sed 's/^/| /' conftest.$ac_ext >&5
18785
18786 ac_lo= ac_hi=
18787 fi
18788 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18789 fi
18790 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18791 # Binary search between lo and hi bounds.
18792 while test "x$ac_lo" != "x$ac_hi"; do
18793   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18794   cat >conftest.$ac_ext <<_ACEOF
18795 /* confdefs.h.  */
18796 _ACEOF
18797 cat confdefs.h >>conftest.$ac_ext
18798 cat >>conftest.$ac_ext <<_ACEOF
18799 /* end confdefs.h.  */
18800 $ac_includes_default
18801 struct { char filler; short field; } pgac_struct;
18802 int
18803 main ()
18804 {
18805 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18806 test_array [0] = 0
18807
18808   ;
18809   return 0;
18810 }
18811 _ACEOF
18812 rm -f conftest.$ac_objext
18813 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18814   (eval $ac_compile) 2>conftest.er1
18815   ac_status=$?
18816   grep -v '^ *+' conftest.er1 >conftest.err
18817   rm -f conftest.er1
18818   cat conftest.err >&5
18819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18820   (exit $ac_status); } &&
18821          { ac_try='test -z "$ac_c_werror_flag"
18822                          || test ! -s conftest.err'
18823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18824   (eval $ac_try) 2>&5
18825   ac_status=$?
18826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18827   (exit $ac_status); }; } &&
18828          { ac_try='test -s conftest.$ac_objext'
18829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18830   (eval $ac_try) 2>&5
18831   ac_status=$?
18832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18833   (exit $ac_status); }; }; then
18834   ac_hi=$ac_mid
18835 else
18836   echo "$as_me: failed program was:" >&5
18837 sed 's/^/| /' conftest.$ac_ext >&5
18838
18839 ac_lo=`expr '(' $ac_mid ')' + 1`
18840 fi
18841 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18842 done
18843 case $ac_lo in
18844 ?*) pgac_cv_alignof_short=$ac_lo;;
18845 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18846 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18847    { (exit 1); exit 1; }; } ;;
18848 esac
18849 else
18850   if test "$cross_compiling" = yes; then
18851   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18852 See \`config.log' for more details." >&5
18853 echo "$as_me: error: cannot run test program while cross compiling
18854 See \`config.log' for more details." >&2;}
18855    { (exit 1); exit 1; }; }
18856 else
18857   cat >conftest.$ac_ext <<_ACEOF
18858 /* confdefs.h.  */
18859 _ACEOF
18860 cat confdefs.h >>conftest.$ac_ext
18861 cat >>conftest.$ac_ext <<_ACEOF
18862 /* end confdefs.h.  */
18863 $ac_includes_default
18864 struct { char filler; short field; } pgac_struct;
18865 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18866 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18867 #include <stdio.h>
18868 #include <stdlib.h>
18869 int
18870 main ()
18871 {
18872
18873   FILE *f = fopen ("conftest.val", "w");
18874   if (! f)
18875     exit (1);
18876   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
18877     {
18878       long i = longval ();
18879       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18880         exit (1);
18881       fprintf (f, "%ld\n", i);
18882     }
18883   else
18884     {
18885       unsigned long i = ulongval ();
18886       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18887         exit (1);
18888       fprintf (f, "%lu\n", i);
18889     }
18890   exit (ferror (f) || fclose (f) != 0);
18891
18892   ;
18893   return 0;
18894 }
18895 _ACEOF
18896 rm -f conftest$ac_exeext
18897 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18898   (eval $ac_link) 2>&5
18899   ac_status=$?
18900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18901   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18903   (eval $ac_try) 2>&5
18904   ac_status=$?
18905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18906   (exit $ac_status); }; }; then
18907   pgac_cv_alignof_short=`cat conftest.val`
18908 else
18909   echo "$as_me: program exited with status $ac_status" >&5
18910 echo "$as_me: failed program was:" >&5
18911 sed 's/^/| /' conftest.$ac_ext >&5
18912
18913 ( exit $ac_status )
18914 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18915 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18916    { (exit 1); exit 1; }; }
18917 fi
18918 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18919 fi
18920 fi
18921 rm -f conftest.val
18922 else
18923   pgac_cv_alignof_short=0
18924 fi
18925 fi
18926 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
18927 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
18928 cat >>confdefs.h <<_ACEOF
18929 #define ALIGNOF_SHORT $pgac_cv_alignof_short
18930 _ACEOF
18931
18932
18933 echo "$as_me:$LINENO: checking for int" >&5
18934 echo $ECHO_N "checking for int... $ECHO_C" >&6
18935 if test "${ac_cv_type_int+set}" = set; then
18936   echo $ECHO_N "(cached) $ECHO_C" >&6
18937 else
18938   cat >conftest.$ac_ext <<_ACEOF
18939 /* confdefs.h.  */
18940 _ACEOF
18941 cat confdefs.h >>conftest.$ac_ext
18942 cat >>conftest.$ac_ext <<_ACEOF
18943 /* end confdefs.h.  */
18944 $ac_includes_default
18945 int
18946 main ()
18947 {
18948 if ((int *) 0)
18949   return 0;
18950 if (sizeof (int))
18951   return 0;
18952   ;
18953   return 0;
18954 }
18955 _ACEOF
18956 rm -f conftest.$ac_objext
18957 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18958   (eval $ac_compile) 2>conftest.er1
18959   ac_status=$?
18960   grep -v '^ *+' conftest.er1 >conftest.err
18961   rm -f conftest.er1
18962   cat conftest.err >&5
18963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18964   (exit $ac_status); } &&
18965          { ac_try='test -z "$ac_c_werror_flag"
18966                          || test ! -s conftest.err'
18967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18968   (eval $ac_try) 2>&5
18969   ac_status=$?
18970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18971   (exit $ac_status); }; } &&
18972          { ac_try='test -s conftest.$ac_objext'
18973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18974   (eval $ac_try) 2>&5
18975   ac_status=$?
18976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18977   (exit $ac_status); }; }; then
18978   ac_cv_type_int=yes
18979 else
18980   echo "$as_me: failed program was:" >&5
18981 sed 's/^/| /' conftest.$ac_ext >&5
18982
18983 ac_cv_type_int=no
18984 fi
18985 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18986 fi
18987 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
18988 echo "${ECHO_T}$ac_cv_type_int" >&6
18989
18990 echo "$as_me:$LINENO: checking alignment of int" >&5
18991 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
18992 if test "${pgac_cv_alignof_int+set}" = set; then
18993   echo $ECHO_N "(cached) $ECHO_C" >&6
18994 else
18995   if test "$ac_cv_type_int" = yes; then
18996   if test "$cross_compiling" = yes; then
18997   # Depending upon the size, compute the lo and hi bounds.
18998 cat >conftest.$ac_ext <<_ACEOF
18999 /* confdefs.h.  */
19000 _ACEOF
19001 cat confdefs.h >>conftest.$ac_ext
19002 cat >>conftest.$ac_ext <<_ACEOF
19003 /* end confdefs.h.  */
19004 $ac_includes_default
19005 struct { char filler; int field; } pgac_struct;
19006 int
19007 main ()
19008 {
19009 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19010 test_array [0] = 0
19011
19012   ;
19013   return 0;
19014 }
19015 _ACEOF
19016 rm -f conftest.$ac_objext
19017 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19018   (eval $ac_compile) 2>conftest.er1
19019   ac_status=$?
19020   grep -v '^ *+' conftest.er1 >conftest.err
19021   rm -f conftest.er1
19022   cat conftest.err >&5
19023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19024   (exit $ac_status); } &&
19025          { ac_try='test -z "$ac_c_werror_flag"
19026                          || test ! -s conftest.err'
19027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19028   (eval $ac_try) 2>&5
19029   ac_status=$?
19030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19031   (exit $ac_status); }; } &&
19032          { ac_try='test -s conftest.$ac_objext'
19033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19034   (eval $ac_try) 2>&5
19035   ac_status=$?
19036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19037   (exit $ac_status); }; }; then
19038   ac_lo=0 ac_mid=0
19039   while :; do
19040     cat >conftest.$ac_ext <<_ACEOF
19041 /* confdefs.h.  */
19042 _ACEOF
19043 cat confdefs.h >>conftest.$ac_ext
19044 cat >>conftest.$ac_ext <<_ACEOF
19045 /* end confdefs.h.  */
19046 $ac_includes_default
19047 struct { char filler; int field; } pgac_struct;
19048 int
19049 main ()
19050 {
19051 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19052 test_array [0] = 0
19053
19054   ;
19055   return 0;
19056 }
19057 _ACEOF
19058 rm -f conftest.$ac_objext
19059 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19060   (eval $ac_compile) 2>conftest.er1
19061   ac_status=$?
19062   grep -v '^ *+' conftest.er1 >conftest.err
19063   rm -f conftest.er1
19064   cat conftest.err >&5
19065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19066   (exit $ac_status); } &&
19067          { ac_try='test -z "$ac_c_werror_flag"
19068                          || test ! -s conftest.err'
19069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19070   (eval $ac_try) 2>&5
19071   ac_status=$?
19072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19073   (exit $ac_status); }; } &&
19074          { ac_try='test -s conftest.$ac_objext'
19075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19076   (eval $ac_try) 2>&5
19077   ac_status=$?
19078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19079   (exit $ac_status); }; }; then
19080   ac_hi=$ac_mid; break
19081 else
19082   echo "$as_me: failed program was:" >&5
19083 sed 's/^/| /' conftest.$ac_ext >&5
19084
19085 ac_lo=`expr $ac_mid + 1`
19086                     if test $ac_lo -le $ac_mid; then
19087                       ac_lo= ac_hi=
19088                       break
19089                     fi
19090                     ac_mid=`expr 2 '*' $ac_mid + 1`
19091 fi
19092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19093   done
19094 else
19095   echo "$as_me: failed program was:" >&5
19096 sed 's/^/| /' conftest.$ac_ext >&5
19097
19098 cat >conftest.$ac_ext <<_ACEOF
19099 /* confdefs.h.  */
19100 _ACEOF
19101 cat confdefs.h >>conftest.$ac_ext
19102 cat >>conftest.$ac_ext <<_ACEOF
19103 /* end confdefs.h.  */
19104 $ac_includes_default
19105 struct { char filler; int field; } pgac_struct;
19106 int
19107 main ()
19108 {
19109 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19110 test_array [0] = 0
19111
19112   ;
19113   return 0;
19114 }
19115 _ACEOF
19116 rm -f conftest.$ac_objext
19117 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19118   (eval $ac_compile) 2>conftest.er1
19119   ac_status=$?
19120   grep -v '^ *+' conftest.er1 >conftest.err
19121   rm -f conftest.er1
19122   cat conftest.err >&5
19123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19124   (exit $ac_status); } &&
19125          { ac_try='test -z "$ac_c_werror_flag"
19126                          || test ! -s conftest.err'
19127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19128   (eval $ac_try) 2>&5
19129   ac_status=$?
19130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19131   (exit $ac_status); }; } &&
19132          { ac_try='test -s conftest.$ac_objext'
19133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19134   (eval $ac_try) 2>&5
19135   ac_status=$?
19136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19137   (exit $ac_status); }; }; then
19138   ac_hi=-1 ac_mid=-1
19139   while :; do
19140     cat >conftest.$ac_ext <<_ACEOF
19141 /* confdefs.h.  */
19142 _ACEOF
19143 cat confdefs.h >>conftest.$ac_ext
19144 cat >>conftest.$ac_ext <<_ACEOF
19145 /* end confdefs.h.  */
19146 $ac_includes_default
19147 struct { char filler; int field; } pgac_struct;
19148 int
19149 main ()
19150 {
19151 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19152 test_array [0] = 0
19153
19154   ;
19155   return 0;
19156 }
19157 _ACEOF
19158 rm -f conftest.$ac_objext
19159 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19160   (eval $ac_compile) 2>conftest.er1
19161   ac_status=$?
19162   grep -v '^ *+' conftest.er1 >conftest.err
19163   rm -f conftest.er1
19164   cat conftest.err >&5
19165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19166   (exit $ac_status); } &&
19167          { ac_try='test -z "$ac_c_werror_flag"
19168                          || test ! -s conftest.err'
19169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19170   (eval $ac_try) 2>&5
19171   ac_status=$?
19172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19173   (exit $ac_status); }; } &&
19174          { ac_try='test -s conftest.$ac_objext'
19175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19176   (eval $ac_try) 2>&5
19177   ac_status=$?
19178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19179   (exit $ac_status); }; }; then
19180   ac_lo=$ac_mid; break
19181 else
19182   echo "$as_me: failed program was:" >&5
19183 sed 's/^/| /' conftest.$ac_ext >&5
19184
19185 ac_hi=`expr '(' $ac_mid ')' - 1`
19186                        if test $ac_mid -le $ac_hi; then
19187                          ac_lo= ac_hi=
19188                          break
19189                        fi
19190                        ac_mid=`expr 2 '*' $ac_mid`
19191 fi
19192 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19193   done
19194 else
19195   echo "$as_me: failed program was:" >&5
19196 sed 's/^/| /' conftest.$ac_ext >&5
19197
19198 ac_lo= ac_hi=
19199 fi
19200 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19201 fi
19202 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19203 # Binary search between lo and hi bounds.
19204 while test "x$ac_lo" != "x$ac_hi"; do
19205   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19206   cat >conftest.$ac_ext <<_ACEOF
19207 /* confdefs.h.  */
19208 _ACEOF
19209 cat confdefs.h >>conftest.$ac_ext
19210 cat >>conftest.$ac_ext <<_ACEOF
19211 /* end confdefs.h.  */
19212 $ac_includes_default
19213 struct { char filler; int field; } pgac_struct;
19214 int
19215 main ()
19216 {
19217 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19218 test_array [0] = 0
19219
19220   ;
19221   return 0;
19222 }
19223 _ACEOF
19224 rm -f conftest.$ac_objext
19225 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19226   (eval $ac_compile) 2>conftest.er1
19227   ac_status=$?
19228   grep -v '^ *+' conftest.er1 >conftest.err
19229   rm -f conftest.er1
19230   cat conftest.err >&5
19231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19232   (exit $ac_status); } &&
19233          { ac_try='test -z "$ac_c_werror_flag"
19234                          || test ! -s conftest.err'
19235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19236   (eval $ac_try) 2>&5
19237   ac_status=$?
19238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19239   (exit $ac_status); }; } &&
19240          { ac_try='test -s conftest.$ac_objext'
19241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19242   (eval $ac_try) 2>&5
19243   ac_status=$?
19244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19245   (exit $ac_status); }; }; then
19246   ac_hi=$ac_mid
19247 else
19248   echo "$as_me: failed program was:" >&5
19249 sed 's/^/| /' conftest.$ac_ext >&5
19250
19251 ac_lo=`expr '(' $ac_mid ')' + 1`
19252 fi
19253 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19254 done
19255 case $ac_lo in
19256 ?*) pgac_cv_alignof_int=$ac_lo;;
19257 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19258 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19259    { (exit 1); exit 1; }; } ;;
19260 esac
19261 else
19262   if test "$cross_compiling" = yes; then
19263   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19264 See \`config.log' for more details." >&5
19265 echo "$as_me: error: cannot run test program while cross compiling
19266 See \`config.log' for more details." >&2;}
19267    { (exit 1); exit 1; }; }
19268 else
19269   cat >conftest.$ac_ext <<_ACEOF
19270 /* confdefs.h.  */
19271 _ACEOF
19272 cat confdefs.h >>conftest.$ac_ext
19273 cat >>conftest.$ac_ext <<_ACEOF
19274 /* end confdefs.h.  */
19275 $ac_includes_default
19276 struct { char filler; int field; } pgac_struct;
19277 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19278 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19279 #include <stdio.h>
19280 #include <stdlib.h>
19281 int
19282 main ()
19283 {
19284
19285   FILE *f = fopen ("conftest.val", "w");
19286   if (! f)
19287     exit (1);
19288   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19289     {
19290       long i = longval ();
19291       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19292         exit (1);
19293       fprintf (f, "%ld\n", i);
19294     }
19295   else
19296     {
19297       unsigned long i = ulongval ();
19298       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19299         exit (1);
19300       fprintf (f, "%lu\n", i);
19301     }
19302   exit (ferror (f) || fclose (f) != 0);
19303
19304   ;
19305   return 0;
19306 }
19307 _ACEOF
19308 rm -f conftest$ac_exeext
19309 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19310   (eval $ac_link) 2>&5
19311   ac_status=$?
19312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19313   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19315   (eval $ac_try) 2>&5
19316   ac_status=$?
19317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19318   (exit $ac_status); }; }; then
19319   pgac_cv_alignof_int=`cat conftest.val`
19320 else
19321   echo "$as_me: program exited with status $ac_status" >&5
19322 echo "$as_me: failed program was:" >&5
19323 sed 's/^/| /' conftest.$ac_ext >&5
19324
19325 ( exit $ac_status )
19326 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19327 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19328    { (exit 1); exit 1; }; }
19329 fi
19330 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19331 fi
19332 fi
19333 rm -f conftest.val
19334 else
19335   pgac_cv_alignof_int=0
19336 fi
19337 fi
19338 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19339 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19340 cat >>confdefs.h <<_ACEOF
19341 #define ALIGNOF_INT $pgac_cv_alignof_int
19342 _ACEOF
19343
19344
19345 echo "$as_me:$LINENO: checking for long" >&5
19346 echo $ECHO_N "checking for long... $ECHO_C" >&6
19347 if test "${ac_cv_type_long+set}" = set; then
19348   echo $ECHO_N "(cached) $ECHO_C" >&6
19349 else
19350   cat >conftest.$ac_ext <<_ACEOF
19351 /* confdefs.h.  */
19352 _ACEOF
19353 cat confdefs.h >>conftest.$ac_ext
19354 cat >>conftest.$ac_ext <<_ACEOF
19355 /* end confdefs.h.  */
19356 $ac_includes_default
19357 int
19358 main ()
19359 {
19360 if ((long *) 0)
19361   return 0;
19362 if (sizeof (long))
19363   return 0;
19364   ;
19365   return 0;
19366 }
19367 _ACEOF
19368 rm -f conftest.$ac_objext
19369 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19370   (eval $ac_compile) 2>conftest.er1
19371   ac_status=$?
19372   grep -v '^ *+' conftest.er1 >conftest.err
19373   rm -f conftest.er1
19374   cat conftest.err >&5
19375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19376   (exit $ac_status); } &&
19377          { ac_try='test -z "$ac_c_werror_flag"
19378                          || test ! -s conftest.err'
19379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19380   (eval $ac_try) 2>&5
19381   ac_status=$?
19382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19383   (exit $ac_status); }; } &&
19384          { ac_try='test -s conftest.$ac_objext'
19385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19386   (eval $ac_try) 2>&5
19387   ac_status=$?
19388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19389   (exit $ac_status); }; }; then
19390   ac_cv_type_long=yes
19391 else
19392   echo "$as_me: failed program was:" >&5
19393 sed 's/^/| /' conftest.$ac_ext >&5
19394
19395 ac_cv_type_long=no
19396 fi
19397 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19398 fi
19399 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19400 echo "${ECHO_T}$ac_cv_type_long" >&6
19401
19402 echo "$as_me:$LINENO: checking alignment of long" >&5
19403 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19404 if test "${pgac_cv_alignof_long+set}" = set; then
19405   echo $ECHO_N "(cached) $ECHO_C" >&6
19406 else
19407   if test "$ac_cv_type_long" = yes; then
19408   if test "$cross_compiling" = yes; then
19409   # Depending upon the size, compute the lo and hi bounds.
19410 cat >conftest.$ac_ext <<_ACEOF
19411 /* confdefs.h.  */
19412 _ACEOF
19413 cat confdefs.h >>conftest.$ac_ext
19414 cat >>conftest.$ac_ext <<_ACEOF
19415 /* end confdefs.h.  */
19416 $ac_includes_default
19417 struct { char filler; long field; } pgac_struct;
19418 int
19419 main ()
19420 {
19421 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19422 test_array [0] = 0
19423
19424   ;
19425   return 0;
19426 }
19427 _ACEOF
19428 rm -f conftest.$ac_objext
19429 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19430   (eval $ac_compile) 2>conftest.er1
19431   ac_status=$?
19432   grep -v '^ *+' conftest.er1 >conftest.err
19433   rm -f conftest.er1
19434   cat conftest.err >&5
19435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19436   (exit $ac_status); } &&
19437          { ac_try='test -z "$ac_c_werror_flag"
19438                          || test ! -s conftest.err'
19439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19440   (eval $ac_try) 2>&5
19441   ac_status=$?
19442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19443   (exit $ac_status); }; } &&
19444          { ac_try='test -s conftest.$ac_objext'
19445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19446   (eval $ac_try) 2>&5
19447   ac_status=$?
19448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19449   (exit $ac_status); }; }; then
19450   ac_lo=0 ac_mid=0
19451   while :; do
19452     cat >conftest.$ac_ext <<_ACEOF
19453 /* confdefs.h.  */
19454 _ACEOF
19455 cat confdefs.h >>conftest.$ac_ext
19456 cat >>conftest.$ac_ext <<_ACEOF
19457 /* end confdefs.h.  */
19458 $ac_includes_default
19459 struct { char filler; long field; } pgac_struct;
19460 int
19461 main ()
19462 {
19463 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19464 test_array [0] = 0
19465
19466   ;
19467   return 0;
19468 }
19469 _ACEOF
19470 rm -f conftest.$ac_objext
19471 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19472   (eval $ac_compile) 2>conftest.er1
19473   ac_status=$?
19474   grep -v '^ *+' conftest.er1 >conftest.err
19475   rm -f conftest.er1
19476   cat conftest.err >&5
19477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19478   (exit $ac_status); } &&
19479          { ac_try='test -z "$ac_c_werror_flag"
19480                          || test ! -s conftest.err'
19481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19482   (eval $ac_try) 2>&5
19483   ac_status=$?
19484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19485   (exit $ac_status); }; } &&
19486          { ac_try='test -s conftest.$ac_objext'
19487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19488   (eval $ac_try) 2>&5
19489   ac_status=$?
19490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19491   (exit $ac_status); }; }; then
19492   ac_hi=$ac_mid; break
19493 else
19494   echo "$as_me: failed program was:" >&5
19495 sed 's/^/| /' conftest.$ac_ext >&5
19496
19497 ac_lo=`expr $ac_mid + 1`
19498                     if test $ac_lo -le $ac_mid; then
19499                       ac_lo= ac_hi=
19500                       break
19501                     fi
19502                     ac_mid=`expr 2 '*' $ac_mid + 1`
19503 fi
19504 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19505   done
19506 else
19507   echo "$as_me: failed program was:" >&5
19508 sed 's/^/| /' conftest.$ac_ext >&5
19509
19510 cat >conftest.$ac_ext <<_ACEOF
19511 /* confdefs.h.  */
19512 _ACEOF
19513 cat confdefs.h >>conftest.$ac_ext
19514 cat >>conftest.$ac_ext <<_ACEOF
19515 /* end confdefs.h.  */
19516 $ac_includes_default
19517 struct { char filler; long field; } pgac_struct;
19518 int
19519 main ()
19520 {
19521 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19522 test_array [0] = 0
19523
19524   ;
19525   return 0;
19526 }
19527 _ACEOF
19528 rm -f conftest.$ac_objext
19529 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19530   (eval $ac_compile) 2>conftest.er1
19531   ac_status=$?
19532   grep -v '^ *+' conftest.er1 >conftest.err
19533   rm -f conftest.er1
19534   cat conftest.err >&5
19535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19536   (exit $ac_status); } &&
19537          { ac_try='test -z "$ac_c_werror_flag"
19538                          || test ! -s conftest.err'
19539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19540   (eval $ac_try) 2>&5
19541   ac_status=$?
19542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19543   (exit $ac_status); }; } &&
19544          { ac_try='test -s conftest.$ac_objext'
19545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19546   (eval $ac_try) 2>&5
19547   ac_status=$?
19548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19549   (exit $ac_status); }; }; then
19550   ac_hi=-1 ac_mid=-1
19551   while :; do
19552     cat >conftest.$ac_ext <<_ACEOF
19553 /* confdefs.h.  */
19554 _ACEOF
19555 cat confdefs.h >>conftest.$ac_ext
19556 cat >>conftest.$ac_ext <<_ACEOF
19557 /* end confdefs.h.  */
19558 $ac_includes_default
19559 struct { char filler; long field; } pgac_struct;
19560 int
19561 main ()
19562 {
19563 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19564 test_array [0] = 0
19565
19566   ;
19567   return 0;
19568 }
19569 _ACEOF
19570 rm -f conftest.$ac_objext
19571 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19572   (eval $ac_compile) 2>conftest.er1
19573   ac_status=$?
19574   grep -v '^ *+' conftest.er1 >conftest.err
19575   rm -f conftest.er1
19576   cat conftest.err >&5
19577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19578   (exit $ac_status); } &&
19579          { ac_try='test -z "$ac_c_werror_flag"
19580                          || test ! -s conftest.err'
19581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19582   (eval $ac_try) 2>&5
19583   ac_status=$?
19584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19585   (exit $ac_status); }; } &&
19586          { ac_try='test -s conftest.$ac_objext'
19587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19588   (eval $ac_try) 2>&5
19589   ac_status=$?
19590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19591   (exit $ac_status); }; }; then
19592   ac_lo=$ac_mid; break
19593 else
19594   echo "$as_me: failed program was:" >&5
19595 sed 's/^/| /' conftest.$ac_ext >&5
19596
19597 ac_hi=`expr '(' $ac_mid ')' - 1`
19598                        if test $ac_mid -le $ac_hi; then
19599                          ac_lo= ac_hi=
19600                          break
19601                        fi
19602                        ac_mid=`expr 2 '*' $ac_mid`
19603 fi
19604 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19605   done
19606 else
19607   echo "$as_me: failed program was:" >&5
19608 sed 's/^/| /' conftest.$ac_ext >&5
19609
19610 ac_lo= ac_hi=
19611 fi
19612 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19613 fi
19614 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19615 # Binary search between lo and hi bounds.
19616 while test "x$ac_lo" != "x$ac_hi"; do
19617   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19618   cat >conftest.$ac_ext <<_ACEOF
19619 /* confdefs.h.  */
19620 _ACEOF
19621 cat confdefs.h >>conftest.$ac_ext
19622 cat >>conftest.$ac_ext <<_ACEOF
19623 /* end confdefs.h.  */
19624 $ac_includes_default
19625 struct { char filler; long field; } pgac_struct;
19626 int
19627 main ()
19628 {
19629 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19630 test_array [0] = 0
19631
19632   ;
19633   return 0;
19634 }
19635 _ACEOF
19636 rm -f conftest.$ac_objext
19637 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19638   (eval $ac_compile) 2>conftest.er1
19639   ac_status=$?
19640   grep -v '^ *+' conftest.er1 >conftest.err
19641   rm -f conftest.er1
19642   cat conftest.err >&5
19643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19644   (exit $ac_status); } &&
19645          { ac_try='test -z "$ac_c_werror_flag"
19646                          || test ! -s conftest.err'
19647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19648   (eval $ac_try) 2>&5
19649   ac_status=$?
19650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19651   (exit $ac_status); }; } &&
19652          { ac_try='test -s conftest.$ac_objext'
19653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19654   (eval $ac_try) 2>&5
19655   ac_status=$?
19656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19657   (exit $ac_status); }; }; then
19658   ac_hi=$ac_mid
19659 else
19660   echo "$as_me: failed program was:" >&5
19661 sed 's/^/| /' conftest.$ac_ext >&5
19662
19663 ac_lo=`expr '(' $ac_mid ')' + 1`
19664 fi
19665 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19666 done
19667 case $ac_lo in
19668 ?*) pgac_cv_alignof_long=$ac_lo;;
19669 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19670 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19671    { (exit 1); exit 1; }; } ;;
19672 esac
19673 else
19674   if test "$cross_compiling" = yes; then
19675   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19676 See \`config.log' for more details." >&5
19677 echo "$as_me: error: cannot run test program while cross compiling
19678 See \`config.log' for more details." >&2;}
19679    { (exit 1); exit 1; }; }
19680 else
19681   cat >conftest.$ac_ext <<_ACEOF
19682 /* confdefs.h.  */
19683 _ACEOF
19684 cat confdefs.h >>conftest.$ac_ext
19685 cat >>conftest.$ac_ext <<_ACEOF
19686 /* end confdefs.h.  */
19687 $ac_includes_default
19688 struct { char filler; long field; } pgac_struct;
19689 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19690 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19691 #include <stdio.h>
19692 #include <stdlib.h>
19693 int
19694 main ()
19695 {
19696
19697   FILE *f = fopen ("conftest.val", "w");
19698   if (! f)
19699     exit (1);
19700   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19701     {
19702       long i = longval ();
19703       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19704         exit (1);
19705       fprintf (f, "%ld\n", i);
19706     }
19707   else
19708     {
19709       unsigned long i = ulongval ();
19710       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19711         exit (1);
19712       fprintf (f, "%lu\n", i);
19713     }
19714   exit (ferror (f) || fclose (f) != 0);
19715
19716   ;
19717   return 0;
19718 }
19719 _ACEOF
19720 rm -f conftest$ac_exeext
19721 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19722   (eval $ac_link) 2>&5
19723   ac_status=$?
19724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19725   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19727   (eval $ac_try) 2>&5
19728   ac_status=$?
19729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19730   (exit $ac_status); }; }; then
19731   pgac_cv_alignof_long=`cat conftest.val`
19732 else
19733   echo "$as_me: program exited with status $ac_status" >&5
19734 echo "$as_me: failed program was:" >&5
19735 sed 's/^/| /' conftest.$ac_ext >&5
19736
19737 ( exit $ac_status )
19738 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19739 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19740    { (exit 1); exit 1; }; }
19741 fi
19742 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19743 fi
19744 fi
19745 rm -f conftest.val
19746 else
19747   pgac_cv_alignof_long=0
19748 fi
19749 fi
19750 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
19751 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
19752 cat >>confdefs.h <<_ACEOF
19753 #define ALIGNOF_LONG $pgac_cv_alignof_long
19754 _ACEOF
19755
19756
19757 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
19758   echo "$as_me:$LINENO: checking for long long int" >&5
19759 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
19760 if test "${ac_cv_type_long_long_int+set}" = set; then
19761   echo $ECHO_N "(cached) $ECHO_C" >&6
19762 else
19763   cat >conftest.$ac_ext <<_ACEOF
19764 /* confdefs.h.  */
19765 _ACEOF
19766 cat confdefs.h >>conftest.$ac_ext
19767 cat >>conftest.$ac_ext <<_ACEOF
19768 /* end confdefs.h.  */
19769 $ac_includes_default
19770 int
19771 main ()
19772 {
19773 if ((long long int *) 0)
19774   return 0;
19775 if (sizeof (long long int))
19776   return 0;
19777   ;
19778   return 0;
19779 }
19780 _ACEOF
19781 rm -f conftest.$ac_objext
19782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19783   (eval $ac_compile) 2>conftest.er1
19784   ac_status=$?
19785   grep -v '^ *+' conftest.er1 >conftest.err
19786   rm -f conftest.er1
19787   cat conftest.err >&5
19788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19789   (exit $ac_status); } &&
19790          { ac_try='test -z "$ac_c_werror_flag"
19791                          || test ! -s conftest.err'
19792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19793   (eval $ac_try) 2>&5
19794   ac_status=$?
19795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19796   (exit $ac_status); }; } &&
19797          { ac_try='test -s conftest.$ac_objext'
19798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19799   (eval $ac_try) 2>&5
19800   ac_status=$?
19801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19802   (exit $ac_status); }; }; then
19803   ac_cv_type_long_long_int=yes
19804 else
19805   echo "$as_me: failed program was:" >&5
19806 sed 's/^/| /' conftest.$ac_ext >&5
19807
19808 ac_cv_type_long_long_int=no
19809 fi
19810 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19811 fi
19812 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
19813 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
19814
19815 echo "$as_me:$LINENO: checking alignment of long long int" >&5
19816 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
19817 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
19818   echo $ECHO_N "(cached) $ECHO_C" >&6
19819 else
19820   if test "$ac_cv_type_long_long_int" = yes; then
19821   if test "$cross_compiling" = yes; then
19822   # Depending upon the size, compute the lo and hi bounds.
19823 cat >conftest.$ac_ext <<_ACEOF
19824 /* confdefs.h.  */
19825 _ACEOF
19826 cat confdefs.h >>conftest.$ac_ext
19827 cat >>conftest.$ac_ext <<_ACEOF
19828 /* end confdefs.h.  */
19829 $ac_includes_default
19830 struct { char filler; long long int field; } pgac_struct;
19831 int
19832 main ()
19833 {
19834 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19835 test_array [0] = 0
19836
19837   ;
19838   return 0;
19839 }
19840 _ACEOF
19841 rm -f conftest.$ac_objext
19842 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19843   (eval $ac_compile) 2>conftest.er1
19844   ac_status=$?
19845   grep -v '^ *+' conftest.er1 >conftest.err
19846   rm -f conftest.er1
19847   cat conftest.err >&5
19848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19849   (exit $ac_status); } &&
19850          { ac_try='test -z "$ac_c_werror_flag"
19851                          || test ! -s conftest.err'
19852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19853   (eval $ac_try) 2>&5
19854   ac_status=$?
19855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19856   (exit $ac_status); }; } &&
19857          { ac_try='test -s conftest.$ac_objext'
19858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19859   (eval $ac_try) 2>&5
19860   ac_status=$?
19861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19862   (exit $ac_status); }; }; then
19863   ac_lo=0 ac_mid=0
19864   while :; do
19865     cat >conftest.$ac_ext <<_ACEOF
19866 /* confdefs.h.  */
19867 _ACEOF
19868 cat confdefs.h >>conftest.$ac_ext
19869 cat >>conftest.$ac_ext <<_ACEOF
19870 /* end confdefs.h.  */
19871 $ac_includes_default
19872 struct { char filler; long long int field; } pgac_struct;
19873 int
19874 main ()
19875 {
19876 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19877 test_array [0] = 0
19878
19879   ;
19880   return 0;
19881 }
19882 _ACEOF
19883 rm -f conftest.$ac_objext
19884 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19885   (eval $ac_compile) 2>conftest.er1
19886   ac_status=$?
19887   grep -v '^ *+' conftest.er1 >conftest.err
19888   rm -f conftest.er1
19889   cat conftest.err >&5
19890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19891   (exit $ac_status); } &&
19892          { ac_try='test -z "$ac_c_werror_flag"
19893                          || test ! -s conftest.err'
19894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19895   (eval $ac_try) 2>&5
19896   ac_status=$?
19897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19898   (exit $ac_status); }; } &&
19899          { ac_try='test -s conftest.$ac_objext'
19900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19901   (eval $ac_try) 2>&5
19902   ac_status=$?
19903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19904   (exit $ac_status); }; }; then
19905   ac_hi=$ac_mid; break
19906 else
19907   echo "$as_me: failed program was:" >&5
19908 sed 's/^/| /' conftest.$ac_ext >&5
19909
19910 ac_lo=`expr $ac_mid + 1`
19911                     if test $ac_lo -le $ac_mid; then
19912                       ac_lo= ac_hi=
19913                       break
19914                     fi
19915                     ac_mid=`expr 2 '*' $ac_mid + 1`
19916 fi
19917 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19918   done
19919 else
19920   echo "$as_me: failed program was:" >&5
19921 sed 's/^/| /' conftest.$ac_ext >&5
19922
19923 cat >conftest.$ac_ext <<_ACEOF
19924 /* confdefs.h.  */
19925 _ACEOF
19926 cat confdefs.h >>conftest.$ac_ext
19927 cat >>conftest.$ac_ext <<_ACEOF
19928 /* end confdefs.h.  */
19929 $ac_includes_default
19930 struct { char filler; long long int field; } pgac_struct;
19931 int
19932 main ()
19933 {
19934 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19935 test_array [0] = 0
19936
19937   ;
19938   return 0;
19939 }
19940 _ACEOF
19941 rm -f conftest.$ac_objext
19942 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19943   (eval $ac_compile) 2>conftest.er1
19944   ac_status=$?
19945   grep -v '^ *+' conftest.er1 >conftest.err
19946   rm -f conftest.er1
19947   cat conftest.err >&5
19948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19949   (exit $ac_status); } &&
19950          { ac_try='test -z "$ac_c_werror_flag"
19951                          || test ! -s conftest.err'
19952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19953   (eval $ac_try) 2>&5
19954   ac_status=$?
19955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19956   (exit $ac_status); }; } &&
19957          { ac_try='test -s conftest.$ac_objext'
19958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19959   (eval $ac_try) 2>&5
19960   ac_status=$?
19961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19962   (exit $ac_status); }; }; then
19963   ac_hi=-1 ac_mid=-1
19964   while :; do
19965     cat >conftest.$ac_ext <<_ACEOF
19966 /* confdefs.h.  */
19967 _ACEOF
19968 cat confdefs.h >>conftest.$ac_ext
19969 cat >>conftest.$ac_ext <<_ACEOF
19970 /* end confdefs.h.  */
19971 $ac_includes_default
19972 struct { char filler; long long int field; } pgac_struct;
19973 int
19974 main ()
19975 {
19976 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19977 test_array [0] = 0
19978
19979   ;
19980   return 0;
19981 }
19982 _ACEOF
19983 rm -f conftest.$ac_objext
19984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19985   (eval $ac_compile) 2>conftest.er1
19986   ac_status=$?
19987   grep -v '^ *+' conftest.er1 >conftest.err
19988   rm -f conftest.er1
19989   cat conftest.err >&5
19990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19991   (exit $ac_status); } &&
19992          { ac_try='test -z "$ac_c_werror_flag"
19993                          || test ! -s conftest.err'
19994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19995   (eval $ac_try) 2>&5
19996   ac_status=$?
19997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19998   (exit $ac_status); }; } &&
19999          { ac_try='test -s conftest.$ac_objext'
20000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20001   (eval $ac_try) 2>&5
20002   ac_status=$?
20003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20004   (exit $ac_status); }; }; then
20005   ac_lo=$ac_mid; break
20006 else
20007   echo "$as_me: failed program was:" >&5
20008 sed 's/^/| /' conftest.$ac_ext >&5
20009
20010 ac_hi=`expr '(' $ac_mid ')' - 1`
20011                        if test $ac_mid -le $ac_hi; then
20012                          ac_lo= ac_hi=
20013                          break
20014                        fi
20015                        ac_mid=`expr 2 '*' $ac_mid`
20016 fi
20017 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20018   done
20019 else
20020   echo "$as_me: failed program was:" >&5
20021 sed 's/^/| /' conftest.$ac_ext >&5
20022
20023 ac_lo= ac_hi=
20024 fi
20025 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20026 fi
20027 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20028 # Binary search between lo and hi bounds.
20029 while test "x$ac_lo" != "x$ac_hi"; do
20030   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20031   cat >conftest.$ac_ext <<_ACEOF
20032 /* confdefs.h.  */
20033 _ACEOF
20034 cat confdefs.h >>conftest.$ac_ext
20035 cat >>conftest.$ac_ext <<_ACEOF
20036 /* end confdefs.h.  */
20037 $ac_includes_default
20038 struct { char filler; long long int field; } pgac_struct;
20039 int
20040 main ()
20041 {
20042 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20043 test_array [0] = 0
20044
20045   ;
20046   return 0;
20047 }
20048 _ACEOF
20049 rm -f conftest.$ac_objext
20050 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20051   (eval $ac_compile) 2>conftest.er1
20052   ac_status=$?
20053   grep -v '^ *+' conftest.er1 >conftest.err
20054   rm -f conftest.er1
20055   cat conftest.err >&5
20056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20057   (exit $ac_status); } &&
20058          { ac_try='test -z "$ac_c_werror_flag"
20059                          || test ! -s conftest.err'
20060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20061   (eval $ac_try) 2>&5
20062   ac_status=$?
20063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20064   (exit $ac_status); }; } &&
20065          { ac_try='test -s conftest.$ac_objext'
20066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20067   (eval $ac_try) 2>&5
20068   ac_status=$?
20069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20070   (exit $ac_status); }; }; then
20071   ac_hi=$ac_mid
20072 else
20073   echo "$as_me: failed program was:" >&5
20074 sed 's/^/| /' conftest.$ac_ext >&5
20075
20076 ac_lo=`expr '(' $ac_mid ')' + 1`
20077 fi
20078 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20079 done
20080 case $ac_lo in
20081 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20082 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20083 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20084    { (exit 1); exit 1; }; } ;;
20085 esac
20086 else
20087   if test "$cross_compiling" = yes; then
20088   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20089 See \`config.log' for more details." >&5
20090 echo "$as_me: error: cannot run test program while cross compiling
20091 See \`config.log' for more details." >&2;}
20092    { (exit 1); exit 1; }; }
20093 else
20094   cat >conftest.$ac_ext <<_ACEOF
20095 /* confdefs.h.  */
20096 _ACEOF
20097 cat confdefs.h >>conftest.$ac_ext
20098 cat >>conftest.$ac_ext <<_ACEOF
20099 /* end confdefs.h.  */
20100 $ac_includes_default
20101 struct { char filler; long long int field; } pgac_struct;
20102 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20103 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20104 #include <stdio.h>
20105 #include <stdlib.h>
20106 int
20107 main ()
20108 {
20109
20110   FILE *f = fopen ("conftest.val", "w");
20111   if (! f)
20112     exit (1);
20113   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20114     {
20115       long i = longval ();
20116       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20117         exit (1);
20118       fprintf (f, "%ld\n", i);
20119     }
20120   else
20121     {
20122       unsigned long i = ulongval ();
20123       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20124         exit (1);
20125       fprintf (f, "%lu\n", i);
20126     }
20127   exit (ferror (f) || fclose (f) != 0);
20128
20129   ;
20130   return 0;
20131 }
20132 _ACEOF
20133 rm -f conftest$ac_exeext
20134 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20135   (eval $ac_link) 2>&5
20136   ac_status=$?
20137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20138   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20140   (eval $ac_try) 2>&5
20141   ac_status=$?
20142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20143   (exit $ac_status); }; }; then
20144   pgac_cv_alignof_long_long_int=`cat conftest.val`
20145 else
20146   echo "$as_me: program exited with status $ac_status" >&5
20147 echo "$as_me: failed program was:" >&5
20148 sed 's/^/| /' conftest.$ac_ext >&5
20149
20150 ( exit $ac_status )
20151 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20152 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20153    { (exit 1); exit 1; }; }
20154 fi
20155 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20156 fi
20157 fi
20158 rm -f conftest.val
20159 else
20160   pgac_cv_alignof_long_long_int=0
20161 fi
20162 fi
20163 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20164 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20165 cat >>confdefs.h <<_ACEOF
20166 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20167 _ACEOF
20168
20169
20170 fi
20171 echo "$as_me:$LINENO: checking for double" >&5
20172 echo $ECHO_N "checking for double... $ECHO_C" >&6
20173 if test "${ac_cv_type_double+set}" = set; then
20174   echo $ECHO_N "(cached) $ECHO_C" >&6
20175 else
20176   cat >conftest.$ac_ext <<_ACEOF
20177 /* confdefs.h.  */
20178 _ACEOF
20179 cat confdefs.h >>conftest.$ac_ext
20180 cat >>conftest.$ac_ext <<_ACEOF
20181 /* end confdefs.h.  */
20182 $ac_includes_default
20183 int
20184 main ()
20185 {
20186 if ((double *) 0)
20187   return 0;
20188 if (sizeof (double))
20189   return 0;
20190   ;
20191   return 0;
20192 }
20193 _ACEOF
20194 rm -f conftest.$ac_objext
20195 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20196   (eval $ac_compile) 2>conftest.er1
20197   ac_status=$?
20198   grep -v '^ *+' conftest.er1 >conftest.err
20199   rm -f conftest.er1
20200   cat conftest.err >&5
20201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20202   (exit $ac_status); } &&
20203          { ac_try='test -z "$ac_c_werror_flag"
20204                          || test ! -s conftest.err'
20205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20206   (eval $ac_try) 2>&5
20207   ac_status=$?
20208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20209   (exit $ac_status); }; } &&
20210          { ac_try='test -s conftest.$ac_objext'
20211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20212   (eval $ac_try) 2>&5
20213   ac_status=$?
20214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20215   (exit $ac_status); }; }; then
20216   ac_cv_type_double=yes
20217 else
20218   echo "$as_me: failed program was:" >&5
20219 sed 's/^/| /' conftest.$ac_ext >&5
20220
20221 ac_cv_type_double=no
20222 fi
20223 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20224 fi
20225 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20226 echo "${ECHO_T}$ac_cv_type_double" >&6
20227
20228 echo "$as_me:$LINENO: checking alignment of double" >&5
20229 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20230 if test "${pgac_cv_alignof_double+set}" = set; then
20231   echo $ECHO_N "(cached) $ECHO_C" >&6
20232 else
20233   if test "$ac_cv_type_double" = yes; then
20234   if test "$cross_compiling" = yes; then
20235   # Depending upon the size, compute the lo and hi bounds.
20236 cat >conftest.$ac_ext <<_ACEOF
20237 /* confdefs.h.  */
20238 _ACEOF
20239 cat confdefs.h >>conftest.$ac_ext
20240 cat >>conftest.$ac_ext <<_ACEOF
20241 /* end confdefs.h.  */
20242 $ac_includes_default
20243 struct { char filler; double field; } pgac_struct;
20244 int
20245 main ()
20246 {
20247 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20248 test_array [0] = 0
20249
20250   ;
20251   return 0;
20252 }
20253 _ACEOF
20254 rm -f conftest.$ac_objext
20255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20256   (eval $ac_compile) 2>conftest.er1
20257   ac_status=$?
20258   grep -v '^ *+' conftest.er1 >conftest.err
20259   rm -f conftest.er1
20260   cat conftest.err >&5
20261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20262   (exit $ac_status); } &&
20263          { ac_try='test -z "$ac_c_werror_flag"
20264                          || test ! -s conftest.err'
20265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20266   (eval $ac_try) 2>&5
20267   ac_status=$?
20268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20269   (exit $ac_status); }; } &&
20270          { ac_try='test -s conftest.$ac_objext'
20271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20272   (eval $ac_try) 2>&5
20273   ac_status=$?
20274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20275   (exit $ac_status); }; }; then
20276   ac_lo=0 ac_mid=0
20277   while :; do
20278     cat >conftest.$ac_ext <<_ACEOF
20279 /* confdefs.h.  */
20280 _ACEOF
20281 cat confdefs.h >>conftest.$ac_ext
20282 cat >>conftest.$ac_ext <<_ACEOF
20283 /* end confdefs.h.  */
20284 $ac_includes_default
20285 struct { char filler; double field; } pgac_struct;
20286 int
20287 main ()
20288 {
20289 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20290 test_array [0] = 0
20291
20292   ;
20293   return 0;
20294 }
20295 _ACEOF
20296 rm -f conftest.$ac_objext
20297 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20298   (eval $ac_compile) 2>conftest.er1
20299   ac_status=$?
20300   grep -v '^ *+' conftest.er1 >conftest.err
20301   rm -f conftest.er1
20302   cat conftest.err >&5
20303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20304   (exit $ac_status); } &&
20305          { ac_try='test -z "$ac_c_werror_flag"
20306                          || test ! -s conftest.err'
20307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20308   (eval $ac_try) 2>&5
20309   ac_status=$?
20310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20311   (exit $ac_status); }; } &&
20312          { ac_try='test -s conftest.$ac_objext'
20313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20314   (eval $ac_try) 2>&5
20315   ac_status=$?
20316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20317   (exit $ac_status); }; }; then
20318   ac_hi=$ac_mid; break
20319 else
20320   echo "$as_me: failed program was:" >&5
20321 sed 's/^/| /' conftest.$ac_ext >&5
20322
20323 ac_lo=`expr $ac_mid + 1`
20324                     if test $ac_lo -le $ac_mid; then
20325                       ac_lo= ac_hi=
20326                       break
20327                     fi
20328                     ac_mid=`expr 2 '*' $ac_mid + 1`
20329 fi
20330 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20331   done
20332 else
20333   echo "$as_me: failed program was:" >&5
20334 sed 's/^/| /' conftest.$ac_ext >&5
20335
20336 cat >conftest.$ac_ext <<_ACEOF
20337 /* confdefs.h.  */
20338 _ACEOF
20339 cat confdefs.h >>conftest.$ac_ext
20340 cat >>conftest.$ac_ext <<_ACEOF
20341 /* end confdefs.h.  */
20342 $ac_includes_default
20343 struct { char filler; double field; } pgac_struct;
20344 int
20345 main ()
20346 {
20347 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20348 test_array [0] = 0
20349
20350   ;
20351   return 0;
20352 }
20353 _ACEOF
20354 rm -f conftest.$ac_objext
20355 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20356   (eval $ac_compile) 2>conftest.er1
20357   ac_status=$?
20358   grep -v '^ *+' conftest.er1 >conftest.err
20359   rm -f conftest.er1
20360   cat conftest.err >&5
20361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20362   (exit $ac_status); } &&
20363          { ac_try='test -z "$ac_c_werror_flag"
20364                          || test ! -s conftest.err'
20365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20366   (eval $ac_try) 2>&5
20367   ac_status=$?
20368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20369   (exit $ac_status); }; } &&
20370          { ac_try='test -s conftest.$ac_objext'
20371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20372   (eval $ac_try) 2>&5
20373   ac_status=$?
20374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20375   (exit $ac_status); }; }; then
20376   ac_hi=-1 ac_mid=-1
20377   while :; do
20378     cat >conftest.$ac_ext <<_ACEOF
20379 /* confdefs.h.  */
20380 _ACEOF
20381 cat confdefs.h >>conftest.$ac_ext
20382 cat >>conftest.$ac_ext <<_ACEOF
20383 /* end confdefs.h.  */
20384 $ac_includes_default
20385 struct { char filler; double field; } pgac_struct;
20386 int
20387 main ()
20388 {
20389 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20390 test_array [0] = 0
20391
20392   ;
20393   return 0;
20394 }
20395 _ACEOF
20396 rm -f conftest.$ac_objext
20397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20398   (eval $ac_compile) 2>conftest.er1
20399   ac_status=$?
20400   grep -v '^ *+' conftest.er1 >conftest.err
20401   rm -f conftest.er1
20402   cat conftest.err >&5
20403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20404   (exit $ac_status); } &&
20405          { ac_try='test -z "$ac_c_werror_flag"
20406                          || test ! -s conftest.err'
20407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20408   (eval $ac_try) 2>&5
20409   ac_status=$?
20410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20411   (exit $ac_status); }; } &&
20412          { ac_try='test -s conftest.$ac_objext'
20413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20414   (eval $ac_try) 2>&5
20415   ac_status=$?
20416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20417   (exit $ac_status); }; }; then
20418   ac_lo=$ac_mid; break
20419 else
20420   echo "$as_me: failed program was:" >&5
20421 sed 's/^/| /' conftest.$ac_ext >&5
20422
20423 ac_hi=`expr '(' $ac_mid ')' - 1`
20424                        if test $ac_mid -le $ac_hi; then
20425                          ac_lo= ac_hi=
20426                          break
20427                        fi
20428                        ac_mid=`expr 2 '*' $ac_mid`
20429 fi
20430 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20431   done
20432 else
20433   echo "$as_me: failed program was:" >&5
20434 sed 's/^/| /' conftest.$ac_ext >&5
20435
20436 ac_lo= ac_hi=
20437 fi
20438 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20439 fi
20440 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20441 # Binary search between lo and hi bounds.
20442 while test "x$ac_lo" != "x$ac_hi"; do
20443   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20444   cat >conftest.$ac_ext <<_ACEOF
20445 /* confdefs.h.  */
20446 _ACEOF
20447 cat confdefs.h >>conftest.$ac_ext
20448 cat >>conftest.$ac_ext <<_ACEOF
20449 /* end confdefs.h.  */
20450 $ac_includes_default
20451 struct { char filler; double field; } pgac_struct;
20452 int
20453 main ()
20454 {
20455 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20456 test_array [0] = 0
20457
20458   ;
20459   return 0;
20460 }
20461 _ACEOF
20462 rm -f conftest.$ac_objext
20463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20464   (eval $ac_compile) 2>conftest.er1
20465   ac_status=$?
20466   grep -v '^ *+' conftest.er1 >conftest.err
20467   rm -f conftest.er1
20468   cat conftest.err >&5
20469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20470   (exit $ac_status); } &&
20471          { ac_try='test -z "$ac_c_werror_flag"
20472                          || test ! -s conftest.err'
20473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20474   (eval $ac_try) 2>&5
20475   ac_status=$?
20476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20477   (exit $ac_status); }; } &&
20478          { ac_try='test -s conftest.$ac_objext'
20479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20480   (eval $ac_try) 2>&5
20481   ac_status=$?
20482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20483   (exit $ac_status); }; }; then
20484   ac_hi=$ac_mid
20485 else
20486   echo "$as_me: failed program was:" >&5
20487 sed 's/^/| /' conftest.$ac_ext >&5
20488
20489 ac_lo=`expr '(' $ac_mid ')' + 1`
20490 fi
20491 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20492 done
20493 case $ac_lo in
20494 ?*) pgac_cv_alignof_double=$ac_lo;;
20495 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20496 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20497    { (exit 1); exit 1; }; } ;;
20498 esac
20499 else
20500   if test "$cross_compiling" = yes; then
20501   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20502 See \`config.log' for more details." >&5
20503 echo "$as_me: error: cannot run test program while cross compiling
20504 See \`config.log' for more details." >&2;}
20505    { (exit 1); exit 1; }; }
20506 else
20507   cat >conftest.$ac_ext <<_ACEOF
20508 /* confdefs.h.  */
20509 _ACEOF
20510 cat confdefs.h >>conftest.$ac_ext
20511 cat >>conftest.$ac_ext <<_ACEOF
20512 /* end confdefs.h.  */
20513 $ac_includes_default
20514 struct { char filler; double field; } pgac_struct;
20515 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20516 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20517 #include <stdio.h>
20518 #include <stdlib.h>
20519 int
20520 main ()
20521 {
20522
20523   FILE *f = fopen ("conftest.val", "w");
20524   if (! f)
20525     exit (1);
20526   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20527     {
20528       long i = longval ();
20529       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20530         exit (1);
20531       fprintf (f, "%ld\n", i);
20532     }
20533   else
20534     {
20535       unsigned long i = ulongval ();
20536       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20537         exit (1);
20538       fprintf (f, "%lu\n", i);
20539     }
20540   exit (ferror (f) || fclose (f) != 0);
20541
20542   ;
20543   return 0;
20544 }
20545 _ACEOF
20546 rm -f conftest$ac_exeext
20547 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20548   (eval $ac_link) 2>&5
20549   ac_status=$?
20550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20551   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20553   (eval $ac_try) 2>&5
20554   ac_status=$?
20555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20556   (exit $ac_status); }; }; then
20557   pgac_cv_alignof_double=`cat conftest.val`
20558 else
20559   echo "$as_me: program exited with status $ac_status" >&5
20560 echo "$as_me: failed program was:" >&5
20561 sed 's/^/| /' conftest.$ac_ext >&5
20562
20563 ( exit $ac_status )
20564 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20565 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20566    { (exit 1); exit 1; }; }
20567 fi
20568 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20569 fi
20570 fi
20571 rm -f conftest.val
20572 else
20573   pgac_cv_alignof_double=0
20574 fi
20575 fi
20576 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20577 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20578 cat >>confdefs.h <<_ACEOF
20579 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20580 _ACEOF
20581
20582
20583
20584 # Compute maximum alignment of any basic type.
20585 # We assume long's alignment is at least as strong as char, short, or int;
20586 # but we must check long long (if it exists) and double.
20587
20588 MAX_ALIGNOF=$pgac_cv_alignof_long
20589 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20590   MAX_ALIGNOF=$pgac_cv_alignof_double
20591 fi
20592 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20593   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20594 fi
20595
20596 cat >>confdefs.h <<_ACEOF
20597 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20598 _ACEOF
20599
20600
20601
20602 # Some platforms predefine the types int8, int16, etc.  Only check
20603 # a (hopefully) representative subset.
20604 echo "$as_me:$LINENO: checking for int8" >&5
20605 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20606 if test "${ac_cv_type_int8+set}" = set; then
20607   echo $ECHO_N "(cached) $ECHO_C" >&6
20608 else
20609   cat >conftest.$ac_ext <<_ACEOF
20610 /* confdefs.h.  */
20611 _ACEOF
20612 cat confdefs.h >>conftest.$ac_ext
20613 cat >>conftest.$ac_ext <<_ACEOF
20614 /* end confdefs.h.  */
20615 #include <stdio.h>
20616 #ifdef HAVE_SUPPORTDEFS_H
20617 #include <SupportDefs.h>
20618 #endif
20619
20620 int
20621 main ()
20622 {
20623 if ((int8 *) 0)
20624   return 0;
20625 if (sizeof (int8))
20626   return 0;
20627   ;
20628   return 0;
20629 }
20630 _ACEOF
20631 rm -f conftest.$ac_objext
20632 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20633   (eval $ac_compile) 2>conftest.er1
20634   ac_status=$?
20635   grep -v '^ *+' conftest.er1 >conftest.err
20636   rm -f conftest.er1
20637   cat conftest.err >&5
20638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20639   (exit $ac_status); } &&
20640          { ac_try='test -z "$ac_c_werror_flag"
20641                          || test ! -s conftest.err'
20642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20643   (eval $ac_try) 2>&5
20644   ac_status=$?
20645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20646   (exit $ac_status); }; } &&
20647          { ac_try='test -s conftest.$ac_objext'
20648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20649   (eval $ac_try) 2>&5
20650   ac_status=$?
20651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20652   (exit $ac_status); }; }; then
20653   ac_cv_type_int8=yes
20654 else
20655   echo "$as_me: failed program was:" >&5
20656 sed 's/^/| /' conftest.$ac_ext >&5
20657
20658 ac_cv_type_int8=no
20659 fi
20660 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20661 fi
20662 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20663 echo "${ECHO_T}$ac_cv_type_int8" >&6
20664 if test $ac_cv_type_int8 = yes; then
20665
20666 cat >>confdefs.h <<_ACEOF
20667 #define HAVE_INT8 1
20668 _ACEOF
20669
20670
20671 fi
20672 echo "$as_me:$LINENO: checking for uint8" >&5
20673 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20674 if test "${ac_cv_type_uint8+set}" = set; then
20675   echo $ECHO_N "(cached) $ECHO_C" >&6
20676 else
20677   cat >conftest.$ac_ext <<_ACEOF
20678 /* confdefs.h.  */
20679 _ACEOF
20680 cat confdefs.h >>conftest.$ac_ext
20681 cat >>conftest.$ac_ext <<_ACEOF
20682 /* end confdefs.h.  */
20683 #include <stdio.h>
20684 #ifdef HAVE_SUPPORTDEFS_H
20685 #include <SupportDefs.h>
20686 #endif
20687
20688 int
20689 main ()
20690 {
20691 if ((uint8 *) 0)
20692   return 0;
20693 if (sizeof (uint8))
20694   return 0;
20695   ;
20696   return 0;
20697 }
20698 _ACEOF
20699 rm -f conftest.$ac_objext
20700 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20701   (eval $ac_compile) 2>conftest.er1
20702   ac_status=$?
20703   grep -v '^ *+' conftest.er1 >conftest.err
20704   rm -f conftest.er1
20705   cat conftest.err >&5
20706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20707   (exit $ac_status); } &&
20708          { ac_try='test -z "$ac_c_werror_flag"
20709                          || test ! -s conftest.err'
20710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20711   (eval $ac_try) 2>&5
20712   ac_status=$?
20713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20714   (exit $ac_status); }; } &&
20715          { ac_try='test -s conftest.$ac_objext'
20716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20717   (eval $ac_try) 2>&5
20718   ac_status=$?
20719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20720   (exit $ac_status); }; }; then
20721   ac_cv_type_uint8=yes
20722 else
20723   echo "$as_me: failed program was:" >&5
20724 sed 's/^/| /' conftest.$ac_ext >&5
20725
20726 ac_cv_type_uint8=no
20727 fi
20728 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20729 fi
20730 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20731 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20732 if test $ac_cv_type_uint8 = yes; then
20733
20734 cat >>confdefs.h <<_ACEOF
20735 #define HAVE_UINT8 1
20736 _ACEOF
20737
20738
20739 fi
20740 echo "$as_me:$LINENO: checking for int64" >&5
20741 echo $ECHO_N "checking for int64... $ECHO_C" >&6
20742 if test "${ac_cv_type_int64+set}" = set; then
20743   echo $ECHO_N "(cached) $ECHO_C" >&6
20744 else
20745   cat >conftest.$ac_ext <<_ACEOF
20746 /* confdefs.h.  */
20747 _ACEOF
20748 cat confdefs.h >>conftest.$ac_ext
20749 cat >>conftest.$ac_ext <<_ACEOF
20750 /* end confdefs.h.  */
20751 #include <stdio.h>
20752 #ifdef HAVE_SUPPORTDEFS_H
20753 #include <SupportDefs.h>
20754 #endif
20755
20756 int
20757 main ()
20758 {
20759 if ((int64 *) 0)
20760   return 0;
20761 if (sizeof (int64))
20762   return 0;
20763   ;
20764   return 0;
20765 }
20766 _ACEOF
20767 rm -f conftest.$ac_objext
20768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20769   (eval $ac_compile) 2>conftest.er1
20770   ac_status=$?
20771   grep -v '^ *+' conftest.er1 >conftest.err
20772   rm -f conftest.er1
20773   cat conftest.err >&5
20774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20775   (exit $ac_status); } &&
20776          { ac_try='test -z "$ac_c_werror_flag"
20777                          || test ! -s conftest.err'
20778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20779   (eval $ac_try) 2>&5
20780   ac_status=$?
20781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20782   (exit $ac_status); }; } &&
20783          { ac_try='test -s conftest.$ac_objext'
20784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20785   (eval $ac_try) 2>&5
20786   ac_status=$?
20787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20788   (exit $ac_status); }; }; then
20789   ac_cv_type_int64=yes
20790 else
20791   echo "$as_me: failed program was:" >&5
20792 sed 's/^/| /' conftest.$ac_ext >&5
20793
20794 ac_cv_type_int64=no
20795 fi
20796 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20797 fi
20798 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
20799 echo "${ECHO_T}$ac_cv_type_int64" >&6
20800 if test $ac_cv_type_int64 = yes; then
20801
20802 cat >>confdefs.h <<_ACEOF
20803 #define HAVE_INT64 1
20804 _ACEOF
20805
20806
20807 fi
20808 echo "$as_me:$LINENO: checking for uint64" >&5
20809 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
20810 if test "${ac_cv_type_uint64+set}" = set; then
20811   echo $ECHO_N "(cached) $ECHO_C" >&6
20812 else
20813   cat >conftest.$ac_ext <<_ACEOF
20814 /* confdefs.h.  */
20815 _ACEOF
20816 cat confdefs.h >>conftest.$ac_ext
20817 cat >>conftest.$ac_ext <<_ACEOF
20818 /* end confdefs.h.  */
20819 #include <stdio.h>
20820 #ifdef HAVE_SUPPORTDEFS_H
20821 #include <SupportDefs.h>
20822 #endif
20823
20824 int
20825 main ()
20826 {
20827 if ((uint64 *) 0)
20828   return 0;
20829 if (sizeof (uint64))
20830   return 0;
20831   ;
20832   return 0;
20833 }
20834 _ACEOF
20835 rm -f conftest.$ac_objext
20836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20837   (eval $ac_compile) 2>conftest.er1
20838   ac_status=$?
20839   grep -v '^ *+' conftest.er1 >conftest.err
20840   rm -f conftest.er1
20841   cat conftest.err >&5
20842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20843   (exit $ac_status); } &&
20844          { ac_try='test -z "$ac_c_werror_flag"
20845                          || test ! -s conftest.err'
20846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20847   (eval $ac_try) 2>&5
20848   ac_status=$?
20849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20850   (exit $ac_status); }; } &&
20851          { ac_try='test -s conftest.$ac_objext'
20852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20853   (eval $ac_try) 2>&5
20854   ac_status=$?
20855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20856   (exit $ac_status); }; }; then
20857   ac_cv_type_uint64=yes
20858 else
20859   echo "$as_me: failed program was:" >&5
20860 sed 's/^/| /' conftest.$ac_ext >&5
20861
20862 ac_cv_type_uint64=no
20863 fi
20864 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20865 fi
20866 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
20867 echo "${ECHO_T}$ac_cv_type_uint64" >&6
20868 if test $ac_cv_type_uint64 = yes; then
20869
20870 cat >>confdefs.h <<_ACEOF
20871 #define HAVE_UINT64 1
20872 _ACEOF
20873
20874
20875 fi
20876
20877
20878 # We also check for sig_atomic_t, which *should* be defined per ANSI
20879 # C, but is missing on some old platforms.
20880 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
20881 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
20882 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
20883   echo $ECHO_N "(cached) $ECHO_C" >&6
20884 else
20885   cat >conftest.$ac_ext <<_ACEOF
20886 /* confdefs.h.  */
20887 _ACEOF
20888 cat confdefs.h >>conftest.$ac_ext
20889 cat >>conftest.$ac_ext <<_ACEOF
20890 /* end confdefs.h.  */
20891 #include <signal.h>
20892
20893 int
20894 main ()
20895 {
20896 if ((sig_atomic_t *) 0)
20897   return 0;
20898 if (sizeof (sig_atomic_t))
20899   return 0;
20900   ;
20901   return 0;
20902 }
20903 _ACEOF
20904 rm -f conftest.$ac_objext
20905 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20906   (eval $ac_compile) 2>conftest.er1
20907   ac_status=$?
20908   grep -v '^ *+' conftest.er1 >conftest.err
20909   rm -f conftest.er1
20910   cat conftest.err >&5
20911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20912   (exit $ac_status); } &&
20913          { ac_try='test -z "$ac_c_werror_flag"
20914                          || test ! -s conftest.err'
20915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20916   (eval $ac_try) 2>&5
20917   ac_status=$?
20918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20919   (exit $ac_status); }; } &&
20920          { ac_try='test -s conftest.$ac_objext'
20921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20922   (eval $ac_try) 2>&5
20923   ac_status=$?
20924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20925   (exit $ac_status); }; }; then
20926   ac_cv_type_sig_atomic_t=yes
20927 else
20928   echo "$as_me: failed program was:" >&5
20929 sed 's/^/| /' conftest.$ac_ext >&5
20930
20931 ac_cv_type_sig_atomic_t=no
20932 fi
20933 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20934 fi
20935 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
20936 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
20937 if test $ac_cv_type_sig_atomic_t = yes; then
20938
20939 cat >>confdefs.h <<_ACEOF
20940 #define HAVE_SIG_ATOMIC_T 1
20941 _ACEOF
20942
20943
20944 fi
20945
20946
20947
20948 if test x"$template" != x"win32"
20949 then
20950 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
20951 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
20952 if test "${pgac_cv_func_posix_signals+set}" = set; then
20953   echo $ECHO_N "(cached) $ECHO_C" >&6
20954 else
20955   cat >conftest.$ac_ext <<_ACEOF
20956 /* confdefs.h.  */
20957 _ACEOF
20958 cat confdefs.h >>conftest.$ac_ext
20959 cat >>conftest.$ac_ext <<_ACEOF
20960 /* end confdefs.h.  */
20961 #include <signal.h>
20962
20963 int
20964 main ()
20965 {
20966 struct sigaction act, oact;
20967 sigemptyset(&act.sa_mask);
20968 act.sa_flags = SA_RESTART;
20969 sigaction(0, &act, &oact);
20970   ;
20971   return 0;
20972 }
20973 _ACEOF
20974 rm -f conftest.$ac_objext conftest$ac_exeext
20975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20976   (eval $ac_link) 2>conftest.er1
20977   ac_status=$?
20978   grep -v '^ *+' conftest.er1 >conftest.err
20979   rm -f conftest.er1
20980   cat conftest.err >&5
20981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20982   (exit $ac_status); } &&
20983          { ac_try='test -z "$ac_c_werror_flag"
20984                          || test ! -s conftest.err'
20985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20986   (eval $ac_try) 2>&5
20987   ac_status=$?
20988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20989   (exit $ac_status); }; } &&
20990          { ac_try='test -s conftest$ac_exeext'
20991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20992   (eval $ac_try) 2>&5
20993   ac_status=$?
20994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20995   (exit $ac_status); }; }; then
20996   pgac_cv_func_posix_signals=yes
20997 else
20998   echo "$as_me: failed program was:" >&5
20999 sed 's/^/| /' conftest.$ac_ext >&5
21000
21001 pgac_cv_func_posix_signals=no
21002 fi
21003 rm -f conftest.err conftest.$ac_objext \
21004       conftest$ac_exeext conftest.$ac_ext
21005 fi
21006 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21007 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21008 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21009
21010 cat >>confdefs.h <<\_ACEOF
21011 #define HAVE_POSIX_SIGNALS
21012 _ACEOF
21013
21014 fi
21015 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21016
21017 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21018   { { echo "$as_me:$LINENO: error:
21019 *** Thread-safety requires POSIX signals, which are not supported by your
21020 *** operating system.
21021 " >&5
21022 echo "$as_me: error:
21023 *** Thread-safety requires POSIX signals, which are not supported by your
21024 *** operating system.
21025 " >&2;}
21026    { (exit 1); exit 1; }; }
21027 fi
21028 fi
21029
21030 if test $ac_cv_func_fseeko = yes; then
21031 # Check whether --enable-largefile or --disable-largefile was given.
21032 if test "${enable_largefile+set}" = set; then
21033   enableval="$enable_largefile"
21034
21035 fi;
21036 if test "$enable_largefile" != no; then
21037
21038   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21039 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21040 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21041   echo $ECHO_N "(cached) $ECHO_C" >&6
21042 else
21043   ac_cv_sys_largefile_CC=no
21044      if test "$GCC" != yes; then
21045        ac_save_CC=$CC
21046        while :; do
21047          # IRIX 6.2 and later do not support large files by default,
21048          # so use the C compiler's -n32 option if that helps.
21049          cat >conftest.$ac_ext <<_ACEOF
21050 /* confdefs.h.  */
21051 _ACEOF
21052 cat confdefs.h >>conftest.$ac_ext
21053 cat >>conftest.$ac_ext <<_ACEOF
21054 /* end confdefs.h.  */
21055 #include <sys/types.h>
21056  /* Check that off_t can represent 2**63 - 1 correctly.
21057     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21058     since some C++ compilers masquerading as C compilers
21059     incorrectly reject 9223372036854775807.  */
21060 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21061   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21062                        && LARGE_OFF_T % 2147483647 == 1)
21063                       ? 1 : -1];
21064 int
21065 main ()
21066 {
21067
21068   ;
21069   return 0;
21070 }
21071 _ACEOF
21072          rm -f conftest.$ac_objext
21073 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21074   (eval $ac_compile) 2>conftest.er1
21075   ac_status=$?
21076   grep -v '^ *+' conftest.er1 >conftest.err
21077   rm -f conftest.er1
21078   cat conftest.err >&5
21079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21080   (exit $ac_status); } &&
21081          { ac_try='test -z "$ac_c_werror_flag"
21082                          || test ! -s conftest.err'
21083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21084   (eval $ac_try) 2>&5
21085   ac_status=$?
21086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21087   (exit $ac_status); }; } &&
21088          { ac_try='test -s conftest.$ac_objext'
21089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21090   (eval $ac_try) 2>&5
21091   ac_status=$?
21092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21093   (exit $ac_status); }; }; then
21094   break
21095 else
21096   echo "$as_me: failed program was:" >&5
21097 sed 's/^/| /' conftest.$ac_ext >&5
21098
21099 fi
21100 rm -f conftest.err conftest.$ac_objext
21101          CC="$CC -n32"
21102          rm -f conftest.$ac_objext
21103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21104   (eval $ac_compile) 2>conftest.er1
21105   ac_status=$?
21106   grep -v '^ *+' conftest.er1 >conftest.err
21107   rm -f conftest.er1
21108   cat conftest.err >&5
21109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21110   (exit $ac_status); } &&
21111          { ac_try='test -z "$ac_c_werror_flag"
21112                          || test ! -s conftest.err'
21113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21114   (eval $ac_try) 2>&5
21115   ac_status=$?
21116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21117   (exit $ac_status); }; } &&
21118          { ac_try='test -s conftest.$ac_objext'
21119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21120   (eval $ac_try) 2>&5
21121   ac_status=$?
21122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21123   (exit $ac_status); }; }; then
21124   ac_cv_sys_largefile_CC=' -n32'; break
21125 else
21126   echo "$as_me: failed program was:" >&5
21127 sed 's/^/| /' conftest.$ac_ext >&5
21128
21129 fi
21130 rm -f conftest.err conftest.$ac_objext
21131          break
21132        done
21133        CC=$ac_save_CC
21134        rm -f conftest.$ac_ext
21135     fi
21136 fi
21137 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21138 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21139   if test "$ac_cv_sys_largefile_CC" != no; then
21140     CC=$CC$ac_cv_sys_largefile_CC
21141   fi
21142
21143   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21144 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21145 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21146   echo $ECHO_N "(cached) $ECHO_C" >&6
21147 else
21148   while :; do
21149   ac_cv_sys_file_offset_bits=no
21150   cat >conftest.$ac_ext <<_ACEOF
21151 /* confdefs.h.  */
21152 _ACEOF
21153 cat confdefs.h >>conftest.$ac_ext
21154 cat >>conftest.$ac_ext <<_ACEOF
21155 /* end confdefs.h.  */
21156 #include <sys/types.h>
21157  /* Check that off_t can represent 2**63 - 1 correctly.
21158     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21159     since some C++ compilers masquerading as C compilers
21160     incorrectly reject 9223372036854775807.  */
21161 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21162   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21163                        && LARGE_OFF_T % 2147483647 == 1)
21164                       ? 1 : -1];
21165 int
21166 main ()
21167 {
21168
21169   ;
21170   return 0;
21171 }
21172 _ACEOF
21173 rm -f conftest.$ac_objext
21174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21175   (eval $ac_compile) 2>conftest.er1
21176   ac_status=$?
21177   grep -v '^ *+' conftest.er1 >conftest.err
21178   rm -f conftest.er1
21179   cat conftest.err >&5
21180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21181   (exit $ac_status); } &&
21182          { ac_try='test -z "$ac_c_werror_flag"
21183                          || test ! -s conftest.err'
21184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21185   (eval $ac_try) 2>&5
21186   ac_status=$?
21187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21188   (exit $ac_status); }; } &&
21189          { ac_try='test -s conftest.$ac_objext'
21190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21191   (eval $ac_try) 2>&5
21192   ac_status=$?
21193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21194   (exit $ac_status); }; }; then
21195   break
21196 else
21197   echo "$as_me: failed program was:" >&5
21198 sed 's/^/| /' conftest.$ac_ext >&5
21199
21200 fi
21201 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21202   cat >conftest.$ac_ext <<_ACEOF
21203 /* confdefs.h.  */
21204 _ACEOF
21205 cat confdefs.h >>conftest.$ac_ext
21206 cat >>conftest.$ac_ext <<_ACEOF
21207 /* end confdefs.h.  */
21208 #define _FILE_OFFSET_BITS 64
21209 #include <sys/types.h>
21210  /* Check that off_t can represent 2**63 - 1 correctly.
21211     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21212     since some C++ compilers masquerading as C compilers
21213     incorrectly reject 9223372036854775807.  */
21214 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21215   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21216                        && LARGE_OFF_T % 2147483647 == 1)
21217                       ? 1 : -1];
21218 int
21219 main ()
21220 {
21221
21222   ;
21223   return 0;
21224 }
21225 _ACEOF
21226 rm -f conftest.$ac_objext
21227 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21228   (eval $ac_compile) 2>conftest.er1
21229   ac_status=$?
21230   grep -v '^ *+' conftest.er1 >conftest.err
21231   rm -f conftest.er1
21232   cat conftest.err >&5
21233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21234   (exit $ac_status); } &&
21235          { ac_try='test -z "$ac_c_werror_flag"
21236                          || test ! -s conftest.err'
21237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21238   (eval $ac_try) 2>&5
21239   ac_status=$?
21240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21241   (exit $ac_status); }; } &&
21242          { ac_try='test -s conftest.$ac_objext'
21243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21244   (eval $ac_try) 2>&5
21245   ac_status=$?
21246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21247   (exit $ac_status); }; }; then
21248   ac_cv_sys_file_offset_bits=64; break
21249 else
21250   echo "$as_me: failed program was:" >&5
21251 sed 's/^/| /' conftest.$ac_ext >&5
21252
21253 fi
21254 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21255   break
21256 done
21257 fi
21258 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21259 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21260 if test "$ac_cv_sys_file_offset_bits" != no; then
21261
21262 cat >>confdefs.h <<_ACEOF
21263 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21264 _ACEOF
21265
21266 fi
21267 rm -f conftest*
21268   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21269 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21270 if test "${ac_cv_sys_large_files+set}" = set; then
21271   echo $ECHO_N "(cached) $ECHO_C" >&6
21272 else
21273   while :; do
21274   ac_cv_sys_large_files=no
21275   cat >conftest.$ac_ext <<_ACEOF
21276 /* confdefs.h.  */
21277 _ACEOF
21278 cat confdefs.h >>conftest.$ac_ext
21279 cat >>conftest.$ac_ext <<_ACEOF
21280 /* end confdefs.h.  */
21281 #include <sys/types.h>
21282  /* Check that off_t can represent 2**63 - 1 correctly.
21283     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21284     since some C++ compilers masquerading as C compilers
21285     incorrectly reject 9223372036854775807.  */
21286 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21287   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21288                        && LARGE_OFF_T % 2147483647 == 1)
21289                       ? 1 : -1];
21290 int
21291 main ()
21292 {
21293
21294   ;
21295   return 0;
21296 }
21297 _ACEOF
21298 rm -f conftest.$ac_objext
21299 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21300   (eval $ac_compile) 2>conftest.er1
21301   ac_status=$?
21302   grep -v '^ *+' conftest.er1 >conftest.err
21303   rm -f conftest.er1
21304   cat conftest.err >&5
21305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21306   (exit $ac_status); } &&
21307          { ac_try='test -z "$ac_c_werror_flag"
21308                          || test ! -s conftest.err'
21309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21310   (eval $ac_try) 2>&5
21311   ac_status=$?
21312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21313   (exit $ac_status); }; } &&
21314          { ac_try='test -s conftest.$ac_objext'
21315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21316   (eval $ac_try) 2>&5
21317   ac_status=$?
21318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21319   (exit $ac_status); }; }; then
21320   break
21321 else
21322   echo "$as_me: failed program was:" >&5
21323 sed 's/^/| /' conftest.$ac_ext >&5
21324
21325 fi
21326 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21327   cat >conftest.$ac_ext <<_ACEOF
21328 /* confdefs.h.  */
21329 _ACEOF
21330 cat confdefs.h >>conftest.$ac_ext
21331 cat >>conftest.$ac_ext <<_ACEOF
21332 /* end confdefs.h.  */
21333 #define _LARGE_FILES 1
21334 #include <sys/types.h>
21335  /* Check that off_t can represent 2**63 - 1 correctly.
21336     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21337     since some C++ compilers masquerading as C compilers
21338     incorrectly reject 9223372036854775807.  */
21339 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21340   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21341                        && LARGE_OFF_T % 2147483647 == 1)
21342                       ? 1 : -1];
21343 int
21344 main ()
21345 {
21346
21347   ;
21348   return 0;
21349 }
21350 _ACEOF
21351 rm -f conftest.$ac_objext
21352 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21353   (eval $ac_compile) 2>conftest.er1
21354   ac_status=$?
21355   grep -v '^ *+' conftest.er1 >conftest.err
21356   rm -f conftest.er1
21357   cat conftest.err >&5
21358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21359   (exit $ac_status); } &&
21360          { ac_try='test -z "$ac_c_werror_flag"
21361                          || test ! -s conftest.err'
21362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21363   (eval $ac_try) 2>&5
21364   ac_status=$?
21365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21366   (exit $ac_status); }; } &&
21367          { ac_try='test -s conftest.$ac_objext'
21368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21369   (eval $ac_try) 2>&5
21370   ac_status=$?
21371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21372   (exit $ac_status); }; }; then
21373   ac_cv_sys_large_files=1; break
21374 else
21375   echo "$as_me: failed program was:" >&5
21376 sed 's/^/| /' conftest.$ac_ext >&5
21377
21378 fi
21379 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21380   break
21381 done
21382 fi
21383 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21384 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21385 if test "$ac_cv_sys_large_files" != no; then
21386
21387 cat >>confdefs.h <<_ACEOF
21388 #define _LARGE_FILES $ac_cv_sys_large_files
21389 _ACEOF
21390
21391 fi
21392 rm -f conftest*
21393 fi
21394
21395 fi
21396
21397 # SunOS doesn't handle negative byte comparisons properly with +/- return
21398 echo "$as_me:$LINENO: checking for working memcmp" >&5
21399 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21400 if test "${ac_cv_func_memcmp_working+set}" = set; then
21401   echo $ECHO_N "(cached) $ECHO_C" >&6
21402 else
21403   if test "$cross_compiling" = yes; then
21404   ac_cv_func_memcmp_working=no
21405 else
21406   cat >conftest.$ac_ext <<_ACEOF
21407 /* confdefs.h.  */
21408 _ACEOF
21409 cat confdefs.h >>conftest.$ac_ext
21410 cat >>conftest.$ac_ext <<_ACEOF
21411 /* end confdefs.h.  */
21412 $ac_includes_default
21413 int
21414 main ()
21415 {
21416
21417   /* Some versions of memcmp are not 8-bit clean.  */
21418   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21419   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21420     exit (1);
21421
21422   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21423      or more and with at least one buffer not starting on a 4-byte boundary.
21424      William Lewis provided this test program.   */
21425   {
21426     char foo[21];
21427     char bar[21];
21428     int i;
21429     for (i = 0; i < 4; i++)
21430       {
21431         char *a = foo + i;
21432         char *b = bar + i;
21433         strcpy (a, "--------01111111");
21434         strcpy (b, "--------10000000");
21435         if (memcmp (a, b, 16) >= 0)
21436           exit (1);
21437       }
21438     exit (0);
21439   }
21440
21441   ;
21442   return 0;
21443 }
21444 _ACEOF
21445 rm -f conftest$ac_exeext
21446 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21447   (eval $ac_link) 2>&5
21448   ac_status=$?
21449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21450   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21452   (eval $ac_try) 2>&5
21453   ac_status=$?
21454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21455   (exit $ac_status); }; }; then
21456   ac_cv_func_memcmp_working=yes
21457 else
21458   echo "$as_me: program exited with status $ac_status" >&5
21459 echo "$as_me: failed program was:" >&5
21460 sed 's/^/| /' conftest.$ac_ext >&5
21461
21462 ( exit $ac_status )
21463 ac_cv_func_memcmp_working=no
21464 fi
21465 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21466 fi
21467 fi
21468 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21469 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21470 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21471     "memcmp.$ac_objext"   | \
21472   *" memcmp.$ac_objext"   | \
21473     "memcmp.$ac_objext "* | \
21474   *" memcmp.$ac_objext "* ) ;;
21475   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21476 esac
21477
21478
21479
21480
21481 # Select semaphore implementation type.
21482 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21483
21484 cat >>confdefs.h <<\_ACEOF
21485 #define USE_NAMED_POSIX_SEMAPHORES 1
21486 _ACEOF
21487
21488   SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21489 else
21490   if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21491
21492 cat >>confdefs.h <<\_ACEOF
21493 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21494 _ACEOF
21495
21496     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21497   else
21498
21499 cat >>confdefs.h <<\_ACEOF
21500 #define USE_SYSV_SEMAPHORES 1
21501 _ACEOF
21502
21503     SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21504   fi
21505 fi
21506
21507
21508 # Select shared-memory implementation type.
21509
21510 cat >>confdefs.h <<\_ACEOF
21511 #define USE_SYSV_SHARED_MEMORY 1
21512 _ACEOF
21513
21514 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21515
21516
21517 if test "$enable_nls" = yes ; then
21518
21519   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21520 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21521 if test "${ac_cv_search_gettext+set}" = set; then
21522   echo $ECHO_N "(cached) $ECHO_C" >&6
21523 else
21524   ac_func_search_save_LIBS=$LIBS
21525 ac_cv_search_gettext=no
21526 cat >conftest.$ac_ext <<_ACEOF
21527 /* confdefs.h.  */
21528 _ACEOF
21529 cat confdefs.h >>conftest.$ac_ext
21530 cat >>conftest.$ac_ext <<_ACEOF
21531 /* end confdefs.h.  */
21532
21533 /* Override any gcc2 internal prototype to avoid an error.  */
21534 #ifdef __cplusplus
21535 extern "C"
21536 #endif
21537 /* We use char because int might match the return type of a gcc2
21538    builtin and then its argument prototype would still apply.  */
21539 char gettext ();
21540 int
21541 main ()
21542 {
21543 gettext ();
21544   ;
21545   return 0;
21546 }
21547 _ACEOF
21548 rm -f conftest.$ac_objext conftest$ac_exeext
21549 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21550   (eval $ac_link) 2>conftest.er1
21551   ac_status=$?
21552   grep -v '^ *+' conftest.er1 >conftest.err
21553   rm -f conftest.er1
21554   cat conftest.err >&5
21555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21556   (exit $ac_status); } &&
21557          { ac_try='test -z "$ac_c_werror_flag"
21558                          || test ! -s conftest.err'
21559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21560   (eval $ac_try) 2>&5
21561   ac_status=$?
21562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21563   (exit $ac_status); }; } &&
21564          { ac_try='test -s conftest$ac_exeext'
21565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21566   (eval $ac_try) 2>&5
21567   ac_status=$?
21568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21569   (exit $ac_status); }; }; then
21570   ac_cv_search_gettext="none required"
21571 else
21572   echo "$as_me: failed program was:" >&5
21573 sed 's/^/| /' conftest.$ac_ext >&5
21574
21575 fi
21576 rm -f conftest.err conftest.$ac_objext \
21577       conftest$ac_exeext conftest.$ac_ext
21578 if test "$ac_cv_search_gettext" = no; then
21579   for ac_lib in intl; do
21580     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21581     cat >conftest.$ac_ext <<_ACEOF
21582 /* confdefs.h.  */
21583 _ACEOF
21584 cat confdefs.h >>conftest.$ac_ext
21585 cat >>conftest.$ac_ext <<_ACEOF
21586 /* end confdefs.h.  */
21587
21588 /* Override any gcc2 internal prototype to avoid an error.  */
21589 #ifdef __cplusplus
21590 extern "C"
21591 #endif
21592 /* We use char because int might match the return type of a gcc2
21593    builtin and then its argument prototype would still apply.  */
21594 char gettext ();
21595 int
21596 main ()
21597 {
21598 gettext ();
21599   ;
21600   return 0;
21601 }
21602 _ACEOF
21603 rm -f conftest.$ac_objext conftest$ac_exeext
21604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21605   (eval $ac_link) 2>conftest.er1
21606   ac_status=$?
21607   grep -v '^ *+' conftest.er1 >conftest.err
21608   rm -f conftest.er1
21609   cat conftest.err >&5
21610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21611   (exit $ac_status); } &&
21612          { ac_try='test -z "$ac_c_werror_flag"
21613                          || test ! -s conftest.err'
21614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21615   (eval $ac_try) 2>&5
21616   ac_status=$?
21617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21618   (exit $ac_status); }; } &&
21619          { ac_try='test -s conftest$ac_exeext'
21620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21621   (eval $ac_try) 2>&5
21622   ac_status=$?
21623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21624   (exit $ac_status); }; }; then
21625   ac_cv_search_gettext="-l$ac_lib"
21626 break
21627 else
21628   echo "$as_me: failed program was:" >&5
21629 sed 's/^/| /' conftest.$ac_ext >&5
21630
21631 fi
21632 rm -f conftest.err conftest.$ac_objext \
21633       conftest$ac_exeext conftest.$ac_ext
21634   done
21635 fi
21636 LIBS=$ac_func_search_save_LIBS
21637 fi
21638 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21639 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21640 if test "$ac_cv_search_gettext" != no; then
21641   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21642
21643 else
21644   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21645 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21646    { (exit 1); exit 1; }; }
21647 fi
21648
21649   if test "${ac_cv_header_libintl_h+set}" = set; then
21650   echo "$as_me:$LINENO: checking for libintl.h" >&5
21651 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21652 if test "${ac_cv_header_libintl_h+set}" = set; then
21653   echo $ECHO_N "(cached) $ECHO_C" >&6
21654 fi
21655 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21656 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21657 else
21658   # Is the header compilable?
21659 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21660 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21661 cat >conftest.$ac_ext <<_ACEOF
21662 /* confdefs.h.  */
21663 _ACEOF
21664 cat confdefs.h >>conftest.$ac_ext
21665 cat >>conftest.$ac_ext <<_ACEOF
21666 /* end confdefs.h.  */
21667 $ac_includes_default
21668 #include <libintl.h>
21669 _ACEOF
21670 rm -f conftest.$ac_objext
21671 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21672   (eval $ac_compile) 2>conftest.er1
21673   ac_status=$?
21674   grep -v '^ *+' conftest.er1 >conftest.err
21675   rm -f conftest.er1
21676   cat conftest.err >&5
21677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21678   (exit $ac_status); } &&
21679          { ac_try='test -z "$ac_c_werror_flag"
21680                          || test ! -s conftest.err'
21681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21682   (eval $ac_try) 2>&5
21683   ac_status=$?
21684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21685   (exit $ac_status); }; } &&
21686          { ac_try='test -s conftest.$ac_objext'
21687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21688   (eval $ac_try) 2>&5
21689   ac_status=$?
21690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21691   (exit $ac_status); }; }; then
21692   ac_header_compiler=yes
21693 else
21694   echo "$as_me: failed program was:" >&5
21695 sed 's/^/| /' conftest.$ac_ext >&5
21696
21697 ac_header_compiler=no
21698 fi
21699 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21700 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21701 echo "${ECHO_T}$ac_header_compiler" >&6
21702
21703 # Is the header present?
21704 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21705 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21706 cat >conftest.$ac_ext <<_ACEOF
21707 /* confdefs.h.  */
21708 _ACEOF
21709 cat confdefs.h >>conftest.$ac_ext
21710 cat >>conftest.$ac_ext <<_ACEOF
21711 /* end confdefs.h.  */
21712 #include <libintl.h>
21713 _ACEOF
21714 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21715   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21716   ac_status=$?
21717   grep -v '^ *+' conftest.er1 >conftest.err
21718   rm -f conftest.er1
21719   cat conftest.err >&5
21720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21721   (exit $ac_status); } >/dev/null; then
21722   if test -s conftest.err; then
21723     ac_cpp_err=$ac_c_preproc_warn_flag
21724     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21725   else
21726     ac_cpp_err=
21727   fi
21728 else
21729   ac_cpp_err=yes
21730 fi
21731 if test -z "$ac_cpp_err"; then
21732   ac_header_preproc=yes
21733 else
21734   echo "$as_me: failed program was:" >&5
21735 sed 's/^/| /' conftest.$ac_ext >&5
21736
21737   ac_header_preproc=no
21738 fi
21739 rm -f conftest.err conftest.$ac_ext
21740 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21741 echo "${ECHO_T}$ac_header_preproc" >&6
21742
21743 # So?  What about this header?
21744 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21745   yes:no: )
21746     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21747 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21748     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
21749 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
21750     ac_header_preproc=yes
21751     ;;
21752   no:yes:* )
21753     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
21754 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
21755     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
21756 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
21757     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
21758 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
21759     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
21760 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21761     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
21762 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
21763     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
21764 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
21765     (
21766       cat <<\_ASBOX
21767 ## ---------------------------------------- ##
21768 ## Report this to pgsql-bugs@postgresql.org ##
21769 ## ---------------------------------------- ##
21770 _ASBOX
21771     ) |
21772       sed "s/^/$as_me: WARNING:     /" >&2
21773     ;;
21774 esac
21775 echo "$as_me:$LINENO: checking for libintl.h" >&5
21776 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21777 if test "${ac_cv_header_libintl_h+set}" = set; then
21778   echo $ECHO_N "(cached) $ECHO_C" >&6
21779 else
21780   ac_cv_header_libintl_h=$ac_header_preproc
21781 fi
21782 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21783 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21784
21785 fi
21786 if test $ac_cv_header_libintl_h = yes; then
21787   :
21788 else
21789   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
21790 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
21791    { (exit 1); exit 1; }; }
21792 fi
21793
21794
21795   for ac_prog in msgfmt
21796 do
21797   # Extract the first word of "$ac_prog", so it can be a program name with args.
21798 set dummy $ac_prog; ac_word=$2
21799 echo "$as_me:$LINENO: checking for $ac_word" >&5
21800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21801 if test "${ac_cv_prog_MSGFMT+set}" = set; then
21802   echo $ECHO_N "(cached) $ECHO_C" >&6
21803 else
21804   if test -n "$MSGFMT"; then
21805   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
21806 else
21807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21808 for as_dir in $PATH
21809 do
21810   IFS=$as_save_IFS
21811   test -z "$as_dir" && as_dir=.
21812   for ac_exec_ext in '' $ac_executable_extensions; do
21813   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21814     ac_cv_prog_MSGFMT="$ac_prog"
21815     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21816     break 2
21817   fi
21818 done
21819 done
21820
21821 fi
21822 fi
21823 MSGFMT=$ac_cv_prog_MSGFMT
21824 if test -n "$MSGFMT"; then
21825   echo "$as_me:$LINENO: result: $MSGFMT" >&5
21826 echo "${ECHO_T}$MSGFMT" >&6
21827 else
21828   echo "$as_me:$LINENO: result: no" >&5
21829 echo "${ECHO_T}no" >&6
21830 fi
21831
21832   test -n "$MSGFMT" && break
21833 done
21834
21835   if test -z "$MSGFMT"; then
21836     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
21837 echo "$as_me: error: msgfmt is required for NLS" >&2;}
21838    { (exit 1); exit 1; }; }
21839   fi
21840   for ac_prog in msgmerge
21841 do
21842   # Extract the first word of "$ac_prog", so it can be a program name with args.
21843 set dummy $ac_prog; ac_word=$2
21844 echo "$as_me:$LINENO: checking for $ac_word" >&5
21845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21846 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
21847   echo $ECHO_N "(cached) $ECHO_C" >&6
21848 else
21849   if test -n "$MSGMERGE"; then
21850   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
21851 else
21852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21853 for as_dir in $PATH
21854 do
21855   IFS=$as_save_IFS
21856   test -z "$as_dir" && as_dir=.
21857   for ac_exec_ext in '' $ac_executable_extensions; do
21858   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21859     ac_cv_prog_MSGMERGE="$ac_prog"
21860     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21861     break 2
21862   fi
21863 done
21864 done
21865
21866 fi
21867 fi
21868 MSGMERGE=$ac_cv_prog_MSGMERGE
21869 if test -n "$MSGMERGE"; then
21870   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
21871 echo "${ECHO_T}$MSGMERGE" >&6
21872 else
21873   echo "$as_me:$LINENO: result: no" >&5
21874 echo "${ECHO_T}no" >&6
21875 fi
21876
21877   test -n "$MSGMERGE" && break
21878 done
21879
21880   for ac_prog in xgettext
21881 do
21882   # Extract the first word of "$ac_prog", so it can be a program name with args.
21883 set dummy $ac_prog; ac_word=$2
21884 echo "$as_me:$LINENO: checking for $ac_word" >&5
21885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21886 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
21887   echo $ECHO_N "(cached) $ECHO_C" >&6
21888 else
21889   if test -n "$XGETTEXT"; then
21890   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
21891 else
21892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21893 for as_dir in $PATH
21894 do
21895   IFS=$as_save_IFS
21896   test -z "$as_dir" && as_dir=.
21897   for ac_exec_ext in '' $ac_executable_extensions; do
21898   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21899     ac_cv_prog_XGETTEXT="$ac_prog"
21900     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21901     break 2
21902   fi
21903 done
21904 done
21905
21906 fi
21907 fi
21908 XGETTEXT=$ac_cv_prog_XGETTEXT
21909 if test -n "$XGETTEXT"; then
21910   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
21911 echo "${ECHO_T}$XGETTEXT" >&6
21912 else
21913   echo "$as_me:$LINENO: result: no" >&5
21914 echo "${ECHO_T}no" >&6
21915 fi
21916
21917   test -n "$XGETTEXT" && break
21918 done
21919
21920
21921   # Note: share/locale is always the default, independent of $datadir
21922   localedir='${prefix}/share/locale'
21923   if test x"$prefix" = x"NONE"; then
21924     exp_localedir="$ac_default_prefix/share/locale"
21925   else
21926     exp_localedir="$prefix/share/locale"
21927   fi
21928
21929
21930
21931 cat >>confdefs.h <<_ACEOF
21932 #define LOCALEDIR "$exp_localedir"
21933 _ACEOF
21934
21935
21936 fi
21937
21938 # Check for Tcl configuration script tclConfig.sh
21939 if test "$with_tcl" = yes; then
21940     for ac_prog in tclsh tcl
21941 do
21942   # Extract the first word of "$ac_prog", so it can be a program name with args.
21943 set dummy $ac_prog; ac_word=$2
21944 echo "$as_me:$LINENO: checking for $ac_word" >&5
21945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21946 if test "${ac_cv_path_TCLSH+set}" = set; then
21947   echo $ECHO_N "(cached) $ECHO_C" >&6
21948 else
21949   case $TCLSH in
21950   [\\/]* | ?:[\\/]*)
21951   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
21952   ;;
21953   *)
21954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21955 for as_dir in $PATH
21956 do
21957   IFS=$as_save_IFS
21958   test -z "$as_dir" && as_dir=.
21959   for ac_exec_ext in '' $ac_executable_extensions; do
21960   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21961     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
21962     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21963     break 2
21964   fi
21965 done
21966 done
21967
21968   ;;
21969 esac
21970 fi
21971 TCLSH=$ac_cv_path_TCLSH
21972
21973 if test -n "$TCLSH"; then
21974   echo "$as_me:$LINENO: result: $TCLSH" >&5
21975 echo "${ECHO_T}$TCLSH" >&6
21976 else
21977   echo "$as_me:$LINENO: result: no" >&5
21978 echo "${ECHO_T}no" >&6
21979 fi
21980
21981   test -n "$TCLSH" && break
21982 done
21983
21984 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
21985 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
21986 # Let user override test
21987 if test -z "$TCL_CONFIG_SH"; then
21988     pgac_test_dirs="$with_tclconfig"
21989
21990     set X $pgac_test_dirs; shift
21991     if test $# -eq 0; then
21992         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
21993 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
21994    { (exit 1); exit 1; }; }
21995         set X `echo 'puts $auto_path' | $TCLSH`; shift
21996     fi
21997
21998     for pgac_dir do
21999         if test -r "$pgac_dir/tclConfig.sh"; then
22000             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22001             break
22002         fi
22003     done
22004 fi
22005
22006 if test -z "$TCL_CONFIG_SH"; then
22007     echo "$as_me:$LINENO: result: no" >&5
22008 echo "${ECHO_T}no" >&6
22009     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22010 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22011    { (exit 1); exit 1; }; }
22012 else
22013     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22014 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22015 fi
22016
22017
22018
22019     . "$TCL_CONFIG_SH"
22020 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22021 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22022 eval TCL_LIBS=\"$TCL_LIBS\"
22023 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22024 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22025
22026         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22027     ac_save_CPPFLAGS=$CPPFLAGS
22028     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22029     if test "${ac_cv_header_tcl_h+set}" = set; then
22030   echo "$as_me:$LINENO: checking for tcl.h" >&5
22031 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22032 if test "${ac_cv_header_tcl_h+set}" = set; then
22033   echo $ECHO_N "(cached) $ECHO_C" >&6
22034 fi
22035 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22036 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22037 else
22038   # Is the header compilable?
22039 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22040 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22041 cat >conftest.$ac_ext <<_ACEOF
22042 /* confdefs.h.  */
22043 _ACEOF
22044 cat confdefs.h >>conftest.$ac_ext
22045 cat >>conftest.$ac_ext <<_ACEOF
22046 /* end confdefs.h.  */
22047 $ac_includes_default
22048 #include <tcl.h>
22049 _ACEOF
22050 rm -f conftest.$ac_objext
22051 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22052   (eval $ac_compile) 2>conftest.er1
22053   ac_status=$?
22054   grep -v '^ *+' conftest.er1 >conftest.err
22055   rm -f conftest.er1
22056   cat conftest.err >&5
22057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22058   (exit $ac_status); } &&
22059          { ac_try='test -z "$ac_c_werror_flag"
22060                          || test ! -s conftest.err'
22061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22062   (eval $ac_try) 2>&5
22063   ac_status=$?
22064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22065   (exit $ac_status); }; } &&
22066          { ac_try='test -s conftest.$ac_objext'
22067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22068   (eval $ac_try) 2>&5
22069   ac_status=$?
22070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22071   (exit $ac_status); }; }; then
22072   ac_header_compiler=yes
22073 else
22074   echo "$as_me: failed program was:" >&5
22075 sed 's/^/| /' conftest.$ac_ext >&5
22076
22077 ac_header_compiler=no
22078 fi
22079 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22080 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22081 echo "${ECHO_T}$ac_header_compiler" >&6
22082
22083 # Is the header present?
22084 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22085 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22086 cat >conftest.$ac_ext <<_ACEOF
22087 /* confdefs.h.  */
22088 _ACEOF
22089 cat confdefs.h >>conftest.$ac_ext
22090 cat >>conftest.$ac_ext <<_ACEOF
22091 /* end confdefs.h.  */
22092 #include <tcl.h>
22093 _ACEOF
22094 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22095   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22096   ac_status=$?
22097   grep -v '^ *+' conftest.er1 >conftest.err
22098   rm -f conftest.er1
22099   cat conftest.err >&5
22100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22101   (exit $ac_status); } >/dev/null; then
22102   if test -s conftest.err; then
22103     ac_cpp_err=$ac_c_preproc_warn_flag
22104     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22105   else
22106     ac_cpp_err=
22107   fi
22108 else
22109   ac_cpp_err=yes
22110 fi
22111 if test -z "$ac_cpp_err"; then
22112   ac_header_preproc=yes
22113 else
22114   echo "$as_me: failed program was:" >&5
22115 sed 's/^/| /' conftest.$ac_ext >&5
22116
22117   ac_header_preproc=no
22118 fi
22119 rm -f conftest.err conftest.$ac_ext
22120 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22121 echo "${ECHO_T}$ac_header_preproc" >&6
22122
22123 # So?  What about this header?
22124 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22125   yes:no: )
22126     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22127 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22128     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22129 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22130     ac_header_preproc=yes
22131     ;;
22132   no:yes:* )
22133     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22134 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22135     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22136 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22137     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22138 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22139     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22140 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22141     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22142 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22143     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22144 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22145     (
22146       cat <<\_ASBOX
22147 ## ---------------------------------------- ##
22148 ## Report this to pgsql-bugs@postgresql.org ##
22149 ## ---------------------------------------- ##
22150 _ASBOX
22151     ) |
22152       sed "s/^/$as_me: WARNING:     /" >&2
22153     ;;
22154 esac
22155 echo "$as_me:$LINENO: checking for tcl.h" >&5
22156 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22157 if test "${ac_cv_header_tcl_h+set}" = set; then
22158   echo $ECHO_N "(cached) $ECHO_C" >&6
22159 else
22160   ac_cv_header_tcl_h=$ac_header_preproc
22161 fi
22162 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22163 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22164
22165 fi
22166 if test $ac_cv_header_tcl_h = yes; then
22167   :
22168 else
22169   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22170 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22171    { (exit 1); exit 1; }; }
22172 fi
22173
22174
22175     CPPFLAGS=$ac_save_CPPFLAGS
22176 fi
22177
22178 #
22179 # Check for DocBook and tools
22180 #
22181 for ac_prog in onsgmls nsgmls
22182 do
22183   # Extract the first word of "$ac_prog", so it can be a program name with args.
22184 set dummy $ac_prog; ac_word=$2
22185 echo "$as_me:$LINENO: checking for $ac_word" >&5
22186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22187 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22188   echo $ECHO_N "(cached) $ECHO_C" >&6
22189 else
22190   if test -n "$NSGMLS"; then
22191   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22192 else
22193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22194 for as_dir in $PATH
22195 do
22196   IFS=$as_save_IFS
22197   test -z "$as_dir" && as_dir=.
22198   for ac_exec_ext in '' $ac_executable_extensions; do
22199   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22200     ac_cv_prog_NSGMLS="$ac_prog"
22201     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22202     break 2
22203   fi
22204 done
22205 done
22206
22207 fi
22208 fi
22209 NSGMLS=$ac_cv_prog_NSGMLS
22210 if test -n "$NSGMLS"; then
22211   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22212 echo "${ECHO_T}$NSGMLS" >&6
22213 else
22214   echo "$as_me:$LINENO: result: no" >&5
22215 echo "${ECHO_T}no" >&6
22216 fi
22217
22218   test -n "$NSGMLS" && break
22219 done
22220
22221 for ac_prog in openjade jade
22222 do
22223   # Extract the first word of "$ac_prog", so it can be a program name with args.
22224 set dummy $ac_prog; ac_word=$2
22225 echo "$as_me:$LINENO: checking for $ac_word" >&5
22226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22227 if test "${ac_cv_prog_JADE+set}" = set; then
22228   echo $ECHO_N "(cached) $ECHO_C" >&6
22229 else
22230   if test -n "$JADE"; then
22231   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22232 else
22233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22234 for as_dir in $PATH
22235 do
22236   IFS=$as_save_IFS
22237   test -z "$as_dir" && as_dir=.
22238   for ac_exec_ext in '' $ac_executable_extensions; do
22239   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22240     ac_cv_prog_JADE="$ac_prog"
22241     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22242     break 2
22243   fi
22244 done
22245 done
22246
22247 fi
22248 fi
22249 JADE=$ac_cv_prog_JADE
22250 if test -n "$JADE"; then
22251   echo "$as_me:$LINENO: result: $JADE" >&5
22252 echo "${ECHO_T}$JADE" >&6
22253 else
22254   echo "$as_me:$LINENO: result: no" >&5
22255 echo "${ECHO_T}no" >&6
22256 fi
22257
22258   test -n "$JADE" && break
22259 done
22260
22261
22262 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22263 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22264 if test "${pgac_cv_check_docbook+set}" = set; then
22265   echo $ECHO_N "(cached) $ECHO_C" >&6
22266 else
22267   cat >conftest.sgml <<EOF
22268 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22269 <book>
22270  <title>test</title>
22271  <chapter>
22272   <title>random</title>
22273    <sect1>
22274     <title>testsect</title>
22275     <para>text</para>
22276   </sect1>
22277  </chapter>
22278 </book>
22279 EOF
22280
22281 pgac_cv_check_docbook=no
22282
22283 if test -n "$NSGMLS"; then
22284   $NSGMLS -s conftest.sgml 1>&5 2>&1
22285   if test $? -eq 0; then
22286     pgac_cv_check_docbook=yes
22287   fi
22288 fi
22289 rm -f conftest.sgml
22290 fi
22291 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22292 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22293
22294 have_docbook=$pgac_cv_check_docbook
22295
22296
22297 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22298 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22299 if test "${pgac_cv_path_stylesheets+set}" = set; then
22300   echo $ECHO_N "(cached) $ECHO_C" >&6
22301 else
22302   if test -n "$DOCBOOKSTYLE"; then
22303   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22304 else
22305   for pgac_prefix in /usr /usr/local /opt; do
22306     for pgac_infix in share lib; do
22307       for pgac_postfix in \
22308         sgml/stylesheets/nwalsh-modular \
22309         sgml/stylesheets/docbook \
22310                 sgml/docbook-dsssl \
22311         sgml/docbook/dsssl/modular \
22312         sgml/docbook/stylesheet/dsssl/modular \
22313         sgml/docbook/dsssl-stylesheets
22314       do
22315         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22316         if test -r "$pgac_candidate/html/docbook.dsl" \
22317            && test -r "$pgac_candidate/print/docbook.dsl"
22318         then
22319           pgac_cv_path_stylesheets=$pgac_candidate
22320           break 3
22321         fi
22322       done
22323     done
22324   done
22325 fi
22326 fi
22327
22328 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22329
22330 if test -n "$DOCBOOKSTYLE"; then
22331   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22332 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22333 else
22334   echo "$as_me:$LINENO: result: no" >&5
22335 echo "${ECHO_T}no" >&6
22336 fi
22337 if test -n "$DOCBOOKSTYLE"; then
22338   for ac_prog in collateindex.pl
22339 do
22340   # Extract the first word of "$ac_prog", so it can be a program name with args.
22341 set dummy $ac_prog; ac_word=$2
22342 echo "$as_me:$LINENO: checking for $ac_word" >&5
22343 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22344 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22345   echo $ECHO_N "(cached) $ECHO_C" >&6
22346 else
22347   case $COLLATEINDEX in
22348   [\\/]* | ?:[\\/]*)
22349   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22350   ;;
22351   *)
22352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22353 for as_dir in $DOCBOOKSTYLE/bin $PATH
22354 do
22355   IFS=$as_save_IFS
22356   test -z "$as_dir" && as_dir=.
22357   for ac_exec_ext in '' $ac_executable_extensions; do
22358   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22359     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22360     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22361     break 2
22362   fi
22363 done
22364 done
22365
22366   ;;
22367 esac
22368 fi
22369 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22370
22371 if test -n "$COLLATEINDEX"; then
22372   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22373 echo "${ECHO_T}$COLLATEINDEX" >&6
22374 else
22375   echo "$as_me:$LINENO: result: no" >&5
22376 echo "${ECHO_T}no" >&6
22377 fi
22378
22379   test -n "$COLLATEINDEX" && break
22380 done
22381
22382 else
22383   for ac_prog in collateindex.pl
22384 do
22385   # Extract the first word of "$ac_prog", so it can be a program name with args.
22386 set dummy $ac_prog; ac_word=$2
22387 echo "$as_me:$LINENO: checking for $ac_word" >&5
22388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22389 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22390   echo $ECHO_N "(cached) $ECHO_C" >&6
22391 else
22392   case $COLLATEINDEX in
22393   [\\/]* | ?:[\\/]*)
22394   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22395   ;;
22396   *)
22397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22398 for as_dir in $PATH
22399 do
22400   IFS=$as_save_IFS
22401   test -z "$as_dir" && as_dir=.
22402   for ac_exec_ext in '' $ac_executable_extensions; do
22403   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22404     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22405     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22406     break 2
22407   fi
22408 done
22409 done
22410
22411   ;;
22412 esac
22413 fi
22414 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22415
22416 if test -n "$COLLATEINDEX"; then
22417   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22418 echo "${ECHO_T}$COLLATEINDEX" >&6
22419 else
22420   echo "$as_me:$LINENO: result: no" >&5
22421 echo "${ECHO_T}no" >&6
22422 fi
22423
22424   test -n "$COLLATEINDEX" && break
22425 done
22426
22427 fi
22428 for ac_prog in sgmlspl
22429 do
22430   # Extract the first word of "$ac_prog", so it can be a program name with args.
22431 set dummy $ac_prog; ac_word=$2
22432 echo "$as_me:$LINENO: checking for $ac_word" >&5
22433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22434 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22435   echo $ECHO_N "(cached) $ECHO_C" >&6
22436 else
22437   if test -n "$SGMLSPL"; then
22438   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22439 else
22440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22441 for as_dir in $PATH
22442 do
22443   IFS=$as_save_IFS
22444   test -z "$as_dir" && as_dir=.
22445   for ac_exec_ext in '' $ac_executable_extensions; do
22446   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22447     ac_cv_prog_SGMLSPL="$ac_prog"
22448     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22449     break 2
22450   fi
22451 done
22452 done
22453
22454 fi
22455 fi
22456 SGMLSPL=$ac_cv_prog_SGMLSPL
22457 if test -n "$SGMLSPL"; then
22458   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22459 echo "${ECHO_T}$SGMLSPL" >&6
22460 else
22461   echo "$as_me:$LINENO: result: no" >&5
22462 echo "${ECHO_T}no" >&6
22463 fi
22464
22465   test -n "$SGMLSPL" && break
22466 done
22467
22468
22469 # Thread testing
22470
22471 # We have to run the thread test near the end so we have all our symbols
22472 # defined.  Cross compiling throws a warning.
22473 #
22474 if test "$enable_thread_safety_force" = yes; then
22475 if test x"$template" != x"win32"
22476 then
22477   { echo "$as_me:$LINENO: WARNING:
22478 *** Skipping thread test program.  --enable-thread-safety-force was used.
22479 *** Run the program in src/tools/thread on the your machine and add
22480 proper locking function calls to your applications to guarantee thread
22481 safety.
22482 " >&5
22483 echo "$as_me: WARNING:
22484 *** Skipping thread test program.  --enable-thread-safety-force was used.
22485 *** Run the program in src/tools/thread on the your machine and add
22486 proper locking function calls to your applications to guarantee thread
22487 safety.
22488 " >&2;}
22489 else
22490 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22491 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22492 fi
22493 elif test "$enable_thread_safety" = yes; then
22494 if test x"$template" != x"win32"
22495 then
22496 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22497 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22498
22499 _CFLAGS="$CFLAGS"
22500 _LIBS="$LIBS"
22501 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22502 LIBS="$LIBS $PTHREAD_LIBS"
22503 if test "$cross_compiling" = yes; then
22504   echo "$as_me:$LINENO: result: maybe" >&5
22505 echo "${ECHO_T}maybe" >&6
22506   { echo "$as_me:$LINENO: WARNING:
22507 *** Skipping thread test program because of cross-compile build.
22508 *** Run the program in src/tools/thread on the target machine.
22509 " >&5
22510 echo "$as_me: WARNING:
22511 *** Skipping thread test program because of cross-compile build.
22512 *** Run the program in src/tools/thread on the target machine.
22513 " >&2;}
22514 else
22515   cat >conftest.$ac_ext <<_ACEOF
22516 /* confdefs.h.  */
22517 _ACEOF
22518 cat confdefs.h >>conftest.$ac_ext
22519 cat >>conftest.$ac_ext <<_ACEOF
22520 /* end confdefs.h.  */
22521 #include "$srcdir/src/tools/thread/thread_test.c"
22522 _ACEOF
22523 rm -f conftest$ac_exeext
22524 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22525   (eval $ac_link) 2>&5
22526   ac_status=$?
22527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22528   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22530   (eval $ac_try) 2>&5
22531   ac_status=$?
22532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22533   (exit $ac_status); }; }; then
22534   echo "$as_me:$LINENO: result: yes" >&5
22535 echo "${ECHO_T}yes" >&6
22536 else
22537   echo "$as_me: program exited with status $ac_status" >&5
22538 echo "$as_me: failed program was:" >&5
22539 sed 's/^/| /' conftest.$ac_ext >&5
22540
22541 ( exit $ac_status )
22542 echo "$as_me:$LINENO: result: no" >&5
22543 echo "${ECHO_T}no" >&6
22544   { { echo "$as_me:$LINENO: error:
22545 *** Thread test program failed.  Your platform is not thread-safe.
22546 *** Check the file 'config.log'for the exact reason.
22547 ***
22548 *** You can use the configure option --enable-thread-safety-force
22549 *** to force threads to be enabled.  However, you must then run
22550 *** the program in src/tools/thread and add locking function calls
22551 *** to your applications to guarantee thread safety.
22552 " >&5
22553 echo "$as_me: error:
22554 *** Thread test program failed.  Your platform is not thread-safe.
22555 *** Check the file 'config.log'for the exact reason.
22556 ***
22557 *** You can use the configure option --enable-thread-safety-force
22558 *** to force threads to be enabled.  However, you must then run
22559 *** the program in src/tools/thread and add locking function calls
22560 *** to your applications to guarantee thread safety.
22561 " >&2;}
22562    { (exit 1); exit 1; }; }
22563 fi
22564 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22565 fi
22566 CFLAGS="$_CFLAGS"
22567 LIBS="$_LIBS"
22568 else
22569 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22570 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22571 fi
22572 fi
22573
22574 # prepare build tree if outside source tree
22575 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22576 # Note 2: /bin/pwd might be better than shell's built-in at getting
22577 #         a symlink-free name.
22578 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22579   vpath_build=no
22580 else
22581   vpath_build=yes
22582   if test "$no_create" != yes; then
22583     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22584     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22585     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22586       || { { echo "$as_me:$LINENO: error: failed" >&5
22587 echo "$as_me: error: failed" >&2;}
22588    { (exit 1); exit 1; }; }
22589     echo "$as_me:$LINENO: result: done" >&5
22590 echo "${ECHO_T}done" >&6
22591   fi
22592 fi
22593
22594
22595
22596                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22597
22598
22599                                                             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}"
22600
22601
22602 if test "$PORTNAME" = "win32"; then
22603           ac_config_commands="$ac_config_commands check_win32_symlinks"
22604
22605 fi
22606
22607           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22608
22609
22610 cat >confcache <<\_ACEOF
22611 # This file is a shell script that caches the results of configure
22612 # tests run on this system so they can be shared between configure
22613 # scripts and configure runs, see configure's option --config-cache.
22614 # It is not useful on other systems.  If it contains results you don't
22615 # want to keep, you may remove or edit it.
22616 #
22617 # config.status only pays attention to the cache file if you give it
22618 # the --recheck option to rerun configure.
22619 #
22620 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22621 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22622 # following values.
22623
22624 _ACEOF
22625
22626 # The following way of writing the cache mishandles newlines in values,
22627 # but we know of no workaround that is simple, portable, and efficient.
22628 # So, don't put newlines in cache variables' values.
22629 # Ultrix sh set writes to stderr and can't be redirected directly,
22630 # and sets the high bit in the cache file unless we assign to the vars.
22631 {
22632   (set) 2>&1 |
22633     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22634     *ac_space=\ *)
22635       # `set' does not quote correctly, so add quotes (double-quote
22636       # substitution turns \\\\ into \\, and sed turns \\ into \).
22637       sed -n \
22638         "s/'/'\\\\''/g;
22639           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22640       ;;
22641     *)
22642       # `set' quotes correctly as required by POSIX, so do not add quotes.
22643       sed -n \
22644         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22645       ;;
22646     esac;
22647 } |
22648   sed '
22649      t clear
22650      : clear
22651      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22652      t end
22653      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22654      : end' >>confcache
22655 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22656   if test -w $cache_file; then
22657     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22658     cat confcache >$cache_file
22659   else
22660     echo "not updating unwritable cache $cache_file"
22661   fi
22662 fi
22663 rm -f confcache
22664
22665 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22666 # Let make expand exec_prefix.
22667 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22668
22669 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22670 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22671 # trailing colons and then remove the whole line if VPATH becomes empty
22672 # (actually we leave an empty line to preserve line numbers).
22673 if test "x$srcdir" = x.; then
22674   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22675 s/:*\$(srcdir):*/:/;
22676 s/:*\${srcdir}:*/:/;
22677 s/:*@srcdir@:*/:/;
22678 s/^\([^=]*=[     ]*\):*/\1/;
22679 s/:*$//;
22680 s/^[^=]*=[       ]*$//;
22681 }'
22682 fi
22683
22684 DEFS=-DHAVE_CONFIG_H
22685
22686 ac_libobjs=
22687 ac_ltlibobjs=
22688 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22689   # 1. Remove the extension, and $U if already installed.
22690   ac_i=`echo "$ac_i" |
22691          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22692   # 2. Add them.
22693   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22694   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22695 done
22696 LIBOBJS=$ac_libobjs
22697
22698 LTLIBOBJS=$ac_ltlibobjs
22699
22700
22701
22702 : ${CONFIG_STATUS=./config.status}
22703 ac_clean_files_save=$ac_clean_files
22704 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22705 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22706 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22707 cat >$CONFIG_STATUS <<_ACEOF
22708 #! $SHELL
22709 # Generated by $as_me.
22710 # Run this file to recreate the current configuration.
22711 # Compiler output produced by configure, useful for debugging
22712 # configure, is in config.log if it exists.
22713
22714 debug=false
22715 ac_cs_recheck=false
22716 ac_cs_silent=false
22717 SHELL=\${CONFIG_SHELL-$SHELL}
22718 _ACEOF
22719
22720 cat >>$CONFIG_STATUS <<\_ACEOF
22721 ## --------------------- ##
22722 ## M4sh Initialization.  ##
22723 ## --------------------- ##
22724
22725 # Be Bourne compatible
22726 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22727   emulate sh
22728   NULLCMD=:
22729   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22730   # is contrary to our usage.  Disable this feature.
22731   alias -g '${1+"$@"}'='"$@"'
22732 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22733   set -o posix
22734 fi
22735 DUALCASE=1; export DUALCASE # for MKS sh
22736
22737 # Support unset when possible.
22738 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22739   as_unset=unset
22740 else
22741   as_unset=false
22742 fi
22743
22744
22745 # Work around bugs in pre-3.0 UWIN ksh.
22746 $as_unset ENV MAIL MAILPATH
22747 PS1='$ '
22748 PS2='> '
22749 PS4='+ '
22750
22751 # NLS nuisances.
22752 for as_var in \
22753   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22754   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22755   LC_TELEPHONE LC_TIME
22756 do
22757   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22758     eval $as_var=C; export $as_var
22759   else
22760     $as_unset $as_var
22761   fi
22762 done
22763
22764 # Required to use basename.
22765 if expr a : '\(a\)' >/dev/null 2>&1; then
22766   as_expr=expr
22767 else
22768   as_expr=false
22769 fi
22770
22771 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22772   as_basename=basename
22773 else
22774   as_basename=false
22775 fi
22776
22777
22778 # Name of the executable.
22779 as_me=`$as_basename "$0" ||
22780 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22781          X"$0" : 'X\(//\)$' \| \
22782          X"$0" : 'X\(/\)$' \| \
22783          .     : '\(.\)' 2>/dev/null ||
22784 echo X/"$0" |
22785     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22786           /^X\/\(\/\/\)$/{ s//\1/; q; }
22787           /^X\/\(\/\).*/{ s//\1/; q; }
22788           s/.*/./; q'`
22789
22790
22791 # PATH needs CR, and LINENO needs CR and PATH.
22792 # Avoid depending upon Character Ranges.
22793 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22794 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22795 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22796 as_cr_digits='0123456789'
22797 as_cr_alnum=$as_cr_Letters$as_cr_digits
22798
22799 # The user is always right.
22800 if test "${PATH_SEPARATOR+set}" != set; then
22801   echo "#! /bin/sh" >conf$$.sh
22802   echo  "exit 0"   >>conf$$.sh
22803   chmod +x conf$$.sh
22804   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22805     PATH_SEPARATOR=';'
22806   else
22807     PATH_SEPARATOR=:
22808   fi
22809   rm -f conf$$.sh
22810 fi
22811
22812
22813   as_lineno_1=$LINENO
22814   as_lineno_2=$LINENO
22815   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22816   test "x$as_lineno_1" != "x$as_lineno_2" &&
22817   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
22818   # Find who we are.  Look in the path if we contain no path at all
22819   # relative or not.
22820   case $0 in
22821     *[\\/]* ) as_myself=$0 ;;
22822     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22823 for as_dir in $PATH
22824 do
22825   IFS=$as_save_IFS
22826   test -z "$as_dir" && as_dir=.
22827   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22828 done
22829
22830        ;;
22831   esac
22832   # We did not find ourselves, most probably we were run as `sh COMMAND'
22833   # in which case we are not to be found in the path.
22834   if test "x$as_myself" = x; then
22835     as_myself=$0
22836   fi
22837   if test ! -f "$as_myself"; then
22838     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22839 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22840    { (exit 1); exit 1; }; }
22841   fi
22842   case $CONFIG_SHELL in
22843   '')
22844     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22845 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22846 do
22847   IFS=$as_save_IFS
22848   test -z "$as_dir" && as_dir=.
22849   for as_base in sh bash ksh sh5; do
22850          case $as_dir in
22851          /*)
22852            if ("$as_dir/$as_base" -c '
22853   as_lineno_1=$LINENO
22854   as_lineno_2=$LINENO
22855   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22856   test "x$as_lineno_1" != "x$as_lineno_2" &&
22857   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
22858              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22859              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22860              CONFIG_SHELL=$as_dir/$as_base
22861              export CONFIG_SHELL
22862              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22863            fi;;
22864          esac
22865        done
22866 done
22867 ;;
22868   esac
22869
22870   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22871   # uniformly replaced by the line number.  The first 'sed' inserts a
22872   # line-number line before each line; the second 'sed' does the real
22873   # work.  The second script uses 'N' to pair each line-number line
22874   # with the numbered line, and appends trailing '-' during
22875   # substitution so that $LINENO is not a special case at line end.
22876   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22877   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
22878   sed '=' <$as_myself |
22879     sed '
22880       N
22881       s,$,-,
22882       : loop
22883       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22884       t loop
22885       s,-$,,
22886       s,^['$as_cr_digits']*\n,,
22887     ' >$as_me.lineno &&
22888   chmod +x $as_me.lineno ||
22889     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22890 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22891    { (exit 1); exit 1; }; }
22892
22893   # Don't try to exec as it changes $[0], causing all sort of problems
22894   # (the dirname of $[0] is not the place where we might find the
22895   # original and so on.  Autoconf is especially sensible to this).
22896   . ./$as_me.lineno
22897   # Exit status is that of the last command.
22898   exit
22899 }
22900
22901
22902 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22903   *c*,-n*) ECHO_N= ECHO_C='
22904 ' ECHO_T='      ' ;;
22905   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22906   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
22907 esac
22908
22909 if expr a : '\(a\)' >/dev/null 2>&1; then
22910   as_expr=expr
22911 else
22912   as_expr=false
22913 fi
22914
22915 rm -f conf$$ conf$$.exe conf$$.file
22916 echo >conf$$.file
22917 if ln -s conf$$.file conf$$ 2>/dev/null; then
22918   # We could just check for DJGPP; but this test a) works b) is more generic
22919   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22920   if test -f conf$$.exe; then
22921     # Don't use ln at all; we don't have any links
22922     as_ln_s='cp -p'
22923   else
22924     as_ln_s='ln -s'
22925   fi
22926 elif ln conf$$.file conf$$ 2>/dev/null; then
22927   as_ln_s=ln
22928 else
22929   as_ln_s='cp -p'
22930 fi
22931 rm -f conf$$ conf$$.exe conf$$.file
22932
22933 if mkdir -p . 2>/dev/null; then
22934   as_mkdir_p=:
22935 else
22936   test -d ./-p && rmdir ./-p
22937   as_mkdir_p=false
22938 fi
22939
22940 as_executable_p="test -f"
22941
22942 # Sed expression to map a string onto a valid CPP name.
22943 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22944
22945 # Sed expression to map a string onto a valid variable name.
22946 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22947
22948
22949 # IFS
22950 # We need space, tab and new line, in precisely that order.
22951 as_nl='
22952 '
22953 IFS="   $as_nl"
22954
22955 # CDPATH.
22956 $as_unset CDPATH
22957
22958 exec 6>&1
22959
22960 # Open the log real soon, to keep \$[0] and so on meaningful, and to
22961 # report actual input values of CONFIG_FILES etc. instead of their
22962 # values after options handling.  Logging --version etc. is OK.
22963 exec 5>>config.log
22964 {
22965   echo
22966   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22967 ## Running $as_me. ##
22968 _ASBOX
22969 } >&5
22970 cat >&5 <<_CSEOF
22971
22972 This file was extended by PostgreSQL $as_me 8.2devel, which was
22973 generated by GNU Autoconf 2.59.  Invocation command line was
22974
22975   CONFIG_FILES    = $CONFIG_FILES
22976   CONFIG_HEADERS  = $CONFIG_HEADERS
22977   CONFIG_LINKS    = $CONFIG_LINKS
22978   CONFIG_COMMANDS = $CONFIG_COMMANDS
22979   $ $0 $@
22980
22981 _CSEOF
22982 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22983 echo >&5
22984 _ACEOF
22985
22986 # Files that config.status was made for.
22987 if test -n "$ac_config_files"; then
22988   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22989 fi
22990
22991 if test -n "$ac_config_headers"; then
22992   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22993 fi
22994
22995 if test -n "$ac_config_links"; then
22996   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22997 fi
22998
22999 if test -n "$ac_config_commands"; then
23000   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23001 fi
23002
23003 cat >>$CONFIG_STATUS <<\_ACEOF
23004
23005 ac_cs_usage="\
23006 \`$as_me' instantiates files from templates according to the
23007 current configuration.
23008
23009 Usage: $0 [OPTIONS] [FILE]...
23010
23011   -h, --help       print this help, then exit
23012   -V, --version    print version number, then exit
23013   -q, --quiet      do not print progress messages
23014   -d, --debug      don't remove temporary files
23015       --recheck    update $as_me by reconfiguring in the same conditions
23016   --file=FILE[:TEMPLATE]
23017                    instantiate the configuration file FILE
23018   --header=FILE[:TEMPLATE]
23019                    instantiate the configuration header FILE
23020
23021 Configuration files:
23022 $config_files
23023
23024 Configuration headers:
23025 $config_headers
23026
23027 Configuration links:
23028 $config_links
23029
23030 Configuration commands:
23031 $config_commands
23032
23033 Report bugs to <bug-autoconf@gnu.org>."
23034 _ACEOF
23035
23036 cat >>$CONFIG_STATUS <<_ACEOF
23037 ac_cs_version="\\
23038 PostgreSQL config.status 8.2devel
23039 configured by $0, generated by GNU Autoconf 2.59,
23040   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23041
23042 Copyright (C) 2003 Free Software Foundation, Inc.
23043 This config.status script is free software; the Free Software Foundation
23044 gives unlimited permission to copy, distribute and modify it."
23045 srcdir=$srcdir
23046 _ACEOF
23047
23048 cat >>$CONFIG_STATUS <<\_ACEOF
23049 # If no file are specified by the user, then we need to provide default
23050 # value.  By we need to know if files were specified by the user.
23051 ac_need_defaults=:
23052 while test $# != 0
23053 do
23054   case $1 in
23055   --*=*)
23056     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23057     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23058     ac_shift=:
23059     ;;
23060   -*)
23061     ac_option=$1
23062     ac_optarg=$2
23063     ac_shift=shift
23064     ;;
23065   *) # This is not an option, so the user has probably given explicit
23066      # arguments.
23067      ac_option=$1
23068      ac_need_defaults=false;;
23069   esac
23070
23071   case $ac_option in
23072   # Handling of the options.
23073 _ACEOF
23074 cat >>$CONFIG_STATUS <<\_ACEOF
23075   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23076     ac_cs_recheck=: ;;
23077   --version | --vers* | -V )
23078     echo "$ac_cs_version"; exit 0 ;;
23079   --he | --h)
23080     # Conflict between --help and --header
23081     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23082 Try \`$0 --help' for more information." >&5
23083 echo "$as_me: error: ambiguous option: $1
23084 Try \`$0 --help' for more information." >&2;}
23085    { (exit 1); exit 1; }; };;
23086   --help | --hel | -h )
23087     echo "$ac_cs_usage"; exit 0 ;;
23088   --debug | --d* | -d )
23089     debug=: ;;
23090   --file | --fil | --fi | --f )
23091     $ac_shift
23092     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23093     ac_need_defaults=false;;
23094   --header | --heade | --head | --hea )
23095     $ac_shift
23096     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23097     ac_need_defaults=false;;
23098   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23099   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23100     ac_cs_silent=: ;;
23101
23102   # This is an error.
23103   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23104 Try \`$0 --help' for more information." >&5
23105 echo "$as_me: error: unrecognized option: $1
23106 Try \`$0 --help' for more information." >&2;}
23107    { (exit 1); exit 1; }; } ;;
23108
23109   *) ac_config_targets="$ac_config_targets $1" ;;
23110
23111   esac
23112   shift
23113 done
23114
23115 ac_configure_extra_args=
23116
23117 if $ac_cs_silent; then
23118   exec 6>/dev/null
23119   ac_configure_extra_args="$ac_configure_extra_args --silent"
23120 fi
23121
23122 _ACEOF
23123 cat >>$CONFIG_STATUS <<_ACEOF
23124 if \$ac_cs_recheck; then
23125   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23126   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23127 fi
23128
23129 _ACEOF
23130
23131
23132
23133
23134
23135 cat >>$CONFIG_STATUS <<\_ACEOF
23136 for ac_config_target in $ac_config_targets
23137 do
23138   case "$ac_config_target" in
23139   # Handling of arguments.
23140   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23141   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23142   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23143   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23144   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23145   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23146   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23147   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23148   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23149   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23150   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23151   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23152 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23153    { (exit 1); exit 1; }; };;
23154   esac
23155 done
23156
23157 # If the user did not use the arguments to specify the items to instantiate,
23158 # then the envvar interface is used.  Set only those that are not.
23159 # We use the long form for the default assignment because of an extremely
23160 # bizarre bug on SunOS 4.1.3.
23161 if $ac_need_defaults; then
23162   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23163   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23164   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23165   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23166 fi
23167
23168 # Have a temporary directory for convenience.  Make it in the build tree
23169 # simply because there is no reason to put it here, and in addition,
23170 # creating and moving files from /tmp can sometimes cause problems.
23171 # Create a temporary directory, and hook for its removal unless debugging.
23172 $debug ||
23173 {
23174   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23175   trap '{ (exit 1); exit 1; }' 1 2 13 15
23176 }
23177
23178 # Create a (secure) tmp directory for tmp files.
23179
23180 {
23181   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23182   test -n "$tmp" && test -d "$tmp"
23183 }  ||
23184 {
23185   tmp=./confstat$$-$RANDOM
23186   (umask 077 && mkdir $tmp)
23187 } ||
23188 {
23189    echo "$me: cannot create a temporary directory in ." >&2
23190    { (exit 1); exit 1; }
23191 }
23192
23193 _ACEOF
23194
23195 cat >>$CONFIG_STATUS <<_ACEOF
23196
23197 #
23198 # CONFIG_FILES section.
23199 #
23200
23201 # No need to generate the scripts if there are no CONFIG_FILES.
23202 # This happens for instance when ./config.status config.h
23203 if test -n "\$CONFIG_FILES"; then
23204   # Protect against being on the right side of a sed subst in config.status.
23205   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23206    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23207 s,@SHELL@,$SHELL,;t t
23208 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23209 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23210 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23211 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23212 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23213 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23214 s,@exec_prefix@,$exec_prefix,;t t
23215 s,@prefix@,$prefix,;t t
23216 s,@program_transform_name@,$program_transform_name,;t t
23217 s,@bindir@,$bindir,;t t
23218 s,@sbindir@,$sbindir,;t t
23219 s,@libexecdir@,$libexecdir,;t t
23220 s,@datadir@,$datadir,;t t
23221 s,@sysconfdir@,$sysconfdir,;t t
23222 s,@sharedstatedir@,$sharedstatedir,;t t
23223 s,@localstatedir@,$localstatedir,;t t
23224 s,@libdir@,$libdir,;t t
23225 s,@includedir@,$includedir,;t t
23226 s,@oldincludedir@,$oldincludedir,;t t
23227 s,@infodir@,$infodir,;t t
23228 s,@mandir@,$mandir,;t t
23229 s,@build_alias@,$build_alias,;t t
23230 s,@host_alias@,$host_alias,;t t
23231 s,@target_alias@,$target_alias,;t t
23232 s,@DEFS@,$DEFS,;t t
23233 s,@ECHO_C@,$ECHO_C,;t t
23234 s,@ECHO_N@,$ECHO_N,;t t
23235 s,@ECHO_T@,$ECHO_T,;t t
23236 s,@LIBS@,$LIBS,;t t
23237 s,@configure_args@,$configure_args,;t t
23238 s,@build@,$build,;t t
23239 s,@build_cpu@,$build_cpu,;t t
23240 s,@build_vendor@,$build_vendor,;t t
23241 s,@build_os@,$build_os,;t t
23242 s,@host@,$host,;t t
23243 s,@host_cpu@,$host_cpu,;t t
23244 s,@host_vendor@,$host_vendor,;t t
23245 s,@host_os@,$host_os,;t t
23246 s,@PORTNAME@,$PORTNAME,;t t
23247 s,@docdir@,$docdir,;t t
23248 s,@enable_nls@,$enable_nls,;t t
23249 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23250 s,@default_port@,$default_port,;t t
23251 s,@enable_shared@,$enable_shared,;t t
23252 s,@enable_rpath@,$enable_rpath,;t t
23253 s,@enable_debug@,$enable_debug,;t t
23254 s,@CC@,$CC,;t t
23255 s,@CFLAGS@,$CFLAGS,;t t
23256 s,@LDFLAGS@,$LDFLAGS,;t t
23257 s,@CPPFLAGS@,$CPPFLAGS,;t t
23258 s,@ac_ct_CC@,$ac_ct_CC,;t t
23259 s,@EXEEXT@,$EXEEXT,;t t
23260 s,@OBJEXT@,$OBJEXT,;t t
23261 s,@CPP@,$CPP,;t t
23262 s,@GCC@,$GCC,;t t
23263 s,@TAS@,$TAS,;t t
23264 s,@autodepend@,$autodepend,;t t
23265 s,@INCLUDES@,$INCLUDES,;t t
23266 s,@enable_thread_safety@,$enable_thread_safety,;t t
23267 s,@with_tcl@,$with_tcl,;t t
23268 s,@with_perl@,$with_perl,;t t
23269 s,@with_python@,$with_python,;t t
23270 s,@with_krb5@,$with_krb5,;t t
23271 s,@krb_srvtab@,$krb_srvtab,;t t
23272 s,@with_pam@,$with_pam,;t t
23273 s,@with_bonjour@,$with_bonjour,;t t
23274 s,@with_openssl@,$with_openssl,;t t
23275 s,@with_zlib@,$with_zlib,;t t
23276 s,@EGREP@,$EGREP,;t t
23277 s,@ELF_SYS@,$ELF_SYS,;t t
23278 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23279 s,@AWK@,$AWK,;t t
23280 s,@FLEX@,$FLEX,;t t
23281 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23282 s,@LN_S@,$LN_S,;t t
23283 s,@LD@,$LD,;t t
23284 s,@with_gnu_ld@,$with_gnu_ld,;t t
23285 s,@ld_R_works@,$ld_R_works,;t t
23286 s,@RANLIB@,$RANLIB,;t t
23287 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23288 s,@LORDER@,$LORDER,;t t
23289 s,@TAR@,$TAR,;t t
23290 s,@STRIP@,$STRIP,;t t
23291 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23292 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23293 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23294 s,@YACC@,$YACC,;t t
23295 s,@YFLAGS@,$YFLAGS,;t t
23296 s,@PERL@,$PERL,;t t
23297 s,@perl_archlibexp@,$perl_archlibexp,;t t
23298 s,@perl_privlibexp@,$perl_privlibexp,;t t
23299 s,@perl_useshrplib@,$perl_useshrplib,;t t
23300 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23301 s,@PYTHON@,$PYTHON,;t t
23302 s,@python_version@,$python_version,;t t
23303 s,@python_configdir@,$python_configdir,;t t
23304 s,@python_includespec@,$python_includespec,;t t
23305 s,@python_libdir@,$python_libdir,;t t
23306 s,@python_libspec@,$python_libspec,;t t
23307 s,@python_additional_libs@,$python_additional_libs,;t t
23308 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23309 s,@LIBOBJS@,$LIBOBJS,;t t
23310 s,@acx_pthread_config@,$acx_pthread_config,;t t
23311 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23312 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23313 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23314 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23315 s,@MSGFMT@,$MSGFMT,;t t
23316 s,@MSGMERGE@,$MSGMERGE,;t t
23317 s,@XGETTEXT@,$XGETTEXT,;t t
23318 s,@localedir@,$localedir,;t t
23319 s,@TCLSH@,$TCLSH,;t t
23320 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23321 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23322 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23323 s,@TCL_LIBS@,$TCL_LIBS,;t t
23324 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23325 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23326 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23327 s,@NSGMLS@,$NSGMLS,;t t
23328 s,@JADE@,$JADE,;t t
23329 s,@have_docbook@,$have_docbook,;t t
23330 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23331 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23332 s,@SGMLSPL@,$SGMLSPL,;t t
23333 s,@vpath_build@,$vpath_build,;t t
23334 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23335 CEOF
23336
23337 _ACEOF
23338
23339   cat >>$CONFIG_STATUS <<\_ACEOF
23340   # Split the substitutions into bite-sized pieces for seds with
23341   # small command number limits, like on Digital OSF/1 and HP-UX.
23342   ac_max_sed_lines=48
23343   ac_sed_frag=1 # Number of current file.
23344   ac_beg=1 # First line for current file.
23345   ac_end=$ac_max_sed_lines # Line after last line for current file.
23346   ac_more_lines=:
23347   ac_sed_cmds=
23348   while $ac_more_lines; do
23349     if test $ac_beg -gt 1; then
23350       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23351     else
23352       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23353     fi
23354     if test ! -s $tmp/subs.frag; then
23355       ac_more_lines=false
23356     else
23357       # The purpose of the label and of the branching condition is to
23358       # speed up the sed processing (if there are no `@' at all, there
23359       # is no need to browse any of the substitutions).
23360       # These are the two extra sed commands mentioned above.
23361       (echo ':t
23362   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23363       if test -z "$ac_sed_cmds"; then
23364         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23365       else
23366         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23367       fi
23368       ac_sed_frag=`expr $ac_sed_frag + 1`
23369       ac_beg=$ac_end
23370       ac_end=`expr $ac_end + $ac_max_sed_lines`
23371     fi
23372   done
23373   if test -z "$ac_sed_cmds"; then
23374     ac_sed_cmds=cat
23375   fi
23376 fi # test -n "$CONFIG_FILES"
23377
23378 _ACEOF
23379 cat >>$CONFIG_STATUS <<\_ACEOF
23380 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23381   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23382   case $ac_file in
23383   - | *:- | *:-:* ) # input from stdin
23384         cat >$tmp/stdin
23385         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23386         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23387   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23388         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23389   * )   ac_file_in=$ac_file.in ;;
23390   esac
23391
23392   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23393   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23394 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23395          X"$ac_file" : 'X\(//\)[^/]' \| \
23396          X"$ac_file" : 'X\(//\)$' \| \
23397          X"$ac_file" : 'X\(/\)' \| \
23398          .     : '\(.\)' 2>/dev/null ||
23399 echo X"$ac_file" |
23400     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23401           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23402           /^X\(\/\/\)$/{ s//\1/; q; }
23403           /^X\(\/\).*/{ s//\1/; q; }
23404           s/.*/./; q'`
23405   { if $as_mkdir_p; then
23406     mkdir -p "$ac_dir"
23407   else
23408     as_dir="$ac_dir"
23409     as_dirs=
23410     while test ! -d "$as_dir"; do
23411       as_dirs="$as_dir $as_dirs"
23412       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23413 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23414          X"$as_dir" : 'X\(//\)[^/]' \| \
23415          X"$as_dir" : 'X\(//\)$' \| \
23416          X"$as_dir" : 'X\(/\)' \| \
23417          .     : '\(.\)' 2>/dev/null ||
23418 echo X"$as_dir" |
23419     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23420           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23421           /^X\(\/\/\)$/{ s//\1/; q; }
23422           /^X\(\/\).*/{ s//\1/; q; }
23423           s/.*/./; q'`
23424     done
23425     test ! -n "$as_dirs" || mkdir $as_dirs
23426   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23427 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23428    { (exit 1); exit 1; }; }; }
23429
23430   ac_builddir=.
23431
23432 if test "$ac_dir" != .; then
23433   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23434   # A "../" for each directory in $ac_dir_suffix.
23435   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23436 else
23437   ac_dir_suffix= ac_top_builddir=
23438 fi
23439
23440 case $srcdir in
23441   .)  # No --srcdir option.  We are building in place.
23442     ac_srcdir=.
23443     if test -z "$ac_top_builddir"; then
23444        ac_top_srcdir=.
23445     else
23446        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23447     fi ;;
23448   [\\/]* | ?:[\\/]* )  # Absolute path.
23449     ac_srcdir=$srcdir$ac_dir_suffix;
23450     ac_top_srcdir=$srcdir ;;
23451   *) # Relative path.
23452     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23453     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23454 esac
23455
23456 # Do not use `cd foo && pwd` to compute absolute paths, because
23457 # the directories may not exist.
23458 case `pwd` in
23459 .) ac_abs_builddir="$ac_dir";;
23460 *)
23461   case "$ac_dir" in
23462   .) ac_abs_builddir=`pwd`;;
23463   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23464   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23465   esac;;
23466 esac
23467 case $ac_abs_builddir in
23468 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23469 *)
23470   case ${ac_top_builddir}. in
23471   .) ac_abs_top_builddir=$ac_abs_builddir;;
23472   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23473   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23474   esac;;
23475 esac
23476 case $ac_abs_builddir in
23477 .) ac_abs_srcdir=$ac_srcdir;;
23478 *)
23479   case $ac_srcdir in
23480   .) ac_abs_srcdir=$ac_abs_builddir;;
23481   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23482   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23483   esac;;
23484 esac
23485 case $ac_abs_builddir in
23486 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23487 *)
23488   case $ac_top_srcdir in
23489   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23490   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23491   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23492   esac;;
23493 esac
23494
23495
23496
23497   if test x"$ac_file" != x-; then
23498     { echo "$as_me:$LINENO: creating $ac_file" >&5
23499 echo "$as_me: creating $ac_file" >&6;}
23500     rm -f "$ac_file"
23501   fi
23502   # Let's still pretend it is `configure' which instantiates (i.e., don't
23503   # use $as_me), people would be surprised to read:
23504   #    /* config.h.  Generated by config.status.  */
23505   if test x"$ac_file" = x-; then
23506     configure_input=
23507   else
23508     configure_input="$ac_file.  "
23509   fi
23510   configure_input=$configure_input"Generated from `echo $ac_file_in |
23511                                      sed 's,.*/,,'` by configure."
23512
23513   # First look for the input files in the build tree, otherwise in the
23514   # src tree.
23515   ac_file_inputs=`IFS=:
23516     for f in $ac_file_in; do
23517       case $f in
23518       -) echo $tmp/stdin ;;
23519       [\\/$]*)
23520          # Absolute (can't be DOS-style, as IFS=:)
23521          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23522 echo "$as_me: error: cannot find input file: $f" >&2;}
23523    { (exit 1); exit 1; }; }
23524          echo "$f";;
23525       *) # Relative
23526          if test -f "$f"; then
23527            # Build tree
23528            echo "$f"
23529          elif test -f "$srcdir/$f"; then
23530            # Source tree
23531            echo "$srcdir/$f"
23532          else
23533            # /dev/null tree
23534            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23535 echo "$as_me: error: cannot find input file: $f" >&2;}
23536    { (exit 1); exit 1; }; }
23537          fi;;
23538       esac
23539     done` || { (exit 1); exit 1; }
23540 _ACEOF
23541 cat >>$CONFIG_STATUS <<_ACEOF
23542   sed "$ac_vpsub
23543 $extrasub
23544 _ACEOF
23545 cat >>$CONFIG_STATUS <<\_ACEOF
23546 :t
23547 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23548 s,@configure_input@,$configure_input,;t t
23549 s,@srcdir@,$ac_srcdir,;t t
23550 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23551 s,@top_srcdir@,$ac_top_srcdir,;t t
23552 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23553 s,@builddir@,$ac_builddir,;t t
23554 s,@abs_builddir@,$ac_abs_builddir,;t t
23555 s,@top_builddir@,$ac_top_builddir,;t t
23556 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23557 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23558   rm -f $tmp/stdin
23559   if test x"$ac_file" != x-; then
23560     mv $tmp/out $ac_file
23561   else
23562     cat $tmp/out
23563     rm -f $tmp/out
23564   fi
23565
23566 done
23567 _ACEOF
23568 cat >>$CONFIG_STATUS <<\_ACEOF
23569
23570 #
23571 # CONFIG_HEADER section.
23572 #
23573
23574 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23575 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23576 #
23577 # ac_d sets the value in "#define NAME VALUE" lines.
23578 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23579 ac_dB='[         ].*$,\1#\2'
23580 ac_dC=' '
23581 ac_dD=',;t'
23582 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23583 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23584 ac_uB='$,\1#\2define\3'
23585 ac_uC=' '
23586 ac_uD=',;t'
23587
23588 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23589   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23590   case $ac_file in
23591   - | *:- | *:-:* ) # input from stdin
23592         cat >$tmp/stdin
23593         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23594         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23595   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23596         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23597   * )   ac_file_in=$ac_file.in ;;
23598   esac
23599
23600   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23601 echo "$as_me: creating $ac_file" >&6;}
23602
23603   # First look for the input files in the build tree, otherwise in the
23604   # src tree.
23605   ac_file_inputs=`IFS=:
23606     for f in $ac_file_in; do
23607       case $f in
23608       -) echo $tmp/stdin ;;
23609       [\\/$]*)
23610          # Absolute (can't be DOS-style, as IFS=:)
23611          test -f "$f" || { { 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          # Do quote $f, to prevent DOS paths from being IFS'd.
23615          echo "$f";;
23616       *) # Relative
23617          if test -f "$f"; then
23618            # Build tree
23619            echo "$f"
23620          elif test -f "$srcdir/$f"; then
23621            # Source tree
23622            echo "$srcdir/$f"
23623          else
23624            # /dev/null tree
23625            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23626 echo "$as_me: error: cannot find input file: $f" >&2;}
23627    { (exit 1); exit 1; }; }
23628          fi;;
23629       esac
23630     done` || { (exit 1); exit 1; }
23631   # Remove the trailing spaces.
23632   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23633
23634 _ACEOF
23635
23636 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23637 # `conftest.undefs', that substitutes the proper values into
23638 # config.h.in to produce config.h.  The first handles `#define'
23639 # templates, and the second `#undef' templates.
23640 # And first: Protect against being on the right side of a sed subst in
23641 # config.status.  Protect against being in an unquoted here document
23642 # in config.status.
23643 rm -f conftest.defines conftest.undefs
23644 # Using a here document instead of a string reduces the quoting nightmare.
23645 # Putting comments in sed scripts is not portable.
23646 #
23647 # `end' is used to avoid that the second main sed command (meant for
23648 # 0-ary CPP macros) applies to n-ary macro definitions.
23649 # See the Autoconf documentation for `clear'.
23650 cat >confdef2sed.sed <<\_ACEOF
23651 s/[\\&,]/\\&/g
23652 s,[\\$`],\\&,g
23653 t clear
23654 : clear
23655 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23656 t end
23657 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23658 : end
23659 _ACEOF
23660 # If some macros were called several times there might be several times
23661 # the same #defines, which is useless.  Nevertheless, we may not want to
23662 # sort them, since we want the *last* AC-DEFINE to be honored.
23663 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23664 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23665 rm -f confdef2sed.sed
23666
23667 # This sed command replaces #undef with comments.  This is necessary, for
23668 # example, in the case of _POSIX_SOURCE, which is predefined and required
23669 # on some systems where configure will not decide to define it.
23670 cat >>conftest.undefs <<\_ACEOF
23671 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23672 _ACEOF
23673
23674 # Break up conftest.defines because some shells have a limit on the size
23675 # of here documents, and old seds have small limits too (100 cmds).
23676 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23677 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23678 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23679 echo '  :' >>$CONFIG_STATUS
23680 rm -f conftest.tail
23681 while grep . conftest.defines >/dev/null
23682 do
23683   # Write a limited-size here document to $tmp/defines.sed.
23684   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23685   # Speed up: don't consider the non `#define' lines.
23686   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23687   # Work around the forget-to-reset-the-flag bug.
23688   echo 't clr' >>$CONFIG_STATUS
23689   echo ': clr' >>$CONFIG_STATUS
23690   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23691   echo 'CEOF
23692   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23693   rm -f $tmp/in
23694   mv $tmp/out $tmp/in
23695 ' >>$CONFIG_STATUS
23696   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23697   rm -f conftest.defines
23698   mv conftest.tail conftest.defines
23699 done
23700 rm -f conftest.defines
23701 echo '  fi # grep' >>$CONFIG_STATUS
23702 echo >>$CONFIG_STATUS
23703
23704 # Break up conftest.undefs because some shells have a limit on the size
23705 # of here documents, and old seds have small limits too (100 cmds).
23706 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23707 rm -f conftest.tail
23708 while grep . conftest.undefs >/dev/null
23709 do
23710   # Write a limited-size here document to $tmp/undefs.sed.
23711   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23712   # Speed up: don't consider the non `#undef'
23713   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23714   # Work around the forget-to-reset-the-flag bug.
23715   echo 't clr' >>$CONFIG_STATUS
23716   echo ': clr' >>$CONFIG_STATUS
23717   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23718   echo 'CEOF
23719   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23720   rm -f $tmp/in
23721   mv $tmp/out $tmp/in
23722 ' >>$CONFIG_STATUS
23723   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23724   rm -f conftest.undefs
23725   mv conftest.tail conftest.undefs
23726 done
23727 rm -f conftest.undefs
23728
23729 cat >>$CONFIG_STATUS <<\_ACEOF
23730   # Let's still pretend it is `configure' which instantiates (i.e., don't
23731   # use $as_me), people would be surprised to read:
23732   #    /* config.h.  Generated by config.status.  */
23733   if test x"$ac_file" = x-; then
23734     echo "/* Generated by configure.  */" >$tmp/config.h
23735   else
23736     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
23737   fi
23738   cat $tmp/in >>$tmp/config.h
23739   rm -f $tmp/in
23740   if test x"$ac_file" != x-; then
23741     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
23742       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23743 echo "$as_me: $ac_file is unchanged" >&6;}
23744     else
23745       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23746 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23747          X"$ac_file" : 'X\(//\)[^/]' \| \
23748          X"$ac_file" : 'X\(//\)$' \| \
23749          X"$ac_file" : 'X\(/\)' \| \
23750          .     : '\(.\)' 2>/dev/null ||
23751 echo X"$ac_file" |
23752     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23753           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23754           /^X\(\/\/\)$/{ s//\1/; q; }
23755           /^X\(\/\).*/{ s//\1/; q; }
23756           s/.*/./; q'`
23757       { if $as_mkdir_p; then
23758     mkdir -p "$ac_dir"
23759   else
23760     as_dir="$ac_dir"
23761     as_dirs=
23762     while test ! -d "$as_dir"; do
23763       as_dirs="$as_dir $as_dirs"
23764       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23765 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23766          X"$as_dir" : 'X\(//\)[^/]' \| \
23767          X"$as_dir" : 'X\(//\)$' \| \
23768          X"$as_dir" : 'X\(/\)' \| \
23769          .     : '\(.\)' 2>/dev/null ||
23770 echo X"$as_dir" |
23771     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23772           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23773           /^X\(\/\/\)$/{ s//\1/; q; }
23774           /^X\(\/\).*/{ s//\1/; q; }
23775           s/.*/./; q'`
23776     done
23777     test ! -n "$as_dirs" || mkdir $as_dirs
23778   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23779 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23780    { (exit 1); exit 1; }; }; }
23781
23782       rm -f $ac_file
23783       mv $tmp/config.h $ac_file
23784     fi
23785   else
23786     cat $tmp/config.h
23787     rm -f $tmp/config.h
23788   fi
23789   # Run the commands associated with the file.
23790   case $ac_file in
23791     src/include/pg_config.h )
23792 # Update timestamp for pg_config.h (see Makefile.global)
23793 echo >src/include/stamp-h
23794  ;;
23795   esac
23796 done
23797 _ACEOF
23798 cat >>$CONFIG_STATUS <<\_ACEOF
23799
23800 #
23801 # CONFIG_LINKS section.
23802 #
23803
23804 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23805   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23806   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23807
23808   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23809 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
23810
23811   if test ! -r $srcdir/$ac_source; then
23812     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23813 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23814    { (exit 1); exit 1; }; }
23815   fi
23816   rm -f $ac_dest
23817
23818   # Make relative symlinks.
23819   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
23820 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23821          X"$ac_dest" : 'X\(//\)[^/]' \| \
23822          X"$ac_dest" : 'X\(//\)$' \| \
23823          X"$ac_dest" : 'X\(/\)' \| \
23824          .     : '\(.\)' 2>/dev/null ||
23825 echo X"$ac_dest" |
23826     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23827           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23828           /^X\(\/\/\)$/{ s//\1/; q; }
23829           /^X\(\/\).*/{ s//\1/; q; }
23830           s/.*/./; q'`
23831   { if $as_mkdir_p; then
23832     mkdir -p "$ac_dest_dir"
23833   else
23834     as_dir="$ac_dest_dir"
23835     as_dirs=
23836     while test ! -d "$as_dir"; do
23837       as_dirs="$as_dir $as_dirs"
23838       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23839 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23840          X"$as_dir" : 'X\(//\)[^/]' \| \
23841          X"$as_dir" : 'X\(//\)$' \| \
23842          X"$as_dir" : 'X\(/\)' \| \
23843          .     : '\(.\)' 2>/dev/null ||
23844 echo X"$as_dir" |
23845     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23846           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23847           /^X\(\/\/\)$/{ s//\1/; q; }
23848           /^X\(\/\).*/{ s//\1/; q; }
23849           s/.*/./; q'`
23850     done
23851     test ! -n "$as_dirs" || mkdir $as_dirs
23852   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
23853 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
23854    { (exit 1); exit 1; }; }; }
23855
23856   ac_builddir=.
23857
23858 if test "$ac_dest_dir" != .; then
23859   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
23860   # A "../" for each directory in $ac_dir_suffix.
23861   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23862 else
23863   ac_dir_suffix= ac_top_builddir=
23864 fi
23865
23866 case $srcdir in
23867   .)  # No --srcdir option.  We are building in place.
23868     ac_srcdir=.
23869     if test -z "$ac_top_builddir"; then
23870        ac_top_srcdir=.
23871     else
23872        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23873     fi ;;
23874   [\\/]* | ?:[\\/]* )  # Absolute path.
23875     ac_srcdir=$srcdir$ac_dir_suffix;
23876     ac_top_srcdir=$srcdir ;;
23877   *) # Relative path.
23878     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23879     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23880 esac
23881
23882 # Do not use `cd foo && pwd` to compute absolute paths, because
23883 # the directories may not exist.
23884 case `pwd` in
23885 .) ac_abs_builddir="$ac_dest_dir";;
23886 *)
23887   case "$ac_dest_dir" in
23888   .) ac_abs_builddir=`pwd`;;
23889   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
23890   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
23891   esac;;
23892 esac
23893 case $ac_abs_builddir in
23894 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23895 *)
23896   case ${ac_top_builddir}. in
23897   .) ac_abs_top_builddir=$ac_abs_builddir;;
23898   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23899   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23900   esac;;
23901 esac
23902 case $ac_abs_builddir in
23903 .) ac_abs_srcdir=$ac_srcdir;;
23904 *)
23905   case $ac_srcdir in
23906   .) ac_abs_srcdir=$ac_abs_builddir;;
23907   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23908   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23909   esac;;
23910 esac
23911 case $ac_abs_builddir in
23912 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23913 *)
23914   case $ac_top_srcdir in
23915   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23916   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23917   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23918   esac;;
23919 esac
23920
23921
23922   case $srcdir in
23923   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
23924       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
23925   esac
23926
23927   # Try a symlink, then a hard link, then a copy.
23928   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
23929     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
23930     cp -p $srcdir/$ac_source $ac_dest ||
23931     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
23932 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
23933    { (exit 1); exit 1; }; }
23934 done
23935 _ACEOF
23936 cat >>$CONFIG_STATUS <<\_ACEOF
23937
23938 #
23939 # CONFIG_COMMANDS section.
23940 #
23941 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23942   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23943   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23944   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23945 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23946          X"$ac_dest" : 'X\(//\)[^/]' \| \
23947          X"$ac_dest" : 'X\(//\)$' \| \
23948          X"$ac_dest" : 'X\(/\)' \| \
23949          .     : '\(.\)' 2>/dev/null ||
23950 echo X"$ac_dest" |
23951     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23952           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23953           /^X\(\/\/\)$/{ s//\1/; q; }
23954           /^X\(\/\).*/{ s//\1/; q; }
23955           s/.*/./; q'`
23956   { if $as_mkdir_p; then
23957     mkdir -p "$ac_dir"
23958   else
23959     as_dir="$ac_dir"
23960     as_dirs=
23961     while test ! -d "$as_dir"; do
23962       as_dirs="$as_dir $as_dirs"
23963       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23964 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23965          X"$as_dir" : 'X\(//\)[^/]' \| \
23966          X"$as_dir" : 'X\(//\)$' \| \
23967          X"$as_dir" : 'X\(/\)' \| \
23968          .     : '\(.\)' 2>/dev/null ||
23969 echo X"$as_dir" |
23970     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23971           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23972           /^X\(\/\/\)$/{ s//\1/; q; }
23973           /^X\(\/\).*/{ s//\1/; q; }
23974           s/.*/./; q'`
23975     done
23976     test ! -n "$as_dirs" || mkdir $as_dirs
23977   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23978 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23979    { (exit 1); exit 1; }; }; }
23980
23981   ac_builddir=.
23982
23983 if test "$ac_dir" != .; then
23984   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23985   # A "../" for each directory in $ac_dir_suffix.
23986   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23987 else
23988   ac_dir_suffix= ac_top_builddir=
23989 fi
23990
23991 case $srcdir in
23992   .)  # No --srcdir option.  We are building in place.
23993     ac_srcdir=.
23994     if test -z "$ac_top_builddir"; then
23995        ac_top_srcdir=.
23996     else
23997        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23998     fi ;;
23999   [\\/]* | ?:[\\/]* )  # Absolute path.
24000     ac_srcdir=$srcdir$ac_dir_suffix;
24001     ac_top_srcdir=$srcdir ;;
24002   *) # Relative path.
24003     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24004     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24005 esac
24006
24007 # Do not use `cd foo && pwd` to compute absolute paths, because
24008 # the directories may not exist.
24009 case `pwd` in
24010 .) ac_abs_builddir="$ac_dir";;
24011 *)
24012   case "$ac_dir" in
24013   .) ac_abs_builddir=`pwd`;;
24014   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24015   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24016   esac;;
24017 esac
24018 case $ac_abs_builddir in
24019 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24020 *)
24021   case ${ac_top_builddir}. in
24022   .) ac_abs_top_builddir=$ac_abs_builddir;;
24023   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24024   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24025   esac;;
24026 esac
24027 case $ac_abs_builddir in
24028 .) ac_abs_srcdir=$ac_srcdir;;
24029 *)
24030   case $ac_srcdir in
24031   .) ac_abs_srcdir=$ac_abs_builddir;;
24032   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24033   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24034   esac;;
24035 esac
24036 case $ac_abs_builddir in
24037 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24038 *)
24039   case $ac_top_srcdir in
24040   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24041   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24042   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24043   esac;;
24044 esac
24045
24046
24047   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24048 echo "$as_me: executing $ac_dest commands" >&6;}
24049   case $ac_dest in
24050     check_win32_symlinks )
24051 # Links sometimes fail undetected on Mingw -
24052 # so here we detect it and warn the user
24053 for FILE in $CONFIG_LINKS
24054  do
24055         # test -e works for symlinks in the MinGW console
24056         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24057 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24058  done
24059  ;;
24060   esac
24061 done
24062 _ACEOF
24063
24064 cat >>$CONFIG_STATUS <<\_ACEOF
24065
24066 { (exit 0); exit 0; }
24067 _ACEOF
24068 chmod +x $CONFIG_STATUS
24069 ac_clean_files=$ac_clean_files_save
24070
24071
24072 # configure is writing to config.log, and then calls config.status.
24073 # config.status does its own redirection, appending to config.log.
24074 # Unfortunately, on DOS this fails, as config.log is still kept open
24075 # by configure, so config.status won't be able to write to it; its
24076 # output is simply discarded.  So we exec the FD to /dev/null,
24077 # effectively closing config.log, so it can be properly (re)opened and
24078 # appended to by config.status.  When coming back to configure, we
24079 # need to make the FD available again.
24080 if test "$no_create" != yes; then
24081   ac_cs_success=:
24082   ac_config_status_args=
24083   test "$silent" = yes &&
24084     ac_config_status_args="$ac_config_status_args --quiet"
24085   exec 5>/dev/null
24086   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24087   exec 5>>config.log
24088   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24089   # would make configure fail if this is the last instruction.
24090   $ac_cs_success || { (exit 1); exit 1; }
24091 fi
24092
24093