]> granicus.if.org Git - postgresql/blob - configure
Brand HEAD branch as 8.2devel.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.2devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 2003 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright (c) 1996-2005, PostgreSQL Global Development Group
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248 # Name of the host.
249 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
250 # so uname gets run too.
251 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252
253 exec 6>&1
254
255 #
256 # Initializations.
257 #
258 ac_default_prefix=/usr/local
259 ac_config_libobj_dir=.
260 cross_compiling=no
261 subdirs=
262 MFLAGS=
263 MAKEFLAGS=
264 SHELL=${CONFIG_SHELL-/bin/sh}
265
266 # Maximum number of lines to put in a shell here document.
267 # This variable seems obsolete.  It should probably be removed, and
268 # only ac_max_sed_lines should be used.
269 : ${ac_max_here_lines=38}
270
271 # Identity of this package.
272 PACKAGE_NAME='PostgreSQL'
273 PACKAGE_TARNAME='postgresql'
274 PACKAGE_VERSION='8.2devel'
275 PACKAGE_STRING='PostgreSQL 8.2devel'
276 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
277
278 ac_unique_file="src/backend/access/common/heaptuple.c"
279 ac_default_prefix=/usr/local/pgsql
280 # Factoring default headers for most tests.
281 ac_includes_default="\
282 #include <stdio.h>
283 #if HAVE_SYS_TYPES_H
284 # include <sys/types.h>
285 #endif
286 #if HAVE_SYS_STAT_H
287 # include <sys/stat.h>
288 #endif
289 #if STDC_HEADERS
290 # include <stdlib.h>
291 # include <stddef.h>
292 #else
293 # if HAVE_STDLIB_H
294 #  include <stdlib.h>
295 # endif
296 #endif
297 #if HAVE_STRING_H
298 # if !STDC_HEADERS && HAVE_MEMORY_H
299 #  include <memory.h>
300 # endif
301 # include <string.h>
302 #endif
303 #if HAVE_STRINGS_H
304 # include <strings.h>
305 #endif
306 #if HAVE_INTTYPES_H
307 # include <inttypes.h>
308 #else
309 # if HAVE_STDINT_H
310 #  include <stdint.h>
311 # endif
312 #endif
313 #if HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif"
316
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318 ac_subst_files=''
319
320 # Initialize some variables set by options.
321 ac_init_help=
322 ac_init_version=false
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 cache_file=/dev/null
326 exec_prefix=NONE
327 no_create=
328 no_recursion=
329 prefix=NONE
330 program_prefix=NONE
331 program_suffix=NONE
332 program_transform_name=s,x,x,
333 silent=
334 site=
335 srcdir=
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339
340 # Installation directory options.
341 # These are left unexpanded so users can "make install exec_prefix=/foo"
342 # and all the variables that are supposed to be based on exec_prefix
343 # by default will actually change.
344 # Use braces instead of parens because sh, perl, etc. also accept them.
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 ac_prev=
359 for ac_option
360 do
361   # If the previous option needs an argument, assign it.
362   if test -n "$ac_prev"; then
363     eval "$ac_prev=\$ac_option"
364     ac_prev=
365     continue
366   fi
367
368   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
369
370   # Accept the important Cygnus configure options, so we can diagnose typos.
371
372   case $ac_option in
373
374   -bindir | --bindir | --bindi | --bind | --bin | --bi)
375     ac_prev=bindir ;;
376   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
377     bindir=$ac_optarg ;;
378
379   -build | --build | --buil | --bui | --bu)
380     ac_prev=build_alias ;;
381   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
382     build_alias=$ac_optarg ;;
383
384   -cache-file | --cache-file | --cache-fil | --cache-fi \
385   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
386     ac_prev=cache_file ;;
387   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
388   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
389     cache_file=$ac_optarg ;;
390
391   --config-cache | -C)
392     cache_file=config.cache ;;
393
394   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
395     ac_prev=datadir ;;
396   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
397   | --da=*)
398     datadir=$ac_optarg ;;
399
400   -disable-* | --disable-*)
401     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
405    { (exit 1); exit 1; }; }
406     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
407     eval "enable_$ac_feature=no" ;;
408
409   -enable-* | --enable-*)
410     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
414    { (exit 1); exit 1; }; }
415     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
416     case $ac_option in
417       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418       *) ac_optarg=yes ;;
419     esac
420     eval "enable_$ac_feature='$ac_optarg'" ;;
421
422   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
423   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
424   | --exec | --exe | --ex)
425     ac_prev=exec_prefix ;;
426   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
427   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
428   | --exec=* | --exe=* | --ex=*)
429     exec_prefix=$ac_optarg ;;
430
431   -gas | --gas | --ga | --g)
432     # Obsolete; use --with-gas.
433     with_gas=yes ;;
434
435   -help | --help | --hel | --he | -h)
436     ac_init_help=long ;;
437   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
438     ac_init_help=recursive ;;
439   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
440     ac_init_help=short ;;
441
442   -host | --host | --hos | --ho)
443     ac_prev=host_alias ;;
444   -host=* | --host=* | --hos=* | --ho=*)
445     host_alias=$ac_optarg ;;
446
447   -includedir | --includedir | --includedi | --included | --include \
448   | --includ | --inclu | --incl | --inc)
449     ac_prev=includedir ;;
450   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
451   | --includ=* | --inclu=* | --incl=* | --inc=*)
452     includedir=$ac_optarg ;;
453
454   -infodir | --infodir | --infodi | --infod | --info | --inf)
455     ac_prev=infodir ;;
456   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
457     infodir=$ac_optarg ;;
458
459   -libdir | --libdir | --libdi | --libd)
460     ac_prev=libdir ;;
461   -libdir=* | --libdir=* | --libdi=* | --libd=*)
462     libdir=$ac_optarg ;;
463
464   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
465   | --libexe | --libex | --libe)
466     ac_prev=libexecdir ;;
467   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
468   | --libexe=* | --libex=* | --libe=*)
469     libexecdir=$ac_optarg ;;
470
471   -localstatedir | --localstatedir | --localstatedi | --localstated \
472   | --localstate | --localstat | --localsta | --localst \
473   | --locals | --local | --loca | --loc | --lo)
474     ac_prev=localstatedir ;;
475   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
476   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
477   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
478     localstatedir=$ac_optarg ;;
479
480   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
481     ac_prev=mandir ;;
482   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
483     mandir=$ac_optarg ;;
484
485   -nfp | --nfp | --nf)
486     # Obsolete; use --without-fp.
487     with_fp=no ;;
488
489   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
490   | --no-cr | --no-c | -n)
491     no_create=yes ;;
492
493   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
495     no_recursion=yes ;;
496
497   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
498   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
499   | --oldin | --oldi | --old | --ol | --o)
500     ac_prev=oldincludedir ;;
501   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
502   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
503   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
504     oldincludedir=$ac_optarg ;;
505
506   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
507     ac_prev=prefix ;;
508   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
509     prefix=$ac_optarg ;;
510
511   -program-prefix | --program-prefix | --program-prefi | --program-pref \
512   | --program-pre | --program-pr | --program-p)
513     ac_prev=program_prefix ;;
514   -program-prefix=* | --program-prefix=* | --program-prefi=* \
515   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
516     program_prefix=$ac_optarg ;;
517
518   -program-suffix | --program-suffix | --program-suffi | --program-suff \
519   | --program-suf | --program-su | --program-s)
520     ac_prev=program_suffix ;;
521   -program-suffix=* | --program-suffix=* | --program-suffi=* \
522   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
523     program_suffix=$ac_optarg ;;
524
525   -program-transform-name | --program-transform-name \
526   | --program-transform-nam | --program-transform-na \
527   | --program-transform-n | --program-transform- \
528   | --program-transform | --program-transfor \
529   | --program-transfo | --program-transf \
530   | --program-trans | --program-tran \
531   | --progr-tra | --program-tr | --program-t)
532     ac_prev=program_transform_name ;;
533   -program-transform-name=* | --program-transform-name=* \
534   | --program-transform-nam=* | --program-transform-na=* \
535   | --program-transform-n=* | --program-transform-=* \
536   | --program-transform=* | --program-transfor=* \
537   | --program-transfo=* | --program-transf=* \
538   | --program-trans=* | --program-tran=* \
539   | --progr-tra=* | --program-tr=* | --program-t=*)
540     program_transform_name=$ac_optarg ;;
541
542   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
543   | -silent | --silent | --silen | --sile | --sil)
544     silent=yes ;;
545
546   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
547     ac_prev=sbindir ;;
548   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
549   | --sbi=* | --sb=*)
550     sbindir=$ac_optarg ;;
551
552   -sharedstatedir | --sharedstatedir | --sharedstatedi \
553   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
554   | --sharedst | --shareds | --shared | --share | --shar \
555   | --sha | --sh)
556     ac_prev=sharedstatedir ;;
557   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
558   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
559   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
560   | --sha=* | --sh=*)
561     sharedstatedir=$ac_optarg ;;
562
563   -site | --site | --sit)
564     ac_prev=site ;;
565   -site=* | --site=* | --sit=*)
566     site=$ac_optarg ;;
567
568   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
569     ac_prev=srcdir ;;
570   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
571     srcdir=$ac_optarg ;;
572
573   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
574   | --syscon | --sysco | --sysc | --sys | --sy)
575     ac_prev=sysconfdir ;;
576   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
577   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
578     sysconfdir=$ac_optarg ;;
579
580   -target | --target | --targe | --targ | --tar | --ta | --t)
581     ac_prev=target_alias ;;
582   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
583     target_alias=$ac_optarg ;;
584
585   -v | -verbose | --verbose | --verbos | --verbo | --verb)
586     verbose=yes ;;
587
588   -version | --version | --versio | --versi | --vers | -V)
589     ac_init_version=: ;;
590
591   -with-* | --with-*)
592     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
593     # Reject names that are not valid shell variable names.
594     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
595       { echo "$as_me: error: invalid package name: $ac_package" >&2
596    { (exit 1); exit 1; }; }
597     ac_package=`echo $ac_package| sed 's/-/_/g'`
598     case $ac_option in
599       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
600       *) ac_optarg=yes ;;
601     esac
602     eval "with_$ac_package='$ac_optarg'" ;;
603
604   -without-* | --without-*)
605     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
606     # Reject names that are not valid shell variable names.
607     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
608       { echo "$as_me: error: invalid package name: $ac_package" >&2
609    { (exit 1); exit 1; }; }
610     ac_package=`echo $ac_package | sed 's/-/_/g'`
611     eval "with_$ac_package=no" ;;
612
613   --x)
614     # Obsolete; use --with-x.
615     with_x=yes ;;
616
617   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
618   | --x-incl | --x-inc | --x-in | --x-i)
619     ac_prev=x_includes ;;
620   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
621   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
622     x_includes=$ac_optarg ;;
623
624   -x-libraries | --x-libraries | --x-librarie | --x-librari \
625   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
626     ac_prev=x_libraries ;;
627   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
628   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
629     x_libraries=$ac_optarg ;;
630
631   -*) { echo "$as_me: error: unrecognized option: $ac_option
632 Try \`$0 --help' for more information." >&2
633    { (exit 1); exit 1; }; }
634     ;;
635
636   *=*)
637     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
638     # Reject names that are not valid shell variable names.
639     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
640       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
641    { (exit 1); exit 1; }; }
642     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
643     eval "$ac_envvar='$ac_optarg'"
644     export $ac_envvar ;;
645
646   *)
647     # FIXME: should be removed in autoconf 3.0.
648     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
649     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
650       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
651     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
652     ;;
653
654   esac
655 done
656
657 if test -n "$ac_prev"; then
658   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
659   { echo "$as_me: error: missing argument to $ac_option" >&2
660    { (exit 1); exit 1; }; }
661 fi
662
663 # Be sure to have absolute paths.
664 for ac_var in exec_prefix prefix
665 do
666   eval ac_val=$`echo $ac_var`
667   case $ac_val in
668     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
669     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
670    { (exit 1); exit 1; }; };;
671   esac
672 done
673
674 # Be sure to have absolute paths.
675 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
676               localstatedir libdir includedir oldincludedir infodir mandir
677 do
678   eval ac_val=$`echo $ac_var`
679   case $ac_val in
680     [\\/$]* | ?:[\\/]* ) ;;
681     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
682    { (exit 1); exit 1; }; };;
683   esac
684 done
685
686 # There might be people who depend on the old broken behavior: `$host'
687 # used to hold the argument of --host etc.
688 # FIXME: To remove some day.
689 build=$build_alias
690 host=$host_alias
691 target=$target_alias
692
693 # FIXME: To remove some day.
694 if test "x$host_alias" != x; then
695   if test "x$build_alias" = x; then
696     cross_compiling=maybe
697     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
698     If a cross compiler is detected then cross compile mode will be used." >&2
699   elif test "x$build_alias" != "x$host_alias"; then
700     cross_compiling=yes
701   fi
702 fi
703
704 ac_tool_prefix=
705 test -n "$host_alias" && ac_tool_prefix=$host_alias-
706
707 test "$silent" = yes && exec 6>/dev/null
708
709
710 # Find the source files, if location was not specified.
711 if test -z "$srcdir"; then
712   ac_srcdir_defaulted=yes
713   # Try the directory containing this script, then its parent.
714   ac_confdir=`(dirname "$0") 2>/dev/null ||
715 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
716          X"$0" : 'X\(//\)[^/]' \| \
717          X"$0" : 'X\(//\)$' \| \
718          X"$0" : 'X\(/\)' \| \
719          .     : '\(.\)' 2>/dev/null ||
720 echo X"$0" |
721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
722           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
723           /^X\(\/\/\)$/{ s//\1/; q; }
724           /^X\(\/\).*/{ s//\1/; q; }
725           s/.*/./; q'`
726   srcdir=$ac_confdir
727   if test ! -r $srcdir/$ac_unique_file; then
728     srcdir=..
729   fi
730 else
731   ac_srcdir_defaulted=no
732 fi
733 if test ! -r $srcdir/$ac_unique_file; then
734   if test "$ac_srcdir_defaulted" = yes; then
735     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
736    { (exit 1); exit 1; }; }
737   else
738     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
739    { (exit 1); exit 1; }; }
740   fi
741 fi
742 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
743   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
744    { (exit 1); exit 1; }; }
745 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
746 ac_env_build_alias_set=${build_alias+set}
747 ac_env_build_alias_value=$build_alias
748 ac_cv_env_build_alias_set=${build_alias+set}
749 ac_cv_env_build_alias_value=$build_alias
750 ac_env_host_alias_set=${host_alias+set}
751 ac_env_host_alias_value=$host_alias
752 ac_cv_env_host_alias_set=${host_alias+set}
753 ac_cv_env_host_alias_value=$host_alias
754 ac_env_target_alias_set=${target_alias+set}
755 ac_env_target_alias_value=$target_alias
756 ac_cv_env_target_alias_set=${target_alias+set}
757 ac_cv_env_target_alias_value=$target_alias
758 ac_env_CC_set=${CC+set}
759 ac_env_CC_value=$CC
760 ac_cv_env_CC_set=${CC+set}
761 ac_cv_env_CC_value=$CC
762 ac_env_CFLAGS_set=${CFLAGS+set}
763 ac_env_CFLAGS_value=$CFLAGS
764 ac_cv_env_CFLAGS_set=${CFLAGS+set}
765 ac_cv_env_CFLAGS_value=$CFLAGS
766 ac_env_LDFLAGS_set=${LDFLAGS+set}
767 ac_env_LDFLAGS_value=$LDFLAGS
768 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
769 ac_cv_env_LDFLAGS_value=$LDFLAGS
770 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
771 ac_env_CPPFLAGS_value=$CPPFLAGS
772 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
773 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
774 ac_env_CPP_set=${CPP+set}
775 ac_env_CPP_value=$CPP
776 ac_cv_env_CPP_set=${CPP+set}
777 ac_cv_env_CPP_value=$CPP
778 ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
779 ac_env_LDFLAGS_SL_value=$LDFLAGS_SL
780 ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
781 ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL
782 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
783 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
784 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
785 ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
786
787 #
788 # Report the --help message.
789 #
790 if test "$ac_init_help" = "long"; then
791   # Omit some internal or obsolete options to make the list less imposing.
792   # This message is too long to be a string in the A/UX 3.1 sh.
793   cat <<_ACEOF
794 \`configure' configures PostgreSQL 8.2devel to adapt to many kinds of systems.
795
796 Usage: $0 [OPTION]... [VAR=VALUE]...
797
798 To assign environment variables (e.g., CC, CFLAGS...), specify them as
799 VAR=VALUE.  See below for descriptions of some of the useful variables.
800
801 Defaults for the options are specified in brackets.
802
803 Configuration:
804   -h, --help              display this help and exit
805       --help=short        display options specific to this package
806       --help=recursive    display the short help of all the included packages
807   -V, --version           display version information and exit
808   -q, --quiet, --silent   do not print \`checking...' messages
809       --cache-file=FILE   cache test results in FILE [disabled]
810   -C, --config-cache      alias for \`--cache-file=config.cache'
811   -n, --no-create         do not create output files
812       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
813
814 _ACEOF
815
816   cat <<_ACEOF
817 Installation directories:
818   --prefix=PREFIX         install architecture-independent files in PREFIX
819                           [$ac_default_prefix]
820   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
821                           [PREFIX]
822
823 By default, \`make install' will install all the files in
824 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
825 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
826 for instance \`--prefix=\$HOME'.
827
828 For better control, use the options below.
829
830 Fine tuning of the installation directories:
831   --bindir=DIR           user executables [EPREFIX/bin]
832   --sbindir=DIR          system admin executables [EPREFIX/sbin]
833   --libexecdir=DIR       program executables [EPREFIX/libexec]
834   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
835   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
836   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
837   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
838   --libdir=DIR           object code libraries [EPREFIX/lib]
839   --includedir=DIR       C header files [PREFIX/include]
840   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
841   --infodir=DIR          info documentation [PREFIX/info]
842   --mandir=DIR           man documentation [PREFIX/man]
843 _ACEOF
844
845   cat <<\_ACEOF
846
847 System types:
848   --build=BUILD     configure for building on BUILD [guessed]
849   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
850 _ACEOF
851 fi
852
853 if test -n "$ac_init_help"; then
854   case $ac_init_help in
855      short | recursive ) echo "Configuration of PostgreSQL 8.2devel:";;
856    esac
857   cat <<\_ACEOF
858
859 Optional Features:
860   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
861   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
862   --enable-integer-datetimes  enable 64-bit integer date/time support
863   --enable-nls[=LANGUAGES]  enable Native Language Support
864   --disable-shared        do not build shared libraries
865   --disable-rpath         do not embed shared library search path in executables
866   --disable-spinlocks     do not use spinlocks
867   --enable-debug          build with debugging symbols (-g)
868   --enable-depend         turn on automatic dependency tracking
869   --enable-cassert        enable assertion checks (for debugging)
870   --enable-thread-safety  make client libraries thread-safe
871   --enable-thread-safety-force  force thread-safety in spite of thread test failure
872   --disable-largefile     omit support for large files
873
874 Optional Packages:
875   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
876   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
877
878   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
879   --without-docdir        do not install the documentation
880   --with-includes=DIRS    look for additional header files in DIRS
881   --with-libraries=DIRS   look for additional libraries in DIRS
882   --with-libs=DIRS        alternative spelling of --with-libraries
883   --with-pgport=PORTNUM   change default port number 5432
884   --with-tcl              build Tcl modules (PL/Tcl)
885   --with-tclconfig=DIR    tclConfig.sh is in DIR
886   --with-perl             build Perl modules (PL/Perl)
887   --with-python           build Python modules (PL/Python)
888   --with-krb5             build with Kerberos 5 support
889   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
890   --with-pam              build with PAM support
891   --with-bonjour          build with Bonjour support
892   --with-openssl          build with OpenSSL support
893   --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.2devel
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.2devel, 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 -Winline"
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 -Wendif-labels" >&5
2775 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2776 pgac_save_CFLAGS=$CFLAGS
2777 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
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
2828   # Disable strict-aliasing rules; needed for gcc 3.3+
2829   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
2830 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
2831 pgac_save_CFLAGS=$CFLAGS
2832 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
2833 cat >conftest.$ac_ext <<_ACEOF
2834 /* confdefs.h.  */
2835 _ACEOF
2836 cat confdefs.h >>conftest.$ac_ext
2837 cat >>conftest.$ac_ext <<_ACEOF
2838 /* end confdefs.h.  */
2839
2840 int
2841 main ()
2842 {
2843
2844   ;
2845   return 0;
2846 }
2847 _ACEOF
2848 rm -f conftest.$ac_objext
2849 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2850   (eval $ac_compile) 2>conftest.er1
2851   ac_status=$?
2852   grep -v '^ *+' conftest.er1 >conftest.err
2853   rm -f conftest.er1
2854   cat conftest.err >&5
2855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2856   (exit $ac_status); } &&
2857          { ac_try='test -z "$ac_c_werror_flag"
2858                          || test ! -s conftest.err'
2859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2860   (eval $ac_try) 2>&5
2861   ac_status=$?
2862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2863   (exit $ac_status); }; } &&
2864          { ac_try='test -s conftest.$ac_objext'
2865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2866   (eval $ac_try) 2>&5
2867   ac_status=$?
2868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2869   (exit $ac_status); }; }; then
2870   echo "$as_me:$LINENO: result: yes" >&5
2871 echo "${ECHO_T}yes" >&6
2872 else
2873   echo "$as_me: failed program was:" >&5
2874 sed 's/^/| /' conftest.$ac_ext >&5
2875
2876 CFLAGS="$pgac_save_CFLAGS"
2877                     echo "$as_me:$LINENO: result: no" >&5
2878 echo "${ECHO_T}no" >&6
2879 fi
2880 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2881
2882 fi
2883
2884 # supply -g if --enable-debug
2885 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2886   CFLAGS="$CFLAGS -g"
2887 fi
2888
2889 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2890 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2891
2892 # We already have this in Makefile.win32, but configure needs it too
2893 if test "$PORTNAME" = "win32"; then
2894   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
2895 fi
2896
2897 # Check if the compiler still works with the template settings
2898 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2899 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2900
2901 cat >conftest.$ac_ext <<_ACEOF
2902 /* confdefs.h.  */
2903 _ACEOF
2904 cat confdefs.h >>conftest.$ac_ext
2905 cat >>conftest.$ac_ext <<_ACEOF
2906 /* end confdefs.h.  */
2907
2908 int
2909 main ()
2910 {
2911 return 0;
2912   ;
2913   return 0;
2914 }
2915 _ACEOF
2916 rm -f conftest.$ac_objext conftest$ac_exeext
2917 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2918   (eval $ac_link) 2>conftest.er1
2919   ac_status=$?
2920   grep -v '^ *+' conftest.er1 >conftest.err
2921   rm -f conftest.er1
2922   cat conftest.err >&5
2923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2924   (exit $ac_status); } &&
2925          { ac_try='test -z "$ac_c_werror_flag"
2926                          || test ! -s conftest.err'
2927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2928   (eval $ac_try) 2>&5
2929   ac_status=$?
2930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2931   (exit $ac_status); }; } &&
2932          { ac_try='test -s conftest$ac_exeext'
2933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2934   (eval $ac_try) 2>&5
2935   ac_status=$?
2936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2937   (exit $ac_status); }; }; then
2938   echo "$as_me:$LINENO: result: yes" >&5
2939 echo "${ECHO_T}yes" >&6
2940 else
2941   echo "$as_me: failed program was:" >&5
2942 sed 's/^/| /' conftest.$ac_ext >&5
2943
2944 echo "$as_me:$LINENO: result: no" >&5
2945 echo "${ECHO_T}no" >&6
2946    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
2947 echo "$as_me: error: cannot proceed" >&2;}
2948    { (exit 1); exit 1; }; }
2949 fi
2950 rm -f conftest.err conftest.$ac_objext \
2951       conftest$ac_exeext conftest.$ac_ext
2952
2953 # Defend against gcc -ffast-math
2954 if test "$GCC" = yes; then
2955 cat >conftest.$ac_ext <<_ACEOF
2956 /* confdefs.h.  */
2957 _ACEOF
2958 cat confdefs.h >>conftest.$ac_ext
2959 cat >>conftest.$ac_ext <<_ACEOF
2960 /* end confdefs.h.  */
2961
2962 int
2963 main ()
2964 {
2965 #ifdef __FAST_MATH__
2966 choke me
2967 #endif
2968   ;
2969   return 0;
2970 }
2971 _ACEOF
2972 rm -f conftest.$ac_objext
2973 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2974   (eval $ac_compile) 2>conftest.er1
2975   ac_status=$?
2976   grep -v '^ *+' conftest.er1 >conftest.err
2977   rm -f conftest.er1
2978   cat conftest.err >&5
2979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2980   (exit $ac_status); } &&
2981          { ac_try='test -z "$ac_c_werror_flag"
2982                          || test ! -s conftest.err'
2983   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2984   (eval $ac_try) 2>&5
2985   ac_status=$?
2986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2987   (exit $ac_status); }; } &&
2988          { ac_try='test -s conftest.$ac_objext'
2989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2990   (eval $ac_try) 2>&5
2991   ac_status=$?
2992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2993   (exit $ac_status); }; }; then
2994   :
2995 else
2996   echo "$as_me: failed program was:" >&5
2997 sed 's/^/| /' conftest.$ac_ext >&5
2998
2999 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3000 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3001    { (exit 1); exit 1; }; }
3002 fi
3003 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3004 fi
3005
3006 ac_ext=c
3007 ac_cpp='$CPP $CPPFLAGS'
3008 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3009 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3010 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3011 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3012 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3013 # On Suns, sometimes $CPP names a directory.
3014 if test -n "$CPP" && test -d "$CPP"; then
3015   CPP=
3016 fi
3017 if test -z "$CPP"; then
3018   if test "${ac_cv_prog_CPP+set}" = set; then
3019   echo $ECHO_N "(cached) $ECHO_C" >&6
3020 else
3021       # Double quotes because CPP needs to be expanded
3022     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3023     do
3024       ac_preproc_ok=false
3025 for ac_c_preproc_warn_flag in '' yes
3026 do
3027   # Use a header file that comes with gcc, so configuring glibc
3028   # with a fresh cross-compiler works.
3029   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3030   # <limits.h> exists even on freestanding compilers.
3031   # On the NeXT, cc -E runs the code through the compiler's parser,
3032   # not just through cpp. "Syntax error" is here to catch this case.
3033   cat >conftest.$ac_ext <<_ACEOF
3034 /* confdefs.h.  */
3035 _ACEOF
3036 cat confdefs.h >>conftest.$ac_ext
3037 cat >>conftest.$ac_ext <<_ACEOF
3038 /* end confdefs.h.  */
3039 #ifdef __STDC__
3040 # include <limits.h>
3041 #else
3042 # include <assert.h>
3043 #endif
3044                      Syntax error
3045 _ACEOF
3046 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3047   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3048   ac_status=$?
3049   grep -v '^ *+' conftest.er1 >conftest.err
3050   rm -f conftest.er1
3051   cat conftest.err >&5
3052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3053   (exit $ac_status); } >/dev/null; then
3054   if test -s conftest.err; then
3055     ac_cpp_err=$ac_c_preproc_warn_flag
3056     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3057   else
3058     ac_cpp_err=
3059   fi
3060 else
3061   ac_cpp_err=yes
3062 fi
3063 if test -z "$ac_cpp_err"; then
3064   :
3065 else
3066   echo "$as_me: failed program was:" >&5
3067 sed 's/^/| /' conftest.$ac_ext >&5
3068
3069   # Broken: fails on valid input.
3070 continue
3071 fi
3072 rm -f conftest.err conftest.$ac_ext
3073
3074   # OK, works on sane cases.  Now check whether non-existent headers
3075   # can be detected and how.
3076   cat >conftest.$ac_ext <<_ACEOF
3077 /* confdefs.h.  */
3078 _ACEOF
3079 cat confdefs.h >>conftest.$ac_ext
3080 cat >>conftest.$ac_ext <<_ACEOF
3081 /* end confdefs.h.  */
3082 #include <ac_nonexistent.h>
3083 _ACEOF
3084 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3085   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3086   ac_status=$?
3087   grep -v '^ *+' conftest.er1 >conftest.err
3088   rm -f conftest.er1
3089   cat conftest.err >&5
3090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3091   (exit $ac_status); } >/dev/null; then
3092   if test -s conftest.err; then
3093     ac_cpp_err=$ac_c_preproc_warn_flag
3094     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3095   else
3096     ac_cpp_err=
3097   fi
3098 else
3099   ac_cpp_err=yes
3100 fi
3101 if test -z "$ac_cpp_err"; then
3102   # Broken: success on invalid input.
3103 continue
3104 else
3105   echo "$as_me: failed program was:" >&5
3106 sed 's/^/| /' conftest.$ac_ext >&5
3107
3108   # Passes both tests.
3109 ac_preproc_ok=:
3110 break
3111 fi
3112 rm -f conftest.err conftest.$ac_ext
3113
3114 done
3115 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3116 rm -f conftest.err conftest.$ac_ext
3117 if $ac_preproc_ok; then
3118   break
3119 fi
3120
3121     done
3122     ac_cv_prog_CPP=$CPP
3123
3124 fi
3125   CPP=$ac_cv_prog_CPP
3126 else
3127   ac_cv_prog_CPP=$CPP
3128 fi
3129 echo "$as_me:$LINENO: result: $CPP" >&5
3130 echo "${ECHO_T}$CPP" >&6
3131 ac_preproc_ok=false
3132 for ac_c_preproc_warn_flag in '' yes
3133 do
3134   # Use a header file that comes with gcc, so configuring glibc
3135   # with a fresh cross-compiler works.
3136   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3137   # <limits.h> exists even on freestanding compilers.
3138   # On the NeXT, cc -E runs the code through the compiler's parser,
3139   # not just through cpp. "Syntax error" is here to catch this case.
3140   cat >conftest.$ac_ext <<_ACEOF
3141 /* confdefs.h.  */
3142 _ACEOF
3143 cat confdefs.h >>conftest.$ac_ext
3144 cat >>conftest.$ac_ext <<_ACEOF
3145 /* end confdefs.h.  */
3146 #ifdef __STDC__
3147 # include <limits.h>
3148 #else
3149 # include <assert.h>
3150 #endif
3151                      Syntax error
3152 _ACEOF
3153 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3154   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3155   ac_status=$?
3156   grep -v '^ *+' conftest.er1 >conftest.err
3157   rm -f conftest.er1
3158   cat conftest.err >&5
3159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3160   (exit $ac_status); } >/dev/null; then
3161   if test -s conftest.err; then
3162     ac_cpp_err=$ac_c_preproc_warn_flag
3163     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3164   else
3165     ac_cpp_err=
3166   fi
3167 else
3168   ac_cpp_err=yes
3169 fi
3170 if test -z "$ac_cpp_err"; then
3171   :
3172 else
3173   echo "$as_me: failed program was:" >&5
3174 sed 's/^/| /' conftest.$ac_ext >&5
3175
3176   # Broken: fails on valid input.
3177 continue
3178 fi
3179 rm -f conftest.err conftest.$ac_ext
3180
3181   # OK, works on sane cases.  Now check whether non-existent headers
3182   # can be detected and how.
3183   cat >conftest.$ac_ext <<_ACEOF
3184 /* confdefs.h.  */
3185 _ACEOF
3186 cat confdefs.h >>conftest.$ac_ext
3187 cat >>conftest.$ac_ext <<_ACEOF
3188 /* end confdefs.h.  */
3189 #include <ac_nonexistent.h>
3190 _ACEOF
3191 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3192   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3193   ac_status=$?
3194   grep -v '^ *+' conftest.er1 >conftest.err
3195   rm -f conftest.er1
3196   cat conftest.err >&5
3197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3198   (exit $ac_status); } >/dev/null; then
3199   if test -s conftest.err; then
3200     ac_cpp_err=$ac_c_preproc_warn_flag
3201     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3202   else
3203     ac_cpp_err=
3204   fi
3205 else
3206   ac_cpp_err=yes
3207 fi
3208 if test -z "$ac_cpp_err"; then
3209   # Broken: success on invalid input.
3210 continue
3211 else
3212   echo "$as_me: failed program was:" >&5
3213 sed 's/^/| /' conftest.$ac_ext >&5
3214
3215   # Passes both tests.
3216 ac_preproc_ok=:
3217 break
3218 fi
3219 rm -f conftest.err conftest.$ac_ext
3220
3221 done
3222 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3223 rm -f conftest.err conftest.$ac_ext
3224 if $ac_preproc_ok; then
3225   :
3226 else
3227   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3228 See \`config.log' for more details." >&5
3229 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3230 See \`config.log' for more details." >&2;}
3231    { (exit 1); exit 1; }; }
3232 fi
3233
3234 ac_ext=c
3235 ac_cpp='$CPP $CPPFLAGS'
3236 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3237 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3238 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3239
3240
3241
3242 # Create compiler version string
3243 if test x"$GCC" = x"yes" ; then
3244   cc_string="GCC `${CC} --version | sed q`"
3245 else
3246   cc_string=$CC
3247 fi
3248
3249 cat >>confdefs.h <<_ACEOF
3250 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3251 _ACEOF
3252
3253
3254
3255 #
3256 # Set up TAS assembly code if needed; the template file has now had its
3257 # chance to request this.
3258 #
3259           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3260
3261
3262 if test "$need_tas" = yes ; then
3263   TAS=tas.o
3264 else
3265   TAS=""
3266 fi
3267
3268
3269
3270 #
3271 # Automatic dependency tracking
3272 #
3273
3274
3275 # Check whether --enable-depend or --disable-depend was given.
3276 if test "${enable_depend+set}" = set; then
3277   enableval="$enable_depend"
3278
3279   case $enableval in
3280     yes)
3281       autodepend=yes
3282       ;;
3283     no)
3284       :
3285       ;;
3286     *)
3287       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3288 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3289    { (exit 1); exit 1; }; }
3290       ;;
3291   esac
3292
3293 else
3294   enable_depend=no
3295
3296 fi;
3297
3298
3299
3300
3301 #
3302 # Enable assert checks
3303 #
3304
3305
3306 # Check whether --enable-cassert or --disable-cassert was given.
3307 if test "${enable_cassert+set}" = set; then
3308   enableval="$enable_cassert"
3309
3310   case $enableval in
3311     yes)
3312
3313 cat >>confdefs.h <<\_ACEOF
3314 #define USE_ASSERT_CHECKING 1
3315 _ACEOF
3316
3317       ;;
3318     no)
3319       :
3320       ;;
3321     *)
3322       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3323 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3324    { (exit 1); exit 1; }; }
3325       ;;
3326   esac
3327
3328 else
3329   enable_cassert=no
3330
3331 fi;
3332
3333
3334
3335 #
3336 # Include directories
3337 #
3338 ac_save_IFS=$IFS
3339 IFS="${IFS}${PATH_SEPARATOR}"
3340 # SRCH_INC comes from the template file
3341 for dir in $with_includes $SRCH_INC; do
3342   if test -d "$dir"; then
3343     INCLUDES="$INCLUDES -I$dir"
3344   else
3345     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3346 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3347   fi
3348 done
3349 IFS=$ac_save_IFS
3350
3351
3352
3353 #
3354 # Library directories
3355 #
3356 ac_save_IFS=$IFS
3357 IFS="${IFS}${PATH_SEPARATOR}"
3358 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3359 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3360   if test -d "$dir"; then
3361     LIBDIRS="$LIBDIRS -L$dir"
3362   else
3363     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3364 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3365   fi
3366 done
3367 IFS=$ac_save_IFS
3368
3369 #
3370 # Enable thread-safe client libraries
3371 #
3372 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3373 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3374
3375
3376 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3377 if test "${enable_thread_safety+set}" = set; then
3378   enableval="$enable_thread_safety"
3379
3380   case $enableval in
3381     yes)
3382       :
3383       ;;
3384     no)
3385       :
3386       ;;
3387     *)
3388       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3389 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3390    { (exit 1); exit 1; }; }
3391       ;;
3392   esac
3393
3394 else
3395   enable_thread_safety=no
3396
3397 fi;
3398
3399
3400
3401 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3402 if test "${enable_thread_safety_force+set}" = set; then
3403   enableval="$enable_thread_safety_force"
3404
3405   case $enableval in
3406     yes)
3407       :
3408       ;;
3409     no)
3410       :
3411       ;;
3412     *)
3413       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3414 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3415    { (exit 1); exit 1; }; }
3416       ;;
3417   esac
3418
3419 else
3420   enable_thread_safety_force=no
3421
3422 fi;
3423
3424 if test "$enable_thread_safety" = yes -o \
3425         "$enable_thread_safety_force" = yes; then
3426   enable_thread_safety="yes"    # for 'force'
3427
3428 cat >>confdefs.h <<\_ACEOF
3429 #define ENABLE_THREAD_SAFETY 1
3430 _ACEOF
3431
3432 fi
3433 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3434 echo "${ECHO_T}$enable_thread_safety" >&6
3435
3436
3437 #
3438 # Optionally build Tcl modules (PL/Tcl)
3439 #
3440 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3441 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3442
3443
3444
3445 # Check whether --with-tcl or --without-tcl was given.
3446 if test "${with_tcl+set}" = set; then
3447   withval="$with_tcl"
3448
3449   case $withval in
3450     yes)
3451       :
3452       ;;
3453     no)
3454       :
3455       ;;
3456     *)
3457       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3458 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3459    { (exit 1); exit 1; }; }
3460       ;;
3461   esac
3462
3463 else
3464   with_tcl=no
3465
3466 fi;
3467
3468 echo "$as_me:$LINENO: result: $with_tcl" >&5
3469 echo "${ECHO_T}$with_tcl" >&6
3470
3471
3472 # We see if the path to the Tcl/Tk configuration scripts is specified.
3473 # This will override the use of tclsh to find the paths to search.
3474
3475
3476
3477
3478 # Check whether --with-tclconfig or --without-tclconfig was given.
3479 if test "${with_tclconfig+set}" = set; then
3480   withval="$with_tclconfig"
3481
3482   case $withval in
3483     yes)
3484       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3485 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3486    { (exit 1); exit 1; }; }
3487       ;;
3488     no)
3489       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3490 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3491    { (exit 1); exit 1; }; }
3492       ;;
3493     *)
3494
3495       ;;
3496   esac
3497
3498 fi;
3499
3500
3501 #
3502 # Optionally build Perl modules (PL/Perl)
3503 #
3504 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3505 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3506
3507
3508
3509 # Check whether --with-perl or --without-perl was given.
3510 if test "${with_perl+set}" = set; then
3511   withval="$with_perl"
3512
3513   case $withval in
3514     yes)
3515       :
3516       ;;
3517     no)
3518       :
3519       ;;
3520     *)
3521       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3522 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3523    { (exit 1); exit 1; }; }
3524       ;;
3525   esac
3526
3527 else
3528   with_perl=no
3529
3530 fi;
3531
3532 echo "$as_me:$LINENO: result: $with_perl" >&5
3533 echo "${ECHO_T}$with_perl" >&6
3534
3535
3536 #
3537 # Optionally build Python modules (PL/Python)
3538 #
3539 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3540 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3541
3542
3543
3544 # Check whether --with-python or --without-python was given.
3545 if test "${with_python+set}" = set; then
3546   withval="$with_python"
3547
3548   case $withval in
3549     yes)
3550       :
3551       ;;
3552     no)
3553       :
3554       ;;
3555     *)
3556       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3557 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3558    { (exit 1); exit 1; }; }
3559       ;;
3560   esac
3561
3562 else
3563   with_python=no
3564
3565 fi;
3566
3567 echo "$as_me:$LINENO: result: $with_python" >&5
3568 echo "${ECHO_T}$with_python" >&6
3569
3570
3571 #
3572 # Kerberos 5
3573 #
3574 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3575 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3576
3577
3578
3579 # Check whether --with-krb5 or --without-krb5 was given.
3580 if test "${with_krb5+set}" = set; then
3581   withval="$with_krb5"
3582
3583   case $withval in
3584     yes)
3585
3586
3587 cat >>confdefs.h <<\_ACEOF
3588 #define KRB5 1
3589 _ACEOF
3590
3591   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3592
3593       ;;
3594     no)
3595       :
3596       ;;
3597     *)
3598       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3599 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3600    { (exit 1); exit 1; }; }
3601       ;;
3602   esac
3603
3604 else
3605   with_krb5=no
3606
3607 fi;
3608
3609 echo "$as_me:$LINENO: result: $with_krb5" >&5
3610 echo "${ECHO_T}$with_krb5" >&6
3611
3612
3613
3614
3615
3616
3617 #
3618 # Kerberos configuration parameters
3619 #
3620
3621
3622
3623 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3624 if test "${with_krb_srvnam+set}" = set; then
3625   withval="$with_krb_srvnam"
3626
3627   case $withval in
3628     yes)
3629       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3630 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3631    { (exit 1); exit 1; }; }
3632       ;;
3633     no)
3634       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3635 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3636    { (exit 1); exit 1; }; }
3637       ;;
3638     *)
3639
3640       ;;
3641   esac
3642
3643 else
3644   with_krb_srvnam="postgres"
3645 fi;
3646
3647
3648 cat >>confdefs.h <<_ACEOF
3649 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3650 _ACEOF
3651
3652
3653
3654 #
3655 # PAM
3656 #
3657 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3658 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3659
3660
3661
3662 # Check whether --with-pam or --without-pam was given.
3663 if test "${with_pam+set}" = set; then
3664   withval="$with_pam"
3665
3666   case $withval in
3667     yes)
3668
3669 cat >>confdefs.h <<\_ACEOF
3670 #define USE_PAM 1
3671 _ACEOF
3672
3673       ;;
3674     no)
3675       :
3676       ;;
3677     *)
3678       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3679 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3680    { (exit 1); exit 1; }; }
3681       ;;
3682   esac
3683
3684 else
3685   with_pam=no
3686
3687 fi;
3688
3689 echo "$as_me:$LINENO: result: $with_pam" >&5
3690 echo "${ECHO_T}$with_pam" >&6
3691
3692
3693
3694 #
3695 # Bonjour
3696 #
3697 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
3698 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
3699
3700
3701
3702 # Check whether --with-bonjour or --without-bonjour was given.
3703 if test "${with_bonjour+set}" = set; then
3704   withval="$with_bonjour"
3705
3706   case $withval in
3707     yes)
3708
3709 cat >>confdefs.h <<\_ACEOF
3710 #define USE_BONJOUR 1
3711 _ACEOF
3712
3713       ;;
3714     no)
3715       :
3716       ;;
3717     *)
3718       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
3719 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
3720    { (exit 1); exit 1; }; }
3721       ;;
3722   esac
3723
3724 else
3725   with_bonjour=no
3726
3727 fi;
3728
3729 echo "$as_me:$LINENO: result: $with_bonjour" >&5
3730 echo "${ECHO_T}$with_bonjour" >&6
3731
3732
3733
3734 #
3735 # OpenSSL
3736 #
3737 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3738 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
3739
3740
3741
3742 # Check whether --with-openssl or --without-openssl was given.
3743 if test "${with_openssl+set}" = set; then
3744   withval="$with_openssl"
3745
3746   case $withval in
3747     yes)
3748
3749 cat >>confdefs.h <<\_ACEOF
3750 #define USE_SSL 1
3751 _ACEOF
3752
3753       ;;
3754     no)
3755       :
3756       ;;
3757     *)
3758       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3759 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3760    { (exit 1); exit 1; }; }
3761       ;;
3762   esac
3763
3764 else
3765   with_openssl=no
3766
3767 fi;
3768
3769 echo "$as_me:$LINENO: result: $with_openssl" >&5
3770 echo "${ECHO_T}$with_openssl" >&6
3771
3772
3773
3774 #
3775 # Readline
3776 #
3777
3778
3779
3780 # Check whether --with-readline or --without-readline was given.
3781 if test "${with_readline+set}" = set; then
3782   withval="$with_readline"
3783
3784   case $withval in
3785     yes)
3786       :
3787       ;;
3788     no)
3789       :
3790       ;;
3791     *)
3792       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
3793 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
3794    { (exit 1); exit 1; }; }
3795       ;;
3796   esac
3797
3798 else
3799   with_readline=yes
3800
3801 fi;
3802
3803 # readline on MinGW has problems with backslashes in psql and other bugs.
3804 # This is particularly a problem with non-US code pages.
3805 # Therefore disable its use until we understand the cause. 2004-07-20
3806 if test "$PORTNAME" = "win32"; then
3807   if test "$with_readline" = yes; then
3808     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
3809 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
3810     with_readline=no
3811   fi
3812 fi
3813
3814
3815 #
3816 # Zlib
3817 #
3818
3819
3820
3821 # Check whether --with-zlib or --without-zlib was given.
3822 if test "${with_zlib+set}" = set; then
3823   withval="$with_zlib"
3824
3825   case $withval in
3826     yes)
3827       :
3828       ;;
3829     no)
3830       :
3831       ;;
3832     *)
3833       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
3834 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
3835    { (exit 1); exit 1; }; }
3836       ;;
3837   esac
3838
3839 else
3840   with_zlib=yes
3841
3842 fi;
3843
3844
3845
3846 #
3847 # Elf
3848 #
3849
3850 # Assume system is ELF if it predefines __ELF__ as 1,
3851 # otherwise believe host_os based default.
3852 case $host_os in
3853     freebsd1*|freebsd2*) elf=no;;
3854     freebsd3*|freebsd4*) elf=yes;;
3855 esac
3856
3857
3858 echo "$as_me:$LINENO: checking for egrep" >&5
3859 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3860 if test "${ac_cv_prog_egrep+set}" = set; then
3861   echo $ECHO_N "(cached) $ECHO_C" >&6
3862 else
3863   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3864     then ac_cv_prog_egrep='grep -E'
3865     else ac_cv_prog_egrep='egrep'
3866     fi
3867 fi
3868 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3869 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3870  EGREP=$ac_cv_prog_egrep
3871
3872
3873 cat >conftest.$ac_ext <<_ACEOF
3874 /* confdefs.h.  */
3875 _ACEOF
3876 cat confdefs.h >>conftest.$ac_ext
3877 cat >>conftest.$ac_ext <<_ACEOF
3878 /* end confdefs.h.  */
3879 #if __ELF__
3880   yes
3881 #endif
3882
3883 _ACEOF
3884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3885   $EGREP "yes" >/dev/null 2>&1; then
3886   ELF_SYS=true
3887 else
3888   if test "X$elf" = "Xyes" ; then
3889   ELF_SYS=true
3890 else
3891   ELF_SYS=
3892 fi
3893 fi
3894 rm -f conftest*
3895
3896
3897
3898 #
3899 # Assignments
3900 #
3901
3902 CPPFLAGS="$CPPFLAGS $INCLUDES"
3903 LDFLAGS="$LDFLAGS $LIBDIRS"
3904
3905 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
3906 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
3907 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
3908 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
3909
3910
3911
3912 for ac_prog in gawk mawk nawk awk
3913 do
3914   # Extract the first word of "$ac_prog", so it can be a program name with args.
3915 set dummy $ac_prog; ac_word=$2
3916 echo "$as_me:$LINENO: checking for $ac_word" >&5
3917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3918 if test "${ac_cv_prog_AWK+set}" = set; then
3919   echo $ECHO_N "(cached) $ECHO_C" >&6
3920 else
3921   if test -n "$AWK"; then
3922   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3923 else
3924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3925 for as_dir in $PATH
3926 do
3927   IFS=$as_save_IFS
3928   test -z "$as_dir" && as_dir=.
3929   for ac_exec_ext in '' $ac_executable_extensions; do
3930   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3931     ac_cv_prog_AWK="$ac_prog"
3932     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3933     break 2
3934   fi
3935 done
3936 done
3937
3938 fi
3939 fi
3940 AWK=$ac_cv_prog_AWK
3941 if test -n "$AWK"; then
3942   echo "$as_me:$LINENO: result: $AWK" >&5
3943 echo "${ECHO_T}$AWK" >&6
3944 else
3945   echo "$as_me:$LINENO: result: no" >&5
3946 echo "${ECHO_T}no" >&6
3947 fi
3948
3949   test -n "$AWK" && break
3950 done
3951
3952 echo "$as_me:$LINENO: checking for flex" >&5
3953 echo $ECHO_N "checking for flex... $ECHO_C" >&6
3954 if test "${pgac_cv_path_flex+set}" = set; then
3955   echo $ECHO_N "(cached) $ECHO_C" >&6
3956 else
3957   # Let the user override the test
3958 if test -n "$FLEX"; then
3959   pgac_cv_path_flex=$FLEX
3960 else
3961   pgac_save_IFS=$IFS
3962   IFS=$PATH_SEPARATOR
3963   for pgac_dir in $PATH; do
3964     IFS=$pgac_save_IFS
3965     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
3966       pgac_dir=`pwd`
3967     fi
3968     for pgac_prog in flex lex; do
3969       pgac_candidate="$pgac_dir/$pgac_prog"
3970       if test -f "$pgac_candidate" \
3971         && $pgac_candidate --version </dev/null >/dev/null 2>&1
3972       then
3973         echo '%%'  > conftest.l
3974         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
3975           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
3976             pgac_broken_flex=$pgac_candidate
3977             continue
3978           fi
3979
3980           pgac_cv_path_flex=$pgac_candidate
3981           break 2
3982         fi
3983       fi
3984     done
3985   done
3986   rm -f conftest.l lex.yy.c
3987   : ${pgac_cv_path_flex=no}
3988 fi
3989
3990 fi
3991 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
3992 echo "${ECHO_T}$pgac_cv_path_flex" >&6
3993 if test x"$pgac_cv_path_flex" = x"no"; then
3994   if test -n "$pgac_broken_flex"; then
3995     { echo "$as_me:$LINENO: WARNING:
3996 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
3997 *** should get version 2.5.4 or later." >&5
3998 echo "$as_me: WARNING:
3999 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4000 *** should get version 2.5.4 or later." >&2;}
4001   fi
4002
4003   { echo "$as_me:$LINENO: WARNING:
4004 *** Without Flex you will not be able to build PostgreSQL from CVS or
4005 *** change any of the scanner definition files.  You can obtain Flex from
4006 *** a GNU mirror site.  (If you are using the official distribution of
4007 *** PostgreSQL then you do not need to worry about this because the Flex
4008 *** output is pre-generated.)" >&5
4009 echo "$as_me: WARNING:
4010 *** Without Flex you will not be able to build PostgreSQL from CVS or
4011 *** change any of the scanner definition files.  You can obtain Flex from
4012 *** a GNU mirror site.  (If you are using the official distribution of
4013 *** PostgreSQL then you do not need to worry about this because the Flex
4014 *** output is pre-generated.)" >&2;}
4015 fi
4016
4017 if test x"$pgac_cv_path_flex" = x"no"; then
4018   FLEX=
4019 else
4020   FLEX=$pgac_cv_path_flex
4021 fi
4022
4023
4024
4025
4026 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4027 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4028 LN_S=$as_ln_s
4029 if test "$LN_S" = "ln -s"; then
4030   echo "$as_me:$LINENO: result: yes" >&5
4031 echo "${ECHO_T}yes" >&6
4032 else
4033   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4034 echo "${ECHO_T}no, using $LN_S" >&6
4035 fi
4036
4037
4038 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4039 if test "${with_gnu_ld+set}" = set; then
4040   withval="$with_gnu_ld"
4041   test "$withval" = no || with_gnu_ld=yes
4042 else
4043   with_gnu_ld=no
4044 fi;
4045 ac_prog=ld
4046 if test "$GCC" = yes; then
4047   # Check if gcc -print-prog-name=ld gives a path.
4048   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4049 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4050   case $host in
4051   *-*-mingw*)
4052     # gcc leaves a trailing carriage return which upsets mingw
4053     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4054   *)
4055     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4056   esac
4057   case "$ac_prog" in
4058     # Accept absolute paths.
4059     [\\/]* | [A-Za-z]:[\\/]*)
4060       re_direlt='/[^/][^/]*/\.\./'
4061       # Canonicalize the path of ld
4062       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4063       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4064         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4065       done
4066       test -z "$LD" && LD="$ac_prog"
4067       ;;
4068   "")
4069     # If it fails, then pretend we aren't using GCC.
4070     ac_prog=ld
4071     ;;
4072   *)
4073     # If it is relative, then search for the first ld in PATH.
4074     with_gnu_ld=unknown
4075     ;;
4076   esac
4077 elif test "$with_gnu_ld" = yes; then
4078   echo "$as_me:$LINENO: checking for GNU ld" >&5
4079 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4080 else
4081   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4082 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4083 fi
4084 if test "${ac_cv_path_LD+set}" = set; then
4085   echo $ECHO_N "(cached) $ECHO_C" >&6
4086 else
4087   if test -z "$LD"; then
4088   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4089   for ac_dir in $PATH; do
4090     test -z "$ac_dir" && ac_dir=.
4091     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4092       ac_cv_path_LD="$ac_dir/$ac_prog"
4093       # Check to see if the program is GNU ld.  I'd rather use --version,
4094       # but apparently some GNU ld's only accept -v.
4095       # Break only if it was the GNU/non-GNU ld that we prefer.
4096       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4097         test "$with_gnu_ld" != no && break
4098       else
4099         test "$with_gnu_ld" != yes && break
4100       fi
4101     fi
4102   done
4103   IFS="$ac_save_ifs"
4104 else
4105   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4106 fi
4107 fi
4108
4109 LD="$ac_cv_path_LD"
4110 if test -n "$LD"; then
4111   echo "$as_me:$LINENO: result: $LD" >&5
4112 echo "${ECHO_T}$LD" >&6
4113 else
4114   echo "$as_me:$LINENO: result: no" >&5
4115 echo "${ECHO_T}no" >&6
4116 fi
4117 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4118 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4119    { (exit 1); exit 1; }; }
4120 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4121 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4122 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4123   echo $ECHO_N "(cached) $ECHO_C" >&6
4124 else
4125   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4126 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4127   ac_cv_prog_gnu_ld=yes
4128 else
4129   ac_cv_prog_gnu_ld=no
4130 fi
4131 fi
4132 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4133 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4134 with_gnu_ld=$ac_cv_prog_gnu_ld
4135
4136
4137
4138
4139 case $host_os in sysv5*)
4140   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4141 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4142 if test "${pgac_cv_prog_ld_R+set}" = set; then
4143   echo $ECHO_N "(cached) $ECHO_C" >&6
4144 else
4145
4146     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4147     cat >conftest.$ac_ext <<_ACEOF
4148 /* confdefs.h.  */
4149 _ACEOF
4150 cat confdefs.h >>conftest.$ac_ext
4151 cat >>conftest.$ac_ext <<_ACEOF
4152 /* end confdefs.h.  */
4153
4154 int
4155 main ()
4156 {
4157
4158   ;
4159   return 0;
4160 }
4161 _ACEOF
4162 rm -f conftest.$ac_objext conftest$ac_exeext
4163 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4164   (eval $ac_link) 2>conftest.er1
4165   ac_status=$?
4166   grep -v '^ *+' conftest.er1 >conftest.err
4167   rm -f conftest.er1
4168   cat conftest.err >&5
4169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4170   (exit $ac_status); } &&
4171          { ac_try='test -z "$ac_c_werror_flag"
4172                          || test ! -s conftest.err'
4173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4174   (eval $ac_try) 2>&5
4175   ac_status=$?
4176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4177   (exit $ac_status); }; } &&
4178          { ac_try='test -s conftest$ac_exeext'
4179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4180   (eval $ac_try) 2>&5
4181   ac_status=$?
4182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4183   (exit $ac_status); }; }; then
4184   pgac_cv_prog_ld_R=yes
4185 else
4186   echo "$as_me: failed program was:" >&5
4187 sed 's/^/| /' conftest.$ac_ext >&5
4188
4189 pgac_cv_prog_ld_R=no
4190 fi
4191 rm -f conftest.err conftest.$ac_objext \
4192       conftest$ac_exeext conftest.$ac_ext
4193     LDFLAGS=$pgac_save_LDFLAGS
4194
4195 fi
4196 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4197 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4198   ld_R_works=$pgac_cv_prog_ld_R
4199
4200 esac
4201 if test -n "$ac_tool_prefix"; then
4202   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4203 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4204 echo "$as_me:$LINENO: checking for $ac_word" >&5
4205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4206 if test "${ac_cv_prog_RANLIB+set}" = set; then
4207   echo $ECHO_N "(cached) $ECHO_C" >&6
4208 else
4209   if test -n "$RANLIB"; then
4210   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4211 else
4212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213 for as_dir in $PATH
4214 do
4215   IFS=$as_save_IFS
4216   test -z "$as_dir" && as_dir=.
4217   for ac_exec_ext in '' $ac_executable_extensions; do
4218   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4219     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4220     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4221     break 2
4222   fi
4223 done
4224 done
4225
4226 fi
4227 fi
4228 RANLIB=$ac_cv_prog_RANLIB
4229 if test -n "$RANLIB"; then
4230   echo "$as_me:$LINENO: result: $RANLIB" >&5
4231 echo "${ECHO_T}$RANLIB" >&6
4232 else
4233   echo "$as_me:$LINENO: result: no" >&5
4234 echo "${ECHO_T}no" >&6
4235 fi
4236
4237 fi
4238 if test -z "$ac_cv_prog_RANLIB"; then
4239   ac_ct_RANLIB=$RANLIB
4240   # Extract the first word of "ranlib", so it can be a program name with args.
4241 set dummy ranlib; ac_word=$2
4242 echo "$as_me:$LINENO: checking for $ac_word" >&5
4243 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4244 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4245   echo $ECHO_N "(cached) $ECHO_C" >&6
4246 else
4247   if test -n "$ac_ct_RANLIB"; then
4248   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4249 else
4250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4251 for as_dir in $PATH
4252 do
4253   IFS=$as_save_IFS
4254   test -z "$as_dir" && as_dir=.
4255   for ac_exec_ext in '' $ac_executable_extensions; do
4256   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4257     ac_cv_prog_ac_ct_RANLIB="ranlib"
4258     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4259     break 2
4260   fi
4261 done
4262 done
4263
4264   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4265 fi
4266 fi
4267 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4268 if test -n "$ac_ct_RANLIB"; then
4269   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4270 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4271 else
4272   echo "$as_me:$LINENO: result: no" >&5
4273 echo "${ECHO_T}no" >&6
4274 fi
4275
4276   RANLIB=$ac_ct_RANLIB
4277 else
4278   RANLIB="$ac_cv_prog_RANLIB"
4279 fi
4280
4281 for ac_prog in lorder
4282 do
4283   # Extract the first word of "$ac_prog", so it can be a program name with args.
4284 set dummy $ac_prog; ac_word=$2
4285 echo "$as_me:$LINENO: checking for $ac_word" >&5
4286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4287 if test "${ac_cv_prog_LORDER+set}" = set; then
4288   echo $ECHO_N "(cached) $ECHO_C" >&6
4289 else
4290   if test -n "$LORDER"; then
4291   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
4292 else
4293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4294 for as_dir in $PATH
4295 do
4296   IFS=$as_save_IFS
4297   test -z "$as_dir" && as_dir=.
4298   for ac_exec_ext in '' $ac_executable_extensions; do
4299   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4300     ac_cv_prog_LORDER="$ac_prog"
4301     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4302     break 2
4303   fi
4304 done
4305 done
4306
4307 fi
4308 fi
4309 LORDER=$ac_cv_prog_LORDER
4310 if test -n "$LORDER"; then
4311   echo "$as_me:$LINENO: result: $LORDER" >&5
4312 echo "${ECHO_T}$LORDER" >&6
4313 else
4314   echo "$as_me:$LINENO: result: no" >&5
4315 echo "${ECHO_T}no" >&6
4316 fi
4317
4318   test -n "$LORDER" && break
4319 done
4320
4321 # Extract the first word of "tar", so it can be a program name with args.
4322 set dummy tar; ac_word=$2
4323 echo "$as_me:$LINENO: checking for $ac_word" >&5
4324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4325 if test "${ac_cv_path_TAR+set}" = set; then
4326   echo $ECHO_N "(cached) $ECHO_C" >&6
4327 else
4328   case $TAR in
4329   [\\/]* | ?:[\\/]*)
4330   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4331   ;;
4332   *)
4333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4334 for as_dir in $PATH
4335 do
4336   IFS=$as_save_IFS
4337   test -z "$as_dir" && as_dir=.
4338   for ac_exec_ext in '' $ac_executable_extensions; do
4339   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4340     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4341     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4342     break 2
4343   fi
4344 done
4345 done
4346
4347   ;;
4348 esac
4349 fi
4350 TAR=$ac_cv_path_TAR
4351
4352 if test -n "$TAR"; then
4353   echo "$as_me:$LINENO: result: $TAR" >&5
4354 echo "${ECHO_T}$TAR" >&6
4355 else
4356   echo "$as_me:$LINENO: result: no" >&5
4357 echo "${ECHO_T}no" >&6
4358 fi
4359
4360
4361   if test -n "$ac_tool_prefix"; then
4362   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4363 set dummy ${ac_tool_prefix}strip; ac_word=$2
4364 echo "$as_me:$LINENO: checking for $ac_word" >&5
4365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4366 if test "${ac_cv_prog_STRIP+set}" = set; then
4367   echo $ECHO_N "(cached) $ECHO_C" >&6
4368 else
4369   if test -n "$STRIP"; then
4370   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4371 else
4372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4373 for as_dir in $PATH
4374 do
4375   IFS=$as_save_IFS
4376   test -z "$as_dir" && as_dir=.
4377   for ac_exec_ext in '' $ac_executable_extensions; do
4378   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4379     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4380     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4381     break 2
4382   fi
4383 done
4384 done
4385
4386 fi
4387 fi
4388 STRIP=$ac_cv_prog_STRIP
4389 if test -n "$STRIP"; then
4390   echo "$as_me:$LINENO: result: $STRIP" >&5
4391 echo "${ECHO_T}$STRIP" >&6
4392 else
4393   echo "$as_me:$LINENO: result: no" >&5
4394 echo "${ECHO_T}no" >&6
4395 fi
4396
4397 fi
4398 if test -z "$ac_cv_prog_STRIP"; then
4399   ac_ct_STRIP=$STRIP
4400   # Extract the first word of "strip", so it can be a program name with args.
4401 set dummy strip; ac_word=$2
4402 echo "$as_me:$LINENO: checking for $ac_word" >&5
4403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4404 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4405   echo $ECHO_N "(cached) $ECHO_C" >&6
4406 else
4407   if test -n "$ac_ct_STRIP"; then
4408   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4409 else
4410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411 for as_dir in $PATH
4412 do
4413   IFS=$as_save_IFS
4414   test -z "$as_dir" && as_dir=.
4415   for ac_exec_ext in '' $ac_executable_extensions; do
4416   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4417     ac_cv_prog_ac_ct_STRIP="strip"
4418     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4419     break 2
4420   fi
4421 done
4422 done
4423
4424   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4425 fi
4426 fi
4427 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4428 if test -n "$ac_ct_STRIP"; then
4429   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4430 echo "${ECHO_T}$ac_ct_STRIP" >&6
4431 else
4432   echo "$as_me:$LINENO: result: no" >&5
4433 echo "${ECHO_T}no" >&6
4434 fi
4435
4436   STRIP=$ac_ct_STRIP
4437 else
4438   STRIP="$ac_cv_prog_STRIP"
4439 fi
4440
4441
4442   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4443 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4444   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4445     STRIP_STATIC_LIB="$STRIP -x"
4446     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4447     echo "$as_me:$LINENO: result: yes" >&5
4448 echo "${ECHO_T}yes" >&6
4449   else
4450     STRIP_STATIC_LIB=:
4451     STRIP_SHARED_LIB=:
4452     echo "$as_me:$LINENO: result: no" >&5
4453 echo "${ECHO_T}no" >&6
4454   fi
4455
4456
4457
4458
4459 for ac_prog in 'bison -y'
4460 do
4461   # Extract the first word of "$ac_prog", so it can be a program name with args.
4462 set dummy $ac_prog; ac_word=$2
4463 echo "$as_me:$LINENO: checking for $ac_word" >&5
4464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4465 if test "${ac_cv_prog_YACC+set}" = set; then
4466   echo $ECHO_N "(cached) $ECHO_C" >&6
4467 else
4468   if test -n "$YACC"; then
4469   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4470 else
4471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4472 for as_dir in $PATH
4473 do
4474   IFS=$as_save_IFS
4475   test -z "$as_dir" && as_dir=.
4476   for ac_exec_ext in '' $ac_executable_extensions; do
4477   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4478     ac_cv_prog_YACC="$ac_prog"
4479     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4480     break 2
4481   fi
4482 done
4483 done
4484
4485 fi
4486 fi
4487 YACC=$ac_cv_prog_YACC
4488 if test -n "$YACC"; then
4489   echo "$as_me:$LINENO: result: $YACC" >&5
4490 echo "${ECHO_T}$YACC" >&6
4491 else
4492   echo "$as_me:$LINENO: result: no" >&5
4493 echo "${ECHO_T}no" >&6
4494 fi
4495
4496   test -n "$YACC" && break
4497 done
4498
4499
4500 if test "$YACC"; then
4501   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4502     { echo "$as_me:$LINENO: WARNING:
4503 *** If you are going to modify the grammar files or build from CVS, the installed
4504 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4505 echo "$as_me: WARNING:
4506 *** If you are going to modify the grammar files or build from CVS, the installed
4507 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4508   fi
4509 fi
4510
4511 if test -z "$YACC"; then
4512   { echo "$as_me:$LINENO: WARNING:
4513 *** Without Bison you will not be able to build PostgreSQL from CVS or
4514 *** change any of the parser definition files.  You can obtain Bison from
4515 *** a GNU mirror site.  (If you are using the official distribution of
4516 *** PostgreSQL then you do not need to worry about this because the Bison
4517 *** output is pre-generated.)  To use a different yacc program (possible,
4518 *** but not recommended), set the environment variable YACC before running
4519 *** 'configure'." >&5
4520 echo "$as_me: WARNING:
4521 *** Without Bison you will not be able to build PostgreSQL from CVS or
4522 *** change any of the parser definition files.  You can obtain Bison from
4523 *** a GNU mirror site.  (If you are using the official distribution of
4524 *** PostgreSQL then you do not need to worry about this because the Bison
4525 *** output is pre-generated.)  To use a different yacc program (possible,
4526 *** but not recommended), set the environment variable YACC before running
4527 *** 'configure'." >&2;}
4528 fi
4529
4530
4531 # Extract the first word of "perl", so it can be a program name with args.
4532 set dummy perl; ac_word=$2
4533 echo "$as_me:$LINENO: checking for $ac_word" >&5
4534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4535 if test "${ac_cv_path_PERL+set}" = set; then
4536   echo $ECHO_N "(cached) $ECHO_C" >&6
4537 else
4538   case $PERL in
4539   [\\/]* | ?:[\\/]*)
4540   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4541   ;;
4542   *)
4543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544 for as_dir in $PATH
4545 do
4546   IFS=$as_save_IFS
4547   test -z "$as_dir" && as_dir=.
4548   for ac_exec_ext in '' $ac_executable_extensions; do
4549   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4550     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4551     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4552     break 2
4553   fi
4554 done
4555 done
4556
4557   ;;
4558 esac
4559 fi
4560 PERL=$ac_cv_path_PERL
4561
4562 if test -n "$PERL"; then
4563   echo "$as_me:$LINENO: result: $PERL" >&5
4564 echo "${ECHO_T}$PERL" >&6
4565 else
4566   echo "$as_me:$LINENO: result: no" >&5
4567 echo "${ECHO_T}no" >&6
4568 fi
4569
4570 if test "$with_perl" = yes; then
4571
4572 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4573 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4574 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4575 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4576 echo "${ECHO_T}$perl_archlibexp" >&6
4577 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4578 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4579 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4580 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4581 echo "${ECHO_T}$perl_privlibexp" >&6
4582 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4583 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4584 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4585 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4586 echo "${ECHO_T}$perl_useshrplib" >&6
4587
4588 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4589 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4590 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4591 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4592 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4593 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4594 echo "${ECHO_T}$perl_embed_ldflags" >&6
4595 fi
4596
4597 if test "$with_python" = yes; then
4598   # Extract the first word of "python", so it can be a program name with args.
4599 set dummy python; ac_word=$2
4600 echo "$as_me:$LINENO: checking for $ac_word" >&5
4601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4602 if test "${ac_cv_path_PYTHON+set}" = set; then
4603   echo $ECHO_N "(cached) $ECHO_C" >&6
4604 else
4605   case $PYTHON in
4606   [\\/]* | ?:[\\/]*)
4607   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4608   ;;
4609   *)
4610   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4611 for as_dir in $PATH
4612 do
4613   IFS=$as_save_IFS
4614   test -z "$as_dir" && as_dir=.
4615   for ac_exec_ext in '' $ac_executable_extensions; do
4616   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4617     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4618     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4619     break 2
4620   fi
4621 done
4622 done
4623
4624   ;;
4625 esac
4626 fi
4627 PYTHON=$ac_cv_path_PYTHON
4628
4629 if test -n "$PYTHON"; then
4630   echo "$as_me:$LINENO: result: $PYTHON" >&5
4631 echo "${ECHO_T}$PYTHON" >&6
4632 else
4633   echo "$as_me:$LINENO: result: no" >&5
4634 echo "${ECHO_T}no" >&6
4635 fi
4636
4637 if test x"$PYTHON" = x""; then
4638   { { echo "$as_me:$LINENO: error: Python not found" >&5
4639 echo "$as_me: error: Python not found" >&2;}
4640    { (exit 1); exit 1; }; }
4641 fi
4642
4643
4644 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4645 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4646 if "${PYTHON}" 2>&- -c 'import distutils'
4647 then
4648     echo "$as_me:$LINENO: result: yes" >&5
4649 echo "${ECHO_T}yes" >&6
4650 else
4651     echo "$as_me:$LINENO: result: no" >&5
4652 echo "${ECHO_T}no" >&6
4653     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4654 echo "$as_me: error: distutils module not found" >&2;}
4655    { (exit 1); exit 1; }; }
4656 fi
4657 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4658 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4659 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4660 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')"`
4661 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4662
4663 # This should be enough of a message.
4664 echo "$as_me:$LINENO: result: $python_configdir" >&5
4665 echo "${ECHO_T}$python_configdir" >&6
4666
4667
4668 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4669 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4670
4671 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4672 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4673 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4674 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4675
4676 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4677 then
4678         # New way: use the official shared library
4679         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4680         python_libspec="-L${python_libdir} -l${ldlibrary}"
4681 else
4682         # Old way: use libpython from python_configdir
4683         python_libdir="${python_configdir}"
4684         python_libspec="-L${python_libdir} -lpython${python_version}"
4685 fi
4686
4687 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4688
4689 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4690 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4691
4692
4693 # threaded python is not supported on bsd's
4694 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4695 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
4696 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
4697 if test "$pythreads" = "1"; then
4698   echo "$as_me:$LINENO: result: yes" >&5
4699 echo "${ECHO_T}yes" >&6
4700   case $host_os in
4701   openbsd*|freebsd4*)
4702     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
4703 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
4704    { (exit 1); exit 1; }; }
4705     ;;
4706   esac
4707 else
4708   echo "$as_me:$LINENO: result: no" >&5
4709 echo "${ECHO_T}no" >&6
4710 fi
4711
4712
4713 fi
4714
4715
4716 ##
4717 ## Libraries
4718 ##
4719
4720 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
4721 then
4722
4723 echo "$as_me:$LINENO: checking for main in -lbsd" >&5
4724 echo $ECHO_N "checking for main in -lbsd... $ECHO_C" >&6
4725 if test "${ac_cv_lib_bsd_main+set}" = set; then
4726   echo $ECHO_N "(cached) $ECHO_C" >&6
4727 else
4728   ac_check_lib_save_LIBS=$LIBS
4729 LIBS="-lbsd  $LIBS"
4730 cat >conftest.$ac_ext <<_ACEOF
4731 /* confdefs.h.  */
4732 _ACEOF
4733 cat confdefs.h >>conftest.$ac_ext
4734 cat >>conftest.$ac_ext <<_ACEOF
4735 /* end confdefs.h.  */
4736
4737
4738 int
4739 main ()
4740 {
4741 main ();
4742   ;
4743   return 0;
4744 }
4745 _ACEOF
4746 rm -f conftest.$ac_objext conftest$ac_exeext
4747 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4748   (eval $ac_link) 2>conftest.er1
4749   ac_status=$?
4750   grep -v '^ *+' conftest.er1 >conftest.err
4751   rm -f conftest.er1
4752   cat conftest.err >&5
4753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4754   (exit $ac_status); } &&
4755          { ac_try='test -z "$ac_c_werror_flag"
4756                          || test ! -s conftest.err'
4757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4758   (eval $ac_try) 2>&5
4759   ac_status=$?
4760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4761   (exit $ac_status); }; } &&
4762          { ac_try='test -s conftest$ac_exeext'
4763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4764   (eval $ac_try) 2>&5
4765   ac_status=$?
4766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4767   (exit $ac_status); }; }; then
4768   ac_cv_lib_bsd_main=yes
4769 else
4770   echo "$as_me: failed program was:" >&5
4771 sed 's/^/| /' conftest.$ac_ext >&5
4772
4773 ac_cv_lib_bsd_main=no
4774 fi
4775 rm -f conftest.err conftest.$ac_objext \
4776       conftest$ac_exeext conftest.$ac_ext
4777 LIBS=$ac_check_lib_save_LIBS
4778 fi
4779 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_main" >&5
4780 echo "${ECHO_T}$ac_cv_lib_bsd_main" >&6
4781 if test $ac_cv_lib_bsd_main = yes; then
4782   cat >>confdefs.h <<_ACEOF
4783 #define HAVE_LIBBSD 1
4784 _ACEOF
4785
4786   LIBS="-lbsd $LIBS"
4787
4788 fi
4789
4790 fi
4791
4792 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
4793 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
4794 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
4795   echo $ECHO_N "(cached) $ECHO_C" >&6
4796 else
4797   ac_check_lib_save_LIBS=$LIBS
4798 LIBS="-lutil  $LIBS"
4799 cat >conftest.$ac_ext <<_ACEOF
4800 /* confdefs.h.  */
4801 _ACEOF
4802 cat confdefs.h >>conftest.$ac_ext
4803 cat >>conftest.$ac_ext <<_ACEOF
4804 /* end confdefs.h.  */
4805
4806 /* Override any gcc2 internal prototype to avoid an error.  */
4807 #ifdef __cplusplus
4808 extern "C"
4809 #endif
4810 /* We use char because int might match the return type of a gcc2
4811    builtin and then its argument prototype would still apply.  */
4812 char setproctitle ();
4813 int
4814 main ()
4815 {
4816 setproctitle ();
4817   ;
4818   return 0;
4819 }
4820 _ACEOF
4821 rm -f conftest.$ac_objext conftest$ac_exeext
4822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4823   (eval $ac_link) 2>conftest.er1
4824   ac_status=$?
4825   grep -v '^ *+' conftest.er1 >conftest.err
4826   rm -f conftest.er1
4827   cat conftest.err >&5
4828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4829   (exit $ac_status); } &&
4830          { ac_try='test -z "$ac_c_werror_flag"
4831                          || test ! -s conftest.err'
4832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4833   (eval $ac_try) 2>&5
4834   ac_status=$?
4835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4836   (exit $ac_status); }; } &&
4837          { ac_try='test -s conftest$ac_exeext'
4838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4839   (eval $ac_try) 2>&5
4840   ac_status=$?
4841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4842   (exit $ac_status); }; }; then
4843   ac_cv_lib_util_setproctitle=yes
4844 else
4845   echo "$as_me: failed program was:" >&5
4846 sed 's/^/| /' conftest.$ac_ext >&5
4847
4848 ac_cv_lib_util_setproctitle=no
4849 fi
4850 rm -f conftest.err conftest.$ac_objext \
4851       conftest$ac_exeext conftest.$ac_ext
4852 LIBS=$ac_check_lib_save_LIBS
4853 fi
4854 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
4855 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
4856 if test $ac_cv_lib_util_setproctitle = yes; then
4857   cat >>confdefs.h <<_ACEOF
4858 #define HAVE_LIBUTIL 1
4859 _ACEOF
4860
4861   LIBS="-lutil $LIBS"
4862
4863 fi
4864
4865
4866 echo "$as_me:$LINENO: checking for main in -lm" >&5
4867 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
4868 if test "${ac_cv_lib_m_main+set}" = set; then
4869   echo $ECHO_N "(cached) $ECHO_C" >&6
4870 else
4871   ac_check_lib_save_LIBS=$LIBS
4872 LIBS="-lm  $LIBS"
4873 cat >conftest.$ac_ext <<_ACEOF
4874 /* confdefs.h.  */
4875 _ACEOF
4876 cat confdefs.h >>conftest.$ac_ext
4877 cat >>conftest.$ac_ext <<_ACEOF
4878 /* end confdefs.h.  */
4879
4880
4881 int
4882 main ()
4883 {
4884 main ();
4885   ;
4886   return 0;
4887 }
4888 _ACEOF
4889 rm -f conftest.$ac_objext conftest$ac_exeext
4890 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4891   (eval $ac_link) 2>conftest.er1
4892   ac_status=$?
4893   grep -v '^ *+' conftest.er1 >conftest.err
4894   rm -f conftest.er1
4895   cat conftest.err >&5
4896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897   (exit $ac_status); } &&
4898          { ac_try='test -z "$ac_c_werror_flag"
4899                          || test ! -s conftest.err'
4900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4901   (eval $ac_try) 2>&5
4902   ac_status=$?
4903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4904   (exit $ac_status); }; } &&
4905          { ac_try='test -s conftest$ac_exeext'
4906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4907   (eval $ac_try) 2>&5
4908   ac_status=$?
4909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910   (exit $ac_status); }; }; then
4911   ac_cv_lib_m_main=yes
4912 else
4913   echo "$as_me: failed program was:" >&5
4914 sed 's/^/| /' conftest.$ac_ext >&5
4915
4916 ac_cv_lib_m_main=no
4917 fi
4918 rm -f conftest.err conftest.$ac_objext \
4919       conftest$ac_exeext conftest.$ac_ext
4920 LIBS=$ac_check_lib_save_LIBS
4921 fi
4922 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
4923 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
4924 if test $ac_cv_lib_m_main = yes; then
4925   cat >>confdefs.h <<_ACEOF
4926 #define HAVE_LIBM 1
4927 _ACEOF
4928
4929   LIBS="-lm $LIBS"
4930
4931 fi
4932
4933
4934 echo "$as_me:$LINENO: checking for main in -ldl" >&5
4935 echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
4936 if test "${ac_cv_lib_dl_main+set}" = set; then
4937   echo $ECHO_N "(cached) $ECHO_C" >&6
4938 else
4939   ac_check_lib_save_LIBS=$LIBS
4940 LIBS="-ldl  $LIBS"
4941 cat >conftest.$ac_ext <<_ACEOF
4942 /* confdefs.h.  */
4943 _ACEOF
4944 cat confdefs.h >>conftest.$ac_ext
4945 cat >>conftest.$ac_ext <<_ACEOF
4946 /* end confdefs.h.  */
4947
4948
4949 int
4950 main ()
4951 {
4952 main ();
4953   ;
4954   return 0;
4955 }
4956 _ACEOF
4957 rm -f conftest.$ac_objext conftest$ac_exeext
4958 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4959   (eval $ac_link) 2>conftest.er1
4960   ac_status=$?
4961   grep -v '^ *+' conftest.er1 >conftest.err
4962   rm -f conftest.er1
4963   cat conftest.err >&5
4964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4965   (exit $ac_status); } &&
4966          { ac_try='test -z "$ac_c_werror_flag"
4967                          || test ! -s conftest.err'
4968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4969   (eval $ac_try) 2>&5
4970   ac_status=$?
4971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4972   (exit $ac_status); }; } &&
4973          { ac_try='test -s conftest$ac_exeext'
4974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4975   (eval $ac_try) 2>&5
4976   ac_status=$?
4977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978   (exit $ac_status); }; }; then
4979   ac_cv_lib_dl_main=yes
4980 else
4981   echo "$as_me: failed program was:" >&5
4982 sed 's/^/| /' conftest.$ac_ext >&5
4983
4984 ac_cv_lib_dl_main=no
4985 fi
4986 rm -f conftest.err conftest.$ac_objext \
4987       conftest$ac_exeext conftest.$ac_ext
4988 LIBS=$ac_check_lib_save_LIBS
4989 fi
4990 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5
4991 echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
4992 if test $ac_cv_lib_dl_main = yes; then
4993   cat >>confdefs.h <<_ACEOF
4994 #define HAVE_LIBDL 1
4995 _ACEOF
4996
4997   LIBS="-ldl $LIBS"
4998
4999 fi
5000
5001
5002 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
5003 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
5004 if test "${ac_cv_lib_nsl_main+set}" = set; then
5005   echo $ECHO_N "(cached) $ECHO_C" >&6
5006 else
5007   ac_check_lib_save_LIBS=$LIBS
5008 LIBS="-lnsl  $LIBS"
5009 cat >conftest.$ac_ext <<_ACEOF
5010 /* confdefs.h.  */
5011 _ACEOF
5012 cat confdefs.h >>conftest.$ac_ext
5013 cat >>conftest.$ac_ext <<_ACEOF
5014 /* end confdefs.h.  */
5015
5016
5017 int
5018 main ()
5019 {
5020 main ();
5021   ;
5022   return 0;
5023 }
5024 _ACEOF
5025 rm -f conftest.$ac_objext conftest$ac_exeext
5026 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5027   (eval $ac_link) 2>conftest.er1
5028   ac_status=$?
5029   grep -v '^ *+' conftest.er1 >conftest.err
5030   rm -f conftest.er1
5031   cat conftest.err >&5
5032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033   (exit $ac_status); } &&
5034          { ac_try='test -z "$ac_c_werror_flag"
5035                          || test ! -s conftest.err'
5036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5037   (eval $ac_try) 2>&5
5038   ac_status=$?
5039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040   (exit $ac_status); }; } &&
5041          { ac_try='test -s conftest$ac_exeext'
5042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5043   (eval $ac_try) 2>&5
5044   ac_status=$?
5045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046   (exit $ac_status); }; }; then
5047   ac_cv_lib_nsl_main=yes
5048 else
5049   echo "$as_me: failed program was:" >&5
5050 sed 's/^/| /' conftest.$ac_ext >&5
5051
5052 ac_cv_lib_nsl_main=no
5053 fi
5054 rm -f conftest.err conftest.$ac_objext \
5055       conftest$ac_exeext conftest.$ac_ext
5056 LIBS=$ac_check_lib_save_LIBS
5057 fi
5058 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
5059 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
5060 if test $ac_cv_lib_nsl_main = yes; then
5061   cat >>confdefs.h <<_ACEOF
5062 #define HAVE_LIBNSL 1
5063 _ACEOF
5064
5065   LIBS="-lnsl $LIBS"
5066
5067 fi
5068
5069
5070 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
5071 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
5072 if test "${ac_cv_lib_socket_main+set}" = set; then
5073   echo $ECHO_N "(cached) $ECHO_C" >&6
5074 else
5075   ac_check_lib_save_LIBS=$LIBS
5076 LIBS="-lsocket  $LIBS"
5077 cat >conftest.$ac_ext <<_ACEOF
5078 /* confdefs.h.  */
5079 _ACEOF
5080 cat confdefs.h >>conftest.$ac_ext
5081 cat >>conftest.$ac_ext <<_ACEOF
5082 /* end confdefs.h.  */
5083
5084
5085 int
5086 main ()
5087 {
5088 main ();
5089   ;
5090   return 0;
5091 }
5092 _ACEOF
5093 rm -f conftest.$ac_objext conftest$ac_exeext
5094 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5095   (eval $ac_link) 2>conftest.er1
5096   ac_status=$?
5097   grep -v '^ *+' conftest.er1 >conftest.err
5098   rm -f conftest.er1
5099   cat conftest.err >&5
5100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101   (exit $ac_status); } &&
5102          { ac_try='test -z "$ac_c_werror_flag"
5103                          || test ! -s conftest.err'
5104   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5105   (eval $ac_try) 2>&5
5106   ac_status=$?
5107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108   (exit $ac_status); }; } &&
5109          { ac_try='test -s conftest$ac_exeext'
5110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5111   (eval $ac_try) 2>&5
5112   ac_status=$?
5113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5114   (exit $ac_status); }; }; then
5115   ac_cv_lib_socket_main=yes
5116 else
5117   echo "$as_me: failed program was:" >&5
5118 sed 's/^/| /' conftest.$ac_ext >&5
5119
5120 ac_cv_lib_socket_main=no
5121 fi
5122 rm -f conftest.err conftest.$ac_objext \
5123       conftest$ac_exeext conftest.$ac_ext
5124 LIBS=$ac_check_lib_save_LIBS
5125 fi
5126 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
5127 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
5128 if test $ac_cv_lib_socket_main = yes; then
5129   cat >>confdefs.h <<_ACEOF
5130 #define HAVE_LIBSOCKET 1
5131 _ACEOF
5132
5133   LIBS="-lsocket $LIBS"
5134
5135 fi
5136
5137
5138 echo "$as_me:$LINENO: checking for main in -lipc" >&5
5139 echo $ECHO_N "checking for main in -lipc... $ECHO_C" >&6
5140 if test "${ac_cv_lib_ipc_main+set}" = set; then
5141   echo $ECHO_N "(cached) $ECHO_C" >&6
5142 else
5143   ac_check_lib_save_LIBS=$LIBS
5144 LIBS="-lipc  $LIBS"
5145 cat >conftest.$ac_ext <<_ACEOF
5146 /* confdefs.h.  */
5147 _ACEOF
5148 cat confdefs.h >>conftest.$ac_ext
5149 cat >>conftest.$ac_ext <<_ACEOF
5150 /* end confdefs.h.  */
5151
5152
5153 int
5154 main ()
5155 {
5156 main ();
5157   ;
5158   return 0;
5159 }
5160 _ACEOF
5161 rm -f conftest.$ac_objext conftest$ac_exeext
5162 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5163   (eval $ac_link) 2>conftest.er1
5164   ac_status=$?
5165   grep -v '^ *+' conftest.er1 >conftest.err
5166   rm -f conftest.er1
5167   cat conftest.err >&5
5168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5169   (exit $ac_status); } &&
5170          { ac_try='test -z "$ac_c_werror_flag"
5171                          || test ! -s conftest.err'
5172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5173   (eval $ac_try) 2>&5
5174   ac_status=$?
5175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5176   (exit $ac_status); }; } &&
5177          { ac_try='test -s conftest$ac_exeext'
5178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5179   (eval $ac_try) 2>&5
5180   ac_status=$?
5181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182   (exit $ac_status); }; }; then
5183   ac_cv_lib_ipc_main=yes
5184 else
5185   echo "$as_me: failed program was:" >&5
5186 sed 's/^/| /' conftest.$ac_ext >&5
5187
5188 ac_cv_lib_ipc_main=no
5189 fi
5190 rm -f conftest.err conftest.$ac_objext \
5191       conftest$ac_exeext conftest.$ac_ext
5192 LIBS=$ac_check_lib_save_LIBS
5193 fi
5194 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_main" >&5
5195 echo "${ECHO_T}$ac_cv_lib_ipc_main" >&6
5196 if test $ac_cv_lib_ipc_main = yes; then
5197   cat >>confdefs.h <<_ACEOF
5198 #define HAVE_LIBIPC 1
5199 _ACEOF
5200
5201   LIBS="-lipc $LIBS"
5202
5203 fi
5204
5205
5206 echo "$as_me:$LINENO: checking for main in -lIPC" >&5
5207 echo $ECHO_N "checking for main in -lIPC... $ECHO_C" >&6
5208 if test "${ac_cv_lib_IPC_main+set}" = set; then
5209   echo $ECHO_N "(cached) $ECHO_C" >&6
5210 else
5211   ac_check_lib_save_LIBS=$LIBS
5212 LIBS="-lIPC  $LIBS"
5213 cat >conftest.$ac_ext <<_ACEOF
5214 /* confdefs.h.  */
5215 _ACEOF
5216 cat confdefs.h >>conftest.$ac_ext
5217 cat >>conftest.$ac_ext <<_ACEOF
5218 /* end confdefs.h.  */
5219
5220
5221 int
5222 main ()
5223 {
5224 main ();
5225   ;
5226   return 0;
5227 }
5228 _ACEOF
5229 rm -f conftest.$ac_objext conftest$ac_exeext
5230 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5231   (eval $ac_link) 2>conftest.er1
5232   ac_status=$?
5233   grep -v '^ *+' conftest.er1 >conftest.err
5234   rm -f conftest.er1
5235   cat conftest.err >&5
5236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5237   (exit $ac_status); } &&
5238          { ac_try='test -z "$ac_c_werror_flag"
5239                          || test ! -s conftest.err'
5240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5241   (eval $ac_try) 2>&5
5242   ac_status=$?
5243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244   (exit $ac_status); }; } &&
5245          { ac_try='test -s conftest$ac_exeext'
5246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5247   (eval $ac_try) 2>&5
5248   ac_status=$?
5249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250   (exit $ac_status); }; }; then
5251   ac_cv_lib_IPC_main=yes
5252 else
5253   echo "$as_me: failed program was:" >&5
5254 sed 's/^/| /' conftest.$ac_ext >&5
5255
5256 ac_cv_lib_IPC_main=no
5257 fi
5258 rm -f conftest.err conftest.$ac_objext \
5259       conftest$ac_exeext conftest.$ac_ext
5260 LIBS=$ac_check_lib_save_LIBS
5261 fi
5262 echo "$as_me:$LINENO: result: $ac_cv_lib_IPC_main" >&5
5263 echo "${ECHO_T}$ac_cv_lib_IPC_main" >&6
5264 if test $ac_cv_lib_IPC_main = yes; then
5265   cat >>confdefs.h <<_ACEOF
5266 #define HAVE_LIBIPC 1
5267 _ACEOF
5268
5269   LIBS="-lIPC $LIBS"
5270
5271 fi
5272
5273
5274 echo "$as_me:$LINENO: checking for main in -llc" >&5
5275 echo $ECHO_N "checking for main in -llc... $ECHO_C" >&6
5276 if test "${ac_cv_lib_lc_main+set}" = set; then
5277   echo $ECHO_N "(cached) $ECHO_C" >&6
5278 else
5279   ac_check_lib_save_LIBS=$LIBS
5280 LIBS="-llc  $LIBS"
5281 cat >conftest.$ac_ext <<_ACEOF
5282 /* confdefs.h.  */
5283 _ACEOF
5284 cat confdefs.h >>conftest.$ac_ext
5285 cat >>conftest.$ac_ext <<_ACEOF
5286 /* end confdefs.h.  */
5287
5288
5289 int
5290 main ()
5291 {
5292 main ();
5293   ;
5294   return 0;
5295 }
5296 _ACEOF
5297 rm -f conftest.$ac_objext conftest$ac_exeext
5298 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5299   (eval $ac_link) 2>conftest.er1
5300   ac_status=$?
5301   grep -v '^ *+' conftest.er1 >conftest.err
5302   rm -f conftest.er1
5303   cat conftest.err >&5
5304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5305   (exit $ac_status); } &&
5306          { ac_try='test -z "$ac_c_werror_flag"
5307                          || test ! -s conftest.err'
5308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5309   (eval $ac_try) 2>&5
5310   ac_status=$?
5311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312   (exit $ac_status); }; } &&
5313          { ac_try='test -s conftest$ac_exeext'
5314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5315   (eval $ac_try) 2>&5
5316   ac_status=$?
5317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318   (exit $ac_status); }; }; then
5319   ac_cv_lib_lc_main=yes
5320 else
5321   echo "$as_me: failed program was:" >&5
5322 sed 's/^/| /' conftest.$ac_ext >&5
5323
5324 ac_cv_lib_lc_main=no
5325 fi
5326 rm -f conftest.err conftest.$ac_objext \
5327       conftest$ac_exeext conftest.$ac_ext
5328 LIBS=$ac_check_lib_save_LIBS
5329 fi
5330 echo "$as_me:$LINENO: result: $ac_cv_lib_lc_main" >&5
5331 echo "${ECHO_T}$ac_cv_lib_lc_main" >&6
5332 if test $ac_cv_lib_lc_main = yes; then
5333   cat >>confdefs.h <<_ACEOF
5334 #define HAVE_LIBLC 1
5335 _ACEOF
5336
5337   LIBS="-llc $LIBS"
5338
5339 fi
5340
5341
5342 echo "$as_me:$LINENO: checking for main in -ldld" >&5
5343 echo $ECHO_N "checking for main in -ldld... $ECHO_C" >&6
5344 if test "${ac_cv_lib_dld_main+set}" = set; then
5345   echo $ECHO_N "(cached) $ECHO_C" >&6
5346 else
5347   ac_check_lib_save_LIBS=$LIBS
5348 LIBS="-ldld  $LIBS"
5349 cat >conftest.$ac_ext <<_ACEOF
5350 /* confdefs.h.  */
5351 _ACEOF
5352 cat confdefs.h >>conftest.$ac_ext
5353 cat >>conftest.$ac_ext <<_ACEOF
5354 /* end confdefs.h.  */
5355
5356
5357 int
5358 main ()
5359 {
5360 main ();
5361   ;
5362   return 0;
5363 }
5364 _ACEOF
5365 rm -f conftest.$ac_objext conftest$ac_exeext
5366 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5367   (eval $ac_link) 2>conftest.er1
5368   ac_status=$?
5369   grep -v '^ *+' conftest.er1 >conftest.err
5370   rm -f conftest.er1
5371   cat conftest.err >&5
5372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5373   (exit $ac_status); } &&
5374          { ac_try='test -z "$ac_c_werror_flag"
5375                          || test ! -s conftest.err'
5376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5377   (eval $ac_try) 2>&5
5378   ac_status=$?
5379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5380   (exit $ac_status); }; } &&
5381          { ac_try='test -s conftest$ac_exeext'
5382   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5383   (eval $ac_try) 2>&5
5384   ac_status=$?
5385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5386   (exit $ac_status); }; }; then
5387   ac_cv_lib_dld_main=yes
5388 else
5389   echo "$as_me: failed program was:" >&5
5390 sed 's/^/| /' conftest.$ac_ext >&5
5391
5392 ac_cv_lib_dld_main=no
5393 fi
5394 rm -f conftest.err conftest.$ac_objext \
5395       conftest$ac_exeext conftest.$ac_ext
5396 LIBS=$ac_check_lib_save_LIBS
5397 fi
5398 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_main" >&5
5399 echo "${ECHO_T}$ac_cv_lib_dld_main" >&6
5400 if test $ac_cv_lib_dld_main = yes; then
5401   cat >>confdefs.h <<_ACEOF
5402 #define HAVE_LIBDLD 1
5403 _ACEOF
5404
5405   LIBS="-ldld $LIBS"
5406
5407 fi
5408
5409
5410 echo "$as_me:$LINENO: checking for main in -lld" >&5
5411 echo $ECHO_N "checking for main in -lld... $ECHO_C" >&6
5412 if test "${ac_cv_lib_ld_main+set}" = set; then
5413   echo $ECHO_N "(cached) $ECHO_C" >&6
5414 else
5415   ac_check_lib_save_LIBS=$LIBS
5416 LIBS="-lld  $LIBS"
5417 cat >conftest.$ac_ext <<_ACEOF
5418 /* confdefs.h.  */
5419 _ACEOF
5420 cat confdefs.h >>conftest.$ac_ext
5421 cat >>conftest.$ac_ext <<_ACEOF
5422 /* end confdefs.h.  */
5423
5424
5425 int
5426 main ()
5427 {
5428 main ();
5429   ;
5430   return 0;
5431 }
5432 _ACEOF
5433 rm -f conftest.$ac_objext conftest$ac_exeext
5434 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5435   (eval $ac_link) 2>conftest.er1
5436   ac_status=$?
5437   grep -v '^ *+' conftest.er1 >conftest.err
5438   rm -f conftest.er1
5439   cat conftest.err >&5
5440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5441   (exit $ac_status); } &&
5442          { ac_try='test -z "$ac_c_werror_flag"
5443                          || test ! -s conftest.err'
5444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5445   (eval $ac_try) 2>&5
5446   ac_status=$?
5447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5448   (exit $ac_status); }; } &&
5449          { ac_try='test -s conftest$ac_exeext'
5450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5451   (eval $ac_try) 2>&5
5452   ac_status=$?
5453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454   (exit $ac_status); }; }; then
5455   ac_cv_lib_ld_main=yes
5456 else
5457   echo "$as_me: failed program was:" >&5
5458 sed 's/^/| /' conftest.$ac_ext >&5
5459
5460 ac_cv_lib_ld_main=no
5461 fi
5462 rm -f conftest.err conftest.$ac_objext \
5463       conftest$ac_exeext conftest.$ac_ext
5464 LIBS=$ac_check_lib_save_LIBS
5465 fi
5466 echo "$as_me:$LINENO: result: $ac_cv_lib_ld_main" >&5
5467 echo "${ECHO_T}$ac_cv_lib_ld_main" >&6
5468 if test $ac_cv_lib_ld_main = yes; then
5469   cat >>confdefs.h <<_ACEOF
5470 #define HAVE_LIBLD 1
5471 _ACEOF
5472
5473   LIBS="-lld $LIBS"
5474
5475 fi
5476
5477
5478 echo "$as_me:$LINENO: checking for main in -lcompat" >&5
5479 echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
5480 if test "${ac_cv_lib_compat_main+set}" = set; then
5481   echo $ECHO_N "(cached) $ECHO_C" >&6
5482 else
5483   ac_check_lib_save_LIBS=$LIBS
5484 LIBS="-lcompat  $LIBS"
5485 cat >conftest.$ac_ext <<_ACEOF
5486 /* confdefs.h.  */
5487 _ACEOF
5488 cat confdefs.h >>conftest.$ac_ext
5489 cat >>conftest.$ac_ext <<_ACEOF
5490 /* end confdefs.h.  */
5491
5492
5493 int
5494 main ()
5495 {
5496 main ();
5497   ;
5498   return 0;
5499 }
5500 _ACEOF
5501 rm -f conftest.$ac_objext conftest$ac_exeext
5502 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5503   (eval $ac_link) 2>conftest.er1
5504   ac_status=$?
5505   grep -v '^ *+' conftest.er1 >conftest.err
5506   rm -f conftest.er1
5507   cat conftest.err >&5
5508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509   (exit $ac_status); } &&
5510          { ac_try='test -z "$ac_c_werror_flag"
5511                          || test ! -s conftest.err'
5512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5513   (eval $ac_try) 2>&5
5514   ac_status=$?
5515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5516   (exit $ac_status); }; } &&
5517          { ac_try='test -s conftest$ac_exeext'
5518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5519   (eval $ac_try) 2>&5
5520   ac_status=$?
5521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5522   (exit $ac_status); }; }; then
5523   ac_cv_lib_compat_main=yes
5524 else
5525   echo "$as_me: failed program was:" >&5
5526 sed 's/^/| /' conftest.$ac_ext >&5
5527
5528 ac_cv_lib_compat_main=no
5529 fi
5530 rm -f conftest.err conftest.$ac_objext \
5531       conftest$ac_exeext conftest.$ac_ext
5532 LIBS=$ac_check_lib_save_LIBS
5533 fi
5534 echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
5535 echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
5536 if test $ac_cv_lib_compat_main = yes; then
5537   cat >>confdefs.h <<_ACEOF
5538 #define HAVE_LIBCOMPAT 1
5539 _ACEOF
5540
5541   LIBS="-lcompat $LIBS"
5542
5543 fi
5544
5545
5546 echo "$as_me:$LINENO: checking for main in -lBSD" >&5
5547 echo $ECHO_N "checking for main in -lBSD... $ECHO_C" >&6
5548 if test "${ac_cv_lib_BSD_main+set}" = set; then
5549   echo $ECHO_N "(cached) $ECHO_C" >&6
5550 else
5551   ac_check_lib_save_LIBS=$LIBS
5552 LIBS="-lBSD  $LIBS"
5553 cat >conftest.$ac_ext <<_ACEOF
5554 /* confdefs.h.  */
5555 _ACEOF
5556 cat confdefs.h >>conftest.$ac_ext
5557 cat >>conftest.$ac_ext <<_ACEOF
5558 /* end confdefs.h.  */
5559
5560
5561 int
5562 main ()
5563 {
5564 main ();
5565   ;
5566   return 0;
5567 }
5568 _ACEOF
5569 rm -f conftest.$ac_objext conftest$ac_exeext
5570 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5571   (eval $ac_link) 2>conftest.er1
5572   ac_status=$?
5573   grep -v '^ *+' conftest.er1 >conftest.err
5574   rm -f conftest.er1
5575   cat conftest.err >&5
5576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5577   (exit $ac_status); } &&
5578          { ac_try='test -z "$ac_c_werror_flag"
5579                          || test ! -s conftest.err'
5580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5581   (eval $ac_try) 2>&5
5582   ac_status=$?
5583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584   (exit $ac_status); }; } &&
5585          { ac_try='test -s conftest$ac_exeext'
5586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5587   (eval $ac_try) 2>&5
5588   ac_status=$?
5589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5590   (exit $ac_status); }; }; then
5591   ac_cv_lib_BSD_main=yes
5592 else
5593   echo "$as_me: failed program was:" >&5
5594 sed 's/^/| /' conftest.$ac_ext >&5
5595
5596 ac_cv_lib_BSD_main=no
5597 fi
5598 rm -f conftest.err conftest.$ac_objext \
5599       conftest$ac_exeext conftest.$ac_ext
5600 LIBS=$ac_check_lib_save_LIBS
5601 fi
5602 echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_main" >&5
5603 echo "${ECHO_T}$ac_cv_lib_BSD_main" >&6
5604 if test $ac_cv_lib_BSD_main = yes; then
5605   cat >>confdefs.h <<_ACEOF
5606 #define HAVE_LIBBSD 1
5607 _ACEOF
5608
5609   LIBS="-lBSD $LIBS"
5610
5611 fi
5612
5613
5614 echo "$as_me:$LINENO: checking for main in -lgen" >&5
5615 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
5616 if test "${ac_cv_lib_gen_main+set}" = set; then
5617   echo $ECHO_N "(cached) $ECHO_C" >&6
5618 else
5619   ac_check_lib_save_LIBS=$LIBS
5620 LIBS="-lgen  $LIBS"
5621 cat >conftest.$ac_ext <<_ACEOF
5622 /* confdefs.h.  */
5623 _ACEOF
5624 cat confdefs.h >>conftest.$ac_ext
5625 cat >>conftest.$ac_ext <<_ACEOF
5626 /* end confdefs.h.  */
5627
5628
5629 int
5630 main ()
5631 {
5632 main ();
5633   ;
5634   return 0;
5635 }
5636 _ACEOF
5637 rm -f conftest.$ac_objext conftest$ac_exeext
5638 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5639   (eval $ac_link) 2>conftest.er1
5640   ac_status=$?
5641   grep -v '^ *+' conftest.er1 >conftest.err
5642   rm -f conftest.er1
5643   cat conftest.err >&5
5644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5645   (exit $ac_status); } &&
5646          { ac_try='test -z "$ac_c_werror_flag"
5647                          || test ! -s conftest.err'
5648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5649   (eval $ac_try) 2>&5
5650   ac_status=$?
5651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5652   (exit $ac_status); }; } &&
5653          { ac_try='test -s conftest$ac_exeext'
5654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5655   (eval $ac_try) 2>&5
5656   ac_status=$?
5657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5658   (exit $ac_status); }; }; then
5659   ac_cv_lib_gen_main=yes
5660 else
5661   echo "$as_me: failed program was:" >&5
5662 sed 's/^/| /' conftest.$ac_ext >&5
5663
5664 ac_cv_lib_gen_main=no
5665 fi
5666 rm -f conftest.err conftest.$ac_objext \
5667       conftest$ac_exeext conftest.$ac_ext
5668 LIBS=$ac_check_lib_save_LIBS
5669 fi
5670 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
5671 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
5672 if test $ac_cv_lib_gen_main = yes; then
5673   cat >>confdefs.h <<_ACEOF
5674 #define HAVE_LIBGEN 1
5675 _ACEOF
5676
5677   LIBS="-lgen $LIBS"
5678
5679 fi
5680
5681
5682 echo "$as_me:$LINENO: checking for main in -lPW" >&5
5683 echo $ECHO_N "checking for main in -lPW... $ECHO_C" >&6
5684 if test "${ac_cv_lib_PW_main+set}" = set; then
5685   echo $ECHO_N "(cached) $ECHO_C" >&6
5686 else
5687   ac_check_lib_save_LIBS=$LIBS
5688 LIBS="-lPW  $LIBS"
5689 cat >conftest.$ac_ext <<_ACEOF
5690 /* confdefs.h.  */
5691 _ACEOF
5692 cat confdefs.h >>conftest.$ac_ext
5693 cat >>conftest.$ac_ext <<_ACEOF
5694 /* end confdefs.h.  */
5695
5696
5697 int
5698 main ()
5699 {
5700 main ();
5701   ;
5702   return 0;
5703 }
5704 _ACEOF
5705 rm -f conftest.$ac_objext conftest$ac_exeext
5706 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5707   (eval $ac_link) 2>conftest.er1
5708   ac_status=$?
5709   grep -v '^ *+' conftest.er1 >conftest.err
5710   rm -f conftest.er1
5711   cat conftest.err >&5
5712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5713   (exit $ac_status); } &&
5714          { ac_try='test -z "$ac_c_werror_flag"
5715                          || test ! -s conftest.err'
5716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5717   (eval $ac_try) 2>&5
5718   ac_status=$?
5719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5720   (exit $ac_status); }; } &&
5721          { ac_try='test -s conftest$ac_exeext'
5722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5723   (eval $ac_try) 2>&5
5724   ac_status=$?
5725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5726   (exit $ac_status); }; }; then
5727   ac_cv_lib_PW_main=yes
5728 else
5729   echo "$as_me: failed program was:" >&5
5730 sed 's/^/| /' conftest.$ac_ext >&5
5731
5732 ac_cv_lib_PW_main=no
5733 fi
5734 rm -f conftest.err conftest.$ac_objext \
5735       conftest$ac_exeext conftest.$ac_ext
5736 LIBS=$ac_check_lib_save_LIBS
5737 fi
5738 echo "$as_me:$LINENO: result: $ac_cv_lib_PW_main" >&5
5739 echo "${ECHO_T}$ac_cv_lib_PW_main" >&6
5740 if test $ac_cv_lib_PW_main = yes; then
5741   cat >>confdefs.h <<_ACEOF
5742 #define HAVE_LIBPW 1
5743 _ACEOF
5744
5745   LIBS="-lPW $LIBS"
5746
5747 fi
5748
5749
5750 echo "$as_me:$LINENO: checking for main in -lresolv" >&5
5751 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
5752 if test "${ac_cv_lib_resolv_main+set}" = set; then
5753   echo $ECHO_N "(cached) $ECHO_C" >&6
5754 else
5755   ac_check_lib_save_LIBS=$LIBS
5756 LIBS="-lresolv  $LIBS"
5757 cat >conftest.$ac_ext <<_ACEOF
5758 /* confdefs.h.  */
5759 _ACEOF
5760 cat confdefs.h >>conftest.$ac_ext
5761 cat >>conftest.$ac_ext <<_ACEOF
5762 /* end confdefs.h.  */
5763
5764
5765 int
5766 main ()
5767 {
5768 main ();
5769   ;
5770   return 0;
5771 }
5772 _ACEOF
5773 rm -f conftest.$ac_objext conftest$ac_exeext
5774 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5775   (eval $ac_link) 2>conftest.er1
5776   ac_status=$?
5777   grep -v '^ *+' conftest.er1 >conftest.err
5778   rm -f conftest.er1
5779   cat conftest.err >&5
5780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781   (exit $ac_status); } &&
5782          { ac_try='test -z "$ac_c_werror_flag"
5783                          || test ! -s conftest.err'
5784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5785   (eval $ac_try) 2>&5
5786   ac_status=$?
5787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788   (exit $ac_status); }; } &&
5789          { ac_try='test -s conftest$ac_exeext'
5790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5791   (eval $ac_try) 2>&5
5792   ac_status=$?
5793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5794   (exit $ac_status); }; }; then
5795   ac_cv_lib_resolv_main=yes
5796 else
5797   echo "$as_me: failed program was:" >&5
5798 sed 's/^/| /' conftest.$ac_ext >&5
5799
5800 ac_cv_lib_resolv_main=no
5801 fi
5802 rm -f conftest.err conftest.$ac_objext \
5803       conftest$ac_exeext conftest.$ac_ext
5804 LIBS=$ac_check_lib_save_LIBS
5805 fi
5806 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
5807 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
5808 if test $ac_cv_lib_resolv_main = yes; then
5809   cat >>confdefs.h <<_ACEOF
5810 #define HAVE_LIBRESOLV 1
5811 _ACEOF
5812
5813   LIBS="-lresolv $LIBS"
5814
5815 fi
5816
5817 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5818 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5819 if test "${ac_cv_search_getopt_long+set}" = set; then
5820   echo $ECHO_N "(cached) $ECHO_C" >&6
5821 else
5822   ac_func_search_save_LIBS=$LIBS
5823 ac_cv_search_getopt_long=no
5824 cat >conftest.$ac_ext <<_ACEOF
5825 /* confdefs.h.  */
5826 _ACEOF
5827 cat confdefs.h >>conftest.$ac_ext
5828 cat >>conftest.$ac_ext <<_ACEOF
5829 /* end confdefs.h.  */
5830
5831 /* Override any gcc2 internal prototype to avoid an error.  */
5832 #ifdef __cplusplus
5833 extern "C"
5834 #endif
5835 /* We use char because int might match the return type of a gcc2
5836    builtin and then its argument prototype would still apply.  */
5837 char getopt_long ();
5838 int
5839 main ()
5840 {
5841 getopt_long ();
5842   ;
5843   return 0;
5844 }
5845 _ACEOF
5846 rm -f conftest.$ac_objext conftest$ac_exeext
5847 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5848   (eval $ac_link) 2>conftest.er1
5849   ac_status=$?
5850   grep -v '^ *+' conftest.er1 >conftest.err
5851   rm -f conftest.er1
5852   cat conftest.err >&5
5853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5854   (exit $ac_status); } &&
5855          { ac_try='test -z "$ac_c_werror_flag"
5856                          || test ! -s conftest.err'
5857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5858   (eval $ac_try) 2>&5
5859   ac_status=$?
5860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861   (exit $ac_status); }; } &&
5862          { ac_try='test -s conftest$ac_exeext'
5863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5864   (eval $ac_try) 2>&5
5865   ac_status=$?
5866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867   (exit $ac_status); }; }; then
5868   ac_cv_search_getopt_long="none required"
5869 else
5870   echo "$as_me: failed program was:" >&5
5871 sed 's/^/| /' conftest.$ac_ext >&5
5872
5873 fi
5874 rm -f conftest.err conftest.$ac_objext \
5875       conftest$ac_exeext conftest.$ac_ext
5876 if test "$ac_cv_search_getopt_long" = no; then
5877   for ac_lib in getopt gnugetopt; do
5878     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5879     cat >conftest.$ac_ext <<_ACEOF
5880 /* confdefs.h.  */
5881 _ACEOF
5882 cat confdefs.h >>conftest.$ac_ext
5883 cat >>conftest.$ac_ext <<_ACEOF
5884 /* end confdefs.h.  */
5885
5886 /* Override any gcc2 internal prototype to avoid an error.  */
5887 #ifdef __cplusplus
5888 extern "C"
5889 #endif
5890 /* We use char because int might match the return type of a gcc2
5891    builtin and then its argument prototype would still apply.  */
5892 char getopt_long ();
5893 int
5894 main ()
5895 {
5896 getopt_long ();
5897   ;
5898   return 0;
5899 }
5900 _ACEOF
5901 rm -f conftest.$ac_objext conftest$ac_exeext
5902 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5903   (eval $ac_link) 2>conftest.er1
5904   ac_status=$?
5905   grep -v '^ *+' conftest.er1 >conftest.err
5906   rm -f conftest.er1
5907   cat conftest.err >&5
5908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909   (exit $ac_status); } &&
5910          { ac_try='test -z "$ac_c_werror_flag"
5911                          || test ! -s conftest.err'
5912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5913   (eval $ac_try) 2>&5
5914   ac_status=$?
5915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5916   (exit $ac_status); }; } &&
5917          { ac_try='test -s conftest$ac_exeext'
5918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5919   (eval $ac_try) 2>&5
5920   ac_status=$?
5921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5922   (exit $ac_status); }; }; then
5923   ac_cv_search_getopt_long="-l$ac_lib"
5924 break
5925 else
5926   echo "$as_me: failed program was:" >&5
5927 sed 's/^/| /' conftest.$ac_ext >&5
5928
5929 fi
5930 rm -f conftest.err conftest.$ac_objext \
5931       conftest$ac_exeext conftest.$ac_ext
5932   done
5933 fi
5934 LIBS=$ac_func_search_save_LIBS
5935 fi
5936 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5937 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5938 if test "$ac_cv_search_getopt_long" != no; then
5939   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5940
5941 fi
5942
5943 # QNX:
5944
5945 echo "$as_me:$LINENO: checking for main in -lunix" >&5
5946 echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
5947 if test "${ac_cv_lib_unix_main+set}" = set; then
5948   echo $ECHO_N "(cached) $ECHO_C" >&6
5949 else
5950   ac_check_lib_save_LIBS=$LIBS
5951 LIBS="-lunix  $LIBS"
5952 cat >conftest.$ac_ext <<_ACEOF
5953 /* confdefs.h.  */
5954 _ACEOF
5955 cat confdefs.h >>conftest.$ac_ext
5956 cat >>conftest.$ac_ext <<_ACEOF
5957 /* end confdefs.h.  */
5958
5959
5960 int
5961 main ()
5962 {
5963 main ();
5964   ;
5965   return 0;
5966 }
5967 _ACEOF
5968 rm -f conftest.$ac_objext conftest$ac_exeext
5969 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5970   (eval $ac_link) 2>conftest.er1
5971   ac_status=$?
5972   grep -v '^ *+' conftest.er1 >conftest.err
5973   rm -f conftest.er1
5974   cat conftest.err >&5
5975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5976   (exit $ac_status); } &&
5977          { ac_try='test -z "$ac_c_werror_flag"
5978                          || test ! -s conftest.err'
5979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5980   (eval $ac_try) 2>&5
5981   ac_status=$?
5982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983   (exit $ac_status); }; } &&
5984          { ac_try='test -s conftest$ac_exeext'
5985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5986   (eval $ac_try) 2>&5
5987   ac_status=$?
5988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5989   (exit $ac_status); }; }; then
5990   ac_cv_lib_unix_main=yes
5991 else
5992   echo "$as_me: failed program was:" >&5
5993 sed 's/^/| /' conftest.$ac_ext >&5
5994
5995 ac_cv_lib_unix_main=no
5996 fi
5997 rm -f conftest.err conftest.$ac_objext \
5998       conftest$ac_exeext conftest.$ac_ext
5999 LIBS=$ac_check_lib_save_LIBS
6000 fi
6001 echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
6002 echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
6003 if test $ac_cv_lib_unix_main = yes; then
6004   cat >>confdefs.h <<_ACEOF
6005 #define HAVE_LIBUNIX 1
6006 _ACEOF
6007
6008   LIBS="-lunix $LIBS"
6009
6010 fi
6011
6012 echo "$as_me:$LINENO: checking for library containing crypt" >&5
6013 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
6014 if test "${ac_cv_search_crypt+set}" = set; then
6015   echo $ECHO_N "(cached) $ECHO_C" >&6
6016 else
6017   ac_func_search_save_LIBS=$LIBS
6018 ac_cv_search_crypt=no
6019 cat >conftest.$ac_ext <<_ACEOF
6020 /* confdefs.h.  */
6021 _ACEOF
6022 cat confdefs.h >>conftest.$ac_ext
6023 cat >>conftest.$ac_ext <<_ACEOF
6024 /* end confdefs.h.  */
6025
6026 /* Override any gcc2 internal prototype to avoid an error.  */
6027 #ifdef __cplusplus
6028 extern "C"
6029 #endif
6030 /* We use char because int might match the return type of a gcc2
6031    builtin and then its argument prototype would still apply.  */
6032 char crypt ();
6033 int
6034 main ()
6035 {
6036 crypt ();
6037   ;
6038   return 0;
6039 }
6040 _ACEOF
6041 rm -f conftest.$ac_objext conftest$ac_exeext
6042 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6043   (eval $ac_link) 2>conftest.er1
6044   ac_status=$?
6045   grep -v '^ *+' conftest.er1 >conftest.err
6046   rm -f conftest.er1
6047   cat conftest.err >&5
6048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6049   (exit $ac_status); } &&
6050          { ac_try='test -z "$ac_c_werror_flag"
6051                          || test ! -s conftest.err'
6052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6053   (eval $ac_try) 2>&5
6054   ac_status=$?
6055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6056   (exit $ac_status); }; } &&
6057          { ac_try='test -s conftest$ac_exeext'
6058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6059   (eval $ac_try) 2>&5
6060   ac_status=$?
6061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6062   (exit $ac_status); }; }; then
6063   ac_cv_search_crypt="none required"
6064 else
6065   echo "$as_me: failed program was:" >&5
6066 sed 's/^/| /' conftest.$ac_ext >&5
6067
6068 fi
6069 rm -f conftest.err conftest.$ac_objext \
6070       conftest$ac_exeext conftest.$ac_ext
6071 if test "$ac_cv_search_crypt" = no; then
6072   for ac_lib in crypt; do
6073     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6074     cat >conftest.$ac_ext <<_ACEOF
6075 /* confdefs.h.  */
6076 _ACEOF
6077 cat confdefs.h >>conftest.$ac_ext
6078 cat >>conftest.$ac_ext <<_ACEOF
6079 /* end confdefs.h.  */
6080
6081 /* Override any gcc2 internal prototype to avoid an error.  */
6082 #ifdef __cplusplus
6083 extern "C"
6084 #endif
6085 /* We use char because int might match the return type of a gcc2
6086    builtin and then its argument prototype would still apply.  */
6087 char crypt ();
6088 int
6089 main ()
6090 {
6091 crypt ();
6092   ;
6093   return 0;
6094 }
6095 _ACEOF
6096 rm -f conftest.$ac_objext conftest$ac_exeext
6097 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6098   (eval $ac_link) 2>conftest.er1
6099   ac_status=$?
6100   grep -v '^ *+' conftest.er1 >conftest.err
6101   rm -f conftest.er1
6102   cat conftest.err >&5
6103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6104   (exit $ac_status); } &&
6105          { ac_try='test -z "$ac_c_werror_flag"
6106                          || test ! -s conftest.err'
6107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6108   (eval $ac_try) 2>&5
6109   ac_status=$?
6110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6111   (exit $ac_status); }; } &&
6112          { ac_try='test -s conftest$ac_exeext'
6113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6114   (eval $ac_try) 2>&5
6115   ac_status=$?
6116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6117   (exit $ac_status); }; }; then
6118   ac_cv_search_crypt="-l$ac_lib"
6119 break
6120 else
6121   echo "$as_me: failed program was:" >&5
6122 sed 's/^/| /' conftest.$ac_ext >&5
6123
6124 fi
6125 rm -f conftest.err conftest.$ac_objext \
6126       conftest$ac_exeext conftest.$ac_ext
6127   done
6128 fi
6129 LIBS=$ac_func_search_save_LIBS
6130 fi
6131 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6132 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6133 if test "$ac_cv_search_crypt" != no; then
6134   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6135
6136 fi
6137
6138 # BeOS:
6139 if test "$PORTNAME" = "beos"
6140 then
6141
6142 echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
6143 echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
6144 if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
6145   echo $ECHO_N "(cached) $ECHO_C" >&6
6146 else
6147   ac_check_lib_save_LIBS=$LIBS
6148 LIBS="-lbind  $LIBS"
6149 cat >conftest.$ac_ext <<_ACEOF
6150 /* confdefs.h.  */
6151 _ACEOF
6152 cat confdefs.h >>conftest.$ac_ext
6153 cat >>conftest.$ac_ext <<_ACEOF
6154 /* end confdefs.h.  */
6155
6156 /* Override any gcc2 internal prototype to avoid an error.  */
6157 #ifdef __cplusplus
6158 extern "C"
6159 #endif
6160 /* We use char because int might match the return type of a gcc2
6161    builtin and then its argument prototype would still apply.  */
6162 char __inet_ntoa ();
6163 int
6164 main ()
6165 {
6166 __inet_ntoa ();
6167   ;
6168   return 0;
6169 }
6170 _ACEOF
6171 rm -f conftest.$ac_objext conftest$ac_exeext
6172 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6173   (eval $ac_link) 2>conftest.er1
6174   ac_status=$?
6175   grep -v '^ *+' conftest.er1 >conftest.err
6176   rm -f conftest.er1
6177   cat conftest.err >&5
6178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6179   (exit $ac_status); } &&
6180          { ac_try='test -z "$ac_c_werror_flag"
6181                          || test ! -s conftest.err'
6182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6183   (eval $ac_try) 2>&5
6184   ac_status=$?
6185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186   (exit $ac_status); }; } &&
6187          { ac_try='test -s conftest$ac_exeext'
6188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6189   (eval $ac_try) 2>&5
6190   ac_status=$?
6191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6192   (exit $ac_status); }; }; then
6193   ac_cv_lib_bind___inet_ntoa=yes
6194 else
6195   echo "$as_me: failed program was:" >&5
6196 sed 's/^/| /' conftest.$ac_ext >&5
6197
6198 ac_cv_lib_bind___inet_ntoa=no
6199 fi
6200 rm -f conftest.err conftest.$ac_objext \
6201       conftest$ac_exeext conftest.$ac_ext
6202 LIBS=$ac_check_lib_save_LIBS
6203 fi
6204 echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
6205 echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
6206 if test $ac_cv_lib_bind___inet_ntoa = yes; then
6207   cat >>confdefs.h <<_ACEOF
6208 #define HAVE_LIBBIND 1
6209 _ACEOF
6210
6211   LIBS="-lbind $LIBS"
6212
6213 fi
6214
6215 fi
6216 # Solaris:
6217 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6218 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6219 if test "${ac_cv_search_fdatasync+set}" = set; then
6220   echo $ECHO_N "(cached) $ECHO_C" >&6
6221 else
6222   ac_func_search_save_LIBS=$LIBS
6223 ac_cv_search_fdatasync=no
6224 cat >conftest.$ac_ext <<_ACEOF
6225 /* confdefs.h.  */
6226 _ACEOF
6227 cat confdefs.h >>conftest.$ac_ext
6228 cat >>conftest.$ac_ext <<_ACEOF
6229 /* end confdefs.h.  */
6230
6231 /* Override any gcc2 internal prototype to avoid an error.  */
6232 #ifdef __cplusplus
6233 extern "C"
6234 #endif
6235 /* We use char because int might match the return type of a gcc2
6236    builtin and then its argument prototype would still apply.  */
6237 char fdatasync ();
6238 int
6239 main ()
6240 {
6241 fdatasync ();
6242   ;
6243   return 0;
6244 }
6245 _ACEOF
6246 rm -f conftest.$ac_objext conftest$ac_exeext
6247 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6248   (eval $ac_link) 2>conftest.er1
6249   ac_status=$?
6250   grep -v '^ *+' conftest.er1 >conftest.err
6251   rm -f conftest.er1
6252   cat conftest.err >&5
6253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6254   (exit $ac_status); } &&
6255          { ac_try='test -z "$ac_c_werror_flag"
6256                          || test ! -s conftest.err'
6257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6258   (eval $ac_try) 2>&5
6259   ac_status=$?
6260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261   (exit $ac_status); }; } &&
6262          { ac_try='test -s conftest$ac_exeext'
6263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6264   (eval $ac_try) 2>&5
6265   ac_status=$?
6266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267   (exit $ac_status); }; }; then
6268   ac_cv_search_fdatasync="none required"
6269 else
6270   echo "$as_me: failed program was:" >&5
6271 sed 's/^/| /' conftest.$ac_ext >&5
6272
6273 fi
6274 rm -f conftest.err conftest.$ac_objext \
6275       conftest$ac_exeext conftest.$ac_ext
6276 if test "$ac_cv_search_fdatasync" = no; then
6277   for ac_lib in rt posix4; do
6278     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6279     cat >conftest.$ac_ext <<_ACEOF
6280 /* confdefs.h.  */
6281 _ACEOF
6282 cat confdefs.h >>conftest.$ac_ext
6283 cat >>conftest.$ac_ext <<_ACEOF
6284 /* end confdefs.h.  */
6285
6286 /* Override any gcc2 internal prototype to avoid an error.  */
6287 #ifdef __cplusplus
6288 extern "C"
6289 #endif
6290 /* We use char because int might match the return type of a gcc2
6291    builtin and then its argument prototype would still apply.  */
6292 char fdatasync ();
6293 int
6294 main ()
6295 {
6296 fdatasync ();
6297   ;
6298   return 0;
6299 }
6300 _ACEOF
6301 rm -f conftest.$ac_objext conftest$ac_exeext
6302 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6303   (eval $ac_link) 2>conftest.er1
6304   ac_status=$?
6305   grep -v '^ *+' conftest.er1 >conftest.err
6306   rm -f conftest.er1
6307   cat conftest.err >&5
6308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6309   (exit $ac_status); } &&
6310          { ac_try='test -z "$ac_c_werror_flag"
6311                          || test ! -s conftest.err'
6312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6313   (eval $ac_try) 2>&5
6314   ac_status=$?
6315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6316   (exit $ac_status); }; } &&
6317          { ac_try='test -s conftest$ac_exeext'
6318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6319   (eval $ac_try) 2>&5
6320   ac_status=$?
6321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6322   (exit $ac_status); }; }; then
6323   ac_cv_search_fdatasync="-l$ac_lib"
6324 break
6325 else
6326   echo "$as_me: failed program was:" >&5
6327 sed 's/^/| /' conftest.$ac_ext >&5
6328
6329 fi
6330 rm -f conftest.err conftest.$ac_objext \
6331       conftest$ac_exeext conftest.$ac_ext
6332   done
6333 fi
6334 LIBS=$ac_func_search_save_LIBS
6335 fi
6336 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6337 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6338 if test "$ac_cv_search_fdatasync" != no; then
6339   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6340
6341 fi
6342
6343 # Cygwin:
6344
6345 echo "$as_me:$LINENO: checking for shmget in -lcygipc" >&5
6346 echo $ECHO_N "checking for shmget in -lcygipc... $ECHO_C" >&6
6347 if test "${ac_cv_lib_cygipc_shmget+set}" = set; then
6348   echo $ECHO_N "(cached) $ECHO_C" >&6
6349 else
6350   ac_check_lib_save_LIBS=$LIBS
6351 LIBS="-lcygipc  $LIBS"
6352 cat >conftest.$ac_ext <<_ACEOF
6353 /* confdefs.h.  */
6354 _ACEOF
6355 cat confdefs.h >>conftest.$ac_ext
6356 cat >>conftest.$ac_ext <<_ACEOF
6357 /* end confdefs.h.  */
6358
6359 /* Override any gcc2 internal prototype to avoid an error.  */
6360 #ifdef __cplusplus
6361 extern "C"
6362 #endif
6363 /* We use char because int might match the return type of a gcc2
6364    builtin and then its argument prototype would still apply.  */
6365 char shmget ();
6366 int
6367 main ()
6368 {
6369 shmget ();
6370   ;
6371   return 0;
6372 }
6373 _ACEOF
6374 rm -f conftest.$ac_objext conftest$ac_exeext
6375 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6376   (eval $ac_link) 2>conftest.er1
6377   ac_status=$?
6378   grep -v '^ *+' conftest.er1 >conftest.err
6379   rm -f conftest.er1
6380   cat conftest.err >&5
6381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6382   (exit $ac_status); } &&
6383          { ac_try='test -z "$ac_c_werror_flag"
6384                          || test ! -s conftest.err'
6385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6386   (eval $ac_try) 2>&5
6387   ac_status=$?
6388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6389   (exit $ac_status); }; } &&
6390          { ac_try='test -s conftest$ac_exeext'
6391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6392   (eval $ac_try) 2>&5
6393   ac_status=$?
6394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6395   (exit $ac_status); }; }; then
6396   ac_cv_lib_cygipc_shmget=yes
6397 else
6398   echo "$as_me: failed program was:" >&5
6399 sed 's/^/| /' conftest.$ac_ext >&5
6400
6401 ac_cv_lib_cygipc_shmget=no
6402 fi
6403 rm -f conftest.err conftest.$ac_objext \
6404       conftest$ac_exeext conftest.$ac_ext
6405 LIBS=$ac_check_lib_save_LIBS
6406 fi
6407 echo "$as_me:$LINENO: result: $ac_cv_lib_cygipc_shmget" >&5
6408 echo "${ECHO_T}$ac_cv_lib_cygipc_shmget" >&6
6409 if test $ac_cv_lib_cygipc_shmget = yes; then
6410   cat >>confdefs.h <<_ACEOF
6411 #define HAVE_LIBCYGIPC 1
6412 _ACEOF
6413
6414   LIBS="-lcygipc $LIBS"
6415
6416 fi
6417
6418 # WIN32:
6419 if test "$PORTNAME" = "win32"
6420 then
6421
6422 echo "$as_me:$LINENO: checking for main in -lwsock32" >&5
6423 echo $ECHO_N "checking for main in -lwsock32... $ECHO_C" >&6
6424 if test "${ac_cv_lib_wsock32_main+set}" = set; then
6425   echo $ECHO_N "(cached) $ECHO_C" >&6
6426 else
6427   ac_check_lib_save_LIBS=$LIBS
6428 LIBS="-lwsock32  $LIBS"
6429 cat >conftest.$ac_ext <<_ACEOF
6430 /* confdefs.h.  */
6431 _ACEOF
6432 cat confdefs.h >>conftest.$ac_ext
6433 cat >>conftest.$ac_ext <<_ACEOF
6434 /* end confdefs.h.  */
6435
6436
6437 int
6438 main ()
6439 {
6440 main ();
6441   ;
6442   return 0;
6443 }
6444 _ACEOF
6445 rm -f conftest.$ac_objext conftest$ac_exeext
6446 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6447   (eval $ac_link) 2>conftest.er1
6448   ac_status=$?
6449   grep -v '^ *+' conftest.er1 >conftest.err
6450   rm -f conftest.er1
6451   cat conftest.err >&5
6452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6453   (exit $ac_status); } &&
6454          { ac_try='test -z "$ac_c_werror_flag"
6455                          || test ! -s conftest.err'
6456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6457   (eval $ac_try) 2>&5
6458   ac_status=$?
6459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6460   (exit $ac_status); }; } &&
6461          { ac_try='test -s conftest$ac_exeext'
6462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6463   (eval $ac_try) 2>&5
6464   ac_status=$?
6465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6466   (exit $ac_status); }; }; then
6467   ac_cv_lib_wsock32_main=yes
6468 else
6469   echo "$as_me: failed program was:" >&5
6470 sed 's/^/| /' conftest.$ac_ext >&5
6471
6472 ac_cv_lib_wsock32_main=no
6473 fi
6474 rm -f conftest.err conftest.$ac_objext \
6475       conftest$ac_exeext conftest.$ac_ext
6476 LIBS=$ac_check_lib_save_LIBS
6477 fi
6478 echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_main" >&5
6479 echo "${ECHO_T}$ac_cv_lib_wsock32_main" >&6
6480 if test $ac_cv_lib_wsock32_main = yes; then
6481   cat >>confdefs.h <<_ACEOF
6482 #define HAVE_LIBWSOCK32 1
6483 _ACEOF
6484
6485   LIBS="-lwsock32 $LIBS"
6486
6487 fi
6488
6489 fi
6490
6491 if test "$with_readline" = yes; then
6492
6493 echo "$as_me:$LINENO: checking for readline" >&5
6494 echo $ECHO_N "checking for readline... $ECHO_C" >&6
6495
6496 if test "${pgac_cv_check_readline+set}" = set; then
6497   echo $ECHO_N "(cached) $ECHO_C" >&6
6498 else
6499   pgac_cv_check_readline=no
6500 pgac_save_LIBS=$LIBS
6501 for pgac_rllib in -lreadline -ledit ; do
6502   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6503     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6504     cat >conftest.$ac_ext <<_ACEOF
6505 /* confdefs.h.  */
6506 _ACEOF
6507 cat confdefs.h >>conftest.$ac_ext
6508 cat >>conftest.$ac_ext <<_ACEOF
6509 /* end confdefs.h.  */
6510
6511 /* Override any gcc2 internal prototype to avoid an error.  */
6512 #ifdef __cplusplus
6513 extern "C"
6514 #endif
6515 /* We use char because int might match the return type of a gcc2
6516    builtin and then its argument prototype would still apply.  */
6517 char readline ();
6518 int
6519 main ()
6520 {
6521 readline ();
6522   ;
6523   return 0;
6524 }
6525 _ACEOF
6526 rm -f conftest.$ac_objext conftest$ac_exeext
6527 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6528   (eval $ac_link) 2>conftest.er1
6529   ac_status=$?
6530   grep -v '^ *+' conftest.er1 >conftest.err
6531   rm -f conftest.er1
6532   cat conftest.err >&5
6533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534   (exit $ac_status); } &&
6535          { ac_try='test -z "$ac_c_werror_flag"
6536                          || test ! -s conftest.err'
6537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6538   (eval $ac_try) 2>&5
6539   ac_status=$?
6540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541   (exit $ac_status); }; } &&
6542          { ac_try='test -s conftest$ac_exeext'
6543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6544   (eval $ac_try) 2>&5
6545   ac_status=$?
6546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6547   (exit $ac_status); }; }; then
6548
6549       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6550       # recognize dependent libraries; assume curses is needed if we didn't
6551       # find any dependency.
6552       case $host_os in
6553         netbsd* | openbsd* | irix*)
6554           if test x"$pgac_lib" = x"" ; then
6555             pgac_lib=" -lcurses"
6556           fi ;;
6557       esac
6558
6559       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6560       break 2
6561
6562 else
6563   echo "$as_me: failed program was:" >&5
6564 sed 's/^/| /' conftest.$ac_ext >&5
6565
6566 fi
6567 rm -f conftest.err conftest.$ac_objext \
6568       conftest$ac_exeext conftest.$ac_ext
6569   done
6570 done
6571 LIBS=$pgac_save_LIBS
6572
6573 fi
6574
6575 if test "$pgac_cv_check_readline" != no ; then
6576
6577 cat >>confdefs.h <<\_ACEOF
6578 #define HAVE_LIBREADLINE 1
6579 _ACEOF
6580
6581   LIBS="$pgac_cv_check_readline $LIBS"
6582   echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6583 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6584 else
6585   echo "$as_me:$LINENO: result: no" >&5
6586 echo "${ECHO_T}no" >&6
6587 fi
6588   if test x"$pgac_cv_check_readline" = x"no"; then
6589     { { echo "$as_me:$LINENO: error: readline library not found
6590 If you have readline already installed, see config.log for details on the
6591 failure.  It is possible the compiler isn't looking in the proper directory.
6592 Use --without-readline to disable readline support." >&5
6593 echo "$as_me: error: readline library not found
6594 If you have readline already installed, see config.log for details on the
6595 failure.  It is possible the compiler isn't looking in the proper directory.
6596 Use --without-readline to disable readline support." >&2;}
6597    { (exit 1); exit 1; }; }
6598   fi
6599 fi
6600
6601 if test "$with_zlib" = yes; then
6602
6603 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6604 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6605 if test "${ac_cv_lib_z_inflate+set}" = set; then
6606   echo $ECHO_N "(cached) $ECHO_C" >&6
6607 else
6608   ac_check_lib_save_LIBS=$LIBS
6609 LIBS="-lz  $LIBS"
6610 cat >conftest.$ac_ext <<_ACEOF
6611 /* confdefs.h.  */
6612 _ACEOF
6613 cat confdefs.h >>conftest.$ac_ext
6614 cat >>conftest.$ac_ext <<_ACEOF
6615 /* end confdefs.h.  */
6616
6617 /* Override any gcc2 internal prototype to avoid an error.  */
6618 #ifdef __cplusplus
6619 extern "C"
6620 #endif
6621 /* We use char because int might match the return type of a gcc2
6622    builtin and then its argument prototype would still apply.  */
6623 char inflate ();
6624 int
6625 main ()
6626 {
6627 inflate ();
6628   ;
6629   return 0;
6630 }
6631 _ACEOF
6632 rm -f conftest.$ac_objext conftest$ac_exeext
6633 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6634   (eval $ac_link) 2>conftest.er1
6635   ac_status=$?
6636   grep -v '^ *+' conftest.er1 >conftest.err
6637   rm -f conftest.er1
6638   cat conftest.err >&5
6639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6640   (exit $ac_status); } &&
6641          { ac_try='test -z "$ac_c_werror_flag"
6642                          || test ! -s conftest.err'
6643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6644   (eval $ac_try) 2>&5
6645   ac_status=$?
6646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647   (exit $ac_status); }; } &&
6648          { ac_try='test -s conftest$ac_exeext'
6649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6650   (eval $ac_try) 2>&5
6651   ac_status=$?
6652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6653   (exit $ac_status); }; }; then
6654   ac_cv_lib_z_inflate=yes
6655 else
6656   echo "$as_me: failed program was:" >&5
6657 sed 's/^/| /' conftest.$ac_ext >&5
6658
6659 ac_cv_lib_z_inflate=no
6660 fi
6661 rm -f conftest.err conftest.$ac_objext \
6662       conftest$ac_exeext conftest.$ac_ext
6663 LIBS=$ac_check_lib_save_LIBS
6664 fi
6665 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6666 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6667 if test $ac_cv_lib_z_inflate = yes; then
6668   cat >>confdefs.h <<_ACEOF
6669 #define HAVE_LIBZ 1
6670 _ACEOF
6671
6672   LIBS="-lz $LIBS"
6673
6674 else
6675   { { echo "$as_me:$LINENO: error: zlib library not found
6676 If you have zlib already installed, see config.log for details on the
6677 failure.  It is possible the compiler isn't looking in the proper directory.
6678 Use --without-zlib to disable zlib support." >&5
6679 echo "$as_me: error: zlib library not found
6680 If you have zlib already installed, see config.log for details on the
6681 failure.  It is possible the compiler isn't looking in the proper directory.
6682 Use --without-zlib to disable zlib support." >&2;}
6683    { (exit 1); exit 1; }; }
6684 fi
6685
6686 fi
6687
6688 if test "$enable_spinlocks" = yes; then
6689
6690 cat >>confdefs.h <<\_ACEOF
6691 #define HAVE_SPINLOCKS 1
6692 _ACEOF
6693
6694 else
6695   { echo "$as_me:$LINENO: WARNING:
6696 *** Not using spinlocks will cause poor performance." >&5
6697 echo "$as_me: WARNING:
6698 *** Not using spinlocks will cause poor performance." >&2;}
6699 fi
6700
6701 if test "$with_krb5" = yes ; then
6702   if test "$PORTNAME" != "win32"; then
6703      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6704 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6705 if test "${ac_cv_search_com_err+set}" = set; then
6706   echo $ECHO_N "(cached) $ECHO_C" >&6
6707 else
6708   ac_func_search_save_LIBS=$LIBS
6709 ac_cv_search_com_err=no
6710 cat >conftest.$ac_ext <<_ACEOF
6711 /* confdefs.h.  */
6712 _ACEOF
6713 cat confdefs.h >>conftest.$ac_ext
6714 cat >>conftest.$ac_ext <<_ACEOF
6715 /* end confdefs.h.  */
6716
6717 /* Override any gcc2 internal prototype to avoid an error.  */
6718 #ifdef __cplusplus
6719 extern "C"
6720 #endif
6721 /* We use char because int might match the return type of a gcc2
6722    builtin and then its argument prototype would still apply.  */
6723 char com_err ();
6724 int
6725 main ()
6726 {
6727 com_err ();
6728   ;
6729   return 0;
6730 }
6731 _ACEOF
6732 rm -f conftest.$ac_objext conftest$ac_exeext
6733 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6734   (eval $ac_link) 2>conftest.er1
6735   ac_status=$?
6736   grep -v '^ *+' conftest.er1 >conftest.err
6737   rm -f conftest.er1
6738   cat conftest.err >&5
6739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6740   (exit $ac_status); } &&
6741          { ac_try='test -z "$ac_c_werror_flag"
6742                          || test ! -s conftest.err'
6743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6744   (eval $ac_try) 2>&5
6745   ac_status=$?
6746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6747   (exit $ac_status); }; } &&
6748          { ac_try='test -s conftest$ac_exeext'
6749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6750   (eval $ac_try) 2>&5
6751   ac_status=$?
6752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6753   (exit $ac_status); }; }; then
6754   ac_cv_search_com_err="none required"
6755 else
6756   echo "$as_me: failed program was:" >&5
6757 sed 's/^/| /' conftest.$ac_ext >&5
6758
6759 fi
6760 rm -f conftest.err conftest.$ac_objext \
6761       conftest$ac_exeext conftest.$ac_ext
6762 if test "$ac_cv_search_com_err" = no; then
6763   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6764     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6765     cat >conftest.$ac_ext <<_ACEOF
6766 /* confdefs.h.  */
6767 _ACEOF
6768 cat confdefs.h >>conftest.$ac_ext
6769 cat >>conftest.$ac_ext <<_ACEOF
6770 /* end confdefs.h.  */
6771
6772 /* Override any gcc2 internal prototype to avoid an error.  */
6773 #ifdef __cplusplus
6774 extern "C"
6775 #endif
6776 /* We use char because int might match the return type of a gcc2
6777    builtin and then its argument prototype would still apply.  */
6778 char com_err ();
6779 int
6780 main ()
6781 {
6782 com_err ();
6783   ;
6784   return 0;
6785 }
6786 _ACEOF
6787 rm -f conftest.$ac_objext conftest$ac_exeext
6788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6789   (eval $ac_link) 2>conftest.er1
6790   ac_status=$?
6791   grep -v '^ *+' conftest.er1 >conftest.err
6792   rm -f conftest.er1
6793   cat conftest.err >&5
6794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6795   (exit $ac_status); } &&
6796          { ac_try='test -z "$ac_c_werror_flag"
6797                          || test ! -s conftest.err'
6798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6799   (eval $ac_try) 2>&5
6800   ac_status=$?
6801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6802   (exit $ac_status); }; } &&
6803          { ac_try='test -s conftest$ac_exeext'
6804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6805   (eval $ac_try) 2>&5
6806   ac_status=$?
6807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6808   (exit $ac_status); }; }; then
6809   ac_cv_search_com_err="-l$ac_lib"
6810 break
6811 else
6812   echo "$as_me: failed program was:" >&5
6813 sed 's/^/| /' conftest.$ac_ext >&5
6814
6815 fi
6816 rm -f conftest.err conftest.$ac_objext \
6817       conftest$ac_exeext conftest.$ac_ext
6818   done
6819 fi
6820 LIBS=$ac_func_search_save_LIBS
6821 fi
6822 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6823 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6824 if test "$ac_cv_search_com_err" != no; then
6825   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6826
6827 else
6828   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6829 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6830    { (exit 1); exit 1; }; }
6831 fi
6832
6833      echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
6834 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
6835 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
6836   echo $ECHO_N "(cached) $ECHO_C" >&6
6837 else
6838   ac_func_search_save_LIBS=$LIBS
6839 ac_cv_search_krb5_encrypt=no
6840 cat >conftest.$ac_ext <<_ACEOF
6841 /* confdefs.h.  */
6842 _ACEOF
6843 cat confdefs.h >>conftest.$ac_ext
6844 cat >>conftest.$ac_ext <<_ACEOF
6845 /* end confdefs.h.  */
6846
6847 /* Override any gcc2 internal prototype to avoid an error.  */
6848 #ifdef __cplusplus
6849 extern "C"
6850 #endif
6851 /* We use char because int might match the return type of a gcc2
6852    builtin and then its argument prototype would still apply.  */
6853 char krb5_encrypt ();
6854 int
6855 main ()
6856 {
6857 krb5_encrypt ();
6858   ;
6859   return 0;
6860 }
6861 _ACEOF
6862 rm -f conftest.$ac_objext conftest$ac_exeext
6863 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6864   (eval $ac_link) 2>conftest.er1
6865   ac_status=$?
6866   grep -v '^ *+' conftest.er1 >conftest.err
6867   rm -f conftest.er1
6868   cat conftest.err >&5
6869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6870   (exit $ac_status); } &&
6871          { ac_try='test -z "$ac_c_werror_flag"
6872                          || test ! -s conftest.err'
6873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6874   (eval $ac_try) 2>&5
6875   ac_status=$?
6876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6877   (exit $ac_status); }; } &&
6878          { ac_try='test -s conftest$ac_exeext'
6879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6880   (eval $ac_try) 2>&5
6881   ac_status=$?
6882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6883   (exit $ac_status); }; }; then
6884   ac_cv_search_krb5_encrypt="none required"
6885 else
6886   echo "$as_me: failed program was:" >&5
6887 sed 's/^/| /' conftest.$ac_ext >&5
6888
6889 fi
6890 rm -f conftest.err conftest.$ac_objext \
6891       conftest$ac_exeext conftest.$ac_ext
6892 if test "$ac_cv_search_krb5_encrypt" = no; then
6893   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
6894     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6895     cat >conftest.$ac_ext <<_ACEOF
6896 /* confdefs.h.  */
6897 _ACEOF
6898 cat confdefs.h >>conftest.$ac_ext
6899 cat >>conftest.$ac_ext <<_ACEOF
6900 /* end confdefs.h.  */
6901
6902 /* Override any gcc2 internal prototype to avoid an error.  */
6903 #ifdef __cplusplus
6904 extern "C"
6905 #endif
6906 /* We use char because int might match the return type of a gcc2
6907    builtin and then its argument prototype would still apply.  */
6908 char krb5_encrypt ();
6909 int
6910 main ()
6911 {
6912 krb5_encrypt ();
6913   ;
6914   return 0;
6915 }
6916 _ACEOF
6917 rm -f conftest.$ac_objext conftest$ac_exeext
6918 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6919   (eval $ac_link) 2>conftest.er1
6920   ac_status=$?
6921   grep -v '^ *+' conftest.er1 >conftest.err
6922   rm -f conftest.er1
6923   cat conftest.err >&5
6924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925   (exit $ac_status); } &&
6926          { ac_try='test -z "$ac_c_werror_flag"
6927                          || test ! -s conftest.err'
6928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6929   (eval $ac_try) 2>&5
6930   ac_status=$?
6931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6932   (exit $ac_status); }; } &&
6933          { ac_try='test -s conftest$ac_exeext'
6934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6935   (eval $ac_try) 2>&5
6936   ac_status=$?
6937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6938   (exit $ac_status); }; }; then
6939   ac_cv_search_krb5_encrypt="-l$ac_lib"
6940 break
6941 else
6942   echo "$as_me: failed program was:" >&5
6943 sed 's/^/| /' conftest.$ac_ext >&5
6944
6945 fi
6946 rm -f conftest.err conftest.$ac_objext \
6947       conftest$ac_exeext conftest.$ac_ext
6948   done
6949 fi
6950 LIBS=$ac_func_search_save_LIBS
6951 fi
6952 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
6953 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
6954 if test "$ac_cv_search_krb5_encrypt" != no; then
6955   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
6956
6957 else
6958   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
6959 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
6960    { (exit 1); exit 1; }; }
6961 fi
6962
6963      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6964 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6965 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6966   echo $ECHO_N "(cached) $ECHO_C" >&6
6967 else
6968   ac_func_search_save_LIBS=$LIBS
6969 ac_cv_search_krb5_sendauth=no
6970 cat >conftest.$ac_ext <<_ACEOF
6971 /* confdefs.h.  */
6972 _ACEOF
6973 cat confdefs.h >>conftest.$ac_ext
6974 cat >>conftest.$ac_ext <<_ACEOF
6975 /* end confdefs.h.  */
6976
6977 /* Override any gcc2 internal prototype to avoid an error.  */
6978 #ifdef __cplusplus
6979 extern "C"
6980 #endif
6981 /* We use char because int might match the return type of a gcc2
6982    builtin and then its argument prototype would still apply.  */
6983 char krb5_sendauth ();
6984 int
6985 main ()
6986 {
6987 krb5_sendauth ();
6988   ;
6989   return 0;
6990 }
6991 _ACEOF
6992 rm -f conftest.$ac_objext conftest$ac_exeext
6993 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6994   (eval $ac_link) 2>conftest.er1
6995   ac_status=$?
6996   grep -v '^ *+' conftest.er1 >conftest.err
6997   rm -f conftest.er1
6998   cat conftest.err >&5
6999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7000   (exit $ac_status); } &&
7001          { ac_try='test -z "$ac_c_werror_flag"
7002                          || test ! -s conftest.err'
7003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7004   (eval $ac_try) 2>&5
7005   ac_status=$?
7006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7007   (exit $ac_status); }; } &&
7008          { ac_try='test -s conftest$ac_exeext'
7009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7010   (eval $ac_try) 2>&5
7011   ac_status=$?
7012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7013   (exit $ac_status); }; }; then
7014   ac_cv_search_krb5_sendauth="none required"
7015 else
7016   echo "$as_me: failed program was:" >&5
7017 sed 's/^/| /' conftest.$ac_ext >&5
7018
7019 fi
7020 rm -f conftest.err conftest.$ac_objext \
7021       conftest$ac_exeext conftest.$ac_ext
7022 if test "$ac_cv_search_krb5_sendauth" = no; then
7023   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
7024     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7025     cat >conftest.$ac_ext <<_ACEOF
7026 /* confdefs.h.  */
7027 _ACEOF
7028 cat confdefs.h >>conftest.$ac_ext
7029 cat >>conftest.$ac_ext <<_ACEOF
7030 /* end confdefs.h.  */
7031
7032 /* Override any gcc2 internal prototype to avoid an error.  */
7033 #ifdef __cplusplus
7034 extern "C"
7035 #endif
7036 /* We use char because int might match the return type of a gcc2
7037    builtin and then its argument prototype would still apply.  */
7038 char krb5_sendauth ();
7039 int
7040 main ()
7041 {
7042 krb5_sendauth ();
7043   ;
7044   return 0;
7045 }
7046 _ACEOF
7047 rm -f conftest.$ac_objext conftest$ac_exeext
7048 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7049   (eval $ac_link) 2>conftest.er1
7050   ac_status=$?
7051   grep -v '^ *+' conftest.er1 >conftest.err
7052   rm -f conftest.er1
7053   cat conftest.err >&5
7054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7055   (exit $ac_status); } &&
7056          { ac_try='test -z "$ac_c_werror_flag"
7057                          || test ! -s conftest.err'
7058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7059   (eval $ac_try) 2>&5
7060   ac_status=$?
7061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062   (exit $ac_status); }; } &&
7063          { ac_try='test -s conftest$ac_exeext'
7064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7065   (eval $ac_try) 2>&5
7066   ac_status=$?
7067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7068   (exit $ac_status); }; }; then
7069   ac_cv_search_krb5_sendauth="-l$ac_lib"
7070 break
7071 else
7072   echo "$as_me: failed program was:" >&5
7073 sed 's/^/| /' conftest.$ac_ext >&5
7074
7075 fi
7076 rm -f conftest.err conftest.$ac_objext \
7077       conftest$ac_exeext conftest.$ac_ext
7078   done
7079 fi
7080 LIBS=$ac_func_search_save_LIBS
7081 fi
7082 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7083 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
7084 if test "$ac_cv_search_krb5_sendauth" != no; then
7085   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
7086
7087 else
7088   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7089 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7090    { (exit 1); exit 1; }; }
7091 fi
7092
7093   else
7094      echo "$as_me:$LINENO: checking for library containing com_err" >&5
7095 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
7096 if test "${ac_cv_search_com_err+set}" = set; then
7097   echo $ECHO_N "(cached) $ECHO_C" >&6
7098 else
7099   ac_func_search_save_LIBS=$LIBS
7100 ac_cv_search_com_err=no
7101 cat >conftest.$ac_ext <<_ACEOF
7102 /* confdefs.h.  */
7103 _ACEOF
7104 cat confdefs.h >>conftest.$ac_ext
7105 cat >>conftest.$ac_ext <<_ACEOF
7106 /* end confdefs.h.  */
7107
7108 /* Override any gcc2 internal prototype to avoid an error.  */
7109 #ifdef __cplusplus
7110 extern "C"
7111 #endif
7112 /* We use char because int might match the return type of a gcc2
7113    builtin and then its argument prototype would still apply.  */
7114 char com_err ();
7115 int
7116 main ()
7117 {
7118 com_err ();
7119   ;
7120   return 0;
7121 }
7122 _ACEOF
7123 rm -f conftest.$ac_objext conftest$ac_exeext
7124 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7125   (eval $ac_link) 2>conftest.er1
7126   ac_status=$?
7127   grep -v '^ *+' conftest.er1 >conftest.err
7128   rm -f conftest.er1
7129   cat conftest.err >&5
7130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7131   (exit $ac_status); } &&
7132          { ac_try='test -z "$ac_c_werror_flag"
7133                          || test ! -s conftest.err'
7134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7135   (eval $ac_try) 2>&5
7136   ac_status=$?
7137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7138   (exit $ac_status); }; } &&
7139          { ac_try='test -s conftest$ac_exeext'
7140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7141   (eval $ac_try) 2>&5
7142   ac_status=$?
7143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7144   (exit $ac_status); }; }; then
7145   ac_cv_search_com_err="none required"
7146 else
7147   echo "$as_me: failed program was:" >&5
7148 sed 's/^/| /' conftest.$ac_ext >&5
7149
7150 fi
7151 rm -f conftest.err conftest.$ac_objext \
7152       conftest$ac_exeext conftest.$ac_ext
7153 if test "$ac_cv_search_com_err" = no; then
7154   for ac_lib in 'comerr32 -lkrb5_32'; do
7155     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7156     cat >conftest.$ac_ext <<_ACEOF
7157 /* confdefs.h.  */
7158 _ACEOF
7159 cat confdefs.h >>conftest.$ac_ext
7160 cat >>conftest.$ac_ext <<_ACEOF
7161 /* end confdefs.h.  */
7162
7163 /* Override any gcc2 internal prototype to avoid an error.  */
7164 #ifdef __cplusplus
7165 extern "C"
7166 #endif
7167 /* We use char because int might match the return type of a gcc2
7168    builtin and then its argument prototype would still apply.  */
7169 char com_err ();
7170 int
7171 main ()
7172 {
7173 com_err ();
7174   ;
7175   return 0;
7176 }
7177 _ACEOF
7178 rm -f conftest.$ac_objext conftest$ac_exeext
7179 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7180   (eval $ac_link) 2>conftest.er1
7181   ac_status=$?
7182   grep -v '^ *+' conftest.er1 >conftest.err
7183   rm -f conftest.er1
7184   cat conftest.err >&5
7185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7186   (exit $ac_status); } &&
7187          { ac_try='test -z "$ac_c_werror_flag"
7188                          || test ! -s conftest.err'
7189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7190   (eval $ac_try) 2>&5
7191   ac_status=$?
7192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7193   (exit $ac_status); }; } &&
7194          { ac_try='test -s conftest$ac_exeext'
7195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7196   (eval $ac_try) 2>&5
7197   ac_status=$?
7198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7199   (exit $ac_status); }; }; then
7200   ac_cv_search_com_err="-l$ac_lib"
7201 break
7202 else
7203   echo "$as_me: failed program was:" >&5
7204 sed 's/^/| /' conftest.$ac_ext >&5
7205
7206 fi
7207 rm -f conftest.err conftest.$ac_objext \
7208       conftest$ac_exeext conftest.$ac_ext
7209   done
7210 fi
7211 LIBS=$ac_func_search_save_LIBS
7212 fi
7213 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7214 echo "${ECHO_T}$ac_cv_search_com_err" >&6
7215 if test "$ac_cv_search_com_err" != no; then
7216   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
7217
7218 else
7219   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7220 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7221    { (exit 1); exit 1; }; }
7222 fi
7223
7224   fi
7225 fi
7226
7227 if test "$with_openssl" = yes ; then
7228     if test "$PORTNAME" != "win32"; then
7229
7230 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7231 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
7232 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7233   echo $ECHO_N "(cached) $ECHO_C" >&6
7234 else
7235   ac_check_lib_save_LIBS=$LIBS
7236 LIBS="-lcrypto  $LIBS"
7237 cat >conftest.$ac_ext <<_ACEOF
7238 /* confdefs.h.  */
7239 _ACEOF
7240 cat confdefs.h >>conftest.$ac_ext
7241 cat >>conftest.$ac_ext <<_ACEOF
7242 /* end confdefs.h.  */
7243
7244 /* Override any gcc2 internal prototype to avoid an error.  */
7245 #ifdef __cplusplus
7246 extern "C"
7247 #endif
7248 /* We use char because int might match the return type of a gcc2
7249    builtin and then its argument prototype would still apply.  */
7250 char CRYPTO_new_ex_data ();
7251 int
7252 main ()
7253 {
7254 CRYPTO_new_ex_data ();
7255   ;
7256   return 0;
7257 }
7258 _ACEOF
7259 rm -f conftest.$ac_objext conftest$ac_exeext
7260 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7261   (eval $ac_link) 2>conftest.er1
7262   ac_status=$?
7263   grep -v '^ *+' conftest.er1 >conftest.err
7264   rm -f conftest.er1
7265   cat conftest.err >&5
7266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267   (exit $ac_status); } &&
7268          { ac_try='test -z "$ac_c_werror_flag"
7269                          || test ! -s conftest.err'
7270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7271   (eval $ac_try) 2>&5
7272   ac_status=$?
7273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274   (exit $ac_status); }; } &&
7275          { ac_try='test -s conftest$ac_exeext'
7276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7277   (eval $ac_try) 2>&5
7278   ac_status=$?
7279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7280   (exit $ac_status); }; }; then
7281   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7282 else
7283   echo "$as_me: failed program was:" >&5
7284 sed 's/^/| /' conftest.$ac_ext >&5
7285
7286 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7287 fi
7288 rm -f conftest.err conftest.$ac_objext \
7289       conftest$ac_exeext conftest.$ac_ext
7290 LIBS=$ac_check_lib_save_LIBS
7291 fi
7292 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7293 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
7294 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7295   cat >>confdefs.h <<_ACEOF
7296 #define HAVE_LIBCRYPTO 1
7297 _ACEOF
7298
7299   LIBS="-lcrypto $LIBS"
7300
7301 else
7302   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7303 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7304    { (exit 1); exit 1; }; }
7305 fi
7306
7307
7308 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7309 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7310 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7311   echo $ECHO_N "(cached) $ECHO_C" >&6
7312 else
7313   ac_check_lib_save_LIBS=$LIBS
7314 LIBS="-lssl  $LIBS"
7315 cat >conftest.$ac_ext <<_ACEOF
7316 /* confdefs.h.  */
7317 _ACEOF
7318 cat confdefs.h >>conftest.$ac_ext
7319 cat >>conftest.$ac_ext <<_ACEOF
7320 /* end confdefs.h.  */
7321
7322 /* Override any gcc2 internal prototype to avoid an error.  */
7323 #ifdef __cplusplus
7324 extern "C"
7325 #endif
7326 /* We use char because int might match the return type of a gcc2
7327    builtin and then its argument prototype would still apply.  */
7328 char SSL_library_init ();
7329 int
7330 main ()
7331 {
7332 SSL_library_init ();
7333   ;
7334   return 0;
7335 }
7336 _ACEOF
7337 rm -f conftest.$ac_objext conftest$ac_exeext
7338 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7339   (eval $ac_link) 2>conftest.er1
7340   ac_status=$?
7341   grep -v '^ *+' conftest.er1 >conftest.err
7342   rm -f conftest.er1
7343   cat conftest.err >&5
7344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345   (exit $ac_status); } &&
7346          { ac_try='test -z "$ac_c_werror_flag"
7347                          || test ! -s conftest.err'
7348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7349   (eval $ac_try) 2>&5
7350   ac_status=$?
7351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352   (exit $ac_status); }; } &&
7353          { ac_try='test -s conftest$ac_exeext'
7354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7355   (eval $ac_try) 2>&5
7356   ac_status=$?
7357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7358   (exit $ac_status); }; }; then
7359   ac_cv_lib_ssl_SSL_library_init=yes
7360 else
7361   echo "$as_me: failed program was:" >&5
7362 sed 's/^/| /' conftest.$ac_ext >&5
7363
7364 ac_cv_lib_ssl_SSL_library_init=no
7365 fi
7366 rm -f conftest.err conftest.$ac_objext \
7367       conftest$ac_exeext conftest.$ac_ext
7368 LIBS=$ac_check_lib_save_LIBS
7369 fi
7370 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7371 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7372 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7373   cat >>confdefs.h <<_ACEOF
7374 #define HAVE_LIBSSL 1
7375 _ACEOF
7376
7377   LIBS="-lssl $LIBS"
7378
7379 else
7380   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7381 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7382    { (exit 1); exit 1; }; }
7383 fi
7384
7385   else
7386
7387 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7388 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7389 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7390   echo $ECHO_N "(cached) $ECHO_C" >&6
7391 else
7392   ac_check_lib_save_LIBS=$LIBS
7393 LIBS="-leay32  $LIBS"
7394 cat >conftest.$ac_ext <<_ACEOF
7395 /* confdefs.h.  */
7396 _ACEOF
7397 cat confdefs.h >>conftest.$ac_ext
7398 cat >>conftest.$ac_ext <<_ACEOF
7399 /* end confdefs.h.  */
7400
7401 /* Override any gcc2 internal prototype to avoid an error.  */
7402 #ifdef __cplusplus
7403 extern "C"
7404 #endif
7405 /* We use char because int might match the return type of a gcc2
7406    builtin and then its argument prototype would still apply.  */
7407 char CRYPTO_new_ex_data ();
7408 int
7409 main ()
7410 {
7411 CRYPTO_new_ex_data ();
7412   ;
7413   return 0;
7414 }
7415 _ACEOF
7416 rm -f conftest.$ac_objext conftest$ac_exeext
7417 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7418   (eval $ac_link) 2>conftest.er1
7419   ac_status=$?
7420   grep -v '^ *+' conftest.er1 >conftest.err
7421   rm -f conftest.er1
7422   cat conftest.err >&5
7423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424   (exit $ac_status); } &&
7425          { ac_try='test -z "$ac_c_werror_flag"
7426                          || test ! -s conftest.err'
7427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7428   (eval $ac_try) 2>&5
7429   ac_status=$?
7430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7431   (exit $ac_status); }; } &&
7432          { ac_try='test -s conftest$ac_exeext'
7433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7434   (eval $ac_try) 2>&5
7435   ac_status=$?
7436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7437   (exit $ac_status); }; }; then
7438   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7439 else
7440   echo "$as_me: failed program was:" >&5
7441 sed 's/^/| /' conftest.$ac_ext >&5
7442
7443 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7444 fi
7445 rm -f conftest.err conftest.$ac_objext \
7446       conftest$ac_exeext conftest.$ac_ext
7447 LIBS=$ac_check_lib_save_LIBS
7448 fi
7449 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7450 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7451 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7452   cat >>confdefs.h <<_ACEOF
7453 #define HAVE_LIBEAY32 1
7454 _ACEOF
7455
7456   LIBS="-leay32 $LIBS"
7457
7458 else
7459   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7460 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7461    { (exit 1); exit 1; }; }
7462 fi
7463
7464
7465 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7466 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7467 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7468   echo $ECHO_N "(cached) $ECHO_C" >&6
7469 else
7470   ac_check_lib_save_LIBS=$LIBS
7471 LIBS="-lssleay32  $LIBS"
7472 cat >conftest.$ac_ext <<_ACEOF
7473 /* confdefs.h.  */
7474 _ACEOF
7475 cat confdefs.h >>conftest.$ac_ext
7476 cat >>conftest.$ac_ext <<_ACEOF
7477 /* end confdefs.h.  */
7478
7479 /* Override any gcc2 internal prototype to avoid an error.  */
7480 #ifdef __cplusplus
7481 extern "C"
7482 #endif
7483 /* We use char because int might match the return type of a gcc2
7484    builtin and then its argument prototype would still apply.  */
7485 char SSL_library_init ();
7486 int
7487 main ()
7488 {
7489 SSL_library_init ();
7490   ;
7491   return 0;
7492 }
7493 _ACEOF
7494 rm -f conftest.$ac_objext conftest$ac_exeext
7495 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7496   (eval $ac_link) 2>conftest.er1
7497   ac_status=$?
7498   grep -v '^ *+' conftest.er1 >conftest.err
7499   rm -f conftest.er1
7500   cat conftest.err >&5
7501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7502   (exit $ac_status); } &&
7503          { ac_try='test -z "$ac_c_werror_flag"
7504                          || test ! -s conftest.err'
7505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7506   (eval $ac_try) 2>&5
7507   ac_status=$?
7508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509   (exit $ac_status); }; } &&
7510          { ac_try='test -s conftest$ac_exeext'
7511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7512   (eval $ac_try) 2>&5
7513   ac_status=$?
7514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7515   (exit $ac_status); }; }; then
7516   ac_cv_lib_ssleay32_SSL_library_init=yes
7517 else
7518   echo "$as_me: failed program was:" >&5
7519 sed 's/^/| /' conftest.$ac_ext >&5
7520
7521 ac_cv_lib_ssleay32_SSL_library_init=no
7522 fi
7523 rm -f conftest.err conftest.$ac_objext \
7524       conftest$ac_exeext conftest.$ac_ext
7525 LIBS=$ac_check_lib_save_LIBS
7526 fi
7527 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7528 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7529 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7530   cat >>confdefs.h <<_ACEOF
7531 #define HAVE_LIBSSLEAY32 1
7532 _ACEOF
7533
7534   LIBS="-lssleay32 $LIBS"
7535
7536 else
7537   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7538 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7539    { (exit 1); exit 1; }; }
7540 fi
7541
7542   fi
7543 fi
7544
7545 if test "$with_pam" = yes ; then
7546
7547 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7548 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7549 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7550   echo $ECHO_N "(cached) $ECHO_C" >&6
7551 else
7552   ac_check_lib_save_LIBS=$LIBS
7553 LIBS="-lpam  $LIBS"
7554 cat >conftest.$ac_ext <<_ACEOF
7555 /* confdefs.h.  */
7556 _ACEOF
7557 cat confdefs.h >>conftest.$ac_ext
7558 cat >>conftest.$ac_ext <<_ACEOF
7559 /* end confdefs.h.  */
7560
7561 /* Override any gcc2 internal prototype to avoid an error.  */
7562 #ifdef __cplusplus
7563 extern "C"
7564 #endif
7565 /* We use char because int might match the return type of a gcc2
7566    builtin and then its argument prototype would still apply.  */
7567 char pam_start ();
7568 int
7569 main ()
7570 {
7571 pam_start ();
7572   ;
7573   return 0;
7574 }
7575 _ACEOF
7576 rm -f conftest.$ac_objext conftest$ac_exeext
7577 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7578   (eval $ac_link) 2>conftest.er1
7579   ac_status=$?
7580   grep -v '^ *+' conftest.er1 >conftest.err
7581   rm -f conftest.er1
7582   cat conftest.err >&5
7583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7584   (exit $ac_status); } &&
7585          { ac_try='test -z "$ac_c_werror_flag"
7586                          || test ! -s conftest.err'
7587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7588   (eval $ac_try) 2>&5
7589   ac_status=$?
7590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7591   (exit $ac_status); }; } &&
7592          { ac_try='test -s conftest$ac_exeext'
7593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7594   (eval $ac_try) 2>&5
7595   ac_status=$?
7596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7597   (exit $ac_status); }; }; then
7598   ac_cv_lib_pam_pam_start=yes
7599 else
7600   echo "$as_me: failed program was:" >&5
7601 sed 's/^/| /' conftest.$ac_ext >&5
7602
7603 ac_cv_lib_pam_pam_start=no
7604 fi
7605 rm -f conftest.err conftest.$ac_objext \
7606       conftest$ac_exeext conftest.$ac_ext
7607 LIBS=$ac_check_lib_save_LIBS
7608 fi
7609 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7610 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7611 if test $ac_cv_lib_pam_pam_start = yes; then
7612   cat >>confdefs.h <<_ACEOF
7613 #define HAVE_LIBPAM 1
7614 _ACEOF
7615
7616   LIBS="-lpam $LIBS"
7617
7618 else
7619   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7620 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7621    { (exit 1); exit 1; }; }
7622 fi
7623
7624 fi
7625
7626
7627 ##
7628 ## Header files
7629 ##
7630
7631 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7632 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7633 if test "${ac_cv_header_stdc+set}" = set; then
7634   echo $ECHO_N "(cached) $ECHO_C" >&6
7635 else
7636   cat >conftest.$ac_ext <<_ACEOF
7637 /* confdefs.h.  */
7638 _ACEOF
7639 cat confdefs.h >>conftest.$ac_ext
7640 cat >>conftest.$ac_ext <<_ACEOF
7641 /* end confdefs.h.  */
7642 #include <stdlib.h>
7643 #include <stdarg.h>
7644 #include <string.h>
7645 #include <float.h>
7646
7647 int
7648 main ()
7649 {
7650
7651   ;
7652   return 0;
7653 }
7654 _ACEOF
7655 rm -f conftest.$ac_objext
7656 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7657   (eval $ac_compile) 2>conftest.er1
7658   ac_status=$?
7659   grep -v '^ *+' conftest.er1 >conftest.err
7660   rm -f conftest.er1
7661   cat conftest.err >&5
7662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7663   (exit $ac_status); } &&
7664          { ac_try='test -z "$ac_c_werror_flag"
7665                          || test ! -s conftest.err'
7666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7667   (eval $ac_try) 2>&5
7668   ac_status=$?
7669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7670   (exit $ac_status); }; } &&
7671          { ac_try='test -s conftest.$ac_objext'
7672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7673   (eval $ac_try) 2>&5
7674   ac_status=$?
7675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7676   (exit $ac_status); }; }; then
7677   ac_cv_header_stdc=yes
7678 else
7679   echo "$as_me: failed program was:" >&5
7680 sed 's/^/| /' conftest.$ac_ext >&5
7681
7682 ac_cv_header_stdc=no
7683 fi
7684 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7685
7686 if test $ac_cv_header_stdc = yes; then
7687   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7688   cat >conftest.$ac_ext <<_ACEOF
7689 /* confdefs.h.  */
7690 _ACEOF
7691 cat confdefs.h >>conftest.$ac_ext
7692 cat >>conftest.$ac_ext <<_ACEOF
7693 /* end confdefs.h.  */
7694 #include <string.h>
7695
7696 _ACEOF
7697 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7698   $EGREP "memchr" >/dev/null 2>&1; then
7699   :
7700 else
7701   ac_cv_header_stdc=no
7702 fi
7703 rm -f conftest*
7704
7705 fi
7706
7707 if test $ac_cv_header_stdc = yes; then
7708   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7709   cat >conftest.$ac_ext <<_ACEOF
7710 /* confdefs.h.  */
7711 _ACEOF
7712 cat confdefs.h >>conftest.$ac_ext
7713 cat >>conftest.$ac_ext <<_ACEOF
7714 /* end confdefs.h.  */
7715 #include <stdlib.h>
7716
7717 _ACEOF
7718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7719   $EGREP "free" >/dev/null 2>&1; then
7720   :
7721 else
7722   ac_cv_header_stdc=no
7723 fi
7724 rm -f conftest*
7725
7726 fi
7727
7728 if test $ac_cv_header_stdc = yes; then
7729   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7730   if test "$cross_compiling" = yes; then
7731   :
7732 else
7733   cat >conftest.$ac_ext <<_ACEOF
7734 /* confdefs.h.  */
7735 _ACEOF
7736 cat confdefs.h >>conftest.$ac_ext
7737 cat >>conftest.$ac_ext <<_ACEOF
7738 /* end confdefs.h.  */
7739 #include <ctype.h>
7740 #if ((' ' & 0x0FF) == 0x020)
7741 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7742 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7743 #else
7744 # define ISLOWER(c) \
7745                    (('a' <= (c) && (c) <= 'i') \
7746                      || ('j' <= (c) && (c) <= 'r') \
7747                      || ('s' <= (c) && (c) <= 'z'))
7748 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7749 #endif
7750
7751 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7752 int
7753 main ()
7754 {
7755   int i;
7756   for (i = 0; i < 256; i++)
7757     if (XOR (islower (i), ISLOWER (i))
7758         || toupper (i) != TOUPPER (i))
7759       exit(2);
7760   exit (0);
7761 }
7762 _ACEOF
7763 rm -f conftest$ac_exeext
7764 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7765   (eval $ac_link) 2>&5
7766   ac_status=$?
7767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7768   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7770   (eval $ac_try) 2>&5
7771   ac_status=$?
7772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7773   (exit $ac_status); }; }; then
7774   :
7775 else
7776   echo "$as_me: program exited with status $ac_status" >&5
7777 echo "$as_me: failed program was:" >&5
7778 sed 's/^/| /' conftest.$ac_ext >&5
7779
7780 ( exit $ac_status )
7781 ac_cv_header_stdc=no
7782 fi
7783 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7784 fi
7785 fi
7786 fi
7787 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7788 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7789 if test $ac_cv_header_stdc = yes; then
7790
7791 cat >>confdefs.h <<\_ACEOF
7792 #define STDC_HEADERS 1
7793 _ACEOF
7794
7795 fi
7796
7797 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7808                   inttypes.h stdint.h unistd.h
7809 do
7810 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7811 echo "$as_me:$LINENO: checking for $ac_header" >&5
7812 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7813 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7814   echo $ECHO_N "(cached) $ECHO_C" >&6
7815 else
7816   cat >conftest.$ac_ext <<_ACEOF
7817 /* confdefs.h.  */
7818 _ACEOF
7819 cat confdefs.h >>conftest.$ac_ext
7820 cat >>conftest.$ac_ext <<_ACEOF
7821 /* end confdefs.h.  */
7822 $ac_includes_default
7823
7824 #include <$ac_header>
7825 _ACEOF
7826 rm -f conftest.$ac_objext
7827 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7828   (eval $ac_compile) 2>conftest.er1
7829   ac_status=$?
7830   grep -v '^ *+' conftest.er1 >conftest.err
7831   rm -f conftest.er1
7832   cat conftest.err >&5
7833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7834   (exit $ac_status); } &&
7835          { ac_try='test -z "$ac_c_werror_flag"
7836                          || test ! -s conftest.err'
7837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7838   (eval $ac_try) 2>&5
7839   ac_status=$?
7840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7841   (exit $ac_status); }; } &&
7842          { ac_try='test -s conftest.$ac_objext'
7843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7844   (eval $ac_try) 2>&5
7845   ac_status=$?
7846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7847   (exit $ac_status); }; }; then
7848   eval "$as_ac_Header=yes"
7849 else
7850   echo "$as_me: failed program was:" >&5
7851 sed 's/^/| /' conftest.$ac_ext >&5
7852
7853 eval "$as_ac_Header=no"
7854 fi
7855 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7856 fi
7857 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7858 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7859 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7860   cat >>confdefs.h <<_ACEOF
7861 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7862 _ACEOF
7863
7864 fi
7865
7866 done
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894 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
7895 do
7896 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7897 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7898   echo "$as_me:$LINENO: checking for $ac_header" >&5
7899 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7900 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7901   echo $ECHO_N "(cached) $ECHO_C" >&6
7902 fi
7903 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7904 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7905 else
7906   # Is the header compilable?
7907 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7908 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7909 cat >conftest.$ac_ext <<_ACEOF
7910 /* confdefs.h.  */
7911 _ACEOF
7912 cat confdefs.h >>conftest.$ac_ext
7913 cat >>conftest.$ac_ext <<_ACEOF
7914 /* end confdefs.h.  */
7915 $ac_includes_default
7916 #include <$ac_header>
7917 _ACEOF
7918 rm -f conftest.$ac_objext
7919 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7920   (eval $ac_compile) 2>conftest.er1
7921   ac_status=$?
7922   grep -v '^ *+' conftest.er1 >conftest.err
7923   rm -f conftest.er1
7924   cat conftest.err >&5
7925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7926   (exit $ac_status); } &&
7927          { ac_try='test -z "$ac_c_werror_flag"
7928                          || test ! -s conftest.err'
7929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7930   (eval $ac_try) 2>&5
7931   ac_status=$?
7932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7933   (exit $ac_status); }; } &&
7934          { ac_try='test -s conftest.$ac_objext'
7935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7936   (eval $ac_try) 2>&5
7937   ac_status=$?
7938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7939   (exit $ac_status); }; }; then
7940   ac_header_compiler=yes
7941 else
7942   echo "$as_me: failed program was:" >&5
7943 sed 's/^/| /' conftest.$ac_ext >&5
7944
7945 ac_header_compiler=no
7946 fi
7947 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7948 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7949 echo "${ECHO_T}$ac_header_compiler" >&6
7950
7951 # Is the header present?
7952 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7953 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7954 cat >conftest.$ac_ext <<_ACEOF
7955 /* confdefs.h.  */
7956 _ACEOF
7957 cat confdefs.h >>conftest.$ac_ext
7958 cat >>conftest.$ac_ext <<_ACEOF
7959 /* end confdefs.h.  */
7960 #include <$ac_header>
7961 _ACEOF
7962 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7963   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7964   ac_status=$?
7965   grep -v '^ *+' conftest.er1 >conftest.err
7966   rm -f conftest.er1
7967   cat conftest.err >&5
7968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969   (exit $ac_status); } >/dev/null; then
7970   if test -s conftest.err; then
7971     ac_cpp_err=$ac_c_preproc_warn_flag
7972     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7973   else
7974     ac_cpp_err=
7975   fi
7976 else
7977   ac_cpp_err=yes
7978 fi
7979 if test -z "$ac_cpp_err"; then
7980   ac_header_preproc=yes
7981 else
7982   echo "$as_me: failed program was:" >&5
7983 sed 's/^/| /' conftest.$ac_ext >&5
7984
7985   ac_header_preproc=no
7986 fi
7987 rm -f conftest.err conftest.$ac_ext
7988 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7989 echo "${ECHO_T}$ac_header_preproc" >&6
7990
7991 # So?  What about this header?
7992 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7993   yes:no: )
7994     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7995 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7996     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7997 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7998     ac_header_preproc=yes
7999     ;;
8000   no:yes:* )
8001     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8002 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8003     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8004 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8005     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8006 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8007     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8008 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8009     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8010 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8011     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8012 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8013     (
8014       cat <<\_ASBOX
8015 ## ---------------------------------------- ##
8016 ## Report this to pgsql-bugs@postgresql.org ##
8017 ## ---------------------------------------- ##
8018 _ASBOX
8019     ) |
8020       sed "s/^/$as_me: WARNING:     /" >&2
8021     ;;
8022 esac
8023 echo "$as_me:$LINENO: checking for $ac_header" >&5
8024 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8025 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8026   echo $ECHO_N "(cached) $ECHO_C" >&6
8027 else
8028   eval "$as_ac_Header=\$ac_header_preproc"
8029 fi
8030 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8031 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8032
8033 fi
8034 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8035   cat >>confdefs.h <<_ACEOF
8036 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8037 _ACEOF
8038
8039 fi
8040
8041 done
8042
8043
8044 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
8045 # netinet/in.h is included first.
8046
8047 for ac_header in netinet/in.h
8048 do
8049 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8050 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8051   echo "$as_me:$LINENO: checking for $ac_header" >&5
8052 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8053 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8054   echo $ECHO_N "(cached) $ECHO_C" >&6
8055 fi
8056 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8057 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8058 else
8059   # Is the header compilable?
8060 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8061 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8062 cat >conftest.$ac_ext <<_ACEOF
8063 /* confdefs.h.  */
8064 _ACEOF
8065 cat confdefs.h >>conftest.$ac_ext
8066 cat >>conftest.$ac_ext <<_ACEOF
8067 /* end confdefs.h.  */
8068 $ac_includes_default
8069 #include <$ac_header>
8070 _ACEOF
8071 rm -f conftest.$ac_objext
8072 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8073   (eval $ac_compile) 2>conftest.er1
8074   ac_status=$?
8075   grep -v '^ *+' conftest.er1 >conftest.err
8076   rm -f conftest.er1
8077   cat conftest.err >&5
8078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8079   (exit $ac_status); } &&
8080          { ac_try='test -z "$ac_c_werror_flag"
8081                          || test ! -s conftest.err'
8082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8083   (eval $ac_try) 2>&5
8084   ac_status=$?
8085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086   (exit $ac_status); }; } &&
8087          { ac_try='test -s conftest.$ac_objext'
8088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8089   (eval $ac_try) 2>&5
8090   ac_status=$?
8091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092   (exit $ac_status); }; }; then
8093   ac_header_compiler=yes
8094 else
8095   echo "$as_me: failed program was:" >&5
8096 sed 's/^/| /' conftest.$ac_ext >&5
8097
8098 ac_header_compiler=no
8099 fi
8100 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8101 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8102 echo "${ECHO_T}$ac_header_compiler" >&6
8103
8104 # Is the header present?
8105 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8106 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8107 cat >conftest.$ac_ext <<_ACEOF
8108 /* confdefs.h.  */
8109 _ACEOF
8110 cat confdefs.h >>conftest.$ac_ext
8111 cat >>conftest.$ac_ext <<_ACEOF
8112 /* end confdefs.h.  */
8113 #include <$ac_header>
8114 _ACEOF
8115 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8116   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8117   ac_status=$?
8118   grep -v '^ *+' conftest.er1 >conftest.err
8119   rm -f conftest.er1
8120   cat conftest.err >&5
8121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8122   (exit $ac_status); } >/dev/null; then
8123   if test -s conftest.err; then
8124     ac_cpp_err=$ac_c_preproc_warn_flag
8125     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8126   else
8127     ac_cpp_err=
8128   fi
8129 else
8130   ac_cpp_err=yes
8131 fi
8132 if test -z "$ac_cpp_err"; then
8133   ac_header_preproc=yes
8134 else
8135   echo "$as_me: failed program was:" >&5
8136 sed 's/^/| /' conftest.$ac_ext >&5
8137
8138   ac_header_preproc=no
8139 fi
8140 rm -f conftest.err conftest.$ac_ext
8141 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8142 echo "${ECHO_T}$ac_header_preproc" >&6
8143
8144 # So?  What about this header?
8145 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8146   yes:no: )
8147     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8148 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8149     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8150 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8151     ac_header_preproc=yes
8152     ;;
8153   no:yes:* )
8154     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8155 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8156     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8157 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8158     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8159 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8160     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8161 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8162     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8163 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8164     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8165 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8166     (
8167       cat <<\_ASBOX
8168 ## ---------------------------------------- ##
8169 ## Report this to pgsql-bugs@postgresql.org ##
8170 ## ---------------------------------------- ##
8171 _ASBOX
8172     ) |
8173       sed "s/^/$as_me: WARNING:     /" >&2
8174     ;;
8175 esac
8176 echo "$as_me:$LINENO: checking for $ac_header" >&5
8177 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8178 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8179   echo $ECHO_N "(cached) $ECHO_C" >&6
8180 else
8181   eval "$as_ac_Header=\$ac_header_preproc"
8182 fi
8183 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8184 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8185
8186 fi
8187 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8188   cat >>confdefs.h <<_ACEOF
8189 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8190 _ACEOF
8191
8192 fi
8193
8194 done
8195
8196
8197 for ac_header in netinet/tcp.h
8198 do
8199 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8200 echo "$as_me:$LINENO: checking for $ac_header" >&5
8201 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8202 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8203   echo $ECHO_N "(cached) $ECHO_C" >&6
8204 else
8205   cat >conftest.$ac_ext <<_ACEOF
8206 /* confdefs.h.  */
8207 _ACEOF
8208 cat confdefs.h >>conftest.$ac_ext
8209 cat >>conftest.$ac_ext <<_ACEOF
8210 /* end confdefs.h.  */
8211 $ac_includes_default
8212 #ifdef HAVE_NETINET_IN_H
8213 #include <netinet/in.h>
8214 #endif
8215
8216
8217 #include <$ac_header>
8218 _ACEOF
8219 rm -f conftest.$ac_objext
8220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8221   (eval $ac_compile) 2>conftest.er1
8222   ac_status=$?
8223   grep -v '^ *+' conftest.er1 >conftest.err
8224   rm -f conftest.er1
8225   cat conftest.err >&5
8226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8227   (exit $ac_status); } &&
8228          { ac_try='test -z "$ac_c_werror_flag"
8229                          || test ! -s conftest.err'
8230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8231   (eval $ac_try) 2>&5
8232   ac_status=$?
8233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8234   (exit $ac_status); }; } &&
8235          { ac_try='test -s conftest.$ac_objext'
8236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8237   (eval $ac_try) 2>&5
8238   ac_status=$?
8239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8240   (exit $ac_status); }; }; then
8241   eval "$as_ac_Header=yes"
8242 else
8243   echo "$as_me: failed program was:" >&5
8244 sed 's/^/| /' conftest.$ac_ext >&5
8245
8246 eval "$as_ac_Header=no"
8247 fi
8248 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8249 fi
8250 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8251 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8252 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8253   cat >>confdefs.h <<_ACEOF
8254 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8255 _ACEOF
8256
8257 fi
8258
8259 done
8260
8261
8262 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8263
8264 for ac_header in readline/readline.h
8265 do
8266 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8267 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8268   echo "$as_me:$LINENO: checking for $ac_header" >&5
8269 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8270 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8271   echo $ECHO_N "(cached) $ECHO_C" >&6
8272 fi
8273 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8274 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8275 else
8276   # Is the header compilable?
8277 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8278 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8279 cat >conftest.$ac_ext <<_ACEOF
8280 /* confdefs.h.  */
8281 _ACEOF
8282 cat confdefs.h >>conftest.$ac_ext
8283 cat >>conftest.$ac_ext <<_ACEOF
8284 /* end confdefs.h.  */
8285 $ac_includes_default
8286 #include <$ac_header>
8287 _ACEOF
8288 rm -f conftest.$ac_objext
8289 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8290   (eval $ac_compile) 2>conftest.er1
8291   ac_status=$?
8292   grep -v '^ *+' conftest.er1 >conftest.err
8293   rm -f conftest.er1
8294   cat conftest.err >&5
8295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8296   (exit $ac_status); } &&
8297          { ac_try='test -z "$ac_c_werror_flag"
8298                          || test ! -s conftest.err'
8299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8300   (eval $ac_try) 2>&5
8301   ac_status=$?
8302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303   (exit $ac_status); }; } &&
8304          { ac_try='test -s conftest.$ac_objext'
8305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8306   (eval $ac_try) 2>&5
8307   ac_status=$?
8308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309   (exit $ac_status); }; }; then
8310   ac_header_compiler=yes
8311 else
8312   echo "$as_me: failed program was:" >&5
8313 sed 's/^/| /' conftest.$ac_ext >&5
8314
8315 ac_header_compiler=no
8316 fi
8317 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8318 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8319 echo "${ECHO_T}$ac_header_compiler" >&6
8320
8321 # Is the header present?
8322 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8323 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8324 cat >conftest.$ac_ext <<_ACEOF
8325 /* confdefs.h.  */
8326 _ACEOF
8327 cat confdefs.h >>conftest.$ac_ext
8328 cat >>conftest.$ac_ext <<_ACEOF
8329 /* end confdefs.h.  */
8330 #include <$ac_header>
8331 _ACEOF
8332 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8333   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8334   ac_status=$?
8335   grep -v '^ *+' conftest.er1 >conftest.err
8336   rm -f conftest.er1
8337   cat conftest.err >&5
8338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8339   (exit $ac_status); } >/dev/null; then
8340   if test -s conftest.err; then
8341     ac_cpp_err=$ac_c_preproc_warn_flag
8342     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8343   else
8344     ac_cpp_err=
8345   fi
8346 else
8347   ac_cpp_err=yes
8348 fi
8349 if test -z "$ac_cpp_err"; then
8350   ac_header_preproc=yes
8351 else
8352   echo "$as_me: failed program was:" >&5
8353 sed 's/^/| /' conftest.$ac_ext >&5
8354
8355   ac_header_preproc=no
8356 fi
8357 rm -f conftest.err conftest.$ac_ext
8358 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8359 echo "${ECHO_T}$ac_header_preproc" >&6
8360
8361 # So?  What about this header?
8362 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8363   yes:no: )
8364     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8365 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8366     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8367 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8368     ac_header_preproc=yes
8369     ;;
8370   no:yes:* )
8371     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8372 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8373     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8374 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8375     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8376 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8377     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8378 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8379     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8380 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8381     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8382 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8383     (
8384       cat <<\_ASBOX
8385 ## ---------------------------------------- ##
8386 ## Report this to pgsql-bugs@postgresql.org ##
8387 ## ---------------------------------------- ##
8388 _ASBOX
8389     ) |
8390       sed "s/^/$as_me: WARNING:     /" >&2
8391     ;;
8392 esac
8393 echo "$as_me:$LINENO: checking for $ac_header" >&5
8394 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8395 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8396   echo $ECHO_N "(cached) $ECHO_C" >&6
8397 else
8398   eval "$as_ac_Header=\$ac_header_preproc"
8399 fi
8400 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8401 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8402
8403 fi
8404 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8405   cat >>confdefs.h <<_ACEOF
8406 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8407 _ACEOF
8408
8409 else
8410
8411 for ac_header in readline.h
8412 do
8413 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8414 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8415   echo "$as_me:$LINENO: checking for $ac_header" >&5
8416 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8417 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8418   echo $ECHO_N "(cached) $ECHO_C" >&6
8419 fi
8420 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8421 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8422 else
8423   # Is the header compilable?
8424 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8425 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8426 cat >conftest.$ac_ext <<_ACEOF
8427 /* confdefs.h.  */
8428 _ACEOF
8429 cat confdefs.h >>conftest.$ac_ext
8430 cat >>conftest.$ac_ext <<_ACEOF
8431 /* end confdefs.h.  */
8432 $ac_includes_default
8433 #include <$ac_header>
8434 _ACEOF
8435 rm -f conftest.$ac_objext
8436 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8437   (eval $ac_compile) 2>conftest.er1
8438   ac_status=$?
8439   grep -v '^ *+' conftest.er1 >conftest.err
8440   rm -f conftest.er1
8441   cat conftest.err >&5
8442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8443   (exit $ac_status); } &&
8444          { ac_try='test -z "$ac_c_werror_flag"
8445                          || test ! -s conftest.err'
8446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8447   (eval $ac_try) 2>&5
8448   ac_status=$?
8449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450   (exit $ac_status); }; } &&
8451          { ac_try='test -s conftest.$ac_objext'
8452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8453   (eval $ac_try) 2>&5
8454   ac_status=$?
8455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8456   (exit $ac_status); }; }; then
8457   ac_header_compiler=yes
8458 else
8459   echo "$as_me: failed program was:" >&5
8460 sed 's/^/| /' conftest.$ac_ext >&5
8461
8462 ac_header_compiler=no
8463 fi
8464 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8465 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8466 echo "${ECHO_T}$ac_header_compiler" >&6
8467
8468 # Is the header present?
8469 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8470 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8471 cat >conftest.$ac_ext <<_ACEOF
8472 /* confdefs.h.  */
8473 _ACEOF
8474 cat confdefs.h >>conftest.$ac_ext
8475 cat >>conftest.$ac_ext <<_ACEOF
8476 /* end confdefs.h.  */
8477 #include <$ac_header>
8478 _ACEOF
8479 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8480   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8481   ac_status=$?
8482   grep -v '^ *+' conftest.er1 >conftest.err
8483   rm -f conftest.er1
8484   cat conftest.err >&5
8485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8486   (exit $ac_status); } >/dev/null; then
8487   if test -s conftest.err; then
8488     ac_cpp_err=$ac_c_preproc_warn_flag
8489     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8490   else
8491     ac_cpp_err=
8492   fi
8493 else
8494   ac_cpp_err=yes
8495 fi
8496 if test -z "$ac_cpp_err"; then
8497   ac_header_preproc=yes
8498 else
8499   echo "$as_me: failed program was:" >&5
8500 sed 's/^/| /' conftest.$ac_ext >&5
8501
8502   ac_header_preproc=no
8503 fi
8504 rm -f conftest.err conftest.$ac_ext
8505 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8506 echo "${ECHO_T}$ac_header_preproc" >&6
8507
8508 # So?  What about this header?
8509 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8510   yes:no: )
8511     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8512 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8513     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8514 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8515     ac_header_preproc=yes
8516     ;;
8517   no:yes:* )
8518     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8519 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8520     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8521 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8522     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8523 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8524     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8525 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8526     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8527 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8528     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8529 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8530     (
8531       cat <<\_ASBOX
8532 ## ---------------------------------------- ##
8533 ## Report this to pgsql-bugs@postgresql.org ##
8534 ## ---------------------------------------- ##
8535 _ASBOX
8536     ) |
8537       sed "s/^/$as_me: WARNING:     /" >&2
8538     ;;
8539 esac
8540 echo "$as_me:$LINENO: checking for $ac_header" >&5
8541 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8542 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8543   echo $ECHO_N "(cached) $ECHO_C" >&6
8544 else
8545   eval "$as_ac_Header=\$ac_header_preproc"
8546 fi
8547 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8548 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8549
8550 fi
8551 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8552   cat >>confdefs.h <<_ACEOF
8553 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8554 _ACEOF
8555
8556 else
8557   { { echo "$as_me:$LINENO: error: readline header not found
8558 If you have readline already installed, see config.log for details on the
8559 failure.  It is possible the compiler isn't looking in the proper directory.
8560 Use --without-readline to disable readline support." >&5
8561 echo "$as_me: error: readline header not found
8562 If you have readline already installed, see config.log for details on the
8563 failure.  It is possible the compiler isn't looking in the proper directory.
8564 Use --without-readline to disable readline support." >&2;}
8565    { (exit 1); exit 1; }; }
8566 fi
8567
8568 done
8569
8570 fi
8571
8572 done
8573
8574
8575 for ac_header in readline/history.h
8576 do
8577 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8578 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8579   echo "$as_me:$LINENO: checking for $ac_header" >&5
8580 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8581 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8582   echo $ECHO_N "(cached) $ECHO_C" >&6
8583 fi
8584 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8585 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8586 else
8587   # Is the header compilable?
8588 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8589 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8590 cat >conftest.$ac_ext <<_ACEOF
8591 /* confdefs.h.  */
8592 _ACEOF
8593 cat confdefs.h >>conftest.$ac_ext
8594 cat >>conftest.$ac_ext <<_ACEOF
8595 /* end confdefs.h.  */
8596 $ac_includes_default
8597 #include <$ac_header>
8598 _ACEOF
8599 rm -f conftest.$ac_objext
8600 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8601   (eval $ac_compile) 2>conftest.er1
8602   ac_status=$?
8603   grep -v '^ *+' conftest.er1 >conftest.err
8604   rm -f conftest.er1
8605   cat conftest.err >&5
8606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8607   (exit $ac_status); } &&
8608          { ac_try='test -z "$ac_c_werror_flag"
8609                          || test ! -s conftest.err'
8610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8611   (eval $ac_try) 2>&5
8612   ac_status=$?
8613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8614   (exit $ac_status); }; } &&
8615          { ac_try='test -s conftest.$ac_objext'
8616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8617   (eval $ac_try) 2>&5
8618   ac_status=$?
8619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620   (exit $ac_status); }; }; then
8621   ac_header_compiler=yes
8622 else
8623   echo "$as_me: failed program was:" >&5
8624 sed 's/^/| /' conftest.$ac_ext >&5
8625
8626 ac_header_compiler=no
8627 fi
8628 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8629 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8630 echo "${ECHO_T}$ac_header_compiler" >&6
8631
8632 # Is the header present?
8633 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8634 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8635 cat >conftest.$ac_ext <<_ACEOF
8636 /* confdefs.h.  */
8637 _ACEOF
8638 cat confdefs.h >>conftest.$ac_ext
8639 cat >>conftest.$ac_ext <<_ACEOF
8640 /* end confdefs.h.  */
8641 #include <$ac_header>
8642 _ACEOF
8643 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8644   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8645   ac_status=$?
8646   grep -v '^ *+' conftest.er1 >conftest.err
8647   rm -f conftest.er1
8648   cat conftest.err >&5
8649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650   (exit $ac_status); } >/dev/null; then
8651   if test -s conftest.err; then
8652     ac_cpp_err=$ac_c_preproc_warn_flag
8653     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8654   else
8655     ac_cpp_err=
8656   fi
8657 else
8658   ac_cpp_err=yes
8659 fi
8660 if test -z "$ac_cpp_err"; then
8661   ac_header_preproc=yes
8662 else
8663   echo "$as_me: failed program was:" >&5
8664 sed 's/^/| /' conftest.$ac_ext >&5
8665
8666   ac_header_preproc=no
8667 fi
8668 rm -f conftest.err conftest.$ac_ext
8669 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8670 echo "${ECHO_T}$ac_header_preproc" >&6
8671
8672 # So?  What about this header?
8673 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8674   yes:no: )
8675     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8676 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8677     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8678 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8679     ac_header_preproc=yes
8680     ;;
8681   no:yes:* )
8682     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8683 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8684     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8685 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8686     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8687 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8688     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8689 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8690     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8691 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8692     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8693 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8694     (
8695       cat <<\_ASBOX
8696 ## ---------------------------------------- ##
8697 ## Report this to pgsql-bugs@postgresql.org ##
8698 ## ---------------------------------------- ##
8699 _ASBOX
8700     ) |
8701       sed "s/^/$as_me: WARNING:     /" >&2
8702     ;;
8703 esac
8704 echo "$as_me:$LINENO: checking for $ac_header" >&5
8705 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8706 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8707   echo $ECHO_N "(cached) $ECHO_C" >&6
8708 else
8709   eval "$as_ac_Header=\$ac_header_preproc"
8710 fi
8711 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8712 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8713
8714 fi
8715 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8716   cat >>confdefs.h <<_ACEOF
8717 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8718 _ACEOF
8719
8720 else
8721
8722 for ac_header in history.h
8723 do
8724 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8725 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8726   echo "$as_me:$LINENO: checking for $ac_header" >&5
8727 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8728 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8729   echo $ECHO_N "(cached) $ECHO_C" >&6
8730 fi
8731 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8732 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8733 else
8734   # Is the header compilable?
8735 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8736 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8737 cat >conftest.$ac_ext <<_ACEOF
8738 /* confdefs.h.  */
8739 _ACEOF
8740 cat confdefs.h >>conftest.$ac_ext
8741 cat >>conftest.$ac_ext <<_ACEOF
8742 /* end confdefs.h.  */
8743 $ac_includes_default
8744 #include <$ac_header>
8745 _ACEOF
8746 rm -f conftest.$ac_objext
8747 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8748   (eval $ac_compile) 2>conftest.er1
8749   ac_status=$?
8750   grep -v '^ *+' conftest.er1 >conftest.err
8751   rm -f conftest.er1
8752   cat conftest.err >&5
8753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8754   (exit $ac_status); } &&
8755          { ac_try='test -z "$ac_c_werror_flag"
8756                          || test ! -s conftest.err'
8757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8758   (eval $ac_try) 2>&5
8759   ac_status=$?
8760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8761   (exit $ac_status); }; } &&
8762          { ac_try='test -s conftest.$ac_objext'
8763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8764   (eval $ac_try) 2>&5
8765   ac_status=$?
8766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8767   (exit $ac_status); }; }; then
8768   ac_header_compiler=yes
8769 else
8770   echo "$as_me: failed program was:" >&5
8771 sed 's/^/| /' conftest.$ac_ext >&5
8772
8773 ac_header_compiler=no
8774 fi
8775 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8776 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8777 echo "${ECHO_T}$ac_header_compiler" >&6
8778
8779 # Is the header present?
8780 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8781 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8782 cat >conftest.$ac_ext <<_ACEOF
8783 /* confdefs.h.  */
8784 _ACEOF
8785 cat confdefs.h >>conftest.$ac_ext
8786 cat >>conftest.$ac_ext <<_ACEOF
8787 /* end confdefs.h.  */
8788 #include <$ac_header>
8789 _ACEOF
8790 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8791   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8792   ac_status=$?
8793   grep -v '^ *+' conftest.er1 >conftest.err
8794   rm -f conftest.er1
8795   cat conftest.err >&5
8796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8797   (exit $ac_status); } >/dev/null; then
8798   if test -s conftest.err; then
8799     ac_cpp_err=$ac_c_preproc_warn_flag
8800     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8801   else
8802     ac_cpp_err=
8803   fi
8804 else
8805   ac_cpp_err=yes
8806 fi
8807 if test -z "$ac_cpp_err"; then
8808   ac_header_preproc=yes
8809 else
8810   echo "$as_me: failed program was:" >&5
8811 sed 's/^/| /' conftest.$ac_ext >&5
8812
8813   ac_header_preproc=no
8814 fi
8815 rm -f conftest.err conftest.$ac_ext
8816 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8817 echo "${ECHO_T}$ac_header_preproc" >&6
8818
8819 # So?  What about this header?
8820 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8821   yes:no: )
8822     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8823 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8824     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8825 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8826     ac_header_preproc=yes
8827     ;;
8828   no:yes:* )
8829     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8830 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8831     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8832 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8833     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8834 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8835     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8836 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8837     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8838 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8839     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8840 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8841     (
8842       cat <<\_ASBOX
8843 ## ---------------------------------------- ##
8844 ## Report this to pgsql-bugs@postgresql.org ##
8845 ## ---------------------------------------- ##
8846 _ASBOX
8847     ) |
8848       sed "s/^/$as_me: WARNING:     /" >&2
8849     ;;
8850 esac
8851 echo "$as_me:$LINENO: checking for $ac_header" >&5
8852 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8853 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8854   echo $ECHO_N "(cached) $ECHO_C" >&6
8855 else
8856   eval "$as_ac_Header=\$ac_header_preproc"
8857 fi
8858 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8859 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8860
8861 fi
8862 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8863   cat >>confdefs.h <<_ACEOF
8864 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8865 _ACEOF
8866
8867 else
8868   { { echo "$as_me:$LINENO: error: history header not found
8869 If you have readline already installed, see config.log for details on the
8870 failure.  It is possible the compiler isn't looking in the proper directory.
8871 Use --without-readline to disable readline support." >&5
8872 echo "$as_me: error: history header not found
8873 If you have readline already installed, see config.log for details on the
8874 failure.  It is possible the compiler isn't looking in the proper directory.
8875 Use --without-readline to disable readline support." >&2;}
8876    { (exit 1); exit 1; }; }
8877 fi
8878
8879 done
8880
8881 fi
8882
8883 done
8884
8885 fi
8886
8887 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8888 # Some installations of libedit usurp /usr/include/readline/, which seems
8889 # bad practice, since in combined installations readline will have its headers
8890 # there.  We might have to resort to AC_EGREP checks to make sure we found
8891 # the proper header...
8892
8893 for ac_header in editline/readline.h
8894 do
8895 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8896 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8897   echo "$as_me:$LINENO: checking for $ac_header" >&5
8898 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8899 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8900   echo $ECHO_N "(cached) $ECHO_C" >&6
8901 fi
8902 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8903 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8904 else
8905   # Is the header compilable?
8906 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8907 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8908 cat >conftest.$ac_ext <<_ACEOF
8909 /* confdefs.h.  */
8910 _ACEOF
8911 cat confdefs.h >>conftest.$ac_ext
8912 cat >>conftest.$ac_ext <<_ACEOF
8913 /* end confdefs.h.  */
8914 $ac_includes_default
8915 #include <$ac_header>
8916 _ACEOF
8917 rm -f conftest.$ac_objext
8918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8919   (eval $ac_compile) 2>conftest.er1
8920   ac_status=$?
8921   grep -v '^ *+' conftest.er1 >conftest.err
8922   rm -f conftest.er1
8923   cat conftest.err >&5
8924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925   (exit $ac_status); } &&
8926          { ac_try='test -z "$ac_c_werror_flag"
8927                          || test ! -s conftest.err'
8928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8929   (eval $ac_try) 2>&5
8930   ac_status=$?
8931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8932   (exit $ac_status); }; } &&
8933          { ac_try='test -s conftest.$ac_objext'
8934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8935   (eval $ac_try) 2>&5
8936   ac_status=$?
8937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8938   (exit $ac_status); }; }; then
8939   ac_header_compiler=yes
8940 else
8941   echo "$as_me: failed program was:" >&5
8942 sed 's/^/| /' conftest.$ac_ext >&5
8943
8944 ac_header_compiler=no
8945 fi
8946 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8947 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8948 echo "${ECHO_T}$ac_header_compiler" >&6
8949
8950 # Is the header present?
8951 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8952 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8953 cat >conftest.$ac_ext <<_ACEOF
8954 /* confdefs.h.  */
8955 _ACEOF
8956 cat confdefs.h >>conftest.$ac_ext
8957 cat >>conftest.$ac_ext <<_ACEOF
8958 /* end confdefs.h.  */
8959 #include <$ac_header>
8960 _ACEOF
8961 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8962   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8963   ac_status=$?
8964   grep -v '^ *+' conftest.er1 >conftest.err
8965   rm -f conftest.er1
8966   cat conftest.err >&5
8967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968   (exit $ac_status); } >/dev/null; then
8969   if test -s conftest.err; then
8970     ac_cpp_err=$ac_c_preproc_warn_flag
8971     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8972   else
8973     ac_cpp_err=
8974   fi
8975 else
8976   ac_cpp_err=yes
8977 fi
8978 if test -z "$ac_cpp_err"; then
8979   ac_header_preproc=yes
8980 else
8981   echo "$as_me: failed program was:" >&5
8982 sed 's/^/| /' conftest.$ac_ext >&5
8983
8984   ac_header_preproc=no
8985 fi
8986 rm -f conftest.err conftest.$ac_ext
8987 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8988 echo "${ECHO_T}$ac_header_preproc" >&6
8989
8990 # So?  What about this header?
8991 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8992   yes:no: )
8993     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8994 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8995     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8996 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8997     ac_header_preproc=yes
8998     ;;
8999   no:yes:* )
9000     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9001 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9002     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9003 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9004     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9005 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9006     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9007 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9008     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9009 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9010     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9011 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9012     (
9013       cat <<\_ASBOX
9014 ## ---------------------------------------- ##
9015 ## Report this to pgsql-bugs@postgresql.org ##
9016 ## ---------------------------------------- ##
9017 _ASBOX
9018     ) |
9019       sed "s/^/$as_me: WARNING:     /" >&2
9020     ;;
9021 esac
9022 echo "$as_me:$LINENO: checking for $ac_header" >&5
9023 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9024 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9025   echo $ECHO_N "(cached) $ECHO_C" >&6
9026 else
9027   eval "$as_ac_Header=\$ac_header_preproc"
9028 fi
9029 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9030 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9031
9032 fi
9033 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9034   cat >>confdefs.h <<_ACEOF
9035 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9036 _ACEOF
9037
9038 else
9039
9040 for ac_header in readline.h
9041 do
9042 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9043 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9044   echo "$as_me:$LINENO: checking for $ac_header" >&5
9045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9047   echo $ECHO_N "(cached) $ECHO_C" >&6
9048 fi
9049 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9050 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9051 else
9052   # Is the header compilable?
9053 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9054 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9055 cat >conftest.$ac_ext <<_ACEOF
9056 /* confdefs.h.  */
9057 _ACEOF
9058 cat confdefs.h >>conftest.$ac_ext
9059 cat >>conftest.$ac_ext <<_ACEOF
9060 /* end confdefs.h.  */
9061 $ac_includes_default
9062 #include <$ac_header>
9063 _ACEOF
9064 rm -f conftest.$ac_objext
9065 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9066   (eval $ac_compile) 2>conftest.er1
9067   ac_status=$?
9068   grep -v '^ *+' conftest.er1 >conftest.err
9069   rm -f conftest.er1
9070   cat conftest.err >&5
9071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9072   (exit $ac_status); } &&
9073          { ac_try='test -z "$ac_c_werror_flag"
9074                          || test ! -s conftest.err'
9075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9076   (eval $ac_try) 2>&5
9077   ac_status=$?
9078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9079   (exit $ac_status); }; } &&
9080          { ac_try='test -s conftest.$ac_objext'
9081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9082   (eval $ac_try) 2>&5
9083   ac_status=$?
9084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9085   (exit $ac_status); }; }; then
9086   ac_header_compiler=yes
9087 else
9088   echo "$as_me: failed program was:" >&5
9089 sed 's/^/| /' conftest.$ac_ext >&5
9090
9091 ac_header_compiler=no
9092 fi
9093 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9094 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9095 echo "${ECHO_T}$ac_header_compiler" >&6
9096
9097 # Is the header present?
9098 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9099 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9100 cat >conftest.$ac_ext <<_ACEOF
9101 /* confdefs.h.  */
9102 _ACEOF
9103 cat confdefs.h >>conftest.$ac_ext
9104 cat >>conftest.$ac_ext <<_ACEOF
9105 /* end confdefs.h.  */
9106 #include <$ac_header>
9107 _ACEOF
9108 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9109   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9110   ac_status=$?
9111   grep -v '^ *+' conftest.er1 >conftest.err
9112   rm -f conftest.er1
9113   cat conftest.err >&5
9114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9115   (exit $ac_status); } >/dev/null; then
9116   if test -s conftest.err; then
9117     ac_cpp_err=$ac_c_preproc_warn_flag
9118     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9119   else
9120     ac_cpp_err=
9121   fi
9122 else
9123   ac_cpp_err=yes
9124 fi
9125 if test -z "$ac_cpp_err"; then
9126   ac_header_preproc=yes
9127 else
9128   echo "$as_me: failed program was:" >&5
9129 sed 's/^/| /' conftest.$ac_ext >&5
9130
9131   ac_header_preproc=no
9132 fi
9133 rm -f conftest.err conftest.$ac_ext
9134 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9135 echo "${ECHO_T}$ac_header_preproc" >&6
9136
9137 # So?  What about this header?
9138 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9139   yes:no: )
9140     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9141 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9142     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9143 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9144     ac_header_preproc=yes
9145     ;;
9146   no:yes:* )
9147     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9148 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9149     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9150 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9151     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9152 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9153     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9154 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9155     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9156 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9157     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9158 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9159     (
9160       cat <<\_ASBOX
9161 ## ---------------------------------------- ##
9162 ## Report this to pgsql-bugs@postgresql.org ##
9163 ## ---------------------------------------- ##
9164 _ASBOX
9165     ) |
9166       sed "s/^/$as_me: WARNING:     /" >&2
9167     ;;
9168 esac
9169 echo "$as_me:$LINENO: checking for $ac_header" >&5
9170 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9171 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9172   echo $ECHO_N "(cached) $ECHO_C" >&6
9173 else
9174   eval "$as_ac_Header=\$ac_header_preproc"
9175 fi
9176 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9177 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9178
9179 fi
9180 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9181   cat >>confdefs.h <<_ACEOF
9182 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9183 _ACEOF
9184
9185 else
9186
9187 for ac_header in readline/readline.h
9188 do
9189 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9190 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9191   echo "$as_me:$LINENO: checking for $ac_header" >&5
9192 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9193 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9194   echo $ECHO_N "(cached) $ECHO_C" >&6
9195 fi
9196 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9197 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9198 else
9199   # Is the header compilable?
9200 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9201 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9202 cat >conftest.$ac_ext <<_ACEOF
9203 /* confdefs.h.  */
9204 _ACEOF
9205 cat confdefs.h >>conftest.$ac_ext
9206 cat >>conftest.$ac_ext <<_ACEOF
9207 /* end confdefs.h.  */
9208 $ac_includes_default
9209 #include <$ac_header>
9210 _ACEOF
9211 rm -f conftest.$ac_objext
9212 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9213   (eval $ac_compile) 2>conftest.er1
9214   ac_status=$?
9215   grep -v '^ *+' conftest.er1 >conftest.err
9216   rm -f conftest.er1
9217   cat conftest.err >&5
9218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9219   (exit $ac_status); } &&
9220          { ac_try='test -z "$ac_c_werror_flag"
9221                          || test ! -s conftest.err'
9222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9223   (eval $ac_try) 2>&5
9224   ac_status=$?
9225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9226   (exit $ac_status); }; } &&
9227          { ac_try='test -s conftest.$ac_objext'
9228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9229   (eval $ac_try) 2>&5
9230   ac_status=$?
9231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9232   (exit $ac_status); }; }; then
9233   ac_header_compiler=yes
9234 else
9235   echo "$as_me: failed program was:" >&5
9236 sed 's/^/| /' conftest.$ac_ext >&5
9237
9238 ac_header_compiler=no
9239 fi
9240 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9241 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9242 echo "${ECHO_T}$ac_header_compiler" >&6
9243
9244 # Is the header present?
9245 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9246 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9247 cat >conftest.$ac_ext <<_ACEOF
9248 /* confdefs.h.  */
9249 _ACEOF
9250 cat confdefs.h >>conftest.$ac_ext
9251 cat >>conftest.$ac_ext <<_ACEOF
9252 /* end confdefs.h.  */
9253 #include <$ac_header>
9254 _ACEOF
9255 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9256   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9257   ac_status=$?
9258   grep -v '^ *+' conftest.er1 >conftest.err
9259   rm -f conftest.er1
9260   cat conftest.err >&5
9261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9262   (exit $ac_status); } >/dev/null; then
9263   if test -s conftest.err; then
9264     ac_cpp_err=$ac_c_preproc_warn_flag
9265     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9266   else
9267     ac_cpp_err=
9268   fi
9269 else
9270   ac_cpp_err=yes
9271 fi
9272 if test -z "$ac_cpp_err"; then
9273   ac_header_preproc=yes
9274 else
9275   echo "$as_me: failed program was:" >&5
9276 sed 's/^/| /' conftest.$ac_ext >&5
9277
9278   ac_header_preproc=no
9279 fi
9280 rm -f conftest.err conftest.$ac_ext
9281 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9282 echo "${ECHO_T}$ac_header_preproc" >&6
9283
9284 # So?  What about this header?
9285 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9286   yes:no: )
9287     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9288 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9289     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9290 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9291     ac_header_preproc=yes
9292     ;;
9293   no:yes:* )
9294     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9295 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9296     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9297 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9298     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9299 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9300     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9301 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9302     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9303 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9304     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9305 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9306     (
9307       cat <<\_ASBOX
9308 ## ---------------------------------------- ##
9309 ## Report this to pgsql-bugs@postgresql.org ##
9310 ## ---------------------------------------- ##
9311 _ASBOX
9312     ) |
9313       sed "s/^/$as_me: WARNING:     /" >&2
9314     ;;
9315 esac
9316 echo "$as_me:$LINENO: checking for $ac_header" >&5
9317 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9318 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9319   echo $ECHO_N "(cached) $ECHO_C" >&6
9320 else
9321   eval "$as_ac_Header=\$ac_header_preproc"
9322 fi
9323 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9324 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9325
9326 fi
9327 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9328   cat >>confdefs.h <<_ACEOF
9329 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9330 _ACEOF
9331
9332 else
9333   { { echo "$as_me:$LINENO: error: readline header not found
9334 If you have libedit already installed, see config.log for details on the
9335 failure.  It is possible the compiler isn't looking in the proper directory.
9336 Use --without-readline to disable libedit support." >&5
9337 echo "$as_me: error: readline header not found
9338 If you have libedit already installed, see config.log for details on the
9339 failure.  It is possible the compiler isn't looking in the proper directory.
9340 Use --without-readline to disable libedit support." >&2;}
9341    { (exit 1); exit 1; }; }
9342 fi
9343
9344 done
9345
9346 fi
9347
9348 done
9349
9350 fi
9351
9352 done
9353
9354
9355 for ac_header in editline/history.h
9356 do
9357 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9358 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9359   echo "$as_me:$LINENO: checking for $ac_header" >&5
9360 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9361 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9362   echo $ECHO_N "(cached) $ECHO_C" >&6
9363 fi
9364 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9365 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9366 else
9367   # Is the header compilable?
9368 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9369 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9370 cat >conftest.$ac_ext <<_ACEOF
9371 /* confdefs.h.  */
9372 _ACEOF
9373 cat confdefs.h >>conftest.$ac_ext
9374 cat >>conftest.$ac_ext <<_ACEOF
9375 /* end confdefs.h.  */
9376 $ac_includes_default
9377 #include <$ac_header>
9378 _ACEOF
9379 rm -f conftest.$ac_objext
9380 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9381   (eval $ac_compile) 2>conftest.er1
9382   ac_status=$?
9383   grep -v '^ *+' conftest.er1 >conftest.err
9384   rm -f conftest.er1
9385   cat conftest.err >&5
9386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9387   (exit $ac_status); } &&
9388          { ac_try='test -z "$ac_c_werror_flag"
9389                          || test ! -s conftest.err'
9390   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9391   (eval $ac_try) 2>&5
9392   ac_status=$?
9393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9394   (exit $ac_status); }; } &&
9395          { ac_try='test -s conftest.$ac_objext'
9396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9397   (eval $ac_try) 2>&5
9398   ac_status=$?
9399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9400   (exit $ac_status); }; }; then
9401   ac_header_compiler=yes
9402 else
9403   echo "$as_me: failed program was:" >&5
9404 sed 's/^/| /' conftest.$ac_ext >&5
9405
9406 ac_header_compiler=no
9407 fi
9408 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9409 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9410 echo "${ECHO_T}$ac_header_compiler" >&6
9411
9412 # Is the header present?
9413 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9414 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9415 cat >conftest.$ac_ext <<_ACEOF
9416 /* confdefs.h.  */
9417 _ACEOF
9418 cat confdefs.h >>conftest.$ac_ext
9419 cat >>conftest.$ac_ext <<_ACEOF
9420 /* end confdefs.h.  */
9421 #include <$ac_header>
9422 _ACEOF
9423 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9424   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9425   ac_status=$?
9426   grep -v '^ *+' conftest.er1 >conftest.err
9427   rm -f conftest.er1
9428   cat conftest.err >&5
9429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9430   (exit $ac_status); } >/dev/null; then
9431   if test -s conftest.err; then
9432     ac_cpp_err=$ac_c_preproc_warn_flag
9433     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9434   else
9435     ac_cpp_err=
9436   fi
9437 else
9438   ac_cpp_err=yes
9439 fi
9440 if test -z "$ac_cpp_err"; then
9441   ac_header_preproc=yes
9442 else
9443   echo "$as_me: failed program was:" >&5
9444 sed 's/^/| /' conftest.$ac_ext >&5
9445
9446   ac_header_preproc=no
9447 fi
9448 rm -f conftest.err conftest.$ac_ext
9449 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9450 echo "${ECHO_T}$ac_header_preproc" >&6
9451
9452 # So?  What about this header?
9453 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9454   yes:no: )
9455     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9456 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9457     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9458 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9459     ac_header_preproc=yes
9460     ;;
9461   no:yes:* )
9462     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9463 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9464     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9465 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9466     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9467 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9468     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9469 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9470     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9471 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9472     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9473 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9474     (
9475       cat <<\_ASBOX
9476 ## ---------------------------------------- ##
9477 ## Report this to pgsql-bugs@postgresql.org ##
9478 ## ---------------------------------------- ##
9479 _ASBOX
9480     ) |
9481       sed "s/^/$as_me: WARNING:     /" >&2
9482     ;;
9483 esac
9484 echo "$as_me:$LINENO: checking for $ac_header" >&5
9485 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9486 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9487   echo $ECHO_N "(cached) $ECHO_C" >&6
9488 else
9489   eval "$as_ac_Header=\$ac_header_preproc"
9490 fi
9491 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9492 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9493
9494 fi
9495 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9496   cat >>confdefs.h <<_ACEOF
9497 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9498 _ACEOF
9499
9500 else
9501
9502 for ac_header in history.h
9503 do
9504 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9505 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9506   echo "$as_me:$LINENO: checking for $ac_header" >&5
9507 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9508 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9509   echo $ECHO_N "(cached) $ECHO_C" >&6
9510 fi
9511 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9512 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9513 else
9514   # Is the header compilable?
9515 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9516 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9517 cat >conftest.$ac_ext <<_ACEOF
9518 /* confdefs.h.  */
9519 _ACEOF
9520 cat confdefs.h >>conftest.$ac_ext
9521 cat >>conftest.$ac_ext <<_ACEOF
9522 /* end confdefs.h.  */
9523 $ac_includes_default
9524 #include <$ac_header>
9525 _ACEOF
9526 rm -f conftest.$ac_objext
9527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9528   (eval $ac_compile) 2>conftest.er1
9529   ac_status=$?
9530   grep -v '^ *+' conftest.er1 >conftest.err
9531   rm -f conftest.er1
9532   cat conftest.err >&5
9533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9534   (exit $ac_status); } &&
9535          { ac_try='test -z "$ac_c_werror_flag"
9536                          || test ! -s conftest.err'
9537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9538   (eval $ac_try) 2>&5
9539   ac_status=$?
9540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9541   (exit $ac_status); }; } &&
9542          { ac_try='test -s conftest.$ac_objext'
9543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9544   (eval $ac_try) 2>&5
9545   ac_status=$?
9546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547   (exit $ac_status); }; }; then
9548   ac_header_compiler=yes
9549 else
9550   echo "$as_me: failed program was:" >&5
9551 sed 's/^/| /' conftest.$ac_ext >&5
9552
9553 ac_header_compiler=no
9554 fi
9555 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9556 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9557 echo "${ECHO_T}$ac_header_compiler" >&6
9558
9559 # Is the header present?
9560 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9561 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9562 cat >conftest.$ac_ext <<_ACEOF
9563 /* confdefs.h.  */
9564 _ACEOF
9565 cat confdefs.h >>conftest.$ac_ext
9566 cat >>conftest.$ac_ext <<_ACEOF
9567 /* end confdefs.h.  */
9568 #include <$ac_header>
9569 _ACEOF
9570 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9571   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9572   ac_status=$?
9573   grep -v '^ *+' conftest.er1 >conftest.err
9574   rm -f conftest.er1
9575   cat conftest.err >&5
9576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9577   (exit $ac_status); } >/dev/null; then
9578   if test -s conftest.err; then
9579     ac_cpp_err=$ac_c_preproc_warn_flag
9580     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9581   else
9582     ac_cpp_err=
9583   fi
9584 else
9585   ac_cpp_err=yes
9586 fi
9587 if test -z "$ac_cpp_err"; then
9588   ac_header_preproc=yes
9589 else
9590   echo "$as_me: failed program was:" >&5
9591 sed 's/^/| /' conftest.$ac_ext >&5
9592
9593   ac_header_preproc=no
9594 fi
9595 rm -f conftest.err conftest.$ac_ext
9596 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9597 echo "${ECHO_T}$ac_header_preproc" >&6
9598
9599 # So?  What about this header?
9600 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9601   yes:no: )
9602     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9603 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9604     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9605 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9606     ac_header_preproc=yes
9607     ;;
9608   no:yes:* )
9609     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9610 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9611     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9612 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9613     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9614 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9615     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9616 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9617     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9618 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9619     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9620 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9621     (
9622       cat <<\_ASBOX
9623 ## ---------------------------------------- ##
9624 ## Report this to pgsql-bugs@postgresql.org ##
9625 ## ---------------------------------------- ##
9626 _ASBOX
9627     ) |
9628       sed "s/^/$as_me: WARNING:     /" >&2
9629     ;;
9630 esac
9631 echo "$as_me:$LINENO: checking for $ac_header" >&5
9632 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9633 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9634   echo $ECHO_N "(cached) $ECHO_C" >&6
9635 else
9636   eval "$as_ac_Header=\$ac_header_preproc"
9637 fi
9638 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9639 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9640
9641 fi
9642 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9643   cat >>confdefs.h <<_ACEOF
9644 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9645 _ACEOF
9646
9647 else
9648
9649 for ac_header in readline/history.h
9650 do
9651 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9652 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9653   echo "$as_me:$LINENO: checking for $ac_header" >&5
9654 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9655 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9656   echo $ECHO_N "(cached) $ECHO_C" >&6
9657 fi
9658 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9659 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9660 else
9661   # Is the header compilable?
9662 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9663 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9664 cat >conftest.$ac_ext <<_ACEOF
9665 /* confdefs.h.  */
9666 _ACEOF
9667 cat confdefs.h >>conftest.$ac_ext
9668 cat >>conftest.$ac_ext <<_ACEOF
9669 /* end confdefs.h.  */
9670 $ac_includes_default
9671 #include <$ac_header>
9672 _ACEOF
9673 rm -f conftest.$ac_objext
9674 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9675   (eval $ac_compile) 2>conftest.er1
9676   ac_status=$?
9677   grep -v '^ *+' conftest.er1 >conftest.err
9678   rm -f conftest.er1
9679   cat conftest.err >&5
9680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9681   (exit $ac_status); } &&
9682          { ac_try='test -z "$ac_c_werror_flag"
9683                          || test ! -s conftest.err'
9684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9685   (eval $ac_try) 2>&5
9686   ac_status=$?
9687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9688   (exit $ac_status); }; } &&
9689          { ac_try='test -s conftest.$ac_objext'
9690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9691   (eval $ac_try) 2>&5
9692   ac_status=$?
9693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9694   (exit $ac_status); }; }; then
9695   ac_header_compiler=yes
9696 else
9697   echo "$as_me: failed program was:" >&5
9698 sed 's/^/| /' conftest.$ac_ext >&5
9699
9700 ac_header_compiler=no
9701 fi
9702 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9703 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9704 echo "${ECHO_T}$ac_header_compiler" >&6
9705
9706 # Is the header present?
9707 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9708 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9709 cat >conftest.$ac_ext <<_ACEOF
9710 /* confdefs.h.  */
9711 _ACEOF
9712 cat confdefs.h >>conftest.$ac_ext
9713 cat >>conftest.$ac_ext <<_ACEOF
9714 /* end confdefs.h.  */
9715 #include <$ac_header>
9716 _ACEOF
9717 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9718   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9719   ac_status=$?
9720   grep -v '^ *+' conftest.er1 >conftest.err
9721   rm -f conftest.er1
9722   cat conftest.err >&5
9723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9724   (exit $ac_status); } >/dev/null; then
9725   if test -s conftest.err; then
9726     ac_cpp_err=$ac_c_preproc_warn_flag
9727     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9728   else
9729     ac_cpp_err=
9730   fi
9731 else
9732   ac_cpp_err=yes
9733 fi
9734 if test -z "$ac_cpp_err"; then
9735   ac_header_preproc=yes
9736 else
9737   echo "$as_me: failed program was:" >&5
9738 sed 's/^/| /' conftest.$ac_ext >&5
9739
9740   ac_header_preproc=no
9741 fi
9742 rm -f conftest.err conftest.$ac_ext
9743 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9744 echo "${ECHO_T}$ac_header_preproc" >&6
9745
9746 # So?  What about this header?
9747 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9748   yes:no: )
9749     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9750 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9751     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9752 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9753     ac_header_preproc=yes
9754     ;;
9755   no:yes:* )
9756     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9757 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9758     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9759 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9760     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9761 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9762     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9763 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9764     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9765 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9766     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9767 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9768     (
9769       cat <<\_ASBOX
9770 ## ---------------------------------------- ##
9771 ## Report this to pgsql-bugs@postgresql.org ##
9772 ## ---------------------------------------- ##
9773 _ASBOX
9774     ) |
9775       sed "s/^/$as_me: WARNING:     /" >&2
9776     ;;
9777 esac
9778 echo "$as_me:$LINENO: checking for $ac_header" >&5
9779 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9780 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9781   echo $ECHO_N "(cached) $ECHO_C" >&6
9782 else
9783   eval "$as_ac_Header=\$ac_header_preproc"
9784 fi
9785 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9786 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9787
9788 fi
9789 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9790   cat >>confdefs.h <<_ACEOF
9791 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9792 _ACEOF
9793
9794 else
9795   { { echo "$as_me:$LINENO: error: history header not found
9796 If you have libedit already installed, see config.log for details on the
9797 failure.  It is possible the compiler isn't looking in the proper directory.
9798 Use --without-readline to disable libedit support." >&5
9799 echo "$as_me: error: history header not found
9800 If you have libedit already installed, see config.log for details on the
9801 failure.  It is possible the compiler isn't looking in the proper directory.
9802 Use --without-readline to disable libedit support." >&2;}
9803    { (exit 1); exit 1; }; }
9804 fi
9805
9806 done
9807
9808 fi
9809
9810 done
9811
9812 fi
9813
9814 done
9815
9816 fi
9817
9818 if test "$with_zlib" = yes; then
9819   if test "${ac_cv_header_zlib_h+set}" = set; then
9820   echo "$as_me:$LINENO: checking for zlib.h" >&5
9821 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9822 if test "${ac_cv_header_zlib_h+set}" = set; then
9823   echo $ECHO_N "(cached) $ECHO_C" >&6
9824 fi
9825 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9826 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9827 else
9828   # Is the header compilable?
9829 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9830 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9831 cat >conftest.$ac_ext <<_ACEOF
9832 /* confdefs.h.  */
9833 _ACEOF
9834 cat confdefs.h >>conftest.$ac_ext
9835 cat >>conftest.$ac_ext <<_ACEOF
9836 /* end confdefs.h.  */
9837 $ac_includes_default
9838 #include <zlib.h>
9839 _ACEOF
9840 rm -f conftest.$ac_objext
9841 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9842   (eval $ac_compile) 2>conftest.er1
9843   ac_status=$?
9844   grep -v '^ *+' conftest.er1 >conftest.err
9845   rm -f conftest.er1
9846   cat conftest.err >&5
9847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9848   (exit $ac_status); } &&
9849          { ac_try='test -z "$ac_c_werror_flag"
9850                          || test ! -s conftest.err'
9851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9852   (eval $ac_try) 2>&5
9853   ac_status=$?
9854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9855   (exit $ac_status); }; } &&
9856          { ac_try='test -s conftest.$ac_objext'
9857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9858   (eval $ac_try) 2>&5
9859   ac_status=$?
9860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9861   (exit $ac_status); }; }; then
9862   ac_header_compiler=yes
9863 else
9864   echo "$as_me: failed program was:" >&5
9865 sed 's/^/| /' conftest.$ac_ext >&5
9866
9867 ac_header_compiler=no
9868 fi
9869 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9870 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9871 echo "${ECHO_T}$ac_header_compiler" >&6
9872
9873 # Is the header present?
9874 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9875 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9876 cat >conftest.$ac_ext <<_ACEOF
9877 /* confdefs.h.  */
9878 _ACEOF
9879 cat confdefs.h >>conftest.$ac_ext
9880 cat >>conftest.$ac_ext <<_ACEOF
9881 /* end confdefs.h.  */
9882 #include <zlib.h>
9883 _ACEOF
9884 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9885   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9886   ac_status=$?
9887   grep -v '^ *+' conftest.er1 >conftest.err
9888   rm -f conftest.er1
9889   cat conftest.err >&5
9890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9891   (exit $ac_status); } >/dev/null; then
9892   if test -s conftest.err; then
9893     ac_cpp_err=$ac_c_preproc_warn_flag
9894     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9895   else
9896     ac_cpp_err=
9897   fi
9898 else
9899   ac_cpp_err=yes
9900 fi
9901 if test -z "$ac_cpp_err"; then
9902   ac_header_preproc=yes
9903 else
9904   echo "$as_me: failed program was:" >&5
9905 sed 's/^/| /' conftest.$ac_ext >&5
9906
9907   ac_header_preproc=no
9908 fi
9909 rm -f conftest.err conftest.$ac_ext
9910 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9911 echo "${ECHO_T}$ac_header_preproc" >&6
9912
9913 # So?  What about this header?
9914 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9915   yes:no: )
9916     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9917 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9918     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9919 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9920     ac_header_preproc=yes
9921     ;;
9922   no:yes:* )
9923     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9924 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9925     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9926 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9927     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9928 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9929     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9930 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9931     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9932 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9933     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9934 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9935     (
9936       cat <<\_ASBOX
9937 ## ---------------------------------------- ##
9938 ## Report this to pgsql-bugs@postgresql.org ##
9939 ## ---------------------------------------- ##
9940 _ASBOX
9941     ) |
9942       sed "s/^/$as_me: WARNING:     /" >&2
9943     ;;
9944 esac
9945 echo "$as_me:$LINENO: checking for zlib.h" >&5
9946 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9947 if test "${ac_cv_header_zlib_h+set}" = set; then
9948   echo $ECHO_N "(cached) $ECHO_C" >&6
9949 else
9950   ac_cv_header_zlib_h=$ac_header_preproc
9951 fi
9952 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9953 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9954
9955 fi
9956 if test $ac_cv_header_zlib_h = yes; then
9957   :
9958 else
9959   { { echo "$as_me:$LINENO: error: zlib header not found
9960 If you have zlib already installed, see config.log for details on the
9961 failure.  It is possible the compiler isn't looking in the proper directory.
9962 Use --without-zlib to disable zlib support." >&5
9963 echo "$as_me: error: zlib header not found
9964 If you have zlib already installed, see config.log for details on the
9965 failure.  It is possible the compiler isn't looking in the proper directory.
9966 Use --without-zlib to disable zlib support." >&2;}
9967    { (exit 1); exit 1; }; }
9968 fi
9969
9970
9971 fi
9972
9973 if test "$with_krb5" = yes ; then
9974   if test "${ac_cv_header_krb5_h+set}" = set; then
9975   echo "$as_me:$LINENO: checking for krb5.h" >&5
9976 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9977 if test "${ac_cv_header_krb5_h+set}" = set; then
9978   echo $ECHO_N "(cached) $ECHO_C" >&6
9979 fi
9980 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9981 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9982 else
9983   # Is the header compilable?
9984 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9985 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9986 cat >conftest.$ac_ext <<_ACEOF
9987 /* confdefs.h.  */
9988 _ACEOF
9989 cat confdefs.h >>conftest.$ac_ext
9990 cat >>conftest.$ac_ext <<_ACEOF
9991 /* end confdefs.h.  */
9992 $ac_includes_default
9993 #include <krb5.h>
9994 _ACEOF
9995 rm -f conftest.$ac_objext
9996 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9997   (eval $ac_compile) 2>conftest.er1
9998   ac_status=$?
9999   grep -v '^ *+' conftest.er1 >conftest.err
10000   rm -f conftest.er1
10001   cat conftest.err >&5
10002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003   (exit $ac_status); } &&
10004          { ac_try='test -z "$ac_c_werror_flag"
10005                          || test ! -s conftest.err'
10006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10007   (eval $ac_try) 2>&5
10008   ac_status=$?
10009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10010   (exit $ac_status); }; } &&
10011          { ac_try='test -s conftest.$ac_objext'
10012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10013   (eval $ac_try) 2>&5
10014   ac_status=$?
10015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10016   (exit $ac_status); }; }; then
10017   ac_header_compiler=yes
10018 else
10019   echo "$as_me: failed program was:" >&5
10020 sed 's/^/| /' conftest.$ac_ext >&5
10021
10022 ac_header_compiler=no
10023 fi
10024 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10025 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10026 echo "${ECHO_T}$ac_header_compiler" >&6
10027
10028 # Is the header present?
10029 echo "$as_me:$LINENO: checking krb5.h presence" >&5
10030 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
10031 cat >conftest.$ac_ext <<_ACEOF
10032 /* confdefs.h.  */
10033 _ACEOF
10034 cat confdefs.h >>conftest.$ac_ext
10035 cat >>conftest.$ac_ext <<_ACEOF
10036 /* end confdefs.h.  */
10037 #include <krb5.h>
10038 _ACEOF
10039 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10040   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10041   ac_status=$?
10042   grep -v '^ *+' conftest.er1 >conftest.err
10043   rm -f conftest.er1
10044   cat conftest.err >&5
10045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10046   (exit $ac_status); } >/dev/null; then
10047   if test -s conftest.err; then
10048     ac_cpp_err=$ac_c_preproc_warn_flag
10049     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10050   else
10051     ac_cpp_err=
10052   fi
10053 else
10054   ac_cpp_err=yes
10055 fi
10056 if test -z "$ac_cpp_err"; then
10057   ac_header_preproc=yes
10058 else
10059   echo "$as_me: failed program was:" >&5
10060 sed 's/^/| /' conftest.$ac_ext >&5
10061
10062   ac_header_preproc=no
10063 fi
10064 rm -f conftest.err conftest.$ac_ext
10065 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10066 echo "${ECHO_T}$ac_header_preproc" >&6
10067
10068 # So?  What about this header?
10069 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10070   yes:no: )
10071     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
10072 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10073     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
10074 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
10075     ac_header_preproc=yes
10076     ;;
10077   no:yes:* )
10078     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
10079 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
10080     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
10081 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
10082     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
10083 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
10084     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
10085 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10086     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
10087 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
10088     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
10089 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
10090     (
10091       cat <<\_ASBOX
10092 ## ---------------------------------------- ##
10093 ## Report this to pgsql-bugs@postgresql.org ##
10094 ## ---------------------------------------- ##
10095 _ASBOX
10096     ) |
10097       sed "s/^/$as_me: WARNING:     /" >&2
10098     ;;
10099 esac
10100 echo "$as_me:$LINENO: checking for krb5.h" >&5
10101 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10102 if test "${ac_cv_header_krb5_h+set}" = set; then
10103   echo $ECHO_N "(cached) $ECHO_C" >&6
10104 else
10105   ac_cv_header_krb5_h=$ac_header_preproc
10106 fi
10107 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10108 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10109
10110 fi
10111 if test $ac_cv_header_krb5_h = yes; then
10112   :
10113 else
10114   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
10115 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
10116    { (exit 1); exit 1; }; }
10117 fi
10118
10119
10120 fi
10121
10122 if test "$with_openssl" = yes ; then
10123   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10124   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10125 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10126 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10127   echo $ECHO_N "(cached) $ECHO_C" >&6
10128 fi
10129 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10130 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10131 else
10132   # Is the header compilable?
10133 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
10134 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
10135 cat >conftest.$ac_ext <<_ACEOF
10136 /* confdefs.h.  */
10137 _ACEOF
10138 cat confdefs.h >>conftest.$ac_ext
10139 cat >>conftest.$ac_ext <<_ACEOF
10140 /* end confdefs.h.  */
10141 $ac_includes_default
10142 #include <openssl/ssl.h>
10143 _ACEOF
10144 rm -f conftest.$ac_objext
10145 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10146   (eval $ac_compile) 2>conftest.er1
10147   ac_status=$?
10148   grep -v '^ *+' conftest.er1 >conftest.err
10149   rm -f conftest.er1
10150   cat conftest.err >&5
10151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10152   (exit $ac_status); } &&
10153          { ac_try='test -z "$ac_c_werror_flag"
10154                          || test ! -s conftest.err'
10155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10156   (eval $ac_try) 2>&5
10157   ac_status=$?
10158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10159   (exit $ac_status); }; } &&
10160          { ac_try='test -s conftest.$ac_objext'
10161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10162   (eval $ac_try) 2>&5
10163   ac_status=$?
10164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10165   (exit $ac_status); }; }; then
10166   ac_header_compiler=yes
10167 else
10168   echo "$as_me: failed program was:" >&5
10169 sed 's/^/| /' conftest.$ac_ext >&5
10170
10171 ac_header_compiler=no
10172 fi
10173 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10174 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10175 echo "${ECHO_T}$ac_header_compiler" >&6
10176
10177 # Is the header present?
10178 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10179 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
10180 cat >conftest.$ac_ext <<_ACEOF
10181 /* confdefs.h.  */
10182 _ACEOF
10183 cat confdefs.h >>conftest.$ac_ext
10184 cat >>conftest.$ac_ext <<_ACEOF
10185 /* end confdefs.h.  */
10186 #include <openssl/ssl.h>
10187 _ACEOF
10188 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10189   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10190   ac_status=$?
10191   grep -v '^ *+' conftest.er1 >conftest.err
10192   rm -f conftest.er1
10193   cat conftest.err >&5
10194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10195   (exit $ac_status); } >/dev/null; then
10196   if test -s conftest.err; then
10197     ac_cpp_err=$ac_c_preproc_warn_flag
10198     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10199   else
10200     ac_cpp_err=
10201   fi
10202 else
10203   ac_cpp_err=yes
10204 fi
10205 if test -z "$ac_cpp_err"; then
10206   ac_header_preproc=yes
10207 else
10208   echo "$as_me: failed program was:" >&5
10209 sed 's/^/| /' conftest.$ac_ext >&5
10210
10211   ac_header_preproc=no
10212 fi
10213 rm -f conftest.err conftest.$ac_ext
10214 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10215 echo "${ECHO_T}$ac_header_preproc" >&6
10216
10217 # So?  What about this header?
10218 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10219   yes:no: )
10220     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10221 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10222     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10223 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10224     ac_header_preproc=yes
10225     ;;
10226   no:yes:* )
10227     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10228 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10229     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10230 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10231     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10232 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10233     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10234 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10235     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10236 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10237     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10238 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10239     (
10240       cat <<\_ASBOX
10241 ## ---------------------------------------- ##
10242 ## Report this to pgsql-bugs@postgresql.org ##
10243 ## ---------------------------------------- ##
10244 _ASBOX
10245     ) |
10246       sed "s/^/$as_me: WARNING:     /" >&2
10247     ;;
10248 esac
10249 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10250 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10251 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10252   echo $ECHO_N "(cached) $ECHO_C" >&6
10253 else
10254   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10255 fi
10256 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10257 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10258
10259 fi
10260 if test $ac_cv_header_openssl_ssl_h = yes; then
10261   :
10262 else
10263   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10264 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10265    { (exit 1); exit 1; }; }
10266 fi
10267
10268
10269   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10270   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10271 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10272 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10273   echo $ECHO_N "(cached) $ECHO_C" >&6
10274 fi
10275 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10276 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10277 else
10278   # Is the header compilable?
10279 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10280 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10281 cat >conftest.$ac_ext <<_ACEOF
10282 /* confdefs.h.  */
10283 _ACEOF
10284 cat confdefs.h >>conftest.$ac_ext
10285 cat >>conftest.$ac_ext <<_ACEOF
10286 /* end confdefs.h.  */
10287 $ac_includes_default
10288 #include <openssl/err.h>
10289 _ACEOF
10290 rm -f conftest.$ac_objext
10291 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10292   (eval $ac_compile) 2>conftest.er1
10293   ac_status=$?
10294   grep -v '^ *+' conftest.er1 >conftest.err
10295   rm -f conftest.er1
10296   cat conftest.err >&5
10297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10298   (exit $ac_status); } &&
10299          { ac_try='test -z "$ac_c_werror_flag"
10300                          || test ! -s conftest.err'
10301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10302   (eval $ac_try) 2>&5
10303   ac_status=$?
10304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10305   (exit $ac_status); }; } &&
10306          { ac_try='test -s conftest.$ac_objext'
10307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10308   (eval $ac_try) 2>&5
10309   ac_status=$?
10310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311   (exit $ac_status); }; }; then
10312   ac_header_compiler=yes
10313 else
10314   echo "$as_me: failed program was:" >&5
10315 sed 's/^/| /' conftest.$ac_ext >&5
10316
10317 ac_header_compiler=no
10318 fi
10319 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10320 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10321 echo "${ECHO_T}$ac_header_compiler" >&6
10322
10323 # Is the header present?
10324 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10325 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10326 cat >conftest.$ac_ext <<_ACEOF
10327 /* confdefs.h.  */
10328 _ACEOF
10329 cat confdefs.h >>conftest.$ac_ext
10330 cat >>conftest.$ac_ext <<_ACEOF
10331 /* end confdefs.h.  */
10332 #include <openssl/err.h>
10333 _ACEOF
10334 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10335   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10336   ac_status=$?
10337   grep -v '^ *+' conftest.er1 >conftest.err
10338   rm -f conftest.er1
10339   cat conftest.err >&5
10340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10341   (exit $ac_status); } >/dev/null; then
10342   if test -s conftest.err; then
10343     ac_cpp_err=$ac_c_preproc_warn_flag
10344     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10345   else
10346     ac_cpp_err=
10347   fi
10348 else
10349   ac_cpp_err=yes
10350 fi
10351 if test -z "$ac_cpp_err"; then
10352   ac_header_preproc=yes
10353 else
10354   echo "$as_me: failed program was:" >&5
10355 sed 's/^/| /' conftest.$ac_ext >&5
10356
10357   ac_header_preproc=no
10358 fi
10359 rm -f conftest.err conftest.$ac_ext
10360 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10361 echo "${ECHO_T}$ac_header_preproc" >&6
10362
10363 # So?  What about this header?
10364 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10365   yes:no: )
10366     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10367 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10368     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10369 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10370     ac_header_preproc=yes
10371     ;;
10372   no:yes:* )
10373     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10374 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10375     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10376 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10377     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10378 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10379     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10380 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10381     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10382 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10383     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10384 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10385     (
10386       cat <<\_ASBOX
10387 ## ---------------------------------------- ##
10388 ## Report this to pgsql-bugs@postgresql.org ##
10389 ## ---------------------------------------- ##
10390 _ASBOX
10391     ) |
10392       sed "s/^/$as_me: WARNING:     /" >&2
10393     ;;
10394 esac
10395 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10396 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10397 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10398   echo $ECHO_N "(cached) $ECHO_C" >&6
10399 else
10400   ac_cv_header_openssl_err_h=$ac_header_preproc
10401 fi
10402 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10403 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10404
10405 fi
10406 if test $ac_cv_header_openssl_err_h = yes; then
10407   :
10408 else
10409   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10410 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10411    { (exit 1); exit 1; }; }
10412 fi
10413
10414
10415 fi
10416
10417 if test "$with_pam" = yes ; then
10418
10419 for ac_header in security/pam_appl.h
10420 do
10421 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10423   echo "$as_me:$LINENO: checking for $ac_header" >&5
10424 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10425 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10426   echo $ECHO_N "(cached) $ECHO_C" >&6
10427 fi
10428 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10429 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10430 else
10431   # Is the header compilable?
10432 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10433 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10434 cat >conftest.$ac_ext <<_ACEOF
10435 /* confdefs.h.  */
10436 _ACEOF
10437 cat confdefs.h >>conftest.$ac_ext
10438 cat >>conftest.$ac_ext <<_ACEOF
10439 /* end confdefs.h.  */
10440 $ac_includes_default
10441 #include <$ac_header>
10442 _ACEOF
10443 rm -f conftest.$ac_objext
10444 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10445   (eval $ac_compile) 2>conftest.er1
10446   ac_status=$?
10447   grep -v '^ *+' conftest.er1 >conftest.err
10448   rm -f conftest.er1
10449   cat conftest.err >&5
10450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10451   (exit $ac_status); } &&
10452          { ac_try='test -z "$ac_c_werror_flag"
10453                          || test ! -s conftest.err'
10454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10455   (eval $ac_try) 2>&5
10456   ac_status=$?
10457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10458   (exit $ac_status); }; } &&
10459          { ac_try='test -s conftest.$ac_objext'
10460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10461   (eval $ac_try) 2>&5
10462   ac_status=$?
10463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10464   (exit $ac_status); }; }; then
10465   ac_header_compiler=yes
10466 else
10467   echo "$as_me: failed program was:" >&5
10468 sed 's/^/| /' conftest.$ac_ext >&5
10469
10470 ac_header_compiler=no
10471 fi
10472 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10473 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10474 echo "${ECHO_T}$ac_header_compiler" >&6
10475
10476 # Is the header present?
10477 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10478 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10479 cat >conftest.$ac_ext <<_ACEOF
10480 /* confdefs.h.  */
10481 _ACEOF
10482 cat confdefs.h >>conftest.$ac_ext
10483 cat >>conftest.$ac_ext <<_ACEOF
10484 /* end confdefs.h.  */
10485 #include <$ac_header>
10486 _ACEOF
10487 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10488   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10489   ac_status=$?
10490   grep -v '^ *+' conftest.er1 >conftest.err
10491   rm -f conftest.er1
10492   cat conftest.err >&5
10493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10494   (exit $ac_status); } >/dev/null; then
10495   if test -s conftest.err; then
10496     ac_cpp_err=$ac_c_preproc_warn_flag
10497     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10498   else
10499     ac_cpp_err=
10500   fi
10501 else
10502   ac_cpp_err=yes
10503 fi
10504 if test -z "$ac_cpp_err"; then
10505   ac_header_preproc=yes
10506 else
10507   echo "$as_me: failed program was:" >&5
10508 sed 's/^/| /' conftest.$ac_ext >&5
10509
10510   ac_header_preproc=no
10511 fi
10512 rm -f conftest.err conftest.$ac_ext
10513 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10514 echo "${ECHO_T}$ac_header_preproc" >&6
10515
10516 # So?  What about this header?
10517 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10518   yes:no: )
10519     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10520 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10521     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10522 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10523     ac_header_preproc=yes
10524     ;;
10525   no:yes:* )
10526     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10527 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10528     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10529 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10530     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10531 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10532     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10533 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10534     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10535 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10536     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10537 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10538     (
10539       cat <<\_ASBOX
10540 ## ---------------------------------------- ##
10541 ## Report this to pgsql-bugs@postgresql.org ##
10542 ## ---------------------------------------- ##
10543 _ASBOX
10544     ) |
10545       sed "s/^/$as_me: WARNING:     /" >&2
10546     ;;
10547 esac
10548 echo "$as_me:$LINENO: checking for $ac_header" >&5
10549 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10550 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10551   echo $ECHO_N "(cached) $ECHO_C" >&6
10552 else
10553   eval "$as_ac_Header=\$ac_header_preproc"
10554 fi
10555 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10556 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10557
10558 fi
10559 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10560   cat >>confdefs.h <<_ACEOF
10561 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10562 _ACEOF
10563
10564 else
10565
10566 for ac_header in pam/pam_appl.h
10567 do
10568 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10569 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10570   echo "$as_me:$LINENO: checking for $ac_header" >&5
10571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10573   echo $ECHO_N "(cached) $ECHO_C" >&6
10574 fi
10575 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10576 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10577 else
10578   # Is the header compilable?
10579 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10580 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10581 cat >conftest.$ac_ext <<_ACEOF
10582 /* confdefs.h.  */
10583 _ACEOF
10584 cat confdefs.h >>conftest.$ac_ext
10585 cat >>conftest.$ac_ext <<_ACEOF
10586 /* end confdefs.h.  */
10587 $ac_includes_default
10588 #include <$ac_header>
10589 _ACEOF
10590 rm -f conftest.$ac_objext
10591 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10592   (eval $ac_compile) 2>conftest.er1
10593   ac_status=$?
10594   grep -v '^ *+' conftest.er1 >conftest.err
10595   rm -f conftest.er1
10596   cat conftest.err >&5
10597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10598   (exit $ac_status); } &&
10599          { ac_try='test -z "$ac_c_werror_flag"
10600                          || test ! -s conftest.err'
10601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10602   (eval $ac_try) 2>&5
10603   ac_status=$?
10604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10605   (exit $ac_status); }; } &&
10606          { ac_try='test -s conftest.$ac_objext'
10607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10608   (eval $ac_try) 2>&5
10609   ac_status=$?
10610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10611   (exit $ac_status); }; }; then
10612   ac_header_compiler=yes
10613 else
10614   echo "$as_me: failed program was:" >&5
10615 sed 's/^/| /' conftest.$ac_ext >&5
10616
10617 ac_header_compiler=no
10618 fi
10619 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10620 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10621 echo "${ECHO_T}$ac_header_compiler" >&6
10622
10623 # Is the header present?
10624 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10625 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10626 cat >conftest.$ac_ext <<_ACEOF
10627 /* confdefs.h.  */
10628 _ACEOF
10629 cat confdefs.h >>conftest.$ac_ext
10630 cat >>conftest.$ac_ext <<_ACEOF
10631 /* end confdefs.h.  */
10632 #include <$ac_header>
10633 _ACEOF
10634 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10636   ac_status=$?
10637   grep -v '^ *+' conftest.er1 >conftest.err
10638   rm -f conftest.er1
10639   cat conftest.err >&5
10640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10641   (exit $ac_status); } >/dev/null; then
10642   if test -s conftest.err; then
10643     ac_cpp_err=$ac_c_preproc_warn_flag
10644     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10645   else
10646     ac_cpp_err=
10647   fi
10648 else
10649   ac_cpp_err=yes
10650 fi
10651 if test -z "$ac_cpp_err"; then
10652   ac_header_preproc=yes
10653 else
10654   echo "$as_me: failed program was:" >&5
10655 sed 's/^/| /' conftest.$ac_ext >&5
10656
10657   ac_header_preproc=no
10658 fi
10659 rm -f conftest.err conftest.$ac_ext
10660 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10661 echo "${ECHO_T}$ac_header_preproc" >&6
10662
10663 # So?  What about this header?
10664 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10665   yes:no: )
10666     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10667 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10668     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10669 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10670     ac_header_preproc=yes
10671     ;;
10672   no:yes:* )
10673     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10674 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10675     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10676 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10677     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10678 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10679     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10680 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10681     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10682 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10683     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10684 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10685     (
10686       cat <<\_ASBOX
10687 ## ---------------------------------------- ##
10688 ## Report this to pgsql-bugs@postgresql.org ##
10689 ## ---------------------------------------- ##
10690 _ASBOX
10691     ) |
10692       sed "s/^/$as_me: WARNING:     /" >&2
10693     ;;
10694 esac
10695 echo "$as_me:$LINENO: checking for $ac_header" >&5
10696 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10697 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10698   echo $ECHO_N "(cached) $ECHO_C" >&6
10699 else
10700   eval "$as_ac_Header=\$ac_header_preproc"
10701 fi
10702 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10703 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10704
10705 fi
10706 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10707   cat >>confdefs.h <<_ACEOF
10708 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10709 _ACEOF
10710
10711 else
10712   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10713 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10714    { (exit 1); exit 1; }; }
10715 fi
10716
10717 done
10718
10719 fi
10720
10721 done
10722
10723 fi
10724
10725 if test "$with_bonjour" = yes ; then
10726   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10727   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10728 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10729 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10730   echo $ECHO_N "(cached) $ECHO_C" >&6
10731 fi
10732 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10733 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10734 else
10735   # Is the header compilable?
10736 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10737 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10738 cat >conftest.$ac_ext <<_ACEOF
10739 /* confdefs.h.  */
10740 _ACEOF
10741 cat confdefs.h >>conftest.$ac_ext
10742 cat >>conftest.$ac_ext <<_ACEOF
10743 /* end confdefs.h.  */
10744 $ac_includes_default
10745 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10746 _ACEOF
10747 rm -f conftest.$ac_objext
10748 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10749   (eval $ac_compile) 2>conftest.er1
10750   ac_status=$?
10751   grep -v '^ *+' conftest.er1 >conftest.err
10752   rm -f conftest.er1
10753   cat conftest.err >&5
10754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10755   (exit $ac_status); } &&
10756          { ac_try='test -z "$ac_c_werror_flag"
10757                          || test ! -s conftest.err'
10758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10759   (eval $ac_try) 2>&5
10760   ac_status=$?
10761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10762   (exit $ac_status); }; } &&
10763          { ac_try='test -s conftest.$ac_objext'
10764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10765   (eval $ac_try) 2>&5
10766   ac_status=$?
10767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10768   (exit $ac_status); }; }; then
10769   ac_header_compiler=yes
10770 else
10771   echo "$as_me: failed program was:" >&5
10772 sed 's/^/| /' conftest.$ac_ext >&5
10773
10774 ac_header_compiler=no
10775 fi
10776 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10777 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10778 echo "${ECHO_T}$ac_header_compiler" >&6
10779
10780 # Is the header present?
10781 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10782 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10783 cat >conftest.$ac_ext <<_ACEOF
10784 /* confdefs.h.  */
10785 _ACEOF
10786 cat confdefs.h >>conftest.$ac_ext
10787 cat >>conftest.$ac_ext <<_ACEOF
10788 /* end confdefs.h.  */
10789 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10790 _ACEOF
10791 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10792   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10793   ac_status=$?
10794   grep -v '^ *+' conftest.er1 >conftest.err
10795   rm -f conftest.er1
10796   cat conftest.err >&5
10797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10798   (exit $ac_status); } >/dev/null; then
10799   if test -s conftest.err; then
10800     ac_cpp_err=$ac_c_preproc_warn_flag
10801     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10802   else
10803     ac_cpp_err=
10804   fi
10805 else
10806   ac_cpp_err=yes
10807 fi
10808 if test -z "$ac_cpp_err"; then
10809   ac_header_preproc=yes
10810 else
10811   echo "$as_me: failed program was:" >&5
10812 sed 's/^/| /' conftest.$ac_ext >&5
10813
10814   ac_header_preproc=no
10815 fi
10816 rm -f conftest.err conftest.$ac_ext
10817 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10818 echo "${ECHO_T}$ac_header_preproc" >&6
10819
10820 # So?  What about this header?
10821 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10822   yes:no: )
10823     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10824 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10825     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10826 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10827     ac_header_preproc=yes
10828     ;;
10829   no:yes:* )
10830     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10831 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10832     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10833 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10834     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10835 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10836     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10837 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10838     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10839 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10840     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10841 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10842     (
10843       cat <<\_ASBOX
10844 ## ---------------------------------------- ##
10845 ## Report this to pgsql-bugs@postgresql.org ##
10846 ## ---------------------------------------- ##
10847 _ASBOX
10848     ) |
10849       sed "s/^/$as_me: WARNING:     /" >&2
10850     ;;
10851 esac
10852 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10853 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10854 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10855   echo $ECHO_N "(cached) $ECHO_C" >&6
10856 else
10857   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10858 fi
10859 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10860 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10861
10862 fi
10863 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10864   :
10865 else
10866   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10867 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10868    { (exit 1); exit 1; }; }
10869 fi
10870
10871
10872 fi
10873
10874
10875 ##
10876 ## Types, structures, compiler characteristics
10877 ##
10878
10879  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10880 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10881 if test "${ac_cv_c_const+set}" = set; then
10882   echo $ECHO_N "(cached) $ECHO_C" >&6
10883 else
10884   cat >conftest.$ac_ext <<_ACEOF
10885 /* confdefs.h.  */
10886 _ACEOF
10887 cat confdefs.h >>conftest.$ac_ext
10888 cat >>conftest.$ac_ext <<_ACEOF
10889 /* end confdefs.h.  */
10890
10891 int
10892 main ()
10893 {
10894 /* FIXME: Include the comments suggested by Paul. */
10895 #ifndef __cplusplus
10896   /* Ultrix mips cc rejects this.  */
10897   typedef int charset[2];
10898   const charset x;
10899   /* SunOS 4.1.1 cc rejects this.  */
10900   char const *const *ccp;
10901   char **p;
10902   /* NEC SVR4.0.2 mips cc rejects this.  */
10903   struct point {int x, y;};
10904   static struct point const zero = {0,0};
10905   /* AIX XL C 1.02.0.0 rejects this.
10906      It does not let you subtract one const X* pointer from another in
10907      an arm of an if-expression whose if-part is not a constant
10908      expression */
10909   const char *g = "string";
10910   ccp = &g + (g ? g-g : 0);
10911   /* HPUX 7.0 cc rejects these. */
10912   ++ccp;
10913   p = (char**) ccp;
10914   ccp = (char const *const *) p;
10915   { /* SCO 3.2v4 cc rejects this.  */
10916     char *t;
10917     char const *s = 0 ? (char *) 0 : (char const *) 0;
10918
10919     *t++ = 0;
10920   }
10921   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10922     int x[] = {25, 17};
10923     const int *foo = &x[0];
10924     ++foo;
10925   }
10926   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10927     typedef const int *iptr;
10928     iptr p = 0;
10929     ++p;
10930   }
10931   { /* AIX XL C 1.02.0.0 rejects this saying
10932        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10933     struct s { int j; const int *ap[3]; };
10934     struct s *b; b->j = 5;
10935   }
10936   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10937     const int foo = 10;
10938   }
10939 #endif
10940
10941   ;
10942   return 0;
10943 }
10944 _ACEOF
10945 rm -f conftest.$ac_objext
10946 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10947   (eval $ac_compile) 2>conftest.er1
10948   ac_status=$?
10949   grep -v '^ *+' conftest.er1 >conftest.err
10950   rm -f conftest.er1
10951   cat conftest.err >&5
10952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10953   (exit $ac_status); } &&
10954          { ac_try='test -z "$ac_c_werror_flag"
10955                          || test ! -s conftest.err'
10956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10957   (eval $ac_try) 2>&5
10958   ac_status=$?
10959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10960   (exit $ac_status); }; } &&
10961          { ac_try='test -s conftest.$ac_objext'
10962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10963   (eval $ac_try) 2>&5
10964   ac_status=$?
10965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10966   (exit $ac_status); }; }; then
10967   ac_cv_c_const=yes
10968 else
10969   echo "$as_me: failed program was:" >&5
10970 sed 's/^/| /' conftest.$ac_ext >&5
10971
10972 ac_cv_c_const=no
10973 fi
10974 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10975 fi
10976 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10977 echo "${ECHO_T}$ac_cv_c_const" >&6
10978 if test $ac_cv_c_const = no; then
10979
10980 cat >>confdefs.h <<\_ACEOF
10981 #define const
10982 _ACEOF
10983
10984 fi
10985
10986
10987 echo "$as_me:$LINENO: checking for inline" >&5
10988 echo $ECHO_N "checking for inline... $ECHO_C" >&6
10989 if test "${ac_cv_c_inline+set}" = set; then
10990   echo $ECHO_N "(cached) $ECHO_C" >&6
10991 else
10992   ac_cv_c_inline=no
10993 for ac_kw in inline __inline__ __inline; do
10994   cat >conftest.$ac_ext <<_ACEOF
10995 /* confdefs.h.  */
10996 _ACEOF
10997 cat confdefs.h >>conftest.$ac_ext
10998 cat >>conftest.$ac_ext <<_ACEOF
10999 /* end confdefs.h.  */
11000 #ifndef __cplusplus
11001 typedef int foo_t;
11002 static $ac_kw foo_t static_foo () {return 0; }
11003 $ac_kw int foo () {return 0; }
11004 #endif
11005
11006 _ACEOF
11007 rm -f conftest.$ac_objext
11008 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11009   (eval $ac_compile) 2>conftest.er1
11010   ac_status=$?
11011   grep -v '^ *+' conftest.er1 >conftest.err
11012   rm -f conftest.er1
11013   cat conftest.err >&5
11014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11015   (exit $ac_status); } &&
11016          { ac_try='test -z "$ac_c_werror_flag"
11017                          || test ! -s conftest.err'
11018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11019   (eval $ac_try) 2>&5
11020   ac_status=$?
11021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11022   (exit $ac_status); }; } &&
11023          { ac_try='test -s conftest.$ac_objext'
11024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11025   (eval $ac_try) 2>&5
11026   ac_status=$?
11027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11028   (exit $ac_status); }; }; then
11029   ac_cv_c_inline=$ac_kw; break
11030 else
11031   echo "$as_me: failed program was:" >&5
11032 sed 's/^/| /' conftest.$ac_ext >&5
11033
11034 fi
11035 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11036 done
11037
11038 fi
11039 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11040 echo "${ECHO_T}$ac_cv_c_inline" >&6
11041 case $ac_cv_c_inline in
11042   inline | yes) ;;
11043   no)
11044 cat >>confdefs.h <<\_ACEOF
11045 #define inline
11046 _ACEOF
11047  ;;
11048   *)  cat >>confdefs.h <<_ACEOF
11049 #define inline $ac_cv_c_inline
11050 _ACEOF
11051  ;;
11052 esac
11053
11054 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11055 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11056 if test "${ac_cv_c_stringize+set}" = set; then
11057   echo $ECHO_N "(cached) $ECHO_C" >&6
11058 else
11059   cat >conftest.$ac_ext <<_ACEOF
11060 /* confdefs.h.  */
11061 _ACEOF
11062 cat confdefs.h >>conftest.$ac_ext
11063 cat >>conftest.$ac_ext <<_ACEOF
11064 /* end confdefs.h.  */
11065 #define x(y) #y
11066
11067 char *s = x(teststring);
11068 _ACEOF
11069 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11070   $EGREP "#teststring" >/dev/null 2>&1; then
11071   ac_cv_c_stringize=no
11072 else
11073   ac_cv_c_stringize=yes
11074 fi
11075 rm -f conftest*
11076
11077 fi
11078 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11079 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11080 if test $ac_cv_c_stringize = yes; then
11081
11082 cat >>confdefs.h <<\_ACEOF
11083 #define HAVE_STRINGIZE 1
11084 _ACEOF
11085
11086 fi
11087
11088 echo "$as_me:$LINENO: checking for signed types" >&5
11089 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11090 if test "${pgac_cv_c_signed+set}" = set; then
11091   echo $ECHO_N "(cached) $ECHO_C" >&6
11092 else
11093   cat >conftest.$ac_ext <<_ACEOF
11094 /* confdefs.h.  */
11095 _ACEOF
11096 cat confdefs.h >>conftest.$ac_ext
11097 cat >>conftest.$ac_ext <<_ACEOF
11098 /* end confdefs.h.  */
11099
11100 int
11101 main ()
11102 {
11103 signed char c; signed short s; signed int i;
11104   ;
11105   return 0;
11106 }
11107 _ACEOF
11108 rm -f conftest.$ac_objext
11109 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11110   (eval $ac_compile) 2>conftest.er1
11111   ac_status=$?
11112   grep -v '^ *+' conftest.er1 >conftest.err
11113   rm -f conftest.er1
11114   cat conftest.err >&5
11115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11116   (exit $ac_status); } &&
11117          { ac_try='test -z "$ac_c_werror_flag"
11118                          || test ! -s conftest.err'
11119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11120   (eval $ac_try) 2>&5
11121   ac_status=$?
11122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11123   (exit $ac_status); }; } &&
11124          { ac_try='test -s conftest.$ac_objext'
11125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11126   (eval $ac_try) 2>&5
11127   ac_status=$?
11128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11129   (exit $ac_status); }; }; then
11130   pgac_cv_c_signed=yes
11131 else
11132   echo "$as_me: failed program was:" >&5
11133 sed 's/^/| /' conftest.$ac_ext >&5
11134
11135 pgac_cv_c_signed=no
11136 fi
11137 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11138 fi
11139 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11140 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11141 if test x"$pgac_cv_c_signed" = xno ; then
11142
11143 cat >>confdefs.h <<\_ACEOF
11144 #define signed
11145 _ACEOF
11146
11147 fi
11148 echo "$as_me:$LINENO: checking for working volatile" >&5
11149 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11150 if test "${ac_cv_c_volatile+set}" = set; then
11151   echo $ECHO_N "(cached) $ECHO_C" >&6
11152 else
11153   cat >conftest.$ac_ext <<_ACEOF
11154 /* confdefs.h.  */
11155 _ACEOF
11156 cat confdefs.h >>conftest.$ac_ext
11157 cat >>conftest.$ac_ext <<_ACEOF
11158 /* end confdefs.h.  */
11159
11160 int
11161 main ()
11162 {
11163
11164 volatile int x;
11165 int * volatile y;
11166   ;
11167   return 0;
11168 }
11169 _ACEOF
11170 rm -f conftest.$ac_objext
11171 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11172   (eval $ac_compile) 2>conftest.er1
11173   ac_status=$?
11174   grep -v '^ *+' conftest.er1 >conftest.err
11175   rm -f conftest.er1
11176   cat conftest.err >&5
11177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11178   (exit $ac_status); } &&
11179          { ac_try='test -z "$ac_c_werror_flag"
11180                          || test ! -s conftest.err'
11181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11182   (eval $ac_try) 2>&5
11183   ac_status=$?
11184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185   (exit $ac_status); }; } &&
11186          { ac_try='test -s conftest.$ac_objext'
11187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11188   (eval $ac_try) 2>&5
11189   ac_status=$?
11190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191   (exit $ac_status); }; }; then
11192   ac_cv_c_volatile=yes
11193 else
11194   echo "$as_me: failed program was:" >&5
11195 sed 's/^/| /' conftest.$ac_ext >&5
11196
11197 ac_cv_c_volatile=no
11198 fi
11199 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11200 fi
11201 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11202 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11203 if test $ac_cv_c_volatile = no; then
11204
11205 cat >>confdefs.h <<\_ACEOF
11206 #define volatile
11207 _ACEOF
11208
11209 fi
11210
11211 echo "$as_me:$LINENO: checking for __func__" >&5
11212 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11213 if test "${pgac_cv_funcname_func_support+set}" = set; then
11214   echo $ECHO_N "(cached) $ECHO_C" >&6
11215 else
11216   cat >conftest.$ac_ext <<_ACEOF
11217 /* confdefs.h.  */
11218 _ACEOF
11219 cat confdefs.h >>conftest.$ac_ext
11220 cat >>conftest.$ac_ext <<_ACEOF
11221 /* end confdefs.h.  */
11222 #include <stdio.h>
11223 int
11224 main ()
11225 {
11226 printf("%s\n", __func__);
11227   ;
11228   return 0;
11229 }
11230 _ACEOF
11231 rm -f conftest.$ac_objext
11232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11233   (eval $ac_compile) 2>conftest.er1
11234   ac_status=$?
11235   grep -v '^ *+' conftest.er1 >conftest.err
11236   rm -f conftest.er1
11237   cat conftest.err >&5
11238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11239   (exit $ac_status); } &&
11240          { ac_try='test -z "$ac_c_werror_flag"
11241                          || test ! -s conftest.err'
11242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11243   (eval $ac_try) 2>&5
11244   ac_status=$?
11245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11246   (exit $ac_status); }; } &&
11247          { ac_try='test -s conftest.$ac_objext'
11248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11249   (eval $ac_try) 2>&5
11250   ac_status=$?
11251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11252   (exit $ac_status); }; }; then
11253   pgac_cv_funcname_func_support=yes
11254 else
11255   echo "$as_me: failed program was:" >&5
11256 sed 's/^/| /' conftest.$ac_ext >&5
11257
11258 pgac_cv_funcname_func_support=no
11259 fi
11260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11261 fi
11262 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11263 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11264 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11265
11266 cat >>confdefs.h <<\_ACEOF
11267 #define HAVE_FUNCNAME__FUNC 1
11268 _ACEOF
11269
11270 else
11271 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11272 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11273 if test "${pgac_cv_funcname_function_support+set}" = set; then
11274   echo $ECHO_N "(cached) $ECHO_C" >&6
11275 else
11276   cat >conftest.$ac_ext <<_ACEOF
11277 /* confdefs.h.  */
11278 _ACEOF
11279 cat confdefs.h >>conftest.$ac_ext
11280 cat >>conftest.$ac_ext <<_ACEOF
11281 /* end confdefs.h.  */
11282 #include <stdio.h>
11283 int
11284 main ()
11285 {
11286 printf("%s\n", __FUNCTION__);
11287   ;
11288   return 0;
11289 }
11290 _ACEOF
11291 rm -f conftest.$ac_objext
11292 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11293   (eval $ac_compile) 2>conftest.er1
11294   ac_status=$?
11295   grep -v '^ *+' conftest.er1 >conftest.err
11296   rm -f conftest.er1
11297   cat conftest.err >&5
11298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11299   (exit $ac_status); } &&
11300          { ac_try='test -z "$ac_c_werror_flag"
11301                          || test ! -s conftest.err'
11302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11303   (eval $ac_try) 2>&5
11304   ac_status=$?
11305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11306   (exit $ac_status); }; } &&
11307          { ac_try='test -s conftest.$ac_objext'
11308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11309   (eval $ac_try) 2>&5
11310   ac_status=$?
11311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11312   (exit $ac_status); }; }; then
11313   pgac_cv_funcname_function_support=yes
11314 else
11315   echo "$as_me: failed program was:" >&5
11316 sed 's/^/| /' conftest.$ac_ext >&5
11317
11318 pgac_cv_funcname_function_support=no
11319 fi
11320 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11321 fi
11322 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11323 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11324 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11325
11326 cat >>confdefs.h <<\_ACEOF
11327 #define HAVE_FUNCNAME__FUNCTION 1
11328 _ACEOF
11329
11330 fi
11331 fi
11332 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11333 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11334 if test "${ac_cv_struct_tm+set}" = set; then
11335   echo $ECHO_N "(cached) $ECHO_C" >&6
11336 else
11337   cat >conftest.$ac_ext <<_ACEOF
11338 /* confdefs.h.  */
11339 _ACEOF
11340 cat confdefs.h >>conftest.$ac_ext
11341 cat >>conftest.$ac_ext <<_ACEOF
11342 /* end confdefs.h.  */
11343 #include <sys/types.h>
11344 #include <time.h>
11345
11346 int
11347 main ()
11348 {
11349 struct tm *tp; tp->tm_sec;
11350   ;
11351   return 0;
11352 }
11353 _ACEOF
11354 rm -f conftest.$ac_objext
11355 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11356   (eval $ac_compile) 2>conftest.er1
11357   ac_status=$?
11358   grep -v '^ *+' conftest.er1 >conftest.err
11359   rm -f conftest.er1
11360   cat conftest.err >&5
11361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11362   (exit $ac_status); } &&
11363          { ac_try='test -z "$ac_c_werror_flag"
11364                          || test ! -s conftest.err'
11365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11366   (eval $ac_try) 2>&5
11367   ac_status=$?
11368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11369   (exit $ac_status); }; } &&
11370          { ac_try='test -s conftest.$ac_objext'
11371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11372   (eval $ac_try) 2>&5
11373   ac_status=$?
11374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11375   (exit $ac_status); }; }; then
11376   ac_cv_struct_tm=time.h
11377 else
11378   echo "$as_me: failed program was:" >&5
11379 sed 's/^/| /' conftest.$ac_ext >&5
11380
11381 ac_cv_struct_tm=sys/time.h
11382 fi
11383 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11384 fi
11385 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11386 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11387 if test $ac_cv_struct_tm = sys/time.h; then
11388
11389 cat >>confdefs.h <<\_ACEOF
11390 #define TM_IN_SYS_TIME 1
11391 _ACEOF
11392
11393 fi
11394
11395 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11396 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11397 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11398   echo $ECHO_N "(cached) $ECHO_C" >&6
11399 else
11400   cat >conftest.$ac_ext <<_ACEOF
11401 /* confdefs.h.  */
11402 _ACEOF
11403 cat confdefs.h >>conftest.$ac_ext
11404 cat >>conftest.$ac_ext <<_ACEOF
11405 /* end confdefs.h.  */
11406 #include <sys/types.h>
11407 #include <$ac_cv_struct_tm>
11408
11409
11410 int
11411 main ()
11412 {
11413 static struct tm ac_aggr;
11414 if (ac_aggr.tm_zone)
11415 return 0;
11416   ;
11417   return 0;
11418 }
11419 _ACEOF
11420 rm -f conftest.$ac_objext
11421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11422   (eval $ac_compile) 2>conftest.er1
11423   ac_status=$?
11424   grep -v '^ *+' conftest.er1 >conftest.err
11425   rm -f conftest.er1
11426   cat conftest.err >&5
11427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11428   (exit $ac_status); } &&
11429          { ac_try='test -z "$ac_c_werror_flag"
11430                          || test ! -s conftest.err'
11431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11432   (eval $ac_try) 2>&5
11433   ac_status=$?
11434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11435   (exit $ac_status); }; } &&
11436          { ac_try='test -s conftest.$ac_objext'
11437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11438   (eval $ac_try) 2>&5
11439   ac_status=$?
11440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11441   (exit $ac_status); }; }; then
11442   ac_cv_member_struct_tm_tm_zone=yes
11443 else
11444   echo "$as_me: failed program was:" >&5
11445 sed 's/^/| /' conftest.$ac_ext >&5
11446
11447 cat >conftest.$ac_ext <<_ACEOF
11448 /* confdefs.h.  */
11449 _ACEOF
11450 cat confdefs.h >>conftest.$ac_ext
11451 cat >>conftest.$ac_ext <<_ACEOF
11452 /* end confdefs.h.  */
11453 #include <sys/types.h>
11454 #include <$ac_cv_struct_tm>
11455
11456
11457 int
11458 main ()
11459 {
11460 static struct tm ac_aggr;
11461 if (sizeof ac_aggr.tm_zone)
11462 return 0;
11463   ;
11464   return 0;
11465 }
11466 _ACEOF
11467 rm -f conftest.$ac_objext
11468 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11469   (eval $ac_compile) 2>conftest.er1
11470   ac_status=$?
11471   grep -v '^ *+' conftest.er1 >conftest.err
11472   rm -f conftest.er1
11473   cat conftest.err >&5
11474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475   (exit $ac_status); } &&
11476          { ac_try='test -z "$ac_c_werror_flag"
11477                          || test ! -s conftest.err'
11478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11479   (eval $ac_try) 2>&5
11480   ac_status=$?
11481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482   (exit $ac_status); }; } &&
11483          { ac_try='test -s conftest.$ac_objext'
11484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11485   (eval $ac_try) 2>&5
11486   ac_status=$?
11487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11488   (exit $ac_status); }; }; then
11489   ac_cv_member_struct_tm_tm_zone=yes
11490 else
11491   echo "$as_me: failed program was:" >&5
11492 sed 's/^/| /' conftest.$ac_ext >&5
11493
11494 ac_cv_member_struct_tm_tm_zone=no
11495 fi
11496 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11497 fi
11498 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11499 fi
11500 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11501 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11502 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11503
11504 cat >>confdefs.h <<_ACEOF
11505 #define HAVE_STRUCT_TM_TM_ZONE 1
11506 _ACEOF
11507
11508
11509 fi
11510
11511 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11512
11513 cat >>confdefs.h <<\_ACEOF
11514 #define HAVE_TM_ZONE 1
11515 _ACEOF
11516
11517 fi
11518 echo "$as_me:$LINENO: checking for tzname" >&5
11519 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11520 if test "${ac_cv_var_tzname+set}" = set; then
11521   echo $ECHO_N "(cached) $ECHO_C" >&6
11522 else
11523   cat >conftest.$ac_ext <<_ACEOF
11524 /* confdefs.h.  */
11525 _ACEOF
11526 cat confdefs.h >>conftest.$ac_ext
11527 cat >>conftest.$ac_ext <<_ACEOF
11528 /* end confdefs.h.  */
11529 #include <time.h>
11530 #ifndef tzname /* For SGI.  */
11531 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11532 #endif
11533
11534 int
11535 main ()
11536 {
11537 atoi(*tzname);
11538   ;
11539   return 0;
11540 }
11541 _ACEOF
11542 rm -f conftest.$ac_objext conftest$ac_exeext
11543 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11544   (eval $ac_link) 2>conftest.er1
11545   ac_status=$?
11546   grep -v '^ *+' conftest.er1 >conftest.err
11547   rm -f conftest.er1
11548   cat conftest.err >&5
11549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550   (exit $ac_status); } &&
11551          { ac_try='test -z "$ac_c_werror_flag"
11552                          || test ! -s conftest.err'
11553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11554   (eval $ac_try) 2>&5
11555   ac_status=$?
11556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11557   (exit $ac_status); }; } &&
11558          { ac_try='test -s conftest$ac_exeext'
11559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11560   (eval $ac_try) 2>&5
11561   ac_status=$?
11562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11563   (exit $ac_status); }; }; then
11564   ac_cv_var_tzname=yes
11565 else
11566   echo "$as_me: failed program was:" >&5
11567 sed 's/^/| /' conftest.$ac_ext >&5
11568
11569 ac_cv_var_tzname=no
11570 fi
11571 rm -f conftest.err conftest.$ac_objext \
11572       conftest$ac_exeext conftest.$ac_ext
11573 fi
11574 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11575 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11576 if test $ac_cv_var_tzname = yes; then
11577
11578 cat >>confdefs.h <<\_ACEOF
11579 #define HAVE_TZNAME 1
11580 _ACEOF
11581
11582 fi
11583
11584 echo "$as_me:$LINENO: checking for union semun" >&5
11585 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11586 if test "${ac_cv_type_union_semun+set}" = set; then
11587   echo $ECHO_N "(cached) $ECHO_C" >&6
11588 else
11589   cat >conftest.$ac_ext <<_ACEOF
11590 /* confdefs.h.  */
11591 _ACEOF
11592 cat confdefs.h >>conftest.$ac_ext
11593 cat >>conftest.$ac_ext <<_ACEOF
11594 /* end confdefs.h.  */
11595 #include <sys/types.h>
11596 #include <sys/ipc.h>
11597 #include <sys/sem.h>
11598
11599 int
11600 main ()
11601 {
11602 if ((union semun *) 0)
11603   return 0;
11604 if (sizeof (union semun))
11605   return 0;
11606   ;
11607   return 0;
11608 }
11609 _ACEOF
11610 rm -f conftest.$ac_objext
11611 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11612   (eval $ac_compile) 2>conftest.er1
11613   ac_status=$?
11614   grep -v '^ *+' conftest.er1 >conftest.err
11615   rm -f conftest.er1
11616   cat conftest.err >&5
11617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11618   (exit $ac_status); } &&
11619          { ac_try='test -z "$ac_c_werror_flag"
11620                          || test ! -s conftest.err'
11621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11622   (eval $ac_try) 2>&5
11623   ac_status=$?
11624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11625   (exit $ac_status); }; } &&
11626          { ac_try='test -s conftest.$ac_objext'
11627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11628   (eval $ac_try) 2>&5
11629   ac_status=$?
11630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11631   (exit $ac_status); }; }; then
11632   ac_cv_type_union_semun=yes
11633 else
11634   echo "$as_me: failed program was:" >&5
11635 sed 's/^/| /' conftest.$ac_ext >&5
11636
11637 ac_cv_type_union_semun=no
11638 fi
11639 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11640 fi
11641 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11642 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11643 if test $ac_cv_type_union_semun = yes; then
11644
11645 cat >>confdefs.h <<_ACEOF
11646 #define HAVE_UNION_SEMUN 1
11647 _ACEOF
11648
11649
11650 fi
11651
11652 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11653 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11654 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11655   echo $ECHO_N "(cached) $ECHO_C" >&6
11656 else
11657   cat >conftest.$ac_ext <<_ACEOF
11658 /* confdefs.h.  */
11659 _ACEOF
11660 cat confdefs.h >>conftest.$ac_ext
11661 cat >>conftest.$ac_ext <<_ACEOF
11662 /* end confdefs.h.  */
11663 #include <sys/types.h>
11664 #ifdef HAVE_SYS_UN_H
11665 #include <sys/un.h>
11666 #endif
11667
11668
11669 int
11670 main ()
11671 {
11672 if ((struct sockaddr_un *) 0)
11673   return 0;
11674 if (sizeof (struct sockaddr_un))
11675   return 0;
11676   ;
11677   return 0;
11678 }
11679 _ACEOF
11680 rm -f conftest.$ac_objext
11681 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11682   (eval $ac_compile) 2>conftest.er1
11683   ac_status=$?
11684   grep -v '^ *+' conftest.er1 >conftest.err
11685   rm -f conftest.er1
11686   cat conftest.err >&5
11687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11688   (exit $ac_status); } &&
11689          { ac_try='test -z "$ac_c_werror_flag"
11690                          || test ! -s conftest.err'
11691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11692   (eval $ac_try) 2>&5
11693   ac_status=$?
11694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11695   (exit $ac_status); }; } &&
11696          { ac_try='test -s conftest.$ac_objext'
11697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11698   (eval $ac_try) 2>&5
11699   ac_status=$?
11700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11701   (exit $ac_status); }; }; then
11702   ac_cv_type_struct_sockaddr_un=yes
11703 else
11704   echo "$as_me: failed program was:" >&5
11705 sed 's/^/| /' conftest.$ac_ext >&5
11706
11707 ac_cv_type_struct_sockaddr_un=no
11708 fi
11709 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11710 fi
11711 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11712 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11713 if test $ac_cv_type_struct_sockaddr_un = yes; then
11714
11715 cat >>confdefs.h <<_ACEOF
11716 #define HAVE_STRUCT_SOCKADDR_UN 1
11717 _ACEOF
11718
11719
11720 cat >>confdefs.h <<\_ACEOF
11721 #define HAVE_UNIX_SOCKETS 1
11722 _ACEOF
11723
11724 fi
11725
11726 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11727 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11728 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11729   echo $ECHO_N "(cached) $ECHO_C" >&6
11730 else
11731   cat >conftest.$ac_ext <<_ACEOF
11732 /* confdefs.h.  */
11733 _ACEOF
11734 cat confdefs.h >>conftest.$ac_ext
11735 cat >>conftest.$ac_ext <<_ACEOF
11736 /* end confdefs.h.  */
11737 #include <sys/types.h>
11738 #ifdef HAVE_SYS_SOCKET_H
11739 #include <sys/socket.h>
11740 #endif
11741
11742
11743 int
11744 main ()
11745 {
11746 if ((struct sockaddr_storage *) 0)
11747   return 0;
11748 if (sizeof (struct sockaddr_storage))
11749   return 0;
11750   ;
11751   return 0;
11752 }
11753 _ACEOF
11754 rm -f conftest.$ac_objext
11755 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11756   (eval $ac_compile) 2>conftest.er1
11757   ac_status=$?
11758   grep -v '^ *+' conftest.er1 >conftest.err
11759   rm -f conftest.er1
11760   cat conftest.err >&5
11761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11762   (exit $ac_status); } &&
11763          { ac_try='test -z "$ac_c_werror_flag"
11764                          || test ! -s conftest.err'
11765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11766   (eval $ac_try) 2>&5
11767   ac_status=$?
11768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11769   (exit $ac_status); }; } &&
11770          { ac_try='test -s conftest.$ac_objext'
11771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11772   (eval $ac_try) 2>&5
11773   ac_status=$?
11774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775   (exit $ac_status); }; }; then
11776   ac_cv_type_struct_sockaddr_storage=yes
11777 else
11778   echo "$as_me: failed program was:" >&5
11779 sed 's/^/| /' conftest.$ac_ext >&5
11780
11781 ac_cv_type_struct_sockaddr_storage=no
11782 fi
11783 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11784 fi
11785 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11786 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11787 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11788
11789 cat >>confdefs.h <<_ACEOF
11790 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11791 _ACEOF
11792
11793
11794 fi
11795
11796 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11797 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11798 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11799   echo $ECHO_N "(cached) $ECHO_C" >&6
11800 else
11801   cat >conftest.$ac_ext <<_ACEOF
11802 /* confdefs.h.  */
11803 _ACEOF
11804 cat confdefs.h >>conftest.$ac_ext
11805 cat >>conftest.$ac_ext <<_ACEOF
11806 /* end confdefs.h.  */
11807 #include <sys/types.h>
11808 #ifdef HAVE_SYS_SOCKET_H
11809 #include <sys/socket.h>
11810 #endif
11811
11812
11813 int
11814 main ()
11815 {
11816 static struct sockaddr_storage ac_aggr;
11817 if (ac_aggr.ss_family)
11818 return 0;
11819   ;
11820   return 0;
11821 }
11822 _ACEOF
11823 rm -f conftest.$ac_objext
11824 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11825   (eval $ac_compile) 2>conftest.er1
11826   ac_status=$?
11827   grep -v '^ *+' conftest.er1 >conftest.err
11828   rm -f conftest.er1
11829   cat conftest.err >&5
11830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11831   (exit $ac_status); } &&
11832          { ac_try='test -z "$ac_c_werror_flag"
11833                          || test ! -s conftest.err'
11834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11835   (eval $ac_try) 2>&5
11836   ac_status=$?
11837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11838   (exit $ac_status); }; } &&
11839          { ac_try='test -s conftest.$ac_objext'
11840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11841   (eval $ac_try) 2>&5
11842   ac_status=$?
11843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11844   (exit $ac_status); }; }; then
11845   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11846 else
11847   echo "$as_me: failed program was:" >&5
11848 sed 's/^/| /' conftest.$ac_ext >&5
11849
11850 cat >conftest.$ac_ext <<_ACEOF
11851 /* confdefs.h.  */
11852 _ACEOF
11853 cat confdefs.h >>conftest.$ac_ext
11854 cat >>conftest.$ac_ext <<_ACEOF
11855 /* end confdefs.h.  */
11856 #include <sys/types.h>
11857 #ifdef HAVE_SYS_SOCKET_H
11858 #include <sys/socket.h>
11859 #endif
11860
11861
11862 int
11863 main ()
11864 {
11865 static struct sockaddr_storage ac_aggr;
11866 if (sizeof ac_aggr.ss_family)
11867 return 0;
11868   ;
11869   return 0;
11870 }
11871 _ACEOF
11872 rm -f conftest.$ac_objext
11873 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11874   (eval $ac_compile) 2>conftest.er1
11875   ac_status=$?
11876   grep -v '^ *+' conftest.er1 >conftest.err
11877   rm -f conftest.er1
11878   cat conftest.err >&5
11879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11880   (exit $ac_status); } &&
11881          { ac_try='test -z "$ac_c_werror_flag"
11882                          || test ! -s conftest.err'
11883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11884   (eval $ac_try) 2>&5
11885   ac_status=$?
11886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11887   (exit $ac_status); }; } &&
11888          { ac_try='test -s conftest.$ac_objext'
11889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11890   (eval $ac_try) 2>&5
11891   ac_status=$?
11892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11893   (exit $ac_status); }; }; then
11894   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11895 else
11896   echo "$as_me: failed program was:" >&5
11897 sed 's/^/| /' conftest.$ac_ext >&5
11898
11899 ac_cv_member_struct_sockaddr_storage_ss_family=no
11900 fi
11901 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11902 fi
11903 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11904 fi
11905 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11906 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11907 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11908
11909 cat >>confdefs.h <<_ACEOF
11910 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11911 _ACEOF
11912
11913
11914 fi
11915 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11916 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11917 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11918   echo $ECHO_N "(cached) $ECHO_C" >&6
11919 else
11920   cat >conftest.$ac_ext <<_ACEOF
11921 /* confdefs.h.  */
11922 _ACEOF
11923 cat confdefs.h >>conftest.$ac_ext
11924 cat >>conftest.$ac_ext <<_ACEOF
11925 /* end confdefs.h.  */
11926 #include <sys/types.h>
11927 #ifdef HAVE_SYS_SOCKET_H
11928 #include <sys/socket.h>
11929 #endif
11930
11931
11932 int
11933 main ()
11934 {
11935 static struct sockaddr_storage ac_aggr;
11936 if (ac_aggr.__ss_family)
11937 return 0;
11938   ;
11939   return 0;
11940 }
11941 _ACEOF
11942 rm -f conftest.$ac_objext
11943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11944   (eval $ac_compile) 2>conftest.er1
11945   ac_status=$?
11946   grep -v '^ *+' conftest.er1 >conftest.err
11947   rm -f conftest.er1
11948   cat conftest.err >&5
11949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11950   (exit $ac_status); } &&
11951          { ac_try='test -z "$ac_c_werror_flag"
11952                          || test ! -s conftest.err'
11953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11954   (eval $ac_try) 2>&5
11955   ac_status=$?
11956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11957   (exit $ac_status); }; } &&
11958          { ac_try='test -s conftest.$ac_objext'
11959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11960   (eval $ac_try) 2>&5
11961   ac_status=$?
11962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11963   (exit $ac_status); }; }; then
11964   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11965 else
11966   echo "$as_me: failed program was:" >&5
11967 sed 's/^/| /' conftest.$ac_ext >&5
11968
11969 cat >conftest.$ac_ext <<_ACEOF
11970 /* confdefs.h.  */
11971 _ACEOF
11972 cat confdefs.h >>conftest.$ac_ext
11973 cat >>conftest.$ac_ext <<_ACEOF
11974 /* end confdefs.h.  */
11975 #include <sys/types.h>
11976 #ifdef HAVE_SYS_SOCKET_H
11977 #include <sys/socket.h>
11978 #endif
11979
11980
11981 int
11982 main ()
11983 {
11984 static struct sockaddr_storage ac_aggr;
11985 if (sizeof ac_aggr.__ss_family)
11986 return 0;
11987   ;
11988   return 0;
11989 }
11990 _ACEOF
11991 rm -f conftest.$ac_objext
11992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11993   (eval $ac_compile) 2>conftest.er1
11994   ac_status=$?
11995   grep -v '^ *+' conftest.er1 >conftest.err
11996   rm -f conftest.er1
11997   cat conftest.err >&5
11998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11999   (exit $ac_status); } &&
12000          { ac_try='test -z "$ac_c_werror_flag"
12001                          || test ! -s conftest.err'
12002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12003   (eval $ac_try) 2>&5
12004   ac_status=$?
12005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12006   (exit $ac_status); }; } &&
12007          { ac_try='test -s conftest.$ac_objext'
12008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12009   (eval $ac_try) 2>&5
12010   ac_status=$?
12011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12012   (exit $ac_status); }; }; then
12013   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12014 else
12015   echo "$as_me: failed program was:" >&5
12016 sed 's/^/| /' conftest.$ac_ext >&5
12017
12018 ac_cv_member_struct_sockaddr_storage___ss_family=no
12019 fi
12020 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12021 fi
12022 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12023 fi
12024 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12025 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12026 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12027
12028 cat >>confdefs.h <<_ACEOF
12029 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12030 _ACEOF
12031
12032
12033 fi
12034 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12035 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12036 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12037   echo $ECHO_N "(cached) $ECHO_C" >&6
12038 else
12039   cat >conftest.$ac_ext <<_ACEOF
12040 /* confdefs.h.  */
12041 _ACEOF
12042 cat confdefs.h >>conftest.$ac_ext
12043 cat >>conftest.$ac_ext <<_ACEOF
12044 /* end confdefs.h.  */
12045 #include <sys/types.h>
12046 #ifdef HAVE_SYS_SOCKET_H
12047 #include <sys/socket.h>
12048 #endif
12049
12050
12051 int
12052 main ()
12053 {
12054 static struct sockaddr_storage ac_aggr;
12055 if (ac_aggr.ss_len)
12056 return 0;
12057   ;
12058   return 0;
12059 }
12060 _ACEOF
12061 rm -f conftest.$ac_objext
12062 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12063   (eval $ac_compile) 2>conftest.er1
12064   ac_status=$?
12065   grep -v '^ *+' conftest.er1 >conftest.err
12066   rm -f conftest.er1
12067   cat conftest.err >&5
12068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12069   (exit $ac_status); } &&
12070          { ac_try='test -z "$ac_c_werror_flag"
12071                          || test ! -s conftest.err'
12072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12073   (eval $ac_try) 2>&5
12074   ac_status=$?
12075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12076   (exit $ac_status); }; } &&
12077          { ac_try='test -s conftest.$ac_objext'
12078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12079   (eval $ac_try) 2>&5
12080   ac_status=$?
12081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12082   (exit $ac_status); }; }; then
12083   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12084 else
12085   echo "$as_me: failed program was:" >&5
12086 sed 's/^/| /' conftest.$ac_ext >&5
12087
12088 cat >conftest.$ac_ext <<_ACEOF
12089 /* confdefs.h.  */
12090 _ACEOF
12091 cat confdefs.h >>conftest.$ac_ext
12092 cat >>conftest.$ac_ext <<_ACEOF
12093 /* end confdefs.h.  */
12094 #include <sys/types.h>
12095 #ifdef HAVE_SYS_SOCKET_H
12096 #include <sys/socket.h>
12097 #endif
12098
12099
12100 int
12101 main ()
12102 {
12103 static struct sockaddr_storage ac_aggr;
12104 if (sizeof ac_aggr.ss_len)
12105 return 0;
12106   ;
12107   return 0;
12108 }
12109 _ACEOF
12110 rm -f conftest.$ac_objext
12111 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12112   (eval $ac_compile) 2>conftest.er1
12113   ac_status=$?
12114   grep -v '^ *+' conftest.er1 >conftest.err
12115   rm -f conftest.er1
12116   cat conftest.err >&5
12117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12118   (exit $ac_status); } &&
12119          { ac_try='test -z "$ac_c_werror_flag"
12120                          || test ! -s conftest.err'
12121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12122   (eval $ac_try) 2>&5
12123   ac_status=$?
12124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12125   (exit $ac_status); }; } &&
12126          { ac_try='test -s conftest.$ac_objext'
12127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12128   (eval $ac_try) 2>&5
12129   ac_status=$?
12130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12131   (exit $ac_status); }; }; then
12132   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12133 else
12134   echo "$as_me: failed program was:" >&5
12135 sed 's/^/| /' conftest.$ac_ext >&5
12136
12137 ac_cv_member_struct_sockaddr_storage_ss_len=no
12138 fi
12139 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12140 fi
12141 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12142 fi
12143 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12144 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12145 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12146
12147 cat >>confdefs.h <<_ACEOF
12148 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12149 _ACEOF
12150
12151
12152 fi
12153 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12154 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12155 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12156   echo $ECHO_N "(cached) $ECHO_C" >&6
12157 else
12158   cat >conftest.$ac_ext <<_ACEOF
12159 /* confdefs.h.  */
12160 _ACEOF
12161 cat confdefs.h >>conftest.$ac_ext
12162 cat >>conftest.$ac_ext <<_ACEOF
12163 /* end confdefs.h.  */
12164 #include <sys/types.h>
12165 #ifdef HAVE_SYS_SOCKET_H
12166 #include <sys/socket.h>
12167 #endif
12168
12169
12170 int
12171 main ()
12172 {
12173 static struct sockaddr_storage ac_aggr;
12174 if (ac_aggr.__ss_len)
12175 return 0;
12176   ;
12177   return 0;
12178 }
12179 _ACEOF
12180 rm -f conftest.$ac_objext
12181 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12182   (eval $ac_compile) 2>conftest.er1
12183   ac_status=$?
12184   grep -v '^ *+' conftest.er1 >conftest.err
12185   rm -f conftest.er1
12186   cat conftest.err >&5
12187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188   (exit $ac_status); } &&
12189          { ac_try='test -z "$ac_c_werror_flag"
12190                          || test ! -s conftest.err'
12191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12192   (eval $ac_try) 2>&5
12193   ac_status=$?
12194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12195   (exit $ac_status); }; } &&
12196          { ac_try='test -s conftest.$ac_objext'
12197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12198   (eval $ac_try) 2>&5
12199   ac_status=$?
12200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12201   (exit $ac_status); }; }; then
12202   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12203 else
12204   echo "$as_me: failed program was:" >&5
12205 sed 's/^/| /' conftest.$ac_ext >&5
12206
12207 cat >conftest.$ac_ext <<_ACEOF
12208 /* confdefs.h.  */
12209 _ACEOF
12210 cat confdefs.h >>conftest.$ac_ext
12211 cat >>conftest.$ac_ext <<_ACEOF
12212 /* end confdefs.h.  */
12213 #include <sys/types.h>
12214 #ifdef HAVE_SYS_SOCKET_H
12215 #include <sys/socket.h>
12216 #endif
12217
12218
12219 int
12220 main ()
12221 {
12222 static struct sockaddr_storage ac_aggr;
12223 if (sizeof ac_aggr.__ss_len)
12224 return 0;
12225   ;
12226   return 0;
12227 }
12228 _ACEOF
12229 rm -f conftest.$ac_objext
12230 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12231   (eval $ac_compile) 2>conftest.er1
12232   ac_status=$?
12233   grep -v '^ *+' conftest.er1 >conftest.err
12234   rm -f conftest.er1
12235   cat conftest.err >&5
12236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12237   (exit $ac_status); } &&
12238          { ac_try='test -z "$ac_c_werror_flag"
12239                          || test ! -s conftest.err'
12240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12241   (eval $ac_try) 2>&5
12242   ac_status=$?
12243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12244   (exit $ac_status); }; } &&
12245          { ac_try='test -s conftest.$ac_objext'
12246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12247   (eval $ac_try) 2>&5
12248   ac_status=$?
12249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12250   (exit $ac_status); }; }; then
12251   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12252 else
12253   echo "$as_me: failed program was:" >&5
12254 sed 's/^/| /' conftest.$ac_ext >&5
12255
12256 ac_cv_member_struct_sockaddr_storage___ss_len=no
12257 fi
12258 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12259 fi
12260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12261 fi
12262 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12263 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12264 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12265
12266 cat >>confdefs.h <<_ACEOF
12267 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12268 _ACEOF
12269
12270
12271 fi
12272 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12273 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12274 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12275   echo $ECHO_N "(cached) $ECHO_C" >&6
12276 else
12277   cat >conftest.$ac_ext <<_ACEOF
12278 /* confdefs.h.  */
12279 _ACEOF
12280 cat confdefs.h >>conftest.$ac_ext
12281 cat >>conftest.$ac_ext <<_ACEOF
12282 /* end confdefs.h.  */
12283 #include <sys/types.h>
12284 #ifdef HAVE_SYS_SOCKET_H
12285 #include <sys/socket.h>
12286 #endif
12287
12288
12289 int
12290 main ()
12291 {
12292 static struct sockaddr ac_aggr;
12293 if (ac_aggr.sa_len)
12294 return 0;
12295   ;
12296   return 0;
12297 }
12298 _ACEOF
12299 rm -f conftest.$ac_objext
12300 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12301   (eval $ac_compile) 2>conftest.er1
12302   ac_status=$?
12303   grep -v '^ *+' conftest.er1 >conftest.err
12304   rm -f conftest.er1
12305   cat conftest.err >&5
12306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12307   (exit $ac_status); } &&
12308          { ac_try='test -z "$ac_c_werror_flag"
12309                          || test ! -s conftest.err'
12310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12311   (eval $ac_try) 2>&5
12312   ac_status=$?
12313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314   (exit $ac_status); }; } &&
12315          { ac_try='test -s conftest.$ac_objext'
12316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12317   (eval $ac_try) 2>&5
12318   ac_status=$?
12319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12320   (exit $ac_status); }; }; then
12321   ac_cv_member_struct_sockaddr_sa_len=yes
12322 else
12323   echo "$as_me: failed program was:" >&5
12324 sed 's/^/| /' conftest.$ac_ext >&5
12325
12326 cat >conftest.$ac_ext <<_ACEOF
12327 /* confdefs.h.  */
12328 _ACEOF
12329 cat confdefs.h >>conftest.$ac_ext
12330 cat >>conftest.$ac_ext <<_ACEOF
12331 /* end confdefs.h.  */
12332 #include <sys/types.h>
12333 #ifdef HAVE_SYS_SOCKET_H
12334 #include <sys/socket.h>
12335 #endif
12336
12337
12338 int
12339 main ()
12340 {
12341 static struct sockaddr ac_aggr;
12342 if (sizeof ac_aggr.sa_len)
12343 return 0;
12344   ;
12345   return 0;
12346 }
12347 _ACEOF
12348 rm -f conftest.$ac_objext
12349 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12350   (eval $ac_compile) 2>conftest.er1
12351   ac_status=$?
12352   grep -v '^ *+' conftest.er1 >conftest.err
12353   rm -f conftest.er1
12354   cat conftest.err >&5
12355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356   (exit $ac_status); } &&
12357          { ac_try='test -z "$ac_c_werror_flag"
12358                          || test ! -s conftest.err'
12359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12360   (eval $ac_try) 2>&5
12361   ac_status=$?
12362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12363   (exit $ac_status); }; } &&
12364          { ac_try='test -s conftest.$ac_objext'
12365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12366   (eval $ac_try) 2>&5
12367   ac_status=$?
12368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369   (exit $ac_status); }; }; then
12370   ac_cv_member_struct_sockaddr_sa_len=yes
12371 else
12372   echo "$as_me: failed program was:" >&5
12373 sed 's/^/| /' conftest.$ac_ext >&5
12374
12375 ac_cv_member_struct_sockaddr_sa_len=no
12376 fi
12377 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12378 fi
12379 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12380 fi
12381 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12382 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12383 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12384
12385 cat >>confdefs.h <<_ACEOF
12386 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12387 _ACEOF
12388
12389
12390 fi
12391
12392 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12393 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12394 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12395   echo $ECHO_N "(cached) $ECHO_C" >&6
12396 else
12397   cat >conftest.$ac_ext <<_ACEOF
12398 /* confdefs.h.  */
12399 _ACEOF
12400 cat confdefs.h >>conftest.$ac_ext
12401 cat >>conftest.$ac_ext <<_ACEOF
12402 /* end confdefs.h.  */
12403 #include <sys/types.h>
12404 #include <sys/socket.h>
12405 #include <netdb.h>
12406
12407
12408 int
12409 main ()
12410 {
12411 if ((struct addrinfo *) 0)
12412   return 0;
12413 if (sizeof (struct addrinfo))
12414   return 0;
12415   ;
12416   return 0;
12417 }
12418 _ACEOF
12419 rm -f conftest.$ac_objext
12420 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12421   (eval $ac_compile) 2>conftest.er1
12422   ac_status=$?
12423   grep -v '^ *+' conftest.er1 >conftest.err
12424   rm -f conftest.er1
12425   cat conftest.err >&5
12426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12427   (exit $ac_status); } &&
12428          { ac_try='test -z "$ac_c_werror_flag"
12429                          || test ! -s conftest.err'
12430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12431   (eval $ac_try) 2>&5
12432   ac_status=$?
12433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12434   (exit $ac_status); }; } &&
12435          { ac_try='test -s conftest.$ac_objext'
12436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12437   (eval $ac_try) 2>&5
12438   ac_status=$?
12439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12440   (exit $ac_status); }; }; then
12441   ac_cv_type_struct_addrinfo=yes
12442 else
12443   echo "$as_me: failed program was:" >&5
12444 sed 's/^/| /' conftest.$ac_ext >&5
12445
12446 ac_cv_type_struct_addrinfo=no
12447 fi
12448 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12449 fi
12450 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12451 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12452 if test $ac_cv_type_struct_addrinfo = yes; then
12453
12454 cat >>confdefs.h <<_ACEOF
12455 #define HAVE_STRUCT_ADDRINFO 1
12456 _ACEOF
12457
12458
12459 fi
12460
12461
12462 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12463 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12464 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12465   echo $ECHO_N "(cached) $ECHO_C" >&6
12466 else
12467   cat >conftest.$ac_ext <<_ACEOF
12468 /* confdefs.h.  */
12469 _ACEOF
12470 cat confdefs.h >>conftest.$ac_ext
12471 cat >>conftest.$ac_ext <<_ACEOF
12472 /* end confdefs.h.  */
12473 #include <sys/param.h>
12474 #include <sys/types.h>
12475 #include <sys/socket.h>
12476 #include <sys/ucred.h>
12477
12478 int
12479 main ()
12480 {
12481 if ((struct cmsgcred *) 0)
12482   return 0;
12483 if (sizeof (struct cmsgcred))
12484   return 0;
12485   ;
12486   return 0;
12487 }
12488 _ACEOF
12489 rm -f conftest.$ac_objext
12490 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12491   (eval $ac_compile) 2>conftest.er1
12492   ac_status=$?
12493   grep -v '^ *+' conftest.er1 >conftest.err
12494   rm -f conftest.er1
12495   cat conftest.err >&5
12496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497   (exit $ac_status); } &&
12498          { ac_try='test -z "$ac_c_werror_flag"
12499                          || test ! -s conftest.err'
12500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12501   (eval $ac_try) 2>&5
12502   ac_status=$?
12503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504   (exit $ac_status); }; } &&
12505          { ac_try='test -s conftest.$ac_objext'
12506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12507   (eval $ac_try) 2>&5
12508   ac_status=$?
12509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12510   (exit $ac_status); }; }; then
12511   ac_cv_type_struct_cmsgcred=yes
12512 else
12513   echo "$as_me: failed program was:" >&5
12514 sed 's/^/| /' conftest.$ac_ext >&5
12515
12516 ac_cv_type_struct_cmsgcred=no
12517 fi
12518 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12519 fi
12520 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12521 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12522 if test $ac_cv_type_struct_cmsgcred = yes; then
12523
12524 cat >>confdefs.h <<_ACEOF
12525 #define HAVE_STRUCT_CMSGCRED 1
12526 _ACEOF
12527
12528
12529 fi
12530 echo "$as_me:$LINENO: checking for struct fcred" >&5
12531 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12532 if test "${ac_cv_type_struct_fcred+set}" = set; then
12533   echo $ECHO_N "(cached) $ECHO_C" >&6
12534 else
12535   cat >conftest.$ac_ext <<_ACEOF
12536 /* confdefs.h.  */
12537 _ACEOF
12538 cat confdefs.h >>conftest.$ac_ext
12539 cat >>conftest.$ac_ext <<_ACEOF
12540 /* end confdefs.h.  */
12541 #include <sys/param.h>
12542 #include <sys/types.h>
12543 #include <sys/socket.h>
12544 #include <sys/ucred.h>
12545
12546 int
12547 main ()
12548 {
12549 if ((struct fcred *) 0)
12550   return 0;
12551 if (sizeof (struct fcred))
12552   return 0;
12553   ;
12554   return 0;
12555 }
12556 _ACEOF
12557 rm -f conftest.$ac_objext
12558 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12559   (eval $ac_compile) 2>conftest.er1
12560   ac_status=$?
12561   grep -v '^ *+' conftest.er1 >conftest.err
12562   rm -f conftest.er1
12563   cat conftest.err >&5
12564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565   (exit $ac_status); } &&
12566          { ac_try='test -z "$ac_c_werror_flag"
12567                          || test ! -s conftest.err'
12568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12569   (eval $ac_try) 2>&5
12570   ac_status=$?
12571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12572   (exit $ac_status); }; } &&
12573          { ac_try='test -s conftest.$ac_objext'
12574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12575   (eval $ac_try) 2>&5
12576   ac_status=$?
12577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12578   (exit $ac_status); }; }; then
12579   ac_cv_type_struct_fcred=yes
12580 else
12581   echo "$as_me: failed program was:" >&5
12582 sed 's/^/| /' conftest.$ac_ext >&5
12583
12584 ac_cv_type_struct_fcred=no
12585 fi
12586 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12587 fi
12588 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12589 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12590 if test $ac_cv_type_struct_fcred = yes; then
12591
12592 cat >>confdefs.h <<_ACEOF
12593 #define HAVE_STRUCT_FCRED 1
12594 _ACEOF
12595
12596
12597 fi
12598 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12599 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12600 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12601   echo $ECHO_N "(cached) $ECHO_C" >&6
12602 else
12603   cat >conftest.$ac_ext <<_ACEOF
12604 /* confdefs.h.  */
12605 _ACEOF
12606 cat confdefs.h >>conftest.$ac_ext
12607 cat >>conftest.$ac_ext <<_ACEOF
12608 /* end confdefs.h.  */
12609 #include <sys/param.h>
12610 #include <sys/types.h>
12611 #include <sys/socket.h>
12612 #include <sys/ucred.h>
12613
12614 int
12615 main ()
12616 {
12617 if ((struct sockcred *) 0)
12618   return 0;
12619 if (sizeof (struct sockcred))
12620   return 0;
12621   ;
12622   return 0;
12623 }
12624 _ACEOF
12625 rm -f conftest.$ac_objext
12626 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12627   (eval $ac_compile) 2>conftest.er1
12628   ac_status=$?
12629   grep -v '^ *+' conftest.er1 >conftest.err
12630   rm -f conftest.er1
12631   cat conftest.err >&5
12632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633   (exit $ac_status); } &&
12634          { ac_try='test -z "$ac_c_werror_flag"
12635                          || test ! -s conftest.err'
12636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12637   (eval $ac_try) 2>&5
12638   ac_status=$?
12639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640   (exit $ac_status); }; } &&
12641          { ac_try='test -s conftest.$ac_objext'
12642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12643   (eval $ac_try) 2>&5
12644   ac_status=$?
12645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646   (exit $ac_status); }; }; then
12647   ac_cv_type_struct_sockcred=yes
12648 else
12649   echo "$as_me: failed program was:" >&5
12650 sed 's/^/| /' conftest.$ac_ext >&5
12651
12652 ac_cv_type_struct_sockcred=no
12653 fi
12654 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12655 fi
12656 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12657 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12658 if test $ac_cv_type_struct_sockcred = yes; then
12659
12660 cat >>confdefs.h <<_ACEOF
12661 #define HAVE_STRUCT_SOCKCRED 1
12662 _ACEOF
12663
12664
12665 fi
12666
12667
12668 echo "$as_me:$LINENO: checking for struct option" >&5
12669 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12670 if test "${ac_cv_type_struct_option+set}" = set; then
12671   echo $ECHO_N "(cached) $ECHO_C" >&6
12672 else
12673   cat >conftest.$ac_ext <<_ACEOF
12674 /* confdefs.h.  */
12675 _ACEOF
12676 cat confdefs.h >>conftest.$ac_ext
12677 cat >>conftest.$ac_ext <<_ACEOF
12678 /* end confdefs.h.  */
12679 #ifdef HAVE_GETOPT_H
12680 #include <getopt.h>
12681 #endif
12682
12683 int
12684 main ()
12685 {
12686 if ((struct option *) 0)
12687   return 0;
12688 if (sizeof (struct option))
12689   return 0;
12690   ;
12691   return 0;
12692 }
12693 _ACEOF
12694 rm -f conftest.$ac_objext
12695 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12696   (eval $ac_compile) 2>conftest.er1
12697   ac_status=$?
12698   grep -v '^ *+' conftest.er1 >conftest.err
12699   rm -f conftest.er1
12700   cat conftest.err >&5
12701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702   (exit $ac_status); } &&
12703          { ac_try='test -z "$ac_c_werror_flag"
12704                          || test ! -s conftest.err'
12705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12706   (eval $ac_try) 2>&5
12707   ac_status=$?
12708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12709   (exit $ac_status); }; } &&
12710          { ac_try='test -s conftest.$ac_objext'
12711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12712   (eval $ac_try) 2>&5
12713   ac_status=$?
12714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12715   (exit $ac_status); }; }; then
12716   ac_cv_type_struct_option=yes
12717 else
12718   echo "$as_me: failed program was:" >&5
12719 sed 's/^/| /' conftest.$ac_ext >&5
12720
12721 ac_cv_type_struct_option=no
12722 fi
12723 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12724 fi
12725 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12726 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12727 if test $ac_cv_type_struct_option = yes; then
12728
12729 cat >>confdefs.h <<_ACEOF
12730 #define HAVE_STRUCT_OPTION 1
12731 _ACEOF
12732
12733
12734 fi
12735
12736
12737 if test "$with_zlib" = yes; then
12738   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12739   # did not).  While we could work around the lack of z_streamp, it
12740   # seems unwise to encourage people to use such old zlib versions...
12741   echo "$as_me:$LINENO: checking for z_streamp" >&5
12742 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12743 if test "${ac_cv_type_z_streamp+set}" = set; then
12744   echo $ECHO_N "(cached) $ECHO_C" >&6
12745 else
12746   cat >conftest.$ac_ext <<_ACEOF
12747 /* confdefs.h.  */
12748 _ACEOF
12749 cat confdefs.h >>conftest.$ac_ext
12750 cat >>conftest.$ac_ext <<_ACEOF
12751 /* end confdefs.h.  */
12752 #include <zlib.h>
12753
12754 int
12755 main ()
12756 {
12757 if ((z_streamp *) 0)
12758   return 0;
12759 if (sizeof (z_streamp))
12760   return 0;
12761   ;
12762   return 0;
12763 }
12764 _ACEOF
12765 rm -f conftest.$ac_objext
12766 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12767   (eval $ac_compile) 2>conftest.er1
12768   ac_status=$?
12769   grep -v '^ *+' conftest.er1 >conftest.err
12770   rm -f conftest.er1
12771   cat conftest.err >&5
12772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12773   (exit $ac_status); } &&
12774          { ac_try='test -z "$ac_c_werror_flag"
12775                          || test ! -s conftest.err'
12776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12777   (eval $ac_try) 2>&5
12778   ac_status=$?
12779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12780   (exit $ac_status); }; } &&
12781          { ac_try='test -s conftest.$ac_objext'
12782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12783   (eval $ac_try) 2>&5
12784   ac_status=$?
12785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12786   (exit $ac_status); }; }; then
12787   ac_cv_type_z_streamp=yes
12788 else
12789   echo "$as_me: failed program was:" >&5
12790 sed 's/^/| /' conftest.$ac_ext >&5
12791
12792 ac_cv_type_z_streamp=no
12793 fi
12794 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12795 fi
12796 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12797 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12798 if test $ac_cv_type_z_streamp = yes; then
12799   :
12800 else
12801   { { echo "$as_me:$LINENO: error: zlib version is too old
12802 Use --without-zlib to disable zlib support." >&5
12803 echo "$as_me: error: zlib version is too old
12804 Use --without-zlib to disable zlib support." >&2;}
12805    { (exit 1); exit 1; }; }
12806 fi
12807
12808 fi
12809
12810 if test "$with_krb5" = yes; then
12811 # Check for differences between MIT and Heimdal (KTH) releases
12812   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12813 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12814 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12815   echo $ECHO_N "(cached) $ECHO_C" >&6
12816 else
12817   cat >conftest.$ac_ext <<_ACEOF
12818 /* confdefs.h.  */
12819 _ACEOF
12820 cat confdefs.h >>conftest.$ac_ext
12821 cat >>conftest.$ac_ext <<_ACEOF
12822 /* end confdefs.h.  */
12823 #include <krb5.h>
12824
12825 int
12826 main ()
12827 {
12828 static krb5_ticket ac_aggr;
12829 if (ac_aggr.enc_part2)
12830 return 0;
12831   ;
12832   return 0;
12833 }
12834 _ACEOF
12835 rm -f conftest.$ac_objext
12836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12837   (eval $ac_compile) 2>conftest.er1
12838   ac_status=$?
12839   grep -v '^ *+' conftest.er1 >conftest.err
12840   rm -f conftest.er1
12841   cat conftest.err >&5
12842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12843   (exit $ac_status); } &&
12844          { ac_try='test -z "$ac_c_werror_flag"
12845                          || test ! -s conftest.err'
12846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12847   (eval $ac_try) 2>&5
12848   ac_status=$?
12849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12850   (exit $ac_status); }; } &&
12851          { ac_try='test -s conftest.$ac_objext'
12852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12853   (eval $ac_try) 2>&5
12854   ac_status=$?
12855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12856   (exit $ac_status); }; }; then
12857   ac_cv_member_krb5_ticket_enc_part2=yes
12858 else
12859   echo "$as_me: failed program was:" >&5
12860 sed 's/^/| /' conftest.$ac_ext >&5
12861
12862 cat >conftest.$ac_ext <<_ACEOF
12863 /* confdefs.h.  */
12864 _ACEOF
12865 cat confdefs.h >>conftest.$ac_ext
12866 cat >>conftest.$ac_ext <<_ACEOF
12867 /* end confdefs.h.  */
12868 #include <krb5.h>
12869
12870 int
12871 main ()
12872 {
12873 static krb5_ticket ac_aggr;
12874 if (sizeof ac_aggr.enc_part2)
12875 return 0;
12876   ;
12877   return 0;
12878 }
12879 _ACEOF
12880 rm -f conftest.$ac_objext
12881 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12882   (eval $ac_compile) 2>conftest.er1
12883   ac_status=$?
12884   grep -v '^ *+' conftest.er1 >conftest.err
12885   rm -f conftest.er1
12886   cat conftest.err >&5
12887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12888   (exit $ac_status); } &&
12889          { ac_try='test -z "$ac_c_werror_flag"
12890                          || test ! -s conftest.err'
12891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12892   (eval $ac_try) 2>&5
12893   ac_status=$?
12894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12895   (exit $ac_status); }; } &&
12896          { ac_try='test -s conftest.$ac_objext'
12897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12898   (eval $ac_try) 2>&5
12899   ac_status=$?
12900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12901   (exit $ac_status); }; }; then
12902   ac_cv_member_krb5_ticket_enc_part2=yes
12903 else
12904   echo "$as_me: failed program was:" >&5
12905 sed 's/^/| /' conftest.$ac_ext >&5
12906
12907 ac_cv_member_krb5_ticket_enc_part2=no
12908 fi
12909 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12910 fi
12911 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12912 fi
12913 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12914 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12915 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12916
12917 cat >>confdefs.h <<_ACEOF
12918 #define HAVE_KRB5_TICKET_ENC_PART2 1
12919 _ACEOF
12920
12921
12922 else
12923   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12924 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12925 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12926   echo $ECHO_N "(cached) $ECHO_C" >&6
12927 else
12928   cat >conftest.$ac_ext <<_ACEOF
12929 /* confdefs.h.  */
12930 _ACEOF
12931 cat confdefs.h >>conftest.$ac_ext
12932 cat >>conftest.$ac_ext <<_ACEOF
12933 /* end confdefs.h.  */
12934 #include <krb5.h>
12935
12936 int
12937 main ()
12938 {
12939 static krb5_ticket ac_aggr;
12940 if (ac_aggr.client)
12941 return 0;
12942   ;
12943   return 0;
12944 }
12945 _ACEOF
12946 rm -f conftest.$ac_objext
12947 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12948   (eval $ac_compile) 2>conftest.er1
12949   ac_status=$?
12950   grep -v '^ *+' conftest.er1 >conftest.err
12951   rm -f conftest.er1
12952   cat conftest.err >&5
12953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12954   (exit $ac_status); } &&
12955          { ac_try='test -z "$ac_c_werror_flag"
12956                          || test ! -s conftest.err'
12957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12958   (eval $ac_try) 2>&5
12959   ac_status=$?
12960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12961   (exit $ac_status); }; } &&
12962          { ac_try='test -s conftest.$ac_objext'
12963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12964   (eval $ac_try) 2>&5
12965   ac_status=$?
12966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12967   (exit $ac_status); }; }; then
12968   ac_cv_member_krb5_ticket_client=yes
12969 else
12970   echo "$as_me: failed program was:" >&5
12971 sed 's/^/| /' conftest.$ac_ext >&5
12972
12973 cat >conftest.$ac_ext <<_ACEOF
12974 /* confdefs.h.  */
12975 _ACEOF
12976 cat confdefs.h >>conftest.$ac_ext
12977 cat >>conftest.$ac_ext <<_ACEOF
12978 /* end confdefs.h.  */
12979 #include <krb5.h>
12980
12981 int
12982 main ()
12983 {
12984 static krb5_ticket ac_aggr;
12985 if (sizeof ac_aggr.client)
12986 return 0;
12987   ;
12988   return 0;
12989 }
12990 _ACEOF
12991 rm -f conftest.$ac_objext
12992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12993   (eval $ac_compile) 2>conftest.er1
12994   ac_status=$?
12995   grep -v '^ *+' conftest.er1 >conftest.err
12996   rm -f conftest.er1
12997   cat conftest.err >&5
12998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12999   (exit $ac_status); } &&
13000          { ac_try='test -z "$ac_c_werror_flag"
13001                          || test ! -s conftest.err'
13002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13003   (eval $ac_try) 2>&5
13004   ac_status=$?
13005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006   (exit $ac_status); }; } &&
13007          { ac_try='test -s conftest.$ac_objext'
13008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13009   (eval $ac_try) 2>&5
13010   ac_status=$?
13011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13012   (exit $ac_status); }; }; then
13013   ac_cv_member_krb5_ticket_client=yes
13014 else
13015   echo "$as_me: failed program was:" >&5
13016 sed 's/^/| /' conftest.$ac_ext >&5
13017
13018 ac_cv_member_krb5_ticket_client=no
13019 fi
13020 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13021 fi
13022 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13023 fi
13024 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13025 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13026 if test $ac_cv_member_krb5_ticket_client = yes; then
13027
13028 cat >>confdefs.h <<_ACEOF
13029 #define HAVE_KRB5_TICKET_CLIENT 1
13030 _ACEOF
13031
13032
13033 else
13034   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13035 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13036    { (exit 1); exit 1; }; }
13037 fi
13038
13039 fi
13040
13041   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13042 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13043 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13044   echo $ECHO_N "(cached) $ECHO_C" >&6
13045 else
13046   cat >conftest.$ac_ext <<_ACEOF
13047 /* confdefs.h.  */
13048 _ACEOF
13049 cat confdefs.h >>conftest.$ac_ext
13050 cat >>conftest.$ac_ext <<_ACEOF
13051 /* end confdefs.h.  */
13052 #include <krb5.h>
13053
13054 int
13055 main ()
13056 {
13057 static krb5_error ac_aggr;
13058 if (ac_aggr.text.data)
13059 return 0;
13060   ;
13061   return 0;
13062 }
13063 _ACEOF
13064 rm -f conftest.$ac_objext
13065 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13066   (eval $ac_compile) 2>conftest.er1
13067   ac_status=$?
13068   grep -v '^ *+' conftest.er1 >conftest.err
13069   rm -f conftest.er1
13070   cat conftest.err >&5
13071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13072   (exit $ac_status); } &&
13073          { ac_try='test -z "$ac_c_werror_flag"
13074                          || test ! -s conftest.err'
13075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13076   (eval $ac_try) 2>&5
13077   ac_status=$?
13078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13079   (exit $ac_status); }; } &&
13080          { ac_try='test -s conftest.$ac_objext'
13081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13082   (eval $ac_try) 2>&5
13083   ac_status=$?
13084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13085   (exit $ac_status); }; }; then
13086   ac_cv_member_krb5_error_text_data=yes
13087 else
13088   echo "$as_me: failed program was:" >&5
13089 sed 's/^/| /' conftest.$ac_ext >&5
13090
13091 cat >conftest.$ac_ext <<_ACEOF
13092 /* confdefs.h.  */
13093 _ACEOF
13094 cat confdefs.h >>conftest.$ac_ext
13095 cat >>conftest.$ac_ext <<_ACEOF
13096 /* end confdefs.h.  */
13097 #include <krb5.h>
13098
13099 int
13100 main ()
13101 {
13102 static krb5_error ac_aggr;
13103 if (sizeof ac_aggr.text.data)
13104 return 0;
13105   ;
13106   return 0;
13107 }
13108 _ACEOF
13109 rm -f conftest.$ac_objext
13110 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13111   (eval $ac_compile) 2>conftest.er1
13112   ac_status=$?
13113   grep -v '^ *+' conftest.er1 >conftest.err
13114   rm -f conftest.er1
13115   cat conftest.err >&5
13116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117   (exit $ac_status); } &&
13118          { ac_try='test -z "$ac_c_werror_flag"
13119                          || test ! -s conftest.err'
13120   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13121   (eval $ac_try) 2>&5
13122   ac_status=$?
13123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13124   (exit $ac_status); }; } &&
13125          { ac_try='test -s conftest.$ac_objext'
13126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13127   (eval $ac_try) 2>&5
13128   ac_status=$?
13129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13130   (exit $ac_status); }; }; then
13131   ac_cv_member_krb5_error_text_data=yes
13132 else
13133   echo "$as_me: failed program was:" >&5
13134 sed 's/^/| /' conftest.$ac_ext >&5
13135
13136 ac_cv_member_krb5_error_text_data=no
13137 fi
13138 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13139 fi
13140 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13141 fi
13142 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13143 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13144 if test $ac_cv_member_krb5_error_text_data = yes; then
13145
13146 cat >>confdefs.h <<_ACEOF
13147 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13148 _ACEOF
13149
13150
13151 else
13152   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13153 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13154 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13155   echo $ECHO_N "(cached) $ECHO_C" >&6
13156 else
13157   cat >conftest.$ac_ext <<_ACEOF
13158 /* confdefs.h.  */
13159 _ACEOF
13160 cat confdefs.h >>conftest.$ac_ext
13161 cat >>conftest.$ac_ext <<_ACEOF
13162 /* end confdefs.h.  */
13163 #include <krb5.h>
13164
13165 int
13166 main ()
13167 {
13168 static krb5_error ac_aggr;
13169 if (ac_aggr.e_data)
13170 return 0;
13171   ;
13172   return 0;
13173 }
13174 _ACEOF
13175 rm -f conftest.$ac_objext
13176 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13177   (eval $ac_compile) 2>conftest.er1
13178   ac_status=$?
13179   grep -v '^ *+' conftest.er1 >conftest.err
13180   rm -f conftest.er1
13181   cat conftest.err >&5
13182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13183   (exit $ac_status); } &&
13184          { ac_try='test -z "$ac_c_werror_flag"
13185                          || test ! -s conftest.err'
13186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13187   (eval $ac_try) 2>&5
13188   ac_status=$?
13189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13190   (exit $ac_status); }; } &&
13191          { ac_try='test -s conftest.$ac_objext'
13192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13193   (eval $ac_try) 2>&5
13194   ac_status=$?
13195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13196   (exit $ac_status); }; }; then
13197   ac_cv_member_krb5_error_e_data=yes
13198 else
13199   echo "$as_me: failed program was:" >&5
13200 sed 's/^/| /' conftest.$ac_ext >&5
13201
13202 cat >conftest.$ac_ext <<_ACEOF
13203 /* confdefs.h.  */
13204 _ACEOF
13205 cat confdefs.h >>conftest.$ac_ext
13206 cat >>conftest.$ac_ext <<_ACEOF
13207 /* end confdefs.h.  */
13208 #include <krb5.h>
13209
13210 int
13211 main ()
13212 {
13213 static krb5_error ac_aggr;
13214 if (sizeof ac_aggr.e_data)
13215 return 0;
13216   ;
13217   return 0;
13218 }
13219 _ACEOF
13220 rm -f conftest.$ac_objext
13221 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13222   (eval $ac_compile) 2>conftest.er1
13223   ac_status=$?
13224   grep -v '^ *+' conftest.er1 >conftest.err
13225   rm -f conftest.er1
13226   cat conftest.err >&5
13227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13228   (exit $ac_status); } &&
13229          { ac_try='test -z "$ac_c_werror_flag"
13230                          || test ! -s conftest.err'
13231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13232   (eval $ac_try) 2>&5
13233   ac_status=$?
13234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13235   (exit $ac_status); }; } &&
13236          { ac_try='test -s conftest.$ac_objext'
13237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13238   (eval $ac_try) 2>&5
13239   ac_status=$?
13240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13241   (exit $ac_status); }; }; then
13242   ac_cv_member_krb5_error_e_data=yes
13243 else
13244   echo "$as_me: failed program was:" >&5
13245 sed 's/^/| /' conftest.$ac_ext >&5
13246
13247 ac_cv_member_krb5_error_e_data=no
13248 fi
13249 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13250 fi
13251 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13252 fi
13253 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13254 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13255 if test $ac_cv_member_krb5_error_e_data = yes; then
13256
13257 cat >>confdefs.h <<_ACEOF
13258 #define HAVE_KRB5_ERROR_E_DATA 1
13259 _ACEOF
13260
13261
13262 else
13263   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13264 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13265    { (exit 1); exit 1; }; }
13266 fi
13267
13268 fi
13269
13270 fi
13271
13272 ##
13273 ## Functions, global variables
13274 ##
13275
13276 echo "$as_me:$LINENO: checking for int timezone" >&5
13277 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13278 if test "${pgac_cv_var_int_timezone+set}" = set; then
13279   echo $ECHO_N "(cached) $ECHO_C" >&6
13280 else
13281   cat >conftest.$ac_ext <<_ACEOF
13282 /* confdefs.h.  */
13283 _ACEOF
13284 cat confdefs.h >>conftest.$ac_ext
13285 cat >>conftest.$ac_ext <<_ACEOF
13286 /* end confdefs.h.  */
13287 #include <time.h>
13288 int res;
13289 int
13290 main ()
13291 {
13292 #ifndef __CYGWIN__
13293 res = timezone / 60;
13294 #else
13295 res = _timezone / 60;
13296 #endif
13297   ;
13298   return 0;
13299 }
13300 _ACEOF
13301 rm -f conftest.$ac_objext conftest$ac_exeext
13302 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13303   (eval $ac_link) 2>conftest.er1
13304   ac_status=$?
13305   grep -v '^ *+' conftest.er1 >conftest.err
13306   rm -f conftest.er1
13307   cat conftest.err >&5
13308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13309   (exit $ac_status); } &&
13310          { ac_try='test -z "$ac_c_werror_flag"
13311                          || test ! -s conftest.err'
13312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13313   (eval $ac_try) 2>&5
13314   ac_status=$?
13315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13316   (exit $ac_status); }; } &&
13317          { ac_try='test -s conftest$ac_exeext'
13318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13319   (eval $ac_try) 2>&5
13320   ac_status=$?
13321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13322   (exit $ac_status); }; }; then
13323   pgac_cv_var_int_timezone=yes
13324 else
13325   echo "$as_me: failed program was:" >&5
13326 sed 's/^/| /' conftest.$ac_ext >&5
13327
13328 pgac_cv_var_int_timezone=no
13329 fi
13330 rm -f conftest.err conftest.$ac_objext \
13331       conftest$ac_exeext conftest.$ac_ext
13332 fi
13333 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13334 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13335 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13336
13337 cat >>confdefs.h <<\_ACEOF
13338 #define HAVE_INT_TIMEZONE
13339 _ACEOF
13340
13341 fi
13342 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13343 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13344  if test "${ac_cv_func_accept_return+set}" = set; then
13345   echo $ECHO_N "(cached) $ECHO_C" >&6
13346 else
13347    if test "${ac_cv_func_accept_arg1+set}" = set; then
13348   echo $ECHO_N "(cached) $ECHO_C" >&6
13349 else
13350     if test "${ac_cv_func_accept_arg2+set}" = set; then
13351   echo $ECHO_N "(cached) $ECHO_C" >&6
13352 else
13353      if test "${ac_cv_func_accept_arg3+set}" = set; then
13354   echo $ECHO_N "(cached) $ECHO_C" >&6
13355 else
13356       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13357       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13358        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13359         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13360          cat >conftest.$ac_ext <<_ACEOF
13361 /* confdefs.h.  */
13362 _ACEOF
13363 cat confdefs.h >>conftest.$ac_ext
13364 cat >>conftest.$ac_ext <<_ACEOF
13365 /* end confdefs.h.  */
13366 #ifdef HAVE_SYS_TYPES_H
13367 #include <sys/types.h>
13368 #endif
13369 #ifdef HAVE_SYS_SOCKET_H
13370 #include <sys/socket.h>
13371 #endif
13372 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13373 int
13374 main ()
13375 {
13376
13377   ;
13378   return 0;
13379 }
13380 _ACEOF
13381 rm -f conftest.$ac_objext
13382 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13383   (eval $ac_compile) 2>conftest.er1
13384   ac_status=$?
13385   grep -v '^ *+' conftest.er1 >conftest.err
13386   rm -f conftest.er1
13387   cat conftest.err >&5
13388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13389   (exit $ac_status); } &&
13390          { ac_try='test -z "$ac_c_werror_flag"
13391                          || test ! -s conftest.err'
13392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13393   (eval $ac_try) 2>&5
13394   ac_status=$?
13395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13396   (exit $ac_status); }; } &&
13397          { ac_try='test -s conftest.$ac_objext'
13398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13399   (eval $ac_try) 2>&5
13400   ac_status=$?
13401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13402   (exit $ac_status); }; }; then
13403   ac_not_found=no; break 4
13404 else
13405   echo "$as_me: failed program was:" >&5
13406 sed 's/^/| /' conftest.$ac_ext >&5
13407
13408 ac_not_found=yes
13409 fi
13410 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13411        done
13412       done
13413      done
13414     done
13415     if test "$ac_not_found" = yes; then
13416       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13417 echo "$as_me: error: could not determine argument types" >&2;}
13418    { (exit 1); exit 1; }; }
13419     fi
13420     if test "$ac_cv_func_accept_arg3" = "void"; then
13421       ac_cv_func_accept_arg3=int
13422     fi
13423
13424 fi
13425
13426 fi
13427
13428 fi
13429
13430 fi
13431  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
13432 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13433
13434 cat >>confdefs.h <<_ACEOF
13435 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13436 _ACEOF
13437
13438
13439 cat >>confdefs.h <<_ACEOF
13440 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13441 _ACEOF
13442
13443
13444 cat >>confdefs.h <<_ACEOF
13445 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13446 _ACEOF
13447
13448
13449 cat >>confdefs.h <<_ACEOF
13450 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13451 _ACEOF
13452
13453
13454 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13455 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13456 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459   cat >conftest.$ac_ext <<_ACEOF
13460 /* confdefs.h.  */
13461 _ACEOF
13462 cat confdefs.h >>conftest.$ac_ext
13463 cat >>conftest.$ac_ext <<_ACEOF
13464 /* end confdefs.h.  */
13465 #include <sys/time.h>
13466 int
13467 main ()
13468 {
13469 struct timeval *tp;
13470 struct timezone *tzp;
13471 gettimeofday(tp,tzp);
13472   ;
13473   return 0;
13474 }
13475 _ACEOF
13476 rm -f conftest.$ac_objext
13477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13478   (eval $ac_compile) 2>conftest.er1
13479   ac_status=$?
13480   grep -v '^ *+' conftest.er1 >conftest.err
13481   rm -f conftest.er1
13482   cat conftest.err >&5
13483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13484   (exit $ac_status); } &&
13485          { ac_try='test -z "$ac_c_werror_flag"
13486                          || test ! -s conftest.err'
13487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13488   (eval $ac_try) 2>&5
13489   ac_status=$?
13490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13491   (exit $ac_status); }; } &&
13492          { ac_try='test -s conftest.$ac_objext'
13493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13494   (eval $ac_try) 2>&5
13495   ac_status=$?
13496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13497   (exit $ac_status); }; }; then
13498   pgac_cv_func_gettimeofday_1arg=no
13499 else
13500   echo "$as_me: failed program was:" >&5
13501 sed 's/^/| /' conftest.$ac_ext >&5
13502
13503 pgac_cv_func_gettimeofday_1arg=yes
13504 fi
13505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13506 fi
13507 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13508 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13509 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13510
13511 cat >>confdefs.h <<\_ACEOF
13512 #define GETTIMEOFDAY_1ARG
13513 _ACEOF
13514
13515 fi
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13539 do
13540 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13541 echo "$as_me:$LINENO: checking for $ac_func" >&5
13542 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13543 if eval "test \"\${$as_ac_var+set}\" = set"; then
13544   echo $ECHO_N "(cached) $ECHO_C" >&6
13545 else
13546   cat >conftest.$ac_ext <<_ACEOF
13547 /* confdefs.h.  */
13548 _ACEOF
13549 cat confdefs.h >>conftest.$ac_ext
13550 cat >>conftest.$ac_ext <<_ACEOF
13551 /* end confdefs.h.  */
13552 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13553    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13554 #define $ac_func innocuous_$ac_func
13555
13556 /* System header to define __stub macros and hopefully few prototypes,
13557     which can conflict with char $ac_func (); below.
13558     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13559     <limits.h> exists even on freestanding compilers.  */
13560
13561 #ifdef __STDC__
13562 # include <limits.h>
13563 #else
13564 # include <assert.h>
13565 #endif
13566
13567 #undef $ac_func
13568
13569 /* Override any gcc2 internal prototype to avoid an error.  */
13570 #ifdef __cplusplus
13571 extern "C"
13572 {
13573 #endif
13574 /* We use char because int might match the return type of a gcc2
13575    builtin and then its argument prototype would still apply.  */
13576 char $ac_func ();
13577 /* The GNU C library defines this for functions which it implements
13578     to always fail with ENOSYS.  Some functions are actually named
13579     something starting with __ and the normal name is an alias.  */
13580 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13581 choke me
13582 #else
13583 char (*f) () = $ac_func;
13584 #endif
13585 #ifdef __cplusplus
13586 }
13587 #endif
13588
13589 int
13590 main ()
13591 {
13592 return f != $ac_func;
13593   ;
13594   return 0;
13595 }
13596 _ACEOF
13597 rm -f conftest.$ac_objext conftest$ac_exeext
13598 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13599   (eval $ac_link) 2>conftest.er1
13600   ac_status=$?
13601   grep -v '^ *+' conftest.er1 >conftest.err
13602   rm -f conftest.er1
13603   cat conftest.err >&5
13604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13605   (exit $ac_status); } &&
13606          { ac_try='test -z "$ac_c_werror_flag"
13607                          || test ! -s conftest.err'
13608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13609   (eval $ac_try) 2>&5
13610   ac_status=$?
13611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13612   (exit $ac_status); }; } &&
13613          { ac_try='test -s conftest$ac_exeext'
13614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13615   (eval $ac_try) 2>&5
13616   ac_status=$?
13617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13618   (exit $ac_status); }; }; then
13619   eval "$as_ac_var=yes"
13620 else
13621   echo "$as_me: failed program was:" >&5
13622 sed 's/^/| /' conftest.$ac_ext >&5
13623
13624 eval "$as_ac_var=no"
13625 fi
13626 rm -f conftest.err conftest.$ac_objext \
13627       conftest$ac_exeext conftest.$ac_ext
13628 fi
13629 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13630 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13631 if test `eval echo '${'$as_ac_var'}'` = yes; then
13632   cat >>confdefs.h <<_ACEOF
13633 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13634 _ACEOF
13635
13636 fi
13637 done
13638
13639
13640 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13641 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13642 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13643   echo $ECHO_N "(cached) $ECHO_C" >&6
13644 else
13645   cat >conftest.$ac_ext <<_ACEOF
13646 /* confdefs.h.  */
13647 _ACEOF
13648 cat confdefs.h >>conftest.$ac_ext
13649 cat >>conftest.$ac_ext <<_ACEOF
13650 /* end confdefs.h.  */
13651 #include <unistd.h>
13652
13653 int
13654 main ()
13655 {
13656 #ifndef fdatasync
13657   char *p = (char *) fdatasync;
13658 #endif
13659
13660   ;
13661   return 0;
13662 }
13663 _ACEOF
13664 rm -f conftest.$ac_objext
13665 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13666   (eval $ac_compile) 2>conftest.er1
13667   ac_status=$?
13668   grep -v '^ *+' conftest.er1 >conftest.err
13669   rm -f conftest.er1
13670   cat conftest.err >&5
13671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13672   (exit $ac_status); } &&
13673          { ac_try='test -z "$ac_c_werror_flag"
13674                          || test ! -s conftest.err'
13675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13676   (eval $ac_try) 2>&5
13677   ac_status=$?
13678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679   (exit $ac_status); }; } &&
13680          { ac_try='test -s conftest.$ac_objext'
13681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13682   (eval $ac_try) 2>&5
13683   ac_status=$?
13684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13685   (exit $ac_status); }; }; then
13686   ac_cv_have_decl_fdatasync=yes
13687 else
13688   echo "$as_me: failed program was:" >&5
13689 sed 's/^/| /' conftest.$ac_ext >&5
13690
13691 ac_cv_have_decl_fdatasync=no
13692 fi
13693 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13694 fi
13695 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13696 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13697 if test $ac_cv_have_decl_fdatasync = yes; then
13698
13699 cat >>confdefs.h <<_ACEOF
13700 #define HAVE_DECL_FDATASYNC 1
13701 _ACEOF
13702
13703
13704 else
13705   cat >>confdefs.h <<_ACEOF
13706 #define HAVE_DECL_FDATASYNC 0
13707 _ACEOF
13708
13709
13710 fi
13711
13712
13713
13714 HAVE_IPV6=no
13715 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13716 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13717 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13718   echo $ECHO_N "(cached) $ECHO_C" >&6
13719 else
13720   cat >conftest.$ac_ext <<_ACEOF
13721 /* confdefs.h.  */
13722 _ACEOF
13723 cat confdefs.h >>conftest.$ac_ext
13724 cat >>conftest.$ac_ext <<_ACEOF
13725 /* end confdefs.h.  */
13726 $ac_includes_default
13727 #include <netinet/in.h>
13728
13729 int
13730 main ()
13731 {
13732 if ((struct sockaddr_in6 *) 0)
13733   return 0;
13734 if (sizeof (struct sockaddr_in6))
13735   return 0;
13736   ;
13737   return 0;
13738 }
13739 _ACEOF
13740 rm -f conftest.$ac_objext
13741 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13742   (eval $ac_compile) 2>conftest.er1
13743   ac_status=$?
13744   grep -v '^ *+' conftest.er1 >conftest.err
13745   rm -f conftest.er1
13746   cat conftest.err >&5
13747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13748   (exit $ac_status); } &&
13749          { ac_try='test -z "$ac_c_werror_flag"
13750                          || test ! -s conftest.err'
13751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13752   (eval $ac_try) 2>&5
13753   ac_status=$?
13754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755   (exit $ac_status); }; } &&
13756          { ac_try='test -s conftest.$ac_objext'
13757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13758   (eval $ac_try) 2>&5
13759   ac_status=$?
13760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13761   (exit $ac_status); }; }; then
13762   ac_cv_type_struct_sockaddr_in6=yes
13763 else
13764   echo "$as_me: failed program was:" >&5
13765 sed 's/^/| /' conftest.$ac_ext >&5
13766
13767 ac_cv_type_struct_sockaddr_in6=no
13768 fi
13769 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13770 fi
13771 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13772 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13773 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13774
13775 cat >>confdefs.h <<\_ACEOF
13776 #define HAVE_IPV6 1
13777 _ACEOF
13778
13779          HAVE_IPV6=yes
13780 fi
13781
13782
13783
13784 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13785 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13786 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13787   echo $ECHO_N "(cached) $ECHO_C" >&6
13788 else
13789   cat >conftest.$ac_ext <<_ACEOF
13790 /* confdefs.h.  */
13791 _ACEOF
13792 cat confdefs.h >>conftest.$ac_ext
13793 cat >>conftest.$ac_ext <<_ACEOF
13794 /* end confdefs.h.  */
13795 #include <machine/vmparam.h>
13796 #include <sys/exec.h>
13797
13798 int
13799 main ()
13800 {
13801 PS_STRINGS->ps_nargvstr = 1;
13802 PS_STRINGS->ps_argvstr = "foo";
13803   ;
13804   return 0;
13805 }
13806 _ACEOF
13807 rm -f conftest.$ac_objext conftest$ac_exeext
13808 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13809   (eval $ac_link) 2>conftest.er1
13810   ac_status=$?
13811   grep -v '^ *+' conftest.er1 >conftest.err
13812   rm -f conftest.er1
13813   cat conftest.err >&5
13814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13815   (exit $ac_status); } &&
13816          { ac_try='test -z "$ac_c_werror_flag"
13817                          || test ! -s conftest.err'
13818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13819   (eval $ac_try) 2>&5
13820   ac_status=$?
13821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13822   (exit $ac_status); }; } &&
13823          { ac_try='test -s conftest$ac_exeext'
13824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13825   (eval $ac_try) 2>&5
13826   ac_status=$?
13827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13828   (exit $ac_status); }; }; then
13829   pgac_cv_var_PS_STRINGS=yes
13830 else
13831   echo "$as_me: failed program was:" >&5
13832 sed 's/^/| /' conftest.$ac_ext >&5
13833
13834 pgac_cv_var_PS_STRINGS=no
13835 fi
13836 rm -f conftest.err conftest.$ac_objext \
13837       conftest$ac_exeext conftest.$ac_ext
13838 fi
13839 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13840 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13841 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13842
13843 cat >>confdefs.h <<\_ACEOF
13844 #define HAVE_PS_STRINGS
13845 _ACEOF
13846
13847 fi
13848
13849
13850 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13851 # is missing.  Yes, there are machines that have only one.  We may
13852 # also decide to use snprintf.c if snprintf() is present but does not
13853 # have all the features we need --- see below.
13854
13855 pgac_need_repl_snprintf=no
13856
13857 for ac_func in snprintf
13858 do
13859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13860 echo "$as_me:$LINENO: checking for $ac_func" >&5
13861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13862 if eval "test \"\${$as_ac_var+set}\" = set"; then
13863   echo $ECHO_N "(cached) $ECHO_C" >&6
13864 else
13865   cat >conftest.$ac_ext <<_ACEOF
13866 /* confdefs.h.  */
13867 _ACEOF
13868 cat confdefs.h >>conftest.$ac_ext
13869 cat >>conftest.$ac_ext <<_ACEOF
13870 /* end confdefs.h.  */
13871 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13872    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13873 #define $ac_func innocuous_$ac_func
13874
13875 /* System header to define __stub macros and hopefully few prototypes,
13876     which can conflict with char $ac_func (); below.
13877     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13878     <limits.h> exists even on freestanding compilers.  */
13879
13880 #ifdef __STDC__
13881 # include <limits.h>
13882 #else
13883 # include <assert.h>
13884 #endif
13885
13886 #undef $ac_func
13887
13888 /* Override any gcc2 internal prototype to avoid an error.  */
13889 #ifdef __cplusplus
13890 extern "C"
13891 {
13892 #endif
13893 /* We use char because int might match the return type of a gcc2
13894    builtin and then its argument prototype would still apply.  */
13895 char $ac_func ();
13896 /* The GNU C library defines this for functions which it implements
13897     to always fail with ENOSYS.  Some functions are actually named
13898     something starting with __ and the normal name is an alias.  */
13899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13900 choke me
13901 #else
13902 char (*f) () = $ac_func;
13903 #endif
13904 #ifdef __cplusplus
13905 }
13906 #endif
13907
13908 int
13909 main ()
13910 {
13911 return f != $ac_func;
13912   ;
13913   return 0;
13914 }
13915 _ACEOF
13916 rm -f conftest.$ac_objext conftest$ac_exeext
13917 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13918   (eval $ac_link) 2>conftest.er1
13919   ac_status=$?
13920   grep -v '^ *+' conftest.er1 >conftest.err
13921   rm -f conftest.er1
13922   cat conftest.err >&5
13923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13924   (exit $ac_status); } &&
13925          { ac_try='test -z "$ac_c_werror_flag"
13926                          || test ! -s conftest.err'
13927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13928   (eval $ac_try) 2>&5
13929   ac_status=$?
13930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13931   (exit $ac_status); }; } &&
13932          { ac_try='test -s conftest$ac_exeext'
13933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13934   (eval $ac_try) 2>&5
13935   ac_status=$?
13936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937   (exit $ac_status); }; }; then
13938   eval "$as_ac_var=yes"
13939 else
13940   echo "$as_me: failed program was:" >&5
13941 sed 's/^/| /' conftest.$ac_ext >&5
13942
13943 eval "$as_ac_var=no"
13944 fi
13945 rm -f conftest.err conftest.$ac_objext \
13946       conftest$ac_exeext conftest.$ac_ext
13947 fi
13948 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13949 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13950 if test `eval echo '${'$as_ac_var'}'` = yes; then
13951   cat >>confdefs.h <<_ACEOF
13952 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13953 _ACEOF
13954
13955 else
13956   pgac_need_repl_snprintf=yes
13957 fi
13958 done
13959
13960
13961 for ac_func in vsnprintf
13962 do
13963 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13964 echo "$as_me:$LINENO: checking for $ac_func" >&5
13965 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13966 if eval "test \"\${$as_ac_var+set}\" = set"; then
13967   echo $ECHO_N "(cached) $ECHO_C" >&6
13968 else
13969   cat >conftest.$ac_ext <<_ACEOF
13970 /* confdefs.h.  */
13971 _ACEOF
13972 cat confdefs.h >>conftest.$ac_ext
13973 cat >>conftest.$ac_ext <<_ACEOF
13974 /* end confdefs.h.  */
13975 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13976    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13977 #define $ac_func innocuous_$ac_func
13978
13979 /* System header to define __stub macros and hopefully few prototypes,
13980     which can conflict with char $ac_func (); below.
13981     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13982     <limits.h> exists even on freestanding compilers.  */
13983
13984 #ifdef __STDC__
13985 # include <limits.h>
13986 #else
13987 # include <assert.h>
13988 #endif
13989
13990 #undef $ac_func
13991
13992 /* Override any gcc2 internal prototype to avoid an error.  */
13993 #ifdef __cplusplus
13994 extern "C"
13995 {
13996 #endif
13997 /* We use char because int might match the return type of a gcc2
13998    builtin and then its argument prototype would still apply.  */
13999 char $ac_func ();
14000 /* The GNU C library defines this for functions which it implements
14001     to always fail with ENOSYS.  Some functions are actually named
14002     something starting with __ and the normal name is an alias.  */
14003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14004 choke me
14005 #else
14006 char (*f) () = $ac_func;
14007 #endif
14008 #ifdef __cplusplus
14009 }
14010 #endif
14011
14012 int
14013 main ()
14014 {
14015 return f != $ac_func;
14016   ;
14017   return 0;
14018 }
14019 _ACEOF
14020 rm -f conftest.$ac_objext conftest$ac_exeext
14021 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14022   (eval $ac_link) 2>conftest.er1
14023   ac_status=$?
14024   grep -v '^ *+' conftest.er1 >conftest.err
14025   rm -f conftest.er1
14026   cat conftest.err >&5
14027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028   (exit $ac_status); } &&
14029          { ac_try='test -z "$ac_c_werror_flag"
14030                          || test ! -s conftest.err'
14031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14032   (eval $ac_try) 2>&5
14033   ac_status=$?
14034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14035   (exit $ac_status); }; } &&
14036          { ac_try='test -s conftest$ac_exeext'
14037   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14038   (eval $ac_try) 2>&5
14039   ac_status=$?
14040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14041   (exit $ac_status); }; }; then
14042   eval "$as_ac_var=yes"
14043 else
14044   echo "$as_me: failed program was:" >&5
14045 sed 's/^/| /' conftest.$ac_ext >&5
14046
14047 eval "$as_ac_var=no"
14048 fi
14049 rm -f conftest.err conftest.$ac_objext \
14050       conftest$ac_exeext conftest.$ac_ext
14051 fi
14052 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14053 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14054 if test `eval echo '${'$as_ac_var'}'` = yes; then
14055   cat >>confdefs.h <<_ACEOF
14056 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14057 _ACEOF
14058
14059 else
14060   pgac_need_repl_snprintf=yes
14061 fi
14062 done
14063
14064
14065
14066 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14067 # include/c.h will provide declarations.  Note this is a separate test
14068 # from whether the functions exist in the C library --- there are
14069 # systems that have the functions but don't bother to declare them :-(
14070
14071 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14072 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14073 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14074   echo $ECHO_N "(cached) $ECHO_C" >&6
14075 else
14076   cat >conftest.$ac_ext <<_ACEOF
14077 /* confdefs.h.  */
14078 _ACEOF
14079 cat confdefs.h >>conftest.$ac_ext
14080 cat >>conftest.$ac_ext <<_ACEOF
14081 /* end confdefs.h.  */
14082 $ac_includes_default
14083 int
14084 main ()
14085 {
14086 #ifndef snprintf
14087   char *p = (char *) snprintf;
14088 #endif
14089
14090   ;
14091   return 0;
14092 }
14093 _ACEOF
14094 rm -f conftest.$ac_objext
14095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14096   (eval $ac_compile) 2>conftest.er1
14097   ac_status=$?
14098   grep -v '^ *+' conftest.er1 >conftest.err
14099   rm -f conftest.er1
14100   cat conftest.err >&5
14101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14102   (exit $ac_status); } &&
14103          { ac_try='test -z "$ac_c_werror_flag"
14104                          || test ! -s conftest.err'
14105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14106   (eval $ac_try) 2>&5
14107   ac_status=$?
14108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14109   (exit $ac_status); }; } &&
14110          { ac_try='test -s conftest.$ac_objext'
14111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14112   (eval $ac_try) 2>&5
14113   ac_status=$?
14114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14115   (exit $ac_status); }; }; then
14116   ac_cv_have_decl_snprintf=yes
14117 else
14118   echo "$as_me: failed program was:" >&5
14119 sed 's/^/| /' conftest.$ac_ext >&5
14120
14121 ac_cv_have_decl_snprintf=no
14122 fi
14123 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14124 fi
14125 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14126 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14127 if test $ac_cv_have_decl_snprintf = yes; then
14128
14129 cat >>confdefs.h <<_ACEOF
14130 #define HAVE_DECL_SNPRINTF 1
14131 _ACEOF
14132
14133
14134 else
14135   cat >>confdefs.h <<_ACEOF
14136 #define HAVE_DECL_SNPRINTF 0
14137 _ACEOF
14138
14139
14140 fi
14141 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14142 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14143 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14144   echo $ECHO_N "(cached) $ECHO_C" >&6
14145 else
14146   cat >conftest.$ac_ext <<_ACEOF
14147 /* confdefs.h.  */
14148 _ACEOF
14149 cat confdefs.h >>conftest.$ac_ext
14150 cat >>conftest.$ac_ext <<_ACEOF
14151 /* end confdefs.h.  */
14152 $ac_includes_default
14153 int
14154 main ()
14155 {
14156 #ifndef vsnprintf
14157   char *p = (char *) vsnprintf;
14158 #endif
14159
14160   ;
14161   return 0;
14162 }
14163 _ACEOF
14164 rm -f conftest.$ac_objext
14165 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14166   (eval $ac_compile) 2>conftest.er1
14167   ac_status=$?
14168   grep -v '^ *+' conftest.er1 >conftest.err
14169   rm -f conftest.er1
14170   cat conftest.err >&5
14171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14172   (exit $ac_status); } &&
14173          { ac_try='test -z "$ac_c_werror_flag"
14174                          || test ! -s conftest.err'
14175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14176   (eval $ac_try) 2>&5
14177   ac_status=$?
14178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14179   (exit $ac_status); }; } &&
14180          { ac_try='test -s conftest.$ac_objext'
14181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14182   (eval $ac_try) 2>&5
14183   ac_status=$?
14184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185   (exit $ac_status); }; }; then
14186   ac_cv_have_decl_vsnprintf=yes
14187 else
14188   echo "$as_me: failed program was:" >&5
14189 sed 's/^/| /' conftest.$ac_ext >&5
14190
14191 ac_cv_have_decl_vsnprintf=no
14192 fi
14193 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14194 fi
14195 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14196 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14197 if test $ac_cv_have_decl_vsnprintf = yes; then
14198
14199 cat >>confdefs.h <<_ACEOF
14200 #define HAVE_DECL_VSNPRINTF 1
14201 _ACEOF
14202
14203
14204 else
14205   cat >>confdefs.h <<_ACEOF
14206 #define HAVE_DECL_VSNPRINTF 0
14207 _ACEOF
14208
14209
14210 fi
14211
14212
14213
14214
14215 # do this one the hard way in case isinf() is a macro
14216 echo "$as_me:$LINENO: checking for isinf" >&5
14217 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14218 if test "${ac_cv_func_isinf+set}" = set; then
14219   echo $ECHO_N "(cached) $ECHO_C" >&6
14220 else
14221   cat >conftest.$ac_ext <<_ACEOF
14222 /* confdefs.h.  */
14223 _ACEOF
14224 cat confdefs.h >>conftest.$ac_ext
14225 cat >>conftest.$ac_ext <<_ACEOF
14226 /* end confdefs.h.  */
14227 #include <math.h>
14228
14229 int
14230 main ()
14231 {
14232 double x = 0.0; int res = isinf(x);
14233   ;
14234   return 0;
14235 }
14236 _ACEOF
14237 rm -f conftest.$ac_objext conftest$ac_exeext
14238 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14239   (eval $ac_link) 2>conftest.er1
14240   ac_status=$?
14241   grep -v '^ *+' conftest.er1 >conftest.err
14242   rm -f conftest.er1
14243   cat conftest.err >&5
14244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14245   (exit $ac_status); } &&
14246          { ac_try='test -z "$ac_c_werror_flag"
14247                          || test ! -s conftest.err'
14248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14249   (eval $ac_try) 2>&5
14250   ac_status=$?
14251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14252   (exit $ac_status); }; } &&
14253          { ac_try='test -s conftest$ac_exeext'
14254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14255   (eval $ac_try) 2>&5
14256   ac_status=$?
14257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14258   (exit $ac_status); }; }; then
14259   ac_cv_func_isinf=yes
14260 else
14261   echo "$as_me: failed program was:" >&5
14262 sed 's/^/| /' conftest.$ac_ext >&5
14263
14264 ac_cv_func_isinf=no
14265 fi
14266 rm -f conftest.err conftest.$ac_objext \
14267       conftest$ac_exeext conftest.$ac_ext
14268 fi
14269 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14270 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14271
14272 if test $ac_cv_func_isinf = yes ; then
14273
14274 cat >>confdefs.h <<\_ACEOF
14275 #define HAVE_ISINF 1
14276 _ACEOF
14277
14278 else
14279   case $LIBOBJS in
14280     "isinf.$ac_objext"   | \
14281   *" isinf.$ac_objext"   | \
14282     "isinf.$ac_objext "* | \
14283   *" isinf.$ac_objext "* ) ;;
14284   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14285 esac
14286
14287   # Look for a way to implement a substitute for isinf()
14288
14289
14290
14291
14292 for ac_func in fpclass fp_class fp_class_d class
14293 do
14294 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14295 echo "$as_me:$LINENO: checking for $ac_func" >&5
14296 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14297 if eval "test \"\${$as_ac_var+set}\" = set"; then
14298   echo $ECHO_N "(cached) $ECHO_C" >&6
14299 else
14300   cat >conftest.$ac_ext <<_ACEOF
14301 /* confdefs.h.  */
14302 _ACEOF
14303 cat confdefs.h >>conftest.$ac_ext
14304 cat >>conftest.$ac_ext <<_ACEOF
14305 /* end confdefs.h.  */
14306 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14307    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14308 #define $ac_func innocuous_$ac_func
14309
14310 /* System header to define __stub macros and hopefully few prototypes,
14311     which can conflict with char $ac_func (); below.
14312     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14313     <limits.h> exists even on freestanding compilers.  */
14314
14315 #ifdef __STDC__
14316 # include <limits.h>
14317 #else
14318 # include <assert.h>
14319 #endif
14320
14321 #undef $ac_func
14322
14323 /* Override any gcc2 internal prototype to avoid an error.  */
14324 #ifdef __cplusplus
14325 extern "C"
14326 {
14327 #endif
14328 /* We use char because int might match the return type of a gcc2
14329    builtin and then its argument prototype would still apply.  */
14330 char $ac_func ();
14331 /* The GNU C library defines this for functions which it implements
14332     to always fail with ENOSYS.  Some functions are actually named
14333     something starting with __ and the normal name is an alias.  */
14334 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14335 choke me
14336 #else
14337 char (*f) () = $ac_func;
14338 #endif
14339 #ifdef __cplusplus
14340 }
14341 #endif
14342
14343 int
14344 main ()
14345 {
14346 return f != $ac_func;
14347   ;
14348   return 0;
14349 }
14350 _ACEOF
14351 rm -f conftest.$ac_objext conftest$ac_exeext
14352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14353   (eval $ac_link) 2>conftest.er1
14354   ac_status=$?
14355   grep -v '^ *+' conftest.er1 >conftest.err
14356   rm -f conftest.er1
14357   cat conftest.err >&5
14358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14359   (exit $ac_status); } &&
14360          { ac_try='test -z "$ac_c_werror_flag"
14361                          || test ! -s conftest.err'
14362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14363   (eval $ac_try) 2>&5
14364   ac_status=$?
14365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14366   (exit $ac_status); }; } &&
14367          { ac_try='test -s conftest$ac_exeext'
14368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14369   (eval $ac_try) 2>&5
14370   ac_status=$?
14371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14372   (exit $ac_status); }; }; then
14373   eval "$as_ac_var=yes"
14374 else
14375   echo "$as_me: failed program was:" >&5
14376 sed 's/^/| /' conftest.$ac_ext >&5
14377
14378 eval "$as_ac_var=no"
14379 fi
14380 rm -f conftest.err conftest.$ac_objext \
14381       conftest$ac_exeext conftest.$ac_ext
14382 fi
14383 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14384 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14385 if test `eval echo '${'$as_ac_var'}'` = yes; then
14386   cat >>confdefs.h <<_ACEOF
14387 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14388 _ACEOF
14389  break
14390 fi
14391 done
14392
14393 fi
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14409 do
14410 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14411 echo "$as_me:$LINENO: checking for $ac_func" >&5
14412 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14413 if eval "test \"\${$as_ac_var+set}\" = set"; then
14414   echo $ECHO_N "(cached) $ECHO_C" >&6
14415 else
14416   cat >conftest.$ac_ext <<_ACEOF
14417 /* confdefs.h.  */
14418 _ACEOF
14419 cat confdefs.h >>conftest.$ac_ext
14420 cat >>conftest.$ac_ext <<_ACEOF
14421 /* end confdefs.h.  */
14422 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14423    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14424 #define $ac_func innocuous_$ac_func
14425
14426 /* System header to define __stub macros and hopefully few prototypes,
14427     which can conflict with char $ac_func (); below.
14428     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14429     <limits.h> exists even on freestanding compilers.  */
14430
14431 #ifdef __STDC__
14432 # include <limits.h>
14433 #else
14434 # include <assert.h>
14435 #endif
14436
14437 #undef $ac_func
14438
14439 /* Override any gcc2 internal prototype to avoid an error.  */
14440 #ifdef __cplusplus
14441 extern "C"
14442 {
14443 #endif
14444 /* We use char because int might match the return type of a gcc2
14445    builtin and then its argument prototype would still apply.  */
14446 char $ac_func ();
14447 /* The GNU C library defines this for functions which it implements
14448     to always fail with ENOSYS.  Some functions are actually named
14449     something starting with __ and the normal name is an alias.  */
14450 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14451 choke me
14452 #else
14453 char (*f) () = $ac_func;
14454 #endif
14455 #ifdef __cplusplus
14456 }
14457 #endif
14458
14459 int
14460 main ()
14461 {
14462 return f != $ac_func;
14463   ;
14464   return 0;
14465 }
14466 _ACEOF
14467 rm -f conftest.$ac_objext conftest$ac_exeext
14468 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14469   (eval $ac_link) 2>conftest.er1
14470   ac_status=$?
14471   grep -v '^ *+' conftest.er1 >conftest.err
14472   rm -f conftest.er1
14473   cat conftest.err >&5
14474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14475   (exit $ac_status); } &&
14476          { ac_try='test -z "$ac_c_werror_flag"
14477                          || test ! -s conftest.err'
14478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14479   (eval $ac_try) 2>&5
14480   ac_status=$?
14481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14482   (exit $ac_status); }; } &&
14483          { ac_try='test -s conftest$ac_exeext'
14484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14485   (eval $ac_try) 2>&5
14486   ac_status=$?
14487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14488   (exit $ac_status); }; }; then
14489   eval "$as_ac_var=yes"
14490 else
14491   echo "$as_me: failed program was:" >&5
14492 sed 's/^/| /' conftest.$ac_ext >&5
14493
14494 eval "$as_ac_var=no"
14495 fi
14496 rm -f conftest.err conftest.$ac_objext \
14497       conftest$ac_exeext conftest.$ac_ext
14498 fi
14499 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14500 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14501 if test `eval echo '${'$as_ac_var'}'` = yes; then
14502   cat >>confdefs.h <<_ACEOF
14503 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14504 _ACEOF
14505
14506 else
14507   case $LIBOBJS in
14508     "$ac_func.$ac_objext"   | \
14509   *" $ac_func.$ac_objext"   | \
14510     "$ac_func.$ac_objext "* | \
14511   *" $ac_func.$ac_objext "* ) ;;
14512   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14513 esac
14514
14515 fi
14516 done
14517
14518
14519
14520 # System's version of getaddrinfo(), if any, may be used only if we found
14521 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14522 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14523 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14524 # because we want to use our own getaddrinfo.c on Windows anyway.)
14525 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14526
14527 for ac_func in getaddrinfo
14528 do
14529 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14530 echo "$as_me:$LINENO: checking for $ac_func" >&5
14531 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14532 if eval "test \"\${$as_ac_var+set}\" = set"; then
14533   echo $ECHO_N "(cached) $ECHO_C" >&6
14534 else
14535   cat >conftest.$ac_ext <<_ACEOF
14536 /* confdefs.h.  */
14537 _ACEOF
14538 cat confdefs.h >>conftest.$ac_ext
14539 cat >>conftest.$ac_ext <<_ACEOF
14540 /* end confdefs.h.  */
14541 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14542    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14543 #define $ac_func innocuous_$ac_func
14544
14545 /* System header to define __stub macros and hopefully few prototypes,
14546     which can conflict with char $ac_func (); below.
14547     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14548     <limits.h> exists even on freestanding compilers.  */
14549
14550 #ifdef __STDC__
14551 # include <limits.h>
14552 #else
14553 # include <assert.h>
14554 #endif
14555
14556 #undef $ac_func
14557
14558 /* Override any gcc2 internal prototype to avoid an error.  */
14559 #ifdef __cplusplus
14560 extern "C"
14561 {
14562 #endif
14563 /* We use char because int might match the return type of a gcc2
14564    builtin and then its argument prototype would still apply.  */
14565 char $ac_func ();
14566 /* The GNU C library defines this for functions which it implements
14567     to always fail with ENOSYS.  Some functions are actually named
14568     something starting with __ and the normal name is an alias.  */
14569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14570 choke me
14571 #else
14572 char (*f) () = $ac_func;
14573 #endif
14574 #ifdef __cplusplus
14575 }
14576 #endif
14577
14578 int
14579 main ()
14580 {
14581 return f != $ac_func;
14582   ;
14583   return 0;
14584 }
14585 _ACEOF
14586 rm -f conftest.$ac_objext conftest$ac_exeext
14587 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14588   (eval $ac_link) 2>conftest.er1
14589   ac_status=$?
14590   grep -v '^ *+' conftest.er1 >conftest.err
14591   rm -f conftest.er1
14592   cat conftest.err >&5
14593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14594   (exit $ac_status); } &&
14595          { ac_try='test -z "$ac_c_werror_flag"
14596                          || test ! -s conftest.err'
14597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14598   (eval $ac_try) 2>&5
14599   ac_status=$?
14600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14601   (exit $ac_status); }; } &&
14602          { ac_try='test -s conftest$ac_exeext'
14603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14604   (eval $ac_try) 2>&5
14605   ac_status=$?
14606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14607   (exit $ac_status); }; }; then
14608   eval "$as_ac_var=yes"
14609 else
14610   echo "$as_me: failed program was:" >&5
14611 sed 's/^/| /' conftest.$ac_ext >&5
14612
14613 eval "$as_ac_var=no"
14614 fi
14615 rm -f conftest.err conftest.$ac_objext \
14616       conftest$ac_exeext conftest.$ac_ext
14617 fi
14618 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14619 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14620 if test `eval echo '${'$as_ac_var'}'` = yes; then
14621   cat >>confdefs.h <<_ACEOF
14622 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14623 _ACEOF
14624
14625 else
14626   case $LIBOBJS in
14627     "$ac_func.$ac_objext"   | \
14628   *" $ac_func.$ac_objext"   | \
14629     "$ac_func.$ac_objext "* | \
14630   *" $ac_func.$ac_objext "* ) ;;
14631   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14632 esac
14633
14634 fi
14635 done
14636
14637
14638 else
14639   case $LIBOBJS in
14640     "getaddrinfo.$ac_objext"   | \
14641   *" getaddrinfo.$ac_objext"   | \
14642     "getaddrinfo.$ac_objext "* | \
14643   *" getaddrinfo.$ac_objext "* ) ;;
14644   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14645 esac
14646
14647 fi
14648
14649 # similarly, use system's getopt_long() only if system provides struct option.
14650 if test x"$ac_cv_type_struct_option" = xyes ; then
14651
14652 for ac_func in getopt_long
14653 do
14654 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14655 echo "$as_me:$LINENO: checking for $ac_func" >&5
14656 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14657 if eval "test \"\${$as_ac_var+set}\" = set"; then
14658   echo $ECHO_N "(cached) $ECHO_C" >&6
14659 else
14660   cat >conftest.$ac_ext <<_ACEOF
14661 /* confdefs.h.  */
14662 _ACEOF
14663 cat confdefs.h >>conftest.$ac_ext
14664 cat >>conftest.$ac_ext <<_ACEOF
14665 /* end confdefs.h.  */
14666 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14667    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14668 #define $ac_func innocuous_$ac_func
14669
14670 /* System header to define __stub macros and hopefully few prototypes,
14671     which can conflict with char $ac_func (); below.
14672     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14673     <limits.h> exists even on freestanding compilers.  */
14674
14675 #ifdef __STDC__
14676 # include <limits.h>
14677 #else
14678 # include <assert.h>
14679 #endif
14680
14681 #undef $ac_func
14682
14683 /* Override any gcc2 internal prototype to avoid an error.  */
14684 #ifdef __cplusplus
14685 extern "C"
14686 {
14687 #endif
14688 /* We use char because int might match the return type of a gcc2
14689    builtin and then its argument prototype would still apply.  */
14690 char $ac_func ();
14691 /* The GNU C library defines this for functions which it implements
14692     to always fail with ENOSYS.  Some functions are actually named
14693     something starting with __ and the normal name is an alias.  */
14694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14695 choke me
14696 #else
14697 char (*f) () = $ac_func;
14698 #endif
14699 #ifdef __cplusplus
14700 }
14701 #endif
14702
14703 int
14704 main ()
14705 {
14706 return f != $ac_func;
14707   ;
14708   return 0;
14709 }
14710 _ACEOF
14711 rm -f conftest.$ac_objext conftest$ac_exeext
14712 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14713   (eval $ac_link) 2>conftest.er1
14714   ac_status=$?
14715   grep -v '^ *+' conftest.er1 >conftest.err
14716   rm -f conftest.er1
14717   cat conftest.err >&5
14718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14719   (exit $ac_status); } &&
14720          { ac_try='test -z "$ac_c_werror_flag"
14721                          || test ! -s conftest.err'
14722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14723   (eval $ac_try) 2>&5
14724   ac_status=$?
14725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14726   (exit $ac_status); }; } &&
14727          { ac_try='test -s conftest$ac_exeext'
14728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14729   (eval $ac_try) 2>&5
14730   ac_status=$?
14731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732   (exit $ac_status); }; }; then
14733   eval "$as_ac_var=yes"
14734 else
14735   echo "$as_me: failed program was:" >&5
14736 sed 's/^/| /' conftest.$ac_ext >&5
14737
14738 eval "$as_ac_var=no"
14739 fi
14740 rm -f conftest.err conftest.$ac_objext \
14741       conftest$ac_exeext conftest.$ac_ext
14742 fi
14743 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14744 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14745 if test `eval echo '${'$as_ac_var'}'` = yes; then
14746   cat >>confdefs.h <<_ACEOF
14747 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14748 _ACEOF
14749
14750 else
14751   case $LIBOBJS in
14752     "$ac_func.$ac_objext"   | \
14753   *" $ac_func.$ac_objext"   | \
14754     "$ac_func.$ac_objext "* | \
14755   *" $ac_func.$ac_objext "* ) ;;
14756   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14757 esac
14758
14759 fi
14760 done
14761
14762
14763 else
14764   case $LIBOBJS in
14765     "getopt_long.$ac_objext"   | \
14766   *" getopt_long.$ac_objext"   | \
14767     "getopt_long.$ac_objext "* | \
14768   *" getopt_long.$ac_objext "* ) ;;
14769   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14770 esac
14771
14772 fi
14773
14774 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14775 # We override the previous test that said fseeko/ftello didn't exist
14776 # OS tests are also done in include/c.h and port/fseeko.c
14777 case $host_os in bsdi*|netbsd*)
14778 ac_cv_func_fseeko=yes
14779 esac
14780
14781 # Solaris has a very slow qsort in certain cases, so we replace it.
14782 if test "$PORTNAME" = "solaris"; then
14783 case $LIBOBJS in
14784     "qsort.$ac_objext"   | \
14785   *" qsort.$ac_objext"   | \
14786     "qsort.$ac_objext "* | \
14787   *" qsort.$ac_objext "* ) ;;
14788   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
14789 esac
14790
14791 fi
14792
14793 # Win32 support
14794 if test "$PORTNAME" = "win32"; then
14795 case $LIBOBJS in
14796     "gettimeofday.$ac_objext"   | \
14797   *" gettimeofday.$ac_objext"   | \
14798     "gettimeofday.$ac_objext "* | \
14799   *" gettimeofday.$ac_objext "* ) ;;
14800   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14801 esac
14802
14803 case $LIBOBJS in
14804     "kill.$ac_objext"   | \
14805   *" kill.$ac_objext"   | \
14806     "kill.$ac_objext "* | \
14807   *" kill.$ac_objext "* ) ;;
14808   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14809 esac
14810
14811 case $LIBOBJS in
14812     "open.$ac_objext"   | \
14813   *" open.$ac_objext"   | \
14814     "open.$ac_objext "* | \
14815   *" open.$ac_objext "* ) ;;
14816   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14817 esac
14818
14819 case $LIBOBJS in
14820     "rand.$ac_objext"   | \
14821   *" rand.$ac_objext"   | \
14822     "rand.$ac_objext "* | \
14823   *" rand.$ac_objext "* ) ;;
14824   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14825 esac
14826
14827
14828 cat >>confdefs.h <<\_ACEOF
14829 #define HAVE_SYMLINK 1
14830 _ACEOF
14831
14832 fi
14833
14834 if test "$with_readline" = yes; then
14835   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
14836 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
14837 cat >conftest.$ac_ext <<_ACEOF
14838 /* confdefs.h.  */
14839 _ACEOF
14840 cat confdefs.h >>conftest.$ac_ext
14841 cat >>conftest.$ac_ext <<_ACEOF
14842 /* end confdefs.h.  */
14843 #include <stdio.h>
14844 #ifdef HAVE_READLINE_READLINE_H
14845 # include <readline/readline.h>
14846 #elif defined(HAVE_READLINE_H)
14847 # include <readline.h>
14848 #endif
14849
14850 int
14851 main ()
14852 {
14853 rl_completion_append_character = 'x';
14854   ;
14855   return 0;
14856 }
14857 _ACEOF
14858 rm -f conftest.$ac_objext conftest$ac_exeext
14859 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14860   (eval $ac_link) 2>conftest.er1
14861   ac_status=$?
14862   grep -v '^ *+' conftest.er1 >conftest.err
14863   rm -f conftest.er1
14864   cat conftest.err >&5
14865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14866   (exit $ac_status); } &&
14867          { ac_try='test -z "$ac_c_werror_flag"
14868                          || test ! -s conftest.err'
14869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14870   (eval $ac_try) 2>&5
14871   ac_status=$?
14872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14873   (exit $ac_status); }; } &&
14874          { ac_try='test -s conftest$ac_exeext'
14875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14876   (eval $ac_try) 2>&5
14877   ac_status=$?
14878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14879   (exit $ac_status); }; }; then
14880   echo "$as_me:$LINENO: result: yes" >&5
14881 echo "${ECHO_T}yes" >&6
14882
14883 cat >>confdefs.h <<\_ACEOF
14884 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
14885 _ACEOF
14886
14887 else
14888   echo "$as_me: failed program was:" >&5
14889 sed 's/^/| /' conftest.$ac_ext >&5
14890
14891 echo "$as_me:$LINENO: result: no" >&5
14892 echo "${ECHO_T}no" >&6
14893 fi
14894 rm -f conftest.err conftest.$ac_objext \
14895       conftest$ac_exeext conftest.$ac_ext
14896
14897
14898 for ac_func in rl_completion_matches rl_filename_completion_function
14899 do
14900 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14901 echo "$as_me:$LINENO: checking for $ac_func" >&5
14902 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14903 if eval "test \"\${$as_ac_var+set}\" = set"; then
14904   echo $ECHO_N "(cached) $ECHO_C" >&6
14905 else
14906   cat >conftest.$ac_ext <<_ACEOF
14907 /* confdefs.h.  */
14908 _ACEOF
14909 cat confdefs.h >>conftest.$ac_ext
14910 cat >>conftest.$ac_ext <<_ACEOF
14911 /* end confdefs.h.  */
14912 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14913    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14914 #define $ac_func innocuous_$ac_func
14915
14916 /* System header to define __stub macros and hopefully few prototypes,
14917     which can conflict with char $ac_func (); below.
14918     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14919     <limits.h> exists even on freestanding compilers.  */
14920
14921 #ifdef __STDC__
14922 # include <limits.h>
14923 #else
14924 # include <assert.h>
14925 #endif
14926
14927 #undef $ac_func
14928
14929 /* Override any gcc2 internal prototype to avoid an error.  */
14930 #ifdef __cplusplus
14931 extern "C"
14932 {
14933 #endif
14934 /* We use char because int might match the return type of a gcc2
14935    builtin and then its argument prototype would still apply.  */
14936 char $ac_func ();
14937 /* The GNU C library defines this for functions which it implements
14938     to always fail with ENOSYS.  Some functions are actually named
14939     something starting with __ and the normal name is an alias.  */
14940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14941 choke me
14942 #else
14943 char (*f) () = $ac_func;
14944 #endif
14945 #ifdef __cplusplus
14946 }
14947 #endif
14948
14949 int
14950 main ()
14951 {
14952 return f != $ac_func;
14953   ;
14954   return 0;
14955 }
14956 _ACEOF
14957 rm -f conftest.$ac_objext conftest$ac_exeext
14958 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14959   (eval $ac_link) 2>conftest.er1
14960   ac_status=$?
14961   grep -v '^ *+' conftest.er1 >conftest.err
14962   rm -f conftest.er1
14963   cat conftest.err >&5
14964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14965   (exit $ac_status); } &&
14966          { ac_try='test -z "$ac_c_werror_flag"
14967                          || test ! -s conftest.err'
14968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14969   (eval $ac_try) 2>&5
14970   ac_status=$?
14971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14972   (exit $ac_status); }; } &&
14973          { ac_try='test -s conftest$ac_exeext'
14974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14975   (eval $ac_try) 2>&5
14976   ac_status=$?
14977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14978   (exit $ac_status); }; }; then
14979   eval "$as_ac_var=yes"
14980 else
14981   echo "$as_me: failed program was:" >&5
14982 sed 's/^/| /' conftest.$ac_ext >&5
14983
14984 eval "$as_ac_var=no"
14985 fi
14986 rm -f conftest.err conftest.$ac_objext \
14987       conftest$ac_exeext conftest.$ac_ext
14988 fi
14989 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14990 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14991 if test `eval echo '${'$as_ac_var'}'` = yes; then
14992   cat >>confdefs.h <<_ACEOF
14993 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14994 _ACEOF
14995
14996 fi
14997 done
14998
14999
15000 for ac_func in replace_history_entry
15001 do
15002 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15003 echo "$as_me:$LINENO: checking for $ac_func" >&5
15004 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15005 if eval "test \"\${$as_ac_var+set}\" = set"; then
15006   echo $ECHO_N "(cached) $ECHO_C" >&6
15007 else
15008   cat >conftest.$ac_ext <<_ACEOF
15009 /* confdefs.h.  */
15010 _ACEOF
15011 cat confdefs.h >>conftest.$ac_ext
15012 cat >>conftest.$ac_ext <<_ACEOF
15013 /* end confdefs.h.  */
15014 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15015    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15016 #define $ac_func innocuous_$ac_func
15017
15018 /* System header to define __stub macros and hopefully few prototypes,
15019     which can conflict with char $ac_func (); below.
15020     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15021     <limits.h> exists even on freestanding compilers.  */
15022
15023 #ifdef __STDC__
15024 # include <limits.h>
15025 #else
15026 # include <assert.h>
15027 #endif
15028
15029 #undef $ac_func
15030
15031 /* Override any gcc2 internal prototype to avoid an error.  */
15032 #ifdef __cplusplus
15033 extern "C"
15034 {
15035 #endif
15036 /* We use char because int might match the return type of a gcc2
15037    builtin and then its argument prototype would still apply.  */
15038 char $ac_func ();
15039 /* The GNU C library defines this for functions which it implements
15040     to always fail with ENOSYS.  Some functions are actually named
15041     something starting with __ and the normal name is an alias.  */
15042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15043 choke me
15044 #else
15045 char (*f) () = $ac_func;
15046 #endif
15047 #ifdef __cplusplus
15048 }
15049 #endif
15050
15051 int
15052 main ()
15053 {
15054 return f != $ac_func;
15055   ;
15056   return 0;
15057 }
15058 _ACEOF
15059 rm -f conftest.$ac_objext conftest$ac_exeext
15060 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15061   (eval $ac_link) 2>conftest.er1
15062   ac_status=$?
15063   grep -v '^ *+' conftest.er1 >conftest.err
15064   rm -f conftest.er1
15065   cat conftest.err >&5
15066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15067   (exit $ac_status); } &&
15068          { ac_try='test -z "$ac_c_werror_flag"
15069                          || test ! -s conftest.err'
15070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15071   (eval $ac_try) 2>&5
15072   ac_status=$?
15073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15074   (exit $ac_status); }; } &&
15075          { ac_try='test -s conftest$ac_exeext'
15076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15077   (eval $ac_try) 2>&5
15078   ac_status=$?
15079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15080   (exit $ac_status); }; }; then
15081   eval "$as_ac_var=yes"
15082 else
15083   echo "$as_me: failed program was:" >&5
15084 sed 's/^/| /' conftest.$ac_ext >&5
15085
15086 eval "$as_ac_var=no"
15087 fi
15088 rm -f conftest.err conftest.$ac_objext \
15089       conftest$ac_exeext conftest.$ac_ext
15090 fi
15091 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15092 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15093 if test `eval echo '${'$as_ac_var'}'` = yes; then
15094   cat >>confdefs.h <<_ACEOF
15095 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15096 _ACEOF
15097
15098 fi
15099 done
15100
15101 fi
15102
15103
15104 echo "$as_me:$LINENO: checking for finite" >&5
15105 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15106 cat >conftest.$ac_ext <<_ACEOF
15107 /* confdefs.h.  */
15108 _ACEOF
15109 cat confdefs.h >>conftest.$ac_ext
15110 cat >>conftest.$ac_ext <<_ACEOF
15111 /* end confdefs.h.  */
15112 #include <math.h>
15113 int
15114 main ()
15115 {
15116 int dummy=finite(1.0);
15117   ;
15118   return 0;
15119 }
15120 _ACEOF
15121 rm -f conftest.$ac_objext conftest$ac_exeext
15122 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15123   (eval $ac_link) 2>conftest.er1
15124   ac_status=$?
15125   grep -v '^ *+' conftest.er1 >conftest.err
15126   rm -f conftest.er1
15127   cat conftest.err >&5
15128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15129   (exit $ac_status); } &&
15130          { ac_try='test -z "$ac_c_werror_flag"
15131                          || test ! -s conftest.err'
15132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15133   (eval $ac_try) 2>&5
15134   ac_status=$?
15135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15136   (exit $ac_status); }; } &&
15137          { ac_try='test -s conftest$ac_exeext'
15138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15139   (eval $ac_try) 2>&5
15140   ac_status=$?
15141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15142   (exit $ac_status); }; }; then
15143
15144 cat >>confdefs.h <<\_ACEOF
15145 #define HAVE_FINITE 1
15146 _ACEOF
15147
15148 echo "$as_me:$LINENO: result: yes" >&5
15149 echo "${ECHO_T}yes" >&6
15150 else
15151   echo "$as_me: failed program was:" >&5
15152 sed 's/^/| /' conftest.$ac_ext >&5
15153
15154 echo "$as_me:$LINENO: result: no" >&5
15155 echo "${ECHO_T}no" >&6
15156 fi
15157 rm -f conftest.err conftest.$ac_objext \
15158       conftest$ac_exeext conftest.$ac_ext
15159
15160 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15161 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15162 cat >conftest.$ac_ext <<_ACEOF
15163 /* confdefs.h.  */
15164 _ACEOF
15165 cat confdefs.h >>conftest.$ac_ext
15166 cat >>conftest.$ac_ext <<_ACEOF
15167 /* end confdefs.h.  */
15168 #include <setjmp.h>
15169 int
15170 main ()
15171 {
15172 sigjmp_buf x; sigsetjmp(x, 1);
15173   ;
15174   return 0;
15175 }
15176 _ACEOF
15177 rm -f conftest.$ac_objext conftest$ac_exeext
15178 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15179   (eval $ac_link) 2>conftest.er1
15180   ac_status=$?
15181   grep -v '^ *+' conftest.er1 >conftest.err
15182   rm -f conftest.er1
15183   cat conftest.err >&5
15184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15185   (exit $ac_status); } &&
15186          { ac_try='test -z "$ac_c_werror_flag"
15187                          || test ! -s conftest.err'
15188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15189   (eval $ac_try) 2>&5
15190   ac_status=$?
15191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15192   (exit $ac_status); }; } &&
15193          { ac_try='test -s conftest$ac_exeext'
15194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15195   (eval $ac_try) 2>&5
15196   ac_status=$?
15197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15198   (exit $ac_status); }; }; then
15199
15200 cat >>confdefs.h <<\_ACEOF
15201 #define HAVE_SIGSETJMP 1
15202 _ACEOF
15203
15204 echo "$as_me:$LINENO: result: yes" >&5
15205 echo "${ECHO_T}yes" >&6
15206 else
15207   echo "$as_me: failed program was:" >&5
15208 sed 's/^/| /' conftest.$ac_ext >&5
15209
15210 echo "$as_me:$LINENO: result: no" >&5
15211 echo "${ECHO_T}no" >&6
15212 fi
15213 rm -f conftest.err conftest.$ac_objext \
15214       conftest$ac_exeext conftest.$ac_ext
15215
15216 echo "$as_me:$LINENO: checking for syslog" >&5
15217 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15218 if test "${ac_cv_func_syslog+set}" = set; then
15219   echo $ECHO_N "(cached) $ECHO_C" >&6
15220 else
15221   cat >conftest.$ac_ext <<_ACEOF
15222 /* confdefs.h.  */
15223 _ACEOF
15224 cat confdefs.h >>conftest.$ac_ext
15225 cat >>conftest.$ac_ext <<_ACEOF
15226 /* end confdefs.h.  */
15227 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15228    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15229 #define syslog innocuous_syslog
15230
15231 /* System header to define __stub macros and hopefully few prototypes,
15232     which can conflict with char syslog (); below.
15233     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15234     <limits.h> exists even on freestanding compilers.  */
15235
15236 #ifdef __STDC__
15237 # include <limits.h>
15238 #else
15239 # include <assert.h>
15240 #endif
15241
15242 #undef syslog
15243
15244 /* Override any gcc2 internal prototype to avoid an error.  */
15245 #ifdef __cplusplus
15246 extern "C"
15247 {
15248 #endif
15249 /* We use char because int might match the return type of a gcc2
15250    builtin and then its argument prototype would still apply.  */
15251 char syslog ();
15252 /* The GNU C library defines this for functions which it implements
15253     to always fail with ENOSYS.  Some functions are actually named
15254     something starting with __ and the normal name is an alias.  */
15255 #if defined (__stub_syslog) || defined (__stub___syslog)
15256 choke me
15257 #else
15258 char (*f) () = syslog;
15259 #endif
15260 #ifdef __cplusplus
15261 }
15262 #endif
15263
15264 int
15265 main ()
15266 {
15267 return f != syslog;
15268   ;
15269   return 0;
15270 }
15271 _ACEOF
15272 rm -f conftest.$ac_objext conftest$ac_exeext
15273 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15274   (eval $ac_link) 2>conftest.er1
15275   ac_status=$?
15276   grep -v '^ *+' conftest.er1 >conftest.err
15277   rm -f conftest.er1
15278   cat conftest.err >&5
15279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15280   (exit $ac_status); } &&
15281          { ac_try='test -z "$ac_c_werror_flag"
15282                          || test ! -s conftest.err'
15283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15284   (eval $ac_try) 2>&5
15285   ac_status=$?
15286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15287   (exit $ac_status); }; } &&
15288          { ac_try='test -s conftest$ac_exeext'
15289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15290   (eval $ac_try) 2>&5
15291   ac_status=$?
15292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15293   (exit $ac_status); }; }; then
15294   ac_cv_func_syslog=yes
15295 else
15296   echo "$as_me: failed program was:" >&5
15297 sed 's/^/| /' conftest.$ac_ext >&5
15298
15299 ac_cv_func_syslog=no
15300 fi
15301 rm -f conftest.err conftest.$ac_objext \
15302       conftest$ac_exeext conftest.$ac_ext
15303 fi
15304 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15305 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15306 if test $ac_cv_func_syslog = yes; then
15307   if test "${ac_cv_header_syslog_h+set}" = set; then
15308   echo "$as_me:$LINENO: checking for syslog.h" >&5
15309 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15310 if test "${ac_cv_header_syslog_h+set}" = set; then
15311   echo $ECHO_N "(cached) $ECHO_C" >&6
15312 fi
15313 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15314 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15315 else
15316   # Is the header compilable?
15317 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15318 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15319 cat >conftest.$ac_ext <<_ACEOF
15320 /* confdefs.h.  */
15321 _ACEOF
15322 cat confdefs.h >>conftest.$ac_ext
15323 cat >>conftest.$ac_ext <<_ACEOF
15324 /* end confdefs.h.  */
15325 $ac_includes_default
15326 #include <syslog.h>
15327 _ACEOF
15328 rm -f conftest.$ac_objext
15329 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15330   (eval $ac_compile) 2>conftest.er1
15331   ac_status=$?
15332   grep -v '^ *+' conftest.er1 >conftest.err
15333   rm -f conftest.er1
15334   cat conftest.err >&5
15335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336   (exit $ac_status); } &&
15337          { ac_try='test -z "$ac_c_werror_flag"
15338                          || test ! -s conftest.err'
15339   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15340   (eval $ac_try) 2>&5
15341   ac_status=$?
15342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15343   (exit $ac_status); }; } &&
15344          { ac_try='test -s conftest.$ac_objext'
15345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15346   (eval $ac_try) 2>&5
15347   ac_status=$?
15348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15349   (exit $ac_status); }; }; then
15350   ac_header_compiler=yes
15351 else
15352   echo "$as_me: failed program was:" >&5
15353 sed 's/^/| /' conftest.$ac_ext >&5
15354
15355 ac_header_compiler=no
15356 fi
15357 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15358 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15359 echo "${ECHO_T}$ac_header_compiler" >&6
15360
15361 # Is the header present?
15362 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15363 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15364 cat >conftest.$ac_ext <<_ACEOF
15365 /* confdefs.h.  */
15366 _ACEOF
15367 cat confdefs.h >>conftest.$ac_ext
15368 cat >>conftest.$ac_ext <<_ACEOF
15369 /* end confdefs.h.  */
15370 #include <syslog.h>
15371 _ACEOF
15372 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15373   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15374   ac_status=$?
15375   grep -v '^ *+' conftest.er1 >conftest.err
15376   rm -f conftest.er1
15377   cat conftest.err >&5
15378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15379   (exit $ac_status); } >/dev/null; then
15380   if test -s conftest.err; then
15381     ac_cpp_err=$ac_c_preproc_warn_flag
15382     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15383   else
15384     ac_cpp_err=
15385   fi
15386 else
15387   ac_cpp_err=yes
15388 fi
15389 if test -z "$ac_cpp_err"; then
15390   ac_header_preproc=yes
15391 else
15392   echo "$as_me: failed program was:" >&5
15393 sed 's/^/| /' conftest.$ac_ext >&5
15394
15395   ac_header_preproc=no
15396 fi
15397 rm -f conftest.err conftest.$ac_ext
15398 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15399 echo "${ECHO_T}$ac_header_preproc" >&6
15400
15401 # So?  What about this header?
15402 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15403   yes:no: )
15404     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15405 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15406     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15407 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15408     ac_header_preproc=yes
15409     ;;
15410   no:yes:* )
15411     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15412 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15413     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15414 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15415     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15416 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15417     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15418 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15419     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15420 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15421     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15422 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15423     (
15424       cat <<\_ASBOX
15425 ## ---------------------------------------- ##
15426 ## Report this to pgsql-bugs@postgresql.org ##
15427 ## ---------------------------------------- ##
15428 _ASBOX
15429     ) |
15430       sed "s/^/$as_me: WARNING:     /" >&2
15431     ;;
15432 esac
15433 echo "$as_me:$LINENO: checking for syslog.h" >&5
15434 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15435 if test "${ac_cv_header_syslog_h+set}" = set; then
15436   echo $ECHO_N "(cached) $ECHO_C" >&6
15437 else
15438   ac_cv_header_syslog_h=$ac_header_preproc
15439 fi
15440 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15441 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15442
15443 fi
15444 if test $ac_cv_header_syslog_h = yes; then
15445
15446 cat >>confdefs.h <<\_ACEOF
15447 #define HAVE_SYSLOG 1
15448 _ACEOF
15449
15450 fi
15451
15452
15453 fi
15454
15455
15456 echo "$as_me:$LINENO: checking for optreset" >&5
15457 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15458 if test "${pgac_cv_var_int_optreset+set}" = set; then
15459   echo $ECHO_N "(cached) $ECHO_C" >&6
15460 else
15461   cat >conftest.$ac_ext <<_ACEOF
15462 /* confdefs.h.  */
15463 _ACEOF
15464 cat confdefs.h >>conftest.$ac_ext
15465 cat >>conftest.$ac_ext <<_ACEOF
15466 /* end confdefs.h.  */
15467 #include <unistd.h>
15468 int
15469 main ()
15470 {
15471 extern int optreset; optreset = 1;
15472   ;
15473   return 0;
15474 }
15475 _ACEOF
15476 rm -f conftest.$ac_objext conftest$ac_exeext
15477 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15478   (eval $ac_link) 2>conftest.er1
15479   ac_status=$?
15480   grep -v '^ *+' conftest.er1 >conftest.err
15481   rm -f conftest.er1
15482   cat conftest.err >&5
15483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15484   (exit $ac_status); } &&
15485          { ac_try='test -z "$ac_c_werror_flag"
15486                          || test ! -s conftest.err'
15487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15488   (eval $ac_try) 2>&5
15489   ac_status=$?
15490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15491   (exit $ac_status); }; } &&
15492          { ac_try='test -s conftest$ac_exeext'
15493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15494   (eval $ac_try) 2>&5
15495   ac_status=$?
15496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15497   (exit $ac_status); }; }; then
15498   pgac_cv_var_int_optreset=yes
15499 else
15500   echo "$as_me: failed program was:" >&5
15501 sed 's/^/| /' conftest.$ac_ext >&5
15502
15503 pgac_cv_var_int_optreset=no
15504 fi
15505 rm -f conftest.err conftest.$ac_objext \
15506       conftest$ac_exeext conftest.$ac_ext
15507 fi
15508 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15509 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15510 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15511
15512 cat >>confdefs.h <<\_ACEOF
15513 #define HAVE_INT_OPTRESET 1
15514 _ACEOF
15515
15516 fi
15517
15518
15519
15520 for ac_func in strtoll strtoq
15521 do
15522 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15523 echo "$as_me:$LINENO: checking for $ac_func" >&5
15524 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15525 if eval "test \"\${$as_ac_var+set}\" = set"; then
15526   echo $ECHO_N "(cached) $ECHO_C" >&6
15527 else
15528   cat >conftest.$ac_ext <<_ACEOF
15529 /* confdefs.h.  */
15530 _ACEOF
15531 cat confdefs.h >>conftest.$ac_ext
15532 cat >>conftest.$ac_ext <<_ACEOF
15533 /* end confdefs.h.  */
15534 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15535    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15536 #define $ac_func innocuous_$ac_func
15537
15538 /* System header to define __stub macros and hopefully few prototypes,
15539     which can conflict with char $ac_func (); below.
15540     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15541     <limits.h> exists even on freestanding compilers.  */
15542
15543 #ifdef __STDC__
15544 # include <limits.h>
15545 #else
15546 # include <assert.h>
15547 #endif
15548
15549 #undef $ac_func
15550
15551 /* Override any gcc2 internal prototype to avoid an error.  */
15552 #ifdef __cplusplus
15553 extern "C"
15554 {
15555 #endif
15556 /* We use char because int might match the return type of a gcc2
15557    builtin and then its argument prototype would still apply.  */
15558 char $ac_func ();
15559 /* The GNU C library defines this for functions which it implements
15560     to always fail with ENOSYS.  Some functions are actually named
15561     something starting with __ and the normal name is an alias.  */
15562 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15563 choke me
15564 #else
15565 char (*f) () = $ac_func;
15566 #endif
15567 #ifdef __cplusplus
15568 }
15569 #endif
15570
15571 int
15572 main ()
15573 {
15574 return f != $ac_func;
15575   ;
15576   return 0;
15577 }
15578 _ACEOF
15579 rm -f conftest.$ac_objext conftest$ac_exeext
15580 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15581   (eval $ac_link) 2>conftest.er1
15582   ac_status=$?
15583   grep -v '^ *+' conftest.er1 >conftest.err
15584   rm -f conftest.er1
15585   cat conftest.err >&5
15586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15587   (exit $ac_status); } &&
15588          { ac_try='test -z "$ac_c_werror_flag"
15589                          || test ! -s conftest.err'
15590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15591   (eval $ac_try) 2>&5
15592   ac_status=$?
15593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594   (exit $ac_status); }; } &&
15595          { ac_try='test -s conftest$ac_exeext'
15596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15597   (eval $ac_try) 2>&5
15598   ac_status=$?
15599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15600   (exit $ac_status); }; }; then
15601   eval "$as_ac_var=yes"
15602 else
15603   echo "$as_me: failed program was:" >&5
15604 sed 's/^/| /' conftest.$ac_ext >&5
15605
15606 eval "$as_ac_var=no"
15607 fi
15608 rm -f conftest.err conftest.$ac_objext \
15609       conftest$ac_exeext conftest.$ac_ext
15610 fi
15611 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15612 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15613 if test `eval echo '${'$as_ac_var'}'` = yes; then
15614   cat >>confdefs.h <<_ACEOF
15615 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15616 _ACEOF
15617  break
15618 fi
15619 done
15620
15621
15622
15623 for ac_func in strtoull strtouq
15624 do
15625 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15626 echo "$as_me:$LINENO: checking for $ac_func" >&5
15627 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15628 if eval "test \"\${$as_ac_var+set}\" = set"; then
15629   echo $ECHO_N "(cached) $ECHO_C" >&6
15630 else
15631   cat >conftest.$ac_ext <<_ACEOF
15632 /* confdefs.h.  */
15633 _ACEOF
15634 cat confdefs.h >>conftest.$ac_ext
15635 cat >>conftest.$ac_ext <<_ACEOF
15636 /* end confdefs.h.  */
15637 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15638    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15639 #define $ac_func innocuous_$ac_func
15640
15641 /* System header to define __stub macros and hopefully few prototypes,
15642     which can conflict with char $ac_func (); below.
15643     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15644     <limits.h> exists even on freestanding compilers.  */
15645
15646 #ifdef __STDC__
15647 # include <limits.h>
15648 #else
15649 # include <assert.h>
15650 #endif
15651
15652 #undef $ac_func
15653
15654 /* Override any gcc2 internal prototype to avoid an error.  */
15655 #ifdef __cplusplus
15656 extern "C"
15657 {
15658 #endif
15659 /* We use char because int might match the return type of a gcc2
15660    builtin and then its argument prototype would still apply.  */
15661 char $ac_func ();
15662 /* The GNU C library defines this for functions which it implements
15663     to always fail with ENOSYS.  Some functions are actually named
15664     something starting with __ and the normal name is an alias.  */
15665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15666 choke me
15667 #else
15668 char (*f) () = $ac_func;
15669 #endif
15670 #ifdef __cplusplus
15671 }
15672 #endif
15673
15674 int
15675 main ()
15676 {
15677 return f != $ac_func;
15678   ;
15679   return 0;
15680 }
15681 _ACEOF
15682 rm -f conftest.$ac_objext conftest$ac_exeext
15683 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15684   (eval $ac_link) 2>conftest.er1
15685   ac_status=$?
15686   grep -v '^ *+' conftest.er1 >conftest.err
15687   rm -f conftest.er1
15688   cat conftest.err >&5
15689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15690   (exit $ac_status); } &&
15691          { ac_try='test -z "$ac_c_werror_flag"
15692                          || test ! -s conftest.err'
15693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15694   (eval $ac_try) 2>&5
15695   ac_status=$?
15696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697   (exit $ac_status); }; } &&
15698          { ac_try='test -s conftest$ac_exeext'
15699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15700   (eval $ac_try) 2>&5
15701   ac_status=$?
15702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15703   (exit $ac_status); }; }; then
15704   eval "$as_ac_var=yes"
15705 else
15706   echo "$as_me: failed program was:" >&5
15707 sed 's/^/| /' conftest.$ac_ext >&5
15708
15709 eval "$as_ac_var=no"
15710 fi
15711 rm -f conftest.err conftest.$ac_objext \
15712       conftest$ac_exeext conftest.$ac_ext
15713 fi
15714 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15715 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15716 if test `eval echo '${'$as_ac_var'}'` = yes; then
15717   cat >>confdefs.h <<_ACEOF
15718 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15719 _ACEOF
15720  break
15721 fi
15722 done
15723
15724
15725 # Check for one of atexit() or on_exit()
15726
15727 for ac_func in atexit
15728 do
15729 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15730 echo "$as_me:$LINENO: checking for $ac_func" >&5
15731 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15732 if eval "test \"\${$as_ac_var+set}\" = set"; then
15733   echo $ECHO_N "(cached) $ECHO_C" >&6
15734 else
15735   cat >conftest.$ac_ext <<_ACEOF
15736 /* confdefs.h.  */
15737 _ACEOF
15738 cat confdefs.h >>conftest.$ac_ext
15739 cat >>conftest.$ac_ext <<_ACEOF
15740 /* end confdefs.h.  */
15741 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15742    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15743 #define $ac_func innocuous_$ac_func
15744
15745 /* System header to define __stub macros and hopefully few prototypes,
15746     which can conflict with char $ac_func (); below.
15747     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15748     <limits.h> exists even on freestanding compilers.  */
15749
15750 #ifdef __STDC__
15751 # include <limits.h>
15752 #else
15753 # include <assert.h>
15754 #endif
15755
15756 #undef $ac_func
15757
15758 /* Override any gcc2 internal prototype to avoid an error.  */
15759 #ifdef __cplusplus
15760 extern "C"
15761 {
15762 #endif
15763 /* We use char because int might match the return type of a gcc2
15764    builtin and then its argument prototype would still apply.  */
15765 char $ac_func ();
15766 /* The GNU C library defines this for functions which it implements
15767     to always fail with ENOSYS.  Some functions are actually named
15768     something starting with __ and the normal name is an alias.  */
15769 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15770 choke me
15771 #else
15772 char (*f) () = $ac_func;
15773 #endif
15774 #ifdef __cplusplus
15775 }
15776 #endif
15777
15778 int
15779 main ()
15780 {
15781 return f != $ac_func;
15782   ;
15783   return 0;
15784 }
15785 _ACEOF
15786 rm -f conftest.$ac_objext conftest$ac_exeext
15787 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15788   (eval $ac_link) 2>conftest.er1
15789   ac_status=$?
15790   grep -v '^ *+' conftest.er1 >conftest.err
15791   rm -f conftest.er1
15792   cat conftest.err >&5
15793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15794   (exit $ac_status); } &&
15795          { ac_try='test -z "$ac_c_werror_flag"
15796                          || test ! -s conftest.err'
15797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15798   (eval $ac_try) 2>&5
15799   ac_status=$?
15800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15801   (exit $ac_status); }; } &&
15802          { ac_try='test -s conftest$ac_exeext'
15803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15804   (eval $ac_try) 2>&5
15805   ac_status=$?
15806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15807   (exit $ac_status); }; }; then
15808   eval "$as_ac_var=yes"
15809 else
15810   echo "$as_me: failed program was:" >&5
15811 sed 's/^/| /' conftest.$ac_ext >&5
15812
15813 eval "$as_ac_var=no"
15814 fi
15815 rm -f conftest.err conftest.$ac_objext \
15816       conftest$ac_exeext conftest.$ac_ext
15817 fi
15818 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15819 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15820 if test `eval echo '${'$as_ac_var'}'` = yes; then
15821   cat >>confdefs.h <<_ACEOF
15822 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15823 _ACEOF
15824
15825 else
15826
15827 for ac_func in on_exit
15828 do
15829 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15830 echo "$as_me:$LINENO: checking for $ac_func" >&5
15831 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15832 if eval "test \"\${$as_ac_var+set}\" = set"; then
15833   echo $ECHO_N "(cached) $ECHO_C" >&6
15834 else
15835   cat >conftest.$ac_ext <<_ACEOF
15836 /* confdefs.h.  */
15837 _ACEOF
15838 cat confdefs.h >>conftest.$ac_ext
15839 cat >>conftest.$ac_ext <<_ACEOF
15840 /* end confdefs.h.  */
15841 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15842    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15843 #define $ac_func innocuous_$ac_func
15844
15845 /* System header to define __stub macros and hopefully few prototypes,
15846     which can conflict with char $ac_func (); below.
15847     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15848     <limits.h> exists even on freestanding compilers.  */
15849
15850 #ifdef __STDC__
15851 # include <limits.h>
15852 #else
15853 # include <assert.h>
15854 #endif
15855
15856 #undef $ac_func
15857
15858 /* Override any gcc2 internal prototype to avoid an error.  */
15859 #ifdef __cplusplus
15860 extern "C"
15861 {
15862 #endif
15863 /* We use char because int might match the return type of a gcc2
15864    builtin and then its argument prototype would still apply.  */
15865 char $ac_func ();
15866 /* The GNU C library defines this for functions which it implements
15867     to always fail with ENOSYS.  Some functions are actually named
15868     something starting with __ and the normal name is an alias.  */
15869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15870 choke me
15871 #else
15872 char (*f) () = $ac_func;
15873 #endif
15874 #ifdef __cplusplus
15875 }
15876 #endif
15877
15878 int
15879 main ()
15880 {
15881 return f != $ac_func;
15882   ;
15883   return 0;
15884 }
15885 _ACEOF
15886 rm -f conftest.$ac_objext conftest$ac_exeext
15887 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15888   (eval $ac_link) 2>conftest.er1
15889   ac_status=$?
15890   grep -v '^ *+' conftest.er1 >conftest.err
15891   rm -f conftest.er1
15892   cat conftest.err >&5
15893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15894   (exit $ac_status); } &&
15895          { ac_try='test -z "$ac_c_werror_flag"
15896                          || test ! -s conftest.err'
15897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15898   (eval $ac_try) 2>&5
15899   ac_status=$?
15900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15901   (exit $ac_status); }; } &&
15902          { ac_try='test -s conftest$ac_exeext'
15903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15904   (eval $ac_try) 2>&5
15905   ac_status=$?
15906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15907   (exit $ac_status); }; }; then
15908   eval "$as_ac_var=yes"
15909 else
15910   echo "$as_me: failed program was:" >&5
15911 sed 's/^/| /' conftest.$ac_ext >&5
15912
15913 eval "$as_ac_var=no"
15914 fi
15915 rm -f conftest.err conftest.$ac_objext \
15916       conftest$ac_exeext conftest.$ac_ext
15917 fi
15918 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15919 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15920 if test `eval echo '${'$as_ac_var'}'` = yes; then
15921   cat >>confdefs.h <<_ACEOF
15922 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15923 _ACEOF
15924
15925 else
15926   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
15927 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
15928    { (exit 1); exit 1; }; }
15929 fi
15930 done
15931
15932 fi
15933 done
15934
15935
15936 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15937 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
15938 if test "${ac_cv_sys_largefile_source+set}" = set; then
15939   echo $ECHO_N "(cached) $ECHO_C" >&6
15940 else
15941   while :; do
15942   ac_cv_sys_largefile_source=no
15943   cat >conftest.$ac_ext <<_ACEOF
15944 /* confdefs.h.  */
15945 _ACEOF
15946 cat confdefs.h >>conftest.$ac_ext
15947 cat >>conftest.$ac_ext <<_ACEOF
15948 /* end confdefs.h.  */
15949 #include <stdio.h>
15950 int
15951 main ()
15952 {
15953 return !fseeko;
15954   ;
15955   return 0;
15956 }
15957 _ACEOF
15958 rm -f conftest.$ac_objext
15959 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15960   (eval $ac_compile) 2>conftest.er1
15961   ac_status=$?
15962   grep -v '^ *+' conftest.er1 >conftest.err
15963   rm -f conftest.er1
15964   cat conftest.err >&5
15965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15966   (exit $ac_status); } &&
15967          { ac_try='test -z "$ac_c_werror_flag"
15968                          || test ! -s conftest.err'
15969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15970   (eval $ac_try) 2>&5
15971   ac_status=$?
15972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15973   (exit $ac_status); }; } &&
15974          { ac_try='test -s conftest.$ac_objext'
15975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15976   (eval $ac_try) 2>&5
15977   ac_status=$?
15978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15979   (exit $ac_status); }; }; then
15980   break
15981 else
15982   echo "$as_me: failed program was:" >&5
15983 sed 's/^/| /' conftest.$ac_ext >&5
15984
15985 fi
15986 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15987   cat >conftest.$ac_ext <<_ACEOF
15988 /* confdefs.h.  */
15989 _ACEOF
15990 cat confdefs.h >>conftest.$ac_ext
15991 cat >>conftest.$ac_ext <<_ACEOF
15992 /* end confdefs.h.  */
15993 #define _LARGEFILE_SOURCE 1
15994 #include <stdio.h>
15995 int
15996 main ()
15997 {
15998 return !fseeko;
15999   ;
16000   return 0;
16001 }
16002 _ACEOF
16003 rm -f conftest.$ac_objext
16004 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16005   (eval $ac_compile) 2>conftest.er1
16006   ac_status=$?
16007   grep -v '^ *+' conftest.er1 >conftest.err
16008   rm -f conftest.er1
16009   cat conftest.err >&5
16010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16011   (exit $ac_status); } &&
16012          { ac_try='test -z "$ac_c_werror_flag"
16013                          || test ! -s conftest.err'
16014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16015   (eval $ac_try) 2>&5
16016   ac_status=$?
16017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16018   (exit $ac_status); }; } &&
16019          { ac_try='test -s conftest.$ac_objext'
16020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16021   (eval $ac_try) 2>&5
16022   ac_status=$?
16023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16024   (exit $ac_status); }; }; then
16025   ac_cv_sys_largefile_source=1; break
16026 else
16027   echo "$as_me: failed program was:" >&5
16028 sed 's/^/| /' conftest.$ac_ext >&5
16029
16030 fi
16031 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16032   break
16033 done
16034 fi
16035 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16036 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16037 if test "$ac_cv_sys_largefile_source" != no; then
16038
16039 cat >>confdefs.h <<_ACEOF
16040 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16041 _ACEOF
16042
16043 fi
16044 rm -f conftest*
16045
16046 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16047 # in glibc 2.1.3, but that breaks too many other things.
16048 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16049 echo "$as_me:$LINENO: checking for fseeko" >&5
16050 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16051 if test "${ac_cv_func_fseeko+set}" = set; then
16052   echo $ECHO_N "(cached) $ECHO_C" >&6
16053 else
16054   cat >conftest.$ac_ext <<_ACEOF
16055 /* confdefs.h.  */
16056 _ACEOF
16057 cat confdefs.h >>conftest.$ac_ext
16058 cat >>conftest.$ac_ext <<_ACEOF
16059 /* end confdefs.h.  */
16060 #include <stdio.h>
16061 int
16062 main ()
16063 {
16064 return fseeko && fseeko (stdin, 0, 0);
16065   ;
16066   return 0;
16067 }
16068 _ACEOF
16069 rm -f conftest.$ac_objext conftest$ac_exeext
16070 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16071   (eval $ac_link) 2>conftest.er1
16072   ac_status=$?
16073   grep -v '^ *+' conftest.er1 >conftest.err
16074   rm -f conftest.er1
16075   cat conftest.err >&5
16076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16077   (exit $ac_status); } &&
16078          { ac_try='test -z "$ac_c_werror_flag"
16079                          || test ! -s conftest.err'
16080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16081   (eval $ac_try) 2>&5
16082   ac_status=$?
16083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16084   (exit $ac_status); }; } &&
16085          { ac_try='test -s conftest$ac_exeext'
16086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16087   (eval $ac_try) 2>&5
16088   ac_status=$?
16089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16090   (exit $ac_status); }; }; then
16091   ac_cv_func_fseeko=yes
16092 else
16093   echo "$as_me: failed program was:" >&5
16094 sed 's/^/| /' conftest.$ac_ext >&5
16095
16096 ac_cv_func_fseeko=no
16097 fi
16098 rm -f conftest.err conftest.$ac_objext \
16099       conftest$ac_exeext conftest.$ac_ext
16100 fi
16101 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16102 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16103 if test $ac_cv_func_fseeko = yes; then
16104
16105 cat >>confdefs.h <<\_ACEOF
16106 #define HAVE_FSEEKO 1
16107 _ACEOF
16108
16109 fi
16110
16111
16112 #
16113 # Pthreads
16114 #
16115 # For each platform, we need to know about any special compile and link
16116 # libraries, and whether the normal C function names are thread-safe.
16117 # See the comment at the top of src/port/thread.c for more information.
16118 #
16119 if test "$enable_thread_safety" = yes; then
16120
16121
16122
16123
16124 ac_ext=c
16125 ac_cpp='$CPP $CPPFLAGS'
16126 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16127 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16128 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16129
16130 acx_pthread_ok=no
16131
16132 # We used to check for pthread.h first, but this fails if pthread.h
16133 # requires special compiler flags (e.g. on True64 or Sequent).
16134 # It gets checked for in the link test anyway.
16135
16136 # First of all, check if the user has set any of the PTHREAD_LIBS,
16137 # etcetera environment variables, and if threads linking works using
16138 # them:
16139 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16140         save_CFLAGS="$CFLAGS"
16141         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16142         save_LIBS="$LIBS"
16143         LIBS="$PTHREAD_LIBS $LIBS"
16144         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16145 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16146         cat >conftest.$ac_ext <<_ACEOF
16147 /* confdefs.h.  */
16148 _ACEOF
16149 cat confdefs.h >>conftest.$ac_ext
16150 cat >>conftest.$ac_ext <<_ACEOF
16151 /* end confdefs.h.  */
16152
16153 /* Override any gcc2 internal prototype to avoid an error.  */
16154 #ifdef __cplusplus
16155 extern "C"
16156 #endif
16157 /* We use char because int might match the return type of a gcc2
16158    builtin and then its argument prototype would still apply.  */
16159 char pthread_join ();
16160 int
16161 main ()
16162 {
16163 pthread_join ();
16164   ;
16165   return 0;
16166 }
16167 _ACEOF
16168 rm -f conftest.$ac_objext conftest$ac_exeext
16169 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16170   (eval $ac_link) 2>conftest.er1
16171   ac_status=$?
16172   grep -v '^ *+' conftest.er1 >conftest.err
16173   rm -f conftest.er1
16174   cat conftest.err >&5
16175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16176   (exit $ac_status); } &&
16177          { ac_try='test -z "$ac_c_werror_flag"
16178                          || test ! -s conftest.err'
16179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16180   (eval $ac_try) 2>&5
16181   ac_status=$?
16182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16183   (exit $ac_status); }; } &&
16184          { ac_try='test -s conftest$ac_exeext'
16185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16186   (eval $ac_try) 2>&5
16187   ac_status=$?
16188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16189   (exit $ac_status); }; }; then
16190   acx_pthread_ok=yes
16191 else
16192   echo "$as_me: failed program was:" >&5
16193 sed 's/^/| /' conftest.$ac_ext >&5
16194
16195 fi
16196 rm -f conftest.err conftest.$ac_objext \
16197       conftest$ac_exeext conftest.$ac_ext
16198         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16199 echo "${ECHO_T}$acx_pthread_ok" >&6
16200         if test x"$acx_pthread_ok" = xno; then
16201                 PTHREAD_LIBS=""
16202                 PTHREAD_CFLAGS=""
16203         fi
16204         LIBS="$save_LIBS"
16205         CFLAGS="$save_CFLAGS"
16206 fi
16207
16208 # We must check for the threads library under a number of different
16209 # names; the ordering is very important because some systems
16210 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16211 # libraries is broken (non-POSIX).
16212
16213 # Create a list of thread flags to try.  Items starting with a "-" are
16214 # C compiler flags, and other items are library names, except for "none"
16215 # which indicates that we try without any flags at all, and "pthread-config"
16216 # which is a program returning the flags for the Pth emulation library.
16217
16218 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16219
16220 # The ordering *is* (sometimes) important.  Some notes on the
16221 # individual items follow:
16222
16223 # pthreads: AIX (must check this before -lpthread)
16224 # none: in case threads are in libc; should be tried before -Kthread and
16225 #       other compiler flags to prevent continual compiler warnings
16226 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16227 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16228 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16229 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16230 # -pthreads: Solaris/gcc
16231 # -mthreads: Mingw32/gcc, Lynx/gcc
16232 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16233 #      doesn't hurt to check since this sometimes defines pthreads too;
16234 #      also defines -D_REENTRANT)
16235 # pthread: Linux, etcetera
16236 # --thread-safe: KAI C++
16237 # pthread-config: use pthread-config program (for GNU Pth library)
16238
16239 case "${host_cpu}-${host_os}" in
16240         *solaris*)
16241
16242         # On Solaris (at least, for some versions), libc contains stubbed
16243         # (non-functional) versions of the pthreads routines, so link-based
16244         # tests will erroneously succeed.  (We need to link with -pthread or
16245         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16246         # a function called by this macro, so we could check for that, but
16247         # who knows whether they'll stub that too in a future libc.)  So,
16248         # we'll just look for -pthreads and -lpthread first:
16249
16250         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16251         ;;
16252 esac
16253
16254 if test x"$acx_pthread_ok" = xno; then
16255 for flag in $acx_pthread_flags; do
16256
16257         tryPTHREAD_CFLAGS=""
16258         tryPTHREAD_LIBS=""
16259         case $flag in
16260                 none)
16261                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16262 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16263                 ;;
16264
16265                 -*)
16266                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16267 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16268                 tryPTHREAD_CFLAGS="$flag"
16269                 ;;
16270
16271                 pthread-config)
16272                 # skip this if we already have flags defined, for PostgreSQL
16273                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16274                 # Extract the first word of "pthread-config", so it can be a program name with args.
16275 set dummy pthread-config; ac_word=$2
16276 echo "$as_me:$LINENO: checking for $ac_word" >&5
16277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16278 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16279   echo $ECHO_N "(cached) $ECHO_C" >&6
16280 else
16281   if test -n "$acx_pthread_config"; then
16282   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16283 else
16284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16285 for as_dir in $PATH
16286 do
16287   IFS=$as_save_IFS
16288   test -z "$as_dir" && as_dir=.
16289   for ac_exec_ext in '' $ac_executable_extensions; do
16290   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16291     ac_cv_prog_acx_pthread_config="yes"
16292     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16293     break 2
16294   fi
16295 done
16296 done
16297
16298   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16299 fi
16300 fi
16301 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16302 if test -n "$acx_pthread_config"; then
16303   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16304 echo "${ECHO_T}$acx_pthread_config" >&6
16305 else
16306   echo "$as_me:$LINENO: result: no" >&5
16307 echo "${ECHO_T}no" >&6
16308 fi
16309
16310                 if test x"$acx_pthread_config" = xno; then continue; fi
16311                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16312                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16313                 ;;
16314
16315                 *)
16316                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16317 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16318                 tryPTHREAD_LIBS="-l$flag"
16319                 ;;
16320         esac
16321
16322         save_LIBS="$LIBS"
16323         save_CFLAGS="$CFLAGS"
16324         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16325         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16326
16327         # Check for various functions.  We must include pthread.h,
16328         # since some functions may be macros.  (On the Sequent, we
16329         # need a special flag -Kthread to make this header compile.)
16330         # We check for pthread_join because it is in -lpthread on IRIX
16331         # while pthread_create is in libc.  We check for pthread_attr_init
16332         # due to DEC craziness with -lpthreads.  We check for
16333         # pthread_cleanup_push because it is one of the few pthread
16334         # functions on Solaris that doesn't have a non-functional libc stub.
16335         # We try pthread_create on general principles.
16336         cat >conftest.$ac_ext <<_ACEOF
16337 /* confdefs.h.  */
16338 _ACEOF
16339 cat confdefs.h >>conftest.$ac_ext
16340 cat >>conftest.$ac_ext <<_ACEOF
16341 /* end confdefs.h.  */
16342 #include <pthread.h>
16343 int
16344 main ()
16345 {
16346 pthread_t th; pthread_join(th, 0);
16347                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16348                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16349   ;
16350   return 0;
16351 }
16352 _ACEOF
16353 rm -f conftest.$ac_objext conftest$ac_exeext
16354 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16355   (eval $ac_link) 2>conftest.er1
16356   ac_status=$?
16357   grep -v '^ *+' conftest.er1 >conftest.err
16358   rm -f conftest.er1
16359   cat conftest.err >&5
16360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16361   (exit $ac_status); } &&
16362          { ac_try='test -z "$ac_c_werror_flag"
16363                          || test ! -s conftest.err'
16364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16365   (eval $ac_try) 2>&5
16366   ac_status=$?
16367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16368   (exit $ac_status); }; } &&
16369          { ac_try='test -s conftest$ac_exeext'
16370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16371   (eval $ac_try) 2>&5
16372   ac_status=$?
16373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16374   (exit $ac_status); }; }; then
16375   acx_pthread_ok=yes
16376 else
16377   echo "$as_me: failed program was:" >&5
16378 sed 's/^/| /' conftest.$ac_ext >&5
16379
16380 acx_pthread_ok=no
16381 fi
16382 rm -f conftest.err conftest.$ac_objext \
16383       conftest$ac_exeext conftest.$ac_ext
16384
16385         if test "x$acx_pthread_ok" = xyes; then
16386             # Don't use options that are ignored by the compiler.
16387             # We find them by checking stderror.
16388             cat >conftest.$ac_ext <<_ACEOF
16389 int
16390 main (int argc, char **argv)
16391 {
16392   (void) argc;
16393   (void) argv;
16394   return 0;
16395 }
16396 _ACEOF
16397             rm -f conftest.$ac_objext conftest$ac_exeext
16398             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16399                 # we continue with more flags because Linux needs -lpthread
16400                 # for libpq builds on PostgreSQL.  The test above only
16401                 # tests for building binaries, not shared libraries.
16402                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16403                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16404             else   acx_pthread_ok=no
16405             fi
16406         fi
16407
16408         LIBS="$save_LIBS"
16409         CFLAGS="$save_CFLAGS"
16410
16411         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16412 echo "${ECHO_T}$acx_pthread_ok" >&6
16413 done
16414 fi
16415
16416 # Various other checks:
16417 if test "x$acx_pthread_ok" = xyes; then
16418         save_LIBS="$LIBS"
16419         LIBS="$PTHREAD_LIBS $LIBS"
16420         save_CFLAGS="$CFLAGS"
16421         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16422
16423         # Detect AIX lossage: threads are created detached by default
16424         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16425         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16426 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16427         cat >conftest.$ac_ext <<_ACEOF
16428 /* confdefs.h.  */
16429 _ACEOF
16430 cat confdefs.h >>conftest.$ac_ext
16431 cat >>conftest.$ac_ext <<_ACEOF
16432 /* end confdefs.h.  */
16433 #include <pthread.h>
16434 int
16435 main ()
16436 {
16437 int attr=PTHREAD_CREATE_JOINABLE;
16438   ;
16439   return 0;
16440 }
16441 _ACEOF
16442 rm -f conftest.$ac_objext conftest$ac_exeext
16443 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16444   (eval $ac_link) 2>conftest.er1
16445   ac_status=$?
16446   grep -v '^ *+' conftest.er1 >conftest.err
16447   rm -f conftest.er1
16448   cat conftest.err >&5
16449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16450   (exit $ac_status); } &&
16451          { ac_try='test -z "$ac_c_werror_flag"
16452                          || test ! -s conftest.err'
16453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16454   (eval $ac_try) 2>&5
16455   ac_status=$?
16456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16457   (exit $ac_status); }; } &&
16458          { ac_try='test -s conftest$ac_exeext'
16459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16460   (eval $ac_try) 2>&5
16461   ac_status=$?
16462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16463   (exit $ac_status); }; }; then
16464   ok=PTHREAD_CREATE_JOINABLE
16465 else
16466   echo "$as_me: failed program was:" >&5
16467 sed 's/^/| /' conftest.$ac_ext >&5
16468
16469 ok=unknown
16470 fi
16471 rm -f conftest.err conftest.$ac_objext \
16472       conftest$ac_exeext conftest.$ac_ext
16473         if test x"$ok" = xunknown; then
16474                 cat >conftest.$ac_ext <<_ACEOF
16475 /* confdefs.h.  */
16476 _ACEOF
16477 cat confdefs.h >>conftest.$ac_ext
16478 cat >>conftest.$ac_ext <<_ACEOF
16479 /* end confdefs.h.  */
16480 #include <pthread.h>
16481 int
16482 main ()
16483 {
16484 int attr=PTHREAD_CREATE_UNDETACHED;
16485   ;
16486   return 0;
16487 }
16488 _ACEOF
16489 rm -f conftest.$ac_objext conftest$ac_exeext
16490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16491   (eval $ac_link) 2>conftest.er1
16492   ac_status=$?
16493   grep -v '^ *+' conftest.er1 >conftest.err
16494   rm -f conftest.er1
16495   cat conftest.err >&5
16496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16497   (exit $ac_status); } &&
16498          { ac_try='test -z "$ac_c_werror_flag"
16499                          || test ! -s conftest.err'
16500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16501   (eval $ac_try) 2>&5
16502   ac_status=$?
16503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16504   (exit $ac_status); }; } &&
16505          { ac_try='test -s conftest$ac_exeext'
16506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16507   (eval $ac_try) 2>&5
16508   ac_status=$?
16509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16510   (exit $ac_status); }; }; then
16511   ok=PTHREAD_CREATE_UNDETACHED
16512 else
16513   echo "$as_me: failed program was:" >&5
16514 sed 's/^/| /' conftest.$ac_ext >&5
16515
16516 ok=unknown
16517 fi
16518 rm -f conftest.err conftest.$ac_objext \
16519       conftest$ac_exeext conftest.$ac_ext
16520         fi
16521         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16522
16523 cat >>confdefs.h <<\_ACEOF
16524 #define PTHREAD_CREATE_JOINABLE $ok
16525 _ACEOF
16526
16527         fi
16528         echo "$as_me:$LINENO: result: ${ok}" >&5
16529 echo "${ECHO_T}${ok}" >&6
16530         if test x"$ok" = xunknown; then
16531                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16532 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16533         fi
16534
16535         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16536 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16537         flag=no
16538 # We always add these in PostgreSQL
16539 #       case "${host_cpu}-${host_os}" in
16540 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16541 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16542 #       esac
16543         echo "$as_me:$LINENO: result: ${flag}" >&5
16544 echo "${ECHO_T}${flag}" >&6
16545         if test "x$flag" != xno; then
16546                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16547         fi
16548
16549         LIBS="$save_LIBS"
16550         CFLAGS="$save_CFLAGS"
16551
16552 # Supporting cc_r would require a special CC in all places that
16553 # use libpq, and that is ugly, so we don't do it.  Users can still
16554 # define their compiler as cc_r to do thread builds of everything.
16555         # More AIX lossage: must compile with cc_r
16556         # Extract the first word of "cc_r", so it can be a program name with args.
16557 set dummy cc_r; ac_word=$2
16558 echo "$as_me:$LINENO: checking for $ac_word" >&5
16559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16560 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16561   echo $ECHO_N "(cached) $ECHO_C" >&6
16562 else
16563   if test -n "$PTHREAD_CC"; then
16564   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16565 else
16566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16567 for as_dir in $PATH
16568 do
16569   IFS=$as_save_IFS
16570   test -z "$as_dir" && as_dir=.
16571   for ac_exec_ext in '' $ac_executable_extensions; do
16572   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16573     ac_cv_prog_PTHREAD_CC="cc_r"
16574     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16575     break 2
16576   fi
16577 done
16578 done
16579
16580   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16581 fi
16582 fi
16583 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16584 if test -n "$PTHREAD_CC"; then
16585   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16586 echo "${ECHO_T}$PTHREAD_CC" >&6
16587 else
16588   echo "$as_me:$LINENO: result: no" >&5
16589 echo "${ECHO_T}no" >&6
16590 fi
16591
16592 else
16593         PTHREAD_CC="$CC"
16594 fi
16595
16596
16597
16598
16599
16600 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16601 if test x"$acx_pthread_ok" = xyes; then
16602
16603 cat >>confdefs.h <<\_ACEOF
16604 #define HAVE_PTHREAD 1
16605 _ACEOF
16606
16607         :
16608 else
16609         acx_pthread_ok=no
16610
16611 fi
16612 ac_ext=c
16613 ac_cpp='$CPP $CPPFLAGS'
16614 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16615 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16616 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16617
16618         # set thread flags
16619
16620 # Some platforms use these, so just defineed them.  They can't hurt if they
16621 # are not supported.
16622 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16623
16624
16625 # At this point, we don't want to muck with the compiler name for threading.
16626 # Let's see who fails, perhaps AIX.  2004-04-23
16627 if test "$PTHREAD_CC" != "$CC"; then
16628 { { echo "$as_me:$LINENO: error:
16629 PostgreSQL does not support platforms that require a special
16630 compiler binary for thread-safety.
16631 " >&5
16632 echo "$as_me: error:
16633 PostgreSQL does not support platforms that require a special
16634 compiler binary for thread-safety.
16635 " >&2;}
16636    { (exit 1); exit 1; }; }
16637 fi
16638
16639 if test "$THREAD_SUPPORT" = no; then
16640 { { echo "$as_me:$LINENO: error:
16641 Cannot enable threads on your platform.
16642 Your platform is known to not support thread-safe programs.
16643 For details, compile and run src/bin/pg_thread_test.
16644 " >&5
16645 echo "$as_me: error:
16646 Cannot enable threads on your platform.
16647 Your platform is known to not support thread-safe programs.
16648 For details, compile and run src/bin/pg_thread_test.
16649 " >&2;}
16650    { (exit 1); exit 1; }; }
16651 fi
16652
16653 # Check for *_r functions
16654 _CFLAGS="$CFLAGS"
16655 _LIBS="$LIBS"
16656 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16657 LIBS="$LIBS $PTHREAD_LIBS"
16658
16659 if test "${ac_cv_header_pthread_h+set}" = set; then
16660   echo "$as_me:$LINENO: checking for pthread.h" >&5
16661 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16662 if test "${ac_cv_header_pthread_h+set}" = set; then
16663   echo $ECHO_N "(cached) $ECHO_C" >&6
16664 fi
16665 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16666 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16667 else
16668   # Is the header compilable?
16669 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16670 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16671 cat >conftest.$ac_ext <<_ACEOF
16672 /* confdefs.h.  */
16673 _ACEOF
16674 cat confdefs.h >>conftest.$ac_ext
16675 cat >>conftest.$ac_ext <<_ACEOF
16676 /* end confdefs.h.  */
16677 $ac_includes_default
16678 #include <pthread.h>
16679 _ACEOF
16680 rm -f conftest.$ac_objext
16681 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16682   (eval $ac_compile) 2>conftest.er1
16683   ac_status=$?
16684   grep -v '^ *+' conftest.er1 >conftest.err
16685   rm -f conftest.er1
16686   cat conftest.err >&5
16687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16688   (exit $ac_status); } &&
16689          { ac_try='test -z "$ac_c_werror_flag"
16690                          || test ! -s conftest.err'
16691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16692   (eval $ac_try) 2>&5
16693   ac_status=$?
16694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16695   (exit $ac_status); }; } &&
16696          { ac_try='test -s conftest.$ac_objext'
16697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16698   (eval $ac_try) 2>&5
16699   ac_status=$?
16700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16701   (exit $ac_status); }; }; then
16702   ac_header_compiler=yes
16703 else
16704   echo "$as_me: failed program was:" >&5
16705 sed 's/^/| /' conftest.$ac_ext >&5
16706
16707 ac_header_compiler=no
16708 fi
16709 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16710 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16711 echo "${ECHO_T}$ac_header_compiler" >&6
16712
16713 # Is the header present?
16714 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16715 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16716 cat >conftest.$ac_ext <<_ACEOF
16717 /* confdefs.h.  */
16718 _ACEOF
16719 cat confdefs.h >>conftest.$ac_ext
16720 cat >>conftest.$ac_ext <<_ACEOF
16721 /* end confdefs.h.  */
16722 #include <pthread.h>
16723 _ACEOF
16724 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16725   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16726   ac_status=$?
16727   grep -v '^ *+' conftest.er1 >conftest.err
16728   rm -f conftest.er1
16729   cat conftest.err >&5
16730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16731   (exit $ac_status); } >/dev/null; then
16732   if test -s conftest.err; then
16733     ac_cpp_err=$ac_c_preproc_warn_flag
16734     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16735   else
16736     ac_cpp_err=
16737   fi
16738 else
16739   ac_cpp_err=yes
16740 fi
16741 if test -z "$ac_cpp_err"; then
16742   ac_header_preproc=yes
16743 else
16744   echo "$as_me: failed program was:" >&5
16745 sed 's/^/| /' conftest.$ac_ext >&5
16746
16747   ac_header_preproc=no
16748 fi
16749 rm -f conftest.err conftest.$ac_ext
16750 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16751 echo "${ECHO_T}$ac_header_preproc" >&6
16752
16753 # So?  What about this header?
16754 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16755   yes:no: )
16756     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16757 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16758     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16759 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16760     ac_header_preproc=yes
16761     ;;
16762   no:yes:* )
16763     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16764 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16765     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16766 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16767     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16768 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16769     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16770 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16771     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16772 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16773     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16774 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16775     (
16776       cat <<\_ASBOX
16777 ## ---------------------------------------- ##
16778 ## Report this to pgsql-bugs@postgresql.org ##
16779 ## ---------------------------------------- ##
16780 _ASBOX
16781     ) |
16782       sed "s/^/$as_me: WARNING:     /" >&2
16783     ;;
16784 esac
16785 echo "$as_me:$LINENO: checking for pthread.h" >&5
16786 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16787 if test "${ac_cv_header_pthread_h+set}" = set; then
16788   echo $ECHO_N "(cached) $ECHO_C" >&6
16789 else
16790   ac_cv_header_pthread_h=$ac_header_preproc
16791 fi
16792 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16793 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16794
16795 fi
16796 if test $ac_cv_header_pthread_h = yes; then
16797   :
16798 else
16799   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16800 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16801    { (exit 1); exit 1; }; }
16802 fi
16803
16804
16805
16806
16807
16808
16809 for ac_func in strerror_r getpwuid_r gethostbyname_r
16810 do
16811 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16812 echo "$as_me:$LINENO: checking for $ac_func" >&5
16813 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16814 if eval "test \"\${$as_ac_var+set}\" = set"; then
16815   echo $ECHO_N "(cached) $ECHO_C" >&6
16816 else
16817   cat >conftest.$ac_ext <<_ACEOF
16818 /* confdefs.h.  */
16819 _ACEOF
16820 cat confdefs.h >>conftest.$ac_ext
16821 cat >>conftest.$ac_ext <<_ACEOF
16822 /* end confdefs.h.  */
16823 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16824    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16825 #define $ac_func innocuous_$ac_func
16826
16827 /* System header to define __stub macros and hopefully few prototypes,
16828     which can conflict with char $ac_func (); below.
16829     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16830     <limits.h> exists even on freestanding compilers.  */
16831
16832 #ifdef __STDC__
16833 # include <limits.h>
16834 #else
16835 # include <assert.h>
16836 #endif
16837
16838 #undef $ac_func
16839
16840 /* Override any gcc2 internal prototype to avoid an error.  */
16841 #ifdef __cplusplus
16842 extern "C"
16843 {
16844 #endif
16845 /* We use char because int might match the return type of a gcc2
16846    builtin and then its argument prototype would still apply.  */
16847 char $ac_func ();
16848 /* The GNU C library defines this for functions which it implements
16849     to always fail with ENOSYS.  Some functions are actually named
16850     something starting with __ and the normal name is an alias.  */
16851 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16852 choke me
16853 #else
16854 char (*f) () = $ac_func;
16855 #endif
16856 #ifdef __cplusplus
16857 }
16858 #endif
16859
16860 int
16861 main ()
16862 {
16863 return f != $ac_func;
16864   ;
16865   return 0;
16866 }
16867 _ACEOF
16868 rm -f conftest.$ac_objext conftest$ac_exeext
16869 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16870   (eval $ac_link) 2>conftest.er1
16871   ac_status=$?
16872   grep -v '^ *+' conftest.er1 >conftest.err
16873   rm -f conftest.er1
16874   cat conftest.err >&5
16875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16876   (exit $ac_status); } &&
16877          { ac_try='test -z "$ac_c_werror_flag"
16878                          || test ! -s conftest.err'
16879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16880   (eval $ac_try) 2>&5
16881   ac_status=$?
16882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16883   (exit $ac_status); }; } &&
16884          { ac_try='test -s conftest$ac_exeext'
16885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16886   (eval $ac_try) 2>&5
16887   ac_status=$?
16888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16889   (exit $ac_status); }; }; then
16890   eval "$as_ac_var=yes"
16891 else
16892   echo "$as_me: failed program was:" >&5
16893 sed 's/^/| /' conftest.$ac_ext >&5
16894
16895 eval "$as_ac_var=no"
16896 fi
16897 rm -f conftest.err conftest.$ac_objext \
16898       conftest$ac_exeext conftest.$ac_ext
16899 fi
16900 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16901 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16902 if test `eval echo '${'$as_ac_var'}'` = yes; then
16903   cat >>confdefs.h <<_ACEOF
16904 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16905 _ACEOF
16906
16907 fi
16908 done
16909
16910
16911 # Do test here with the proper thread flags
16912 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
16913 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
16914 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
16915   echo $ECHO_N "(cached) $ECHO_C" >&6
16916 else
16917   cat >conftest.$ac_ext <<_ACEOF
16918 /* confdefs.h.  */
16919 _ACEOF
16920 cat confdefs.h >>conftest.$ac_ext
16921 cat >>conftest.$ac_ext <<_ACEOF
16922 /* end confdefs.h.  */
16923 #include <sys/types.h>
16924 #include <pwd.h>
16925 int
16926 main ()
16927 {
16928 uid_t uid;
16929 struct passwd *space;
16930 char *buf;
16931 size_t bufsize;
16932 struct passwd **result;
16933 getpwuid_r(uid, space, buf, bufsize, result);
16934   ;
16935   return 0;
16936 }
16937 _ACEOF
16938 rm -f conftest.$ac_objext
16939 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16940   (eval $ac_compile) 2>conftest.er1
16941   ac_status=$?
16942   grep -v '^ *+' conftest.er1 >conftest.err
16943   rm -f conftest.er1
16944   cat conftest.err >&5
16945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16946   (exit $ac_status); } &&
16947          { ac_try='test -z "$ac_c_werror_flag"
16948                          || test ! -s conftest.err'
16949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16950   (eval $ac_try) 2>&5
16951   ac_status=$?
16952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16953   (exit $ac_status); }; } &&
16954          { ac_try='test -s conftest.$ac_objext'
16955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16956   (eval $ac_try) 2>&5
16957   ac_status=$?
16958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16959   (exit $ac_status); }; }; then
16960   pgac_func_getpwuid_r_5arg=yes
16961 else
16962   echo "$as_me: failed program was:" >&5
16963 sed 's/^/| /' conftest.$ac_ext >&5
16964
16965 pgac_func_getpwuid_r_5arg=no
16966 fi
16967 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16968 fi
16969 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
16970 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
16971 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
16972
16973 cat >>confdefs.h <<\_ACEOF
16974 #define GETPWUID_R_5ARG
16975 _ACEOF
16976
16977 fi
16978
16979 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
16980 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
16981 if test "${pgac_func_strerror_r_int+set}" = set; then
16982   echo $ECHO_N "(cached) $ECHO_C" >&6
16983 else
16984   cat >conftest.$ac_ext <<_ACEOF
16985 /* confdefs.h.  */
16986 _ACEOF
16987 cat confdefs.h >>conftest.$ac_ext
16988 cat >>conftest.$ac_ext <<_ACEOF
16989 /* end confdefs.h.  */
16990 #include <string.h>
16991 int
16992 main ()
16993 {
16994 #ifndef _AIX
16995 int strerror_r(int, char *, size_t);
16996 #else
16997 /* Older AIX has 'int' for the third argument so we don't test the args. */
16998 int strerror_r();
16999 #endif
17000   ;
17001   return 0;
17002 }
17003 _ACEOF
17004 rm -f conftest.$ac_objext
17005 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17006   (eval $ac_compile) 2>conftest.er1
17007   ac_status=$?
17008   grep -v '^ *+' conftest.er1 >conftest.err
17009   rm -f conftest.er1
17010   cat conftest.err >&5
17011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17012   (exit $ac_status); } &&
17013          { ac_try='test -z "$ac_c_werror_flag"
17014                          || test ! -s conftest.err'
17015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17016   (eval $ac_try) 2>&5
17017   ac_status=$?
17018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17019   (exit $ac_status); }; } &&
17020          { ac_try='test -s conftest.$ac_objext'
17021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17022   (eval $ac_try) 2>&5
17023   ac_status=$?
17024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17025   (exit $ac_status); }; }; then
17026   pgac_func_strerror_r_int=yes
17027 else
17028   echo "$as_me: failed program was:" >&5
17029 sed 's/^/| /' conftest.$ac_ext >&5
17030
17031 pgac_func_strerror_r_int=no
17032 fi
17033 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17034 fi
17035 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17036 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17037 if test x"$pgac_func_strerror_r_int" = xyes ; then
17038
17039 cat >>confdefs.h <<\_ACEOF
17040 #define STRERROR_R_INT
17041 _ACEOF
17042
17043 fi
17044
17045
17046 CFLAGS="$_CFLAGS"
17047 LIBS="$_LIBS"
17048
17049 else
17050 # do not use values from template file
17051 PTHREAD_CFLAGS=
17052 PTHREAD_LIBS=
17053 fi
17054
17055
17056
17057
17058
17059 # This test makes sure that run tests work at all.  Sometimes a shared
17060 # library is found by the linker, but the runtime linker can't find it.
17061 # This check should come after all modifications of compiler or linker
17062 # variables, and before any other run tests.
17063 echo "$as_me:$LINENO: checking test program" >&5
17064 echo $ECHO_N "checking test program... $ECHO_C" >&6
17065 if test "$cross_compiling" = yes; then
17066   echo "$as_me:$LINENO: result: cross-compiling" >&5
17067 echo "${ECHO_T}cross-compiling" >&6
17068 else
17069   cat >conftest.$ac_ext <<_ACEOF
17070 /* confdefs.h.  */
17071 _ACEOF
17072 cat confdefs.h >>conftest.$ac_ext
17073 cat >>conftest.$ac_ext <<_ACEOF
17074 /* end confdefs.h.  */
17075 int main() { return 0; }
17076 _ACEOF
17077 rm -f conftest$ac_exeext
17078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17079   (eval $ac_link) 2>&5
17080   ac_status=$?
17081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17082   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17084   (eval $ac_try) 2>&5
17085   ac_status=$?
17086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17087   (exit $ac_status); }; }; then
17088   echo "$as_me:$LINENO: result: ok" >&5
17089 echo "${ECHO_T}ok" >&6
17090 else
17091   echo "$as_me: program exited with status $ac_status" >&5
17092 echo "$as_me: failed program was:" >&5
17093 sed 's/^/| /' conftest.$ac_ext >&5
17094
17095 ( exit $ac_status )
17096 echo "$as_me:$LINENO: result: failed" >&5
17097 echo "${ECHO_T}failed" >&6
17098 { { echo "$as_me:$LINENO: error:
17099 *** Could not execute a simple test program.  This may be a problem
17100 *** related to locating shared libraries.  Check the file 'config.log'
17101 *** for the exact reason." >&5
17102 echo "$as_me: error:
17103 *** Could not execute a simple test program.  This may be a problem
17104 *** related to locating shared libraries.  Check the file 'config.log'
17105 *** for the exact reason." >&2;}
17106    { (exit 1); exit 1; }; }
17107 fi
17108 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17109 fi
17110
17111
17112 # Force use of our snprintf if system's doesn't do arg control
17113 # This feature is used by NLS
17114 if test "$enable_nls" = yes &&
17115    test $pgac_need_repl_snprintf = no &&
17116 # On Win32, libintl replaces snprintf() with its own version that
17117 # understands arg control, so we don't need our own.  In fact, it
17118 # also uses macros that conflict with ours, so we _can't_ use
17119 # our own.
17120    test "$PORTNAME" != "win32"; then
17121   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17122 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17123 if test "${pgac_cv_printf_arg_control+set}" = set; then
17124   echo $ECHO_N "(cached) $ECHO_C" >&6
17125 else
17126   if test "$cross_compiling" = yes; then
17127   pgac_cv_printf_arg_control=cross
17128 else
17129   cat >conftest.$ac_ext <<_ACEOF
17130 /* confdefs.h.  */
17131 _ACEOF
17132 cat confdefs.h >>conftest.$ac_ext
17133 cat >>conftest.$ac_ext <<_ACEOF
17134 /* end confdefs.h.  */
17135 #include <stdio.h>
17136 #include <string.h>
17137
17138 int main()
17139 {
17140   char buf[100];
17141
17142   /* can it swap arguments? */
17143   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17144   if (strcmp(buf, "4 3") != 0)
17145     return 1;
17146   return 0;
17147 }
17148 _ACEOF
17149 rm -f conftest$ac_exeext
17150 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17151   (eval $ac_link) 2>&5
17152   ac_status=$?
17153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17154   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17156   (eval $ac_try) 2>&5
17157   ac_status=$?
17158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17159   (exit $ac_status); }; }; then
17160   pgac_cv_printf_arg_control=yes
17161 else
17162   echo "$as_me: program exited with status $ac_status" >&5
17163 echo "$as_me: failed program was:" >&5
17164 sed 's/^/| /' conftest.$ac_ext >&5
17165
17166 ( exit $ac_status )
17167 pgac_cv_printf_arg_control=no
17168 fi
17169 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17170 fi
17171
17172 fi
17173 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17174 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17175
17176   if test $pgac_cv_printf_arg_control != yes ; then
17177     pgac_need_repl_snprintf=yes
17178   fi
17179 fi
17180
17181
17182
17183 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17184 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17185 if test "${pgac_cv_type_long_int_64+set}" = set; then
17186   echo $ECHO_N "(cached) $ECHO_C" >&6
17187 else
17188   if test "$cross_compiling" = yes; then
17189   # If cross-compiling, check the size reported by the compiler and
17190 # trust that the arithmetic works.
17191 cat >conftest.$ac_ext <<_ACEOF
17192 /* confdefs.h.  */
17193 _ACEOF
17194 cat confdefs.h >>conftest.$ac_ext
17195 cat >>conftest.$ac_ext <<_ACEOF
17196 /* end confdefs.h.  */
17197
17198 int
17199 main ()
17200 {
17201 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17202 test_array [0] = 0
17203
17204   ;
17205   return 0;
17206 }
17207 _ACEOF
17208 rm -f conftest.$ac_objext
17209 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17210   (eval $ac_compile) 2>conftest.er1
17211   ac_status=$?
17212   grep -v '^ *+' conftest.er1 >conftest.err
17213   rm -f conftest.er1
17214   cat conftest.err >&5
17215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17216   (exit $ac_status); } &&
17217          { ac_try='test -z "$ac_c_werror_flag"
17218                          || test ! -s conftest.err'
17219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17220   (eval $ac_try) 2>&5
17221   ac_status=$?
17222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17223   (exit $ac_status); }; } &&
17224          { ac_try='test -s conftest.$ac_objext'
17225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17226   (eval $ac_try) 2>&5
17227   ac_status=$?
17228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17229   (exit $ac_status); }; }; then
17230   pgac_cv_type_long_int_64=yes
17231 else
17232   echo "$as_me: failed program was:" >&5
17233 sed 's/^/| /' conftest.$ac_ext >&5
17234
17235 pgac_cv_type_long_int_64=no
17236 fi
17237 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17238 else
17239   cat >conftest.$ac_ext <<_ACEOF
17240 /* confdefs.h.  */
17241 _ACEOF
17242 cat confdefs.h >>conftest.$ac_ext
17243 cat >>conftest.$ac_ext <<_ACEOF
17244 /* end confdefs.h.  */
17245 typedef long int ac_int64;
17246
17247 /*
17248  * These are globals to discourage the compiler from folding all the
17249  * arithmetic tests down to compile-time constants.
17250  */
17251 ac_int64 a = 20000001;
17252 ac_int64 b = 40000005;
17253
17254 int does_int64_work()
17255 {
17256   ac_int64 c,d;
17257
17258   if (sizeof(ac_int64) != 8)
17259     return 0;                   /* definitely not the right size */
17260
17261   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17262   c = a * b;
17263   d = (c + b) / b;
17264   if (d != a+1)
17265     return 0;
17266   return 1;
17267 }
17268 main() {
17269   exit(! does_int64_work());
17270 }
17271 _ACEOF
17272 rm -f conftest$ac_exeext
17273 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17274   (eval $ac_link) 2>&5
17275   ac_status=$?
17276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17277   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17279   (eval $ac_try) 2>&5
17280   ac_status=$?
17281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17282   (exit $ac_status); }; }; then
17283   pgac_cv_type_long_int_64=yes
17284 else
17285   echo "$as_me: program exited with status $ac_status" >&5
17286 echo "$as_me: failed program was:" >&5
17287 sed 's/^/| /' conftest.$ac_ext >&5
17288
17289 ( exit $ac_status )
17290 pgac_cv_type_long_int_64=no
17291 fi
17292 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17293 fi
17294 fi
17295 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17296 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17297
17298 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17299 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17300
17301 cat >>confdefs.h <<\_ACEOF
17302 #define HAVE_LONG_INT_64
17303 _ACEOF
17304
17305 fi
17306
17307
17308 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17309   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17310 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17311 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17312   echo $ECHO_N "(cached) $ECHO_C" >&6
17313 else
17314   if test "$cross_compiling" = yes; then
17315   # If cross-compiling, check the size reported by the compiler and
17316 # trust that the arithmetic works.
17317 cat >conftest.$ac_ext <<_ACEOF
17318 /* confdefs.h.  */
17319 _ACEOF
17320 cat confdefs.h >>conftest.$ac_ext
17321 cat >>conftest.$ac_ext <<_ACEOF
17322 /* end confdefs.h.  */
17323
17324 int
17325 main ()
17326 {
17327 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17328 test_array [0] = 0
17329
17330   ;
17331   return 0;
17332 }
17333 _ACEOF
17334 rm -f conftest.$ac_objext
17335 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17336   (eval $ac_compile) 2>conftest.er1
17337   ac_status=$?
17338   grep -v '^ *+' conftest.er1 >conftest.err
17339   rm -f conftest.er1
17340   cat conftest.err >&5
17341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17342   (exit $ac_status); } &&
17343          { ac_try='test -z "$ac_c_werror_flag"
17344                          || test ! -s conftest.err'
17345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17346   (eval $ac_try) 2>&5
17347   ac_status=$?
17348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17349   (exit $ac_status); }; } &&
17350          { ac_try='test -s conftest.$ac_objext'
17351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17352   (eval $ac_try) 2>&5
17353   ac_status=$?
17354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17355   (exit $ac_status); }; }; then
17356   pgac_cv_type_long_long_int_64=yes
17357 else
17358   echo "$as_me: failed program was:" >&5
17359 sed 's/^/| /' conftest.$ac_ext >&5
17360
17361 pgac_cv_type_long_long_int_64=no
17362 fi
17363 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17364 else
17365   cat >conftest.$ac_ext <<_ACEOF
17366 /* confdefs.h.  */
17367 _ACEOF
17368 cat confdefs.h >>conftest.$ac_ext
17369 cat >>conftest.$ac_ext <<_ACEOF
17370 /* end confdefs.h.  */
17371 typedef long long int ac_int64;
17372
17373 /*
17374  * These are globals to discourage the compiler from folding all the
17375  * arithmetic tests down to compile-time constants.
17376  */
17377 ac_int64 a = 20000001;
17378 ac_int64 b = 40000005;
17379
17380 int does_int64_work()
17381 {
17382   ac_int64 c,d;
17383
17384   if (sizeof(ac_int64) != 8)
17385     return 0;                   /* definitely not the right size */
17386
17387   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17388   c = a * b;
17389   d = (c + b) / b;
17390   if (d != a+1)
17391     return 0;
17392   return 1;
17393 }
17394 main() {
17395   exit(! does_int64_work());
17396 }
17397 _ACEOF
17398 rm -f conftest$ac_exeext
17399 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17400   (eval $ac_link) 2>&5
17401   ac_status=$?
17402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17403   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17405   (eval $ac_try) 2>&5
17406   ac_status=$?
17407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17408   (exit $ac_status); }; }; then
17409   pgac_cv_type_long_long_int_64=yes
17410 else
17411   echo "$as_me: program exited with status $ac_status" >&5
17412 echo "$as_me: failed program was:" >&5
17413 sed 's/^/| /' conftest.$ac_ext >&5
17414
17415 ( exit $ac_status )
17416 pgac_cv_type_long_long_int_64=no
17417 fi
17418 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17419 fi
17420 fi
17421 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17422 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17423
17424 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17425 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17426
17427 cat >>confdefs.h <<\_ACEOF
17428 #define HAVE_LONG_LONG_INT_64
17429 _ACEOF
17430
17431 fi
17432
17433 fi
17434
17435
17436
17437 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17438   cat >conftest.$ac_ext <<_ACEOF
17439 /* confdefs.h.  */
17440 _ACEOF
17441 cat confdefs.h >>conftest.$ac_ext
17442 cat >>conftest.$ac_ext <<_ACEOF
17443 /* end confdefs.h.  */
17444
17445 #define INT64CONST(x)  x##LL
17446 long long int foo = INT64CONST(0x1234567890123456);
17447
17448 int
17449 main ()
17450 {
17451
17452   ;
17453   return 0;
17454 }
17455 _ACEOF
17456 rm -f conftest.$ac_objext
17457 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17458   (eval $ac_compile) 2>conftest.er1
17459   ac_status=$?
17460   grep -v '^ *+' conftest.er1 >conftest.err
17461   rm -f conftest.er1
17462   cat conftest.err >&5
17463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17464   (exit $ac_status); } &&
17465          { ac_try='test -z "$ac_c_werror_flag"
17466                          || test ! -s conftest.err'
17467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17468   (eval $ac_try) 2>&5
17469   ac_status=$?
17470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17471   (exit $ac_status); }; } &&
17472          { ac_try='test -s conftest.$ac_objext'
17473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17474   (eval $ac_try) 2>&5
17475   ac_status=$?
17476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17477   (exit $ac_status); }; }; then
17478
17479 cat >>confdefs.h <<\_ACEOF
17480 #define HAVE_LL_CONSTANTS 1
17481 _ACEOF
17482
17483 else
17484   echo "$as_me: failed program was:" >&5
17485 sed 's/^/| /' conftest.$ac_ext >&5
17486
17487 fi
17488 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17489 fi
17490
17491
17492 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17493 # we found we need to use "long long int", better check.  We cope with
17494 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17495 # work, fall back to our own snprintf emulation (which we know uses %lld).
17496
17497 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17498   if test $pgac_need_repl_snprintf = no; then
17499     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17500 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17501 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17502   echo $ECHO_N "(cached) $ECHO_C" >&6
17503 else
17504   for pgac_format in '%lld' '%qd' '%I64d'; do
17505 if test "$cross_compiling" = yes; then
17506   pgac_cv_snprintf_long_long_int_format=cross; break
17507 else
17508   cat >conftest.$ac_ext <<_ACEOF
17509 /* confdefs.h.  */
17510 _ACEOF
17511 cat confdefs.h >>conftest.$ac_ext
17512 cat >>conftest.$ac_ext <<_ACEOF
17513 /* end confdefs.h.  */
17514 #include <stdio.h>
17515 typedef long long int ac_int64;
17516 #define INT64_FORMAT "$pgac_format"
17517
17518 ac_int64 a = 20000001;
17519 ac_int64 b = 40000005;
17520
17521 int does_int64_snprintf_work()
17522 {
17523   ac_int64 c;
17524   char buf[100];
17525
17526   if (sizeof(ac_int64) != 8)
17527     return 0;                   /* doesn't look like the right size */
17528
17529   c = a * b;
17530   snprintf(buf, 100, INT64_FORMAT, c);
17531   if (strcmp(buf, "800000140000005") != 0)
17532     return 0;                   /* either multiply or snprintf is busted */
17533   return 1;
17534 }
17535 main() {
17536   exit(! does_int64_snprintf_work());
17537 }
17538 _ACEOF
17539 rm -f conftest$ac_exeext
17540 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17541   (eval $ac_link) 2>&5
17542   ac_status=$?
17543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17544   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17546   (eval $ac_try) 2>&5
17547   ac_status=$?
17548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17549   (exit $ac_status); }; }; then
17550   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17551 else
17552   echo "$as_me: program exited with status $ac_status" >&5
17553 echo "$as_me: failed program was:" >&5
17554 sed 's/^/| /' conftest.$ac_ext >&5
17555
17556 fi
17557 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17558 fi
17559 done
17560 fi
17561
17562 LONG_LONG_INT_FORMAT=''
17563
17564 case $pgac_cv_snprintf_long_long_int_format in
17565   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17566 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17567   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17568 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17569          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17570   *)     echo "$as_me:$LINENO: result: none" >&5
17571 echo "${ECHO_T}none" >&6;;
17572 esac
17573     if test "$LONG_LONG_INT_FORMAT" = ""; then
17574       # Force usage of our own snprintf, since system snprintf is broken
17575       pgac_need_repl_snprintf=yes
17576       LONG_LONG_INT_FORMAT='%lld'
17577     fi
17578   else
17579     # Here if we previously decided we needed to use our own snprintf
17580     LONG_LONG_INT_FORMAT='%lld'
17581   fi
17582   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17583   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17584   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17585 else
17586   # Here if we are not using 'long long int' at all
17587   INT64_FORMAT='"%ld"'
17588   UINT64_FORMAT='"%lu"'
17589 fi
17590
17591
17592 cat >>confdefs.h <<_ACEOF
17593 #define INT64_FORMAT $INT64_FORMAT
17594 _ACEOF
17595
17596
17597
17598 cat >>confdefs.h <<_ACEOF
17599 #define UINT64_FORMAT $UINT64_FORMAT
17600 _ACEOF
17601
17602
17603 # Now we have checked all the reasons to replace snprintf
17604 if test $pgac_need_repl_snprintf = yes; then
17605
17606 cat >>confdefs.h <<\_ACEOF
17607 #define USE_SNPRINTF 1
17608 _ACEOF
17609
17610   case $LIBOBJS in
17611     "snprintf.$ac_objext"   | \
17612   *" snprintf.$ac_objext"   | \
17613     "snprintf.$ac_objext "* | \
17614   *" snprintf.$ac_objext "* ) ;;
17615   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17616 esac
17617
17618 fi
17619
17620 # Need a #define for the size of Datum (unsigned long)
17621 echo "$as_me:$LINENO: checking for unsigned long" >&5
17622 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17623 if test "${ac_cv_type_unsigned_long+set}" = set; then
17624   echo $ECHO_N "(cached) $ECHO_C" >&6
17625 else
17626   cat >conftest.$ac_ext <<_ACEOF
17627 /* confdefs.h.  */
17628 _ACEOF
17629 cat confdefs.h >>conftest.$ac_ext
17630 cat >>conftest.$ac_ext <<_ACEOF
17631 /* end confdefs.h.  */
17632 $ac_includes_default
17633 int
17634 main ()
17635 {
17636 if ((unsigned long *) 0)
17637   return 0;
17638 if (sizeof (unsigned long))
17639   return 0;
17640   ;
17641   return 0;
17642 }
17643 _ACEOF
17644 rm -f conftest.$ac_objext
17645 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17646   (eval $ac_compile) 2>conftest.er1
17647   ac_status=$?
17648   grep -v '^ *+' conftest.er1 >conftest.err
17649   rm -f conftest.er1
17650   cat conftest.err >&5
17651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17652   (exit $ac_status); } &&
17653          { ac_try='test -z "$ac_c_werror_flag"
17654                          || test ! -s conftest.err'
17655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17656   (eval $ac_try) 2>&5
17657   ac_status=$?
17658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17659   (exit $ac_status); }; } &&
17660          { ac_try='test -s conftest.$ac_objext'
17661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17662   (eval $ac_try) 2>&5
17663   ac_status=$?
17664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17665   (exit $ac_status); }; }; then
17666   ac_cv_type_unsigned_long=yes
17667 else
17668   echo "$as_me: failed program was:" >&5
17669 sed 's/^/| /' conftest.$ac_ext >&5
17670
17671 ac_cv_type_unsigned_long=no
17672 fi
17673 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17674 fi
17675 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
17676 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
17677
17678 echo "$as_me:$LINENO: checking size of unsigned long" >&5
17679 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
17680 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
17681   echo $ECHO_N "(cached) $ECHO_C" >&6
17682 else
17683   if test "$ac_cv_type_unsigned_long" = yes; then
17684   # The cast to unsigned long works around a bug in the HP C Compiler
17685   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17686   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17687   # This bug is HP SR number 8606223364.
17688   if test "$cross_compiling" = yes; then
17689   # Depending upon the size, compute the lo and hi bounds.
17690 cat >conftest.$ac_ext <<_ACEOF
17691 /* confdefs.h.  */
17692 _ACEOF
17693 cat confdefs.h >>conftest.$ac_ext
17694 cat >>conftest.$ac_ext <<_ACEOF
17695 /* end confdefs.h.  */
17696 $ac_includes_default
17697 int
17698 main ()
17699 {
17700 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
17701 test_array [0] = 0
17702
17703   ;
17704   return 0;
17705 }
17706 _ACEOF
17707 rm -f conftest.$ac_objext
17708 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17709   (eval $ac_compile) 2>conftest.er1
17710   ac_status=$?
17711   grep -v '^ *+' conftest.er1 >conftest.err
17712   rm -f conftest.er1
17713   cat conftest.err >&5
17714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17715   (exit $ac_status); } &&
17716          { ac_try='test -z "$ac_c_werror_flag"
17717                          || test ! -s conftest.err'
17718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17719   (eval $ac_try) 2>&5
17720   ac_status=$?
17721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17722   (exit $ac_status); }; } &&
17723          { ac_try='test -s conftest.$ac_objext'
17724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17725   (eval $ac_try) 2>&5
17726   ac_status=$?
17727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17728   (exit $ac_status); }; }; then
17729   ac_lo=0 ac_mid=0
17730   while :; do
17731     cat >conftest.$ac_ext <<_ACEOF
17732 /* confdefs.h.  */
17733 _ACEOF
17734 cat confdefs.h >>conftest.$ac_ext
17735 cat >>conftest.$ac_ext <<_ACEOF
17736 /* end confdefs.h.  */
17737 $ac_includes_default
17738 int
17739 main ()
17740 {
17741 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17742 test_array [0] = 0
17743
17744   ;
17745   return 0;
17746 }
17747 _ACEOF
17748 rm -f conftest.$ac_objext
17749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17750   (eval $ac_compile) 2>conftest.er1
17751   ac_status=$?
17752   grep -v '^ *+' conftest.er1 >conftest.err
17753   rm -f conftest.er1
17754   cat conftest.err >&5
17755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17756   (exit $ac_status); } &&
17757          { ac_try='test -z "$ac_c_werror_flag"
17758                          || test ! -s conftest.err'
17759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17760   (eval $ac_try) 2>&5
17761   ac_status=$?
17762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17763   (exit $ac_status); }; } &&
17764          { ac_try='test -s conftest.$ac_objext'
17765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17766   (eval $ac_try) 2>&5
17767   ac_status=$?
17768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17769   (exit $ac_status); }; }; then
17770   ac_hi=$ac_mid; break
17771 else
17772   echo "$as_me: failed program was:" >&5
17773 sed 's/^/| /' conftest.$ac_ext >&5
17774
17775 ac_lo=`expr $ac_mid + 1`
17776                     if test $ac_lo -le $ac_mid; then
17777                       ac_lo= ac_hi=
17778                       break
17779                     fi
17780                     ac_mid=`expr 2 '*' $ac_mid + 1`
17781 fi
17782 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17783   done
17784 else
17785   echo "$as_me: failed program was:" >&5
17786 sed 's/^/| /' conftest.$ac_ext >&5
17787
17788 cat >conftest.$ac_ext <<_ACEOF
17789 /* confdefs.h.  */
17790 _ACEOF
17791 cat confdefs.h >>conftest.$ac_ext
17792 cat >>conftest.$ac_ext <<_ACEOF
17793 /* end confdefs.h.  */
17794 $ac_includes_default
17795 int
17796 main ()
17797 {
17798 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
17799 test_array [0] = 0
17800
17801   ;
17802   return 0;
17803 }
17804 _ACEOF
17805 rm -f conftest.$ac_objext
17806 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17807   (eval $ac_compile) 2>conftest.er1
17808   ac_status=$?
17809   grep -v '^ *+' conftest.er1 >conftest.err
17810   rm -f conftest.er1
17811   cat conftest.err >&5
17812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17813   (exit $ac_status); } &&
17814          { ac_try='test -z "$ac_c_werror_flag"
17815                          || test ! -s conftest.err'
17816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17817   (eval $ac_try) 2>&5
17818   ac_status=$?
17819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17820   (exit $ac_status); }; } &&
17821          { ac_try='test -s conftest.$ac_objext'
17822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17823   (eval $ac_try) 2>&5
17824   ac_status=$?
17825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17826   (exit $ac_status); }; }; then
17827   ac_hi=-1 ac_mid=-1
17828   while :; do
17829     cat >conftest.$ac_ext <<_ACEOF
17830 /* confdefs.h.  */
17831 _ACEOF
17832 cat confdefs.h >>conftest.$ac_ext
17833 cat >>conftest.$ac_ext <<_ACEOF
17834 /* end confdefs.h.  */
17835 $ac_includes_default
17836 int
17837 main ()
17838 {
17839 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
17840 test_array [0] = 0
17841
17842   ;
17843   return 0;
17844 }
17845 _ACEOF
17846 rm -f conftest.$ac_objext
17847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17848   (eval $ac_compile) 2>conftest.er1
17849   ac_status=$?
17850   grep -v '^ *+' conftest.er1 >conftest.err
17851   rm -f conftest.er1
17852   cat conftest.err >&5
17853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17854   (exit $ac_status); } &&
17855          { ac_try='test -z "$ac_c_werror_flag"
17856                          || test ! -s conftest.err'
17857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17858   (eval $ac_try) 2>&5
17859   ac_status=$?
17860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17861   (exit $ac_status); }; } &&
17862          { ac_try='test -s conftest.$ac_objext'
17863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17864   (eval $ac_try) 2>&5
17865   ac_status=$?
17866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17867   (exit $ac_status); }; }; then
17868   ac_lo=$ac_mid; break
17869 else
17870   echo "$as_me: failed program was:" >&5
17871 sed 's/^/| /' conftest.$ac_ext >&5
17872
17873 ac_hi=`expr '(' $ac_mid ')' - 1`
17874                        if test $ac_mid -le $ac_hi; then
17875                          ac_lo= ac_hi=
17876                          break
17877                        fi
17878                        ac_mid=`expr 2 '*' $ac_mid`
17879 fi
17880 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17881   done
17882 else
17883   echo "$as_me: failed program was:" >&5
17884 sed 's/^/| /' conftest.$ac_ext >&5
17885
17886 ac_lo= ac_hi=
17887 fi
17888 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17889 fi
17890 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17891 # Binary search between lo and hi bounds.
17892 while test "x$ac_lo" != "x$ac_hi"; do
17893   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17894   cat >conftest.$ac_ext <<_ACEOF
17895 /* confdefs.h.  */
17896 _ACEOF
17897 cat confdefs.h >>conftest.$ac_ext
17898 cat >>conftest.$ac_ext <<_ACEOF
17899 /* end confdefs.h.  */
17900 $ac_includes_default
17901 int
17902 main ()
17903 {
17904 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17905 test_array [0] = 0
17906
17907   ;
17908   return 0;
17909 }
17910 _ACEOF
17911 rm -f conftest.$ac_objext
17912 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17913   (eval $ac_compile) 2>conftest.er1
17914   ac_status=$?
17915   grep -v '^ *+' conftest.er1 >conftest.err
17916   rm -f conftest.er1
17917   cat conftest.err >&5
17918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17919   (exit $ac_status); } &&
17920          { ac_try='test -z "$ac_c_werror_flag"
17921                          || test ! -s conftest.err'
17922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17923   (eval $ac_try) 2>&5
17924   ac_status=$?
17925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17926   (exit $ac_status); }; } &&
17927          { ac_try='test -s conftest.$ac_objext'
17928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17929   (eval $ac_try) 2>&5
17930   ac_status=$?
17931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17932   (exit $ac_status); }; }; then
17933   ac_hi=$ac_mid
17934 else
17935   echo "$as_me: failed program was:" >&5
17936 sed 's/^/| /' conftest.$ac_ext >&5
17937
17938 ac_lo=`expr '(' $ac_mid ')' + 1`
17939 fi
17940 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17941 done
17942 case $ac_lo in
17943 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
17944 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
17945 See \`config.log' for more details." >&5
17946 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
17947 See \`config.log' for more details." >&2;}
17948    { (exit 1); exit 1; }; } ;;
17949 esac
17950 else
17951   if test "$cross_compiling" = yes; then
17952   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17953 See \`config.log' for more details." >&5
17954 echo "$as_me: error: cannot run test program while cross compiling
17955 See \`config.log' for more details." >&2;}
17956    { (exit 1); exit 1; }; }
17957 else
17958   cat >conftest.$ac_ext <<_ACEOF
17959 /* confdefs.h.  */
17960 _ACEOF
17961 cat confdefs.h >>conftest.$ac_ext
17962 cat >>conftest.$ac_ext <<_ACEOF
17963 /* end confdefs.h.  */
17964 $ac_includes_default
17965 long longval () { return (long) (sizeof (unsigned long)); }
17966 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
17967 #include <stdio.h>
17968 #include <stdlib.h>
17969 int
17970 main ()
17971 {
17972
17973   FILE *f = fopen ("conftest.val", "w");
17974   if (! f)
17975     exit (1);
17976   if (((long) (sizeof (unsigned long))) < 0)
17977     {
17978       long i = longval ();
17979       if (i != ((long) (sizeof (unsigned long))))
17980         exit (1);
17981       fprintf (f, "%ld\n", i);
17982     }
17983   else
17984     {
17985       unsigned long i = ulongval ();
17986       if (i != ((long) (sizeof (unsigned long))))
17987         exit (1);
17988       fprintf (f, "%lu\n", i);
17989     }
17990   exit (ferror (f) || fclose (f) != 0);
17991
17992   ;
17993   return 0;
17994 }
17995 _ACEOF
17996 rm -f conftest$ac_exeext
17997 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17998   (eval $ac_link) 2>&5
17999   ac_status=$?
18000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18001   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18003   (eval $ac_try) 2>&5
18004   ac_status=$?
18005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18006   (exit $ac_status); }; }; then
18007   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18008 else
18009   echo "$as_me: program exited with status $ac_status" >&5
18010 echo "$as_me: failed program was:" >&5
18011 sed 's/^/| /' conftest.$ac_ext >&5
18012
18013 ( exit $ac_status )
18014 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18015 See \`config.log' for more details." >&5
18016 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18017 See \`config.log' for more details." >&2;}
18018    { (exit 1); exit 1; }; }
18019 fi
18020 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18021 fi
18022 fi
18023 rm -f conftest.val
18024 else
18025   ac_cv_sizeof_unsigned_long=0
18026 fi
18027 fi
18028 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18029 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18030 cat >>confdefs.h <<_ACEOF
18031 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18032 _ACEOF
18033
18034
18035
18036 # And one for the size of size_t (enables tweaks for > 32bit address space)
18037 echo "$as_me:$LINENO: checking for size_t" >&5
18038 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18039 if test "${ac_cv_type_size_t+set}" = set; then
18040   echo $ECHO_N "(cached) $ECHO_C" >&6
18041 else
18042   cat >conftest.$ac_ext <<_ACEOF
18043 /* confdefs.h.  */
18044 _ACEOF
18045 cat confdefs.h >>conftest.$ac_ext
18046 cat >>conftest.$ac_ext <<_ACEOF
18047 /* end confdefs.h.  */
18048 $ac_includes_default
18049 int
18050 main ()
18051 {
18052 if ((size_t *) 0)
18053   return 0;
18054 if (sizeof (size_t))
18055   return 0;
18056   ;
18057   return 0;
18058 }
18059 _ACEOF
18060 rm -f conftest.$ac_objext
18061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18062   (eval $ac_compile) 2>conftest.er1
18063   ac_status=$?
18064   grep -v '^ *+' conftest.er1 >conftest.err
18065   rm -f conftest.er1
18066   cat conftest.err >&5
18067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068   (exit $ac_status); } &&
18069          { ac_try='test -z "$ac_c_werror_flag"
18070                          || test ! -s conftest.err'
18071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18072   (eval $ac_try) 2>&5
18073   ac_status=$?
18074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18075   (exit $ac_status); }; } &&
18076          { ac_try='test -s conftest.$ac_objext'
18077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18078   (eval $ac_try) 2>&5
18079   ac_status=$?
18080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18081   (exit $ac_status); }; }; then
18082   ac_cv_type_size_t=yes
18083 else
18084   echo "$as_me: failed program was:" >&5
18085 sed 's/^/| /' conftest.$ac_ext >&5
18086
18087 ac_cv_type_size_t=no
18088 fi
18089 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18090 fi
18091 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18092 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18093
18094 echo "$as_me:$LINENO: checking size of size_t" >&5
18095 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18096 if test "${ac_cv_sizeof_size_t+set}" = set; then
18097   echo $ECHO_N "(cached) $ECHO_C" >&6
18098 else
18099   if test "$ac_cv_type_size_t" = yes; then
18100   # The cast to unsigned long works around a bug in the HP C Compiler
18101   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18102   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18103   # This bug is HP SR number 8606223364.
18104   if test "$cross_compiling" = yes; then
18105   # Depending upon the size, compute the lo and hi bounds.
18106 cat >conftest.$ac_ext <<_ACEOF
18107 /* confdefs.h.  */
18108 _ACEOF
18109 cat confdefs.h >>conftest.$ac_ext
18110 cat >>conftest.$ac_ext <<_ACEOF
18111 /* end confdefs.h.  */
18112 $ac_includes_default
18113 int
18114 main ()
18115 {
18116 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18117 test_array [0] = 0
18118
18119   ;
18120   return 0;
18121 }
18122 _ACEOF
18123 rm -f conftest.$ac_objext
18124 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18125   (eval $ac_compile) 2>conftest.er1
18126   ac_status=$?
18127   grep -v '^ *+' conftest.er1 >conftest.err
18128   rm -f conftest.er1
18129   cat conftest.err >&5
18130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18131   (exit $ac_status); } &&
18132          { ac_try='test -z "$ac_c_werror_flag"
18133                          || test ! -s conftest.err'
18134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18135   (eval $ac_try) 2>&5
18136   ac_status=$?
18137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18138   (exit $ac_status); }; } &&
18139          { ac_try='test -s conftest.$ac_objext'
18140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18141   (eval $ac_try) 2>&5
18142   ac_status=$?
18143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18144   (exit $ac_status); }; }; then
18145   ac_lo=0 ac_mid=0
18146   while :; do
18147     cat >conftest.$ac_ext <<_ACEOF
18148 /* confdefs.h.  */
18149 _ACEOF
18150 cat confdefs.h >>conftest.$ac_ext
18151 cat >>conftest.$ac_ext <<_ACEOF
18152 /* end confdefs.h.  */
18153 $ac_includes_default
18154 int
18155 main ()
18156 {
18157 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18158 test_array [0] = 0
18159
18160   ;
18161   return 0;
18162 }
18163 _ACEOF
18164 rm -f conftest.$ac_objext
18165 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18166   (eval $ac_compile) 2>conftest.er1
18167   ac_status=$?
18168   grep -v '^ *+' conftest.er1 >conftest.err
18169   rm -f conftest.er1
18170   cat conftest.err >&5
18171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18172   (exit $ac_status); } &&
18173          { ac_try='test -z "$ac_c_werror_flag"
18174                          || test ! -s conftest.err'
18175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18176   (eval $ac_try) 2>&5
18177   ac_status=$?
18178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18179   (exit $ac_status); }; } &&
18180          { ac_try='test -s conftest.$ac_objext'
18181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18182   (eval $ac_try) 2>&5
18183   ac_status=$?
18184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18185   (exit $ac_status); }; }; then
18186   ac_hi=$ac_mid; break
18187 else
18188   echo "$as_me: failed program was:" >&5
18189 sed 's/^/| /' conftest.$ac_ext >&5
18190
18191 ac_lo=`expr $ac_mid + 1`
18192                     if test $ac_lo -le $ac_mid; then
18193                       ac_lo= ac_hi=
18194                       break
18195                     fi
18196                     ac_mid=`expr 2 '*' $ac_mid + 1`
18197 fi
18198 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18199   done
18200 else
18201   echo "$as_me: failed program was:" >&5
18202 sed 's/^/| /' conftest.$ac_ext >&5
18203
18204 cat >conftest.$ac_ext <<_ACEOF
18205 /* confdefs.h.  */
18206 _ACEOF
18207 cat confdefs.h >>conftest.$ac_ext
18208 cat >>conftest.$ac_ext <<_ACEOF
18209 /* end confdefs.h.  */
18210 $ac_includes_default
18211 int
18212 main ()
18213 {
18214 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18215 test_array [0] = 0
18216
18217   ;
18218   return 0;
18219 }
18220 _ACEOF
18221 rm -f conftest.$ac_objext
18222 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18223   (eval $ac_compile) 2>conftest.er1
18224   ac_status=$?
18225   grep -v '^ *+' conftest.er1 >conftest.err
18226   rm -f conftest.er1
18227   cat conftest.err >&5
18228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18229   (exit $ac_status); } &&
18230          { ac_try='test -z "$ac_c_werror_flag"
18231                          || test ! -s conftest.err'
18232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18233   (eval $ac_try) 2>&5
18234   ac_status=$?
18235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18236   (exit $ac_status); }; } &&
18237          { ac_try='test -s conftest.$ac_objext'
18238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18239   (eval $ac_try) 2>&5
18240   ac_status=$?
18241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18242   (exit $ac_status); }; }; then
18243   ac_hi=-1 ac_mid=-1
18244   while :; do
18245     cat >conftest.$ac_ext <<_ACEOF
18246 /* confdefs.h.  */
18247 _ACEOF
18248 cat confdefs.h >>conftest.$ac_ext
18249 cat >>conftest.$ac_ext <<_ACEOF
18250 /* end confdefs.h.  */
18251 $ac_includes_default
18252 int
18253 main ()
18254 {
18255 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18256 test_array [0] = 0
18257
18258   ;
18259   return 0;
18260 }
18261 _ACEOF
18262 rm -f conftest.$ac_objext
18263 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18264   (eval $ac_compile) 2>conftest.er1
18265   ac_status=$?
18266   grep -v '^ *+' conftest.er1 >conftest.err
18267   rm -f conftest.er1
18268   cat conftest.err >&5
18269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18270   (exit $ac_status); } &&
18271          { ac_try='test -z "$ac_c_werror_flag"
18272                          || test ! -s conftest.err'
18273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18274   (eval $ac_try) 2>&5
18275   ac_status=$?
18276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18277   (exit $ac_status); }; } &&
18278          { ac_try='test -s conftest.$ac_objext'
18279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18280   (eval $ac_try) 2>&5
18281   ac_status=$?
18282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18283   (exit $ac_status); }; }; then
18284   ac_lo=$ac_mid; break
18285 else
18286   echo "$as_me: failed program was:" >&5
18287 sed 's/^/| /' conftest.$ac_ext >&5
18288
18289 ac_hi=`expr '(' $ac_mid ')' - 1`
18290                        if test $ac_mid -le $ac_hi; then
18291                          ac_lo= ac_hi=
18292                          break
18293                        fi
18294                        ac_mid=`expr 2 '*' $ac_mid`
18295 fi
18296 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18297   done
18298 else
18299   echo "$as_me: failed program was:" >&5
18300 sed 's/^/| /' conftest.$ac_ext >&5
18301
18302 ac_lo= ac_hi=
18303 fi
18304 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18305 fi
18306 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18307 # Binary search between lo and hi bounds.
18308 while test "x$ac_lo" != "x$ac_hi"; do
18309   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18310   cat >conftest.$ac_ext <<_ACEOF
18311 /* confdefs.h.  */
18312 _ACEOF
18313 cat confdefs.h >>conftest.$ac_ext
18314 cat >>conftest.$ac_ext <<_ACEOF
18315 /* end confdefs.h.  */
18316 $ac_includes_default
18317 int
18318 main ()
18319 {
18320 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18321 test_array [0] = 0
18322
18323   ;
18324   return 0;
18325 }
18326 _ACEOF
18327 rm -f conftest.$ac_objext
18328 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18329   (eval $ac_compile) 2>conftest.er1
18330   ac_status=$?
18331   grep -v '^ *+' conftest.er1 >conftest.err
18332   rm -f conftest.er1
18333   cat conftest.err >&5
18334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18335   (exit $ac_status); } &&
18336          { ac_try='test -z "$ac_c_werror_flag"
18337                          || test ! -s conftest.err'
18338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18339   (eval $ac_try) 2>&5
18340   ac_status=$?
18341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18342   (exit $ac_status); }; } &&
18343          { ac_try='test -s conftest.$ac_objext'
18344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18345   (eval $ac_try) 2>&5
18346   ac_status=$?
18347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18348   (exit $ac_status); }; }; then
18349   ac_hi=$ac_mid
18350 else
18351   echo "$as_me: failed program was:" >&5
18352 sed 's/^/| /' conftest.$ac_ext >&5
18353
18354 ac_lo=`expr '(' $ac_mid ')' + 1`
18355 fi
18356 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18357 done
18358 case $ac_lo in
18359 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18360 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18361 See \`config.log' for more details." >&5
18362 echo "$as_me: error: cannot compute sizeof (size_t), 77
18363 See \`config.log' for more details." >&2;}
18364    { (exit 1); exit 1; }; } ;;
18365 esac
18366 else
18367   if test "$cross_compiling" = yes; then
18368   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18369 See \`config.log' for more details." >&5
18370 echo "$as_me: error: cannot run test program while cross compiling
18371 See \`config.log' for more details." >&2;}
18372    { (exit 1); exit 1; }; }
18373 else
18374   cat >conftest.$ac_ext <<_ACEOF
18375 /* confdefs.h.  */
18376 _ACEOF
18377 cat confdefs.h >>conftest.$ac_ext
18378 cat >>conftest.$ac_ext <<_ACEOF
18379 /* end confdefs.h.  */
18380 $ac_includes_default
18381 long longval () { return (long) (sizeof (size_t)); }
18382 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18383 #include <stdio.h>
18384 #include <stdlib.h>
18385 int
18386 main ()
18387 {
18388
18389   FILE *f = fopen ("conftest.val", "w");
18390   if (! f)
18391     exit (1);
18392   if (((long) (sizeof (size_t))) < 0)
18393     {
18394       long i = longval ();
18395       if (i != ((long) (sizeof (size_t))))
18396         exit (1);
18397       fprintf (f, "%ld\n", i);
18398     }
18399   else
18400     {
18401       unsigned long i = ulongval ();
18402       if (i != ((long) (sizeof (size_t))))
18403         exit (1);
18404       fprintf (f, "%lu\n", i);
18405     }
18406   exit (ferror (f) || fclose (f) != 0);
18407
18408   ;
18409   return 0;
18410 }
18411 _ACEOF
18412 rm -f conftest$ac_exeext
18413 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18414   (eval $ac_link) 2>&5
18415   ac_status=$?
18416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18417   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18419   (eval $ac_try) 2>&5
18420   ac_status=$?
18421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18422   (exit $ac_status); }; }; then
18423   ac_cv_sizeof_size_t=`cat conftest.val`
18424 else
18425   echo "$as_me: program exited with status $ac_status" >&5
18426 echo "$as_me: failed program was:" >&5
18427 sed 's/^/| /' conftest.$ac_ext >&5
18428
18429 ( exit $ac_status )
18430 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18431 See \`config.log' for more details." >&5
18432 echo "$as_me: error: cannot compute sizeof (size_t), 77
18433 See \`config.log' for more details." >&2;}
18434    { (exit 1); exit 1; }; }
18435 fi
18436 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18437 fi
18438 fi
18439 rm -f conftest.val
18440 else
18441   ac_cv_sizeof_size_t=0
18442 fi
18443 fi
18444 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18445 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18446 cat >>confdefs.h <<_ACEOF
18447 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18448 _ACEOF
18449
18450
18451
18452 # Determine memory alignment requirements for the basic C data types.
18453
18454 echo "$as_me:$LINENO: checking for short" >&5
18455 echo $ECHO_N "checking for short... $ECHO_C" >&6
18456 if test "${ac_cv_type_short+set}" = set; then
18457   echo $ECHO_N "(cached) $ECHO_C" >&6
18458 else
18459   cat >conftest.$ac_ext <<_ACEOF
18460 /* confdefs.h.  */
18461 _ACEOF
18462 cat confdefs.h >>conftest.$ac_ext
18463 cat >>conftest.$ac_ext <<_ACEOF
18464 /* end confdefs.h.  */
18465 $ac_includes_default
18466 int
18467 main ()
18468 {
18469 if ((short *) 0)
18470   return 0;
18471 if (sizeof (short))
18472   return 0;
18473   ;
18474   return 0;
18475 }
18476 _ACEOF
18477 rm -f conftest.$ac_objext
18478 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18479   (eval $ac_compile) 2>conftest.er1
18480   ac_status=$?
18481   grep -v '^ *+' conftest.er1 >conftest.err
18482   rm -f conftest.er1
18483   cat conftest.err >&5
18484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18485   (exit $ac_status); } &&
18486          { ac_try='test -z "$ac_c_werror_flag"
18487                          || test ! -s conftest.err'
18488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18489   (eval $ac_try) 2>&5
18490   ac_status=$?
18491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18492   (exit $ac_status); }; } &&
18493          { ac_try='test -s conftest.$ac_objext'
18494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18495   (eval $ac_try) 2>&5
18496   ac_status=$?
18497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18498   (exit $ac_status); }; }; then
18499   ac_cv_type_short=yes
18500 else
18501   echo "$as_me: failed program was:" >&5
18502 sed 's/^/| /' conftest.$ac_ext >&5
18503
18504 ac_cv_type_short=no
18505 fi
18506 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18507 fi
18508 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18509 echo "${ECHO_T}$ac_cv_type_short" >&6
18510
18511 echo "$as_me:$LINENO: checking alignment of short" >&5
18512 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18513 if test "${pgac_cv_alignof_short+set}" = set; then
18514   echo $ECHO_N "(cached) $ECHO_C" >&6
18515 else
18516   if test "$ac_cv_type_short" = yes; then
18517   if test "$cross_compiling" = yes; then
18518   # Depending upon the size, compute the lo and hi bounds.
18519 cat >conftest.$ac_ext <<_ACEOF
18520 /* confdefs.h.  */
18521 _ACEOF
18522 cat confdefs.h >>conftest.$ac_ext
18523 cat >>conftest.$ac_ext <<_ACEOF
18524 /* end confdefs.h.  */
18525 $ac_includes_default
18526 struct { char filler; short field; } pgac_struct;
18527 int
18528 main ()
18529 {
18530 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18531 test_array [0] = 0
18532
18533   ;
18534   return 0;
18535 }
18536 _ACEOF
18537 rm -f conftest.$ac_objext
18538 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18539   (eval $ac_compile) 2>conftest.er1
18540   ac_status=$?
18541   grep -v '^ *+' conftest.er1 >conftest.err
18542   rm -f conftest.er1
18543   cat conftest.err >&5
18544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18545   (exit $ac_status); } &&
18546          { ac_try='test -z "$ac_c_werror_flag"
18547                          || test ! -s conftest.err'
18548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18549   (eval $ac_try) 2>&5
18550   ac_status=$?
18551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18552   (exit $ac_status); }; } &&
18553          { ac_try='test -s conftest.$ac_objext'
18554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18555   (eval $ac_try) 2>&5
18556   ac_status=$?
18557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18558   (exit $ac_status); }; }; then
18559   ac_lo=0 ac_mid=0
18560   while :; do
18561     cat >conftest.$ac_ext <<_ACEOF
18562 /* confdefs.h.  */
18563 _ACEOF
18564 cat confdefs.h >>conftest.$ac_ext
18565 cat >>conftest.$ac_ext <<_ACEOF
18566 /* end confdefs.h.  */
18567 $ac_includes_default
18568 struct { char filler; short field; } pgac_struct;
18569 int
18570 main ()
18571 {
18572 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18573 test_array [0] = 0
18574
18575   ;
18576   return 0;
18577 }
18578 _ACEOF
18579 rm -f conftest.$ac_objext
18580 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18581   (eval $ac_compile) 2>conftest.er1
18582   ac_status=$?
18583   grep -v '^ *+' conftest.er1 >conftest.err
18584   rm -f conftest.er1
18585   cat conftest.err >&5
18586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18587   (exit $ac_status); } &&
18588          { ac_try='test -z "$ac_c_werror_flag"
18589                          || test ! -s conftest.err'
18590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18591   (eval $ac_try) 2>&5
18592   ac_status=$?
18593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18594   (exit $ac_status); }; } &&
18595          { ac_try='test -s conftest.$ac_objext'
18596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18597   (eval $ac_try) 2>&5
18598   ac_status=$?
18599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18600   (exit $ac_status); }; }; then
18601   ac_hi=$ac_mid; break
18602 else
18603   echo "$as_me: failed program was:" >&5
18604 sed 's/^/| /' conftest.$ac_ext >&5
18605
18606 ac_lo=`expr $ac_mid + 1`
18607                     if test $ac_lo -le $ac_mid; then
18608                       ac_lo= ac_hi=
18609                       break
18610                     fi
18611                     ac_mid=`expr 2 '*' $ac_mid + 1`
18612 fi
18613 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18614   done
18615 else
18616   echo "$as_me: failed program was:" >&5
18617 sed 's/^/| /' conftest.$ac_ext >&5
18618
18619 cat >conftest.$ac_ext <<_ACEOF
18620 /* confdefs.h.  */
18621 _ACEOF
18622 cat confdefs.h >>conftest.$ac_ext
18623 cat >>conftest.$ac_ext <<_ACEOF
18624 /* end confdefs.h.  */
18625 $ac_includes_default
18626 struct { char filler; short field; } pgac_struct;
18627 int
18628 main ()
18629 {
18630 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18631 test_array [0] = 0
18632
18633   ;
18634   return 0;
18635 }
18636 _ACEOF
18637 rm -f conftest.$ac_objext
18638 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18639   (eval $ac_compile) 2>conftest.er1
18640   ac_status=$?
18641   grep -v '^ *+' conftest.er1 >conftest.err
18642   rm -f conftest.er1
18643   cat conftest.err >&5
18644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18645   (exit $ac_status); } &&
18646          { ac_try='test -z "$ac_c_werror_flag"
18647                          || test ! -s conftest.err'
18648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18649   (eval $ac_try) 2>&5
18650   ac_status=$?
18651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18652   (exit $ac_status); }; } &&
18653          { ac_try='test -s conftest.$ac_objext'
18654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18655   (eval $ac_try) 2>&5
18656   ac_status=$?
18657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18658   (exit $ac_status); }; }; then
18659   ac_hi=-1 ac_mid=-1
18660   while :; do
18661     cat >conftest.$ac_ext <<_ACEOF
18662 /* confdefs.h.  */
18663 _ACEOF
18664 cat confdefs.h >>conftest.$ac_ext
18665 cat >>conftest.$ac_ext <<_ACEOF
18666 /* end confdefs.h.  */
18667 $ac_includes_default
18668 struct { char filler; short field; } pgac_struct;
18669 int
18670 main ()
18671 {
18672 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18673 test_array [0] = 0
18674
18675   ;
18676   return 0;
18677 }
18678 _ACEOF
18679 rm -f conftest.$ac_objext
18680 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18681   (eval $ac_compile) 2>conftest.er1
18682   ac_status=$?
18683   grep -v '^ *+' conftest.er1 >conftest.err
18684   rm -f conftest.er1
18685   cat conftest.err >&5
18686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18687   (exit $ac_status); } &&
18688          { ac_try='test -z "$ac_c_werror_flag"
18689                          || test ! -s conftest.err'
18690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18691   (eval $ac_try) 2>&5
18692   ac_status=$?
18693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18694   (exit $ac_status); }; } &&
18695          { ac_try='test -s conftest.$ac_objext'
18696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18697   (eval $ac_try) 2>&5
18698   ac_status=$?
18699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18700   (exit $ac_status); }; }; then
18701   ac_lo=$ac_mid; break
18702 else
18703   echo "$as_me: failed program was:" >&5
18704 sed 's/^/| /' conftest.$ac_ext >&5
18705
18706 ac_hi=`expr '(' $ac_mid ')' - 1`
18707                        if test $ac_mid -le $ac_hi; then
18708                          ac_lo= ac_hi=
18709                          break
18710                        fi
18711                        ac_mid=`expr 2 '*' $ac_mid`
18712 fi
18713 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18714   done
18715 else
18716   echo "$as_me: failed program was:" >&5
18717 sed 's/^/| /' conftest.$ac_ext >&5
18718
18719 ac_lo= ac_hi=
18720 fi
18721 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18722 fi
18723 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18724 # Binary search between lo and hi bounds.
18725 while test "x$ac_lo" != "x$ac_hi"; do
18726   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18727   cat >conftest.$ac_ext <<_ACEOF
18728 /* confdefs.h.  */
18729 _ACEOF
18730 cat confdefs.h >>conftest.$ac_ext
18731 cat >>conftest.$ac_ext <<_ACEOF
18732 /* end confdefs.h.  */
18733 $ac_includes_default
18734 struct { char filler; short field; } pgac_struct;
18735 int
18736 main ()
18737 {
18738 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18739 test_array [0] = 0
18740
18741   ;
18742   return 0;
18743 }
18744 _ACEOF
18745 rm -f conftest.$ac_objext
18746 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18747   (eval $ac_compile) 2>conftest.er1
18748   ac_status=$?
18749   grep -v '^ *+' conftest.er1 >conftest.err
18750   rm -f conftest.er1
18751   cat conftest.err >&5
18752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18753   (exit $ac_status); } &&
18754          { ac_try='test -z "$ac_c_werror_flag"
18755                          || test ! -s conftest.err'
18756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18757   (eval $ac_try) 2>&5
18758   ac_status=$?
18759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18760   (exit $ac_status); }; } &&
18761          { ac_try='test -s conftest.$ac_objext'
18762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18763   (eval $ac_try) 2>&5
18764   ac_status=$?
18765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18766   (exit $ac_status); }; }; then
18767   ac_hi=$ac_mid
18768 else
18769   echo "$as_me: failed program was:" >&5
18770 sed 's/^/| /' conftest.$ac_ext >&5
18771
18772 ac_lo=`expr '(' $ac_mid ')' + 1`
18773 fi
18774 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18775 done
18776 case $ac_lo in
18777 ?*) pgac_cv_alignof_short=$ac_lo;;
18778 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18779 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18780    { (exit 1); exit 1; }; } ;;
18781 esac
18782 else
18783   if test "$cross_compiling" = yes; then
18784   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18785 See \`config.log' for more details." >&5
18786 echo "$as_me: error: cannot run test program while cross compiling
18787 See \`config.log' for more details." >&2;}
18788    { (exit 1); exit 1; }; }
18789 else
18790   cat >conftest.$ac_ext <<_ACEOF
18791 /* confdefs.h.  */
18792 _ACEOF
18793 cat confdefs.h >>conftest.$ac_ext
18794 cat >>conftest.$ac_ext <<_ACEOF
18795 /* end confdefs.h.  */
18796 $ac_includes_default
18797 struct { char filler; short field; } pgac_struct;
18798 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18799 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18800 #include <stdio.h>
18801 #include <stdlib.h>
18802 int
18803 main ()
18804 {
18805
18806   FILE *f = fopen ("conftest.val", "w");
18807   if (! f)
18808     exit (1);
18809   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
18810     {
18811       long i = longval ();
18812       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18813         exit (1);
18814       fprintf (f, "%ld\n", i);
18815     }
18816   else
18817     {
18818       unsigned long i = ulongval ();
18819       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18820         exit (1);
18821       fprintf (f, "%lu\n", i);
18822     }
18823   exit (ferror (f) || fclose (f) != 0);
18824
18825   ;
18826   return 0;
18827 }
18828 _ACEOF
18829 rm -f conftest$ac_exeext
18830 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18831   (eval $ac_link) 2>&5
18832   ac_status=$?
18833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18834   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18836   (eval $ac_try) 2>&5
18837   ac_status=$?
18838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18839   (exit $ac_status); }; }; then
18840   pgac_cv_alignof_short=`cat conftest.val`
18841 else
18842   echo "$as_me: program exited with status $ac_status" >&5
18843 echo "$as_me: failed program was:" >&5
18844 sed 's/^/| /' conftest.$ac_ext >&5
18845
18846 ( exit $ac_status )
18847 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18848 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18849    { (exit 1); exit 1; }; }
18850 fi
18851 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18852 fi
18853 fi
18854 rm -f conftest.val
18855 else
18856   pgac_cv_alignof_short=0
18857 fi
18858 fi
18859 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
18860 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
18861 cat >>confdefs.h <<_ACEOF
18862 #define ALIGNOF_SHORT $pgac_cv_alignof_short
18863 _ACEOF
18864
18865
18866 echo "$as_me:$LINENO: checking for int" >&5
18867 echo $ECHO_N "checking for int... $ECHO_C" >&6
18868 if test "${ac_cv_type_int+set}" = set; then
18869   echo $ECHO_N "(cached) $ECHO_C" >&6
18870 else
18871   cat >conftest.$ac_ext <<_ACEOF
18872 /* confdefs.h.  */
18873 _ACEOF
18874 cat confdefs.h >>conftest.$ac_ext
18875 cat >>conftest.$ac_ext <<_ACEOF
18876 /* end confdefs.h.  */
18877 $ac_includes_default
18878 int
18879 main ()
18880 {
18881 if ((int *) 0)
18882   return 0;
18883 if (sizeof (int))
18884   return 0;
18885   ;
18886   return 0;
18887 }
18888 _ACEOF
18889 rm -f conftest.$ac_objext
18890 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18891   (eval $ac_compile) 2>conftest.er1
18892   ac_status=$?
18893   grep -v '^ *+' conftest.er1 >conftest.err
18894   rm -f conftest.er1
18895   cat conftest.err >&5
18896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18897   (exit $ac_status); } &&
18898          { ac_try='test -z "$ac_c_werror_flag"
18899                          || test ! -s conftest.err'
18900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18901   (eval $ac_try) 2>&5
18902   ac_status=$?
18903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18904   (exit $ac_status); }; } &&
18905          { ac_try='test -s conftest.$ac_objext'
18906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18907   (eval $ac_try) 2>&5
18908   ac_status=$?
18909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18910   (exit $ac_status); }; }; then
18911   ac_cv_type_int=yes
18912 else
18913   echo "$as_me: failed program was:" >&5
18914 sed 's/^/| /' conftest.$ac_ext >&5
18915
18916 ac_cv_type_int=no
18917 fi
18918 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18919 fi
18920 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
18921 echo "${ECHO_T}$ac_cv_type_int" >&6
18922
18923 echo "$as_me:$LINENO: checking alignment of int" >&5
18924 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
18925 if test "${pgac_cv_alignof_int+set}" = set; then
18926   echo $ECHO_N "(cached) $ECHO_C" >&6
18927 else
18928   if test "$ac_cv_type_int" = yes; then
18929   if test "$cross_compiling" = yes; then
18930   # Depending upon the size, compute the lo and hi bounds.
18931 cat >conftest.$ac_ext <<_ACEOF
18932 /* confdefs.h.  */
18933 _ACEOF
18934 cat confdefs.h >>conftest.$ac_ext
18935 cat >>conftest.$ac_ext <<_ACEOF
18936 /* end confdefs.h.  */
18937 $ac_includes_default
18938 struct { char filler; int field; } pgac_struct;
18939 int
18940 main ()
18941 {
18942 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18943 test_array [0] = 0
18944
18945   ;
18946   return 0;
18947 }
18948 _ACEOF
18949 rm -f conftest.$ac_objext
18950 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18951   (eval $ac_compile) 2>conftest.er1
18952   ac_status=$?
18953   grep -v '^ *+' conftest.er1 >conftest.err
18954   rm -f conftest.er1
18955   cat conftest.err >&5
18956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18957   (exit $ac_status); } &&
18958          { ac_try='test -z "$ac_c_werror_flag"
18959                          || test ! -s conftest.err'
18960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18961   (eval $ac_try) 2>&5
18962   ac_status=$?
18963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18964   (exit $ac_status); }; } &&
18965          { ac_try='test -s conftest.$ac_objext'
18966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18967   (eval $ac_try) 2>&5
18968   ac_status=$?
18969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18970   (exit $ac_status); }; }; then
18971   ac_lo=0 ac_mid=0
18972   while :; do
18973     cat >conftest.$ac_ext <<_ACEOF
18974 /* confdefs.h.  */
18975 _ACEOF
18976 cat confdefs.h >>conftest.$ac_ext
18977 cat >>conftest.$ac_ext <<_ACEOF
18978 /* end confdefs.h.  */
18979 $ac_includes_default
18980 struct { char filler; int field; } pgac_struct;
18981 int
18982 main ()
18983 {
18984 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18985 test_array [0] = 0
18986
18987   ;
18988   return 0;
18989 }
18990 _ACEOF
18991 rm -f conftest.$ac_objext
18992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18993   (eval $ac_compile) 2>conftest.er1
18994   ac_status=$?
18995   grep -v '^ *+' conftest.er1 >conftest.err
18996   rm -f conftest.er1
18997   cat conftest.err >&5
18998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18999   (exit $ac_status); } &&
19000          { ac_try='test -z "$ac_c_werror_flag"
19001                          || test ! -s conftest.err'
19002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19003   (eval $ac_try) 2>&5
19004   ac_status=$?
19005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19006   (exit $ac_status); }; } &&
19007          { ac_try='test -s conftest.$ac_objext'
19008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19009   (eval $ac_try) 2>&5
19010   ac_status=$?
19011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19012   (exit $ac_status); }; }; then
19013   ac_hi=$ac_mid; break
19014 else
19015   echo "$as_me: failed program was:" >&5
19016 sed 's/^/| /' conftest.$ac_ext >&5
19017
19018 ac_lo=`expr $ac_mid + 1`
19019                     if test $ac_lo -le $ac_mid; then
19020                       ac_lo= ac_hi=
19021                       break
19022                     fi
19023                     ac_mid=`expr 2 '*' $ac_mid + 1`
19024 fi
19025 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19026   done
19027 else
19028   echo "$as_me: failed program was:" >&5
19029 sed 's/^/| /' conftest.$ac_ext >&5
19030
19031 cat >conftest.$ac_ext <<_ACEOF
19032 /* confdefs.h.  */
19033 _ACEOF
19034 cat confdefs.h >>conftest.$ac_ext
19035 cat >>conftest.$ac_ext <<_ACEOF
19036 /* end confdefs.h.  */
19037 $ac_includes_default
19038 struct { char filler; int field; } pgac_struct;
19039 int
19040 main ()
19041 {
19042 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19043 test_array [0] = 0
19044
19045   ;
19046   return 0;
19047 }
19048 _ACEOF
19049 rm -f conftest.$ac_objext
19050 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19051   (eval $ac_compile) 2>conftest.er1
19052   ac_status=$?
19053   grep -v '^ *+' conftest.er1 >conftest.err
19054   rm -f conftest.er1
19055   cat conftest.err >&5
19056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19057   (exit $ac_status); } &&
19058          { ac_try='test -z "$ac_c_werror_flag"
19059                          || test ! -s conftest.err'
19060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19061   (eval $ac_try) 2>&5
19062   ac_status=$?
19063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19064   (exit $ac_status); }; } &&
19065          { ac_try='test -s conftest.$ac_objext'
19066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19067   (eval $ac_try) 2>&5
19068   ac_status=$?
19069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19070   (exit $ac_status); }; }; then
19071   ac_hi=-1 ac_mid=-1
19072   while :; do
19073     cat >conftest.$ac_ext <<_ACEOF
19074 /* confdefs.h.  */
19075 _ACEOF
19076 cat confdefs.h >>conftest.$ac_ext
19077 cat >>conftest.$ac_ext <<_ACEOF
19078 /* end confdefs.h.  */
19079 $ac_includes_default
19080 struct { char filler; int field; } pgac_struct;
19081 int
19082 main ()
19083 {
19084 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19085 test_array [0] = 0
19086
19087   ;
19088   return 0;
19089 }
19090 _ACEOF
19091 rm -f conftest.$ac_objext
19092 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19093   (eval $ac_compile) 2>conftest.er1
19094   ac_status=$?
19095   grep -v '^ *+' conftest.er1 >conftest.err
19096   rm -f conftest.er1
19097   cat conftest.err >&5
19098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19099   (exit $ac_status); } &&
19100          { ac_try='test -z "$ac_c_werror_flag"
19101                          || test ! -s conftest.err'
19102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19103   (eval $ac_try) 2>&5
19104   ac_status=$?
19105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19106   (exit $ac_status); }; } &&
19107          { ac_try='test -s conftest.$ac_objext'
19108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19109   (eval $ac_try) 2>&5
19110   ac_status=$?
19111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19112   (exit $ac_status); }; }; then
19113   ac_lo=$ac_mid; break
19114 else
19115   echo "$as_me: failed program was:" >&5
19116 sed 's/^/| /' conftest.$ac_ext >&5
19117
19118 ac_hi=`expr '(' $ac_mid ')' - 1`
19119                        if test $ac_mid -le $ac_hi; then
19120                          ac_lo= ac_hi=
19121                          break
19122                        fi
19123                        ac_mid=`expr 2 '*' $ac_mid`
19124 fi
19125 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19126   done
19127 else
19128   echo "$as_me: failed program was:" >&5
19129 sed 's/^/| /' conftest.$ac_ext >&5
19130
19131 ac_lo= ac_hi=
19132 fi
19133 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19134 fi
19135 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19136 # Binary search between lo and hi bounds.
19137 while test "x$ac_lo" != "x$ac_hi"; do
19138   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19139   cat >conftest.$ac_ext <<_ACEOF
19140 /* confdefs.h.  */
19141 _ACEOF
19142 cat confdefs.h >>conftest.$ac_ext
19143 cat >>conftest.$ac_ext <<_ACEOF
19144 /* end confdefs.h.  */
19145 $ac_includes_default
19146 struct { char filler; int field; } pgac_struct;
19147 int
19148 main ()
19149 {
19150 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19151 test_array [0] = 0
19152
19153   ;
19154   return 0;
19155 }
19156 _ACEOF
19157 rm -f conftest.$ac_objext
19158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19159   (eval $ac_compile) 2>conftest.er1
19160   ac_status=$?
19161   grep -v '^ *+' conftest.er1 >conftest.err
19162   rm -f conftest.er1
19163   cat conftest.err >&5
19164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19165   (exit $ac_status); } &&
19166          { ac_try='test -z "$ac_c_werror_flag"
19167                          || test ! -s conftest.err'
19168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19169   (eval $ac_try) 2>&5
19170   ac_status=$?
19171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19172   (exit $ac_status); }; } &&
19173          { ac_try='test -s conftest.$ac_objext'
19174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19175   (eval $ac_try) 2>&5
19176   ac_status=$?
19177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19178   (exit $ac_status); }; }; then
19179   ac_hi=$ac_mid
19180 else
19181   echo "$as_me: failed program was:" >&5
19182 sed 's/^/| /' conftest.$ac_ext >&5
19183
19184 ac_lo=`expr '(' $ac_mid ')' + 1`
19185 fi
19186 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19187 done
19188 case $ac_lo in
19189 ?*) pgac_cv_alignof_int=$ac_lo;;
19190 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19191 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19192    { (exit 1); exit 1; }; } ;;
19193 esac
19194 else
19195   if test "$cross_compiling" = yes; then
19196   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19197 See \`config.log' for more details." >&5
19198 echo "$as_me: error: cannot run test program while cross compiling
19199 See \`config.log' for more details." >&2;}
19200    { (exit 1); exit 1; }; }
19201 else
19202   cat >conftest.$ac_ext <<_ACEOF
19203 /* confdefs.h.  */
19204 _ACEOF
19205 cat confdefs.h >>conftest.$ac_ext
19206 cat >>conftest.$ac_ext <<_ACEOF
19207 /* end confdefs.h.  */
19208 $ac_includes_default
19209 struct { char filler; int field; } pgac_struct;
19210 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19211 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19212 #include <stdio.h>
19213 #include <stdlib.h>
19214 int
19215 main ()
19216 {
19217
19218   FILE *f = fopen ("conftest.val", "w");
19219   if (! f)
19220     exit (1);
19221   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19222     {
19223       long i = longval ();
19224       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19225         exit (1);
19226       fprintf (f, "%ld\n", i);
19227     }
19228   else
19229     {
19230       unsigned long i = ulongval ();
19231       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19232         exit (1);
19233       fprintf (f, "%lu\n", i);
19234     }
19235   exit (ferror (f) || fclose (f) != 0);
19236
19237   ;
19238   return 0;
19239 }
19240 _ACEOF
19241 rm -f conftest$ac_exeext
19242 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19243   (eval $ac_link) 2>&5
19244   ac_status=$?
19245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19246   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19248   (eval $ac_try) 2>&5
19249   ac_status=$?
19250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19251   (exit $ac_status); }; }; then
19252   pgac_cv_alignof_int=`cat conftest.val`
19253 else
19254   echo "$as_me: program exited with status $ac_status" >&5
19255 echo "$as_me: failed program was:" >&5
19256 sed 's/^/| /' conftest.$ac_ext >&5
19257
19258 ( exit $ac_status )
19259 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19260 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19261    { (exit 1); exit 1; }; }
19262 fi
19263 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19264 fi
19265 fi
19266 rm -f conftest.val
19267 else
19268   pgac_cv_alignof_int=0
19269 fi
19270 fi
19271 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19272 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19273 cat >>confdefs.h <<_ACEOF
19274 #define ALIGNOF_INT $pgac_cv_alignof_int
19275 _ACEOF
19276
19277
19278 echo "$as_me:$LINENO: checking for long" >&5
19279 echo $ECHO_N "checking for long... $ECHO_C" >&6
19280 if test "${ac_cv_type_long+set}" = set; then
19281   echo $ECHO_N "(cached) $ECHO_C" >&6
19282 else
19283   cat >conftest.$ac_ext <<_ACEOF
19284 /* confdefs.h.  */
19285 _ACEOF
19286 cat confdefs.h >>conftest.$ac_ext
19287 cat >>conftest.$ac_ext <<_ACEOF
19288 /* end confdefs.h.  */
19289 $ac_includes_default
19290 int
19291 main ()
19292 {
19293 if ((long *) 0)
19294   return 0;
19295 if (sizeof (long))
19296   return 0;
19297   ;
19298   return 0;
19299 }
19300 _ACEOF
19301 rm -f conftest.$ac_objext
19302 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19303   (eval $ac_compile) 2>conftest.er1
19304   ac_status=$?
19305   grep -v '^ *+' conftest.er1 >conftest.err
19306   rm -f conftest.er1
19307   cat conftest.err >&5
19308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19309   (exit $ac_status); } &&
19310          { ac_try='test -z "$ac_c_werror_flag"
19311                          || test ! -s conftest.err'
19312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19313   (eval $ac_try) 2>&5
19314   ac_status=$?
19315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19316   (exit $ac_status); }; } &&
19317          { ac_try='test -s conftest.$ac_objext'
19318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19319   (eval $ac_try) 2>&5
19320   ac_status=$?
19321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19322   (exit $ac_status); }; }; then
19323   ac_cv_type_long=yes
19324 else
19325   echo "$as_me: failed program was:" >&5
19326 sed 's/^/| /' conftest.$ac_ext >&5
19327
19328 ac_cv_type_long=no
19329 fi
19330 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19331 fi
19332 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19333 echo "${ECHO_T}$ac_cv_type_long" >&6
19334
19335 echo "$as_me:$LINENO: checking alignment of long" >&5
19336 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19337 if test "${pgac_cv_alignof_long+set}" = set; then
19338   echo $ECHO_N "(cached) $ECHO_C" >&6
19339 else
19340   if test "$ac_cv_type_long" = yes; then
19341   if test "$cross_compiling" = yes; then
19342   # Depending upon the size, compute the lo and hi bounds.
19343 cat >conftest.$ac_ext <<_ACEOF
19344 /* confdefs.h.  */
19345 _ACEOF
19346 cat confdefs.h >>conftest.$ac_ext
19347 cat >>conftest.$ac_ext <<_ACEOF
19348 /* end confdefs.h.  */
19349 $ac_includes_default
19350 struct { char filler; long field; } pgac_struct;
19351 int
19352 main ()
19353 {
19354 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19355 test_array [0] = 0
19356
19357   ;
19358   return 0;
19359 }
19360 _ACEOF
19361 rm -f conftest.$ac_objext
19362 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19363   (eval $ac_compile) 2>conftest.er1
19364   ac_status=$?
19365   grep -v '^ *+' conftest.er1 >conftest.err
19366   rm -f conftest.er1
19367   cat conftest.err >&5
19368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19369   (exit $ac_status); } &&
19370          { ac_try='test -z "$ac_c_werror_flag"
19371                          || test ! -s conftest.err'
19372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19373   (eval $ac_try) 2>&5
19374   ac_status=$?
19375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19376   (exit $ac_status); }; } &&
19377          { ac_try='test -s conftest.$ac_objext'
19378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19379   (eval $ac_try) 2>&5
19380   ac_status=$?
19381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19382   (exit $ac_status); }; }; then
19383   ac_lo=0 ac_mid=0
19384   while :; do
19385     cat >conftest.$ac_ext <<_ACEOF
19386 /* confdefs.h.  */
19387 _ACEOF
19388 cat confdefs.h >>conftest.$ac_ext
19389 cat >>conftest.$ac_ext <<_ACEOF
19390 /* end confdefs.h.  */
19391 $ac_includes_default
19392 struct { char filler; long field; } pgac_struct;
19393 int
19394 main ()
19395 {
19396 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19397 test_array [0] = 0
19398
19399   ;
19400   return 0;
19401 }
19402 _ACEOF
19403 rm -f conftest.$ac_objext
19404 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19405   (eval $ac_compile) 2>conftest.er1
19406   ac_status=$?
19407   grep -v '^ *+' conftest.er1 >conftest.err
19408   rm -f conftest.er1
19409   cat conftest.err >&5
19410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19411   (exit $ac_status); } &&
19412          { ac_try='test -z "$ac_c_werror_flag"
19413                          || test ! -s conftest.err'
19414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19415   (eval $ac_try) 2>&5
19416   ac_status=$?
19417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19418   (exit $ac_status); }; } &&
19419          { ac_try='test -s conftest.$ac_objext'
19420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19421   (eval $ac_try) 2>&5
19422   ac_status=$?
19423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19424   (exit $ac_status); }; }; then
19425   ac_hi=$ac_mid; break
19426 else
19427   echo "$as_me: failed program was:" >&5
19428 sed 's/^/| /' conftest.$ac_ext >&5
19429
19430 ac_lo=`expr $ac_mid + 1`
19431                     if test $ac_lo -le $ac_mid; then
19432                       ac_lo= ac_hi=
19433                       break
19434                     fi
19435                     ac_mid=`expr 2 '*' $ac_mid + 1`
19436 fi
19437 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19438   done
19439 else
19440   echo "$as_me: failed program was:" >&5
19441 sed 's/^/| /' conftest.$ac_ext >&5
19442
19443 cat >conftest.$ac_ext <<_ACEOF
19444 /* confdefs.h.  */
19445 _ACEOF
19446 cat confdefs.h >>conftest.$ac_ext
19447 cat >>conftest.$ac_ext <<_ACEOF
19448 /* end confdefs.h.  */
19449 $ac_includes_default
19450 struct { char filler; long field; } pgac_struct;
19451 int
19452 main ()
19453 {
19454 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19455 test_array [0] = 0
19456
19457   ;
19458   return 0;
19459 }
19460 _ACEOF
19461 rm -f conftest.$ac_objext
19462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19463   (eval $ac_compile) 2>conftest.er1
19464   ac_status=$?
19465   grep -v '^ *+' conftest.er1 >conftest.err
19466   rm -f conftest.er1
19467   cat conftest.err >&5
19468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19469   (exit $ac_status); } &&
19470          { ac_try='test -z "$ac_c_werror_flag"
19471                          || test ! -s conftest.err'
19472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19473   (eval $ac_try) 2>&5
19474   ac_status=$?
19475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19476   (exit $ac_status); }; } &&
19477          { ac_try='test -s conftest.$ac_objext'
19478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19479   (eval $ac_try) 2>&5
19480   ac_status=$?
19481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19482   (exit $ac_status); }; }; then
19483   ac_hi=-1 ac_mid=-1
19484   while :; do
19485     cat >conftest.$ac_ext <<_ACEOF
19486 /* confdefs.h.  */
19487 _ACEOF
19488 cat confdefs.h >>conftest.$ac_ext
19489 cat >>conftest.$ac_ext <<_ACEOF
19490 /* end confdefs.h.  */
19491 $ac_includes_default
19492 struct { char filler; long field; } pgac_struct;
19493 int
19494 main ()
19495 {
19496 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19497 test_array [0] = 0
19498
19499   ;
19500   return 0;
19501 }
19502 _ACEOF
19503 rm -f conftest.$ac_objext
19504 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19505   (eval $ac_compile) 2>conftest.er1
19506   ac_status=$?
19507   grep -v '^ *+' conftest.er1 >conftest.err
19508   rm -f conftest.er1
19509   cat conftest.err >&5
19510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19511   (exit $ac_status); } &&
19512          { ac_try='test -z "$ac_c_werror_flag"
19513                          || test ! -s conftest.err'
19514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19515   (eval $ac_try) 2>&5
19516   ac_status=$?
19517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19518   (exit $ac_status); }; } &&
19519          { ac_try='test -s conftest.$ac_objext'
19520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19521   (eval $ac_try) 2>&5
19522   ac_status=$?
19523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19524   (exit $ac_status); }; }; then
19525   ac_lo=$ac_mid; break
19526 else
19527   echo "$as_me: failed program was:" >&5
19528 sed 's/^/| /' conftest.$ac_ext >&5
19529
19530 ac_hi=`expr '(' $ac_mid ')' - 1`
19531                        if test $ac_mid -le $ac_hi; then
19532                          ac_lo= ac_hi=
19533                          break
19534                        fi
19535                        ac_mid=`expr 2 '*' $ac_mid`
19536 fi
19537 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19538   done
19539 else
19540   echo "$as_me: failed program was:" >&5
19541 sed 's/^/| /' conftest.$ac_ext >&5
19542
19543 ac_lo= ac_hi=
19544 fi
19545 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19546 fi
19547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19548 # Binary search between lo and hi bounds.
19549 while test "x$ac_lo" != "x$ac_hi"; do
19550   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19551   cat >conftest.$ac_ext <<_ACEOF
19552 /* confdefs.h.  */
19553 _ACEOF
19554 cat confdefs.h >>conftest.$ac_ext
19555 cat >>conftest.$ac_ext <<_ACEOF
19556 /* end confdefs.h.  */
19557 $ac_includes_default
19558 struct { char filler; long field; } pgac_struct;
19559 int
19560 main ()
19561 {
19562 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19563 test_array [0] = 0
19564
19565   ;
19566   return 0;
19567 }
19568 _ACEOF
19569 rm -f conftest.$ac_objext
19570 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19571   (eval $ac_compile) 2>conftest.er1
19572   ac_status=$?
19573   grep -v '^ *+' conftest.er1 >conftest.err
19574   rm -f conftest.er1
19575   cat conftest.err >&5
19576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19577   (exit $ac_status); } &&
19578          { ac_try='test -z "$ac_c_werror_flag"
19579                          || test ! -s conftest.err'
19580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19581   (eval $ac_try) 2>&5
19582   ac_status=$?
19583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19584   (exit $ac_status); }; } &&
19585          { ac_try='test -s conftest.$ac_objext'
19586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19587   (eval $ac_try) 2>&5
19588   ac_status=$?
19589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19590   (exit $ac_status); }; }; then
19591   ac_hi=$ac_mid
19592 else
19593   echo "$as_me: failed program was:" >&5
19594 sed 's/^/| /' conftest.$ac_ext >&5
19595
19596 ac_lo=`expr '(' $ac_mid ')' + 1`
19597 fi
19598 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19599 done
19600 case $ac_lo in
19601 ?*) pgac_cv_alignof_long=$ac_lo;;
19602 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19603 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19604    { (exit 1); exit 1; }; } ;;
19605 esac
19606 else
19607   if test "$cross_compiling" = yes; then
19608   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19609 See \`config.log' for more details." >&5
19610 echo "$as_me: error: cannot run test program while cross compiling
19611 See \`config.log' for more details." >&2;}
19612    { (exit 1); exit 1; }; }
19613 else
19614   cat >conftest.$ac_ext <<_ACEOF
19615 /* confdefs.h.  */
19616 _ACEOF
19617 cat confdefs.h >>conftest.$ac_ext
19618 cat >>conftest.$ac_ext <<_ACEOF
19619 /* end confdefs.h.  */
19620 $ac_includes_default
19621 struct { char filler; long field; } pgac_struct;
19622 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19623 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19624 #include <stdio.h>
19625 #include <stdlib.h>
19626 int
19627 main ()
19628 {
19629
19630   FILE *f = fopen ("conftest.val", "w");
19631   if (! f)
19632     exit (1);
19633   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19634     {
19635       long i = longval ();
19636       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19637         exit (1);
19638       fprintf (f, "%ld\n", i);
19639     }
19640   else
19641     {
19642       unsigned long i = ulongval ();
19643       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19644         exit (1);
19645       fprintf (f, "%lu\n", i);
19646     }
19647   exit (ferror (f) || fclose (f) != 0);
19648
19649   ;
19650   return 0;
19651 }
19652 _ACEOF
19653 rm -f conftest$ac_exeext
19654 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19655   (eval $ac_link) 2>&5
19656   ac_status=$?
19657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19658   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19660   (eval $ac_try) 2>&5
19661   ac_status=$?
19662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19663   (exit $ac_status); }; }; then
19664   pgac_cv_alignof_long=`cat conftest.val`
19665 else
19666   echo "$as_me: program exited with status $ac_status" >&5
19667 echo "$as_me: failed program was:" >&5
19668 sed 's/^/| /' conftest.$ac_ext >&5
19669
19670 ( exit $ac_status )
19671 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19672 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19673    { (exit 1); exit 1; }; }
19674 fi
19675 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19676 fi
19677 fi
19678 rm -f conftest.val
19679 else
19680   pgac_cv_alignof_long=0
19681 fi
19682 fi
19683 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
19684 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
19685 cat >>confdefs.h <<_ACEOF
19686 #define ALIGNOF_LONG $pgac_cv_alignof_long
19687 _ACEOF
19688
19689
19690 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
19691   echo "$as_me:$LINENO: checking for long long int" >&5
19692 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
19693 if test "${ac_cv_type_long_long_int+set}" = set; then
19694   echo $ECHO_N "(cached) $ECHO_C" >&6
19695 else
19696   cat >conftest.$ac_ext <<_ACEOF
19697 /* confdefs.h.  */
19698 _ACEOF
19699 cat confdefs.h >>conftest.$ac_ext
19700 cat >>conftest.$ac_ext <<_ACEOF
19701 /* end confdefs.h.  */
19702 $ac_includes_default
19703 int
19704 main ()
19705 {
19706 if ((long long int *) 0)
19707   return 0;
19708 if (sizeof (long long int))
19709   return 0;
19710   ;
19711   return 0;
19712 }
19713 _ACEOF
19714 rm -f conftest.$ac_objext
19715 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19716   (eval $ac_compile) 2>conftest.er1
19717   ac_status=$?
19718   grep -v '^ *+' conftest.er1 >conftest.err
19719   rm -f conftest.er1
19720   cat conftest.err >&5
19721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19722   (exit $ac_status); } &&
19723          { ac_try='test -z "$ac_c_werror_flag"
19724                          || test ! -s conftest.err'
19725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19726   (eval $ac_try) 2>&5
19727   ac_status=$?
19728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19729   (exit $ac_status); }; } &&
19730          { ac_try='test -s conftest.$ac_objext'
19731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19732   (eval $ac_try) 2>&5
19733   ac_status=$?
19734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19735   (exit $ac_status); }; }; then
19736   ac_cv_type_long_long_int=yes
19737 else
19738   echo "$as_me: failed program was:" >&5
19739 sed 's/^/| /' conftest.$ac_ext >&5
19740
19741 ac_cv_type_long_long_int=no
19742 fi
19743 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19744 fi
19745 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
19746 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
19747
19748 echo "$as_me:$LINENO: checking alignment of long long int" >&5
19749 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
19750 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
19751   echo $ECHO_N "(cached) $ECHO_C" >&6
19752 else
19753   if test "$ac_cv_type_long_long_int" = yes; then
19754   if test "$cross_compiling" = yes; then
19755   # Depending upon the size, compute the lo and hi bounds.
19756 cat >conftest.$ac_ext <<_ACEOF
19757 /* confdefs.h.  */
19758 _ACEOF
19759 cat confdefs.h >>conftest.$ac_ext
19760 cat >>conftest.$ac_ext <<_ACEOF
19761 /* end confdefs.h.  */
19762 $ac_includes_default
19763 struct { char filler; long long int field; } pgac_struct;
19764 int
19765 main ()
19766 {
19767 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19768 test_array [0] = 0
19769
19770   ;
19771   return 0;
19772 }
19773 _ACEOF
19774 rm -f conftest.$ac_objext
19775 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19776   (eval $ac_compile) 2>conftest.er1
19777   ac_status=$?
19778   grep -v '^ *+' conftest.er1 >conftest.err
19779   rm -f conftest.er1
19780   cat conftest.err >&5
19781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19782   (exit $ac_status); } &&
19783          { ac_try='test -z "$ac_c_werror_flag"
19784                          || test ! -s conftest.err'
19785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19786   (eval $ac_try) 2>&5
19787   ac_status=$?
19788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19789   (exit $ac_status); }; } &&
19790          { ac_try='test -s conftest.$ac_objext'
19791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19792   (eval $ac_try) 2>&5
19793   ac_status=$?
19794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19795   (exit $ac_status); }; }; then
19796   ac_lo=0 ac_mid=0
19797   while :; do
19798     cat >conftest.$ac_ext <<_ACEOF
19799 /* confdefs.h.  */
19800 _ACEOF
19801 cat confdefs.h >>conftest.$ac_ext
19802 cat >>conftest.$ac_ext <<_ACEOF
19803 /* end confdefs.h.  */
19804 $ac_includes_default
19805 struct { char filler; long long int field; } pgac_struct;
19806 int
19807 main ()
19808 {
19809 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19810 test_array [0] = 0
19811
19812   ;
19813   return 0;
19814 }
19815 _ACEOF
19816 rm -f conftest.$ac_objext
19817 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19818   (eval $ac_compile) 2>conftest.er1
19819   ac_status=$?
19820   grep -v '^ *+' conftest.er1 >conftest.err
19821   rm -f conftest.er1
19822   cat conftest.err >&5
19823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19824   (exit $ac_status); } &&
19825          { ac_try='test -z "$ac_c_werror_flag"
19826                          || test ! -s conftest.err'
19827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19828   (eval $ac_try) 2>&5
19829   ac_status=$?
19830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19831   (exit $ac_status); }; } &&
19832          { ac_try='test -s conftest.$ac_objext'
19833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19834   (eval $ac_try) 2>&5
19835   ac_status=$?
19836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19837   (exit $ac_status); }; }; then
19838   ac_hi=$ac_mid; break
19839 else
19840   echo "$as_me: failed program was:" >&5
19841 sed 's/^/| /' conftest.$ac_ext >&5
19842
19843 ac_lo=`expr $ac_mid + 1`
19844                     if test $ac_lo -le $ac_mid; then
19845                       ac_lo= ac_hi=
19846                       break
19847                     fi
19848                     ac_mid=`expr 2 '*' $ac_mid + 1`
19849 fi
19850 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19851   done
19852 else
19853   echo "$as_me: failed program was:" >&5
19854 sed 's/^/| /' conftest.$ac_ext >&5
19855
19856 cat >conftest.$ac_ext <<_ACEOF
19857 /* confdefs.h.  */
19858 _ACEOF
19859 cat confdefs.h >>conftest.$ac_ext
19860 cat >>conftest.$ac_ext <<_ACEOF
19861 /* end confdefs.h.  */
19862 $ac_includes_default
19863 struct { char filler; long long int field; } pgac_struct;
19864 int
19865 main ()
19866 {
19867 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19868 test_array [0] = 0
19869
19870   ;
19871   return 0;
19872 }
19873 _ACEOF
19874 rm -f conftest.$ac_objext
19875 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19876   (eval $ac_compile) 2>conftest.er1
19877   ac_status=$?
19878   grep -v '^ *+' conftest.er1 >conftest.err
19879   rm -f conftest.er1
19880   cat conftest.err >&5
19881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19882   (exit $ac_status); } &&
19883          { ac_try='test -z "$ac_c_werror_flag"
19884                          || test ! -s conftest.err'
19885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19886   (eval $ac_try) 2>&5
19887   ac_status=$?
19888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19889   (exit $ac_status); }; } &&
19890          { ac_try='test -s conftest.$ac_objext'
19891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19892   (eval $ac_try) 2>&5
19893   ac_status=$?
19894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19895   (exit $ac_status); }; }; then
19896   ac_hi=-1 ac_mid=-1
19897   while :; do
19898     cat >conftest.$ac_ext <<_ACEOF
19899 /* confdefs.h.  */
19900 _ACEOF
19901 cat confdefs.h >>conftest.$ac_ext
19902 cat >>conftest.$ac_ext <<_ACEOF
19903 /* end confdefs.h.  */
19904 $ac_includes_default
19905 struct { char filler; long long int field; } pgac_struct;
19906 int
19907 main ()
19908 {
19909 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19910 test_array [0] = 0
19911
19912   ;
19913   return 0;
19914 }
19915 _ACEOF
19916 rm -f conftest.$ac_objext
19917 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19918   (eval $ac_compile) 2>conftest.er1
19919   ac_status=$?
19920   grep -v '^ *+' conftest.er1 >conftest.err
19921   rm -f conftest.er1
19922   cat conftest.err >&5
19923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19924   (exit $ac_status); } &&
19925          { ac_try='test -z "$ac_c_werror_flag"
19926                          || test ! -s conftest.err'
19927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19928   (eval $ac_try) 2>&5
19929   ac_status=$?
19930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19931   (exit $ac_status); }; } &&
19932          { ac_try='test -s conftest.$ac_objext'
19933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19934   (eval $ac_try) 2>&5
19935   ac_status=$?
19936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19937   (exit $ac_status); }; }; then
19938   ac_lo=$ac_mid; break
19939 else
19940   echo "$as_me: failed program was:" >&5
19941 sed 's/^/| /' conftest.$ac_ext >&5
19942
19943 ac_hi=`expr '(' $ac_mid ')' - 1`
19944                        if test $ac_mid -le $ac_hi; then
19945                          ac_lo= ac_hi=
19946                          break
19947                        fi
19948                        ac_mid=`expr 2 '*' $ac_mid`
19949 fi
19950 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19951   done
19952 else
19953   echo "$as_me: failed program was:" >&5
19954 sed 's/^/| /' conftest.$ac_ext >&5
19955
19956 ac_lo= ac_hi=
19957 fi
19958 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19959 fi
19960 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19961 # Binary search between lo and hi bounds.
19962 while test "x$ac_lo" != "x$ac_hi"; do
19963   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19964   cat >conftest.$ac_ext <<_ACEOF
19965 /* confdefs.h.  */
19966 _ACEOF
19967 cat confdefs.h >>conftest.$ac_ext
19968 cat >>conftest.$ac_ext <<_ACEOF
19969 /* end confdefs.h.  */
19970 $ac_includes_default
19971 struct { char filler; long long int field; } pgac_struct;
19972 int
19973 main ()
19974 {
19975 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19976 test_array [0] = 0
19977
19978   ;
19979   return 0;
19980 }
19981 _ACEOF
19982 rm -f conftest.$ac_objext
19983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19984   (eval $ac_compile) 2>conftest.er1
19985   ac_status=$?
19986   grep -v '^ *+' conftest.er1 >conftest.err
19987   rm -f conftest.er1
19988   cat conftest.err >&5
19989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19990   (exit $ac_status); } &&
19991          { ac_try='test -z "$ac_c_werror_flag"
19992                          || test ! -s conftest.err'
19993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19994   (eval $ac_try) 2>&5
19995   ac_status=$?
19996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19997   (exit $ac_status); }; } &&
19998          { ac_try='test -s conftest.$ac_objext'
19999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20000   (eval $ac_try) 2>&5
20001   ac_status=$?
20002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20003   (exit $ac_status); }; }; then
20004   ac_hi=$ac_mid
20005 else
20006   echo "$as_me: failed program was:" >&5
20007 sed 's/^/| /' conftest.$ac_ext >&5
20008
20009 ac_lo=`expr '(' $ac_mid ')' + 1`
20010 fi
20011 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20012 done
20013 case $ac_lo in
20014 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20015 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20016 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20017    { (exit 1); exit 1; }; } ;;
20018 esac
20019 else
20020   if test "$cross_compiling" = yes; then
20021   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20022 See \`config.log' for more details." >&5
20023 echo "$as_me: error: cannot run test program while cross compiling
20024 See \`config.log' for more details." >&2;}
20025    { (exit 1); exit 1; }; }
20026 else
20027   cat >conftest.$ac_ext <<_ACEOF
20028 /* confdefs.h.  */
20029 _ACEOF
20030 cat confdefs.h >>conftest.$ac_ext
20031 cat >>conftest.$ac_ext <<_ACEOF
20032 /* end confdefs.h.  */
20033 $ac_includes_default
20034 struct { char filler; long long int field; } pgac_struct;
20035 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20036 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20037 #include <stdio.h>
20038 #include <stdlib.h>
20039 int
20040 main ()
20041 {
20042
20043   FILE *f = fopen ("conftest.val", "w");
20044   if (! f)
20045     exit (1);
20046   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20047     {
20048       long i = longval ();
20049       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20050         exit (1);
20051       fprintf (f, "%ld\n", i);
20052     }
20053   else
20054     {
20055       unsigned long i = ulongval ();
20056       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20057         exit (1);
20058       fprintf (f, "%lu\n", i);
20059     }
20060   exit (ferror (f) || fclose (f) != 0);
20061
20062   ;
20063   return 0;
20064 }
20065 _ACEOF
20066 rm -f conftest$ac_exeext
20067 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20068   (eval $ac_link) 2>&5
20069   ac_status=$?
20070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20071   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20073   (eval $ac_try) 2>&5
20074   ac_status=$?
20075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20076   (exit $ac_status); }; }; then
20077   pgac_cv_alignof_long_long_int=`cat conftest.val`
20078 else
20079   echo "$as_me: program exited with status $ac_status" >&5
20080 echo "$as_me: failed program was:" >&5
20081 sed 's/^/| /' conftest.$ac_ext >&5
20082
20083 ( exit $ac_status )
20084 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20085 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20086    { (exit 1); exit 1; }; }
20087 fi
20088 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20089 fi
20090 fi
20091 rm -f conftest.val
20092 else
20093   pgac_cv_alignof_long_long_int=0
20094 fi
20095 fi
20096 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20097 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20098 cat >>confdefs.h <<_ACEOF
20099 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20100 _ACEOF
20101
20102
20103 fi
20104 echo "$as_me:$LINENO: checking for double" >&5
20105 echo $ECHO_N "checking for double... $ECHO_C" >&6
20106 if test "${ac_cv_type_double+set}" = set; then
20107   echo $ECHO_N "(cached) $ECHO_C" >&6
20108 else
20109   cat >conftest.$ac_ext <<_ACEOF
20110 /* confdefs.h.  */
20111 _ACEOF
20112 cat confdefs.h >>conftest.$ac_ext
20113 cat >>conftest.$ac_ext <<_ACEOF
20114 /* end confdefs.h.  */
20115 $ac_includes_default
20116 int
20117 main ()
20118 {
20119 if ((double *) 0)
20120   return 0;
20121 if (sizeof (double))
20122   return 0;
20123   ;
20124   return 0;
20125 }
20126 _ACEOF
20127 rm -f conftest.$ac_objext
20128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20129   (eval $ac_compile) 2>conftest.er1
20130   ac_status=$?
20131   grep -v '^ *+' conftest.er1 >conftest.err
20132   rm -f conftest.er1
20133   cat conftest.err >&5
20134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20135   (exit $ac_status); } &&
20136          { ac_try='test -z "$ac_c_werror_flag"
20137                          || test ! -s conftest.err'
20138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20139   (eval $ac_try) 2>&5
20140   ac_status=$?
20141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20142   (exit $ac_status); }; } &&
20143          { ac_try='test -s conftest.$ac_objext'
20144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20145   (eval $ac_try) 2>&5
20146   ac_status=$?
20147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20148   (exit $ac_status); }; }; then
20149   ac_cv_type_double=yes
20150 else
20151   echo "$as_me: failed program was:" >&5
20152 sed 's/^/| /' conftest.$ac_ext >&5
20153
20154 ac_cv_type_double=no
20155 fi
20156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20157 fi
20158 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20159 echo "${ECHO_T}$ac_cv_type_double" >&6
20160
20161 echo "$as_me:$LINENO: checking alignment of double" >&5
20162 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20163 if test "${pgac_cv_alignof_double+set}" = set; then
20164   echo $ECHO_N "(cached) $ECHO_C" >&6
20165 else
20166   if test "$ac_cv_type_double" = yes; then
20167   if test "$cross_compiling" = yes; then
20168   # Depending upon the size, compute the lo and hi bounds.
20169 cat >conftest.$ac_ext <<_ACEOF
20170 /* confdefs.h.  */
20171 _ACEOF
20172 cat confdefs.h >>conftest.$ac_ext
20173 cat >>conftest.$ac_ext <<_ACEOF
20174 /* end confdefs.h.  */
20175 $ac_includes_default
20176 struct { char filler; double field; } pgac_struct;
20177 int
20178 main ()
20179 {
20180 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20181 test_array [0] = 0
20182
20183   ;
20184   return 0;
20185 }
20186 _ACEOF
20187 rm -f conftest.$ac_objext
20188 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20189   (eval $ac_compile) 2>conftest.er1
20190   ac_status=$?
20191   grep -v '^ *+' conftest.er1 >conftest.err
20192   rm -f conftest.er1
20193   cat conftest.err >&5
20194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20195   (exit $ac_status); } &&
20196          { ac_try='test -z "$ac_c_werror_flag"
20197                          || test ! -s conftest.err'
20198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20199   (eval $ac_try) 2>&5
20200   ac_status=$?
20201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20202   (exit $ac_status); }; } &&
20203          { ac_try='test -s conftest.$ac_objext'
20204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20205   (eval $ac_try) 2>&5
20206   ac_status=$?
20207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20208   (exit $ac_status); }; }; then
20209   ac_lo=0 ac_mid=0
20210   while :; do
20211     cat >conftest.$ac_ext <<_ACEOF
20212 /* confdefs.h.  */
20213 _ACEOF
20214 cat confdefs.h >>conftest.$ac_ext
20215 cat >>conftest.$ac_ext <<_ACEOF
20216 /* end confdefs.h.  */
20217 $ac_includes_default
20218 struct { char filler; double field; } pgac_struct;
20219 int
20220 main ()
20221 {
20222 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20223 test_array [0] = 0
20224
20225   ;
20226   return 0;
20227 }
20228 _ACEOF
20229 rm -f conftest.$ac_objext
20230 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20231   (eval $ac_compile) 2>conftest.er1
20232   ac_status=$?
20233   grep -v '^ *+' conftest.er1 >conftest.err
20234   rm -f conftest.er1
20235   cat conftest.err >&5
20236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20237   (exit $ac_status); } &&
20238          { ac_try='test -z "$ac_c_werror_flag"
20239                          || test ! -s conftest.err'
20240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20241   (eval $ac_try) 2>&5
20242   ac_status=$?
20243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20244   (exit $ac_status); }; } &&
20245          { ac_try='test -s conftest.$ac_objext'
20246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20247   (eval $ac_try) 2>&5
20248   ac_status=$?
20249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20250   (exit $ac_status); }; }; then
20251   ac_hi=$ac_mid; break
20252 else
20253   echo "$as_me: failed program was:" >&5
20254 sed 's/^/| /' conftest.$ac_ext >&5
20255
20256 ac_lo=`expr $ac_mid + 1`
20257                     if test $ac_lo -le $ac_mid; then
20258                       ac_lo= ac_hi=
20259                       break
20260                     fi
20261                     ac_mid=`expr 2 '*' $ac_mid + 1`
20262 fi
20263 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20264   done
20265 else
20266   echo "$as_me: failed program was:" >&5
20267 sed 's/^/| /' conftest.$ac_ext >&5
20268
20269 cat >conftest.$ac_ext <<_ACEOF
20270 /* confdefs.h.  */
20271 _ACEOF
20272 cat confdefs.h >>conftest.$ac_ext
20273 cat >>conftest.$ac_ext <<_ACEOF
20274 /* end confdefs.h.  */
20275 $ac_includes_default
20276 struct { char filler; double field; } pgac_struct;
20277 int
20278 main ()
20279 {
20280 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20281 test_array [0] = 0
20282
20283   ;
20284   return 0;
20285 }
20286 _ACEOF
20287 rm -f conftest.$ac_objext
20288 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20289   (eval $ac_compile) 2>conftest.er1
20290   ac_status=$?
20291   grep -v '^ *+' conftest.er1 >conftest.err
20292   rm -f conftest.er1
20293   cat conftest.err >&5
20294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20295   (exit $ac_status); } &&
20296          { ac_try='test -z "$ac_c_werror_flag"
20297                          || test ! -s conftest.err'
20298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20299   (eval $ac_try) 2>&5
20300   ac_status=$?
20301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20302   (exit $ac_status); }; } &&
20303          { ac_try='test -s conftest.$ac_objext'
20304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20305   (eval $ac_try) 2>&5
20306   ac_status=$?
20307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20308   (exit $ac_status); }; }; then
20309   ac_hi=-1 ac_mid=-1
20310   while :; do
20311     cat >conftest.$ac_ext <<_ACEOF
20312 /* confdefs.h.  */
20313 _ACEOF
20314 cat confdefs.h >>conftest.$ac_ext
20315 cat >>conftest.$ac_ext <<_ACEOF
20316 /* end confdefs.h.  */
20317 $ac_includes_default
20318 struct { char filler; double field; } pgac_struct;
20319 int
20320 main ()
20321 {
20322 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20323 test_array [0] = 0
20324
20325   ;
20326   return 0;
20327 }
20328 _ACEOF
20329 rm -f conftest.$ac_objext
20330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20331   (eval $ac_compile) 2>conftest.er1
20332   ac_status=$?
20333   grep -v '^ *+' conftest.er1 >conftest.err
20334   rm -f conftest.er1
20335   cat conftest.err >&5
20336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20337   (exit $ac_status); } &&
20338          { ac_try='test -z "$ac_c_werror_flag"
20339                          || test ! -s conftest.err'
20340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20341   (eval $ac_try) 2>&5
20342   ac_status=$?
20343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20344   (exit $ac_status); }; } &&
20345          { ac_try='test -s conftest.$ac_objext'
20346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20347   (eval $ac_try) 2>&5
20348   ac_status=$?
20349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20350   (exit $ac_status); }; }; then
20351   ac_lo=$ac_mid; break
20352 else
20353   echo "$as_me: failed program was:" >&5
20354 sed 's/^/| /' conftest.$ac_ext >&5
20355
20356 ac_hi=`expr '(' $ac_mid ')' - 1`
20357                        if test $ac_mid -le $ac_hi; then
20358                          ac_lo= ac_hi=
20359                          break
20360                        fi
20361                        ac_mid=`expr 2 '*' $ac_mid`
20362 fi
20363 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20364   done
20365 else
20366   echo "$as_me: failed program was:" >&5
20367 sed 's/^/| /' conftest.$ac_ext >&5
20368
20369 ac_lo= ac_hi=
20370 fi
20371 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20372 fi
20373 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20374 # Binary search between lo and hi bounds.
20375 while test "x$ac_lo" != "x$ac_hi"; do
20376   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20377   cat >conftest.$ac_ext <<_ACEOF
20378 /* confdefs.h.  */
20379 _ACEOF
20380 cat confdefs.h >>conftest.$ac_ext
20381 cat >>conftest.$ac_ext <<_ACEOF
20382 /* end confdefs.h.  */
20383 $ac_includes_default
20384 struct { char filler; double field; } pgac_struct;
20385 int
20386 main ()
20387 {
20388 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20389 test_array [0] = 0
20390
20391   ;
20392   return 0;
20393 }
20394 _ACEOF
20395 rm -f conftest.$ac_objext
20396 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20397   (eval $ac_compile) 2>conftest.er1
20398   ac_status=$?
20399   grep -v '^ *+' conftest.er1 >conftest.err
20400   rm -f conftest.er1
20401   cat conftest.err >&5
20402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20403   (exit $ac_status); } &&
20404          { ac_try='test -z "$ac_c_werror_flag"
20405                          || test ! -s conftest.err'
20406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20407   (eval $ac_try) 2>&5
20408   ac_status=$?
20409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20410   (exit $ac_status); }; } &&
20411          { ac_try='test -s conftest.$ac_objext'
20412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20413   (eval $ac_try) 2>&5
20414   ac_status=$?
20415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20416   (exit $ac_status); }; }; then
20417   ac_hi=$ac_mid
20418 else
20419   echo "$as_me: failed program was:" >&5
20420 sed 's/^/| /' conftest.$ac_ext >&5
20421
20422 ac_lo=`expr '(' $ac_mid ')' + 1`
20423 fi
20424 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20425 done
20426 case $ac_lo in
20427 ?*) pgac_cv_alignof_double=$ac_lo;;
20428 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20429 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20430    { (exit 1); exit 1; }; } ;;
20431 esac
20432 else
20433   if test "$cross_compiling" = yes; then
20434   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20435 See \`config.log' for more details." >&5
20436 echo "$as_me: error: cannot run test program while cross compiling
20437 See \`config.log' for more details." >&2;}
20438    { (exit 1); exit 1; }; }
20439 else
20440   cat >conftest.$ac_ext <<_ACEOF
20441 /* confdefs.h.  */
20442 _ACEOF
20443 cat confdefs.h >>conftest.$ac_ext
20444 cat >>conftest.$ac_ext <<_ACEOF
20445 /* end confdefs.h.  */
20446 $ac_includes_default
20447 struct { char filler; double field; } pgac_struct;
20448 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20449 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20450 #include <stdio.h>
20451 #include <stdlib.h>
20452 int
20453 main ()
20454 {
20455
20456   FILE *f = fopen ("conftest.val", "w");
20457   if (! f)
20458     exit (1);
20459   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20460     {
20461       long i = longval ();
20462       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20463         exit (1);
20464       fprintf (f, "%ld\n", i);
20465     }
20466   else
20467     {
20468       unsigned long i = ulongval ();
20469       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20470         exit (1);
20471       fprintf (f, "%lu\n", i);
20472     }
20473   exit (ferror (f) || fclose (f) != 0);
20474
20475   ;
20476   return 0;
20477 }
20478 _ACEOF
20479 rm -f conftest$ac_exeext
20480 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20481   (eval $ac_link) 2>&5
20482   ac_status=$?
20483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20484   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20486   (eval $ac_try) 2>&5
20487   ac_status=$?
20488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20489   (exit $ac_status); }; }; then
20490   pgac_cv_alignof_double=`cat conftest.val`
20491 else
20492   echo "$as_me: program exited with status $ac_status" >&5
20493 echo "$as_me: failed program was:" >&5
20494 sed 's/^/| /' conftest.$ac_ext >&5
20495
20496 ( exit $ac_status )
20497 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20498 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20499    { (exit 1); exit 1; }; }
20500 fi
20501 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20502 fi
20503 fi
20504 rm -f conftest.val
20505 else
20506   pgac_cv_alignof_double=0
20507 fi
20508 fi
20509 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20510 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20511 cat >>confdefs.h <<_ACEOF
20512 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20513 _ACEOF
20514
20515
20516
20517 # Compute maximum alignment of any basic type.
20518 # We assume long's alignment is at least as strong as char, short, or int;
20519 # but we must check long long (if it exists) and double.
20520
20521 MAX_ALIGNOF=$pgac_cv_alignof_long
20522 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20523   MAX_ALIGNOF=$pgac_cv_alignof_double
20524 fi
20525 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20526   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20527 fi
20528
20529 cat >>confdefs.h <<_ACEOF
20530 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20531 _ACEOF
20532
20533
20534
20535 # Some platforms predefine the types int8, int16, etc.  Only check
20536 # a (hopefully) representative subset.
20537 echo "$as_me:$LINENO: checking for int8" >&5
20538 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20539 if test "${ac_cv_type_int8+set}" = set; then
20540   echo $ECHO_N "(cached) $ECHO_C" >&6
20541 else
20542   cat >conftest.$ac_ext <<_ACEOF
20543 /* confdefs.h.  */
20544 _ACEOF
20545 cat confdefs.h >>conftest.$ac_ext
20546 cat >>conftest.$ac_ext <<_ACEOF
20547 /* end confdefs.h.  */
20548 #include <stdio.h>
20549 #ifdef HAVE_SUPPORTDEFS_H
20550 #include <SupportDefs.h>
20551 #endif
20552
20553 int
20554 main ()
20555 {
20556 if ((int8 *) 0)
20557   return 0;
20558 if (sizeof (int8))
20559   return 0;
20560   ;
20561   return 0;
20562 }
20563 _ACEOF
20564 rm -f conftest.$ac_objext
20565 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20566   (eval $ac_compile) 2>conftest.er1
20567   ac_status=$?
20568   grep -v '^ *+' conftest.er1 >conftest.err
20569   rm -f conftest.er1
20570   cat conftest.err >&5
20571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20572   (exit $ac_status); } &&
20573          { ac_try='test -z "$ac_c_werror_flag"
20574                          || test ! -s conftest.err'
20575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20576   (eval $ac_try) 2>&5
20577   ac_status=$?
20578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20579   (exit $ac_status); }; } &&
20580          { ac_try='test -s conftest.$ac_objext'
20581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20582   (eval $ac_try) 2>&5
20583   ac_status=$?
20584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20585   (exit $ac_status); }; }; then
20586   ac_cv_type_int8=yes
20587 else
20588   echo "$as_me: failed program was:" >&5
20589 sed 's/^/| /' conftest.$ac_ext >&5
20590
20591 ac_cv_type_int8=no
20592 fi
20593 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20594 fi
20595 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20596 echo "${ECHO_T}$ac_cv_type_int8" >&6
20597 if test $ac_cv_type_int8 = yes; then
20598
20599 cat >>confdefs.h <<_ACEOF
20600 #define HAVE_INT8 1
20601 _ACEOF
20602
20603
20604 fi
20605 echo "$as_me:$LINENO: checking for uint8" >&5
20606 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20607 if test "${ac_cv_type_uint8+set}" = set; then
20608   echo $ECHO_N "(cached) $ECHO_C" >&6
20609 else
20610   cat >conftest.$ac_ext <<_ACEOF
20611 /* confdefs.h.  */
20612 _ACEOF
20613 cat confdefs.h >>conftest.$ac_ext
20614 cat >>conftest.$ac_ext <<_ACEOF
20615 /* end confdefs.h.  */
20616 #include <stdio.h>
20617 #ifdef HAVE_SUPPORTDEFS_H
20618 #include <SupportDefs.h>
20619 #endif
20620
20621 int
20622 main ()
20623 {
20624 if ((uint8 *) 0)
20625   return 0;
20626 if (sizeof (uint8))
20627   return 0;
20628   ;
20629   return 0;
20630 }
20631 _ACEOF
20632 rm -f conftest.$ac_objext
20633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20634   (eval $ac_compile) 2>conftest.er1
20635   ac_status=$?
20636   grep -v '^ *+' conftest.er1 >conftest.err
20637   rm -f conftest.er1
20638   cat conftest.err >&5
20639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20640   (exit $ac_status); } &&
20641          { ac_try='test -z "$ac_c_werror_flag"
20642                          || test ! -s conftest.err'
20643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20644   (eval $ac_try) 2>&5
20645   ac_status=$?
20646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20647   (exit $ac_status); }; } &&
20648          { ac_try='test -s conftest.$ac_objext'
20649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20650   (eval $ac_try) 2>&5
20651   ac_status=$?
20652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20653   (exit $ac_status); }; }; then
20654   ac_cv_type_uint8=yes
20655 else
20656   echo "$as_me: failed program was:" >&5
20657 sed 's/^/| /' conftest.$ac_ext >&5
20658
20659 ac_cv_type_uint8=no
20660 fi
20661 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20662 fi
20663 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20664 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20665 if test $ac_cv_type_uint8 = yes; then
20666
20667 cat >>confdefs.h <<_ACEOF
20668 #define HAVE_UINT8 1
20669 _ACEOF
20670
20671
20672 fi
20673 echo "$as_me:$LINENO: checking for int64" >&5
20674 echo $ECHO_N "checking for int64... $ECHO_C" >&6
20675 if test "${ac_cv_type_int64+set}" = set; then
20676   echo $ECHO_N "(cached) $ECHO_C" >&6
20677 else
20678   cat >conftest.$ac_ext <<_ACEOF
20679 /* confdefs.h.  */
20680 _ACEOF
20681 cat confdefs.h >>conftest.$ac_ext
20682 cat >>conftest.$ac_ext <<_ACEOF
20683 /* end confdefs.h.  */
20684 #include <stdio.h>
20685 #ifdef HAVE_SUPPORTDEFS_H
20686 #include <SupportDefs.h>
20687 #endif
20688
20689 int
20690 main ()
20691 {
20692 if ((int64 *) 0)
20693   return 0;
20694 if (sizeof (int64))
20695   return 0;
20696   ;
20697   return 0;
20698 }
20699 _ACEOF
20700 rm -f conftest.$ac_objext
20701 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20702   (eval $ac_compile) 2>conftest.er1
20703   ac_status=$?
20704   grep -v '^ *+' conftest.er1 >conftest.err
20705   rm -f conftest.er1
20706   cat conftest.err >&5
20707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20708   (exit $ac_status); } &&
20709          { ac_try='test -z "$ac_c_werror_flag"
20710                          || test ! -s conftest.err'
20711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20712   (eval $ac_try) 2>&5
20713   ac_status=$?
20714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20715   (exit $ac_status); }; } &&
20716          { ac_try='test -s conftest.$ac_objext'
20717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20718   (eval $ac_try) 2>&5
20719   ac_status=$?
20720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20721   (exit $ac_status); }; }; then
20722   ac_cv_type_int64=yes
20723 else
20724   echo "$as_me: failed program was:" >&5
20725 sed 's/^/| /' conftest.$ac_ext >&5
20726
20727 ac_cv_type_int64=no
20728 fi
20729 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20730 fi
20731 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
20732 echo "${ECHO_T}$ac_cv_type_int64" >&6
20733 if test $ac_cv_type_int64 = yes; then
20734
20735 cat >>confdefs.h <<_ACEOF
20736 #define HAVE_INT64 1
20737 _ACEOF
20738
20739
20740 fi
20741 echo "$as_me:$LINENO: checking for uint64" >&5
20742 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
20743 if test "${ac_cv_type_uint64+set}" = set; then
20744   echo $ECHO_N "(cached) $ECHO_C" >&6
20745 else
20746   cat >conftest.$ac_ext <<_ACEOF
20747 /* confdefs.h.  */
20748 _ACEOF
20749 cat confdefs.h >>conftest.$ac_ext
20750 cat >>conftest.$ac_ext <<_ACEOF
20751 /* end confdefs.h.  */
20752 #include <stdio.h>
20753 #ifdef HAVE_SUPPORTDEFS_H
20754 #include <SupportDefs.h>
20755 #endif
20756
20757 int
20758 main ()
20759 {
20760 if ((uint64 *) 0)
20761   return 0;
20762 if (sizeof (uint64))
20763   return 0;
20764   ;
20765   return 0;
20766 }
20767 _ACEOF
20768 rm -f conftest.$ac_objext
20769 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20770   (eval $ac_compile) 2>conftest.er1
20771   ac_status=$?
20772   grep -v '^ *+' conftest.er1 >conftest.err
20773   rm -f conftest.er1
20774   cat conftest.err >&5
20775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20776   (exit $ac_status); } &&
20777          { ac_try='test -z "$ac_c_werror_flag"
20778                          || test ! -s conftest.err'
20779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20780   (eval $ac_try) 2>&5
20781   ac_status=$?
20782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20783   (exit $ac_status); }; } &&
20784          { ac_try='test -s conftest.$ac_objext'
20785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20786   (eval $ac_try) 2>&5
20787   ac_status=$?
20788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20789   (exit $ac_status); }; }; then
20790   ac_cv_type_uint64=yes
20791 else
20792   echo "$as_me: failed program was:" >&5
20793 sed 's/^/| /' conftest.$ac_ext >&5
20794
20795 ac_cv_type_uint64=no
20796 fi
20797 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20798 fi
20799 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
20800 echo "${ECHO_T}$ac_cv_type_uint64" >&6
20801 if test $ac_cv_type_uint64 = yes; then
20802
20803 cat >>confdefs.h <<_ACEOF
20804 #define HAVE_UINT64 1
20805 _ACEOF
20806
20807
20808 fi
20809
20810
20811 # We also check for sig_atomic_t, which *should* be defined per ANSI
20812 # C, but is missing on some old platforms.
20813 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
20814 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
20815 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
20816   echo $ECHO_N "(cached) $ECHO_C" >&6
20817 else
20818   cat >conftest.$ac_ext <<_ACEOF
20819 /* confdefs.h.  */
20820 _ACEOF
20821 cat confdefs.h >>conftest.$ac_ext
20822 cat >>conftest.$ac_ext <<_ACEOF
20823 /* end confdefs.h.  */
20824 #include <signal.h>
20825
20826 int
20827 main ()
20828 {
20829 if ((sig_atomic_t *) 0)
20830   return 0;
20831 if (sizeof (sig_atomic_t))
20832   return 0;
20833   ;
20834   return 0;
20835 }
20836 _ACEOF
20837 rm -f conftest.$ac_objext
20838 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20839   (eval $ac_compile) 2>conftest.er1
20840   ac_status=$?
20841   grep -v '^ *+' conftest.er1 >conftest.err
20842   rm -f conftest.er1
20843   cat conftest.err >&5
20844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20845   (exit $ac_status); } &&
20846          { ac_try='test -z "$ac_c_werror_flag"
20847                          || test ! -s conftest.err'
20848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20849   (eval $ac_try) 2>&5
20850   ac_status=$?
20851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20852   (exit $ac_status); }; } &&
20853          { ac_try='test -s conftest.$ac_objext'
20854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20855   (eval $ac_try) 2>&5
20856   ac_status=$?
20857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20858   (exit $ac_status); }; }; then
20859   ac_cv_type_sig_atomic_t=yes
20860 else
20861   echo "$as_me: failed program was:" >&5
20862 sed 's/^/| /' conftest.$ac_ext >&5
20863
20864 ac_cv_type_sig_atomic_t=no
20865 fi
20866 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20867 fi
20868 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
20869 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
20870 if test $ac_cv_type_sig_atomic_t = yes; then
20871
20872 cat >>confdefs.h <<_ACEOF
20873 #define HAVE_SIG_ATOMIC_T 1
20874 _ACEOF
20875
20876
20877 fi
20878
20879
20880
20881 if test x"$template" != x"win32"
20882 then
20883 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
20884 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
20885 if test "${pgac_cv_func_posix_signals+set}" = set; then
20886   echo $ECHO_N "(cached) $ECHO_C" >&6
20887 else
20888   cat >conftest.$ac_ext <<_ACEOF
20889 /* confdefs.h.  */
20890 _ACEOF
20891 cat confdefs.h >>conftest.$ac_ext
20892 cat >>conftest.$ac_ext <<_ACEOF
20893 /* end confdefs.h.  */
20894 #include <signal.h>
20895
20896 int
20897 main ()
20898 {
20899 struct sigaction act, oact;
20900 sigemptyset(&act.sa_mask);
20901 act.sa_flags = SA_RESTART;
20902 sigaction(0, &act, &oact);
20903   ;
20904   return 0;
20905 }
20906 _ACEOF
20907 rm -f conftest.$ac_objext conftest$ac_exeext
20908 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20909   (eval $ac_link) 2>conftest.er1
20910   ac_status=$?
20911   grep -v '^ *+' conftest.er1 >conftest.err
20912   rm -f conftest.er1
20913   cat conftest.err >&5
20914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20915   (exit $ac_status); } &&
20916          { ac_try='test -z "$ac_c_werror_flag"
20917                          || test ! -s conftest.err'
20918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20919   (eval $ac_try) 2>&5
20920   ac_status=$?
20921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20922   (exit $ac_status); }; } &&
20923          { ac_try='test -s conftest$ac_exeext'
20924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20925   (eval $ac_try) 2>&5
20926   ac_status=$?
20927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20928   (exit $ac_status); }; }; then
20929   pgac_cv_func_posix_signals=yes
20930 else
20931   echo "$as_me: failed program was:" >&5
20932 sed 's/^/| /' conftest.$ac_ext >&5
20933
20934 pgac_cv_func_posix_signals=no
20935 fi
20936 rm -f conftest.err conftest.$ac_objext \
20937       conftest$ac_exeext conftest.$ac_ext
20938 fi
20939 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
20940 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
20941 if test x"$pgac_cv_func_posix_signals" = xyes ; then
20942
20943 cat >>confdefs.h <<\_ACEOF
20944 #define HAVE_POSIX_SIGNALS
20945 _ACEOF
20946
20947 fi
20948 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
20949
20950 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
20951   { { echo "$as_me:$LINENO: error:
20952 *** Thread-safety requires POSIX signals, which are not supported by your
20953 *** operating system.
20954 " >&5
20955 echo "$as_me: error:
20956 *** Thread-safety requires POSIX signals, which are not supported by your
20957 *** operating system.
20958 " >&2;}
20959    { (exit 1); exit 1; }; }
20960 fi
20961 fi
20962
20963 if test $ac_cv_func_fseeko = yes; then
20964 # Check whether --enable-largefile or --disable-largefile was given.
20965 if test "${enable_largefile+set}" = set; then
20966   enableval="$enable_largefile"
20967
20968 fi;
20969 if test "$enable_largefile" != no; then
20970
20971   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
20972 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
20973 if test "${ac_cv_sys_largefile_CC+set}" = set; then
20974   echo $ECHO_N "(cached) $ECHO_C" >&6
20975 else
20976   ac_cv_sys_largefile_CC=no
20977      if test "$GCC" != yes; then
20978        ac_save_CC=$CC
20979        while :; do
20980          # IRIX 6.2 and later do not support large files by default,
20981          # so use the C compiler's -n32 option if that helps.
20982          cat >conftest.$ac_ext <<_ACEOF
20983 /* confdefs.h.  */
20984 _ACEOF
20985 cat confdefs.h >>conftest.$ac_ext
20986 cat >>conftest.$ac_ext <<_ACEOF
20987 /* end confdefs.h.  */
20988 #include <sys/types.h>
20989  /* Check that off_t can represent 2**63 - 1 correctly.
20990     We can't simply define LARGE_OFF_T to be 9223372036854775807,
20991     since some C++ compilers masquerading as C compilers
20992     incorrectly reject 9223372036854775807.  */
20993 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20994   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20995                        && LARGE_OFF_T % 2147483647 == 1)
20996                       ? 1 : -1];
20997 int
20998 main ()
20999 {
21000
21001   ;
21002   return 0;
21003 }
21004 _ACEOF
21005          rm -f conftest.$ac_objext
21006 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21007   (eval $ac_compile) 2>conftest.er1
21008   ac_status=$?
21009   grep -v '^ *+' conftest.er1 >conftest.err
21010   rm -f conftest.er1
21011   cat conftest.err >&5
21012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21013   (exit $ac_status); } &&
21014          { ac_try='test -z "$ac_c_werror_flag"
21015                          || test ! -s conftest.err'
21016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21017   (eval $ac_try) 2>&5
21018   ac_status=$?
21019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21020   (exit $ac_status); }; } &&
21021          { ac_try='test -s conftest.$ac_objext'
21022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21023   (eval $ac_try) 2>&5
21024   ac_status=$?
21025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21026   (exit $ac_status); }; }; then
21027   break
21028 else
21029   echo "$as_me: failed program was:" >&5
21030 sed 's/^/| /' conftest.$ac_ext >&5
21031
21032 fi
21033 rm -f conftest.err conftest.$ac_objext
21034          CC="$CC -n32"
21035          rm -f conftest.$ac_objext
21036 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21037   (eval $ac_compile) 2>conftest.er1
21038   ac_status=$?
21039   grep -v '^ *+' conftest.er1 >conftest.err
21040   rm -f conftest.er1
21041   cat conftest.err >&5
21042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21043   (exit $ac_status); } &&
21044          { ac_try='test -z "$ac_c_werror_flag"
21045                          || test ! -s conftest.err'
21046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21047   (eval $ac_try) 2>&5
21048   ac_status=$?
21049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21050   (exit $ac_status); }; } &&
21051          { ac_try='test -s conftest.$ac_objext'
21052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21053   (eval $ac_try) 2>&5
21054   ac_status=$?
21055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21056   (exit $ac_status); }; }; then
21057   ac_cv_sys_largefile_CC=' -n32'; break
21058 else
21059   echo "$as_me: failed program was:" >&5
21060 sed 's/^/| /' conftest.$ac_ext >&5
21061
21062 fi
21063 rm -f conftest.err conftest.$ac_objext
21064          break
21065        done
21066        CC=$ac_save_CC
21067        rm -f conftest.$ac_ext
21068     fi
21069 fi
21070 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21071 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21072   if test "$ac_cv_sys_largefile_CC" != no; then
21073     CC=$CC$ac_cv_sys_largefile_CC
21074   fi
21075
21076   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21077 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21078 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21079   echo $ECHO_N "(cached) $ECHO_C" >&6
21080 else
21081   while :; do
21082   ac_cv_sys_file_offset_bits=no
21083   cat >conftest.$ac_ext <<_ACEOF
21084 /* confdefs.h.  */
21085 _ACEOF
21086 cat confdefs.h >>conftest.$ac_ext
21087 cat >>conftest.$ac_ext <<_ACEOF
21088 /* end confdefs.h.  */
21089 #include <sys/types.h>
21090  /* Check that off_t can represent 2**63 - 1 correctly.
21091     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21092     since some C++ compilers masquerading as C compilers
21093     incorrectly reject 9223372036854775807.  */
21094 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21095   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21096                        && LARGE_OFF_T % 2147483647 == 1)
21097                       ? 1 : -1];
21098 int
21099 main ()
21100 {
21101
21102   ;
21103   return 0;
21104 }
21105 _ACEOF
21106 rm -f conftest.$ac_objext
21107 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21108   (eval $ac_compile) 2>conftest.er1
21109   ac_status=$?
21110   grep -v '^ *+' conftest.er1 >conftest.err
21111   rm -f conftest.er1
21112   cat conftest.err >&5
21113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21114   (exit $ac_status); } &&
21115          { ac_try='test -z "$ac_c_werror_flag"
21116                          || test ! -s conftest.err'
21117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21118   (eval $ac_try) 2>&5
21119   ac_status=$?
21120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21121   (exit $ac_status); }; } &&
21122          { ac_try='test -s conftest.$ac_objext'
21123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21124   (eval $ac_try) 2>&5
21125   ac_status=$?
21126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21127   (exit $ac_status); }; }; then
21128   break
21129 else
21130   echo "$as_me: failed program was:" >&5
21131 sed 's/^/| /' conftest.$ac_ext >&5
21132
21133 fi
21134 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21135   cat >conftest.$ac_ext <<_ACEOF
21136 /* confdefs.h.  */
21137 _ACEOF
21138 cat confdefs.h >>conftest.$ac_ext
21139 cat >>conftest.$ac_ext <<_ACEOF
21140 /* end confdefs.h.  */
21141 #define _FILE_OFFSET_BITS 64
21142 #include <sys/types.h>
21143  /* Check that off_t can represent 2**63 - 1 correctly.
21144     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21145     since some C++ compilers masquerading as C compilers
21146     incorrectly reject 9223372036854775807.  */
21147 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21148   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21149                        && LARGE_OFF_T % 2147483647 == 1)
21150                       ? 1 : -1];
21151 int
21152 main ()
21153 {
21154
21155   ;
21156   return 0;
21157 }
21158 _ACEOF
21159 rm -f conftest.$ac_objext
21160 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21161   (eval $ac_compile) 2>conftest.er1
21162   ac_status=$?
21163   grep -v '^ *+' conftest.er1 >conftest.err
21164   rm -f conftest.er1
21165   cat conftest.err >&5
21166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21167   (exit $ac_status); } &&
21168          { ac_try='test -z "$ac_c_werror_flag"
21169                          || test ! -s conftest.err'
21170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21171   (eval $ac_try) 2>&5
21172   ac_status=$?
21173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21174   (exit $ac_status); }; } &&
21175          { ac_try='test -s conftest.$ac_objext'
21176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21177   (eval $ac_try) 2>&5
21178   ac_status=$?
21179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21180   (exit $ac_status); }; }; then
21181   ac_cv_sys_file_offset_bits=64; break
21182 else
21183   echo "$as_me: failed program was:" >&5
21184 sed 's/^/| /' conftest.$ac_ext >&5
21185
21186 fi
21187 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21188   break
21189 done
21190 fi
21191 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21192 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21193 if test "$ac_cv_sys_file_offset_bits" != no; then
21194
21195 cat >>confdefs.h <<_ACEOF
21196 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21197 _ACEOF
21198
21199 fi
21200 rm -f conftest*
21201   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21202 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21203 if test "${ac_cv_sys_large_files+set}" = set; then
21204   echo $ECHO_N "(cached) $ECHO_C" >&6
21205 else
21206   while :; do
21207   ac_cv_sys_large_files=no
21208   cat >conftest.$ac_ext <<_ACEOF
21209 /* confdefs.h.  */
21210 _ACEOF
21211 cat confdefs.h >>conftest.$ac_ext
21212 cat >>conftest.$ac_ext <<_ACEOF
21213 /* end confdefs.h.  */
21214 #include <sys/types.h>
21215  /* Check that off_t can represent 2**63 - 1 correctly.
21216     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21217     since some C++ compilers masquerading as C compilers
21218     incorrectly reject 9223372036854775807.  */
21219 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21220   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21221                        && LARGE_OFF_T % 2147483647 == 1)
21222                       ? 1 : -1];
21223 int
21224 main ()
21225 {
21226
21227   ;
21228   return 0;
21229 }
21230 _ACEOF
21231 rm -f conftest.$ac_objext
21232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21233   (eval $ac_compile) 2>conftest.er1
21234   ac_status=$?
21235   grep -v '^ *+' conftest.er1 >conftest.err
21236   rm -f conftest.er1
21237   cat conftest.err >&5
21238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21239   (exit $ac_status); } &&
21240          { ac_try='test -z "$ac_c_werror_flag"
21241                          || test ! -s conftest.err'
21242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21243   (eval $ac_try) 2>&5
21244   ac_status=$?
21245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21246   (exit $ac_status); }; } &&
21247          { ac_try='test -s conftest.$ac_objext'
21248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21249   (eval $ac_try) 2>&5
21250   ac_status=$?
21251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21252   (exit $ac_status); }; }; then
21253   break
21254 else
21255   echo "$as_me: failed program was:" >&5
21256 sed 's/^/| /' conftest.$ac_ext >&5
21257
21258 fi
21259 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21260   cat >conftest.$ac_ext <<_ACEOF
21261 /* confdefs.h.  */
21262 _ACEOF
21263 cat confdefs.h >>conftest.$ac_ext
21264 cat >>conftest.$ac_ext <<_ACEOF
21265 /* end confdefs.h.  */
21266 #define _LARGE_FILES 1
21267 #include <sys/types.h>
21268  /* Check that off_t can represent 2**63 - 1 correctly.
21269     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21270     since some C++ compilers masquerading as C compilers
21271     incorrectly reject 9223372036854775807.  */
21272 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21273   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21274                        && LARGE_OFF_T % 2147483647 == 1)
21275                       ? 1 : -1];
21276 int
21277 main ()
21278 {
21279
21280   ;
21281   return 0;
21282 }
21283 _ACEOF
21284 rm -f conftest.$ac_objext
21285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21286   (eval $ac_compile) 2>conftest.er1
21287   ac_status=$?
21288   grep -v '^ *+' conftest.er1 >conftest.err
21289   rm -f conftest.er1
21290   cat conftest.err >&5
21291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21292   (exit $ac_status); } &&
21293          { ac_try='test -z "$ac_c_werror_flag"
21294                          || test ! -s conftest.err'
21295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21296   (eval $ac_try) 2>&5
21297   ac_status=$?
21298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21299   (exit $ac_status); }; } &&
21300          { ac_try='test -s conftest.$ac_objext'
21301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21302   (eval $ac_try) 2>&5
21303   ac_status=$?
21304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21305   (exit $ac_status); }; }; then
21306   ac_cv_sys_large_files=1; break
21307 else
21308   echo "$as_me: failed program was:" >&5
21309 sed 's/^/| /' conftest.$ac_ext >&5
21310
21311 fi
21312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21313   break
21314 done
21315 fi
21316 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21317 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21318 if test "$ac_cv_sys_large_files" != no; then
21319
21320 cat >>confdefs.h <<_ACEOF
21321 #define _LARGE_FILES $ac_cv_sys_large_files
21322 _ACEOF
21323
21324 fi
21325 rm -f conftest*
21326 fi
21327
21328 fi
21329
21330 # SunOS doesn't handle negative byte comparisons properly with +/- return
21331 echo "$as_me:$LINENO: checking for working memcmp" >&5
21332 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21333 if test "${ac_cv_func_memcmp_working+set}" = set; then
21334   echo $ECHO_N "(cached) $ECHO_C" >&6
21335 else
21336   if test "$cross_compiling" = yes; then
21337   ac_cv_func_memcmp_working=no
21338 else
21339   cat >conftest.$ac_ext <<_ACEOF
21340 /* confdefs.h.  */
21341 _ACEOF
21342 cat confdefs.h >>conftest.$ac_ext
21343 cat >>conftest.$ac_ext <<_ACEOF
21344 /* end confdefs.h.  */
21345 $ac_includes_default
21346 int
21347 main ()
21348 {
21349
21350   /* Some versions of memcmp are not 8-bit clean.  */
21351   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21352   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21353     exit (1);
21354
21355   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21356      or more and with at least one buffer not starting on a 4-byte boundary.
21357      William Lewis provided this test program.   */
21358   {
21359     char foo[21];
21360     char bar[21];
21361     int i;
21362     for (i = 0; i < 4; i++)
21363       {
21364         char *a = foo + i;
21365         char *b = bar + i;
21366         strcpy (a, "--------01111111");
21367         strcpy (b, "--------10000000");
21368         if (memcmp (a, b, 16) >= 0)
21369           exit (1);
21370       }
21371     exit (0);
21372   }
21373
21374   ;
21375   return 0;
21376 }
21377 _ACEOF
21378 rm -f conftest$ac_exeext
21379 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21380   (eval $ac_link) 2>&5
21381   ac_status=$?
21382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21383   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21384   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21385   (eval $ac_try) 2>&5
21386   ac_status=$?
21387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21388   (exit $ac_status); }; }; then
21389   ac_cv_func_memcmp_working=yes
21390 else
21391   echo "$as_me: program exited with status $ac_status" >&5
21392 echo "$as_me: failed program was:" >&5
21393 sed 's/^/| /' conftest.$ac_ext >&5
21394
21395 ( exit $ac_status )
21396 ac_cv_func_memcmp_working=no
21397 fi
21398 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21399 fi
21400 fi
21401 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21402 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21403 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21404     "memcmp.$ac_objext"   | \
21405   *" memcmp.$ac_objext"   | \
21406     "memcmp.$ac_objext "* | \
21407   *" memcmp.$ac_objext "* ) ;;
21408   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21409 esac
21410
21411
21412
21413
21414 # Select semaphore implementation type.
21415 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21416
21417 cat >>confdefs.h <<\_ACEOF
21418 #define USE_NAMED_POSIX_SEMAPHORES 1
21419 _ACEOF
21420
21421   SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21422 else
21423   if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21424
21425 cat >>confdefs.h <<\_ACEOF
21426 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21427 _ACEOF
21428
21429     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21430   else
21431
21432 cat >>confdefs.h <<\_ACEOF
21433 #define USE_SYSV_SEMAPHORES 1
21434 _ACEOF
21435
21436     SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21437   fi
21438 fi
21439
21440
21441 # Select shared-memory implementation type.
21442
21443 cat >>confdefs.h <<\_ACEOF
21444 #define USE_SYSV_SHARED_MEMORY 1
21445 _ACEOF
21446
21447 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21448
21449
21450 if test "$enable_nls" = yes ; then
21451
21452   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21453 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21454 if test "${ac_cv_search_gettext+set}" = set; then
21455   echo $ECHO_N "(cached) $ECHO_C" >&6
21456 else
21457   ac_func_search_save_LIBS=$LIBS
21458 ac_cv_search_gettext=no
21459 cat >conftest.$ac_ext <<_ACEOF
21460 /* confdefs.h.  */
21461 _ACEOF
21462 cat confdefs.h >>conftest.$ac_ext
21463 cat >>conftest.$ac_ext <<_ACEOF
21464 /* end confdefs.h.  */
21465
21466 /* Override any gcc2 internal prototype to avoid an error.  */
21467 #ifdef __cplusplus
21468 extern "C"
21469 #endif
21470 /* We use char because int might match the return type of a gcc2
21471    builtin and then its argument prototype would still apply.  */
21472 char gettext ();
21473 int
21474 main ()
21475 {
21476 gettext ();
21477   ;
21478   return 0;
21479 }
21480 _ACEOF
21481 rm -f conftest.$ac_objext conftest$ac_exeext
21482 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21483   (eval $ac_link) 2>conftest.er1
21484   ac_status=$?
21485   grep -v '^ *+' conftest.er1 >conftest.err
21486   rm -f conftest.er1
21487   cat conftest.err >&5
21488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21489   (exit $ac_status); } &&
21490          { ac_try='test -z "$ac_c_werror_flag"
21491                          || test ! -s conftest.err'
21492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21493   (eval $ac_try) 2>&5
21494   ac_status=$?
21495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21496   (exit $ac_status); }; } &&
21497          { ac_try='test -s conftest$ac_exeext'
21498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21499   (eval $ac_try) 2>&5
21500   ac_status=$?
21501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21502   (exit $ac_status); }; }; then
21503   ac_cv_search_gettext="none required"
21504 else
21505   echo "$as_me: failed program was:" >&5
21506 sed 's/^/| /' conftest.$ac_ext >&5
21507
21508 fi
21509 rm -f conftest.err conftest.$ac_objext \
21510       conftest$ac_exeext conftest.$ac_ext
21511 if test "$ac_cv_search_gettext" = no; then
21512   for ac_lib in intl; do
21513     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21514     cat >conftest.$ac_ext <<_ACEOF
21515 /* confdefs.h.  */
21516 _ACEOF
21517 cat confdefs.h >>conftest.$ac_ext
21518 cat >>conftest.$ac_ext <<_ACEOF
21519 /* end confdefs.h.  */
21520
21521 /* Override any gcc2 internal prototype to avoid an error.  */
21522 #ifdef __cplusplus
21523 extern "C"
21524 #endif
21525 /* We use char because int might match the return type of a gcc2
21526    builtin and then its argument prototype would still apply.  */
21527 char gettext ();
21528 int
21529 main ()
21530 {
21531 gettext ();
21532   ;
21533   return 0;
21534 }
21535 _ACEOF
21536 rm -f conftest.$ac_objext conftest$ac_exeext
21537 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21538   (eval $ac_link) 2>conftest.er1
21539   ac_status=$?
21540   grep -v '^ *+' conftest.er1 >conftest.err
21541   rm -f conftest.er1
21542   cat conftest.err >&5
21543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21544   (exit $ac_status); } &&
21545          { ac_try='test -z "$ac_c_werror_flag"
21546                          || test ! -s conftest.err'
21547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21548   (eval $ac_try) 2>&5
21549   ac_status=$?
21550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21551   (exit $ac_status); }; } &&
21552          { ac_try='test -s conftest$ac_exeext'
21553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21554   (eval $ac_try) 2>&5
21555   ac_status=$?
21556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21557   (exit $ac_status); }; }; then
21558   ac_cv_search_gettext="-l$ac_lib"
21559 break
21560 else
21561   echo "$as_me: failed program was:" >&5
21562 sed 's/^/| /' conftest.$ac_ext >&5
21563
21564 fi
21565 rm -f conftest.err conftest.$ac_objext \
21566       conftest$ac_exeext conftest.$ac_ext
21567   done
21568 fi
21569 LIBS=$ac_func_search_save_LIBS
21570 fi
21571 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21572 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21573 if test "$ac_cv_search_gettext" != no; then
21574   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21575
21576 else
21577   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21578 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21579    { (exit 1); exit 1; }; }
21580 fi
21581
21582   if test "${ac_cv_header_libintl_h+set}" = set; then
21583   echo "$as_me:$LINENO: checking for libintl.h" >&5
21584 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21585 if test "${ac_cv_header_libintl_h+set}" = set; then
21586   echo $ECHO_N "(cached) $ECHO_C" >&6
21587 fi
21588 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21589 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21590 else
21591   # Is the header compilable?
21592 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21593 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21594 cat >conftest.$ac_ext <<_ACEOF
21595 /* confdefs.h.  */
21596 _ACEOF
21597 cat confdefs.h >>conftest.$ac_ext
21598 cat >>conftest.$ac_ext <<_ACEOF
21599 /* end confdefs.h.  */
21600 $ac_includes_default
21601 #include <libintl.h>
21602 _ACEOF
21603 rm -f conftest.$ac_objext
21604 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21605   (eval $ac_compile) 2>conftest.er1
21606   ac_status=$?
21607   grep -v '^ *+' conftest.er1 >conftest.err
21608   rm -f conftest.er1
21609   cat conftest.err >&5
21610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21611   (exit $ac_status); } &&
21612          { ac_try='test -z "$ac_c_werror_flag"
21613                          || test ! -s conftest.err'
21614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21615   (eval $ac_try) 2>&5
21616   ac_status=$?
21617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21618   (exit $ac_status); }; } &&
21619          { ac_try='test -s conftest.$ac_objext'
21620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21621   (eval $ac_try) 2>&5
21622   ac_status=$?
21623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21624   (exit $ac_status); }; }; then
21625   ac_header_compiler=yes
21626 else
21627   echo "$as_me: failed program was:" >&5
21628 sed 's/^/| /' conftest.$ac_ext >&5
21629
21630 ac_header_compiler=no
21631 fi
21632 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21633 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21634 echo "${ECHO_T}$ac_header_compiler" >&6
21635
21636 # Is the header present?
21637 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21638 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21639 cat >conftest.$ac_ext <<_ACEOF
21640 /* confdefs.h.  */
21641 _ACEOF
21642 cat confdefs.h >>conftest.$ac_ext
21643 cat >>conftest.$ac_ext <<_ACEOF
21644 /* end confdefs.h.  */
21645 #include <libintl.h>
21646 _ACEOF
21647 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21648   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21649   ac_status=$?
21650   grep -v '^ *+' conftest.er1 >conftest.err
21651   rm -f conftest.er1
21652   cat conftest.err >&5
21653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21654   (exit $ac_status); } >/dev/null; then
21655   if test -s conftest.err; then
21656     ac_cpp_err=$ac_c_preproc_warn_flag
21657     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21658   else
21659     ac_cpp_err=
21660   fi
21661 else
21662   ac_cpp_err=yes
21663 fi
21664 if test -z "$ac_cpp_err"; then
21665   ac_header_preproc=yes
21666 else
21667   echo "$as_me: failed program was:" >&5
21668 sed 's/^/| /' conftest.$ac_ext >&5
21669
21670   ac_header_preproc=no
21671 fi
21672 rm -f conftest.err conftest.$ac_ext
21673 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21674 echo "${ECHO_T}$ac_header_preproc" >&6
21675
21676 # So?  What about this header?
21677 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21678   yes:no: )
21679     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21680 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21681     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
21682 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
21683     ac_header_preproc=yes
21684     ;;
21685   no:yes:* )
21686     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
21687 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
21688     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
21689 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
21690     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
21691 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
21692     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
21693 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21694     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
21695 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
21696     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
21697 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
21698     (
21699       cat <<\_ASBOX
21700 ## ---------------------------------------- ##
21701 ## Report this to pgsql-bugs@postgresql.org ##
21702 ## ---------------------------------------- ##
21703 _ASBOX
21704     ) |
21705       sed "s/^/$as_me: WARNING:     /" >&2
21706     ;;
21707 esac
21708 echo "$as_me:$LINENO: checking for libintl.h" >&5
21709 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21710 if test "${ac_cv_header_libintl_h+set}" = set; then
21711   echo $ECHO_N "(cached) $ECHO_C" >&6
21712 else
21713   ac_cv_header_libintl_h=$ac_header_preproc
21714 fi
21715 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21716 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21717
21718 fi
21719 if test $ac_cv_header_libintl_h = yes; then
21720   :
21721 else
21722   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
21723 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
21724    { (exit 1); exit 1; }; }
21725 fi
21726
21727
21728   for ac_prog in msgfmt
21729 do
21730   # Extract the first word of "$ac_prog", so it can be a program name with args.
21731 set dummy $ac_prog; ac_word=$2
21732 echo "$as_me:$LINENO: checking for $ac_word" >&5
21733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21734 if test "${ac_cv_prog_MSGFMT+set}" = set; then
21735   echo $ECHO_N "(cached) $ECHO_C" >&6
21736 else
21737   if test -n "$MSGFMT"; then
21738   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
21739 else
21740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21741 for as_dir in $PATH
21742 do
21743   IFS=$as_save_IFS
21744   test -z "$as_dir" && as_dir=.
21745   for ac_exec_ext in '' $ac_executable_extensions; do
21746   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21747     ac_cv_prog_MSGFMT="$ac_prog"
21748     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21749     break 2
21750   fi
21751 done
21752 done
21753
21754 fi
21755 fi
21756 MSGFMT=$ac_cv_prog_MSGFMT
21757 if test -n "$MSGFMT"; then
21758   echo "$as_me:$LINENO: result: $MSGFMT" >&5
21759 echo "${ECHO_T}$MSGFMT" >&6
21760 else
21761   echo "$as_me:$LINENO: result: no" >&5
21762 echo "${ECHO_T}no" >&6
21763 fi
21764
21765   test -n "$MSGFMT" && break
21766 done
21767
21768   if test -z "$MSGFMT"; then
21769     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
21770 echo "$as_me: error: msgfmt is required for NLS" >&2;}
21771    { (exit 1); exit 1; }; }
21772   fi
21773   for ac_prog in msgmerge
21774 do
21775   # Extract the first word of "$ac_prog", so it can be a program name with args.
21776 set dummy $ac_prog; ac_word=$2
21777 echo "$as_me:$LINENO: checking for $ac_word" >&5
21778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21779 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
21780   echo $ECHO_N "(cached) $ECHO_C" >&6
21781 else
21782   if test -n "$MSGMERGE"; then
21783   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
21784 else
21785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21786 for as_dir in $PATH
21787 do
21788   IFS=$as_save_IFS
21789   test -z "$as_dir" && as_dir=.
21790   for ac_exec_ext in '' $ac_executable_extensions; do
21791   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21792     ac_cv_prog_MSGMERGE="$ac_prog"
21793     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21794     break 2
21795   fi
21796 done
21797 done
21798
21799 fi
21800 fi
21801 MSGMERGE=$ac_cv_prog_MSGMERGE
21802 if test -n "$MSGMERGE"; then
21803   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
21804 echo "${ECHO_T}$MSGMERGE" >&6
21805 else
21806   echo "$as_me:$LINENO: result: no" >&5
21807 echo "${ECHO_T}no" >&6
21808 fi
21809
21810   test -n "$MSGMERGE" && break
21811 done
21812
21813   for ac_prog in xgettext
21814 do
21815   # Extract the first word of "$ac_prog", so it can be a program name with args.
21816 set dummy $ac_prog; ac_word=$2
21817 echo "$as_me:$LINENO: checking for $ac_word" >&5
21818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21819 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
21820   echo $ECHO_N "(cached) $ECHO_C" >&6
21821 else
21822   if test -n "$XGETTEXT"; then
21823   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
21824 else
21825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21826 for as_dir in $PATH
21827 do
21828   IFS=$as_save_IFS
21829   test -z "$as_dir" && as_dir=.
21830   for ac_exec_ext in '' $ac_executable_extensions; do
21831   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21832     ac_cv_prog_XGETTEXT="$ac_prog"
21833     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21834     break 2
21835   fi
21836 done
21837 done
21838
21839 fi
21840 fi
21841 XGETTEXT=$ac_cv_prog_XGETTEXT
21842 if test -n "$XGETTEXT"; then
21843   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
21844 echo "${ECHO_T}$XGETTEXT" >&6
21845 else
21846   echo "$as_me:$LINENO: result: no" >&5
21847 echo "${ECHO_T}no" >&6
21848 fi
21849
21850   test -n "$XGETTEXT" && break
21851 done
21852
21853
21854   # Note: share/locale is always the default, independent of $datadir
21855   localedir='${prefix}/share/locale'
21856   if test x"$prefix" = x"NONE"; then
21857     exp_localedir="$ac_default_prefix/share/locale"
21858   else
21859     exp_localedir="$prefix/share/locale"
21860   fi
21861
21862
21863
21864 cat >>confdefs.h <<_ACEOF
21865 #define LOCALEDIR "$exp_localedir"
21866 _ACEOF
21867
21868
21869 fi
21870
21871 # Check for Tcl configuration script tclConfig.sh
21872 if test "$with_tcl" = yes; then
21873     for ac_prog in tclsh tcl
21874 do
21875   # Extract the first word of "$ac_prog", so it can be a program name with args.
21876 set dummy $ac_prog; ac_word=$2
21877 echo "$as_me:$LINENO: checking for $ac_word" >&5
21878 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21879 if test "${ac_cv_path_TCLSH+set}" = set; then
21880   echo $ECHO_N "(cached) $ECHO_C" >&6
21881 else
21882   case $TCLSH in
21883   [\\/]* | ?:[\\/]*)
21884   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
21885   ;;
21886   *)
21887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21888 for as_dir in $PATH
21889 do
21890   IFS=$as_save_IFS
21891   test -z "$as_dir" && as_dir=.
21892   for ac_exec_ext in '' $ac_executable_extensions; do
21893   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21894     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
21895     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21896     break 2
21897   fi
21898 done
21899 done
21900
21901   ;;
21902 esac
21903 fi
21904 TCLSH=$ac_cv_path_TCLSH
21905
21906 if test -n "$TCLSH"; then
21907   echo "$as_me:$LINENO: result: $TCLSH" >&5
21908 echo "${ECHO_T}$TCLSH" >&6
21909 else
21910   echo "$as_me:$LINENO: result: no" >&5
21911 echo "${ECHO_T}no" >&6
21912 fi
21913
21914   test -n "$TCLSH" && break
21915 done
21916
21917 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
21918 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
21919 # Let user override test
21920 if test -z "$TCL_CONFIG_SH"; then
21921     pgac_test_dirs="$with_tclconfig"
21922
21923     set X $pgac_test_dirs; shift
21924     if test $# -eq 0; then
21925         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
21926 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
21927    { (exit 1); exit 1; }; }
21928         set X `echo 'puts $auto_path' | $TCLSH`; shift
21929     fi
21930
21931     for pgac_dir do
21932         if test -r "$pgac_dir/tclConfig.sh"; then
21933             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
21934             break
21935         fi
21936     done
21937 fi
21938
21939 if test -z "$TCL_CONFIG_SH"; then
21940     echo "$as_me:$LINENO: result: no" >&5
21941 echo "${ECHO_T}no" >&6
21942     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
21943 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
21944    { (exit 1); exit 1; }; }
21945 else
21946     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
21947 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
21948 fi
21949
21950
21951
21952     . "$TCL_CONFIG_SH"
21953 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
21954 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
21955 eval TCL_LIBS=\"$TCL_LIBS\"
21956 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
21957 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
21958
21959         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
21960     ac_save_CPPFLAGS=$CPPFLAGS
21961     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
21962     if test "${ac_cv_header_tcl_h+set}" = set; then
21963   echo "$as_me:$LINENO: checking for tcl.h" >&5
21964 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
21965 if test "${ac_cv_header_tcl_h+set}" = set; then
21966   echo $ECHO_N "(cached) $ECHO_C" >&6
21967 fi
21968 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
21969 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
21970 else
21971   # Is the header compilable?
21972 echo "$as_me:$LINENO: checking tcl.h usability" >&5
21973 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
21974 cat >conftest.$ac_ext <<_ACEOF
21975 /* confdefs.h.  */
21976 _ACEOF
21977 cat confdefs.h >>conftest.$ac_ext
21978 cat >>conftest.$ac_ext <<_ACEOF
21979 /* end confdefs.h.  */
21980 $ac_includes_default
21981 #include <tcl.h>
21982 _ACEOF
21983 rm -f conftest.$ac_objext
21984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21985   (eval $ac_compile) 2>conftest.er1
21986   ac_status=$?
21987   grep -v '^ *+' conftest.er1 >conftest.err
21988   rm -f conftest.er1
21989   cat conftest.err >&5
21990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21991   (exit $ac_status); } &&
21992          { ac_try='test -z "$ac_c_werror_flag"
21993                          || test ! -s conftest.err'
21994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21995   (eval $ac_try) 2>&5
21996   ac_status=$?
21997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21998   (exit $ac_status); }; } &&
21999          { ac_try='test -s conftest.$ac_objext'
22000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22001   (eval $ac_try) 2>&5
22002   ac_status=$?
22003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22004   (exit $ac_status); }; }; then
22005   ac_header_compiler=yes
22006 else
22007   echo "$as_me: failed program was:" >&5
22008 sed 's/^/| /' conftest.$ac_ext >&5
22009
22010 ac_header_compiler=no
22011 fi
22012 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22013 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22014 echo "${ECHO_T}$ac_header_compiler" >&6
22015
22016 # Is the header present?
22017 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22018 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22019 cat >conftest.$ac_ext <<_ACEOF
22020 /* confdefs.h.  */
22021 _ACEOF
22022 cat confdefs.h >>conftest.$ac_ext
22023 cat >>conftest.$ac_ext <<_ACEOF
22024 /* end confdefs.h.  */
22025 #include <tcl.h>
22026 _ACEOF
22027 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22028   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22029   ac_status=$?
22030   grep -v '^ *+' conftest.er1 >conftest.err
22031   rm -f conftest.er1
22032   cat conftest.err >&5
22033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22034   (exit $ac_status); } >/dev/null; then
22035   if test -s conftest.err; then
22036     ac_cpp_err=$ac_c_preproc_warn_flag
22037     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22038   else
22039     ac_cpp_err=
22040   fi
22041 else
22042   ac_cpp_err=yes
22043 fi
22044 if test -z "$ac_cpp_err"; then
22045   ac_header_preproc=yes
22046 else
22047   echo "$as_me: failed program was:" >&5
22048 sed 's/^/| /' conftest.$ac_ext >&5
22049
22050   ac_header_preproc=no
22051 fi
22052 rm -f conftest.err conftest.$ac_ext
22053 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22054 echo "${ECHO_T}$ac_header_preproc" >&6
22055
22056 # So?  What about this header?
22057 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22058   yes:no: )
22059     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22060 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22061     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22062 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22063     ac_header_preproc=yes
22064     ;;
22065   no:yes:* )
22066     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22067 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22068     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22069 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22070     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22071 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22072     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22073 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22074     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22075 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22076     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22077 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22078     (
22079       cat <<\_ASBOX
22080 ## ---------------------------------------- ##
22081 ## Report this to pgsql-bugs@postgresql.org ##
22082 ## ---------------------------------------- ##
22083 _ASBOX
22084     ) |
22085       sed "s/^/$as_me: WARNING:     /" >&2
22086     ;;
22087 esac
22088 echo "$as_me:$LINENO: checking for tcl.h" >&5
22089 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22090 if test "${ac_cv_header_tcl_h+set}" = set; then
22091   echo $ECHO_N "(cached) $ECHO_C" >&6
22092 else
22093   ac_cv_header_tcl_h=$ac_header_preproc
22094 fi
22095 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22096 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22097
22098 fi
22099 if test $ac_cv_header_tcl_h = yes; then
22100   :
22101 else
22102   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22103 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22104    { (exit 1); exit 1; }; }
22105 fi
22106
22107
22108     CPPFLAGS=$ac_save_CPPFLAGS
22109 fi
22110
22111 #
22112 # Check for DocBook and tools
22113 #
22114 for ac_prog in onsgmls nsgmls
22115 do
22116   # Extract the first word of "$ac_prog", so it can be a program name with args.
22117 set dummy $ac_prog; ac_word=$2
22118 echo "$as_me:$LINENO: checking for $ac_word" >&5
22119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22120 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22121   echo $ECHO_N "(cached) $ECHO_C" >&6
22122 else
22123   if test -n "$NSGMLS"; then
22124   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22125 else
22126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22127 for as_dir in $PATH
22128 do
22129   IFS=$as_save_IFS
22130   test -z "$as_dir" && as_dir=.
22131   for ac_exec_ext in '' $ac_executable_extensions; do
22132   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22133     ac_cv_prog_NSGMLS="$ac_prog"
22134     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22135     break 2
22136   fi
22137 done
22138 done
22139
22140 fi
22141 fi
22142 NSGMLS=$ac_cv_prog_NSGMLS
22143 if test -n "$NSGMLS"; then
22144   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22145 echo "${ECHO_T}$NSGMLS" >&6
22146 else
22147   echo "$as_me:$LINENO: result: no" >&5
22148 echo "${ECHO_T}no" >&6
22149 fi
22150
22151   test -n "$NSGMLS" && break
22152 done
22153
22154 for ac_prog in openjade jade
22155 do
22156   # Extract the first word of "$ac_prog", so it can be a program name with args.
22157 set dummy $ac_prog; ac_word=$2
22158 echo "$as_me:$LINENO: checking for $ac_word" >&5
22159 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22160 if test "${ac_cv_prog_JADE+set}" = set; then
22161   echo $ECHO_N "(cached) $ECHO_C" >&6
22162 else
22163   if test -n "$JADE"; then
22164   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22165 else
22166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22167 for as_dir in $PATH
22168 do
22169   IFS=$as_save_IFS
22170   test -z "$as_dir" && as_dir=.
22171   for ac_exec_ext in '' $ac_executable_extensions; do
22172   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22173     ac_cv_prog_JADE="$ac_prog"
22174     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22175     break 2
22176   fi
22177 done
22178 done
22179
22180 fi
22181 fi
22182 JADE=$ac_cv_prog_JADE
22183 if test -n "$JADE"; then
22184   echo "$as_me:$LINENO: result: $JADE" >&5
22185 echo "${ECHO_T}$JADE" >&6
22186 else
22187   echo "$as_me:$LINENO: result: no" >&5
22188 echo "${ECHO_T}no" >&6
22189 fi
22190
22191   test -n "$JADE" && break
22192 done
22193
22194
22195 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22196 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22197 if test "${pgac_cv_check_docbook+set}" = set; then
22198   echo $ECHO_N "(cached) $ECHO_C" >&6
22199 else
22200   cat >conftest.sgml <<EOF
22201 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22202 <book>
22203  <title>test</title>
22204  <chapter>
22205   <title>random</title>
22206    <sect1>
22207     <title>testsect</title>
22208     <para>text</para>
22209   </sect1>
22210  </chapter>
22211 </book>
22212 EOF
22213
22214 pgac_cv_check_docbook=no
22215
22216 if test -n "$NSGMLS"; then
22217   $NSGMLS -s conftest.sgml 1>&5 2>&1
22218   if test $? -eq 0; then
22219     pgac_cv_check_docbook=yes
22220   fi
22221 fi
22222 rm -f conftest.sgml
22223 fi
22224 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22225 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22226
22227 have_docbook=$pgac_cv_check_docbook
22228
22229
22230 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22231 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22232 if test "${pgac_cv_path_stylesheets+set}" = set; then
22233   echo $ECHO_N "(cached) $ECHO_C" >&6
22234 else
22235   if test -n "$DOCBOOKSTYLE"; then
22236   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22237 else
22238   for pgac_prefix in /usr /usr/local /opt; do
22239     for pgac_infix in share lib; do
22240       for pgac_postfix in \
22241         sgml/stylesheets/nwalsh-modular \
22242         sgml/stylesheets/docbook \
22243                 sgml/docbook-dsssl \
22244         sgml/docbook/dsssl/modular \
22245         sgml/docbook/stylesheet/dsssl/modular \
22246         sgml/docbook/dsssl-stylesheets
22247       do
22248         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22249         if test -r "$pgac_candidate/html/docbook.dsl" \
22250            && test -r "$pgac_candidate/print/docbook.dsl"
22251         then
22252           pgac_cv_path_stylesheets=$pgac_candidate
22253           break 3
22254         fi
22255       done
22256     done
22257   done
22258 fi
22259 fi
22260
22261 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22262
22263 if test -n "$DOCBOOKSTYLE"; then
22264   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22265 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22266 else
22267   echo "$as_me:$LINENO: result: no" >&5
22268 echo "${ECHO_T}no" >&6
22269 fi
22270 if test -n "$DOCBOOKSTYLE"; then
22271   for ac_prog in collateindex.pl
22272 do
22273   # Extract the first word of "$ac_prog", so it can be a program name with args.
22274 set dummy $ac_prog; ac_word=$2
22275 echo "$as_me:$LINENO: checking for $ac_word" >&5
22276 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22277 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22278   echo $ECHO_N "(cached) $ECHO_C" >&6
22279 else
22280   case $COLLATEINDEX in
22281   [\\/]* | ?:[\\/]*)
22282   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22283   ;;
22284   *)
22285   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22286 for as_dir in $DOCBOOKSTYLE/bin $PATH
22287 do
22288   IFS=$as_save_IFS
22289   test -z "$as_dir" && as_dir=.
22290   for ac_exec_ext in '' $ac_executable_extensions; do
22291   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22292     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22293     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22294     break 2
22295   fi
22296 done
22297 done
22298
22299   ;;
22300 esac
22301 fi
22302 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22303
22304 if test -n "$COLLATEINDEX"; then
22305   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22306 echo "${ECHO_T}$COLLATEINDEX" >&6
22307 else
22308   echo "$as_me:$LINENO: result: no" >&5
22309 echo "${ECHO_T}no" >&6
22310 fi
22311
22312   test -n "$COLLATEINDEX" && break
22313 done
22314
22315 else
22316   for ac_prog in collateindex.pl
22317 do
22318   # Extract the first word of "$ac_prog", so it can be a program name with args.
22319 set dummy $ac_prog; ac_word=$2
22320 echo "$as_me:$LINENO: checking for $ac_word" >&5
22321 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22322 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22323   echo $ECHO_N "(cached) $ECHO_C" >&6
22324 else
22325   case $COLLATEINDEX in
22326   [\\/]* | ?:[\\/]*)
22327   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22328   ;;
22329   *)
22330   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22331 for as_dir in $PATH
22332 do
22333   IFS=$as_save_IFS
22334   test -z "$as_dir" && as_dir=.
22335   for ac_exec_ext in '' $ac_executable_extensions; do
22336   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22337     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22338     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22339     break 2
22340   fi
22341 done
22342 done
22343
22344   ;;
22345 esac
22346 fi
22347 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22348
22349 if test -n "$COLLATEINDEX"; then
22350   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22351 echo "${ECHO_T}$COLLATEINDEX" >&6
22352 else
22353   echo "$as_me:$LINENO: result: no" >&5
22354 echo "${ECHO_T}no" >&6
22355 fi
22356
22357   test -n "$COLLATEINDEX" && break
22358 done
22359
22360 fi
22361 for ac_prog in sgmlspl
22362 do
22363   # Extract the first word of "$ac_prog", so it can be a program name with args.
22364 set dummy $ac_prog; ac_word=$2
22365 echo "$as_me:$LINENO: checking for $ac_word" >&5
22366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22367 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22368   echo $ECHO_N "(cached) $ECHO_C" >&6
22369 else
22370   if test -n "$SGMLSPL"; then
22371   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22372 else
22373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22374 for as_dir in $PATH
22375 do
22376   IFS=$as_save_IFS
22377   test -z "$as_dir" && as_dir=.
22378   for ac_exec_ext in '' $ac_executable_extensions; do
22379   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22380     ac_cv_prog_SGMLSPL="$ac_prog"
22381     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22382     break 2
22383   fi
22384 done
22385 done
22386
22387 fi
22388 fi
22389 SGMLSPL=$ac_cv_prog_SGMLSPL
22390 if test -n "$SGMLSPL"; then
22391   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22392 echo "${ECHO_T}$SGMLSPL" >&6
22393 else
22394   echo "$as_me:$LINENO: result: no" >&5
22395 echo "${ECHO_T}no" >&6
22396 fi
22397
22398   test -n "$SGMLSPL" && break
22399 done
22400
22401
22402 # Thread testing
22403
22404 # We have to run the thread test near the end so we have all our symbols
22405 # defined.  Cross compiling throws a warning.
22406 #
22407 if test "$enable_thread_safety_force" = yes; then
22408 if test x"$template" != x"win32"
22409 then
22410   { echo "$as_me:$LINENO: WARNING:
22411 *** Skipping thread test program.  --enable-thread-safety-force was used.
22412 *** Run the program in src/tools/thread on the your machine and add
22413 proper locking function calls to your applications to guarantee thread
22414 safety.
22415 " >&5
22416 echo "$as_me: WARNING:
22417 *** Skipping thread test program.  --enable-thread-safety-force was used.
22418 *** Run the program in src/tools/thread on the your machine and add
22419 proper locking function calls to your applications to guarantee thread
22420 safety.
22421 " >&2;}
22422 else
22423 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22424 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22425 fi
22426 elif test "$enable_thread_safety" = yes; then
22427 if test x"$template" != x"win32"
22428 then
22429 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22430 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22431
22432 _CFLAGS="$CFLAGS"
22433 _LIBS="$LIBS"
22434 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22435 LIBS="$LIBS $PTHREAD_LIBS"
22436 if test "$cross_compiling" = yes; then
22437   echo "$as_me:$LINENO: result: maybe" >&5
22438 echo "${ECHO_T}maybe" >&6
22439   { echo "$as_me:$LINENO: WARNING:
22440 *** Skipping thread test program because of cross-compile build.
22441 *** Run the program in src/tools/thread on the target machine.
22442 " >&5
22443 echo "$as_me: WARNING:
22444 *** Skipping thread test program because of cross-compile build.
22445 *** Run the program in src/tools/thread on the target machine.
22446 " >&2;}
22447 else
22448   cat >conftest.$ac_ext <<_ACEOF
22449 /* confdefs.h.  */
22450 _ACEOF
22451 cat confdefs.h >>conftest.$ac_ext
22452 cat >>conftest.$ac_ext <<_ACEOF
22453 /* end confdefs.h.  */
22454 #include "$srcdir/src/tools/thread/thread_test.c"
22455 _ACEOF
22456 rm -f conftest$ac_exeext
22457 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22458   (eval $ac_link) 2>&5
22459   ac_status=$?
22460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22461   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22463   (eval $ac_try) 2>&5
22464   ac_status=$?
22465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22466   (exit $ac_status); }; }; then
22467   echo "$as_me:$LINENO: result: yes" >&5
22468 echo "${ECHO_T}yes" >&6
22469 else
22470   echo "$as_me: program exited with status $ac_status" >&5
22471 echo "$as_me: failed program was:" >&5
22472 sed 's/^/| /' conftest.$ac_ext >&5
22473
22474 ( exit $ac_status )
22475 echo "$as_me:$LINENO: result: no" >&5
22476 echo "${ECHO_T}no" >&6
22477   { { echo "$as_me:$LINENO: error:
22478 *** Thread test program failed.  Your platform is not thread-safe.
22479 *** Check the file 'config.log'for the exact reason.
22480 ***
22481 *** You can use the configure option --enable-thread-safety-force
22482 *** to force threads to be enabled.  However, you must then run
22483 *** the program in src/tools/thread and add locking function calls
22484 *** to your applications to guarantee thread safety.
22485 " >&5
22486 echo "$as_me: error:
22487 *** Thread test program failed.  Your platform is not thread-safe.
22488 *** Check the file 'config.log'for the exact reason.
22489 ***
22490 *** You can use the configure option --enable-thread-safety-force
22491 *** to force threads to be enabled.  However, you must then run
22492 *** the program in src/tools/thread and add locking function calls
22493 *** to your applications to guarantee thread safety.
22494 " >&2;}
22495    { (exit 1); exit 1; }; }
22496 fi
22497 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22498 fi
22499 CFLAGS="$_CFLAGS"
22500 LIBS="$_LIBS"
22501 else
22502 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22503 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22504 fi
22505 fi
22506
22507 # prepare build tree if outside source tree
22508 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22509 # Note 2: /bin/pwd might be better than shell's built-in at getting
22510 #         a symlink-free name.
22511 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22512   vpath_build=no
22513 else
22514   vpath_build=yes
22515   if test "$no_create" != yes; then
22516     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22517     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22518     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22519       || { { echo "$as_me:$LINENO: error: failed" >&5
22520 echo "$as_me: error: failed" >&2;}
22521    { (exit 1); exit 1; }; }
22522     echo "$as_me:$LINENO: result: done" >&5
22523 echo "${ECHO_T}done" >&6
22524   fi
22525 fi
22526
22527
22528
22529                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22530
22531
22532                                                             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}"
22533
22534
22535 if test "$PORTNAME" = "win32"; then
22536           ac_config_commands="$ac_config_commands check_win32_symlinks"
22537
22538 fi
22539
22540           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22541
22542
22543 cat >confcache <<\_ACEOF
22544 # This file is a shell script that caches the results of configure
22545 # tests run on this system so they can be shared between configure
22546 # scripts and configure runs, see configure's option --config-cache.
22547 # It is not useful on other systems.  If it contains results you don't
22548 # want to keep, you may remove or edit it.
22549 #
22550 # config.status only pays attention to the cache file if you give it
22551 # the --recheck option to rerun configure.
22552 #
22553 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22554 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22555 # following values.
22556
22557 _ACEOF
22558
22559 # The following way of writing the cache mishandles newlines in values,
22560 # but we know of no workaround that is simple, portable, and efficient.
22561 # So, don't put newlines in cache variables' values.
22562 # Ultrix sh set writes to stderr and can't be redirected directly,
22563 # and sets the high bit in the cache file unless we assign to the vars.
22564 {
22565   (set) 2>&1 |
22566     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22567     *ac_space=\ *)
22568       # `set' does not quote correctly, so add quotes (double-quote
22569       # substitution turns \\\\ into \\, and sed turns \\ into \).
22570       sed -n \
22571         "s/'/'\\\\''/g;
22572           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22573       ;;
22574     *)
22575       # `set' quotes correctly as required by POSIX, so do not add quotes.
22576       sed -n \
22577         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22578       ;;
22579     esac;
22580 } |
22581   sed '
22582      t clear
22583      : clear
22584      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22585      t end
22586      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22587      : end' >>confcache
22588 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22589   if test -w $cache_file; then
22590     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22591     cat confcache >$cache_file
22592   else
22593     echo "not updating unwritable cache $cache_file"
22594   fi
22595 fi
22596 rm -f confcache
22597
22598 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22599 # Let make expand exec_prefix.
22600 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22601
22602 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22603 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22604 # trailing colons and then remove the whole line if VPATH becomes empty
22605 # (actually we leave an empty line to preserve line numbers).
22606 if test "x$srcdir" = x.; then
22607   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22608 s/:*\$(srcdir):*/:/;
22609 s/:*\${srcdir}:*/:/;
22610 s/:*@srcdir@:*/:/;
22611 s/^\([^=]*=[     ]*\):*/\1/;
22612 s/:*$//;
22613 s/^[^=]*=[       ]*$//;
22614 }'
22615 fi
22616
22617 DEFS=-DHAVE_CONFIG_H
22618
22619 ac_libobjs=
22620 ac_ltlibobjs=
22621 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22622   # 1. Remove the extension, and $U if already installed.
22623   ac_i=`echo "$ac_i" |
22624          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22625   # 2. Add them.
22626   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22627   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22628 done
22629 LIBOBJS=$ac_libobjs
22630
22631 LTLIBOBJS=$ac_ltlibobjs
22632
22633
22634
22635 : ${CONFIG_STATUS=./config.status}
22636 ac_clean_files_save=$ac_clean_files
22637 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22638 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22639 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22640 cat >$CONFIG_STATUS <<_ACEOF
22641 #! $SHELL
22642 # Generated by $as_me.
22643 # Run this file to recreate the current configuration.
22644 # Compiler output produced by configure, useful for debugging
22645 # configure, is in config.log if it exists.
22646
22647 debug=false
22648 ac_cs_recheck=false
22649 ac_cs_silent=false
22650 SHELL=\${CONFIG_SHELL-$SHELL}
22651 _ACEOF
22652
22653 cat >>$CONFIG_STATUS <<\_ACEOF
22654 ## --------------------- ##
22655 ## M4sh Initialization.  ##
22656 ## --------------------- ##
22657
22658 # Be Bourne compatible
22659 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22660   emulate sh
22661   NULLCMD=:
22662   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22663   # is contrary to our usage.  Disable this feature.
22664   alias -g '${1+"$@"}'='"$@"'
22665 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22666   set -o posix
22667 fi
22668 DUALCASE=1; export DUALCASE # for MKS sh
22669
22670 # Support unset when possible.
22671 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22672   as_unset=unset
22673 else
22674   as_unset=false
22675 fi
22676
22677
22678 # Work around bugs in pre-3.0 UWIN ksh.
22679 $as_unset ENV MAIL MAILPATH
22680 PS1='$ '
22681 PS2='> '
22682 PS4='+ '
22683
22684 # NLS nuisances.
22685 for as_var in \
22686   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22687   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22688   LC_TELEPHONE LC_TIME
22689 do
22690   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22691     eval $as_var=C; export $as_var
22692   else
22693     $as_unset $as_var
22694   fi
22695 done
22696
22697 # Required to use basename.
22698 if expr a : '\(a\)' >/dev/null 2>&1; then
22699   as_expr=expr
22700 else
22701   as_expr=false
22702 fi
22703
22704 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22705   as_basename=basename
22706 else
22707   as_basename=false
22708 fi
22709
22710
22711 # Name of the executable.
22712 as_me=`$as_basename "$0" ||
22713 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22714          X"$0" : 'X\(//\)$' \| \
22715          X"$0" : 'X\(/\)$' \| \
22716          .     : '\(.\)' 2>/dev/null ||
22717 echo X/"$0" |
22718     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22719           /^X\/\(\/\/\)$/{ s//\1/; q; }
22720           /^X\/\(\/\).*/{ s//\1/; q; }
22721           s/.*/./; q'`
22722
22723
22724 # PATH needs CR, and LINENO needs CR and PATH.
22725 # Avoid depending upon Character Ranges.
22726 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22727 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22728 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22729 as_cr_digits='0123456789'
22730 as_cr_alnum=$as_cr_Letters$as_cr_digits
22731
22732 # The user is always right.
22733 if test "${PATH_SEPARATOR+set}" != set; then
22734   echo "#! /bin/sh" >conf$$.sh
22735   echo  "exit 0"   >>conf$$.sh
22736   chmod +x conf$$.sh
22737   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22738     PATH_SEPARATOR=';'
22739   else
22740     PATH_SEPARATOR=:
22741   fi
22742   rm -f conf$$.sh
22743 fi
22744
22745
22746   as_lineno_1=$LINENO
22747   as_lineno_2=$LINENO
22748   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22749   test "x$as_lineno_1" != "x$as_lineno_2" &&
22750   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
22751   # Find who we are.  Look in the path if we contain no path at all
22752   # relative or not.
22753   case $0 in
22754     *[\\/]* ) as_myself=$0 ;;
22755     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22756 for as_dir in $PATH
22757 do
22758   IFS=$as_save_IFS
22759   test -z "$as_dir" && as_dir=.
22760   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22761 done
22762
22763        ;;
22764   esac
22765   # We did not find ourselves, most probably we were run as `sh COMMAND'
22766   # in which case we are not to be found in the path.
22767   if test "x$as_myself" = x; then
22768     as_myself=$0
22769   fi
22770   if test ! -f "$as_myself"; then
22771     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22772 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22773    { (exit 1); exit 1; }; }
22774   fi
22775   case $CONFIG_SHELL in
22776   '')
22777     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22778 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22779 do
22780   IFS=$as_save_IFS
22781   test -z "$as_dir" && as_dir=.
22782   for as_base in sh bash ksh sh5; do
22783          case $as_dir in
22784          /*)
22785            if ("$as_dir/$as_base" -c '
22786   as_lineno_1=$LINENO
22787   as_lineno_2=$LINENO
22788   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22789   test "x$as_lineno_1" != "x$as_lineno_2" &&
22790   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
22791              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22792              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22793              CONFIG_SHELL=$as_dir/$as_base
22794              export CONFIG_SHELL
22795              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22796            fi;;
22797          esac
22798        done
22799 done
22800 ;;
22801   esac
22802
22803   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22804   # uniformly replaced by the line number.  The first 'sed' inserts a
22805   # line-number line before each line; the second 'sed' does the real
22806   # work.  The second script uses 'N' to pair each line-number line
22807   # with the numbered line, and appends trailing '-' during
22808   # substitution so that $LINENO is not a special case at line end.
22809   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22810   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
22811   sed '=' <$as_myself |
22812     sed '
22813       N
22814       s,$,-,
22815       : loop
22816       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22817       t loop
22818       s,-$,,
22819       s,^['$as_cr_digits']*\n,,
22820     ' >$as_me.lineno &&
22821   chmod +x $as_me.lineno ||
22822     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22823 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22824    { (exit 1); exit 1; }; }
22825
22826   # Don't try to exec as it changes $[0], causing all sort of problems
22827   # (the dirname of $[0] is not the place where we might find the
22828   # original and so on.  Autoconf is especially sensible to this).
22829   . ./$as_me.lineno
22830   # Exit status is that of the last command.
22831   exit
22832 }
22833
22834
22835 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22836   *c*,-n*) ECHO_N= ECHO_C='
22837 ' ECHO_T='      ' ;;
22838   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22839   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
22840 esac
22841
22842 if expr a : '\(a\)' >/dev/null 2>&1; then
22843   as_expr=expr
22844 else
22845   as_expr=false
22846 fi
22847
22848 rm -f conf$$ conf$$.exe conf$$.file
22849 echo >conf$$.file
22850 if ln -s conf$$.file conf$$ 2>/dev/null; then
22851   # We could just check for DJGPP; but this test a) works b) is more generic
22852   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22853   if test -f conf$$.exe; then
22854     # Don't use ln at all; we don't have any links
22855     as_ln_s='cp -p'
22856   else
22857     as_ln_s='ln -s'
22858   fi
22859 elif ln conf$$.file conf$$ 2>/dev/null; then
22860   as_ln_s=ln
22861 else
22862   as_ln_s='cp -p'
22863 fi
22864 rm -f conf$$ conf$$.exe conf$$.file
22865
22866 if mkdir -p . 2>/dev/null; then
22867   as_mkdir_p=:
22868 else
22869   test -d ./-p && rmdir ./-p
22870   as_mkdir_p=false
22871 fi
22872
22873 as_executable_p="test -f"
22874
22875 # Sed expression to map a string onto a valid CPP name.
22876 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22877
22878 # Sed expression to map a string onto a valid variable name.
22879 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22880
22881
22882 # IFS
22883 # We need space, tab and new line, in precisely that order.
22884 as_nl='
22885 '
22886 IFS="   $as_nl"
22887
22888 # CDPATH.
22889 $as_unset CDPATH
22890
22891 exec 6>&1
22892
22893 # Open the log real soon, to keep \$[0] and so on meaningful, and to
22894 # report actual input values of CONFIG_FILES etc. instead of their
22895 # values after options handling.  Logging --version etc. is OK.
22896 exec 5>>config.log
22897 {
22898   echo
22899   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22900 ## Running $as_me. ##
22901 _ASBOX
22902 } >&5
22903 cat >&5 <<_CSEOF
22904
22905 This file was extended by PostgreSQL $as_me 8.2devel, which was
22906 generated by GNU Autoconf 2.59.  Invocation command line was
22907
22908   CONFIG_FILES    = $CONFIG_FILES
22909   CONFIG_HEADERS  = $CONFIG_HEADERS
22910   CONFIG_LINKS    = $CONFIG_LINKS
22911   CONFIG_COMMANDS = $CONFIG_COMMANDS
22912   $ $0 $@
22913
22914 _CSEOF
22915 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22916 echo >&5
22917 _ACEOF
22918
22919 # Files that config.status was made for.
22920 if test -n "$ac_config_files"; then
22921   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22922 fi
22923
22924 if test -n "$ac_config_headers"; then
22925   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22926 fi
22927
22928 if test -n "$ac_config_links"; then
22929   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22930 fi
22931
22932 if test -n "$ac_config_commands"; then
22933   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22934 fi
22935
22936 cat >>$CONFIG_STATUS <<\_ACEOF
22937
22938 ac_cs_usage="\
22939 \`$as_me' instantiates files from templates according to the
22940 current configuration.
22941
22942 Usage: $0 [OPTIONS] [FILE]...
22943
22944   -h, --help       print this help, then exit
22945   -V, --version    print version number, then exit
22946   -q, --quiet      do not print progress messages
22947   -d, --debug      don't remove temporary files
22948       --recheck    update $as_me by reconfiguring in the same conditions
22949   --file=FILE[:TEMPLATE]
22950                    instantiate the configuration file FILE
22951   --header=FILE[:TEMPLATE]
22952                    instantiate the configuration header FILE
22953
22954 Configuration files:
22955 $config_files
22956
22957 Configuration headers:
22958 $config_headers
22959
22960 Configuration links:
22961 $config_links
22962
22963 Configuration commands:
22964 $config_commands
22965
22966 Report bugs to <bug-autoconf@gnu.org>."
22967 _ACEOF
22968
22969 cat >>$CONFIG_STATUS <<_ACEOF
22970 ac_cs_version="\\
22971 PostgreSQL config.status 8.2devel
22972 configured by $0, generated by GNU Autoconf 2.59,
22973   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22974
22975 Copyright (C) 2003 Free Software Foundation, Inc.
22976 This config.status script is free software; the Free Software Foundation
22977 gives unlimited permission to copy, distribute and modify it."
22978 srcdir=$srcdir
22979 _ACEOF
22980
22981 cat >>$CONFIG_STATUS <<\_ACEOF
22982 # If no file are specified by the user, then we need to provide default
22983 # value.  By we need to know if files were specified by the user.
22984 ac_need_defaults=:
22985 while test $# != 0
22986 do
22987   case $1 in
22988   --*=*)
22989     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22990     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22991     ac_shift=:
22992     ;;
22993   -*)
22994     ac_option=$1
22995     ac_optarg=$2
22996     ac_shift=shift
22997     ;;
22998   *) # This is not an option, so the user has probably given explicit
22999      # arguments.
23000      ac_option=$1
23001      ac_need_defaults=false;;
23002   esac
23003
23004   case $ac_option in
23005   # Handling of the options.
23006 _ACEOF
23007 cat >>$CONFIG_STATUS <<\_ACEOF
23008   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23009     ac_cs_recheck=: ;;
23010   --version | --vers* | -V )
23011     echo "$ac_cs_version"; exit 0 ;;
23012   --he | --h)
23013     # Conflict between --help and --header
23014     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23015 Try \`$0 --help' for more information." >&5
23016 echo "$as_me: error: ambiguous option: $1
23017 Try \`$0 --help' for more information." >&2;}
23018    { (exit 1); exit 1; }; };;
23019   --help | --hel | -h )
23020     echo "$ac_cs_usage"; exit 0 ;;
23021   --debug | --d* | -d )
23022     debug=: ;;
23023   --file | --fil | --fi | --f )
23024     $ac_shift
23025     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23026     ac_need_defaults=false;;
23027   --header | --heade | --head | --hea )
23028     $ac_shift
23029     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23030     ac_need_defaults=false;;
23031   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23032   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23033     ac_cs_silent=: ;;
23034
23035   # This is an error.
23036   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23037 Try \`$0 --help' for more information." >&5
23038 echo "$as_me: error: unrecognized option: $1
23039 Try \`$0 --help' for more information." >&2;}
23040    { (exit 1); exit 1; }; } ;;
23041
23042   *) ac_config_targets="$ac_config_targets $1" ;;
23043
23044   esac
23045   shift
23046 done
23047
23048 ac_configure_extra_args=
23049
23050 if $ac_cs_silent; then
23051   exec 6>/dev/null
23052   ac_configure_extra_args="$ac_configure_extra_args --silent"
23053 fi
23054
23055 _ACEOF
23056 cat >>$CONFIG_STATUS <<_ACEOF
23057 if \$ac_cs_recheck; then
23058   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23059   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23060 fi
23061
23062 _ACEOF
23063
23064
23065
23066
23067
23068 cat >>$CONFIG_STATUS <<\_ACEOF
23069 for ac_config_target in $ac_config_targets
23070 do
23071   case "$ac_config_target" in
23072   # Handling of arguments.
23073   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23074   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23075   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23076   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23077   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23078   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23079   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23080   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23081   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23082   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23083   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23084   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23085 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23086    { (exit 1); exit 1; }; };;
23087   esac
23088 done
23089
23090 # If the user did not use the arguments to specify the items to instantiate,
23091 # then the envvar interface is used.  Set only those that are not.
23092 # We use the long form for the default assignment because of an extremely
23093 # bizarre bug on SunOS 4.1.3.
23094 if $ac_need_defaults; then
23095   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23096   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23097   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23098   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23099 fi
23100
23101 # Have a temporary directory for convenience.  Make it in the build tree
23102 # simply because there is no reason to put it here, and in addition,
23103 # creating and moving files from /tmp can sometimes cause problems.
23104 # Create a temporary directory, and hook for its removal unless debugging.
23105 $debug ||
23106 {
23107   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23108   trap '{ (exit 1); exit 1; }' 1 2 13 15
23109 }
23110
23111 # Create a (secure) tmp directory for tmp files.
23112
23113 {
23114   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23115   test -n "$tmp" && test -d "$tmp"
23116 }  ||
23117 {
23118   tmp=./confstat$$-$RANDOM
23119   (umask 077 && mkdir $tmp)
23120 } ||
23121 {
23122    echo "$me: cannot create a temporary directory in ." >&2
23123    { (exit 1); exit 1; }
23124 }
23125
23126 _ACEOF
23127
23128 cat >>$CONFIG_STATUS <<_ACEOF
23129
23130 #
23131 # CONFIG_FILES section.
23132 #
23133
23134 # No need to generate the scripts if there are no CONFIG_FILES.
23135 # This happens for instance when ./config.status config.h
23136 if test -n "\$CONFIG_FILES"; then
23137   # Protect against being on the right side of a sed subst in config.status.
23138   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23139    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23140 s,@SHELL@,$SHELL,;t t
23141 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23142 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23143 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23144 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23145 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23146 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23147 s,@exec_prefix@,$exec_prefix,;t t
23148 s,@prefix@,$prefix,;t t
23149 s,@program_transform_name@,$program_transform_name,;t t
23150 s,@bindir@,$bindir,;t t
23151 s,@sbindir@,$sbindir,;t t
23152 s,@libexecdir@,$libexecdir,;t t
23153 s,@datadir@,$datadir,;t t
23154 s,@sysconfdir@,$sysconfdir,;t t
23155 s,@sharedstatedir@,$sharedstatedir,;t t
23156 s,@localstatedir@,$localstatedir,;t t
23157 s,@libdir@,$libdir,;t t
23158 s,@includedir@,$includedir,;t t
23159 s,@oldincludedir@,$oldincludedir,;t t
23160 s,@infodir@,$infodir,;t t
23161 s,@mandir@,$mandir,;t t
23162 s,@build_alias@,$build_alias,;t t
23163 s,@host_alias@,$host_alias,;t t
23164 s,@target_alias@,$target_alias,;t t
23165 s,@DEFS@,$DEFS,;t t
23166 s,@ECHO_C@,$ECHO_C,;t t
23167 s,@ECHO_N@,$ECHO_N,;t t
23168 s,@ECHO_T@,$ECHO_T,;t t
23169 s,@LIBS@,$LIBS,;t t
23170 s,@configure_args@,$configure_args,;t t
23171 s,@build@,$build,;t t
23172 s,@build_cpu@,$build_cpu,;t t
23173 s,@build_vendor@,$build_vendor,;t t
23174 s,@build_os@,$build_os,;t t
23175 s,@host@,$host,;t t
23176 s,@host_cpu@,$host_cpu,;t t
23177 s,@host_vendor@,$host_vendor,;t t
23178 s,@host_os@,$host_os,;t t
23179 s,@PORTNAME@,$PORTNAME,;t t
23180 s,@docdir@,$docdir,;t t
23181 s,@enable_nls@,$enable_nls,;t t
23182 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23183 s,@default_port@,$default_port,;t t
23184 s,@enable_shared@,$enable_shared,;t t
23185 s,@enable_rpath@,$enable_rpath,;t t
23186 s,@enable_debug@,$enable_debug,;t t
23187 s,@CC@,$CC,;t t
23188 s,@CFLAGS@,$CFLAGS,;t t
23189 s,@LDFLAGS@,$LDFLAGS,;t t
23190 s,@CPPFLAGS@,$CPPFLAGS,;t t
23191 s,@ac_ct_CC@,$ac_ct_CC,;t t
23192 s,@EXEEXT@,$EXEEXT,;t t
23193 s,@OBJEXT@,$OBJEXT,;t t
23194 s,@CPP@,$CPP,;t t
23195 s,@GCC@,$GCC,;t t
23196 s,@TAS@,$TAS,;t t
23197 s,@autodepend@,$autodepend,;t t
23198 s,@INCLUDES@,$INCLUDES,;t t
23199 s,@enable_thread_safety@,$enable_thread_safety,;t t
23200 s,@with_tcl@,$with_tcl,;t t
23201 s,@with_perl@,$with_perl,;t t
23202 s,@with_python@,$with_python,;t t
23203 s,@with_krb5@,$with_krb5,;t t
23204 s,@krb_srvtab@,$krb_srvtab,;t t
23205 s,@with_pam@,$with_pam,;t t
23206 s,@with_bonjour@,$with_bonjour,;t t
23207 s,@with_openssl@,$with_openssl,;t t
23208 s,@with_zlib@,$with_zlib,;t t
23209 s,@EGREP@,$EGREP,;t t
23210 s,@ELF_SYS@,$ELF_SYS,;t t
23211 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23212 s,@AWK@,$AWK,;t t
23213 s,@FLEX@,$FLEX,;t t
23214 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23215 s,@LN_S@,$LN_S,;t t
23216 s,@LD@,$LD,;t t
23217 s,@with_gnu_ld@,$with_gnu_ld,;t t
23218 s,@ld_R_works@,$ld_R_works,;t t
23219 s,@RANLIB@,$RANLIB,;t t
23220 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23221 s,@LORDER@,$LORDER,;t t
23222 s,@TAR@,$TAR,;t t
23223 s,@STRIP@,$STRIP,;t t
23224 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23225 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23226 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23227 s,@YACC@,$YACC,;t t
23228 s,@YFLAGS@,$YFLAGS,;t t
23229 s,@PERL@,$PERL,;t t
23230 s,@perl_archlibexp@,$perl_archlibexp,;t t
23231 s,@perl_privlibexp@,$perl_privlibexp,;t t
23232 s,@perl_useshrplib@,$perl_useshrplib,;t t
23233 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23234 s,@PYTHON@,$PYTHON,;t t
23235 s,@python_version@,$python_version,;t t
23236 s,@python_configdir@,$python_configdir,;t t
23237 s,@python_includespec@,$python_includespec,;t t
23238 s,@python_libdir@,$python_libdir,;t t
23239 s,@python_libspec@,$python_libspec,;t t
23240 s,@python_additional_libs@,$python_additional_libs,;t t
23241 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23242 s,@LIBOBJS@,$LIBOBJS,;t t
23243 s,@acx_pthread_config@,$acx_pthread_config,;t t
23244 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23245 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23246 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23247 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23248 s,@MSGFMT@,$MSGFMT,;t t
23249 s,@MSGMERGE@,$MSGMERGE,;t t
23250 s,@XGETTEXT@,$XGETTEXT,;t t
23251 s,@localedir@,$localedir,;t t
23252 s,@TCLSH@,$TCLSH,;t t
23253 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23254 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23255 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23256 s,@TCL_LIBS@,$TCL_LIBS,;t t
23257 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23258 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23259 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23260 s,@NSGMLS@,$NSGMLS,;t t
23261 s,@JADE@,$JADE,;t t
23262 s,@have_docbook@,$have_docbook,;t t
23263 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23264 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23265 s,@SGMLSPL@,$SGMLSPL,;t t
23266 s,@vpath_build@,$vpath_build,;t t
23267 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23268 CEOF
23269
23270 _ACEOF
23271
23272   cat >>$CONFIG_STATUS <<\_ACEOF
23273   # Split the substitutions into bite-sized pieces for seds with
23274   # small command number limits, like on Digital OSF/1 and HP-UX.
23275   ac_max_sed_lines=48
23276   ac_sed_frag=1 # Number of current file.
23277   ac_beg=1 # First line for current file.
23278   ac_end=$ac_max_sed_lines # Line after last line for current file.
23279   ac_more_lines=:
23280   ac_sed_cmds=
23281   while $ac_more_lines; do
23282     if test $ac_beg -gt 1; then
23283       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23284     else
23285       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23286     fi
23287     if test ! -s $tmp/subs.frag; then
23288       ac_more_lines=false
23289     else
23290       # The purpose of the label and of the branching condition is to
23291       # speed up the sed processing (if there are no `@' at all, there
23292       # is no need to browse any of the substitutions).
23293       # These are the two extra sed commands mentioned above.
23294       (echo ':t
23295   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23296       if test -z "$ac_sed_cmds"; then
23297         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23298       else
23299         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23300       fi
23301       ac_sed_frag=`expr $ac_sed_frag + 1`
23302       ac_beg=$ac_end
23303       ac_end=`expr $ac_end + $ac_max_sed_lines`
23304     fi
23305   done
23306   if test -z "$ac_sed_cmds"; then
23307     ac_sed_cmds=cat
23308   fi
23309 fi # test -n "$CONFIG_FILES"
23310
23311 _ACEOF
23312 cat >>$CONFIG_STATUS <<\_ACEOF
23313 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23314   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23315   case $ac_file in
23316   - | *:- | *:-:* ) # input from stdin
23317         cat >$tmp/stdin
23318         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23319         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23320   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23321         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23322   * )   ac_file_in=$ac_file.in ;;
23323   esac
23324
23325   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23326   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23327 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23328          X"$ac_file" : 'X\(//\)[^/]' \| \
23329          X"$ac_file" : 'X\(//\)$' \| \
23330          X"$ac_file" : 'X\(/\)' \| \
23331          .     : '\(.\)' 2>/dev/null ||
23332 echo X"$ac_file" |
23333     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23334           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23335           /^X\(\/\/\)$/{ s//\1/; q; }
23336           /^X\(\/\).*/{ s//\1/; q; }
23337           s/.*/./; q'`
23338   { if $as_mkdir_p; then
23339     mkdir -p "$ac_dir"
23340   else
23341     as_dir="$ac_dir"
23342     as_dirs=
23343     while test ! -d "$as_dir"; do
23344       as_dirs="$as_dir $as_dirs"
23345       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23346 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23347          X"$as_dir" : 'X\(//\)[^/]' \| \
23348          X"$as_dir" : 'X\(//\)$' \| \
23349          X"$as_dir" : 'X\(/\)' \| \
23350          .     : '\(.\)' 2>/dev/null ||
23351 echo X"$as_dir" |
23352     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23353           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23354           /^X\(\/\/\)$/{ s//\1/; q; }
23355           /^X\(\/\).*/{ s//\1/; q; }
23356           s/.*/./; q'`
23357     done
23358     test ! -n "$as_dirs" || mkdir $as_dirs
23359   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23360 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23361    { (exit 1); exit 1; }; }; }
23362
23363   ac_builddir=.
23364
23365 if test "$ac_dir" != .; then
23366   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23367   # A "../" for each directory in $ac_dir_suffix.
23368   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23369 else
23370   ac_dir_suffix= ac_top_builddir=
23371 fi
23372
23373 case $srcdir in
23374   .)  # No --srcdir option.  We are building in place.
23375     ac_srcdir=.
23376     if test -z "$ac_top_builddir"; then
23377        ac_top_srcdir=.
23378     else
23379        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23380     fi ;;
23381   [\\/]* | ?:[\\/]* )  # Absolute path.
23382     ac_srcdir=$srcdir$ac_dir_suffix;
23383     ac_top_srcdir=$srcdir ;;
23384   *) # Relative path.
23385     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23386     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23387 esac
23388
23389 # Do not use `cd foo && pwd` to compute absolute paths, because
23390 # the directories may not exist.
23391 case `pwd` in
23392 .) ac_abs_builddir="$ac_dir";;
23393 *)
23394   case "$ac_dir" in
23395   .) ac_abs_builddir=`pwd`;;
23396   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23397   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23398   esac;;
23399 esac
23400 case $ac_abs_builddir in
23401 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23402 *)
23403   case ${ac_top_builddir}. in
23404   .) ac_abs_top_builddir=$ac_abs_builddir;;
23405   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23406   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23407   esac;;
23408 esac
23409 case $ac_abs_builddir in
23410 .) ac_abs_srcdir=$ac_srcdir;;
23411 *)
23412   case $ac_srcdir in
23413   .) ac_abs_srcdir=$ac_abs_builddir;;
23414   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23415   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23416   esac;;
23417 esac
23418 case $ac_abs_builddir in
23419 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23420 *)
23421   case $ac_top_srcdir in
23422   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23423   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23424   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23425   esac;;
23426 esac
23427
23428
23429
23430   if test x"$ac_file" != x-; then
23431     { echo "$as_me:$LINENO: creating $ac_file" >&5
23432 echo "$as_me: creating $ac_file" >&6;}
23433     rm -f "$ac_file"
23434   fi
23435   # Let's still pretend it is `configure' which instantiates (i.e., don't
23436   # use $as_me), people would be surprised to read:
23437   #    /* config.h.  Generated by config.status.  */
23438   if test x"$ac_file" = x-; then
23439     configure_input=
23440   else
23441     configure_input="$ac_file.  "
23442   fi
23443   configure_input=$configure_input"Generated from `echo $ac_file_in |
23444                                      sed 's,.*/,,'` by configure."
23445
23446   # First look for the input files in the build tree, otherwise in the
23447   # src tree.
23448   ac_file_inputs=`IFS=:
23449     for f in $ac_file_in; do
23450       case $f in
23451       -) echo $tmp/stdin ;;
23452       [\\/$]*)
23453          # Absolute (can't be DOS-style, as IFS=:)
23454          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23455 echo "$as_me: error: cannot find input file: $f" >&2;}
23456    { (exit 1); exit 1; }; }
23457          echo "$f";;
23458       *) # Relative
23459          if test -f "$f"; then
23460            # Build tree
23461            echo "$f"
23462          elif test -f "$srcdir/$f"; then
23463            # Source tree
23464            echo "$srcdir/$f"
23465          else
23466            # /dev/null tree
23467            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23468 echo "$as_me: error: cannot find input file: $f" >&2;}
23469    { (exit 1); exit 1; }; }
23470          fi;;
23471       esac
23472     done` || { (exit 1); exit 1; }
23473 _ACEOF
23474 cat >>$CONFIG_STATUS <<_ACEOF
23475   sed "$ac_vpsub
23476 $extrasub
23477 _ACEOF
23478 cat >>$CONFIG_STATUS <<\_ACEOF
23479 :t
23480 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23481 s,@configure_input@,$configure_input,;t t
23482 s,@srcdir@,$ac_srcdir,;t t
23483 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23484 s,@top_srcdir@,$ac_top_srcdir,;t t
23485 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23486 s,@builddir@,$ac_builddir,;t t
23487 s,@abs_builddir@,$ac_abs_builddir,;t t
23488 s,@top_builddir@,$ac_top_builddir,;t t
23489 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23490 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23491   rm -f $tmp/stdin
23492   if test x"$ac_file" != x-; then
23493     mv $tmp/out $ac_file
23494   else
23495     cat $tmp/out
23496     rm -f $tmp/out
23497   fi
23498
23499 done
23500 _ACEOF
23501 cat >>$CONFIG_STATUS <<\_ACEOF
23502
23503 #
23504 # CONFIG_HEADER section.
23505 #
23506
23507 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23508 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23509 #
23510 # ac_d sets the value in "#define NAME VALUE" lines.
23511 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23512 ac_dB='[         ].*$,\1#\2'
23513 ac_dC=' '
23514 ac_dD=',;t'
23515 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23516 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23517 ac_uB='$,\1#\2define\3'
23518 ac_uC=' '
23519 ac_uD=',;t'
23520
23521 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23522   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23523   case $ac_file in
23524   - | *:- | *:-:* ) # input from stdin
23525         cat >$tmp/stdin
23526         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23527         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23528   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23529         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23530   * )   ac_file_in=$ac_file.in ;;
23531   esac
23532
23533   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23534 echo "$as_me: creating $ac_file" >&6;}
23535
23536   # First look for the input files in the build tree, otherwise in the
23537   # src tree.
23538   ac_file_inputs=`IFS=:
23539     for f in $ac_file_in; do
23540       case $f in
23541       -) echo $tmp/stdin ;;
23542       [\\/$]*)
23543          # Absolute (can't be DOS-style, as IFS=:)
23544          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23545 echo "$as_me: error: cannot find input file: $f" >&2;}
23546    { (exit 1); exit 1; }; }
23547          # Do quote $f, to prevent DOS paths from being IFS'd.
23548          echo "$f";;
23549       *) # Relative
23550          if test -f "$f"; then
23551            # Build tree
23552            echo "$f"
23553          elif test -f "$srcdir/$f"; then
23554            # Source tree
23555            echo "$srcdir/$f"
23556          else
23557            # /dev/null tree
23558            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23559 echo "$as_me: error: cannot find input file: $f" >&2;}
23560    { (exit 1); exit 1; }; }
23561          fi;;
23562       esac
23563     done` || { (exit 1); exit 1; }
23564   # Remove the trailing spaces.
23565   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23566
23567 _ACEOF
23568
23569 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23570 # `conftest.undefs', that substitutes the proper values into
23571 # config.h.in to produce config.h.  The first handles `#define'
23572 # templates, and the second `#undef' templates.
23573 # And first: Protect against being on the right side of a sed subst in
23574 # config.status.  Protect against being in an unquoted here document
23575 # in config.status.
23576 rm -f conftest.defines conftest.undefs
23577 # Using a here document instead of a string reduces the quoting nightmare.
23578 # Putting comments in sed scripts is not portable.
23579 #
23580 # `end' is used to avoid that the second main sed command (meant for
23581 # 0-ary CPP macros) applies to n-ary macro definitions.
23582 # See the Autoconf documentation for `clear'.
23583 cat >confdef2sed.sed <<\_ACEOF
23584 s/[\\&,]/\\&/g
23585 s,[\\$`],\\&,g
23586 t clear
23587 : clear
23588 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23589 t end
23590 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23591 : end
23592 _ACEOF
23593 # If some macros were called several times there might be several times
23594 # the same #defines, which is useless.  Nevertheless, we may not want to
23595 # sort them, since we want the *last* AC-DEFINE to be honored.
23596 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23597 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23598 rm -f confdef2sed.sed
23599
23600 # This sed command replaces #undef with comments.  This is necessary, for
23601 # example, in the case of _POSIX_SOURCE, which is predefined and required
23602 # on some systems where configure will not decide to define it.
23603 cat >>conftest.undefs <<\_ACEOF
23604 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23605 _ACEOF
23606
23607 # Break up conftest.defines because some shells have a limit on the size
23608 # of here documents, and old seds have small limits too (100 cmds).
23609 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23610 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23611 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23612 echo '  :' >>$CONFIG_STATUS
23613 rm -f conftest.tail
23614 while grep . conftest.defines >/dev/null
23615 do
23616   # Write a limited-size here document to $tmp/defines.sed.
23617   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23618   # Speed up: don't consider the non `#define' lines.
23619   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23620   # Work around the forget-to-reset-the-flag bug.
23621   echo 't clr' >>$CONFIG_STATUS
23622   echo ': clr' >>$CONFIG_STATUS
23623   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23624   echo 'CEOF
23625   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23626   rm -f $tmp/in
23627   mv $tmp/out $tmp/in
23628 ' >>$CONFIG_STATUS
23629   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23630   rm -f conftest.defines
23631   mv conftest.tail conftest.defines
23632 done
23633 rm -f conftest.defines
23634 echo '  fi # grep' >>$CONFIG_STATUS
23635 echo >>$CONFIG_STATUS
23636
23637 # Break up conftest.undefs because some shells have a limit on the size
23638 # of here documents, and old seds have small limits too (100 cmds).
23639 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23640 rm -f conftest.tail
23641 while grep . conftest.undefs >/dev/null
23642 do
23643   # Write a limited-size here document to $tmp/undefs.sed.
23644   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23645   # Speed up: don't consider the non `#undef'
23646   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23647   # Work around the forget-to-reset-the-flag bug.
23648   echo 't clr' >>$CONFIG_STATUS
23649   echo ': clr' >>$CONFIG_STATUS
23650   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23651   echo 'CEOF
23652   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23653   rm -f $tmp/in
23654   mv $tmp/out $tmp/in
23655 ' >>$CONFIG_STATUS
23656   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23657   rm -f conftest.undefs
23658   mv conftest.tail conftest.undefs
23659 done
23660 rm -f conftest.undefs
23661
23662 cat >>$CONFIG_STATUS <<\_ACEOF
23663   # Let's still pretend it is `configure' which instantiates (i.e., don't
23664   # use $as_me), people would be surprised to read:
23665   #    /* config.h.  Generated by config.status.  */
23666   if test x"$ac_file" = x-; then
23667     echo "/* Generated by configure.  */" >$tmp/config.h
23668   else
23669     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
23670   fi
23671   cat $tmp/in >>$tmp/config.h
23672   rm -f $tmp/in
23673   if test x"$ac_file" != x-; then
23674     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
23675       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23676 echo "$as_me: $ac_file is unchanged" >&6;}
23677     else
23678       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23679 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23680          X"$ac_file" : 'X\(//\)[^/]' \| \
23681          X"$ac_file" : 'X\(//\)$' \| \
23682          X"$ac_file" : 'X\(/\)' \| \
23683          .     : '\(.\)' 2>/dev/null ||
23684 echo X"$ac_file" |
23685     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23686           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23687           /^X\(\/\/\)$/{ s//\1/; q; }
23688           /^X\(\/\).*/{ s//\1/; q; }
23689           s/.*/./; q'`
23690       { if $as_mkdir_p; then
23691     mkdir -p "$ac_dir"
23692   else
23693     as_dir="$ac_dir"
23694     as_dirs=
23695     while test ! -d "$as_dir"; do
23696       as_dirs="$as_dir $as_dirs"
23697       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23698 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23699          X"$as_dir" : 'X\(//\)[^/]' \| \
23700          X"$as_dir" : 'X\(//\)$' \| \
23701          X"$as_dir" : 'X\(/\)' \| \
23702          .     : '\(.\)' 2>/dev/null ||
23703 echo X"$as_dir" |
23704     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23705           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23706           /^X\(\/\/\)$/{ s//\1/; q; }
23707           /^X\(\/\).*/{ s//\1/; q; }
23708           s/.*/./; q'`
23709     done
23710     test ! -n "$as_dirs" || mkdir $as_dirs
23711   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23712 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23713    { (exit 1); exit 1; }; }; }
23714
23715       rm -f $ac_file
23716       mv $tmp/config.h $ac_file
23717     fi
23718   else
23719     cat $tmp/config.h
23720     rm -f $tmp/config.h
23721   fi
23722   # Run the commands associated with the file.
23723   case $ac_file in
23724     src/include/pg_config.h )
23725 # Update timestamp for pg_config.h (see Makefile.global)
23726 echo >src/include/stamp-h
23727  ;;
23728   esac
23729 done
23730 _ACEOF
23731 cat >>$CONFIG_STATUS <<\_ACEOF
23732
23733 #
23734 # CONFIG_LINKS section.
23735 #
23736
23737 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23738   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23739   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23740
23741   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23742 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
23743
23744   if test ! -r $srcdir/$ac_source; then
23745     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23746 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23747    { (exit 1); exit 1; }; }
23748   fi
23749   rm -f $ac_dest
23750
23751   # Make relative symlinks.
23752   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
23753 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23754          X"$ac_dest" : 'X\(//\)[^/]' \| \
23755          X"$ac_dest" : 'X\(//\)$' \| \
23756          X"$ac_dest" : 'X\(/\)' \| \
23757          .     : '\(.\)' 2>/dev/null ||
23758 echo X"$ac_dest" |
23759     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23760           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23761           /^X\(\/\/\)$/{ s//\1/; q; }
23762           /^X\(\/\).*/{ s//\1/; q; }
23763           s/.*/./; q'`
23764   { if $as_mkdir_p; then
23765     mkdir -p "$ac_dest_dir"
23766   else
23767     as_dir="$ac_dest_dir"
23768     as_dirs=
23769     while test ! -d "$as_dir"; do
23770       as_dirs="$as_dir $as_dirs"
23771       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23772 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23773          X"$as_dir" : 'X\(//\)[^/]' \| \
23774          X"$as_dir" : 'X\(//\)$' \| \
23775          X"$as_dir" : 'X\(/\)' \| \
23776          .     : '\(.\)' 2>/dev/null ||
23777 echo X"$as_dir" |
23778     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23779           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23780           /^X\(\/\/\)$/{ s//\1/; q; }
23781           /^X\(\/\).*/{ s//\1/; q; }
23782           s/.*/./; q'`
23783     done
23784     test ! -n "$as_dirs" || mkdir $as_dirs
23785   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
23786 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
23787    { (exit 1); exit 1; }; }; }
23788
23789   ac_builddir=.
23790
23791 if test "$ac_dest_dir" != .; then
23792   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
23793   # A "../" for each directory in $ac_dir_suffix.
23794   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23795 else
23796   ac_dir_suffix= ac_top_builddir=
23797 fi
23798
23799 case $srcdir in
23800   .)  # No --srcdir option.  We are building in place.
23801     ac_srcdir=.
23802     if test -z "$ac_top_builddir"; then
23803        ac_top_srcdir=.
23804     else
23805        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23806     fi ;;
23807   [\\/]* | ?:[\\/]* )  # Absolute path.
23808     ac_srcdir=$srcdir$ac_dir_suffix;
23809     ac_top_srcdir=$srcdir ;;
23810   *) # Relative path.
23811     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23812     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23813 esac
23814
23815 # Do not use `cd foo && pwd` to compute absolute paths, because
23816 # the directories may not exist.
23817 case `pwd` in
23818 .) ac_abs_builddir="$ac_dest_dir";;
23819 *)
23820   case "$ac_dest_dir" in
23821   .) ac_abs_builddir=`pwd`;;
23822   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
23823   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
23824   esac;;
23825 esac
23826 case $ac_abs_builddir in
23827 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23828 *)
23829   case ${ac_top_builddir}. in
23830   .) ac_abs_top_builddir=$ac_abs_builddir;;
23831   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23832   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23833   esac;;
23834 esac
23835 case $ac_abs_builddir in
23836 .) ac_abs_srcdir=$ac_srcdir;;
23837 *)
23838   case $ac_srcdir in
23839   .) ac_abs_srcdir=$ac_abs_builddir;;
23840   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23841   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23842   esac;;
23843 esac
23844 case $ac_abs_builddir in
23845 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23846 *)
23847   case $ac_top_srcdir in
23848   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23849   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23850   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23851   esac;;
23852 esac
23853
23854
23855   case $srcdir in
23856   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
23857       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
23858   esac
23859
23860   # Try a symlink, then a hard link, then a copy.
23861   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
23862     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
23863     cp -p $srcdir/$ac_source $ac_dest ||
23864     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
23865 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
23866    { (exit 1); exit 1; }; }
23867 done
23868 _ACEOF
23869 cat >>$CONFIG_STATUS <<\_ACEOF
23870
23871 #
23872 # CONFIG_COMMANDS section.
23873 #
23874 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23875   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23876   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23877   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23878 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23879          X"$ac_dest" : 'X\(//\)[^/]' \| \
23880          X"$ac_dest" : 'X\(//\)$' \| \
23881          X"$ac_dest" : 'X\(/\)' \| \
23882          .     : '\(.\)' 2>/dev/null ||
23883 echo X"$ac_dest" |
23884     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23885           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23886           /^X\(\/\/\)$/{ s//\1/; q; }
23887           /^X\(\/\).*/{ s//\1/; q; }
23888           s/.*/./; q'`
23889   { if $as_mkdir_p; then
23890     mkdir -p "$ac_dir"
23891   else
23892     as_dir="$ac_dir"
23893     as_dirs=
23894     while test ! -d "$as_dir"; do
23895       as_dirs="$as_dir $as_dirs"
23896       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23897 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23898          X"$as_dir" : 'X\(//\)[^/]' \| \
23899          X"$as_dir" : 'X\(//\)$' \| \
23900          X"$as_dir" : 'X\(/\)' \| \
23901          .     : '\(.\)' 2>/dev/null ||
23902 echo X"$as_dir" |
23903     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23904           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23905           /^X\(\/\/\)$/{ s//\1/; q; }
23906           /^X\(\/\).*/{ s//\1/; q; }
23907           s/.*/./; q'`
23908     done
23909     test ! -n "$as_dirs" || mkdir $as_dirs
23910   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23911 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23912    { (exit 1); exit 1; }; }; }
23913
23914   ac_builddir=.
23915
23916 if test "$ac_dir" != .; then
23917   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23918   # A "../" for each directory in $ac_dir_suffix.
23919   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23920 else
23921   ac_dir_suffix= ac_top_builddir=
23922 fi
23923
23924 case $srcdir in
23925   .)  # No --srcdir option.  We are building in place.
23926     ac_srcdir=.
23927     if test -z "$ac_top_builddir"; then
23928        ac_top_srcdir=.
23929     else
23930        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23931     fi ;;
23932   [\\/]* | ?:[\\/]* )  # Absolute path.
23933     ac_srcdir=$srcdir$ac_dir_suffix;
23934     ac_top_srcdir=$srcdir ;;
23935   *) # Relative path.
23936     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23937     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23938 esac
23939
23940 # Do not use `cd foo && pwd` to compute absolute paths, because
23941 # the directories may not exist.
23942 case `pwd` in
23943 .) ac_abs_builddir="$ac_dir";;
23944 *)
23945   case "$ac_dir" in
23946   .) ac_abs_builddir=`pwd`;;
23947   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23948   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23949   esac;;
23950 esac
23951 case $ac_abs_builddir in
23952 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23953 *)
23954   case ${ac_top_builddir}. in
23955   .) ac_abs_top_builddir=$ac_abs_builddir;;
23956   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23957   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23958   esac;;
23959 esac
23960 case $ac_abs_builddir in
23961 .) ac_abs_srcdir=$ac_srcdir;;
23962 *)
23963   case $ac_srcdir in
23964   .) ac_abs_srcdir=$ac_abs_builddir;;
23965   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23966   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23967   esac;;
23968 esac
23969 case $ac_abs_builddir in
23970 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23971 *)
23972   case $ac_top_srcdir in
23973   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23974   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23975   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23976   esac;;
23977 esac
23978
23979
23980   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23981 echo "$as_me: executing $ac_dest commands" >&6;}
23982   case $ac_dest in
23983     check_win32_symlinks )
23984 # Links sometimes fail undetected on Mingw -
23985 # so here we detect it and warn the user
23986 for FILE in $CONFIG_LINKS
23987  do
23988         # test -e works for symlinks in the MinGW console
23989         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
23990 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
23991  done
23992  ;;
23993   esac
23994 done
23995 _ACEOF
23996
23997 cat >>$CONFIG_STATUS <<\_ACEOF
23998
23999 { (exit 0); exit 0; }
24000 _ACEOF
24001 chmod +x $CONFIG_STATUS
24002 ac_clean_files=$ac_clean_files_save
24003
24004
24005 # configure is writing to config.log, and then calls config.status.
24006 # config.status does its own redirection, appending to config.log.
24007 # Unfortunately, on DOS this fails, as config.log is still kept open
24008 # by configure, so config.status won't be able to write to it; its
24009 # output is simply discarded.  So we exec the FD to /dev/null,
24010 # effectively closing config.log, so it can be properly (re)opened and
24011 # appended to by config.status.  When coming back to configure, we
24012 # need to make the FD available again.
24013 if test "$no_create" != yes; then
24014   ac_cs_success=:
24015   ac_config_status_args=
24016   test "$silent" = yes &&
24017     ac_config_status_args="$ac_config_status_args --quiet"
24018   exec 5>/dev/null
24019   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24020   exec 5>>config.log
24021   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24022   # would make configure fail if this is the last instruction.
24023   $ac_cs_success || { (exit 1); exit 1; }
24024 fi
24025
24026