]> granicus.if.org Git - postgresql/blob - configure
Add text:
[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.1beta1.
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.1beta1'
275 PACKAGE_STRING='PostgreSQL 8.1beta1'
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.1beta1 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.1beta1:";;
856    esac
857   cat <<\_ACEOF
858
859 Optional Features:
860   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
861   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
862   --enable-integer-datetimes  enable 64-bit integer date/time support
863   --enable-nls[=LANGUAGES]  enable Native Language Support
864   --disable-shared        do not build shared libraries
865   --disable-rpath         do not embed shared library search path in executables
866   --disable-spinlocks     do not use spinlocks
867   --enable-debug          build with debugging symbols (-g)
868   --enable-depend         turn on automatic dependency tracking
869   --enable-cassert        enable assertion checks (for debugging)
870   --enable-thread-safety  make client libraries thread-safe
871   --enable-thread-safety-force  force thread-safety in spite of thread test failure
872   --disable-largefile     omit support for large files
873
874 Optional Packages:
875   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
876   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
877
878   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
879   --without-docdir        do not install the documentation
880   --with-includes=DIRS    look for additional header files in DIRS
881   --with-libraries=DIRS   look for additional libraries in DIRS
882   --with-libs=DIRS        alternative spelling of --with-libraries
883   --with-pgport=PORTNUM   change default port number 5432
884   --with-tcl              build Tcl modules (PL/Tcl)
885   --with-tclconfig=DIR    tclConfig.sh is in DIR
886   --with-perl             build Perl modules (PL/Perl)
887   --with-python           build Python modules (PL/Python)
888   --with-krb5             build with Kerberos 5 support
889   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
890   --with-pam              build with PAM support
891   --with-bonjour          build with Bonjour support
892   --with-openssl          build with OpenSSL support
893   --without-readline      do not use Readline
894   --without-zlib          do not use Zlib
895   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
896
897 Some influential environment variables:
898   CC          C compiler command
899   CFLAGS      C compiler flags
900   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
901               nonstandard directory <lib dir>
902   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
903               headers in a nonstandard directory <include dir>
904   CPP         C preprocessor
905   LDFLAGS_SL
906   DOCBOOKSTYLE
907               location of DocBook stylesheets
908
909 Use these variables to override the choices made by `configure' or to help
910 it to find libraries and programs with nonstandard names/locations.
911
912 Report bugs to <pgsql-bugs@postgresql.org>.
913 _ACEOF
914 fi
915
916 if test "$ac_init_help" = "recursive"; then
917   # If there are subdirs, report their specific --help.
918   ac_popdir=`pwd`
919   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
920     test -d $ac_dir || continue
921     ac_builddir=.
922
923 if test "$ac_dir" != .; then
924   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
925   # A "../" for each directory in $ac_dir_suffix.
926   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
927 else
928   ac_dir_suffix= ac_top_builddir=
929 fi
930
931 case $srcdir in
932   .)  # No --srcdir option.  We are building in place.
933     ac_srcdir=.
934     if test -z "$ac_top_builddir"; then
935        ac_top_srcdir=.
936     else
937        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
938     fi ;;
939   [\\/]* | ?:[\\/]* )  # Absolute path.
940     ac_srcdir=$srcdir$ac_dir_suffix;
941     ac_top_srcdir=$srcdir ;;
942   *) # Relative path.
943     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
944     ac_top_srcdir=$ac_top_builddir$srcdir ;;
945 esac
946
947 # Do not use `cd foo && pwd` to compute absolute paths, because
948 # the directories may not exist.
949 case `pwd` in
950 .) ac_abs_builddir="$ac_dir";;
951 *)
952   case "$ac_dir" in
953   .) ac_abs_builddir=`pwd`;;
954   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
955   *) ac_abs_builddir=`pwd`/"$ac_dir";;
956   esac;;
957 esac
958 case $ac_abs_builddir in
959 .) ac_abs_top_builddir=${ac_top_builddir}.;;
960 *)
961   case ${ac_top_builddir}. in
962   .) ac_abs_top_builddir=$ac_abs_builddir;;
963   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
964   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
965   esac;;
966 esac
967 case $ac_abs_builddir in
968 .) ac_abs_srcdir=$ac_srcdir;;
969 *)
970   case $ac_srcdir in
971   .) ac_abs_srcdir=$ac_abs_builddir;;
972   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
973   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
974   esac;;
975 esac
976 case $ac_abs_builddir in
977 .) ac_abs_top_srcdir=$ac_top_srcdir;;
978 *)
979   case $ac_top_srcdir in
980   .) ac_abs_top_srcdir=$ac_abs_builddir;;
981   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
982   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
983   esac;;
984 esac
985
986     cd $ac_dir
987     # Check for guested configure; otherwise get Cygnus style configure.
988     if test -f $ac_srcdir/configure.gnu; then
989       echo
990       $SHELL $ac_srcdir/configure.gnu  --help=recursive
991     elif test -f $ac_srcdir/configure; then
992       echo
993       $SHELL $ac_srcdir/configure  --help=recursive
994     elif test -f $ac_srcdir/configure.ac ||
995            test -f $ac_srcdir/configure.in; then
996       echo
997       $ac_configure --help
998     else
999       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1000     fi
1001     cd $ac_popdir
1002   done
1003 fi
1004
1005 test -n "$ac_init_help" && exit 0
1006 if $ac_init_version; then
1007   cat <<\_ACEOF
1008 PostgreSQL configure 8.1beta1
1009 generated by GNU Autoconf 2.59
1010
1011 Copyright (C) 2003 Free Software Foundation, Inc.
1012 This configure script is free software; the Free Software Foundation
1013 gives unlimited permission to copy, distribute and modify it.
1014
1015 Copyright (c) 1996-2005, PostgreSQL Global Development Group
1016 _ACEOF
1017   exit 0
1018 fi
1019 exec 5>config.log
1020 cat >&5 <<_ACEOF
1021 This file contains any messages produced by compilers while
1022 running configure, to aid debugging if configure makes a mistake.
1023
1024 It was created by PostgreSQL $as_me 8.1beta1, which was
1025 generated by GNU Autoconf 2.59.  Invocation command line was
1026
1027   $ $0 $@
1028
1029 _ACEOF
1030 {
1031 cat <<_ASUNAME
1032 ## --------- ##
1033 ## Platform. ##
1034 ## --------- ##
1035
1036 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1037 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1038 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1039 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1040 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1041
1042 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1043 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1044
1045 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1046 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1047 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1048 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1049 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1050 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1051 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1052
1053 _ASUNAME
1054
1055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1056 for as_dir in $PATH
1057 do
1058   IFS=$as_save_IFS
1059   test -z "$as_dir" && as_dir=.
1060   echo "PATH: $as_dir"
1061 done
1062
1063 } >&5
1064
1065 cat >&5 <<_ACEOF
1066
1067
1068 ## ----------- ##
1069 ## Core tests. ##
1070 ## ----------- ##
1071
1072 _ACEOF
1073
1074
1075 # Keep a trace of the command line.
1076 # Strip out --no-create and --no-recursion so they do not pile up.
1077 # Strip out --silent because we don't want to record it for future runs.
1078 # Also quote any args containing shell meta-characters.
1079 # Make two passes to allow for proper duplicate-argument suppression.
1080 ac_configure_args=
1081 ac_configure_args0=
1082 ac_configure_args1=
1083 ac_sep=
1084 ac_must_keep_next=false
1085 for ac_pass in 1 2
1086 do
1087   for ac_arg
1088   do
1089     case $ac_arg in
1090     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1091     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1092     | -silent | --silent | --silen | --sile | --sil)
1093       continue ;;
1094     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1095       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1096     esac
1097     case $ac_pass in
1098     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1099     2)
1100       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1101       if test $ac_must_keep_next = true; then
1102         ac_must_keep_next=false # Got value, back to normal.
1103       else
1104         case $ac_arg in
1105           *=* | --config-cache | -C | -disable-* | --disable-* \
1106           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1107           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1108           | -with-* | --with-* | -without-* | --without-* | --x)
1109             case "$ac_configure_args0 " in
1110               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1111             esac
1112             ;;
1113           -* ) ac_must_keep_next=true ;;
1114         esac
1115       fi
1116       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1117       # Get rid of the leading space.
1118       ac_sep=" "
1119       ;;
1120     esac
1121   done
1122 done
1123 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1124 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1125
1126 # When interrupted or exit'd, cleanup temporary files, and complete
1127 # config.log.  We remove comments because anyway the quotes in there
1128 # would cause problems or look ugly.
1129 # WARNING: Be sure not to use single quotes in there, as some shells,
1130 # such as our DU 5.0 friend, will then `close' the trap.
1131 trap 'exit_status=$?
1132   # Save into config.log some information that might help in debugging.
1133   {
1134     echo
1135
1136     cat <<\_ASBOX
1137 ## ---------------- ##
1138 ## Cache variables. ##
1139 ## ---------------- ##
1140 _ASBOX
1141     echo
1142     # The following way of writing the cache mishandles newlines in values,
1143 {
1144   (set) 2>&1 |
1145     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1146     *ac_space=\ *)
1147       sed -n \
1148         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1149           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1150       ;;
1151     *)
1152       sed -n \
1153         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1154       ;;
1155     esac;
1156 }
1157     echo
1158
1159     cat <<\_ASBOX
1160 ## ----------------- ##
1161 ## Output variables. ##
1162 ## ----------------- ##
1163 _ASBOX
1164     echo
1165     for ac_var in $ac_subst_vars
1166     do
1167       eval ac_val=$`echo $ac_var`
1168       echo "$ac_var='"'"'$ac_val'"'"'"
1169     done | sort
1170     echo
1171
1172     if test -n "$ac_subst_files"; then
1173       cat <<\_ASBOX
1174 ## ------------- ##
1175 ## Output files. ##
1176 ## ------------- ##
1177 _ASBOX
1178       echo
1179       for ac_var in $ac_subst_files
1180       do
1181         eval ac_val=$`echo $ac_var`
1182         echo "$ac_var='"'"'$ac_val'"'"'"
1183       done | sort
1184       echo
1185     fi
1186
1187     if test -s confdefs.h; then
1188       cat <<\_ASBOX
1189 ## ----------- ##
1190 ## confdefs.h. ##
1191 ## ----------- ##
1192 _ASBOX
1193       echo
1194       sed "/^$/d" confdefs.h | sort
1195       echo
1196     fi
1197     test "$ac_signal" != 0 &&
1198       echo "$as_me: caught signal $ac_signal"
1199     echo "$as_me: exit $exit_status"
1200   } >&5
1201   rm -f core *.core &&
1202   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1203     exit $exit_status
1204      ' 0
1205 for ac_signal in 1 2 13 15; do
1206   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1207 done
1208 ac_signal=0
1209
1210 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1211 rm -rf conftest* confdefs.h
1212 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1213 echo >confdefs.h
1214
1215 # Predefined preprocessor variables.
1216
1217 cat >>confdefs.h <<_ACEOF
1218 #define PACKAGE_NAME "$PACKAGE_NAME"
1219 _ACEOF
1220
1221
1222 cat >>confdefs.h <<_ACEOF
1223 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1224 _ACEOF
1225
1226
1227 cat >>confdefs.h <<_ACEOF
1228 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1229 _ACEOF
1230
1231
1232 cat >>confdefs.h <<_ACEOF
1233 #define PACKAGE_STRING "$PACKAGE_STRING"
1234 _ACEOF
1235
1236
1237 cat >>confdefs.h <<_ACEOF
1238 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1239 _ACEOF
1240
1241
1242 # Let the site file select an alternate cache file if it wants to.
1243 # Prefer explicitly selected file to automatically selected ones.
1244 if test -z "$CONFIG_SITE"; then
1245   if test "x$prefix" != xNONE; then
1246     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1247   else
1248     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1249   fi
1250 fi
1251 for ac_site_file in $CONFIG_SITE; do
1252   if test -r "$ac_site_file"; then
1253     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1254 echo "$as_me: loading site script $ac_site_file" >&6;}
1255     sed 's/^/| /' "$ac_site_file" >&5
1256     . "$ac_site_file"
1257   fi
1258 done
1259
1260 if test -r "$cache_file"; then
1261   # Some versions of bash will fail to source /dev/null (special
1262   # files actually), so we avoid doing that.
1263   if test -f "$cache_file"; then
1264     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1265 echo "$as_me: loading cache $cache_file" >&6;}
1266     case $cache_file in
1267       [\\/]* | ?:[\\/]* ) . $cache_file;;
1268       *)                      . ./$cache_file;;
1269     esac
1270   fi
1271 else
1272   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1273 echo "$as_me: creating cache $cache_file" >&6;}
1274   >$cache_file
1275 fi
1276
1277 # Check that the precious variables saved in the cache have kept the same
1278 # value.
1279 ac_cache_corrupted=false
1280 for ac_var in `(set) 2>&1 |
1281                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1282   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1283   eval ac_new_set=\$ac_env_${ac_var}_set
1284   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1285   eval ac_new_val="\$ac_env_${ac_var}_value"
1286   case $ac_old_set,$ac_new_set in
1287     set,)
1288       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1289 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1290       ac_cache_corrupted=: ;;
1291     ,set)
1292       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1293 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1294       ac_cache_corrupted=: ;;
1295     ,);;
1296     *)
1297       if test "x$ac_old_val" != "x$ac_new_val"; then
1298         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1299 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1300         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1301 echo "$as_me:   former value:  $ac_old_val" >&2;}
1302         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1303 echo "$as_me:   current value: $ac_new_val" >&2;}
1304         ac_cache_corrupted=:
1305       fi;;
1306   esac
1307   # Pass precious variables to config.status.
1308   if test "$ac_new_set" = set; then
1309     case $ac_new_val in
1310     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1311       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1312     *) ac_arg=$ac_var=$ac_new_val ;;
1313     esac
1314     case " $ac_configure_args " in
1315       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1316       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1317     esac
1318   fi
1319 done
1320 if $ac_cache_corrupted; then
1321   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1322 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1323   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1324 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1325    { (exit 1); exit 1; }; }
1326 fi
1327
1328 ac_ext=c
1329 ac_cpp='$CPP $CPPFLAGS'
1330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364 ac_aux_dir=
1365 for ac_dir in config $srcdir/config; do
1366   if test -f $ac_dir/install-sh; then
1367     ac_aux_dir=$ac_dir
1368     ac_install_sh="$ac_aux_dir/install-sh -c"
1369     break
1370   elif test -f $ac_dir/install.sh; then
1371     ac_aux_dir=$ac_dir
1372     ac_install_sh="$ac_aux_dir/install.sh -c"
1373     break
1374   elif test -f $ac_dir/shtool; then
1375     ac_aux_dir=$ac_dir
1376     ac_install_sh="$ac_aux_dir/shtool install -c"
1377     break
1378   fi
1379 done
1380 if test -z "$ac_aux_dir"; then
1381   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1382 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1383    { (exit 1); exit 1; }; }
1384 fi
1385 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1386 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1387 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1388
1389
1390 configure_args=$ac_configure_args
1391
1392
1393
1394 cat >>confdefs.h <<_ACEOF
1395 #define PG_VERSION "$PACKAGE_VERSION"
1396 _ACEOF
1397
1398
1399 # Make sure we can run config.sub.
1400 $ac_config_sub sun4 >/dev/null 2>&1 ||
1401   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1402 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1403    { (exit 1); exit 1; }; }
1404
1405 echo "$as_me:$LINENO: checking build system type" >&5
1406 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1407 if test "${ac_cv_build+set}" = set; then
1408   echo $ECHO_N "(cached) $ECHO_C" >&6
1409 else
1410   ac_cv_build_alias=$build_alias
1411 test -z "$ac_cv_build_alias" &&
1412   ac_cv_build_alias=`$ac_config_guess`
1413 test -z "$ac_cv_build_alias" &&
1414   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1415 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1416    { (exit 1); exit 1; }; }
1417 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1418   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1419 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1420    { (exit 1); exit 1; }; }
1421
1422 fi
1423 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1424 echo "${ECHO_T}$ac_cv_build" >&6
1425 build=$ac_cv_build
1426 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1427 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1428 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1429
1430
1431 echo "$as_me:$LINENO: checking host system type" >&5
1432 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1433 if test "${ac_cv_host+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   ac_cv_host_alias=$host_alias
1437 test -z "$ac_cv_host_alias" &&
1438   ac_cv_host_alias=$ac_cv_build_alias
1439 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1440   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1441 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1442    { (exit 1); exit 1; }; }
1443
1444 fi
1445 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1446 echo "${ECHO_T}$ac_cv_host" >&6
1447 host=$ac_cv_host
1448 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1449 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1450 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1451
1452
1453
1454 template=
1455 echo "$as_me:$LINENO: checking which template to use" >&5
1456 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1457
1458
1459
1460
1461 # Check whether --with-template or --without-template was given.
1462 if test "${with_template+set}" = set; then
1463   withval="$with_template"
1464
1465   case $withval in
1466     yes)
1467       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1468 echo "$as_me: error: argument required for --with-template option" >&2;}
1469    { (exit 1); exit 1; }; }
1470       ;;
1471     no)
1472       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1473 echo "$as_me: error: argument required for --with-template option" >&2;}
1474    { (exit 1); exit 1; }; }
1475       ;;
1476     *)
1477
1478   case $withval in
1479     list)   echo; ls "$srcdir/src/template"; exit;;
1480     *)      if test -f "$srcdir/src/template/$with_template" ; then
1481               template=$withval
1482             else
1483               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1484 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1485    { (exit 1); exit 1; }; }
1486             fi;;
1487   esac
1488
1489       ;;
1490   esac
1491
1492 else
1493
1494 # --with-template not given
1495
1496 case $host_os in
1497      aix*) template=aix ;;
1498     beos*) template=beos ;;
1499     bsdi*) template=bsdi ;;
1500   cygwin*) template=cygwin ;;
1501   darwin*) template=darwin ;;
1502     dgux*) template=dgux ;;
1503  freebsd*) template=freebsd ;;
1504     hpux*) template=hpux ;;
1505     irix*) template=irix ;;
1506  linux*|gnu*|k*bsd*-gnu)
1507            template=linux ;;
1508    mingw*) template=win32 ;;
1509   netbsd*) template=netbsd ;;
1510 nextstep*) template=nextstep ;;
1511  openbsd*) template=openbsd ;;
1512      osf*) template=osf ;;
1513      qnx*) template=qnx4 ;;
1514      sco*) template=sco ;;
1515  solaris*) template=solaris ;;
1516    sunos*) template=sunos4 ;;
1517  sysv4.2*)
1518         case $host_vendor in
1519           univel) template=univel ;;
1520         esac ;;
1521    sysv4*) template=svr4 ;;
1522    sysv5*) template=unixware ;;
1523   ultrix*) template=ultrix4 ;;
1524 esac
1525
1526   if test x"$template" = x"" ; then
1527     { { echo "$as_me:$LINENO: error:
1528 *******************************************************************
1529 PostgreSQL has apparently not been ported to your platform yet.
1530 To try a manual configuration, look into the src/template directory
1531 for a similar platform and use the '--with-template=' option.
1532
1533 Please also contact <pgsql-ports@postgresql.org> to see about
1534 rectifying this.  Include the above 'checking host system type...'
1535 line.
1536 *******************************************************************
1537 " >&5
1538 echo "$as_me: error:
1539 *******************************************************************
1540 PostgreSQL has apparently not been ported to your platform yet.
1541 To try a manual configuration, look into the src/template directory
1542 for a similar platform and use the '--with-template=' option.
1543
1544 Please also contact <pgsql-ports@postgresql.org> to see about
1545 rectifying this.  Include the above 'checking host system type...'
1546 line.
1547 *******************************************************************
1548 " >&2;}
1549    { (exit 1); exit 1; }; }
1550   fi
1551
1552
1553 fi;
1554
1555
1556 echo "$as_me:$LINENO: result: $template" >&5
1557 echo "${ECHO_T}$template" >&6
1558
1559 PORTNAME=$template
1560
1561
1562 # Initialize default assumption that we do not need separate assembly code
1563 # for TAS (test-and-set).  This can be overridden by the template file
1564 # when it's executed.
1565 need_tas=no
1566 tas_file=dummy.s
1567
1568
1569
1570 ##
1571 ## Command line options
1572 ##
1573
1574 #
1575 # Installation directory for documentation
1576 #
1577
1578
1579
1580 # Check whether --with-docdir or --without-docdir was given.
1581 if test "${with_docdir+set}" = set; then
1582   withval="$with_docdir"
1583
1584   case $withval in
1585     yes)
1586       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1587 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1588    { (exit 1); exit 1; }; }
1589       ;;
1590     no)
1591       docdir=
1592       ;;
1593     *)
1594       docdir=$withval
1595       ;;
1596   esac
1597
1598 else
1599   docdir='${prefix}/doc'
1600 fi;
1601
1602
1603
1604
1605 #
1606 # Add non-standard directories to the include path
1607 #
1608
1609
1610
1611 # Check whether --with-includes or --without-includes was given.
1612 if test "${with_includes+set}" = set; then
1613   withval="$with_includes"
1614
1615   case $withval in
1616     yes)
1617       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1618 echo "$as_me: error: argument required for --with-includes option" >&2;}
1619    { (exit 1); exit 1; }; }
1620       ;;
1621     no)
1622       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1623 echo "$as_me: error: argument required for --with-includes option" >&2;}
1624    { (exit 1); exit 1; }; }
1625       ;;
1626     *)
1627
1628       ;;
1629   esac
1630
1631 fi;
1632
1633
1634
1635 #
1636 # Add non-standard directories to the library search path
1637 #
1638
1639
1640
1641 # Check whether --with-libraries or --without-libraries was given.
1642 if test "${with_libraries+set}" = set; then
1643   withval="$with_libraries"
1644
1645   case $withval in
1646     yes)
1647       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1648 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1649    { (exit 1); exit 1; }; }
1650       ;;
1651     no)
1652       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1653 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1654    { (exit 1); exit 1; }; }
1655       ;;
1656     *)
1657       LIBRARY_DIRS=$withval
1658       ;;
1659   esac
1660
1661 fi;
1662
1663
1664
1665
1666
1667 # Check whether --with-libs or --without-libs was given.
1668 if test "${with_libs+set}" = set; then
1669   withval="$with_libs"
1670
1671   case $withval in
1672     yes)
1673       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1674 echo "$as_me: error: argument required for --with-libs option" >&2;}
1675    { (exit 1); exit 1; }; }
1676       ;;
1677     no)
1678       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1679 echo "$as_me: error: argument required for --with-libs option" >&2;}
1680    { (exit 1); exit 1; }; }
1681       ;;
1682     *)
1683       LIBRARY_DIRS=$withval
1684       ;;
1685   esac
1686
1687 fi;
1688
1689
1690
1691 #
1692 # 64-bit integer date/time storage (--enable-integer-datetimes)
1693 #
1694 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1695 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1696
1697
1698 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1699 if test "${enable_integer_datetimes+set}" = set; then
1700   enableval="$enable_integer_datetimes"
1701
1702   case $enableval in
1703     yes)
1704
1705 cat >>confdefs.h <<\_ACEOF
1706 #define USE_INTEGER_DATETIMES 1
1707 _ACEOF
1708
1709       ;;
1710     no)
1711       :
1712       ;;
1713     *)
1714       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1715 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1716    { (exit 1); exit 1; }; }
1717       ;;
1718   esac
1719
1720 else
1721   enable_integer_datetimes=no
1722
1723 fi;
1724
1725 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1726 echo "${ECHO_T}$enable_integer_datetimes" >&6
1727
1728
1729 #
1730 # NLS
1731 #
1732 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1733 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1734
1735
1736 # Check whether --enable-nls or --disable-nls was given.
1737 if test "${enable_nls+set}" = set; then
1738   enableval="$enable_nls"
1739
1740   case $enableval in
1741     yes)
1742       :
1743       ;;
1744     no)
1745       :
1746       ;;
1747     *)
1748       enable_nls=yes
1749 WANTED_LANGUAGES=$enableval
1750       ;;
1751   esac
1752
1753 else
1754   enable_nls=no
1755 fi;
1756
1757
1758 if test "$enable_nls" = yes; then
1759
1760 cat >>confdefs.h <<\_ACEOF
1761 #define ENABLE_NLS 1
1762 _ACEOF
1763
1764 fi
1765
1766 echo "$as_me:$LINENO: result: $enable_nls" >&5
1767 echo "${ECHO_T}$enable_nls" >&6
1768
1769
1770
1771 #
1772 # Default port number (--with-pgport), default 5432
1773 #
1774 echo "$as_me:$LINENO: checking for default port number" >&5
1775 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1776
1777
1778
1779 # Check whether --with-pgport or --without-pgport was given.
1780 if test "${with_pgport+set}" = set; then
1781   withval="$with_pgport"
1782
1783   case $withval in
1784     yes)
1785       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1786 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1787    { (exit 1); exit 1; }; }
1788       ;;
1789     no)
1790       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1791 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1792    { (exit 1); exit 1; }; }
1793       ;;
1794     *)
1795       default_port=$withval
1796       ;;
1797   esac
1798
1799 else
1800   default_port=5432
1801 fi;
1802
1803 echo "$as_me:$LINENO: result: $default_port" >&5
1804 echo "${ECHO_T}$default_port" >&6
1805 # Need both of these because some places want an integer and some a string
1806
1807 cat >>confdefs.h <<_ACEOF
1808 #define DEF_PGPORT ${default_port}
1809 _ACEOF
1810
1811
1812 cat >>confdefs.h <<_ACEOF
1813 #define DEF_PGPORT_STR "${default_port}"
1814 _ACEOF
1815
1816
1817
1818 #
1819 # Option to disable shared libraries
1820 #
1821
1822
1823 # Check whether --enable-shared or --disable-shared was given.
1824 if test "${enable_shared+set}" = set; then
1825   enableval="$enable_shared"
1826
1827   case $enableval in
1828     yes)
1829       :
1830       ;;
1831     no)
1832       :
1833       ;;
1834     *)
1835       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1836 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1837    { (exit 1); exit 1; }; }
1838       ;;
1839   esac
1840
1841 else
1842   enable_shared=yes
1843
1844 fi;
1845
1846
1847
1848 #
1849 # '-rpath'-like feature can be disabled
1850 #
1851
1852
1853 # Check whether --enable-rpath or --disable-rpath was given.
1854 if test "${enable_rpath+set}" = set; then
1855   enableval="$enable_rpath"
1856
1857   case $enableval in
1858     yes)
1859       :
1860       ;;
1861     no)
1862       :
1863       ;;
1864     *)
1865       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1866 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1867    { (exit 1); exit 1; }; }
1868       ;;
1869   esac
1870
1871 else
1872   enable_rpath=yes
1873
1874 fi;
1875
1876
1877
1878 #
1879 # Spinlocks
1880 #
1881
1882
1883 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1884 if test "${enable_spinlocks+set}" = set; then
1885   enableval="$enable_spinlocks"
1886
1887   case $enableval in
1888     yes)
1889       :
1890       ;;
1891     no)
1892       :
1893       ;;
1894     *)
1895       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1896 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1897    { (exit 1); exit 1; }; }
1898       ;;
1899   esac
1900
1901 else
1902   enable_spinlocks=yes
1903
1904 fi;
1905
1906
1907 #
1908 # --enable-debug adds -g to compiler flags
1909 #
1910
1911
1912 # Check whether --enable-debug or --disable-debug was given.
1913 if test "${enable_debug+set}" = set; then
1914   enableval="$enable_debug"
1915
1916   case $enableval in
1917     yes)
1918       :
1919       ;;
1920     no)
1921       :
1922       ;;
1923     *)
1924       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1925 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1926    { (exit 1); exit 1; }; }
1927       ;;
1928   esac
1929
1930 else
1931   enable_debug=no
1932
1933 fi;
1934
1935
1936
1937 #
1938 # C compiler
1939 #
1940
1941 # For historical reasons you can also use --with-CC to specify the C compiler
1942 # to use, although the standard way to do this is to set the CC environment
1943 # variable.
1944
1945
1946
1947 # Check whether --with-CC or --without-CC was given.
1948 if test "${with_CC+set}" = set; then
1949   withval="$with_CC"
1950
1951   case $withval in
1952     yes)
1953       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1954 echo "$as_me: error: argument required for --with-CC option" >&2;}
1955    { (exit 1); exit 1; }; }
1956       ;;
1957     no)
1958       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1959 echo "$as_me: error: argument required for --with-CC option" >&2;}
1960    { (exit 1); exit 1; }; }
1961       ;;
1962     *)
1963       CC=$with_CC
1964       ;;
1965   esac
1966
1967 fi;
1968
1969
1970 case $template in
1971   aix) pgac_cc_list="gcc xlc";;
1972  irix) pgac_cc_list="cc";; # no gcc
1973     *) pgac_cc_list="gcc cc";;
1974 esac
1975
1976 ac_ext=c
1977 ac_cpp='$CPP $CPPFLAGS'
1978 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1979 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1980 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1981 if test -n "$ac_tool_prefix"; then
1982   for ac_prog in $pgac_cc_list
1983   do
1984     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1985 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1986 echo "$as_me:$LINENO: checking for $ac_word" >&5
1987 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1988 if test "${ac_cv_prog_CC+set}" = set; then
1989   echo $ECHO_N "(cached) $ECHO_C" >&6
1990 else
1991   if test -n "$CC"; then
1992   ac_cv_prog_CC="$CC" # Let the user override the test.
1993 else
1994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1995 for as_dir in $PATH
1996 do
1997   IFS=$as_save_IFS
1998   test -z "$as_dir" && as_dir=.
1999   for ac_exec_ext in '' $ac_executable_extensions; do
2000   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2001     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2002     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2003     break 2
2004   fi
2005 done
2006 done
2007
2008 fi
2009 fi
2010 CC=$ac_cv_prog_CC
2011 if test -n "$CC"; then
2012   echo "$as_me:$LINENO: result: $CC" >&5
2013 echo "${ECHO_T}$CC" >&6
2014 else
2015   echo "$as_me:$LINENO: result: no" >&5
2016 echo "${ECHO_T}no" >&6
2017 fi
2018
2019     test -n "$CC" && break
2020   done
2021 fi
2022 if test -z "$CC"; then
2023   ac_ct_CC=$CC
2024   for ac_prog in $pgac_cc_list
2025 do
2026   # Extract the first word of "$ac_prog", so it can be a program name with args.
2027 set dummy $ac_prog; ac_word=$2
2028 echo "$as_me:$LINENO: checking for $ac_word" >&5
2029 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2030 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2031   echo $ECHO_N "(cached) $ECHO_C" >&6
2032 else
2033   if test -n "$ac_ct_CC"; then
2034   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2035 else
2036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2037 for as_dir in $PATH
2038 do
2039   IFS=$as_save_IFS
2040   test -z "$as_dir" && as_dir=.
2041   for ac_exec_ext in '' $ac_executable_extensions; do
2042   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2043     ac_cv_prog_ac_ct_CC="$ac_prog"
2044     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2045     break 2
2046   fi
2047 done
2048 done
2049
2050 fi
2051 fi
2052 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2053 if test -n "$ac_ct_CC"; then
2054   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2055 echo "${ECHO_T}$ac_ct_CC" >&6
2056 else
2057   echo "$as_me:$LINENO: result: no" >&5
2058 echo "${ECHO_T}no" >&6
2059 fi
2060
2061   test -n "$ac_ct_CC" && break
2062 done
2063
2064   CC=$ac_ct_CC
2065 fi
2066
2067
2068 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2069 See \`config.log' for more details." >&5
2070 echo "$as_me: error: no acceptable C compiler found in \$PATH
2071 See \`config.log' for more details." >&2;}
2072    { (exit 1); exit 1; }; }
2073
2074 # Provide some information about the compiler.
2075 echo "$as_me:$LINENO:" \
2076      "checking for C compiler version" >&5
2077 ac_compiler=`set X $ac_compile; echo $2`
2078 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2079   (eval $ac_compiler --version </dev/null >&5) 2>&5
2080   ac_status=$?
2081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2082   (exit $ac_status); }
2083 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2084   (eval $ac_compiler -v </dev/null >&5) 2>&5
2085   ac_status=$?
2086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2087   (exit $ac_status); }
2088 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2089   (eval $ac_compiler -V </dev/null >&5) 2>&5
2090   ac_status=$?
2091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2092   (exit $ac_status); }
2093
2094 cat >conftest.$ac_ext <<_ACEOF
2095 /* confdefs.h.  */
2096 _ACEOF
2097 cat confdefs.h >>conftest.$ac_ext
2098 cat >>conftest.$ac_ext <<_ACEOF
2099 /* end confdefs.h.  */
2100
2101 int
2102 main ()
2103 {
2104
2105   ;
2106   return 0;
2107 }
2108 _ACEOF
2109 ac_clean_files_save=$ac_clean_files
2110 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2111 # Try to create an executable without -o first, disregard a.out.
2112 # It will help us diagnose broken compilers, and finding out an intuition
2113 # of exeext.
2114 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2115 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2116 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2117 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2118   (eval $ac_link_default) 2>&5
2119   ac_status=$?
2120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2121   (exit $ac_status); }; then
2122   # Find the output, starting from the most likely.  This scheme is
2123 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2124 # resort.
2125
2126 # Be careful to initialize this variable, since it used to be cached.
2127 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2128 ac_cv_exeext=
2129 # b.out is created by i960 compilers.
2130 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2131 do
2132   test -f "$ac_file" || continue
2133   case $ac_file in
2134     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2135         ;;
2136     conftest.$ac_ext )
2137         # This is the source file.
2138         ;;
2139     [ab].out )
2140         # We found the default executable, but exeext='' is most
2141         # certainly right.
2142         break;;
2143     *.* )
2144         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2145         # FIXME: I believe we export ac_cv_exeext for Libtool,
2146         # but it would be cool to find out if it's true.  Does anybody
2147         # maintain Libtool? --akim.
2148         export ac_cv_exeext
2149         break;;
2150     * )
2151         break;;
2152   esac
2153 done
2154 else
2155   echo "$as_me: failed program was:" >&5
2156 sed 's/^/| /' conftest.$ac_ext >&5
2157
2158 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2159 See \`config.log' for more details." >&5
2160 echo "$as_me: error: C compiler cannot create executables
2161 See \`config.log' for more details." >&2;}
2162    { (exit 77); exit 77; }; }
2163 fi
2164
2165 ac_exeext=$ac_cv_exeext
2166 echo "$as_me:$LINENO: result: $ac_file" >&5
2167 echo "${ECHO_T}$ac_file" >&6
2168
2169 # Check the compiler produces executables we can run.  If not, either
2170 # the compiler is broken, or we cross compile.
2171 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2172 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2173 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2174 # If not cross compiling, check that we can run a simple program.
2175 if test "$cross_compiling" != yes; then
2176   if { ac_try='./$ac_file'
2177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2178   (eval $ac_try) 2>&5
2179   ac_status=$?
2180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2181   (exit $ac_status); }; }; then
2182     cross_compiling=no
2183   else
2184     if test "$cross_compiling" = maybe; then
2185         cross_compiling=yes
2186     else
2187         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2188 If you meant to cross compile, use \`--host'.
2189 See \`config.log' for more details." >&5
2190 echo "$as_me: error: cannot run C compiled programs.
2191 If you meant to cross compile, use \`--host'.
2192 See \`config.log' for more details." >&2;}
2193    { (exit 1); exit 1; }; }
2194     fi
2195   fi
2196 fi
2197 echo "$as_me:$LINENO: result: yes" >&5
2198 echo "${ECHO_T}yes" >&6
2199
2200 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2201 ac_clean_files=$ac_clean_files_save
2202 # Check the compiler produces executables we can run.  If not, either
2203 # the compiler is broken, or we cross compile.
2204 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2205 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2206 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2207 echo "${ECHO_T}$cross_compiling" >&6
2208
2209 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2210 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2211 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2212   (eval $ac_link) 2>&5
2213   ac_status=$?
2214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2215   (exit $ac_status); }; then
2216   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2217 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2218 # work properly (i.e., refer to `conftest.exe'), while it won't with
2219 # `rm'.
2220 for ac_file in conftest.exe conftest conftest.*; do
2221   test -f "$ac_file" || continue
2222   case $ac_file in
2223     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2224     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2225           export ac_cv_exeext
2226           break;;
2227     * ) break;;
2228   esac
2229 done
2230 else
2231   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2232 See \`config.log' for more details." >&5
2233 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2234 See \`config.log' for more details." >&2;}
2235    { (exit 1); exit 1; }; }
2236 fi
2237
2238 rm -f conftest$ac_cv_exeext
2239 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2240 echo "${ECHO_T}$ac_cv_exeext" >&6
2241
2242 rm -f conftest.$ac_ext
2243 EXEEXT=$ac_cv_exeext
2244 ac_exeext=$EXEEXT
2245 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2246 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2247 if test "${ac_cv_objext+set}" = set; then
2248   echo $ECHO_N "(cached) $ECHO_C" >&6
2249 else
2250   cat >conftest.$ac_ext <<_ACEOF
2251 /* confdefs.h.  */
2252 _ACEOF
2253 cat confdefs.h >>conftest.$ac_ext
2254 cat >>conftest.$ac_ext <<_ACEOF
2255 /* end confdefs.h.  */
2256
2257 int
2258 main ()
2259 {
2260
2261   ;
2262   return 0;
2263 }
2264 _ACEOF
2265 rm -f conftest.o conftest.obj
2266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2267   (eval $ac_compile) 2>&5
2268   ac_status=$?
2269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2270   (exit $ac_status); }; then
2271   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2272   case $ac_file in
2273     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2274     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2275        break;;
2276   esac
2277 done
2278 else
2279   echo "$as_me: failed program was:" >&5
2280 sed 's/^/| /' conftest.$ac_ext >&5
2281
2282 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2283 See \`config.log' for more details." >&5
2284 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2285 See \`config.log' for more details." >&2;}
2286    { (exit 1); exit 1; }; }
2287 fi
2288
2289 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2290 fi
2291 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2292 echo "${ECHO_T}$ac_cv_objext" >&6
2293 OBJEXT=$ac_cv_objext
2294 ac_objext=$OBJEXT
2295 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2296 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2297 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2298   echo $ECHO_N "(cached) $ECHO_C" >&6
2299 else
2300   cat >conftest.$ac_ext <<_ACEOF
2301 /* confdefs.h.  */
2302 _ACEOF
2303 cat confdefs.h >>conftest.$ac_ext
2304 cat >>conftest.$ac_ext <<_ACEOF
2305 /* end confdefs.h.  */
2306
2307 int
2308 main ()
2309 {
2310 #ifndef __GNUC__
2311        choke me
2312 #endif
2313
2314   ;
2315   return 0;
2316 }
2317 _ACEOF
2318 rm -f conftest.$ac_objext
2319 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2320   (eval $ac_compile) 2>conftest.er1
2321   ac_status=$?
2322   grep -v '^ *+' conftest.er1 >conftest.err
2323   rm -f conftest.er1
2324   cat conftest.err >&5
2325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2326   (exit $ac_status); } &&
2327          { ac_try='test -z "$ac_c_werror_flag"
2328                          || test ! -s conftest.err'
2329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2330   (eval $ac_try) 2>&5
2331   ac_status=$?
2332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2333   (exit $ac_status); }; } &&
2334          { ac_try='test -s conftest.$ac_objext'
2335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2336   (eval $ac_try) 2>&5
2337   ac_status=$?
2338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339   (exit $ac_status); }; }; then
2340   ac_compiler_gnu=yes
2341 else
2342   echo "$as_me: failed program was:" >&5
2343 sed 's/^/| /' conftest.$ac_ext >&5
2344
2345 ac_compiler_gnu=no
2346 fi
2347 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2348 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2349
2350 fi
2351 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2352 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2353 GCC=`test $ac_compiler_gnu = yes && echo yes`
2354 ac_test_CFLAGS=${CFLAGS+set}
2355 ac_save_CFLAGS=$CFLAGS
2356 CFLAGS="-g"
2357 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2358 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2359 if test "${ac_cv_prog_cc_g+set}" = set; then
2360   echo $ECHO_N "(cached) $ECHO_C" >&6
2361 else
2362   cat >conftest.$ac_ext <<_ACEOF
2363 /* confdefs.h.  */
2364 _ACEOF
2365 cat confdefs.h >>conftest.$ac_ext
2366 cat >>conftest.$ac_ext <<_ACEOF
2367 /* end confdefs.h.  */
2368
2369 int
2370 main ()
2371 {
2372
2373   ;
2374   return 0;
2375 }
2376 _ACEOF
2377 rm -f conftest.$ac_objext
2378 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2379   (eval $ac_compile) 2>conftest.er1
2380   ac_status=$?
2381   grep -v '^ *+' conftest.er1 >conftest.err
2382   rm -f conftest.er1
2383   cat conftest.err >&5
2384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2385   (exit $ac_status); } &&
2386          { ac_try='test -z "$ac_c_werror_flag"
2387                          || test ! -s conftest.err'
2388   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2389   (eval $ac_try) 2>&5
2390   ac_status=$?
2391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2392   (exit $ac_status); }; } &&
2393          { ac_try='test -s conftest.$ac_objext'
2394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2395   (eval $ac_try) 2>&5
2396   ac_status=$?
2397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398   (exit $ac_status); }; }; then
2399   ac_cv_prog_cc_g=yes
2400 else
2401   echo "$as_me: failed program was:" >&5
2402 sed 's/^/| /' conftest.$ac_ext >&5
2403
2404 ac_cv_prog_cc_g=no
2405 fi
2406 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2407 fi
2408 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2409 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2410 if test "$ac_test_CFLAGS" = set; then
2411   CFLAGS=$ac_save_CFLAGS
2412 elif test $ac_cv_prog_cc_g = yes; then
2413   if test "$GCC" = yes; then
2414     CFLAGS="-g -O2"
2415   else
2416     CFLAGS="-g"
2417   fi
2418 else
2419   if test "$GCC" = yes; then
2420     CFLAGS="-O2"
2421   else
2422     CFLAGS=
2423   fi
2424 fi
2425 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2426 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2427 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2428   echo $ECHO_N "(cached) $ECHO_C" >&6
2429 else
2430   ac_cv_prog_cc_stdc=no
2431 ac_save_CC=$CC
2432 cat >conftest.$ac_ext <<_ACEOF
2433 /* confdefs.h.  */
2434 _ACEOF
2435 cat confdefs.h >>conftest.$ac_ext
2436 cat >>conftest.$ac_ext <<_ACEOF
2437 /* end confdefs.h.  */
2438 #include <stdarg.h>
2439 #include <stdio.h>
2440 #include <sys/types.h>
2441 #include <sys/stat.h>
2442 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2443 struct buf { int x; };
2444 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2445 static char *e (p, i)
2446      char **p;
2447      int i;
2448 {
2449   return p[i];
2450 }
2451 static char *f (char * (*g) (char **, int), char **p, ...)
2452 {
2453   char *s;
2454   va_list v;
2455   va_start (v,p);
2456   s = g (p, va_arg (v,int));
2457   va_end (v);
2458   return s;
2459 }
2460
2461 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2462    function prototypes and stuff, but not '\xHH' hex character constants.
2463    These don't provoke an error unfortunately, instead are silently treated
2464    as 'x'.  The following induces an error, until -std1 is added to get
2465    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2466    array size at least.  It's necessary to write '\x00'==0 to get something
2467    that's true only with -std1.  */
2468 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2469
2470 int test (int i, double x);
2471 struct s1 {int (*f) (int a);};
2472 struct s2 {int (*f) (double a);};
2473 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2474 int argc;
2475 char **argv;
2476 int
2477 main ()
2478 {
2479 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2480   ;
2481   return 0;
2482 }
2483 _ACEOF
2484 # Don't try gcc -ansi; that turns off useful extensions and
2485 # breaks some systems' header files.
2486 # AIX                   -qlanglvl=ansi
2487 # Ultrix and OSF/1      -std1
2488 # HP-UX 10.20 and later -Ae
2489 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2490 # SVR4                  -Xc -D__EXTENSIONS__
2491 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2492 do
2493   CC="$ac_save_CC $ac_arg"
2494   rm -f conftest.$ac_objext
2495 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2496   (eval $ac_compile) 2>conftest.er1
2497   ac_status=$?
2498   grep -v '^ *+' conftest.er1 >conftest.err
2499   rm -f conftest.er1
2500   cat conftest.err >&5
2501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2502   (exit $ac_status); } &&
2503          { ac_try='test -z "$ac_c_werror_flag"
2504                          || test ! -s conftest.err'
2505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2506   (eval $ac_try) 2>&5
2507   ac_status=$?
2508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509   (exit $ac_status); }; } &&
2510          { ac_try='test -s conftest.$ac_objext'
2511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2512   (eval $ac_try) 2>&5
2513   ac_status=$?
2514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515   (exit $ac_status); }; }; then
2516   ac_cv_prog_cc_stdc=$ac_arg
2517 break
2518 else
2519   echo "$as_me: failed program was:" >&5
2520 sed 's/^/| /' conftest.$ac_ext >&5
2521
2522 fi
2523 rm -f conftest.err conftest.$ac_objext
2524 done
2525 rm -f conftest.$ac_ext conftest.$ac_objext
2526 CC=$ac_save_CC
2527
2528 fi
2529
2530 case "x$ac_cv_prog_cc_stdc" in
2531   x|xno)
2532     echo "$as_me:$LINENO: result: none needed" >&5
2533 echo "${ECHO_T}none needed" >&6 ;;
2534   *)
2535     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2536 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2537     CC="$CC $ac_cv_prog_cc_stdc" ;;
2538 esac
2539
2540 # Some people use a C++ compiler to compile C.  Since we use `exit',
2541 # in C++ we need to declare it.  In case someone uses the same compiler
2542 # for both compiling C and C++ we need to have the C++ compiler decide
2543 # the declaration of exit, since it's the most demanding environment.
2544 cat >conftest.$ac_ext <<_ACEOF
2545 #ifndef __cplusplus
2546   choke me
2547 #endif
2548 _ACEOF
2549 rm -f conftest.$ac_objext
2550 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2551   (eval $ac_compile) 2>conftest.er1
2552   ac_status=$?
2553   grep -v '^ *+' conftest.er1 >conftest.err
2554   rm -f conftest.er1
2555   cat conftest.err >&5
2556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2557   (exit $ac_status); } &&
2558          { ac_try='test -z "$ac_c_werror_flag"
2559                          || test ! -s conftest.err'
2560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2561   (eval $ac_try) 2>&5
2562   ac_status=$?
2563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2564   (exit $ac_status); }; } &&
2565          { ac_try='test -s conftest.$ac_objext'
2566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2567   (eval $ac_try) 2>&5
2568   ac_status=$?
2569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570   (exit $ac_status); }; }; then
2571   for ac_declaration in \
2572    '' \
2573    'extern "C" void std::exit (int) throw (); using std::exit;' \
2574    'extern "C" void std::exit (int); using std::exit;' \
2575    'extern "C" void exit (int) throw ();' \
2576    'extern "C" void exit (int);' \
2577    'void exit (int);'
2578 do
2579   cat >conftest.$ac_ext <<_ACEOF
2580 /* confdefs.h.  */
2581 _ACEOF
2582 cat confdefs.h >>conftest.$ac_ext
2583 cat >>conftest.$ac_ext <<_ACEOF
2584 /* end confdefs.h.  */
2585 $ac_declaration
2586 #include <stdlib.h>
2587 int
2588 main ()
2589 {
2590 exit (42);
2591   ;
2592   return 0;
2593 }
2594 _ACEOF
2595 rm -f conftest.$ac_objext
2596 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2597   (eval $ac_compile) 2>conftest.er1
2598   ac_status=$?
2599   grep -v '^ *+' conftest.er1 >conftest.err
2600   rm -f conftest.er1
2601   cat conftest.err >&5
2602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2603   (exit $ac_status); } &&
2604          { ac_try='test -z "$ac_c_werror_flag"
2605                          || test ! -s conftest.err'
2606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2607   (eval $ac_try) 2>&5
2608   ac_status=$?
2609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2610   (exit $ac_status); }; } &&
2611          { ac_try='test -s conftest.$ac_objext'
2612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2613   (eval $ac_try) 2>&5
2614   ac_status=$?
2615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2616   (exit $ac_status); }; }; then
2617   :
2618 else
2619   echo "$as_me: failed program was:" >&5
2620 sed 's/^/| /' conftest.$ac_ext >&5
2621
2622 continue
2623 fi
2624 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2625   cat >conftest.$ac_ext <<_ACEOF
2626 /* confdefs.h.  */
2627 _ACEOF
2628 cat confdefs.h >>conftest.$ac_ext
2629 cat >>conftest.$ac_ext <<_ACEOF
2630 /* end confdefs.h.  */
2631 $ac_declaration
2632 int
2633 main ()
2634 {
2635 exit (42);
2636   ;
2637   return 0;
2638 }
2639 _ACEOF
2640 rm -f conftest.$ac_objext
2641 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2642   (eval $ac_compile) 2>conftest.er1
2643   ac_status=$?
2644   grep -v '^ *+' conftest.er1 >conftest.err
2645   rm -f conftest.er1
2646   cat conftest.err >&5
2647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2648   (exit $ac_status); } &&
2649          { ac_try='test -z "$ac_c_werror_flag"
2650                          || test ! -s conftest.err'
2651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2652   (eval $ac_try) 2>&5
2653   ac_status=$?
2654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655   (exit $ac_status); }; } &&
2656          { ac_try='test -s conftest.$ac_objext'
2657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2658   (eval $ac_try) 2>&5
2659   ac_status=$?
2660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661   (exit $ac_status); }; }; then
2662   break
2663 else
2664   echo "$as_me: failed program was:" >&5
2665 sed 's/^/| /' conftest.$ac_ext >&5
2666
2667 fi
2668 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2669 done
2670 rm -f conftest*
2671 if test -n "$ac_declaration"; then
2672   echo '#ifdef __cplusplus' >>confdefs.h
2673   echo $ac_declaration      >>confdefs.h
2674   echo '#endif'             >>confdefs.h
2675 fi
2676
2677 else
2678   echo "$as_me: failed program was:" >&5
2679 sed 's/^/| /' conftest.$ac_ext >&5
2680
2681 fi
2682 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2683 ac_ext=c
2684 ac_cpp='$CPP $CPPFLAGS'
2685 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2688
2689
2690 unset CFLAGS
2691
2692 #
2693 # Read the template
2694 #
2695 . "$srcdir/src/template/$template" || exit
2696
2697 # CFLAGS are selected so:
2698 # If the user specifies something in the environment, that is used.
2699 # else:  If the template file set something, that is used.
2700 # else:  If the compiler is GCC, then we use -O2.
2701 # else:  If the compiler is something else, then we use -0.
2702
2703 if test "$ac_env_CFLAGS_set" = set; then
2704   CFLAGS=$ac_env_CFLAGS_value
2705 elif test "${CFLAGS+set}" = set; then
2706   : # (keep what template set)
2707 elif test "$GCC" = yes; then
2708   CFLAGS="-O2"
2709 else
2710   # if the user selected debug mode, don't use -O
2711   if test "$enable_debug" != yes; then
2712     CFLAGS="-O"
2713   fi
2714 fi
2715
2716 if test "$GCC" = yes; then
2717   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
2718
2719   # Some versions of GCC support some additional useful warning flags.
2720   # Check whether they are supported, and add them to CFLAGS if so.
2721   echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2722 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2723 pgac_save_CFLAGS=$CFLAGS
2724 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2725 cat >conftest.$ac_ext <<_ACEOF
2726 /* confdefs.h.  */
2727 _ACEOF
2728 cat confdefs.h >>conftest.$ac_ext
2729 cat >>conftest.$ac_ext <<_ACEOF
2730 /* end confdefs.h.  */
2731
2732 int
2733 main ()
2734 {
2735
2736   ;
2737   return 0;
2738 }
2739 _ACEOF
2740 rm -f conftest.$ac_objext
2741 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2742   (eval $ac_compile) 2>conftest.er1
2743   ac_status=$?
2744   grep -v '^ *+' conftest.er1 >conftest.err
2745   rm -f conftest.er1
2746   cat conftest.err >&5
2747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2748   (exit $ac_status); } &&
2749          { ac_try='test -z "$ac_c_werror_flag"
2750                          || test ! -s conftest.err'
2751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2752   (eval $ac_try) 2>&5
2753   ac_status=$?
2754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2755   (exit $ac_status); }; } &&
2756          { ac_try='test -s conftest.$ac_objext'
2757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2758   (eval $ac_try) 2>&5
2759   ac_status=$?
2760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2761   (exit $ac_status); }; }; then
2762   echo "$as_me:$LINENO: result: yes" >&5
2763 echo "${ECHO_T}yes" >&6
2764 else
2765   echo "$as_me: failed program was:" >&5
2766 sed 's/^/| /' conftest.$ac_ext >&5
2767
2768 CFLAGS="$pgac_save_CFLAGS"
2769                     echo "$as_me:$LINENO: result: no" >&5
2770 echo "${ECHO_T}no" >&6
2771 fi
2772 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2773
2774   echo "$as_me:$LINENO: checking if $CC supports -Wold-style-definition" >&5
2775 echo $ECHO_N "checking if $CC supports -Wold-style-definition... $ECHO_C" >&6
2776 pgac_save_CFLAGS=$CFLAGS
2777 CFLAGS="$pgac_save_CFLAGS -Wold-style-definition"
2778 cat >conftest.$ac_ext <<_ACEOF
2779 /* confdefs.h.  */
2780 _ACEOF
2781 cat confdefs.h >>conftest.$ac_ext
2782 cat >>conftest.$ac_ext <<_ACEOF
2783 /* end confdefs.h.  */
2784
2785 int
2786 main ()
2787 {
2788
2789   ;
2790   return 0;
2791 }
2792 _ACEOF
2793 rm -f conftest.$ac_objext
2794 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2795   (eval $ac_compile) 2>conftest.er1
2796   ac_status=$?
2797   grep -v '^ *+' conftest.er1 >conftest.err
2798   rm -f conftest.er1
2799   cat conftest.err >&5
2800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2801   (exit $ac_status); } &&
2802          { ac_try='test -z "$ac_c_werror_flag"
2803                          || test ! -s conftest.err'
2804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2805   (eval $ac_try) 2>&5
2806   ac_status=$?
2807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2808   (exit $ac_status); }; } &&
2809          { ac_try='test -s conftest.$ac_objext'
2810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2811   (eval $ac_try) 2>&5
2812   ac_status=$?
2813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2814   (exit $ac_status); }; }; then
2815   echo "$as_me:$LINENO: result: yes" >&5
2816 echo "${ECHO_T}yes" >&6
2817 else
2818   echo "$as_me: failed program was:" >&5
2819 sed 's/^/| /' conftest.$ac_ext >&5
2820
2821 CFLAGS="$pgac_save_CFLAGS"
2822                     echo "$as_me:$LINENO: result: no" >&5
2823 echo "${ECHO_T}no" >&6
2824 fi
2825 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2826
2827   echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2828 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2829 pgac_save_CFLAGS=$CFLAGS
2830 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2831 cat >conftest.$ac_ext <<_ACEOF
2832 /* confdefs.h.  */
2833 _ACEOF
2834 cat confdefs.h >>conftest.$ac_ext
2835 cat >>conftest.$ac_ext <<_ACEOF
2836 /* end confdefs.h.  */
2837
2838 int
2839 main ()
2840 {
2841
2842   ;
2843   return 0;
2844 }
2845 _ACEOF
2846 rm -f conftest.$ac_objext
2847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2848   (eval $ac_compile) 2>conftest.er1
2849   ac_status=$?
2850   grep -v '^ *+' conftest.er1 >conftest.err
2851   rm -f conftest.er1
2852   cat conftest.err >&5
2853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2854   (exit $ac_status); } &&
2855          { ac_try='test -z "$ac_c_werror_flag"
2856                          || test ! -s conftest.err'
2857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2858   (eval $ac_try) 2>&5
2859   ac_status=$?
2860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2861   (exit $ac_status); }; } &&
2862          { ac_try='test -s conftest.$ac_objext'
2863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2864   (eval $ac_try) 2>&5
2865   ac_status=$?
2866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2867   (exit $ac_status); }; }; then
2868   echo "$as_me:$LINENO: result: yes" >&5
2869 echo "${ECHO_T}yes" >&6
2870 else
2871   echo "$as_me: failed program was:" >&5
2872 sed 's/^/| /' conftest.$ac_ext >&5
2873
2874 CFLAGS="$pgac_save_CFLAGS"
2875                     echo "$as_me:$LINENO: result: no" >&5
2876 echo "${ECHO_T}no" >&6
2877 fi
2878 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2879
2880
2881   # Disable strict-aliasing rules; needed for gcc 3.3+
2882   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
2883 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
2884 pgac_save_CFLAGS=$CFLAGS
2885 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
2886 cat >conftest.$ac_ext <<_ACEOF
2887 /* confdefs.h.  */
2888 _ACEOF
2889 cat confdefs.h >>conftest.$ac_ext
2890 cat >>conftest.$ac_ext <<_ACEOF
2891 /* end confdefs.h.  */
2892
2893 int
2894 main ()
2895 {
2896
2897   ;
2898   return 0;
2899 }
2900 _ACEOF
2901 rm -f conftest.$ac_objext
2902 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2903   (eval $ac_compile) 2>conftest.er1
2904   ac_status=$?
2905   grep -v '^ *+' conftest.er1 >conftest.err
2906   rm -f conftest.er1
2907   cat conftest.err >&5
2908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2909   (exit $ac_status); } &&
2910          { ac_try='test -z "$ac_c_werror_flag"
2911                          || test ! -s conftest.err'
2912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2913   (eval $ac_try) 2>&5
2914   ac_status=$?
2915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2916   (exit $ac_status); }; } &&
2917          { ac_try='test -s conftest.$ac_objext'
2918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2919   (eval $ac_try) 2>&5
2920   ac_status=$?
2921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2922   (exit $ac_status); }; }; then
2923   echo "$as_me:$LINENO: result: yes" >&5
2924 echo "${ECHO_T}yes" >&6
2925 else
2926   echo "$as_me: failed program was:" >&5
2927 sed 's/^/| /' conftest.$ac_ext >&5
2928
2929 CFLAGS="$pgac_save_CFLAGS"
2930                     echo "$as_me:$LINENO: result: no" >&5
2931 echo "${ECHO_T}no" >&6
2932 fi
2933 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2934
2935 fi
2936
2937 # supply -g if --enable-debug
2938 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2939   CFLAGS="$CFLAGS -g"
2940 fi
2941
2942 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2943 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2944
2945 # We already have this in Makefile.win32, but configure needs it too
2946 if test "$PORTNAME" = "win32"; then
2947   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
2948 fi
2949
2950 # Check if the compiler still works with the template settings
2951 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2952 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2953
2954 cat >conftest.$ac_ext <<_ACEOF
2955 /* confdefs.h.  */
2956 _ACEOF
2957 cat confdefs.h >>conftest.$ac_ext
2958 cat >>conftest.$ac_ext <<_ACEOF
2959 /* end confdefs.h.  */
2960
2961 int
2962 main ()
2963 {
2964 return 0;
2965   ;
2966   return 0;
2967 }
2968 _ACEOF
2969 rm -f conftest.$ac_objext conftest$ac_exeext
2970 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2971   (eval $ac_link) 2>conftest.er1
2972   ac_status=$?
2973   grep -v '^ *+' conftest.er1 >conftest.err
2974   rm -f conftest.er1
2975   cat conftest.err >&5
2976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2977   (exit $ac_status); } &&
2978          { ac_try='test -z "$ac_c_werror_flag"
2979                          || test ! -s conftest.err'
2980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2981   (eval $ac_try) 2>&5
2982   ac_status=$?
2983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2984   (exit $ac_status); }; } &&
2985          { ac_try='test -s conftest$ac_exeext'
2986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2987   (eval $ac_try) 2>&5
2988   ac_status=$?
2989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990   (exit $ac_status); }; }; then
2991   echo "$as_me:$LINENO: result: yes" >&5
2992 echo "${ECHO_T}yes" >&6
2993 else
2994   echo "$as_me: failed program was:" >&5
2995 sed 's/^/| /' conftest.$ac_ext >&5
2996
2997 echo "$as_me:$LINENO: result: no" >&5
2998 echo "${ECHO_T}no" >&6
2999    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3000 echo "$as_me: error: cannot proceed" >&2;}
3001    { (exit 1); exit 1; }; }
3002 fi
3003 rm -f conftest.err conftest.$ac_objext \
3004       conftest$ac_exeext conftest.$ac_ext
3005
3006 # Defend against gcc -ffast-math
3007 if test "$GCC" = yes; then
3008 cat >conftest.$ac_ext <<_ACEOF
3009 /* confdefs.h.  */
3010 _ACEOF
3011 cat confdefs.h >>conftest.$ac_ext
3012 cat >>conftest.$ac_ext <<_ACEOF
3013 /* end confdefs.h.  */
3014
3015 int
3016 main ()
3017 {
3018 #ifdef __FAST_MATH__
3019 choke me
3020 #endif
3021   ;
3022   return 0;
3023 }
3024 _ACEOF
3025 rm -f conftest.$ac_objext
3026 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3027   (eval $ac_compile) 2>conftest.er1
3028   ac_status=$?
3029   grep -v '^ *+' conftest.er1 >conftest.err
3030   rm -f conftest.er1
3031   cat conftest.err >&5
3032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3033   (exit $ac_status); } &&
3034          { ac_try='test -z "$ac_c_werror_flag"
3035                          || test ! -s conftest.err'
3036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3037   (eval $ac_try) 2>&5
3038   ac_status=$?
3039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3040   (exit $ac_status); }; } &&
3041          { ac_try='test -s conftest.$ac_objext'
3042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3043   (eval $ac_try) 2>&5
3044   ac_status=$?
3045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3046   (exit $ac_status); }; }; then
3047   :
3048 else
3049   echo "$as_me: failed program was:" >&5
3050 sed 's/^/| /' conftest.$ac_ext >&5
3051
3052 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3053 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3054    { (exit 1); exit 1; }; }
3055 fi
3056 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3057 fi
3058
3059 ac_ext=c
3060 ac_cpp='$CPP $CPPFLAGS'
3061 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3062 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3063 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3064 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3065 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3066 # On Suns, sometimes $CPP names a directory.
3067 if test -n "$CPP" && test -d "$CPP"; then
3068   CPP=
3069 fi
3070 if test -z "$CPP"; then
3071   if test "${ac_cv_prog_CPP+set}" = set; then
3072   echo $ECHO_N "(cached) $ECHO_C" >&6
3073 else
3074       # Double quotes because CPP needs to be expanded
3075     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3076     do
3077       ac_preproc_ok=false
3078 for ac_c_preproc_warn_flag in '' yes
3079 do
3080   # Use a header file that comes with gcc, so configuring glibc
3081   # with a fresh cross-compiler works.
3082   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3083   # <limits.h> exists even on freestanding compilers.
3084   # On the NeXT, cc -E runs the code through the compiler's parser,
3085   # not just through cpp. "Syntax error" is here to catch this case.
3086   cat >conftest.$ac_ext <<_ACEOF
3087 /* confdefs.h.  */
3088 _ACEOF
3089 cat confdefs.h >>conftest.$ac_ext
3090 cat >>conftest.$ac_ext <<_ACEOF
3091 /* end confdefs.h.  */
3092 #ifdef __STDC__
3093 # include <limits.h>
3094 #else
3095 # include <assert.h>
3096 #endif
3097                      Syntax error
3098 _ACEOF
3099 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3100   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3101   ac_status=$?
3102   grep -v '^ *+' conftest.er1 >conftest.err
3103   rm -f conftest.er1
3104   cat conftest.err >&5
3105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3106   (exit $ac_status); } >/dev/null; then
3107   if test -s conftest.err; then
3108     ac_cpp_err=$ac_c_preproc_warn_flag
3109     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3110   else
3111     ac_cpp_err=
3112   fi
3113 else
3114   ac_cpp_err=yes
3115 fi
3116 if test -z "$ac_cpp_err"; then
3117   :
3118 else
3119   echo "$as_me: failed program was:" >&5
3120 sed 's/^/| /' conftest.$ac_ext >&5
3121
3122   # Broken: fails on valid input.
3123 continue
3124 fi
3125 rm -f conftest.err conftest.$ac_ext
3126
3127   # OK, works on sane cases.  Now check whether non-existent headers
3128   # can be detected and how.
3129   cat >conftest.$ac_ext <<_ACEOF
3130 /* confdefs.h.  */
3131 _ACEOF
3132 cat confdefs.h >>conftest.$ac_ext
3133 cat >>conftest.$ac_ext <<_ACEOF
3134 /* end confdefs.h.  */
3135 #include <ac_nonexistent.h>
3136 _ACEOF
3137 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3138   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3139   ac_status=$?
3140   grep -v '^ *+' conftest.er1 >conftest.err
3141   rm -f conftest.er1
3142   cat conftest.err >&5
3143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3144   (exit $ac_status); } >/dev/null; then
3145   if test -s conftest.err; then
3146     ac_cpp_err=$ac_c_preproc_warn_flag
3147     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3148   else
3149     ac_cpp_err=
3150   fi
3151 else
3152   ac_cpp_err=yes
3153 fi
3154 if test -z "$ac_cpp_err"; then
3155   # Broken: success on invalid input.
3156 continue
3157 else
3158   echo "$as_me: failed program was:" >&5
3159 sed 's/^/| /' conftest.$ac_ext >&5
3160
3161   # Passes both tests.
3162 ac_preproc_ok=:
3163 break
3164 fi
3165 rm -f conftest.err conftest.$ac_ext
3166
3167 done
3168 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3169 rm -f conftest.err conftest.$ac_ext
3170 if $ac_preproc_ok; then
3171   break
3172 fi
3173
3174     done
3175     ac_cv_prog_CPP=$CPP
3176
3177 fi
3178   CPP=$ac_cv_prog_CPP
3179 else
3180   ac_cv_prog_CPP=$CPP
3181 fi
3182 echo "$as_me:$LINENO: result: $CPP" >&5
3183 echo "${ECHO_T}$CPP" >&6
3184 ac_preproc_ok=false
3185 for ac_c_preproc_warn_flag in '' yes
3186 do
3187   # Use a header file that comes with gcc, so configuring glibc
3188   # with a fresh cross-compiler works.
3189   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3190   # <limits.h> exists even on freestanding compilers.
3191   # On the NeXT, cc -E runs the code through the compiler's parser,
3192   # not just through cpp. "Syntax error" is here to catch this case.
3193   cat >conftest.$ac_ext <<_ACEOF
3194 /* confdefs.h.  */
3195 _ACEOF
3196 cat confdefs.h >>conftest.$ac_ext
3197 cat >>conftest.$ac_ext <<_ACEOF
3198 /* end confdefs.h.  */
3199 #ifdef __STDC__
3200 # include <limits.h>
3201 #else
3202 # include <assert.h>
3203 #endif
3204                      Syntax error
3205 _ACEOF
3206 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3207   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3208   ac_status=$?
3209   grep -v '^ *+' conftest.er1 >conftest.err
3210   rm -f conftest.er1
3211   cat conftest.err >&5
3212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3213   (exit $ac_status); } >/dev/null; then
3214   if test -s conftest.err; then
3215     ac_cpp_err=$ac_c_preproc_warn_flag
3216     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3217   else
3218     ac_cpp_err=
3219   fi
3220 else
3221   ac_cpp_err=yes
3222 fi
3223 if test -z "$ac_cpp_err"; then
3224   :
3225 else
3226   echo "$as_me: failed program was:" >&5
3227 sed 's/^/| /' conftest.$ac_ext >&5
3228
3229   # Broken: fails on valid input.
3230 continue
3231 fi
3232 rm -f conftest.err conftest.$ac_ext
3233
3234   # OK, works on sane cases.  Now check whether non-existent headers
3235   # can be detected and how.
3236   cat >conftest.$ac_ext <<_ACEOF
3237 /* confdefs.h.  */
3238 _ACEOF
3239 cat confdefs.h >>conftest.$ac_ext
3240 cat >>conftest.$ac_ext <<_ACEOF
3241 /* end confdefs.h.  */
3242 #include <ac_nonexistent.h>
3243 _ACEOF
3244 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3245   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3246   ac_status=$?
3247   grep -v '^ *+' conftest.er1 >conftest.err
3248   rm -f conftest.er1
3249   cat conftest.err >&5
3250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3251   (exit $ac_status); } >/dev/null; then
3252   if test -s conftest.err; then
3253     ac_cpp_err=$ac_c_preproc_warn_flag
3254     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3255   else
3256     ac_cpp_err=
3257   fi
3258 else
3259   ac_cpp_err=yes
3260 fi
3261 if test -z "$ac_cpp_err"; then
3262   # Broken: success on invalid input.
3263 continue
3264 else
3265   echo "$as_me: failed program was:" >&5
3266 sed 's/^/| /' conftest.$ac_ext >&5
3267
3268   # Passes both tests.
3269 ac_preproc_ok=:
3270 break
3271 fi
3272 rm -f conftest.err conftest.$ac_ext
3273
3274 done
3275 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3276 rm -f conftest.err conftest.$ac_ext
3277 if $ac_preproc_ok; then
3278   :
3279 else
3280   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3281 See \`config.log' for more details." >&5
3282 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3283 See \`config.log' for more details." >&2;}
3284    { (exit 1); exit 1; }; }
3285 fi
3286
3287 ac_ext=c
3288 ac_cpp='$CPP $CPPFLAGS'
3289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3292
3293
3294
3295 # Create compiler version string
3296 if test x"$GCC" = x"yes" ; then
3297   cc_string="GCC `${CC} --version | sed q`"
3298 else
3299   cc_string=$CC
3300 fi
3301
3302 cat >>confdefs.h <<_ACEOF
3303 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3304 _ACEOF
3305
3306
3307
3308 #
3309 # Set up TAS assembly code if needed; the template file has now had its
3310 # chance to request this.
3311 #
3312           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3313
3314
3315 if test "$need_tas" = yes ; then
3316   TAS=tas.o
3317 else
3318   TAS=""
3319 fi
3320
3321
3322
3323 #
3324 # Automatic dependency tracking
3325 #
3326
3327
3328 # Check whether --enable-depend or --disable-depend was given.
3329 if test "${enable_depend+set}" = set; then
3330   enableval="$enable_depend"
3331
3332   case $enableval in
3333     yes)
3334       autodepend=yes
3335       ;;
3336     no)
3337       :
3338       ;;
3339     *)
3340       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3341 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3342    { (exit 1); exit 1; }; }
3343       ;;
3344   esac
3345
3346 else
3347   enable_depend=no
3348
3349 fi;
3350
3351
3352
3353
3354 #
3355 # Enable assert checks
3356 #
3357
3358
3359 # Check whether --enable-cassert or --disable-cassert was given.
3360 if test "${enable_cassert+set}" = set; then
3361   enableval="$enable_cassert"
3362
3363   case $enableval in
3364     yes)
3365
3366 cat >>confdefs.h <<\_ACEOF
3367 #define USE_ASSERT_CHECKING 1
3368 _ACEOF
3369
3370       ;;
3371     no)
3372       :
3373       ;;
3374     *)
3375       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3376 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3377    { (exit 1); exit 1; }; }
3378       ;;
3379   esac
3380
3381 else
3382   enable_cassert=no
3383
3384 fi;
3385
3386
3387
3388 #
3389 # Include directories
3390 #
3391 ac_save_IFS=$IFS
3392 IFS="${IFS}${PATH_SEPARATOR}"
3393 # SRCH_INC comes from the template file
3394 for dir in $with_includes $SRCH_INC; do
3395   if test -d "$dir"; then
3396     INCLUDES="$INCLUDES -I$dir"
3397   else
3398     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3399 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3400   fi
3401 done
3402 IFS=$ac_save_IFS
3403
3404
3405
3406 #
3407 # Library directories
3408 #
3409 ac_save_IFS=$IFS
3410 IFS="${IFS}${PATH_SEPARATOR}"
3411 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3412 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3413   if test -d "$dir"; then
3414     LIBDIRS="$LIBDIRS -L$dir"
3415   else
3416     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3417 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3418   fi
3419 done
3420 IFS=$ac_save_IFS
3421
3422 #
3423 # Enable thread-safe client libraries
3424 #
3425 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3426 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3427
3428
3429 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3430 if test "${enable_thread_safety+set}" = set; then
3431   enableval="$enable_thread_safety"
3432
3433   case $enableval in
3434     yes)
3435       :
3436       ;;
3437     no)
3438       :
3439       ;;
3440     *)
3441       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3442 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3443    { (exit 1); exit 1; }; }
3444       ;;
3445   esac
3446
3447 else
3448   enable_thread_safety=no
3449
3450 fi;
3451
3452
3453
3454 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3455 if test "${enable_thread_safety_force+set}" = set; then
3456   enableval="$enable_thread_safety_force"
3457
3458   case $enableval in
3459     yes)
3460       :
3461       ;;
3462     no)
3463       :
3464       ;;
3465     *)
3466       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3467 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3468    { (exit 1); exit 1; }; }
3469       ;;
3470   esac
3471
3472 else
3473   enable_thread_safety_force=no
3474
3475 fi;
3476
3477 if test "$enable_thread_safety" = yes -o \
3478         "$enable_thread_safety_force" = yes; then
3479   enable_thread_safety="yes"    # for 'force'
3480
3481 cat >>confdefs.h <<\_ACEOF
3482 #define ENABLE_THREAD_SAFETY 1
3483 _ACEOF
3484
3485 fi
3486 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3487 echo "${ECHO_T}$enable_thread_safety" >&6
3488
3489
3490 #
3491 # Optionally build Tcl modules (PL/Tcl)
3492 #
3493 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3494 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3495
3496
3497
3498 # Check whether --with-tcl or --without-tcl was given.
3499 if test "${with_tcl+set}" = set; then
3500   withval="$with_tcl"
3501
3502   case $withval in
3503     yes)
3504       :
3505       ;;
3506     no)
3507       :
3508       ;;
3509     *)
3510       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3511 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3512    { (exit 1); exit 1; }; }
3513       ;;
3514   esac
3515
3516 else
3517   with_tcl=no
3518
3519 fi;
3520
3521 echo "$as_me:$LINENO: result: $with_tcl" >&5
3522 echo "${ECHO_T}$with_tcl" >&6
3523
3524
3525 # We see if the path to the Tcl/Tk configuration scripts is specified.
3526 # This will override the use of tclsh to find the paths to search.
3527
3528
3529
3530
3531 # Check whether --with-tclconfig or --without-tclconfig was given.
3532 if test "${with_tclconfig+set}" = set; then
3533   withval="$with_tclconfig"
3534
3535   case $withval in
3536     yes)
3537       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3538 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3539    { (exit 1); exit 1; }; }
3540       ;;
3541     no)
3542       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3543 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3544    { (exit 1); exit 1; }; }
3545       ;;
3546     *)
3547
3548       ;;
3549   esac
3550
3551 fi;
3552
3553
3554 #
3555 # Optionally build Perl modules (PL/Perl)
3556 #
3557 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3558 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3559
3560
3561
3562 # Check whether --with-perl or --without-perl was given.
3563 if test "${with_perl+set}" = set; then
3564   withval="$with_perl"
3565
3566   case $withval in
3567     yes)
3568       :
3569       ;;
3570     no)
3571       :
3572       ;;
3573     *)
3574       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3575 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3576    { (exit 1); exit 1; }; }
3577       ;;
3578   esac
3579
3580 else
3581   with_perl=no
3582
3583 fi;
3584
3585 echo "$as_me:$LINENO: result: $with_perl" >&5
3586 echo "${ECHO_T}$with_perl" >&6
3587
3588
3589 #
3590 # Optionally build Python modules (PL/Python)
3591 #
3592 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3593 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3594
3595
3596
3597 # Check whether --with-python or --without-python was given.
3598 if test "${with_python+set}" = set; then
3599   withval="$with_python"
3600
3601   case $withval in
3602     yes)
3603       :
3604       ;;
3605     no)
3606       :
3607       ;;
3608     *)
3609       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3610 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3611    { (exit 1); exit 1; }; }
3612       ;;
3613   esac
3614
3615 else
3616   with_python=no
3617
3618 fi;
3619
3620 echo "$as_me:$LINENO: result: $with_python" >&5
3621 echo "${ECHO_T}$with_python" >&6
3622
3623
3624 #
3625 # Kerberos 5
3626 #
3627 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3628 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3629
3630
3631
3632 # Check whether --with-krb5 or --without-krb5 was given.
3633 if test "${with_krb5+set}" = set; then
3634   withval="$with_krb5"
3635
3636   case $withval in
3637     yes)
3638
3639
3640 cat >>confdefs.h <<\_ACEOF
3641 #define KRB5 1
3642 _ACEOF
3643
3644   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3645
3646       ;;
3647     no)
3648       :
3649       ;;
3650     *)
3651       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3652 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3653    { (exit 1); exit 1; }; }
3654       ;;
3655   esac
3656
3657 else
3658   with_krb5=no
3659
3660 fi;
3661
3662 echo "$as_me:$LINENO: result: $with_krb5" >&5
3663 echo "${ECHO_T}$with_krb5" >&6
3664
3665
3666
3667
3668
3669
3670 #
3671 # Kerberos configuration parameters
3672 #
3673
3674
3675
3676 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3677 if test "${with_krb_srvnam+set}" = set; then
3678   withval="$with_krb_srvnam"
3679
3680   case $withval in
3681     yes)
3682       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3683 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3684    { (exit 1); exit 1; }; }
3685       ;;
3686     no)
3687       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3688 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3689    { (exit 1); exit 1; }; }
3690       ;;
3691     *)
3692
3693       ;;
3694   esac
3695
3696 else
3697   with_krb_srvnam="postgres"
3698 fi;
3699
3700
3701 cat >>confdefs.h <<_ACEOF
3702 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3703 _ACEOF
3704
3705
3706
3707 #
3708 # PAM
3709 #
3710 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3711 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3712
3713
3714
3715 # Check whether --with-pam or --without-pam was given.
3716 if test "${with_pam+set}" = set; then
3717   withval="$with_pam"
3718
3719   case $withval in
3720     yes)
3721
3722 cat >>confdefs.h <<\_ACEOF
3723 #define USE_PAM 1
3724 _ACEOF
3725
3726       ;;
3727     no)
3728       :
3729       ;;
3730     *)
3731       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3732 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3733    { (exit 1); exit 1; }; }
3734       ;;
3735   esac
3736
3737 else
3738   with_pam=no
3739
3740 fi;
3741
3742 echo "$as_me:$LINENO: result: $with_pam" >&5
3743 echo "${ECHO_T}$with_pam" >&6
3744
3745
3746
3747 #
3748 # Bonjour
3749 #
3750 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
3751 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
3752
3753
3754
3755 # Check whether --with-bonjour or --without-bonjour was given.
3756 if test "${with_bonjour+set}" = set; then
3757   withval="$with_bonjour"
3758
3759   case $withval in
3760     yes)
3761
3762 cat >>confdefs.h <<\_ACEOF
3763 #define USE_BONJOUR 1
3764 _ACEOF
3765
3766       ;;
3767     no)
3768       :
3769       ;;
3770     *)
3771       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
3772 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
3773    { (exit 1); exit 1; }; }
3774       ;;
3775   esac
3776
3777 else
3778   with_bonjour=no
3779
3780 fi;
3781
3782 echo "$as_me:$LINENO: result: $with_bonjour" >&5
3783 echo "${ECHO_T}$with_bonjour" >&6
3784
3785
3786
3787 #
3788 # OpenSSL
3789 #
3790 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3791 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
3792
3793
3794
3795 # Check whether --with-openssl or --without-openssl was given.
3796 if test "${with_openssl+set}" = set; then
3797   withval="$with_openssl"
3798
3799   case $withval in
3800     yes)
3801
3802 cat >>confdefs.h <<\_ACEOF
3803 #define USE_SSL 1
3804 _ACEOF
3805
3806       ;;
3807     no)
3808       :
3809       ;;
3810     *)
3811       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3812 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3813    { (exit 1); exit 1; }; }
3814       ;;
3815   esac
3816
3817 else
3818   with_openssl=no
3819
3820 fi;
3821
3822 echo "$as_me:$LINENO: result: $with_openssl" >&5
3823 echo "${ECHO_T}$with_openssl" >&6
3824
3825
3826
3827 #
3828 # Readline
3829 #
3830
3831
3832
3833 # Check whether --with-readline or --without-readline was given.
3834 if test "${with_readline+set}" = set; then
3835   withval="$with_readline"
3836
3837   case $withval in
3838     yes)
3839       :
3840       ;;
3841     no)
3842       :
3843       ;;
3844     *)
3845       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
3846 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
3847    { (exit 1); exit 1; }; }
3848       ;;
3849   esac
3850
3851 else
3852   with_readline=yes
3853
3854 fi;
3855
3856 # readline on MinGW has problems with backslashes in psql and other bugs.
3857 # This is particularly a problem with non-US code pages.
3858 # Therefore disable its use until we understand the cause. 2004-07-20
3859 if test "$PORTNAME" = "win32"; then
3860   if test "$with_readline" = yes; then
3861     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
3862 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
3863     with_readline=no
3864   fi
3865 fi
3866
3867
3868 #
3869 # Zlib
3870 #
3871
3872
3873
3874 # Check whether --with-zlib or --without-zlib was given.
3875 if test "${with_zlib+set}" = set; then
3876   withval="$with_zlib"
3877
3878   case $withval in
3879     yes)
3880       :
3881       ;;
3882     no)
3883       :
3884       ;;
3885     *)
3886       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
3887 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
3888    { (exit 1); exit 1; }; }
3889       ;;
3890   esac
3891
3892 else
3893   with_zlib=yes
3894
3895 fi;
3896
3897
3898
3899 #
3900 # Elf
3901 #
3902
3903 # Assume system is ELF if it predefines __ELF__ as 1,
3904 # otherwise believe host_os based default.
3905 case $host_os in
3906     freebsd1*|freebsd2*) elf=no;;
3907     freebsd3*|freebsd4*) elf=yes;;
3908 esac
3909
3910
3911 echo "$as_me:$LINENO: checking for egrep" >&5
3912 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3913 if test "${ac_cv_prog_egrep+set}" = set; then
3914   echo $ECHO_N "(cached) $ECHO_C" >&6
3915 else
3916   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3917     then ac_cv_prog_egrep='grep -E'
3918     else ac_cv_prog_egrep='egrep'
3919     fi
3920 fi
3921 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3922 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3923  EGREP=$ac_cv_prog_egrep
3924
3925
3926 cat >conftest.$ac_ext <<_ACEOF
3927 /* confdefs.h.  */
3928 _ACEOF
3929 cat confdefs.h >>conftest.$ac_ext
3930 cat >>conftest.$ac_ext <<_ACEOF
3931 /* end confdefs.h.  */
3932 #if __ELF__
3933   yes
3934 #endif
3935
3936 _ACEOF
3937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3938   $EGREP "yes" >/dev/null 2>&1; then
3939   ELF_SYS=true
3940 else
3941   if test "X$elf" = "Xyes" ; then
3942   ELF_SYS=true
3943 else
3944   ELF_SYS=
3945 fi
3946 fi
3947 rm -f conftest*
3948
3949
3950
3951 #
3952 # Assignments
3953 #
3954
3955 CPPFLAGS="$CPPFLAGS $INCLUDES"
3956 LDFLAGS="$LDFLAGS $LIBDIRS"
3957
3958 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
3959 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
3960 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
3961 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
3962
3963
3964
3965 for ac_prog in gawk mawk nawk awk
3966 do
3967   # Extract the first word of "$ac_prog", so it can be a program name with args.
3968 set dummy $ac_prog; ac_word=$2
3969 echo "$as_me:$LINENO: checking for $ac_word" >&5
3970 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3971 if test "${ac_cv_prog_AWK+set}" = set; then
3972   echo $ECHO_N "(cached) $ECHO_C" >&6
3973 else
3974   if test -n "$AWK"; then
3975   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3976 else
3977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3978 for as_dir in $PATH
3979 do
3980   IFS=$as_save_IFS
3981   test -z "$as_dir" && as_dir=.
3982   for ac_exec_ext in '' $ac_executable_extensions; do
3983   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3984     ac_cv_prog_AWK="$ac_prog"
3985     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3986     break 2
3987   fi
3988 done
3989 done
3990
3991 fi
3992 fi
3993 AWK=$ac_cv_prog_AWK
3994 if test -n "$AWK"; then
3995   echo "$as_me:$LINENO: result: $AWK" >&5
3996 echo "${ECHO_T}$AWK" >&6
3997 else
3998   echo "$as_me:$LINENO: result: no" >&5
3999 echo "${ECHO_T}no" >&6
4000 fi
4001
4002   test -n "$AWK" && break
4003 done
4004
4005 echo "$as_me:$LINENO: checking for flex" >&5
4006 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4007 if test "${pgac_cv_path_flex+set}" = set; then
4008   echo $ECHO_N "(cached) $ECHO_C" >&6
4009 else
4010   # Let the user override the test
4011 if test -n "$FLEX"; then
4012   pgac_cv_path_flex=$FLEX
4013 else
4014   pgac_save_IFS=$IFS
4015   IFS=$PATH_SEPARATOR
4016   for pgac_dir in $PATH; do
4017     IFS=$pgac_save_IFS
4018     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4019       pgac_dir=`pwd`
4020     fi
4021     for pgac_prog in flex lex; do
4022       pgac_candidate="$pgac_dir/$pgac_prog"
4023       if test -f "$pgac_candidate" \
4024         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4025       then
4026         echo '%%'  > conftest.l
4027         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4028           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4029             pgac_broken_flex=$pgac_candidate
4030             continue
4031           fi
4032
4033           pgac_cv_path_flex=$pgac_candidate
4034           break 2
4035         fi
4036       fi
4037     done
4038   done
4039   rm -f conftest.l lex.yy.c
4040   : ${pgac_cv_path_flex=no}
4041 fi
4042
4043 fi
4044 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4045 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4046 if test x"$pgac_cv_path_flex" = x"no"; then
4047   if test -n "$pgac_broken_flex"; then
4048     { echo "$as_me:$LINENO: WARNING:
4049 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4050 *** should get version 2.5.4 or later." >&5
4051 echo "$as_me: WARNING:
4052 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4053 *** should get version 2.5.4 or later." >&2;}
4054   fi
4055
4056   { echo "$as_me:$LINENO: WARNING:
4057 *** Without Flex you will not be able to build PostgreSQL from CVS or
4058 *** change any of the scanner definition files.  You can obtain Flex from
4059 *** a GNU mirror site.  (If you are using the official distribution of
4060 *** PostgreSQL then you do not need to worry about this because the Flex
4061 *** output is pre-generated.)" >&5
4062 echo "$as_me: WARNING:
4063 *** Without Flex you will not be able to build PostgreSQL from CVS or
4064 *** change any of the scanner definition files.  You can obtain Flex from
4065 *** a GNU mirror site.  (If you are using the official distribution of
4066 *** PostgreSQL then you do not need to worry about this because the Flex
4067 *** output is pre-generated.)" >&2;}
4068 fi
4069
4070 if test x"$pgac_cv_path_flex" = x"no"; then
4071   FLEX=
4072 else
4073   FLEX=$pgac_cv_path_flex
4074 fi
4075
4076
4077
4078
4079 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4080 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4081 LN_S=$as_ln_s
4082 if test "$LN_S" = "ln -s"; then
4083   echo "$as_me:$LINENO: result: yes" >&5
4084 echo "${ECHO_T}yes" >&6
4085 else
4086   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4087 echo "${ECHO_T}no, using $LN_S" >&6
4088 fi
4089
4090
4091 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4092 if test "${with_gnu_ld+set}" = set; then
4093   withval="$with_gnu_ld"
4094   test "$withval" = no || with_gnu_ld=yes
4095 else
4096   with_gnu_ld=no
4097 fi;
4098 ac_prog=ld
4099 if test "$GCC" = yes; then
4100   # Check if gcc -print-prog-name=ld gives a path.
4101   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4102 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4103   case $host in
4104   *-*-mingw*)
4105     # gcc leaves a trailing carriage return which upsets mingw
4106     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4107   *)
4108     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4109   esac
4110   case "$ac_prog" in
4111     # Accept absolute paths.
4112     [\\/]* | [A-Za-z]:[\\/]*)
4113       re_direlt='/[^/][^/]*/\.\./'
4114       # Canonicalize the path of ld
4115       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4116       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4117         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4118       done
4119       test -z "$LD" && LD="$ac_prog"
4120       ;;
4121   "")
4122     # If it fails, then pretend we aren't using GCC.
4123     ac_prog=ld
4124     ;;
4125   *)
4126     # If it is relative, then search for the first ld in PATH.
4127     with_gnu_ld=unknown
4128     ;;
4129   esac
4130 elif test "$with_gnu_ld" = yes; then
4131   echo "$as_me:$LINENO: checking for GNU ld" >&5
4132 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4133 else
4134   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4135 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4136 fi
4137 if test "${ac_cv_path_LD+set}" = set; then
4138   echo $ECHO_N "(cached) $ECHO_C" >&6
4139 else
4140   if test -z "$LD"; then
4141   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4142   for ac_dir in $PATH; do
4143     test -z "$ac_dir" && ac_dir=.
4144     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4145       ac_cv_path_LD="$ac_dir/$ac_prog"
4146       # Check to see if the program is GNU ld.  I'd rather use --version,
4147       # but apparently some GNU ld's only accept -v.
4148       # Break only if it was the GNU/non-GNU ld that we prefer.
4149       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4150         test "$with_gnu_ld" != no && break
4151       else
4152         test "$with_gnu_ld" != yes && break
4153       fi
4154     fi
4155   done
4156   IFS="$ac_save_ifs"
4157 else
4158   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4159 fi
4160 fi
4161
4162 LD="$ac_cv_path_LD"
4163 if test -n "$LD"; then
4164   echo "$as_me:$LINENO: result: $LD" >&5
4165 echo "${ECHO_T}$LD" >&6
4166 else
4167   echo "$as_me:$LINENO: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4169 fi
4170 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4171 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4172    { (exit 1); exit 1; }; }
4173 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4174 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4175 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4176   echo $ECHO_N "(cached) $ECHO_C" >&6
4177 else
4178   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4179 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4180   ac_cv_prog_gnu_ld=yes
4181 else
4182   ac_cv_prog_gnu_ld=no
4183 fi
4184 fi
4185 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4186 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4187 with_gnu_ld=$ac_cv_prog_gnu_ld
4188
4189
4190
4191
4192 case $host_os in sysv5*)
4193   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4194 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4195 if test "${pgac_cv_prog_ld_R+set}" = set; then
4196   echo $ECHO_N "(cached) $ECHO_C" >&6
4197 else
4198
4199     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4200     cat >conftest.$ac_ext <<_ACEOF
4201 /* confdefs.h.  */
4202 _ACEOF
4203 cat confdefs.h >>conftest.$ac_ext
4204 cat >>conftest.$ac_ext <<_ACEOF
4205 /* end confdefs.h.  */
4206
4207 int
4208 main ()
4209 {
4210
4211   ;
4212   return 0;
4213 }
4214 _ACEOF
4215 rm -f conftest.$ac_objext conftest$ac_exeext
4216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4217   (eval $ac_link) 2>conftest.er1
4218   ac_status=$?
4219   grep -v '^ *+' conftest.er1 >conftest.err
4220   rm -f conftest.er1
4221   cat conftest.err >&5
4222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4223   (exit $ac_status); } &&
4224          { ac_try='test -z "$ac_c_werror_flag"
4225                          || test ! -s conftest.err'
4226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4227   (eval $ac_try) 2>&5
4228   ac_status=$?
4229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4230   (exit $ac_status); }; } &&
4231          { ac_try='test -s conftest$ac_exeext'
4232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4233   (eval $ac_try) 2>&5
4234   ac_status=$?
4235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4236   (exit $ac_status); }; }; then
4237   pgac_cv_prog_ld_R=yes
4238 else
4239   echo "$as_me: failed program was:" >&5
4240 sed 's/^/| /' conftest.$ac_ext >&5
4241
4242 pgac_cv_prog_ld_R=no
4243 fi
4244 rm -f conftest.err conftest.$ac_objext \
4245       conftest$ac_exeext conftest.$ac_ext
4246     LDFLAGS=$pgac_save_LDFLAGS
4247
4248 fi
4249 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4250 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4251   ld_R_works=$pgac_cv_prog_ld_R
4252
4253 esac
4254 if test -n "$ac_tool_prefix"; then
4255   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4256 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4257 echo "$as_me:$LINENO: checking for $ac_word" >&5
4258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4259 if test "${ac_cv_prog_RANLIB+set}" = set; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   if test -n "$RANLIB"; then
4263   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4264 else
4265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4266 for as_dir in $PATH
4267 do
4268   IFS=$as_save_IFS
4269   test -z "$as_dir" && as_dir=.
4270   for ac_exec_ext in '' $ac_executable_extensions; do
4271   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4272     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4273     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4274     break 2
4275   fi
4276 done
4277 done
4278
4279 fi
4280 fi
4281 RANLIB=$ac_cv_prog_RANLIB
4282 if test -n "$RANLIB"; then
4283   echo "$as_me:$LINENO: result: $RANLIB" >&5
4284 echo "${ECHO_T}$RANLIB" >&6
4285 else
4286   echo "$as_me:$LINENO: result: no" >&5
4287 echo "${ECHO_T}no" >&6
4288 fi
4289
4290 fi
4291 if test -z "$ac_cv_prog_RANLIB"; then
4292   ac_ct_RANLIB=$RANLIB
4293   # Extract the first word of "ranlib", so it can be a program name with args.
4294 set dummy ranlib; ac_word=$2
4295 echo "$as_me:$LINENO: checking for $ac_word" >&5
4296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4297 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4298   echo $ECHO_N "(cached) $ECHO_C" >&6
4299 else
4300   if test -n "$ac_ct_RANLIB"; then
4301   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4302 else
4303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304 for as_dir in $PATH
4305 do
4306   IFS=$as_save_IFS
4307   test -z "$as_dir" && as_dir=.
4308   for ac_exec_ext in '' $ac_executable_extensions; do
4309   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4310     ac_cv_prog_ac_ct_RANLIB="ranlib"
4311     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4312     break 2
4313   fi
4314 done
4315 done
4316
4317   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4318 fi
4319 fi
4320 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4321 if test -n "$ac_ct_RANLIB"; then
4322   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4323 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4324 else
4325   echo "$as_me:$LINENO: result: no" >&5
4326 echo "${ECHO_T}no" >&6
4327 fi
4328
4329   RANLIB=$ac_ct_RANLIB
4330 else
4331   RANLIB="$ac_cv_prog_RANLIB"
4332 fi
4333
4334 for ac_prog in lorder
4335 do
4336   # Extract the first word of "$ac_prog", so it can be a program name with args.
4337 set dummy $ac_prog; ac_word=$2
4338 echo "$as_me:$LINENO: checking for $ac_word" >&5
4339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4340 if test "${ac_cv_prog_LORDER+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343   if test -n "$LORDER"; then
4344   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
4345 else
4346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4347 for as_dir in $PATH
4348 do
4349   IFS=$as_save_IFS
4350   test -z "$as_dir" && as_dir=.
4351   for ac_exec_ext in '' $ac_executable_extensions; do
4352   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4353     ac_cv_prog_LORDER="$ac_prog"
4354     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4355     break 2
4356   fi
4357 done
4358 done
4359
4360 fi
4361 fi
4362 LORDER=$ac_cv_prog_LORDER
4363 if test -n "$LORDER"; then
4364   echo "$as_me:$LINENO: result: $LORDER" >&5
4365 echo "${ECHO_T}$LORDER" >&6
4366 else
4367   echo "$as_me:$LINENO: result: no" >&5
4368 echo "${ECHO_T}no" >&6
4369 fi
4370
4371   test -n "$LORDER" && break
4372 done
4373
4374 # Extract the first word of "tar", so it can be a program name with args.
4375 set dummy tar; ac_word=$2
4376 echo "$as_me:$LINENO: checking for $ac_word" >&5
4377 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4378 if test "${ac_cv_path_TAR+set}" = set; then
4379   echo $ECHO_N "(cached) $ECHO_C" >&6
4380 else
4381   case $TAR in
4382   [\\/]* | ?:[\\/]*)
4383   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4384   ;;
4385   *)
4386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387 for as_dir in $PATH
4388 do
4389   IFS=$as_save_IFS
4390   test -z "$as_dir" && as_dir=.
4391   for ac_exec_ext in '' $ac_executable_extensions; do
4392   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4393     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4394     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4395     break 2
4396   fi
4397 done
4398 done
4399
4400   ;;
4401 esac
4402 fi
4403 TAR=$ac_cv_path_TAR
4404
4405 if test -n "$TAR"; then
4406   echo "$as_me:$LINENO: result: $TAR" >&5
4407 echo "${ECHO_T}$TAR" >&6
4408 else
4409   echo "$as_me:$LINENO: result: no" >&5
4410 echo "${ECHO_T}no" >&6
4411 fi
4412
4413
4414   if test -n "$ac_tool_prefix"; then
4415   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4416 set dummy ${ac_tool_prefix}strip; ac_word=$2
4417 echo "$as_me:$LINENO: checking for $ac_word" >&5
4418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4419 if test "${ac_cv_prog_STRIP+set}" = set; then
4420   echo $ECHO_N "(cached) $ECHO_C" >&6
4421 else
4422   if test -n "$STRIP"; then
4423   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4424 else
4425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4426 for as_dir in $PATH
4427 do
4428   IFS=$as_save_IFS
4429   test -z "$as_dir" && as_dir=.
4430   for ac_exec_ext in '' $ac_executable_extensions; do
4431   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4432     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4433     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4434     break 2
4435   fi
4436 done
4437 done
4438
4439 fi
4440 fi
4441 STRIP=$ac_cv_prog_STRIP
4442 if test -n "$STRIP"; then
4443   echo "$as_me:$LINENO: result: $STRIP" >&5
4444 echo "${ECHO_T}$STRIP" >&6
4445 else
4446   echo "$as_me:$LINENO: result: no" >&5
4447 echo "${ECHO_T}no" >&6
4448 fi
4449
4450 fi
4451 if test -z "$ac_cv_prog_STRIP"; then
4452   ac_ct_STRIP=$STRIP
4453   # Extract the first word of "strip", so it can be a program name with args.
4454 set dummy strip; ac_word=$2
4455 echo "$as_me:$LINENO: checking for $ac_word" >&5
4456 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4457 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4458   echo $ECHO_N "(cached) $ECHO_C" >&6
4459 else
4460   if test -n "$ac_ct_STRIP"; then
4461   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4462 else
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464 for as_dir in $PATH
4465 do
4466   IFS=$as_save_IFS
4467   test -z "$as_dir" && as_dir=.
4468   for ac_exec_ext in '' $ac_executable_extensions; do
4469   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4470     ac_cv_prog_ac_ct_STRIP="strip"
4471     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4472     break 2
4473   fi
4474 done
4475 done
4476
4477   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4478 fi
4479 fi
4480 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4481 if test -n "$ac_ct_STRIP"; then
4482   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4483 echo "${ECHO_T}$ac_ct_STRIP" >&6
4484 else
4485   echo "$as_me:$LINENO: result: no" >&5
4486 echo "${ECHO_T}no" >&6
4487 fi
4488
4489   STRIP=$ac_ct_STRIP
4490 else
4491   STRIP="$ac_cv_prog_STRIP"
4492 fi
4493
4494
4495   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4496 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4497   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4498     STRIP_STATIC_LIB="$STRIP -x"
4499     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4500     echo "$as_me:$LINENO: result: yes" >&5
4501 echo "${ECHO_T}yes" >&6
4502   else
4503     STRIP_STATIC_LIB=:
4504     STRIP_SHARED_LIB=:
4505     echo "$as_me:$LINENO: result: no" >&5
4506 echo "${ECHO_T}no" >&6
4507   fi
4508
4509
4510
4511
4512 for ac_prog in 'bison -y'
4513 do
4514   # Extract the first word of "$ac_prog", so it can be a program name with args.
4515 set dummy $ac_prog; ac_word=$2
4516 echo "$as_me:$LINENO: checking for $ac_word" >&5
4517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4518 if test "${ac_cv_prog_YACC+set}" = set; then
4519   echo $ECHO_N "(cached) $ECHO_C" >&6
4520 else
4521   if test -n "$YACC"; then
4522   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4523 else
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525 for as_dir in $PATH
4526 do
4527   IFS=$as_save_IFS
4528   test -z "$as_dir" && as_dir=.
4529   for ac_exec_ext in '' $ac_executable_extensions; do
4530   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4531     ac_cv_prog_YACC="$ac_prog"
4532     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4533     break 2
4534   fi
4535 done
4536 done
4537
4538 fi
4539 fi
4540 YACC=$ac_cv_prog_YACC
4541 if test -n "$YACC"; then
4542   echo "$as_me:$LINENO: result: $YACC" >&5
4543 echo "${ECHO_T}$YACC" >&6
4544 else
4545   echo "$as_me:$LINENO: result: no" >&5
4546 echo "${ECHO_T}no" >&6
4547 fi
4548
4549   test -n "$YACC" && break
4550 done
4551
4552
4553 if test "$YACC"; then
4554   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4555     { echo "$as_me:$LINENO: WARNING:
4556 *** If you are going to modify the grammar files or build from CVS, the installed
4557 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4558 echo "$as_me: WARNING:
4559 *** If you are going to modify the grammar files or build from CVS, the installed
4560 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4561   fi
4562 fi
4563
4564 if test -z "$YACC"; then
4565   { echo "$as_me:$LINENO: WARNING:
4566 *** Without Bison you will not be able to build PostgreSQL from CVS or
4567 *** change any of the parser definition files.  You can obtain Bison from
4568 *** a GNU mirror site.  (If you are using the official distribution of
4569 *** PostgreSQL then you do not need to worry about this because the Bison
4570 *** output is pre-generated.)  To use a different yacc program (possible,
4571 *** but not recommended), set the environment variable YACC before running
4572 *** 'configure'." >&5
4573 echo "$as_me: WARNING:
4574 *** Without Bison you will not be able to build PostgreSQL from CVS or
4575 *** change any of the parser definition files.  You can obtain Bison from
4576 *** a GNU mirror site.  (If you are using the official distribution of
4577 *** PostgreSQL then you do not need to worry about this because the Bison
4578 *** output is pre-generated.)  To use a different yacc program (possible,
4579 *** but not recommended), set the environment variable YACC before running
4580 *** 'configure'." >&2;}
4581 fi
4582
4583
4584 # Extract the first word of "perl", so it can be a program name with args.
4585 set dummy perl; ac_word=$2
4586 echo "$as_me:$LINENO: checking for $ac_word" >&5
4587 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4588 if test "${ac_cv_path_PERL+set}" = set; then
4589   echo $ECHO_N "(cached) $ECHO_C" >&6
4590 else
4591   case $PERL in
4592   [\\/]* | ?:[\\/]*)
4593   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4594   ;;
4595   *)
4596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597 for as_dir in $PATH
4598 do
4599   IFS=$as_save_IFS
4600   test -z "$as_dir" && as_dir=.
4601   for ac_exec_ext in '' $ac_executable_extensions; do
4602   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4603     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4604     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4605     break 2
4606   fi
4607 done
4608 done
4609
4610   ;;
4611 esac
4612 fi
4613 PERL=$ac_cv_path_PERL
4614
4615 if test -n "$PERL"; then
4616   echo "$as_me:$LINENO: result: $PERL" >&5
4617 echo "${ECHO_T}$PERL" >&6
4618 else
4619   echo "$as_me:$LINENO: result: no" >&5
4620 echo "${ECHO_T}no" >&6
4621 fi
4622
4623 if test "$with_perl" = yes; then
4624
4625 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4626 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4627 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4628 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4629 echo "${ECHO_T}$perl_archlibexp" >&6
4630 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4631 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4632 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4633 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4634 echo "${ECHO_T}$perl_privlibexp" >&6
4635 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4636 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4637 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4638 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4639 echo "${ECHO_T}$perl_useshrplib" >&6
4640
4641 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4642 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4643 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4644 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4645 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4646 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4647 echo "${ECHO_T}$perl_embed_ldflags" >&6
4648 fi
4649
4650 if test "$with_python" = yes; then
4651   # Extract the first word of "python", so it can be a program name with args.
4652 set dummy python; ac_word=$2
4653 echo "$as_me:$LINENO: checking for $ac_word" >&5
4654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4655 if test "${ac_cv_path_PYTHON+set}" = set; then
4656   echo $ECHO_N "(cached) $ECHO_C" >&6
4657 else
4658   case $PYTHON in
4659   [\\/]* | ?:[\\/]*)
4660   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4661   ;;
4662   *)
4663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664 for as_dir in $PATH
4665 do
4666   IFS=$as_save_IFS
4667   test -z "$as_dir" && as_dir=.
4668   for ac_exec_ext in '' $ac_executable_extensions; do
4669   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4670     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4671     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4672     break 2
4673   fi
4674 done
4675 done
4676
4677   ;;
4678 esac
4679 fi
4680 PYTHON=$ac_cv_path_PYTHON
4681
4682 if test -n "$PYTHON"; then
4683   echo "$as_me:$LINENO: result: $PYTHON" >&5
4684 echo "${ECHO_T}$PYTHON" >&6
4685 else
4686   echo "$as_me:$LINENO: result: no" >&5
4687 echo "${ECHO_T}no" >&6
4688 fi
4689
4690 if test x"$PYTHON" = x""; then
4691   { { echo "$as_me:$LINENO: error: Python not found" >&5
4692 echo "$as_me: error: Python not found" >&2;}
4693    { (exit 1); exit 1; }; }
4694 fi
4695
4696
4697 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4698 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4699 if "${PYTHON}" 2>&- -c 'import distutils'
4700 then
4701     echo "$as_me:$LINENO: result: yes" >&5
4702 echo "${ECHO_T}yes" >&6
4703 else
4704     echo "$as_me:$LINENO: result: no" >&5
4705 echo "${ECHO_T}no" >&6
4706     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4707 echo "$as_me: error: distutils module not found" >&2;}
4708    { (exit 1); exit 1; }; }
4709 fi
4710 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4711 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4712 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4713 python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"`
4714 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4715
4716 # This should be enough of a message.
4717 echo "$as_me:$LINENO: result: $python_configdir" >&5
4718 echo "${ECHO_T}$python_configdir" >&6
4719
4720
4721 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4722 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4723
4724 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4725 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4726 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4727 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4728
4729 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4730 then
4731         # New way: use the official shared library
4732         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4733         python_libspec="-L${python_libdir} -l${ldlibrary}"
4734 else
4735         # Old way: use libpython from python_configdir
4736         python_libdir="${python_configdir}"
4737         python_libspec="-L${python_libdir} -lpython${python_version}"
4738 fi
4739
4740 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4741
4742 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4743 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4744
4745
4746 fi
4747
4748
4749 ##
4750 ## Libraries
4751 ##
4752
4753 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
4754 then
4755
4756 echo "$as_me:$LINENO: checking for main in -lbsd" >&5
4757 echo $ECHO_N "checking for main in -lbsd... $ECHO_C" >&6
4758 if test "${ac_cv_lib_bsd_main+set}" = set; then
4759   echo $ECHO_N "(cached) $ECHO_C" >&6
4760 else
4761   ac_check_lib_save_LIBS=$LIBS
4762 LIBS="-lbsd  $LIBS"
4763 cat >conftest.$ac_ext <<_ACEOF
4764 /* confdefs.h.  */
4765 _ACEOF
4766 cat confdefs.h >>conftest.$ac_ext
4767 cat >>conftest.$ac_ext <<_ACEOF
4768 /* end confdefs.h.  */
4769
4770
4771 int
4772 main ()
4773 {
4774 main ();
4775   ;
4776   return 0;
4777 }
4778 _ACEOF
4779 rm -f conftest.$ac_objext conftest$ac_exeext
4780 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4781   (eval $ac_link) 2>conftest.er1
4782   ac_status=$?
4783   grep -v '^ *+' conftest.er1 >conftest.err
4784   rm -f conftest.er1
4785   cat conftest.err >&5
4786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4787   (exit $ac_status); } &&
4788          { ac_try='test -z "$ac_c_werror_flag"
4789                          || test ! -s conftest.err'
4790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4791   (eval $ac_try) 2>&5
4792   ac_status=$?
4793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4794   (exit $ac_status); }; } &&
4795          { ac_try='test -s conftest$ac_exeext'
4796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4797   (eval $ac_try) 2>&5
4798   ac_status=$?
4799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4800   (exit $ac_status); }; }; then
4801   ac_cv_lib_bsd_main=yes
4802 else
4803   echo "$as_me: failed program was:" >&5
4804 sed 's/^/| /' conftest.$ac_ext >&5
4805
4806 ac_cv_lib_bsd_main=no
4807 fi
4808 rm -f conftest.err conftest.$ac_objext \
4809       conftest$ac_exeext conftest.$ac_ext
4810 LIBS=$ac_check_lib_save_LIBS
4811 fi
4812 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_main" >&5
4813 echo "${ECHO_T}$ac_cv_lib_bsd_main" >&6
4814 if test $ac_cv_lib_bsd_main = yes; then
4815   cat >>confdefs.h <<_ACEOF
4816 #define HAVE_LIBBSD 1
4817 _ACEOF
4818
4819   LIBS="-lbsd $LIBS"
4820
4821 fi
4822
4823 fi
4824
4825 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
4826 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
4827 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
4828   echo $ECHO_N "(cached) $ECHO_C" >&6
4829 else
4830   ac_check_lib_save_LIBS=$LIBS
4831 LIBS="-lutil  $LIBS"
4832 cat >conftest.$ac_ext <<_ACEOF
4833 /* confdefs.h.  */
4834 _ACEOF
4835 cat confdefs.h >>conftest.$ac_ext
4836 cat >>conftest.$ac_ext <<_ACEOF
4837 /* end confdefs.h.  */
4838
4839 /* Override any gcc2 internal prototype to avoid an error.  */
4840 #ifdef __cplusplus
4841 extern "C"
4842 #endif
4843 /* We use char because int might match the return type of a gcc2
4844    builtin and then its argument prototype would still apply.  */
4845 char setproctitle ();
4846 int
4847 main ()
4848 {
4849 setproctitle ();
4850   ;
4851   return 0;
4852 }
4853 _ACEOF
4854 rm -f conftest.$ac_objext conftest$ac_exeext
4855 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4856   (eval $ac_link) 2>conftest.er1
4857   ac_status=$?
4858   grep -v '^ *+' conftest.er1 >conftest.err
4859   rm -f conftest.er1
4860   cat conftest.err >&5
4861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862   (exit $ac_status); } &&
4863          { ac_try='test -z "$ac_c_werror_flag"
4864                          || test ! -s conftest.err'
4865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4866   (eval $ac_try) 2>&5
4867   ac_status=$?
4868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869   (exit $ac_status); }; } &&
4870          { ac_try='test -s conftest$ac_exeext'
4871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4872   (eval $ac_try) 2>&5
4873   ac_status=$?
4874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4875   (exit $ac_status); }; }; then
4876   ac_cv_lib_util_setproctitle=yes
4877 else
4878   echo "$as_me: failed program was:" >&5
4879 sed 's/^/| /' conftest.$ac_ext >&5
4880
4881 ac_cv_lib_util_setproctitle=no
4882 fi
4883 rm -f conftest.err conftest.$ac_objext \
4884       conftest$ac_exeext conftest.$ac_ext
4885 LIBS=$ac_check_lib_save_LIBS
4886 fi
4887 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
4888 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
4889 if test $ac_cv_lib_util_setproctitle = yes; then
4890   cat >>confdefs.h <<_ACEOF
4891 #define HAVE_LIBUTIL 1
4892 _ACEOF
4893
4894   LIBS="-lutil $LIBS"
4895
4896 fi
4897
4898
4899 echo "$as_me:$LINENO: checking for main in -lm" >&5
4900 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
4901 if test "${ac_cv_lib_m_main+set}" = set; then
4902   echo $ECHO_N "(cached) $ECHO_C" >&6
4903 else
4904   ac_check_lib_save_LIBS=$LIBS
4905 LIBS="-lm  $LIBS"
4906 cat >conftest.$ac_ext <<_ACEOF
4907 /* confdefs.h.  */
4908 _ACEOF
4909 cat confdefs.h >>conftest.$ac_ext
4910 cat >>conftest.$ac_ext <<_ACEOF
4911 /* end confdefs.h.  */
4912
4913
4914 int
4915 main ()
4916 {
4917 main ();
4918   ;
4919   return 0;
4920 }
4921 _ACEOF
4922 rm -f conftest.$ac_objext conftest$ac_exeext
4923 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4924   (eval $ac_link) 2>conftest.er1
4925   ac_status=$?
4926   grep -v '^ *+' conftest.er1 >conftest.err
4927   rm -f conftest.er1
4928   cat conftest.err >&5
4929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4930   (exit $ac_status); } &&
4931          { ac_try='test -z "$ac_c_werror_flag"
4932                          || test ! -s conftest.err'
4933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4934   (eval $ac_try) 2>&5
4935   ac_status=$?
4936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4937   (exit $ac_status); }; } &&
4938          { ac_try='test -s conftest$ac_exeext'
4939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4940   (eval $ac_try) 2>&5
4941   ac_status=$?
4942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943   (exit $ac_status); }; }; then
4944   ac_cv_lib_m_main=yes
4945 else
4946   echo "$as_me: failed program was:" >&5
4947 sed 's/^/| /' conftest.$ac_ext >&5
4948
4949 ac_cv_lib_m_main=no
4950 fi
4951 rm -f conftest.err conftest.$ac_objext \
4952       conftest$ac_exeext conftest.$ac_ext
4953 LIBS=$ac_check_lib_save_LIBS
4954 fi
4955 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
4956 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
4957 if test $ac_cv_lib_m_main = yes; then
4958   cat >>confdefs.h <<_ACEOF
4959 #define HAVE_LIBM 1
4960 _ACEOF
4961
4962   LIBS="-lm $LIBS"
4963
4964 fi
4965
4966
4967 echo "$as_me:$LINENO: checking for main in -ldl" >&5
4968 echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
4969 if test "${ac_cv_lib_dl_main+set}" = set; then
4970   echo $ECHO_N "(cached) $ECHO_C" >&6
4971 else
4972   ac_check_lib_save_LIBS=$LIBS
4973 LIBS="-ldl  $LIBS"
4974 cat >conftest.$ac_ext <<_ACEOF
4975 /* confdefs.h.  */
4976 _ACEOF
4977 cat confdefs.h >>conftest.$ac_ext
4978 cat >>conftest.$ac_ext <<_ACEOF
4979 /* end confdefs.h.  */
4980
4981
4982 int
4983 main ()
4984 {
4985 main ();
4986   ;
4987   return 0;
4988 }
4989 _ACEOF
4990 rm -f conftest.$ac_objext conftest$ac_exeext
4991 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4992   (eval $ac_link) 2>conftest.er1
4993   ac_status=$?
4994   grep -v '^ *+' conftest.er1 >conftest.err
4995   rm -f conftest.er1
4996   cat conftest.err >&5
4997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4998   (exit $ac_status); } &&
4999          { ac_try='test -z "$ac_c_werror_flag"
5000                          || test ! -s conftest.err'
5001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5002   (eval $ac_try) 2>&5
5003   ac_status=$?
5004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5005   (exit $ac_status); }; } &&
5006          { ac_try='test -s conftest$ac_exeext'
5007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5008   (eval $ac_try) 2>&5
5009   ac_status=$?
5010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5011   (exit $ac_status); }; }; then
5012   ac_cv_lib_dl_main=yes
5013 else
5014   echo "$as_me: failed program was:" >&5
5015 sed 's/^/| /' conftest.$ac_ext >&5
5016
5017 ac_cv_lib_dl_main=no
5018 fi
5019 rm -f conftest.err conftest.$ac_objext \
5020       conftest$ac_exeext conftest.$ac_ext
5021 LIBS=$ac_check_lib_save_LIBS
5022 fi
5023 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5
5024 echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
5025 if test $ac_cv_lib_dl_main = yes; then
5026   cat >>confdefs.h <<_ACEOF
5027 #define HAVE_LIBDL 1
5028 _ACEOF
5029
5030   LIBS="-ldl $LIBS"
5031
5032 fi
5033
5034
5035 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
5036 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
5037 if test "${ac_cv_lib_nsl_main+set}" = set; then
5038   echo $ECHO_N "(cached) $ECHO_C" >&6
5039 else
5040   ac_check_lib_save_LIBS=$LIBS
5041 LIBS="-lnsl  $LIBS"
5042 cat >conftest.$ac_ext <<_ACEOF
5043 /* confdefs.h.  */
5044 _ACEOF
5045 cat confdefs.h >>conftest.$ac_ext
5046 cat >>conftest.$ac_ext <<_ACEOF
5047 /* end confdefs.h.  */
5048
5049
5050 int
5051 main ()
5052 {
5053 main ();
5054   ;
5055   return 0;
5056 }
5057 _ACEOF
5058 rm -f conftest.$ac_objext conftest$ac_exeext
5059 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5060   (eval $ac_link) 2>conftest.er1
5061   ac_status=$?
5062   grep -v '^ *+' conftest.er1 >conftest.err
5063   rm -f conftest.er1
5064   cat conftest.err >&5
5065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5066   (exit $ac_status); } &&
5067          { ac_try='test -z "$ac_c_werror_flag"
5068                          || test ! -s conftest.err'
5069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5070   (eval $ac_try) 2>&5
5071   ac_status=$?
5072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5073   (exit $ac_status); }; } &&
5074          { ac_try='test -s conftest$ac_exeext'
5075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5076   (eval $ac_try) 2>&5
5077   ac_status=$?
5078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5079   (exit $ac_status); }; }; then
5080   ac_cv_lib_nsl_main=yes
5081 else
5082   echo "$as_me: failed program was:" >&5
5083 sed 's/^/| /' conftest.$ac_ext >&5
5084
5085 ac_cv_lib_nsl_main=no
5086 fi
5087 rm -f conftest.err conftest.$ac_objext \
5088       conftest$ac_exeext conftest.$ac_ext
5089 LIBS=$ac_check_lib_save_LIBS
5090 fi
5091 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
5092 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
5093 if test $ac_cv_lib_nsl_main = yes; then
5094   cat >>confdefs.h <<_ACEOF
5095 #define HAVE_LIBNSL 1
5096 _ACEOF
5097
5098   LIBS="-lnsl $LIBS"
5099
5100 fi
5101
5102
5103 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
5104 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
5105 if test "${ac_cv_lib_socket_main+set}" = set; then
5106   echo $ECHO_N "(cached) $ECHO_C" >&6
5107 else
5108   ac_check_lib_save_LIBS=$LIBS
5109 LIBS="-lsocket  $LIBS"
5110 cat >conftest.$ac_ext <<_ACEOF
5111 /* confdefs.h.  */
5112 _ACEOF
5113 cat confdefs.h >>conftest.$ac_ext
5114 cat >>conftest.$ac_ext <<_ACEOF
5115 /* end confdefs.h.  */
5116
5117
5118 int
5119 main ()
5120 {
5121 main ();
5122   ;
5123   return 0;
5124 }
5125 _ACEOF
5126 rm -f conftest.$ac_objext conftest$ac_exeext
5127 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5128   (eval $ac_link) 2>conftest.er1
5129   ac_status=$?
5130   grep -v '^ *+' conftest.er1 >conftest.err
5131   rm -f conftest.er1
5132   cat conftest.err >&5
5133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134   (exit $ac_status); } &&
5135          { ac_try='test -z "$ac_c_werror_flag"
5136                          || test ! -s conftest.err'
5137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5138   (eval $ac_try) 2>&5
5139   ac_status=$?
5140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141   (exit $ac_status); }; } &&
5142          { ac_try='test -s conftest$ac_exeext'
5143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5144   (eval $ac_try) 2>&5
5145   ac_status=$?
5146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147   (exit $ac_status); }; }; then
5148   ac_cv_lib_socket_main=yes
5149 else
5150   echo "$as_me: failed program was:" >&5
5151 sed 's/^/| /' conftest.$ac_ext >&5
5152
5153 ac_cv_lib_socket_main=no
5154 fi
5155 rm -f conftest.err conftest.$ac_objext \
5156       conftest$ac_exeext conftest.$ac_ext
5157 LIBS=$ac_check_lib_save_LIBS
5158 fi
5159 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
5160 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
5161 if test $ac_cv_lib_socket_main = yes; then
5162   cat >>confdefs.h <<_ACEOF
5163 #define HAVE_LIBSOCKET 1
5164 _ACEOF
5165
5166   LIBS="-lsocket $LIBS"
5167
5168 fi
5169
5170
5171 echo "$as_me:$LINENO: checking for main in -lipc" >&5
5172 echo $ECHO_N "checking for main in -lipc... $ECHO_C" >&6
5173 if test "${ac_cv_lib_ipc_main+set}" = set; then
5174   echo $ECHO_N "(cached) $ECHO_C" >&6
5175 else
5176   ac_check_lib_save_LIBS=$LIBS
5177 LIBS="-lipc  $LIBS"
5178 cat >conftest.$ac_ext <<_ACEOF
5179 /* confdefs.h.  */
5180 _ACEOF
5181 cat confdefs.h >>conftest.$ac_ext
5182 cat >>conftest.$ac_ext <<_ACEOF
5183 /* end confdefs.h.  */
5184
5185
5186 int
5187 main ()
5188 {
5189 main ();
5190   ;
5191   return 0;
5192 }
5193 _ACEOF
5194 rm -f conftest.$ac_objext conftest$ac_exeext
5195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5196   (eval $ac_link) 2>conftest.er1
5197   ac_status=$?
5198   grep -v '^ *+' conftest.er1 >conftest.err
5199   rm -f conftest.er1
5200   cat conftest.err >&5
5201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5202   (exit $ac_status); } &&
5203          { ac_try='test -z "$ac_c_werror_flag"
5204                          || test ! -s conftest.err'
5205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5206   (eval $ac_try) 2>&5
5207   ac_status=$?
5208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5209   (exit $ac_status); }; } &&
5210          { ac_try='test -s conftest$ac_exeext'
5211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5212   (eval $ac_try) 2>&5
5213   ac_status=$?
5214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5215   (exit $ac_status); }; }; then
5216   ac_cv_lib_ipc_main=yes
5217 else
5218   echo "$as_me: failed program was:" >&5
5219 sed 's/^/| /' conftest.$ac_ext >&5
5220
5221 ac_cv_lib_ipc_main=no
5222 fi
5223 rm -f conftest.err conftest.$ac_objext \
5224       conftest$ac_exeext conftest.$ac_ext
5225 LIBS=$ac_check_lib_save_LIBS
5226 fi
5227 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_main" >&5
5228 echo "${ECHO_T}$ac_cv_lib_ipc_main" >&6
5229 if test $ac_cv_lib_ipc_main = yes; then
5230   cat >>confdefs.h <<_ACEOF
5231 #define HAVE_LIBIPC 1
5232 _ACEOF
5233
5234   LIBS="-lipc $LIBS"
5235
5236 fi
5237
5238
5239 echo "$as_me:$LINENO: checking for main in -lIPC" >&5
5240 echo $ECHO_N "checking for main in -lIPC... $ECHO_C" >&6
5241 if test "${ac_cv_lib_IPC_main+set}" = set; then
5242   echo $ECHO_N "(cached) $ECHO_C" >&6
5243 else
5244   ac_check_lib_save_LIBS=$LIBS
5245 LIBS="-lIPC  $LIBS"
5246 cat >conftest.$ac_ext <<_ACEOF
5247 /* confdefs.h.  */
5248 _ACEOF
5249 cat confdefs.h >>conftest.$ac_ext
5250 cat >>conftest.$ac_ext <<_ACEOF
5251 /* end confdefs.h.  */
5252
5253
5254 int
5255 main ()
5256 {
5257 main ();
5258   ;
5259   return 0;
5260 }
5261 _ACEOF
5262 rm -f conftest.$ac_objext conftest$ac_exeext
5263 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5264   (eval $ac_link) 2>conftest.er1
5265   ac_status=$?
5266   grep -v '^ *+' conftest.er1 >conftest.err
5267   rm -f conftest.er1
5268   cat conftest.err >&5
5269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5270   (exit $ac_status); } &&
5271          { ac_try='test -z "$ac_c_werror_flag"
5272                          || test ! -s conftest.err'
5273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5274   (eval $ac_try) 2>&5
5275   ac_status=$?
5276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277   (exit $ac_status); }; } &&
5278          { ac_try='test -s conftest$ac_exeext'
5279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5280   (eval $ac_try) 2>&5
5281   ac_status=$?
5282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5283   (exit $ac_status); }; }; then
5284   ac_cv_lib_IPC_main=yes
5285 else
5286   echo "$as_me: failed program was:" >&5
5287 sed 's/^/| /' conftest.$ac_ext >&5
5288
5289 ac_cv_lib_IPC_main=no
5290 fi
5291 rm -f conftest.err conftest.$ac_objext \
5292       conftest$ac_exeext conftest.$ac_ext
5293 LIBS=$ac_check_lib_save_LIBS
5294 fi
5295 echo "$as_me:$LINENO: result: $ac_cv_lib_IPC_main" >&5
5296 echo "${ECHO_T}$ac_cv_lib_IPC_main" >&6
5297 if test $ac_cv_lib_IPC_main = yes; then
5298   cat >>confdefs.h <<_ACEOF
5299 #define HAVE_LIBIPC 1
5300 _ACEOF
5301
5302   LIBS="-lIPC $LIBS"
5303
5304 fi
5305
5306
5307 echo "$as_me:$LINENO: checking for main in -llc" >&5
5308 echo $ECHO_N "checking for main in -llc... $ECHO_C" >&6
5309 if test "${ac_cv_lib_lc_main+set}" = set; then
5310   echo $ECHO_N "(cached) $ECHO_C" >&6
5311 else
5312   ac_check_lib_save_LIBS=$LIBS
5313 LIBS="-llc  $LIBS"
5314 cat >conftest.$ac_ext <<_ACEOF
5315 /* confdefs.h.  */
5316 _ACEOF
5317 cat confdefs.h >>conftest.$ac_ext
5318 cat >>conftest.$ac_ext <<_ACEOF
5319 /* end confdefs.h.  */
5320
5321
5322 int
5323 main ()
5324 {
5325 main ();
5326   ;
5327   return 0;
5328 }
5329 _ACEOF
5330 rm -f conftest.$ac_objext conftest$ac_exeext
5331 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5332   (eval $ac_link) 2>conftest.er1
5333   ac_status=$?
5334   grep -v '^ *+' conftest.er1 >conftest.err
5335   rm -f conftest.er1
5336   cat conftest.err >&5
5337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338   (exit $ac_status); } &&
5339          { ac_try='test -z "$ac_c_werror_flag"
5340                          || test ! -s conftest.err'
5341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5342   (eval $ac_try) 2>&5
5343   ac_status=$?
5344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345   (exit $ac_status); }; } &&
5346          { ac_try='test -s conftest$ac_exeext'
5347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5348   (eval $ac_try) 2>&5
5349   ac_status=$?
5350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5351   (exit $ac_status); }; }; then
5352   ac_cv_lib_lc_main=yes
5353 else
5354   echo "$as_me: failed program was:" >&5
5355 sed 's/^/| /' conftest.$ac_ext >&5
5356
5357 ac_cv_lib_lc_main=no
5358 fi
5359 rm -f conftest.err conftest.$ac_objext \
5360       conftest$ac_exeext conftest.$ac_ext
5361 LIBS=$ac_check_lib_save_LIBS
5362 fi
5363 echo "$as_me:$LINENO: result: $ac_cv_lib_lc_main" >&5
5364 echo "${ECHO_T}$ac_cv_lib_lc_main" >&6
5365 if test $ac_cv_lib_lc_main = yes; then
5366   cat >>confdefs.h <<_ACEOF
5367 #define HAVE_LIBLC 1
5368 _ACEOF
5369
5370   LIBS="-llc $LIBS"
5371
5372 fi
5373
5374
5375 echo "$as_me:$LINENO: checking for main in -ldld" >&5
5376 echo $ECHO_N "checking for main in -ldld... $ECHO_C" >&6
5377 if test "${ac_cv_lib_dld_main+set}" = set; then
5378   echo $ECHO_N "(cached) $ECHO_C" >&6
5379 else
5380   ac_check_lib_save_LIBS=$LIBS
5381 LIBS="-ldld  $LIBS"
5382 cat >conftest.$ac_ext <<_ACEOF
5383 /* confdefs.h.  */
5384 _ACEOF
5385 cat confdefs.h >>conftest.$ac_ext
5386 cat >>conftest.$ac_ext <<_ACEOF
5387 /* end confdefs.h.  */
5388
5389
5390 int
5391 main ()
5392 {
5393 main ();
5394   ;
5395   return 0;
5396 }
5397 _ACEOF
5398 rm -f conftest.$ac_objext conftest$ac_exeext
5399 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5400   (eval $ac_link) 2>conftest.er1
5401   ac_status=$?
5402   grep -v '^ *+' conftest.er1 >conftest.err
5403   rm -f conftest.er1
5404   cat conftest.err >&5
5405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406   (exit $ac_status); } &&
5407          { ac_try='test -z "$ac_c_werror_flag"
5408                          || test ! -s conftest.err'
5409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5410   (eval $ac_try) 2>&5
5411   ac_status=$?
5412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413   (exit $ac_status); }; } &&
5414          { ac_try='test -s conftest$ac_exeext'
5415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5416   (eval $ac_try) 2>&5
5417   ac_status=$?
5418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5419   (exit $ac_status); }; }; then
5420   ac_cv_lib_dld_main=yes
5421 else
5422   echo "$as_me: failed program was:" >&5
5423 sed 's/^/| /' conftest.$ac_ext >&5
5424
5425 ac_cv_lib_dld_main=no
5426 fi
5427 rm -f conftest.err conftest.$ac_objext \
5428       conftest$ac_exeext conftest.$ac_ext
5429 LIBS=$ac_check_lib_save_LIBS
5430 fi
5431 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_main" >&5
5432 echo "${ECHO_T}$ac_cv_lib_dld_main" >&6
5433 if test $ac_cv_lib_dld_main = yes; then
5434   cat >>confdefs.h <<_ACEOF
5435 #define HAVE_LIBDLD 1
5436 _ACEOF
5437
5438   LIBS="-ldld $LIBS"
5439
5440 fi
5441
5442
5443 echo "$as_me:$LINENO: checking for main in -lld" >&5
5444 echo $ECHO_N "checking for main in -lld... $ECHO_C" >&6
5445 if test "${ac_cv_lib_ld_main+set}" = set; then
5446   echo $ECHO_N "(cached) $ECHO_C" >&6
5447 else
5448   ac_check_lib_save_LIBS=$LIBS
5449 LIBS="-lld  $LIBS"
5450 cat >conftest.$ac_ext <<_ACEOF
5451 /* confdefs.h.  */
5452 _ACEOF
5453 cat confdefs.h >>conftest.$ac_ext
5454 cat >>conftest.$ac_ext <<_ACEOF
5455 /* end confdefs.h.  */
5456
5457
5458 int
5459 main ()
5460 {
5461 main ();
5462   ;
5463   return 0;
5464 }
5465 _ACEOF
5466 rm -f conftest.$ac_objext conftest$ac_exeext
5467 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5468   (eval $ac_link) 2>conftest.er1
5469   ac_status=$?
5470   grep -v '^ *+' conftest.er1 >conftest.err
5471   rm -f conftest.er1
5472   cat conftest.err >&5
5473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5474   (exit $ac_status); } &&
5475          { ac_try='test -z "$ac_c_werror_flag"
5476                          || test ! -s conftest.err'
5477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5478   (eval $ac_try) 2>&5
5479   ac_status=$?
5480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5481   (exit $ac_status); }; } &&
5482          { ac_try='test -s conftest$ac_exeext'
5483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5484   (eval $ac_try) 2>&5
5485   ac_status=$?
5486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487   (exit $ac_status); }; }; then
5488   ac_cv_lib_ld_main=yes
5489 else
5490   echo "$as_me: failed program was:" >&5
5491 sed 's/^/| /' conftest.$ac_ext >&5
5492
5493 ac_cv_lib_ld_main=no
5494 fi
5495 rm -f conftest.err conftest.$ac_objext \
5496       conftest$ac_exeext conftest.$ac_ext
5497 LIBS=$ac_check_lib_save_LIBS
5498 fi
5499 echo "$as_me:$LINENO: result: $ac_cv_lib_ld_main" >&5
5500 echo "${ECHO_T}$ac_cv_lib_ld_main" >&6
5501 if test $ac_cv_lib_ld_main = yes; then
5502   cat >>confdefs.h <<_ACEOF
5503 #define HAVE_LIBLD 1
5504 _ACEOF
5505
5506   LIBS="-lld $LIBS"
5507
5508 fi
5509
5510
5511 echo "$as_me:$LINENO: checking for main in -lcompat" >&5
5512 echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
5513 if test "${ac_cv_lib_compat_main+set}" = set; then
5514   echo $ECHO_N "(cached) $ECHO_C" >&6
5515 else
5516   ac_check_lib_save_LIBS=$LIBS
5517 LIBS="-lcompat  $LIBS"
5518 cat >conftest.$ac_ext <<_ACEOF
5519 /* confdefs.h.  */
5520 _ACEOF
5521 cat confdefs.h >>conftest.$ac_ext
5522 cat >>conftest.$ac_ext <<_ACEOF
5523 /* end confdefs.h.  */
5524
5525
5526 int
5527 main ()
5528 {
5529 main ();
5530   ;
5531   return 0;
5532 }
5533 _ACEOF
5534 rm -f conftest.$ac_objext conftest$ac_exeext
5535 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5536   (eval $ac_link) 2>conftest.er1
5537   ac_status=$?
5538   grep -v '^ *+' conftest.er1 >conftest.err
5539   rm -f conftest.er1
5540   cat conftest.err >&5
5541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542   (exit $ac_status); } &&
5543          { ac_try='test -z "$ac_c_werror_flag"
5544                          || test ! -s conftest.err'
5545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5546   (eval $ac_try) 2>&5
5547   ac_status=$?
5548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5549   (exit $ac_status); }; } &&
5550          { ac_try='test -s conftest$ac_exeext'
5551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5552   (eval $ac_try) 2>&5
5553   ac_status=$?
5554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5555   (exit $ac_status); }; }; then
5556   ac_cv_lib_compat_main=yes
5557 else
5558   echo "$as_me: failed program was:" >&5
5559 sed 's/^/| /' conftest.$ac_ext >&5
5560
5561 ac_cv_lib_compat_main=no
5562 fi
5563 rm -f conftest.err conftest.$ac_objext \
5564       conftest$ac_exeext conftest.$ac_ext
5565 LIBS=$ac_check_lib_save_LIBS
5566 fi
5567 echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
5568 echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
5569 if test $ac_cv_lib_compat_main = yes; then
5570   cat >>confdefs.h <<_ACEOF
5571 #define HAVE_LIBCOMPAT 1
5572 _ACEOF
5573
5574   LIBS="-lcompat $LIBS"
5575
5576 fi
5577
5578
5579 echo "$as_me:$LINENO: checking for main in -lBSD" >&5
5580 echo $ECHO_N "checking for main in -lBSD... $ECHO_C" >&6
5581 if test "${ac_cv_lib_BSD_main+set}" = set; then
5582   echo $ECHO_N "(cached) $ECHO_C" >&6
5583 else
5584   ac_check_lib_save_LIBS=$LIBS
5585 LIBS="-lBSD  $LIBS"
5586 cat >conftest.$ac_ext <<_ACEOF
5587 /* confdefs.h.  */
5588 _ACEOF
5589 cat confdefs.h >>conftest.$ac_ext
5590 cat >>conftest.$ac_ext <<_ACEOF
5591 /* end confdefs.h.  */
5592
5593
5594 int
5595 main ()
5596 {
5597 main ();
5598   ;
5599   return 0;
5600 }
5601 _ACEOF
5602 rm -f conftest.$ac_objext conftest$ac_exeext
5603 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5604   (eval $ac_link) 2>conftest.er1
5605   ac_status=$?
5606   grep -v '^ *+' conftest.er1 >conftest.err
5607   rm -f conftest.er1
5608   cat conftest.err >&5
5609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5610   (exit $ac_status); } &&
5611          { ac_try='test -z "$ac_c_werror_flag"
5612                          || test ! -s conftest.err'
5613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5614   (eval $ac_try) 2>&5
5615   ac_status=$?
5616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5617   (exit $ac_status); }; } &&
5618          { ac_try='test -s conftest$ac_exeext'
5619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5620   (eval $ac_try) 2>&5
5621   ac_status=$?
5622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623   (exit $ac_status); }; }; then
5624   ac_cv_lib_BSD_main=yes
5625 else
5626   echo "$as_me: failed program was:" >&5
5627 sed 's/^/| /' conftest.$ac_ext >&5
5628
5629 ac_cv_lib_BSD_main=no
5630 fi
5631 rm -f conftest.err conftest.$ac_objext \
5632       conftest$ac_exeext conftest.$ac_ext
5633 LIBS=$ac_check_lib_save_LIBS
5634 fi
5635 echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_main" >&5
5636 echo "${ECHO_T}$ac_cv_lib_BSD_main" >&6
5637 if test $ac_cv_lib_BSD_main = yes; then
5638   cat >>confdefs.h <<_ACEOF
5639 #define HAVE_LIBBSD 1
5640 _ACEOF
5641
5642   LIBS="-lBSD $LIBS"
5643
5644 fi
5645
5646
5647 echo "$as_me:$LINENO: checking for main in -lgen" >&5
5648 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
5649 if test "${ac_cv_lib_gen_main+set}" = set; then
5650   echo $ECHO_N "(cached) $ECHO_C" >&6
5651 else
5652   ac_check_lib_save_LIBS=$LIBS
5653 LIBS="-lgen  $LIBS"
5654 cat >conftest.$ac_ext <<_ACEOF
5655 /* confdefs.h.  */
5656 _ACEOF
5657 cat confdefs.h >>conftest.$ac_ext
5658 cat >>conftest.$ac_ext <<_ACEOF
5659 /* end confdefs.h.  */
5660
5661
5662 int
5663 main ()
5664 {
5665 main ();
5666   ;
5667   return 0;
5668 }
5669 _ACEOF
5670 rm -f conftest.$ac_objext conftest$ac_exeext
5671 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5672   (eval $ac_link) 2>conftest.er1
5673   ac_status=$?
5674   grep -v '^ *+' conftest.er1 >conftest.err
5675   rm -f conftest.er1
5676   cat conftest.err >&5
5677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678   (exit $ac_status); } &&
5679          { ac_try='test -z "$ac_c_werror_flag"
5680                          || test ! -s conftest.err'
5681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5682   (eval $ac_try) 2>&5
5683   ac_status=$?
5684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5685   (exit $ac_status); }; } &&
5686          { ac_try='test -s conftest$ac_exeext'
5687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5688   (eval $ac_try) 2>&5
5689   ac_status=$?
5690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5691   (exit $ac_status); }; }; then
5692   ac_cv_lib_gen_main=yes
5693 else
5694   echo "$as_me: failed program was:" >&5
5695 sed 's/^/| /' conftest.$ac_ext >&5
5696
5697 ac_cv_lib_gen_main=no
5698 fi
5699 rm -f conftest.err conftest.$ac_objext \
5700       conftest$ac_exeext conftest.$ac_ext
5701 LIBS=$ac_check_lib_save_LIBS
5702 fi
5703 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
5704 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
5705 if test $ac_cv_lib_gen_main = yes; then
5706   cat >>confdefs.h <<_ACEOF
5707 #define HAVE_LIBGEN 1
5708 _ACEOF
5709
5710   LIBS="-lgen $LIBS"
5711
5712 fi
5713
5714
5715 echo "$as_me:$LINENO: checking for main in -lPW" >&5
5716 echo $ECHO_N "checking for main in -lPW... $ECHO_C" >&6
5717 if test "${ac_cv_lib_PW_main+set}" = set; then
5718   echo $ECHO_N "(cached) $ECHO_C" >&6
5719 else
5720   ac_check_lib_save_LIBS=$LIBS
5721 LIBS="-lPW  $LIBS"
5722 cat >conftest.$ac_ext <<_ACEOF
5723 /* confdefs.h.  */
5724 _ACEOF
5725 cat confdefs.h >>conftest.$ac_ext
5726 cat >>conftest.$ac_ext <<_ACEOF
5727 /* end confdefs.h.  */
5728
5729
5730 int
5731 main ()
5732 {
5733 main ();
5734   ;
5735   return 0;
5736 }
5737 _ACEOF
5738 rm -f conftest.$ac_objext conftest$ac_exeext
5739 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5740   (eval $ac_link) 2>conftest.er1
5741   ac_status=$?
5742   grep -v '^ *+' conftest.er1 >conftest.err
5743   rm -f conftest.er1
5744   cat conftest.err >&5
5745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5746   (exit $ac_status); } &&
5747          { ac_try='test -z "$ac_c_werror_flag"
5748                          || test ! -s conftest.err'
5749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5750   (eval $ac_try) 2>&5
5751   ac_status=$?
5752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5753   (exit $ac_status); }; } &&
5754          { ac_try='test -s conftest$ac_exeext'
5755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5756   (eval $ac_try) 2>&5
5757   ac_status=$?
5758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5759   (exit $ac_status); }; }; then
5760   ac_cv_lib_PW_main=yes
5761 else
5762   echo "$as_me: failed program was:" >&5
5763 sed 's/^/| /' conftest.$ac_ext >&5
5764
5765 ac_cv_lib_PW_main=no
5766 fi
5767 rm -f conftest.err conftest.$ac_objext \
5768       conftest$ac_exeext conftest.$ac_ext
5769 LIBS=$ac_check_lib_save_LIBS
5770 fi
5771 echo "$as_me:$LINENO: result: $ac_cv_lib_PW_main" >&5
5772 echo "${ECHO_T}$ac_cv_lib_PW_main" >&6
5773 if test $ac_cv_lib_PW_main = yes; then
5774   cat >>confdefs.h <<_ACEOF
5775 #define HAVE_LIBPW 1
5776 _ACEOF
5777
5778   LIBS="-lPW $LIBS"
5779
5780 fi
5781
5782
5783 echo "$as_me:$LINENO: checking for main in -lresolv" >&5
5784 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
5785 if test "${ac_cv_lib_resolv_main+set}" = set; then
5786   echo $ECHO_N "(cached) $ECHO_C" >&6
5787 else
5788   ac_check_lib_save_LIBS=$LIBS
5789 LIBS="-lresolv  $LIBS"
5790 cat >conftest.$ac_ext <<_ACEOF
5791 /* confdefs.h.  */
5792 _ACEOF
5793 cat confdefs.h >>conftest.$ac_ext
5794 cat >>conftest.$ac_ext <<_ACEOF
5795 /* end confdefs.h.  */
5796
5797
5798 int
5799 main ()
5800 {
5801 main ();
5802   ;
5803   return 0;
5804 }
5805 _ACEOF
5806 rm -f conftest.$ac_objext conftest$ac_exeext
5807 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5808   (eval $ac_link) 2>conftest.er1
5809   ac_status=$?
5810   grep -v '^ *+' conftest.er1 >conftest.err
5811   rm -f conftest.er1
5812   cat conftest.err >&5
5813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814   (exit $ac_status); } &&
5815          { ac_try='test -z "$ac_c_werror_flag"
5816                          || test ! -s conftest.err'
5817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5818   (eval $ac_try) 2>&5
5819   ac_status=$?
5820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821   (exit $ac_status); }; } &&
5822          { ac_try='test -s conftest$ac_exeext'
5823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5824   (eval $ac_try) 2>&5
5825   ac_status=$?
5826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827   (exit $ac_status); }; }; then
5828   ac_cv_lib_resolv_main=yes
5829 else
5830   echo "$as_me: failed program was:" >&5
5831 sed 's/^/| /' conftest.$ac_ext >&5
5832
5833 ac_cv_lib_resolv_main=no
5834 fi
5835 rm -f conftest.err conftest.$ac_objext \
5836       conftest$ac_exeext conftest.$ac_ext
5837 LIBS=$ac_check_lib_save_LIBS
5838 fi
5839 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
5840 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
5841 if test $ac_cv_lib_resolv_main = yes; then
5842   cat >>confdefs.h <<_ACEOF
5843 #define HAVE_LIBRESOLV 1
5844 _ACEOF
5845
5846   LIBS="-lresolv $LIBS"
5847
5848 fi
5849
5850 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5851 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5852 if test "${ac_cv_search_getopt_long+set}" = set; then
5853   echo $ECHO_N "(cached) $ECHO_C" >&6
5854 else
5855   ac_func_search_save_LIBS=$LIBS
5856 ac_cv_search_getopt_long=no
5857 cat >conftest.$ac_ext <<_ACEOF
5858 /* confdefs.h.  */
5859 _ACEOF
5860 cat confdefs.h >>conftest.$ac_ext
5861 cat >>conftest.$ac_ext <<_ACEOF
5862 /* end confdefs.h.  */
5863
5864 /* Override any gcc2 internal prototype to avoid an error.  */
5865 #ifdef __cplusplus
5866 extern "C"
5867 #endif
5868 /* We use char because int might match the return type of a gcc2
5869    builtin and then its argument prototype would still apply.  */
5870 char getopt_long ();
5871 int
5872 main ()
5873 {
5874 getopt_long ();
5875   ;
5876   return 0;
5877 }
5878 _ACEOF
5879 rm -f conftest.$ac_objext conftest$ac_exeext
5880 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5881   (eval $ac_link) 2>conftest.er1
5882   ac_status=$?
5883   grep -v '^ *+' conftest.er1 >conftest.err
5884   rm -f conftest.er1
5885   cat conftest.err >&5
5886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887   (exit $ac_status); } &&
5888          { ac_try='test -z "$ac_c_werror_flag"
5889                          || test ! -s conftest.err'
5890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5891   (eval $ac_try) 2>&5
5892   ac_status=$?
5893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894   (exit $ac_status); }; } &&
5895          { ac_try='test -s conftest$ac_exeext'
5896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5897   (eval $ac_try) 2>&5
5898   ac_status=$?
5899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900   (exit $ac_status); }; }; then
5901   ac_cv_search_getopt_long="none required"
5902 else
5903   echo "$as_me: failed program was:" >&5
5904 sed 's/^/| /' conftest.$ac_ext >&5
5905
5906 fi
5907 rm -f conftest.err conftest.$ac_objext \
5908       conftest$ac_exeext conftest.$ac_ext
5909 if test "$ac_cv_search_getopt_long" = no; then
5910   for ac_lib in getopt gnugetopt; do
5911     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5912     cat >conftest.$ac_ext <<_ACEOF
5913 /* confdefs.h.  */
5914 _ACEOF
5915 cat confdefs.h >>conftest.$ac_ext
5916 cat >>conftest.$ac_ext <<_ACEOF
5917 /* end confdefs.h.  */
5918
5919 /* Override any gcc2 internal prototype to avoid an error.  */
5920 #ifdef __cplusplus
5921 extern "C"
5922 #endif
5923 /* We use char because int might match the return type of a gcc2
5924    builtin and then its argument prototype would still apply.  */
5925 char getopt_long ();
5926 int
5927 main ()
5928 {
5929 getopt_long ();
5930   ;
5931   return 0;
5932 }
5933 _ACEOF
5934 rm -f conftest.$ac_objext conftest$ac_exeext
5935 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5936   (eval $ac_link) 2>conftest.er1
5937   ac_status=$?
5938   grep -v '^ *+' conftest.er1 >conftest.err
5939   rm -f conftest.er1
5940   cat conftest.err >&5
5941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5942   (exit $ac_status); } &&
5943          { ac_try='test -z "$ac_c_werror_flag"
5944                          || test ! -s conftest.err'
5945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5946   (eval $ac_try) 2>&5
5947   ac_status=$?
5948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949   (exit $ac_status); }; } &&
5950          { ac_try='test -s conftest$ac_exeext'
5951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5952   (eval $ac_try) 2>&5
5953   ac_status=$?
5954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5955   (exit $ac_status); }; }; then
5956   ac_cv_search_getopt_long="-l$ac_lib"
5957 break
5958 else
5959   echo "$as_me: failed program was:" >&5
5960 sed 's/^/| /' conftest.$ac_ext >&5
5961
5962 fi
5963 rm -f conftest.err conftest.$ac_objext \
5964       conftest$ac_exeext conftest.$ac_ext
5965   done
5966 fi
5967 LIBS=$ac_func_search_save_LIBS
5968 fi
5969 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5970 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5971 if test "$ac_cv_search_getopt_long" != no; then
5972   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5973
5974 fi
5975
5976 # QNX:
5977
5978 echo "$as_me:$LINENO: checking for main in -lunix" >&5
5979 echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
5980 if test "${ac_cv_lib_unix_main+set}" = set; then
5981   echo $ECHO_N "(cached) $ECHO_C" >&6
5982 else
5983   ac_check_lib_save_LIBS=$LIBS
5984 LIBS="-lunix  $LIBS"
5985 cat >conftest.$ac_ext <<_ACEOF
5986 /* confdefs.h.  */
5987 _ACEOF
5988 cat confdefs.h >>conftest.$ac_ext
5989 cat >>conftest.$ac_ext <<_ACEOF
5990 /* end confdefs.h.  */
5991
5992
5993 int
5994 main ()
5995 {
5996 main ();
5997   ;
5998   return 0;
5999 }
6000 _ACEOF
6001 rm -f conftest.$ac_objext conftest$ac_exeext
6002 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6003   (eval $ac_link) 2>conftest.er1
6004   ac_status=$?
6005   grep -v '^ *+' conftest.er1 >conftest.err
6006   rm -f conftest.er1
6007   cat conftest.err >&5
6008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6009   (exit $ac_status); } &&
6010          { ac_try='test -z "$ac_c_werror_flag"
6011                          || test ! -s conftest.err'
6012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6013   (eval $ac_try) 2>&5
6014   ac_status=$?
6015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6016   (exit $ac_status); }; } &&
6017          { ac_try='test -s conftest$ac_exeext'
6018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6019   (eval $ac_try) 2>&5
6020   ac_status=$?
6021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6022   (exit $ac_status); }; }; then
6023   ac_cv_lib_unix_main=yes
6024 else
6025   echo "$as_me: failed program was:" >&5
6026 sed 's/^/| /' conftest.$ac_ext >&5
6027
6028 ac_cv_lib_unix_main=no
6029 fi
6030 rm -f conftest.err conftest.$ac_objext \
6031       conftest$ac_exeext conftest.$ac_ext
6032 LIBS=$ac_check_lib_save_LIBS
6033 fi
6034 echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
6035 echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
6036 if test $ac_cv_lib_unix_main = yes; then
6037   cat >>confdefs.h <<_ACEOF
6038 #define HAVE_LIBUNIX 1
6039 _ACEOF
6040
6041   LIBS="-lunix $LIBS"
6042
6043 fi
6044
6045 echo "$as_me:$LINENO: checking for library containing crypt" >&5
6046 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
6047 if test "${ac_cv_search_crypt+set}" = set; then
6048   echo $ECHO_N "(cached) $ECHO_C" >&6
6049 else
6050   ac_func_search_save_LIBS=$LIBS
6051 ac_cv_search_crypt=no
6052 cat >conftest.$ac_ext <<_ACEOF
6053 /* confdefs.h.  */
6054 _ACEOF
6055 cat confdefs.h >>conftest.$ac_ext
6056 cat >>conftest.$ac_ext <<_ACEOF
6057 /* end confdefs.h.  */
6058
6059 /* Override any gcc2 internal prototype to avoid an error.  */
6060 #ifdef __cplusplus
6061 extern "C"
6062 #endif
6063 /* We use char because int might match the return type of a gcc2
6064    builtin and then its argument prototype would still apply.  */
6065 char crypt ();
6066 int
6067 main ()
6068 {
6069 crypt ();
6070   ;
6071   return 0;
6072 }
6073 _ACEOF
6074 rm -f conftest.$ac_objext conftest$ac_exeext
6075 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6076   (eval $ac_link) 2>conftest.er1
6077   ac_status=$?
6078   grep -v '^ *+' conftest.er1 >conftest.err
6079   rm -f conftest.er1
6080   cat conftest.err >&5
6081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6082   (exit $ac_status); } &&
6083          { ac_try='test -z "$ac_c_werror_flag"
6084                          || test ! -s conftest.err'
6085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6086   (eval $ac_try) 2>&5
6087   ac_status=$?
6088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089   (exit $ac_status); }; } &&
6090          { ac_try='test -s conftest$ac_exeext'
6091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6092   (eval $ac_try) 2>&5
6093   ac_status=$?
6094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095   (exit $ac_status); }; }; then
6096   ac_cv_search_crypt="none required"
6097 else
6098   echo "$as_me: failed program was:" >&5
6099 sed 's/^/| /' conftest.$ac_ext >&5
6100
6101 fi
6102 rm -f conftest.err conftest.$ac_objext \
6103       conftest$ac_exeext conftest.$ac_ext
6104 if test "$ac_cv_search_crypt" = no; then
6105   for ac_lib in crypt; do
6106     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6107     cat >conftest.$ac_ext <<_ACEOF
6108 /* confdefs.h.  */
6109 _ACEOF
6110 cat confdefs.h >>conftest.$ac_ext
6111 cat >>conftest.$ac_ext <<_ACEOF
6112 /* end confdefs.h.  */
6113
6114 /* Override any gcc2 internal prototype to avoid an error.  */
6115 #ifdef __cplusplus
6116 extern "C"
6117 #endif
6118 /* We use char because int might match the return type of a gcc2
6119    builtin and then its argument prototype would still apply.  */
6120 char crypt ();
6121 int
6122 main ()
6123 {
6124 crypt ();
6125   ;
6126   return 0;
6127 }
6128 _ACEOF
6129 rm -f conftest.$ac_objext conftest$ac_exeext
6130 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6131   (eval $ac_link) 2>conftest.er1
6132   ac_status=$?
6133   grep -v '^ *+' conftest.er1 >conftest.err
6134   rm -f conftest.er1
6135   cat conftest.err >&5
6136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6137   (exit $ac_status); } &&
6138          { ac_try='test -z "$ac_c_werror_flag"
6139                          || test ! -s conftest.err'
6140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6141   (eval $ac_try) 2>&5
6142   ac_status=$?
6143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6144   (exit $ac_status); }; } &&
6145          { ac_try='test -s conftest$ac_exeext'
6146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6147   (eval $ac_try) 2>&5
6148   ac_status=$?
6149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6150   (exit $ac_status); }; }; then
6151   ac_cv_search_crypt="-l$ac_lib"
6152 break
6153 else
6154   echo "$as_me: failed program was:" >&5
6155 sed 's/^/| /' conftest.$ac_ext >&5
6156
6157 fi
6158 rm -f conftest.err conftest.$ac_objext \
6159       conftest$ac_exeext conftest.$ac_ext
6160   done
6161 fi
6162 LIBS=$ac_func_search_save_LIBS
6163 fi
6164 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6165 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6166 if test "$ac_cv_search_crypt" != no; then
6167   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6168
6169 fi
6170
6171 # BeOS:
6172 if test "$PORTNAME" = "beos"
6173 then
6174
6175 echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
6176 echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
6177 if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
6178   echo $ECHO_N "(cached) $ECHO_C" >&6
6179 else
6180   ac_check_lib_save_LIBS=$LIBS
6181 LIBS="-lbind  $LIBS"
6182 cat >conftest.$ac_ext <<_ACEOF
6183 /* confdefs.h.  */
6184 _ACEOF
6185 cat confdefs.h >>conftest.$ac_ext
6186 cat >>conftest.$ac_ext <<_ACEOF
6187 /* end confdefs.h.  */
6188
6189 /* Override any gcc2 internal prototype to avoid an error.  */
6190 #ifdef __cplusplus
6191 extern "C"
6192 #endif
6193 /* We use char because int might match the return type of a gcc2
6194    builtin and then its argument prototype would still apply.  */
6195 char __inet_ntoa ();
6196 int
6197 main ()
6198 {
6199 __inet_ntoa ();
6200   ;
6201   return 0;
6202 }
6203 _ACEOF
6204 rm -f conftest.$ac_objext conftest$ac_exeext
6205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6206   (eval $ac_link) 2>conftest.er1
6207   ac_status=$?
6208   grep -v '^ *+' conftest.er1 >conftest.err
6209   rm -f conftest.er1
6210   cat conftest.err >&5
6211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6212   (exit $ac_status); } &&
6213          { ac_try='test -z "$ac_c_werror_flag"
6214                          || test ! -s conftest.err'
6215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6216   (eval $ac_try) 2>&5
6217   ac_status=$?
6218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6219   (exit $ac_status); }; } &&
6220          { ac_try='test -s conftest$ac_exeext'
6221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6222   (eval $ac_try) 2>&5
6223   ac_status=$?
6224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6225   (exit $ac_status); }; }; then
6226   ac_cv_lib_bind___inet_ntoa=yes
6227 else
6228   echo "$as_me: failed program was:" >&5
6229 sed 's/^/| /' conftest.$ac_ext >&5
6230
6231 ac_cv_lib_bind___inet_ntoa=no
6232 fi
6233 rm -f conftest.err conftest.$ac_objext \
6234       conftest$ac_exeext conftest.$ac_ext
6235 LIBS=$ac_check_lib_save_LIBS
6236 fi
6237 echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
6238 echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
6239 if test $ac_cv_lib_bind___inet_ntoa = yes; then
6240   cat >>confdefs.h <<_ACEOF
6241 #define HAVE_LIBBIND 1
6242 _ACEOF
6243
6244   LIBS="-lbind $LIBS"
6245
6246 fi
6247
6248 fi
6249 # Solaris:
6250 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6251 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6252 if test "${ac_cv_search_fdatasync+set}" = set; then
6253   echo $ECHO_N "(cached) $ECHO_C" >&6
6254 else
6255   ac_func_search_save_LIBS=$LIBS
6256 ac_cv_search_fdatasync=no
6257 cat >conftest.$ac_ext <<_ACEOF
6258 /* confdefs.h.  */
6259 _ACEOF
6260 cat confdefs.h >>conftest.$ac_ext
6261 cat >>conftest.$ac_ext <<_ACEOF
6262 /* end confdefs.h.  */
6263
6264 /* Override any gcc2 internal prototype to avoid an error.  */
6265 #ifdef __cplusplus
6266 extern "C"
6267 #endif
6268 /* We use char because int might match the return type of a gcc2
6269    builtin and then its argument prototype would still apply.  */
6270 char fdatasync ();
6271 int
6272 main ()
6273 {
6274 fdatasync ();
6275   ;
6276   return 0;
6277 }
6278 _ACEOF
6279 rm -f conftest.$ac_objext conftest$ac_exeext
6280 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6281   (eval $ac_link) 2>conftest.er1
6282   ac_status=$?
6283   grep -v '^ *+' conftest.er1 >conftest.err
6284   rm -f conftest.er1
6285   cat conftest.err >&5
6286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6287   (exit $ac_status); } &&
6288          { ac_try='test -z "$ac_c_werror_flag"
6289                          || test ! -s conftest.err'
6290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6291   (eval $ac_try) 2>&5
6292   ac_status=$?
6293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6294   (exit $ac_status); }; } &&
6295          { ac_try='test -s conftest$ac_exeext'
6296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6297   (eval $ac_try) 2>&5
6298   ac_status=$?
6299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6300   (exit $ac_status); }; }; then
6301   ac_cv_search_fdatasync="none required"
6302 else
6303   echo "$as_me: failed program was:" >&5
6304 sed 's/^/| /' conftest.$ac_ext >&5
6305
6306 fi
6307 rm -f conftest.err conftest.$ac_objext \
6308       conftest$ac_exeext conftest.$ac_ext
6309 if test "$ac_cv_search_fdatasync" = no; then
6310   for ac_lib in rt posix4; do
6311     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6312     cat >conftest.$ac_ext <<_ACEOF
6313 /* confdefs.h.  */
6314 _ACEOF
6315 cat confdefs.h >>conftest.$ac_ext
6316 cat >>conftest.$ac_ext <<_ACEOF
6317 /* end confdefs.h.  */
6318
6319 /* Override any gcc2 internal prototype to avoid an error.  */
6320 #ifdef __cplusplus
6321 extern "C"
6322 #endif
6323 /* We use char because int might match the return type of a gcc2
6324    builtin and then its argument prototype would still apply.  */
6325 char fdatasync ();
6326 int
6327 main ()
6328 {
6329 fdatasync ();
6330   ;
6331   return 0;
6332 }
6333 _ACEOF
6334 rm -f conftest.$ac_objext conftest$ac_exeext
6335 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6336   (eval $ac_link) 2>conftest.er1
6337   ac_status=$?
6338   grep -v '^ *+' conftest.er1 >conftest.err
6339   rm -f conftest.er1
6340   cat conftest.err >&5
6341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6342   (exit $ac_status); } &&
6343          { ac_try='test -z "$ac_c_werror_flag"
6344                          || test ! -s conftest.err'
6345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6346   (eval $ac_try) 2>&5
6347   ac_status=$?
6348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6349   (exit $ac_status); }; } &&
6350          { ac_try='test -s conftest$ac_exeext'
6351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6352   (eval $ac_try) 2>&5
6353   ac_status=$?
6354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6355   (exit $ac_status); }; }; then
6356   ac_cv_search_fdatasync="-l$ac_lib"
6357 break
6358 else
6359   echo "$as_me: failed program was:" >&5
6360 sed 's/^/| /' conftest.$ac_ext >&5
6361
6362 fi
6363 rm -f conftest.err conftest.$ac_objext \
6364       conftest$ac_exeext conftest.$ac_ext
6365   done
6366 fi
6367 LIBS=$ac_func_search_save_LIBS
6368 fi
6369 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6370 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6371 if test "$ac_cv_search_fdatasync" != no; then
6372   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6373
6374 fi
6375
6376 # Cygwin:
6377
6378 echo "$as_me:$LINENO: checking for shmget in -lcygipc" >&5
6379 echo $ECHO_N "checking for shmget in -lcygipc... $ECHO_C" >&6
6380 if test "${ac_cv_lib_cygipc_shmget+set}" = set; then
6381   echo $ECHO_N "(cached) $ECHO_C" >&6
6382 else
6383   ac_check_lib_save_LIBS=$LIBS
6384 LIBS="-lcygipc  $LIBS"
6385 cat >conftest.$ac_ext <<_ACEOF
6386 /* confdefs.h.  */
6387 _ACEOF
6388 cat confdefs.h >>conftest.$ac_ext
6389 cat >>conftest.$ac_ext <<_ACEOF
6390 /* end confdefs.h.  */
6391
6392 /* Override any gcc2 internal prototype to avoid an error.  */
6393 #ifdef __cplusplus
6394 extern "C"
6395 #endif
6396 /* We use char because int might match the return type of a gcc2
6397    builtin and then its argument prototype would still apply.  */
6398 char shmget ();
6399 int
6400 main ()
6401 {
6402 shmget ();
6403   ;
6404   return 0;
6405 }
6406 _ACEOF
6407 rm -f conftest.$ac_objext conftest$ac_exeext
6408 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6409   (eval $ac_link) 2>conftest.er1
6410   ac_status=$?
6411   grep -v '^ *+' conftest.er1 >conftest.err
6412   rm -f conftest.er1
6413   cat conftest.err >&5
6414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6415   (exit $ac_status); } &&
6416          { ac_try='test -z "$ac_c_werror_flag"
6417                          || test ! -s conftest.err'
6418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6419   (eval $ac_try) 2>&5
6420   ac_status=$?
6421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422   (exit $ac_status); }; } &&
6423          { ac_try='test -s conftest$ac_exeext'
6424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6425   (eval $ac_try) 2>&5
6426   ac_status=$?
6427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428   (exit $ac_status); }; }; then
6429   ac_cv_lib_cygipc_shmget=yes
6430 else
6431   echo "$as_me: failed program was:" >&5
6432 sed 's/^/| /' conftest.$ac_ext >&5
6433
6434 ac_cv_lib_cygipc_shmget=no
6435 fi
6436 rm -f conftest.err conftest.$ac_objext \
6437       conftest$ac_exeext conftest.$ac_ext
6438 LIBS=$ac_check_lib_save_LIBS
6439 fi
6440 echo "$as_me:$LINENO: result: $ac_cv_lib_cygipc_shmget" >&5
6441 echo "${ECHO_T}$ac_cv_lib_cygipc_shmget" >&6
6442 if test $ac_cv_lib_cygipc_shmget = yes; then
6443   cat >>confdefs.h <<_ACEOF
6444 #define HAVE_LIBCYGIPC 1
6445 _ACEOF
6446
6447   LIBS="-lcygipc $LIBS"
6448
6449 fi
6450
6451 # WIN32:
6452 if test "$PORTNAME" = "win32"
6453 then
6454
6455 echo "$as_me:$LINENO: checking for main in -lwsock32" >&5
6456 echo $ECHO_N "checking for main in -lwsock32... $ECHO_C" >&6
6457 if test "${ac_cv_lib_wsock32_main+set}" = set; then
6458   echo $ECHO_N "(cached) $ECHO_C" >&6
6459 else
6460   ac_check_lib_save_LIBS=$LIBS
6461 LIBS="-lwsock32  $LIBS"
6462 cat >conftest.$ac_ext <<_ACEOF
6463 /* confdefs.h.  */
6464 _ACEOF
6465 cat confdefs.h >>conftest.$ac_ext
6466 cat >>conftest.$ac_ext <<_ACEOF
6467 /* end confdefs.h.  */
6468
6469
6470 int
6471 main ()
6472 {
6473 main ();
6474   ;
6475   return 0;
6476 }
6477 _ACEOF
6478 rm -f conftest.$ac_objext conftest$ac_exeext
6479 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6480   (eval $ac_link) 2>conftest.er1
6481   ac_status=$?
6482   grep -v '^ *+' conftest.er1 >conftest.err
6483   rm -f conftest.er1
6484   cat conftest.err >&5
6485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6486   (exit $ac_status); } &&
6487          { ac_try='test -z "$ac_c_werror_flag"
6488                          || test ! -s conftest.err'
6489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6490   (eval $ac_try) 2>&5
6491   ac_status=$?
6492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6493   (exit $ac_status); }; } &&
6494          { ac_try='test -s conftest$ac_exeext'
6495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6496   (eval $ac_try) 2>&5
6497   ac_status=$?
6498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6499   (exit $ac_status); }; }; then
6500   ac_cv_lib_wsock32_main=yes
6501 else
6502   echo "$as_me: failed program was:" >&5
6503 sed 's/^/| /' conftest.$ac_ext >&5
6504
6505 ac_cv_lib_wsock32_main=no
6506 fi
6507 rm -f conftest.err conftest.$ac_objext \
6508       conftest$ac_exeext conftest.$ac_ext
6509 LIBS=$ac_check_lib_save_LIBS
6510 fi
6511 echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_main" >&5
6512 echo "${ECHO_T}$ac_cv_lib_wsock32_main" >&6
6513 if test $ac_cv_lib_wsock32_main = yes; then
6514   cat >>confdefs.h <<_ACEOF
6515 #define HAVE_LIBWSOCK32 1
6516 _ACEOF
6517
6518   LIBS="-lwsock32 $LIBS"
6519
6520 fi
6521
6522 fi
6523
6524 if test "$with_readline" = yes; then
6525
6526 echo "$as_me:$LINENO: checking for readline" >&5
6527 echo $ECHO_N "checking for readline... $ECHO_C" >&6
6528
6529 if test "${pgac_cv_check_readline+set}" = set; then
6530   echo $ECHO_N "(cached) $ECHO_C" >&6
6531 else
6532   pgac_cv_check_readline=no
6533 pgac_save_LIBS=$LIBS
6534 for pgac_rllib in -lreadline -ledit ; do
6535   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6536     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6537     cat >conftest.$ac_ext <<_ACEOF
6538 /* confdefs.h.  */
6539 _ACEOF
6540 cat confdefs.h >>conftest.$ac_ext
6541 cat >>conftest.$ac_ext <<_ACEOF
6542 /* end confdefs.h.  */
6543
6544 /* Override any gcc2 internal prototype to avoid an error.  */
6545 #ifdef __cplusplus
6546 extern "C"
6547 #endif
6548 /* We use char because int might match the return type of a gcc2
6549    builtin and then its argument prototype would still apply.  */
6550 char readline ();
6551 int
6552 main ()
6553 {
6554 readline ();
6555   ;
6556   return 0;
6557 }
6558 _ACEOF
6559 rm -f conftest.$ac_objext conftest$ac_exeext
6560 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6561   (eval $ac_link) 2>conftest.er1
6562   ac_status=$?
6563   grep -v '^ *+' conftest.er1 >conftest.err
6564   rm -f conftest.er1
6565   cat conftest.err >&5
6566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567   (exit $ac_status); } &&
6568          { ac_try='test -z "$ac_c_werror_flag"
6569                          || test ! -s conftest.err'
6570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6571   (eval $ac_try) 2>&5
6572   ac_status=$?
6573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574   (exit $ac_status); }; } &&
6575          { ac_try='test -s conftest$ac_exeext'
6576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6577   (eval $ac_try) 2>&5
6578   ac_status=$?
6579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6580   (exit $ac_status); }; }; then
6581
6582       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6583       # recognize dependent libraries; assume curses is needed if we didn't
6584       # find any dependency.
6585       case $host_os in
6586         netbsd* | openbsd* | irix*)
6587           if test x"$pgac_lib" = x"" ; then
6588             pgac_lib=" -lcurses"
6589           fi ;;
6590       esac
6591
6592       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6593       break 2
6594
6595 else
6596   echo "$as_me: failed program was:" >&5
6597 sed 's/^/| /' conftest.$ac_ext >&5
6598
6599 fi
6600 rm -f conftest.err conftest.$ac_objext \
6601       conftest$ac_exeext conftest.$ac_ext
6602   done
6603 done
6604 LIBS=$pgac_save_LIBS
6605
6606 fi
6607
6608 if test "$pgac_cv_check_readline" != no ; then
6609
6610 cat >>confdefs.h <<\_ACEOF
6611 #define HAVE_LIBREADLINE 1
6612 _ACEOF
6613
6614   LIBS="$pgac_cv_check_readline $LIBS"
6615   echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6616 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6617 else
6618   echo "$as_me:$LINENO: result: no" >&5
6619 echo "${ECHO_T}no" >&6
6620 fi
6621   if test x"$pgac_cv_check_readline" = x"no"; then
6622     { { echo "$as_me:$LINENO: error: readline library not found
6623 If you have readline already installed, see config.log for details on the
6624 failure.  It is possible the compiler isn't looking in the proper directory.
6625 Use --without-readline to disable readline support." >&5
6626 echo "$as_me: error: readline library not found
6627 If you have readline already installed, see config.log for details on the
6628 failure.  It is possible the compiler isn't looking in the proper directory.
6629 Use --without-readline to disable readline support." >&2;}
6630    { (exit 1); exit 1; }; }
6631   fi
6632 fi
6633
6634 if test "$with_zlib" = yes; then
6635
6636 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6637 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6638 if test "${ac_cv_lib_z_inflate+set}" = set; then
6639   echo $ECHO_N "(cached) $ECHO_C" >&6
6640 else
6641   ac_check_lib_save_LIBS=$LIBS
6642 LIBS="-lz  $LIBS"
6643 cat >conftest.$ac_ext <<_ACEOF
6644 /* confdefs.h.  */
6645 _ACEOF
6646 cat confdefs.h >>conftest.$ac_ext
6647 cat >>conftest.$ac_ext <<_ACEOF
6648 /* end confdefs.h.  */
6649
6650 /* Override any gcc2 internal prototype to avoid an error.  */
6651 #ifdef __cplusplus
6652 extern "C"
6653 #endif
6654 /* We use char because int might match the return type of a gcc2
6655    builtin and then its argument prototype would still apply.  */
6656 char inflate ();
6657 int
6658 main ()
6659 {
6660 inflate ();
6661   ;
6662   return 0;
6663 }
6664 _ACEOF
6665 rm -f conftest.$ac_objext conftest$ac_exeext
6666 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6667   (eval $ac_link) 2>conftest.er1
6668   ac_status=$?
6669   grep -v '^ *+' conftest.er1 >conftest.err
6670   rm -f conftest.er1
6671   cat conftest.err >&5
6672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6673   (exit $ac_status); } &&
6674          { ac_try='test -z "$ac_c_werror_flag"
6675                          || test ! -s conftest.err'
6676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6677   (eval $ac_try) 2>&5
6678   ac_status=$?
6679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6680   (exit $ac_status); }; } &&
6681          { ac_try='test -s conftest$ac_exeext'
6682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6683   (eval $ac_try) 2>&5
6684   ac_status=$?
6685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6686   (exit $ac_status); }; }; then
6687   ac_cv_lib_z_inflate=yes
6688 else
6689   echo "$as_me: failed program was:" >&5
6690 sed 's/^/| /' conftest.$ac_ext >&5
6691
6692 ac_cv_lib_z_inflate=no
6693 fi
6694 rm -f conftest.err conftest.$ac_objext \
6695       conftest$ac_exeext conftest.$ac_ext
6696 LIBS=$ac_check_lib_save_LIBS
6697 fi
6698 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6699 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6700 if test $ac_cv_lib_z_inflate = yes; then
6701   cat >>confdefs.h <<_ACEOF
6702 #define HAVE_LIBZ 1
6703 _ACEOF
6704
6705   LIBS="-lz $LIBS"
6706
6707 else
6708   { { echo "$as_me:$LINENO: error: zlib library not found
6709 If you have zlib already installed, see config.log for details on the
6710 failure.  It is possible the compiler isn't looking in the proper directory.
6711 Use --without-zlib to disable zlib support." >&5
6712 echo "$as_me: error: zlib library not found
6713 If you have zlib already installed, see config.log for details on the
6714 failure.  It is possible the compiler isn't looking in the proper directory.
6715 Use --without-zlib to disable zlib support." >&2;}
6716    { (exit 1); exit 1; }; }
6717 fi
6718
6719 fi
6720
6721 if test "$enable_spinlocks" = yes; then
6722
6723 cat >>confdefs.h <<\_ACEOF
6724 #define HAVE_SPINLOCKS 1
6725 _ACEOF
6726
6727 else
6728   { echo "$as_me:$LINENO: WARNING:
6729 *** Not using spinlocks will cause poor performance." >&5
6730 echo "$as_me: WARNING:
6731 *** Not using spinlocks will cause poor performance." >&2;}
6732 fi
6733
6734 if test "$with_krb5" = yes ; then
6735   if test "$PORTNAME" != "win32"; then
6736      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6737 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6738 if test "${ac_cv_search_com_err+set}" = set; then
6739   echo $ECHO_N "(cached) $ECHO_C" >&6
6740 else
6741   ac_func_search_save_LIBS=$LIBS
6742 ac_cv_search_com_err=no
6743 cat >conftest.$ac_ext <<_ACEOF
6744 /* confdefs.h.  */
6745 _ACEOF
6746 cat confdefs.h >>conftest.$ac_ext
6747 cat >>conftest.$ac_ext <<_ACEOF
6748 /* end confdefs.h.  */
6749
6750 /* Override any gcc2 internal prototype to avoid an error.  */
6751 #ifdef __cplusplus
6752 extern "C"
6753 #endif
6754 /* We use char because int might match the return type of a gcc2
6755    builtin and then its argument prototype would still apply.  */
6756 char com_err ();
6757 int
6758 main ()
6759 {
6760 com_err ();
6761   ;
6762   return 0;
6763 }
6764 _ACEOF
6765 rm -f conftest.$ac_objext conftest$ac_exeext
6766 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6767   (eval $ac_link) 2>conftest.er1
6768   ac_status=$?
6769   grep -v '^ *+' conftest.er1 >conftest.err
6770   rm -f conftest.er1
6771   cat conftest.err >&5
6772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6773   (exit $ac_status); } &&
6774          { ac_try='test -z "$ac_c_werror_flag"
6775                          || test ! -s conftest.err'
6776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6777   (eval $ac_try) 2>&5
6778   ac_status=$?
6779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6780   (exit $ac_status); }; } &&
6781          { ac_try='test -s conftest$ac_exeext'
6782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6783   (eval $ac_try) 2>&5
6784   ac_status=$?
6785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786   (exit $ac_status); }; }; then
6787   ac_cv_search_com_err="none required"
6788 else
6789   echo "$as_me: failed program was:" >&5
6790 sed 's/^/| /' conftest.$ac_ext >&5
6791
6792 fi
6793 rm -f conftest.err conftest.$ac_objext \
6794       conftest$ac_exeext conftest.$ac_ext
6795 if test "$ac_cv_search_com_err" = no; then
6796   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6797     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6798     cat >conftest.$ac_ext <<_ACEOF
6799 /* confdefs.h.  */
6800 _ACEOF
6801 cat confdefs.h >>conftest.$ac_ext
6802 cat >>conftest.$ac_ext <<_ACEOF
6803 /* end confdefs.h.  */
6804
6805 /* Override any gcc2 internal prototype to avoid an error.  */
6806 #ifdef __cplusplus
6807 extern "C"
6808 #endif
6809 /* We use char because int might match the return type of a gcc2
6810    builtin and then its argument prototype would still apply.  */
6811 char com_err ();
6812 int
6813 main ()
6814 {
6815 com_err ();
6816   ;
6817   return 0;
6818 }
6819 _ACEOF
6820 rm -f conftest.$ac_objext conftest$ac_exeext
6821 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6822   (eval $ac_link) 2>conftest.er1
6823   ac_status=$?
6824   grep -v '^ *+' conftest.er1 >conftest.err
6825   rm -f conftest.er1
6826   cat conftest.err >&5
6827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6828   (exit $ac_status); } &&
6829          { ac_try='test -z "$ac_c_werror_flag"
6830                          || test ! -s conftest.err'
6831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6832   (eval $ac_try) 2>&5
6833   ac_status=$?
6834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6835   (exit $ac_status); }; } &&
6836          { ac_try='test -s conftest$ac_exeext'
6837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6838   (eval $ac_try) 2>&5
6839   ac_status=$?
6840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6841   (exit $ac_status); }; }; then
6842   ac_cv_search_com_err="-l$ac_lib"
6843 break
6844 else
6845   echo "$as_me: failed program was:" >&5
6846 sed 's/^/| /' conftest.$ac_ext >&5
6847
6848 fi
6849 rm -f conftest.err conftest.$ac_objext \
6850       conftest$ac_exeext conftest.$ac_ext
6851   done
6852 fi
6853 LIBS=$ac_func_search_save_LIBS
6854 fi
6855 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6856 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6857 if test "$ac_cv_search_com_err" != no; then
6858   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6859
6860 else
6861   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6862 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6863    { (exit 1); exit 1; }; }
6864 fi
6865
6866      echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
6867 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
6868 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
6869   echo $ECHO_N "(cached) $ECHO_C" >&6
6870 else
6871   ac_func_search_save_LIBS=$LIBS
6872 ac_cv_search_krb5_encrypt=no
6873 cat >conftest.$ac_ext <<_ACEOF
6874 /* confdefs.h.  */
6875 _ACEOF
6876 cat confdefs.h >>conftest.$ac_ext
6877 cat >>conftest.$ac_ext <<_ACEOF
6878 /* end confdefs.h.  */
6879
6880 /* Override any gcc2 internal prototype to avoid an error.  */
6881 #ifdef __cplusplus
6882 extern "C"
6883 #endif
6884 /* We use char because int might match the return type of a gcc2
6885    builtin and then its argument prototype would still apply.  */
6886 char krb5_encrypt ();
6887 int
6888 main ()
6889 {
6890 krb5_encrypt ();
6891   ;
6892   return 0;
6893 }
6894 _ACEOF
6895 rm -f conftest.$ac_objext conftest$ac_exeext
6896 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6897   (eval $ac_link) 2>conftest.er1
6898   ac_status=$?
6899   grep -v '^ *+' conftest.er1 >conftest.err
6900   rm -f conftest.er1
6901   cat conftest.err >&5
6902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6903   (exit $ac_status); } &&
6904          { ac_try='test -z "$ac_c_werror_flag"
6905                          || test ! -s conftest.err'
6906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6907   (eval $ac_try) 2>&5
6908   ac_status=$?
6909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6910   (exit $ac_status); }; } &&
6911          { ac_try='test -s conftest$ac_exeext'
6912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6913   (eval $ac_try) 2>&5
6914   ac_status=$?
6915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6916   (exit $ac_status); }; }; then
6917   ac_cv_search_krb5_encrypt="none required"
6918 else
6919   echo "$as_me: failed program was:" >&5
6920 sed 's/^/| /' conftest.$ac_ext >&5
6921
6922 fi
6923 rm -f conftest.err conftest.$ac_objext \
6924       conftest$ac_exeext conftest.$ac_ext
6925 if test "$ac_cv_search_krb5_encrypt" = no; then
6926   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
6927     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6928     cat >conftest.$ac_ext <<_ACEOF
6929 /* confdefs.h.  */
6930 _ACEOF
6931 cat confdefs.h >>conftest.$ac_ext
6932 cat >>conftest.$ac_ext <<_ACEOF
6933 /* end confdefs.h.  */
6934
6935 /* Override any gcc2 internal prototype to avoid an error.  */
6936 #ifdef __cplusplus
6937 extern "C"
6938 #endif
6939 /* We use char because int might match the return type of a gcc2
6940    builtin and then its argument prototype would still apply.  */
6941 char krb5_encrypt ();
6942 int
6943 main ()
6944 {
6945 krb5_encrypt ();
6946   ;
6947   return 0;
6948 }
6949 _ACEOF
6950 rm -f conftest.$ac_objext conftest$ac_exeext
6951 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6952   (eval $ac_link) 2>conftest.er1
6953   ac_status=$?
6954   grep -v '^ *+' conftest.er1 >conftest.err
6955   rm -f conftest.er1
6956   cat conftest.err >&5
6957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6958   (exit $ac_status); } &&
6959          { ac_try='test -z "$ac_c_werror_flag"
6960                          || test ! -s conftest.err'
6961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6962   (eval $ac_try) 2>&5
6963   ac_status=$?
6964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6965   (exit $ac_status); }; } &&
6966          { ac_try='test -s conftest$ac_exeext'
6967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6968   (eval $ac_try) 2>&5
6969   ac_status=$?
6970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6971   (exit $ac_status); }; }; then
6972   ac_cv_search_krb5_encrypt="-l$ac_lib"
6973 break
6974 else
6975   echo "$as_me: failed program was:" >&5
6976 sed 's/^/| /' conftest.$ac_ext >&5
6977
6978 fi
6979 rm -f conftest.err conftest.$ac_objext \
6980       conftest$ac_exeext conftest.$ac_ext
6981   done
6982 fi
6983 LIBS=$ac_func_search_save_LIBS
6984 fi
6985 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
6986 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
6987 if test "$ac_cv_search_krb5_encrypt" != no; then
6988   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
6989
6990 else
6991   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
6992 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
6993    { (exit 1); exit 1; }; }
6994 fi
6995
6996      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6997 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6998 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6999   echo $ECHO_N "(cached) $ECHO_C" >&6
7000 else
7001   ac_func_search_save_LIBS=$LIBS
7002 ac_cv_search_krb5_sendauth=no
7003 cat >conftest.$ac_ext <<_ACEOF
7004 /* confdefs.h.  */
7005 _ACEOF
7006 cat confdefs.h >>conftest.$ac_ext
7007 cat >>conftest.$ac_ext <<_ACEOF
7008 /* end confdefs.h.  */
7009
7010 /* Override any gcc2 internal prototype to avoid an error.  */
7011 #ifdef __cplusplus
7012 extern "C"
7013 #endif
7014 /* We use char because int might match the return type of a gcc2
7015    builtin and then its argument prototype would still apply.  */
7016 char krb5_sendauth ();
7017 int
7018 main ()
7019 {
7020 krb5_sendauth ();
7021   ;
7022   return 0;
7023 }
7024 _ACEOF
7025 rm -f conftest.$ac_objext conftest$ac_exeext
7026 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7027   (eval $ac_link) 2>conftest.er1
7028   ac_status=$?
7029   grep -v '^ *+' conftest.er1 >conftest.err
7030   rm -f conftest.er1
7031   cat conftest.err >&5
7032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7033   (exit $ac_status); } &&
7034          { ac_try='test -z "$ac_c_werror_flag"
7035                          || test ! -s conftest.err'
7036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7037   (eval $ac_try) 2>&5
7038   ac_status=$?
7039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7040   (exit $ac_status); }; } &&
7041          { ac_try='test -s conftest$ac_exeext'
7042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7043   (eval $ac_try) 2>&5
7044   ac_status=$?
7045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7046   (exit $ac_status); }; }; then
7047   ac_cv_search_krb5_sendauth="none required"
7048 else
7049   echo "$as_me: failed program was:" >&5
7050 sed 's/^/| /' conftest.$ac_ext >&5
7051
7052 fi
7053 rm -f conftest.err conftest.$ac_objext \
7054       conftest$ac_exeext conftest.$ac_ext
7055 if test "$ac_cv_search_krb5_sendauth" = no; then
7056   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
7057     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7058     cat >conftest.$ac_ext <<_ACEOF
7059 /* confdefs.h.  */
7060 _ACEOF
7061 cat confdefs.h >>conftest.$ac_ext
7062 cat >>conftest.$ac_ext <<_ACEOF
7063 /* end confdefs.h.  */
7064
7065 /* Override any gcc2 internal prototype to avoid an error.  */
7066 #ifdef __cplusplus
7067 extern "C"
7068 #endif
7069 /* We use char because int might match the return type of a gcc2
7070    builtin and then its argument prototype would still apply.  */
7071 char krb5_sendauth ();
7072 int
7073 main ()
7074 {
7075 krb5_sendauth ();
7076   ;
7077   return 0;
7078 }
7079 _ACEOF
7080 rm -f conftest.$ac_objext conftest$ac_exeext
7081 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7082   (eval $ac_link) 2>conftest.er1
7083   ac_status=$?
7084   grep -v '^ *+' conftest.er1 >conftest.err
7085   rm -f conftest.er1
7086   cat conftest.err >&5
7087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088   (exit $ac_status); } &&
7089          { ac_try='test -z "$ac_c_werror_flag"
7090                          || test ! -s conftest.err'
7091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7092   (eval $ac_try) 2>&5
7093   ac_status=$?
7094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7095   (exit $ac_status); }; } &&
7096          { ac_try='test -s conftest$ac_exeext'
7097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7098   (eval $ac_try) 2>&5
7099   ac_status=$?
7100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7101   (exit $ac_status); }; }; then
7102   ac_cv_search_krb5_sendauth="-l$ac_lib"
7103 break
7104 else
7105   echo "$as_me: failed program was:" >&5
7106 sed 's/^/| /' conftest.$ac_ext >&5
7107
7108 fi
7109 rm -f conftest.err conftest.$ac_objext \
7110       conftest$ac_exeext conftest.$ac_ext
7111   done
7112 fi
7113 LIBS=$ac_func_search_save_LIBS
7114 fi
7115 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7116 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
7117 if test "$ac_cv_search_krb5_sendauth" != no; then
7118   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
7119
7120 else
7121   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7122 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7123    { (exit 1); exit 1; }; }
7124 fi
7125
7126   else
7127      echo "$as_me:$LINENO: checking for library containing com_err" >&5
7128 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
7129 if test "${ac_cv_search_com_err+set}" = set; then
7130   echo $ECHO_N "(cached) $ECHO_C" >&6
7131 else
7132   ac_func_search_save_LIBS=$LIBS
7133 ac_cv_search_com_err=no
7134 cat >conftest.$ac_ext <<_ACEOF
7135 /* confdefs.h.  */
7136 _ACEOF
7137 cat confdefs.h >>conftest.$ac_ext
7138 cat >>conftest.$ac_ext <<_ACEOF
7139 /* end confdefs.h.  */
7140
7141 /* Override any gcc2 internal prototype to avoid an error.  */
7142 #ifdef __cplusplus
7143 extern "C"
7144 #endif
7145 /* We use char because int might match the return type of a gcc2
7146    builtin and then its argument prototype would still apply.  */
7147 char com_err ();
7148 int
7149 main ()
7150 {
7151 com_err ();
7152   ;
7153   return 0;
7154 }
7155 _ACEOF
7156 rm -f conftest.$ac_objext conftest$ac_exeext
7157 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7158   (eval $ac_link) 2>conftest.er1
7159   ac_status=$?
7160   grep -v '^ *+' conftest.er1 >conftest.err
7161   rm -f conftest.er1
7162   cat conftest.err >&5
7163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7164   (exit $ac_status); } &&
7165          { ac_try='test -z "$ac_c_werror_flag"
7166                          || test ! -s conftest.err'
7167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7168   (eval $ac_try) 2>&5
7169   ac_status=$?
7170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7171   (exit $ac_status); }; } &&
7172          { ac_try='test -s conftest$ac_exeext'
7173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7174   (eval $ac_try) 2>&5
7175   ac_status=$?
7176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7177   (exit $ac_status); }; }; then
7178   ac_cv_search_com_err="none required"
7179 else
7180   echo "$as_me: failed program was:" >&5
7181 sed 's/^/| /' conftest.$ac_ext >&5
7182
7183 fi
7184 rm -f conftest.err conftest.$ac_objext \
7185       conftest$ac_exeext conftest.$ac_ext
7186 if test "$ac_cv_search_com_err" = no; then
7187   for ac_lib in 'comerr32 -lkrb5_32'; do
7188     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7189     cat >conftest.$ac_ext <<_ACEOF
7190 /* confdefs.h.  */
7191 _ACEOF
7192 cat confdefs.h >>conftest.$ac_ext
7193 cat >>conftest.$ac_ext <<_ACEOF
7194 /* end confdefs.h.  */
7195
7196 /* Override any gcc2 internal prototype to avoid an error.  */
7197 #ifdef __cplusplus
7198 extern "C"
7199 #endif
7200 /* We use char because int might match the return type of a gcc2
7201    builtin and then its argument prototype would still apply.  */
7202 char com_err ();
7203 int
7204 main ()
7205 {
7206 com_err ();
7207   ;
7208   return 0;
7209 }
7210 _ACEOF
7211 rm -f conftest.$ac_objext conftest$ac_exeext
7212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7213   (eval $ac_link) 2>conftest.er1
7214   ac_status=$?
7215   grep -v '^ *+' conftest.er1 >conftest.err
7216   rm -f conftest.er1
7217   cat conftest.err >&5
7218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7219   (exit $ac_status); } &&
7220          { ac_try='test -z "$ac_c_werror_flag"
7221                          || test ! -s conftest.err'
7222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7223   (eval $ac_try) 2>&5
7224   ac_status=$?
7225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7226   (exit $ac_status); }; } &&
7227          { ac_try='test -s conftest$ac_exeext'
7228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7229   (eval $ac_try) 2>&5
7230   ac_status=$?
7231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7232   (exit $ac_status); }; }; then
7233   ac_cv_search_com_err="-l$ac_lib"
7234 break
7235 else
7236   echo "$as_me: failed program was:" >&5
7237 sed 's/^/| /' conftest.$ac_ext >&5
7238
7239 fi
7240 rm -f conftest.err conftest.$ac_objext \
7241       conftest$ac_exeext conftest.$ac_ext
7242   done
7243 fi
7244 LIBS=$ac_func_search_save_LIBS
7245 fi
7246 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7247 echo "${ECHO_T}$ac_cv_search_com_err" >&6
7248 if test "$ac_cv_search_com_err" != no; then
7249   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
7250
7251 else
7252   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7253 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7254    { (exit 1); exit 1; }; }
7255 fi
7256
7257   fi
7258 fi
7259
7260 if test "$with_openssl" = yes ; then
7261     if test "$PORTNAME" != "win32"; then
7262
7263 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7264 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
7265 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7266   echo $ECHO_N "(cached) $ECHO_C" >&6
7267 else
7268   ac_check_lib_save_LIBS=$LIBS
7269 LIBS="-lcrypto  $LIBS"
7270 cat >conftest.$ac_ext <<_ACEOF
7271 /* confdefs.h.  */
7272 _ACEOF
7273 cat confdefs.h >>conftest.$ac_ext
7274 cat >>conftest.$ac_ext <<_ACEOF
7275 /* end confdefs.h.  */
7276
7277 /* Override any gcc2 internal prototype to avoid an error.  */
7278 #ifdef __cplusplus
7279 extern "C"
7280 #endif
7281 /* We use char because int might match the return type of a gcc2
7282    builtin and then its argument prototype would still apply.  */
7283 char CRYPTO_new_ex_data ();
7284 int
7285 main ()
7286 {
7287 CRYPTO_new_ex_data ();
7288   ;
7289   return 0;
7290 }
7291 _ACEOF
7292 rm -f conftest.$ac_objext conftest$ac_exeext
7293 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7294   (eval $ac_link) 2>conftest.er1
7295   ac_status=$?
7296   grep -v '^ *+' conftest.er1 >conftest.err
7297   rm -f conftest.er1
7298   cat conftest.err >&5
7299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7300   (exit $ac_status); } &&
7301          { ac_try='test -z "$ac_c_werror_flag"
7302                          || test ! -s conftest.err'
7303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7304   (eval $ac_try) 2>&5
7305   ac_status=$?
7306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7307   (exit $ac_status); }; } &&
7308          { ac_try='test -s conftest$ac_exeext'
7309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7310   (eval $ac_try) 2>&5
7311   ac_status=$?
7312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7313   (exit $ac_status); }; }; then
7314   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7315 else
7316   echo "$as_me: failed program was:" >&5
7317 sed 's/^/| /' conftest.$ac_ext >&5
7318
7319 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7320 fi
7321 rm -f conftest.err conftest.$ac_objext \
7322       conftest$ac_exeext conftest.$ac_ext
7323 LIBS=$ac_check_lib_save_LIBS
7324 fi
7325 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7326 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
7327 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7328   cat >>confdefs.h <<_ACEOF
7329 #define HAVE_LIBCRYPTO 1
7330 _ACEOF
7331
7332   LIBS="-lcrypto $LIBS"
7333
7334 else
7335   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7336 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7337    { (exit 1); exit 1; }; }
7338 fi
7339
7340
7341 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7342 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7343 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7344   echo $ECHO_N "(cached) $ECHO_C" >&6
7345 else
7346   ac_check_lib_save_LIBS=$LIBS
7347 LIBS="-lssl  $LIBS"
7348 cat >conftest.$ac_ext <<_ACEOF
7349 /* confdefs.h.  */
7350 _ACEOF
7351 cat confdefs.h >>conftest.$ac_ext
7352 cat >>conftest.$ac_ext <<_ACEOF
7353 /* end confdefs.h.  */
7354
7355 /* Override any gcc2 internal prototype to avoid an error.  */
7356 #ifdef __cplusplus
7357 extern "C"
7358 #endif
7359 /* We use char because int might match the return type of a gcc2
7360    builtin and then its argument prototype would still apply.  */
7361 char SSL_library_init ();
7362 int
7363 main ()
7364 {
7365 SSL_library_init ();
7366   ;
7367   return 0;
7368 }
7369 _ACEOF
7370 rm -f conftest.$ac_objext conftest$ac_exeext
7371 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7372   (eval $ac_link) 2>conftest.er1
7373   ac_status=$?
7374   grep -v '^ *+' conftest.er1 >conftest.err
7375   rm -f conftest.er1
7376   cat conftest.err >&5
7377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7378   (exit $ac_status); } &&
7379          { ac_try='test -z "$ac_c_werror_flag"
7380                          || test ! -s conftest.err'
7381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7382   (eval $ac_try) 2>&5
7383   ac_status=$?
7384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385   (exit $ac_status); }; } &&
7386          { ac_try='test -s conftest$ac_exeext'
7387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7388   (eval $ac_try) 2>&5
7389   ac_status=$?
7390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391   (exit $ac_status); }; }; then
7392   ac_cv_lib_ssl_SSL_library_init=yes
7393 else
7394   echo "$as_me: failed program was:" >&5
7395 sed 's/^/| /' conftest.$ac_ext >&5
7396
7397 ac_cv_lib_ssl_SSL_library_init=no
7398 fi
7399 rm -f conftest.err conftest.$ac_objext \
7400       conftest$ac_exeext conftest.$ac_ext
7401 LIBS=$ac_check_lib_save_LIBS
7402 fi
7403 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7404 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7405 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7406   cat >>confdefs.h <<_ACEOF
7407 #define HAVE_LIBSSL 1
7408 _ACEOF
7409
7410   LIBS="-lssl $LIBS"
7411
7412 else
7413   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7414 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7415    { (exit 1); exit 1; }; }
7416 fi
7417
7418   else
7419
7420 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7421 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7422 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7423   echo $ECHO_N "(cached) $ECHO_C" >&6
7424 else
7425   ac_check_lib_save_LIBS=$LIBS
7426 LIBS="-leay32  $LIBS"
7427 cat >conftest.$ac_ext <<_ACEOF
7428 /* confdefs.h.  */
7429 _ACEOF
7430 cat confdefs.h >>conftest.$ac_ext
7431 cat >>conftest.$ac_ext <<_ACEOF
7432 /* end confdefs.h.  */
7433
7434 /* Override any gcc2 internal prototype to avoid an error.  */
7435 #ifdef __cplusplus
7436 extern "C"
7437 #endif
7438 /* We use char because int might match the return type of a gcc2
7439    builtin and then its argument prototype would still apply.  */
7440 char CRYPTO_new_ex_data ();
7441 int
7442 main ()
7443 {
7444 CRYPTO_new_ex_data ();
7445   ;
7446   return 0;
7447 }
7448 _ACEOF
7449 rm -f conftest.$ac_objext conftest$ac_exeext
7450 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7451   (eval $ac_link) 2>conftest.er1
7452   ac_status=$?
7453   grep -v '^ *+' conftest.er1 >conftest.err
7454   rm -f conftest.er1
7455   cat conftest.err >&5
7456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7457   (exit $ac_status); } &&
7458          { ac_try='test -z "$ac_c_werror_flag"
7459                          || test ! -s conftest.err'
7460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7461   (eval $ac_try) 2>&5
7462   ac_status=$?
7463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7464   (exit $ac_status); }; } &&
7465          { ac_try='test -s conftest$ac_exeext'
7466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7467   (eval $ac_try) 2>&5
7468   ac_status=$?
7469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7470   (exit $ac_status); }; }; then
7471   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7472 else
7473   echo "$as_me: failed program was:" >&5
7474 sed 's/^/| /' conftest.$ac_ext >&5
7475
7476 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7477 fi
7478 rm -f conftest.err conftest.$ac_objext \
7479       conftest$ac_exeext conftest.$ac_ext
7480 LIBS=$ac_check_lib_save_LIBS
7481 fi
7482 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7483 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7484 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7485   cat >>confdefs.h <<_ACEOF
7486 #define HAVE_LIBEAY32 1
7487 _ACEOF
7488
7489   LIBS="-leay32 $LIBS"
7490
7491 else
7492   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7493 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7494    { (exit 1); exit 1; }; }
7495 fi
7496
7497
7498 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7499 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7500 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7501   echo $ECHO_N "(cached) $ECHO_C" >&6
7502 else
7503   ac_check_lib_save_LIBS=$LIBS
7504 LIBS="-lssleay32  $LIBS"
7505 cat >conftest.$ac_ext <<_ACEOF
7506 /* confdefs.h.  */
7507 _ACEOF
7508 cat confdefs.h >>conftest.$ac_ext
7509 cat >>conftest.$ac_ext <<_ACEOF
7510 /* end confdefs.h.  */
7511
7512 /* Override any gcc2 internal prototype to avoid an error.  */
7513 #ifdef __cplusplus
7514 extern "C"
7515 #endif
7516 /* We use char because int might match the return type of a gcc2
7517    builtin and then its argument prototype would still apply.  */
7518 char SSL_library_init ();
7519 int
7520 main ()
7521 {
7522 SSL_library_init ();
7523   ;
7524   return 0;
7525 }
7526 _ACEOF
7527 rm -f conftest.$ac_objext conftest$ac_exeext
7528 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7529   (eval $ac_link) 2>conftest.er1
7530   ac_status=$?
7531   grep -v '^ *+' conftest.er1 >conftest.err
7532   rm -f conftest.er1
7533   cat conftest.err >&5
7534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7535   (exit $ac_status); } &&
7536          { ac_try='test -z "$ac_c_werror_flag"
7537                          || test ! -s conftest.err'
7538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7539   (eval $ac_try) 2>&5
7540   ac_status=$?
7541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542   (exit $ac_status); }; } &&
7543          { ac_try='test -s conftest$ac_exeext'
7544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7545   (eval $ac_try) 2>&5
7546   ac_status=$?
7547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548   (exit $ac_status); }; }; then
7549   ac_cv_lib_ssleay32_SSL_library_init=yes
7550 else
7551   echo "$as_me: failed program was:" >&5
7552 sed 's/^/| /' conftest.$ac_ext >&5
7553
7554 ac_cv_lib_ssleay32_SSL_library_init=no
7555 fi
7556 rm -f conftest.err conftest.$ac_objext \
7557       conftest$ac_exeext conftest.$ac_ext
7558 LIBS=$ac_check_lib_save_LIBS
7559 fi
7560 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7561 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7562 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7563   cat >>confdefs.h <<_ACEOF
7564 #define HAVE_LIBSSLEAY32 1
7565 _ACEOF
7566
7567   LIBS="-lssleay32 $LIBS"
7568
7569 else
7570   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7571 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7572    { (exit 1); exit 1; }; }
7573 fi
7574
7575   fi
7576 fi
7577
7578 if test "$with_pam" = yes ; then
7579
7580 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7581 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7582 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7583   echo $ECHO_N "(cached) $ECHO_C" >&6
7584 else
7585   ac_check_lib_save_LIBS=$LIBS
7586 LIBS="-lpam  $LIBS"
7587 cat >conftest.$ac_ext <<_ACEOF
7588 /* confdefs.h.  */
7589 _ACEOF
7590 cat confdefs.h >>conftest.$ac_ext
7591 cat >>conftest.$ac_ext <<_ACEOF
7592 /* end confdefs.h.  */
7593
7594 /* Override any gcc2 internal prototype to avoid an error.  */
7595 #ifdef __cplusplus
7596 extern "C"
7597 #endif
7598 /* We use char because int might match the return type of a gcc2
7599    builtin and then its argument prototype would still apply.  */
7600 char pam_start ();
7601 int
7602 main ()
7603 {
7604 pam_start ();
7605   ;
7606   return 0;
7607 }
7608 _ACEOF
7609 rm -f conftest.$ac_objext conftest$ac_exeext
7610 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7611   (eval $ac_link) 2>conftest.er1
7612   ac_status=$?
7613   grep -v '^ *+' conftest.er1 >conftest.err
7614   rm -f conftest.er1
7615   cat conftest.err >&5
7616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617   (exit $ac_status); } &&
7618          { ac_try='test -z "$ac_c_werror_flag"
7619                          || test ! -s conftest.err'
7620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7621   (eval $ac_try) 2>&5
7622   ac_status=$?
7623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624   (exit $ac_status); }; } &&
7625          { ac_try='test -s conftest$ac_exeext'
7626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7627   (eval $ac_try) 2>&5
7628   ac_status=$?
7629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7630   (exit $ac_status); }; }; then
7631   ac_cv_lib_pam_pam_start=yes
7632 else
7633   echo "$as_me: failed program was:" >&5
7634 sed 's/^/| /' conftest.$ac_ext >&5
7635
7636 ac_cv_lib_pam_pam_start=no
7637 fi
7638 rm -f conftest.err conftest.$ac_objext \
7639       conftest$ac_exeext conftest.$ac_ext
7640 LIBS=$ac_check_lib_save_LIBS
7641 fi
7642 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7643 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7644 if test $ac_cv_lib_pam_pam_start = yes; then
7645   cat >>confdefs.h <<_ACEOF
7646 #define HAVE_LIBPAM 1
7647 _ACEOF
7648
7649   LIBS="-lpam $LIBS"
7650
7651 else
7652   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7653 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7654    { (exit 1); exit 1; }; }
7655 fi
7656
7657 fi
7658
7659
7660 ##
7661 ## Header files
7662 ##
7663
7664 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7665 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7666 if test "${ac_cv_header_stdc+set}" = set; then
7667   echo $ECHO_N "(cached) $ECHO_C" >&6
7668 else
7669   cat >conftest.$ac_ext <<_ACEOF
7670 /* confdefs.h.  */
7671 _ACEOF
7672 cat confdefs.h >>conftest.$ac_ext
7673 cat >>conftest.$ac_ext <<_ACEOF
7674 /* end confdefs.h.  */
7675 #include <stdlib.h>
7676 #include <stdarg.h>
7677 #include <string.h>
7678 #include <float.h>
7679
7680 int
7681 main ()
7682 {
7683
7684   ;
7685   return 0;
7686 }
7687 _ACEOF
7688 rm -f conftest.$ac_objext
7689 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7690   (eval $ac_compile) 2>conftest.er1
7691   ac_status=$?
7692   grep -v '^ *+' conftest.er1 >conftest.err
7693   rm -f conftest.er1
7694   cat conftest.err >&5
7695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7696   (exit $ac_status); } &&
7697          { ac_try='test -z "$ac_c_werror_flag"
7698                          || test ! -s conftest.err'
7699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7700   (eval $ac_try) 2>&5
7701   ac_status=$?
7702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7703   (exit $ac_status); }; } &&
7704          { ac_try='test -s conftest.$ac_objext'
7705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7706   (eval $ac_try) 2>&5
7707   ac_status=$?
7708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7709   (exit $ac_status); }; }; then
7710   ac_cv_header_stdc=yes
7711 else
7712   echo "$as_me: failed program was:" >&5
7713 sed 's/^/| /' conftest.$ac_ext >&5
7714
7715 ac_cv_header_stdc=no
7716 fi
7717 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7718
7719 if test $ac_cv_header_stdc = yes; then
7720   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7721   cat >conftest.$ac_ext <<_ACEOF
7722 /* confdefs.h.  */
7723 _ACEOF
7724 cat confdefs.h >>conftest.$ac_ext
7725 cat >>conftest.$ac_ext <<_ACEOF
7726 /* end confdefs.h.  */
7727 #include <string.h>
7728
7729 _ACEOF
7730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7731   $EGREP "memchr" >/dev/null 2>&1; then
7732   :
7733 else
7734   ac_cv_header_stdc=no
7735 fi
7736 rm -f conftest*
7737
7738 fi
7739
7740 if test $ac_cv_header_stdc = yes; then
7741   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7742   cat >conftest.$ac_ext <<_ACEOF
7743 /* confdefs.h.  */
7744 _ACEOF
7745 cat confdefs.h >>conftest.$ac_ext
7746 cat >>conftest.$ac_ext <<_ACEOF
7747 /* end confdefs.h.  */
7748 #include <stdlib.h>
7749
7750 _ACEOF
7751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7752   $EGREP "free" >/dev/null 2>&1; then
7753   :
7754 else
7755   ac_cv_header_stdc=no
7756 fi
7757 rm -f conftest*
7758
7759 fi
7760
7761 if test $ac_cv_header_stdc = yes; then
7762   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7763   if test "$cross_compiling" = yes; then
7764   :
7765 else
7766   cat >conftest.$ac_ext <<_ACEOF
7767 /* confdefs.h.  */
7768 _ACEOF
7769 cat confdefs.h >>conftest.$ac_ext
7770 cat >>conftest.$ac_ext <<_ACEOF
7771 /* end confdefs.h.  */
7772 #include <ctype.h>
7773 #if ((' ' & 0x0FF) == 0x020)
7774 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7775 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7776 #else
7777 # define ISLOWER(c) \
7778                    (('a' <= (c) && (c) <= 'i') \
7779                      || ('j' <= (c) && (c) <= 'r') \
7780                      || ('s' <= (c) && (c) <= 'z'))
7781 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7782 #endif
7783
7784 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7785 int
7786 main ()
7787 {
7788   int i;
7789   for (i = 0; i < 256; i++)
7790     if (XOR (islower (i), ISLOWER (i))
7791         || toupper (i) != TOUPPER (i))
7792       exit(2);
7793   exit (0);
7794 }
7795 _ACEOF
7796 rm -f conftest$ac_exeext
7797 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7798   (eval $ac_link) 2>&5
7799   ac_status=$?
7800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7801   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7803   (eval $ac_try) 2>&5
7804   ac_status=$?
7805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806   (exit $ac_status); }; }; then
7807   :
7808 else
7809   echo "$as_me: program exited with status $ac_status" >&5
7810 echo "$as_me: failed program was:" >&5
7811 sed 's/^/| /' conftest.$ac_ext >&5
7812
7813 ( exit $ac_status )
7814 ac_cv_header_stdc=no
7815 fi
7816 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7817 fi
7818 fi
7819 fi
7820 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7821 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7822 if test $ac_cv_header_stdc = yes; then
7823
7824 cat >>confdefs.h <<\_ACEOF
7825 #define STDC_HEADERS 1
7826 _ACEOF
7827
7828 fi
7829
7830 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7841                   inttypes.h stdint.h unistd.h
7842 do
7843 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7844 echo "$as_me:$LINENO: checking for $ac_header" >&5
7845 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7846 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7847   echo $ECHO_N "(cached) $ECHO_C" >&6
7848 else
7849   cat >conftest.$ac_ext <<_ACEOF
7850 /* confdefs.h.  */
7851 _ACEOF
7852 cat confdefs.h >>conftest.$ac_ext
7853 cat >>conftest.$ac_ext <<_ACEOF
7854 /* end confdefs.h.  */
7855 $ac_includes_default
7856
7857 #include <$ac_header>
7858 _ACEOF
7859 rm -f conftest.$ac_objext
7860 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7861   (eval $ac_compile) 2>conftest.er1
7862   ac_status=$?
7863   grep -v '^ *+' conftest.er1 >conftest.err
7864   rm -f conftest.er1
7865   cat conftest.err >&5
7866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7867   (exit $ac_status); } &&
7868          { ac_try='test -z "$ac_c_werror_flag"
7869                          || test ! -s conftest.err'
7870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7871   (eval $ac_try) 2>&5
7872   ac_status=$?
7873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7874   (exit $ac_status); }; } &&
7875          { ac_try='test -s conftest.$ac_objext'
7876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7877   (eval $ac_try) 2>&5
7878   ac_status=$?
7879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7880   (exit $ac_status); }; }; then
7881   eval "$as_ac_Header=yes"
7882 else
7883   echo "$as_me: failed program was:" >&5
7884 sed 's/^/| /' conftest.$ac_ext >&5
7885
7886 eval "$as_ac_Header=no"
7887 fi
7888 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7889 fi
7890 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7891 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7892 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7893   cat >>confdefs.h <<_ACEOF
7894 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7895 _ACEOF
7896
7897 fi
7898
7899 done
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927 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
7928 do
7929 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7930 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7931   echo "$as_me:$LINENO: checking for $ac_header" >&5
7932 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7933 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7934   echo $ECHO_N "(cached) $ECHO_C" >&6
7935 fi
7936 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7937 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7938 else
7939   # Is the header compilable?
7940 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7941 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7942 cat >conftest.$ac_ext <<_ACEOF
7943 /* confdefs.h.  */
7944 _ACEOF
7945 cat confdefs.h >>conftest.$ac_ext
7946 cat >>conftest.$ac_ext <<_ACEOF
7947 /* end confdefs.h.  */
7948 $ac_includes_default
7949 #include <$ac_header>
7950 _ACEOF
7951 rm -f conftest.$ac_objext
7952 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7953   (eval $ac_compile) 2>conftest.er1
7954   ac_status=$?
7955   grep -v '^ *+' conftest.er1 >conftest.err
7956   rm -f conftest.er1
7957   cat conftest.err >&5
7958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7959   (exit $ac_status); } &&
7960          { ac_try='test -z "$ac_c_werror_flag"
7961                          || test ! -s conftest.err'
7962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7963   (eval $ac_try) 2>&5
7964   ac_status=$?
7965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966   (exit $ac_status); }; } &&
7967          { ac_try='test -s conftest.$ac_objext'
7968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7969   (eval $ac_try) 2>&5
7970   ac_status=$?
7971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7972   (exit $ac_status); }; }; then
7973   ac_header_compiler=yes
7974 else
7975   echo "$as_me: failed program was:" >&5
7976 sed 's/^/| /' conftest.$ac_ext >&5
7977
7978 ac_header_compiler=no
7979 fi
7980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7981 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7982 echo "${ECHO_T}$ac_header_compiler" >&6
7983
7984 # Is the header present?
7985 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7986 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7987 cat >conftest.$ac_ext <<_ACEOF
7988 /* confdefs.h.  */
7989 _ACEOF
7990 cat confdefs.h >>conftest.$ac_ext
7991 cat >>conftest.$ac_ext <<_ACEOF
7992 /* end confdefs.h.  */
7993 #include <$ac_header>
7994 _ACEOF
7995 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7996   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7997   ac_status=$?
7998   grep -v '^ *+' conftest.er1 >conftest.err
7999   rm -f conftest.er1
8000   cat conftest.err >&5
8001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8002   (exit $ac_status); } >/dev/null; then
8003   if test -s conftest.err; then
8004     ac_cpp_err=$ac_c_preproc_warn_flag
8005     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8006   else
8007     ac_cpp_err=
8008   fi
8009 else
8010   ac_cpp_err=yes
8011 fi
8012 if test -z "$ac_cpp_err"; then
8013   ac_header_preproc=yes
8014 else
8015   echo "$as_me: failed program was:" >&5
8016 sed 's/^/| /' conftest.$ac_ext >&5
8017
8018   ac_header_preproc=no
8019 fi
8020 rm -f conftest.err conftest.$ac_ext
8021 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8022 echo "${ECHO_T}$ac_header_preproc" >&6
8023
8024 # So?  What about this header?
8025 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8026   yes:no: )
8027     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8028 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8029     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8030 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8031     ac_header_preproc=yes
8032     ;;
8033   no:yes:* )
8034     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8035 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8036     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8037 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8038     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8039 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8040     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8041 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8042     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8043 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8044     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8045 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8046     (
8047       cat <<\_ASBOX
8048 ## ---------------------------------------- ##
8049 ## Report this to pgsql-bugs@postgresql.org ##
8050 ## ---------------------------------------- ##
8051 _ASBOX
8052     ) |
8053       sed "s/^/$as_me: WARNING:     /" >&2
8054     ;;
8055 esac
8056 echo "$as_me:$LINENO: checking for $ac_header" >&5
8057 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8058 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8059   echo $ECHO_N "(cached) $ECHO_C" >&6
8060 else
8061   eval "$as_ac_Header=\$ac_header_preproc"
8062 fi
8063 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8064 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8065
8066 fi
8067 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8068   cat >>confdefs.h <<_ACEOF
8069 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8070 _ACEOF
8071
8072 fi
8073
8074 done
8075
8076
8077 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
8078 # netinet/in.h is included first.
8079
8080 for ac_header in netinet/in.h
8081 do
8082 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8083 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8084   echo "$as_me:$LINENO: checking for $ac_header" >&5
8085 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8086 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8087   echo $ECHO_N "(cached) $ECHO_C" >&6
8088 fi
8089 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8090 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8091 else
8092   # Is the header compilable?
8093 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8094 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8095 cat >conftest.$ac_ext <<_ACEOF
8096 /* confdefs.h.  */
8097 _ACEOF
8098 cat confdefs.h >>conftest.$ac_ext
8099 cat >>conftest.$ac_ext <<_ACEOF
8100 /* end confdefs.h.  */
8101 $ac_includes_default
8102 #include <$ac_header>
8103 _ACEOF
8104 rm -f conftest.$ac_objext
8105 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8106   (eval $ac_compile) 2>conftest.er1
8107   ac_status=$?
8108   grep -v '^ *+' conftest.er1 >conftest.err
8109   rm -f conftest.er1
8110   cat conftest.err >&5
8111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8112   (exit $ac_status); } &&
8113          { ac_try='test -z "$ac_c_werror_flag"
8114                          || test ! -s conftest.err'
8115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8116   (eval $ac_try) 2>&5
8117   ac_status=$?
8118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8119   (exit $ac_status); }; } &&
8120          { ac_try='test -s conftest.$ac_objext'
8121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8122   (eval $ac_try) 2>&5
8123   ac_status=$?
8124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8125   (exit $ac_status); }; }; then
8126   ac_header_compiler=yes
8127 else
8128   echo "$as_me: failed program was:" >&5
8129 sed 's/^/| /' conftest.$ac_ext >&5
8130
8131 ac_header_compiler=no
8132 fi
8133 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8134 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8135 echo "${ECHO_T}$ac_header_compiler" >&6
8136
8137 # Is the header present?
8138 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8139 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8140 cat >conftest.$ac_ext <<_ACEOF
8141 /* confdefs.h.  */
8142 _ACEOF
8143 cat confdefs.h >>conftest.$ac_ext
8144 cat >>conftest.$ac_ext <<_ACEOF
8145 /* end confdefs.h.  */
8146 #include <$ac_header>
8147 _ACEOF
8148 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8149   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8150   ac_status=$?
8151   grep -v '^ *+' conftest.er1 >conftest.err
8152   rm -f conftest.er1
8153   cat conftest.err >&5
8154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155   (exit $ac_status); } >/dev/null; then
8156   if test -s conftest.err; then
8157     ac_cpp_err=$ac_c_preproc_warn_flag
8158     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8159   else
8160     ac_cpp_err=
8161   fi
8162 else
8163   ac_cpp_err=yes
8164 fi
8165 if test -z "$ac_cpp_err"; then
8166   ac_header_preproc=yes
8167 else
8168   echo "$as_me: failed program was:" >&5
8169 sed 's/^/| /' conftest.$ac_ext >&5
8170
8171   ac_header_preproc=no
8172 fi
8173 rm -f conftest.err conftest.$ac_ext
8174 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8175 echo "${ECHO_T}$ac_header_preproc" >&6
8176
8177 # So?  What about this header?
8178 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8179   yes:no: )
8180     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8181 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8182     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8183 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8184     ac_header_preproc=yes
8185     ;;
8186   no:yes:* )
8187     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8188 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8189     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8190 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8191     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8192 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8193     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8194 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8195     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8196 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8197     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8198 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8199     (
8200       cat <<\_ASBOX
8201 ## ---------------------------------------- ##
8202 ## Report this to pgsql-bugs@postgresql.org ##
8203 ## ---------------------------------------- ##
8204 _ASBOX
8205     ) |
8206       sed "s/^/$as_me: WARNING:     /" >&2
8207     ;;
8208 esac
8209 echo "$as_me:$LINENO: checking for $ac_header" >&5
8210 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8211 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8212   echo $ECHO_N "(cached) $ECHO_C" >&6
8213 else
8214   eval "$as_ac_Header=\$ac_header_preproc"
8215 fi
8216 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8217 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8218
8219 fi
8220 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8221   cat >>confdefs.h <<_ACEOF
8222 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8223 _ACEOF
8224
8225 fi
8226
8227 done
8228
8229
8230 for ac_header in netinet/tcp.h
8231 do
8232 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8233 echo "$as_me:$LINENO: checking for $ac_header" >&5
8234 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8235 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8236   echo $ECHO_N "(cached) $ECHO_C" >&6
8237 else
8238   cat >conftest.$ac_ext <<_ACEOF
8239 /* confdefs.h.  */
8240 _ACEOF
8241 cat confdefs.h >>conftest.$ac_ext
8242 cat >>conftest.$ac_ext <<_ACEOF
8243 /* end confdefs.h.  */
8244 $ac_includes_default
8245 #ifdef HAVE_NETINET_IN_H
8246 #include <netinet/in.h>
8247 #endif
8248
8249
8250 #include <$ac_header>
8251 _ACEOF
8252 rm -f conftest.$ac_objext
8253 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8254   (eval $ac_compile) 2>conftest.er1
8255   ac_status=$?
8256   grep -v '^ *+' conftest.er1 >conftest.err
8257   rm -f conftest.er1
8258   cat conftest.err >&5
8259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8260   (exit $ac_status); } &&
8261          { ac_try='test -z "$ac_c_werror_flag"
8262                          || test ! -s conftest.err'
8263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8264   (eval $ac_try) 2>&5
8265   ac_status=$?
8266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8267   (exit $ac_status); }; } &&
8268          { ac_try='test -s conftest.$ac_objext'
8269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8270   (eval $ac_try) 2>&5
8271   ac_status=$?
8272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8273   (exit $ac_status); }; }; then
8274   eval "$as_ac_Header=yes"
8275 else
8276   echo "$as_me: failed program was:" >&5
8277 sed 's/^/| /' conftest.$ac_ext >&5
8278
8279 eval "$as_ac_Header=no"
8280 fi
8281 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8282 fi
8283 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8284 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8285 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8286   cat >>confdefs.h <<_ACEOF
8287 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8288 _ACEOF
8289
8290 fi
8291
8292 done
8293
8294
8295 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8296
8297 for ac_header in readline/readline.h
8298 do
8299 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8300 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8301   echo "$as_me:$LINENO: checking for $ac_header" >&5
8302 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8303 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8304   echo $ECHO_N "(cached) $ECHO_C" >&6
8305 fi
8306 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8307 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8308 else
8309   # Is the header compilable?
8310 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8311 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8312 cat >conftest.$ac_ext <<_ACEOF
8313 /* confdefs.h.  */
8314 _ACEOF
8315 cat confdefs.h >>conftest.$ac_ext
8316 cat >>conftest.$ac_ext <<_ACEOF
8317 /* end confdefs.h.  */
8318 $ac_includes_default
8319 #include <$ac_header>
8320 _ACEOF
8321 rm -f conftest.$ac_objext
8322 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8323   (eval $ac_compile) 2>conftest.er1
8324   ac_status=$?
8325   grep -v '^ *+' conftest.er1 >conftest.err
8326   rm -f conftest.er1
8327   cat conftest.err >&5
8328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8329   (exit $ac_status); } &&
8330          { ac_try='test -z "$ac_c_werror_flag"
8331                          || test ! -s conftest.err'
8332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8333   (eval $ac_try) 2>&5
8334   ac_status=$?
8335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8336   (exit $ac_status); }; } &&
8337          { ac_try='test -s conftest.$ac_objext'
8338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8339   (eval $ac_try) 2>&5
8340   ac_status=$?
8341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342   (exit $ac_status); }; }; then
8343   ac_header_compiler=yes
8344 else
8345   echo "$as_me: failed program was:" >&5
8346 sed 's/^/| /' conftest.$ac_ext >&5
8347
8348 ac_header_compiler=no
8349 fi
8350 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8351 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8352 echo "${ECHO_T}$ac_header_compiler" >&6
8353
8354 # Is the header present?
8355 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8356 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8357 cat >conftest.$ac_ext <<_ACEOF
8358 /* confdefs.h.  */
8359 _ACEOF
8360 cat confdefs.h >>conftest.$ac_ext
8361 cat >>conftest.$ac_ext <<_ACEOF
8362 /* end confdefs.h.  */
8363 #include <$ac_header>
8364 _ACEOF
8365 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8366   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8367   ac_status=$?
8368   grep -v '^ *+' conftest.er1 >conftest.err
8369   rm -f conftest.er1
8370   cat conftest.err >&5
8371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8372   (exit $ac_status); } >/dev/null; then
8373   if test -s conftest.err; then
8374     ac_cpp_err=$ac_c_preproc_warn_flag
8375     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8376   else
8377     ac_cpp_err=
8378   fi
8379 else
8380   ac_cpp_err=yes
8381 fi
8382 if test -z "$ac_cpp_err"; then
8383   ac_header_preproc=yes
8384 else
8385   echo "$as_me: failed program was:" >&5
8386 sed 's/^/| /' conftest.$ac_ext >&5
8387
8388   ac_header_preproc=no
8389 fi
8390 rm -f conftest.err conftest.$ac_ext
8391 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8392 echo "${ECHO_T}$ac_header_preproc" >&6
8393
8394 # So?  What about this header?
8395 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8396   yes:no: )
8397     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8398 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8399     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8400 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8401     ac_header_preproc=yes
8402     ;;
8403   no:yes:* )
8404     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8405 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8406     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8407 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8408     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8409 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8410     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8411 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8412     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8413 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8414     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8415 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8416     (
8417       cat <<\_ASBOX
8418 ## ---------------------------------------- ##
8419 ## Report this to pgsql-bugs@postgresql.org ##
8420 ## ---------------------------------------- ##
8421 _ASBOX
8422     ) |
8423       sed "s/^/$as_me: WARNING:     /" >&2
8424     ;;
8425 esac
8426 echo "$as_me:$LINENO: checking for $ac_header" >&5
8427 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8428 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8429   echo $ECHO_N "(cached) $ECHO_C" >&6
8430 else
8431   eval "$as_ac_Header=\$ac_header_preproc"
8432 fi
8433 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8434 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8435
8436 fi
8437 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8438   cat >>confdefs.h <<_ACEOF
8439 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8440 _ACEOF
8441
8442 else
8443
8444 for ac_header in readline.h
8445 do
8446 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8447 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8448   echo "$as_me:$LINENO: checking for $ac_header" >&5
8449 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8450 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8451   echo $ECHO_N "(cached) $ECHO_C" >&6
8452 fi
8453 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8454 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8455 else
8456   # Is the header compilable?
8457 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8458 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8459 cat >conftest.$ac_ext <<_ACEOF
8460 /* confdefs.h.  */
8461 _ACEOF
8462 cat confdefs.h >>conftest.$ac_ext
8463 cat >>conftest.$ac_ext <<_ACEOF
8464 /* end confdefs.h.  */
8465 $ac_includes_default
8466 #include <$ac_header>
8467 _ACEOF
8468 rm -f conftest.$ac_objext
8469 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8470   (eval $ac_compile) 2>conftest.er1
8471   ac_status=$?
8472   grep -v '^ *+' conftest.er1 >conftest.err
8473   rm -f conftest.er1
8474   cat conftest.err >&5
8475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476   (exit $ac_status); } &&
8477          { ac_try='test -z "$ac_c_werror_flag"
8478                          || test ! -s conftest.err'
8479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8480   (eval $ac_try) 2>&5
8481   ac_status=$?
8482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8483   (exit $ac_status); }; } &&
8484          { ac_try='test -s conftest.$ac_objext'
8485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8486   (eval $ac_try) 2>&5
8487   ac_status=$?
8488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8489   (exit $ac_status); }; }; then
8490   ac_header_compiler=yes
8491 else
8492   echo "$as_me: failed program was:" >&5
8493 sed 's/^/| /' conftest.$ac_ext >&5
8494
8495 ac_header_compiler=no
8496 fi
8497 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8498 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8499 echo "${ECHO_T}$ac_header_compiler" >&6
8500
8501 # Is the header present?
8502 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8503 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8504 cat >conftest.$ac_ext <<_ACEOF
8505 /* confdefs.h.  */
8506 _ACEOF
8507 cat confdefs.h >>conftest.$ac_ext
8508 cat >>conftest.$ac_ext <<_ACEOF
8509 /* end confdefs.h.  */
8510 #include <$ac_header>
8511 _ACEOF
8512 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8513   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8514   ac_status=$?
8515   grep -v '^ *+' conftest.er1 >conftest.err
8516   rm -f conftest.er1
8517   cat conftest.err >&5
8518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8519   (exit $ac_status); } >/dev/null; then
8520   if test -s conftest.err; then
8521     ac_cpp_err=$ac_c_preproc_warn_flag
8522     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8523   else
8524     ac_cpp_err=
8525   fi
8526 else
8527   ac_cpp_err=yes
8528 fi
8529 if test -z "$ac_cpp_err"; then
8530   ac_header_preproc=yes
8531 else
8532   echo "$as_me: failed program was:" >&5
8533 sed 's/^/| /' conftest.$ac_ext >&5
8534
8535   ac_header_preproc=no
8536 fi
8537 rm -f conftest.err conftest.$ac_ext
8538 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8539 echo "${ECHO_T}$ac_header_preproc" >&6
8540
8541 # So?  What about this header?
8542 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8543   yes:no: )
8544     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8545 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8546     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8547 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8548     ac_header_preproc=yes
8549     ;;
8550   no:yes:* )
8551     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8552 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8553     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8554 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8555     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8556 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8557     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8558 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8559     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8560 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8561     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8562 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8563     (
8564       cat <<\_ASBOX
8565 ## ---------------------------------------- ##
8566 ## Report this to pgsql-bugs@postgresql.org ##
8567 ## ---------------------------------------- ##
8568 _ASBOX
8569     ) |
8570       sed "s/^/$as_me: WARNING:     /" >&2
8571     ;;
8572 esac
8573 echo "$as_me:$LINENO: checking for $ac_header" >&5
8574 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8575 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8576   echo $ECHO_N "(cached) $ECHO_C" >&6
8577 else
8578   eval "$as_ac_Header=\$ac_header_preproc"
8579 fi
8580 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8581 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8582
8583 fi
8584 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8585   cat >>confdefs.h <<_ACEOF
8586 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8587 _ACEOF
8588
8589 else
8590   { { echo "$as_me:$LINENO: error: readline header not found
8591 If you have readline already installed, see config.log for details on the
8592 failure.  It is possible the compiler isn't looking in the proper directory.
8593 Use --without-readline to disable readline support." >&5
8594 echo "$as_me: error: readline header not found
8595 If you have readline already installed, see config.log for details on the
8596 failure.  It is possible the compiler isn't looking in the proper directory.
8597 Use --without-readline to disable readline support." >&2;}
8598    { (exit 1); exit 1; }; }
8599 fi
8600
8601 done
8602
8603 fi
8604
8605 done
8606
8607
8608 for ac_header in readline/history.h
8609 do
8610 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8612   echo "$as_me:$LINENO: checking for $ac_header" >&5
8613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8615   echo $ECHO_N "(cached) $ECHO_C" >&6
8616 fi
8617 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8618 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8619 else
8620   # Is the header compilable?
8621 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8622 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8623 cat >conftest.$ac_ext <<_ACEOF
8624 /* confdefs.h.  */
8625 _ACEOF
8626 cat confdefs.h >>conftest.$ac_ext
8627 cat >>conftest.$ac_ext <<_ACEOF
8628 /* end confdefs.h.  */
8629 $ac_includes_default
8630 #include <$ac_header>
8631 _ACEOF
8632 rm -f conftest.$ac_objext
8633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8634   (eval $ac_compile) 2>conftest.er1
8635   ac_status=$?
8636   grep -v '^ *+' conftest.er1 >conftest.err
8637   rm -f conftest.er1
8638   cat conftest.err >&5
8639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8640   (exit $ac_status); } &&
8641          { ac_try='test -z "$ac_c_werror_flag"
8642                          || test ! -s conftest.err'
8643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8644   (eval $ac_try) 2>&5
8645   ac_status=$?
8646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8647   (exit $ac_status); }; } &&
8648          { ac_try='test -s conftest.$ac_objext'
8649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8650   (eval $ac_try) 2>&5
8651   ac_status=$?
8652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8653   (exit $ac_status); }; }; then
8654   ac_header_compiler=yes
8655 else
8656   echo "$as_me: failed program was:" >&5
8657 sed 's/^/| /' conftest.$ac_ext >&5
8658
8659 ac_header_compiler=no
8660 fi
8661 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8662 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8663 echo "${ECHO_T}$ac_header_compiler" >&6
8664
8665 # Is the header present?
8666 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8667 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8668 cat >conftest.$ac_ext <<_ACEOF
8669 /* confdefs.h.  */
8670 _ACEOF
8671 cat confdefs.h >>conftest.$ac_ext
8672 cat >>conftest.$ac_ext <<_ACEOF
8673 /* end confdefs.h.  */
8674 #include <$ac_header>
8675 _ACEOF
8676 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8677   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8678   ac_status=$?
8679   grep -v '^ *+' conftest.er1 >conftest.err
8680   rm -f conftest.er1
8681   cat conftest.err >&5
8682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8683   (exit $ac_status); } >/dev/null; then
8684   if test -s conftest.err; then
8685     ac_cpp_err=$ac_c_preproc_warn_flag
8686     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8687   else
8688     ac_cpp_err=
8689   fi
8690 else
8691   ac_cpp_err=yes
8692 fi
8693 if test -z "$ac_cpp_err"; then
8694   ac_header_preproc=yes
8695 else
8696   echo "$as_me: failed program was:" >&5
8697 sed 's/^/| /' conftest.$ac_ext >&5
8698
8699   ac_header_preproc=no
8700 fi
8701 rm -f conftest.err conftest.$ac_ext
8702 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8703 echo "${ECHO_T}$ac_header_preproc" >&6
8704
8705 # So?  What about this header?
8706 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8707   yes:no: )
8708     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8709 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8710     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8711 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8712     ac_header_preproc=yes
8713     ;;
8714   no:yes:* )
8715     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8716 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8717     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8718 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8719     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8720 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8721     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8722 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8723     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8724 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8725     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8726 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8727     (
8728       cat <<\_ASBOX
8729 ## ---------------------------------------- ##
8730 ## Report this to pgsql-bugs@postgresql.org ##
8731 ## ---------------------------------------- ##
8732 _ASBOX
8733     ) |
8734       sed "s/^/$as_me: WARNING:     /" >&2
8735     ;;
8736 esac
8737 echo "$as_me:$LINENO: checking for $ac_header" >&5
8738 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8739 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8740   echo $ECHO_N "(cached) $ECHO_C" >&6
8741 else
8742   eval "$as_ac_Header=\$ac_header_preproc"
8743 fi
8744 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8745 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8746
8747 fi
8748 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8749   cat >>confdefs.h <<_ACEOF
8750 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8751 _ACEOF
8752
8753 else
8754
8755 for ac_header in history.h
8756 do
8757 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8758 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8759   echo "$as_me:$LINENO: checking for $ac_header" >&5
8760 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8762   echo $ECHO_N "(cached) $ECHO_C" >&6
8763 fi
8764 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8765 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8766 else
8767   # Is the header compilable?
8768 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8769 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8770 cat >conftest.$ac_ext <<_ACEOF
8771 /* confdefs.h.  */
8772 _ACEOF
8773 cat confdefs.h >>conftest.$ac_ext
8774 cat >>conftest.$ac_ext <<_ACEOF
8775 /* end confdefs.h.  */
8776 $ac_includes_default
8777 #include <$ac_header>
8778 _ACEOF
8779 rm -f conftest.$ac_objext
8780 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8781   (eval $ac_compile) 2>conftest.er1
8782   ac_status=$?
8783   grep -v '^ *+' conftest.er1 >conftest.err
8784   rm -f conftest.er1
8785   cat conftest.err >&5
8786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8787   (exit $ac_status); } &&
8788          { ac_try='test -z "$ac_c_werror_flag"
8789                          || test ! -s conftest.err'
8790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8791   (eval $ac_try) 2>&5
8792   ac_status=$?
8793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8794   (exit $ac_status); }; } &&
8795          { ac_try='test -s conftest.$ac_objext'
8796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8797   (eval $ac_try) 2>&5
8798   ac_status=$?
8799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8800   (exit $ac_status); }; }; then
8801   ac_header_compiler=yes
8802 else
8803   echo "$as_me: failed program was:" >&5
8804 sed 's/^/| /' conftest.$ac_ext >&5
8805
8806 ac_header_compiler=no
8807 fi
8808 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8809 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8810 echo "${ECHO_T}$ac_header_compiler" >&6
8811
8812 # Is the header present?
8813 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8814 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8815 cat >conftest.$ac_ext <<_ACEOF
8816 /* confdefs.h.  */
8817 _ACEOF
8818 cat confdefs.h >>conftest.$ac_ext
8819 cat >>conftest.$ac_ext <<_ACEOF
8820 /* end confdefs.h.  */
8821 #include <$ac_header>
8822 _ACEOF
8823 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8824   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8825   ac_status=$?
8826   grep -v '^ *+' conftest.er1 >conftest.err
8827   rm -f conftest.er1
8828   cat conftest.err >&5
8829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8830   (exit $ac_status); } >/dev/null; then
8831   if test -s conftest.err; then
8832     ac_cpp_err=$ac_c_preproc_warn_flag
8833     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8834   else
8835     ac_cpp_err=
8836   fi
8837 else
8838   ac_cpp_err=yes
8839 fi
8840 if test -z "$ac_cpp_err"; then
8841   ac_header_preproc=yes
8842 else
8843   echo "$as_me: failed program was:" >&5
8844 sed 's/^/| /' conftest.$ac_ext >&5
8845
8846   ac_header_preproc=no
8847 fi
8848 rm -f conftest.err conftest.$ac_ext
8849 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8850 echo "${ECHO_T}$ac_header_preproc" >&6
8851
8852 # So?  What about this header?
8853 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8854   yes:no: )
8855     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8856 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8857     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8858 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8859     ac_header_preproc=yes
8860     ;;
8861   no:yes:* )
8862     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8863 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8864     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8865 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8866     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8867 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8868     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8869 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8870     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8871 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8872     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8873 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8874     (
8875       cat <<\_ASBOX
8876 ## ---------------------------------------- ##
8877 ## Report this to pgsql-bugs@postgresql.org ##
8878 ## ---------------------------------------- ##
8879 _ASBOX
8880     ) |
8881       sed "s/^/$as_me: WARNING:     /" >&2
8882     ;;
8883 esac
8884 echo "$as_me:$LINENO: checking for $ac_header" >&5
8885 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8886 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8887   echo $ECHO_N "(cached) $ECHO_C" >&6
8888 else
8889   eval "$as_ac_Header=\$ac_header_preproc"
8890 fi
8891 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8892 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8893
8894 fi
8895 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8896   cat >>confdefs.h <<_ACEOF
8897 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8898 _ACEOF
8899
8900 else
8901   { { echo "$as_me:$LINENO: error: history header not found
8902 If you have readline already installed, see config.log for details on the
8903 failure.  It is possible the compiler isn't looking in the proper directory.
8904 Use --without-readline to disable readline support." >&5
8905 echo "$as_me: error: history header not found
8906 If you have readline already installed, see config.log for details on the
8907 failure.  It is possible the compiler isn't looking in the proper directory.
8908 Use --without-readline to disable readline support." >&2;}
8909    { (exit 1); exit 1; }; }
8910 fi
8911
8912 done
8913
8914 fi
8915
8916 done
8917
8918 fi
8919
8920 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8921 # Some installations of libedit usurp /usr/include/readline/, which seems
8922 # bad practice, since in combined installations readline will have its headers
8923 # there.  We might have to resort to AC_EGREP checks to make sure we found
8924 # the proper header...
8925
8926 for ac_header in editline/readline.h
8927 do
8928 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8929 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8930   echo "$as_me:$LINENO: checking for $ac_header" >&5
8931 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8932 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8933   echo $ECHO_N "(cached) $ECHO_C" >&6
8934 fi
8935 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8936 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8937 else
8938   # Is the header compilable?
8939 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8940 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8941 cat >conftest.$ac_ext <<_ACEOF
8942 /* confdefs.h.  */
8943 _ACEOF
8944 cat confdefs.h >>conftest.$ac_ext
8945 cat >>conftest.$ac_ext <<_ACEOF
8946 /* end confdefs.h.  */
8947 $ac_includes_default
8948 #include <$ac_header>
8949 _ACEOF
8950 rm -f conftest.$ac_objext
8951 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8952   (eval $ac_compile) 2>conftest.er1
8953   ac_status=$?
8954   grep -v '^ *+' conftest.er1 >conftest.err
8955   rm -f conftest.er1
8956   cat conftest.err >&5
8957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8958   (exit $ac_status); } &&
8959          { ac_try='test -z "$ac_c_werror_flag"
8960                          || test ! -s conftest.err'
8961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8962   (eval $ac_try) 2>&5
8963   ac_status=$?
8964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965   (exit $ac_status); }; } &&
8966          { ac_try='test -s conftest.$ac_objext'
8967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8968   (eval $ac_try) 2>&5
8969   ac_status=$?
8970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971   (exit $ac_status); }; }; then
8972   ac_header_compiler=yes
8973 else
8974   echo "$as_me: failed program was:" >&5
8975 sed 's/^/| /' conftest.$ac_ext >&5
8976
8977 ac_header_compiler=no
8978 fi
8979 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8980 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8981 echo "${ECHO_T}$ac_header_compiler" >&6
8982
8983 # Is the header present?
8984 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8985 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8986 cat >conftest.$ac_ext <<_ACEOF
8987 /* confdefs.h.  */
8988 _ACEOF
8989 cat confdefs.h >>conftest.$ac_ext
8990 cat >>conftest.$ac_ext <<_ACEOF
8991 /* end confdefs.h.  */
8992 #include <$ac_header>
8993 _ACEOF
8994 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8995   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8996   ac_status=$?
8997   grep -v '^ *+' conftest.er1 >conftest.err
8998   rm -f conftest.er1
8999   cat conftest.err >&5
9000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9001   (exit $ac_status); } >/dev/null; then
9002   if test -s conftest.err; then
9003     ac_cpp_err=$ac_c_preproc_warn_flag
9004     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9005   else
9006     ac_cpp_err=
9007   fi
9008 else
9009   ac_cpp_err=yes
9010 fi
9011 if test -z "$ac_cpp_err"; then
9012   ac_header_preproc=yes
9013 else
9014   echo "$as_me: failed program was:" >&5
9015 sed 's/^/| /' conftest.$ac_ext >&5
9016
9017   ac_header_preproc=no
9018 fi
9019 rm -f conftest.err conftest.$ac_ext
9020 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9021 echo "${ECHO_T}$ac_header_preproc" >&6
9022
9023 # So?  What about this header?
9024 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9025   yes:no: )
9026     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9027 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9028     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9029 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9030     ac_header_preproc=yes
9031     ;;
9032   no:yes:* )
9033     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9034 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9035     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9036 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9037     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9038 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9039     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9040 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9041     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9042 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9043     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9044 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9045     (
9046       cat <<\_ASBOX
9047 ## ---------------------------------------- ##
9048 ## Report this to pgsql-bugs@postgresql.org ##
9049 ## ---------------------------------------- ##
9050 _ASBOX
9051     ) |
9052       sed "s/^/$as_me: WARNING:     /" >&2
9053     ;;
9054 esac
9055 echo "$as_me:$LINENO: checking for $ac_header" >&5
9056 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9057 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9058   echo $ECHO_N "(cached) $ECHO_C" >&6
9059 else
9060   eval "$as_ac_Header=\$ac_header_preproc"
9061 fi
9062 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9063 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9064
9065 fi
9066 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9067   cat >>confdefs.h <<_ACEOF
9068 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9069 _ACEOF
9070
9071 else
9072
9073 for ac_header in readline.h
9074 do
9075 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9076 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9077   echo "$as_me:$LINENO: checking for $ac_header" >&5
9078 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9079 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9080   echo $ECHO_N "(cached) $ECHO_C" >&6
9081 fi
9082 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9083 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9084 else
9085   # Is the header compilable?
9086 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9087 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9088 cat >conftest.$ac_ext <<_ACEOF
9089 /* confdefs.h.  */
9090 _ACEOF
9091 cat confdefs.h >>conftest.$ac_ext
9092 cat >>conftest.$ac_ext <<_ACEOF
9093 /* end confdefs.h.  */
9094 $ac_includes_default
9095 #include <$ac_header>
9096 _ACEOF
9097 rm -f conftest.$ac_objext
9098 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9099   (eval $ac_compile) 2>conftest.er1
9100   ac_status=$?
9101   grep -v '^ *+' conftest.er1 >conftest.err
9102   rm -f conftest.er1
9103   cat conftest.err >&5
9104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105   (exit $ac_status); } &&
9106          { ac_try='test -z "$ac_c_werror_flag"
9107                          || test ! -s conftest.err'
9108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9109   (eval $ac_try) 2>&5
9110   ac_status=$?
9111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9112   (exit $ac_status); }; } &&
9113          { ac_try='test -s conftest.$ac_objext'
9114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9115   (eval $ac_try) 2>&5
9116   ac_status=$?
9117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9118   (exit $ac_status); }; }; then
9119   ac_header_compiler=yes
9120 else
9121   echo "$as_me: failed program was:" >&5
9122 sed 's/^/| /' conftest.$ac_ext >&5
9123
9124 ac_header_compiler=no
9125 fi
9126 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9127 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9128 echo "${ECHO_T}$ac_header_compiler" >&6
9129
9130 # Is the header present?
9131 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9132 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9133 cat >conftest.$ac_ext <<_ACEOF
9134 /* confdefs.h.  */
9135 _ACEOF
9136 cat confdefs.h >>conftest.$ac_ext
9137 cat >>conftest.$ac_ext <<_ACEOF
9138 /* end confdefs.h.  */
9139 #include <$ac_header>
9140 _ACEOF
9141 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9143   ac_status=$?
9144   grep -v '^ *+' conftest.er1 >conftest.err
9145   rm -f conftest.er1
9146   cat conftest.err >&5
9147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9148   (exit $ac_status); } >/dev/null; then
9149   if test -s conftest.err; then
9150     ac_cpp_err=$ac_c_preproc_warn_flag
9151     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9152   else
9153     ac_cpp_err=
9154   fi
9155 else
9156   ac_cpp_err=yes
9157 fi
9158 if test -z "$ac_cpp_err"; then
9159   ac_header_preproc=yes
9160 else
9161   echo "$as_me: failed program was:" >&5
9162 sed 's/^/| /' conftest.$ac_ext >&5
9163
9164   ac_header_preproc=no
9165 fi
9166 rm -f conftest.err conftest.$ac_ext
9167 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9168 echo "${ECHO_T}$ac_header_preproc" >&6
9169
9170 # So?  What about this header?
9171 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9172   yes:no: )
9173     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9174 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9175     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9176 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9177     ac_header_preproc=yes
9178     ;;
9179   no:yes:* )
9180     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9181 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9182     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9183 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9184     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9185 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9186     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9187 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9188     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9189 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9190     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9191 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9192     (
9193       cat <<\_ASBOX
9194 ## ---------------------------------------- ##
9195 ## Report this to pgsql-bugs@postgresql.org ##
9196 ## ---------------------------------------- ##
9197 _ASBOX
9198     ) |
9199       sed "s/^/$as_me: WARNING:     /" >&2
9200     ;;
9201 esac
9202 echo "$as_me:$LINENO: checking for $ac_header" >&5
9203 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9204 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9205   echo $ECHO_N "(cached) $ECHO_C" >&6
9206 else
9207   eval "$as_ac_Header=\$ac_header_preproc"
9208 fi
9209 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9210 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9211
9212 fi
9213 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9214   cat >>confdefs.h <<_ACEOF
9215 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9216 _ACEOF
9217
9218 else
9219
9220 for ac_header in readline/readline.h
9221 do
9222 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9223 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9224   echo "$as_me:$LINENO: checking for $ac_header" >&5
9225 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9226 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9227   echo $ECHO_N "(cached) $ECHO_C" >&6
9228 fi
9229 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9230 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9231 else
9232   # Is the header compilable?
9233 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9234 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9235 cat >conftest.$ac_ext <<_ACEOF
9236 /* confdefs.h.  */
9237 _ACEOF
9238 cat confdefs.h >>conftest.$ac_ext
9239 cat >>conftest.$ac_ext <<_ACEOF
9240 /* end confdefs.h.  */
9241 $ac_includes_default
9242 #include <$ac_header>
9243 _ACEOF
9244 rm -f conftest.$ac_objext
9245 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9246   (eval $ac_compile) 2>conftest.er1
9247   ac_status=$?
9248   grep -v '^ *+' conftest.er1 >conftest.err
9249   rm -f conftest.er1
9250   cat conftest.err >&5
9251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9252   (exit $ac_status); } &&
9253          { ac_try='test -z "$ac_c_werror_flag"
9254                          || test ! -s conftest.err'
9255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9256   (eval $ac_try) 2>&5
9257   ac_status=$?
9258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9259   (exit $ac_status); }; } &&
9260          { ac_try='test -s conftest.$ac_objext'
9261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9262   (eval $ac_try) 2>&5
9263   ac_status=$?
9264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9265   (exit $ac_status); }; }; then
9266   ac_header_compiler=yes
9267 else
9268   echo "$as_me: failed program was:" >&5
9269 sed 's/^/| /' conftest.$ac_ext >&5
9270
9271 ac_header_compiler=no
9272 fi
9273 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9274 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9275 echo "${ECHO_T}$ac_header_compiler" >&6
9276
9277 # Is the header present?
9278 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9279 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9280 cat >conftest.$ac_ext <<_ACEOF
9281 /* confdefs.h.  */
9282 _ACEOF
9283 cat confdefs.h >>conftest.$ac_ext
9284 cat >>conftest.$ac_ext <<_ACEOF
9285 /* end confdefs.h.  */
9286 #include <$ac_header>
9287 _ACEOF
9288 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9289   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9290   ac_status=$?
9291   grep -v '^ *+' conftest.er1 >conftest.err
9292   rm -f conftest.er1
9293   cat conftest.err >&5
9294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9295   (exit $ac_status); } >/dev/null; then
9296   if test -s conftest.err; then
9297     ac_cpp_err=$ac_c_preproc_warn_flag
9298     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9299   else
9300     ac_cpp_err=
9301   fi
9302 else
9303   ac_cpp_err=yes
9304 fi
9305 if test -z "$ac_cpp_err"; then
9306   ac_header_preproc=yes
9307 else
9308   echo "$as_me: failed program was:" >&5
9309 sed 's/^/| /' conftest.$ac_ext >&5
9310
9311   ac_header_preproc=no
9312 fi
9313 rm -f conftest.err conftest.$ac_ext
9314 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9315 echo "${ECHO_T}$ac_header_preproc" >&6
9316
9317 # So?  What about this header?
9318 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9319   yes:no: )
9320     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9321 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9322     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9323 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9324     ac_header_preproc=yes
9325     ;;
9326   no:yes:* )
9327     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9328 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9329     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9330 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9331     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9332 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9333     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9334 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9335     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9336 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9337     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9338 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9339     (
9340       cat <<\_ASBOX
9341 ## ---------------------------------------- ##
9342 ## Report this to pgsql-bugs@postgresql.org ##
9343 ## ---------------------------------------- ##
9344 _ASBOX
9345     ) |
9346       sed "s/^/$as_me: WARNING:     /" >&2
9347     ;;
9348 esac
9349 echo "$as_me:$LINENO: checking for $ac_header" >&5
9350 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9351 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9352   echo $ECHO_N "(cached) $ECHO_C" >&6
9353 else
9354   eval "$as_ac_Header=\$ac_header_preproc"
9355 fi
9356 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9357 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9358
9359 fi
9360 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9361   cat >>confdefs.h <<_ACEOF
9362 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9363 _ACEOF
9364
9365 else
9366   { { echo "$as_me:$LINENO: error: readline header not found
9367 If you have libedit already installed, see config.log for details on the
9368 failure.  It is possible the compiler isn't looking in the proper directory.
9369 Use --without-readline to disable libedit support." >&5
9370 echo "$as_me: error: readline header not found
9371 If you have libedit already installed, see config.log for details on the
9372 failure.  It is possible the compiler isn't looking in the proper directory.
9373 Use --without-readline to disable libedit support." >&2;}
9374    { (exit 1); exit 1; }; }
9375 fi
9376
9377 done
9378
9379 fi
9380
9381 done
9382
9383 fi
9384
9385 done
9386
9387
9388 for ac_header in editline/history.h
9389 do
9390 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9391 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9392   echo "$as_me:$LINENO: checking for $ac_header" >&5
9393 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9394 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9395   echo $ECHO_N "(cached) $ECHO_C" >&6
9396 fi
9397 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9398 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9399 else
9400   # Is the header compilable?
9401 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9402 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9403 cat >conftest.$ac_ext <<_ACEOF
9404 /* confdefs.h.  */
9405 _ACEOF
9406 cat confdefs.h >>conftest.$ac_ext
9407 cat >>conftest.$ac_ext <<_ACEOF
9408 /* end confdefs.h.  */
9409 $ac_includes_default
9410 #include <$ac_header>
9411 _ACEOF
9412 rm -f conftest.$ac_objext
9413 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9414   (eval $ac_compile) 2>conftest.er1
9415   ac_status=$?
9416   grep -v '^ *+' conftest.er1 >conftest.err
9417   rm -f conftest.er1
9418   cat conftest.err >&5
9419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9420   (exit $ac_status); } &&
9421          { ac_try='test -z "$ac_c_werror_flag"
9422                          || test ! -s conftest.err'
9423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9424   (eval $ac_try) 2>&5
9425   ac_status=$?
9426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9427   (exit $ac_status); }; } &&
9428          { ac_try='test -s conftest.$ac_objext'
9429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9430   (eval $ac_try) 2>&5
9431   ac_status=$?
9432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9433   (exit $ac_status); }; }; then
9434   ac_header_compiler=yes
9435 else
9436   echo "$as_me: failed program was:" >&5
9437 sed 's/^/| /' conftest.$ac_ext >&5
9438
9439 ac_header_compiler=no
9440 fi
9441 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9442 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9443 echo "${ECHO_T}$ac_header_compiler" >&6
9444
9445 # Is the header present?
9446 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9447 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9448 cat >conftest.$ac_ext <<_ACEOF
9449 /* confdefs.h.  */
9450 _ACEOF
9451 cat confdefs.h >>conftest.$ac_ext
9452 cat >>conftest.$ac_ext <<_ACEOF
9453 /* end confdefs.h.  */
9454 #include <$ac_header>
9455 _ACEOF
9456 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9457   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9458   ac_status=$?
9459   grep -v '^ *+' conftest.er1 >conftest.err
9460   rm -f conftest.er1
9461   cat conftest.err >&5
9462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9463   (exit $ac_status); } >/dev/null; then
9464   if test -s conftest.err; then
9465     ac_cpp_err=$ac_c_preproc_warn_flag
9466     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9467   else
9468     ac_cpp_err=
9469   fi
9470 else
9471   ac_cpp_err=yes
9472 fi
9473 if test -z "$ac_cpp_err"; then
9474   ac_header_preproc=yes
9475 else
9476   echo "$as_me: failed program was:" >&5
9477 sed 's/^/| /' conftest.$ac_ext >&5
9478
9479   ac_header_preproc=no
9480 fi
9481 rm -f conftest.err conftest.$ac_ext
9482 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9483 echo "${ECHO_T}$ac_header_preproc" >&6
9484
9485 # So?  What about this header?
9486 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9487   yes:no: )
9488     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9489 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9490     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9491 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9492     ac_header_preproc=yes
9493     ;;
9494   no:yes:* )
9495     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9496 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9497     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9498 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9499     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9500 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9501     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9502 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9503     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9504 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9505     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9506 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9507     (
9508       cat <<\_ASBOX
9509 ## ---------------------------------------- ##
9510 ## Report this to pgsql-bugs@postgresql.org ##
9511 ## ---------------------------------------- ##
9512 _ASBOX
9513     ) |
9514       sed "s/^/$as_me: WARNING:     /" >&2
9515     ;;
9516 esac
9517 echo "$as_me:$LINENO: checking for $ac_header" >&5
9518 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9519 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9520   echo $ECHO_N "(cached) $ECHO_C" >&6
9521 else
9522   eval "$as_ac_Header=\$ac_header_preproc"
9523 fi
9524 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9525 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9526
9527 fi
9528 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9529   cat >>confdefs.h <<_ACEOF
9530 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9531 _ACEOF
9532
9533 else
9534
9535 for ac_header in history.h
9536 do
9537 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9538 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9539   echo "$as_me:$LINENO: checking for $ac_header" >&5
9540 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9541 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9542   echo $ECHO_N "(cached) $ECHO_C" >&6
9543 fi
9544 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9545 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9546 else
9547   # Is the header compilable?
9548 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9549 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9550 cat >conftest.$ac_ext <<_ACEOF
9551 /* confdefs.h.  */
9552 _ACEOF
9553 cat confdefs.h >>conftest.$ac_ext
9554 cat >>conftest.$ac_ext <<_ACEOF
9555 /* end confdefs.h.  */
9556 $ac_includes_default
9557 #include <$ac_header>
9558 _ACEOF
9559 rm -f conftest.$ac_objext
9560 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9561   (eval $ac_compile) 2>conftest.er1
9562   ac_status=$?
9563   grep -v '^ *+' conftest.er1 >conftest.err
9564   rm -f conftest.er1
9565   cat conftest.err >&5
9566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9567   (exit $ac_status); } &&
9568          { ac_try='test -z "$ac_c_werror_flag"
9569                          || test ! -s conftest.err'
9570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9571   (eval $ac_try) 2>&5
9572   ac_status=$?
9573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9574   (exit $ac_status); }; } &&
9575          { ac_try='test -s conftest.$ac_objext'
9576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9577   (eval $ac_try) 2>&5
9578   ac_status=$?
9579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9580   (exit $ac_status); }; }; then
9581   ac_header_compiler=yes
9582 else
9583   echo "$as_me: failed program was:" >&5
9584 sed 's/^/| /' conftest.$ac_ext >&5
9585
9586 ac_header_compiler=no
9587 fi
9588 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9589 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9590 echo "${ECHO_T}$ac_header_compiler" >&6
9591
9592 # Is the header present?
9593 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9594 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9595 cat >conftest.$ac_ext <<_ACEOF
9596 /* confdefs.h.  */
9597 _ACEOF
9598 cat confdefs.h >>conftest.$ac_ext
9599 cat >>conftest.$ac_ext <<_ACEOF
9600 /* end confdefs.h.  */
9601 #include <$ac_header>
9602 _ACEOF
9603 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9604   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9605   ac_status=$?
9606   grep -v '^ *+' conftest.er1 >conftest.err
9607   rm -f conftest.er1
9608   cat conftest.err >&5
9609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9610   (exit $ac_status); } >/dev/null; then
9611   if test -s conftest.err; then
9612     ac_cpp_err=$ac_c_preproc_warn_flag
9613     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9614   else
9615     ac_cpp_err=
9616   fi
9617 else
9618   ac_cpp_err=yes
9619 fi
9620 if test -z "$ac_cpp_err"; then
9621   ac_header_preproc=yes
9622 else
9623   echo "$as_me: failed program was:" >&5
9624 sed 's/^/| /' conftest.$ac_ext >&5
9625
9626   ac_header_preproc=no
9627 fi
9628 rm -f conftest.err conftest.$ac_ext
9629 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9630 echo "${ECHO_T}$ac_header_preproc" >&6
9631
9632 # So?  What about this header?
9633 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9634   yes:no: )
9635     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9636 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9637     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9638 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9639     ac_header_preproc=yes
9640     ;;
9641   no:yes:* )
9642     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9643 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9644     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9645 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9646     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9647 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9648     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9649 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9650     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9651 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9652     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9653 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9654     (
9655       cat <<\_ASBOX
9656 ## ---------------------------------------- ##
9657 ## Report this to pgsql-bugs@postgresql.org ##
9658 ## ---------------------------------------- ##
9659 _ASBOX
9660     ) |
9661       sed "s/^/$as_me: WARNING:     /" >&2
9662     ;;
9663 esac
9664 echo "$as_me:$LINENO: checking for $ac_header" >&5
9665 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9666 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9667   echo $ECHO_N "(cached) $ECHO_C" >&6
9668 else
9669   eval "$as_ac_Header=\$ac_header_preproc"
9670 fi
9671 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9672 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9673
9674 fi
9675 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9676   cat >>confdefs.h <<_ACEOF
9677 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9678 _ACEOF
9679
9680 else
9681
9682 for ac_header in readline/history.h
9683 do
9684 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9685 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9686   echo "$as_me:$LINENO: checking for $ac_header" >&5
9687 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9688 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9689   echo $ECHO_N "(cached) $ECHO_C" >&6
9690 fi
9691 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9692 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9693 else
9694   # Is the header compilable?
9695 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9696 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9697 cat >conftest.$ac_ext <<_ACEOF
9698 /* confdefs.h.  */
9699 _ACEOF
9700 cat confdefs.h >>conftest.$ac_ext
9701 cat >>conftest.$ac_ext <<_ACEOF
9702 /* end confdefs.h.  */
9703 $ac_includes_default
9704 #include <$ac_header>
9705 _ACEOF
9706 rm -f conftest.$ac_objext
9707 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9708   (eval $ac_compile) 2>conftest.er1
9709   ac_status=$?
9710   grep -v '^ *+' conftest.er1 >conftest.err
9711   rm -f conftest.er1
9712   cat conftest.err >&5
9713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9714   (exit $ac_status); } &&
9715          { ac_try='test -z "$ac_c_werror_flag"
9716                          || test ! -s conftest.err'
9717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9718   (eval $ac_try) 2>&5
9719   ac_status=$?
9720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721   (exit $ac_status); }; } &&
9722          { ac_try='test -s conftest.$ac_objext'
9723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9724   (eval $ac_try) 2>&5
9725   ac_status=$?
9726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9727   (exit $ac_status); }; }; then
9728   ac_header_compiler=yes
9729 else
9730   echo "$as_me: failed program was:" >&5
9731 sed 's/^/| /' conftest.$ac_ext >&5
9732
9733 ac_header_compiler=no
9734 fi
9735 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9736 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9737 echo "${ECHO_T}$ac_header_compiler" >&6
9738
9739 # Is the header present?
9740 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9741 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9742 cat >conftest.$ac_ext <<_ACEOF
9743 /* confdefs.h.  */
9744 _ACEOF
9745 cat confdefs.h >>conftest.$ac_ext
9746 cat >>conftest.$ac_ext <<_ACEOF
9747 /* end confdefs.h.  */
9748 #include <$ac_header>
9749 _ACEOF
9750 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9751   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9752   ac_status=$?
9753   grep -v '^ *+' conftest.er1 >conftest.err
9754   rm -f conftest.er1
9755   cat conftest.err >&5
9756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757   (exit $ac_status); } >/dev/null; then
9758   if test -s conftest.err; then
9759     ac_cpp_err=$ac_c_preproc_warn_flag
9760     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9761   else
9762     ac_cpp_err=
9763   fi
9764 else
9765   ac_cpp_err=yes
9766 fi
9767 if test -z "$ac_cpp_err"; then
9768   ac_header_preproc=yes
9769 else
9770   echo "$as_me: failed program was:" >&5
9771 sed 's/^/| /' conftest.$ac_ext >&5
9772
9773   ac_header_preproc=no
9774 fi
9775 rm -f conftest.err conftest.$ac_ext
9776 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9777 echo "${ECHO_T}$ac_header_preproc" >&6
9778
9779 # So?  What about this header?
9780 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9781   yes:no: )
9782     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9783 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9784     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9785 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9786     ac_header_preproc=yes
9787     ;;
9788   no:yes:* )
9789     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9790 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9791     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9792 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9793     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9794 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9795     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9796 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9797     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9798 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9799     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9800 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9801     (
9802       cat <<\_ASBOX
9803 ## ---------------------------------------- ##
9804 ## Report this to pgsql-bugs@postgresql.org ##
9805 ## ---------------------------------------- ##
9806 _ASBOX
9807     ) |
9808       sed "s/^/$as_me: WARNING:     /" >&2
9809     ;;
9810 esac
9811 echo "$as_me:$LINENO: checking for $ac_header" >&5
9812 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9813 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9814   echo $ECHO_N "(cached) $ECHO_C" >&6
9815 else
9816   eval "$as_ac_Header=\$ac_header_preproc"
9817 fi
9818 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9819 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9820
9821 fi
9822 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9823   cat >>confdefs.h <<_ACEOF
9824 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9825 _ACEOF
9826
9827 else
9828   { { echo "$as_me:$LINENO: error: history header not found
9829 If you have libedit already installed, see config.log for details on the
9830 failure.  It is possible the compiler isn't looking in the proper directory.
9831 Use --without-readline to disable libedit support." >&5
9832 echo "$as_me: error: history header not found
9833 If you have libedit already installed, see config.log for details on the
9834 failure.  It is possible the compiler isn't looking in the proper directory.
9835 Use --without-readline to disable libedit support." >&2;}
9836    { (exit 1); exit 1; }; }
9837 fi
9838
9839 done
9840
9841 fi
9842
9843 done
9844
9845 fi
9846
9847 done
9848
9849 fi
9850
9851 if test "$with_zlib" = yes; then
9852   if test "${ac_cv_header_zlib_h+set}" = set; then
9853   echo "$as_me:$LINENO: checking for zlib.h" >&5
9854 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9855 if test "${ac_cv_header_zlib_h+set}" = set; then
9856   echo $ECHO_N "(cached) $ECHO_C" >&6
9857 fi
9858 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9859 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9860 else
9861   # Is the header compilable?
9862 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9863 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9864 cat >conftest.$ac_ext <<_ACEOF
9865 /* confdefs.h.  */
9866 _ACEOF
9867 cat confdefs.h >>conftest.$ac_ext
9868 cat >>conftest.$ac_ext <<_ACEOF
9869 /* end confdefs.h.  */
9870 $ac_includes_default
9871 #include <zlib.h>
9872 _ACEOF
9873 rm -f conftest.$ac_objext
9874 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9875   (eval $ac_compile) 2>conftest.er1
9876   ac_status=$?
9877   grep -v '^ *+' conftest.er1 >conftest.err
9878   rm -f conftest.er1
9879   cat conftest.err >&5
9880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9881   (exit $ac_status); } &&
9882          { ac_try='test -z "$ac_c_werror_flag"
9883                          || test ! -s conftest.err'
9884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9885   (eval $ac_try) 2>&5
9886   ac_status=$?
9887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9888   (exit $ac_status); }; } &&
9889          { ac_try='test -s conftest.$ac_objext'
9890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9891   (eval $ac_try) 2>&5
9892   ac_status=$?
9893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894   (exit $ac_status); }; }; then
9895   ac_header_compiler=yes
9896 else
9897   echo "$as_me: failed program was:" >&5
9898 sed 's/^/| /' conftest.$ac_ext >&5
9899
9900 ac_header_compiler=no
9901 fi
9902 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9903 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9904 echo "${ECHO_T}$ac_header_compiler" >&6
9905
9906 # Is the header present?
9907 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9908 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9909 cat >conftest.$ac_ext <<_ACEOF
9910 /* confdefs.h.  */
9911 _ACEOF
9912 cat confdefs.h >>conftest.$ac_ext
9913 cat >>conftest.$ac_ext <<_ACEOF
9914 /* end confdefs.h.  */
9915 #include <zlib.h>
9916 _ACEOF
9917 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9918   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9919   ac_status=$?
9920   grep -v '^ *+' conftest.er1 >conftest.err
9921   rm -f conftest.er1
9922   cat conftest.err >&5
9923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9924   (exit $ac_status); } >/dev/null; then
9925   if test -s conftest.err; then
9926     ac_cpp_err=$ac_c_preproc_warn_flag
9927     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9928   else
9929     ac_cpp_err=
9930   fi
9931 else
9932   ac_cpp_err=yes
9933 fi
9934 if test -z "$ac_cpp_err"; then
9935   ac_header_preproc=yes
9936 else
9937   echo "$as_me: failed program was:" >&5
9938 sed 's/^/| /' conftest.$ac_ext >&5
9939
9940   ac_header_preproc=no
9941 fi
9942 rm -f conftest.err conftest.$ac_ext
9943 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9944 echo "${ECHO_T}$ac_header_preproc" >&6
9945
9946 # So?  What about this header?
9947 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9948   yes:no: )
9949     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9950 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9951     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9952 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9953     ac_header_preproc=yes
9954     ;;
9955   no:yes:* )
9956     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9957 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9958     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9959 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9960     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9961 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9962     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9963 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9964     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9965 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9966     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9967 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9968     (
9969       cat <<\_ASBOX
9970 ## ---------------------------------------- ##
9971 ## Report this to pgsql-bugs@postgresql.org ##
9972 ## ---------------------------------------- ##
9973 _ASBOX
9974     ) |
9975       sed "s/^/$as_me: WARNING:     /" >&2
9976     ;;
9977 esac
9978 echo "$as_me:$LINENO: checking for zlib.h" >&5
9979 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9980 if test "${ac_cv_header_zlib_h+set}" = set; then
9981   echo $ECHO_N "(cached) $ECHO_C" >&6
9982 else
9983   ac_cv_header_zlib_h=$ac_header_preproc
9984 fi
9985 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9986 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9987
9988 fi
9989 if test $ac_cv_header_zlib_h = yes; then
9990   :
9991 else
9992   { { echo "$as_me:$LINENO: error: zlib header not found
9993 If you have zlib already installed, see config.log for details on the
9994 failure.  It is possible the compiler isn't looking in the proper directory.
9995 Use --without-zlib to disable zlib support." >&5
9996 echo "$as_me: error: zlib header not found
9997 If you have zlib already installed, see config.log for details on the
9998 failure.  It is possible the compiler isn't looking in the proper directory.
9999 Use --without-zlib to disable zlib support." >&2;}
10000    { (exit 1); exit 1; }; }
10001 fi
10002
10003
10004 fi
10005
10006 if test "$with_krb5" = yes ; then
10007   if test "${ac_cv_header_krb5_h+set}" = set; then
10008   echo "$as_me:$LINENO: checking for krb5.h" >&5
10009 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10010 if test "${ac_cv_header_krb5_h+set}" = set; then
10011   echo $ECHO_N "(cached) $ECHO_C" >&6
10012 fi
10013 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10014 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10015 else
10016   # Is the header compilable?
10017 echo "$as_me:$LINENO: checking krb5.h usability" >&5
10018 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
10019 cat >conftest.$ac_ext <<_ACEOF
10020 /* confdefs.h.  */
10021 _ACEOF
10022 cat confdefs.h >>conftest.$ac_ext
10023 cat >>conftest.$ac_ext <<_ACEOF
10024 /* end confdefs.h.  */
10025 $ac_includes_default
10026 #include <krb5.h>
10027 _ACEOF
10028 rm -f conftest.$ac_objext
10029 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10030   (eval $ac_compile) 2>conftest.er1
10031   ac_status=$?
10032   grep -v '^ *+' conftest.er1 >conftest.err
10033   rm -f conftest.er1
10034   cat conftest.err >&5
10035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036   (exit $ac_status); } &&
10037          { ac_try='test -z "$ac_c_werror_flag"
10038                          || test ! -s conftest.err'
10039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10040   (eval $ac_try) 2>&5
10041   ac_status=$?
10042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10043   (exit $ac_status); }; } &&
10044          { ac_try='test -s conftest.$ac_objext'
10045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10046   (eval $ac_try) 2>&5
10047   ac_status=$?
10048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10049   (exit $ac_status); }; }; then
10050   ac_header_compiler=yes
10051 else
10052   echo "$as_me: failed program was:" >&5
10053 sed 's/^/| /' conftest.$ac_ext >&5
10054
10055 ac_header_compiler=no
10056 fi
10057 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10058 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10059 echo "${ECHO_T}$ac_header_compiler" >&6
10060
10061 # Is the header present?
10062 echo "$as_me:$LINENO: checking krb5.h presence" >&5
10063 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
10064 cat >conftest.$ac_ext <<_ACEOF
10065 /* confdefs.h.  */
10066 _ACEOF
10067 cat confdefs.h >>conftest.$ac_ext
10068 cat >>conftest.$ac_ext <<_ACEOF
10069 /* end confdefs.h.  */
10070 #include <krb5.h>
10071 _ACEOF
10072 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10073   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10074   ac_status=$?
10075   grep -v '^ *+' conftest.er1 >conftest.err
10076   rm -f conftest.er1
10077   cat conftest.err >&5
10078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10079   (exit $ac_status); } >/dev/null; then
10080   if test -s conftest.err; then
10081     ac_cpp_err=$ac_c_preproc_warn_flag
10082     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10083   else
10084     ac_cpp_err=
10085   fi
10086 else
10087   ac_cpp_err=yes
10088 fi
10089 if test -z "$ac_cpp_err"; then
10090   ac_header_preproc=yes
10091 else
10092   echo "$as_me: failed program was:" >&5
10093 sed 's/^/| /' conftest.$ac_ext >&5
10094
10095   ac_header_preproc=no
10096 fi
10097 rm -f conftest.err conftest.$ac_ext
10098 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10099 echo "${ECHO_T}$ac_header_preproc" >&6
10100
10101 # So?  What about this header?
10102 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10103   yes:no: )
10104     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
10105 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10106     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
10107 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
10108     ac_header_preproc=yes
10109     ;;
10110   no:yes:* )
10111     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
10112 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
10113     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
10114 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
10115     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
10116 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
10117     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
10118 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10119     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
10120 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
10121     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
10122 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
10123     (
10124       cat <<\_ASBOX
10125 ## ---------------------------------------- ##
10126 ## Report this to pgsql-bugs@postgresql.org ##
10127 ## ---------------------------------------- ##
10128 _ASBOX
10129     ) |
10130       sed "s/^/$as_me: WARNING:     /" >&2
10131     ;;
10132 esac
10133 echo "$as_me:$LINENO: checking for krb5.h" >&5
10134 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10135 if test "${ac_cv_header_krb5_h+set}" = set; then
10136   echo $ECHO_N "(cached) $ECHO_C" >&6
10137 else
10138   ac_cv_header_krb5_h=$ac_header_preproc
10139 fi
10140 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10141 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10142
10143 fi
10144 if test $ac_cv_header_krb5_h = yes; then
10145   :
10146 else
10147   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
10148 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
10149    { (exit 1); exit 1; }; }
10150 fi
10151
10152
10153 fi
10154
10155 if test "$with_openssl" = yes ; then
10156   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10157   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10158 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10159 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10160   echo $ECHO_N "(cached) $ECHO_C" >&6
10161 fi
10162 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10163 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10164 else
10165   # Is the header compilable?
10166 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
10167 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
10168 cat >conftest.$ac_ext <<_ACEOF
10169 /* confdefs.h.  */
10170 _ACEOF
10171 cat confdefs.h >>conftest.$ac_ext
10172 cat >>conftest.$ac_ext <<_ACEOF
10173 /* end confdefs.h.  */
10174 $ac_includes_default
10175 #include <openssl/ssl.h>
10176 _ACEOF
10177 rm -f conftest.$ac_objext
10178 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10179   (eval $ac_compile) 2>conftest.er1
10180   ac_status=$?
10181   grep -v '^ *+' conftest.er1 >conftest.err
10182   rm -f conftest.er1
10183   cat conftest.err >&5
10184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10185   (exit $ac_status); } &&
10186          { ac_try='test -z "$ac_c_werror_flag"
10187                          || test ! -s conftest.err'
10188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10189   (eval $ac_try) 2>&5
10190   ac_status=$?
10191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10192   (exit $ac_status); }; } &&
10193          { ac_try='test -s conftest.$ac_objext'
10194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10195   (eval $ac_try) 2>&5
10196   ac_status=$?
10197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10198   (exit $ac_status); }; }; then
10199   ac_header_compiler=yes
10200 else
10201   echo "$as_me: failed program was:" >&5
10202 sed 's/^/| /' conftest.$ac_ext >&5
10203
10204 ac_header_compiler=no
10205 fi
10206 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10207 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10208 echo "${ECHO_T}$ac_header_compiler" >&6
10209
10210 # Is the header present?
10211 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10212 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
10213 cat >conftest.$ac_ext <<_ACEOF
10214 /* confdefs.h.  */
10215 _ACEOF
10216 cat confdefs.h >>conftest.$ac_ext
10217 cat >>conftest.$ac_ext <<_ACEOF
10218 /* end confdefs.h.  */
10219 #include <openssl/ssl.h>
10220 _ACEOF
10221 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10222   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10223   ac_status=$?
10224   grep -v '^ *+' conftest.er1 >conftest.err
10225   rm -f conftest.er1
10226   cat conftest.err >&5
10227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10228   (exit $ac_status); } >/dev/null; then
10229   if test -s conftest.err; then
10230     ac_cpp_err=$ac_c_preproc_warn_flag
10231     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10232   else
10233     ac_cpp_err=
10234   fi
10235 else
10236   ac_cpp_err=yes
10237 fi
10238 if test -z "$ac_cpp_err"; then
10239   ac_header_preproc=yes
10240 else
10241   echo "$as_me: failed program was:" >&5
10242 sed 's/^/| /' conftest.$ac_ext >&5
10243
10244   ac_header_preproc=no
10245 fi
10246 rm -f conftest.err conftest.$ac_ext
10247 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10248 echo "${ECHO_T}$ac_header_preproc" >&6
10249
10250 # So?  What about this header?
10251 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10252   yes:no: )
10253     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10254 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10255     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10256 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10257     ac_header_preproc=yes
10258     ;;
10259   no:yes:* )
10260     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10261 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10262     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10263 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10264     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10265 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10266     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10267 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10268     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10269 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10270     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10271 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10272     (
10273       cat <<\_ASBOX
10274 ## ---------------------------------------- ##
10275 ## Report this to pgsql-bugs@postgresql.org ##
10276 ## ---------------------------------------- ##
10277 _ASBOX
10278     ) |
10279       sed "s/^/$as_me: WARNING:     /" >&2
10280     ;;
10281 esac
10282 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10283 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10284 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10285   echo $ECHO_N "(cached) $ECHO_C" >&6
10286 else
10287   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10288 fi
10289 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10290 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10291
10292 fi
10293 if test $ac_cv_header_openssl_ssl_h = yes; then
10294   :
10295 else
10296   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10297 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10298    { (exit 1); exit 1; }; }
10299 fi
10300
10301
10302   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10303   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10304 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10305 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10306   echo $ECHO_N "(cached) $ECHO_C" >&6
10307 fi
10308 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10309 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10310 else
10311   # Is the header compilable?
10312 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10313 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10314 cat >conftest.$ac_ext <<_ACEOF
10315 /* confdefs.h.  */
10316 _ACEOF
10317 cat confdefs.h >>conftest.$ac_ext
10318 cat >>conftest.$ac_ext <<_ACEOF
10319 /* end confdefs.h.  */
10320 $ac_includes_default
10321 #include <openssl/err.h>
10322 _ACEOF
10323 rm -f conftest.$ac_objext
10324 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10325   (eval $ac_compile) 2>conftest.er1
10326   ac_status=$?
10327   grep -v '^ *+' conftest.er1 >conftest.err
10328   rm -f conftest.er1
10329   cat conftest.err >&5
10330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10331   (exit $ac_status); } &&
10332          { ac_try='test -z "$ac_c_werror_flag"
10333                          || test ! -s conftest.err'
10334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10335   (eval $ac_try) 2>&5
10336   ac_status=$?
10337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10338   (exit $ac_status); }; } &&
10339          { ac_try='test -s conftest.$ac_objext'
10340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10341   (eval $ac_try) 2>&5
10342   ac_status=$?
10343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10344   (exit $ac_status); }; }; then
10345   ac_header_compiler=yes
10346 else
10347   echo "$as_me: failed program was:" >&5
10348 sed 's/^/| /' conftest.$ac_ext >&5
10349
10350 ac_header_compiler=no
10351 fi
10352 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10353 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10354 echo "${ECHO_T}$ac_header_compiler" >&6
10355
10356 # Is the header present?
10357 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10358 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10359 cat >conftest.$ac_ext <<_ACEOF
10360 /* confdefs.h.  */
10361 _ACEOF
10362 cat confdefs.h >>conftest.$ac_ext
10363 cat >>conftest.$ac_ext <<_ACEOF
10364 /* end confdefs.h.  */
10365 #include <openssl/err.h>
10366 _ACEOF
10367 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10368   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10369   ac_status=$?
10370   grep -v '^ *+' conftest.er1 >conftest.err
10371   rm -f conftest.er1
10372   cat conftest.err >&5
10373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10374   (exit $ac_status); } >/dev/null; then
10375   if test -s conftest.err; then
10376     ac_cpp_err=$ac_c_preproc_warn_flag
10377     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10378   else
10379     ac_cpp_err=
10380   fi
10381 else
10382   ac_cpp_err=yes
10383 fi
10384 if test -z "$ac_cpp_err"; then
10385   ac_header_preproc=yes
10386 else
10387   echo "$as_me: failed program was:" >&5
10388 sed 's/^/| /' conftest.$ac_ext >&5
10389
10390   ac_header_preproc=no
10391 fi
10392 rm -f conftest.err conftest.$ac_ext
10393 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10394 echo "${ECHO_T}$ac_header_preproc" >&6
10395
10396 # So?  What about this header?
10397 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10398   yes:no: )
10399     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10400 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10401     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10402 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10403     ac_header_preproc=yes
10404     ;;
10405   no:yes:* )
10406     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10407 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10408     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10409 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10410     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10411 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10412     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10413 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10414     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10415 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10416     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10417 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10418     (
10419       cat <<\_ASBOX
10420 ## ---------------------------------------- ##
10421 ## Report this to pgsql-bugs@postgresql.org ##
10422 ## ---------------------------------------- ##
10423 _ASBOX
10424     ) |
10425       sed "s/^/$as_me: WARNING:     /" >&2
10426     ;;
10427 esac
10428 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10429 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10430 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10431   echo $ECHO_N "(cached) $ECHO_C" >&6
10432 else
10433   ac_cv_header_openssl_err_h=$ac_header_preproc
10434 fi
10435 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10436 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10437
10438 fi
10439 if test $ac_cv_header_openssl_err_h = yes; then
10440   :
10441 else
10442   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10443 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10444    { (exit 1); exit 1; }; }
10445 fi
10446
10447
10448 fi
10449
10450 if test "$with_pam" = yes ; then
10451
10452 for ac_header in security/pam_appl.h
10453 do
10454 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10455 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10456   echo "$as_me:$LINENO: checking for $ac_header" >&5
10457 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10458 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10459   echo $ECHO_N "(cached) $ECHO_C" >&6
10460 fi
10461 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10462 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10463 else
10464   # Is the header compilable?
10465 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10466 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10467 cat >conftest.$ac_ext <<_ACEOF
10468 /* confdefs.h.  */
10469 _ACEOF
10470 cat confdefs.h >>conftest.$ac_ext
10471 cat >>conftest.$ac_ext <<_ACEOF
10472 /* end confdefs.h.  */
10473 $ac_includes_default
10474 #include <$ac_header>
10475 _ACEOF
10476 rm -f conftest.$ac_objext
10477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10478   (eval $ac_compile) 2>conftest.er1
10479   ac_status=$?
10480   grep -v '^ *+' conftest.er1 >conftest.err
10481   rm -f conftest.er1
10482   cat conftest.err >&5
10483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10484   (exit $ac_status); } &&
10485          { ac_try='test -z "$ac_c_werror_flag"
10486                          || test ! -s conftest.err'
10487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10488   (eval $ac_try) 2>&5
10489   ac_status=$?
10490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10491   (exit $ac_status); }; } &&
10492          { ac_try='test -s conftest.$ac_objext'
10493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10494   (eval $ac_try) 2>&5
10495   ac_status=$?
10496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10497   (exit $ac_status); }; }; then
10498   ac_header_compiler=yes
10499 else
10500   echo "$as_me: failed program was:" >&5
10501 sed 's/^/| /' conftest.$ac_ext >&5
10502
10503 ac_header_compiler=no
10504 fi
10505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10506 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10507 echo "${ECHO_T}$ac_header_compiler" >&6
10508
10509 # Is the header present?
10510 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10511 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10512 cat >conftest.$ac_ext <<_ACEOF
10513 /* confdefs.h.  */
10514 _ACEOF
10515 cat confdefs.h >>conftest.$ac_ext
10516 cat >>conftest.$ac_ext <<_ACEOF
10517 /* end confdefs.h.  */
10518 #include <$ac_header>
10519 _ACEOF
10520 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10521   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10522   ac_status=$?
10523   grep -v '^ *+' conftest.er1 >conftest.err
10524   rm -f conftest.er1
10525   cat conftest.err >&5
10526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10527   (exit $ac_status); } >/dev/null; then
10528   if test -s conftest.err; then
10529     ac_cpp_err=$ac_c_preproc_warn_flag
10530     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10531   else
10532     ac_cpp_err=
10533   fi
10534 else
10535   ac_cpp_err=yes
10536 fi
10537 if test -z "$ac_cpp_err"; then
10538   ac_header_preproc=yes
10539 else
10540   echo "$as_me: failed program was:" >&5
10541 sed 's/^/| /' conftest.$ac_ext >&5
10542
10543   ac_header_preproc=no
10544 fi
10545 rm -f conftest.err conftest.$ac_ext
10546 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10547 echo "${ECHO_T}$ac_header_preproc" >&6
10548
10549 # So?  What about this header?
10550 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10551   yes:no: )
10552     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10553 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10554     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10555 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10556     ac_header_preproc=yes
10557     ;;
10558   no:yes:* )
10559     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10560 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10561     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10562 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10563     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10564 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10565     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10566 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10567     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10568 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10569     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10570 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10571     (
10572       cat <<\_ASBOX
10573 ## ---------------------------------------- ##
10574 ## Report this to pgsql-bugs@postgresql.org ##
10575 ## ---------------------------------------- ##
10576 _ASBOX
10577     ) |
10578       sed "s/^/$as_me: WARNING:     /" >&2
10579     ;;
10580 esac
10581 echo "$as_me:$LINENO: checking for $ac_header" >&5
10582 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10583 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10584   echo $ECHO_N "(cached) $ECHO_C" >&6
10585 else
10586   eval "$as_ac_Header=\$ac_header_preproc"
10587 fi
10588 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10589 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10590
10591 fi
10592 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10593   cat >>confdefs.h <<_ACEOF
10594 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10595 _ACEOF
10596
10597 else
10598
10599 for ac_header in pam/pam_appl.h
10600 do
10601 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10602 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10603   echo "$as_me:$LINENO: checking for $ac_header" >&5
10604 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10605 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10606   echo $ECHO_N "(cached) $ECHO_C" >&6
10607 fi
10608 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10609 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10610 else
10611   # Is the header compilable?
10612 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10613 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10614 cat >conftest.$ac_ext <<_ACEOF
10615 /* confdefs.h.  */
10616 _ACEOF
10617 cat confdefs.h >>conftest.$ac_ext
10618 cat >>conftest.$ac_ext <<_ACEOF
10619 /* end confdefs.h.  */
10620 $ac_includes_default
10621 #include <$ac_header>
10622 _ACEOF
10623 rm -f conftest.$ac_objext
10624 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10625   (eval $ac_compile) 2>conftest.er1
10626   ac_status=$?
10627   grep -v '^ *+' conftest.er1 >conftest.err
10628   rm -f conftest.er1
10629   cat conftest.err >&5
10630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10631   (exit $ac_status); } &&
10632          { ac_try='test -z "$ac_c_werror_flag"
10633                          || test ! -s conftest.err'
10634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10635   (eval $ac_try) 2>&5
10636   ac_status=$?
10637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10638   (exit $ac_status); }; } &&
10639          { ac_try='test -s conftest.$ac_objext'
10640   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10641   (eval $ac_try) 2>&5
10642   ac_status=$?
10643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10644   (exit $ac_status); }; }; then
10645   ac_header_compiler=yes
10646 else
10647   echo "$as_me: failed program was:" >&5
10648 sed 's/^/| /' conftest.$ac_ext >&5
10649
10650 ac_header_compiler=no
10651 fi
10652 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10653 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10654 echo "${ECHO_T}$ac_header_compiler" >&6
10655
10656 # Is the header present?
10657 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10658 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10659 cat >conftest.$ac_ext <<_ACEOF
10660 /* confdefs.h.  */
10661 _ACEOF
10662 cat confdefs.h >>conftest.$ac_ext
10663 cat >>conftest.$ac_ext <<_ACEOF
10664 /* end confdefs.h.  */
10665 #include <$ac_header>
10666 _ACEOF
10667 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10668   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10669   ac_status=$?
10670   grep -v '^ *+' conftest.er1 >conftest.err
10671   rm -f conftest.er1
10672   cat conftest.err >&5
10673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10674   (exit $ac_status); } >/dev/null; then
10675   if test -s conftest.err; then
10676     ac_cpp_err=$ac_c_preproc_warn_flag
10677     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10678   else
10679     ac_cpp_err=
10680   fi
10681 else
10682   ac_cpp_err=yes
10683 fi
10684 if test -z "$ac_cpp_err"; then
10685   ac_header_preproc=yes
10686 else
10687   echo "$as_me: failed program was:" >&5
10688 sed 's/^/| /' conftest.$ac_ext >&5
10689
10690   ac_header_preproc=no
10691 fi
10692 rm -f conftest.err conftest.$ac_ext
10693 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10694 echo "${ECHO_T}$ac_header_preproc" >&6
10695
10696 # So?  What about this header?
10697 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10698   yes:no: )
10699     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10700 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10701     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10702 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10703     ac_header_preproc=yes
10704     ;;
10705   no:yes:* )
10706     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10707 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10708     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10709 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10710     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10711 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10712     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10713 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10714     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10715 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10716     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10717 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10718     (
10719       cat <<\_ASBOX
10720 ## ---------------------------------------- ##
10721 ## Report this to pgsql-bugs@postgresql.org ##
10722 ## ---------------------------------------- ##
10723 _ASBOX
10724     ) |
10725       sed "s/^/$as_me: WARNING:     /" >&2
10726     ;;
10727 esac
10728 echo "$as_me:$LINENO: checking for $ac_header" >&5
10729 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10730 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10731   echo $ECHO_N "(cached) $ECHO_C" >&6
10732 else
10733   eval "$as_ac_Header=\$ac_header_preproc"
10734 fi
10735 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10736 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10737
10738 fi
10739 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10740   cat >>confdefs.h <<_ACEOF
10741 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10742 _ACEOF
10743
10744 else
10745   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10746 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10747    { (exit 1); exit 1; }; }
10748 fi
10749
10750 done
10751
10752 fi
10753
10754 done
10755
10756 fi
10757
10758 if test "$with_bonjour" = yes ; then
10759   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10760   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10761 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10762 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10763   echo $ECHO_N "(cached) $ECHO_C" >&6
10764 fi
10765 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10766 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10767 else
10768   # Is the header compilable?
10769 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10770 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10771 cat >conftest.$ac_ext <<_ACEOF
10772 /* confdefs.h.  */
10773 _ACEOF
10774 cat confdefs.h >>conftest.$ac_ext
10775 cat >>conftest.$ac_ext <<_ACEOF
10776 /* end confdefs.h.  */
10777 $ac_includes_default
10778 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10779 _ACEOF
10780 rm -f conftest.$ac_objext
10781 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10782   (eval $ac_compile) 2>conftest.er1
10783   ac_status=$?
10784   grep -v '^ *+' conftest.er1 >conftest.err
10785   rm -f conftest.er1
10786   cat conftest.err >&5
10787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10788   (exit $ac_status); } &&
10789          { ac_try='test -z "$ac_c_werror_flag"
10790                          || test ! -s conftest.err'
10791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10792   (eval $ac_try) 2>&5
10793   ac_status=$?
10794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10795   (exit $ac_status); }; } &&
10796          { ac_try='test -s conftest.$ac_objext'
10797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10798   (eval $ac_try) 2>&5
10799   ac_status=$?
10800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10801   (exit $ac_status); }; }; then
10802   ac_header_compiler=yes
10803 else
10804   echo "$as_me: failed program was:" >&5
10805 sed 's/^/| /' conftest.$ac_ext >&5
10806
10807 ac_header_compiler=no
10808 fi
10809 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10810 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10811 echo "${ECHO_T}$ac_header_compiler" >&6
10812
10813 # Is the header present?
10814 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10815 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10816 cat >conftest.$ac_ext <<_ACEOF
10817 /* confdefs.h.  */
10818 _ACEOF
10819 cat confdefs.h >>conftest.$ac_ext
10820 cat >>conftest.$ac_ext <<_ACEOF
10821 /* end confdefs.h.  */
10822 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10823 _ACEOF
10824 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10825   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10826   ac_status=$?
10827   grep -v '^ *+' conftest.er1 >conftest.err
10828   rm -f conftest.er1
10829   cat conftest.err >&5
10830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10831   (exit $ac_status); } >/dev/null; then
10832   if test -s conftest.err; then
10833     ac_cpp_err=$ac_c_preproc_warn_flag
10834     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10835   else
10836     ac_cpp_err=
10837   fi
10838 else
10839   ac_cpp_err=yes
10840 fi
10841 if test -z "$ac_cpp_err"; then
10842   ac_header_preproc=yes
10843 else
10844   echo "$as_me: failed program was:" >&5
10845 sed 's/^/| /' conftest.$ac_ext >&5
10846
10847   ac_header_preproc=no
10848 fi
10849 rm -f conftest.err conftest.$ac_ext
10850 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10851 echo "${ECHO_T}$ac_header_preproc" >&6
10852
10853 # So?  What about this header?
10854 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10855   yes:no: )
10856     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10857 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10858     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10859 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10860     ac_header_preproc=yes
10861     ;;
10862   no:yes:* )
10863     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10864 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10865     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10866 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10867     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10868 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10869     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10870 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10871     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10872 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10873     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10874 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10875     (
10876       cat <<\_ASBOX
10877 ## ---------------------------------------- ##
10878 ## Report this to pgsql-bugs@postgresql.org ##
10879 ## ---------------------------------------- ##
10880 _ASBOX
10881     ) |
10882       sed "s/^/$as_me: WARNING:     /" >&2
10883     ;;
10884 esac
10885 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10886 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10887 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10888   echo $ECHO_N "(cached) $ECHO_C" >&6
10889 else
10890   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10891 fi
10892 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10893 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10894
10895 fi
10896 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10897   :
10898 else
10899   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10900 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10901    { (exit 1); exit 1; }; }
10902 fi
10903
10904
10905 fi
10906
10907
10908 ##
10909 ## Types, structures, compiler characteristics
10910 ##
10911
10912  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10913 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10914 if test "${ac_cv_c_const+set}" = set; then
10915   echo $ECHO_N "(cached) $ECHO_C" >&6
10916 else
10917   cat >conftest.$ac_ext <<_ACEOF
10918 /* confdefs.h.  */
10919 _ACEOF
10920 cat confdefs.h >>conftest.$ac_ext
10921 cat >>conftest.$ac_ext <<_ACEOF
10922 /* end confdefs.h.  */
10923
10924 int
10925 main ()
10926 {
10927 /* FIXME: Include the comments suggested by Paul. */
10928 #ifndef __cplusplus
10929   /* Ultrix mips cc rejects this.  */
10930   typedef int charset[2];
10931   const charset x;
10932   /* SunOS 4.1.1 cc rejects this.  */
10933   char const *const *ccp;
10934   char **p;
10935   /* NEC SVR4.0.2 mips cc rejects this.  */
10936   struct point {int x, y;};
10937   static struct point const zero = {0,0};
10938   /* AIX XL C 1.02.0.0 rejects this.
10939      It does not let you subtract one const X* pointer from another in
10940      an arm of an if-expression whose if-part is not a constant
10941      expression */
10942   const char *g = "string";
10943   ccp = &g + (g ? g-g : 0);
10944   /* HPUX 7.0 cc rejects these. */
10945   ++ccp;
10946   p = (char**) ccp;
10947   ccp = (char const *const *) p;
10948   { /* SCO 3.2v4 cc rejects this.  */
10949     char *t;
10950     char const *s = 0 ? (char *) 0 : (char const *) 0;
10951
10952     *t++ = 0;
10953   }
10954   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10955     int x[] = {25, 17};
10956     const int *foo = &x[0];
10957     ++foo;
10958   }
10959   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10960     typedef const int *iptr;
10961     iptr p = 0;
10962     ++p;
10963   }
10964   { /* AIX XL C 1.02.0.0 rejects this saying
10965        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10966     struct s { int j; const int *ap[3]; };
10967     struct s *b; b->j = 5;
10968   }
10969   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10970     const int foo = 10;
10971   }
10972 #endif
10973
10974   ;
10975   return 0;
10976 }
10977 _ACEOF
10978 rm -f conftest.$ac_objext
10979 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10980   (eval $ac_compile) 2>conftest.er1
10981   ac_status=$?
10982   grep -v '^ *+' conftest.er1 >conftest.err
10983   rm -f conftest.er1
10984   cat conftest.err >&5
10985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10986   (exit $ac_status); } &&
10987          { ac_try='test -z "$ac_c_werror_flag"
10988                          || test ! -s conftest.err'
10989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10990   (eval $ac_try) 2>&5
10991   ac_status=$?
10992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10993   (exit $ac_status); }; } &&
10994          { ac_try='test -s conftest.$ac_objext'
10995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10996   (eval $ac_try) 2>&5
10997   ac_status=$?
10998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10999   (exit $ac_status); }; }; then
11000   ac_cv_c_const=yes
11001 else
11002   echo "$as_me: failed program was:" >&5
11003 sed 's/^/| /' conftest.$ac_ext >&5
11004
11005 ac_cv_c_const=no
11006 fi
11007 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11008 fi
11009 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
11010 echo "${ECHO_T}$ac_cv_c_const" >&6
11011 if test $ac_cv_c_const = no; then
11012
11013 cat >>confdefs.h <<\_ACEOF
11014 #define const
11015 _ACEOF
11016
11017 fi
11018
11019
11020 echo "$as_me:$LINENO: checking for inline" >&5
11021 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11022 if test "${ac_cv_c_inline+set}" = set; then
11023   echo $ECHO_N "(cached) $ECHO_C" >&6
11024 else
11025   ac_cv_c_inline=no
11026 for ac_kw in inline __inline__ __inline; do
11027   cat >conftest.$ac_ext <<_ACEOF
11028 /* confdefs.h.  */
11029 _ACEOF
11030 cat confdefs.h >>conftest.$ac_ext
11031 cat >>conftest.$ac_ext <<_ACEOF
11032 /* end confdefs.h.  */
11033 #ifndef __cplusplus
11034 typedef int foo_t;
11035 static $ac_kw foo_t static_foo () {return 0; }
11036 $ac_kw int foo () {return 0; }
11037 #endif
11038
11039 _ACEOF
11040 rm -f conftest.$ac_objext
11041 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11042   (eval $ac_compile) 2>conftest.er1
11043   ac_status=$?
11044   grep -v '^ *+' conftest.er1 >conftest.err
11045   rm -f conftest.er1
11046   cat conftest.err >&5
11047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11048   (exit $ac_status); } &&
11049          { ac_try='test -z "$ac_c_werror_flag"
11050                          || test ! -s conftest.err'
11051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11052   (eval $ac_try) 2>&5
11053   ac_status=$?
11054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11055   (exit $ac_status); }; } &&
11056          { ac_try='test -s conftest.$ac_objext'
11057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11058   (eval $ac_try) 2>&5
11059   ac_status=$?
11060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11061   (exit $ac_status); }; }; then
11062   ac_cv_c_inline=$ac_kw; break
11063 else
11064   echo "$as_me: failed program was:" >&5
11065 sed 's/^/| /' conftest.$ac_ext >&5
11066
11067 fi
11068 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11069 done
11070
11071 fi
11072 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11073 echo "${ECHO_T}$ac_cv_c_inline" >&6
11074 case $ac_cv_c_inline in
11075   inline | yes) ;;
11076   no)
11077 cat >>confdefs.h <<\_ACEOF
11078 #define inline
11079 _ACEOF
11080  ;;
11081   *)  cat >>confdefs.h <<_ACEOF
11082 #define inline $ac_cv_c_inline
11083 _ACEOF
11084  ;;
11085 esac
11086
11087 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11088 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11089 if test "${ac_cv_c_stringize+set}" = set; then
11090   echo $ECHO_N "(cached) $ECHO_C" >&6
11091 else
11092   cat >conftest.$ac_ext <<_ACEOF
11093 /* confdefs.h.  */
11094 _ACEOF
11095 cat confdefs.h >>conftest.$ac_ext
11096 cat >>conftest.$ac_ext <<_ACEOF
11097 /* end confdefs.h.  */
11098 #define x(y) #y
11099
11100 char *s = x(teststring);
11101 _ACEOF
11102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11103   $EGREP "#teststring" >/dev/null 2>&1; then
11104   ac_cv_c_stringize=no
11105 else
11106   ac_cv_c_stringize=yes
11107 fi
11108 rm -f conftest*
11109
11110 fi
11111 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11112 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11113 if test $ac_cv_c_stringize = yes; then
11114
11115 cat >>confdefs.h <<\_ACEOF
11116 #define HAVE_STRINGIZE 1
11117 _ACEOF
11118
11119 fi
11120
11121 echo "$as_me:$LINENO: checking for signed types" >&5
11122 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11123 if test "${pgac_cv_c_signed+set}" = set; then
11124   echo $ECHO_N "(cached) $ECHO_C" >&6
11125 else
11126   cat >conftest.$ac_ext <<_ACEOF
11127 /* confdefs.h.  */
11128 _ACEOF
11129 cat confdefs.h >>conftest.$ac_ext
11130 cat >>conftest.$ac_ext <<_ACEOF
11131 /* end confdefs.h.  */
11132
11133 int
11134 main ()
11135 {
11136 signed char c; signed short s; signed int i;
11137   ;
11138   return 0;
11139 }
11140 _ACEOF
11141 rm -f conftest.$ac_objext
11142 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11143   (eval $ac_compile) 2>conftest.er1
11144   ac_status=$?
11145   grep -v '^ *+' conftest.er1 >conftest.err
11146   rm -f conftest.er1
11147   cat conftest.err >&5
11148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11149   (exit $ac_status); } &&
11150          { ac_try='test -z "$ac_c_werror_flag"
11151                          || test ! -s conftest.err'
11152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11153   (eval $ac_try) 2>&5
11154   ac_status=$?
11155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11156   (exit $ac_status); }; } &&
11157          { ac_try='test -s conftest.$ac_objext'
11158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11159   (eval $ac_try) 2>&5
11160   ac_status=$?
11161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11162   (exit $ac_status); }; }; then
11163   pgac_cv_c_signed=yes
11164 else
11165   echo "$as_me: failed program was:" >&5
11166 sed 's/^/| /' conftest.$ac_ext >&5
11167
11168 pgac_cv_c_signed=no
11169 fi
11170 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11171 fi
11172 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11173 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11174 if test x"$pgac_cv_c_signed" = xno ; then
11175
11176 cat >>confdefs.h <<\_ACEOF
11177 #define signed
11178 _ACEOF
11179
11180 fi
11181 echo "$as_me:$LINENO: checking for working volatile" >&5
11182 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11183 if test "${ac_cv_c_volatile+set}" = set; then
11184   echo $ECHO_N "(cached) $ECHO_C" >&6
11185 else
11186   cat >conftest.$ac_ext <<_ACEOF
11187 /* confdefs.h.  */
11188 _ACEOF
11189 cat confdefs.h >>conftest.$ac_ext
11190 cat >>conftest.$ac_ext <<_ACEOF
11191 /* end confdefs.h.  */
11192
11193 int
11194 main ()
11195 {
11196
11197 volatile int x;
11198 int * volatile y;
11199   ;
11200   return 0;
11201 }
11202 _ACEOF
11203 rm -f conftest.$ac_objext
11204 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11205   (eval $ac_compile) 2>conftest.er1
11206   ac_status=$?
11207   grep -v '^ *+' conftest.er1 >conftest.err
11208   rm -f conftest.er1
11209   cat conftest.err >&5
11210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11211   (exit $ac_status); } &&
11212          { ac_try='test -z "$ac_c_werror_flag"
11213                          || test ! -s conftest.err'
11214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11215   (eval $ac_try) 2>&5
11216   ac_status=$?
11217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11218   (exit $ac_status); }; } &&
11219          { ac_try='test -s conftest.$ac_objext'
11220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11221   (eval $ac_try) 2>&5
11222   ac_status=$?
11223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11224   (exit $ac_status); }; }; then
11225   ac_cv_c_volatile=yes
11226 else
11227   echo "$as_me: failed program was:" >&5
11228 sed 's/^/| /' conftest.$ac_ext >&5
11229
11230 ac_cv_c_volatile=no
11231 fi
11232 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11233 fi
11234 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11235 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11236 if test $ac_cv_c_volatile = no; then
11237
11238 cat >>confdefs.h <<\_ACEOF
11239 #define volatile
11240 _ACEOF
11241
11242 fi
11243
11244 echo "$as_me:$LINENO: checking for __func__" >&5
11245 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11246 if test "${pgac_cv_funcname_func_support+set}" = set; then
11247   echo $ECHO_N "(cached) $ECHO_C" >&6
11248 else
11249   cat >conftest.$ac_ext <<_ACEOF
11250 /* confdefs.h.  */
11251 _ACEOF
11252 cat confdefs.h >>conftest.$ac_ext
11253 cat >>conftest.$ac_ext <<_ACEOF
11254 /* end confdefs.h.  */
11255 #include <stdio.h>
11256 int
11257 main ()
11258 {
11259 printf("%s\n", __func__);
11260   ;
11261   return 0;
11262 }
11263 _ACEOF
11264 rm -f conftest.$ac_objext
11265 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11266   (eval $ac_compile) 2>conftest.er1
11267   ac_status=$?
11268   grep -v '^ *+' conftest.er1 >conftest.err
11269   rm -f conftest.er1
11270   cat conftest.err >&5
11271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11272   (exit $ac_status); } &&
11273          { ac_try='test -z "$ac_c_werror_flag"
11274                          || test ! -s conftest.err'
11275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11276   (eval $ac_try) 2>&5
11277   ac_status=$?
11278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11279   (exit $ac_status); }; } &&
11280          { ac_try='test -s conftest.$ac_objext'
11281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11282   (eval $ac_try) 2>&5
11283   ac_status=$?
11284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11285   (exit $ac_status); }; }; then
11286   pgac_cv_funcname_func_support=yes
11287 else
11288   echo "$as_me: failed program was:" >&5
11289 sed 's/^/| /' conftest.$ac_ext >&5
11290
11291 pgac_cv_funcname_func_support=no
11292 fi
11293 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11294 fi
11295 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11296 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11297 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11298
11299 cat >>confdefs.h <<\_ACEOF
11300 #define HAVE_FUNCNAME__FUNC 1
11301 _ACEOF
11302
11303 else
11304 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11305 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11306 if test "${pgac_cv_funcname_function_support+set}" = set; then
11307   echo $ECHO_N "(cached) $ECHO_C" >&6
11308 else
11309   cat >conftest.$ac_ext <<_ACEOF
11310 /* confdefs.h.  */
11311 _ACEOF
11312 cat confdefs.h >>conftest.$ac_ext
11313 cat >>conftest.$ac_ext <<_ACEOF
11314 /* end confdefs.h.  */
11315 #include <stdio.h>
11316 int
11317 main ()
11318 {
11319 printf("%s\n", __FUNCTION__);
11320   ;
11321   return 0;
11322 }
11323 _ACEOF
11324 rm -f conftest.$ac_objext
11325 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11326   (eval $ac_compile) 2>conftest.er1
11327   ac_status=$?
11328   grep -v '^ *+' conftest.er1 >conftest.err
11329   rm -f conftest.er1
11330   cat conftest.err >&5
11331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332   (exit $ac_status); } &&
11333          { ac_try='test -z "$ac_c_werror_flag"
11334                          || test ! -s conftest.err'
11335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11336   (eval $ac_try) 2>&5
11337   ac_status=$?
11338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11339   (exit $ac_status); }; } &&
11340          { ac_try='test -s conftest.$ac_objext'
11341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11342   (eval $ac_try) 2>&5
11343   ac_status=$?
11344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11345   (exit $ac_status); }; }; then
11346   pgac_cv_funcname_function_support=yes
11347 else
11348   echo "$as_me: failed program was:" >&5
11349 sed 's/^/| /' conftest.$ac_ext >&5
11350
11351 pgac_cv_funcname_function_support=no
11352 fi
11353 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11354 fi
11355 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11356 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11357 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11358
11359 cat >>confdefs.h <<\_ACEOF
11360 #define HAVE_FUNCNAME__FUNCTION 1
11361 _ACEOF
11362
11363 fi
11364 fi
11365 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11366 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11367 if test "${ac_cv_struct_tm+set}" = set; then
11368   echo $ECHO_N "(cached) $ECHO_C" >&6
11369 else
11370   cat >conftest.$ac_ext <<_ACEOF
11371 /* confdefs.h.  */
11372 _ACEOF
11373 cat confdefs.h >>conftest.$ac_ext
11374 cat >>conftest.$ac_ext <<_ACEOF
11375 /* end confdefs.h.  */
11376 #include <sys/types.h>
11377 #include <time.h>
11378
11379 int
11380 main ()
11381 {
11382 struct tm *tp; tp->tm_sec;
11383   ;
11384   return 0;
11385 }
11386 _ACEOF
11387 rm -f conftest.$ac_objext
11388 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11389   (eval $ac_compile) 2>conftest.er1
11390   ac_status=$?
11391   grep -v '^ *+' conftest.er1 >conftest.err
11392   rm -f conftest.er1
11393   cat conftest.err >&5
11394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11395   (exit $ac_status); } &&
11396          { ac_try='test -z "$ac_c_werror_flag"
11397                          || test ! -s conftest.err'
11398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11399   (eval $ac_try) 2>&5
11400   ac_status=$?
11401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11402   (exit $ac_status); }; } &&
11403          { ac_try='test -s conftest.$ac_objext'
11404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11405   (eval $ac_try) 2>&5
11406   ac_status=$?
11407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11408   (exit $ac_status); }; }; then
11409   ac_cv_struct_tm=time.h
11410 else
11411   echo "$as_me: failed program was:" >&5
11412 sed 's/^/| /' conftest.$ac_ext >&5
11413
11414 ac_cv_struct_tm=sys/time.h
11415 fi
11416 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11417 fi
11418 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11419 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11420 if test $ac_cv_struct_tm = sys/time.h; then
11421
11422 cat >>confdefs.h <<\_ACEOF
11423 #define TM_IN_SYS_TIME 1
11424 _ACEOF
11425
11426 fi
11427
11428 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11429 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11430 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11431   echo $ECHO_N "(cached) $ECHO_C" >&6
11432 else
11433   cat >conftest.$ac_ext <<_ACEOF
11434 /* confdefs.h.  */
11435 _ACEOF
11436 cat confdefs.h >>conftest.$ac_ext
11437 cat >>conftest.$ac_ext <<_ACEOF
11438 /* end confdefs.h.  */
11439 #include <sys/types.h>
11440 #include <$ac_cv_struct_tm>
11441
11442
11443 int
11444 main ()
11445 {
11446 static struct tm ac_aggr;
11447 if (ac_aggr.tm_zone)
11448 return 0;
11449   ;
11450   return 0;
11451 }
11452 _ACEOF
11453 rm -f conftest.$ac_objext
11454 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11455   (eval $ac_compile) 2>conftest.er1
11456   ac_status=$?
11457   grep -v '^ *+' conftest.er1 >conftest.err
11458   rm -f conftest.er1
11459   cat conftest.err >&5
11460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11461   (exit $ac_status); } &&
11462          { ac_try='test -z "$ac_c_werror_flag"
11463                          || test ! -s conftest.err'
11464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11465   (eval $ac_try) 2>&5
11466   ac_status=$?
11467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11468   (exit $ac_status); }; } &&
11469          { ac_try='test -s conftest.$ac_objext'
11470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11471   (eval $ac_try) 2>&5
11472   ac_status=$?
11473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11474   (exit $ac_status); }; }; then
11475   ac_cv_member_struct_tm_tm_zone=yes
11476 else
11477   echo "$as_me: failed program was:" >&5
11478 sed 's/^/| /' conftest.$ac_ext >&5
11479
11480 cat >conftest.$ac_ext <<_ACEOF
11481 /* confdefs.h.  */
11482 _ACEOF
11483 cat confdefs.h >>conftest.$ac_ext
11484 cat >>conftest.$ac_ext <<_ACEOF
11485 /* end confdefs.h.  */
11486 #include <sys/types.h>
11487 #include <$ac_cv_struct_tm>
11488
11489
11490 int
11491 main ()
11492 {
11493 static struct tm ac_aggr;
11494 if (sizeof ac_aggr.tm_zone)
11495 return 0;
11496   ;
11497   return 0;
11498 }
11499 _ACEOF
11500 rm -f conftest.$ac_objext
11501 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11502   (eval $ac_compile) 2>conftest.er1
11503   ac_status=$?
11504   grep -v '^ *+' conftest.er1 >conftest.err
11505   rm -f conftest.er1
11506   cat conftest.err >&5
11507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11508   (exit $ac_status); } &&
11509          { ac_try='test -z "$ac_c_werror_flag"
11510                          || test ! -s conftest.err'
11511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11512   (eval $ac_try) 2>&5
11513   ac_status=$?
11514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11515   (exit $ac_status); }; } &&
11516          { ac_try='test -s conftest.$ac_objext'
11517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11518   (eval $ac_try) 2>&5
11519   ac_status=$?
11520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11521   (exit $ac_status); }; }; then
11522   ac_cv_member_struct_tm_tm_zone=yes
11523 else
11524   echo "$as_me: failed program was:" >&5
11525 sed 's/^/| /' conftest.$ac_ext >&5
11526
11527 ac_cv_member_struct_tm_tm_zone=no
11528 fi
11529 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11530 fi
11531 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11532 fi
11533 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11534 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11535 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11536
11537 cat >>confdefs.h <<_ACEOF
11538 #define HAVE_STRUCT_TM_TM_ZONE 1
11539 _ACEOF
11540
11541
11542 fi
11543
11544 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11545
11546 cat >>confdefs.h <<\_ACEOF
11547 #define HAVE_TM_ZONE 1
11548 _ACEOF
11549
11550 fi
11551 echo "$as_me:$LINENO: checking for tzname" >&5
11552 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11553 if test "${ac_cv_var_tzname+set}" = set; then
11554   echo $ECHO_N "(cached) $ECHO_C" >&6
11555 else
11556   cat >conftest.$ac_ext <<_ACEOF
11557 /* confdefs.h.  */
11558 _ACEOF
11559 cat confdefs.h >>conftest.$ac_ext
11560 cat >>conftest.$ac_ext <<_ACEOF
11561 /* end confdefs.h.  */
11562 #include <time.h>
11563 #ifndef tzname /* For SGI.  */
11564 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11565 #endif
11566
11567 int
11568 main ()
11569 {
11570 atoi(*tzname);
11571   ;
11572   return 0;
11573 }
11574 _ACEOF
11575 rm -f conftest.$ac_objext conftest$ac_exeext
11576 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11577   (eval $ac_link) 2>conftest.er1
11578   ac_status=$?
11579   grep -v '^ *+' conftest.er1 >conftest.err
11580   rm -f conftest.er1
11581   cat conftest.err >&5
11582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11583   (exit $ac_status); } &&
11584          { ac_try='test -z "$ac_c_werror_flag"
11585                          || test ! -s conftest.err'
11586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11587   (eval $ac_try) 2>&5
11588   ac_status=$?
11589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11590   (exit $ac_status); }; } &&
11591          { ac_try='test -s conftest$ac_exeext'
11592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11593   (eval $ac_try) 2>&5
11594   ac_status=$?
11595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11596   (exit $ac_status); }; }; then
11597   ac_cv_var_tzname=yes
11598 else
11599   echo "$as_me: failed program was:" >&5
11600 sed 's/^/| /' conftest.$ac_ext >&5
11601
11602 ac_cv_var_tzname=no
11603 fi
11604 rm -f conftest.err conftest.$ac_objext \
11605       conftest$ac_exeext conftest.$ac_ext
11606 fi
11607 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11608 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11609 if test $ac_cv_var_tzname = yes; then
11610
11611 cat >>confdefs.h <<\_ACEOF
11612 #define HAVE_TZNAME 1
11613 _ACEOF
11614
11615 fi
11616
11617 echo "$as_me:$LINENO: checking for union semun" >&5
11618 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11619 if test "${ac_cv_type_union_semun+set}" = set; then
11620   echo $ECHO_N "(cached) $ECHO_C" >&6
11621 else
11622   cat >conftest.$ac_ext <<_ACEOF
11623 /* confdefs.h.  */
11624 _ACEOF
11625 cat confdefs.h >>conftest.$ac_ext
11626 cat >>conftest.$ac_ext <<_ACEOF
11627 /* end confdefs.h.  */
11628 #include <sys/types.h>
11629 #include <sys/ipc.h>
11630 #include <sys/sem.h>
11631
11632 int
11633 main ()
11634 {
11635 if ((union semun *) 0)
11636   return 0;
11637 if (sizeof (union semun))
11638   return 0;
11639   ;
11640   return 0;
11641 }
11642 _ACEOF
11643 rm -f conftest.$ac_objext
11644 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11645   (eval $ac_compile) 2>conftest.er1
11646   ac_status=$?
11647   grep -v '^ *+' conftest.er1 >conftest.err
11648   rm -f conftest.er1
11649   cat conftest.err >&5
11650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651   (exit $ac_status); } &&
11652          { ac_try='test -z "$ac_c_werror_flag"
11653                          || test ! -s conftest.err'
11654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11655   (eval $ac_try) 2>&5
11656   ac_status=$?
11657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658   (exit $ac_status); }; } &&
11659          { ac_try='test -s conftest.$ac_objext'
11660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11661   (eval $ac_try) 2>&5
11662   ac_status=$?
11663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664   (exit $ac_status); }; }; then
11665   ac_cv_type_union_semun=yes
11666 else
11667   echo "$as_me: failed program was:" >&5
11668 sed 's/^/| /' conftest.$ac_ext >&5
11669
11670 ac_cv_type_union_semun=no
11671 fi
11672 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11673 fi
11674 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11675 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11676 if test $ac_cv_type_union_semun = yes; then
11677
11678 cat >>confdefs.h <<_ACEOF
11679 #define HAVE_UNION_SEMUN 1
11680 _ACEOF
11681
11682
11683 fi
11684
11685 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11686 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11687 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11688   echo $ECHO_N "(cached) $ECHO_C" >&6
11689 else
11690   cat >conftest.$ac_ext <<_ACEOF
11691 /* confdefs.h.  */
11692 _ACEOF
11693 cat confdefs.h >>conftest.$ac_ext
11694 cat >>conftest.$ac_ext <<_ACEOF
11695 /* end confdefs.h.  */
11696 #include <sys/types.h>
11697 #ifdef HAVE_SYS_UN_H
11698 #include <sys/un.h>
11699 #endif
11700
11701
11702 int
11703 main ()
11704 {
11705 if ((struct sockaddr_un *) 0)
11706   return 0;
11707 if (sizeof (struct sockaddr_un))
11708   return 0;
11709   ;
11710   return 0;
11711 }
11712 _ACEOF
11713 rm -f conftest.$ac_objext
11714 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11715   (eval $ac_compile) 2>conftest.er1
11716   ac_status=$?
11717   grep -v '^ *+' conftest.er1 >conftest.err
11718   rm -f conftest.er1
11719   cat conftest.err >&5
11720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11721   (exit $ac_status); } &&
11722          { ac_try='test -z "$ac_c_werror_flag"
11723                          || test ! -s conftest.err'
11724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11725   (eval $ac_try) 2>&5
11726   ac_status=$?
11727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11728   (exit $ac_status); }; } &&
11729          { ac_try='test -s conftest.$ac_objext'
11730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11731   (eval $ac_try) 2>&5
11732   ac_status=$?
11733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11734   (exit $ac_status); }; }; then
11735   ac_cv_type_struct_sockaddr_un=yes
11736 else
11737   echo "$as_me: failed program was:" >&5
11738 sed 's/^/| /' conftest.$ac_ext >&5
11739
11740 ac_cv_type_struct_sockaddr_un=no
11741 fi
11742 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11743 fi
11744 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11745 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11746 if test $ac_cv_type_struct_sockaddr_un = yes; then
11747
11748 cat >>confdefs.h <<_ACEOF
11749 #define HAVE_STRUCT_SOCKADDR_UN 1
11750 _ACEOF
11751
11752
11753 cat >>confdefs.h <<\_ACEOF
11754 #define HAVE_UNIX_SOCKETS 1
11755 _ACEOF
11756
11757 fi
11758
11759 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11760 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11761 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11762   echo $ECHO_N "(cached) $ECHO_C" >&6
11763 else
11764   cat >conftest.$ac_ext <<_ACEOF
11765 /* confdefs.h.  */
11766 _ACEOF
11767 cat confdefs.h >>conftest.$ac_ext
11768 cat >>conftest.$ac_ext <<_ACEOF
11769 /* end confdefs.h.  */
11770 #include <sys/types.h>
11771 #ifdef HAVE_SYS_SOCKET_H
11772 #include <sys/socket.h>
11773 #endif
11774
11775
11776 int
11777 main ()
11778 {
11779 if ((struct sockaddr_storage *) 0)
11780   return 0;
11781 if (sizeof (struct sockaddr_storage))
11782   return 0;
11783   ;
11784   return 0;
11785 }
11786 _ACEOF
11787 rm -f conftest.$ac_objext
11788 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11789   (eval $ac_compile) 2>conftest.er1
11790   ac_status=$?
11791   grep -v '^ *+' conftest.er1 >conftest.err
11792   rm -f conftest.er1
11793   cat conftest.err >&5
11794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11795   (exit $ac_status); } &&
11796          { ac_try='test -z "$ac_c_werror_flag"
11797                          || test ! -s conftest.err'
11798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11799   (eval $ac_try) 2>&5
11800   ac_status=$?
11801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11802   (exit $ac_status); }; } &&
11803          { ac_try='test -s conftest.$ac_objext'
11804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11805   (eval $ac_try) 2>&5
11806   ac_status=$?
11807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11808   (exit $ac_status); }; }; then
11809   ac_cv_type_struct_sockaddr_storage=yes
11810 else
11811   echo "$as_me: failed program was:" >&5
11812 sed 's/^/| /' conftest.$ac_ext >&5
11813
11814 ac_cv_type_struct_sockaddr_storage=no
11815 fi
11816 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11817 fi
11818 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11819 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11820 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11821
11822 cat >>confdefs.h <<_ACEOF
11823 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11824 _ACEOF
11825
11826
11827 fi
11828
11829 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11830 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11831 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11832   echo $ECHO_N "(cached) $ECHO_C" >&6
11833 else
11834   cat >conftest.$ac_ext <<_ACEOF
11835 /* confdefs.h.  */
11836 _ACEOF
11837 cat confdefs.h >>conftest.$ac_ext
11838 cat >>conftest.$ac_ext <<_ACEOF
11839 /* end confdefs.h.  */
11840 #include <sys/types.h>
11841 #ifdef HAVE_SYS_SOCKET_H
11842 #include <sys/socket.h>
11843 #endif
11844
11845
11846 int
11847 main ()
11848 {
11849 static struct sockaddr_storage ac_aggr;
11850 if (ac_aggr.ss_family)
11851 return 0;
11852   ;
11853   return 0;
11854 }
11855 _ACEOF
11856 rm -f conftest.$ac_objext
11857 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11858   (eval $ac_compile) 2>conftest.er1
11859   ac_status=$?
11860   grep -v '^ *+' conftest.er1 >conftest.err
11861   rm -f conftest.er1
11862   cat conftest.err >&5
11863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11864   (exit $ac_status); } &&
11865          { ac_try='test -z "$ac_c_werror_flag"
11866                          || test ! -s conftest.err'
11867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11868   (eval $ac_try) 2>&5
11869   ac_status=$?
11870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11871   (exit $ac_status); }; } &&
11872          { ac_try='test -s conftest.$ac_objext'
11873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11874   (eval $ac_try) 2>&5
11875   ac_status=$?
11876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11877   (exit $ac_status); }; }; then
11878   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11879 else
11880   echo "$as_me: failed program was:" >&5
11881 sed 's/^/| /' conftest.$ac_ext >&5
11882
11883 cat >conftest.$ac_ext <<_ACEOF
11884 /* confdefs.h.  */
11885 _ACEOF
11886 cat confdefs.h >>conftest.$ac_ext
11887 cat >>conftest.$ac_ext <<_ACEOF
11888 /* end confdefs.h.  */
11889 #include <sys/types.h>
11890 #ifdef HAVE_SYS_SOCKET_H
11891 #include <sys/socket.h>
11892 #endif
11893
11894
11895 int
11896 main ()
11897 {
11898 static struct sockaddr_storage ac_aggr;
11899 if (sizeof ac_aggr.ss_family)
11900 return 0;
11901   ;
11902   return 0;
11903 }
11904 _ACEOF
11905 rm -f conftest.$ac_objext
11906 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11907   (eval $ac_compile) 2>conftest.er1
11908   ac_status=$?
11909   grep -v '^ *+' conftest.er1 >conftest.err
11910   rm -f conftest.er1
11911   cat conftest.err >&5
11912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11913   (exit $ac_status); } &&
11914          { ac_try='test -z "$ac_c_werror_flag"
11915                          || test ! -s conftest.err'
11916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11917   (eval $ac_try) 2>&5
11918   ac_status=$?
11919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11920   (exit $ac_status); }; } &&
11921          { ac_try='test -s conftest.$ac_objext'
11922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11923   (eval $ac_try) 2>&5
11924   ac_status=$?
11925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926   (exit $ac_status); }; }; then
11927   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11928 else
11929   echo "$as_me: failed program was:" >&5
11930 sed 's/^/| /' conftest.$ac_ext >&5
11931
11932 ac_cv_member_struct_sockaddr_storage_ss_family=no
11933 fi
11934 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11935 fi
11936 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11937 fi
11938 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11939 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11940 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11941
11942 cat >>confdefs.h <<_ACEOF
11943 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11944 _ACEOF
11945
11946
11947 fi
11948 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11949 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11950 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11951   echo $ECHO_N "(cached) $ECHO_C" >&6
11952 else
11953   cat >conftest.$ac_ext <<_ACEOF
11954 /* confdefs.h.  */
11955 _ACEOF
11956 cat confdefs.h >>conftest.$ac_ext
11957 cat >>conftest.$ac_ext <<_ACEOF
11958 /* end confdefs.h.  */
11959 #include <sys/types.h>
11960 #ifdef HAVE_SYS_SOCKET_H
11961 #include <sys/socket.h>
11962 #endif
11963
11964
11965 int
11966 main ()
11967 {
11968 static struct sockaddr_storage ac_aggr;
11969 if (ac_aggr.__ss_family)
11970 return 0;
11971   ;
11972   return 0;
11973 }
11974 _ACEOF
11975 rm -f conftest.$ac_objext
11976 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11977   (eval $ac_compile) 2>conftest.er1
11978   ac_status=$?
11979   grep -v '^ *+' conftest.er1 >conftest.err
11980   rm -f conftest.er1
11981   cat conftest.err >&5
11982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11983   (exit $ac_status); } &&
11984          { ac_try='test -z "$ac_c_werror_flag"
11985                          || test ! -s conftest.err'
11986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11987   (eval $ac_try) 2>&5
11988   ac_status=$?
11989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11990   (exit $ac_status); }; } &&
11991          { ac_try='test -s conftest.$ac_objext'
11992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11993   (eval $ac_try) 2>&5
11994   ac_status=$?
11995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11996   (exit $ac_status); }; }; then
11997   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11998 else
11999   echo "$as_me: failed program was:" >&5
12000 sed 's/^/| /' conftest.$ac_ext >&5
12001
12002 cat >conftest.$ac_ext <<_ACEOF
12003 /* confdefs.h.  */
12004 _ACEOF
12005 cat confdefs.h >>conftest.$ac_ext
12006 cat >>conftest.$ac_ext <<_ACEOF
12007 /* end confdefs.h.  */
12008 #include <sys/types.h>
12009 #ifdef HAVE_SYS_SOCKET_H
12010 #include <sys/socket.h>
12011 #endif
12012
12013
12014 int
12015 main ()
12016 {
12017 static struct sockaddr_storage ac_aggr;
12018 if (sizeof ac_aggr.__ss_family)
12019 return 0;
12020   ;
12021   return 0;
12022 }
12023 _ACEOF
12024 rm -f conftest.$ac_objext
12025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12026   (eval $ac_compile) 2>conftest.er1
12027   ac_status=$?
12028   grep -v '^ *+' conftest.er1 >conftest.err
12029   rm -f conftest.er1
12030   cat conftest.err >&5
12031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12032   (exit $ac_status); } &&
12033          { ac_try='test -z "$ac_c_werror_flag"
12034                          || test ! -s conftest.err'
12035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12036   (eval $ac_try) 2>&5
12037   ac_status=$?
12038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12039   (exit $ac_status); }; } &&
12040          { ac_try='test -s conftest.$ac_objext'
12041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12042   (eval $ac_try) 2>&5
12043   ac_status=$?
12044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12045   (exit $ac_status); }; }; then
12046   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12047 else
12048   echo "$as_me: failed program was:" >&5
12049 sed 's/^/| /' conftest.$ac_ext >&5
12050
12051 ac_cv_member_struct_sockaddr_storage___ss_family=no
12052 fi
12053 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12054 fi
12055 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12056 fi
12057 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12058 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12059 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12060
12061 cat >>confdefs.h <<_ACEOF
12062 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12063 _ACEOF
12064
12065
12066 fi
12067 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12068 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12069 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12070   echo $ECHO_N "(cached) $ECHO_C" >&6
12071 else
12072   cat >conftest.$ac_ext <<_ACEOF
12073 /* confdefs.h.  */
12074 _ACEOF
12075 cat confdefs.h >>conftest.$ac_ext
12076 cat >>conftest.$ac_ext <<_ACEOF
12077 /* end confdefs.h.  */
12078 #include <sys/types.h>
12079 #ifdef HAVE_SYS_SOCKET_H
12080 #include <sys/socket.h>
12081 #endif
12082
12083
12084 int
12085 main ()
12086 {
12087 static struct sockaddr_storage ac_aggr;
12088 if (ac_aggr.ss_len)
12089 return 0;
12090   ;
12091   return 0;
12092 }
12093 _ACEOF
12094 rm -f conftest.$ac_objext
12095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12096   (eval $ac_compile) 2>conftest.er1
12097   ac_status=$?
12098   grep -v '^ *+' conftest.er1 >conftest.err
12099   rm -f conftest.er1
12100   cat conftest.err >&5
12101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12102   (exit $ac_status); } &&
12103          { ac_try='test -z "$ac_c_werror_flag"
12104                          || test ! -s conftest.err'
12105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12106   (eval $ac_try) 2>&5
12107   ac_status=$?
12108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109   (exit $ac_status); }; } &&
12110          { ac_try='test -s conftest.$ac_objext'
12111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12112   (eval $ac_try) 2>&5
12113   ac_status=$?
12114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115   (exit $ac_status); }; }; then
12116   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12117 else
12118   echo "$as_me: failed program was:" >&5
12119 sed 's/^/| /' conftest.$ac_ext >&5
12120
12121 cat >conftest.$ac_ext <<_ACEOF
12122 /* confdefs.h.  */
12123 _ACEOF
12124 cat confdefs.h >>conftest.$ac_ext
12125 cat >>conftest.$ac_ext <<_ACEOF
12126 /* end confdefs.h.  */
12127 #include <sys/types.h>
12128 #ifdef HAVE_SYS_SOCKET_H
12129 #include <sys/socket.h>
12130 #endif
12131
12132
12133 int
12134 main ()
12135 {
12136 static struct sockaddr_storage ac_aggr;
12137 if (sizeof ac_aggr.ss_len)
12138 return 0;
12139   ;
12140   return 0;
12141 }
12142 _ACEOF
12143 rm -f conftest.$ac_objext
12144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12145   (eval $ac_compile) 2>conftest.er1
12146   ac_status=$?
12147   grep -v '^ *+' conftest.er1 >conftest.err
12148   rm -f conftest.er1
12149   cat conftest.err >&5
12150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12151   (exit $ac_status); } &&
12152          { ac_try='test -z "$ac_c_werror_flag"
12153                          || test ! -s conftest.err'
12154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12155   (eval $ac_try) 2>&5
12156   ac_status=$?
12157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12158   (exit $ac_status); }; } &&
12159          { ac_try='test -s conftest.$ac_objext'
12160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12161   (eval $ac_try) 2>&5
12162   ac_status=$?
12163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12164   (exit $ac_status); }; }; then
12165   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12166 else
12167   echo "$as_me: failed program was:" >&5
12168 sed 's/^/| /' conftest.$ac_ext >&5
12169
12170 ac_cv_member_struct_sockaddr_storage_ss_len=no
12171 fi
12172 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12173 fi
12174 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12175 fi
12176 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12177 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12178 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12179
12180 cat >>confdefs.h <<_ACEOF
12181 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12182 _ACEOF
12183
12184
12185 fi
12186 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12187 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12188 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12189   echo $ECHO_N "(cached) $ECHO_C" >&6
12190 else
12191   cat >conftest.$ac_ext <<_ACEOF
12192 /* confdefs.h.  */
12193 _ACEOF
12194 cat confdefs.h >>conftest.$ac_ext
12195 cat >>conftest.$ac_ext <<_ACEOF
12196 /* end confdefs.h.  */
12197 #include <sys/types.h>
12198 #ifdef HAVE_SYS_SOCKET_H
12199 #include <sys/socket.h>
12200 #endif
12201
12202
12203 int
12204 main ()
12205 {
12206 static struct sockaddr_storage ac_aggr;
12207 if (ac_aggr.__ss_len)
12208 return 0;
12209   ;
12210   return 0;
12211 }
12212 _ACEOF
12213 rm -f conftest.$ac_objext
12214 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12215   (eval $ac_compile) 2>conftest.er1
12216   ac_status=$?
12217   grep -v '^ *+' conftest.er1 >conftest.err
12218   rm -f conftest.er1
12219   cat conftest.err >&5
12220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12221   (exit $ac_status); } &&
12222          { ac_try='test -z "$ac_c_werror_flag"
12223                          || test ! -s conftest.err'
12224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12225   (eval $ac_try) 2>&5
12226   ac_status=$?
12227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12228   (exit $ac_status); }; } &&
12229          { ac_try='test -s conftest.$ac_objext'
12230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12231   (eval $ac_try) 2>&5
12232   ac_status=$?
12233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12234   (exit $ac_status); }; }; then
12235   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12236 else
12237   echo "$as_me: failed program was:" >&5
12238 sed 's/^/| /' conftest.$ac_ext >&5
12239
12240 cat >conftest.$ac_ext <<_ACEOF
12241 /* confdefs.h.  */
12242 _ACEOF
12243 cat confdefs.h >>conftest.$ac_ext
12244 cat >>conftest.$ac_ext <<_ACEOF
12245 /* end confdefs.h.  */
12246 #include <sys/types.h>
12247 #ifdef HAVE_SYS_SOCKET_H
12248 #include <sys/socket.h>
12249 #endif
12250
12251
12252 int
12253 main ()
12254 {
12255 static struct sockaddr_storage ac_aggr;
12256 if (sizeof ac_aggr.__ss_len)
12257 return 0;
12258   ;
12259   return 0;
12260 }
12261 _ACEOF
12262 rm -f conftest.$ac_objext
12263 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12264   (eval $ac_compile) 2>conftest.er1
12265   ac_status=$?
12266   grep -v '^ *+' conftest.er1 >conftest.err
12267   rm -f conftest.er1
12268   cat conftest.err >&5
12269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12270   (exit $ac_status); } &&
12271          { ac_try='test -z "$ac_c_werror_flag"
12272                          || test ! -s conftest.err'
12273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12274   (eval $ac_try) 2>&5
12275   ac_status=$?
12276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12277   (exit $ac_status); }; } &&
12278          { ac_try='test -s conftest.$ac_objext'
12279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12280   (eval $ac_try) 2>&5
12281   ac_status=$?
12282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12283   (exit $ac_status); }; }; then
12284   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12285 else
12286   echo "$as_me: failed program was:" >&5
12287 sed 's/^/| /' conftest.$ac_ext >&5
12288
12289 ac_cv_member_struct_sockaddr_storage___ss_len=no
12290 fi
12291 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12292 fi
12293 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12294 fi
12295 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12296 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12297 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12298
12299 cat >>confdefs.h <<_ACEOF
12300 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12301 _ACEOF
12302
12303
12304 fi
12305 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12306 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12307 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12308   echo $ECHO_N "(cached) $ECHO_C" >&6
12309 else
12310   cat >conftest.$ac_ext <<_ACEOF
12311 /* confdefs.h.  */
12312 _ACEOF
12313 cat confdefs.h >>conftest.$ac_ext
12314 cat >>conftest.$ac_ext <<_ACEOF
12315 /* end confdefs.h.  */
12316 #include <sys/types.h>
12317 #ifdef HAVE_SYS_SOCKET_H
12318 #include <sys/socket.h>
12319 #endif
12320
12321
12322 int
12323 main ()
12324 {
12325 static struct sockaddr ac_aggr;
12326 if (ac_aggr.sa_len)
12327 return 0;
12328   ;
12329   return 0;
12330 }
12331 _ACEOF
12332 rm -f conftest.$ac_objext
12333 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12334   (eval $ac_compile) 2>conftest.er1
12335   ac_status=$?
12336   grep -v '^ *+' conftest.er1 >conftest.err
12337   rm -f conftest.er1
12338   cat conftest.err >&5
12339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12340   (exit $ac_status); } &&
12341          { ac_try='test -z "$ac_c_werror_flag"
12342                          || test ! -s conftest.err'
12343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12344   (eval $ac_try) 2>&5
12345   ac_status=$?
12346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12347   (exit $ac_status); }; } &&
12348          { ac_try='test -s conftest.$ac_objext'
12349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12350   (eval $ac_try) 2>&5
12351   ac_status=$?
12352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12353   (exit $ac_status); }; }; then
12354   ac_cv_member_struct_sockaddr_sa_len=yes
12355 else
12356   echo "$as_me: failed program was:" >&5
12357 sed 's/^/| /' conftest.$ac_ext >&5
12358
12359 cat >conftest.$ac_ext <<_ACEOF
12360 /* confdefs.h.  */
12361 _ACEOF
12362 cat confdefs.h >>conftest.$ac_ext
12363 cat >>conftest.$ac_ext <<_ACEOF
12364 /* end confdefs.h.  */
12365 #include <sys/types.h>
12366 #ifdef HAVE_SYS_SOCKET_H
12367 #include <sys/socket.h>
12368 #endif
12369
12370
12371 int
12372 main ()
12373 {
12374 static struct sockaddr ac_aggr;
12375 if (sizeof ac_aggr.sa_len)
12376 return 0;
12377   ;
12378   return 0;
12379 }
12380 _ACEOF
12381 rm -f conftest.$ac_objext
12382 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12383   (eval $ac_compile) 2>conftest.er1
12384   ac_status=$?
12385   grep -v '^ *+' conftest.er1 >conftest.err
12386   rm -f conftest.er1
12387   cat conftest.err >&5
12388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389   (exit $ac_status); } &&
12390          { ac_try='test -z "$ac_c_werror_flag"
12391                          || test ! -s conftest.err'
12392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12393   (eval $ac_try) 2>&5
12394   ac_status=$?
12395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12396   (exit $ac_status); }; } &&
12397          { ac_try='test -s conftest.$ac_objext'
12398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12399   (eval $ac_try) 2>&5
12400   ac_status=$?
12401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12402   (exit $ac_status); }; }; then
12403   ac_cv_member_struct_sockaddr_sa_len=yes
12404 else
12405   echo "$as_me: failed program was:" >&5
12406 sed 's/^/| /' conftest.$ac_ext >&5
12407
12408 ac_cv_member_struct_sockaddr_sa_len=no
12409 fi
12410 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12411 fi
12412 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12413 fi
12414 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12415 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12416 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12417
12418 cat >>confdefs.h <<_ACEOF
12419 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12420 _ACEOF
12421
12422
12423 fi
12424
12425 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12426 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12427 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12428   echo $ECHO_N "(cached) $ECHO_C" >&6
12429 else
12430   cat >conftest.$ac_ext <<_ACEOF
12431 /* confdefs.h.  */
12432 _ACEOF
12433 cat confdefs.h >>conftest.$ac_ext
12434 cat >>conftest.$ac_ext <<_ACEOF
12435 /* end confdefs.h.  */
12436 #include <sys/types.h>
12437 #include <sys/socket.h>
12438 #include <netdb.h>
12439
12440
12441 int
12442 main ()
12443 {
12444 if ((struct addrinfo *) 0)
12445   return 0;
12446 if (sizeof (struct addrinfo))
12447   return 0;
12448   ;
12449   return 0;
12450 }
12451 _ACEOF
12452 rm -f conftest.$ac_objext
12453 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12454   (eval $ac_compile) 2>conftest.er1
12455   ac_status=$?
12456   grep -v '^ *+' conftest.er1 >conftest.err
12457   rm -f conftest.er1
12458   cat conftest.err >&5
12459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12460   (exit $ac_status); } &&
12461          { ac_try='test -z "$ac_c_werror_flag"
12462                          || test ! -s conftest.err'
12463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12464   (eval $ac_try) 2>&5
12465   ac_status=$?
12466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12467   (exit $ac_status); }; } &&
12468          { ac_try='test -s conftest.$ac_objext'
12469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12470   (eval $ac_try) 2>&5
12471   ac_status=$?
12472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12473   (exit $ac_status); }; }; then
12474   ac_cv_type_struct_addrinfo=yes
12475 else
12476   echo "$as_me: failed program was:" >&5
12477 sed 's/^/| /' conftest.$ac_ext >&5
12478
12479 ac_cv_type_struct_addrinfo=no
12480 fi
12481 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12482 fi
12483 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12484 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12485 if test $ac_cv_type_struct_addrinfo = yes; then
12486
12487 cat >>confdefs.h <<_ACEOF
12488 #define HAVE_STRUCT_ADDRINFO 1
12489 _ACEOF
12490
12491
12492 fi
12493
12494
12495 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12496 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12497 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12498   echo $ECHO_N "(cached) $ECHO_C" >&6
12499 else
12500   cat >conftest.$ac_ext <<_ACEOF
12501 /* confdefs.h.  */
12502 _ACEOF
12503 cat confdefs.h >>conftest.$ac_ext
12504 cat >>conftest.$ac_ext <<_ACEOF
12505 /* end confdefs.h.  */
12506 #include <sys/param.h>
12507 #include <sys/types.h>
12508 #include <sys/socket.h>
12509 #include <sys/ucred.h>
12510
12511 int
12512 main ()
12513 {
12514 if ((struct cmsgcred *) 0)
12515   return 0;
12516 if (sizeof (struct cmsgcred))
12517   return 0;
12518   ;
12519   return 0;
12520 }
12521 _ACEOF
12522 rm -f conftest.$ac_objext
12523 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12524   (eval $ac_compile) 2>conftest.er1
12525   ac_status=$?
12526   grep -v '^ *+' conftest.er1 >conftest.err
12527   rm -f conftest.er1
12528   cat conftest.err >&5
12529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12530   (exit $ac_status); } &&
12531          { ac_try='test -z "$ac_c_werror_flag"
12532                          || test ! -s conftest.err'
12533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12534   (eval $ac_try) 2>&5
12535   ac_status=$?
12536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12537   (exit $ac_status); }; } &&
12538          { ac_try='test -s conftest.$ac_objext'
12539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12540   (eval $ac_try) 2>&5
12541   ac_status=$?
12542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543   (exit $ac_status); }; }; then
12544   ac_cv_type_struct_cmsgcred=yes
12545 else
12546   echo "$as_me: failed program was:" >&5
12547 sed 's/^/| /' conftest.$ac_ext >&5
12548
12549 ac_cv_type_struct_cmsgcred=no
12550 fi
12551 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12552 fi
12553 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12554 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12555 if test $ac_cv_type_struct_cmsgcred = yes; then
12556
12557 cat >>confdefs.h <<_ACEOF
12558 #define HAVE_STRUCT_CMSGCRED 1
12559 _ACEOF
12560
12561
12562 fi
12563 echo "$as_me:$LINENO: checking for struct fcred" >&5
12564 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12565 if test "${ac_cv_type_struct_fcred+set}" = set; then
12566   echo $ECHO_N "(cached) $ECHO_C" >&6
12567 else
12568   cat >conftest.$ac_ext <<_ACEOF
12569 /* confdefs.h.  */
12570 _ACEOF
12571 cat confdefs.h >>conftest.$ac_ext
12572 cat >>conftest.$ac_ext <<_ACEOF
12573 /* end confdefs.h.  */
12574 #include <sys/param.h>
12575 #include <sys/types.h>
12576 #include <sys/socket.h>
12577 #include <sys/ucred.h>
12578
12579 int
12580 main ()
12581 {
12582 if ((struct fcred *) 0)
12583   return 0;
12584 if (sizeof (struct fcred))
12585   return 0;
12586   ;
12587   return 0;
12588 }
12589 _ACEOF
12590 rm -f conftest.$ac_objext
12591 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12592   (eval $ac_compile) 2>conftest.er1
12593   ac_status=$?
12594   grep -v '^ *+' conftest.er1 >conftest.err
12595   rm -f conftest.er1
12596   cat conftest.err >&5
12597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12598   (exit $ac_status); } &&
12599          { ac_try='test -z "$ac_c_werror_flag"
12600                          || test ! -s conftest.err'
12601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12602   (eval $ac_try) 2>&5
12603   ac_status=$?
12604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12605   (exit $ac_status); }; } &&
12606          { ac_try='test -s conftest.$ac_objext'
12607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12608   (eval $ac_try) 2>&5
12609   ac_status=$?
12610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12611   (exit $ac_status); }; }; then
12612   ac_cv_type_struct_fcred=yes
12613 else
12614   echo "$as_me: failed program was:" >&5
12615 sed 's/^/| /' conftest.$ac_ext >&5
12616
12617 ac_cv_type_struct_fcred=no
12618 fi
12619 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12620 fi
12621 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12622 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12623 if test $ac_cv_type_struct_fcred = yes; then
12624
12625 cat >>confdefs.h <<_ACEOF
12626 #define HAVE_STRUCT_FCRED 1
12627 _ACEOF
12628
12629
12630 fi
12631 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12632 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12633 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12634   echo $ECHO_N "(cached) $ECHO_C" >&6
12635 else
12636   cat >conftest.$ac_ext <<_ACEOF
12637 /* confdefs.h.  */
12638 _ACEOF
12639 cat confdefs.h >>conftest.$ac_ext
12640 cat >>conftest.$ac_ext <<_ACEOF
12641 /* end confdefs.h.  */
12642 #include <sys/param.h>
12643 #include <sys/types.h>
12644 #include <sys/socket.h>
12645 #include <sys/ucred.h>
12646
12647 int
12648 main ()
12649 {
12650 if ((struct sockcred *) 0)
12651   return 0;
12652 if (sizeof (struct sockcred))
12653   return 0;
12654   ;
12655   return 0;
12656 }
12657 _ACEOF
12658 rm -f conftest.$ac_objext
12659 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12660   (eval $ac_compile) 2>conftest.er1
12661   ac_status=$?
12662   grep -v '^ *+' conftest.er1 >conftest.err
12663   rm -f conftest.er1
12664   cat conftest.err >&5
12665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12666   (exit $ac_status); } &&
12667          { ac_try='test -z "$ac_c_werror_flag"
12668                          || test ! -s conftest.err'
12669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12670   (eval $ac_try) 2>&5
12671   ac_status=$?
12672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673   (exit $ac_status); }; } &&
12674          { ac_try='test -s conftest.$ac_objext'
12675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12676   (eval $ac_try) 2>&5
12677   ac_status=$?
12678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12679   (exit $ac_status); }; }; then
12680   ac_cv_type_struct_sockcred=yes
12681 else
12682   echo "$as_me: failed program was:" >&5
12683 sed 's/^/| /' conftest.$ac_ext >&5
12684
12685 ac_cv_type_struct_sockcred=no
12686 fi
12687 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12688 fi
12689 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12690 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12691 if test $ac_cv_type_struct_sockcred = yes; then
12692
12693 cat >>confdefs.h <<_ACEOF
12694 #define HAVE_STRUCT_SOCKCRED 1
12695 _ACEOF
12696
12697
12698 fi
12699
12700
12701 echo "$as_me:$LINENO: checking for struct option" >&5
12702 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12703 if test "${ac_cv_type_struct_option+set}" = set; then
12704   echo $ECHO_N "(cached) $ECHO_C" >&6
12705 else
12706   cat >conftest.$ac_ext <<_ACEOF
12707 /* confdefs.h.  */
12708 _ACEOF
12709 cat confdefs.h >>conftest.$ac_ext
12710 cat >>conftest.$ac_ext <<_ACEOF
12711 /* end confdefs.h.  */
12712 #ifdef HAVE_GETOPT_H
12713 #include <getopt.h>
12714 #endif
12715
12716 int
12717 main ()
12718 {
12719 if ((struct option *) 0)
12720   return 0;
12721 if (sizeof (struct option))
12722   return 0;
12723   ;
12724   return 0;
12725 }
12726 _ACEOF
12727 rm -f conftest.$ac_objext
12728 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12729   (eval $ac_compile) 2>conftest.er1
12730   ac_status=$?
12731   grep -v '^ *+' conftest.er1 >conftest.err
12732   rm -f conftest.er1
12733   cat conftest.err >&5
12734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12735   (exit $ac_status); } &&
12736          { ac_try='test -z "$ac_c_werror_flag"
12737                          || test ! -s conftest.err'
12738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12739   (eval $ac_try) 2>&5
12740   ac_status=$?
12741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12742   (exit $ac_status); }; } &&
12743          { ac_try='test -s conftest.$ac_objext'
12744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12745   (eval $ac_try) 2>&5
12746   ac_status=$?
12747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12748   (exit $ac_status); }; }; then
12749   ac_cv_type_struct_option=yes
12750 else
12751   echo "$as_me: failed program was:" >&5
12752 sed 's/^/| /' conftest.$ac_ext >&5
12753
12754 ac_cv_type_struct_option=no
12755 fi
12756 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12757 fi
12758 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12759 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12760 if test $ac_cv_type_struct_option = yes; then
12761
12762 cat >>confdefs.h <<_ACEOF
12763 #define HAVE_STRUCT_OPTION 1
12764 _ACEOF
12765
12766
12767 fi
12768
12769
12770 if test "$with_zlib" = yes; then
12771   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12772   # did not).  While we could work around the lack of z_streamp, it
12773   # seems unwise to encourage people to use such old zlib versions...
12774   echo "$as_me:$LINENO: checking for z_streamp" >&5
12775 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12776 if test "${ac_cv_type_z_streamp+set}" = set; then
12777   echo $ECHO_N "(cached) $ECHO_C" >&6
12778 else
12779   cat >conftest.$ac_ext <<_ACEOF
12780 /* confdefs.h.  */
12781 _ACEOF
12782 cat confdefs.h >>conftest.$ac_ext
12783 cat >>conftest.$ac_ext <<_ACEOF
12784 /* end confdefs.h.  */
12785 #include <zlib.h>
12786
12787 int
12788 main ()
12789 {
12790 if ((z_streamp *) 0)
12791   return 0;
12792 if (sizeof (z_streamp))
12793   return 0;
12794   ;
12795   return 0;
12796 }
12797 _ACEOF
12798 rm -f conftest.$ac_objext
12799 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12800   (eval $ac_compile) 2>conftest.er1
12801   ac_status=$?
12802   grep -v '^ *+' conftest.er1 >conftest.err
12803   rm -f conftest.er1
12804   cat conftest.err >&5
12805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12806   (exit $ac_status); } &&
12807          { ac_try='test -z "$ac_c_werror_flag"
12808                          || test ! -s conftest.err'
12809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12810   (eval $ac_try) 2>&5
12811   ac_status=$?
12812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12813   (exit $ac_status); }; } &&
12814          { ac_try='test -s conftest.$ac_objext'
12815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12816   (eval $ac_try) 2>&5
12817   ac_status=$?
12818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12819   (exit $ac_status); }; }; then
12820   ac_cv_type_z_streamp=yes
12821 else
12822   echo "$as_me: failed program was:" >&5
12823 sed 's/^/| /' conftest.$ac_ext >&5
12824
12825 ac_cv_type_z_streamp=no
12826 fi
12827 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12828 fi
12829 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12830 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12831 if test $ac_cv_type_z_streamp = yes; then
12832   :
12833 else
12834   { { echo "$as_me:$LINENO: error: zlib version is too old
12835 Use --without-zlib to disable zlib support." >&5
12836 echo "$as_me: error: zlib version is too old
12837 Use --without-zlib to disable zlib support." >&2;}
12838    { (exit 1); exit 1; }; }
12839 fi
12840
12841 fi
12842
12843 if test "$with_krb5" = yes; then
12844 # Check for differences between MIT and Heimdal (KTH) releases
12845   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12846 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12847 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12848   echo $ECHO_N "(cached) $ECHO_C" >&6
12849 else
12850   cat >conftest.$ac_ext <<_ACEOF
12851 /* confdefs.h.  */
12852 _ACEOF
12853 cat confdefs.h >>conftest.$ac_ext
12854 cat >>conftest.$ac_ext <<_ACEOF
12855 /* end confdefs.h.  */
12856 #include <krb5.h>
12857
12858 int
12859 main ()
12860 {
12861 static krb5_ticket ac_aggr;
12862 if (ac_aggr.enc_part2)
12863 return 0;
12864   ;
12865   return 0;
12866 }
12867 _ACEOF
12868 rm -f conftest.$ac_objext
12869 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12870   (eval $ac_compile) 2>conftest.er1
12871   ac_status=$?
12872   grep -v '^ *+' conftest.er1 >conftest.err
12873   rm -f conftest.er1
12874   cat conftest.err >&5
12875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12876   (exit $ac_status); } &&
12877          { ac_try='test -z "$ac_c_werror_flag"
12878                          || test ! -s conftest.err'
12879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12880   (eval $ac_try) 2>&5
12881   ac_status=$?
12882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12883   (exit $ac_status); }; } &&
12884          { ac_try='test -s conftest.$ac_objext'
12885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12886   (eval $ac_try) 2>&5
12887   ac_status=$?
12888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889   (exit $ac_status); }; }; then
12890   ac_cv_member_krb5_ticket_enc_part2=yes
12891 else
12892   echo "$as_me: failed program was:" >&5
12893 sed 's/^/| /' conftest.$ac_ext >&5
12894
12895 cat >conftest.$ac_ext <<_ACEOF
12896 /* confdefs.h.  */
12897 _ACEOF
12898 cat confdefs.h >>conftest.$ac_ext
12899 cat >>conftest.$ac_ext <<_ACEOF
12900 /* end confdefs.h.  */
12901 #include <krb5.h>
12902
12903 int
12904 main ()
12905 {
12906 static krb5_ticket ac_aggr;
12907 if (sizeof ac_aggr.enc_part2)
12908 return 0;
12909   ;
12910   return 0;
12911 }
12912 _ACEOF
12913 rm -f conftest.$ac_objext
12914 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12915   (eval $ac_compile) 2>conftest.er1
12916   ac_status=$?
12917   grep -v '^ *+' conftest.er1 >conftest.err
12918   rm -f conftest.er1
12919   cat conftest.err >&5
12920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12921   (exit $ac_status); } &&
12922          { ac_try='test -z "$ac_c_werror_flag"
12923                          || test ! -s conftest.err'
12924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12925   (eval $ac_try) 2>&5
12926   ac_status=$?
12927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928   (exit $ac_status); }; } &&
12929          { ac_try='test -s conftest.$ac_objext'
12930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12931   (eval $ac_try) 2>&5
12932   ac_status=$?
12933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12934   (exit $ac_status); }; }; then
12935   ac_cv_member_krb5_ticket_enc_part2=yes
12936 else
12937   echo "$as_me: failed program was:" >&5
12938 sed 's/^/| /' conftest.$ac_ext >&5
12939
12940 ac_cv_member_krb5_ticket_enc_part2=no
12941 fi
12942 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12943 fi
12944 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12945 fi
12946 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12947 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12948 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12949
12950 cat >>confdefs.h <<_ACEOF
12951 #define HAVE_KRB5_TICKET_ENC_PART2 1
12952 _ACEOF
12953
12954
12955 else
12956   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12957 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12958 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12959   echo $ECHO_N "(cached) $ECHO_C" >&6
12960 else
12961   cat >conftest.$ac_ext <<_ACEOF
12962 /* confdefs.h.  */
12963 _ACEOF
12964 cat confdefs.h >>conftest.$ac_ext
12965 cat >>conftest.$ac_ext <<_ACEOF
12966 /* end confdefs.h.  */
12967 #include <krb5.h>
12968
12969 int
12970 main ()
12971 {
12972 static krb5_ticket ac_aggr;
12973 if (ac_aggr.client)
12974 return 0;
12975   ;
12976   return 0;
12977 }
12978 _ACEOF
12979 rm -f conftest.$ac_objext
12980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12981   (eval $ac_compile) 2>conftest.er1
12982   ac_status=$?
12983   grep -v '^ *+' conftest.er1 >conftest.err
12984   rm -f conftest.er1
12985   cat conftest.err >&5
12986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12987   (exit $ac_status); } &&
12988          { ac_try='test -z "$ac_c_werror_flag"
12989                          || test ! -s conftest.err'
12990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12991   (eval $ac_try) 2>&5
12992   ac_status=$?
12993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994   (exit $ac_status); }; } &&
12995          { ac_try='test -s conftest.$ac_objext'
12996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12997   (eval $ac_try) 2>&5
12998   ac_status=$?
12999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13000   (exit $ac_status); }; }; then
13001   ac_cv_member_krb5_ticket_client=yes
13002 else
13003   echo "$as_me: failed program was:" >&5
13004 sed 's/^/| /' conftest.$ac_ext >&5
13005
13006 cat >conftest.$ac_ext <<_ACEOF
13007 /* confdefs.h.  */
13008 _ACEOF
13009 cat confdefs.h >>conftest.$ac_ext
13010 cat >>conftest.$ac_ext <<_ACEOF
13011 /* end confdefs.h.  */
13012 #include <krb5.h>
13013
13014 int
13015 main ()
13016 {
13017 static krb5_ticket ac_aggr;
13018 if (sizeof ac_aggr.client)
13019 return 0;
13020   ;
13021   return 0;
13022 }
13023 _ACEOF
13024 rm -f conftest.$ac_objext
13025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13026   (eval $ac_compile) 2>conftest.er1
13027   ac_status=$?
13028   grep -v '^ *+' conftest.er1 >conftest.err
13029   rm -f conftest.er1
13030   cat conftest.err >&5
13031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13032   (exit $ac_status); } &&
13033          { ac_try='test -z "$ac_c_werror_flag"
13034                          || test ! -s conftest.err'
13035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13036   (eval $ac_try) 2>&5
13037   ac_status=$?
13038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13039   (exit $ac_status); }; } &&
13040          { ac_try='test -s conftest.$ac_objext'
13041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13042   (eval $ac_try) 2>&5
13043   ac_status=$?
13044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13045   (exit $ac_status); }; }; then
13046   ac_cv_member_krb5_ticket_client=yes
13047 else
13048   echo "$as_me: failed program was:" >&5
13049 sed 's/^/| /' conftest.$ac_ext >&5
13050
13051 ac_cv_member_krb5_ticket_client=no
13052 fi
13053 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13054 fi
13055 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13056 fi
13057 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13058 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13059 if test $ac_cv_member_krb5_ticket_client = yes; then
13060
13061 cat >>confdefs.h <<_ACEOF
13062 #define HAVE_KRB5_TICKET_CLIENT 1
13063 _ACEOF
13064
13065
13066 else
13067   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13068 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13069    { (exit 1); exit 1; }; }
13070 fi
13071
13072 fi
13073
13074   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13075 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13076 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13077   echo $ECHO_N "(cached) $ECHO_C" >&6
13078 else
13079   cat >conftest.$ac_ext <<_ACEOF
13080 /* confdefs.h.  */
13081 _ACEOF
13082 cat confdefs.h >>conftest.$ac_ext
13083 cat >>conftest.$ac_ext <<_ACEOF
13084 /* end confdefs.h.  */
13085 #include <krb5.h>
13086
13087 int
13088 main ()
13089 {
13090 static krb5_error ac_aggr;
13091 if (ac_aggr.text.data)
13092 return 0;
13093   ;
13094   return 0;
13095 }
13096 _ACEOF
13097 rm -f conftest.$ac_objext
13098 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13099   (eval $ac_compile) 2>conftest.er1
13100   ac_status=$?
13101   grep -v '^ *+' conftest.er1 >conftest.err
13102   rm -f conftest.er1
13103   cat conftest.err >&5
13104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13105   (exit $ac_status); } &&
13106          { ac_try='test -z "$ac_c_werror_flag"
13107                          || test ! -s conftest.err'
13108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13109   (eval $ac_try) 2>&5
13110   ac_status=$?
13111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112   (exit $ac_status); }; } &&
13113          { ac_try='test -s conftest.$ac_objext'
13114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13115   (eval $ac_try) 2>&5
13116   ac_status=$?
13117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13118   (exit $ac_status); }; }; then
13119   ac_cv_member_krb5_error_text_data=yes
13120 else
13121   echo "$as_me: failed program was:" >&5
13122 sed 's/^/| /' conftest.$ac_ext >&5
13123
13124 cat >conftest.$ac_ext <<_ACEOF
13125 /* confdefs.h.  */
13126 _ACEOF
13127 cat confdefs.h >>conftest.$ac_ext
13128 cat >>conftest.$ac_ext <<_ACEOF
13129 /* end confdefs.h.  */
13130 #include <krb5.h>
13131
13132 int
13133 main ()
13134 {
13135 static krb5_error ac_aggr;
13136 if (sizeof ac_aggr.text.data)
13137 return 0;
13138   ;
13139   return 0;
13140 }
13141 _ACEOF
13142 rm -f conftest.$ac_objext
13143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13144   (eval $ac_compile) 2>conftest.er1
13145   ac_status=$?
13146   grep -v '^ *+' conftest.er1 >conftest.err
13147   rm -f conftest.er1
13148   cat conftest.err >&5
13149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13150   (exit $ac_status); } &&
13151          { ac_try='test -z "$ac_c_werror_flag"
13152                          || test ! -s conftest.err'
13153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13154   (eval $ac_try) 2>&5
13155   ac_status=$?
13156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13157   (exit $ac_status); }; } &&
13158          { ac_try='test -s conftest.$ac_objext'
13159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13160   (eval $ac_try) 2>&5
13161   ac_status=$?
13162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13163   (exit $ac_status); }; }; then
13164   ac_cv_member_krb5_error_text_data=yes
13165 else
13166   echo "$as_me: failed program was:" >&5
13167 sed 's/^/| /' conftest.$ac_ext >&5
13168
13169 ac_cv_member_krb5_error_text_data=no
13170 fi
13171 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13172 fi
13173 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13174 fi
13175 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13176 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13177 if test $ac_cv_member_krb5_error_text_data = yes; then
13178
13179 cat >>confdefs.h <<_ACEOF
13180 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13181 _ACEOF
13182
13183
13184 else
13185   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13186 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13187 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13188   echo $ECHO_N "(cached) $ECHO_C" >&6
13189 else
13190   cat >conftest.$ac_ext <<_ACEOF
13191 /* confdefs.h.  */
13192 _ACEOF
13193 cat confdefs.h >>conftest.$ac_ext
13194 cat >>conftest.$ac_ext <<_ACEOF
13195 /* end confdefs.h.  */
13196 #include <krb5.h>
13197
13198 int
13199 main ()
13200 {
13201 static krb5_error ac_aggr;
13202 if (ac_aggr.e_data)
13203 return 0;
13204   ;
13205   return 0;
13206 }
13207 _ACEOF
13208 rm -f conftest.$ac_objext
13209 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13210   (eval $ac_compile) 2>conftest.er1
13211   ac_status=$?
13212   grep -v '^ *+' conftest.er1 >conftest.err
13213   rm -f conftest.er1
13214   cat conftest.err >&5
13215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216   (exit $ac_status); } &&
13217          { ac_try='test -z "$ac_c_werror_flag"
13218                          || test ! -s conftest.err'
13219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13220   (eval $ac_try) 2>&5
13221   ac_status=$?
13222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223   (exit $ac_status); }; } &&
13224          { ac_try='test -s conftest.$ac_objext'
13225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13226   (eval $ac_try) 2>&5
13227   ac_status=$?
13228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13229   (exit $ac_status); }; }; then
13230   ac_cv_member_krb5_error_e_data=yes
13231 else
13232   echo "$as_me: failed program was:" >&5
13233 sed 's/^/| /' conftest.$ac_ext >&5
13234
13235 cat >conftest.$ac_ext <<_ACEOF
13236 /* confdefs.h.  */
13237 _ACEOF
13238 cat confdefs.h >>conftest.$ac_ext
13239 cat >>conftest.$ac_ext <<_ACEOF
13240 /* end confdefs.h.  */
13241 #include <krb5.h>
13242
13243 int
13244 main ()
13245 {
13246 static krb5_error ac_aggr;
13247 if (sizeof ac_aggr.e_data)
13248 return 0;
13249   ;
13250   return 0;
13251 }
13252 _ACEOF
13253 rm -f conftest.$ac_objext
13254 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13255   (eval $ac_compile) 2>conftest.er1
13256   ac_status=$?
13257   grep -v '^ *+' conftest.er1 >conftest.err
13258   rm -f conftest.er1
13259   cat conftest.err >&5
13260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13261   (exit $ac_status); } &&
13262          { ac_try='test -z "$ac_c_werror_flag"
13263                          || test ! -s conftest.err'
13264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13265   (eval $ac_try) 2>&5
13266   ac_status=$?
13267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13268   (exit $ac_status); }; } &&
13269          { ac_try='test -s conftest.$ac_objext'
13270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13271   (eval $ac_try) 2>&5
13272   ac_status=$?
13273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274   (exit $ac_status); }; }; then
13275   ac_cv_member_krb5_error_e_data=yes
13276 else
13277   echo "$as_me: failed program was:" >&5
13278 sed 's/^/| /' conftest.$ac_ext >&5
13279
13280 ac_cv_member_krb5_error_e_data=no
13281 fi
13282 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13283 fi
13284 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13285 fi
13286 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13287 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13288 if test $ac_cv_member_krb5_error_e_data = yes; then
13289
13290 cat >>confdefs.h <<_ACEOF
13291 #define HAVE_KRB5_ERROR_E_DATA 1
13292 _ACEOF
13293
13294
13295 else
13296   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13297 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13298    { (exit 1); exit 1; }; }
13299 fi
13300
13301 fi
13302
13303 fi
13304
13305 ##
13306 ## Functions, global variables
13307 ##
13308
13309 echo "$as_me:$LINENO: checking for int timezone" >&5
13310 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13311 if test "${pgac_cv_var_int_timezone+set}" = set; then
13312   echo $ECHO_N "(cached) $ECHO_C" >&6
13313 else
13314   cat >conftest.$ac_ext <<_ACEOF
13315 /* confdefs.h.  */
13316 _ACEOF
13317 cat confdefs.h >>conftest.$ac_ext
13318 cat >>conftest.$ac_ext <<_ACEOF
13319 /* end confdefs.h.  */
13320 #include <time.h>
13321 int res;
13322 int
13323 main ()
13324 {
13325 #ifndef __CYGWIN__
13326 res = timezone / 60;
13327 #else
13328 res = _timezone / 60;
13329 #endif
13330   ;
13331   return 0;
13332 }
13333 _ACEOF
13334 rm -f conftest.$ac_objext conftest$ac_exeext
13335 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13336   (eval $ac_link) 2>conftest.er1
13337   ac_status=$?
13338   grep -v '^ *+' conftest.er1 >conftest.err
13339   rm -f conftest.er1
13340   cat conftest.err >&5
13341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13342   (exit $ac_status); } &&
13343          { ac_try='test -z "$ac_c_werror_flag"
13344                          || test ! -s conftest.err'
13345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13346   (eval $ac_try) 2>&5
13347   ac_status=$?
13348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13349   (exit $ac_status); }; } &&
13350          { ac_try='test -s conftest$ac_exeext'
13351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13352   (eval $ac_try) 2>&5
13353   ac_status=$?
13354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13355   (exit $ac_status); }; }; then
13356   pgac_cv_var_int_timezone=yes
13357 else
13358   echo "$as_me: failed program was:" >&5
13359 sed 's/^/| /' conftest.$ac_ext >&5
13360
13361 pgac_cv_var_int_timezone=no
13362 fi
13363 rm -f conftest.err conftest.$ac_objext \
13364       conftest$ac_exeext conftest.$ac_ext
13365 fi
13366 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13367 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13368 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13369
13370 cat >>confdefs.h <<\_ACEOF
13371 #define HAVE_INT_TIMEZONE
13372 _ACEOF
13373
13374 fi
13375 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13376 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13377  if test "${ac_cv_func_accept_return+set}" = set; then
13378   echo $ECHO_N "(cached) $ECHO_C" >&6
13379 else
13380    if test "${ac_cv_func_accept_arg1+set}" = set; then
13381   echo $ECHO_N "(cached) $ECHO_C" >&6
13382 else
13383     if test "${ac_cv_func_accept_arg2+set}" = set; then
13384   echo $ECHO_N "(cached) $ECHO_C" >&6
13385 else
13386      if test "${ac_cv_func_accept_arg3+set}" = set; then
13387   echo $ECHO_N "(cached) $ECHO_C" >&6
13388 else
13389       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13390       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13391        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13392         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13393          cat >conftest.$ac_ext <<_ACEOF
13394 /* confdefs.h.  */
13395 _ACEOF
13396 cat confdefs.h >>conftest.$ac_ext
13397 cat >>conftest.$ac_ext <<_ACEOF
13398 /* end confdefs.h.  */
13399 #ifdef HAVE_SYS_TYPES_H
13400 #include <sys/types.h>
13401 #endif
13402 #ifdef HAVE_SYS_SOCKET_H
13403 #include <sys/socket.h>
13404 #endif
13405 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13406 int
13407 main ()
13408 {
13409
13410   ;
13411   return 0;
13412 }
13413 _ACEOF
13414 rm -f conftest.$ac_objext
13415 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13416   (eval $ac_compile) 2>conftest.er1
13417   ac_status=$?
13418   grep -v '^ *+' conftest.er1 >conftest.err
13419   rm -f conftest.er1
13420   cat conftest.err >&5
13421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13422   (exit $ac_status); } &&
13423          { ac_try='test -z "$ac_c_werror_flag"
13424                          || test ! -s conftest.err'
13425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13426   (eval $ac_try) 2>&5
13427   ac_status=$?
13428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13429   (exit $ac_status); }; } &&
13430          { ac_try='test -s conftest.$ac_objext'
13431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13432   (eval $ac_try) 2>&5
13433   ac_status=$?
13434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435   (exit $ac_status); }; }; then
13436   ac_not_found=no; break 4
13437 else
13438   echo "$as_me: failed program was:" >&5
13439 sed 's/^/| /' conftest.$ac_ext >&5
13440
13441 ac_not_found=yes
13442 fi
13443 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13444        done
13445       done
13446      done
13447     done
13448     if test "$ac_not_found" = yes; then
13449       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13450 echo "$as_me: error: could not determine argument types" >&2;}
13451    { (exit 1); exit 1; }; }
13452     fi
13453     if test "$ac_cv_func_accept_arg3" = "void"; then
13454       ac_cv_func_accept_arg3=int
13455     fi
13456
13457 fi
13458
13459 fi
13460
13461 fi
13462
13463 fi
13464  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
13465 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13466
13467 cat >>confdefs.h <<_ACEOF
13468 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13469 _ACEOF
13470
13471
13472 cat >>confdefs.h <<_ACEOF
13473 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13474 _ACEOF
13475
13476
13477 cat >>confdefs.h <<_ACEOF
13478 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13479 _ACEOF
13480
13481
13482 cat >>confdefs.h <<_ACEOF
13483 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13484 _ACEOF
13485
13486
13487 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13488 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13489 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13490   echo $ECHO_N "(cached) $ECHO_C" >&6
13491 else
13492   cat >conftest.$ac_ext <<_ACEOF
13493 /* confdefs.h.  */
13494 _ACEOF
13495 cat confdefs.h >>conftest.$ac_ext
13496 cat >>conftest.$ac_ext <<_ACEOF
13497 /* end confdefs.h.  */
13498 #include <sys/time.h>
13499 int
13500 main ()
13501 {
13502 struct timeval *tp;
13503 struct timezone *tzp;
13504 gettimeofday(tp,tzp);
13505   ;
13506   return 0;
13507 }
13508 _ACEOF
13509 rm -f conftest.$ac_objext
13510 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13511   (eval $ac_compile) 2>conftest.er1
13512   ac_status=$?
13513   grep -v '^ *+' conftest.er1 >conftest.err
13514   rm -f conftest.er1
13515   cat conftest.err >&5
13516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13517   (exit $ac_status); } &&
13518          { ac_try='test -z "$ac_c_werror_flag"
13519                          || test ! -s conftest.err'
13520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13521   (eval $ac_try) 2>&5
13522   ac_status=$?
13523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13524   (exit $ac_status); }; } &&
13525          { ac_try='test -s conftest.$ac_objext'
13526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13527   (eval $ac_try) 2>&5
13528   ac_status=$?
13529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530   (exit $ac_status); }; }; then
13531   pgac_cv_func_gettimeofday_1arg=no
13532 else
13533   echo "$as_me: failed program was:" >&5
13534 sed 's/^/| /' conftest.$ac_ext >&5
13535
13536 pgac_cv_func_gettimeofday_1arg=yes
13537 fi
13538 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13539 fi
13540 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13541 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13542 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13543
13544 cat >>confdefs.h <<\_ACEOF
13545 #define GETTIMEOFDAY_1ARG
13546 _ACEOF
13547
13548 fi
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13572 do
13573 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13574 echo "$as_me:$LINENO: checking for $ac_func" >&5
13575 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13576 if eval "test \"\${$as_ac_var+set}\" = set"; then
13577   echo $ECHO_N "(cached) $ECHO_C" >&6
13578 else
13579   cat >conftest.$ac_ext <<_ACEOF
13580 /* confdefs.h.  */
13581 _ACEOF
13582 cat confdefs.h >>conftest.$ac_ext
13583 cat >>conftest.$ac_ext <<_ACEOF
13584 /* end confdefs.h.  */
13585 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13586    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13587 #define $ac_func innocuous_$ac_func
13588
13589 /* System header to define __stub macros and hopefully few prototypes,
13590     which can conflict with char $ac_func (); below.
13591     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13592     <limits.h> exists even on freestanding compilers.  */
13593
13594 #ifdef __STDC__
13595 # include <limits.h>
13596 #else
13597 # include <assert.h>
13598 #endif
13599
13600 #undef $ac_func
13601
13602 /* Override any gcc2 internal prototype to avoid an error.  */
13603 #ifdef __cplusplus
13604 extern "C"
13605 {
13606 #endif
13607 /* We use char because int might match the return type of a gcc2
13608    builtin and then its argument prototype would still apply.  */
13609 char $ac_func ();
13610 /* The GNU C library defines this for functions which it implements
13611     to always fail with ENOSYS.  Some functions are actually named
13612     something starting with __ and the normal name is an alias.  */
13613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13614 choke me
13615 #else
13616 char (*f) () = $ac_func;
13617 #endif
13618 #ifdef __cplusplus
13619 }
13620 #endif
13621
13622 int
13623 main ()
13624 {
13625 return f != $ac_func;
13626   ;
13627   return 0;
13628 }
13629 _ACEOF
13630 rm -f conftest.$ac_objext conftest$ac_exeext
13631 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13632   (eval $ac_link) 2>conftest.er1
13633   ac_status=$?
13634   grep -v '^ *+' conftest.er1 >conftest.err
13635   rm -f conftest.er1
13636   cat conftest.err >&5
13637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13638   (exit $ac_status); } &&
13639          { ac_try='test -z "$ac_c_werror_flag"
13640                          || test ! -s conftest.err'
13641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13642   (eval $ac_try) 2>&5
13643   ac_status=$?
13644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645   (exit $ac_status); }; } &&
13646          { ac_try='test -s conftest$ac_exeext'
13647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13648   (eval $ac_try) 2>&5
13649   ac_status=$?
13650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13651   (exit $ac_status); }; }; then
13652   eval "$as_ac_var=yes"
13653 else
13654   echo "$as_me: failed program was:" >&5
13655 sed 's/^/| /' conftest.$ac_ext >&5
13656
13657 eval "$as_ac_var=no"
13658 fi
13659 rm -f conftest.err conftest.$ac_objext \
13660       conftest$ac_exeext conftest.$ac_ext
13661 fi
13662 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13663 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13664 if test `eval echo '${'$as_ac_var'}'` = yes; then
13665   cat >>confdefs.h <<_ACEOF
13666 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13667 _ACEOF
13668
13669 fi
13670 done
13671
13672
13673 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13674 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13675 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13676   echo $ECHO_N "(cached) $ECHO_C" >&6
13677 else
13678   cat >conftest.$ac_ext <<_ACEOF
13679 /* confdefs.h.  */
13680 _ACEOF
13681 cat confdefs.h >>conftest.$ac_ext
13682 cat >>conftest.$ac_ext <<_ACEOF
13683 /* end confdefs.h.  */
13684 #include <unistd.h>
13685
13686 int
13687 main ()
13688 {
13689 #ifndef fdatasync
13690   char *p = (char *) fdatasync;
13691 #endif
13692
13693   ;
13694   return 0;
13695 }
13696 _ACEOF
13697 rm -f conftest.$ac_objext
13698 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13699   (eval $ac_compile) 2>conftest.er1
13700   ac_status=$?
13701   grep -v '^ *+' conftest.er1 >conftest.err
13702   rm -f conftest.er1
13703   cat conftest.err >&5
13704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705   (exit $ac_status); } &&
13706          { ac_try='test -z "$ac_c_werror_flag"
13707                          || test ! -s conftest.err'
13708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13709   (eval $ac_try) 2>&5
13710   ac_status=$?
13711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13712   (exit $ac_status); }; } &&
13713          { ac_try='test -s conftest.$ac_objext'
13714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13715   (eval $ac_try) 2>&5
13716   ac_status=$?
13717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718   (exit $ac_status); }; }; then
13719   ac_cv_have_decl_fdatasync=yes
13720 else
13721   echo "$as_me: failed program was:" >&5
13722 sed 's/^/| /' conftest.$ac_ext >&5
13723
13724 ac_cv_have_decl_fdatasync=no
13725 fi
13726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13727 fi
13728 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13729 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13730 if test $ac_cv_have_decl_fdatasync = yes; then
13731
13732 cat >>confdefs.h <<_ACEOF
13733 #define HAVE_DECL_FDATASYNC 1
13734 _ACEOF
13735
13736
13737 else
13738   cat >>confdefs.h <<_ACEOF
13739 #define HAVE_DECL_FDATASYNC 0
13740 _ACEOF
13741
13742
13743 fi
13744
13745
13746
13747 HAVE_IPV6=no
13748 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13749 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13750 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13751   echo $ECHO_N "(cached) $ECHO_C" >&6
13752 else
13753   cat >conftest.$ac_ext <<_ACEOF
13754 /* confdefs.h.  */
13755 _ACEOF
13756 cat confdefs.h >>conftest.$ac_ext
13757 cat >>conftest.$ac_ext <<_ACEOF
13758 /* end confdefs.h.  */
13759 $ac_includes_default
13760 #include <netinet/in.h>
13761
13762 int
13763 main ()
13764 {
13765 if ((struct sockaddr_in6 *) 0)
13766   return 0;
13767 if (sizeof (struct sockaddr_in6))
13768   return 0;
13769   ;
13770   return 0;
13771 }
13772 _ACEOF
13773 rm -f conftest.$ac_objext
13774 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13775   (eval $ac_compile) 2>conftest.er1
13776   ac_status=$?
13777   grep -v '^ *+' conftest.er1 >conftest.err
13778   rm -f conftest.er1
13779   cat conftest.err >&5
13780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13781   (exit $ac_status); } &&
13782          { ac_try='test -z "$ac_c_werror_flag"
13783                          || test ! -s conftest.err'
13784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13785   (eval $ac_try) 2>&5
13786   ac_status=$?
13787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13788   (exit $ac_status); }; } &&
13789          { ac_try='test -s conftest.$ac_objext'
13790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13791   (eval $ac_try) 2>&5
13792   ac_status=$?
13793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13794   (exit $ac_status); }; }; then
13795   ac_cv_type_struct_sockaddr_in6=yes
13796 else
13797   echo "$as_me: failed program was:" >&5
13798 sed 's/^/| /' conftest.$ac_ext >&5
13799
13800 ac_cv_type_struct_sockaddr_in6=no
13801 fi
13802 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13803 fi
13804 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13805 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13806 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13807
13808 cat >>confdefs.h <<\_ACEOF
13809 #define HAVE_IPV6 1
13810 _ACEOF
13811
13812          HAVE_IPV6=yes
13813 fi
13814
13815
13816
13817 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13818 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13819 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13820   echo $ECHO_N "(cached) $ECHO_C" >&6
13821 else
13822   cat >conftest.$ac_ext <<_ACEOF
13823 /* confdefs.h.  */
13824 _ACEOF
13825 cat confdefs.h >>conftest.$ac_ext
13826 cat >>conftest.$ac_ext <<_ACEOF
13827 /* end confdefs.h.  */
13828 #include <machine/vmparam.h>
13829 #include <sys/exec.h>
13830
13831 int
13832 main ()
13833 {
13834 PS_STRINGS->ps_nargvstr = 1;
13835 PS_STRINGS->ps_argvstr = "foo";
13836   ;
13837   return 0;
13838 }
13839 _ACEOF
13840 rm -f conftest.$ac_objext conftest$ac_exeext
13841 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13842   (eval $ac_link) 2>conftest.er1
13843   ac_status=$?
13844   grep -v '^ *+' conftest.er1 >conftest.err
13845   rm -f conftest.er1
13846   cat conftest.err >&5
13847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13848   (exit $ac_status); } &&
13849          { ac_try='test -z "$ac_c_werror_flag"
13850                          || test ! -s conftest.err'
13851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13852   (eval $ac_try) 2>&5
13853   ac_status=$?
13854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13855   (exit $ac_status); }; } &&
13856          { ac_try='test -s conftest$ac_exeext'
13857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13858   (eval $ac_try) 2>&5
13859   ac_status=$?
13860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13861   (exit $ac_status); }; }; then
13862   pgac_cv_var_PS_STRINGS=yes
13863 else
13864   echo "$as_me: failed program was:" >&5
13865 sed 's/^/| /' conftest.$ac_ext >&5
13866
13867 pgac_cv_var_PS_STRINGS=no
13868 fi
13869 rm -f conftest.err conftest.$ac_objext \
13870       conftest$ac_exeext conftest.$ac_ext
13871 fi
13872 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13873 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13874 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13875
13876 cat >>confdefs.h <<\_ACEOF
13877 #define HAVE_PS_STRINGS
13878 _ACEOF
13879
13880 fi
13881
13882
13883 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13884 # is missing.  Yes, there are machines that have only one.  We may
13885 # also decide to use snprintf.c if snprintf() is present but does not
13886 # have all the features we need --- see below.
13887
13888 pgac_need_repl_snprintf=no
13889
13890 for ac_func in snprintf
13891 do
13892 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13893 echo "$as_me:$LINENO: checking for $ac_func" >&5
13894 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13895 if eval "test \"\${$as_ac_var+set}\" = set"; then
13896   echo $ECHO_N "(cached) $ECHO_C" >&6
13897 else
13898   cat >conftest.$ac_ext <<_ACEOF
13899 /* confdefs.h.  */
13900 _ACEOF
13901 cat confdefs.h >>conftest.$ac_ext
13902 cat >>conftest.$ac_ext <<_ACEOF
13903 /* end confdefs.h.  */
13904 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13905    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13906 #define $ac_func innocuous_$ac_func
13907
13908 /* System header to define __stub macros and hopefully few prototypes,
13909     which can conflict with char $ac_func (); below.
13910     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13911     <limits.h> exists even on freestanding compilers.  */
13912
13913 #ifdef __STDC__
13914 # include <limits.h>
13915 #else
13916 # include <assert.h>
13917 #endif
13918
13919 #undef $ac_func
13920
13921 /* Override any gcc2 internal prototype to avoid an error.  */
13922 #ifdef __cplusplus
13923 extern "C"
13924 {
13925 #endif
13926 /* We use char because int might match the return type of a gcc2
13927    builtin and then its argument prototype would still apply.  */
13928 char $ac_func ();
13929 /* The GNU C library defines this for functions which it implements
13930     to always fail with ENOSYS.  Some functions are actually named
13931     something starting with __ and the normal name is an alias.  */
13932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13933 choke me
13934 #else
13935 char (*f) () = $ac_func;
13936 #endif
13937 #ifdef __cplusplus
13938 }
13939 #endif
13940
13941 int
13942 main ()
13943 {
13944 return f != $ac_func;
13945   ;
13946   return 0;
13947 }
13948 _ACEOF
13949 rm -f conftest.$ac_objext conftest$ac_exeext
13950 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13951   (eval $ac_link) 2>conftest.er1
13952   ac_status=$?
13953   grep -v '^ *+' conftest.er1 >conftest.err
13954   rm -f conftest.er1
13955   cat conftest.err >&5
13956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13957   (exit $ac_status); } &&
13958          { ac_try='test -z "$ac_c_werror_flag"
13959                          || test ! -s conftest.err'
13960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13961   (eval $ac_try) 2>&5
13962   ac_status=$?
13963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13964   (exit $ac_status); }; } &&
13965          { ac_try='test -s conftest$ac_exeext'
13966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13967   (eval $ac_try) 2>&5
13968   ac_status=$?
13969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13970   (exit $ac_status); }; }; then
13971   eval "$as_ac_var=yes"
13972 else
13973   echo "$as_me: failed program was:" >&5
13974 sed 's/^/| /' conftest.$ac_ext >&5
13975
13976 eval "$as_ac_var=no"
13977 fi
13978 rm -f conftest.err conftest.$ac_objext \
13979       conftest$ac_exeext conftest.$ac_ext
13980 fi
13981 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13982 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13983 if test `eval echo '${'$as_ac_var'}'` = yes; then
13984   cat >>confdefs.h <<_ACEOF
13985 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13986 _ACEOF
13987
13988 else
13989   pgac_need_repl_snprintf=yes
13990 fi
13991 done
13992
13993
13994 for ac_func in vsnprintf
13995 do
13996 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13997 echo "$as_me:$LINENO: checking for $ac_func" >&5
13998 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13999 if eval "test \"\${$as_ac_var+set}\" = set"; then
14000   echo $ECHO_N "(cached) $ECHO_C" >&6
14001 else
14002   cat >conftest.$ac_ext <<_ACEOF
14003 /* confdefs.h.  */
14004 _ACEOF
14005 cat confdefs.h >>conftest.$ac_ext
14006 cat >>conftest.$ac_ext <<_ACEOF
14007 /* end confdefs.h.  */
14008 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14009    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14010 #define $ac_func innocuous_$ac_func
14011
14012 /* System header to define __stub macros and hopefully few prototypes,
14013     which can conflict with char $ac_func (); below.
14014     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14015     <limits.h> exists even on freestanding compilers.  */
14016
14017 #ifdef __STDC__
14018 # include <limits.h>
14019 #else
14020 # include <assert.h>
14021 #endif
14022
14023 #undef $ac_func
14024
14025 /* Override any gcc2 internal prototype to avoid an error.  */
14026 #ifdef __cplusplus
14027 extern "C"
14028 {
14029 #endif
14030 /* We use char because int might match the return type of a gcc2
14031    builtin and then its argument prototype would still apply.  */
14032 char $ac_func ();
14033 /* The GNU C library defines this for functions which it implements
14034     to always fail with ENOSYS.  Some functions are actually named
14035     something starting with __ and the normal name is an alias.  */
14036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14037 choke me
14038 #else
14039 char (*f) () = $ac_func;
14040 #endif
14041 #ifdef __cplusplus
14042 }
14043 #endif
14044
14045 int
14046 main ()
14047 {
14048 return f != $ac_func;
14049   ;
14050   return 0;
14051 }
14052 _ACEOF
14053 rm -f conftest.$ac_objext conftest$ac_exeext
14054 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14055   (eval $ac_link) 2>conftest.er1
14056   ac_status=$?
14057   grep -v '^ *+' conftest.er1 >conftest.err
14058   rm -f conftest.er1
14059   cat conftest.err >&5
14060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14061   (exit $ac_status); } &&
14062          { ac_try='test -z "$ac_c_werror_flag"
14063                          || test ! -s conftest.err'
14064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14065   (eval $ac_try) 2>&5
14066   ac_status=$?
14067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068   (exit $ac_status); }; } &&
14069          { ac_try='test -s conftest$ac_exeext'
14070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14071   (eval $ac_try) 2>&5
14072   ac_status=$?
14073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14074   (exit $ac_status); }; }; then
14075   eval "$as_ac_var=yes"
14076 else
14077   echo "$as_me: failed program was:" >&5
14078 sed 's/^/| /' conftest.$ac_ext >&5
14079
14080 eval "$as_ac_var=no"
14081 fi
14082 rm -f conftest.err conftest.$ac_objext \
14083       conftest$ac_exeext conftest.$ac_ext
14084 fi
14085 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14086 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14087 if test `eval echo '${'$as_ac_var'}'` = yes; then
14088   cat >>confdefs.h <<_ACEOF
14089 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14090 _ACEOF
14091
14092 else
14093   pgac_need_repl_snprintf=yes
14094 fi
14095 done
14096
14097
14098
14099 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14100 # include/c.h will provide declarations.  Note this is a separate test
14101 # from whether the functions exist in the C library --- there are
14102 # systems that have the functions but don't bother to declare them :-(
14103
14104 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14105 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14106 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14107   echo $ECHO_N "(cached) $ECHO_C" >&6
14108 else
14109   cat >conftest.$ac_ext <<_ACEOF
14110 /* confdefs.h.  */
14111 _ACEOF
14112 cat confdefs.h >>conftest.$ac_ext
14113 cat >>conftest.$ac_ext <<_ACEOF
14114 /* end confdefs.h.  */
14115 $ac_includes_default
14116 int
14117 main ()
14118 {
14119 #ifndef snprintf
14120   char *p = (char *) snprintf;
14121 #endif
14122
14123   ;
14124   return 0;
14125 }
14126 _ACEOF
14127 rm -f conftest.$ac_objext
14128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14129   (eval $ac_compile) 2>conftest.er1
14130   ac_status=$?
14131   grep -v '^ *+' conftest.er1 >conftest.err
14132   rm -f conftest.er1
14133   cat conftest.err >&5
14134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14135   (exit $ac_status); } &&
14136          { ac_try='test -z "$ac_c_werror_flag"
14137                          || test ! -s conftest.err'
14138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14139   (eval $ac_try) 2>&5
14140   ac_status=$?
14141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14142   (exit $ac_status); }; } &&
14143          { ac_try='test -s conftest.$ac_objext'
14144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14145   (eval $ac_try) 2>&5
14146   ac_status=$?
14147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14148   (exit $ac_status); }; }; then
14149   ac_cv_have_decl_snprintf=yes
14150 else
14151   echo "$as_me: failed program was:" >&5
14152 sed 's/^/| /' conftest.$ac_ext >&5
14153
14154 ac_cv_have_decl_snprintf=no
14155 fi
14156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14157 fi
14158 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14159 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14160 if test $ac_cv_have_decl_snprintf = yes; then
14161
14162 cat >>confdefs.h <<_ACEOF
14163 #define HAVE_DECL_SNPRINTF 1
14164 _ACEOF
14165
14166
14167 else
14168   cat >>confdefs.h <<_ACEOF
14169 #define HAVE_DECL_SNPRINTF 0
14170 _ACEOF
14171
14172
14173 fi
14174 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14175 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14176 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14177   echo $ECHO_N "(cached) $ECHO_C" >&6
14178 else
14179   cat >conftest.$ac_ext <<_ACEOF
14180 /* confdefs.h.  */
14181 _ACEOF
14182 cat confdefs.h >>conftest.$ac_ext
14183 cat >>conftest.$ac_ext <<_ACEOF
14184 /* end confdefs.h.  */
14185 $ac_includes_default
14186 int
14187 main ()
14188 {
14189 #ifndef vsnprintf
14190   char *p = (char *) vsnprintf;
14191 #endif
14192
14193   ;
14194   return 0;
14195 }
14196 _ACEOF
14197 rm -f conftest.$ac_objext
14198 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14199   (eval $ac_compile) 2>conftest.er1
14200   ac_status=$?
14201   grep -v '^ *+' conftest.er1 >conftest.err
14202   rm -f conftest.er1
14203   cat conftest.err >&5
14204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14205   (exit $ac_status); } &&
14206          { ac_try='test -z "$ac_c_werror_flag"
14207                          || test ! -s conftest.err'
14208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14209   (eval $ac_try) 2>&5
14210   ac_status=$?
14211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14212   (exit $ac_status); }; } &&
14213          { ac_try='test -s conftest.$ac_objext'
14214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14215   (eval $ac_try) 2>&5
14216   ac_status=$?
14217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218   (exit $ac_status); }; }; then
14219   ac_cv_have_decl_vsnprintf=yes
14220 else
14221   echo "$as_me: failed program was:" >&5
14222 sed 's/^/| /' conftest.$ac_ext >&5
14223
14224 ac_cv_have_decl_vsnprintf=no
14225 fi
14226 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14227 fi
14228 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14229 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14230 if test $ac_cv_have_decl_vsnprintf = yes; then
14231
14232 cat >>confdefs.h <<_ACEOF
14233 #define HAVE_DECL_VSNPRINTF 1
14234 _ACEOF
14235
14236
14237 else
14238   cat >>confdefs.h <<_ACEOF
14239 #define HAVE_DECL_VSNPRINTF 0
14240 _ACEOF
14241
14242
14243 fi
14244
14245
14246
14247
14248 # do this one the hard way in case isinf() is a macro
14249 echo "$as_me:$LINENO: checking for isinf" >&5
14250 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14251 if test "${ac_cv_func_isinf+set}" = set; then
14252   echo $ECHO_N "(cached) $ECHO_C" >&6
14253 else
14254   cat >conftest.$ac_ext <<_ACEOF
14255 /* confdefs.h.  */
14256 _ACEOF
14257 cat confdefs.h >>conftest.$ac_ext
14258 cat >>conftest.$ac_ext <<_ACEOF
14259 /* end confdefs.h.  */
14260 #include <math.h>
14261
14262 int
14263 main ()
14264 {
14265 double x = 0.0; int res = isinf(x);
14266   ;
14267   return 0;
14268 }
14269 _ACEOF
14270 rm -f conftest.$ac_objext conftest$ac_exeext
14271 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14272   (eval $ac_link) 2>conftest.er1
14273   ac_status=$?
14274   grep -v '^ *+' conftest.er1 >conftest.err
14275   rm -f conftest.er1
14276   cat conftest.err >&5
14277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14278   (exit $ac_status); } &&
14279          { ac_try='test -z "$ac_c_werror_flag"
14280                          || test ! -s conftest.err'
14281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14282   (eval $ac_try) 2>&5
14283   ac_status=$?
14284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14285   (exit $ac_status); }; } &&
14286          { ac_try='test -s conftest$ac_exeext'
14287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14288   (eval $ac_try) 2>&5
14289   ac_status=$?
14290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14291   (exit $ac_status); }; }; then
14292   ac_cv_func_isinf=yes
14293 else
14294   echo "$as_me: failed program was:" >&5
14295 sed 's/^/| /' conftest.$ac_ext >&5
14296
14297 ac_cv_func_isinf=no
14298 fi
14299 rm -f conftest.err conftest.$ac_objext \
14300       conftest$ac_exeext conftest.$ac_ext
14301 fi
14302 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14303 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14304
14305 if test $ac_cv_func_isinf = yes ; then
14306
14307 cat >>confdefs.h <<\_ACEOF
14308 #define HAVE_ISINF 1
14309 _ACEOF
14310
14311 else
14312   case $LIBOBJS in
14313     "isinf.$ac_objext"   | \
14314   *" isinf.$ac_objext"   | \
14315     "isinf.$ac_objext "* | \
14316   *" isinf.$ac_objext "* ) ;;
14317   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14318 esac
14319
14320   # Look for a way to implement a substitute for isinf()
14321
14322
14323
14324
14325 for ac_func in fpclass fp_class fp_class_d class
14326 do
14327 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14328 echo "$as_me:$LINENO: checking for $ac_func" >&5
14329 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14330 if eval "test \"\${$as_ac_var+set}\" = set"; then
14331   echo $ECHO_N "(cached) $ECHO_C" >&6
14332 else
14333   cat >conftest.$ac_ext <<_ACEOF
14334 /* confdefs.h.  */
14335 _ACEOF
14336 cat confdefs.h >>conftest.$ac_ext
14337 cat >>conftest.$ac_ext <<_ACEOF
14338 /* end confdefs.h.  */
14339 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14340    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14341 #define $ac_func innocuous_$ac_func
14342
14343 /* System header to define __stub macros and hopefully few prototypes,
14344     which can conflict with char $ac_func (); below.
14345     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14346     <limits.h> exists even on freestanding compilers.  */
14347
14348 #ifdef __STDC__
14349 # include <limits.h>
14350 #else
14351 # include <assert.h>
14352 #endif
14353
14354 #undef $ac_func
14355
14356 /* Override any gcc2 internal prototype to avoid an error.  */
14357 #ifdef __cplusplus
14358 extern "C"
14359 {
14360 #endif
14361 /* We use char because int might match the return type of a gcc2
14362    builtin and then its argument prototype would still apply.  */
14363 char $ac_func ();
14364 /* The GNU C library defines this for functions which it implements
14365     to always fail with ENOSYS.  Some functions are actually named
14366     something starting with __ and the normal name is an alias.  */
14367 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14368 choke me
14369 #else
14370 char (*f) () = $ac_func;
14371 #endif
14372 #ifdef __cplusplus
14373 }
14374 #endif
14375
14376 int
14377 main ()
14378 {
14379 return f != $ac_func;
14380   ;
14381   return 0;
14382 }
14383 _ACEOF
14384 rm -f conftest.$ac_objext conftest$ac_exeext
14385 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14386   (eval $ac_link) 2>conftest.er1
14387   ac_status=$?
14388   grep -v '^ *+' conftest.er1 >conftest.err
14389   rm -f conftest.er1
14390   cat conftest.err >&5
14391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14392   (exit $ac_status); } &&
14393          { ac_try='test -z "$ac_c_werror_flag"
14394                          || test ! -s conftest.err'
14395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14396   (eval $ac_try) 2>&5
14397   ac_status=$?
14398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14399   (exit $ac_status); }; } &&
14400          { ac_try='test -s conftest$ac_exeext'
14401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14402   (eval $ac_try) 2>&5
14403   ac_status=$?
14404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14405   (exit $ac_status); }; }; then
14406   eval "$as_ac_var=yes"
14407 else
14408   echo "$as_me: failed program was:" >&5
14409 sed 's/^/| /' conftest.$ac_ext >&5
14410
14411 eval "$as_ac_var=no"
14412 fi
14413 rm -f conftest.err conftest.$ac_objext \
14414       conftest$ac_exeext conftest.$ac_ext
14415 fi
14416 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14417 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14418 if test `eval echo '${'$as_ac_var'}'` = yes; then
14419   cat >>confdefs.h <<_ACEOF
14420 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14421 _ACEOF
14422  break
14423 fi
14424 done
14425
14426 fi
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14442 do
14443 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14444 echo "$as_me:$LINENO: checking for $ac_func" >&5
14445 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14446 if eval "test \"\${$as_ac_var+set}\" = set"; then
14447   echo $ECHO_N "(cached) $ECHO_C" >&6
14448 else
14449   cat >conftest.$ac_ext <<_ACEOF
14450 /* confdefs.h.  */
14451 _ACEOF
14452 cat confdefs.h >>conftest.$ac_ext
14453 cat >>conftest.$ac_ext <<_ACEOF
14454 /* end confdefs.h.  */
14455 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14456    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14457 #define $ac_func innocuous_$ac_func
14458
14459 /* System header to define __stub macros and hopefully few prototypes,
14460     which can conflict with char $ac_func (); below.
14461     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14462     <limits.h> exists even on freestanding compilers.  */
14463
14464 #ifdef __STDC__
14465 # include <limits.h>
14466 #else
14467 # include <assert.h>
14468 #endif
14469
14470 #undef $ac_func
14471
14472 /* Override any gcc2 internal prototype to avoid an error.  */
14473 #ifdef __cplusplus
14474 extern "C"
14475 {
14476 #endif
14477 /* We use char because int might match the return type of a gcc2
14478    builtin and then its argument prototype would still apply.  */
14479 char $ac_func ();
14480 /* The GNU C library defines this for functions which it implements
14481     to always fail with ENOSYS.  Some functions are actually named
14482     something starting with __ and the normal name is an alias.  */
14483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14484 choke me
14485 #else
14486 char (*f) () = $ac_func;
14487 #endif
14488 #ifdef __cplusplus
14489 }
14490 #endif
14491
14492 int
14493 main ()
14494 {
14495 return f != $ac_func;
14496   ;
14497   return 0;
14498 }
14499 _ACEOF
14500 rm -f conftest.$ac_objext conftest$ac_exeext
14501 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14502   (eval $ac_link) 2>conftest.er1
14503   ac_status=$?
14504   grep -v '^ *+' conftest.er1 >conftest.err
14505   rm -f conftest.er1
14506   cat conftest.err >&5
14507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14508   (exit $ac_status); } &&
14509          { ac_try='test -z "$ac_c_werror_flag"
14510                          || test ! -s conftest.err'
14511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14512   (eval $ac_try) 2>&5
14513   ac_status=$?
14514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14515   (exit $ac_status); }; } &&
14516          { ac_try='test -s conftest$ac_exeext'
14517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14518   (eval $ac_try) 2>&5
14519   ac_status=$?
14520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14521   (exit $ac_status); }; }; then
14522   eval "$as_ac_var=yes"
14523 else
14524   echo "$as_me: failed program was:" >&5
14525 sed 's/^/| /' conftest.$ac_ext >&5
14526
14527 eval "$as_ac_var=no"
14528 fi
14529 rm -f conftest.err conftest.$ac_objext \
14530       conftest$ac_exeext conftest.$ac_ext
14531 fi
14532 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14533 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14534 if test `eval echo '${'$as_ac_var'}'` = yes; then
14535   cat >>confdefs.h <<_ACEOF
14536 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14537 _ACEOF
14538
14539 else
14540   case $LIBOBJS in
14541     "$ac_func.$ac_objext"   | \
14542   *" $ac_func.$ac_objext"   | \
14543     "$ac_func.$ac_objext "* | \
14544   *" $ac_func.$ac_objext "* ) ;;
14545   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14546 esac
14547
14548 fi
14549 done
14550
14551
14552
14553 # System's version of getaddrinfo(), if any, may be used only if we found
14554 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14555 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14556 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14557 # because we want to use our own getaddrinfo.c on Windows anyway.)
14558 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14559
14560 for ac_func in getaddrinfo
14561 do
14562 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14563 echo "$as_me:$LINENO: checking for $ac_func" >&5
14564 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14565 if eval "test \"\${$as_ac_var+set}\" = set"; then
14566   echo $ECHO_N "(cached) $ECHO_C" >&6
14567 else
14568   cat >conftest.$ac_ext <<_ACEOF
14569 /* confdefs.h.  */
14570 _ACEOF
14571 cat confdefs.h >>conftest.$ac_ext
14572 cat >>conftest.$ac_ext <<_ACEOF
14573 /* end confdefs.h.  */
14574 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14575    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14576 #define $ac_func innocuous_$ac_func
14577
14578 /* System header to define __stub macros and hopefully few prototypes,
14579     which can conflict with char $ac_func (); below.
14580     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14581     <limits.h> exists even on freestanding compilers.  */
14582
14583 #ifdef __STDC__
14584 # include <limits.h>
14585 #else
14586 # include <assert.h>
14587 #endif
14588
14589 #undef $ac_func
14590
14591 /* Override any gcc2 internal prototype to avoid an error.  */
14592 #ifdef __cplusplus
14593 extern "C"
14594 {
14595 #endif
14596 /* We use char because int might match the return type of a gcc2
14597    builtin and then its argument prototype would still apply.  */
14598 char $ac_func ();
14599 /* The GNU C library defines this for functions which it implements
14600     to always fail with ENOSYS.  Some functions are actually named
14601     something starting with __ and the normal name is an alias.  */
14602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14603 choke me
14604 #else
14605 char (*f) () = $ac_func;
14606 #endif
14607 #ifdef __cplusplus
14608 }
14609 #endif
14610
14611 int
14612 main ()
14613 {
14614 return f != $ac_func;
14615   ;
14616   return 0;
14617 }
14618 _ACEOF
14619 rm -f conftest.$ac_objext conftest$ac_exeext
14620 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14621   (eval $ac_link) 2>conftest.er1
14622   ac_status=$?
14623   grep -v '^ *+' conftest.er1 >conftest.err
14624   rm -f conftest.er1
14625   cat conftest.err >&5
14626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14627   (exit $ac_status); } &&
14628          { ac_try='test -z "$ac_c_werror_flag"
14629                          || test ! -s conftest.err'
14630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14631   (eval $ac_try) 2>&5
14632   ac_status=$?
14633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14634   (exit $ac_status); }; } &&
14635          { ac_try='test -s conftest$ac_exeext'
14636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14637   (eval $ac_try) 2>&5
14638   ac_status=$?
14639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14640   (exit $ac_status); }; }; then
14641   eval "$as_ac_var=yes"
14642 else
14643   echo "$as_me: failed program was:" >&5
14644 sed 's/^/| /' conftest.$ac_ext >&5
14645
14646 eval "$as_ac_var=no"
14647 fi
14648 rm -f conftest.err conftest.$ac_objext \
14649       conftest$ac_exeext conftest.$ac_ext
14650 fi
14651 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14652 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14653 if test `eval echo '${'$as_ac_var'}'` = yes; then
14654   cat >>confdefs.h <<_ACEOF
14655 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14656 _ACEOF
14657
14658 else
14659   case $LIBOBJS in
14660     "$ac_func.$ac_objext"   | \
14661   *" $ac_func.$ac_objext"   | \
14662     "$ac_func.$ac_objext "* | \
14663   *" $ac_func.$ac_objext "* ) ;;
14664   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14665 esac
14666
14667 fi
14668 done
14669
14670
14671 else
14672   case $LIBOBJS in
14673     "getaddrinfo.$ac_objext"   | \
14674   *" getaddrinfo.$ac_objext"   | \
14675     "getaddrinfo.$ac_objext "* | \
14676   *" getaddrinfo.$ac_objext "* ) ;;
14677   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14678 esac
14679
14680 fi
14681
14682 # similarly, use system's getopt_long() only if system provides struct option.
14683 if test x"$ac_cv_type_struct_option" = xyes ; then
14684
14685 for ac_func in getopt_long
14686 do
14687 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14688 echo "$as_me:$LINENO: checking for $ac_func" >&5
14689 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14690 if eval "test \"\${$as_ac_var+set}\" = set"; then
14691   echo $ECHO_N "(cached) $ECHO_C" >&6
14692 else
14693   cat >conftest.$ac_ext <<_ACEOF
14694 /* confdefs.h.  */
14695 _ACEOF
14696 cat confdefs.h >>conftest.$ac_ext
14697 cat >>conftest.$ac_ext <<_ACEOF
14698 /* end confdefs.h.  */
14699 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14700    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14701 #define $ac_func innocuous_$ac_func
14702
14703 /* System header to define __stub macros and hopefully few prototypes,
14704     which can conflict with char $ac_func (); below.
14705     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14706     <limits.h> exists even on freestanding compilers.  */
14707
14708 #ifdef __STDC__
14709 # include <limits.h>
14710 #else
14711 # include <assert.h>
14712 #endif
14713
14714 #undef $ac_func
14715
14716 /* Override any gcc2 internal prototype to avoid an error.  */
14717 #ifdef __cplusplus
14718 extern "C"
14719 {
14720 #endif
14721 /* We use char because int might match the return type of a gcc2
14722    builtin and then its argument prototype would still apply.  */
14723 char $ac_func ();
14724 /* The GNU C library defines this for functions which it implements
14725     to always fail with ENOSYS.  Some functions are actually named
14726     something starting with __ and the normal name is an alias.  */
14727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14728 choke me
14729 #else
14730 char (*f) () = $ac_func;
14731 #endif
14732 #ifdef __cplusplus
14733 }
14734 #endif
14735
14736 int
14737 main ()
14738 {
14739 return f != $ac_func;
14740   ;
14741   return 0;
14742 }
14743 _ACEOF
14744 rm -f conftest.$ac_objext conftest$ac_exeext
14745 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14746   (eval $ac_link) 2>conftest.er1
14747   ac_status=$?
14748   grep -v '^ *+' conftest.er1 >conftest.err
14749   rm -f conftest.er1
14750   cat conftest.err >&5
14751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14752   (exit $ac_status); } &&
14753          { ac_try='test -z "$ac_c_werror_flag"
14754                          || test ! -s conftest.err'
14755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14756   (eval $ac_try) 2>&5
14757   ac_status=$?
14758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14759   (exit $ac_status); }; } &&
14760          { ac_try='test -s conftest$ac_exeext'
14761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14762   (eval $ac_try) 2>&5
14763   ac_status=$?
14764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14765   (exit $ac_status); }; }; then
14766   eval "$as_ac_var=yes"
14767 else
14768   echo "$as_me: failed program was:" >&5
14769 sed 's/^/| /' conftest.$ac_ext >&5
14770
14771 eval "$as_ac_var=no"
14772 fi
14773 rm -f conftest.err conftest.$ac_objext \
14774       conftest$ac_exeext conftest.$ac_ext
14775 fi
14776 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14777 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14778 if test `eval echo '${'$as_ac_var'}'` = yes; then
14779   cat >>confdefs.h <<_ACEOF
14780 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14781 _ACEOF
14782
14783 else
14784   case $LIBOBJS in
14785     "$ac_func.$ac_objext"   | \
14786   *" $ac_func.$ac_objext"   | \
14787     "$ac_func.$ac_objext "* | \
14788   *" $ac_func.$ac_objext "* ) ;;
14789   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14790 esac
14791
14792 fi
14793 done
14794
14795
14796 else
14797   case $LIBOBJS in
14798     "getopt_long.$ac_objext"   | \
14799   *" getopt_long.$ac_objext"   | \
14800     "getopt_long.$ac_objext "* | \
14801   *" getopt_long.$ac_objext "* ) ;;
14802   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14803 esac
14804
14805 fi
14806
14807 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14808 # We override the previous test that said fseeko/ftello didn't exist
14809 # OS tests are also done in include/c.h and port/fseeko.c
14810 case $host_os in bsdi*|netbsd*)
14811 ac_cv_func_fseeko=yes
14812 esac
14813
14814 # Solaris has a very slow qsort in certain cases, so we replace it.
14815 if test "$PORTNAME" = "solaris"; then
14816 case $LIBOBJS in
14817     "qsort.$ac_objext"   | \
14818   *" qsort.$ac_objext"   | \
14819     "qsort.$ac_objext "* | \
14820   *" qsort.$ac_objext "* ) ;;
14821   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
14822 esac
14823
14824 fi
14825
14826 # Win32 support
14827 if test "$PORTNAME" = "win32"; then
14828 case $LIBOBJS in
14829     "gettimeofday.$ac_objext"   | \
14830   *" gettimeofday.$ac_objext"   | \
14831     "gettimeofday.$ac_objext "* | \
14832   *" gettimeofday.$ac_objext "* ) ;;
14833   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14834 esac
14835
14836 case $LIBOBJS in
14837     "kill.$ac_objext"   | \
14838   *" kill.$ac_objext"   | \
14839     "kill.$ac_objext "* | \
14840   *" kill.$ac_objext "* ) ;;
14841   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14842 esac
14843
14844 case $LIBOBJS in
14845     "open.$ac_objext"   | \
14846   *" open.$ac_objext"   | \
14847     "open.$ac_objext "* | \
14848   *" open.$ac_objext "* ) ;;
14849   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14850 esac
14851
14852 case $LIBOBJS in
14853     "rand.$ac_objext"   | \
14854   *" rand.$ac_objext"   | \
14855     "rand.$ac_objext "* | \
14856   *" rand.$ac_objext "* ) ;;
14857   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14858 esac
14859
14860
14861 cat >>confdefs.h <<\_ACEOF
14862 #define HAVE_SYMLINK 1
14863 _ACEOF
14864
14865 fi
14866
14867 if test "$with_readline" = yes; then
14868   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
14869 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
14870 cat >conftest.$ac_ext <<_ACEOF
14871 /* confdefs.h.  */
14872 _ACEOF
14873 cat confdefs.h >>conftest.$ac_ext
14874 cat >>conftest.$ac_ext <<_ACEOF
14875 /* end confdefs.h.  */
14876 #include <stdio.h>
14877 #ifdef HAVE_READLINE_READLINE_H
14878 # include <readline/readline.h>
14879 #elif defined(HAVE_READLINE_H)
14880 # include <readline.h>
14881 #endif
14882
14883 int
14884 main ()
14885 {
14886 rl_completion_append_character = 'x';
14887   ;
14888   return 0;
14889 }
14890 _ACEOF
14891 rm -f conftest.$ac_objext conftest$ac_exeext
14892 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14893   (eval $ac_link) 2>conftest.er1
14894   ac_status=$?
14895   grep -v '^ *+' conftest.er1 >conftest.err
14896   rm -f conftest.er1
14897   cat conftest.err >&5
14898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14899   (exit $ac_status); } &&
14900          { ac_try='test -z "$ac_c_werror_flag"
14901                          || test ! -s conftest.err'
14902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14903   (eval $ac_try) 2>&5
14904   ac_status=$?
14905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906   (exit $ac_status); }; } &&
14907          { ac_try='test -s conftest$ac_exeext'
14908   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14909   (eval $ac_try) 2>&5
14910   ac_status=$?
14911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912   (exit $ac_status); }; }; then
14913   echo "$as_me:$LINENO: result: yes" >&5
14914 echo "${ECHO_T}yes" >&6
14915
14916 cat >>confdefs.h <<\_ACEOF
14917 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
14918 _ACEOF
14919
14920 else
14921   echo "$as_me: failed program was:" >&5
14922 sed 's/^/| /' conftest.$ac_ext >&5
14923
14924 echo "$as_me:$LINENO: result: no" >&5
14925 echo "${ECHO_T}no" >&6
14926 fi
14927 rm -f conftest.err conftest.$ac_objext \
14928       conftest$ac_exeext conftest.$ac_ext
14929
14930
14931 for ac_func in rl_completion_matches rl_filename_completion_function
14932 do
14933 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14934 echo "$as_me:$LINENO: checking for $ac_func" >&5
14935 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14936 if eval "test \"\${$as_ac_var+set}\" = set"; then
14937   echo $ECHO_N "(cached) $ECHO_C" >&6
14938 else
14939   cat >conftest.$ac_ext <<_ACEOF
14940 /* confdefs.h.  */
14941 _ACEOF
14942 cat confdefs.h >>conftest.$ac_ext
14943 cat >>conftest.$ac_ext <<_ACEOF
14944 /* end confdefs.h.  */
14945 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14946    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14947 #define $ac_func innocuous_$ac_func
14948
14949 /* System header to define __stub macros and hopefully few prototypes,
14950     which can conflict with char $ac_func (); below.
14951     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14952     <limits.h> exists even on freestanding compilers.  */
14953
14954 #ifdef __STDC__
14955 # include <limits.h>
14956 #else
14957 # include <assert.h>
14958 #endif
14959
14960 #undef $ac_func
14961
14962 /* Override any gcc2 internal prototype to avoid an error.  */
14963 #ifdef __cplusplus
14964 extern "C"
14965 {
14966 #endif
14967 /* We use char because int might match the return type of a gcc2
14968    builtin and then its argument prototype would still apply.  */
14969 char $ac_func ();
14970 /* The GNU C library defines this for functions which it implements
14971     to always fail with ENOSYS.  Some functions are actually named
14972     something starting with __ and the normal name is an alias.  */
14973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14974 choke me
14975 #else
14976 char (*f) () = $ac_func;
14977 #endif
14978 #ifdef __cplusplus
14979 }
14980 #endif
14981
14982 int
14983 main ()
14984 {
14985 return f != $ac_func;
14986   ;
14987   return 0;
14988 }
14989 _ACEOF
14990 rm -f conftest.$ac_objext conftest$ac_exeext
14991 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14992   (eval $ac_link) 2>conftest.er1
14993   ac_status=$?
14994   grep -v '^ *+' conftest.er1 >conftest.err
14995   rm -f conftest.er1
14996   cat conftest.err >&5
14997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14998   (exit $ac_status); } &&
14999          { ac_try='test -z "$ac_c_werror_flag"
15000                          || test ! -s conftest.err'
15001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15002   (eval $ac_try) 2>&5
15003   ac_status=$?
15004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005   (exit $ac_status); }; } &&
15006          { ac_try='test -s conftest$ac_exeext'
15007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15008   (eval $ac_try) 2>&5
15009   ac_status=$?
15010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15011   (exit $ac_status); }; }; then
15012   eval "$as_ac_var=yes"
15013 else
15014   echo "$as_me: failed program was:" >&5
15015 sed 's/^/| /' conftest.$ac_ext >&5
15016
15017 eval "$as_ac_var=no"
15018 fi
15019 rm -f conftest.err conftest.$ac_objext \
15020       conftest$ac_exeext conftest.$ac_ext
15021 fi
15022 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15023 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15024 if test `eval echo '${'$as_ac_var'}'` = yes; then
15025   cat >>confdefs.h <<_ACEOF
15026 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15027 _ACEOF
15028
15029 fi
15030 done
15031
15032
15033 for ac_func in replace_history_entry
15034 do
15035 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15036 echo "$as_me:$LINENO: checking for $ac_func" >&5
15037 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15038 if eval "test \"\${$as_ac_var+set}\" = set"; then
15039   echo $ECHO_N "(cached) $ECHO_C" >&6
15040 else
15041   cat >conftest.$ac_ext <<_ACEOF
15042 /* confdefs.h.  */
15043 _ACEOF
15044 cat confdefs.h >>conftest.$ac_ext
15045 cat >>conftest.$ac_ext <<_ACEOF
15046 /* end confdefs.h.  */
15047 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15048    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15049 #define $ac_func innocuous_$ac_func
15050
15051 /* System header to define __stub macros and hopefully few prototypes,
15052     which can conflict with char $ac_func (); below.
15053     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15054     <limits.h> exists even on freestanding compilers.  */
15055
15056 #ifdef __STDC__
15057 # include <limits.h>
15058 #else
15059 # include <assert.h>
15060 #endif
15061
15062 #undef $ac_func
15063
15064 /* Override any gcc2 internal prototype to avoid an error.  */
15065 #ifdef __cplusplus
15066 extern "C"
15067 {
15068 #endif
15069 /* We use char because int might match the return type of a gcc2
15070    builtin and then its argument prototype would still apply.  */
15071 char $ac_func ();
15072 /* The GNU C library defines this for functions which it implements
15073     to always fail with ENOSYS.  Some functions are actually named
15074     something starting with __ and the normal name is an alias.  */
15075 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15076 choke me
15077 #else
15078 char (*f) () = $ac_func;
15079 #endif
15080 #ifdef __cplusplus
15081 }
15082 #endif
15083
15084 int
15085 main ()
15086 {
15087 return f != $ac_func;
15088   ;
15089   return 0;
15090 }
15091 _ACEOF
15092 rm -f conftest.$ac_objext conftest$ac_exeext
15093 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15094   (eval $ac_link) 2>conftest.er1
15095   ac_status=$?
15096   grep -v '^ *+' conftest.er1 >conftest.err
15097   rm -f conftest.er1
15098   cat conftest.err >&5
15099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100   (exit $ac_status); } &&
15101          { ac_try='test -z "$ac_c_werror_flag"
15102                          || test ! -s conftest.err'
15103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15104   (eval $ac_try) 2>&5
15105   ac_status=$?
15106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15107   (exit $ac_status); }; } &&
15108          { ac_try='test -s conftest$ac_exeext'
15109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15110   (eval $ac_try) 2>&5
15111   ac_status=$?
15112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15113   (exit $ac_status); }; }; then
15114   eval "$as_ac_var=yes"
15115 else
15116   echo "$as_me: failed program was:" >&5
15117 sed 's/^/| /' conftest.$ac_ext >&5
15118
15119 eval "$as_ac_var=no"
15120 fi
15121 rm -f conftest.err conftest.$ac_objext \
15122       conftest$ac_exeext conftest.$ac_ext
15123 fi
15124 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15125 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15126 if test `eval echo '${'$as_ac_var'}'` = yes; then
15127   cat >>confdefs.h <<_ACEOF
15128 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15129 _ACEOF
15130
15131 fi
15132 done
15133
15134 fi
15135
15136
15137 echo "$as_me:$LINENO: checking for finite" >&5
15138 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15139 cat >conftest.$ac_ext <<_ACEOF
15140 /* confdefs.h.  */
15141 _ACEOF
15142 cat confdefs.h >>conftest.$ac_ext
15143 cat >>conftest.$ac_ext <<_ACEOF
15144 /* end confdefs.h.  */
15145 #include <math.h>
15146 int
15147 main ()
15148 {
15149 int dummy=finite(1.0);
15150   ;
15151   return 0;
15152 }
15153 _ACEOF
15154 rm -f conftest.$ac_objext conftest$ac_exeext
15155 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15156   (eval $ac_link) 2>conftest.er1
15157   ac_status=$?
15158   grep -v '^ *+' conftest.er1 >conftest.err
15159   rm -f conftest.er1
15160   cat conftest.err >&5
15161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15162   (exit $ac_status); } &&
15163          { ac_try='test -z "$ac_c_werror_flag"
15164                          || test ! -s conftest.err'
15165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15166   (eval $ac_try) 2>&5
15167   ac_status=$?
15168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169   (exit $ac_status); }; } &&
15170          { ac_try='test -s conftest$ac_exeext'
15171   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15172   (eval $ac_try) 2>&5
15173   ac_status=$?
15174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15175   (exit $ac_status); }; }; then
15176
15177 cat >>confdefs.h <<\_ACEOF
15178 #define HAVE_FINITE 1
15179 _ACEOF
15180
15181 echo "$as_me:$LINENO: result: yes" >&5
15182 echo "${ECHO_T}yes" >&6
15183 else
15184   echo "$as_me: failed program was:" >&5
15185 sed 's/^/| /' conftest.$ac_ext >&5
15186
15187 echo "$as_me:$LINENO: result: no" >&5
15188 echo "${ECHO_T}no" >&6
15189 fi
15190 rm -f conftest.err conftest.$ac_objext \
15191       conftest$ac_exeext conftest.$ac_ext
15192
15193 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15194 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15195 cat >conftest.$ac_ext <<_ACEOF
15196 /* confdefs.h.  */
15197 _ACEOF
15198 cat confdefs.h >>conftest.$ac_ext
15199 cat >>conftest.$ac_ext <<_ACEOF
15200 /* end confdefs.h.  */
15201 #include <setjmp.h>
15202 int
15203 main ()
15204 {
15205 sigjmp_buf x; sigsetjmp(x, 1);
15206   ;
15207   return 0;
15208 }
15209 _ACEOF
15210 rm -f conftest.$ac_objext conftest$ac_exeext
15211 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15212   (eval $ac_link) 2>conftest.er1
15213   ac_status=$?
15214   grep -v '^ *+' conftest.er1 >conftest.err
15215   rm -f conftest.er1
15216   cat conftest.err >&5
15217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15218   (exit $ac_status); } &&
15219          { ac_try='test -z "$ac_c_werror_flag"
15220                          || test ! -s conftest.err'
15221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15222   (eval $ac_try) 2>&5
15223   ac_status=$?
15224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15225   (exit $ac_status); }; } &&
15226          { ac_try='test -s conftest$ac_exeext'
15227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15228   (eval $ac_try) 2>&5
15229   ac_status=$?
15230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15231   (exit $ac_status); }; }; then
15232
15233 cat >>confdefs.h <<\_ACEOF
15234 #define HAVE_SIGSETJMP 1
15235 _ACEOF
15236
15237 echo "$as_me:$LINENO: result: yes" >&5
15238 echo "${ECHO_T}yes" >&6
15239 else
15240   echo "$as_me: failed program was:" >&5
15241 sed 's/^/| /' conftest.$ac_ext >&5
15242
15243 echo "$as_me:$LINENO: result: no" >&5
15244 echo "${ECHO_T}no" >&6
15245 fi
15246 rm -f conftest.err conftest.$ac_objext \
15247       conftest$ac_exeext conftest.$ac_ext
15248
15249 echo "$as_me:$LINENO: checking for syslog" >&5
15250 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15251 if test "${ac_cv_func_syslog+set}" = set; then
15252   echo $ECHO_N "(cached) $ECHO_C" >&6
15253 else
15254   cat >conftest.$ac_ext <<_ACEOF
15255 /* confdefs.h.  */
15256 _ACEOF
15257 cat confdefs.h >>conftest.$ac_ext
15258 cat >>conftest.$ac_ext <<_ACEOF
15259 /* end confdefs.h.  */
15260 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15261    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15262 #define syslog innocuous_syslog
15263
15264 /* System header to define __stub macros and hopefully few prototypes,
15265     which can conflict with char syslog (); below.
15266     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15267     <limits.h> exists even on freestanding compilers.  */
15268
15269 #ifdef __STDC__
15270 # include <limits.h>
15271 #else
15272 # include <assert.h>
15273 #endif
15274
15275 #undef syslog
15276
15277 /* Override any gcc2 internal prototype to avoid an error.  */
15278 #ifdef __cplusplus
15279 extern "C"
15280 {
15281 #endif
15282 /* We use char because int might match the return type of a gcc2
15283    builtin and then its argument prototype would still apply.  */
15284 char syslog ();
15285 /* The GNU C library defines this for functions which it implements
15286     to always fail with ENOSYS.  Some functions are actually named
15287     something starting with __ and the normal name is an alias.  */
15288 #if defined (__stub_syslog) || defined (__stub___syslog)
15289 choke me
15290 #else
15291 char (*f) () = syslog;
15292 #endif
15293 #ifdef __cplusplus
15294 }
15295 #endif
15296
15297 int
15298 main ()
15299 {
15300 return f != syslog;
15301   ;
15302   return 0;
15303 }
15304 _ACEOF
15305 rm -f conftest.$ac_objext conftest$ac_exeext
15306 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15307   (eval $ac_link) 2>conftest.er1
15308   ac_status=$?
15309   grep -v '^ *+' conftest.er1 >conftest.err
15310   rm -f conftest.er1
15311   cat conftest.err >&5
15312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15313   (exit $ac_status); } &&
15314          { ac_try='test -z "$ac_c_werror_flag"
15315                          || test ! -s conftest.err'
15316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15317   (eval $ac_try) 2>&5
15318   ac_status=$?
15319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15320   (exit $ac_status); }; } &&
15321          { ac_try='test -s conftest$ac_exeext'
15322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15323   (eval $ac_try) 2>&5
15324   ac_status=$?
15325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15326   (exit $ac_status); }; }; then
15327   ac_cv_func_syslog=yes
15328 else
15329   echo "$as_me: failed program was:" >&5
15330 sed 's/^/| /' conftest.$ac_ext >&5
15331
15332 ac_cv_func_syslog=no
15333 fi
15334 rm -f conftest.err conftest.$ac_objext \
15335       conftest$ac_exeext conftest.$ac_ext
15336 fi
15337 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15338 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15339 if test $ac_cv_func_syslog = yes; then
15340   if test "${ac_cv_header_syslog_h+set}" = set; then
15341   echo "$as_me:$LINENO: checking for syslog.h" >&5
15342 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15343 if test "${ac_cv_header_syslog_h+set}" = set; then
15344   echo $ECHO_N "(cached) $ECHO_C" >&6
15345 fi
15346 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15347 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15348 else
15349   # Is the header compilable?
15350 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15351 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15352 cat >conftest.$ac_ext <<_ACEOF
15353 /* confdefs.h.  */
15354 _ACEOF
15355 cat confdefs.h >>conftest.$ac_ext
15356 cat >>conftest.$ac_ext <<_ACEOF
15357 /* end confdefs.h.  */
15358 $ac_includes_default
15359 #include <syslog.h>
15360 _ACEOF
15361 rm -f conftest.$ac_objext
15362 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15363   (eval $ac_compile) 2>conftest.er1
15364   ac_status=$?
15365   grep -v '^ *+' conftest.er1 >conftest.err
15366   rm -f conftest.er1
15367   cat conftest.err >&5
15368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15369   (exit $ac_status); } &&
15370          { ac_try='test -z "$ac_c_werror_flag"
15371                          || test ! -s conftest.err'
15372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15373   (eval $ac_try) 2>&5
15374   ac_status=$?
15375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15376   (exit $ac_status); }; } &&
15377          { ac_try='test -s conftest.$ac_objext'
15378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15379   (eval $ac_try) 2>&5
15380   ac_status=$?
15381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15382   (exit $ac_status); }; }; then
15383   ac_header_compiler=yes
15384 else
15385   echo "$as_me: failed program was:" >&5
15386 sed 's/^/| /' conftest.$ac_ext >&5
15387
15388 ac_header_compiler=no
15389 fi
15390 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15391 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15392 echo "${ECHO_T}$ac_header_compiler" >&6
15393
15394 # Is the header present?
15395 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15396 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15397 cat >conftest.$ac_ext <<_ACEOF
15398 /* confdefs.h.  */
15399 _ACEOF
15400 cat confdefs.h >>conftest.$ac_ext
15401 cat >>conftest.$ac_ext <<_ACEOF
15402 /* end confdefs.h.  */
15403 #include <syslog.h>
15404 _ACEOF
15405 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15406   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15407   ac_status=$?
15408   grep -v '^ *+' conftest.er1 >conftest.err
15409   rm -f conftest.er1
15410   cat conftest.err >&5
15411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412   (exit $ac_status); } >/dev/null; then
15413   if test -s conftest.err; then
15414     ac_cpp_err=$ac_c_preproc_warn_flag
15415     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15416   else
15417     ac_cpp_err=
15418   fi
15419 else
15420   ac_cpp_err=yes
15421 fi
15422 if test -z "$ac_cpp_err"; then
15423   ac_header_preproc=yes
15424 else
15425   echo "$as_me: failed program was:" >&5
15426 sed 's/^/| /' conftest.$ac_ext >&5
15427
15428   ac_header_preproc=no
15429 fi
15430 rm -f conftest.err conftest.$ac_ext
15431 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15432 echo "${ECHO_T}$ac_header_preproc" >&6
15433
15434 # So?  What about this header?
15435 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15436   yes:no: )
15437     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15438 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15439     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15440 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15441     ac_header_preproc=yes
15442     ;;
15443   no:yes:* )
15444     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15445 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15446     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15447 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15448     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15449 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15450     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15451 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15452     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15453 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15454     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15455 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15456     (
15457       cat <<\_ASBOX
15458 ## ---------------------------------------- ##
15459 ## Report this to pgsql-bugs@postgresql.org ##
15460 ## ---------------------------------------- ##
15461 _ASBOX
15462     ) |
15463       sed "s/^/$as_me: WARNING:     /" >&2
15464     ;;
15465 esac
15466 echo "$as_me:$LINENO: checking for syslog.h" >&5
15467 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15468 if test "${ac_cv_header_syslog_h+set}" = set; then
15469   echo $ECHO_N "(cached) $ECHO_C" >&6
15470 else
15471   ac_cv_header_syslog_h=$ac_header_preproc
15472 fi
15473 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15474 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15475
15476 fi
15477 if test $ac_cv_header_syslog_h = yes; then
15478
15479 cat >>confdefs.h <<\_ACEOF
15480 #define HAVE_SYSLOG 1
15481 _ACEOF
15482
15483 fi
15484
15485
15486 fi
15487
15488
15489 echo "$as_me:$LINENO: checking for optreset" >&5
15490 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15491 if test "${pgac_cv_var_int_optreset+set}" = set; then
15492   echo $ECHO_N "(cached) $ECHO_C" >&6
15493 else
15494   cat >conftest.$ac_ext <<_ACEOF
15495 /* confdefs.h.  */
15496 _ACEOF
15497 cat confdefs.h >>conftest.$ac_ext
15498 cat >>conftest.$ac_ext <<_ACEOF
15499 /* end confdefs.h.  */
15500 #include <unistd.h>
15501 int
15502 main ()
15503 {
15504 extern int optreset; optreset = 1;
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 rm -f conftest.$ac_objext conftest$ac_exeext
15510 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15511   (eval $ac_link) 2>conftest.er1
15512   ac_status=$?
15513   grep -v '^ *+' conftest.er1 >conftest.err
15514   rm -f conftest.er1
15515   cat conftest.err >&5
15516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15517   (exit $ac_status); } &&
15518          { ac_try='test -z "$ac_c_werror_flag"
15519                          || test ! -s conftest.err'
15520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15521   (eval $ac_try) 2>&5
15522   ac_status=$?
15523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524   (exit $ac_status); }; } &&
15525          { ac_try='test -s conftest$ac_exeext'
15526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15527   (eval $ac_try) 2>&5
15528   ac_status=$?
15529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530   (exit $ac_status); }; }; then
15531   pgac_cv_var_int_optreset=yes
15532 else
15533   echo "$as_me: failed program was:" >&5
15534 sed 's/^/| /' conftest.$ac_ext >&5
15535
15536 pgac_cv_var_int_optreset=no
15537 fi
15538 rm -f conftest.err conftest.$ac_objext \
15539       conftest$ac_exeext conftest.$ac_ext
15540 fi
15541 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15542 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15543 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15544
15545 cat >>confdefs.h <<\_ACEOF
15546 #define HAVE_INT_OPTRESET 1
15547 _ACEOF
15548
15549 fi
15550
15551
15552
15553 for ac_func in strtoll strtoq
15554 do
15555 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15556 echo "$as_me:$LINENO: checking for $ac_func" >&5
15557 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15558 if eval "test \"\${$as_ac_var+set}\" = set"; then
15559   echo $ECHO_N "(cached) $ECHO_C" >&6
15560 else
15561   cat >conftest.$ac_ext <<_ACEOF
15562 /* confdefs.h.  */
15563 _ACEOF
15564 cat confdefs.h >>conftest.$ac_ext
15565 cat >>conftest.$ac_ext <<_ACEOF
15566 /* end confdefs.h.  */
15567 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15568    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15569 #define $ac_func innocuous_$ac_func
15570
15571 /* System header to define __stub macros and hopefully few prototypes,
15572     which can conflict with char $ac_func (); below.
15573     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15574     <limits.h> exists even on freestanding compilers.  */
15575
15576 #ifdef __STDC__
15577 # include <limits.h>
15578 #else
15579 # include <assert.h>
15580 #endif
15581
15582 #undef $ac_func
15583
15584 /* Override any gcc2 internal prototype to avoid an error.  */
15585 #ifdef __cplusplus
15586 extern "C"
15587 {
15588 #endif
15589 /* We use char because int might match the return type of a gcc2
15590    builtin and then its argument prototype would still apply.  */
15591 char $ac_func ();
15592 /* The GNU C library defines this for functions which it implements
15593     to always fail with ENOSYS.  Some functions are actually named
15594     something starting with __ and the normal name is an alias.  */
15595 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15596 choke me
15597 #else
15598 char (*f) () = $ac_func;
15599 #endif
15600 #ifdef __cplusplus
15601 }
15602 #endif
15603
15604 int
15605 main ()
15606 {
15607 return f != $ac_func;
15608   ;
15609   return 0;
15610 }
15611 _ACEOF
15612 rm -f conftest.$ac_objext conftest$ac_exeext
15613 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15614   (eval $ac_link) 2>conftest.er1
15615   ac_status=$?
15616   grep -v '^ *+' conftest.er1 >conftest.err
15617   rm -f conftest.er1
15618   cat conftest.err >&5
15619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15620   (exit $ac_status); } &&
15621          { ac_try='test -z "$ac_c_werror_flag"
15622                          || test ! -s conftest.err'
15623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15624   (eval $ac_try) 2>&5
15625   ac_status=$?
15626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627   (exit $ac_status); }; } &&
15628          { ac_try='test -s conftest$ac_exeext'
15629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15630   (eval $ac_try) 2>&5
15631   ac_status=$?
15632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15633   (exit $ac_status); }; }; then
15634   eval "$as_ac_var=yes"
15635 else
15636   echo "$as_me: failed program was:" >&5
15637 sed 's/^/| /' conftest.$ac_ext >&5
15638
15639 eval "$as_ac_var=no"
15640 fi
15641 rm -f conftest.err conftest.$ac_objext \
15642       conftest$ac_exeext conftest.$ac_ext
15643 fi
15644 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15645 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15646 if test `eval echo '${'$as_ac_var'}'` = yes; then
15647   cat >>confdefs.h <<_ACEOF
15648 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15649 _ACEOF
15650  break
15651 fi
15652 done
15653
15654
15655
15656 for ac_func in strtoull strtouq
15657 do
15658 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15659 echo "$as_me:$LINENO: checking for $ac_func" >&5
15660 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15661 if eval "test \"\${$as_ac_var+set}\" = set"; then
15662   echo $ECHO_N "(cached) $ECHO_C" >&6
15663 else
15664   cat >conftest.$ac_ext <<_ACEOF
15665 /* confdefs.h.  */
15666 _ACEOF
15667 cat confdefs.h >>conftest.$ac_ext
15668 cat >>conftest.$ac_ext <<_ACEOF
15669 /* end confdefs.h.  */
15670 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15671    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15672 #define $ac_func innocuous_$ac_func
15673
15674 /* System header to define __stub macros and hopefully few prototypes,
15675     which can conflict with char $ac_func (); below.
15676     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15677     <limits.h> exists even on freestanding compilers.  */
15678
15679 #ifdef __STDC__
15680 # include <limits.h>
15681 #else
15682 # include <assert.h>
15683 #endif
15684
15685 #undef $ac_func
15686
15687 /* Override any gcc2 internal prototype to avoid an error.  */
15688 #ifdef __cplusplus
15689 extern "C"
15690 {
15691 #endif
15692 /* We use char because int might match the return type of a gcc2
15693    builtin and then its argument prototype would still apply.  */
15694 char $ac_func ();
15695 /* The GNU C library defines this for functions which it implements
15696     to always fail with ENOSYS.  Some functions are actually named
15697     something starting with __ and the normal name is an alias.  */
15698 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15699 choke me
15700 #else
15701 char (*f) () = $ac_func;
15702 #endif
15703 #ifdef __cplusplus
15704 }
15705 #endif
15706
15707 int
15708 main ()
15709 {
15710 return f != $ac_func;
15711   ;
15712   return 0;
15713 }
15714 _ACEOF
15715 rm -f conftest.$ac_objext conftest$ac_exeext
15716 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15717   (eval $ac_link) 2>conftest.er1
15718   ac_status=$?
15719   grep -v '^ *+' conftest.er1 >conftest.err
15720   rm -f conftest.er1
15721   cat conftest.err >&5
15722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15723   (exit $ac_status); } &&
15724          { ac_try='test -z "$ac_c_werror_flag"
15725                          || test ! -s conftest.err'
15726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15727   (eval $ac_try) 2>&5
15728   ac_status=$?
15729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15730   (exit $ac_status); }; } &&
15731          { ac_try='test -s conftest$ac_exeext'
15732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15733   (eval $ac_try) 2>&5
15734   ac_status=$?
15735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15736   (exit $ac_status); }; }; then
15737   eval "$as_ac_var=yes"
15738 else
15739   echo "$as_me: failed program was:" >&5
15740 sed 's/^/| /' conftest.$ac_ext >&5
15741
15742 eval "$as_ac_var=no"
15743 fi
15744 rm -f conftest.err conftest.$ac_objext \
15745       conftest$ac_exeext conftest.$ac_ext
15746 fi
15747 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15748 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15749 if test `eval echo '${'$as_ac_var'}'` = yes; then
15750   cat >>confdefs.h <<_ACEOF
15751 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15752 _ACEOF
15753  break
15754 fi
15755 done
15756
15757
15758 # Check for one of atexit() or on_exit()
15759
15760 for ac_func in atexit
15761 do
15762 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15763 echo "$as_me:$LINENO: checking for $ac_func" >&5
15764 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15765 if eval "test \"\${$as_ac_var+set}\" = set"; then
15766   echo $ECHO_N "(cached) $ECHO_C" >&6
15767 else
15768   cat >conftest.$ac_ext <<_ACEOF
15769 /* confdefs.h.  */
15770 _ACEOF
15771 cat confdefs.h >>conftest.$ac_ext
15772 cat >>conftest.$ac_ext <<_ACEOF
15773 /* end confdefs.h.  */
15774 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15775    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15776 #define $ac_func innocuous_$ac_func
15777
15778 /* System header to define __stub macros and hopefully few prototypes,
15779     which can conflict with char $ac_func (); below.
15780     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15781     <limits.h> exists even on freestanding compilers.  */
15782
15783 #ifdef __STDC__
15784 # include <limits.h>
15785 #else
15786 # include <assert.h>
15787 #endif
15788
15789 #undef $ac_func
15790
15791 /* Override any gcc2 internal prototype to avoid an error.  */
15792 #ifdef __cplusplus
15793 extern "C"
15794 {
15795 #endif
15796 /* We use char because int might match the return type of a gcc2
15797    builtin and then its argument prototype would still apply.  */
15798 char $ac_func ();
15799 /* The GNU C library defines this for functions which it implements
15800     to always fail with ENOSYS.  Some functions are actually named
15801     something starting with __ and the normal name is an alias.  */
15802 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15803 choke me
15804 #else
15805 char (*f) () = $ac_func;
15806 #endif
15807 #ifdef __cplusplus
15808 }
15809 #endif
15810
15811 int
15812 main ()
15813 {
15814 return f != $ac_func;
15815   ;
15816   return 0;
15817 }
15818 _ACEOF
15819 rm -f conftest.$ac_objext conftest$ac_exeext
15820 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15821   (eval $ac_link) 2>conftest.er1
15822   ac_status=$?
15823   grep -v '^ *+' conftest.er1 >conftest.err
15824   rm -f conftest.er1
15825   cat conftest.err >&5
15826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15827   (exit $ac_status); } &&
15828          { ac_try='test -z "$ac_c_werror_flag"
15829                          || test ! -s conftest.err'
15830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15831   (eval $ac_try) 2>&5
15832   ac_status=$?
15833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15834   (exit $ac_status); }; } &&
15835          { ac_try='test -s conftest$ac_exeext'
15836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15837   (eval $ac_try) 2>&5
15838   ac_status=$?
15839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15840   (exit $ac_status); }; }; then
15841   eval "$as_ac_var=yes"
15842 else
15843   echo "$as_me: failed program was:" >&5
15844 sed 's/^/| /' conftest.$ac_ext >&5
15845
15846 eval "$as_ac_var=no"
15847 fi
15848 rm -f conftest.err conftest.$ac_objext \
15849       conftest$ac_exeext conftest.$ac_ext
15850 fi
15851 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15852 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15853 if test `eval echo '${'$as_ac_var'}'` = yes; then
15854   cat >>confdefs.h <<_ACEOF
15855 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15856 _ACEOF
15857
15858 else
15859
15860 for ac_func in on_exit
15861 do
15862 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15863 echo "$as_me:$LINENO: checking for $ac_func" >&5
15864 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15865 if eval "test \"\${$as_ac_var+set}\" = set"; then
15866   echo $ECHO_N "(cached) $ECHO_C" >&6
15867 else
15868   cat >conftest.$ac_ext <<_ACEOF
15869 /* confdefs.h.  */
15870 _ACEOF
15871 cat confdefs.h >>conftest.$ac_ext
15872 cat >>conftest.$ac_ext <<_ACEOF
15873 /* end confdefs.h.  */
15874 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15875    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15876 #define $ac_func innocuous_$ac_func
15877
15878 /* System header to define __stub macros and hopefully few prototypes,
15879     which can conflict with char $ac_func (); below.
15880     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15881     <limits.h> exists even on freestanding compilers.  */
15882
15883 #ifdef __STDC__
15884 # include <limits.h>
15885 #else
15886 # include <assert.h>
15887 #endif
15888
15889 #undef $ac_func
15890
15891 /* Override any gcc2 internal prototype to avoid an error.  */
15892 #ifdef __cplusplus
15893 extern "C"
15894 {
15895 #endif
15896 /* We use char because int might match the return type of a gcc2
15897    builtin and then its argument prototype would still apply.  */
15898 char $ac_func ();
15899 /* The GNU C library defines this for functions which it implements
15900     to always fail with ENOSYS.  Some functions are actually named
15901     something starting with __ and the normal name is an alias.  */
15902 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15903 choke me
15904 #else
15905 char (*f) () = $ac_func;
15906 #endif
15907 #ifdef __cplusplus
15908 }
15909 #endif
15910
15911 int
15912 main ()
15913 {
15914 return f != $ac_func;
15915   ;
15916   return 0;
15917 }
15918 _ACEOF
15919 rm -f conftest.$ac_objext conftest$ac_exeext
15920 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15921   (eval $ac_link) 2>conftest.er1
15922   ac_status=$?
15923   grep -v '^ *+' conftest.er1 >conftest.err
15924   rm -f conftest.er1
15925   cat conftest.err >&5
15926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15927   (exit $ac_status); } &&
15928          { ac_try='test -z "$ac_c_werror_flag"
15929                          || test ! -s conftest.err'
15930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15931   (eval $ac_try) 2>&5
15932   ac_status=$?
15933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15934   (exit $ac_status); }; } &&
15935          { ac_try='test -s conftest$ac_exeext'
15936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15937   (eval $ac_try) 2>&5
15938   ac_status=$?
15939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15940   (exit $ac_status); }; }; then
15941   eval "$as_ac_var=yes"
15942 else
15943   echo "$as_me: failed program was:" >&5
15944 sed 's/^/| /' conftest.$ac_ext >&5
15945
15946 eval "$as_ac_var=no"
15947 fi
15948 rm -f conftest.err conftest.$ac_objext \
15949       conftest$ac_exeext conftest.$ac_ext
15950 fi
15951 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15952 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15953 if test `eval echo '${'$as_ac_var'}'` = yes; then
15954   cat >>confdefs.h <<_ACEOF
15955 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15956 _ACEOF
15957
15958 else
15959   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
15960 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
15961    { (exit 1); exit 1; }; }
15962 fi
15963 done
15964
15965 fi
15966 done
15967
15968
15969 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15970 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
15971 if test "${ac_cv_sys_largefile_source+set}" = set; then
15972   echo $ECHO_N "(cached) $ECHO_C" >&6
15973 else
15974   while :; do
15975   ac_cv_sys_largefile_source=no
15976   cat >conftest.$ac_ext <<_ACEOF
15977 /* confdefs.h.  */
15978 _ACEOF
15979 cat confdefs.h >>conftest.$ac_ext
15980 cat >>conftest.$ac_ext <<_ACEOF
15981 /* end confdefs.h.  */
15982 #include <stdio.h>
15983 int
15984 main ()
15985 {
15986 return !fseeko;
15987   ;
15988   return 0;
15989 }
15990 _ACEOF
15991 rm -f conftest.$ac_objext
15992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15993   (eval $ac_compile) 2>conftest.er1
15994   ac_status=$?
15995   grep -v '^ *+' conftest.er1 >conftest.err
15996   rm -f conftest.er1
15997   cat conftest.err >&5
15998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15999   (exit $ac_status); } &&
16000          { ac_try='test -z "$ac_c_werror_flag"
16001                          || test ! -s conftest.err'
16002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16003   (eval $ac_try) 2>&5
16004   ac_status=$?
16005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16006   (exit $ac_status); }; } &&
16007          { ac_try='test -s conftest.$ac_objext'
16008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16009   (eval $ac_try) 2>&5
16010   ac_status=$?
16011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16012   (exit $ac_status); }; }; then
16013   break
16014 else
16015   echo "$as_me: failed program was:" >&5
16016 sed 's/^/| /' conftest.$ac_ext >&5
16017
16018 fi
16019 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16020   cat >conftest.$ac_ext <<_ACEOF
16021 /* confdefs.h.  */
16022 _ACEOF
16023 cat confdefs.h >>conftest.$ac_ext
16024 cat >>conftest.$ac_ext <<_ACEOF
16025 /* end confdefs.h.  */
16026 #define _LARGEFILE_SOURCE 1
16027 #include <stdio.h>
16028 int
16029 main ()
16030 {
16031 return !fseeko;
16032   ;
16033   return 0;
16034 }
16035 _ACEOF
16036 rm -f conftest.$ac_objext
16037 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16038   (eval $ac_compile) 2>conftest.er1
16039   ac_status=$?
16040   grep -v '^ *+' conftest.er1 >conftest.err
16041   rm -f conftest.er1
16042   cat conftest.err >&5
16043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16044   (exit $ac_status); } &&
16045          { ac_try='test -z "$ac_c_werror_flag"
16046                          || test ! -s conftest.err'
16047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16048   (eval $ac_try) 2>&5
16049   ac_status=$?
16050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16051   (exit $ac_status); }; } &&
16052          { ac_try='test -s conftest.$ac_objext'
16053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16054   (eval $ac_try) 2>&5
16055   ac_status=$?
16056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16057   (exit $ac_status); }; }; then
16058   ac_cv_sys_largefile_source=1; break
16059 else
16060   echo "$as_me: failed program was:" >&5
16061 sed 's/^/| /' conftest.$ac_ext >&5
16062
16063 fi
16064 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16065   break
16066 done
16067 fi
16068 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16069 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16070 if test "$ac_cv_sys_largefile_source" != no; then
16071
16072 cat >>confdefs.h <<_ACEOF
16073 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16074 _ACEOF
16075
16076 fi
16077 rm -f conftest*
16078
16079 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16080 # in glibc 2.1.3, but that breaks too many other things.
16081 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16082 echo "$as_me:$LINENO: checking for fseeko" >&5
16083 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16084 if test "${ac_cv_func_fseeko+set}" = set; then
16085   echo $ECHO_N "(cached) $ECHO_C" >&6
16086 else
16087   cat >conftest.$ac_ext <<_ACEOF
16088 /* confdefs.h.  */
16089 _ACEOF
16090 cat confdefs.h >>conftest.$ac_ext
16091 cat >>conftest.$ac_ext <<_ACEOF
16092 /* end confdefs.h.  */
16093 #include <stdio.h>
16094 int
16095 main ()
16096 {
16097 return fseeko && fseeko (stdin, 0, 0);
16098   ;
16099   return 0;
16100 }
16101 _ACEOF
16102 rm -f conftest.$ac_objext conftest$ac_exeext
16103 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16104   (eval $ac_link) 2>conftest.er1
16105   ac_status=$?
16106   grep -v '^ *+' conftest.er1 >conftest.err
16107   rm -f conftest.er1
16108   cat conftest.err >&5
16109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16110   (exit $ac_status); } &&
16111          { ac_try='test -z "$ac_c_werror_flag"
16112                          || test ! -s conftest.err'
16113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16114   (eval $ac_try) 2>&5
16115   ac_status=$?
16116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16117   (exit $ac_status); }; } &&
16118          { ac_try='test -s conftest$ac_exeext'
16119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16120   (eval $ac_try) 2>&5
16121   ac_status=$?
16122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16123   (exit $ac_status); }; }; then
16124   ac_cv_func_fseeko=yes
16125 else
16126   echo "$as_me: failed program was:" >&5
16127 sed 's/^/| /' conftest.$ac_ext >&5
16128
16129 ac_cv_func_fseeko=no
16130 fi
16131 rm -f conftest.err conftest.$ac_objext \
16132       conftest$ac_exeext conftest.$ac_ext
16133 fi
16134 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16135 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16136 if test $ac_cv_func_fseeko = yes; then
16137
16138 cat >>confdefs.h <<\_ACEOF
16139 #define HAVE_FSEEKO 1
16140 _ACEOF
16141
16142 fi
16143
16144
16145 #
16146 # Pthreads
16147 #
16148 # For each platform, we need to know about any special compile and link
16149 # libraries, and whether the normal C function names are thread-safe.
16150 # See the comment at the top of src/port/thread.c for more information.
16151 #
16152 if test "$enable_thread_safety" = yes; then
16153
16154
16155
16156
16157 ac_ext=c
16158 ac_cpp='$CPP $CPPFLAGS'
16159 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16160 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16162
16163 acx_pthread_ok=no
16164
16165 # We used to check for pthread.h first, but this fails if pthread.h
16166 # requires special compiler flags (e.g. on True64 or Sequent).
16167 # It gets checked for in the link test anyway.
16168
16169 # First of all, check if the user has set any of the PTHREAD_LIBS,
16170 # etcetera environment variables, and if threads linking works using
16171 # them:
16172 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16173         save_CFLAGS="$CFLAGS"
16174         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16175         save_LIBS="$LIBS"
16176         LIBS="$PTHREAD_LIBS $LIBS"
16177         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16178 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16179         cat >conftest.$ac_ext <<_ACEOF
16180 /* confdefs.h.  */
16181 _ACEOF
16182 cat confdefs.h >>conftest.$ac_ext
16183 cat >>conftest.$ac_ext <<_ACEOF
16184 /* end confdefs.h.  */
16185
16186 /* Override any gcc2 internal prototype to avoid an error.  */
16187 #ifdef __cplusplus
16188 extern "C"
16189 #endif
16190 /* We use char because int might match the return type of a gcc2
16191    builtin and then its argument prototype would still apply.  */
16192 char pthread_join ();
16193 int
16194 main ()
16195 {
16196 pthread_join ();
16197   ;
16198   return 0;
16199 }
16200 _ACEOF
16201 rm -f conftest.$ac_objext conftest$ac_exeext
16202 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16203   (eval $ac_link) 2>conftest.er1
16204   ac_status=$?
16205   grep -v '^ *+' conftest.er1 >conftest.err
16206   rm -f conftest.er1
16207   cat conftest.err >&5
16208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209   (exit $ac_status); } &&
16210          { ac_try='test -z "$ac_c_werror_flag"
16211                          || test ! -s conftest.err'
16212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16213   (eval $ac_try) 2>&5
16214   ac_status=$?
16215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216   (exit $ac_status); }; } &&
16217          { ac_try='test -s conftest$ac_exeext'
16218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16219   (eval $ac_try) 2>&5
16220   ac_status=$?
16221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16222   (exit $ac_status); }; }; then
16223   acx_pthread_ok=yes
16224 else
16225   echo "$as_me: failed program was:" >&5
16226 sed 's/^/| /' conftest.$ac_ext >&5
16227
16228 fi
16229 rm -f conftest.err conftest.$ac_objext \
16230       conftest$ac_exeext conftest.$ac_ext
16231         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16232 echo "${ECHO_T}$acx_pthread_ok" >&6
16233         if test x"$acx_pthread_ok" = xno; then
16234                 PTHREAD_LIBS=""
16235                 PTHREAD_CFLAGS=""
16236         fi
16237         LIBS="$save_LIBS"
16238         CFLAGS="$save_CFLAGS"
16239 fi
16240
16241 # We must check for the threads library under a number of different
16242 # names; the ordering is very important because some systems
16243 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16244 # libraries is broken (non-POSIX).
16245
16246 # Create a list of thread flags to try.  Items starting with a "-" are
16247 # C compiler flags, and other items are library names, except for "none"
16248 # which indicates that we try without any flags at all, and "pthread-config"
16249 # which is a program returning the flags for the Pth emulation library.
16250
16251 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16252
16253 # The ordering *is* (sometimes) important.  Some notes on the
16254 # individual items follow:
16255
16256 # pthreads: AIX (must check this before -lpthread)
16257 # none: in case threads are in libc; should be tried before -Kthread and
16258 #       other compiler flags to prevent continual compiler warnings
16259 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16260 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16261 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16262 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16263 # -pthreads: Solaris/gcc
16264 # -mthreads: Mingw32/gcc, Lynx/gcc
16265 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16266 #      doesn't hurt to check since this sometimes defines pthreads too;
16267 #      also defines -D_REENTRANT)
16268 # pthread: Linux, etcetera
16269 # --thread-safe: KAI C++
16270 # pthread-config: use pthread-config program (for GNU Pth library)
16271
16272 case "${host_cpu}-${host_os}" in
16273         *solaris*)
16274
16275         # On Solaris (at least, for some versions), libc contains stubbed
16276         # (non-functional) versions of the pthreads routines, so link-based
16277         # tests will erroneously succeed.  (We need to link with -pthread or
16278         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16279         # a function called by this macro, so we could check for that, but
16280         # who knows whether they'll stub that too in a future libc.)  So,
16281         # we'll just look for -pthreads and -lpthread first:
16282
16283         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16284         ;;
16285 esac
16286
16287 if test x"$acx_pthread_ok" = xno; then
16288 for flag in $acx_pthread_flags; do
16289
16290         tryPTHREAD_CFLAGS=""
16291         tryPTHREAD_LIBS=""
16292         case $flag in
16293                 none)
16294                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16295 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16296                 ;;
16297
16298                 -*)
16299                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16300 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16301                 tryPTHREAD_CFLAGS="$flag"
16302                 ;;
16303
16304                 pthread-config)
16305                 # skip this if we already have flags defined, for PostgreSQL
16306                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16307                 # Extract the first word of "pthread-config", so it can be a program name with args.
16308 set dummy pthread-config; ac_word=$2
16309 echo "$as_me:$LINENO: checking for $ac_word" >&5
16310 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16311 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16312   echo $ECHO_N "(cached) $ECHO_C" >&6
16313 else
16314   if test -n "$acx_pthread_config"; then
16315   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16316 else
16317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16318 for as_dir in $PATH
16319 do
16320   IFS=$as_save_IFS
16321   test -z "$as_dir" && as_dir=.
16322   for ac_exec_ext in '' $ac_executable_extensions; do
16323   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16324     ac_cv_prog_acx_pthread_config="yes"
16325     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16326     break 2
16327   fi
16328 done
16329 done
16330
16331   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16332 fi
16333 fi
16334 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16335 if test -n "$acx_pthread_config"; then
16336   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16337 echo "${ECHO_T}$acx_pthread_config" >&6
16338 else
16339   echo "$as_me:$LINENO: result: no" >&5
16340 echo "${ECHO_T}no" >&6
16341 fi
16342
16343                 if test x"$acx_pthread_config" = xno; then continue; fi
16344                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16345                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16346                 ;;
16347
16348                 *)
16349                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16350 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16351                 tryPTHREAD_LIBS="-l$flag"
16352                 ;;
16353         esac
16354
16355         save_LIBS="$LIBS"
16356         save_CFLAGS="$CFLAGS"
16357         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16358         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16359
16360         # Check for various functions.  We must include pthread.h,
16361         # since some functions may be macros.  (On the Sequent, we
16362         # need a special flag -Kthread to make this header compile.)
16363         # We check for pthread_join because it is in -lpthread on IRIX
16364         # while pthread_create is in libc.  We check for pthread_attr_init
16365         # due to DEC craziness with -lpthreads.  We check for
16366         # pthread_cleanup_push because it is one of the few pthread
16367         # functions on Solaris that doesn't have a non-functional libc stub.
16368         # We try pthread_create on general principles.
16369         cat >conftest.$ac_ext <<_ACEOF
16370 /* confdefs.h.  */
16371 _ACEOF
16372 cat confdefs.h >>conftest.$ac_ext
16373 cat >>conftest.$ac_ext <<_ACEOF
16374 /* end confdefs.h.  */
16375 #include <pthread.h>
16376 int
16377 main ()
16378 {
16379 pthread_t th; pthread_join(th, 0);
16380                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16381                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16382   ;
16383   return 0;
16384 }
16385 _ACEOF
16386 rm -f conftest.$ac_objext conftest$ac_exeext
16387 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16388   (eval $ac_link) 2>conftest.er1
16389   ac_status=$?
16390   grep -v '^ *+' conftest.er1 >conftest.err
16391   rm -f conftest.er1
16392   cat conftest.err >&5
16393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16394   (exit $ac_status); } &&
16395          { ac_try='test -z "$ac_c_werror_flag"
16396                          || test ! -s conftest.err'
16397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16398   (eval $ac_try) 2>&5
16399   ac_status=$?
16400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16401   (exit $ac_status); }; } &&
16402          { ac_try='test -s conftest$ac_exeext'
16403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16404   (eval $ac_try) 2>&5
16405   ac_status=$?
16406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16407   (exit $ac_status); }; }; then
16408   acx_pthread_ok=yes
16409 else
16410   echo "$as_me: failed program was:" >&5
16411 sed 's/^/| /' conftest.$ac_ext >&5
16412
16413 acx_pthread_ok=no
16414 fi
16415 rm -f conftest.err conftest.$ac_objext \
16416       conftest$ac_exeext conftest.$ac_ext
16417
16418         if test "x$acx_pthread_ok" = xyes; then
16419             # Don't use options that are ignored by the compiler.
16420             # We find them by checking stderror.
16421             cat >conftest.$ac_ext <<_ACEOF
16422 int
16423 main (int argc, char **argv)
16424 {
16425   (void) argc;
16426   (void) argv;
16427   return 0;
16428 }
16429 _ACEOF
16430             rm -f conftest.$ac_objext conftest$ac_exeext
16431             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16432                 # we continue with more flags because Linux needs -lpthread
16433                 # for libpq builds on PostgreSQL.  The test above only
16434                 # tests for building binaries, not shared libraries.
16435                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16436                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16437             else   acx_pthread_ok=no
16438             fi
16439         fi
16440
16441         LIBS="$save_LIBS"
16442         CFLAGS="$save_CFLAGS"
16443
16444         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16445 echo "${ECHO_T}$acx_pthread_ok" >&6
16446 done
16447 fi
16448
16449 # Various other checks:
16450 if test "x$acx_pthread_ok" = xyes; then
16451         save_LIBS="$LIBS"
16452         LIBS="$PTHREAD_LIBS $LIBS"
16453         save_CFLAGS="$CFLAGS"
16454         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16455
16456         # Detect AIX lossage: threads are created detached by default
16457         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16458         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16459 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16460         cat >conftest.$ac_ext <<_ACEOF
16461 /* confdefs.h.  */
16462 _ACEOF
16463 cat confdefs.h >>conftest.$ac_ext
16464 cat >>conftest.$ac_ext <<_ACEOF
16465 /* end confdefs.h.  */
16466 #include <pthread.h>
16467 int
16468 main ()
16469 {
16470 int attr=PTHREAD_CREATE_JOINABLE;
16471   ;
16472   return 0;
16473 }
16474 _ACEOF
16475 rm -f conftest.$ac_objext conftest$ac_exeext
16476 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16477   (eval $ac_link) 2>conftest.er1
16478   ac_status=$?
16479   grep -v '^ *+' conftest.er1 >conftest.err
16480   rm -f conftest.er1
16481   cat conftest.err >&5
16482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16483   (exit $ac_status); } &&
16484          { ac_try='test -z "$ac_c_werror_flag"
16485                          || test ! -s conftest.err'
16486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16487   (eval $ac_try) 2>&5
16488   ac_status=$?
16489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16490   (exit $ac_status); }; } &&
16491          { ac_try='test -s conftest$ac_exeext'
16492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16493   (eval $ac_try) 2>&5
16494   ac_status=$?
16495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16496   (exit $ac_status); }; }; then
16497   ok=PTHREAD_CREATE_JOINABLE
16498 else
16499   echo "$as_me: failed program was:" >&5
16500 sed 's/^/| /' conftest.$ac_ext >&5
16501
16502 ok=unknown
16503 fi
16504 rm -f conftest.err conftest.$ac_objext \
16505       conftest$ac_exeext conftest.$ac_ext
16506         if test x"$ok" = xunknown; then
16507                 cat >conftest.$ac_ext <<_ACEOF
16508 /* confdefs.h.  */
16509 _ACEOF
16510 cat confdefs.h >>conftest.$ac_ext
16511 cat >>conftest.$ac_ext <<_ACEOF
16512 /* end confdefs.h.  */
16513 #include <pthread.h>
16514 int
16515 main ()
16516 {
16517 int attr=PTHREAD_CREATE_UNDETACHED;
16518   ;
16519   return 0;
16520 }
16521 _ACEOF
16522 rm -f conftest.$ac_objext conftest$ac_exeext
16523 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16524   (eval $ac_link) 2>conftest.er1
16525   ac_status=$?
16526   grep -v '^ *+' conftest.er1 >conftest.err
16527   rm -f conftest.er1
16528   cat conftest.err >&5
16529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16530   (exit $ac_status); } &&
16531          { ac_try='test -z "$ac_c_werror_flag"
16532                          || test ! -s conftest.err'
16533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16534   (eval $ac_try) 2>&5
16535   ac_status=$?
16536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16537   (exit $ac_status); }; } &&
16538          { ac_try='test -s conftest$ac_exeext'
16539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16540   (eval $ac_try) 2>&5
16541   ac_status=$?
16542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16543   (exit $ac_status); }; }; then
16544   ok=PTHREAD_CREATE_UNDETACHED
16545 else
16546   echo "$as_me: failed program was:" >&5
16547 sed 's/^/| /' conftest.$ac_ext >&5
16548
16549 ok=unknown
16550 fi
16551 rm -f conftest.err conftest.$ac_objext \
16552       conftest$ac_exeext conftest.$ac_ext
16553         fi
16554         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16555
16556 cat >>confdefs.h <<\_ACEOF
16557 #define PTHREAD_CREATE_JOINABLE $ok
16558 _ACEOF
16559
16560         fi
16561         echo "$as_me:$LINENO: result: ${ok}" >&5
16562 echo "${ECHO_T}${ok}" >&6
16563         if test x"$ok" = xunknown; then
16564                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16565 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16566         fi
16567
16568         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16569 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16570         flag=no
16571 # We always add these in PostgreSQL
16572 #       case "${host_cpu}-${host_os}" in
16573 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16574 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16575 #       esac
16576         echo "$as_me:$LINENO: result: ${flag}" >&5
16577 echo "${ECHO_T}${flag}" >&6
16578         if test "x$flag" != xno; then
16579                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16580         fi
16581
16582         LIBS="$save_LIBS"
16583         CFLAGS="$save_CFLAGS"
16584
16585 # Supporting cc_r would require a special CC in all places that
16586 # use libpq, and that is ugly, so we don't do it.  Users can still
16587 # define their compiler as cc_r to do thread builds of everything.
16588         # More AIX lossage: must compile with cc_r
16589         # Extract the first word of "cc_r", so it can be a program name with args.
16590 set dummy cc_r; ac_word=$2
16591 echo "$as_me:$LINENO: checking for $ac_word" >&5
16592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16593 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16594   echo $ECHO_N "(cached) $ECHO_C" >&6
16595 else
16596   if test -n "$PTHREAD_CC"; then
16597   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16598 else
16599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16600 for as_dir in $PATH
16601 do
16602   IFS=$as_save_IFS
16603   test -z "$as_dir" && as_dir=.
16604   for ac_exec_ext in '' $ac_executable_extensions; do
16605   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16606     ac_cv_prog_PTHREAD_CC="cc_r"
16607     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16608     break 2
16609   fi
16610 done
16611 done
16612
16613   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16614 fi
16615 fi
16616 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16617 if test -n "$PTHREAD_CC"; then
16618   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16619 echo "${ECHO_T}$PTHREAD_CC" >&6
16620 else
16621   echo "$as_me:$LINENO: result: no" >&5
16622 echo "${ECHO_T}no" >&6
16623 fi
16624
16625 else
16626         PTHREAD_CC="$CC"
16627 fi
16628
16629
16630
16631
16632
16633 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16634 if test x"$acx_pthread_ok" = xyes; then
16635
16636 cat >>confdefs.h <<\_ACEOF
16637 #define HAVE_PTHREAD 1
16638 _ACEOF
16639
16640         :
16641 else
16642         acx_pthread_ok=no
16643
16644 fi
16645 ac_ext=c
16646 ac_cpp='$CPP $CPPFLAGS'
16647 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16648 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16650
16651         # set thread flags
16652
16653 # Some platforms use these, so just defineed them.  They can't hurt if they
16654 # are not supported.
16655 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16656
16657
16658 # At this point, we don't want to muck with the compiler name for threading.
16659 # Let's see who fails, perhaps AIX.  2004-04-23
16660 if test "$PTHREAD_CC" != "$CC"; then
16661 { { echo "$as_me:$LINENO: error:
16662 PostgreSQL does not support platforms that require a special
16663 compiler binary for thread-safety.
16664 " >&5
16665 echo "$as_me: error:
16666 PostgreSQL does not support platforms that require a special
16667 compiler binary for thread-safety.
16668 " >&2;}
16669    { (exit 1); exit 1; }; }
16670 fi
16671
16672 if test "$THREAD_SUPPORT" = no; then
16673 { { echo "$as_me:$LINENO: error:
16674 Cannot enable threads on your platform.
16675 Your platform is known to not support thread-safe programs.
16676 For details, compile and run src/bin/pg_thread_test.
16677 " >&5
16678 echo "$as_me: error:
16679 Cannot enable threads on your platform.
16680 Your platform is known to not support thread-safe programs.
16681 For details, compile and run src/bin/pg_thread_test.
16682 " >&2;}
16683    { (exit 1); exit 1; }; }
16684 fi
16685
16686 # Check for *_r functions
16687 _CFLAGS="$CFLAGS"
16688 _LIBS="$LIBS"
16689 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16690 LIBS="$LIBS $PTHREAD_LIBS"
16691
16692 if test "${ac_cv_header_pthread_h+set}" = set; then
16693   echo "$as_me:$LINENO: checking for pthread.h" >&5
16694 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16695 if test "${ac_cv_header_pthread_h+set}" = set; then
16696   echo $ECHO_N "(cached) $ECHO_C" >&6
16697 fi
16698 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16699 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16700 else
16701   # Is the header compilable?
16702 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16703 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16704 cat >conftest.$ac_ext <<_ACEOF
16705 /* confdefs.h.  */
16706 _ACEOF
16707 cat confdefs.h >>conftest.$ac_ext
16708 cat >>conftest.$ac_ext <<_ACEOF
16709 /* end confdefs.h.  */
16710 $ac_includes_default
16711 #include <pthread.h>
16712 _ACEOF
16713 rm -f conftest.$ac_objext
16714 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16715   (eval $ac_compile) 2>conftest.er1
16716   ac_status=$?
16717   grep -v '^ *+' conftest.er1 >conftest.err
16718   rm -f conftest.er1
16719   cat conftest.err >&5
16720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16721   (exit $ac_status); } &&
16722          { ac_try='test -z "$ac_c_werror_flag"
16723                          || test ! -s conftest.err'
16724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16725   (eval $ac_try) 2>&5
16726   ac_status=$?
16727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728   (exit $ac_status); }; } &&
16729          { ac_try='test -s conftest.$ac_objext'
16730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16731   (eval $ac_try) 2>&5
16732   ac_status=$?
16733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16734   (exit $ac_status); }; }; then
16735   ac_header_compiler=yes
16736 else
16737   echo "$as_me: failed program was:" >&5
16738 sed 's/^/| /' conftest.$ac_ext >&5
16739
16740 ac_header_compiler=no
16741 fi
16742 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16743 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16744 echo "${ECHO_T}$ac_header_compiler" >&6
16745
16746 # Is the header present?
16747 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16748 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16749 cat >conftest.$ac_ext <<_ACEOF
16750 /* confdefs.h.  */
16751 _ACEOF
16752 cat confdefs.h >>conftest.$ac_ext
16753 cat >>conftest.$ac_ext <<_ACEOF
16754 /* end confdefs.h.  */
16755 #include <pthread.h>
16756 _ACEOF
16757 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16758   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16759   ac_status=$?
16760   grep -v '^ *+' conftest.er1 >conftest.err
16761   rm -f conftest.er1
16762   cat conftest.err >&5
16763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16764   (exit $ac_status); } >/dev/null; then
16765   if test -s conftest.err; then
16766     ac_cpp_err=$ac_c_preproc_warn_flag
16767     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16768   else
16769     ac_cpp_err=
16770   fi
16771 else
16772   ac_cpp_err=yes
16773 fi
16774 if test -z "$ac_cpp_err"; then
16775   ac_header_preproc=yes
16776 else
16777   echo "$as_me: failed program was:" >&5
16778 sed 's/^/| /' conftest.$ac_ext >&5
16779
16780   ac_header_preproc=no
16781 fi
16782 rm -f conftest.err conftest.$ac_ext
16783 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16784 echo "${ECHO_T}$ac_header_preproc" >&6
16785
16786 # So?  What about this header?
16787 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16788   yes:no: )
16789     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16790 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16791     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16792 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16793     ac_header_preproc=yes
16794     ;;
16795   no:yes:* )
16796     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16797 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16798     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16799 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16800     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16801 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16802     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16803 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16804     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16805 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16806     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16807 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16808     (
16809       cat <<\_ASBOX
16810 ## ---------------------------------------- ##
16811 ## Report this to pgsql-bugs@postgresql.org ##
16812 ## ---------------------------------------- ##
16813 _ASBOX
16814     ) |
16815       sed "s/^/$as_me: WARNING:     /" >&2
16816     ;;
16817 esac
16818 echo "$as_me:$LINENO: checking for pthread.h" >&5
16819 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16820 if test "${ac_cv_header_pthread_h+set}" = set; then
16821   echo $ECHO_N "(cached) $ECHO_C" >&6
16822 else
16823   ac_cv_header_pthread_h=$ac_header_preproc
16824 fi
16825 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16826 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16827
16828 fi
16829 if test $ac_cv_header_pthread_h = yes; then
16830   :
16831 else
16832   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16833 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16834    { (exit 1); exit 1; }; }
16835 fi
16836
16837
16838
16839
16840
16841
16842 for ac_func in strerror_r getpwuid_r gethostbyname_r
16843 do
16844 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16845 echo "$as_me:$LINENO: checking for $ac_func" >&5
16846 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16847 if eval "test \"\${$as_ac_var+set}\" = set"; then
16848   echo $ECHO_N "(cached) $ECHO_C" >&6
16849 else
16850   cat >conftest.$ac_ext <<_ACEOF
16851 /* confdefs.h.  */
16852 _ACEOF
16853 cat confdefs.h >>conftest.$ac_ext
16854 cat >>conftest.$ac_ext <<_ACEOF
16855 /* end confdefs.h.  */
16856 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16857    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16858 #define $ac_func innocuous_$ac_func
16859
16860 /* System header to define __stub macros and hopefully few prototypes,
16861     which can conflict with char $ac_func (); below.
16862     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16863     <limits.h> exists even on freestanding compilers.  */
16864
16865 #ifdef __STDC__
16866 # include <limits.h>
16867 #else
16868 # include <assert.h>
16869 #endif
16870
16871 #undef $ac_func
16872
16873 /* Override any gcc2 internal prototype to avoid an error.  */
16874 #ifdef __cplusplus
16875 extern "C"
16876 {
16877 #endif
16878 /* We use char because int might match the return type of a gcc2
16879    builtin and then its argument prototype would still apply.  */
16880 char $ac_func ();
16881 /* The GNU C library defines this for functions which it implements
16882     to always fail with ENOSYS.  Some functions are actually named
16883     something starting with __ and the normal name is an alias.  */
16884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16885 choke me
16886 #else
16887 char (*f) () = $ac_func;
16888 #endif
16889 #ifdef __cplusplus
16890 }
16891 #endif
16892
16893 int
16894 main ()
16895 {
16896 return f != $ac_func;
16897   ;
16898   return 0;
16899 }
16900 _ACEOF
16901 rm -f conftest.$ac_objext conftest$ac_exeext
16902 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16903   (eval $ac_link) 2>conftest.er1
16904   ac_status=$?
16905   grep -v '^ *+' conftest.er1 >conftest.err
16906   rm -f conftest.er1
16907   cat conftest.err >&5
16908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16909   (exit $ac_status); } &&
16910          { ac_try='test -z "$ac_c_werror_flag"
16911                          || test ! -s conftest.err'
16912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16913   (eval $ac_try) 2>&5
16914   ac_status=$?
16915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16916   (exit $ac_status); }; } &&
16917          { ac_try='test -s conftest$ac_exeext'
16918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16919   (eval $ac_try) 2>&5
16920   ac_status=$?
16921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16922   (exit $ac_status); }; }; then
16923   eval "$as_ac_var=yes"
16924 else
16925   echo "$as_me: failed program was:" >&5
16926 sed 's/^/| /' conftest.$ac_ext >&5
16927
16928 eval "$as_ac_var=no"
16929 fi
16930 rm -f conftest.err conftest.$ac_objext \
16931       conftest$ac_exeext conftest.$ac_ext
16932 fi
16933 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16934 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16935 if test `eval echo '${'$as_ac_var'}'` = yes; then
16936   cat >>confdefs.h <<_ACEOF
16937 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16938 _ACEOF
16939
16940 fi
16941 done
16942
16943
16944 # Do test here with the proper thread flags
16945 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
16946 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
16947 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
16948   echo $ECHO_N "(cached) $ECHO_C" >&6
16949 else
16950   cat >conftest.$ac_ext <<_ACEOF
16951 /* confdefs.h.  */
16952 _ACEOF
16953 cat confdefs.h >>conftest.$ac_ext
16954 cat >>conftest.$ac_ext <<_ACEOF
16955 /* end confdefs.h.  */
16956 #include <sys/types.h>
16957 #include <pwd.h>
16958 int
16959 main ()
16960 {
16961 uid_t uid;
16962 struct passwd *space;
16963 char *buf;
16964 size_t bufsize;
16965 struct passwd **result;
16966 getpwuid_r(uid, space, buf, bufsize, result);
16967   ;
16968   return 0;
16969 }
16970 _ACEOF
16971 rm -f conftest.$ac_objext
16972 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16973   (eval $ac_compile) 2>conftest.er1
16974   ac_status=$?
16975   grep -v '^ *+' conftest.er1 >conftest.err
16976   rm -f conftest.er1
16977   cat conftest.err >&5
16978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16979   (exit $ac_status); } &&
16980          { ac_try='test -z "$ac_c_werror_flag"
16981                          || test ! -s conftest.err'
16982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16983   (eval $ac_try) 2>&5
16984   ac_status=$?
16985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16986   (exit $ac_status); }; } &&
16987          { ac_try='test -s conftest.$ac_objext'
16988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16989   (eval $ac_try) 2>&5
16990   ac_status=$?
16991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16992   (exit $ac_status); }; }; then
16993   pgac_func_getpwuid_r_5arg=yes
16994 else
16995   echo "$as_me: failed program was:" >&5
16996 sed 's/^/| /' conftest.$ac_ext >&5
16997
16998 pgac_func_getpwuid_r_5arg=no
16999 fi
17000 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17001 fi
17002 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17003 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17004 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17005
17006 cat >>confdefs.h <<\_ACEOF
17007 #define GETPWUID_R_5ARG
17008 _ACEOF
17009
17010 fi
17011
17012 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17013 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17014 if test "${pgac_func_strerror_r_int+set}" = set; then
17015   echo $ECHO_N "(cached) $ECHO_C" >&6
17016 else
17017   cat >conftest.$ac_ext <<_ACEOF
17018 /* confdefs.h.  */
17019 _ACEOF
17020 cat confdefs.h >>conftest.$ac_ext
17021 cat >>conftest.$ac_ext <<_ACEOF
17022 /* end confdefs.h.  */
17023 #include <string.h>
17024 int
17025 main ()
17026 {
17027 #ifndef _AIX
17028 int strerror_r(int, char *, size_t);
17029 #else
17030 /* Older AIX has 'int' for the third argument so we don't test the args. */
17031 int strerror_r();
17032 #endif
17033   ;
17034   return 0;
17035 }
17036 _ACEOF
17037 rm -f conftest.$ac_objext
17038 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17039   (eval $ac_compile) 2>conftest.er1
17040   ac_status=$?
17041   grep -v '^ *+' conftest.er1 >conftest.err
17042   rm -f conftest.er1
17043   cat conftest.err >&5
17044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17045   (exit $ac_status); } &&
17046          { ac_try='test -z "$ac_c_werror_flag"
17047                          || test ! -s conftest.err'
17048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17049   (eval $ac_try) 2>&5
17050   ac_status=$?
17051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17052   (exit $ac_status); }; } &&
17053          { ac_try='test -s conftest.$ac_objext'
17054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17055   (eval $ac_try) 2>&5
17056   ac_status=$?
17057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17058   (exit $ac_status); }; }; then
17059   pgac_func_strerror_r_int=yes
17060 else
17061   echo "$as_me: failed program was:" >&5
17062 sed 's/^/| /' conftest.$ac_ext >&5
17063
17064 pgac_func_strerror_r_int=no
17065 fi
17066 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17067 fi
17068 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17069 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17070 if test x"$pgac_func_strerror_r_int" = xyes ; then
17071
17072 cat >>confdefs.h <<\_ACEOF
17073 #define STRERROR_R_INT
17074 _ACEOF
17075
17076 fi
17077
17078
17079 CFLAGS="$_CFLAGS"
17080 LIBS="$_LIBS"
17081
17082 else
17083 # do not use values from template file
17084 PTHREAD_CFLAGS=
17085 PTHREAD_LIBS=
17086 fi
17087
17088
17089
17090
17091
17092 # This test makes sure that run tests work at all.  Sometimes a shared
17093 # library is found by the linker, but the runtime linker can't find it.
17094 # This check should come after all modifications of compiler or linker
17095 # variables, and before any other run tests.
17096 echo "$as_me:$LINENO: checking test program" >&5
17097 echo $ECHO_N "checking test program... $ECHO_C" >&6
17098 if test "$cross_compiling" = yes; then
17099   echo "$as_me:$LINENO: result: cross-compiling" >&5
17100 echo "${ECHO_T}cross-compiling" >&6
17101 else
17102   cat >conftest.$ac_ext <<_ACEOF
17103 /* confdefs.h.  */
17104 _ACEOF
17105 cat confdefs.h >>conftest.$ac_ext
17106 cat >>conftest.$ac_ext <<_ACEOF
17107 /* end confdefs.h.  */
17108 int main() { return 0; }
17109 _ACEOF
17110 rm -f conftest$ac_exeext
17111 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17112   (eval $ac_link) 2>&5
17113   ac_status=$?
17114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17115   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17117   (eval $ac_try) 2>&5
17118   ac_status=$?
17119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17120   (exit $ac_status); }; }; then
17121   echo "$as_me:$LINENO: result: ok" >&5
17122 echo "${ECHO_T}ok" >&6
17123 else
17124   echo "$as_me: program exited with status $ac_status" >&5
17125 echo "$as_me: failed program was:" >&5
17126 sed 's/^/| /' conftest.$ac_ext >&5
17127
17128 ( exit $ac_status )
17129 echo "$as_me:$LINENO: result: failed" >&5
17130 echo "${ECHO_T}failed" >&6
17131 { { echo "$as_me:$LINENO: error:
17132 *** Could not execute a simple test program.  This may be a problem
17133 *** related to locating shared libraries.  Check the file 'config.log'
17134 *** for the exact reason." >&5
17135 echo "$as_me: error:
17136 *** Could not execute a simple test program.  This may be a problem
17137 *** related to locating shared libraries.  Check the file 'config.log'
17138 *** for the exact reason." >&2;}
17139    { (exit 1); exit 1; }; }
17140 fi
17141 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17142 fi
17143
17144
17145 # Force use of our snprintf if system's doesn't do arg control
17146 # This feature is used by NLS
17147 if test "$enable_nls" = yes &&
17148    test $pgac_need_repl_snprintf = no &&
17149 # On Win32, libintl replaces snprintf() with its own version that
17150 # understands arg control, so we don't need our own.  In fact, it
17151 # also uses macros that conflict with ours, so we _can't_ use
17152 # our own.
17153    test "$PORTNAME" != "win32"; then
17154   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17155 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17156 if test "${pgac_cv_printf_arg_control+set}" = set; then
17157   echo $ECHO_N "(cached) $ECHO_C" >&6
17158 else
17159   if test "$cross_compiling" = yes; then
17160   pgac_cv_printf_arg_control=cross
17161 else
17162   cat >conftest.$ac_ext <<_ACEOF
17163 /* confdefs.h.  */
17164 _ACEOF
17165 cat confdefs.h >>conftest.$ac_ext
17166 cat >>conftest.$ac_ext <<_ACEOF
17167 /* end confdefs.h.  */
17168 #include <stdio.h>
17169 #include <string.h>
17170
17171 int main()
17172 {
17173   char buf[100];
17174
17175   /* can it swap arguments? */
17176   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17177   if (strcmp(buf, "4 3") != 0)
17178     return 1;
17179   return 0;
17180 }
17181 _ACEOF
17182 rm -f conftest$ac_exeext
17183 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17184   (eval $ac_link) 2>&5
17185   ac_status=$?
17186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17187   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17189   (eval $ac_try) 2>&5
17190   ac_status=$?
17191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17192   (exit $ac_status); }; }; then
17193   pgac_cv_printf_arg_control=yes
17194 else
17195   echo "$as_me: program exited with status $ac_status" >&5
17196 echo "$as_me: failed program was:" >&5
17197 sed 's/^/| /' conftest.$ac_ext >&5
17198
17199 ( exit $ac_status )
17200 pgac_cv_printf_arg_control=no
17201 fi
17202 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17203 fi
17204
17205 fi
17206 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17207 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17208
17209   if test $pgac_cv_printf_arg_control != yes ; then
17210     pgac_need_repl_snprintf=yes
17211   fi
17212 fi
17213
17214
17215
17216 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17217 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17218 if test "${pgac_cv_type_long_int_64+set}" = set; then
17219   echo $ECHO_N "(cached) $ECHO_C" >&6
17220 else
17221   if test "$cross_compiling" = yes; then
17222   # If cross-compiling, check the size reported by the compiler and
17223 # trust that the arithmetic works.
17224 cat >conftest.$ac_ext <<_ACEOF
17225 /* confdefs.h.  */
17226 _ACEOF
17227 cat confdefs.h >>conftest.$ac_ext
17228 cat >>conftest.$ac_ext <<_ACEOF
17229 /* end confdefs.h.  */
17230
17231 int
17232 main ()
17233 {
17234 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17235 test_array [0] = 0
17236
17237   ;
17238   return 0;
17239 }
17240 _ACEOF
17241 rm -f conftest.$ac_objext
17242 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17243   (eval $ac_compile) 2>conftest.er1
17244   ac_status=$?
17245   grep -v '^ *+' conftest.er1 >conftest.err
17246   rm -f conftest.er1
17247   cat conftest.err >&5
17248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17249   (exit $ac_status); } &&
17250          { ac_try='test -z "$ac_c_werror_flag"
17251                          || test ! -s conftest.err'
17252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17253   (eval $ac_try) 2>&5
17254   ac_status=$?
17255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17256   (exit $ac_status); }; } &&
17257          { ac_try='test -s conftest.$ac_objext'
17258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17259   (eval $ac_try) 2>&5
17260   ac_status=$?
17261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17262   (exit $ac_status); }; }; then
17263   pgac_cv_type_long_int_64=yes
17264 else
17265   echo "$as_me: failed program was:" >&5
17266 sed 's/^/| /' conftest.$ac_ext >&5
17267
17268 pgac_cv_type_long_int_64=no
17269 fi
17270 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17271 else
17272   cat >conftest.$ac_ext <<_ACEOF
17273 /* confdefs.h.  */
17274 _ACEOF
17275 cat confdefs.h >>conftest.$ac_ext
17276 cat >>conftest.$ac_ext <<_ACEOF
17277 /* end confdefs.h.  */
17278 typedef long int ac_int64;
17279
17280 /*
17281  * These are globals to discourage the compiler from folding all the
17282  * arithmetic tests down to compile-time constants.
17283  */
17284 ac_int64 a = 20000001;
17285 ac_int64 b = 40000005;
17286
17287 int does_int64_work()
17288 {
17289   ac_int64 c,d;
17290
17291   if (sizeof(ac_int64) != 8)
17292     return 0;                   /* definitely not the right size */
17293
17294   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17295   c = a * b;
17296   d = (c + b) / b;
17297   if (d != a+1)
17298     return 0;
17299   return 1;
17300 }
17301 main() {
17302   exit(! does_int64_work());
17303 }
17304 _ACEOF
17305 rm -f conftest$ac_exeext
17306 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17307   (eval $ac_link) 2>&5
17308   ac_status=$?
17309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17310   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17312   (eval $ac_try) 2>&5
17313   ac_status=$?
17314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17315   (exit $ac_status); }; }; then
17316   pgac_cv_type_long_int_64=yes
17317 else
17318   echo "$as_me: program exited with status $ac_status" >&5
17319 echo "$as_me: failed program was:" >&5
17320 sed 's/^/| /' conftest.$ac_ext >&5
17321
17322 ( exit $ac_status )
17323 pgac_cv_type_long_int_64=no
17324 fi
17325 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17326 fi
17327 fi
17328 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17329 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17330
17331 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17332 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17333
17334 cat >>confdefs.h <<\_ACEOF
17335 #define HAVE_LONG_INT_64
17336 _ACEOF
17337
17338 fi
17339
17340
17341 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17342   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17343 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17344 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17345   echo $ECHO_N "(cached) $ECHO_C" >&6
17346 else
17347   if test "$cross_compiling" = yes; then
17348   # If cross-compiling, check the size reported by the compiler and
17349 # trust that the arithmetic works.
17350 cat >conftest.$ac_ext <<_ACEOF
17351 /* confdefs.h.  */
17352 _ACEOF
17353 cat confdefs.h >>conftest.$ac_ext
17354 cat >>conftest.$ac_ext <<_ACEOF
17355 /* end confdefs.h.  */
17356
17357 int
17358 main ()
17359 {
17360 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17361 test_array [0] = 0
17362
17363   ;
17364   return 0;
17365 }
17366 _ACEOF
17367 rm -f conftest.$ac_objext
17368 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17369   (eval $ac_compile) 2>conftest.er1
17370   ac_status=$?
17371   grep -v '^ *+' conftest.er1 >conftest.err
17372   rm -f conftest.er1
17373   cat conftest.err >&5
17374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17375   (exit $ac_status); } &&
17376          { ac_try='test -z "$ac_c_werror_flag"
17377                          || test ! -s conftest.err'
17378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17379   (eval $ac_try) 2>&5
17380   ac_status=$?
17381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17382   (exit $ac_status); }; } &&
17383          { ac_try='test -s conftest.$ac_objext'
17384   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17385   (eval $ac_try) 2>&5
17386   ac_status=$?
17387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17388   (exit $ac_status); }; }; then
17389   pgac_cv_type_long_long_int_64=yes
17390 else
17391   echo "$as_me: failed program was:" >&5
17392 sed 's/^/| /' conftest.$ac_ext >&5
17393
17394 pgac_cv_type_long_long_int_64=no
17395 fi
17396 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17397 else
17398   cat >conftest.$ac_ext <<_ACEOF
17399 /* confdefs.h.  */
17400 _ACEOF
17401 cat confdefs.h >>conftest.$ac_ext
17402 cat >>conftest.$ac_ext <<_ACEOF
17403 /* end confdefs.h.  */
17404 typedef long long int ac_int64;
17405
17406 /*
17407  * These are globals to discourage the compiler from folding all the
17408  * arithmetic tests down to compile-time constants.
17409  */
17410 ac_int64 a = 20000001;
17411 ac_int64 b = 40000005;
17412
17413 int does_int64_work()
17414 {
17415   ac_int64 c,d;
17416
17417   if (sizeof(ac_int64) != 8)
17418     return 0;                   /* definitely not the right size */
17419
17420   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17421   c = a * b;
17422   d = (c + b) / b;
17423   if (d != a+1)
17424     return 0;
17425   return 1;
17426 }
17427 main() {
17428   exit(! does_int64_work());
17429 }
17430 _ACEOF
17431 rm -f conftest$ac_exeext
17432 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17433   (eval $ac_link) 2>&5
17434   ac_status=$?
17435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17438   (eval $ac_try) 2>&5
17439   ac_status=$?
17440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17441   (exit $ac_status); }; }; then
17442   pgac_cv_type_long_long_int_64=yes
17443 else
17444   echo "$as_me: program exited with status $ac_status" >&5
17445 echo "$as_me: failed program was:" >&5
17446 sed 's/^/| /' conftest.$ac_ext >&5
17447
17448 ( exit $ac_status )
17449 pgac_cv_type_long_long_int_64=no
17450 fi
17451 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17452 fi
17453 fi
17454 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17455 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17456
17457 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17458 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17459
17460 cat >>confdefs.h <<\_ACEOF
17461 #define HAVE_LONG_LONG_INT_64
17462 _ACEOF
17463
17464 fi
17465
17466 fi
17467
17468
17469
17470 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17471   cat >conftest.$ac_ext <<_ACEOF
17472 /* confdefs.h.  */
17473 _ACEOF
17474 cat confdefs.h >>conftest.$ac_ext
17475 cat >>conftest.$ac_ext <<_ACEOF
17476 /* end confdefs.h.  */
17477
17478 #define INT64CONST(x)  x##LL
17479 long long int foo = INT64CONST(0x1234567890123456);
17480
17481 int
17482 main ()
17483 {
17484
17485   ;
17486   return 0;
17487 }
17488 _ACEOF
17489 rm -f conftest.$ac_objext
17490 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17491   (eval $ac_compile) 2>conftest.er1
17492   ac_status=$?
17493   grep -v '^ *+' conftest.er1 >conftest.err
17494   rm -f conftest.er1
17495   cat conftest.err >&5
17496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17497   (exit $ac_status); } &&
17498          { ac_try='test -z "$ac_c_werror_flag"
17499                          || test ! -s conftest.err'
17500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17501   (eval $ac_try) 2>&5
17502   ac_status=$?
17503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17504   (exit $ac_status); }; } &&
17505          { ac_try='test -s conftest.$ac_objext'
17506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17507   (eval $ac_try) 2>&5
17508   ac_status=$?
17509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17510   (exit $ac_status); }; }; then
17511
17512 cat >>confdefs.h <<\_ACEOF
17513 #define HAVE_LL_CONSTANTS 1
17514 _ACEOF
17515
17516 else
17517   echo "$as_me: failed program was:" >&5
17518 sed 's/^/| /' conftest.$ac_ext >&5
17519
17520 fi
17521 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17522 fi
17523
17524
17525 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17526 # we found we need to use "long long int", better check.  We cope with
17527 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17528 # work, fall back to our own snprintf emulation (which we know uses %lld).
17529
17530 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17531   if test $pgac_need_repl_snprintf = no; then
17532     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17533 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17534 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17535   echo $ECHO_N "(cached) $ECHO_C" >&6
17536 else
17537   for pgac_format in '%lld' '%qd' '%I64d'; do
17538 if test "$cross_compiling" = yes; then
17539   pgac_cv_snprintf_long_long_int_format=cross; break
17540 else
17541   cat >conftest.$ac_ext <<_ACEOF
17542 /* confdefs.h.  */
17543 _ACEOF
17544 cat confdefs.h >>conftest.$ac_ext
17545 cat >>conftest.$ac_ext <<_ACEOF
17546 /* end confdefs.h.  */
17547 #include <stdio.h>
17548 typedef long long int ac_int64;
17549 #define INT64_FORMAT "$pgac_format"
17550
17551 ac_int64 a = 20000001;
17552 ac_int64 b = 40000005;
17553
17554 int does_int64_snprintf_work()
17555 {
17556   ac_int64 c;
17557   char buf[100];
17558
17559   if (sizeof(ac_int64) != 8)
17560     return 0;                   /* doesn't look like the right size */
17561
17562   c = a * b;
17563   snprintf(buf, 100, INT64_FORMAT, c);
17564   if (strcmp(buf, "800000140000005") != 0)
17565     return 0;                   /* either multiply or snprintf is busted */
17566   return 1;
17567 }
17568 main() {
17569   exit(! does_int64_snprintf_work());
17570 }
17571 _ACEOF
17572 rm -f conftest$ac_exeext
17573 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17574   (eval $ac_link) 2>&5
17575   ac_status=$?
17576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17577   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17579   (eval $ac_try) 2>&5
17580   ac_status=$?
17581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17582   (exit $ac_status); }; }; then
17583   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17584 else
17585   echo "$as_me: program exited with status $ac_status" >&5
17586 echo "$as_me: failed program was:" >&5
17587 sed 's/^/| /' conftest.$ac_ext >&5
17588
17589 fi
17590 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17591 fi
17592 done
17593 fi
17594
17595 LONG_LONG_INT_FORMAT=''
17596
17597 case $pgac_cv_snprintf_long_long_int_format in
17598   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17599 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17600   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17601 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17602          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17603   *)     echo "$as_me:$LINENO: result: none" >&5
17604 echo "${ECHO_T}none" >&6;;
17605 esac
17606     if test "$LONG_LONG_INT_FORMAT" = ""; then
17607       # Force usage of our own snprintf, since system snprintf is broken
17608       pgac_need_repl_snprintf=yes
17609       LONG_LONG_INT_FORMAT='%lld'
17610     fi
17611   else
17612     # Here if we previously decided we needed to use our own snprintf
17613     LONG_LONG_INT_FORMAT='%lld'
17614   fi
17615   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17616   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17617   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17618 else
17619   # Here if we are not using 'long long int' at all
17620   INT64_FORMAT='"%ld"'
17621   UINT64_FORMAT='"%lu"'
17622 fi
17623
17624
17625 cat >>confdefs.h <<_ACEOF
17626 #define INT64_FORMAT $INT64_FORMAT
17627 _ACEOF
17628
17629
17630
17631 cat >>confdefs.h <<_ACEOF
17632 #define UINT64_FORMAT $UINT64_FORMAT
17633 _ACEOF
17634
17635
17636 # Now we have checked all the reasons to replace snprintf
17637 if test $pgac_need_repl_snprintf = yes; then
17638
17639 cat >>confdefs.h <<\_ACEOF
17640 #define USE_SNPRINTF 1
17641 _ACEOF
17642
17643   case $LIBOBJS in
17644     "snprintf.$ac_objext"   | \
17645   *" snprintf.$ac_objext"   | \
17646     "snprintf.$ac_objext "* | \
17647   *" snprintf.$ac_objext "* ) ;;
17648   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17649 esac
17650
17651 fi
17652
17653 # Need a #define for the size of Datum (unsigned long)
17654 echo "$as_me:$LINENO: checking for unsigned long" >&5
17655 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17656 if test "${ac_cv_type_unsigned_long+set}" = set; then
17657   echo $ECHO_N "(cached) $ECHO_C" >&6
17658 else
17659   cat >conftest.$ac_ext <<_ACEOF
17660 /* confdefs.h.  */
17661 _ACEOF
17662 cat confdefs.h >>conftest.$ac_ext
17663 cat >>conftest.$ac_ext <<_ACEOF
17664 /* end confdefs.h.  */
17665 $ac_includes_default
17666 int
17667 main ()
17668 {
17669 if ((unsigned long *) 0)
17670   return 0;
17671 if (sizeof (unsigned long))
17672   return 0;
17673   ;
17674   return 0;
17675 }
17676 _ACEOF
17677 rm -f conftest.$ac_objext
17678 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17679   (eval $ac_compile) 2>conftest.er1
17680   ac_status=$?
17681   grep -v '^ *+' conftest.er1 >conftest.err
17682   rm -f conftest.er1
17683   cat conftest.err >&5
17684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17685   (exit $ac_status); } &&
17686          { ac_try='test -z "$ac_c_werror_flag"
17687                          || test ! -s conftest.err'
17688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17689   (eval $ac_try) 2>&5
17690   ac_status=$?
17691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17692   (exit $ac_status); }; } &&
17693          { ac_try='test -s conftest.$ac_objext'
17694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17695   (eval $ac_try) 2>&5
17696   ac_status=$?
17697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17698   (exit $ac_status); }; }; then
17699   ac_cv_type_unsigned_long=yes
17700 else
17701   echo "$as_me: failed program was:" >&5
17702 sed 's/^/| /' conftest.$ac_ext >&5
17703
17704 ac_cv_type_unsigned_long=no
17705 fi
17706 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17707 fi
17708 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
17709 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
17710
17711 echo "$as_me:$LINENO: checking size of unsigned long" >&5
17712 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
17713 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
17714   echo $ECHO_N "(cached) $ECHO_C" >&6
17715 else
17716   if test "$ac_cv_type_unsigned_long" = yes; then
17717   # The cast to unsigned long works around a bug in the HP C Compiler
17718   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17719   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17720   # This bug is HP SR number 8606223364.
17721   if test "$cross_compiling" = yes; then
17722   # Depending upon the size, compute the lo and hi bounds.
17723 cat >conftest.$ac_ext <<_ACEOF
17724 /* confdefs.h.  */
17725 _ACEOF
17726 cat confdefs.h >>conftest.$ac_ext
17727 cat >>conftest.$ac_ext <<_ACEOF
17728 /* end confdefs.h.  */
17729 $ac_includes_default
17730 int
17731 main ()
17732 {
17733 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
17734 test_array [0] = 0
17735
17736   ;
17737   return 0;
17738 }
17739 _ACEOF
17740 rm -f conftest.$ac_objext
17741 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17742   (eval $ac_compile) 2>conftest.er1
17743   ac_status=$?
17744   grep -v '^ *+' conftest.er1 >conftest.err
17745   rm -f conftest.er1
17746   cat conftest.err >&5
17747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17748   (exit $ac_status); } &&
17749          { ac_try='test -z "$ac_c_werror_flag"
17750                          || test ! -s conftest.err'
17751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17752   (eval $ac_try) 2>&5
17753   ac_status=$?
17754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17755   (exit $ac_status); }; } &&
17756          { ac_try='test -s conftest.$ac_objext'
17757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17758   (eval $ac_try) 2>&5
17759   ac_status=$?
17760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17761   (exit $ac_status); }; }; then
17762   ac_lo=0 ac_mid=0
17763   while :; do
17764     cat >conftest.$ac_ext <<_ACEOF
17765 /* confdefs.h.  */
17766 _ACEOF
17767 cat confdefs.h >>conftest.$ac_ext
17768 cat >>conftest.$ac_ext <<_ACEOF
17769 /* end confdefs.h.  */
17770 $ac_includes_default
17771 int
17772 main ()
17773 {
17774 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17775 test_array [0] = 0
17776
17777   ;
17778   return 0;
17779 }
17780 _ACEOF
17781 rm -f conftest.$ac_objext
17782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17783   (eval $ac_compile) 2>conftest.er1
17784   ac_status=$?
17785   grep -v '^ *+' conftest.er1 >conftest.err
17786   rm -f conftest.er1
17787   cat conftest.err >&5
17788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17789   (exit $ac_status); } &&
17790          { ac_try='test -z "$ac_c_werror_flag"
17791                          || test ! -s conftest.err'
17792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17793   (eval $ac_try) 2>&5
17794   ac_status=$?
17795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17796   (exit $ac_status); }; } &&
17797          { ac_try='test -s conftest.$ac_objext'
17798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17799   (eval $ac_try) 2>&5
17800   ac_status=$?
17801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17802   (exit $ac_status); }; }; then
17803   ac_hi=$ac_mid; break
17804 else
17805   echo "$as_me: failed program was:" >&5
17806 sed 's/^/| /' conftest.$ac_ext >&5
17807
17808 ac_lo=`expr $ac_mid + 1`
17809                     if test $ac_lo -le $ac_mid; then
17810                       ac_lo= ac_hi=
17811                       break
17812                     fi
17813                     ac_mid=`expr 2 '*' $ac_mid + 1`
17814 fi
17815 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17816   done
17817 else
17818   echo "$as_me: failed program was:" >&5
17819 sed 's/^/| /' conftest.$ac_ext >&5
17820
17821 cat >conftest.$ac_ext <<_ACEOF
17822 /* confdefs.h.  */
17823 _ACEOF
17824 cat confdefs.h >>conftest.$ac_ext
17825 cat >>conftest.$ac_ext <<_ACEOF
17826 /* end confdefs.h.  */
17827 $ac_includes_default
17828 int
17829 main ()
17830 {
17831 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
17832 test_array [0] = 0
17833
17834   ;
17835   return 0;
17836 }
17837 _ACEOF
17838 rm -f conftest.$ac_objext
17839 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17840   (eval $ac_compile) 2>conftest.er1
17841   ac_status=$?
17842   grep -v '^ *+' conftest.er1 >conftest.err
17843   rm -f conftest.er1
17844   cat conftest.err >&5
17845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17846   (exit $ac_status); } &&
17847          { ac_try='test -z "$ac_c_werror_flag"
17848                          || test ! -s conftest.err'
17849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17850   (eval $ac_try) 2>&5
17851   ac_status=$?
17852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17853   (exit $ac_status); }; } &&
17854          { ac_try='test -s conftest.$ac_objext'
17855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17856   (eval $ac_try) 2>&5
17857   ac_status=$?
17858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17859   (exit $ac_status); }; }; then
17860   ac_hi=-1 ac_mid=-1
17861   while :; do
17862     cat >conftest.$ac_ext <<_ACEOF
17863 /* confdefs.h.  */
17864 _ACEOF
17865 cat confdefs.h >>conftest.$ac_ext
17866 cat >>conftest.$ac_ext <<_ACEOF
17867 /* end confdefs.h.  */
17868 $ac_includes_default
17869 int
17870 main ()
17871 {
17872 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
17873 test_array [0] = 0
17874
17875   ;
17876   return 0;
17877 }
17878 _ACEOF
17879 rm -f conftest.$ac_objext
17880 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17881   (eval $ac_compile) 2>conftest.er1
17882   ac_status=$?
17883   grep -v '^ *+' conftest.er1 >conftest.err
17884   rm -f conftest.er1
17885   cat conftest.err >&5
17886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17887   (exit $ac_status); } &&
17888          { ac_try='test -z "$ac_c_werror_flag"
17889                          || test ! -s conftest.err'
17890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17891   (eval $ac_try) 2>&5
17892   ac_status=$?
17893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17894   (exit $ac_status); }; } &&
17895          { ac_try='test -s conftest.$ac_objext'
17896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17897   (eval $ac_try) 2>&5
17898   ac_status=$?
17899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17900   (exit $ac_status); }; }; then
17901   ac_lo=$ac_mid; break
17902 else
17903   echo "$as_me: failed program was:" >&5
17904 sed 's/^/| /' conftest.$ac_ext >&5
17905
17906 ac_hi=`expr '(' $ac_mid ')' - 1`
17907                        if test $ac_mid -le $ac_hi; then
17908                          ac_lo= ac_hi=
17909                          break
17910                        fi
17911                        ac_mid=`expr 2 '*' $ac_mid`
17912 fi
17913 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17914   done
17915 else
17916   echo "$as_me: failed program was:" >&5
17917 sed 's/^/| /' conftest.$ac_ext >&5
17918
17919 ac_lo= ac_hi=
17920 fi
17921 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17922 fi
17923 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17924 # Binary search between lo and hi bounds.
17925 while test "x$ac_lo" != "x$ac_hi"; do
17926   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17927   cat >conftest.$ac_ext <<_ACEOF
17928 /* confdefs.h.  */
17929 _ACEOF
17930 cat confdefs.h >>conftest.$ac_ext
17931 cat >>conftest.$ac_ext <<_ACEOF
17932 /* end confdefs.h.  */
17933 $ac_includes_default
17934 int
17935 main ()
17936 {
17937 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17938 test_array [0] = 0
17939
17940   ;
17941   return 0;
17942 }
17943 _ACEOF
17944 rm -f conftest.$ac_objext
17945 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17946   (eval $ac_compile) 2>conftest.er1
17947   ac_status=$?
17948   grep -v '^ *+' conftest.er1 >conftest.err
17949   rm -f conftest.er1
17950   cat conftest.err >&5
17951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17952   (exit $ac_status); } &&
17953          { ac_try='test -z "$ac_c_werror_flag"
17954                          || test ! -s conftest.err'
17955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17956   (eval $ac_try) 2>&5
17957   ac_status=$?
17958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17959   (exit $ac_status); }; } &&
17960          { ac_try='test -s conftest.$ac_objext'
17961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17962   (eval $ac_try) 2>&5
17963   ac_status=$?
17964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17965   (exit $ac_status); }; }; then
17966   ac_hi=$ac_mid
17967 else
17968   echo "$as_me: failed program was:" >&5
17969 sed 's/^/| /' conftest.$ac_ext >&5
17970
17971 ac_lo=`expr '(' $ac_mid ')' + 1`
17972 fi
17973 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17974 done
17975 case $ac_lo in
17976 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
17977 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
17978 See \`config.log' for more details." >&5
17979 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
17980 See \`config.log' for more details." >&2;}
17981    { (exit 1); exit 1; }; } ;;
17982 esac
17983 else
17984   if test "$cross_compiling" = yes; then
17985   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17986 See \`config.log' for more details." >&5
17987 echo "$as_me: error: cannot run test program while cross compiling
17988 See \`config.log' for more details." >&2;}
17989    { (exit 1); exit 1; }; }
17990 else
17991   cat >conftest.$ac_ext <<_ACEOF
17992 /* confdefs.h.  */
17993 _ACEOF
17994 cat confdefs.h >>conftest.$ac_ext
17995 cat >>conftest.$ac_ext <<_ACEOF
17996 /* end confdefs.h.  */
17997 $ac_includes_default
17998 long longval () { return (long) (sizeof (unsigned long)); }
17999 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18000 #include <stdio.h>
18001 #include <stdlib.h>
18002 int
18003 main ()
18004 {
18005
18006   FILE *f = fopen ("conftest.val", "w");
18007   if (! f)
18008     exit (1);
18009   if (((long) (sizeof (unsigned long))) < 0)
18010     {
18011       long i = longval ();
18012       if (i != ((long) (sizeof (unsigned long))))
18013         exit (1);
18014       fprintf (f, "%ld\n", i);
18015     }
18016   else
18017     {
18018       unsigned long i = ulongval ();
18019       if (i != ((long) (sizeof (unsigned long))))
18020         exit (1);
18021       fprintf (f, "%lu\n", i);
18022     }
18023   exit (ferror (f) || fclose (f) != 0);
18024
18025   ;
18026   return 0;
18027 }
18028 _ACEOF
18029 rm -f conftest$ac_exeext
18030 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18031   (eval $ac_link) 2>&5
18032   ac_status=$?
18033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18034   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18036   (eval $ac_try) 2>&5
18037   ac_status=$?
18038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18039   (exit $ac_status); }; }; then
18040   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18041 else
18042   echo "$as_me: program exited with status $ac_status" >&5
18043 echo "$as_me: failed program was:" >&5
18044 sed 's/^/| /' conftest.$ac_ext >&5
18045
18046 ( exit $ac_status )
18047 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18048 See \`config.log' for more details." >&5
18049 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18050 See \`config.log' for more details." >&2;}
18051    { (exit 1); exit 1; }; }
18052 fi
18053 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18054 fi
18055 fi
18056 rm -f conftest.val
18057 else
18058   ac_cv_sizeof_unsigned_long=0
18059 fi
18060 fi
18061 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18062 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18063 cat >>confdefs.h <<_ACEOF
18064 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18065 _ACEOF
18066
18067
18068
18069 # And one for the size of size_t (enables tweaks for > 32bit address space)
18070 echo "$as_me:$LINENO: checking for size_t" >&5
18071 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18072 if test "${ac_cv_type_size_t+set}" = set; then
18073   echo $ECHO_N "(cached) $ECHO_C" >&6
18074 else
18075   cat >conftest.$ac_ext <<_ACEOF
18076 /* confdefs.h.  */
18077 _ACEOF
18078 cat confdefs.h >>conftest.$ac_ext
18079 cat >>conftest.$ac_ext <<_ACEOF
18080 /* end confdefs.h.  */
18081 $ac_includes_default
18082 int
18083 main ()
18084 {
18085 if ((size_t *) 0)
18086   return 0;
18087 if (sizeof (size_t))
18088   return 0;
18089   ;
18090   return 0;
18091 }
18092 _ACEOF
18093 rm -f conftest.$ac_objext
18094 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18095   (eval $ac_compile) 2>conftest.er1
18096   ac_status=$?
18097   grep -v '^ *+' conftest.er1 >conftest.err
18098   rm -f conftest.er1
18099   cat conftest.err >&5
18100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18101   (exit $ac_status); } &&
18102          { ac_try='test -z "$ac_c_werror_flag"
18103                          || test ! -s conftest.err'
18104   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18105   (eval $ac_try) 2>&5
18106   ac_status=$?
18107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18108   (exit $ac_status); }; } &&
18109          { ac_try='test -s conftest.$ac_objext'
18110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18111   (eval $ac_try) 2>&5
18112   ac_status=$?
18113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18114   (exit $ac_status); }; }; then
18115   ac_cv_type_size_t=yes
18116 else
18117   echo "$as_me: failed program was:" >&5
18118 sed 's/^/| /' conftest.$ac_ext >&5
18119
18120 ac_cv_type_size_t=no
18121 fi
18122 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18123 fi
18124 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18125 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18126
18127 echo "$as_me:$LINENO: checking size of size_t" >&5
18128 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18129 if test "${ac_cv_sizeof_size_t+set}" = set; then
18130   echo $ECHO_N "(cached) $ECHO_C" >&6
18131 else
18132   if test "$ac_cv_type_size_t" = yes; then
18133   # The cast to unsigned long works around a bug in the HP C Compiler
18134   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18135   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18136   # This bug is HP SR number 8606223364.
18137   if test "$cross_compiling" = yes; then
18138   # Depending upon the size, compute the lo and hi bounds.
18139 cat >conftest.$ac_ext <<_ACEOF
18140 /* confdefs.h.  */
18141 _ACEOF
18142 cat confdefs.h >>conftest.$ac_ext
18143 cat >>conftest.$ac_ext <<_ACEOF
18144 /* end confdefs.h.  */
18145 $ac_includes_default
18146 int
18147 main ()
18148 {
18149 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18150 test_array [0] = 0
18151
18152   ;
18153   return 0;
18154 }
18155 _ACEOF
18156 rm -f conftest.$ac_objext
18157 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18158   (eval $ac_compile) 2>conftest.er1
18159   ac_status=$?
18160   grep -v '^ *+' conftest.er1 >conftest.err
18161   rm -f conftest.er1
18162   cat conftest.err >&5
18163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18164   (exit $ac_status); } &&
18165          { ac_try='test -z "$ac_c_werror_flag"
18166                          || test ! -s conftest.err'
18167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18168   (eval $ac_try) 2>&5
18169   ac_status=$?
18170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18171   (exit $ac_status); }; } &&
18172          { ac_try='test -s conftest.$ac_objext'
18173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18174   (eval $ac_try) 2>&5
18175   ac_status=$?
18176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18177   (exit $ac_status); }; }; then
18178   ac_lo=0 ac_mid=0
18179   while :; do
18180     cat >conftest.$ac_ext <<_ACEOF
18181 /* confdefs.h.  */
18182 _ACEOF
18183 cat confdefs.h >>conftest.$ac_ext
18184 cat >>conftest.$ac_ext <<_ACEOF
18185 /* end confdefs.h.  */
18186 $ac_includes_default
18187 int
18188 main ()
18189 {
18190 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18191 test_array [0] = 0
18192
18193   ;
18194   return 0;
18195 }
18196 _ACEOF
18197 rm -f conftest.$ac_objext
18198 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18199   (eval $ac_compile) 2>conftest.er1
18200   ac_status=$?
18201   grep -v '^ *+' conftest.er1 >conftest.err
18202   rm -f conftest.er1
18203   cat conftest.err >&5
18204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18205   (exit $ac_status); } &&
18206          { ac_try='test -z "$ac_c_werror_flag"
18207                          || test ! -s conftest.err'
18208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18209   (eval $ac_try) 2>&5
18210   ac_status=$?
18211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18212   (exit $ac_status); }; } &&
18213          { ac_try='test -s conftest.$ac_objext'
18214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18215   (eval $ac_try) 2>&5
18216   ac_status=$?
18217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18218   (exit $ac_status); }; }; then
18219   ac_hi=$ac_mid; break
18220 else
18221   echo "$as_me: failed program was:" >&5
18222 sed 's/^/| /' conftest.$ac_ext >&5
18223
18224 ac_lo=`expr $ac_mid + 1`
18225                     if test $ac_lo -le $ac_mid; then
18226                       ac_lo= ac_hi=
18227                       break
18228                     fi
18229                     ac_mid=`expr 2 '*' $ac_mid + 1`
18230 fi
18231 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18232   done
18233 else
18234   echo "$as_me: failed program was:" >&5
18235 sed 's/^/| /' conftest.$ac_ext >&5
18236
18237 cat >conftest.$ac_ext <<_ACEOF
18238 /* confdefs.h.  */
18239 _ACEOF
18240 cat confdefs.h >>conftest.$ac_ext
18241 cat >>conftest.$ac_ext <<_ACEOF
18242 /* end confdefs.h.  */
18243 $ac_includes_default
18244 int
18245 main ()
18246 {
18247 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18248 test_array [0] = 0
18249
18250   ;
18251   return 0;
18252 }
18253 _ACEOF
18254 rm -f conftest.$ac_objext
18255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18256   (eval $ac_compile) 2>conftest.er1
18257   ac_status=$?
18258   grep -v '^ *+' conftest.er1 >conftest.err
18259   rm -f conftest.er1
18260   cat conftest.err >&5
18261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18262   (exit $ac_status); } &&
18263          { ac_try='test -z "$ac_c_werror_flag"
18264                          || test ! -s conftest.err'
18265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18266   (eval $ac_try) 2>&5
18267   ac_status=$?
18268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18269   (exit $ac_status); }; } &&
18270          { ac_try='test -s conftest.$ac_objext'
18271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18272   (eval $ac_try) 2>&5
18273   ac_status=$?
18274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18275   (exit $ac_status); }; }; then
18276   ac_hi=-1 ac_mid=-1
18277   while :; do
18278     cat >conftest.$ac_ext <<_ACEOF
18279 /* confdefs.h.  */
18280 _ACEOF
18281 cat confdefs.h >>conftest.$ac_ext
18282 cat >>conftest.$ac_ext <<_ACEOF
18283 /* end confdefs.h.  */
18284 $ac_includes_default
18285 int
18286 main ()
18287 {
18288 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18289 test_array [0] = 0
18290
18291   ;
18292   return 0;
18293 }
18294 _ACEOF
18295 rm -f conftest.$ac_objext
18296 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18297   (eval $ac_compile) 2>conftest.er1
18298   ac_status=$?
18299   grep -v '^ *+' conftest.er1 >conftest.err
18300   rm -f conftest.er1
18301   cat conftest.err >&5
18302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18303   (exit $ac_status); } &&
18304          { ac_try='test -z "$ac_c_werror_flag"
18305                          || test ! -s conftest.err'
18306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18307   (eval $ac_try) 2>&5
18308   ac_status=$?
18309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18310   (exit $ac_status); }; } &&
18311          { ac_try='test -s conftest.$ac_objext'
18312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18313   (eval $ac_try) 2>&5
18314   ac_status=$?
18315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18316   (exit $ac_status); }; }; then
18317   ac_lo=$ac_mid; break
18318 else
18319   echo "$as_me: failed program was:" >&5
18320 sed 's/^/| /' conftest.$ac_ext >&5
18321
18322 ac_hi=`expr '(' $ac_mid ')' - 1`
18323                        if test $ac_mid -le $ac_hi; then
18324                          ac_lo= ac_hi=
18325                          break
18326                        fi
18327                        ac_mid=`expr 2 '*' $ac_mid`
18328 fi
18329 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18330   done
18331 else
18332   echo "$as_me: failed program was:" >&5
18333 sed 's/^/| /' conftest.$ac_ext >&5
18334
18335 ac_lo= ac_hi=
18336 fi
18337 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18338 fi
18339 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18340 # Binary search between lo and hi bounds.
18341 while test "x$ac_lo" != "x$ac_hi"; do
18342   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18343   cat >conftest.$ac_ext <<_ACEOF
18344 /* confdefs.h.  */
18345 _ACEOF
18346 cat confdefs.h >>conftest.$ac_ext
18347 cat >>conftest.$ac_ext <<_ACEOF
18348 /* end confdefs.h.  */
18349 $ac_includes_default
18350 int
18351 main ()
18352 {
18353 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18354 test_array [0] = 0
18355
18356   ;
18357   return 0;
18358 }
18359 _ACEOF
18360 rm -f conftest.$ac_objext
18361 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18362   (eval $ac_compile) 2>conftest.er1
18363   ac_status=$?
18364   grep -v '^ *+' conftest.er1 >conftest.err
18365   rm -f conftest.er1
18366   cat conftest.err >&5
18367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18368   (exit $ac_status); } &&
18369          { ac_try='test -z "$ac_c_werror_flag"
18370                          || test ! -s conftest.err'
18371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18372   (eval $ac_try) 2>&5
18373   ac_status=$?
18374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18375   (exit $ac_status); }; } &&
18376          { ac_try='test -s conftest.$ac_objext'
18377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18378   (eval $ac_try) 2>&5
18379   ac_status=$?
18380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18381   (exit $ac_status); }; }; then
18382   ac_hi=$ac_mid
18383 else
18384   echo "$as_me: failed program was:" >&5
18385 sed 's/^/| /' conftest.$ac_ext >&5
18386
18387 ac_lo=`expr '(' $ac_mid ')' + 1`
18388 fi
18389 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18390 done
18391 case $ac_lo in
18392 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18393 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18394 See \`config.log' for more details." >&5
18395 echo "$as_me: error: cannot compute sizeof (size_t), 77
18396 See \`config.log' for more details." >&2;}
18397    { (exit 1); exit 1; }; } ;;
18398 esac
18399 else
18400   if test "$cross_compiling" = yes; then
18401   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18402 See \`config.log' for more details." >&5
18403 echo "$as_me: error: cannot run test program while cross compiling
18404 See \`config.log' for more details." >&2;}
18405    { (exit 1); exit 1; }; }
18406 else
18407   cat >conftest.$ac_ext <<_ACEOF
18408 /* confdefs.h.  */
18409 _ACEOF
18410 cat confdefs.h >>conftest.$ac_ext
18411 cat >>conftest.$ac_ext <<_ACEOF
18412 /* end confdefs.h.  */
18413 $ac_includes_default
18414 long longval () { return (long) (sizeof (size_t)); }
18415 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18416 #include <stdio.h>
18417 #include <stdlib.h>
18418 int
18419 main ()
18420 {
18421
18422   FILE *f = fopen ("conftest.val", "w");
18423   if (! f)
18424     exit (1);
18425   if (((long) (sizeof (size_t))) < 0)
18426     {
18427       long i = longval ();
18428       if (i != ((long) (sizeof (size_t))))
18429         exit (1);
18430       fprintf (f, "%ld\n", i);
18431     }
18432   else
18433     {
18434       unsigned long i = ulongval ();
18435       if (i != ((long) (sizeof (size_t))))
18436         exit (1);
18437       fprintf (f, "%lu\n", i);
18438     }
18439   exit (ferror (f) || fclose (f) != 0);
18440
18441   ;
18442   return 0;
18443 }
18444 _ACEOF
18445 rm -f conftest$ac_exeext
18446 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18447   (eval $ac_link) 2>&5
18448   ac_status=$?
18449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18450   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18452   (eval $ac_try) 2>&5
18453   ac_status=$?
18454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18455   (exit $ac_status); }; }; then
18456   ac_cv_sizeof_size_t=`cat conftest.val`
18457 else
18458   echo "$as_me: program exited with status $ac_status" >&5
18459 echo "$as_me: failed program was:" >&5
18460 sed 's/^/| /' conftest.$ac_ext >&5
18461
18462 ( exit $ac_status )
18463 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18464 See \`config.log' for more details." >&5
18465 echo "$as_me: error: cannot compute sizeof (size_t), 77
18466 See \`config.log' for more details." >&2;}
18467    { (exit 1); exit 1; }; }
18468 fi
18469 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18470 fi
18471 fi
18472 rm -f conftest.val
18473 else
18474   ac_cv_sizeof_size_t=0
18475 fi
18476 fi
18477 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18478 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18479 cat >>confdefs.h <<_ACEOF
18480 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18481 _ACEOF
18482
18483
18484
18485 # Determine memory alignment requirements for the basic C data types.
18486
18487 echo "$as_me:$LINENO: checking for short" >&5
18488 echo $ECHO_N "checking for short... $ECHO_C" >&6
18489 if test "${ac_cv_type_short+set}" = set; then
18490   echo $ECHO_N "(cached) $ECHO_C" >&6
18491 else
18492   cat >conftest.$ac_ext <<_ACEOF
18493 /* confdefs.h.  */
18494 _ACEOF
18495 cat confdefs.h >>conftest.$ac_ext
18496 cat >>conftest.$ac_ext <<_ACEOF
18497 /* end confdefs.h.  */
18498 $ac_includes_default
18499 int
18500 main ()
18501 {
18502 if ((short *) 0)
18503   return 0;
18504 if (sizeof (short))
18505   return 0;
18506   ;
18507   return 0;
18508 }
18509 _ACEOF
18510 rm -f conftest.$ac_objext
18511 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18512   (eval $ac_compile) 2>conftest.er1
18513   ac_status=$?
18514   grep -v '^ *+' conftest.er1 >conftest.err
18515   rm -f conftest.er1
18516   cat conftest.err >&5
18517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18518   (exit $ac_status); } &&
18519          { ac_try='test -z "$ac_c_werror_flag"
18520                          || test ! -s conftest.err'
18521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18522   (eval $ac_try) 2>&5
18523   ac_status=$?
18524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18525   (exit $ac_status); }; } &&
18526          { ac_try='test -s conftest.$ac_objext'
18527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18528   (eval $ac_try) 2>&5
18529   ac_status=$?
18530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18531   (exit $ac_status); }; }; then
18532   ac_cv_type_short=yes
18533 else
18534   echo "$as_me: failed program was:" >&5
18535 sed 's/^/| /' conftest.$ac_ext >&5
18536
18537 ac_cv_type_short=no
18538 fi
18539 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18540 fi
18541 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18542 echo "${ECHO_T}$ac_cv_type_short" >&6
18543
18544 echo "$as_me:$LINENO: checking alignment of short" >&5
18545 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18546 if test "${pgac_cv_alignof_short+set}" = set; then
18547   echo $ECHO_N "(cached) $ECHO_C" >&6
18548 else
18549   if test "$ac_cv_type_short" = yes; then
18550   if test "$cross_compiling" = yes; then
18551   # Depending upon the size, compute the lo and hi bounds.
18552 cat >conftest.$ac_ext <<_ACEOF
18553 /* confdefs.h.  */
18554 _ACEOF
18555 cat confdefs.h >>conftest.$ac_ext
18556 cat >>conftest.$ac_ext <<_ACEOF
18557 /* end confdefs.h.  */
18558 $ac_includes_default
18559 struct { char filler; short field; } pgac_struct;
18560 int
18561 main ()
18562 {
18563 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18564 test_array [0] = 0
18565
18566   ;
18567   return 0;
18568 }
18569 _ACEOF
18570 rm -f conftest.$ac_objext
18571 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18572   (eval $ac_compile) 2>conftest.er1
18573   ac_status=$?
18574   grep -v '^ *+' conftest.er1 >conftest.err
18575   rm -f conftest.er1
18576   cat conftest.err >&5
18577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18578   (exit $ac_status); } &&
18579          { ac_try='test -z "$ac_c_werror_flag"
18580                          || test ! -s conftest.err'
18581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18582   (eval $ac_try) 2>&5
18583   ac_status=$?
18584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18585   (exit $ac_status); }; } &&
18586          { ac_try='test -s conftest.$ac_objext'
18587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18588   (eval $ac_try) 2>&5
18589   ac_status=$?
18590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18591   (exit $ac_status); }; }; then
18592   ac_lo=0 ac_mid=0
18593   while :; do
18594     cat >conftest.$ac_ext <<_ACEOF
18595 /* confdefs.h.  */
18596 _ACEOF
18597 cat confdefs.h >>conftest.$ac_ext
18598 cat >>conftest.$ac_ext <<_ACEOF
18599 /* end confdefs.h.  */
18600 $ac_includes_default
18601 struct { char filler; short field; } pgac_struct;
18602 int
18603 main ()
18604 {
18605 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18606 test_array [0] = 0
18607
18608   ;
18609   return 0;
18610 }
18611 _ACEOF
18612 rm -f conftest.$ac_objext
18613 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18614   (eval $ac_compile) 2>conftest.er1
18615   ac_status=$?
18616   grep -v '^ *+' conftest.er1 >conftest.err
18617   rm -f conftest.er1
18618   cat conftest.err >&5
18619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18620   (exit $ac_status); } &&
18621          { ac_try='test -z "$ac_c_werror_flag"
18622                          || test ! -s conftest.err'
18623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18624   (eval $ac_try) 2>&5
18625   ac_status=$?
18626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18627   (exit $ac_status); }; } &&
18628          { ac_try='test -s conftest.$ac_objext'
18629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18630   (eval $ac_try) 2>&5
18631   ac_status=$?
18632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18633   (exit $ac_status); }; }; then
18634   ac_hi=$ac_mid; break
18635 else
18636   echo "$as_me: failed program was:" >&5
18637 sed 's/^/| /' conftest.$ac_ext >&5
18638
18639 ac_lo=`expr $ac_mid + 1`
18640                     if test $ac_lo -le $ac_mid; then
18641                       ac_lo= ac_hi=
18642                       break
18643                     fi
18644                     ac_mid=`expr 2 '*' $ac_mid + 1`
18645 fi
18646 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18647   done
18648 else
18649   echo "$as_me: failed program was:" >&5
18650 sed 's/^/| /' conftest.$ac_ext >&5
18651
18652 cat >conftest.$ac_ext <<_ACEOF
18653 /* confdefs.h.  */
18654 _ACEOF
18655 cat confdefs.h >>conftest.$ac_ext
18656 cat >>conftest.$ac_ext <<_ACEOF
18657 /* end confdefs.h.  */
18658 $ac_includes_default
18659 struct { char filler; short field; } pgac_struct;
18660 int
18661 main ()
18662 {
18663 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18664 test_array [0] = 0
18665
18666   ;
18667   return 0;
18668 }
18669 _ACEOF
18670 rm -f conftest.$ac_objext
18671 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18672   (eval $ac_compile) 2>conftest.er1
18673   ac_status=$?
18674   grep -v '^ *+' conftest.er1 >conftest.err
18675   rm -f conftest.er1
18676   cat conftest.err >&5
18677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18678   (exit $ac_status); } &&
18679          { ac_try='test -z "$ac_c_werror_flag"
18680                          || test ! -s conftest.err'
18681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18682   (eval $ac_try) 2>&5
18683   ac_status=$?
18684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18685   (exit $ac_status); }; } &&
18686          { ac_try='test -s conftest.$ac_objext'
18687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18688   (eval $ac_try) 2>&5
18689   ac_status=$?
18690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18691   (exit $ac_status); }; }; then
18692   ac_hi=-1 ac_mid=-1
18693   while :; do
18694     cat >conftest.$ac_ext <<_ACEOF
18695 /* confdefs.h.  */
18696 _ACEOF
18697 cat confdefs.h >>conftest.$ac_ext
18698 cat >>conftest.$ac_ext <<_ACEOF
18699 /* end confdefs.h.  */
18700 $ac_includes_default
18701 struct { char filler; short field; } pgac_struct;
18702 int
18703 main ()
18704 {
18705 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18706 test_array [0] = 0
18707
18708   ;
18709   return 0;
18710 }
18711 _ACEOF
18712 rm -f conftest.$ac_objext
18713 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18714   (eval $ac_compile) 2>conftest.er1
18715   ac_status=$?
18716   grep -v '^ *+' conftest.er1 >conftest.err
18717   rm -f conftest.er1
18718   cat conftest.err >&5
18719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18720   (exit $ac_status); } &&
18721          { ac_try='test -z "$ac_c_werror_flag"
18722                          || test ! -s conftest.err'
18723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18724   (eval $ac_try) 2>&5
18725   ac_status=$?
18726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18727   (exit $ac_status); }; } &&
18728          { ac_try='test -s conftest.$ac_objext'
18729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18730   (eval $ac_try) 2>&5
18731   ac_status=$?
18732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18733   (exit $ac_status); }; }; then
18734   ac_lo=$ac_mid; break
18735 else
18736   echo "$as_me: failed program was:" >&5
18737 sed 's/^/| /' conftest.$ac_ext >&5
18738
18739 ac_hi=`expr '(' $ac_mid ')' - 1`
18740                        if test $ac_mid -le $ac_hi; then
18741                          ac_lo= ac_hi=
18742                          break
18743                        fi
18744                        ac_mid=`expr 2 '*' $ac_mid`
18745 fi
18746 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18747   done
18748 else
18749   echo "$as_me: failed program was:" >&5
18750 sed 's/^/| /' conftest.$ac_ext >&5
18751
18752 ac_lo= ac_hi=
18753 fi
18754 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18755 fi
18756 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18757 # Binary search between lo and hi bounds.
18758 while test "x$ac_lo" != "x$ac_hi"; do
18759   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18760   cat >conftest.$ac_ext <<_ACEOF
18761 /* confdefs.h.  */
18762 _ACEOF
18763 cat confdefs.h >>conftest.$ac_ext
18764 cat >>conftest.$ac_ext <<_ACEOF
18765 /* end confdefs.h.  */
18766 $ac_includes_default
18767 struct { char filler; short field; } pgac_struct;
18768 int
18769 main ()
18770 {
18771 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18772 test_array [0] = 0
18773
18774   ;
18775   return 0;
18776 }
18777 _ACEOF
18778 rm -f conftest.$ac_objext
18779 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18780   (eval $ac_compile) 2>conftest.er1
18781   ac_status=$?
18782   grep -v '^ *+' conftest.er1 >conftest.err
18783   rm -f conftest.er1
18784   cat conftest.err >&5
18785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18786   (exit $ac_status); } &&
18787          { ac_try='test -z "$ac_c_werror_flag"
18788                          || test ! -s conftest.err'
18789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18790   (eval $ac_try) 2>&5
18791   ac_status=$?
18792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18793   (exit $ac_status); }; } &&
18794          { ac_try='test -s conftest.$ac_objext'
18795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18796   (eval $ac_try) 2>&5
18797   ac_status=$?
18798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18799   (exit $ac_status); }; }; then
18800   ac_hi=$ac_mid
18801 else
18802   echo "$as_me: failed program was:" >&5
18803 sed 's/^/| /' conftest.$ac_ext >&5
18804
18805 ac_lo=`expr '(' $ac_mid ')' + 1`
18806 fi
18807 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18808 done
18809 case $ac_lo in
18810 ?*) pgac_cv_alignof_short=$ac_lo;;
18811 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18812 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18813    { (exit 1); exit 1; }; } ;;
18814 esac
18815 else
18816   if test "$cross_compiling" = yes; then
18817   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18818 See \`config.log' for more details." >&5
18819 echo "$as_me: error: cannot run test program while cross compiling
18820 See \`config.log' for more details." >&2;}
18821    { (exit 1); exit 1; }; }
18822 else
18823   cat >conftest.$ac_ext <<_ACEOF
18824 /* confdefs.h.  */
18825 _ACEOF
18826 cat confdefs.h >>conftest.$ac_ext
18827 cat >>conftest.$ac_ext <<_ACEOF
18828 /* end confdefs.h.  */
18829 $ac_includes_default
18830 struct { char filler; short field; } pgac_struct;
18831 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18832 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18833 #include <stdio.h>
18834 #include <stdlib.h>
18835 int
18836 main ()
18837 {
18838
18839   FILE *f = fopen ("conftest.val", "w");
18840   if (! f)
18841     exit (1);
18842   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
18843     {
18844       long i = longval ();
18845       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18846         exit (1);
18847       fprintf (f, "%ld\n", i);
18848     }
18849   else
18850     {
18851       unsigned long i = ulongval ();
18852       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18853         exit (1);
18854       fprintf (f, "%lu\n", i);
18855     }
18856   exit (ferror (f) || fclose (f) != 0);
18857
18858   ;
18859   return 0;
18860 }
18861 _ACEOF
18862 rm -f conftest$ac_exeext
18863 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18864   (eval $ac_link) 2>&5
18865   ac_status=$?
18866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18867   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18869   (eval $ac_try) 2>&5
18870   ac_status=$?
18871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18872   (exit $ac_status); }; }; then
18873   pgac_cv_alignof_short=`cat conftest.val`
18874 else
18875   echo "$as_me: program exited with status $ac_status" >&5
18876 echo "$as_me: failed program was:" >&5
18877 sed 's/^/| /' conftest.$ac_ext >&5
18878
18879 ( exit $ac_status )
18880 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18881 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18882    { (exit 1); exit 1; }; }
18883 fi
18884 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18885 fi
18886 fi
18887 rm -f conftest.val
18888 else
18889   pgac_cv_alignof_short=0
18890 fi
18891 fi
18892 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
18893 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
18894 cat >>confdefs.h <<_ACEOF
18895 #define ALIGNOF_SHORT $pgac_cv_alignof_short
18896 _ACEOF
18897
18898
18899 echo "$as_me:$LINENO: checking for int" >&5
18900 echo $ECHO_N "checking for int... $ECHO_C" >&6
18901 if test "${ac_cv_type_int+set}" = set; then
18902   echo $ECHO_N "(cached) $ECHO_C" >&6
18903 else
18904   cat >conftest.$ac_ext <<_ACEOF
18905 /* confdefs.h.  */
18906 _ACEOF
18907 cat confdefs.h >>conftest.$ac_ext
18908 cat >>conftest.$ac_ext <<_ACEOF
18909 /* end confdefs.h.  */
18910 $ac_includes_default
18911 int
18912 main ()
18913 {
18914 if ((int *) 0)
18915   return 0;
18916 if (sizeof (int))
18917   return 0;
18918   ;
18919   return 0;
18920 }
18921 _ACEOF
18922 rm -f conftest.$ac_objext
18923 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18924   (eval $ac_compile) 2>conftest.er1
18925   ac_status=$?
18926   grep -v '^ *+' conftest.er1 >conftest.err
18927   rm -f conftest.er1
18928   cat conftest.err >&5
18929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18930   (exit $ac_status); } &&
18931          { ac_try='test -z "$ac_c_werror_flag"
18932                          || test ! -s conftest.err'
18933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18934   (eval $ac_try) 2>&5
18935   ac_status=$?
18936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18937   (exit $ac_status); }; } &&
18938          { ac_try='test -s conftest.$ac_objext'
18939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18940   (eval $ac_try) 2>&5
18941   ac_status=$?
18942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18943   (exit $ac_status); }; }; then
18944   ac_cv_type_int=yes
18945 else
18946   echo "$as_me: failed program was:" >&5
18947 sed 's/^/| /' conftest.$ac_ext >&5
18948
18949 ac_cv_type_int=no
18950 fi
18951 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18952 fi
18953 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
18954 echo "${ECHO_T}$ac_cv_type_int" >&6
18955
18956 echo "$as_me:$LINENO: checking alignment of int" >&5
18957 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
18958 if test "${pgac_cv_alignof_int+set}" = set; then
18959   echo $ECHO_N "(cached) $ECHO_C" >&6
18960 else
18961   if test "$ac_cv_type_int" = yes; then
18962   if test "$cross_compiling" = yes; then
18963   # Depending upon the size, compute the lo and hi bounds.
18964 cat >conftest.$ac_ext <<_ACEOF
18965 /* confdefs.h.  */
18966 _ACEOF
18967 cat confdefs.h >>conftest.$ac_ext
18968 cat >>conftest.$ac_ext <<_ACEOF
18969 /* end confdefs.h.  */
18970 $ac_includes_default
18971 struct { char filler; int field; } pgac_struct;
18972 int
18973 main ()
18974 {
18975 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18976 test_array [0] = 0
18977
18978   ;
18979   return 0;
18980 }
18981 _ACEOF
18982 rm -f conftest.$ac_objext
18983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18984   (eval $ac_compile) 2>conftest.er1
18985   ac_status=$?
18986   grep -v '^ *+' conftest.er1 >conftest.err
18987   rm -f conftest.er1
18988   cat conftest.err >&5
18989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18990   (exit $ac_status); } &&
18991          { ac_try='test -z "$ac_c_werror_flag"
18992                          || test ! -s conftest.err'
18993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18994   (eval $ac_try) 2>&5
18995   ac_status=$?
18996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18997   (exit $ac_status); }; } &&
18998          { ac_try='test -s conftest.$ac_objext'
18999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19000   (eval $ac_try) 2>&5
19001   ac_status=$?
19002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19003   (exit $ac_status); }; }; then
19004   ac_lo=0 ac_mid=0
19005   while :; do
19006     cat >conftest.$ac_ext <<_ACEOF
19007 /* confdefs.h.  */
19008 _ACEOF
19009 cat confdefs.h >>conftest.$ac_ext
19010 cat >>conftest.$ac_ext <<_ACEOF
19011 /* end confdefs.h.  */
19012 $ac_includes_default
19013 struct { char filler; int field; } pgac_struct;
19014 int
19015 main ()
19016 {
19017 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19018 test_array [0] = 0
19019
19020   ;
19021   return 0;
19022 }
19023 _ACEOF
19024 rm -f conftest.$ac_objext
19025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19026   (eval $ac_compile) 2>conftest.er1
19027   ac_status=$?
19028   grep -v '^ *+' conftest.er1 >conftest.err
19029   rm -f conftest.er1
19030   cat conftest.err >&5
19031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19032   (exit $ac_status); } &&
19033          { ac_try='test -z "$ac_c_werror_flag"
19034                          || test ! -s conftest.err'
19035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19036   (eval $ac_try) 2>&5
19037   ac_status=$?
19038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19039   (exit $ac_status); }; } &&
19040          { ac_try='test -s conftest.$ac_objext'
19041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19042   (eval $ac_try) 2>&5
19043   ac_status=$?
19044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19045   (exit $ac_status); }; }; then
19046   ac_hi=$ac_mid; break
19047 else
19048   echo "$as_me: failed program was:" >&5
19049 sed 's/^/| /' conftest.$ac_ext >&5
19050
19051 ac_lo=`expr $ac_mid + 1`
19052                     if test $ac_lo -le $ac_mid; then
19053                       ac_lo= ac_hi=
19054                       break
19055                     fi
19056                     ac_mid=`expr 2 '*' $ac_mid + 1`
19057 fi
19058 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19059   done
19060 else
19061   echo "$as_me: failed program was:" >&5
19062 sed 's/^/| /' conftest.$ac_ext >&5
19063
19064 cat >conftest.$ac_ext <<_ACEOF
19065 /* confdefs.h.  */
19066 _ACEOF
19067 cat confdefs.h >>conftest.$ac_ext
19068 cat >>conftest.$ac_ext <<_ACEOF
19069 /* end confdefs.h.  */
19070 $ac_includes_default
19071 struct { char filler; int field; } pgac_struct;
19072 int
19073 main ()
19074 {
19075 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19076 test_array [0] = 0
19077
19078   ;
19079   return 0;
19080 }
19081 _ACEOF
19082 rm -f conftest.$ac_objext
19083 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19084   (eval $ac_compile) 2>conftest.er1
19085   ac_status=$?
19086   grep -v '^ *+' conftest.er1 >conftest.err
19087   rm -f conftest.er1
19088   cat conftest.err >&5
19089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19090   (exit $ac_status); } &&
19091          { ac_try='test -z "$ac_c_werror_flag"
19092                          || test ! -s conftest.err'
19093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19094   (eval $ac_try) 2>&5
19095   ac_status=$?
19096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19097   (exit $ac_status); }; } &&
19098          { ac_try='test -s conftest.$ac_objext'
19099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19100   (eval $ac_try) 2>&5
19101   ac_status=$?
19102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19103   (exit $ac_status); }; }; then
19104   ac_hi=-1 ac_mid=-1
19105   while :; do
19106     cat >conftest.$ac_ext <<_ACEOF
19107 /* confdefs.h.  */
19108 _ACEOF
19109 cat confdefs.h >>conftest.$ac_ext
19110 cat >>conftest.$ac_ext <<_ACEOF
19111 /* end confdefs.h.  */
19112 $ac_includes_default
19113 struct { char filler; int field; } pgac_struct;
19114 int
19115 main ()
19116 {
19117 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19118 test_array [0] = 0
19119
19120   ;
19121   return 0;
19122 }
19123 _ACEOF
19124 rm -f conftest.$ac_objext
19125 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19126   (eval $ac_compile) 2>conftest.er1
19127   ac_status=$?
19128   grep -v '^ *+' conftest.er1 >conftest.err
19129   rm -f conftest.er1
19130   cat conftest.err >&5
19131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19132   (exit $ac_status); } &&
19133          { ac_try='test -z "$ac_c_werror_flag"
19134                          || test ! -s conftest.err'
19135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19136   (eval $ac_try) 2>&5
19137   ac_status=$?
19138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19139   (exit $ac_status); }; } &&
19140          { ac_try='test -s conftest.$ac_objext'
19141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19142   (eval $ac_try) 2>&5
19143   ac_status=$?
19144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19145   (exit $ac_status); }; }; then
19146   ac_lo=$ac_mid; break
19147 else
19148   echo "$as_me: failed program was:" >&5
19149 sed 's/^/| /' conftest.$ac_ext >&5
19150
19151 ac_hi=`expr '(' $ac_mid ')' - 1`
19152                        if test $ac_mid -le $ac_hi; then
19153                          ac_lo= ac_hi=
19154                          break
19155                        fi
19156                        ac_mid=`expr 2 '*' $ac_mid`
19157 fi
19158 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19159   done
19160 else
19161   echo "$as_me: failed program was:" >&5
19162 sed 's/^/| /' conftest.$ac_ext >&5
19163
19164 ac_lo= ac_hi=
19165 fi
19166 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19167 fi
19168 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19169 # Binary search between lo and hi bounds.
19170 while test "x$ac_lo" != "x$ac_hi"; do
19171   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19172   cat >conftest.$ac_ext <<_ACEOF
19173 /* confdefs.h.  */
19174 _ACEOF
19175 cat confdefs.h >>conftest.$ac_ext
19176 cat >>conftest.$ac_ext <<_ACEOF
19177 /* end confdefs.h.  */
19178 $ac_includes_default
19179 struct { char filler; int field; } pgac_struct;
19180 int
19181 main ()
19182 {
19183 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19184 test_array [0] = 0
19185
19186   ;
19187   return 0;
19188 }
19189 _ACEOF
19190 rm -f conftest.$ac_objext
19191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19192   (eval $ac_compile) 2>conftest.er1
19193   ac_status=$?
19194   grep -v '^ *+' conftest.er1 >conftest.err
19195   rm -f conftest.er1
19196   cat conftest.err >&5
19197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19198   (exit $ac_status); } &&
19199          { ac_try='test -z "$ac_c_werror_flag"
19200                          || test ! -s conftest.err'
19201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19202   (eval $ac_try) 2>&5
19203   ac_status=$?
19204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19205   (exit $ac_status); }; } &&
19206          { ac_try='test -s conftest.$ac_objext'
19207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19208   (eval $ac_try) 2>&5
19209   ac_status=$?
19210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19211   (exit $ac_status); }; }; then
19212   ac_hi=$ac_mid
19213 else
19214   echo "$as_me: failed program was:" >&5
19215 sed 's/^/| /' conftest.$ac_ext >&5
19216
19217 ac_lo=`expr '(' $ac_mid ')' + 1`
19218 fi
19219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19220 done
19221 case $ac_lo in
19222 ?*) pgac_cv_alignof_int=$ac_lo;;
19223 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19224 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19225    { (exit 1); exit 1; }; } ;;
19226 esac
19227 else
19228   if test "$cross_compiling" = yes; then
19229   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19230 See \`config.log' for more details." >&5
19231 echo "$as_me: error: cannot run test program while cross compiling
19232 See \`config.log' for more details." >&2;}
19233    { (exit 1); exit 1; }; }
19234 else
19235   cat >conftest.$ac_ext <<_ACEOF
19236 /* confdefs.h.  */
19237 _ACEOF
19238 cat confdefs.h >>conftest.$ac_ext
19239 cat >>conftest.$ac_ext <<_ACEOF
19240 /* end confdefs.h.  */
19241 $ac_includes_default
19242 struct { char filler; int field; } pgac_struct;
19243 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19244 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19245 #include <stdio.h>
19246 #include <stdlib.h>
19247 int
19248 main ()
19249 {
19250
19251   FILE *f = fopen ("conftest.val", "w");
19252   if (! f)
19253     exit (1);
19254   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19255     {
19256       long i = longval ();
19257       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19258         exit (1);
19259       fprintf (f, "%ld\n", i);
19260     }
19261   else
19262     {
19263       unsigned long i = ulongval ();
19264       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19265         exit (1);
19266       fprintf (f, "%lu\n", i);
19267     }
19268   exit (ferror (f) || fclose (f) != 0);
19269
19270   ;
19271   return 0;
19272 }
19273 _ACEOF
19274 rm -f conftest$ac_exeext
19275 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19276   (eval $ac_link) 2>&5
19277   ac_status=$?
19278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19279   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19281   (eval $ac_try) 2>&5
19282   ac_status=$?
19283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19284   (exit $ac_status); }; }; then
19285   pgac_cv_alignof_int=`cat conftest.val`
19286 else
19287   echo "$as_me: program exited with status $ac_status" >&5
19288 echo "$as_me: failed program was:" >&5
19289 sed 's/^/| /' conftest.$ac_ext >&5
19290
19291 ( exit $ac_status )
19292 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19293 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19294    { (exit 1); exit 1; }; }
19295 fi
19296 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19297 fi
19298 fi
19299 rm -f conftest.val
19300 else
19301   pgac_cv_alignof_int=0
19302 fi
19303 fi
19304 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19305 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19306 cat >>confdefs.h <<_ACEOF
19307 #define ALIGNOF_INT $pgac_cv_alignof_int
19308 _ACEOF
19309
19310
19311 echo "$as_me:$LINENO: checking for long" >&5
19312 echo $ECHO_N "checking for long... $ECHO_C" >&6
19313 if test "${ac_cv_type_long+set}" = set; then
19314   echo $ECHO_N "(cached) $ECHO_C" >&6
19315 else
19316   cat >conftest.$ac_ext <<_ACEOF
19317 /* confdefs.h.  */
19318 _ACEOF
19319 cat confdefs.h >>conftest.$ac_ext
19320 cat >>conftest.$ac_ext <<_ACEOF
19321 /* end confdefs.h.  */
19322 $ac_includes_default
19323 int
19324 main ()
19325 {
19326 if ((long *) 0)
19327   return 0;
19328 if (sizeof (long))
19329   return 0;
19330   ;
19331   return 0;
19332 }
19333 _ACEOF
19334 rm -f conftest.$ac_objext
19335 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19336   (eval $ac_compile) 2>conftest.er1
19337   ac_status=$?
19338   grep -v '^ *+' conftest.er1 >conftest.err
19339   rm -f conftest.er1
19340   cat conftest.err >&5
19341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19342   (exit $ac_status); } &&
19343          { ac_try='test -z "$ac_c_werror_flag"
19344                          || test ! -s conftest.err'
19345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19346   (eval $ac_try) 2>&5
19347   ac_status=$?
19348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19349   (exit $ac_status); }; } &&
19350          { ac_try='test -s conftest.$ac_objext'
19351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19352   (eval $ac_try) 2>&5
19353   ac_status=$?
19354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19355   (exit $ac_status); }; }; then
19356   ac_cv_type_long=yes
19357 else
19358   echo "$as_me: failed program was:" >&5
19359 sed 's/^/| /' conftest.$ac_ext >&5
19360
19361 ac_cv_type_long=no
19362 fi
19363 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19364 fi
19365 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19366 echo "${ECHO_T}$ac_cv_type_long" >&6
19367
19368 echo "$as_me:$LINENO: checking alignment of long" >&5
19369 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19370 if test "${pgac_cv_alignof_long+set}" = set; then
19371   echo $ECHO_N "(cached) $ECHO_C" >&6
19372 else
19373   if test "$ac_cv_type_long" = yes; then
19374   if test "$cross_compiling" = yes; then
19375   # Depending upon the size, compute the lo and hi bounds.
19376 cat >conftest.$ac_ext <<_ACEOF
19377 /* confdefs.h.  */
19378 _ACEOF
19379 cat confdefs.h >>conftest.$ac_ext
19380 cat >>conftest.$ac_ext <<_ACEOF
19381 /* end confdefs.h.  */
19382 $ac_includes_default
19383 struct { char filler; long field; } pgac_struct;
19384 int
19385 main ()
19386 {
19387 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19388 test_array [0] = 0
19389
19390   ;
19391   return 0;
19392 }
19393 _ACEOF
19394 rm -f conftest.$ac_objext
19395 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19396   (eval $ac_compile) 2>conftest.er1
19397   ac_status=$?
19398   grep -v '^ *+' conftest.er1 >conftest.err
19399   rm -f conftest.er1
19400   cat conftest.err >&5
19401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19402   (exit $ac_status); } &&
19403          { ac_try='test -z "$ac_c_werror_flag"
19404                          || test ! -s conftest.err'
19405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19406   (eval $ac_try) 2>&5
19407   ac_status=$?
19408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19409   (exit $ac_status); }; } &&
19410          { ac_try='test -s conftest.$ac_objext'
19411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19412   (eval $ac_try) 2>&5
19413   ac_status=$?
19414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19415   (exit $ac_status); }; }; then
19416   ac_lo=0 ac_mid=0
19417   while :; do
19418     cat >conftest.$ac_ext <<_ACEOF
19419 /* confdefs.h.  */
19420 _ACEOF
19421 cat confdefs.h >>conftest.$ac_ext
19422 cat >>conftest.$ac_ext <<_ACEOF
19423 /* end confdefs.h.  */
19424 $ac_includes_default
19425 struct { char filler; long field; } pgac_struct;
19426 int
19427 main ()
19428 {
19429 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19430 test_array [0] = 0
19431
19432   ;
19433   return 0;
19434 }
19435 _ACEOF
19436 rm -f conftest.$ac_objext
19437 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19438   (eval $ac_compile) 2>conftest.er1
19439   ac_status=$?
19440   grep -v '^ *+' conftest.er1 >conftest.err
19441   rm -f conftest.er1
19442   cat conftest.err >&5
19443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19444   (exit $ac_status); } &&
19445          { ac_try='test -z "$ac_c_werror_flag"
19446                          || test ! -s conftest.err'
19447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19448   (eval $ac_try) 2>&5
19449   ac_status=$?
19450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19451   (exit $ac_status); }; } &&
19452          { ac_try='test -s conftest.$ac_objext'
19453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19454   (eval $ac_try) 2>&5
19455   ac_status=$?
19456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19457   (exit $ac_status); }; }; then
19458   ac_hi=$ac_mid; break
19459 else
19460   echo "$as_me: failed program was:" >&5
19461 sed 's/^/| /' conftest.$ac_ext >&5
19462
19463 ac_lo=`expr $ac_mid + 1`
19464                     if test $ac_lo -le $ac_mid; then
19465                       ac_lo= ac_hi=
19466                       break
19467                     fi
19468                     ac_mid=`expr 2 '*' $ac_mid + 1`
19469 fi
19470 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19471   done
19472 else
19473   echo "$as_me: failed program was:" >&5
19474 sed 's/^/| /' conftest.$ac_ext >&5
19475
19476 cat >conftest.$ac_ext <<_ACEOF
19477 /* confdefs.h.  */
19478 _ACEOF
19479 cat confdefs.h >>conftest.$ac_ext
19480 cat >>conftest.$ac_ext <<_ACEOF
19481 /* end confdefs.h.  */
19482 $ac_includes_default
19483 struct { char filler; long field; } pgac_struct;
19484 int
19485 main ()
19486 {
19487 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19488 test_array [0] = 0
19489
19490   ;
19491   return 0;
19492 }
19493 _ACEOF
19494 rm -f conftest.$ac_objext
19495 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19496   (eval $ac_compile) 2>conftest.er1
19497   ac_status=$?
19498   grep -v '^ *+' conftest.er1 >conftest.err
19499   rm -f conftest.er1
19500   cat conftest.err >&5
19501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19502   (exit $ac_status); } &&
19503          { ac_try='test -z "$ac_c_werror_flag"
19504                          || test ! -s conftest.err'
19505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19506   (eval $ac_try) 2>&5
19507   ac_status=$?
19508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19509   (exit $ac_status); }; } &&
19510          { ac_try='test -s conftest.$ac_objext'
19511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19512   (eval $ac_try) 2>&5
19513   ac_status=$?
19514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19515   (exit $ac_status); }; }; then
19516   ac_hi=-1 ac_mid=-1
19517   while :; do
19518     cat >conftest.$ac_ext <<_ACEOF
19519 /* confdefs.h.  */
19520 _ACEOF
19521 cat confdefs.h >>conftest.$ac_ext
19522 cat >>conftest.$ac_ext <<_ACEOF
19523 /* end confdefs.h.  */
19524 $ac_includes_default
19525 struct { char filler; long field; } pgac_struct;
19526 int
19527 main ()
19528 {
19529 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19530 test_array [0] = 0
19531
19532   ;
19533   return 0;
19534 }
19535 _ACEOF
19536 rm -f conftest.$ac_objext
19537 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19538   (eval $ac_compile) 2>conftest.er1
19539   ac_status=$?
19540   grep -v '^ *+' conftest.er1 >conftest.err
19541   rm -f conftest.er1
19542   cat conftest.err >&5
19543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19544   (exit $ac_status); } &&
19545          { ac_try='test -z "$ac_c_werror_flag"
19546                          || test ! -s conftest.err'
19547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19548   (eval $ac_try) 2>&5
19549   ac_status=$?
19550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19551   (exit $ac_status); }; } &&
19552          { ac_try='test -s conftest.$ac_objext'
19553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19554   (eval $ac_try) 2>&5
19555   ac_status=$?
19556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19557   (exit $ac_status); }; }; then
19558   ac_lo=$ac_mid; break
19559 else
19560   echo "$as_me: failed program was:" >&5
19561 sed 's/^/| /' conftest.$ac_ext >&5
19562
19563 ac_hi=`expr '(' $ac_mid ')' - 1`
19564                        if test $ac_mid -le $ac_hi; then
19565                          ac_lo= ac_hi=
19566                          break
19567                        fi
19568                        ac_mid=`expr 2 '*' $ac_mid`
19569 fi
19570 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19571   done
19572 else
19573   echo "$as_me: failed program was:" >&5
19574 sed 's/^/| /' conftest.$ac_ext >&5
19575
19576 ac_lo= ac_hi=
19577 fi
19578 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19579 fi
19580 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19581 # Binary search between lo and hi bounds.
19582 while test "x$ac_lo" != "x$ac_hi"; do
19583   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19584   cat >conftest.$ac_ext <<_ACEOF
19585 /* confdefs.h.  */
19586 _ACEOF
19587 cat confdefs.h >>conftest.$ac_ext
19588 cat >>conftest.$ac_ext <<_ACEOF
19589 /* end confdefs.h.  */
19590 $ac_includes_default
19591 struct { char filler; long field; } pgac_struct;
19592 int
19593 main ()
19594 {
19595 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19596 test_array [0] = 0
19597
19598   ;
19599   return 0;
19600 }
19601 _ACEOF
19602 rm -f conftest.$ac_objext
19603 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19604   (eval $ac_compile) 2>conftest.er1
19605   ac_status=$?
19606   grep -v '^ *+' conftest.er1 >conftest.err
19607   rm -f conftest.er1
19608   cat conftest.err >&5
19609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19610   (exit $ac_status); } &&
19611          { ac_try='test -z "$ac_c_werror_flag"
19612                          || test ! -s conftest.err'
19613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19614   (eval $ac_try) 2>&5
19615   ac_status=$?
19616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19617   (exit $ac_status); }; } &&
19618          { ac_try='test -s conftest.$ac_objext'
19619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19620   (eval $ac_try) 2>&5
19621   ac_status=$?
19622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19623   (exit $ac_status); }; }; then
19624   ac_hi=$ac_mid
19625 else
19626   echo "$as_me: failed program was:" >&5
19627 sed 's/^/| /' conftest.$ac_ext >&5
19628
19629 ac_lo=`expr '(' $ac_mid ')' + 1`
19630 fi
19631 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19632 done
19633 case $ac_lo in
19634 ?*) pgac_cv_alignof_long=$ac_lo;;
19635 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19636 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19637    { (exit 1); exit 1; }; } ;;
19638 esac
19639 else
19640   if test "$cross_compiling" = yes; then
19641   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19642 See \`config.log' for more details." >&5
19643 echo "$as_me: error: cannot run test program while cross compiling
19644 See \`config.log' for more details." >&2;}
19645    { (exit 1); exit 1; }; }
19646 else
19647   cat >conftest.$ac_ext <<_ACEOF
19648 /* confdefs.h.  */
19649 _ACEOF
19650 cat confdefs.h >>conftest.$ac_ext
19651 cat >>conftest.$ac_ext <<_ACEOF
19652 /* end confdefs.h.  */
19653 $ac_includes_default
19654 struct { char filler; long field; } pgac_struct;
19655 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19656 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19657 #include <stdio.h>
19658 #include <stdlib.h>
19659 int
19660 main ()
19661 {
19662
19663   FILE *f = fopen ("conftest.val", "w");
19664   if (! f)
19665     exit (1);
19666   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19667     {
19668       long i = longval ();
19669       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19670         exit (1);
19671       fprintf (f, "%ld\n", i);
19672     }
19673   else
19674     {
19675       unsigned long i = ulongval ();
19676       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19677         exit (1);
19678       fprintf (f, "%lu\n", i);
19679     }
19680   exit (ferror (f) || fclose (f) != 0);
19681
19682   ;
19683   return 0;
19684 }
19685 _ACEOF
19686 rm -f conftest$ac_exeext
19687 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19688   (eval $ac_link) 2>&5
19689   ac_status=$?
19690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19691   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19693   (eval $ac_try) 2>&5
19694   ac_status=$?
19695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19696   (exit $ac_status); }; }; then
19697   pgac_cv_alignof_long=`cat conftest.val`
19698 else
19699   echo "$as_me: program exited with status $ac_status" >&5
19700 echo "$as_me: failed program was:" >&5
19701 sed 's/^/| /' conftest.$ac_ext >&5
19702
19703 ( exit $ac_status )
19704 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19705 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19706    { (exit 1); exit 1; }; }
19707 fi
19708 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19709 fi
19710 fi
19711 rm -f conftest.val
19712 else
19713   pgac_cv_alignof_long=0
19714 fi
19715 fi
19716 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
19717 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
19718 cat >>confdefs.h <<_ACEOF
19719 #define ALIGNOF_LONG $pgac_cv_alignof_long
19720 _ACEOF
19721
19722
19723 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
19724   echo "$as_me:$LINENO: checking for long long int" >&5
19725 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
19726 if test "${ac_cv_type_long_long_int+set}" = set; then
19727   echo $ECHO_N "(cached) $ECHO_C" >&6
19728 else
19729   cat >conftest.$ac_ext <<_ACEOF
19730 /* confdefs.h.  */
19731 _ACEOF
19732 cat confdefs.h >>conftest.$ac_ext
19733 cat >>conftest.$ac_ext <<_ACEOF
19734 /* end confdefs.h.  */
19735 $ac_includes_default
19736 int
19737 main ()
19738 {
19739 if ((long long int *) 0)
19740   return 0;
19741 if (sizeof (long long int))
19742   return 0;
19743   ;
19744   return 0;
19745 }
19746 _ACEOF
19747 rm -f conftest.$ac_objext
19748 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19749   (eval $ac_compile) 2>conftest.er1
19750   ac_status=$?
19751   grep -v '^ *+' conftest.er1 >conftest.err
19752   rm -f conftest.er1
19753   cat conftest.err >&5
19754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19755   (exit $ac_status); } &&
19756          { ac_try='test -z "$ac_c_werror_flag"
19757                          || test ! -s conftest.err'
19758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19759   (eval $ac_try) 2>&5
19760   ac_status=$?
19761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19762   (exit $ac_status); }; } &&
19763          { ac_try='test -s conftest.$ac_objext'
19764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19765   (eval $ac_try) 2>&5
19766   ac_status=$?
19767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19768   (exit $ac_status); }; }; then
19769   ac_cv_type_long_long_int=yes
19770 else
19771   echo "$as_me: failed program was:" >&5
19772 sed 's/^/| /' conftest.$ac_ext >&5
19773
19774 ac_cv_type_long_long_int=no
19775 fi
19776 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19777 fi
19778 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
19779 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
19780
19781 echo "$as_me:$LINENO: checking alignment of long long int" >&5
19782 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
19783 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
19784   echo $ECHO_N "(cached) $ECHO_C" >&6
19785 else
19786   if test "$ac_cv_type_long_long_int" = yes; then
19787   if test "$cross_compiling" = yes; then
19788   # Depending upon the size, compute the lo and hi bounds.
19789 cat >conftest.$ac_ext <<_ACEOF
19790 /* confdefs.h.  */
19791 _ACEOF
19792 cat confdefs.h >>conftest.$ac_ext
19793 cat >>conftest.$ac_ext <<_ACEOF
19794 /* end confdefs.h.  */
19795 $ac_includes_default
19796 struct { char filler; long long int field; } pgac_struct;
19797 int
19798 main ()
19799 {
19800 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19801 test_array [0] = 0
19802
19803   ;
19804   return 0;
19805 }
19806 _ACEOF
19807 rm -f conftest.$ac_objext
19808 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19809   (eval $ac_compile) 2>conftest.er1
19810   ac_status=$?
19811   grep -v '^ *+' conftest.er1 >conftest.err
19812   rm -f conftest.er1
19813   cat conftest.err >&5
19814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19815   (exit $ac_status); } &&
19816          { ac_try='test -z "$ac_c_werror_flag"
19817                          || test ! -s conftest.err'
19818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19819   (eval $ac_try) 2>&5
19820   ac_status=$?
19821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19822   (exit $ac_status); }; } &&
19823          { ac_try='test -s conftest.$ac_objext'
19824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19825   (eval $ac_try) 2>&5
19826   ac_status=$?
19827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19828   (exit $ac_status); }; }; then
19829   ac_lo=0 ac_mid=0
19830   while :; do
19831     cat >conftest.$ac_ext <<_ACEOF
19832 /* confdefs.h.  */
19833 _ACEOF
19834 cat confdefs.h >>conftest.$ac_ext
19835 cat >>conftest.$ac_ext <<_ACEOF
19836 /* end confdefs.h.  */
19837 $ac_includes_default
19838 struct { char filler; long long int field; } pgac_struct;
19839 int
19840 main ()
19841 {
19842 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19843 test_array [0] = 0
19844
19845   ;
19846   return 0;
19847 }
19848 _ACEOF
19849 rm -f conftest.$ac_objext
19850 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19851   (eval $ac_compile) 2>conftest.er1
19852   ac_status=$?
19853   grep -v '^ *+' conftest.er1 >conftest.err
19854   rm -f conftest.er1
19855   cat conftest.err >&5
19856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19857   (exit $ac_status); } &&
19858          { ac_try='test -z "$ac_c_werror_flag"
19859                          || test ! -s conftest.err'
19860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19861   (eval $ac_try) 2>&5
19862   ac_status=$?
19863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19864   (exit $ac_status); }; } &&
19865          { ac_try='test -s conftest.$ac_objext'
19866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19867   (eval $ac_try) 2>&5
19868   ac_status=$?
19869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19870   (exit $ac_status); }; }; then
19871   ac_hi=$ac_mid; break
19872 else
19873   echo "$as_me: failed program was:" >&5
19874 sed 's/^/| /' conftest.$ac_ext >&5
19875
19876 ac_lo=`expr $ac_mid + 1`
19877                     if test $ac_lo -le $ac_mid; then
19878                       ac_lo= ac_hi=
19879                       break
19880                     fi
19881                     ac_mid=`expr 2 '*' $ac_mid + 1`
19882 fi
19883 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19884   done
19885 else
19886   echo "$as_me: failed program was:" >&5
19887 sed 's/^/| /' conftest.$ac_ext >&5
19888
19889 cat >conftest.$ac_ext <<_ACEOF
19890 /* confdefs.h.  */
19891 _ACEOF
19892 cat confdefs.h >>conftest.$ac_ext
19893 cat >>conftest.$ac_ext <<_ACEOF
19894 /* end confdefs.h.  */
19895 $ac_includes_default
19896 struct { char filler; long long int field; } pgac_struct;
19897 int
19898 main ()
19899 {
19900 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19901 test_array [0] = 0
19902
19903   ;
19904   return 0;
19905 }
19906 _ACEOF
19907 rm -f conftest.$ac_objext
19908 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19909   (eval $ac_compile) 2>conftest.er1
19910   ac_status=$?
19911   grep -v '^ *+' conftest.er1 >conftest.err
19912   rm -f conftest.er1
19913   cat conftest.err >&5
19914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19915   (exit $ac_status); } &&
19916          { ac_try='test -z "$ac_c_werror_flag"
19917                          || test ! -s conftest.err'
19918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19919   (eval $ac_try) 2>&5
19920   ac_status=$?
19921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19922   (exit $ac_status); }; } &&
19923          { ac_try='test -s conftest.$ac_objext'
19924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19925   (eval $ac_try) 2>&5
19926   ac_status=$?
19927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19928   (exit $ac_status); }; }; then
19929   ac_hi=-1 ac_mid=-1
19930   while :; do
19931     cat >conftest.$ac_ext <<_ACEOF
19932 /* confdefs.h.  */
19933 _ACEOF
19934 cat confdefs.h >>conftest.$ac_ext
19935 cat >>conftest.$ac_ext <<_ACEOF
19936 /* end confdefs.h.  */
19937 $ac_includes_default
19938 struct { char filler; long long int field; } pgac_struct;
19939 int
19940 main ()
19941 {
19942 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19943 test_array [0] = 0
19944
19945   ;
19946   return 0;
19947 }
19948 _ACEOF
19949 rm -f conftest.$ac_objext
19950 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19951   (eval $ac_compile) 2>conftest.er1
19952   ac_status=$?
19953   grep -v '^ *+' conftest.er1 >conftest.err
19954   rm -f conftest.er1
19955   cat conftest.err >&5
19956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19957   (exit $ac_status); } &&
19958          { ac_try='test -z "$ac_c_werror_flag"
19959                          || test ! -s conftest.err'
19960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19961   (eval $ac_try) 2>&5
19962   ac_status=$?
19963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19964   (exit $ac_status); }; } &&
19965          { ac_try='test -s conftest.$ac_objext'
19966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19967   (eval $ac_try) 2>&5
19968   ac_status=$?
19969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19970   (exit $ac_status); }; }; then
19971   ac_lo=$ac_mid; break
19972 else
19973   echo "$as_me: failed program was:" >&5
19974 sed 's/^/| /' conftest.$ac_ext >&5
19975
19976 ac_hi=`expr '(' $ac_mid ')' - 1`
19977                        if test $ac_mid -le $ac_hi; then
19978                          ac_lo= ac_hi=
19979                          break
19980                        fi
19981                        ac_mid=`expr 2 '*' $ac_mid`
19982 fi
19983 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19984   done
19985 else
19986   echo "$as_me: failed program was:" >&5
19987 sed 's/^/| /' conftest.$ac_ext >&5
19988
19989 ac_lo= ac_hi=
19990 fi
19991 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19992 fi
19993 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19994 # Binary search between lo and hi bounds.
19995 while test "x$ac_lo" != "x$ac_hi"; do
19996   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19997   cat >conftest.$ac_ext <<_ACEOF
19998 /* confdefs.h.  */
19999 _ACEOF
20000 cat confdefs.h >>conftest.$ac_ext
20001 cat >>conftest.$ac_ext <<_ACEOF
20002 /* end confdefs.h.  */
20003 $ac_includes_default
20004 struct { char filler; long long int field; } pgac_struct;
20005 int
20006 main ()
20007 {
20008 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20009 test_array [0] = 0
20010
20011   ;
20012   return 0;
20013 }
20014 _ACEOF
20015 rm -f conftest.$ac_objext
20016 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20017   (eval $ac_compile) 2>conftest.er1
20018   ac_status=$?
20019   grep -v '^ *+' conftest.er1 >conftest.err
20020   rm -f conftest.er1
20021   cat conftest.err >&5
20022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20023   (exit $ac_status); } &&
20024          { ac_try='test -z "$ac_c_werror_flag"
20025                          || test ! -s conftest.err'
20026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20027   (eval $ac_try) 2>&5
20028   ac_status=$?
20029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20030   (exit $ac_status); }; } &&
20031          { ac_try='test -s conftest.$ac_objext'
20032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20033   (eval $ac_try) 2>&5
20034   ac_status=$?
20035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20036   (exit $ac_status); }; }; then
20037   ac_hi=$ac_mid
20038 else
20039   echo "$as_me: failed program was:" >&5
20040 sed 's/^/| /' conftest.$ac_ext >&5
20041
20042 ac_lo=`expr '(' $ac_mid ')' + 1`
20043 fi
20044 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20045 done
20046 case $ac_lo in
20047 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20048 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20049 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20050    { (exit 1); exit 1; }; } ;;
20051 esac
20052 else
20053   if test "$cross_compiling" = yes; then
20054   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20055 See \`config.log' for more details." >&5
20056 echo "$as_me: error: cannot run test program while cross compiling
20057 See \`config.log' for more details." >&2;}
20058    { (exit 1); exit 1; }; }
20059 else
20060   cat >conftest.$ac_ext <<_ACEOF
20061 /* confdefs.h.  */
20062 _ACEOF
20063 cat confdefs.h >>conftest.$ac_ext
20064 cat >>conftest.$ac_ext <<_ACEOF
20065 /* end confdefs.h.  */
20066 $ac_includes_default
20067 struct { char filler; long long int field; } pgac_struct;
20068 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20069 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20070 #include <stdio.h>
20071 #include <stdlib.h>
20072 int
20073 main ()
20074 {
20075
20076   FILE *f = fopen ("conftest.val", "w");
20077   if (! f)
20078     exit (1);
20079   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20080     {
20081       long i = longval ();
20082       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20083         exit (1);
20084       fprintf (f, "%ld\n", i);
20085     }
20086   else
20087     {
20088       unsigned long i = ulongval ();
20089       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20090         exit (1);
20091       fprintf (f, "%lu\n", i);
20092     }
20093   exit (ferror (f) || fclose (f) != 0);
20094
20095   ;
20096   return 0;
20097 }
20098 _ACEOF
20099 rm -f conftest$ac_exeext
20100 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20101   (eval $ac_link) 2>&5
20102   ac_status=$?
20103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20104   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20106   (eval $ac_try) 2>&5
20107   ac_status=$?
20108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20109   (exit $ac_status); }; }; then
20110   pgac_cv_alignof_long_long_int=`cat conftest.val`
20111 else
20112   echo "$as_me: program exited with status $ac_status" >&5
20113 echo "$as_me: failed program was:" >&5
20114 sed 's/^/| /' conftest.$ac_ext >&5
20115
20116 ( exit $ac_status )
20117 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20118 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20119    { (exit 1); exit 1; }; }
20120 fi
20121 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20122 fi
20123 fi
20124 rm -f conftest.val
20125 else
20126   pgac_cv_alignof_long_long_int=0
20127 fi
20128 fi
20129 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20130 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20131 cat >>confdefs.h <<_ACEOF
20132 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20133 _ACEOF
20134
20135
20136 fi
20137 echo "$as_me:$LINENO: checking for double" >&5
20138 echo $ECHO_N "checking for double... $ECHO_C" >&6
20139 if test "${ac_cv_type_double+set}" = set; then
20140   echo $ECHO_N "(cached) $ECHO_C" >&6
20141 else
20142   cat >conftest.$ac_ext <<_ACEOF
20143 /* confdefs.h.  */
20144 _ACEOF
20145 cat confdefs.h >>conftest.$ac_ext
20146 cat >>conftest.$ac_ext <<_ACEOF
20147 /* end confdefs.h.  */
20148 $ac_includes_default
20149 int
20150 main ()
20151 {
20152 if ((double *) 0)
20153   return 0;
20154 if (sizeof (double))
20155   return 0;
20156   ;
20157   return 0;
20158 }
20159 _ACEOF
20160 rm -f conftest.$ac_objext
20161 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20162   (eval $ac_compile) 2>conftest.er1
20163   ac_status=$?
20164   grep -v '^ *+' conftest.er1 >conftest.err
20165   rm -f conftest.er1
20166   cat conftest.err >&5
20167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20168   (exit $ac_status); } &&
20169          { ac_try='test -z "$ac_c_werror_flag"
20170                          || test ! -s conftest.err'
20171   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20172   (eval $ac_try) 2>&5
20173   ac_status=$?
20174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20175   (exit $ac_status); }; } &&
20176          { ac_try='test -s conftest.$ac_objext'
20177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20178   (eval $ac_try) 2>&5
20179   ac_status=$?
20180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20181   (exit $ac_status); }; }; then
20182   ac_cv_type_double=yes
20183 else
20184   echo "$as_me: failed program was:" >&5
20185 sed 's/^/| /' conftest.$ac_ext >&5
20186
20187 ac_cv_type_double=no
20188 fi
20189 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20190 fi
20191 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20192 echo "${ECHO_T}$ac_cv_type_double" >&6
20193
20194 echo "$as_me:$LINENO: checking alignment of double" >&5
20195 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20196 if test "${pgac_cv_alignof_double+set}" = set; then
20197   echo $ECHO_N "(cached) $ECHO_C" >&6
20198 else
20199   if test "$ac_cv_type_double" = yes; then
20200   if test "$cross_compiling" = yes; then
20201   # Depending upon the size, compute the lo and hi bounds.
20202 cat >conftest.$ac_ext <<_ACEOF
20203 /* confdefs.h.  */
20204 _ACEOF
20205 cat confdefs.h >>conftest.$ac_ext
20206 cat >>conftest.$ac_ext <<_ACEOF
20207 /* end confdefs.h.  */
20208 $ac_includes_default
20209 struct { char filler; double field; } pgac_struct;
20210 int
20211 main ()
20212 {
20213 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20214 test_array [0] = 0
20215
20216   ;
20217   return 0;
20218 }
20219 _ACEOF
20220 rm -f conftest.$ac_objext
20221 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20222   (eval $ac_compile) 2>conftest.er1
20223   ac_status=$?
20224   grep -v '^ *+' conftest.er1 >conftest.err
20225   rm -f conftest.er1
20226   cat conftest.err >&5
20227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20228   (exit $ac_status); } &&
20229          { ac_try='test -z "$ac_c_werror_flag"
20230                          || test ! -s conftest.err'
20231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20232   (eval $ac_try) 2>&5
20233   ac_status=$?
20234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20235   (exit $ac_status); }; } &&
20236          { ac_try='test -s conftest.$ac_objext'
20237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20238   (eval $ac_try) 2>&5
20239   ac_status=$?
20240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20241   (exit $ac_status); }; }; then
20242   ac_lo=0 ac_mid=0
20243   while :; do
20244     cat >conftest.$ac_ext <<_ACEOF
20245 /* confdefs.h.  */
20246 _ACEOF
20247 cat confdefs.h >>conftest.$ac_ext
20248 cat >>conftest.$ac_ext <<_ACEOF
20249 /* end confdefs.h.  */
20250 $ac_includes_default
20251 struct { char filler; double field; } pgac_struct;
20252 int
20253 main ()
20254 {
20255 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20256 test_array [0] = 0
20257
20258   ;
20259   return 0;
20260 }
20261 _ACEOF
20262 rm -f conftest.$ac_objext
20263 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20264   (eval $ac_compile) 2>conftest.er1
20265   ac_status=$?
20266   grep -v '^ *+' conftest.er1 >conftest.err
20267   rm -f conftest.er1
20268   cat conftest.err >&5
20269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20270   (exit $ac_status); } &&
20271          { ac_try='test -z "$ac_c_werror_flag"
20272                          || test ! -s conftest.err'
20273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20274   (eval $ac_try) 2>&5
20275   ac_status=$?
20276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20277   (exit $ac_status); }; } &&
20278          { ac_try='test -s conftest.$ac_objext'
20279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20280   (eval $ac_try) 2>&5
20281   ac_status=$?
20282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20283   (exit $ac_status); }; }; then
20284   ac_hi=$ac_mid; break
20285 else
20286   echo "$as_me: failed program was:" >&5
20287 sed 's/^/| /' conftest.$ac_ext >&5
20288
20289 ac_lo=`expr $ac_mid + 1`
20290                     if test $ac_lo -le $ac_mid; then
20291                       ac_lo= ac_hi=
20292                       break
20293                     fi
20294                     ac_mid=`expr 2 '*' $ac_mid + 1`
20295 fi
20296 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20297   done
20298 else
20299   echo "$as_me: failed program was:" >&5
20300 sed 's/^/| /' conftest.$ac_ext >&5
20301
20302 cat >conftest.$ac_ext <<_ACEOF
20303 /* confdefs.h.  */
20304 _ACEOF
20305 cat confdefs.h >>conftest.$ac_ext
20306 cat >>conftest.$ac_ext <<_ACEOF
20307 /* end confdefs.h.  */
20308 $ac_includes_default
20309 struct { char filler; double field; } pgac_struct;
20310 int
20311 main ()
20312 {
20313 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20314 test_array [0] = 0
20315
20316   ;
20317   return 0;
20318 }
20319 _ACEOF
20320 rm -f conftest.$ac_objext
20321 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20322   (eval $ac_compile) 2>conftest.er1
20323   ac_status=$?
20324   grep -v '^ *+' conftest.er1 >conftest.err
20325   rm -f conftest.er1
20326   cat conftest.err >&5
20327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20328   (exit $ac_status); } &&
20329          { ac_try='test -z "$ac_c_werror_flag"
20330                          || test ! -s conftest.err'
20331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20332   (eval $ac_try) 2>&5
20333   ac_status=$?
20334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20335   (exit $ac_status); }; } &&
20336          { ac_try='test -s conftest.$ac_objext'
20337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20338   (eval $ac_try) 2>&5
20339   ac_status=$?
20340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20341   (exit $ac_status); }; }; then
20342   ac_hi=-1 ac_mid=-1
20343   while :; do
20344     cat >conftest.$ac_ext <<_ACEOF
20345 /* confdefs.h.  */
20346 _ACEOF
20347 cat confdefs.h >>conftest.$ac_ext
20348 cat >>conftest.$ac_ext <<_ACEOF
20349 /* end confdefs.h.  */
20350 $ac_includes_default
20351 struct { char filler; double field; } pgac_struct;
20352 int
20353 main ()
20354 {
20355 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20356 test_array [0] = 0
20357
20358   ;
20359   return 0;
20360 }
20361 _ACEOF
20362 rm -f conftest.$ac_objext
20363 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20364   (eval $ac_compile) 2>conftest.er1
20365   ac_status=$?
20366   grep -v '^ *+' conftest.er1 >conftest.err
20367   rm -f conftest.er1
20368   cat conftest.err >&5
20369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20370   (exit $ac_status); } &&
20371          { ac_try='test -z "$ac_c_werror_flag"
20372                          || test ! -s conftest.err'
20373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20374   (eval $ac_try) 2>&5
20375   ac_status=$?
20376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20377   (exit $ac_status); }; } &&
20378          { ac_try='test -s conftest.$ac_objext'
20379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20380   (eval $ac_try) 2>&5
20381   ac_status=$?
20382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20383   (exit $ac_status); }; }; then
20384   ac_lo=$ac_mid; break
20385 else
20386   echo "$as_me: failed program was:" >&5
20387 sed 's/^/| /' conftest.$ac_ext >&5
20388
20389 ac_hi=`expr '(' $ac_mid ')' - 1`
20390                        if test $ac_mid -le $ac_hi; then
20391                          ac_lo= ac_hi=
20392                          break
20393                        fi
20394                        ac_mid=`expr 2 '*' $ac_mid`
20395 fi
20396 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20397   done
20398 else
20399   echo "$as_me: failed program was:" >&5
20400 sed 's/^/| /' conftest.$ac_ext >&5
20401
20402 ac_lo= ac_hi=
20403 fi
20404 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20405 fi
20406 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20407 # Binary search between lo and hi bounds.
20408 while test "x$ac_lo" != "x$ac_hi"; do
20409   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20410   cat >conftest.$ac_ext <<_ACEOF
20411 /* confdefs.h.  */
20412 _ACEOF
20413 cat confdefs.h >>conftest.$ac_ext
20414 cat >>conftest.$ac_ext <<_ACEOF
20415 /* end confdefs.h.  */
20416 $ac_includes_default
20417 struct { char filler; double field; } pgac_struct;
20418 int
20419 main ()
20420 {
20421 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20422 test_array [0] = 0
20423
20424   ;
20425   return 0;
20426 }
20427 _ACEOF
20428 rm -f conftest.$ac_objext
20429 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20430   (eval $ac_compile) 2>conftest.er1
20431   ac_status=$?
20432   grep -v '^ *+' conftest.er1 >conftest.err
20433   rm -f conftest.er1
20434   cat conftest.err >&5
20435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20436   (exit $ac_status); } &&
20437          { ac_try='test -z "$ac_c_werror_flag"
20438                          || test ! -s conftest.err'
20439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20440   (eval $ac_try) 2>&5
20441   ac_status=$?
20442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20443   (exit $ac_status); }; } &&
20444          { ac_try='test -s conftest.$ac_objext'
20445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20446   (eval $ac_try) 2>&5
20447   ac_status=$?
20448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20449   (exit $ac_status); }; }; then
20450   ac_hi=$ac_mid
20451 else
20452   echo "$as_me: failed program was:" >&5
20453 sed 's/^/| /' conftest.$ac_ext >&5
20454
20455 ac_lo=`expr '(' $ac_mid ')' + 1`
20456 fi
20457 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20458 done
20459 case $ac_lo in
20460 ?*) pgac_cv_alignof_double=$ac_lo;;
20461 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20462 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20463    { (exit 1); exit 1; }; } ;;
20464 esac
20465 else
20466   if test "$cross_compiling" = yes; then
20467   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20468 See \`config.log' for more details." >&5
20469 echo "$as_me: error: cannot run test program while cross compiling
20470 See \`config.log' for more details." >&2;}
20471    { (exit 1); exit 1; }; }
20472 else
20473   cat >conftest.$ac_ext <<_ACEOF
20474 /* confdefs.h.  */
20475 _ACEOF
20476 cat confdefs.h >>conftest.$ac_ext
20477 cat >>conftest.$ac_ext <<_ACEOF
20478 /* end confdefs.h.  */
20479 $ac_includes_default
20480 struct { char filler; double field; } pgac_struct;
20481 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20482 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20483 #include <stdio.h>
20484 #include <stdlib.h>
20485 int
20486 main ()
20487 {
20488
20489   FILE *f = fopen ("conftest.val", "w");
20490   if (! f)
20491     exit (1);
20492   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20493     {
20494       long i = longval ();
20495       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20496         exit (1);
20497       fprintf (f, "%ld\n", i);
20498     }
20499   else
20500     {
20501       unsigned long i = ulongval ();
20502       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20503         exit (1);
20504       fprintf (f, "%lu\n", i);
20505     }
20506   exit (ferror (f) || fclose (f) != 0);
20507
20508   ;
20509   return 0;
20510 }
20511 _ACEOF
20512 rm -f conftest$ac_exeext
20513 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20514   (eval $ac_link) 2>&5
20515   ac_status=$?
20516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20517   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20519   (eval $ac_try) 2>&5
20520   ac_status=$?
20521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20522   (exit $ac_status); }; }; then
20523   pgac_cv_alignof_double=`cat conftest.val`
20524 else
20525   echo "$as_me: program exited with status $ac_status" >&5
20526 echo "$as_me: failed program was:" >&5
20527 sed 's/^/| /' conftest.$ac_ext >&5
20528
20529 ( exit $ac_status )
20530 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20531 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20532    { (exit 1); exit 1; }; }
20533 fi
20534 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20535 fi
20536 fi
20537 rm -f conftest.val
20538 else
20539   pgac_cv_alignof_double=0
20540 fi
20541 fi
20542 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20543 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20544 cat >>confdefs.h <<_ACEOF
20545 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20546 _ACEOF
20547
20548
20549
20550 # Compute maximum alignment of any basic type.
20551 # We assume long's alignment is at least as strong as char, short, or int;
20552 # but we must check long long (if it exists) and double.
20553
20554 MAX_ALIGNOF=$pgac_cv_alignof_long
20555 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20556   MAX_ALIGNOF=$pgac_cv_alignof_double
20557 fi
20558 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20559   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20560 fi
20561
20562 cat >>confdefs.h <<_ACEOF
20563 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20564 _ACEOF
20565
20566
20567
20568 # Some platforms predefine the types int8, int16, etc.  Only check
20569 # a (hopefully) representative subset.
20570 echo "$as_me:$LINENO: checking for int8" >&5
20571 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20572 if test "${ac_cv_type_int8+set}" = set; then
20573   echo $ECHO_N "(cached) $ECHO_C" >&6
20574 else
20575   cat >conftest.$ac_ext <<_ACEOF
20576 /* confdefs.h.  */
20577 _ACEOF
20578 cat confdefs.h >>conftest.$ac_ext
20579 cat >>conftest.$ac_ext <<_ACEOF
20580 /* end confdefs.h.  */
20581 #include <stdio.h>
20582 #ifdef HAVE_SUPPORTDEFS_H
20583 #include <SupportDefs.h>
20584 #endif
20585
20586 int
20587 main ()
20588 {
20589 if ((int8 *) 0)
20590   return 0;
20591 if (sizeof (int8))
20592   return 0;
20593   ;
20594   return 0;
20595 }
20596 _ACEOF
20597 rm -f conftest.$ac_objext
20598 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20599   (eval $ac_compile) 2>conftest.er1
20600   ac_status=$?
20601   grep -v '^ *+' conftest.er1 >conftest.err
20602   rm -f conftest.er1
20603   cat conftest.err >&5
20604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20605   (exit $ac_status); } &&
20606          { ac_try='test -z "$ac_c_werror_flag"
20607                          || test ! -s conftest.err'
20608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20609   (eval $ac_try) 2>&5
20610   ac_status=$?
20611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20612   (exit $ac_status); }; } &&
20613          { ac_try='test -s conftest.$ac_objext'
20614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20615   (eval $ac_try) 2>&5
20616   ac_status=$?
20617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20618   (exit $ac_status); }; }; then
20619   ac_cv_type_int8=yes
20620 else
20621   echo "$as_me: failed program was:" >&5
20622 sed 's/^/| /' conftest.$ac_ext >&5
20623
20624 ac_cv_type_int8=no
20625 fi
20626 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20627 fi
20628 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20629 echo "${ECHO_T}$ac_cv_type_int8" >&6
20630 if test $ac_cv_type_int8 = yes; then
20631
20632 cat >>confdefs.h <<_ACEOF
20633 #define HAVE_INT8 1
20634 _ACEOF
20635
20636
20637 fi
20638 echo "$as_me:$LINENO: checking for uint8" >&5
20639 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20640 if test "${ac_cv_type_uint8+set}" = set; then
20641   echo $ECHO_N "(cached) $ECHO_C" >&6
20642 else
20643   cat >conftest.$ac_ext <<_ACEOF
20644 /* confdefs.h.  */
20645 _ACEOF
20646 cat confdefs.h >>conftest.$ac_ext
20647 cat >>conftest.$ac_ext <<_ACEOF
20648 /* end confdefs.h.  */
20649 #include <stdio.h>
20650 #ifdef HAVE_SUPPORTDEFS_H
20651 #include <SupportDefs.h>
20652 #endif
20653
20654 int
20655 main ()
20656 {
20657 if ((uint8 *) 0)
20658   return 0;
20659 if (sizeof (uint8))
20660   return 0;
20661   ;
20662   return 0;
20663 }
20664 _ACEOF
20665 rm -f conftest.$ac_objext
20666 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20667   (eval $ac_compile) 2>conftest.er1
20668   ac_status=$?
20669   grep -v '^ *+' conftest.er1 >conftest.err
20670   rm -f conftest.er1
20671   cat conftest.err >&5
20672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20673   (exit $ac_status); } &&
20674          { ac_try='test -z "$ac_c_werror_flag"
20675                          || test ! -s conftest.err'
20676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20677   (eval $ac_try) 2>&5
20678   ac_status=$?
20679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20680   (exit $ac_status); }; } &&
20681          { ac_try='test -s conftest.$ac_objext'
20682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20683   (eval $ac_try) 2>&5
20684   ac_status=$?
20685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20686   (exit $ac_status); }; }; then
20687   ac_cv_type_uint8=yes
20688 else
20689   echo "$as_me: failed program was:" >&5
20690 sed 's/^/| /' conftest.$ac_ext >&5
20691
20692 ac_cv_type_uint8=no
20693 fi
20694 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20695 fi
20696 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20697 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20698 if test $ac_cv_type_uint8 = yes; then
20699
20700 cat >>confdefs.h <<_ACEOF
20701 #define HAVE_UINT8 1
20702 _ACEOF
20703
20704
20705 fi
20706 echo "$as_me:$LINENO: checking for int64" >&5
20707 echo $ECHO_N "checking for int64... $ECHO_C" >&6
20708 if test "${ac_cv_type_int64+set}" = set; then
20709   echo $ECHO_N "(cached) $ECHO_C" >&6
20710 else
20711   cat >conftest.$ac_ext <<_ACEOF
20712 /* confdefs.h.  */
20713 _ACEOF
20714 cat confdefs.h >>conftest.$ac_ext
20715 cat >>conftest.$ac_ext <<_ACEOF
20716 /* end confdefs.h.  */
20717 #include <stdio.h>
20718 #ifdef HAVE_SUPPORTDEFS_H
20719 #include <SupportDefs.h>
20720 #endif
20721
20722 int
20723 main ()
20724 {
20725 if ((int64 *) 0)
20726   return 0;
20727 if (sizeof (int64))
20728   return 0;
20729   ;
20730   return 0;
20731 }
20732 _ACEOF
20733 rm -f conftest.$ac_objext
20734 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20735   (eval $ac_compile) 2>conftest.er1
20736   ac_status=$?
20737   grep -v '^ *+' conftest.er1 >conftest.err
20738   rm -f conftest.er1
20739   cat conftest.err >&5
20740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20741   (exit $ac_status); } &&
20742          { ac_try='test -z "$ac_c_werror_flag"
20743                          || test ! -s conftest.err'
20744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20745   (eval $ac_try) 2>&5
20746   ac_status=$?
20747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20748   (exit $ac_status); }; } &&
20749          { ac_try='test -s conftest.$ac_objext'
20750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20751   (eval $ac_try) 2>&5
20752   ac_status=$?
20753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20754   (exit $ac_status); }; }; then
20755   ac_cv_type_int64=yes
20756 else
20757   echo "$as_me: failed program was:" >&5
20758 sed 's/^/| /' conftest.$ac_ext >&5
20759
20760 ac_cv_type_int64=no
20761 fi
20762 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20763 fi
20764 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
20765 echo "${ECHO_T}$ac_cv_type_int64" >&6
20766 if test $ac_cv_type_int64 = yes; then
20767
20768 cat >>confdefs.h <<_ACEOF
20769 #define HAVE_INT64 1
20770 _ACEOF
20771
20772
20773 fi
20774 echo "$as_me:$LINENO: checking for uint64" >&5
20775 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
20776 if test "${ac_cv_type_uint64+set}" = set; then
20777   echo $ECHO_N "(cached) $ECHO_C" >&6
20778 else
20779   cat >conftest.$ac_ext <<_ACEOF
20780 /* confdefs.h.  */
20781 _ACEOF
20782 cat confdefs.h >>conftest.$ac_ext
20783 cat >>conftest.$ac_ext <<_ACEOF
20784 /* end confdefs.h.  */
20785 #include <stdio.h>
20786 #ifdef HAVE_SUPPORTDEFS_H
20787 #include <SupportDefs.h>
20788 #endif
20789
20790 int
20791 main ()
20792 {
20793 if ((uint64 *) 0)
20794   return 0;
20795 if (sizeof (uint64))
20796   return 0;
20797   ;
20798   return 0;
20799 }
20800 _ACEOF
20801 rm -f conftest.$ac_objext
20802 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20803   (eval $ac_compile) 2>conftest.er1
20804   ac_status=$?
20805   grep -v '^ *+' conftest.er1 >conftest.err
20806   rm -f conftest.er1
20807   cat conftest.err >&5
20808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20809   (exit $ac_status); } &&
20810          { ac_try='test -z "$ac_c_werror_flag"
20811                          || test ! -s conftest.err'
20812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20813   (eval $ac_try) 2>&5
20814   ac_status=$?
20815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20816   (exit $ac_status); }; } &&
20817          { ac_try='test -s conftest.$ac_objext'
20818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20819   (eval $ac_try) 2>&5
20820   ac_status=$?
20821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20822   (exit $ac_status); }; }; then
20823   ac_cv_type_uint64=yes
20824 else
20825   echo "$as_me: failed program was:" >&5
20826 sed 's/^/| /' conftest.$ac_ext >&5
20827
20828 ac_cv_type_uint64=no
20829 fi
20830 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20831 fi
20832 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
20833 echo "${ECHO_T}$ac_cv_type_uint64" >&6
20834 if test $ac_cv_type_uint64 = yes; then
20835
20836 cat >>confdefs.h <<_ACEOF
20837 #define HAVE_UINT64 1
20838 _ACEOF
20839
20840
20841 fi
20842
20843
20844 # We also check for sig_atomic_t, which *should* be defined per ANSI
20845 # C, but is missing on some old platforms.
20846 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
20847 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
20848 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
20849   echo $ECHO_N "(cached) $ECHO_C" >&6
20850 else
20851   cat >conftest.$ac_ext <<_ACEOF
20852 /* confdefs.h.  */
20853 _ACEOF
20854 cat confdefs.h >>conftest.$ac_ext
20855 cat >>conftest.$ac_ext <<_ACEOF
20856 /* end confdefs.h.  */
20857 #include <signal.h>
20858
20859 int
20860 main ()
20861 {
20862 if ((sig_atomic_t *) 0)
20863   return 0;
20864 if (sizeof (sig_atomic_t))
20865   return 0;
20866   ;
20867   return 0;
20868 }
20869 _ACEOF
20870 rm -f conftest.$ac_objext
20871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20872   (eval $ac_compile) 2>conftest.er1
20873   ac_status=$?
20874   grep -v '^ *+' conftest.er1 >conftest.err
20875   rm -f conftest.er1
20876   cat conftest.err >&5
20877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20878   (exit $ac_status); } &&
20879          { ac_try='test -z "$ac_c_werror_flag"
20880                          || test ! -s conftest.err'
20881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20882   (eval $ac_try) 2>&5
20883   ac_status=$?
20884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20885   (exit $ac_status); }; } &&
20886          { ac_try='test -s conftest.$ac_objext'
20887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20888   (eval $ac_try) 2>&5
20889   ac_status=$?
20890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20891   (exit $ac_status); }; }; then
20892   ac_cv_type_sig_atomic_t=yes
20893 else
20894   echo "$as_me: failed program was:" >&5
20895 sed 's/^/| /' conftest.$ac_ext >&5
20896
20897 ac_cv_type_sig_atomic_t=no
20898 fi
20899 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20900 fi
20901 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
20902 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
20903 if test $ac_cv_type_sig_atomic_t = yes; then
20904
20905 cat >>confdefs.h <<_ACEOF
20906 #define HAVE_SIG_ATOMIC_T 1
20907 _ACEOF
20908
20909
20910 fi
20911
20912
20913
20914 if test x"$template" != x"win32"
20915 then
20916 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
20917 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
20918 if test "${pgac_cv_func_posix_signals+set}" = set; then
20919   echo $ECHO_N "(cached) $ECHO_C" >&6
20920 else
20921   cat >conftest.$ac_ext <<_ACEOF
20922 /* confdefs.h.  */
20923 _ACEOF
20924 cat confdefs.h >>conftest.$ac_ext
20925 cat >>conftest.$ac_ext <<_ACEOF
20926 /* end confdefs.h.  */
20927 #include <signal.h>
20928
20929 int
20930 main ()
20931 {
20932 struct sigaction act, oact;
20933 sigemptyset(&act.sa_mask);
20934 act.sa_flags = SA_RESTART;
20935 sigaction(0, &act, &oact);
20936   ;
20937   return 0;
20938 }
20939 _ACEOF
20940 rm -f conftest.$ac_objext conftest$ac_exeext
20941 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20942   (eval $ac_link) 2>conftest.er1
20943   ac_status=$?
20944   grep -v '^ *+' conftest.er1 >conftest.err
20945   rm -f conftest.er1
20946   cat conftest.err >&5
20947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20948   (exit $ac_status); } &&
20949          { ac_try='test -z "$ac_c_werror_flag"
20950                          || test ! -s conftest.err'
20951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20952   (eval $ac_try) 2>&5
20953   ac_status=$?
20954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20955   (exit $ac_status); }; } &&
20956          { ac_try='test -s conftest$ac_exeext'
20957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20958   (eval $ac_try) 2>&5
20959   ac_status=$?
20960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20961   (exit $ac_status); }; }; then
20962   pgac_cv_func_posix_signals=yes
20963 else
20964   echo "$as_me: failed program was:" >&5
20965 sed 's/^/| /' conftest.$ac_ext >&5
20966
20967 pgac_cv_func_posix_signals=no
20968 fi
20969 rm -f conftest.err conftest.$ac_objext \
20970       conftest$ac_exeext conftest.$ac_ext
20971 fi
20972 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
20973 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
20974 if test x"$pgac_cv_func_posix_signals" = xyes ; then
20975
20976 cat >>confdefs.h <<\_ACEOF
20977 #define HAVE_POSIX_SIGNALS
20978 _ACEOF
20979
20980 fi
20981 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
20982
20983 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
20984   { { echo "$as_me:$LINENO: error:
20985 *** Thread-safety requires POSIX signals, which are not supported by your
20986 *** operating system.
20987 " >&5
20988 echo "$as_me: error:
20989 *** Thread-safety requires POSIX signals, which are not supported by your
20990 *** operating system.
20991 " >&2;}
20992    { (exit 1); exit 1; }; }
20993 fi
20994 fi
20995
20996 if test $ac_cv_func_fseeko = yes; then
20997 # Check whether --enable-largefile or --disable-largefile was given.
20998 if test "${enable_largefile+set}" = set; then
20999   enableval="$enable_largefile"
21000
21001 fi;
21002 if test "$enable_largefile" != no; then
21003
21004   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21005 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21006 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21007   echo $ECHO_N "(cached) $ECHO_C" >&6
21008 else
21009   ac_cv_sys_largefile_CC=no
21010      if test "$GCC" != yes; then
21011        ac_save_CC=$CC
21012        while :; do
21013          # IRIX 6.2 and later do not support large files by default,
21014          # so use the C compiler's -n32 option if that helps.
21015          cat >conftest.$ac_ext <<_ACEOF
21016 /* confdefs.h.  */
21017 _ACEOF
21018 cat confdefs.h >>conftest.$ac_ext
21019 cat >>conftest.$ac_ext <<_ACEOF
21020 /* end confdefs.h.  */
21021 #include <sys/types.h>
21022  /* Check that off_t can represent 2**63 - 1 correctly.
21023     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21024     since some C++ compilers masquerading as C compilers
21025     incorrectly reject 9223372036854775807.  */
21026 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21027   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21028                        && LARGE_OFF_T % 2147483647 == 1)
21029                       ? 1 : -1];
21030 int
21031 main ()
21032 {
21033
21034   ;
21035   return 0;
21036 }
21037 _ACEOF
21038          rm -f conftest.$ac_objext
21039 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21040   (eval $ac_compile) 2>conftest.er1
21041   ac_status=$?
21042   grep -v '^ *+' conftest.er1 >conftest.err
21043   rm -f conftest.er1
21044   cat conftest.err >&5
21045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21046   (exit $ac_status); } &&
21047          { ac_try='test -z "$ac_c_werror_flag"
21048                          || test ! -s conftest.err'
21049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21050   (eval $ac_try) 2>&5
21051   ac_status=$?
21052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21053   (exit $ac_status); }; } &&
21054          { ac_try='test -s conftest.$ac_objext'
21055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21056   (eval $ac_try) 2>&5
21057   ac_status=$?
21058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21059   (exit $ac_status); }; }; then
21060   break
21061 else
21062   echo "$as_me: failed program was:" >&5
21063 sed 's/^/| /' conftest.$ac_ext >&5
21064
21065 fi
21066 rm -f conftest.err conftest.$ac_objext
21067          CC="$CC -n32"
21068          rm -f conftest.$ac_objext
21069 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21070   (eval $ac_compile) 2>conftest.er1
21071   ac_status=$?
21072   grep -v '^ *+' conftest.er1 >conftest.err
21073   rm -f conftest.er1
21074   cat conftest.err >&5
21075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21076   (exit $ac_status); } &&
21077          { ac_try='test -z "$ac_c_werror_flag"
21078                          || test ! -s conftest.err'
21079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21080   (eval $ac_try) 2>&5
21081   ac_status=$?
21082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21083   (exit $ac_status); }; } &&
21084          { ac_try='test -s conftest.$ac_objext'
21085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21086   (eval $ac_try) 2>&5
21087   ac_status=$?
21088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21089   (exit $ac_status); }; }; then
21090   ac_cv_sys_largefile_CC=' -n32'; break
21091 else
21092   echo "$as_me: failed program was:" >&5
21093 sed 's/^/| /' conftest.$ac_ext >&5
21094
21095 fi
21096 rm -f conftest.err conftest.$ac_objext
21097          break
21098        done
21099        CC=$ac_save_CC
21100        rm -f conftest.$ac_ext
21101     fi
21102 fi
21103 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21104 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21105   if test "$ac_cv_sys_largefile_CC" != no; then
21106     CC=$CC$ac_cv_sys_largefile_CC
21107   fi
21108
21109   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21110 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21111 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21112   echo $ECHO_N "(cached) $ECHO_C" >&6
21113 else
21114   while :; do
21115   ac_cv_sys_file_offset_bits=no
21116   cat >conftest.$ac_ext <<_ACEOF
21117 /* confdefs.h.  */
21118 _ACEOF
21119 cat confdefs.h >>conftest.$ac_ext
21120 cat >>conftest.$ac_ext <<_ACEOF
21121 /* end confdefs.h.  */
21122 #include <sys/types.h>
21123  /* Check that off_t can represent 2**63 - 1 correctly.
21124     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21125     since some C++ compilers masquerading as C compilers
21126     incorrectly reject 9223372036854775807.  */
21127 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21128   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21129                        && LARGE_OFF_T % 2147483647 == 1)
21130                       ? 1 : -1];
21131 int
21132 main ()
21133 {
21134
21135   ;
21136   return 0;
21137 }
21138 _ACEOF
21139 rm -f conftest.$ac_objext
21140 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21141   (eval $ac_compile) 2>conftest.er1
21142   ac_status=$?
21143   grep -v '^ *+' conftest.er1 >conftest.err
21144   rm -f conftest.er1
21145   cat conftest.err >&5
21146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21147   (exit $ac_status); } &&
21148          { ac_try='test -z "$ac_c_werror_flag"
21149                          || test ! -s conftest.err'
21150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21151   (eval $ac_try) 2>&5
21152   ac_status=$?
21153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21154   (exit $ac_status); }; } &&
21155          { ac_try='test -s conftest.$ac_objext'
21156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21157   (eval $ac_try) 2>&5
21158   ac_status=$?
21159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21160   (exit $ac_status); }; }; then
21161   break
21162 else
21163   echo "$as_me: failed program was:" >&5
21164 sed 's/^/| /' conftest.$ac_ext >&5
21165
21166 fi
21167 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21168   cat >conftest.$ac_ext <<_ACEOF
21169 /* confdefs.h.  */
21170 _ACEOF
21171 cat confdefs.h >>conftest.$ac_ext
21172 cat >>conftest.$ac_ext <<_ACEOF
21173 /* end confdefs.h.  */
21174 #define _FILE_OFFSET_BITS 64
21175 #include <sys/types.h>
21176  /* Check that off_t can represent 2**63 - 1 correctly.
21177     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21178     since some C++ compilers masquerading as C compilers
21179     incorrectly reject 9223372036854775807.  */
21180 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21181   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21182                        && LARGE_OFF_T % 2147483647 == 1)
21183                       ? 1 : -1];
21184 int
21185 main ()
21186 {
21187
21188   ;
21189   return 0;
21190 }
21191 _ACEOF
21192 rm -f conftest.$ac_objext
21193 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21194   (eval $ac_compile) 2>conftest.er1
21195   ac_status=$?
21196   grep -v '^ *+' conftest.er1 >conftest.err
21197   rm -f conftest.er1
21198   cat conftest.err >&5
21199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21200   (exit $ac_status); } &&
21201          { ac_try='test -z "$ac_c_werror_flag"
21202                          || test ! -s conftest.err'
21203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21204   (eval $ac_try) 2>&5
21205   ac_status=$?
21206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21207   (exit $ac_status); }; } &&
21208          { ac_try='test -s conftest.$ac_objext'
21209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21210   (eval $ac_try) 2>&5
21211   ac_status=$?
21212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21213   (exit $ac_status); }; }; then
21214   ac_cv_sys_file_offset_bits=64; break
21215 else
21216   echo "$as_me: failed program was:" >&5
21217 sed 's/^/| /' conftest.$ac_ext >&5
21218
21219 fi
21220 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21221   break
21222 done
21223 fi
21224 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21225 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21226 if test "$ac_cv_sys_file_offset_bits" != no; then
21227
21228 cat >>confdefs.h <<_ACEOF
21229 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21230 _ACEOF
21231
21232 fi
21233 rm -f conftest*
21234   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21235 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21236 if test "${ac_cv_sys_large_files+set}" = set; then
21237   echo $ECHO_N "(cached) $ECHO_C" >&6
21238 else
21239   while :; do
21240   ac_cv_sys_large_files=no
21241   cat >conftest.$ac_ext <<_ACEOF
21242 /* confdefs.h.  */
21243 _ACEOF
21244 cat confdefs.h >>conftest.$ac_ext
21245 cat >>conftest.$ac_ext <<_ACEOF
21246 /* end confdefs.h.  */
21247 #include <sys/types.h>
21248  /* Check that off_t can represent 2**63 - 1 correctly.
21249     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21250     since some C++ compilers masquerading as C compilers
21251     incorrectly reject 9223372036854775807.  */
21252 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21253   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21254                        && LARGE_OFF_T % 2147483647 == 1)
21255                       ? 1 : -1];
21256 int
21257 main ()
21258 {
21259
21260   ;
21261   return 0;
21262 }
21263 _ACEOF
21264 rm -f conftest.$ac_objext
21265 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21266   (eval $ac_compile) 2>conftest.er1
21267   ac_status=$?
21268   grep -v '^ *+' conftest.er1 >conftest.err
21269   rm -f conftest.er1
21270   cat conftest.err >&5
21271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21272   (exit $ac_status); } &&
21273          { ac_try='test -z "$ac_c_werror_flag"
21274                          || test ! -s conftest.err'
21275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21276   (eval $ac_try) 2>&5
21277   ac_status=$?
21278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21279   (exit $ac_status); }; } &&
21280          { ac_try='test -s conftest.$ac_objext'
21281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21282   (eval $ac_try) 2>&5
21283   ac_status=$?
21284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21285   (exit $ac_status); }; }; then
21286   break
21287 else
21288   echo "$as_me: failed program was:" >&5
21289 sed 's/^/| /' conftest.$ac_ext >&5
21290
21291 fi
21292 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21293   cat >conftest.$ac_ext <<_ACEOF
21294 /* confdefs.h.  */
21295 _ACEOF
21296 cat confdefs.h >>conftest.$ac_ext
21297 cat >>conftest.$ac_ext <<_ACEOF
21298 /* end confdefs.h.  */
21299 #define _LARGE_FILES 1
21300 #include <sys/types.h>
21301  /* Check that off_t can represent 2**63 - 1 correctly.
21302     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21303     since some C++ compilers masquerading as C compilers
21304     incorrectly reject 9223372036854775807.  */
21305 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21306   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21307                        && LARGE_OFF_T % 2147483647 == 1)
21308                       ? 1 : -1];
21309 int
21310 main ()
21311 {
21312
21313   ;
21314   return 0;
21315 }
21316 _ACEOF
21317 rm -f conftest.$ac_objext
21318 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21319   (eval $ac_compile) 2>conftest.er1
21320   ac_status=$?
21321   grep -v '^ *+' conftest.er1 >conftest.err
21322   rm -f conftest.er1
21323   cat conftest.err >&5
21324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21325   (exit $ac_status); } &&
21326          { ac_try='test -z "$ac_c_werror_flag"
21327                          || test ! -s conftest.err'
21328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21329   (eval $ac_try) 2>&5
21330   ac_status=$?
21331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21332   (exit $ac_status); }; } &&
21333          { ac_try='test -s conftest.$ac_objext'
21334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21335   (eval $ac_try) 2>&5
21336   ac_status=$?
21337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21338   (exit $ac_status); }; }; then
21339   ac_cv_sys_large_files=1; break
21340 else
21341   echo "$as_me: failed program was:" >&5
21342 sed 's/^/| /' conftest.$ac_ext >&5
21343
21344 fi
21345 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21346   break
21347 done
21348 fi
21349 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21350 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21351 if test "$ac_cv_sys_large_files" != no; then
21352
21353 cat >>confdefs.h <<_ACEOF
21354 #define _LARGE_FILES $ac_cv_sys_large_files
21355 _ACEOF
21356
21357 fi
21358 rm -f conftest*
21359 fi
21360
21361 fi
21362
21363 # SunOS doesn't handle negative byte comparisons properly with +/- return
21364 echo "$as_me:$LINENO: checking for working memcmp" >&5
21365 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21366 if test "${ac_cv_func_memcmp_working+set}" = set; then
21367   echo $ECHO_N "(cached) $ECHO_C" >&6
21368 else
21369   if test "$cross_compiling" = yes; then
21370   ac_cv_func_memcmp_working=no
21371 else
21372   cat >conftest.$ac_ext <<_ACEOF
21373 /* confdefs.h.  */
21374 _ACEOF
21375 cat confdefs.h >>conftest.$ac_ext
21376 cat >>conftest.$ac_ext <<_ACEOF
21377 /* end confdefs.h.  */
21378 $ac_includes_default
21379 int
21380 main ()
21381 {
21382
21383   /* Some versions of memcmp are not 8-bit clean.  */
21384   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21385   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21386     exit (1);
21387
21388   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21389      or more and with at least one buffer not starting on a 4-byte boundary.
21390      William Lewis provided this test program.   */
21391   {
21392     char foo[21];
21393     char bar[21];
21394     int i;
21395     for (i = 0; i < 4; i++)
21396       {
21397         char *a = foo + i;
21398         char *b = bar + i;
21399         strcpy (a, "--------01111111");
21400         strcpy (b, "--------10000000");
21401         if (memcmp (a, b, 16) >= 0)
21402           exit (1);
21403       }
21404     exit (0);
21405   }
21406
21407   ;
21408   return 0;
21409 }
21410 _ACEOF
21411 rm -f conftest$ac_exeext
21412 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21413   (eval $ac_link) 2>&5
21414   ac_status=$?
21415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21416   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21418   (eval $ac_try) 2>&5
21419   ac_status=$?
21420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21421   (exit $ac_status); }; }; then
21422   ac_cv_func_memcmp_working=yes
21423 else
21424   echo "$as_me: program exited with status $ac_status" >&5
21425 echo "$as_me: failed program was:" >&5
21426 sed 's/^/| /' conftest.$ac_ext >&5
21427
21428 ( exit $ac_status )
21429 ac_cv_func_memcmp_working=no
21430 fi
21431 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21432 fi
21433 fi
21434 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21435 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21436 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21437     "memcmp.$ac_objext"   | \
21438   *" memcmp.$ac_objext"   | \
21439     "memcmp.$ac_objext "* | \
21440   *" memcmp.$ac_objext "* ) ;;
21441   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21442 esac
21443
21444
21445
21446
21447 # Select semaphore implementation type.
21448 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21449
21450 cat >>confdefs.h <<\_ACEOF
21451 #define USE_NAMED_POSIX_SEMAPHORES 1
21452 _ACEOF
21453
21454   SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21455 else
21456   if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21457
21458 cat >>confdefs.h <<\_ACEOF
21459 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21460 _ACEOF
21461
21462     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21463   else
21464
21465 cat >>confdefs.h <<\_ACEOF
21466 #define USE_SYSV_SEMAPHORES 1
21467 _ACEOF
21468
21469     SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21470   fi
21471 fi
21472
21473
21474 # Select shared-memory implementation type.
21475
21476 cat >>confdefs.h <<\_ACEOF
21477 #define USE_SYSV_SHARED_MEMORY 1
21478 _ACEOF
21479
21480 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21481
21482
21483 if test "$enable_nls" = yes ; then
21484
21485   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21486 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21487 if test "${ac_cv_search_gettext+set}" = set; then
21488   echo $ECHO_N "(cached) $ECHO_C" >&6
21489 else
21490   ac_func_search_save_LIBS=$LIBS
21491 ac_cv_search_gettext=no
21492 cat >conftest.$ac_ext <<_ACEOF
21493 /* confdefs.h.  */
21494 _ACEOF
21495 cat confdefs.h >>conftest.$ac_ext
21496 cat >>conftest.$ac_ext <<_ACEOF
21497 /* end confdefs.h.  */
21498
21499 /* Override any gcc2 internal prototype to avoid an error.  */
21500 #ifdef __cplusplus
21501 extern "C"
21502 #endif
21503 /* We use char because int might match the return type of a gcc2
21504    builtin and then its argument prototype would still apply.  */
21505 char gettext ();
21506 int
21507 main ()
21508 {
21509 gettext ();
21510   ;
21511   return 0;
21512 }
21513 _ACEOF
21514 rm -f conftest.$ac_objext conftest$ac_exeext
21515 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21516   (eval $ac_link) 2>conftest.er1
21517   ac_status=$?
21518   grep -v '^ *+' conftest.er1 >conftest.err
21519   rm -f conftest.er1
21520   cat conftest.err >&5
21521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21522   (exit $ac_status); } &&
21523          { ac_try='test -z "$ac_c_werror_flag"
21524                          || test ! -s conftest.err'
21525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21526   (eval $ac_try) 2>&5
21527   ac_status=$?
21528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21529   (exit $ac_status); }; } &&
21530          { ac_try='test -s conftest$ac_exeext'
21531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21532   (eval $ac_try) 2>&5
21533   ac_status=$?
21534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21535   (exit $ac_status); }; }; then
21536   ac_cv_search_gettext="none required"
21537 else
21538   echo "$as_me: failed program was:" >&5
21539 sed 's/^/| /' conftest.$ac_ext >&5
21540
21541 fi
21542 rm -f conftest.err conftest.$ac_objext \
21543       conftest$ac_exeext conftest.$ac_ext
21544 if test "$ac_cv_search_gettext" = no; then
21545   for ac_lib in intl; do
21546     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21547     cat >conftest.$ac_ext <<_ACEOF
21548 /* confdefs.h.  */
21549 _ACEOF
21550 cat confdefs.h >>conftest.$ac_ext
21551 cat >>conftest.$ac_ext <<_ACEOF
21552 /* end confdefs.h.  */
21553
21554 /* Override any gcc2 internal prototype to avoid an error.  */
21555 #ifdef __cplusplus
21556 extern "C"
21557 #endif
21558 /* We use char because int might match the return type of a gcc2
21559    builtin and then its argument prototype would still apply.  */
21560 char gettext ();
21561 int
21562 main ()
21563 {
21564 gettext ();
21565   ;
21566   return 0;
21567 }
21568 _ACEOF
21569 rm -f conftest.$ac_objext conftest$ac_exeext
21570 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21571   (eval $ac_link) 2>conftest.er1
21572   ac_status=$?
21573   grep -v '^ *+' conftest.er1 >conftest.err
21574   rm -f conftest.er1
21575   cat conftest.err >&5
21576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21577   (exit $ac_status); } &&
21578          { ac_try='test -z "$ac_c_werror_flag"
21579                          || test ! -s conftest.err'
21580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21581   (eval $ac_try) 2>&5
21582   ac_status=$?
21583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21584   (exit $ac_status); }; } &&
21585          { ac_try='test -s conftest$ac_exeext'
21586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21587   (eval $ac_try) 2>&5
21588   ac_status=$?
21589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21590   (exit $ac_status); }; }; then
21591   ac_cv_search_gettext="-l$ac_lib"
21592 break
21593 else
21594   echo "$as_me: failed program was:" >&5
21595 sed 's/^/| /' conftest.$ac_ext >&5
21596
21597 fi
21598 rm -f conftest.err conftest.$ac_objext \
21599       conftest$ac_exeext conftest.$ac_ext
21600   done
21601 fi
21602 LIBS=$ac_func_search_save_LIBS
21603 fi
21604 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21605 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21606 if test "$ac_cv_search_gettext" != no; then
21607   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21608
21609 else
21610   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21611 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21612    { (exit 1); exit 1; }; }
21613 fi
21614
21615   if test "${ac_cv_header_libintl_h+set}" = set; then
21616   echo "$as_me:$LINENO: checking for libintl.h" >&5
21617 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21618 if test "${ac_cv_header_libintl_h+set}" = set; then
21619   echo $ECHO_N "(cached) $ECHO_C" >&6
21620 fi
21621 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21622 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21623 else
21624   # Is the header compilable?
21625 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21626 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21627 cat >conftest.$ac_ext <<_ACEOF
21628 /* confdefs.h.  */
21629 _ACEOF
21630 cat confdefs.h >>conftest.$ac_ext
21631 cat >>conftest.$ac_ext <<_ACEOF
21632 /* end confdefs.h.  */
21633 $ac_includes_default
21634 #include <libintl.h>
21635 _ACEOF
21636 rm -f conftest.$ac_objext
21637 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21638   (eval $ac_compile) 2>conftest.er1
21639   ac_status=$?
21640   grep -v '^ *+' conftest.er1 >conftest.err
21641   rm -f conftest.er1
21642   cat conftest.err >&5
21643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21644   (exit $ac_status); } &&
21645          { ac_try='test -z "$ac_c_werror_flag"
21646                          || test ! -s conftest.err'
21647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21648   (eval $ac_try) 2>&5
21649   ac_status=$?
21650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21651   (exit $ac_status); }; } &&
21652          { ac_try='test -s conftest.$ac_objext'
21653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21654   (eval $ac_try) 2>&5
21655   ac_status=$?
21656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21657   (exit $ac_status); }; }; then
21658   ac_header_compiler=yes
21659 else
21660   echo "$as_me: failed program was:" >&5
21661 sed 's/^/| /' conftest.$ac_ext >&5
21662
21663 ac_header_compiler=no
21664 fi
21665 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21666 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21667 echo "${ECHO_T}$ac_header_compiler" >&6
21668
21669 # Is the header present?
21670 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21671 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21672 cat >conftest.$ac_ext <<_ACEOF
21673 /* confdefs.h.  */
21674 _ACEOF
21675 cat confdefs.h >>conftest.$ac_ext
21676 cat >>conftest.$ac_ext <<_ACEOF
21677 /* end confdefs.h.  */
21678 #include <libintl.h>
21679 _ACEOF
21680 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21681   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21682   ac_status=$?
21683   grep -v '^ *+' conftest.er1 >conftest.err
21684   rm -f conftest.er1
21685   cat conftest.err >&5
21686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21687   (exit $ac_status); } >/dev/null; then
21688   if test -s conftest.err; then
21689     ac_cpp_err=$ac_c_preproc_warn_flag
21690     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21691   else
21692     ac_cpp_err=
21693   fi
21694 else
21695   ac_cpp_err=yes
21696 fi
21697 if test -z "$ac_cpp_err"; then
21698   ac_header_preproc=yes
21699 else
21700   echo "$as_me: failed program was:" >&5
21701 sed 's/^/| /' conftest.$ac_ext >&5
21702
21703   ac_header_preproc=no
21704 fi
21705 rm -f conftest.err conftest.$ac_ext
21706 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21707 echo "${ECHO_T}$ac_header_preproc" >&6
21708
21709 # So?  What about this header?
21710 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21711   yes:no: )
21712     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21713 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21714     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
21715 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
21716     ac_header_preproc=yes
21717     ;;
21718   no:yes:* )
21719     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
21720 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
21721     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
21722 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
21723     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
21724 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
21725     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
21726 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21727     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
21728 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
21729     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
21730 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
21731     (
21732       cat <<\_ASBOX
21733 ## ---------------------------------------- ##
21734 ## Report this to pgsql-bugs@postgresql.org ##
21735 ## ---------------------------------------- ##
21736 _ASBOX
21737     ) |
21738       sed "s/^/$as_me: WARNING:     /" >&2
21739     ;;
21740 esac
21741 echo "$as_me:$LINENO: checking for libintl.h" >&5
21742 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21743 if test "${ac_cv_header_libintl_h+set}" = set; then
21744   echo $ECHO_N "(cached) $ECHO_C" >&6
21745 else
21746   ac_cv_header_libintl_h=$ac_header_preproc
21747 fi
21748 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21749 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21750
21751 fi
21752 if test $ac_cv_header_libintl_h = yes; then
21753   :
21754 else
21755   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
21756 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
21757    { (exit 1); exit 1; }; }
21758 fi
21759
21760
21761   for ac_prog in msgfmt
21762 do
21763   # Extract the first word of "$ac_prog", so it can be a program name with args.
21764 set dummy $ac_prog; ac_word=$2
21765 echo "$as_me:$LINENO: checking for $ac_word" >&5
21766 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21767 if test "${ac_cv_prog_MSGFMT+set}" = set; then
21768   echo $ECHO_N "(cached) $ECHO_C" >&6
21769 else
21770   if test -n "$MSGFMT"; then
21771   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
21772 else
21773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21774 for as_dir in $PATH
21775 do
21776   IFS=$as_save_IFS
21777   test -z "$as_dir" && as_dir=.
21778   for ac_exec_ext in '' $ac_executable_extensions; do
21779   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21780     ac_cv_prog_MSGFMT="$ac_prog"
21781     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21782     break 2
21783   fi
21784 done
21785 done
21786
21787 fi
21788 fi
21789 MSGFMT=$ac_cv_prog_MSGFMT
21790 if test -n "$MSGFMT"; then
21791   echo "$as_me:$LINENO: result: $MSGFMT" >&5
21792 echo "${ECHO_T}$MSGFMT" >&6
21793 else
21794   echo "$as_me:$LINENO: result: no" >&5
21795 echo "${ECHO_T}no" >&6
21796 fi
21797
21798   test -n "$MSGFMT" && break
21799 done
21800
21801   if test -z "$MSGFMT"; then
21802     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
21803 echo "$as_me: error: msgfmt is required for NLS" >&2;}
21804    { (exit 1); exit 1; }; }
21805   fi
21806   for ac_prog in msgmerge
21807 do
21808   # Extract the first word of "$ac_prog", so it can be a program name with args.
21809 set dummy $ac_prog; ac_word=$2
21810 echo "$as_me:$LINENO: checking for $ac_word" >&5
21811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21812 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
21813   echo $ECHO_N "(cached) $ECHO_C" >&6
21814 else
21815   if test -n "$MSGMERGE"; then
21816   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
21817 else
21818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21819 for as_dir in $PATH
21820 do
21821   IFS=$as_save_IFS
21822   test -z "$as_dir" && as_dir=.
21823   for ac_exec_ext in '' $ac_executable_extensions; do
21824   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21825     ac_cv_prog_MSGMERGE="$ac_prog"
21826     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21827     break 2
21828   fi
21829 done
21830 done
21831
21832 fi
21833 fi
21834 MSGMERGE=$ac_cv_prog_MSGMERGE
21835 if test -n "$MSGMERGE"; then
21836   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
21837 echo "${ECHO_T}$MSGMERGE" >&6
21838 else
21839   echo "$as_me:$LINENO: result: no" >&5
21840 echo "${ECHO_T}no" >&6
21841 fi
21842
21843   test -n "$MSGMERGE" && break
21844 done
21845
21846   for ac_prog in xgettext
21847 do
21848   # Extract the first word of "$ac_prog", so it can be a program name with args.
21849 set dummy $ac_prog; ac_word=$2
21850 echo "$as_me:$LINENO: checking for $ac_word" >&5
21851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21852 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
21853   echo $ECHO_N "(cached) $ECHO_C" >&6
21854 else
21855   if test -n "$XGETTEXT"; then
21856   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
21857 else
21858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21859 for as_dir in $PATH
21860 do
21861   IFS=$as_save_IFS
21862   test -z "$as_dir" && as_dir=.
21863   for ac_exec_ext in '' $ac_executable_extensions; do
21864   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21865     ac_cv_prog_XGETTEXT="$ac_prog"
21866     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21867     break 2
21868   fi
21869 done
21870 done
21871
21872 fi
21873 fi
21874 XGETTEXT=$ac_cv_prog_XGETTEXT
21875 if test -n "$XGETTEXT"; then
21876   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
21877 echo "${ECHO_T}$XGETTEXT" >&6
21878 else
21879   echo "$as_me:$LINENO: result: no" >&5
21880 echo "${ECHO_T}no" >&6
21881 fi
21882
21883   test -n "$XGETTEXT" && break
21884 done
21885
21886
21887   # Note: share/locale is always the default, independent of $datadir
21888   localedir='${prefix}/share/locale'
21889   if test x"$prefix" = x"NONE"; then
21890     exp_localedir="$ac_default_prefix/share/locale"
21891   else
21892     exp_localedir="$prefix/share/locale"
21893   fi
21894
21895
21896
21897 cat >>confdefs.h <<_ACEOF
21898 #define LOCALEDIR "$exp_localedir"
21899 _ACEOF
21900
21901
21902 fi
21903
21904 # Check for Tcl configuration script tclConfig.sh
21905 if test "$with_tcl" = yes; then
21906     for ac_prog in tclsh tcl
21907 do
21908   # Extract the first word of "$ac_prog", so it can be a program name with args.
21909 set dummy $ac_prog; ac_word=$2
21910 echo "$as_me:$LINENO: checking for $ac_word" >&5
21911 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21912 if test "${ac_cv_path_TCLSH+set}" = set; then
21913   echo $ECHO_N "(cached) $ECHO_C" >&6
21914 else
21915   case $TCLSH in
21916   [\\/]* | ?:[\\/]*)
21917   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
21918   ;;
21919   *)
21920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21921 for as_dir in $PATH
21922 do
21923   IFS=$as_save_IFS
21924   test -z "$as_dir" && as_dir=.
21925   for ac_exec_ext in '' $ac_executable_extensions; do
21926   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21927     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
21928     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21929     break 2
21930   fi
21931 done
21932 done
21933
21934   ;;
21935 esac
21936 fi
21937 TCLSH=$ac_cv_path_TCLSH
21938
21939 if test -n "$TCLSH"; then
21940   echo "$as_me:$LINENO: result: $TCLSH" >&5
21941 echo "${ECHO_T}$TCLSH" >&6
21942 else
21943   echo "$as_me:$LINENO: result: no" >&5
21944 echo "${ECHO_T}no" >&6
21945 fi
21946
21947   test -n "$TCLSH" && break
21948 done
21949
21950 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
21951 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
21952 # Let user override test
21953 if test -z "$TCL_CONFIG_SH"; then
21954     pgac_test_dirs="$with_tclconfig"
21955
21956     set X $pgac_test_dirs; shift
21957     if test $# -eq 0; then
21958         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
21959 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
21960    { (exit 1); exit 1; }; }
21961         set X `echo 'puts $auto_path' | $TCLSH`; shift
21962     fi
21963
21964     for pgac_dir do
21965         if test -r "$pgac_dir/tclConfig.sh"; then
21966             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
21967             break
21968         fi
21969     done
21970 fi
21971
21972 if test -z "$TCL_CONFIG_SH"; then
21973     echo "$as_me:$LINENO: result: no" >&5
21974 echo "${ECHO_T}no" >&6
21975     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
21976 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
21977    { (exit 1); exit 1; }; }
21978 else
21979     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
21980 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
21981 fi
21982
21983
21984
21985     . "$TCL_CONFIG_SH"
21986 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
21987 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
21988 eval TCL_LIBS=\"$TCL_LIBS\"
21989 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
21990 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
21991
21992         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
21993     ac_save_CPPFLAGS=$CPPFLAGS
21994     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
21995     if test "${ac_cv_header_tcl_h+set}" = set; then
21996   echo "$as_me:$LINENO: checking for tcl.h" >&5
21997 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
21998 if test "${ac_cv_header_tcl_h+set}" = set; then
21999   echo $ECHO_N "(cached) $ECHO_C" >&6
22000 fi
22001 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22002 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22003 else
22004   # Is the header compilable?
22005 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22006 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22007 cat >conftest.$ac_ext <<_ACEOF
22008 /* confdefs.h.  */
22009 _ACEOF
22010 cat confdefs.h >>conftest.$ac_ext
22011 cat >>conftest.$ac_ext <<_ACEOF
22012 /* end confdefs.h.  */
22013 $ac_includes_default
22014 #include <tcl.h>
22015 _ACEOF
22016 rm -f conftest.$ac_objext
22017 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22018   (eval $ac_compile) 2>conftest.er1
22019   ac_status=$?
22020   grep -v '^ *+' conftest.er1 >conftest.err
22021   rm -f conftest.er1
22022   cat conftest.err >&5
22023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22024   (exit $ac_status); } &&
22025          { ac_try='test -z "$ac_c_werror_flag"
22026                          || test ! -s conftest.err'
22027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22028   (eval $ac_try) 2>&5
22029   ac_status=$?
22030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22031   (exit $ac_status); }; } &&
22032          { ac_try='test -s conftest.$ac_objext'
22033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22034   (eval $ac_try) 2>&5
22035   ac_status=$?
22036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22037   (exit $ac_status); }; }; then
22038   ac_header_compiler=yes
22039 else
22040   echo "$as_me: failed program was:" >&5
22041 sed 's/^/| /' conftest.$ac_ext >&5
22042
22043 ac_header_compiler=no
22044 fi
22045 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22046 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22047 echo "${ECHO_T}$ac_header_compiler" >&6
22048
22049 # Is the header present?
22050 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22051 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22052 cat >conftest.$ac_ext <<_ACEOF
22053 /* confdefs.h.  */
22054 _ACEOF
22055 cat confdefs.h >>conftest.$ac_ext
22056 cat >>conftest.$ac_ext <<_ACEOF
22057 /* end confdefs.h.  */
22058 #include <tcl.h>
22059 _ACEOF
22060 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22062   ac_status=$?
22063   grep -v '^ *+' conftest.er1 >conftest.err
22064   rm -f conftest.er1
22065   cat conftest.err >&5
22066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22067   (exit $ac_status); } >/dev/null; then
22068   if test -s conftest.err; then
22069     ac_cpp_err=$ac_c_preproc_warn_flag
22070     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22071   else
22072     ac_cpp_err=
22073   fi
22074 else
22075   ac_cpp_err=yes
22076 fi
22077 if test -z "$ac_cpp_err"; then
22078   ac_header_preproc=yes
22079 else
22080   echo "$as_me: failed program was:" >&5
22081 sed 's/^/| /' conftest.$ac_ext >&5
22082
22083   ac_header_preproc=no
22084 fi
22085 rm -f conftest.err conftest.$ac_ext
22086 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22087 echo "${ECHO_T}$ac_header_preproc" >&6
22088
22089 # So?  What about this header?
22090 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22091   yes:no: )
22092     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22093 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22094     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22095 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22096     ac_header_preproc=yes
22097     ;;
22098   no:yes:* )
22099     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22100 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22101     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22102 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22103     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22104 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22105     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22106 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22107     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22108 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22109     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22110 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22111     (
22112       cat <<\_ASBOX
22113 ## ---------------------------------------- ##
22114 ## Report this to pgsql-bugs@postgresql.org ##
22115 ## ---------------------------------------- ##
22116 _ASBOX
22117     ) |
22118       sed "s/^/$as_me: WARNING:     /" >&2
22119     ;;
22120 esac
22121 echo "$as_me:$LINENO: checking for tcl.h" >&5
22122 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22123 if test "${ac_cv_header_tcl_h+set}" = set; then
22124   echo $ECHO_N "(cached) $ECHO_C" >&6
22125 else
22126   ac_cv_header_tcl_h=$ac_header_preproc
22127 fi
22128 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22129 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22130
22131 fi
22132 if test $ac_cv_header_tcl_h = yes; then
22133   :
22134 else
22135   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22136 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22137    { (exit 1); exit 1; }; }
22138 fi
22139
22140
22141     CPPFLAGS=$ac_save_CPPFLAGS
22142 fi
22143
22144 #
22145 # Check for DocBook and tools
22146 #
22147 for ac_prog in onsgmls nsgmls
22148 do
22149   # Extract the first word of "$ac_prog", so it can be a program name with args.
22150 set dummy $ac_prog; ac_word=$2
22151 echo "$as_me:$LINENO: checking for $ac_word" >&5
22152 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22153 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22154   echo $ECHO_N "(cached) $ECHO_C" >&6
22155 else
22156   if test -n "$NSGMLS"; then
22157   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22158 else
22159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22160 for as_dir in $PATH
22161 do
22162   IFS=$as_save_IFS
22163   test -z "$as_dir" && as_dir=.
22164   for ac_exec_ext in '' $ac_executable_extensions; do
22165   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22166     ac_cv_prog_NSGMLS="$ac_prog"
22167     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22168     break 2
22169   fi
22170 done
22171 done
22172
22173 fi
22174 fi
22175 NSGMLS=$ac_cv_prog_NSGMLS
22176 if test -n "$NSGMLS"; then
22177   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22178 echo "${ECHO_T}$NSGMLS" >&6
22179 else
22180   echo "$as_me:$LINENO: result: no" >&5
22181 echo "${ECHO_T}no" >&6
22182 fi
22183
22184   test -n "$NSGMLS" && break
22185 done
22186
22187 for ac_prog in openjade jade
22188 do
22189   # Extract the first word of "$ac_prog", so it can be a program name with args.
22190 set dummy $ac_prog; ac_word=$2
22191 echo "$as_me:$LINENO: checking for $ac_word" >&5
22192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22193 if test "${ac_cv_prog_JADE+set}" = set; then
22194   echo $ECHO_N "(cached) $ECHO_C" >&6
22195 else
22196   if test -n "$JADE"; then
22197   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22198 else
22199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22200 for as_dir in $PATH
22201 do
22202   IFS=$as_save_IFS
22203   test -z "$as_dir" && as_dir=.
22204   for ac_exec_ext in '' $ac_executable_extensions; do
22205   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22206     ac_cv_prog_JADE="$ac_prog"
22207     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22208     break 2
22209   fi
22210 done
22211 done
22212
22213 fi
22214 fi
22215 JADE=$ac_cv_prog_JADE
22216 if test -n "$JADE"; then
22217   echo "$as_me:$LINENO: result: $JADE" >&5
22218 echo "${ECHO_T}$JADE" >&6
22219 else
22220   echo "$as_me:$LINENO: result: no" >&5
22221 echo "${ECHO_T}no" >&6
22222 fi
22223
22224   test -n "$JADE" && break
22225 done
22226
22227
22228 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22229 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22230 if test "${pgac_cv_check_docbook+set}" = set; then
22231   echo $ECHO_N "(cached) $ECHO_C" >&6
22232 else
22233   cat >conftest.sgml <<EOF
22234 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22235 <book>
22236  <title>test</title>
22237  <chapter>
22238   <title>random</title>
22239    <sect1>
22240     <title>testsect</title>
22241     <para>text</para>
22242   </sect1>
22243  </chapter>
22244 </book>
22245 EOF
22246
22247 pgac_cv_check_docbook=no
22248
22249 if test -n "$NSGMLS"; then
22250   $NSGMLS -s conftest.sgml 1>&5 2>&1
22251   if test $? -eq 0; then
22252     pgac_cv_check_docbook=yes
22253   fi
22254 fi
22255 rm -f conftest.sgml
22256 fi
22257 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22258 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22259
22260 have_docbook=$pgac_cv_check_docbook
22261
22262
22263 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22264 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22265 if test "${pgac_cv_path_stylesheets+set}" = set; then
22266   echo $ECHO_N "(cached) $ECHO_C" >&6
22267 else
22268   if test -n "$DOCBOOKSTYLE"; then
22269   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22270 else
22271   for pgac_prefix in /usr /usr/local /opt; do
22272     for pgac_infix in share lib; do
22273       for pgac_postfix in \
22274         sgml/stylesheets/nwalsh-modular \
22275         sgml/stylesheets/docbook \
22276                 sgml/docbook-dsssl \
22277         sgml/docbook/dsssl/modular \
22278         sgml/docbook/stylesheet/dsssl/modular \
22279         sgml/docbook/dsssl-stylesheets
22280       do
22281         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22282         if test -r "$pgac_candidate/html/docbook.dsl" \
22283            && test -r "$pgac_candidate/print/docbook.dsl"
22284         then
22285           pgac_cv_path_stylesheets=$pgac_candidate
22286           break 3
22287         fi
22288       done
22289     done
22290   done
22291 fi
22292 fi
22293
22294 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22295
22296 if test -n "$DOCBOOKSTYLE"; then
22297   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22298 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22299 else
22300   echo "$as_me:$LINENO: result: no" >&5
22301 echo "${ECHO_T}no" >&6
22302 fi
22303 if test -n "$DOCBOOKSTYLE"; then
22304   for ac_prog in collateindex.pl
22305 do
22306   # Extract the first word of "$ac_prog", so it can be a program name with args.
22307 set dummy $ac_prog; ac_word=$2
22308 echo "$as_me:$LINENO: checking for $ac_word" >&5
22309 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22310 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22311   echo $ECHO_N "(cached) $ECHO_C" >&6
22312 else
22313   case $COLLATEINDEX in
22314   [\\/]* | ?:[\\/]*)
22315   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22316   ;;
22317   *)
22318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22319 for as_dir in $DOCBOOKSTYLE/bin $PATH
22320 do
22321   IFS=$as_save_IFS
22322   test -z "$as_dir" && as_dir=.
22323   for ac_exec_ext in '' $ac_executable_extensions; do
22324   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22325     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22326     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22327     break 2
22328   fi
22329 done
22330 done
22331
22332   ;;
22333 esac
22334 fi
22335 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22336
22337 if test -n "$COLLATEINDEX"; then
22338   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22339 echo "${ECHO_T}$COLLATEINDEX" >&6
22340 else
22341   echo "$as_me:$LINENO: result: no" >&5
22342 echo "${ECHO_T}no" >&6
22343 fi
22344
22345   test -n "$COLLATEINDEX" && break
22346 done
22347
22348 else
22349   for ac_prog in collateindex.pl
22350 do
22351   # Extract the first word of "$ac_prog", so it can be a program name with args.
22352 set dummy $ac_prog; ac_word=$2
22353 echo "$as_me:$LINENO: checking for $ac_word" >&5
22354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22355 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22356   echo $ECHO_N "(cached) $ECHO_C" >&6
22357 else
22358   case $COLLATEINDEX in
22359   [\\/]* | ?:[\\/]*)
22360   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22361   ;;
22362   *)
22363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22364 for as_dir in $PATH
22365 do
22366   IFS=$as_save_IFS
22367   test -z "$as_dir" && as_dir=.
22368   for ac_exec_ext in '' $ac_executable_extensions; do
22369   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22370     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22371     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22372     break 2
22373   fi
22374 done
22375 done
22376
22377   ;;
22378 esac
22379 fi
22380 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22381
22382 if test -n "$COLLATEINDEX"; then
22383   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22384 echo "${ECHO_T}$COLLATEINDEX" >&6
22385 else
22386   echo "$as_me:$LINENO: result: no" >&5
22387 echo "${ECHO_T}no" >&6
22388 fi
22389
22390   test -n "$COLLATEINDEX" && break
22391 done
22392
22393 fi
22394 for ac_prog in sgmlspl
22395 do
22396   # Extract the first word of "$ac_prog", so it can be a program name with args.
22397 set dummy $ac_prog; ac_word=$2
22398 echo "$as_me:$LINENO: checking for $ac_word" >&5
22399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22400 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22401   echo $ECHO_N "(cached) $ECHO_C" >&6
22402 else
22403   if test -n "$SGMLSPL"; then
22404   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22405 else
22406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22407 for as_dir in $PATH
22408 do
22409   IFS=$as_save_IFS
22410   test -z "$as_dir" && as_dir=.
22411   for ac_exec_ext in '' $ac_executable_extensions; do
22412   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22413     ac_cv_prog_SGMLSPL="$ac_prog"
22414     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22415     break 2
22416   fi
22417 done
22418 done
22419
22420 fi
22421 fi
22422 SGMLSPL=$ac_cv_prog_SGMLSPL
22423 if test -n "$SGMLSPL"; then
22424   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22425 echo "${ECHO_T}$SGMLSPL" >&6
22426 else
22427   echo "$as_me:$LINENO: result: no" >&5
22428 echo "${ECHO_T}no" >&6
22429 fi
22430
22431   test -n "$SGMLSPL" && break
22432 done
22433
22434
22435 # Thread testing
22436
22437 # We have to run the thread test near the end so we have all our symbols
22438 # defined.  Cross compiling throws a warning.
22439 #
22440 if test "$enable_thread_safety_force" = yes; then
22441 if test x"$template" != x"win32"
22442 then
22443   { echo "$as_me:$LINENO: WARNING:
22444 *** Skipping thread test program.  --enable-thread-safety-force was used.
22445 *** Run the program in src/tools/thread on the your machine and add
22446 proper locking function calls to your applications to guarantee thread
22447 safety.
22448 " >&5
22449 echo "$as_me: WARNING:
22450 *** Skipping thread test program.  --enable-thread-safety-force was used.
22451 *** Run the program in src/tools/thread on the your machine and add
22452 proper locking function calls to your applications to guarantee thread
22453 safety.
22454 " >&2;}
22455 else
22456 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22457 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22458 fi
22459 elif test "$enable_thread_safety" = yes; then
22460 if test x"$template" != x"win32"
22461 then
22462 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22463 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22464
22465 _CFLAGS="$CFLAGS"
22466 _LIBS="$LIBS"
22467 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22468 LIBS="$LIBS $PTHREAD_LIBS"
22469 if test "$cross_compiling" = yes; then
22470   echo "$as_me:$LINENO: result: maybe" >&5
22471 echo "${ECHO_T}maybe" >&6
22472   { echo "$as_me:$LINENO: WARNING:
22473 *** Skipping thread test program because of cross-compile build.
22474 *** Run the program in src/tools/thread on the target machine.
22475 " >&5
22476 echo "$as_me: WARNING:
22477 *** Skipping thread test program because of cross-compile build.
22478 *** Run the program in src/tools/thread on the target machine.
22479 " >&2;}
22480 else
22481   cat >conftest.$ac_ext <<_ACEOF
22482 /* confdefs.h.  */
22483 _ACEOF
22484 cat confdefs.h >>conftest.$ac_ext
22485 cat >>conftest.$ac_ext <<_ACEOF
22486 /* end confdefs.h.  */
22487 #include "$srcdir/src/tools/thread/thread_test.c"
22488 _ACEOF
22489 rm -f conftest$ac_exeext
22490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22491   (eval $ac_link) 2>&5
22492   ac_status=$?
22493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22494   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22496   (eval $ac_try) 2>&5
22497   ac_status=$?
22498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22499   (exit $ac_status); }; }; then
22500   echo "$as_me:$LINENO: result: yes" >&5
22501 echo "${ECHO_T}yes" >&6
22502 else
22503   echo "$as_me: program exited with status $ac_status" >&5
22504 echo "$as_me: failed program was:" >&5
22505 sed 's/^/| /' conftest.$ac_ext >&5
22506
22507 ( exit $ac_status )
22508 echo "$as_me:$LINENO: result: no" >&5
22509 echo "${ECHO_T}no" >&6
22510   { { echo "$as_me:$LINENO: error:
22511 *** Thread test program failed.  Your platform is not thread-safe.
22512 *** Check the file 'config.log'for the exact reason.
22513 ***
22514 *** You can use the configure option --enable-thread-safety-force
22515 *** to force threads to be enabled.  However, you must then run
22516 *** the program in src/tools/thread and add locking function calls
22517 *** to your applications to guarantee thread safety.
22518 " >&5
22519 echo "$as_me: error:
22520 *** Thread test program failed.  Your platform is not thread-safe.
22521 *** Check the file 'config.log'for the exact reason.
22522 ***
22523 *** You can use the configure option --enable-thread-safety-force
22524 *** to force threads to be enabled.  However, you must then run
22525 *** the program in src/tools/thread and add locking function calls
22526 *** to your applications to guarantee thread safety.
22527 " >&2;}
22528    { (exit 1); exit 1; }; }
22529 fi
22530 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22531 fi
22532 CFLAGS="$_CFLAGS"
22533 LIBS="$_LIBS"
22534 else
22535 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22536 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22537 fi
22538 fi
22539
22540 # prepare build tree if outside source tree
22541 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22542 # Note 2: /bin/pwd might be better than shell's built-in at getting
22543 #         a symlink-free name.
22544 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22545   vpath_build=no
22546 else
22547   vpath_build=yes
22548   if test "$no_create" != yes; then
22549     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22550     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22551     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22552       || { { echo "$as_me:$LINENO: error: failed" >&5
22553 echo "$as_me: error: failed" >&2;}
22554    { (exit 1); exit 1; }; }
22555     echo "$as_me:$LINENO: result: done" >&5
22556 echo "${ECHO_T}done" >&6
22557   fi
22558 fi
22559
22560
22561
22562                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22563
22564
22565                                                             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}"
22566
22567
22568 if test "$PORTNAME" = "win32"; then
22569           ac_config_commands="$ac_config_commands check_win32_symlinks"
22570
22571 fi
22572
22573           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22574
22575
22576 cat >confcache <<\_ACEOF
22577 # This file is a shell script that caches the results of configure
22578 # tests run on this system so they can be shared between configure
22579 # scripts and configure runs, see configure's option --config-cache.
22580 # It is not useful on other systems.  If it contains results you don't
22581 # want to keep, you may remove or edit it.
22582 #
22583 # config.status only pays attention to the cache file if you give it
22584 # the --recheck option to rerun configure.
22585 #
22586 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22587 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22588 # following values.
22589
22590 _ACEOF
22591
22592 # The following way of writing the cache mishandles newlines in values,
22593 # but we know of no workaround that is simple, portable, and efficient.
22594 # So, don't put newlines in cache variables' values.
22595 # Ultrix sh set writes to stderr and can't be redirected directly,
22596 # and sets the high bit in the cache file unless we assign to the vars.
22597 {
22598   (set) 2>&1 |
22599     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22600     *ac_space=\ *)
22601       # `set' does not quote correctly, so add quotes (double-quote
22602       # substitution turns \\\\ into \\, and sed turns \\ into \).
22603       sed -n \
22604         "s/'/'\\\\''/g;
22605           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22606       ;;
22607     *)
22608       # `set' quotes correctly as required by POSIX, so do not add quotes.
22609       sed -n \
22610         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22611       ;;
22612     esac;
22613 } |
22614   sed '
22615      t clear
22616      : clear
22617      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22618      t end
22619      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22620      : end' >>confcache
22621 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22622   if test -w $cache_file; then
22623     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22624     cat confcache >$cache_file
22625   else
22626     echo "not updating unwritable cache $cache_file"
22627   fi
22628 fi
22629 rm -f confcache
22630
22631 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22632 # Let make expand exec_prefix.
22633 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22634
22635 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22636 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22637 # trailing colons and then remove the whole line if VPATH becomes empty
22638 # (actually we leave an empty line to preserve line numbers).
22639 if test "x$srcdir" = x.; then
22640   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22641 s/:*\$(srcdir):*/:/;
22642 s/:*\${srcdir}:*/:/;
22643 s/:*@srcdir@:*/:/;
22644 s/^\([^=]*=[     ]*\):*/\1/;
22645 s/:*$//;
22646 s/^[^=]*=[       ]*$//;
22647 }'
22648 fi
22649
22650 DEFS=-DHAVE_CONFIG_H
22651
22652 ac_libobjs=
22653 ac_ltlibobjs=
22654 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22655   # 1. Remove the extension, and $U if already installed.
22656   ac_i=`echo "$ac_i" |
22657          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22658   # 2. Add them.
22659   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22660   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22661 done
22662 LIBOBJS=$ac_libobjs
22663
22664 LTLIBOBJS=$ac_ltlibobjs
22665
22666
22667
22668 : ${CONFIG_STATUS=./config.status}
22669 ac_clean_files_save=$ac_clean_files
22670 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22671 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22672 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22673 cat >$CONFIG_STATUS <<_ACEOF
22674 #! $SHELL
22675 # Generated by $as_me.
22676 # Run this file to recreate the current configuration.
22677 # Compiler output produced by configure, useful for debugging
22678 # configure, is in config.log if it exists.
22679
22680 debug=false
22681 ac_cs_recheck=false
22682 ac_cs_silent=false
22683 SHELL=\${CONFIG_SHELL-$SHELL}
22684 _ACEOF
22685
22686 cat >>$CONFIG_STATUS <<\_ACEOF
22687 ## --------------------- ##
22688 ## M4sh Initialization.  ##
22689 ## --------------------- ##
22690
22691 # Be Bourne compatible
22692 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22693   emulate sh
22694   NULLCMD=:
22695   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22696   # is contrary to our usage.  Disable this feature.
22697   alias -g '${1+"$@"}'='"$@"'
22698 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22699   set -o posix
22700 fi
22701 DUALCASE=1; export DUALCASE # for MKS sh
22702
22703 # Support unset when possible.
22704 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22705   as_unset=unset
22706 else
22707   as_unset=false
22708 fi
22709
22710
22711 # Work around bugs in pre-3.0 UWIN ksh.
22712 $as_unset ENV MAIL MAILPATH
22713 PS1='$ '
22714 PS2='> '
22715 PS4='+ '
22716
22717 # NLS nuisances.
22718 for as_var in \
22719   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22720   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22721   LC_TELEPHONE LC_TIME
22722 do
22723   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22724     eval $as_var=C; export $as_var
22725   else
22726     $as_unset $as_var
22727   fi
22728 done
22729
22730 # Required to use basename.
22731 if expr a : '\(a\)' >/dev/null 2>&1; then
22732   as_expr=expr
22733 else
22734   as_expr=false
22735 fi
22736
22737 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22738   as_basename=basename
22739 else
22740   as_basename=false
22741 fi
22742
22743
22744 # Name of the executable.
22745 as_me=`$as_basename "$0" ||
22746 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22747          X"$0" : 'X\(//\)$' \| \
22748          X"$0" : 'X\(/\)$' \| \
22749          .     : '\(.\)' 2>/dev/null ||
22750 echo X/"$0" |
22751     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22752           /^X\/\(\/\/\)$/{ s//\1/; q; }
22753           /^X\/\(\/\).*/{ s//\1/; q; }
22754           s/.*/./; q'`
22755
22756
22757 # PATH needs CR, and LINENO needs CR and PATH.
22758 # Avoid depending upon Character Ranges.
22759 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22760 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22761 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22762 as_cr_digits='0123456789'
22763 as_cr_alnum=$as_cr_Letters$as_cr_digits
22764
22765 # The user is always right.
22766 if test "${PATH_SEPARATOR+set}" != set; then
22767   echo "#! /bin/sh" >conf$$.sh
22768   echo  "exit 0"   >>conf$$.sh
22769   chmod +x conf$$.sh
22770   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22771     PATH_SEPARATOR=';'
22772   else
22773     PATH_SEPARATOR=:
22774   fi
22775   rm -f conf$$.sh
22776 fi
22777
22778
22779   as_lineno_1=$LINENO
22780   as_lineno_2=$LINENO
22781   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22782   test "x$as_lineno_1" != "x$as_lineno_2" &&
22783   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
22784   # Find who we are.  Look in the path if we contain no path at all
22785   # relative or not.
22786   case $0 in
22787     *[\\/]* ) as_myself=$0 ;;
22788     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22789 for as_dir in $PATH
22790 do
22791   IFS=$as_save_IFS
22792   test -z "$as_dir" && as_dir=.
22793   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22794 done
22795
22796        ;;
22797   esac
22798   # We did not find ourselves, most probably we were run as `sh COMMAND'
22799   # in which case we are not to be found in the path.
22800   if test "x$as_myself" = x; then
22801     as_myself=$0
22802   fi
22803   if test ! -f "$as_myself"; then
22804     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22805 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22806    { (exit 1); exit 1; }; }
22807   fi
22808   case $CONFIG_SHELL in
22809   '')
22810     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22811 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22812 do
22813   IFS=$as_save_IFS
22814   test -z "$as_dir" && as_dir=.
22815   for as_base in sh bash ksh sh5; do
22816          case $as_dir in
22817          /*)
22818            if ("$as_dir/$as_base" -c '
22819   as_lineno_1=$LINENO
22820   as_lineno_2=$LINENO
22821   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22822   test "x$as_lineno_1" != "x$as_lineno_2" &&
22823   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
22824              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22825              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22826              CONFIG_SHELL=$as_dir/$as_base
22827              export CONFIG_SHELL
22828              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22829            fi;;
22830          esac
22831        done
22832 done
22833 ;;
22834   esac
22835
22836   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22837   # uniformly replaced by the line number.  The first 'sed' inserts a
22838   # line-number line before each line; the second 'sed' does the real
22839   # work.  The second script uses 'N' to pair each line-number line
22840   # with the numbered line, and appends trailing '-' during
22841   # substitution so that $LINENO is not a special case at line end.
22842   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22843   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
22844   sed '=' <$as_myself |
22845     sed '
22846       N
22847       s,$,-,
22848       : loop
22849       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22850       t loop
22851       s,-$,,
22852       s,^['$as_cr_digits']*\n,,
22853     ' >$as_me.lineno &&
22854   chmod +x $as_me.lineno ||
22855     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22856 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22857    { (exit 1); exit 1; }; }
22858
22859   # Don't try to exec as it changes $[0], causing all sort of problems
22860   # (the dirname of $[0] is not the place where we might find the
22861   # original and so on.  Autoconf is especially sensible to this).
22862   . ./$as_me.lineno
22863   # Exit status is that of the last command.
22864   exit
22865 }
22866
22867
22868 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22869   *c*,-n*) ECHO_N= ECHO_C='
22870 ' ECHO_T='      ' ;;
22871   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22872   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
22873 esac
22874
22875 if expr a : '\(a\)' >/dev/null 2>&1; then
22876   as_expr=expr
22877 else
22878   as_expr=false
22879 fi
22880
22881 rm -f conf$$ conf$$.exe conf$$.file
22882 echo >conf$$.file
22883 if ln -s conf$$.file conf$$ 2>/dev/null; then
22884   # We could just check for DJGPP; but this test a) works b) is more generic
22885   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22886   if test -f conf$$.exe; then
22887     # Don't use ln at all; we don't have any links
22888     as_ln_s='cp -p'
22889   else
22890     as_ln_s='ln -s'
22891   fi
22892 elif ln conf$$.file conf$$ 2>/dev/null; then
22893   as_ln_s=ln
22894 else
22895   as_ln_s='cp -p'
22896 fi
22897 rm -f conf$$ conf$$.exe conf$$.file
22898
22899 if mkdir -p . 2>/dev/null; then
22900   as_mkdir_p=:
22901 else
22902   test -d ./-p && rmdir ./-p
22903   as_mkdir_p=false
22904 fi
22905
22906 as_executable_p="test -f"
22907
22908 # Sed expression to map a string onto a valid CPP name.
22909 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22910
22911 # Sed expression to map a string onto a valid variable name.
22912 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22913
22914
22915 # IFS
22916 # We need space, tab and new line, in precisely that order.
22917 as_nl='
22918 '
22919 IFS="   $as_nl"
22920
22921 # CDPATH.
22922 $as_unset CDPATH
22923
22924 exec 6>&1
22925
22926 # Open the log real soon, to keep \$[0] and so on meaningful, and to
22927 # report actual input values of CONFIG_FILES etc. instead of their
22928 # values after options handling.  Logging --version etc. is OK.
22929 exec 5>>config.log
22930 {
22931   echo
22932   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22933 ## Running $as_me. ##
22934 _ASBOX
22935 } >&5
22936 cat >&5 <<_CSEOF
22937
22938 This file was extended by PostgreSQL $as_me 8.1beta1, which was
22939 generated by GNU Autoconf 2.59.  Invocation command line was
22940
22941   CONFIG_FILES    = $CONFIG_FILES
22942   CONFIG_HEADERS  = $CONFIG_HEADERS
22943   CONFIG_LINKS    = $CONFIG_LINKS
22944   CONFIG_COMMANDS = $CONFIG_COMMANDS
22945   $ $0 $@
22946
22947 _CSEOF
22948 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22949 echo >&5
22950 _ACEOF
22951
22952 # Files that config.status was made for.
22953 if test -n "$ac_config_files"; then
22954   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22955 fi
22956
22957 if test -n "$ac_config_headers"; then
22958   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22959 fi
22960
22961 if test -n "$ac_config_links"; then
22962   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22963 fi
22964
22965 if test -n "$ac_config_commands"; then
22966   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22967 fi
22968
22969 cat >>$CONFIG_STATUS <<\_ACEOF
22970
22971 ac_cs_usage="\
22972 \`$as_me' instantiates files from templates according to the
22973 current configuration.
22974
22975 Usage: $0 [OPTIONS] [FILE]...
22976
22977   -h, --help       print this help, then exit
22978   -V, --version    print version number, then exit
22979   -q, --quiet      do not print progress messages
22980   -d, --debug      don't remove temporary files
22981       --recheck    update $as_me by reconfiguring in the same conditions
22982   --file=FILE[:TEMPLATE]
22983                    instantiate the configuration file FILE
22984   --header=FILE[:TEMPLATE]
22985                    instantiate the configuration header FILE
22986
22987 Configuration files:
22988 $config_files
22989
22990 Configuration headers:
22991 $config_headers
22992
22993 Configuration links:
22994 $config_links
22995
22996 Configuration commands:
22997 $config_commands
22998
22999 Report bugs to <bug-autoconf@gnu.org>."
23000 _ACEOF
23001
23002 cat >>$CONFIG_STATUS <<_ACEOF
23003 ac_cs_version="\\
23004 PostgreSQL config.status 8.1beta1
23005 configured by $0, generated by GNU Autoconf 2.59,
23006   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23007
23008 Copyright (C) 2003 Free Software Foundation, Inc.
23009 This config.status script is free software; the Free Software Foundation
23010 gives unlimited permission to copy, distribute and modify it."
23011 srcdir=$srcdir
23012 _ACEOF
23013
23014 cat >>$CONFIG_STATUS <<\_ACEOF
23015 # If no file are specified by the user, then we need to provide default
23016 # value.  By we need to know if files were specified by the user.
23017 ac_need_defaults=:
23018 while test $# != 0
23019 do
23020   case $1 in
23021   --*=*)
23022     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23023     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23024     ac_shift=:
23025     ;;
23026   -*)
23027     ac_option=$1
23028     ac_optarg=$2
23029     ac_shift=shift
23030     ;;
23031   *) # This is not an option, so the user has probably given explicit
23032      # arguments.
23033      ac_option=$1
23034      ac_need_defaults=false;;
23035   esac
23036
23037   case $ac_option in
23038   # Handling of the options.
23039 _ACEOF
23040 cat >>$CONFIG_STATUS <<\_ACEOF
23041   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23042     ac_cs_recheck=: ;;
23043   --version | --vers* | -V )
23044     echo "$ac_cs_version"; exit 0 ;;
23045   --he | --h)
23046     # Conflict between --help and --header
23047     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23048 Try \`$0 --help' for more information." >&5
23049 echo "$as_me: error: ambiguous option: $1
23050 Try \`$0 --help' for more information." >&2;}
23051    { (exit 1); exit 1; }; };;
23052   --help | --hel | -h )
23053     echo "$ac_cs_usage"; exit 0 ;;
23054   --debug | --d* | -d )
23055     debug=: ;;
23056   --file | --fil | --fi | --f )
23057     $ac_shift
23058     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23059     ac_need_defaults=false;;
23060   --header | --heade | --head | --hea )
23061     $ac_shift
23062     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23063     ac_need_defaults=false;;
23064   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23065   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23066     ac_cs_silent=: ;;
23067
23068   # This is an error.
23069   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23070 Try \`$0 --help' for more information." >&5
23071 echo "$as_me: error: unrecognized option: $1
23072 Try \`$0 --help' for more information." >&2;}
23073    { (exit 1); exit 1; }; } ;;
23074
23075   *) ac_config_targets="$ac_config_targets $1" ;;
23076
23077   esac
23078   shift
23079 done
23080
23081 ac_configure_extra_args=
23082
23083 if $ac_cs_silent; then
23084   exec 6>/dev/null
23085   ac_configure_extra_args="$ac_configure_extra_args --silent"
23086 fi
23087
23088 _ACEOF
23089 cat >>$CONFIG_STATUS <<_ACEOF
23090 if \$ac_cs_recheck; then
23091   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23092   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23093 fi
23094
23095 _ACEOF
23096
23097
23098
23099
23100
23101 cat >>$CONFIG_STATUS <<\_ACEOF
23102 for ac_config_target in $ac_config_targets
23103 do
23104   case "$ac_config_target" in
23105   # Handling of arguments.
23106   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23107   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23108   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23109   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23110   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23111   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23112   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23113   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23114   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23115   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23116   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23117   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23118 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23119    { (exit 1); exit 1; }; };;
23120   esac
23121 done
23122
23123 # If the user did not use the arguments to specify the items to instantiate,
23124 # then the envvar interface is used.  Set only those that are not.
23125 # We use the long form for the default assignment because of an extremely
23126 # bizarre bug on SunOS 4.1.3.
23127 if $ac_need_defaults; then
23128   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23129   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23130   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23131   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23132 fi
23133
23134 # Have a temporary directory for convenience.  Make it in the build tree
23135 # simply because there is no reason to put it here, and in addition,
23136 # creating and moving files from /tmp can sometimes cause problems.
23137 # Create a temporary directory, and hook for its removal unless debugging.
23138 $debug ||
23139 {
23140   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23141   trap '{ (exit 1); exit 1; }' 1 2 13 15
23142 }
23143
23144 # Create a (secure) tmp directory for tmp files.
23145
23146 {
23147   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23148   test -n "$tmp" && test -d "$tmp"
23149 }  ||
23150 {
23151   tmp=./confstat$$-$RANDOM
23152   (umask 077 && mkdir $tmp)
23153 } ||
23154 {
23155    echo "$me: cannot create a temporary directory in ." >&2
23156    { (exit 1); exit 1; }
23157 }
23158
23159 _ACEOF
23160
23161 cat >>$CONFIG_STATUS <<_ACEOF
23162
23163 #
23164 # CONFIG_FILES section.
23165 #
23166
23167 # No need to generate the scripts if there are no CONFIG_FILES.
23168 # This happens for instance when ./config.status config.h
23169 if test -n "\$CONFIG_FILES"; then
23170   # Protect against being on the right side of a sed subst in config.status.
23171   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23172    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23173 s,@SHELL@,$SHELL,;t t
23174 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23175 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23176 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23177 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23178 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23179 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23180 s,@exec_prefix@,$exec_prefix,;t t
23181 s,@prefix@,$prefix,;t t
23182 s,@program_transform_name@,$program_transform_name,;t t
23183 s,@bindir@,$bindir,;t t
23184 s,@sbindir@,$sbindir,;t t
23185 s,@libexecdir@,$libexecdir,;t t
23186 s,@datadir@,$datadir,;t t
23187 s,@sysconfdir@,$sysconfdir,;t t
23188 s,@sharedstatedir@,$sharedstatedir,;t t
23189 s,@localstatedir@,$localstatedir,;t t
23190 s,@libdir@,$libdir,;t t
23191 s,@includedir@,$includedir,;t t
23192 s,@oldincludedir@,$oldincludedir,;t t
23193 s,@infodir@,$infodir,;t t
23194 s,@mandir@,$mandir,;t t
23195 s,@build_alias@,$build_alias,;t t
23196 s,@host_alias@,$host_alias,;t t
23197 s,@target_alias@,$target_alias,;t t
23198 s,@DEFS@,$DEFS,;t t
23199 s,@ECHO_C@,$ECHO_C,;t t
23200 s,@ECHO_N@,$ECHO_N,;t t
23201 s,@ECHO_T@,$ECHO_T,;t t
23202 s,@LIBS@,$LIBS,;t t
23203 s,@configure_args@,$configure_args,;t t
23204 s,@build@,$build,;t t
23205 s,@build_cpu@,$build_cpu,;t t
23206 s,@build_vendor@,$build_vendor,;t t
23207 s,@build_os@,$build_os,;t t
23208 s,@host@,$host,;t t
23209 s,@host_cpu@,$host_cpu,;t t
23210 s,@host_vendor@,$host_vendor,;t t
23211 s,@host_os@,$host_os,;t t
23212 s,@PORTNAME@,$PORTNAME,;t t
23213 s,@docdir@,$docdir,;t t
23214 s,@enable_nls@,$enable_nls,;t t
23215 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23216 s,@default_port@,$default_port,;t t
23217 s,@enable_shared@,$enable_shared,;t t
23218 s,@enable_rpath@,$enable_rpath,;t t
23219 s,@enable_debug@,$enable_debug,;t t
23220 s,@CC@,$CC,;t t
23221 s,@CFLAGS@,$CFLAGS,;t t
23222 s,@LDFLAGS@,$LDFLAGS,;t t
23223 s,@CPPFLAGS@,$CPPFLAGS,;t t
23224 s,@ac_ct_CC@,$ac_ct_CC,;t t
23225 s,@EXEEXT@,$EXEEXT,;t t
23226 s,@OBJEXT@,$OBJEXT,;t t
23227 s,@CPP@,$CPP,;t t
23228 s,@GCC@,$GCC,;t t
23229 s,@TAS@,$TAS,;t t
23230 s,@autodepend@,$autodepend,;t t
23231 s,@INCLUDES@,$INCLUDES,;t t
23232 s,@enable_thread_safety@,$enable_thread_safety,;t t
23233 s,@with_tcl@,$with_tcl,;t t
23234 s,@with_perl@,$with_perl,;t t
23235 s,@with_python@,$with_python,;t t
23236 s,@with_krb5@,$with_krb5,;t t
23237 s,@krb_srvtab@,$krb_srvtab,;t t
23238 s,@with_pam@,$with_pam,;t t
23239 s,@with_bonjour@,$with_bonjour,;t t
23240 s,@with_openssl@,$with_openssl,;t t
23241 s,@with_zlib@,$with_zlib,;t t
23242 s,@EGREP@,$EGREP,;t t
23243 s,@ELF_SYS@,$ELF_SYS,;t t
23244 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23245 s,@AWK@,$AWK,;t t
23246 s,@FLEX@,$FLEX,;t t
23247 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23248 s,@LN_S@,$LN_S,;t t
23249 s,@LD@,$LD,;t t
23250 s,@with_gnu_ld@,$with_gnu_ld,;t t
23251 s,@ld_R_works@,$ld_R_works,;t t
23252 s,@RANLIB@,$RANLIB,;t t
23253 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23254 s,@LORDER@,$LORDER,;t t
23255 s,@TAR@,$TAR,;t t
23256 s,@STRIP@,$STRIP,;t t
23257 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23258 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23259 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23260 s,@YACC@,$YACC,;t t
23261 s,@YFLAGS@,$YFLAGS,;t t
23262 s,@PERL@,$PERL,;t t
23263 s,@perl_archlibexp@,$perl_archlibexp,;t t
23264 s,@perl_privlibexp@,$perl_privlibexp,;t t
23265 s,@perl_useshrplib@,$perl_useshrplib,;t t
23266 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23267 s,@PYTHON@,$PYTHON,;t t
23268 s,@python_version@,$python_version,;t t
23269 s,@python_configdir@,$python_configdir,;t t
23270 s,@python_includespec@,$python_includespec,;t t
23271 s,@python_libdir@,$python_libdir,;t t
23272 s,@python_libspec@,$python_libspec,;t t
23273 s,@python_additional_libs@,$python_additional_libs,;t t
23274 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23275 s,@LIBOBJS@,$LIBOBJS,;t t
23276 s,@acx_pthread_config@,$acx_pthread_config,;t t
23277 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23278 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23279 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23280 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23281 s,@MSGFMT@,$MSGFMT,;t t
23282 s,@MSGMERGE@,$MSGMERGE,;t t
23283 s,@XGETTEXT@,$XGETTEXT,;t t
23284 s,@localedir@,$localedir,;t t
23285 s,@TCLSH@,$TCLSH,;t t
23286 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23287 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23288 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23289 s,@TCL_LIBS@,$TCL_LIBS,;t t
23290 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23291 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23292 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23293 s,@NSGMLS@,$NSGMLS,;t t
23294 s,@JADE@,$JADE,;t t
23295 s,@have_docbook@,$have_docbook,;t t
23296 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23297 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23298 s,@SGMLSPL@,$SGMLSPL,;t t
23299 s,@vpath_build@,$vpath_build,;t t
23300 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23301 CEOF
23302
23303 _ACEOF
23304
23305   cat >>$CONFIG_STATUS <<\_ACEOF
23306   # Split the substitutions into bite-sized pieces for seds with
23307   # small command number limits, like on Digital OSF/1 and HP-UX.
23308   ac_max_sed_lines=48
23309   ac_sed_frag=1 # Number of current file.
23310   ac_beg=1 # First line for current file.
23311   ac_end=$ac_max_sed_lines # Line after last line for current file.
23312   ac_more_lines=:
23313   ac_sed_cmds=
23314   while $ac_more_lines; do
23315     if test $ac_beg -gt 1; then
23316       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23317     else
23318       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23319     fi
23320     if test ! -s $tmp/subs.frag; then
23321       ac_more_lines=false
23322     else
23323       # The purpose of the label and of the branching condition is to
23324       # speed up the sed processing (if there are no `@' at all, there
23325       # is no need to browse any of the substitutions).
23326       # These are the two extra sed commands mentioned above.
23327       (echo ':t
23328   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23329       if test -z "$ac_sed_cmds"; then
23330         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23331       else
23332         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23333       fi
23334       ac_sed_frag=`expr $ac_sed_frag + 1`
23335       ac_beg=$ac_end
23336       ac_end=`expr $ac_end + $ac_max_sed_lines`
23337     fi
23338   done
23339   if test -z "$ac_sed_cmds"; then
23340     ac_sed_cmds=cat
23341   fi
23342 fi # test -n "$CONFIG_FILES"
23343
23344 _ACEOF
23345 cat >>$CONFIG_STATUS <<\_ACEOF
23346 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23347   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23348   case $ac_file in
23349   - | *:- | *:-:* ) # input from stdin
23350         cat >$tmp/stdin
23351         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23352         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23353   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23354         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23355   * )   ac_file_in=$ac_file.in ;;
23356   esac
23357
23358   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23359   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23360 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23361          X"$ac_file" : 'X\(//\)[^/]' \| \
23362          X"$ac_file" : 'X\(//\)$' \| \
23363          X"$ac_file" : 'X\(/\)' \| \
23364          .     : '\(.\)' 2>/dev/null ||
23365 echo X"$ac_file" |
23366     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23367           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23368           /^X\(\/\/\)$/{ s//\1/; q; }
23369           /^X\(\/\).*/{ s//\1/; q; }
23370           s/.*/./; q'`
23371   { if $as_mkdir_p; then
23372     mkdir -p "$ac_dir"
23373   else
23374     as_dir="$ac_dir"
23375     as_dirs=
23376     while test ! -d "$as_dir"; do
23377       as_dirs="$as_dir $as_dirs"
23378       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23379 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23380          X"$as_dir" : 'X\(//\)[^/]' \| \
23381          X"$as_dir" : 'X\(//\)$' \| \
23382          X"$as_dir" : 'X\(/\)' \| \
23383          .     : '\(.\)' 2>/dev/null ||
23384 echo X"$as_dir" |
23385     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23386           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23387           /^X\(\/\/\)$/{ s//\1/; q; }
23388           /^X\(\/\).*/{ s//\1/; q; }
23389           s/.*/./; q'`
23390     done
23391     test ! -n "$as_dirs" || mkdir $as_dirs
23392   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23393 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23394    { (exit 1); exit 1; }; }; }
23395
23396   ac_builddir=.
23397
23398 if test "$ac_dir" != .; then
23399   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23400   # A "../" for each directory in $ac_dir_suffix.
23401   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23402 else
23403   ac_dir_suffix= ac_top_builddir=
23404 fi
23405
23406 case $srcdir in
23407   .)  # No --srcdir option.  We are building in place.
23408     ac_srcdir=.
23409     if test -z "$ac_top_builddir"; then
23410        ac_top_srcdir=.
23411     else
23412        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23413     fi ;;
23414   [\\/]* | ?:[\\/]* )  # Absolute path.
23415     ac_srcdir=$srcdir$ac_dir_suffix;
23416     ac_top_srcdir=$srcdir ;;
23417   *) # Relative path.
23418     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23419     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23420 esac
23421
23422 # Do not use `cd foo && pwd` to compute absolute paths, because
23423 # the directories may not exist.
23424 case `pwd` in
23425 .) ac_abs_builddir="$ac_dir";;
23426 *)
23427   case "$ac_dir" in
23428   .) ac_abs_builddir=`pwd`;;
23429   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23430   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23431   esac;;
23432 esac
23433 case $ac_abs_builddir in
23434 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23435 *)
23436   case ${ac_top_builddir}. in
23437   .) ac_abs_top_builddir=$ac_abs_builddir;;
23438   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23439   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23440   esac;;
23441 esac
23442 case $ac_abs_builddir in
23443 .) ac_abs_srcdir=$ac_srcdir;;
23444 *)
23445   case $ac_srcdir in
23446   .) ac_abs_srcdir=$ac_abs_builddir;;
23447   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23448   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23449   esac;;
23450 esac
23451 case $ac_abs_builddir in
23452 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23453 *)
23454   case $ac_top_srcdir in
23455   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23456   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23457   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23458   esac;;
23459 esac
23460
23461
23462
23463   if test x"$ac_file" != x-; then
23464     { echo "$as_me:$LINENO: creating $ac_file" >&5
23465 echo "$as_me: creating $ac_file" >&6;}
23466     rm -f "$ac_file"
23467   fi
23468   # Let's still pretend it is `configure' which instantiates (i.e., don't
23469   # use $as_me), people would be surprised to read:
23470   #    /* config.h.  Generated by config.status.  */
23471   if test x"$ac_file" = x-; then
23472     configure_input=
23473   else
23474     configure_input="$ac_file.  "
23475   fi
23476   configure_input=$configure_input"Generated from `echo $ac_file_in |
23477                                      sed 's,.*/,,'` by configure."
23478
23479   # First look for the input files in the build tree, otherwise in the
23480   # src tree.
23481   ac_file_inputs=`IFS=:
23482     for f in $ac_file_in; do
23483       case $f in
23484       -) echo $tmp/stdin ;;
23485       [\\/$]*)
23486          # Absolute (can't be DOS-style, as IFS=:)
23487          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23488 echo "$as_me: error: cannot find input file: $f" >&2;}
23489    { (exit 1); exit 1; }; }
23490          echo "$f";;
23491       *) # Relative
23492          if test -f "$f"; then
23493            # Build tree
23494            echo "$f"
23495          elif test -f "$srcdir/$f"; then
23496            # Source tree
23497            echo "$srcdir/$f"
23498          else
23499            # /dev/null tree
23500            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23501 echo "$as_me: error: cannot find input file: $f" >&2;}
23502    { (exit 1); exit 1; }; }
23503          fi;;
23504       esac
23505     done` || { (exit 1); exit 1; }
23506 _ACEOF
23507 cat >>$CONFIG_STATUS <<_ACEOF
23508   sed "$ac_vpsub
23509 $extrasub
23510 _ACEOF
23511 cat >>$CONFIG_STATUS <<\_ACEOF
23512 :t
23513 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23514 s,@configure_input@,$configure_input,;t t
23515 s,@srcdir@,$ac_srcdir,;t t
23516 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23517 s,@top_srcdir@,$ac_top_srcdir,;t t
23518 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23519 s,@builddir@,$ac_builddir,;t t
23520 s,@abs_builddir@,$ac_abs_builddir,;t t
23521 s,@top_builddir@,$ac_top_builddir,;t t
23522 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23523 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23524   rm -f $tmp/stdin
23525   if test x"$ac_file" != x-; then
23526     mv $tmp/out $ac_file
23527   else
23528     cat $tmp/out
23529     rm -f $tmp/out
23530   fi
23531
23532 done
23533 _ACEOF
23534 cat >>$CONFIG_STATUS <<\_ACEOF
23535
23536 #
23537 # CONFIG_HEADER section.
23538 #
23539
23540 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23541 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23542 #
23543 # ac_d sets the value in "#define NAME VALUE" lines.
23544 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23545 ac_dB='[         ].*$,\1#\2'
23546 ac_dC=' '
23547 ac_dD=',;t'
23548 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23549 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23550 ac_uB='$,\1#\2define\3'
23551 ac_uC=' '
23552 ac_uD=',;t'
23553
23554 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23555   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23556   case $ac_file in
23557   - | *:- | *:-:* ) # input from stdin
23558         cat >$tmp/stdin
23559         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23560         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23561   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23562         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23563   * )   ac_file_in=$ac_file.in ;;
23564   esac
23565
23566   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23567 echo "$as_me: creating $ac_file" >&6;}
23568
23569   # First look for the input files in the build tree, otherwise in the
23570   # src tree.
23571   ac_file_inputs=`IFS=:
23572     for f in $ac_file_in; do
23573       case $f in
23574       -) echo $tmp/stdin ;;
23575       [\\/$]*)
23576          # Absolute (can't be DOS-style, as IFS=:)
23577          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23578 echo "$as_me: error: cannot find input file: $f" >&2;}
23579    { (exit 1); exit 1; }; }
23580          # Do quote $f, to prevent DOS paths from being IFS'd.
23581          echo "$f";;
23582       *) # Relative
23583          if test -f "$f"; then
23584            # Build tree
23585            echo "$f"
23586          elif test -f "$srcdir/$f"; then
23587            # Source tree
23588            echo "$srcdir/$f"
23589          else
23590            # /dev/null tree
23591            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23592 echo "$as_me: error: cannot find input file: $f" >&2;}
23593    { (exit 1); exit 1; }; }
23594          fi;;
23595       esac
23596     done` || { (exit 1); exit 1; }
23597   # Remove the trailing spaces.
23598   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23599
23600 _ACEOF
23601
23602 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23603 # `conftest.undefs', that substitutes the proper values into
23604 # config.h.in to produce config.h.  The first handles `#define'
23605 # templates, and the second `#undef' templates.
23606 # And first: Protect against being on the right side of a sed subst in
23607 # config.status.  Protect against being in an unquoted here document
23608 # in config.status.
23609 rm -f conftest.defines conftest.undefs
23610 # Using a here document instead of a string reduces the quoting nightmare.
23611 # Putting comments in sed scripts is not portable.
23612 #
23613 # `end' is used to avoid that the second main sed command (meant for
23614 # 0-ary CPP macros) applies to n-ary macro definitions.
23615 # See the Autoconf documentation for `clear'.
23616 cat >confdef2sed.sed <<\_ACEOF
23617 s/[\\&,]/\\&/g
23618 s,[\\$`],\\&,g
23619 t clear
23620 : clear
23621 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23622 t end
23623 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23624 : end
23625 _ACEOF
23626 # If some macros were called several times there might be several times
23627 # the same #defines, which is useless.  Nevertheless, we may not want to
23628 # sort them, since we want the *last* AC-DEFINE to be honored.
23629 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23630 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23631 rm -f confdef2sed.sed
23632
23633 # This sed command replaces #undef with comments.  This is necessary, for
23634 # example, in the case of _POSIX_SOURCE, which is predefined and required
23635 # on some systems where configure will not decide to define it.
23636 cat >>conftest.undefs <<\_ACEOF
23637 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23638 _ACEOF
23639
23640 # Break up conftest.defines because some shells have a limit on the size
23641 # of here documents, and old seds have small limits too (100 cmds).
23642 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23643 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23644 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23645 echo '  :' >>$CONFIG_STATUS
23646 rm -f conftest.tail
23647 while grep . conftest.defines >/dev/null
23648 do
23649   # Write a limited-size here document to $tmp/defines.sed.
23650   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23651   # Speed up: don't consider the non `#define' lines.
23652   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23653   # Work around the forget-to-reset-the-flag bug.
23654   echo 't clr' >>$CONFIG_STATUS
23655   echo ': clr' >>$CONFIG_STATUS
23656   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23657   echo 'CEOF
23658   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23659   rm -f $tmp/in
23660   mv $tmp/out $tmp/in
23661 ' >>$CONFIG_STATUS
23662   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23663   rm -f conftest.defines
23664   mv conftest.tail conftest.defines
23665 done
23666 rm -f conftest.defines
23667 echo '  fi # grep' >>$CONFIG_STATUS
23668 echo >>$CONFIG_STATUS
23669
23670 # Break up conftest.undefs because some shells have a limit on the size
23671 # of here documents, and old seds have small limits too (100 cmds).
23672 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23673 rm -f conftest.tail
23674 while grep . conftest.undefs >/dev/null
23675 do
23676   # Write a limited-size here document to $tmp/undefs.sed.
23677   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23678   # Speed up: don't consider the non `#undef'
23679   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23680   # Work around the forget-to-reset-the-flag bug.
23681   echo 't clr' >>$CONFIG_STATUS
23682   echo ': clr' >>$CONFIG_STATUS
23683   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23684   echo 'CEOF
23685   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23686   rm -f $tmp/in
23687   mv $tmp/out $tmp/in
23688 ' >>$CONFIG_STATUS
23689   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23690   rm -f conftest.undefs
23691   mv conftest.tail conftest.undefs
23692 done
23693 rm -f conftest.undefs
23694
23695 cat >>$CONFIG_STATUS <<\_ACEOF
23696   # Let's still pretend it is `configure' which instantiates (i.e., don't
23697   # use $as_me), people would be surprised to read:
23698   #    /* config.h.  Generated by config.status.  */
23699   if test x"$ac_file" = x-; then
23700     echo "/* Generated by configure.  */" >$tmp/config.h
23701   else
23702     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
23703   fi
23704   cat $tmp/in >>$tmp/config.h
23705   rm -f $tmp/in
23706   if test x"$ac_file" != x-; then
23707     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
23708       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23709 echo "$as_me: $ac_file is unchanged" >&6;}
23710     else
23711       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23712 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23713          X"$ac_file" : 'X\(//\)[^/]' \| \
23714          X"$ac_file" : 'X\(//\)$' \| \
23715          X"$ac_file" : 'X\(/\)' \| \
23716          .     : '\(.\)' 2>/dev/null ||
23717 echo X"$ac_file" |
23718     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23719           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23720           /^X\(\/\/\)$/{ s//\1/; q; }
23721           /^X\(\/\).*/{ s//\1/; q; }
23722           s/.*/./; q'`
23723       { if $as_mkdir_p; then
23724     mkdir -p "$ac_dir"
23725   else
23726     as_dir="$ac_dir"
23727     as_dirs=
23728     while test ! -d "$as_dir"; do
23729       as_dirs="$as_dir $as_dirs"
23730       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23731 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23732          X"$as_dir" : 'X\(//\)[^/]' \| \
23733          X"$as_dir" : 'X\(//\)$' \| \
23734          X"$as_dir" : 'X\(/\)' \| \
23735          .     : '\(.\)' 2>/dev/null ||
23736 echo X"$as_dir" |
23737     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23738           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23739           /^X\(\/\/\)$/{ s//\1/; q; }
23740           /^X\(\/\).*/{ s//\1/; q; }
23741           s/.*/./; q'`
23742     done
23743     test ! -n "$as_dirs" || mkdir $as_dirs
23744   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23745 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23746    { (exit 1); exit 1; }; }; }
23747
23748       rm -f $ac_file
23749       mv $tmp/config.h $ac_file
23750     fi
23751   else
23752     cat $tmp/config.h
23753     rm -f $tmp/config.h
23754   fi
23755   # Run the commands associated with the file.
23756   case $ac_file in
23757     src/include/pg_config.h )
23758 # Update timestamp for pg_config.h (see Makefile.global)
23759 echo >src/include/stamp-h
23760  ;;
23761   esac
23762 done
23763 _ACEOF
23764 cat >>$CONFIG_STATUS <<\_ACEOF
23765
23766 #
23767 # CONFIG_LINKS section.
23768 #
23769
23770 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23771   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23772   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23773
23774   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23775 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
23776
23777   if test ! -r $srcdir/$ac_source; then
23778     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23779 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23780    { (exit 1); exit 1; }; }
23781   fi
23782   rm -f $ac_dest
23783
23784   # Make relative symlinks.
23785   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
23786 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23787          X"$ac_dest" : 'X\(//\)[^/]' \| \
23788          X"$ac_dest" : 'X\(//\)$' \| \
23789          X"$ac_dest" : 'X\(/\)' \| \
23790          .     : '\(.\)' 2>/dev/null ||
23791 echo X"$ac_dest" |
23792     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23793           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23794           /^X\(\/\/\)$/{ s//\1/; q; }
23795           /^X\(\/\).*/{ s//\1/; q; }
23796           s/.*/./; q'`
23797   { if $as_mkdir_p; then
23798     mkdir -p "$ac_dest_dir"
23799   else
23800     as_dir="$ac_dest_dir"
23801     as_dirs=
23802     while test ! -d "$as_dir"; do
23803       as_dirs="$as_dir $as_dirs"
23804       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23805 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23806          X"$as_dir" : 'X\(//\)[^/]' \| \
23807          X"$as_dir" : 'X\(//\)$' \| \
23808          X"$as_dir" : 'X\(/\)' \| \
23809          .     : '\(.\)' 2>/dev/null ||
23810 echo X"$as_dir" |
23811     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23812           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23813           /^X\(\/\/\)$/{ s//\1/; q; }
23814           /^X\(\/\).*/{ s//\1/; q; }
23815           s/.*/./; q'`
23816     done
23817     test ! -n "$as_dirs" || mkdir $as_dirs
23818   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
23819 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
23820    { (exit 1); exit 1; }; }; }
23821
23822   ac_builddir=.
23823
23824 if test "$ac_dest_dir" != .; then
23825   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
23826   # A "../" for each directory in $ac_dir_suffix.
23827   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23828 else
23829   ac_dir_suffix= ac_top_builddir=
23830 fi
23831
23832 case $srcdir in
23833   .)  # No --srcdir option.  We are building in place.
23834     ac_srcdir=.
23835     if test -z "$ac_top_builddir"; then
23836        ac_top_srcdir=.
23837     else
23838        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23839     fi ;;
23840   [\\/]* | ?:[\\/]* )  # Absolute path.
23841     ac_srcdir=$srcdir$ac_dir_suffix;
23842     ac_top_srcdir=$srcdir ;;
23843   *) # Relative path.
23844     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23845     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23846 esac
23847
23848 # Do not use `cd foo && pwd` to compute absolute paths, because
23849 # the directories may not exist.
23850 case `pwd` in
23851 .) ac_abs_builddir="$ac_dest_dir";;
23852 *)
23853   case "$ac_dest_dir" in
23854   .) ac_abs_builddir=`pwd`;;
23855   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
23856   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
23857   esac;;
23858 esac
23859 case $ac_abs_builddir in
23860 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23861 *)
23862   case ${ac_top_builddir}. in
23863   .) ac_abs_top_builddir=$ac_abs_builddir;;
23864   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23865   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23866   esac;;
23867 esac
23868 case $ac_abs_builddir in
23869 .) ac_abs_srcdir=$ac_srcdir;;
23870 *)
23871   case $ac_srcdir in
23872   .) ac_abs_srcdir=$ac_abs_builddir;;
23873   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23874   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23875   esac;;
23876 esac
23877 case $ac_abs_builddir in
23878 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23879 *)
23880   case $ac_top_srcdir in
23881   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23882   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23883   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23884   esac;;
23885 esac
23886
23887
23888   case $srcdir in
23889   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
23890       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
23891   esac
23892
23893   # Try a symlink, then a hard link, then a copy.
23894   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
23895     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
23896     cp -p $srcdir/$ac_source $ac_dest ||
23897     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
23898 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
23899    { (exit 1); exit 1; }; }
23900 done
23901 _ACEOF
23902 cat >>$CONFIG_STATUS <<\_ACEOF
23903
23904 #
23905 # CONFIG_COMMANDS section.
23906 #
23907 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23908   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23909   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23910   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23911 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23912          X"$ac_dest" : 'X\(//\)[^/]' \| \
23913          X"$ac_dest" : 'X\(//\)$' \| \
23914          X"$ac_dest" : 'X\(/\)' \| \
23915          .     : '\(.\)' 2>/dev/null ||
23916 echo X"$ac_dest" |
23917     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23918           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23919           /^X\(\/\/\)$/{ s//\1/; q; }
23920           /^X\(\/\).*/{ s//\1/; q; }
23921           s/.*/./; q'`
23922   { if $as_mkdir_p; then
23923     mkdir -p "$ac_dir"
23924   else
23925     as_dir="$ac_dir"
23926     as_dirs=
23927     while test ! -d "$as_dir"; do
23928       as_dirs="$as_dir $as_dirs"
23929       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23930 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23931          X"$as_dir" : 'X\(//\)[^/]' \| \
23932          X"$as_dir" : 'X\(//\)$' \| \
23933          X"$as_dir" : 'X\(/\)' \| \
23934          .     : '\(.\)' 2>/dev/null ||
23935 echo X"$as_dir" |
23936     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23937           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23938           /^X\(\/\/\)$/{ s//\1/; q; }
23939           /^X\(\/\).*/{ s//\1/; q; }
23940           s/.*/./; q'`
23941     done
23942     test ! -n "$as_dirs" || mkdir $as_dirs
23943   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23944 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23945    { (exit 1); exit 1; }; }; }
23946
23947   ac_builddir=.
23948
23949 if test "$ac_dir" != .; then
23950   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23951   # A "../" for each directory in $ac_dir_suffix.
23952   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23953 else
23954   ac_dir_suffix= ac_top_builddir=
23955 fi
23956
23957 case $srcdir in
23958   .)  # No --srcdir option.  We are building in place.
23959     ac_srcdir=.
23960     if test -z "$ac_top_builddir"; then
23961        ac_top_srcdir=.
23962     else
23963        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23964     fi ;;
23965   [\\/]* | ?:[\\/]* )  # Absolute path.
23966     ac_srcdir=$srcdir$ac_dir_suffix;
23967     ac_top_srcdir=$srcdir ;;
23968   *) # Relative path.
23969     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23970     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23971 esac
23972
23973 # Do not use `cd foo && pwd` to compute absolute paths, because
23974 # the directories may not exist.
23975 case `pwd` in
23976 .) ac_abs_builddir="$ac_dir";;
23977 *)
23978   case "$ac_dir" in
23979   .) ac_abs_builddir=`pwd`;;
23980   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23981   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23982   esac;;
23983 esac
23984 case $ac_abs_builddir in
23985 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23986 *)
23987   case ${ac_top_builddir}. in
23988   .) ac_abs_top_builddir=$ac_abs_builddir;;
23989   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23990   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23991   esac;;
23992 esac
23993 case $ac_abs_builddir in
23994 .) ac_abs_srcdir=$ac_srcdir;;
23995 *)
23996   case $ac_srcdir in
23997   .) ac_abs_srcdir=$ac_abs_builddir;;
23998   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23999   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24000   esac;;
24001 esac
24002 case $ac_abs_builddir in
24003 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24004 *)
24005   case $ac_top_srcdir in
24006   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24007   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24008   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24009   esac;;
24010 esac
24011
24012
24013   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24014 echo "$as_me: executing $ac_dest commands" >&6;}
24015   case $ac_dest in
24016     check_win32_symlinks )
24017 # Links sometimes fail undetected on Mingw -
24018 # so here we detect it and warn the user
24019 for FILE in $CONFIG_LINKS
24020  do
24021         # test -e works for symlinks in the MinGW console
24022         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24023 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24024  done
24025  ;;
24026   esac
24027 done
24028 _ACEOF
24029
24030 cat >>$CONFIG_STATUS <<\_ACEOF
24031
24032 { (exit 0); exit 0; }
24033 _ACEOF
24034 chmod +x $CONFIG_STATUS
24035 ac_clean_files=$ac_clean_files_save
24036
24037
24038 # configure is writing to config.log, and then calls config.status.
24039 # config.status does its own redirection, appending to config.log.
24040 # Unfortunately, on DOS this fails, as config.log is still kept open
24041 # by configure, so config.status won't be able to write to it; its
24042 # output is simply discarded.  So we exec the FD to /dev/null,
24043 # effectively closing config.log, so it can be properly (re)opened and
24044 # appended to by config.status.  When coming back to configure, we
24045 # need to make the FD available again.
24046 if test "$no_create" != yes; then
24047   ac_cs_success=:
24048   ac_config_status_args=
24049   test "$silent" = yes &&
24050     ac_config_status_args="$ac_config_status_args --quiet"
24051   exec 5>/dev/null
24052   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24053   exec 5>>config.log
24054   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24055   # would make configure fail if this is the last instruction.
24056   $ac_cs_success || { (exit 1); exit 1; }
24057 fi
24058
24059