]> granicus.if.org Git - postgresql/blob - configure
Adjust configure's handling of libedit to not look for a history.h file.
[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.2beta1.
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-2006, 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.2beta1'
275 PACKAGE_STRING='PostgreSQL 8.2beta1'
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 DTRACE DTRACEFLAGS enable_dtrace 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_ldap 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 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 LDAP_LIBS_FE LDAP_LIBS_BE 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.2beta1 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.2beta1:";;
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-dtrace         build with DTrace support
869   --enable-depend         turn on automatic dependency tracking
870   --enable-cassert        enable assertion checks (for debugging)
871   --enable-thread-safety  make client libraries thread-safe
872   --enable-thread-safety-force  force thread-safety in spite of thread test failure
873   --disable-largefile     omit support for large files
874
875 Optional Packages:
876   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
877   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
878
879   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
880   --without-docdir        do not install the documentation
881   --with-includes=DIRS    look for additional header files in DIRS
882   --with-libraries=DIRS   look for additional libraries in DIRS
883   --with-libs=DIRS        alternative spelling of --with-libraries
884   --with-pgport=PORTNUM   change default port number [5432]
885   --with-tcl              build Tcl modules (PL/Tcl)
886   --with-tclconfig=DIR    tclConfig.sh is in DIR
887   --with-perl             build Perl modules (PL/Perl)
888   --with-python           build Python modules (PL/Python)
889   --with-krb5             build with Kerberos 5 support
890   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
891   --with-pam              build with PAM support
892   --with-ldap             build with LDAP support
893   --with-bonjour          build with Bonjour support
894   --with-openssl          build with OpenSSL support
895   --without-readline      do not use GNU Readline nor BSD Libedit for editing
896   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
897   --without-zlib          do not use Zlib
898   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
899
900 Some influential environment variables:
901   CC          C compiler command
902   CFLAGS      C compiler flags
903   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
904               nonstandard directory <lib dir>
905   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
906               headers in a nonstandard directory <include dir>
907   CPP         C preprocessor
908   LDFLAGS_SL
909   DOCBOOKSTYLE
910               location of DocBook stylesheets
911
912 Use these variables to override the choices made by `configure' or to help
913 it to find libraries and programs with nonstandard names/locations.
914
915 Report bugs to <pgsql-bugs@postgresql.org>.
916 _ACEOF
917 fi
918
919 if test "$ac_init_help" = "recursive"; then
920   # If there are subdirs, report their specific --help.
921   ac_popdir=`pwd`
922   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
923     test -d $ac_dir || continue
924     ac_builddir=.
925
926 if test "$ac_dir" != .; then
927   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
928   # A "../" for each directory in $ac_dir_suffix.
929   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
930 else
931   ac_dir_suffix= ac_top_builddir=
932 fi
933
934 case $srcdir in
935   .)  # No --srcdir option.  We are building in place.
936     ac_srcdir=.
937     if test -z "$ac_top_builddir"; then
938        ac_top_srcdir=.
939     else
940        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
941     fi ;;
942   [\\/]* | ?:[\\/]* )  # Absolute path.
943     ac_srcdir=$srcdir$ac_dir_suffix;
944     ac_top_srcdir=$srcdir ;;
945   *) # Relative path.
946     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
947     ac_top_srcdir=$ac_top_builddir$srcdir ;;
948 esac
949
950 # Do not use `cd foo && pwd` to compute absolute paths, because
951 # the directories may not exist.
952 case `pwd` in
953 .) ac_abs_builddir="$ac_dir";;
954 *)
955   case "$ac_dir" in
956   .) ac_abs_builddir=`pwd`;;
957   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
958   *) ac_abs_builddir=`pwd`/"$ac_dir";;
959   esac;;
960 esac
961 case $ac_abs_builddir in
962 .) ac_abs_top_builddir=${ac_top_builddir}.;;
963 *)
964   case ${ac_top_builddir}. in
965   .) ac_abs_top_builddir=$ac_abs_builddir;;
966   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
967   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
968   esac;;
969 esac
970 case $ac_abs_builddir in
971 .) ac_abs_srcdir=$ac_srcdir;;
972 *)
973   case $ac_srcdir in
974   .) ac_abs_srcdir=$ac_abs_builddir;;
975   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
976   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
977   esac;;
978 esac
979 case $ac_abs_builddir in
980 .) ac_abs_top_srcdir=$ac_top_srcdir;;
981 *)
982   case $ac_top_srcdir in
983   .) ac_abs_top_srcdir=$ac_abs_builddir;;
984   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
985   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
986   esac;;
987 esac
988
989     cd $ac_dir
990     # Check for guested configure; otherwise get Cygnus style configure.
991     if test -f $ac_srcdir/configure.gnu; then
992       echo
993       $SHELL $ac_srcdir/configure.gnu  --help=recursive
994     elif test -f $ac_srcdir/configure; then
995       echo
996       $SHELL $ac_srcdir/configure  --help=recursive
997     elif test -f $ac_srcdir/configure.ac ||
998            test -f $ac_srcdir/configure.in; then
999       echo
1000       $ac_configure --help
1001     else
1002       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1003     fi
1004     cd $ac_popdir
1005   done
1006 fi
1007
1008 test -n "$ac_init_help" && exit 0
1009 if $ac_init_version; then
1010   cat <<\_ACEOF
1011 PostgreSQL configure 8.2beta1
1012 generated by GNU Autoconf 2.59
1013
1014 Copyright (C) 2003 Free Software Foundation, Inc.
1015 This configure script is free software; the Free Software Foundation
1016 gives unlimited permission to copy, distribute and modify it.
1017
1018 Copyright (c) 1996-2006, PostgreSQL Global Development Group
1019 _ACEOF
1020   exit 0
1021 fi
1022 exec 5>config.log
1023 cat >&5 <<_ACEOF
1024 This file contains any messages produced by compilers while
1025 running configure, to aid debugging if configure makes a mistake.
1026
1027 It was created by PostgreSQL $as_me 8.2beta1, which was
1028 generated by GNU Autoconf 2.59.  Invocation command line was
1029
1030   $ $0 $@
1031
1032 _ACEOF
1033 {
1034 cat <<_ASUNAME
1035 ## --------- ##
1036 ## Platform. ##
1037 ## --------- ##
1038
1039 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1040 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1041 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1042 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1043 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1044
1045 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1046 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1047
1048 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1049 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1050 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1051 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1052 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1053 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1054 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1055
1056 _ASUNAME
1057
1058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1059 for as_dir in $PATH
1060 do
1061   IFS=$as_save_IFS
1062   test -z "$as_dir" && as_dir=.
1063   echo "PATH: $as_dir"
1064 done
1065
1066 } >&5
1067
1068 cat >&5 <<_ACEOF
1069
1070
1071 ## ----------- ##
1072 ## Core tests. ##
1073 ## ----------- ##
1074
1075 _ACEOF
1076
1077
1078 # Keep a trace of the command line.
1079 # Strip out --no-create and --no-recursion so they do not pile up.
1080 # Strip out --silent because we don't want to record it for future runs.
1081 # Also quote any args containing shell meta-characters.
1082 # Make two passes to allow for proper duplicate-argument suppression.
1083 ac_configure_args=
1084 ac_configure_args0=
1085 ac_configure_args1=
1086 ac_sep=
1087 ac_must_keep_next=false
1088 for ac_pass in 1 2
1089 do
1090   for ac_arg
1091   do
1092     case $ac_arg in
1093     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1094     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1095     | -silent | --silent | --silen | --sile | --sil)
1096       continue ;;
1097     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1098       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1099     esac
1100     case $ac_pass in
1101     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1102     2)
1103       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1104       if test $ac_must_keep_next = true; then
1105         ac_must_keep_next=false # Got value, back to normal.
1106       else
1107         case $ac_arg in
1108           *=* | --config-cache | -C | -disable-* | --disable-* \
1109           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1110           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1111           | -with-* | --with-* | -without-* | --without-* | --x)
1112             case "$ac_configure_args0 " in
1113               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1114             esac
1115             ;;
1116           -* ) ac_must_keep_next=true ;;
1117         esac
1118       fi
1119       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1120       # Get rid of the leading space.
1121       ac_sep=" "
1122       ;;
1123     esac
1124   done
1125 done
1126 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1127 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1128
1129 # When interrupted or exit'd, cleanup temporary files, and complete
1130 # config.log.  We remove comments because anyway the quotes in there
1131 # would cause problems or look ugly.
1132 # WARNING: Be sure not to use single quotes in there, as some shells,
1133 # such as our DU 5.0 friend, will then `close' the trap.
1134 trap 'exit_status=$?
1135   # Save into config.log some information that might help in debugging.
1136   {
1137     echo
1138
1139     cat <<\_ASBOX
1140 ## ---------------- ##
1141 ## Cache variables. ##
1142 ## ---------------- ##
1143 _ASBOX
1144     echo
1145     # The following way of writing the cache mishandles newlines in values,
1146 {
1147   (set) 2>&1 |
1148     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1149     *ac_space=\ *)
1150       sed -n \
1151         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1152           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1153       ;;
1154     *)
1155       sed -n \
1156         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1157       ;;
1158     esac;
1159 }
1160     echo
1161
1162     cat <<\_ASBOX
1163 ## ----------------- ##
1164 ## Output variables. ##
1165 ## ----------------- ##
1166 _ASBOX
1167     echo
1168     for ac_var in $ac_subst_vars
1169     do
1170       eval ac_val=$`echo $ac_var`
1171       echo "$ac_var='"'"'$ac_val'"'"'"
1172     done | sort
1173     echo
1174
1175     if test -n "$ac_subst_files"; then
1176       cat <<\_ASBOX
1177 ## ------------- ##
1178 ## Output files. ##
1179 ## ------------- ##
1180 _ASBOX
1181       echo
1182       for ac_var in $ac_subst_files
1183       do
1184         eval ac_val=$`echo $ac_var`
1185         echo "$ac_var='"'"'$ac_val'"'"'"
1186       done | sort
1187       echo
1188     fi
1189
1190     if test -s confdefs.h; then
1191       cat <<\_ASBOX
1192 ## ----------- ##
1193 ## confdefs.h. ##
1194 ## ----------- ##
1195 _ASBOX
1196       echo
1197       sed "/^$/d" confdefs.h | sort
1198       echo
1199     fi
1200     test "$ac_signal" != 0 &&
1201       echo "$as_me: caught signal $ac_signal"
1202     echo "$as_me: exit $exit_status"
1203   } >&5
1204   rm -f core *.core &&
1205   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1206     exit $exit_status
1207      ' 0
1208 for ac_signal in 1 2 13 15; do
1209   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1210 done
1211 ac_signal=0
1212
1213 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1214 rm -rf conftest* confdefs.h
1215 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1216 echo >confdefs.h
1217
1218 # Predefined preprocessor variables.
1219
1220 cat >>confdefs.h <<_ACEOF
1221 #define PACKAGE_NAME "$PACKAGE_NAME"
1222 _ACEOF
1223
1224
1225 cat >>confdefs.h <<_ACEOF
1226 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1227 _ACEOF
1228
1229
1230 cat >>confdefs.h <<_ACEOF
1231 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1232 _ACEOF
1233
1234
1235 cat >>confdefs.h <<_ACEOF
1236 #define PACKAGE_STRING "$PACKAGE_STRING"
1237 _ACEOF
1238
1239
1240 cat >>confdefs.h <<_ACEOF
1241 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1242 _ACEOF
1243
1244
1245 # Let the site file select an alternate cache file if it wants to.
1246 # Prefer explicitly selected file to automatically selected ones.
1247 if test -z "$CONFIG_SITE"; then
1248   if test "x$prefix" != xNONE; then
1249     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1250   else
1251     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1252   fi
1253 fi
1254 for ac_site_file in $CONFIG_SITE; do
1255   if test -r "$ac_site_file"; then
1256     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1257 echo "$as_me: loading site script $ac_site_file" >&6;}
1258     sed 's/^/| /' "$ac_site_file" >&5
1259     . "$ac_site_file"
1260   fi
1261 done
1262
1263 if test -r "$cache_file"; then
1264   # Some versions of bash will fail to source /dev/null (special
1265   # files actually), so we avoid doing that.
1266   if test -f "$cache_file"; then
1267     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1268 echo "$as_me: loading cache $cache_file" >&6;}
1269     case $cache_file in
1270       [\\/]* | ?:[\\/]* ) . $cache_file;;
1271       *)                      . ./$cache_file;;
1272     esac
1273   fi
1274 else
1275   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1276 echo "$as_me: creating cache $cache_file" >&6;}
1277   >$cache_file
1278 fi
1279
1280 # Check that the precious variables saved in the cache have kept the same
1281 # value.
1282 ac_cache_corrupted=false
1283 for ac_var in `(set) 2>&1 |
1284                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1285   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1286   eval ac_new_set=\$ac_env_${ac_var}_set
1287   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1288   eval ac_new_val="\$ac_env_${ac_var}_value"
1289   case $ac_old_set,$ac_new_set in
1290     set,)
1291       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1292 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1293       ac_cache_corrupted=: ;;
1294     ,set)
1295       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1296 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1297       ac_cache_corrupted=: ;;
1298     ,);;
1299     *)
1300       if test "x$ac_old_val" != "x$ac_new_val"; then
1301         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1302 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1303         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1304 echo "$as_me:   former value:  $ac_old_val" >&2;}
1305         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1306 echo "$as_me:   current value: $ac_new_val" >&2;}
1307         ac_cache_corrupted=:
1308       fi;;
1309   esac
1310   # Pass precious variables to config.status.
1311   if test "$ac_new_set" = set; then
1312     case $ac_new_val in
1313     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1314       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1315     *) ac_arg=$ac_var=$ac_new_val ;;
1316     esac
1317     case " $ac_configure_args " in
1318       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1319       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1320     esac
1321   fi
1322 done
1323 if $ac_cache_corrupted; then
1324   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1325 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1326   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1327 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1328    { (exit 1); exit 1; }; }
1329 fi
1330
1331 ac_ext=c
1332 ac_cpp='$CPP $CPPFLAGS'
1333 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1334 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1335 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367 ac_aux_dir=
1368 for ac_dir in config $srcdir/config; do
1369   if test -f $ac_dir/install-sh; then
1370     ac_aux_dir=$ac_dir
1371     ac_install_sh="$ac_aux_dir/install-sh -c"
1372     break
1373   elif test -f $ac_dir/install.sh; then
1374     ac_aux_dir=$ac_dir
1375     ac_install_sh="$ac_aux_dir/install.sh -c"
1376     break
1377   elif test -f $ac_dir/shtool; then
1378     ac_aux_dir=$ac_dir
1379     ac_install_sh="$ac_aux_dir/shtool install -c"
1380     break
1381   fi
1382 done
1383 if test -z "$ac_aux_dir"; then
1384   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1385 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1386    { (exit 1); exit 1; }; }
1387 fi
1388 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1389 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1390 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1391
1392
1393 configure_args=$ac_configure_args
1394
1395
1396
1397 cat >>confdefs.h <<_ACEOF
1398 #define PG_VERSION "$PACKAGE_VERSION"
1399 _ACEOF
1400
1401
1402 # Make sure we can run config.sub.
1403 $ac_config_sub sun4 >/dev/null 2>&1 ||
1404   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1405 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1406    { (exit 1); exit 1; }; }
1407
1408 echo "$as_me:$LINENO: checking build system type" >&5
1409 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1410 if test "${ac_cv_build+set}" = set; then
1411   echo $ECHO_N "(cached) $ECHO_C" >&6
1412 else
1413   ac_cv_build_alias=$build_alias
1414 test -z "$ac_cv_build_alias" &&
1415   ac_cv_build_alias=`$ac_config_guess`
1416 test -z "$ac_cv_build_alias" &&
1417   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1418 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1419    { (exit 1); exit 1; }; }
1420 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1421   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1422 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1423    { (exit 1); exit 1; }; }
1424
1425 fi
1426 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1427 echo "${ECHO_T}$ac_cv_build" >&6
1428 build=$ac_cv_build
1429 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1430 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1431 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1432
1433
1434 echo "$as_me:$LINENO: checking host system type" >&5
1435 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1436 if test "${ac_cv_host+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   ac_cv_host_alias=$host_alias
1440 test -z "$ac_cv_host_alias" &&
1441   ac_cv_host_alias=$ac_cv_build_alias
1442 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1443   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1444 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1445    { (exit 1); exit 1; }; }
1446
1447 fi
1448 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1449 echo "${ECHO_T}$ac_cv_host" >&6
1450 host=$ac_cv_host
1451 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1452 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1453 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1454
1455
1456
1457 template=
1458 echo "$as_me:$LINENO: checking which template to use" >&5
1459 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1460
1461
1462
1463
1464
1465 # Check whether --with-template or --without-template was given.
1466 if test "${with_template+set}" = set; then
1467   withval="$with_template"
1468
1469   case $withval in
1470     yes)
1471       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1472 echo "$as_me: error: argument required for --with-template option" >&2;}
1473    { (exit 1); exit 1; }; }
1474       ;;
1475     no)
1476       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1477 echo "$as_me: error: argument required for --with-template option" >&2;}
1478    { (exit 1); exit 1; }; }
1479       ;;
1480     *)
1481
1482   case $withval in
1483     list)   echo; ls "$srcdir/src/template"; exit;;
1484     *)      if test -f "$srcdir/src/template/$with_template" ; then
1485               template=$withval
1486             else
1487               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1488 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1489    { (exit 1); exit 1; }; }
1490             fi;;
1491   esac
1492
1493       ;;
1494   esac
1495
1496 else
1497
1498 # --with-template not given
1499
1500 case $host_os in
1501      aix*) template=aix ;;
1502     bsdi*) template=bsdi ;;
1503   cygwin*) template=cygwin ;;
1504   darwin*) template=darwin ;;
1505     dgux*) template=dgux ;;
1506  freebsd*) template=freebsd ;;
1507     hpux*) template=hpux ;;
1508     irix*) template=irix ;;
1509  linux*|gnu*|k*bsd*-gnu)
1510            template=linux ;;
1511    mingw*) template=win32 ;;
1512   netbsd*) template=netbsd ;;
1513 nextstep*) template=nextstep ;;
1514  openbsd*) template=openbsd ;;
1515      osf*) template=osf ;;
1516      sco*) template=sco ;;
1517  solaris*) template=solaris ;;
1518    sunos*) template=sunos4 ;;
1519  sysv4.2*)
1520         case $host_vendor in
1521           univel) template=univel ;;
1522         esac ;;
1523    sysv4*) template=svr4 ;;
1524    sysv5*) template=unixware ;;
1525   ultrix*) template=ultrix4 ;;
1526 esac
1527
1528   if test x"$template" = x"" ; then
1529     { { echo "$as_me:$LINENO: error:
1530 *******************************************************************
1531 PostgreSQL has apparently not been ported to your platform yet.
1532 To try a manual configuration, look into the src/template directory
1533 for a similar platform and use the '--with-template=' option.
1534
1535 Please also contact <pgsql-ports@postgresql.org> to see about
1536 rectifying this.  Include the above 'checking host system type...'
1537 line.
1538 *******************************************************************
1539 " >&5
1540 echo "$as_me: error:
1541 *******************************************************************
1542 PostgreSQL has apparently not been ported to your platform yet.
1543 To try a manual configuration, look into the src/template directory
1544 for a similar platform and use the '--with-template=' option.
1545
1546 Please also contact <pgsql-ports@postgresql.org> to see about
1547 rectifying this.  Include the above 'checking host system type...'
1548 line.
1549 *******************************************************************
1550 " >&2;}
1551    { (exit 1); exit 1; }; }
1552   fi
1553
1554
1555 fi;
1556
1557
1558 echo "$as_me:$LINENO: result: $template" >&5
1559 echo "${ECHO_T}$template" >&6
1560
1561 PORTNAME=$template
1562
1563
1564 # Initialize default assumption that we do not need separate assembly code
1565 # for TAS (test-and-set).  This can be overridden by the template file
1566 # when it's executed.
1567 need_tas=no
1568 tas_file=dummy.s
1569
1570
1571
1572 ##
1573 ## Command line options
1574 ##
1575
1576 #
1577 # Installation directory for documentation
1578 #
1579
1580
1581
1582
1583 # Check whether --with-docdir or --without-docdir was given.
1584 if test "${with_docdir+set}" = set; then
1585   withval="$with_docdir"
1586
1587   case $withval in
1588     yes)
1589       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1590 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1591    { (exit 1); exit 1; }; }
1592       ;;
1593     no)
1594       docdir=
1595       ;;
1596     *)
1597       docdir=$withval
1598       ;;
1599   esac
1600
1601 else
1602   docdir='${prefix}/doc'
1603 fi;
1604
1605
1606
1607
1608 #
1609 # Add non-standard directories to the include path
1610 #
1611
1612
1613
1614
1615 # Check whether --with-includes or --without-includes was given.
1616 if test "${with_includes+set}" = set; then
1617   withval="$with_includes"
1618
1619   case $withval in
1620     yes)
1621       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1622 echo "$as_me: error: argument required for --with-includes option" >&2;}
1623    { (exit 1); exit 1; }; }
1624       ;;
1625     no)
1626       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1627 echo "$as_me: error: argument required for --with-includes option" >&2;}
1628    { (exit 1); exit 1; }; }
1629       ;;
1630     *)
1631
1632       ;;
1633   esac
1634
1635 fi;
1636
1637
1638
1639 #
1640 # Add non-standard directories to the library search path
1641 #
1642
1643
1644
1645
1646 # Check whether --with-libraries or --without-libraries was given.
1647 if test "${with_libraries+set}" = set; then
1648   withval="$with_libraries"
1649
1650   case $withval in
1651     yes)
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     no)
1657       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1658 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1659    { (exit 1); exit 1; }; }
1660       ;;
1661     *)
1662       LIBRARY_DIRS=$withval
1663       ;;
1664   esac
1665
1666 fi;
1667
1668
1669
1670
1671
1672
1673 # Check whether --with-libs or --without-libs was given.
1674 if test "${with_libs+set}" = set; then
1675   withval="$with_libs"
1676
1677   case $withval in
1678     yes)
1679       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1680 echo "$as_me: error: argument required for --with-libs option" >&2;}
1681    { (exit 1); exit 1; }; }
1682       ;;
1683     no)
1684       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1685 echo "$as_me: error: argument required for --with-libs option" >&2;}
1686    { (exit 1); exit 1; }; }
1687       ;;
1688     *)
1689       LIBRARY_DIRS=$withval
1690       ;;
1691   esac
1692
1693 fi;
1694
1695
1696
1697 #
1698 # 64-bit integer date/time storage (--enable-integer-datetimes)
1699 #
1700 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1701 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1702
1703
1704
1705 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1706 if test "${enable_integer_datetimes+set}" = set; then
1707   enableval="$enable_integer_datetimes"
1708
1709   case $enableval in
1710     yes)
1711
1712 cat >>confdefs.h <<\_ACEOF
1713 #define USE_INTEGER_DATETIMES 1
1714 _ACEOF
1715
1716       ;;
1717     no)
1718       :
1719       ;;
1720     *)
1721       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1722 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1723    { (exit 1); exit 1; }; }
1724       ;;
1725   esac
1726
1727 else
1728   enable_integer_datetimes=no
1729
1730 fi;
1731
1732 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1733 echo "${ECHO_T}$enable_integer_datetimes" >&6
1734
1735
1736 #
1737 # NLS
1738 #
1739 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1740 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1741
1742
1743
1744 # Check whether --enable-nls or --disable-nls was given.
1745 if test "${enable_nls+set}" = set; then
1746   enableval="$enable_nls"
1747
1748   case $enableval in
1749     yes)
1750       :
1751       ;;
1752     no)
1753       :
1754       ;;
1755     *)
1756       enable_nls=yes
1757 WANTED_LANGUAGES=$enableval
1758       ;;
1759   esac
1760
1761 else
1762   enable_nls=no
1763 fi;
1764
1765
1766 if test "$enable_nls" = yes; then
1767
1768 cat >>confdefs.h <<\_ACEOF
1769 #define ENABLE_NLS 1
1770 _ACEOF
1771
1772 fi
1773
1774 echo "$as_me:$LINENO: result: $enable_nls" >&5
1775 echo "${ECHO_T}$enable_nls" >&6
1776
1777
1778
1779 #
1780 # Default port number (--with-pgport), default 5432
1781 #
1782 echo "$as_me:$LINENO: checking for default port number" >&5
1783 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1784
1785
1786
1787
1788 # Check whether --with-pgport or --without-pgport was given.
1789 if test "${with_pgport+set}" = set; then
1790   withval="$with_pgport"
1791
1792   case $withval in
1793     yes)
1794       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1795 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1796    { (exit 1); exit 1; }; }
1797       ;;
1798     no)
1799       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1800 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1801    { (exit 1); exit 1; }; }
1802       ;;
1803     *)
1804       default_port=$withval
1805       ;;
1806   esac
1807
1808 else
1809   default_port=5432
1810 fi;
1811
1812 echo "$as_me:$LINENO: result: $default_port" >&5
1813 echo "${ECHO_T}$default_port" >&6
1814 # Need both of these because some places want an integer and some a string
1815
1816 cat >>confdefs.h <<_ACEOF
1817 #define DEF_PGPORT ${default_port}
1818 _ACEOF
1819
1820
1821 cat >>confdefs.h <<_ACEOF
1822 #define DEF_PGPORT_STR "${default_port}"
1823 _ACEOF
1824
1825
1826
1827 #
1828 # Option to disable shared libraries
1829 #
1830
1831
1832
1833 # Check whether --enable-shared or --disable-shared was given.
1834 if test "${enable_shared+set}" = set; then
1835   enableval="$enable_shared"
1836
1837   case $enableval in
1838     yes)
1839       :
1840       ;;
1841     no)
1842       :
1843       ;;
1844     *)
1845       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1846 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1847    { (exit 1); exit 1; }; }
1848       ;;
1849   esac
1850
1851 else
1852   enable_shared=yes
1853
1854 fi;
1855
1856
1857
1858 #
1859 # '-rpath'-like feature can be disabled
1860 #
1861
1862
1863
1864 # Check whether --enable-rpath or --disable-rpath was given.
1865 if test "${enable_rpath+set}" = set; then
1866   enableval="$enable_rpath"
1867
1868   case $enableval in
1869     yes)
1870       :
1871       ;;
1872     no)
1873       :
1874       ;;
1875     *)
1876       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1877 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1878    { (exit 1); exit 1; }; }
1879       ;;
1880   esac
1881
1882 else
1883   enable_rpath=yes
1884
1885 fi;
1886
1887
1888
1889 #
1890 # Spinlocks
1891 #
1892
1893
1894
1895 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1896 if test "${enable_spinlocks+set}" = set; then
1897   enableval="$enable_spinlocks"
1898
1899   case $enableval in
1900     yes)
1901       :
1902       ;;
1903     no)
1904       :
1905       ;;
1906     *)
1907       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1908 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1909    { (exit 1); exit 1; }; }
1910       ;;
1911   esac
1912
1913 else
1914   enable_spinlocks=yes
1915
1916 fi;
1917
1918
1919 #
1920 # --enable-debug adds -g to compiler flags
1921 #
1922
1923
1924
1925 # Check whether --enable-debug or --disable-debug was given.
1926 if test "${enable_debug+set}" = set; then
1927   enableval="$enable_debug"
1928
1929   case $enableval in
1930     yes)
1931       :
1932       ;;
1933     no)
1934       :
1935       ;;
1936     *)
1937       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1938 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1939    { (exit 1); exit 1; }; }
1940       ;;
1941   esac
1942
1943 else
1944   enable_debug=no
1945
1946 fi;
1947
1948
1949
1950 #
1951 # DTrace
1952 #
1953
1954
1955
1956 # Check whether --enable-dtrace or --disable-dtrace was given.
1957 if test "${enable_dtrace+set}" = set; then
1958   enableval="$enable_dtrace"
1959
1960   case $enableval in
1961     yes)
1962
1963 cat >>confdefs.h <<\_ACEOF
1964 #define ENABLE_DTRACE 1
1965 _ACEOF
1966
1967 for ac_prog in dtrace
1968 do
1969   # Extract the first word of "$ac_prog", so it can be a program name with args.
1970 set dummy $ac_prog; ac_word=$2
1971 echo "$as_me:$LINENO: checking for $ac_word" >&5
1972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1973 if test "${ac_cv_prog_DTRACE+set}" = set; then
1974   echo $ECHO_N "(cached) $ECHO_C" >&6
1975 else
1976   if test -n "$DTRACE"; then
1977   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
1978 else
1979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1980 for as_dir in $PATH
1981 do
1982   IFS=$as_save_IFS
1983   test -z "$as_dir" && as_dir=.
1984   for ac_exec_ext in '' $ac_executable_extensions; do
1985   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1986     ac_cv_prog_DTRACE="$ac_prog"
1987     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1988     break 2
1989   fi
1990 done
1991 done
1992
1993 fi
1994 fi
1995 DTRACE=$ac_cv_prog_DTRACE
1996 if test -n "$DTRACE"; then
1997   echo "$as_me:$LINENO: result: $DTRACE" >&5
1998 echo "${ECHO_T}$DTRACE" >&6
1999 else
2000   echo "$as_me:$LINENO: result: no" >&5
2001 echo "${ECHO_T}no" >&6
2002 fi
2003
2004   test -n "$DTRACE" && break
2005 done
2006
2007 if test -z "$DTRACE"; then
2008   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2009 echo "$as_me: error: dtrace not found" >&2;}
2010    { (exit 1); exit 1; }; }
2011 fi
2012
2013       ;;
2014     no)
2015       :
2016       ;;
2017     *)
2018       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2019 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2020    { (exit 1); exit 1; }; }
2021       ;;
2022   esac
2023
2024 else
2025   enable_dtrace=no
2026
2027 fi;
2028
2029
2030
2031 #
2032 # C compiler
2033 #
2034
2035 # For historical reasons you can also use --with-CC to specify the C compiler
2036 # to use, although the standard way to do this is to set the CC environment
2037 # variable.
2038
2039
2040
2041
2042 # Check whether --with-CC or --without-CC was given.
2043 if test "${with_CC+set}" = set; then
2044   withval="$with_CC"
2045
2046   case $withval in
2047     yes)
2048       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2049 echo "$as_me: error: argument required for --with-CC option" >&2;}
2050    { (exit 1); exit 1; }; }
2051       ;;
2052     no)
2053       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2054 echo "$as_me: error: argument required for --with-CC option" >&2;}
2055    { (exit 1); exit 1; }; }
2056       ;;
2057     *)
2058       CC=$with_CC
2059       ;;
2060   esac
2061
2062 fi;
2063
2064
2065 case $template in
2066   aix) pgac_cc_list="gcc xlc";;
2067  irix) pgac_cc_list="cc";; # no gcc
2068     *) pgac_cc_list="gcc cc";;
2069 esac
2070
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 if test -n "$ac_tool_prefix"; then
2077   for ac_prog in $pgac_cc_list
2078   do
2079     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2080 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2081 echo "$as_me:$LINENO: checking for $ac_word" >&5
2082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2083 if test "${ac_cv_prog_CC+set}" = set; then
2084   echo $ECHO_N "(cached) $ECHO_C" >&6
2085 else
2086   if test -n "$CC"; then
2087   ac_cv_prog_CC="$CC" # Let the user override the test.
2088 else
2089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2090 for as_dir in $PATH
2091 do
2092   IFS=$as_save_IFS
2093   test -z "$as_dir" && as_dir=.
2094   for ac_exec_ext in '' $ac_executable_extensions; do
2095   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2096     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2097     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2098     break 2
2099   fi
2100 done
2101 done
2102
2103 fi
2104 fi
2105 CC=$ac_cv_prog_CC
2106 if test -n "$CC"; then
2107   echo "$as_me:$LINENO: result: $CC" >&5
2108 echo "${ECHO_T}$CC" >&6
2109 else
2110   echo "$as_me:$LINENO: result: no" >&5
2111 echo "${ECHO_T}no" >&6
2112 fi
2113
2114     test -n "$CC" && break
2115   done
2116 fi
2117 if test -z "$CC"; then
2118   ac_ct_CC=$CC
2119   for ac_prog in $pgac_cc_list
2120 do
2121   # Extract the first word of "$ac_prog", so it can be a program name with args.
2122 set dummy $ac_prog; ac_word=$2
2123 echo "$as_me:$LINENO: checking for $ac_word" >&5
2124 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2125 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2126   echo $ECHO_N "(cached) $ECHO_C" >&6
2127 else
2128   if test -n "$ac_ct_CC"; then
2129   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2130 else
2131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2132 for as_dir in $PATH
2133 do
2134   IFS=$as_save_IFS
2135   test -z "$as_dir" && as_dir=.
2136   for ac_exec_ext in '' $ac_executable_extensions; do
2137   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2138     ac_cv_prog_ac_ct_CC="$ac_prog"
2139     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2140     break 2
2141   fi
2142 done
2143 done
2144
2145 fi
2146 fi
2147 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2148 if test -n "$ac_ct_CC"; then
2149   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2150 echo "${ECHO_T}$ac_ct_CC" >&6
2151 else
2152   echo "$as_me:$LINENO: result: no" >&5
2153 echo "${ECHO_T}no" >&6
2154 fi
2155
2156   test -n "$ac_ct_CC" && break
2157 done
2158
2159   CC=$ac_ct_CC
2160 fi
2161
2162
2163 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2164 See \`config.log' for more details." >&5
2165 echo "$as_me: error: no acceptable C compiler found in \$PATH
2166 See \`config.log' for more details." >&2;}
2167    { (exit 1); exit 1; }; }
2168
2169 # Provide some information about the compiler.
2170 echo "$as_me:$LINENO:" \
2171      "checking for C compiler version" >&5
2172 ac_compiler=`set X $ac_compile; echo $2`
2173 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2174   (eval $ac_compiler --version </dev/null >&5) 2>&5
2175   ac_status=$?
2176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2177   (exit $ac_status); }
2178 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2179   (eval $ac_compiler -v </dev/null >&5) 2>&5
2180   ac_status=$?
2181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182   (exit $ac_status); }
2183 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2184   (eval $ac_compiler -V </dev/null >&5) 2>&5
2185   ac_status=$?
2186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187   (exit $ac_status); }
2188
2189 cat >conftest.$ac_ext <<_ACEOF
2190 /* confdefs.h.  */
2191 _ACEOF
2192 cat confdefs.h >>conftest.$ac_ext
2193 cat >>conftest.$ac_ext <<_ACEOF
2194 /* end confdefs.h.  */
2195
2196 int
2197 main ()
2198 {
2199
2200   ;
2201   return 0;
2202 }
2203 _ACEOF
2204 ac_clean_files_save=$ac_clean_files
2205 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2206 # Try to create an executable without -o first, disregard a.out.
2207 # It will help us diagnose broken compilers, and finding out an intuition
2208 # of exeext.
2209 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2210 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2211 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2212 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2213   (eval $ac_link_default) 2>&5
2214   ac_status=$?
2215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2216   (exit $ac_status); }; then
2217   # Find the output, starting from the most likely.  This scheme is
2218 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2219 # resort.
2220
2221 # Be careful to initialize this variable, since it used to be cached.
2222 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2223 ac_cv_exeext=
2224 # b.out is created by i960 compilers.
2225 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2226 do
2227   test -f "$ac_file" || continue
2228   case $ac_file in
2229     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2230         ;;
2231     conftest.$ac_ext )
2232         # This is the source file.
2233         ;;
2234     [ab].out )
2235         # We found the default executable, but exeext='' is most
2236         # certainly right.
2237         break;;
2238     *.* )
2239         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2240         # FIXME: I believe we export ac_cv_exeext for Libtool,
2241         # but it would be cool to find out if it's true.  Does anybody
2242         # maintain Libtool? --akim.
2243         export ac_cv_exeext
2244         break;;
2245     * )
2246         break;;
2247   esac
2248 done
2249 else
2250   echo "$as_me: failed program was:" >&5
2251 sed 's/^/| /' conftest.$ac_ext >&5
2252
2253 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2254 See \`config.log' for more details." >&5
2255 echo "$as_me: error: C compiler cannot create executables
2256 See \`config.log' for more details." >&2;}
2257    { (exit 77); exit 77; }; }
2258 fi
2259
2260 ac_exeext=$ac_cv_exeext
2261 echo "$as_me:$LINENO: result: $ac_file" >&5
2262 echo "${ECHO_T}$ac_file" >&6
2263
2264 # Check the compiler produces executables we can run.  If not, either
2265 # the compiler is broken, or we cross compile.
2266 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2267 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2268 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2269 # If not cross compiling, check that we can run a simple program.
2270 if test "$cross_compiling" != yes; then
2271   if { ac_try='./$ac_file'
2272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2273   (eval $ac_try) 2>&5
2274   ac_status=$?
2275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2276   (exit $ac_status); }; }; then
2277     cross_compiling=no
2278   else
2279     if test "$cross_compiling" = maybe; then
2280         cross_compiling=yes
2281     else
2282         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2283 If you meant to cross compile, use \`--host'.
2284 See \`config.log' for more details." >&5
2285 echo "$as_me: error: cannot run C compiled programs.
2286 If you meant to cross compile, use \`--host'.
2287 See \`config.log' for more details." >&2;}
2288    { (exit 1); exit 1; }; }
2289     fi
2290   fi
2291 fi
2292 echo "$as_me:$LINENO: result: yes" >&5
2293 echo "${ECHO_T}yes" >&6
2294
2295 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2296 ac_clean_files=$ac_clean_files_save
2297 # Check the compiler produces executables we can run.  If not, either
2298 # the compiler is broken, or we cross compile.
2299 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2300 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2301 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2302 echo "${ECHO_T}$cross_compiling" >&6
2303
2304 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2305 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2306 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2307   (eval $ac_link) 2>&5
2308   ac_status=$?
2309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2310   (exit $ac_status); }; then
2311   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2312 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2313 # work properly (i.e., refer to `conftest.exe'), while it won't with
2314 # `rm'.
2315 for ac_file in conftest.exe conftest conftest.*; do
2316   test -f "$ac_file" || continue
2317   case $ac_file in
2318     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2319     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2320           export ac_cv_exeext
2321           break;;
2322     * ) break;;
2323   esac
2324 done
2325 else
2326   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2327 See \`config.log' for more details." >&5
2328 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2329 See \`config.log' for more details." >&2;}
2330    { (exit 1); exit 1; }; }
2331 fi
2332
2333 rm -f conftest$ac_cv_exeext
2334 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2335 echo "${ECHO_T}$ac_cv_exeext" >&6
2336
2337 rm -f conftest.$ac_ext
2338 EXEEXT=$ac_cv_exeext
2339 ac_exeext=$EXEEXT
2340 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2341 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2342 if test "${ac_cv_objext+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345   cat >conftest.$ac_ext <<_ACEOF
2346 /* confdefs.h.  */
2347 _ACEOF
2348 cat confdefs.h >>conftest.$ac_ext
2349 cat >>conftest.$ac_ext <<_ACEOF
2350 /* end confdefs.h.  */
2351
2352 int
2353 main ()
2354 {
2355
2356   ;
2357   return 0;
2358 }
2359 _ACEOF
2360 rm -f conftest.o conftest.obj
2361 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2362   (eval $ac_compile) 2>&5
2363   ac_status=$?
2364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2365   (exit $ac_status); }; then
2366   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2367   case $ac_file in
2368     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2369     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2370        break;;
2371   esac
2372 done
2373 else
2374   echo "$as_me: failed program was:" >&5
2375 sed 's/^/| /' conftest.$ac_ext >&5
2376
2377 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2378 See \`config.log' for more details." >&5
2379 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2380 See \`config.log' for more details." >&2;}
2381    { (exit 1); exit 1; }; }
2382 fi
2383
2384 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2385 fi
2386 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2387 echo "${ECHO_T}$ac_cv_objext" >&6
2388 OBJEXT=$ac_cv_objext
2389 ac_objext=$OBJEXT
2390 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2391 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2392 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2393   echo $ECHO_N "(cached) $ECHO_C" >&6
2394 else
2395   cat >conftest.$ac_ext <<_ACEOF
2396 /* confdefs.h.  */
2397 _ACEOF
2398 cat confdefs.h >>conftest.$ac_ext
2399 cat >>conftest.$ac_ext <<_ACEOF
2400 /* end confdefs.h.  */
2401
2402 int
2403 main ()
2404 {
2405 #ifndef __GNUC__
2406        choke me
2407 #endif
2408
2409   ;
2410   return 0;
2411 }
2412 _ACEOF
2413 rm -f conftest.$ac_objext
2414 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2415   (eval $ac_compile) 2>conftest.er1
2416   ac_status=$?
2417   grep -v '^ *+' conftest.er1 >conftest.err
2418   rm -f conftest.er1
2419   cat conftest.err >&5
2420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2421   (exit $ac_status); } &&
2422          { ac_try='test -z "$ac_c_werror_flag"
2423                          || test ! -s conftest.err'
2424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2425   (eval $ac_try) 2>&5
2426   ac_status=$?
2427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2428   (exit $ac_status); }; } &&
2429          { ac_try='test -s conftest.$ac_objext'
2430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2431   (eval $ac_try) 2>&5
2432   ac_status=$?
2433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2434   (exit $ac_status); }; }; then
2435   ac_compiler_gnu=yes
2436 else
2437   echo "$as_me: failed program was:" >&5
2438 sed 's/^/| /' conftest.$ac_ext >&5
2439
2440 ac_compiler_gnu=no
2441 fi
2442 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2443 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2444
2445 fi
2446 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2447 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2448 GCC=`test $ac_compiler_gnu = yes && echo yes`
2449 ac_test_CFLAGS=${CFLAGS+set}
2450 ac_save_CFLAGS=$CFLAGS
2451 CFLAGS="-g"
2452 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2453 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2454 if test "${ac_cv_prog_cc_g+set}" = set; then
2455   echo $ECHO_N "(cached) $ECHO_C" >&6
2456 else
2457   cat >conftest.$ac_ext <<_ACEOF
2458 /* confdefs.h.  */
2459 _ACEOF
2460 cat confdefs.h >>conftest.$ac_ext
2461 cat >>conftest.$ac_ext <<_ACEOF
2462 /* end confdefs.h.  */
2463
2464 int
2465 main ()
2466 {
2467
2468   ;
2469   return 0;
2470 }
2471 _ACEOF
2472 rm -f conftest.$ac_objext
2473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2474   (eval $ac_compile) 2>conftest.er1
2475   ac_status=$?
2476   grep -v '^ *+' conftest.er1 >conftest.err
2477   rm -f conftest.er1
2478   cat conftest.err >&5
2479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2480   (exit $ac_status); } &&
2481          { ac_try='test -z "$ac_c_werror_flag"
2482                          || test ! -s conftest.err'
2483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2484   (eval $ac_try) 2>&5
2485   ac_status=$?
2486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2487   (exit $ac_status); }; } &&
2488          { ac_try='test -s conftest.$ac_objext'
2489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2490   (eval $ac_try) 2>&5
2491   ac_status=$?
2492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2493   (exit $ac_status); }; }; then
2494   ac_cv_prog_cc_g=yes
2495 else
2496   echo "$as_me: failed program was:" >&5
2497 sed 's/^/| /' conftest.$ac_ext >&5
2498
2499 ac_cv_prog_cc_g=no
2500 fi
2501 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2502 fi
2503 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2504 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2505 if test "$ac_test_CFLAGS" = set; then
2506   CFLAGS=$ac_save_CFLAGS
2507 elif test $ac_cv_prog_cc_g = yes; then
2508   if test "$GCC" = yes; then
2509     CFLAGS="-g -O2"
2510   else
2511     CFLAGS="-g"
2512   fi
2513 else
2514   if test "$GCC" = yes; then
2515     CFLAGS="-O2"
2516   else
2517     CFLAGS=
2518   fi
2519 fi
2520 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2521 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2522 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2523   echo $ECHO_N "(cached) $ECHO_C" >&6
2524 else
2525   ac_cv_prog_cc_stdc=no
2526 ac_save_CC=$CC
2527 cat >conftest.$ac_ext <<_ACEOF
2528 /* confdefs.h.  */
2529 _ACEOF
2530 cat confdefs.h >>conftest.$ac_ext
2531 cat >>conftest.$ac_ext <<_ACEOF
2532 /* end confdefs.h.  */
2533 #include <stdarg.h>
2534 #include <stdio.h>
2535 #include <sys/types.h>
2536 #include <sys/stat.h>
2537 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2538 struct buf { int x; };
2539 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2540 static char *e (p, i)
2541      char **p;
2542      int i;
2543 {
2544   return p[i];
2545 }
2546 static char *f (char * (*g) (char **, int), char **p, ...)
2547 {
2548   char *s;
2549   va_list v;
2550   va_start (v,p);
2551   s = g (p, va_arg (v,int));
2552   va_end (v);
2553   return s;
2554 }
2555
2556 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2557    function prototypes and stuff, but not '\xHH' hex character constants.
2558    These don't provoke an error unfortunately, instead are silently treated
2559    as 'x'.  The following induces an error, until -std1 is added to get
2560    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2561    array size at least.  It's necessary to write '\x00'==0 to get something
2562    that's true only with -std1.  */
2563 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2564
2565 int test (int i, double x);
2566 struct s1 {int (*f) (int a);};
2567 struct s2 {int (*f) (double a);};
2568 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2569 int argc;
2570 char **argv;
2571 int
2572 main ()
2573 {
2574 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2575   ;
2576   return 0;
2577 }
2578 _ACEOF
2579 # Don't try gcc -ansi; that turns off useful extensions and
2580 # breaks some systems' header files.
2581 # AIX                   -qlanglvl=ansi
2582 # Ultrix and OSF/1      -std1
2583 # HP-UX 10.20 and later -Ae
2584 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2585 # SVR4                  -Xc -D__EXTENSIONS__
2586 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2587 do
2588   CC="$ac_save_CC $ac_arg"
2589   rm -f conftest.$ac_objext
2590 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2591   (eval $ac_compile) 2>conftest.er1
2592   ac_status=$?
2593   grep -v '^ *+' conftest.er1 >conftest.err
2594   rm -f conftest.er1
2595   cat conftest.err >&5
2596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2597   (exit $ac_status); } &&
2598          { ac_try='test -z "$ac_c_werror_flag"
2599                          || test ! -s conftest.err'
2600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2601   (eval $ac_try) 2>&5
2602   ac_status=$?
2603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2604   (exit $ac_status); }; } &&
2605          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
2611   ac_cv_prog_cc_stdc=$ac_arg
2612 break
2613 else
2614   echo "$as_me: failed program was:" >&5
2615 sed 's/^/| /' conftest.$ac_ext >&5
2616
2617 fi
2618 rm -f conftest.err conftest.$ac_objext
2619 done
2620 rm -f conftest.$ac_ext conftest.$ac_objext
2621 CC=$ac_save_CC
2622
2623 fi
2624
2625 case "x$ac_cv_prog_cc_stdc" in
2626   x|xno)
2627     echo "$as_me:$LINENO: result: none needed" >&5
2628 echo "${ECHO_T}none needed" >&6 ;;
2629   *)
2630     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2631 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2632     CC="$CC $ac_cv_prog_cc_stdc" ;;
2633 esac
2634
2635 # Some people use a C++ compiler to compile C.  Since we use `exit',
2636 # in C++ we need to declare it.  In case someone uses the same compiler
2637 # for both compiling C and C++ we need to have the C++ compiler decide
2638 # the declaration of exit, since it's the most demanding environment.
2639 cat >conftest.$ac_ext <<_ACEOF
2640 #ifndef __cplusplus
2641   choke me
2642 #endif
2643 _ACEOF
2644 rm -f conftest.$ac_objext
2645 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2646   (eval $ac_compile) 2>conftest.er1
2647   ac_status=$?
2648   grep -v '^ *+' conftest.er1 >conftest.err
2649   rm -f conftest.er1
2650   cat conftest.err >&5
2651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652   (exit $ac_status); } &&
2653          { ac_try='test -z "$ac_c_werror_flag"
2654                          || test ! -s conftest.err'
2655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2656   (eval $ac_try) 2>&5
2657   ac_status=$?
2658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2659   (exit $ac_status); }; } &&
2660          { ac_try='test -s conftest.$ac_objext'
2661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2662   (eval $ac_try) 2>&5
2663   ac_status=$?
2664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2665   (exit $ac_status); }; }; then
2666   for ac_declaration in \
2667    '' \
2668    'extern "C" void std::exit (int) throw (); using std::exit;' \
2669    'extern "C" void std::exit (int); using std::exit;' \
2670    'extern "C" void exit (int) throw ();' \
2671    'extern "C" void exit (int);' \
2672    'void exit (int);'
2673 do
2674   cat >conftest.$ac_ext <<_ACEOF
2675 /* confdefs.h.  */
2676 _ACEOF
2677 cat confdefs.h >>conftest.$ac_ext
2678 cat >>conftest.$ac_ext <<_ACEOF
2679 /* end confdefs.h.  */
2680 $ac_declaration
2681 #include <stdlib.h>
2682 int
2683 main ()
2684 {
2685 exit (42);
2686   ;
2687   return 0;
2688 }
2689 _ACEOF
2690 rm -f conftest.$ac_objext
2691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2692   (eval $ac_compile) 2>conftest.er1
2693   ac_status=$?
2694   grep -v '^ *+' conftest.er1 >conftest.err
2695   rm -f conftest.er1
2696   cat conftest.err >&5
2697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2698   (exit $ac_status); } &&
2699          { ac_try='test -z "$ac_c_werror_flag"
2700                          || test ! -s conftest.err'
2701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2702   (eval $ac_try) 2>&5
2703   ac_status=$?
2704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2705   (exit $ac_status); }; } &&
2706          { ac_try='test -s conftest.$ac_objext'
2707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2708   (eval $ac_try) 2>&5
2709   ac_status=$?
2710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2711   (exit $ac_status); }; }; then
2712   :
2713 else
2714   echo "$as_me: failed program was:" >&5
2715 sed 's/^/| /' conftest.$ac_ext >&5
2716
2717 continue
2718 fi
2719 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2720   cat >conftest.$ac_ext <<_ACEOF
2721 /* confdefs.h.  */
2722 _ACEOF
2723 cat confdefs.h >>conftest.$ac_ext
2724 cat >>conftest.$ac_ext <<_ACEOF
2725 /* end confdefs.h.  */
2726 $ac_declaration
2727 int
2728 main ()
2729 {
2730 exit (42);
2731   ;
2732   return 0;
2733 }
2734 _ACEOF
2735 rm -f conftest.$ac_objext
2736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2737   (eval $ac_compile) 2>conftest.er1
2738   ac_status=$?
2739   grep -v '^ *+' conftest.er1 >conftest.err
2740   rm -f conftest.er1
2741   cat conftest.err >&5
2742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2743   (exit $ac_status); } &&
2744          { ac_try='test -z "$ac_c_werror_flag"
2745                          || test ! -s conftest.err'
2746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2747   (eval $ac_try) 2>&5
2748   ac_status=$?
2749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2750   (exit $ac_status); }; } &&
2751          { ac_try='test -s conftest.$ac_objext'
2752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2753   (eval $ac_try) 2>&5
2754   ac_status=$?
2755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2756   (exit $ac_status); }; }; then
2757   break
2758 else
2759   echo "$as_me: failed program was:" >&5
2760 sed 's/^/| /' conftest.$ac_ext >&5
2761
2762 fi
2763 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2764 done
2765 rm -f conftest*
2766 if test -n "$ac_declaration"; then
2767   echo '#ifdef __cplusplus' >>confdefs.h
2768   echo $ac_declaration      >>confdefs.h
2769   echo '#endif'             >>confdefs.h
2770 fi
2771
2772 else
2773   echo "$as_me: failed program was:" >&5
2774 sed 's/^/| /' conftest.$ac_ext >&5
2775
2776 fi
2777 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783
2784
2785 unset CFLAGS
2786
2787 #
2788 # Read the template
2789 #
2790 . "$srcdir/src/template/$template" || exit
2791
2792 # CFLAGS are selected so:
2793 # If the user specifies something in the environment, that is used.
2794 # else:  If the template file set something, that is used.
2795 # else:  If the compiler is GCC, then we use -O2.
2796 # else:  If the compiler is something else, then we use -0.
2797
2798 if test "$ac_env_CFLAGS_set" = set; then
2799   CFLAGS=$ac_env_CFLAGS_value
2800 elif test "${CFLAGS+set}" = set; then
2801   : # (keep what template set)
2802 elif test "$GCC" = yes; then
2803   CFLAGS="-O2"
2804 else
2805   # if the user selected debug mode, don't use -O
2806   if test "$enable_debug" != yes; then
2807     CFLAGS="-O"
2808   fi
2809 fi
2810
2811 # Some versions of GCC support some additional useful warning flags.
2812 # Check whether they are supported, and add them to CFLAGS if so.
2813
2814 if test "$GCC" = yes; then
2815
2816 # ICC pretends to be GCC but it's lying; it doesn't support these options.
2817 # So we have to check if "GCC" is really ICC.
2818
2819 cat >conftest.$ac_ext <<_ACEOF
2820 /* confdefs.h.  */
2821 _ACEOF
2822 cat confdefs.h >>conftest.$ac_ext
2823 cat >>conftest.$ac_ext <<_ACEOF
2824 /* end confdefs.h.  */
2825
2826 int
2827 main ()
2828 {
2829 #ifndef __INTEL_COMPILER
2830 choke me
2831 #endif
2832   ;
2833   return 0;
2834 }
2835 _ACEOF
2836 rm -f conftest.$ac_objext
2837 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2838   (eval $ac_compile) 2>conftest.er1
2839   ac_status=$?
2840   grep -v '^ *+' conftest.er1 >conftest.err
2841   rm -f conftest.er1
2842   cat conftest.err >&5
2843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2844   (exit $ac_status); } &&
2845          { ac_try='test -z "$ac_c_werror_flag"
2846                          || test ! -s conftest.err'
2847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2848   (eval $ac_try) 2>&5
2849   ac_status=$?
2850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851   (exit $ac_status); }; } &&
2852          { ac_try='test -s conftest.$ac_objext'
2853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2854   (eval $ac_try) 2>&5
2855   ac_status=$?
2856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2857   (exit $ac_status); }; }; then
2858   ICC=yes
2859 else
2860   echo "$as_me: failed program was:" >&5
2861 sed 's/^/| /' conftest.$ac_ext >&5
2862
2863 ICC=no
2864 fi
2865 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2866
2867   if test "$ICC" = no; then
2868     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2869
2870     echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2871 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2872 pgac_save_CFLAGS=$CFLAGS
2873 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2874 cat >conftest.$ac_ext <<_ACEOF
2875 /* confdefs.h.  */
2876 _ACEOF
2877 cat confdefs.h >>conftest.$ac_ext
2878 cat >>conftest.$ac_ext <<_ACEOF
2879 /* end confdefs.h.  */
2880
2881 int
2882 main ()
2883 {
2884
2885   ;
2886   return 0;
2887 }
2888 _ACEOF
2889 rm -f conftest.$ac_objext
2890 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2891   (eval $ac_compile) 2>conftest.er1
2892   ac_status=$?
2893   grep -v '^ *+' conftest.er1 >conftest.err
2894   rm -f conftest.er1
2895   cat conftest.err >&5
2896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2897   (exit $ac_status); } &&
2898          { ac_try='test -z "$ac_c_werror_flag"
2899                          || test ! -s conftest.err'
2900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2901   (eval $ac_try) 2>&5
2902   ac_status=$?
2903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2904   (exit $ac_status); }; } &&
2905          { ac_try='test -s conftest.$ac_objext'
2906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2907   (eval $ac_try) 2>&5
2908   ac_status=$?
2909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2910   (exit $ac_status); }; }; then
2911   echo "$as_me:$LINENO: result: yes" >&5
2912 echo "${ECHO_T}yes" >&6
2913 else
2914   echo "$as_me: failed program was:" >&5
2915 sed 's/^/| /' conftest.$ac_ext >&5
2916
2917 CFLAGS="$pgac_save_CFLAGS"
2918                     echo "$as_me:$LINENO: result: no" >&5
2919 echo "${ECHO_T}no" >&6
2920 fi
2921 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2922
2923     echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2924 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2925 pgac_save_CFLAGS=$CFLAGS
2926 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2927 cat >conftest.$ac_ext <<_ACEOF
2928 /* confdefs.h.  */
2929 _ACEOF
2930 cat confdefs.h >>conftest.$ac_ext
2931 cat >>conftest.$ac_ext <<_ACEOF
2932 /* end confdefs.h.  */
2933
2934 int
2935 main ()
2936 {
2937
2938   ;
2939   return 0;
2940 }
2941 _ACEOF
2942 rm -f conftest.$ac_objext
2943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2944   (eval $ac_compile) 2>conftest.er1
2945   ac_status=$?
2946   grep -v '^ *+' conftest.er1 >conftest.err
2947   rm -f conftest.er1
2948   cat conftest.err >&5
2949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950   (exit $ac_status); } &&
2951          { ac_try='test -z "$ac_c_werror_flag"
2952                          || test ! -s conftest.err'
2953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2954   (eval $ac_try) 2>&5
2955   ac_status=$?
2956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957   (exit $ac_status); }; } &&
2958          { ac_try='test -s conftest.$ac_objext'
2959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2960   (eval $ac_try) 2>&5
2961   ac_status=$?
2962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2963   (exit $ac_status); }; }; then
2964   echo "$as_me:$LINENO: result: yes" >&5
2965 echo "${ECHO_T}yes" >&6
2966 else
2967   echo "$as_me: failed program was:" >&5
2968 sed 's/^/| /' conftest.$ac_ext >&5
2969
2970 CFLAGS="$pgac_save_CFLAGS"
2971                     echo "$as_me:$LINENO: result: no" >&5
2972 echo "${ECHO_T}no" >&6
2973 fi
2974 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2975
2976   else
2977     # Intel compiler has a bug/misoptimization in checking for
2978     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
2979     # CFLAGS.
2980     echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
2981 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6
2982 pgac_save_CFLAGS=$CFLAGS
2983 CFLAGS="$pgac_save_CFLAGS -mp1"
2984 cat >conftest.$ac_ext <<_ACEOF
2985 /* confdefs.h.  */
2986 _ACEOF
2987 cat confdefs.h >>conftest.$ac_ext
2988 cat >>conftest.$ac_ext <<_ACEOF
2989 /* end confdefs.h.  */
2990
2991 int
2992 main ()
2993 {
2994
2995   ;
2996   return 0;
2997 }
2998 _ACEOF
2999 rm -f conftest.$ac_objext
3000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3001   (eval $ac_compile) 2>conftest.er1
3002   ac_status=$?
3003   grep -v '^ *+' conftest.er1 >conftest.err
3004   rm -f conftest.er1
3005   cat conftest.err >&5
3006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3007   (exit $ac_status); } &&
3008          { ac_try='test -z "$ac_c_werror_flag"
3009                          || test ! -s conftest.err'
3010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3011   (eval $ac_try) 2>&5
3012   ac_status=$?
3013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3014   (exit $ac_status); }; } &&
3015          { ac_try='test -s conftest.$ac_objext'
3016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3017   (eval $ac_try) 2>&5
3018   ac_status=$?
3019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3020   (exit $ac_status); }; }; then
3021   echo "$as_me:$LINENO: result: yes" >&5
3022 echo "${ECHO_T}yes" >&6
3023 else
3024   echo "$as_me: failed program was:" >&5
3025 sed 's/^/| /' conftest.$ac_ext >&5
3026
3027 CFLAGS="$pgac_save_CFLAGS"
3028                     echo "$as_me:$LINENO: result: no" >&5
3029 echo "${ECHO_T}no" >&6
3030 fi
3031 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3032
3033   fi
3034
3035   # Disable strict-aliasing rules; needed for gcc 3.3+
3036   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3037 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
3038 pgac_save_CFLAGS=$CFLAGS
3039 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3040 cat >conftest.$ac_ext <<_ACEOF
3041 /* confdefs.h.  */
3042 _ACEOF
3043 cat confdefs.h >>conftest.$ac_ext
3044 cat >>conftest.$ac_ext <<_ACEOF
3045 /* end confdefs.h.  */
3046
3047 int
3048 main ()
3049 {
3050
3051   ;
3052   return 0;
3053 }
3054 _ACEOF
3055 rm -f conftest.$ac_objext
3056 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3057   (eval $ac_compile) 2>conftest.er1
3058   ac_status=$?
3059   grep -v '^ *+' conftest.er1 >conftest.err
3060   rm -f conftest.er1
3061   cat conftest.err >&5
3062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3063   (exit $ac_status); } &&
3064          { ac_try='test -z "$ac_c_werror_flag"
3065                          || test ! -s conftest.err'
3066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3067   (eval $ac_try) 2>&5
3068   ac_status=$?
3069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3070   (exit $ac_status); }; } &&
3071          { ac_try='test -s conftest.$ac_objext'
3072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3073   (eval $ac_try) 2>&5
3074   ac_status=$?
3075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3076   (exit $ac_status); }; }; then
3077   echo "$as_me:$LINENO: result: yes" >&5
3078 echo "${ECHO_T}yes" >&6
3079 else
3080   echo "$as_me: failed program was:" >&5
3081 sed 's/^/| /' conftest.$ac_ext >&5
3082
3083 CFLAGS="$pgac_save_CFLAGS"
3084                     echo "$as_me:$LINENO: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3086 fi
3087 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3088
3089 elif test x"${CC}" = x"xlc"; then
3090   # AIX xlc has to have strict aliasing turned off too
3091   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3092 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
3093 pgac_save_CFLAGS=$CFLAGS
3094 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3095 cat >conftest.$ac_ext <<_ACEOF
3096 /* confdefs.h.  */
3097 _ACEOF
3098 cat confdefs.h >>conftest.$ac_ext
3099 cat >>conftest.$ac_ext <<_ACEOF
3100 /* end confdefs.h.  */
3101
3102 int
3103 main ()
3104 {
3105
3106   ;
3107   return 0;
3108 }
3109 _ACEOF
3110 rm -f conftest.$ac_objext
3111 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3112   (eval $ac_compile) 2>conftest.er1
3113   ac_status=$?
3114   grep -v '^ *+' conftest.er1 >conftest.err
3115   rm -f conftest.er1
3116   cat conftest.err >&5
3117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3118   (exit $ac_status); } &&
3119          { ac_try='test -z "$ac_c_werror_flag"
3120                          || test ! -s conftest.err'
3121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3122   (eval $ac_try) 2>&5
3123   ac_status=$?
3124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3125   (exit $ac_status); }; } &&
3126          { ac_try='test -s conftest.$ac_objext'
3127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3128   (eval $ac_try) 2>&5
3129   ac_status=$?
3130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3131   (exit $ac_status); }; }; then
3132   echo "$as_me:$LINENO: result: yes" >&5
3133 echo "${ECHO_T}yes" >&6
3134 else
3135   echo "$as_me: failed program was:" >&5
3136 sed 's/^/| /' conftest.$ac_ext >&5
3137
3138 CFLAGS="$pgac_save_CFLAGS"
3139                     echo "$as_me:$LINENO: result: no" >&5
3140 echo "${ECHO_T}no" >&6
3141 fi
3142 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3143
3144 fi
3145
3146 # supply -g if --enable-debug
3147 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3148   CFLAGS="$CFLAGS -g"
3149 fi
3150
3151 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3152 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3153
3154 # We already have this in Makefile.win32, but configure needs it too
3155 if test "$PORTNAME" = "win32"; then
3156   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3157 fi
3158
3159 # Check if the compiler still works with the template settings
3160 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3161 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
3162 cat >conftest.$ac_ext <<_ACEOF
3163 /* confdefs.h.  */
3164 _ACEOF
3165 cat confdefs.h >>conftest.$ac_ext
3166 cat >>conftest.$ac_ext <<_ACEOF
3167 /* end confdefs.h.  */
3168
3169 int
3170 main ()
3171 {
3172 return 0;
3173   ;
3174   return 0;
3175 }
3176 _ACEOF
3177 rm -f conftest.$ac_objext conftest$ac_exeext
3178 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3179   (eval $ac_link) 2>conftest.er1
3180   ac_status=$?
3181   grep -v '^ *+' conftest.er1 >conftest.err
3182   rm -f conftest.er1
3183   cat conftest.err >&5
3184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3185   (exit $ac_status); } &&
3186          { ac_try='test -z "$ac_c_werror_flag"
3187                          || test ! -s conftest.err'
3188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3189   (eval $ac_try) 2>&5
3190   ac_status=$?
3191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3192   (exit $ac_status); }; } &&
3193          { ac_try='test -s conftest$ac_exeext'
3194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3195   (eval $ac_try) 2>&5
3196   ac_status=$?
3197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3198   (exit $ac_status); }; }; then
3199   echo "$as_me:$LINENO: result: yes" >&5
3200 echo "${ECHO_T}yes" >&6
3201 else
3202   echo "$as_me: failed program was:" >&5
3203 sed 's/^/| /' conftest.$ac_ext >&5
3204
3205 echo "$as_me:$LINENO: result: no" >&5
3206 echo "${ECHO_T}no" >&6
3207    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3208 echo "$as_me: error: cannot proceed" >&2;}
3209    { (exit 1); exit 1; }; }
3210 fi
3211 rm -f conftest.err conftest.$ac_objext \
3212       conftest$ac_exeext conftest.$ac_ext
3213
3214 # Defend against gcc -ffast-math
3215 if test "$GCC" = yes; then
3216 cat >conftest.$ac_ext <<_ACEOF
3217 /* confdefs.h.  */
3218 _ACEOF
3219 cat confdefs.h >>conftest.$ac_ext
3220 cat >>conftest.$ac_ext <<_ACEOF
3221 /* end confdefs.h.  */
3222
3223 int
3224 main ()
3225 {
3226 #ifdef __FAST_MATH__
3227 choke me
3228 #endif
3229   ;
3230   return 0;
3231 }
3232 _ACEOF
3233 rm -f conftest.$ac_objext
3234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3235   (eval $ac_compile) 2>conftest.er1
3236   ac_status=$?
3237   grep -v '^ *+' conftest.er1 >conftest.err
3238   rm -f conftest.er1
3239   cat conftest.err >&5
3240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3241   (exit $ac_status); } &&
3242          { ac_try='test -z "$ac_c_werror_flag"
3243                          || test ! -s conftest.err'
3244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3245   (eval $ac_try) 2>&5
3246   ac_status=$?
3247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3248   (exit $ac_status); }; } &&
3249          { ac_try='test -s conftest.$ac_objext'
3250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3251   (eval $ac_try) 2>&5
3252   ac_status=$?
3253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3254   (exit $ac_status); }; }; then
3255   :
3256 else
3257   echo "$as_me: failed program was:" >&5
3258 sed 's/^/| /' conftest.$ac_ext >&5
3259
3260 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3261 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3262    { (exit 1); exit 1; }; }
3263 fi
3264 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3265 fi
3266
3267 ac_ext=c
3268 ac_cpp='$CPP $CPPFLAGS'
3269 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3270 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3271 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3272 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3273 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3274 # On Suns, sometimes $CPP names a directory.
3275 if test -n "$CPP" && test -d "$CPP"; then
3276   CPP=
3277 fi
3278 if test -z "$CPP"; then
3279   if test "${ac_cv_prog_CPP+set}" = set; then
3280   echo $ECHO_N "(cached) $ECHO_C" >&6
3281 else
3282       # Double quotes because CPP needs to be expanded
3283     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3284     do
3285       ac_preproc_ok=false
3286 for ac_c_preproc_warn_flag in '' yes
3287 do
3288   # Use a header file that comes with gcc, so configuring glibc
3289   # with a fresh cross-compiler works.
3290   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3291   # <limits.h> exists even on freestanding compilers.
3292   # On the NeXT, cc -E runs the code through the compiler's parser,
3293   # not just through cpp. "Syntax error" is here to catch this case.
3294   cat >conftest.$ac_ext <<_ACEOF
3295 /* confdefs.h.  */
3296 _ACEOF
3297 cat confdefs.h >>conftest.$ac_ext
3298 cat >>conftest.$ac_ext <<_ACEOF
3299 /* end confdefs.h.  */
3300 #ifdef __STDC__
3301 # include <limits.h>
3302 #else
3303 # include <assert.h>
3304 #endif
3305                      Syntax error
3306 _ACEOF
3307 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3309   ac_status=$?
3310   grep -v '^ *+' conftest.er1 >conftest.err
3311   rm -f conftest.er1
3312   cat conftest.err >&5
3313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3314   (exit $ac_status); } >/dev/null; then
3315   if test -s conftest.err; then
3316     ac_cpp_err=$ac_c_preproc_warn_flag
3317     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3318   else
3319     ac_cpp_err=
3320   fi
3321 else
3322   ac_cpp_err=yes
3323 fi
3324 if test -z "$ac_cpp_err"; then
3325   :
3326 else
3327   echo "$as_me: failed program was:" >&5
3328 sed 's/^/| /' conftest.$ac_ext >&5
3329
3330   # Broken: fails on valid input.
3331 continue
3332 fi
3333 rm -f conftest.err conftest.$ac_ext
3334
3335   # OK, works on sane cases.  Now check whether non-existent headers
3336   # can be detected and how.
3337   cat >conftest.$ac_ext <<_ACEOF
3338 /* confdefs.h.  */
3339 _ACEOF
3340 cat confdefs.h >>conftest.$ac_ext
3341 cat >>conftest.$ac_ext <<_ACEOF
3342 /* end confdefs.h.  */
3343 #include <ac_nonexistent.h>
3344 _ACEOF
3345 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3347   ac_status=$?
3348   grep -v '^ *+' conftest.er1 >conftest.err
3349   rm -f conftest.er1
3350   cat conftest.err >&5
3351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3352   (exit $ac_status); } >/dev/null; then
3353   if test -s conftest.err; then
3354     ac_cpp_err=$ac_c_preproc_warn_flag
3355     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3356   else
3357     ac_cpp_err=
3358   fi
3359 else
3360   ac_cpp_err=yes
3361 fi
3362 if test -z "$ac_cpp_err"; then
3363   # Broken: success on invalid input.
3364 continue
3365 else
3366   echo "$as_me: failed program was:" >&5
3367 sed 's/^/| /' conftest.$ac_ext >&5
3368
3369   # Passes both tests.
3370 ac_preproc_ok=:
3371 break
3372 fi
3373 rm -f conftest.err conftest.$ac_ext
3374
3375 done
3376 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3377 rm -f conftest.err conftest.$ac_ext
3378 if $ac_preproc_ok; then
3379   break
3380 fi
3381
3382     done
3383     ac_cv_prog_CPP=$CPP
3384
3385 fi
3386   CPP=$ac_cv_prog_CPP
3387 else
3388   ac_cv_prog_CPP=$CPP
3389 fi
3390 echo "$as_me:$LINENO: result: $CPP" >&5
3391 echo "${ECHO_T}$CPP" >&6
3392 ac_preproc_ok=false
3393 for ac_c_preproc_warn_flag in '' yes
3394 do
3395   # Use a header file that comes with gcc, so configuring glibc
3396   # with a fresh cross-compiler works.
3397   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3398   # <limits.h> exists even on freestanding compilers.
3399   # On the NeXT, cc -E runs the code through the compiler's parser,
3400   # not just through cpp. "Syntax error" is here to catch this case.
3401   cat >conftest.$ac_ext <<_ACEOF
3402 /* confdefs.h.  */
3403 _ACEOF
3404 cat confdefs.h >>conftest.$ac_ext
3405 cat >>conftest.$ac_ext <<_ACEOF
3406 /* end confdefs.h.  */
3407 #ifdef __STDC__
3408 # include <limits.h>
3409 #else
3410 # include <assert.h>
3411 #endif
3412                      Syntax error
3413 _ACEOF
3414 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3415   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3416   ac_status=$?
3417   grep -v '^ *+' conftest.er1 >conftest.err
3418   rm -f conftest.er1
3419   cat conftest.err >&5
3420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3421   (exit $ac_status); } >/dev/null; then
3422   if test -s conftest.err; then
3423     ac_cpp_err=$ac_c_preproc_warn_flag
3424     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3425   else
3426     ac_cpp_err=
3427   fi
3428 else
3429   ac_cpp_err=yes
3430 fi
3431 if test -z "$ac_cpp_err"; then
3432   :
3433 else
3434   echo "$as_me: failed program was:" >&5
3435 sed 's/^/| /' conftest.$ac_ext >&5
3436
3437   # Broken: fails on valid input.
3438 continue
3439 fi
3440 rm -f conftest.err conftest.$ac_ext
3441
3442   # OK, works on sane cases.  Now check whether non-existent headers
3443   # can be detected and how.
3444   cat >conftest.$ac_ext <<_ACEOF
3445 /* confdefs.h.  */
3446 _ACEOF
3447 cat confdefs.h >>conftest.$ac_ext
3448 cat >>conftest.$ac_ext <<_ACEOF
3449 /* end confdefs.h.  */
3450 #include <ac_nonexistent.h>
3451 _ACEOF
3452 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3454   ac_status=$?
3455   grep -v '^ *+' conftest.er1 >conftest.err
3456   rm -f conftest.er1
3457   cat conftest.err >&5
3458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459   (exit $ac_status); } >/dev/null; then
3460   if test -s conftest.err; then
3461     ac_cpp_err=$ac_c_preproc_warn_flag
3462     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3463   else
3464     ac_cpp_err=
3465   fi
3466 else
3467   ac_cpp_err=yes
3468 fi
3469 if test -z "$ac_cpp_err"; then
3470   # Broken: success on invalid input.
3471 continue
3472 else
3473   echo "$as_me: failed program was:" >&5
3474 sed 's/^/| /' conftest.$ac_ext >&5
3475
3476   # Passes both tests.
3477 ac_preproc_ok=:
3478 break
3479 fi
3480 rm -f conftest.err conftest.$ac_ext
3481
3482 done
3483 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3484 rm -f conftest.err conftest.$ac_ext
3485 if $ac_preproc_ok; then
3486   :
3487 else
3488   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3489 See \`config.log' for more details." >&5
3490 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3491 See \`config.log' for more details." >&2;}
3492    { (exit 1); exit 1; }; }
3493 fi
3494
3495 ac_ext=c
3496 ac_cpp='$CPP $CPPFLAGS'
3497 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3498 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3499 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3500
3501
3502
3503 # Create compiler version string
3504 if test x"$GCC" = x"yes" ; then
3505   cc_string="GCC `${CC} --version | sed q`"
3506 else
3507   cc_string=$CC
3508 fi
3509
3510 cat >>confdefs.h <<_ACEOF
3511 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3512 _ACEOF
3513
3514
3515
3516 #
3517 # Set up TAS assembly code if needed; the template file has now had its
3518 # chance to request this.
3519 #
3520           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3521
3522
3523 if test "$need_tas" = yes ; then
3524   TAS=tas.o
3525 else
3526   TAS=""
3527 fi
3528
3529
3530
3531 #
3532 # Automatic dependency tracking
3533 #
3534
3535
3536
3537 # Check whether --enable-depend or --disable-depend was given.
3538 if test "${enable_depend+set}" = set; then
3539   enableval="$enable_depend"
3540
3541   case $enableval in
3542     yes)
3543       autodepend=yes
3544       ;;
3545     no)
3546       :
3547       ;;
3548     *)
3549       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3550 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3551    { (exit 1); exit 1; }; }
3552       ;;
3553   esac
3554
3555 else
3556   enable_depend=no
3557
3558 fi;
3559
3560
3561
3562
3563 #
3564 # Enable assert checks
3565 #
3566
3567
3568
3569 # Check whether --enable-cassert or --disable-cassert was given.
3570 if test "${enable_cassert+set}" = set; then
3571   enableval="$enable_cassert"
3572
3573   case $enableval in
3574     yes)
3575
3576 cat >>confdefs.h <<\_ACEOF
3577 #define USE_ASSERT_CHECKING 1
3578 _ACEOF
3579
3580       ;;
3581     no)
3582       :
3583       ;;
3584     *)
3585       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3586 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3587    { (exit 1); exit 1; }; }
3588       ;;
3589   esac
3590
3591 else
3592   enable_cassert=no
3593
3594 fi;
3595
3596
3597
3598 #
3599 # Include directories
3600 #
3601 ac_save_IFS=$IFS
3602 IFS="${IFS}${PATH_SEPARATOR}"
3603 # SRCH_INC comes from the template file
3604 for dir in $with_includes $SRCH_INC; do
3605   if test -d "$dir"; then
3606     INCLUDES="$INCLUDES -I$dir"
3607   else
3608     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3609 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3610   fi
3611 done
3612 IFS=$ac_save_IFS
3613
3614
3615
3616 #
3617 # Library directories
3618 #
3619 ac_save_IFS=$IFS
3620 IFS="${IFS}${PATH_SEPARATOR}"
3621 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3622 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3623   if test -d "$dir"; then
3624     LIBDIRS="$LIBDIRS -L$dir"
3625   else
3626     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3627 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3628   fi
3629 done
3630 IFS=$ac_save_IFS
3631
3632 #
3633 # Enable thread-safe client libraries
3634 #
3635 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3636 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3637
3638
3639
3640 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3641 if test "${enable_thread_safety+set}" = set; then
3642   enableval="$enable_thread_safety"
3643
3644   case $enableval in
3645     yes)
3646       :
3647       ;;
3648     no)
3649       :
3650       ;;
3651     *)
3652       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3653 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3654    { (exit 1); exit 1; }; }
3655       ;;
3656   esac
3657
3658 else
3659   enable_thread_safety=no
3660
3661 fi;
3662
3663
3664
3665
3666 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3667 if test "${enable_thread_safety_force+set}" = set; then
3668   enableval="$enable_thread_safety_force"
3669
3670   case $enableval in
3671     yes)
3672       :
3673       ;;
3674     no)
3675       :
3676       ;;
3677     *)
3678       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3679 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3680    { (exit 1); exit 1; }; }
3681       ;;
3682   esac
3683
3684 else
3685   enable_thread_safety_force=no
3686
3687 fi;
3688
3689 if test "$enable_thread_safety" = yes -o \
3690         "$enable_thread_safety_force" = yes; then
3691   enable_thread_safety="yes"    # for 'force'
3692
3693 cat >>confdefs.h <<\_ACEOF
3694 #define ENABLE_THREAD_SAFETY 1
3695 _ACEOF
3696
3697 fi
3698 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3699 echo "${ECHO_T}$enable_thread_safety" >&6
3700
3701
3702 #
3703 # Optionally build Tcl modules (PL/Tcl)
3704 #
3705 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3706 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3707
3708
3709
3710
3711 # Check whether --with-tcl or --without-tcl was given.
3712 if test "${with_tcl+set}" = set; then
3713   withval="$with_tcl"
3714
3715   case $withval in
3716     yes)
3717       :
3718       ;;
3719     no)
3720       :
3721       ;;
3722     *)
3723       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3724 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3725    { (exit 1); exit 1; }; }
3726       ;;
3727   esac
3728
3729 else
3730   with_tcl=no
3731
3732 fi;
3733
3734 echo "$as_me:$LINENO: result: $with_tcl" >&5
3735 echo "${ECHO_T}$with_tcl" >&6
3736
3737
3738 # We see if the path to the Tcl/Tk configuration scripts is specified.
3739 # This will override the use of tclsh to find the paths to search.
3740
3741
3742
3743
3744
3745 # Check whether --with-tclconfig or --without-tclconfig was given.
3746 if test "${with_tclconfig+set}" = set; then
3747   withval="$with_tclconfig"
3748
3749   case $withval in
3750     yes)
3751       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3752 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3753    { (exit 1); exit 1; }; }
3754       ;;
3755     no)
3756       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3757 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3758    { (exit 1); exit 1; }; }
3759       ;;
3760     *)
3761
3762       ;;
3763   esac
3764
3765 fi;
3766
3767
3768 #
3769 # Optionally build Perl modules (PL/Perl)
3770 #
3771 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3772 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3773
3774
3775
3776
3777 # Check whether --with-perl or --without-perl was given.
3778 if test "${with_perl+set}" = set; then
3779   withval="$with_perl"
3780
3781   case $withval in
3782     yes)
3783       :
3784       ;;
3785     no)
3786       :
3787       ;;
3788     *)
3789       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3790 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3791    { (exit 1); exit 1; }; }
3792       ;;
3793   esac
3794
3795 else
3796   with_perl=no
3797
3798 fi;
3799
3800 echo "$as_me:$LINENO: result: $with_perl" >&5
3801 echo "${ECHO_T}$with_perl" >&6
3802
3803
3804 #
3805 # Optionally build Python modules (PL/Python)
3806 #
3807 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3808 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3809
3810
3811
3812
3813 # Check whether --with-python or --without-python was given.
3814 if test "${with_python+set}" = set; then
3815   withval="$with_python"
3816
3817   case $withval in
3818     yes)
3819       :
3820       ;;
3821     no)
3822       :
3823       ;;
3824     *)
3825       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3826 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3827    { (exit 1); exit 1; }; }
3828       ;;
3829   esac
3830
3831 else
3832   with_python=no
3833
3834 fi;
3835
3836 echo "$as_me:$LINENO: result: $with_python" >&5
3837 echo "${ECHO_T}$with_python" >&6
3838
3839
3840 #
3841 # Kerberos 5
3842 #
3843 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3844 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3845
3846
3847
3848
3849 # Check whether --with-krb5 or --without-krb5 was given.
3850 if test "${with_krb5+set}" = set; then
3851   withval="$with_krb5"
3852
3853   case $withval in
3854     yes)
3855
3856
3857 cat >>confdefs.h <<\_ACEOF
3858 #define KRB5 1
3859 _ACEOF
3860
3861   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3862
3863       ;;
3864     no)
3865       :
3866       ;;
3867     *)
3868       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3869 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3870    { (exit 1); exit 1; }; }
3871       ;;
3872   esac
3873
3874 else
3875   with_krb5=no
3876
3877 fi;
3878
3879 echo "$as_me:$LINENO: result: $with_krb5" >&5
3880 echo "${ECHO_T}$with_krb5" >&6
3881
3882
3883
3884
3885
3886
3887 #
3888 # Kerberos configuration parameters
3889 #
3890
3891
3892
3893
3894 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3895 if test "${with_krb_srvnam+set}" = set; then
3896   withval="$with_krb_srvnam"
3897
3898   case $withval in
3899     yes)
3900       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3901 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3902    { (exit 1); exit 1; }; }
3903       ;;
3904     no)
3905       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3906 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3907    { (exit 1); exit 1; }; }
3908       ;;
3909     *)
3910
3911       ;;
3912   esac
3913
3914 else
3915   with_krb_srvnam="postgres"
3916 fi;
3917
3918
3919 cat >>confdefs.h <<_ACEOF
3920 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3921 _ACEOF
3922
3923
3924
3925 #
3926 # PAM
3927 #
3928 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3929 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3930
3931
3932
3933
3934 # Check whether --with-pam or --without-pam was given.
3935 if test "${with_pam+set}" = set; then
3936   withval="$with_pam"
3937
3938   case $withval in
3939     yes)
3940
3941 cat >>confdefs.h <<\_ACEOF
3942 #define USE_PAM 1
3943 _ACEOF
3944
3945       ;;
3946     no)
3947       :
3948       ;;
3949     *)
3950       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3951 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3952    { (exit 1); exit 1; }; }
3953       ;;
3954   esac
3955
3956 else
3957   with_pam=no
3958
3959 fi;
3960
3961 echo "$as_me:$LINENO: result: $with_pam" >&5
3962 echo "${ECHO_T}$with_pam" >&6
3963
3964
3965
3966 #
3967 # LDAP
3968 #
3969 echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
3970 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
3971
3972
3973
3974
3975 # Check whether --with-ldap or --without-ldap was given.
3976 if test "${with_ldap+set}" = set; then
3977   withval="$with_ldap"
3978
3979   case $withval in
3980     yes)
3981
3982 cat >>confdefs.h <<\_ACEOF
3983 #define USE_LDAP 1
3984 _ACEOF
3985
3986       ;;
3987     no)
3988       :
3989       ;;
3990     *)
3991       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
3992 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
3993    { (exit 1); exit 1; }; }
3994       ;;
3995   esac
3996
3997 else
3998   with_ldap=no
3999
4000 fi;
4001
4002 echo "$as_me:$LINENO: result: $with_ldap" >&5
4003 echo "${ECHO_T}$with_ldap" >&6
4004
4005
4006
4007 #
4008 # Bonjour
4009 #
4010 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
4011 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
4012
4013
4014
4015
4016 # Check whether --with-bonjour or --without-bonjour was given.
4017 if test "${with_bonjour+set}" = set; then
4018   withval="$with_bonjour"
4019
4020   case $withval in
4021     yes)
4022
4023 cat >>confdefs.h <<\_ACEOF
4024 #define USE_BONJOUR 1
4025 _ACEOF
4026
4027       ;;
4028     no)
4029       :
4030       ;;
4031     *)
4032       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4033 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4034    { (exit 1); exit 1; }; }
4035       ;;
4036   esac
4037
4038 else
4039   with_bonjour=no
4040
4041 fi;
4042
4043 echo "$as_me:$LINENO: result: $with_bonjour" >&5
4044 echo "${ECHO_T}$with_bonjour" >&6
4045
4046
4047
4048 #
4049 # OpenSSL
4050 #
4051 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4052 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
4053
4054
4055
4056
4057 # Check whether --with-openssl or --without-openssl was given.
4058 if test "${with_openssl+set}" = set; then
4059   withval="$with_openssl"
4060
4061   case $withval in
4062     yes)
4063
4064 cat >>confdefs.h <<\_ACEOF
4065 #define USE_SSL 1
4066 _ACEOF
4067
4068       ;;
4069     no)
4070       :
4071       ;;
4072     *)
4073       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4074 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4075    { (exit 1); exit 1; }; }
4076       ;;
4077   esac
4078
4079 else
4080   with_openssl=no
4081
4082 fi;
4083
4084 echo "$as_me:$LINENO: result: $with_openssl" >&5
4085 echo "${ECHO_T}$with_openssl" >&6
4086
4087
4088
4089 #
4090 # Readline
4091 #
4092
4093
4094
4095
4096 # Check whether --with-readline or --without-readline was given.
4097 if test "${with_readline+set}" = set; then
4098   withval="$with_readline"
4099
4100   case $withval in
4101     yes)
4102       :
4103       ;;
4104     no)
4105       :
4106       ;;
4107     *)
4108       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4109 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4110    { (exit 1); exit 1; }; }
4111       ;;
4112   esac
4113
4114 else
4115   with_readline=yes
4116
4117 fi;
4118
4119 # readline on MinGW has problems with backslashes in psql and other bugs.
4120 # This is particularly a problem with non-US code pages.
4121 # Therefore disable its use until we understand the cause. 2004-07-20
4122 if test "$PORTNAME" = "win32"; then
4123   if test "$with_readline" = yes; then
4124     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4125 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4126     with_readline=no
4127   fi
4128 fi
4129
4130
4131 #
4132 # Prefer libedit
4133 #
4134
4135
4136
4137
4138 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
4139 if test "${with_libedit_preferred+set}" = set; then
4140   withval="$with_libedit_preferred"
4141
4142   case $withval in
4143     yes)
4144       :
4145       ;;
4146     no)
4147       :
4148       ;;
4149     *)
4150       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4151 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4152    { (exit 1); exit 1; }; }
4153       ;;
4154   esac
4155
4156 else
4157   with_libedit_preferred=no
4158
4159 fi;
4160
4161
4162
4163 #
4164 # Zlib
4165 #
4166
4167
4168
4169
4170 # Check whether --with-zlib or --without-zlib was given.
4171 if test "${with_zlib+set}" = set; then
4172   withval="$with_zlib"
4173
4174   case $withval in
4175     yes)
4176       :
4177       ;;
4178     no)
4179       :
4180       ;;
4181     *)
4182       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
4183 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
4184    { (exit 1); exit 1; }; }
4185       ;;
4186   esac
4187
4188 else
4189   with_zlib=yes
4190
4191 fi;
4192
4193
4194
4195 #
4196 # Elf
4197 #
4198
4199 # Assume system is ELF if it predefines __ELF__ as 1,
4200 # otherwise believe host_os based default.
4201 case $host_os in
4202     freebsd1*|freebsd2*) elf=no;;
4203     freebsd3*|freebsd4*) elf=yes;;
4204 esac
4205
4206
4207 echo "$as_me:$LINENO: checking for egrep" >&5
4208 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4209 if test "${ac_cv_prog_egrep+set}" = set; then
4210   echo $ECHO_N "(cached) $ECHO_C" >&6
4211 else
4212   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4213     then ac_cv_prog_egrep='grep -E'
4214     else ac_cv_prog_egrep='egrep'
4215     fi
4216 fi
4217 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4218 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4219  EGREP=$ac_cv_prog_egrep
4220
4221
4222 cat >conftest.$ac_ext <<_ACEOF
4223 /* confdefs.h.  */
4224 _ACEOF
4225 cat confdefs.h >>conftest.$ac_ext
4226 cat >>conftest.$ac_ext <<_ACEOF
4227 /* end confdefs.h.  */
4228 #if __ELF__
4229   yes
4230 #endif
4231
4232 _ACEOF
4233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4234   $EGREP "yes" >/dev/null 2>&1; then
4235   ELF_SYS=true
4236 else
4237   if test "X$elf" = "Xyes" ; then
4238   ELF_SYS=true
4239 else
4240   ELF_SYS=
4241 fi
4242 fi
4243 rm -f conftest*
4244
4245
4246
4247 #
4248 # Assignments
4249 #
4250
4251 CPPFLAGS="$CPPFLAGS $INCLUDES"
4252 LDFLAGS="$LDFLAGS $LIBDIRS"
4253
4254 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4255 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4256 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4257 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4258
4259
4260
4261 for ac_prog in gawk mawk nawk awk
4262 do
4263   # Extract the first word of "$ac_prog", so it can be a program name with args.
4264 set dummy $ac_prog; ac_word=$2
4265 echo "$as_me:$LINENO: checking for $ac_word" >&5
4266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4267 if test "${ac_cv_prog_AWK+set}" = set; then
4268   echo $ECHO_N "(cached) $ECHO_C" >&6
4269 else
4270   if test -n "$AWK"; then
4271   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4272 else
4273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4274 for as_dir in $PATH
4275 do
4276   IFS=$as_save_IFS
4277   test -z "$as_dir" && as_dir=.
4278   for ac_exec_ext in '' $ac_executable_extensions; do
4279   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4280     ac_cv_prog_AWK="$ac_prog"
4281     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4282     break 2
4283   fi
4284 done
4285 done
4286
4287 fi
4288 fi
4289 AWK=$ac_cv_prog_AWK
4290 if test -n "$AWK"; then
4291   echo "$as_me:$LINENO: result: $AWK" >&5
4292 echo "${ECHO_T}$AWK" >&6
4293 else
4294   echo "$as_me:$LINENO: result: no" >&5
4295 echo "${ECHO_T}no" >&6
4296 fi
4297
4298   test -n "$AWK" && break
4299 done
4300
4301 echo "$as_me:$LINENO: checking for flex" >&5
4302 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4303 if test "${pgac_cv_path_flex+set}" = set; then
4304   echo $ECHO_N "(cached) $ECHO_C" >&6
4305 else
4306   # Let the user override the test
4307 if test -n "$FLEX"; then
4308   pgac_cv_path_flex=$FLEX
4309 else
4310   pgac_save_IFS=$IFS
4311   IFS=$PATH_SEPARATOR
4312   for pgac_dir in $PATH; do
4313     IFS=$pgac_save_IFS
4314     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4315       pgac_dir=`pwd`
4316     fi
4317     for pgac_prog in flex lex; do
4318       pgac_candidate="$pgac_dir/$pgac_prog"
4319       if test -f "$pgac_candidate" \
4320         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4321       then
4322         echo '%%'  > conftest.l
4323         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4324           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4325             pgac_broken_flex=$pgac_candidate
4326             continue
4327           fi
4328
4329           pgac_cv_path_flex=$pgac_candidate
4330           break 2
4331         fi
4332       fi
4333     done
4334   done
4335   rm -f conftest.l lex.yy.c
4336   : ${pgac_cv_path_flex=no}
4337 fi
4338
4339 fi
4340 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4341 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4342 if test x"$pgac_cv_path_flex" = x"no"; then
4343   if test -n "$pgac_broken_flex"; then
4344     { echo "$as_me:$LINENO: WARNING:
4345 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4346 *** should get version 2.5.4 or later." >&5
4347 echo "$as_me: WARNING:
4348 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4349 *** should get version 2.5.4 or later." >&2;}
4350   fi
4351
4352   { echo "$as_me:$LINENO: WARNING:
4353 *** Without Flex you will not be able to build PostgreSQL from CVS or
4354 *** change any of the scanner definition files.  You can obtain Flex from
4355 *** a GNU mirror site.  (If you are using the official distribution of
4356 *** PostgreSQL then you do not need to worry about this because the Flex
4357 *** output is pre-generated.)" >&5
4358 echo "$as_me: WARNING:
4359 *** Without Flex you will not be able to build PostgreSQL from CVS or
4360 *** change any of the scanner definition files.  You can obtain Flex from
4361 *** a GNU mirror site.  (If you are using the official distribution of
4362 *** PostgreSQL then you do not need to worry about this because the Flex
4363 *** output is pre-generated.)" >&2;}
4364 fi
4365
4366 if test x"$pgac_cv_path_flex" = x"no"; then
4367   FLEX=
4368 else
4369   FLEX=$pgac_cv_path_flex
4370 fi
4371
4372
4373
4374
4375 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4376 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4377 LN_S=$as_ln_s
4378 if test "$LN_S" = "ln -s"; then
4379   echo "$as_me:$LINENO: result: yes" >&5
4380 echo "${ECHO_T}yes" >&6
4381 else
4382   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4383 echo "${ECHO_T}no, using $LN_S" >&6
4384 fi
4385
4386
4387 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4388 if test "${with_gnu_ld+set}" = set; then
4389   withval="$with_gnu_ld"
4390   test "$withval" = no || with_gnu_ld=yes
4391 else
4392   with_gnu_ld=no
4393 fi;
4394 ac_prog=ld
4395 if test "$GCC" = yes; then
4396   # Check if gcc -print-prog-name=ld gives a path.
4397   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4398 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4399   case $host in
4400   *-*-mingw*)
4401     # gcc leaves a trailing carriage return which upsets mingw
4402     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4403   *)
4404     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4405   esac
4406   case "$ac_prog" in
4407     # Accept absolute paths.
4408     [\\/]* | [A-Za-z]:[\\/]*)
4409       re_direlt='/[^/][^/]*/\.\./'
4410       # Canonicalize the path of ld
4411       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4412       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4413         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4414       done
4415       test -z "$LD" && LD="$ac_prog"
4416       ;;
4417   "")
4418     # If it fails, then pretend we aren't using GCC.
4419     ac_prog=ld
4420     ;;
4421   *)
4422     # If it is relative, then search for the first ld in PATH.
4423     with_gnu_ld=unknown
4424     ;;
4425   esac
4426 elif test "$with_gnu_ld" = yes; then
4427   echo "$as_me:$LINENO: checking for GNU ld" >&5
4428 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4429 else
4430   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4431 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4432 fi
4433 if test "${ac_cv_path_LD+set}" = set; then
4434   echo $ECHO_N "(cached) $ECHO_C" >&6
4435 else
4436   if test -z "$LD"; then
4437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4438   for ac_dir in $PATH; do
4439     test -z "$ac_dir" && ac_dir=.
4440     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4441       ac_cv_path_LD="$ac_dir/$ac_prog"
4442       # Check to see if the program is GNU ld.  I'd rather use --version,
4443       # but apparently some GNU ld's only accept -v.
4444       # Break only if it was the GNU/non-GNU ld that we prefer.
4445       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4446         test "$with_gnu_ld" != no && break
4447       else
4448         test "$with_gnu_ld" != yes && break
4449       fi
4450     fi
4451   done
4452   IFS="$ac_save_ifs"
4453 else
4454   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4455 fi
4456 fi
4457
4458 LD="$ac_cv_path_LD"
4459 if test -n "$LD"; then
4460   echo "$as_me:$LINENO: result: $LD" >&5
4461 echo "${ECHO_T}$LD" >&6
4462 else
4463   echo "$as_me:$LINENO: result: no" >&5
4464 echo "${ECHO_T}no" >&6
4465 fi
4466 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4467 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4468    { (exit 1); exit 1; }; }
4469 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4470 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4471 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4475 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4476   ac_cv_prog_gnu_ld=yes
4477 else
4478   ac_cv_prog_gnu_ld=no
4479 fi
4480 fi
4481 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4482 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4483 with_gnu_ld=$ac_cv_prog_gnu_ld
4484
4485
4486
4487
4488 case $host_os in sysv5*)
4489   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4490 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4491 if test "${pgac_cv_prog_ld_R+set}" = set; then
4492   echo $ECHO_N "(cached) $ECHO_C" >&6
4493 else
4494
4495     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4496     cat >conftest.$ac_ext <<_ACEOF
4497 /* confdefs.h.  */
4498 _ACEOF
4499 cat confdefs.h >>conftest.$ac_ext
4500 cat >>conftest.$ac_ext <<_ACEOF
4501 /* end confdefs.h.  */
4502
4503 int
4504 main ()
4505 {
4506
4507   ;
4508   return 0;
4509 }
4510 _ACEOF
4511 rm -f conftest.$ac_objext conftest$ac_exeext
4512 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4513   (eval $ac_link) 2>conftest.er1
4514   ac_status=$?
4515   grep -v '^ *+' conftest.er1 >conftest.err
4516   rm -f conftest.er1
4517   cat conftest.err >&5
4518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4519   (exit $ac_status); } &&
4520          { ac_try='test -z "$ac_c_werror_flag"
4521                          || test ! -s conftest.err'
4522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4523   (eval $ac_try) 2>&5
4524   ac_status=$?
4525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4526   (exit $ac_status); }; } &&
4527          { ac_try='test -s conftest$ac_exeext'
4528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4529   (eval $ac_try) 2>&5
4530   ac_status=$?
4531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532   (exit $ac_status); }; }; then
4533   pgac_cv_prog_ld_R=yes
4534 else
4535   echo "$as_me: failed program was:" >&5
4536 sed 's/^/| /' conftest.$ac_ext >&5
4537
4538 pgac_cv_prog_ld_R=no
4539 fi
4540 rm -f conftest.err conftest.$ac_objext \
4541       conftest$ac_exeext conftest.$ac_ext
4542     LDFLAGS=$pgac_save_LDFLAGS
4543
4544 fi
4545 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4546 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4547   ld_R_works=$pgac_cv_prog_ld_R
4548
4549 esac
4550 if test -n "$ac_tool_prefix"; then
4551   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4552 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4553 echo "$as_me:$LINENO: checking for $ac_word" >&5
4554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4555 if test "${ac_cv_prog_RANLIB+set}" = set; then
4556   echo $ECHO_N "(cached) $ECHO_C" >&6
4557 else
4558   if test -n "$RANLIB"; then
4559   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4560 else
4561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4562 for as_dir in $PATH
4563 do
4564   IFS=$as_save_IFS
4565   test -z "$as_dir" && as_dir=.
4566   for ac_exec_ext in '' $ac_executable_extensions; do
4567   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4568     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4569     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4570     break 2
4571   fi
4572 done
4573 done
4574
4575 fi
4576 fi
4577 RANLIB=$ac_cv_prog_RANLIB
4578 if test -n "$RANLIB"; then
4579   echo "$as_me:$LINENO: result: $RANLIB" >&5
4580 echo "${ECHO_T}$RANLIB" >&6
4581 else
4582   echo "$as_me:$LINENO: result: no" >&5
4583 echo "${ECHO_T}no" >&6
4584 fi
4585
4586 fi
4587 if test -z "$ac_cv_prog_RANLIB"; then
4588   ac_ct_RANLIB=$RANLIB
4589   # Extract the first word of "ranlib", so it can be a program name with args.
4590 set dummy ranlib; ac_word=$2
4591 echo "$as_me:$LINENO: checking for $ac_word" >&5
4592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4593 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4594   echo $ECHO_N "(cached) $ECHO_C" >&6
4595 else
4596   if test -n "$ac_ct_RANLIB"; then
4597   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4598 else
4599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600 for as_dir in $PATH
4601 do
4602   IFS=$as_save_IFS
4603   test -z "$as_dir" && as_dir=.
4604   for ac_exec_ext in '' $ac_executable_extensions; do
4605   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4606     ac_cv_prog_ac_ct_RANLIB="ranlib"
4607     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4608     break 2
4609   fi
4610 done
4611 done
4612
4613   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4614 fi
4615 fi
4616 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4617 if test -n "$ac_ct_RANLIB"; then
4618   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4619 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4620 else
4621   echo "$as_me:$LINENO: result: no" >&5
4622 echo "${ECHO_T}no" >&6
4623 fi
4624
4625   RANLIB=$ac_ct_RANLIB
4626 else
4627   RANLIB="$ac_cv_prog_RANLIB"
4628 fi
4629
4630 # Extract the first word of "tar", so it can be a program name with args.
4631 set dummy tar; ac_word=$2
4632 echo "$as_me:$LINENO: checking for $ac_word" >&5
4633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4634 if test "${ac_cv_path_TAR+set}" = set; then
4635   echo $ECHO_N "(cached) $ECHO_C" >&6
4636 else
4637   case $TAR in
4638   [\\/]* | ?:[\\/]*)
4639   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4640   ;;
4641   *)
4642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643 for as_dir in $PATH
4644 do
4645   IFS=$as_save_IFS
4646   test -z "$as_dir" && as_dir=.
4647   for ac_exec_ext in '' $ac_executable_extensions; do
4648   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4649     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4650     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4651     break 2
4652   fi
4653 done
4654 done
4655
4656   ;;
4657 esac
4658 fi
4659 TAR=$ac_cv_path_TAR
4660
4661 if test -n "$TAR"; then
4662   echo "$as_me:$LINENO: result: $TAR" >&5
4663 echo "${ECHO_T}$TAR" >&6
4664 else
4665   echo "$as_me:$LINENO: result: no" >&5
4666 echo "${ECHO_T}no" >&6
4667 fi
4668
4669
4670   if test -n "$ac_tool_prefix"; then
4671   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4672 set dummy ${ac_tool_prefix}strip; ac_word=$2
4673 echo "$as_me:$LINENO: checking for $ac_word" >&5
4674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4675 if test "${ac_cv_prog_STRIP+set}" = set; then
4676   echo $ECHO_N "(cached) $ECHO_C" >&6
4677 else
4678   if test -n "$STRIP"; then
4679   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4680 else
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682 for as_dir in $PATH
4683 do
4684   IFS=$as_save_IFS
4685   test -z "$as_dir" && as_dir=.
4686   for ac_exec_ext in '' $ac_executable_extensions; do
4687   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4688     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4689     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4690     break 2
4691   fi
4692 done
4693 done
4694
4695 fi
4696 fi
4697 STRIP=$ac_cv_prog_STRIP
4698 if test -n "$STRIP"; then
4699   echo "$as_me:$LINENO: result: $STRIP" >&5
4700 echo "${ECHO_T}$STRIP" >&6
4701 else
4702   echo "$as_me:$LINENO: result: no" >&5
4703 echo "${ECHO_T}no" >&6
4704 fi
4705
4706 fi
4707 if test -z "$ac_cv_prog_STRIP"; then
4708   ac_ct_STRIP=$STRIP
4709   # Extract the first word of "strip", so it can be a program name with args.
4710 set dummy strip; ac_word=$2
4711 echo "$as_me:$LINENO: checking for $ac_word" >&5
4712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4713 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4714   echo $ECHO_N "(cached) $ECHO_C" >&6
4715 else
4716   if test -n "$ac_ct_STRIP"; then
4717   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4718 else
4719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720 for as_dir in $PATH
4721 do
4722   IFS=$as_save_IFS
4723   test -z "$as_dir" && as_dir=.
4724   for ac_exec_ext in '' $ac_executable_extensions; do
4725   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4726     ac_cv_prog_ac_ct_STRIP="strip"
4727     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4728     break 2
4729   fi
4730 done
4731 done
4732
4733   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4734 fi
4735 fi
4736 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4737 if test -n "$ac_ct_STRIP"; then
4738   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4739 echo "${ECHO_T}$ac_ct_STRIP" >&6
4740 else
4741   echo "$as_me:$LINENO: result: no" >&5
4742 echo "${ECHO_T}no" >&6
4743 fi
4744
4745   STRIP=$ac_ct_STRIP
4746 else
4747   STRIP="$ac_cv_prog_STRIP"
4748 fi
4749
4750
4751   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4752 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4753   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4754     STRIP_STATIC_LIB="$STRIP -x"
4755     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4756     echo "$as_me:$LINENO: result: yes" >&5
4757 echo "${ECHO_T}yes" >&6
4758   else
4759     STRIP_STATIC_LIB=:
4760     STRIP_SHARED_LIB=:
4761     echo "$as_me:$LINENO: result: no" >&5
4762 echo "${ECHO_T}no" >&6
4763   fi
4764
4765
4766
4767
4768 if test -z "$YACC"; then
4769   for ac_prog in 'bison -y'
4770 do
4771   # Extract the first word of "$ac_prog", so it can be a program name with args.
4772 set dummy $ac_prog; ac_word=$2
4773 echo "$as_me:$LINENO: checking for $ac_word" >&5
4774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4775 if test "${ac_cv_prog_YACC+set}" = set; then
4776   echo $ECHO_N "(cached) $ECHO_C" >&6
4777 else
4778   if test -n "$YACC"; then
4779   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4780 else
4781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782 for as_dir in $PATH
4783 do
4784   IFS=$as_save_IFS
4785   test -z "$as_dir" && as_dir=.
4786   for ac_exec_ext in '' $ac_executable_extensions; do
4787   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4788     ac_cv_prog_YACC="$ac_prog"
4789     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4790     break 2
4791   fi
4792 done
4793 done
4794
4795 fi
4796 fi
4797 YACC=$ac_cv_prog_YACC
4798 if test -n "$YACC"; then
4799   echo "$as_me:$LINENO: result: $YACC" >&5
4800 echo "${ECHO_T}$YACC" >&6
4801 else
4802   echo "$as_me:$LINENO: result: no" >&5
4803 echo "${ECHO_T}no" >&6
4804 fi
4805
4806   test -n "$YACC" && break
4807 done
4808
4809
4810   if test "$YACC"; then
4811     if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4812       { echo "$as_me:$LINENO: WARNING:
4813 *** The installed version of Bison is too old to use with PostgreSQL.
4814 *** Bison version 1.875 or later is required." >&5
4815 echo "$as_me: WARNING:
4816 *** The installed version of Bison is too old to use with PostgreSQL.
4817 *** Bison version 1.875 or later is required." >&2;}
4818       YACC=""
4819     fi
4820   fi
4821
4822   if test -z "$YACC"; then
4823     { echo "$as_me:$LINENO: WARNING:
4824 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4825 *** change any of the parser definition files.  You can obtain Bison from
4826 *** a GNU mirror site.  (If you are using the official distribution of
4827 *** PostgreSQL then you do not need to worry about this, because the Bison
4828 *** output is pre-generated.)  To use a different yacc program (possible,
4829 *** but not recommended), set the environment variable YACC before running
4830 *** 'configure'." >&5
4831 echo "$as_me: WARNING:
4832 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4833 *** change any of the parser definition files.  You can obtain Bison from
4834 *** a GNU mirror site.  (If you are using the official distribution of
4835 *** PostgreSQL then you do not need to worry about this, because the Bison
4836 *** output is pre-generated.)  To use a different yacc program (possible,
4837 *** but not recommended), set the environment variable YACC before running
4838 *** 'configure'." >&2;}
4839   fi
4840 fi
4841
4842
4843 # Extract the first word of "perl", so it can be a program name with args.
4844 set dummy perl; ac_word=$2
4845 echo "$as_me:$LINENO: checking for $ac_word" >&5
4846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4847 if test "${ac_cv_path_PERL+set}" = set; then
4848   echo $ECHO_N "(cached) $ECHO_C" >&6
4849 else
4850   case $PERL in
4851   [\\/]* | ?:[\\/]*)
4852   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4853   ;;
4854   *)
4855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856 for as_dir in $PATH
4857 do
4858   IFS=$as_save_IFS
4859   test -z "$as_dir" && as_dir=.
4860   for ac_exec_ext in '' $ac_executable_extensions; do
4861   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4862     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4863     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4864     break 2
4865   fi
4866 done
4867 done
4868
4869   ;;
4870 esac
4871 fi
4872 PERL=$ac_cv_path_PERL
4873
4874 if test -n "$PERL"; then
4875   echo "$as_me:$LINENO: result: $PERL" >&5
4876 echo "${ECHO_T}$PERL" >&6
4877 else
4878   echo "$as_me:$LINENO: result: no" >&5
4879 echo "${ECHO_T}no" >&6
4880 fi
4881
4882 if test "$with_perl" = yes; then
4883
4884 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4885 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4886 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4887 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4888 echo "${ECHO_T}$perl_archlibexp" >&6
4889 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4890 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4891 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4892 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4893 echo "${ECHO_T}$perl_privlibexp" >&6
4894 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4895 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4896 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4897 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4898 echo "${ECHO_T}$perl_useshrplib" >&6
4899
4900 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4901 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4902 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4903 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4904 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4905 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4906 echo "${ECHO_T}$perl_embed_ldflags" >&6
4907 fi
4908
4909 if test "$with_python" = yes; then
4910   # Extract the first word of "python", so it can be a program name with args.
4911 set dummy python; ac_word=$2
4912 echo "$as_me:$LINENO: checking for $ac_word" >&5
4913 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4914 if test "${ac_cv_path_PYTHON+set}" = set; then
4915   echo $ECHO_N "(cached) $ECHO_C" >&6
4916 else
4917   case $PYTHON in
4918   [\\/]* | ?:[\\/]*)
4919   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4920   ;;
4921   *)
4922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923 for as_dir in $PATH
4924 do
4925   IFS=$as_save_IFS
4926   test -z "$as_dir" && as_dir=.
4927   for ac_exec_ext in '' $ac_executable_extensions; do
4928   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4929     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4930     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4931     break 2
4932   fi
4933 done
4934 done
4935
4936   ;;
4937 esac
4938 fi
4939 PYTHON=$ac_cv_path_PYTHON
4940
4941 if test -n "$PYTHON"; then
4942   echo "$as_me:$LINENO: result: $PYTHON" >&5
4943 echo "${ECHO_T}$PYTHON" >&6
4944 else
4945   echo "$as_me:$LINENO: result: no" >&5
4946 echo "${ECHO_T}no" >&6
4947 fi
4948
4949 if test x"$PYTHON" = x""; then
4950   { { echo "$as_me:$LINENO: error: Python not found" >&5
4951 echo "$as_me: error: Python not found" >&2;}
4952    { (exit 1); exit 1; }; }
4953 fi
4954
4955
4956 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4957 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4958 if "${PYTHON}" 2>&- -c 'import distutils'
4959 then
4960     echo "$as_me:$LINENO: result: yes" >&5
4961 echo "${ECHO_T}yes" >&6
4962 else
4963     echo "$as_me:$LINENO: result: no" >&5
4964 echo "${ECHO_T}no" >&6
4965     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4966 echo "$as_me: error: distutils module not found" >&2;}
4967    { (exit 1); exit 1; }; }
4968 fi
4969 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4970 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4971 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4972 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')"`
4973 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4974
4975 # This should be enough of a message.
4976 echo "$as_me:$LINENO: result: $python_configdir" >&5
4977 echo "${ECHO_T}$python_configdir" >&6
4978
4979
4980 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4981 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4982
4983 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4984 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4985 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4986 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4987
4988 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4989 then
4990         # New way: use the official shared library
4991         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4992         python_libspec="-L${python_libdir} -l${ldlibrary}"
4993 else
4994         # Old way: use libpython from python_configdir
4995         python_libdir="${python_configdir}"
4996         python_libspec="-L${python_libdir} -lpython${python_version}"
4997 fi
4998
4999 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
5000
5001 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
5002 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
5003
5004
5005 # threaded python is not supported on bsd's
5006 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
5007 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
5008 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
5009 if test "$pythreads" = "1"; then
5010   echo "$as_me:$LINENO: result: yes" >&5
5011 echo "${ECHO_T}yes" >&6
5012   case $host_os in
5013   openbsd*|freebsd4*)
5014     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
5015 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
5016    { (exit 1); exit 1; }; }
5017     ;;
5018   esac
5019 else
5020   echo "$as_me:$LINENO: result: no" >&5
5021 echo "${ECHO_T}no" >&6
5022 fi
5023
5024
5025 fi
5026
5027 # Supply a numeric version string for use by 3rd party add-ons
5028 # awk -F is a regex on some platforms, and not on others, so make "." a tab
5029 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
5030 tr '.' '        ' |
5031 $AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
5032
5033 cat >>confdefs.h <<_ACEOF
5034 #define PG_VERSION_NUM $PG_VERSION_NUM
5035 _ACEOF
5036
5037
5038 ##
5039 ## Libraries
5040 ##
5041
5042 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
5043 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
5044 if test "${ac_cv_search_setproctitle+set}" = set; then
5045   echo $ECHO_N "(cached) $ECHO_C" >&6
5046 else
5047   ac_func_search_save_LIBS=$LIBS
5048 ac_cv_search_setproctitle=no
5049 cat >conftest.$ac_ext <<_ACEOF
5050 /* confdefs.h.  */
5051 _ACEOF
5052 cat confdefs.h >>conftest.$ac_ext
5053 cat >>conftest.$ac_ext <<_ACEOF
5054 /* end confdefs.h.  */
5055
5056 /* Override any gcc2 internal prototype to avoid an error.  */
5057 #ifdef __cplusplus
5058 extern "C"
5059 #endif
5060 /* We use char because int might match the return type of a gcc2
5061    builtin and then its argument prototype would still apply.  */
5062 char setproctitle ();
5063 int
5064 main ()
5065 {
5066 setproctitle ();
5067   ;
5068   return 0;
5069 }
5070 _ACEOF
5071 rm -f conftest.$ac_objext conftest$ac_exeext
5072 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5073   (eval $ac_link) 2>conftest.er1
5074   ac_status=$?
5075   grep -v '^ *+' conftest.er1 >conftest.err
5076   rm -f conftest.er1
5077   cat conftest.err >&5
5078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5079   (exit $ac_status); } &&
5080          { ac_try='test -z "$ac_c_werror_flag"
5081                          || test ! -s conftest.err'
5082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5083   (eval $ac_try) 2>&5
5084   ac_status=$?
5085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086   (exit $ac_status); }; } &&
5087          { ac_try='test -s conftest$ac_exeext'
5088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5089   (eval $ac_try) 2>&5
5090   ac_status=$?
5091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5092   (exit $ac_status); }; }; then
5093   ac_cv_search_setproctitle="none required"
5094 else
5095   echo "$as_me: failed program was:" >&5
5096 sed 's/^/| /' conftest.$ac_ext >&5
5097
5098 fi
5099 rm -f conftest.err conftest.$ac_objext \
5100       conftest$ac_exeext conftest.$ac_ext
5101 if test "$ac_cv_search_setproctitle" = no; then
5102   for ac_lib in util; do
5103     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5104     cat >conftest.$ac_ext <<_ACEOF
5105 /* confdefs.h.  */
5106 _ACEOF
5107 cat confdefs.h >>conftest.$ac_ext
5108 cat >>conftest.$ac_ext <<_ACEOF
5109 /* end confdefs.h.  */
5110
5111 /* Override any gcc2 internal prototype to avoid an error.  */
5112 #ifdef __cplusplus
5113 extern "C"
5114 #endif
5115 /* We use char because int might match the return type of a gcc2
5116    builtin and then its argument prototype would still apply.  */
5117 char setproctitle ();
5118 int
5119 main ()
5120 {
5121 setproctitle ();
5122   ;
5123   return 0;
5124 }
5125 _ACEOF
5126 rm -f conftest.$ac_objext conftest$ac_exeext
5127 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5128   (eval $ac_link) 2>conftest.er1
5129   ac_status=$?
5130   grep -v '^ *+' conftest.er1 >conftest.err
5131   rm -f conftest.er1
5132   cat conftest.err >&5
5133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134   (exit $ac_status); } &&
5135          { ac_try='test -z "$ac_c_werror_flag"
5136                          || test ! -s conftest.err'
5137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5138   (eval $ac_try) 2>&5
5139   ac_status=$?
5140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141   (exit $ac_status); }; } &&
5142          { ac_try='test -s conftest$ac_exeext'
5143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5144   (eval $ac_try) 2>&5
5145   ac_status=$?
5146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147   (exit $ac_status); }; }; then
5148   ac_cv_search_setproctitle="-l$ac_lib"
5149 break
5150 else
5151   echo "$as_me: failed program was:" >&5
5152 sed 's/^/| /' conftest.$ac_ext >&5
5153
5154 fi
5155 rm -f conftest.err conftest.$ac_objext \
5156       conftest$ac_exeext conftest.$ac_ext
5157   done
5158 fi
5159 LIBS=$ac_func_search_save_LIBS
5160 fi
5161 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
5162 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
5163 if test "$ac_cv_search_setproctitle" != no; then
5164   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
5165
5166 fi
5167
5168 echo "$as_me:$LINENO: checking for library containing pow" >&5
5169 echo $ECHO_N "checking for library containing pow... $ECHO_C" >&6
5170 if test "${ac_cv_search_pow+set}" = set; then
5171   echo $ECHO_N "(cached) $ECHO_C" >&6
5172 else
5173   ac_func_search_save_LIBS=$LIBS
5174 ac_cv_search_pow=no
5175 cat >conftest.$ac_ext <<_ACEOF
5176 /* confdefs.h.  */
5177 _ACEOF
5178 cat confdefs.h >>conftest.$ac_ext
5179 cat >>conftest.$ac_ext <<_ACEOF
5180 /* end confdefs.h.  */
5181
5182 /* Override any gcc2 internal prototype to avoid an error.  */
5183 #ifdef __cplusplus
5184 extern "C"
5185 #endif
5186 /* We use char because int might match the return type of a gcc2
5187    builtin and then its argument prototype would still apply.  */
5188 char pow ();
5189 int
5190 main ()
5191 {
5192 pow ();
5193   ;
5194   return 0;
5195 }
5196 _ACEOF
5197 rm -f conftest.$ac_objext conftest$ac_exeext
5198 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5199   (eval $ac_link) 2>conftest.er1
5200   ac_status=$?
5201   grep -v '^ *+' conftest.er1 >conftest.err
5202   rm -f conftest.er1
5203   cat conftest.err >&5
5204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205   (exit $ac_status); } &&
5206          { ac_try='test -z "$ac_c_werror_flag"
5207                          || test ! -s conftest.err'
5208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5209   (eval $ac_try) 2>&5
5210   ac_status=$?
5211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5212   (exit $ac_status); }; } &&
5213          { ac_try='test -s conftest$ac_exeext'
5214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5215   (eval $ac_try) 2>&5
5216   ac_status=$?
5217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5218   (exit $ac_status); }; }; then
5219   ac_cv_search_pow="none required"
5220 else
5221   echo "$as_me: failed program was:" >&5
5222 sed 's/^/| /' conftest.$ac_ext >&5
5223
5224 fi
5225 rm -f conftest.err conftest.$ac_objext \
5226       conftest$ac_exeext conftest.$ac_ext
5227 if test "$ac_cv_search_pow" = no; then
5228   for ac_lib in m; do
5229     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5230     cat >conftest.$ac_ext <<_ACEOF
5231 /* confdefs.h.  */
5232 _ACEOF
5233 cat confdefs.h >>conftest.$ac_ext
5234 cat >>conftest.$ac_ext <<_ACEOF
5235 /* end confdefs.h.  */
5236
5237 /* Override any gcc2 internal prototype to avoid an error.  */
5238 #ifdef __cplusplus
5239 extern "C"
5240 #endif
5241 /* We use char because int might match the return type of a gcc2
5242    builtin and then its argument prototype would still apply.  */
5243 char pow ();
5244 int
5245 main ()
5246 {
5247 pow ();
5248   ;
5249   return 0;
5250 }
5251 _ACEOF
5252 rm -f conftest.$ac_objext conftest$ac_exeext
5253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5254   (eval $ac_link) 2>conftest.er1
5255   ac_status=$?
5256   grep -v '^ *+' conftest.er1 >conftest.err
5257   rm -f conftest.er1
5258   cat conftest.err >&5
5259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5260   (exit $ac_status); } &&
5261          { ac_try='test -z "$ac_c_werror_flag"
5262                          || test ! -s conftest.err'
5263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5264   (eval $ac_try) 2>&5
5265   ac_status=$?
5266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267   (exit $ac_status); }; } &&
5268          { ac_try='test -s conftest$ac_exeext'
5269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5270   (eval $ac_try) 2>&5
5271   ac_status=$?
5272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5273   (exit $ac_status); }; }; then
5274   ac_cv_search_pow="-l$ac_lib"
5275 break
5276 else
5277   echo "$as_me: failed program was:" >&5
5278 sed 's/^/| /' conftest.$ac_ext >&5
5279
5280 fi
5281 rm -f conftest.err conftest.$ac_objext \
5282       conftest$ac_exeext conftest.$ac_ext
5283   done
5284 fi
5285 LIBS=$ac_func_search_save_LIBS
5286 fi
5287 echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
5288 echo "${ECHO_T}$ac_cv_search_pow" >&6
5289 if test "$ac_cv_search_pow" != no; then
5290   test "$ac_cv_search_pow" = "none required" || LIBS="$ac_cv_search_pow $LIBS"
5291
5292 fi
5293
5294 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5295 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5296 if test "${ac_cv_search_dlopen+set}" = set; then
5297   echo $ECHO_N "(cached) $ECHO_C" >&6
5298 else
5299   ac_func_search_save_LIBS=$LIBS
5300 ac_cv_search_dlopen=no
5301 cat >conftest.$ac_ext <<_ACEOF
5302 /* confdefs.h.  */
5303 _ACEOF
5304 cat confdefs.h >>conftest.$ac_ext
5305 cat >>conftest.$ac_ext <<_ACEOF
5306 /* end confdefs.h.  */
5307
5308 /* Override any gcc2 internal prototype to avoid an error.  */
5309 #ifdef __cplusplus
5310 extern "C"
5311 #endif
5312 /* We use char because int might match the return type of a gcc2
5313    builtin and then its argument prototype would still apply.  */
5314 char dlopen ();
5315 int
5316 main ()
5317 {
5318 dlopen ();
5319   ;
5320   return 0;
5321 }
5322 _ACEOF
5323 rm -f conftest.$ac_objext conftest$ac_exeext
5324 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5325   (eval $ac_link) 2>conftest.er1
5326   ac_status=$?
5327   grep -v '^ *+' conftest.er1 >conftest.err
5328   rm -f conftest.er1
5329   cat conftest.err >&5
5330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5331   (exit $ac_status); } &&
5332          { ac_try='test -z "$ac_c_werror_flag"
5333                          || test ! -s conftest.err'
5334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5335   (eval $ac_try) 2>&5
5336   ac_status=$?
5337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338   (exit $ac_status); }; } &&
5339          { ac_try='test -s conftest$ac_exeext'
5340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341   (eval $ac_try) 2>&5
5342   ac_status=$?
5343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344   (exit $ac_status); }; }; then
5345   ac_cv_search_dlopen="none required"
5346 else
5347   echo "$as_me: failed program was:" >&5
5348 sed 's/^/| /' conftest.$ac_ext >&5
5349
5350 fi
5351 rm -f conftest.err conftest.$ac_objext \
5352       conftest$ac_exeext conftest.$ac_ext
5353 if test "$ac_cv_search_dlopen" = no; then
5354   for ac_lib in dl; do
5355     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5356     cat >conftest.$ac_ext <<_ACEOF
5357 /* confdefs.h.  */
5358 _ACEOF
5359 cat confdefs.h >>conftest.$ac_ext
5360 cat >>conftest.$ac_ext <<_ACEOF
5361 /* end confdefs.h.  */
5362
5363 /* Override any gcc2 internal prototype to avoid an error.  */
5364 #ifdef __cplusplus
5365 extern "C"
5366 #endif
5367 /* We use char because int might match the return type of a gcc2
5368    builtin and then its argument prototype would still apply.  */
5369 char dlopen ();
5370 int
5371 main ()
5372 {
5373 dlopen ();
5374   ;
5375   return 0;
5376 }
5377 _ACEOF
5378 rm -f conftest.$ac_objext conftest$ac_exeext
5379 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5380   (eval $ac_link) 2>conftest.er1
5381   ac_status=$?
5382   grep -v '^ *+' conftest.er1 >conftest.err
5383   rm -f conftest.er1
5384   cat conftest.err >&5
5385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5386   (exit $ac_status); } &&
5387          { ac_try='test -z "$ac_c_werror_flag"
5388                          || test ! -s conftest.err'
5389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5390   (eval $ac_try) 2>&5
5391   ac_status=$?
5392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5393   (exit $ac_status); }; } &&
5394          { ac_try='test -s conftest$ac_exeext'
5395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5396   (eval $ac_try) 2>&5
5397   ac_status=$?
5398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5399   (exit $ac_status); }; }; then
5400   ac_cv_search_dlopen="-l$ac_lib"
5401 break
5402 else
5403   echo "$as_me: failed program was:" >&5
5404 sed 's/^/| /' conftest.$ac_ext >&5
5405
5406 fi
5407 rm -f conftest.err conftest.$ac_objext \
5408       conftest$ac_exeext conftest.$ac_ext
5409   done
5410 fi
5411 LIBS=$ac_func_search_save_LIBS
5412 fi
5413 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5414 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5415 if test "$ac_cv_search_dlopen" != no; then
5416   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5417
5418 fi
5419
5420 echo "$as_me:$LINENO: checking for library containing socket" >&5
5421 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5422 if test "${ac_cv_search_socket+set}" = set; then
5423   echo $ECHO_N "(cached) $ECHO_C" >&6
5424 else
5425   ac_func_search_save_LIBS=$LIBS
5426 ac_cv_search_socket=no
5427 cat >conftest.$ac_ext <<_ACEOF
5428 /* confdefs.h.  */
5429 _ACEOF
5430 cat confdefs.h >>conftest.$ac_ext
5431 cat >>conftest.$ac_ext <<_ACEOF
5432 /* end confdefs.h.  */
5433
5434 /* Override any gcc2 internal prototype to avoid an error.  */
5435 #ifdef __cplusplus
5436 extern "C"
5437 #endif
5438 /* We use char because int might match the return type of a gcc2
5439    builtin and then its argument prototype would still apply.  */
5440 char socket ();
5441 int
5442 main ()
5443 {
5444 socket ();
5445   ;
5446   return 0;
5447 }
5448 _ACEOF
5449 rm -f conftest.$ac_objext conftest$ac_exeext
5450 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5451   (eval $ac_link) 2>conftest.er1
5452   ac_status=$?
5453   grep -v '^ *+' conftest.er1 >conftest.err
5454   rm -f conftest.er1
5455   cat conftest.err >&5
5456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5457   (exit $ac_status); } &&
5458          { ac_try='test -z "$ac_c_werror_flag"
5459                          || test ! -s conftest.err'
5460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5461   (eval $ac_try) 2>&5
5462   ac_status=$?
5463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464   (exit $ac_status); }; } &&
5465          { ac_try='test -s conftest$ac_exeext'
5466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5467   (eval $ac_try) 2>&5
5468   ac_status=$?
5469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470   (exit $ac_status); }; }; then
5471   ac_cv_search_socket="none required"
5472 else
5473   echo "$as_me: failed program was:" >&5
5474 sed 's/^/| /' conftest.$ac_ext >&5
5475
5476 fi
5477 rm -f conftest.err conftest.$ac_objext \
5478       conftest$ac_exeext conftest.$ac_ext
5479 if test "$ac_cv_search_socket" = no; then
5480   for ac_lib in socket wsock32; do
5481     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5482     cat >conftest.$ac_ext <<_ACEOF
5483 /* confdefs.h.  */
5484 _ACEOF
5485 cat confdefs.h >>conftest.$ac_ext
5486 cat >>conftest.$ac_ext <<_ACEOF
5487 /* end confdefs.h.  */
5488
5489 /* Override any gcc2 internal prototype to avoid an error.  */
5490 #ifdef __cplusplus
5491 extern "C"
5492 #endif
5493 /* We use char because int might match the return type of a gcc2
5494    builtin and then its argument prototype would still apply.  */
5495 char socket ();
5496 int
5497 main ()
5498 {
5499 socket ();
5500   ;
5501   return 0;
5502 }
5503 _ACEOF
5504 rm -f conftest.$ac_objext conftest$ac_exeext
5505 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5506   (eval $ac_link) 2>conftest.er1
5507   ac_status=$?
5508   grep -v '^ *+' conftest.er1 >conftest.err
5509   rm -f conftest.er1
5510   cat conftest.err >&5
5511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5512   (exit $ac_status); } &&
5513          { ac_try='test -z "$ac_c_werror_flag"
5514                          || test ! -s conftest.err'
5515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5516   (eval $ac_try) 2>&5
5517   ac_status=$?
5518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5519   (exit $ac_status); }; } &&
5520          { ac_try='test -s conftest$ac_exeext'
5521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5522   (eval $ac_try) 2>&5
5523   ac_status=$?
5524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525   (exit $ac_status); }; }; then
5526   ac_cv_search_socket="-l$ac_lib"
5527 break
5528 else
5529   echo "$as_me: failed program was:" >&5
5530 sed 's/^/| /' conftest.$ac_ext >&5
5531
5532 fi
5533 rm -f conftest.err conftest.$ac_objext \
5534       conftest$ac_exeext conftest.$ac_ext
5535   done
5536 fi
5537 LIBS=$ac_func_search_save_LIBS
5538 fi
5539 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5540 echo "${ECHO_T}$ac_cv_search_socket" >&6
5541 if test "$ac_cv_search_socket" != no; then
5542   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5543
5544 fi
5545
5546 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5547 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5548 if test "${ac_cv_search_shl_load+set}" = set; then
5549   echo $ECHO_N "(cached) $ECHO_C" >&6
5550 else
5551   ac_func_search_save_LIBS=$LIBS
5552 ac_cv_search_shl_load=no
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 /* Override any gcc2 internal prototype to avoid an error.  */
5561 #ifdef __cplusplus
5562 extern "C"
5563 #endif
5564 /* We use char because int might match the return type of a gcc2
5565    builtin and then its argument prototype would still apply.  */
5566 char shl_load ();
5567 int
5568 main ()
5569 {
5570 shl_load ();
5571   ;
5572   return 0;
5573 }
5574 _ACEOF
5575 rm -f conftest.$ac_objext conftest$ac_exeext
5576 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5577   (eval $ac_link) 2>conftest.er1
5578   ac_status=$?
5579   grep -v '^ *+' conftest.er1 >conftest.err
5580   rm -f conftest.er1
5581   cat conftest.err >&5
5582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5583   (exit $ac_status); } &&
5584          { ac_try='test -z "$ac_c_werror_flag"
5585                          || test ! -s conftest.err'
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); }; } &&
5591          { ac_try='test -s conftest$ac_exeext'
5592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5593   (eval $ac_try) 2>&5
5594   ac_status=$?
5595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5596   (exit $ac_status); }; }; then
5597   ac_cv_search_shl_load="none required"
5598 else
5599   echo "$as_me: failed program was:" >&5
5600 sed 's/^/| /' conftest.$ac_ext >&5
5601
5602 fi
5603 rm -f conftest.err conftest.$ac_objext \
5604       conftest$ac_exeext conftest.$ac_ext
5605 if test "$ac_cv_search_shl_load" = no; then
5606   for ac_lib in dld; do
5607     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5608     cat >conftest.$ac_ext <<_ACEOF
5609 /* confdefs.h.  */
5610 _ACEOF
5611 cat confdefs.h >>conftest.$ac_ext
5612 cat >>conftest.$ac_ext <<_ACEOF
5613 /* end confdefs.h.  */
5614
5615 /* Override any gcc2 internal prototype to avoid an error.  */
5616 #ifdef __cplusplus
5617 extern "C"
5618 #endif
5619 /* We use char because int might match the return type of a gcc2
5620    builtin and then its argument prototype would still apply.  */
5621 char shl_load ();
5622 int
5623 main ()
5624 {
5625 shl_load ();
5626   ;
5627   return 0;
5628 }
5629 _ACEOF
5630 rm -f conftest.$ac_objext conftest$ac_exeext
5631 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5632   (eval $ac_link) 2>conftest.er1
5633   ac_status=$?
5634   grep -v '^ *+' conftest.er1 >conftest.err
5635   rm -f conftest.er1
5636   cat conftest.err >&5
5637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5638   (exit $ac_status); } &&
5639          { ac_try='test -z "$ac_c_werror_flag"
5640                          || test ! -s conftest.err'
5641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5642   (eval $ac_try) 2>&5
5643   ac_status=$?
5644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5645   (exit $ac_status); }; } &&
5646          { ac_try='test -s conftest$ac_exeext'
5647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5648   (eval $ac_try) 2>&5
5649   ac_status=$?
5650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651   (exit $ac_status); }; }; then
5652   ac_cv_search_shl_load="-l$ac_lib"
5653 break
5654 else
5655   echo "$as_me: failed program was:" >&5
5656 sed 's/^/| /' conftest.$ac_ext >&5
5657
5658 fi
5659 rm -f conftest.err conftest.$ac_objext \
5660       conftest$ac_exeext conftest.$ac_ext
5661   done
5662 fi
5663 LIBS=$ac_func_search_save_LIBS
5664 fi
5665 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5666 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5667 if test "$ac_cv_search_shl_load" != no; then
5668   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5669
5670 fi
5671
5672 # We only use libld in port/dynloader/aix.c
5673 case $host_os in
5674      aix*)
5675         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5676 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5677 if test "${ac_cv_search_ldopen+set}" = set; then
5678   echo $ECHO_N "(cached) $ECHO_C" >&6
5679 else
5680   ac_func_search_save_LIBS=$LIBS
5681 ac_cv_search_ldopen=no
5682 cat >conftest.$ac_ext <<_ACEOF
5683 /* confdefs.h.  */
5684 _ACEOF
5685 cat confdefs.h >>conftest.$ac_ext
5686 cat >>conftest.$ac_ext <<_ACEOF
5687 /* end confdefs.h.  */
5688
5689 /* Override any gcc2 internal prototype to avoid an error.  */
5690 #ifdef __cplusplus
5691 extern "C"
5692 #endif
5693 /* We use char because int might match the return type of a gcc2
5694    builtin and then its argument prototype would still apply.  */
5695 char ldopen ();
5696 int
5697 main ()
5698 {
5699 ldopen ();
5700   ;
5701   return 0;
5702 }
5703 _ACEOF
5704 rm -f conftest.$ac_objext conftest$ac_exeext
5705 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5706   (eval $ac_link) 2>conftest.er1
5707   ac_status=$?
5708   grep -v '^ *+' conftest.er1 >conftest.err
5709   rm -f conftest.er1
5710   cat conftest.err >&5
5711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712   (exit $ac_status); } &&
5713          { ac_try='test -z "$ac_c_werror_flag"
5714                          || test ! -s conftest.err'
5715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5716   (eval $ac_try) 2>&5
5717   ac_status=$?
5718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719   (exit $ac_status); }; } &&
5720          { ac_try='test -s conftest$ac_exeext'
5721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5722   (eval $ac_try) 2>&5
5723   ac_status=$?
5724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725   (exit $ac_status); }; }; then
5726   ac_cv_search_ldopen="none required"
5727 else
5728   echo "$as_me: failed program was:" >&5
5729 sed 's/^/| /' conftest.$ac_ext >&5
5730
5731 fi
5732 rm -f conftest.err conftest.$ac_objext \
5733       conftest$ac_exeext conftest.$ac_ext
5734 if test "$ac_cv_search_ldopen" = no; then
5735   for ac_lib in ld; do
5736     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5737     cat >conftest.$ac_ext <<_ACEOF
5738 /* confdefs.h.  */
5739 _ACEOF
5740 cat confdefs.h >>conftest.$ac_ext
5741 cat >>conftest.$ac_ext <<_ACEOF
5742 /* end confdefs.h.  */
5743
5744 /* Override any gcc2 internal prototype to avoid an error.  */
5745 #ifdef __cplusplus
5746 extern "C"
5747 #endif
5748 /* We use char because int might match the return type of a gcc2
5749    builtin and then its argument prototype would still apply.  */
5750 char ldopen ();
5751 int
5752 main ()
5753 {
5754 ldopen ();
5755   ;
5756   return 0;
5757 }
5758 _ACEOF
5759 rm -f conftest.$ac_objext conftest$ac_exeext
5760 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5761   (eval $ac_link) 2>conftest.er1
5762   ac_status=$?
5763   grep -v '^ *+' conftest.er1 >conftest.err
5764   rm -f conftest.er1
5765   cat conftest.err >&5
5766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5767   (exit $ac_status); } &&
5768          { ac_try='test -z "$ac_c_werror_flag"
5769                          || test ! -s conftest.err'
5770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5771   (eval $ac_try) 2>&5
5772   ac_status=$?
5773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5774   (exit $ac_status); }; } &&
5775          { ac_try='test -s conftest$ac_exeext'
5776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5777   (eval $ac_try) 2>&5
5778   ac_status=$?
5779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5780   (exit $ac_status); }; }; then
5781   ac_cv_search_ldopen="-l$ac_lib"
5782 break
5783 else
5784   echo "$as_me: failed program was:" >&5
5785 sed 's/^/| /' conftest.$ac_ext >&5
5786
5787 fi
5788 rm -f conftest.err conftest.$ac_objext \
5789       conftest$ac_exeext conftest.$ac_ext
5790   done
5791 fi
5792 LIBS=$ac_func_search_save_LIBS
5793 fi
5794 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5795 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5796 if test "$ac_cv_search_ldopen" != no; then
5797   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5798
5799 fi
5800
5801         ;;
5802 esac
5803 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5804 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5805 if test "${ac_cv_search_getopt_long+set}" = set; then
5806   echo $ECHO_N "(cached) $ECHO_C" >&6
5807 else
5808   ac_func_search_save_LIBS=$LIBS
5809 ac_cv_search_getopt_long=no
5810 cat >conftest.$ac_ext <<_ACEOF
5811 /* confdefs.h.  */
5812 _ACEOF
5813 cat confdefs.h >>conftest.$ac_ext
5814 cat >>conftest.$ac_ext <<_ACEOF
5815 /* end confdefs.h.  */
5816
5817 /* Override any gcc2 internal prototype to avoid an error.  */
5818 #ifdef __cplusplus
5819 extern "C"
5820 #endif
5821 /* We use char because int might match the return type of a gcc2
5822    builtin and then its argument prototype would still apply.  */
5823 char getopt_long ();
5824 int
5825 main ()
5826 {
5827 getopt_long ();
5828   ;
5829   return 0;
5830 }
5831 _ACEOF
5832 rm -f conftest.$ac_objext conftest$ac_exeext
5833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5834   (eval $ac_link) 2>conftest.er1
5835   ac_status=$?
5836   grep -v '^ *+' conftest.er1 >conftest.err
5837   rm -f conftest.er1
5838   cat conftest.err >&5
5839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5840   (exit $ac_status); } &&
5841          { ac_try='test -z "$ac_c_werror_flag"
5842                          || test ! -s conftest.err'
5843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5844   (eval $ac_try) 2>&5
5845   ac_status=$?
5846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5847   (exit $ac_status); }; } &&
5848          { ac_try='test -s conftest$ac_exeext'
5849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5850   (eval $ac_try) 2>&5
5851   ac_status=$?
5852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5853   (exit $ac_status); }; }; then
5854   ac_cv_search_getopt_long="none required"
5855 else
5856   echo "$as_me: failed program was:" >&5
5857 sed 's/^/| /' conftest.$ac_ext >&5
5858
5859 fi
5860 rm -f conftest.err conftest.$ac_objext \
5861       conftest$ac_exeext conftest.$ac_ext
5862 if test "$ac_cv_search_getopt_long" = no; then
5863   for ac_lib in getopt gnugetopt; do
5864     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5865     cat >conftest.$ac_ext <<_ACEOF
5866 /* confdefs.h.  */
5867 _ACEOF
5868 cat confdefs.h >>conftest.$ac_ext
5869 cat >>conftest.$ac_ext <<_ACEOF
5870 /* end confdefs.h.  */
5871
5872 /* Override any gcc2 internal prototype to avoid an error.  */
5873 #ifdef __cplusplus
5874 extern "C"
5875 #endif
5876 /* We use char because int might match the return type of a gcc2
5877    builtin and then its argument prototype would still apply.  */
5878 char getopt_long ();
5879 int
5880 main ()
5881 {
5882 getopt_long ();
5883   ;
5884   return 0;
5885 }
5886 _ACEOF
5887 rm -f conftest.$ac_objext conftest$ac_exeext
5888 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5889   (eval $ac_link) 2>conftest.er1
5890   ac_status=$?
5891   grep -v '^ *+' conftest.er1 >conftest.err
5892   rm -f conftest.er1
5893   cat conftest.err >&5
5894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895   (exit $ac_status); } &&
5896          { ac_try='test -z "$ac_c_werror_flag"
5897                          || test ! -s conftest.err'
5898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5899   (eval $ac_try) 2>&5
5900   ac_status=$?
5901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902   (exit $ac_status); }; } &&
5903          { ac_try='test -s conftest$ac_exeext'
5904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5905   (eval $ac_try) 2>&5
5906   ac_status=$?
5907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908   (exit $ac_status); }; }; then
5909   ac_cv_search_getopt_long="-l$ac_lib"
5910 break
5911 else
5912   echo "$as_me: failed program was:" >&5
5913 sed 's/^/| /' conftest.$ac_ext >&5
5914
5915 fi
5916 rm -f conftest.err conftest.$ac_objext \
5917       conftest$ac_exeext conftest.$ac_ext
5918   done
5919 fi
5920 LIBS=$ac_func_search_save_LIBS
5921 fi
5922 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5923 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5924 if test "$ac_cv_search_getopt_long" != no; then
5925   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5926
5927 fi
5928
5929 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5930 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5931 if test "${ac_cv_search_crypt+set}" = set; then
5932   echo $ECHO_N "(cached) $ECHO_C" >&6
5933 else
5934   ac_func_search_save_LIBS=$LIBS
5935 ac_cv_search_crypt=no
5936 cat >conftest.$ac_ext <<_ACEOF
5937 /* confdefs.h.  */
5938 _ACEOF
5939 cat confdefs.h >>conftest.$ac_ext
5940 cat >>conftest.$ac_ext <<_ACEOF
5941 /* end confdefs.h.  */
5942
5943 /* Override any gcc2 internal prototype to avoid an error.  */
5944 #ifdef __cplusplus
5945 extern "C"
5946 #endif
5947 /* We use char because int might match the return type of a gcc2
5948    builtin and then its argument prototype would still apply.  */
5949 char crypt ();
5950 int
5951 main ()
5952 {
5953 crypt ();
5954   ;
5955   return 0;
5956 }
5957 _ACEOF
5958 rm -f conftest.$ac_objext conftest$ac_exeext
5959 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5960   (eval $ac_link) 2>conftest.er1
5961   ac_status=$?
5962   grep -v '^ *+' conftest.er1 >conftest.err
5963   rm -f conftest.er1
5964   cat conftest.err >&5
5965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5966   (exit $ac_status); } &&
5967          { ac_try='test -z "$ac_c_werror_flag"
5968                          || test ! -s conftest.err'
5969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5970   (eval $ac_try) 2>&5
5971   ac_status=$?
5972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973   (exit $ac_status); }; } &&
5974          { ac_try='test -s conftest$ac_exeext'
5975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5976   (eval $ac_try) 2>&5
5977   ac_status=$?
5978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5979   (exit $ac_status); }; }; then
5980   ac_cv_search_crypt="none required"
5981 else
5982   echo "$as_me: failed program was:" >&5
5983 sed 's/^/| /' conftest.$ac_ext >&5
5984
5985 fi
5986 rm -f conftest.err conftest.$ac_objext \
5987       conftest$ac_exeext conftest.$ac_ext
5988 if test "$ac_cv_search_crypt" = no; then
5989   for ac_lib in crypt; do
5990     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5991     cat >conftest.$ac_ext <<_ACEOF
5992 /* confdefs.h.  */
5993 _ACEOF
5994 cat confdefs.h >>conftest.$ac_ext
5995 cat >>conftest.$ac_ext <<_ACEOF
5996 /* end confdefs.h.  */
5997
5998 /* Override any gcc2 internal prototype to avoid an error.  */
5999 #ifdef __cplusplus
6000 extern "C"
6001 #endif
6002 /* We use char because int might match the return type of a gcc2
6003    builtin and then its argument prototype would still apply.  */
6004 char crypt ();
6005 int
6006 main ()
6007 {
6008 crypt ();
6009   ;
6010   return 0;
6011 }
6012 _ACEOF
6013 rm -f conftest.$ac_objext conftest$ac_exeext
6014 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6015   (eval $ac_link) 2>conftest.er1
6016   ac_status=$?
6017   grep -v '^ *+' conftest.er1 >conftest.err
6018   rm -f conftest.er1
6019   cat conftest.err >&5
6020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021   (exit $ac_status); } &&
6022          { ac_try='test -z "$ac_c_werror_flag"
6023                          || test ! -s conftest.err'
6024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6025   (eval $ac_try) 2>&5
6026   ac_status=$?
6027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6028   (exit $ac_status); }; } &&
6029          { ac_try='test -s conftest$ac_exeext'
6030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6031   (eval $ac_try) 2>&5
6032   ac_status=$?
6033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6034   (exit $ac_status); }; }; then
6035   ac_cv_search_crypt="-l$ac_lib"
6036 break
6037 else
6038   echo "$as_me: failed program was:" >&5
6039 sed 's/^/| /' conftest.$ac_ext >&5
6040
6041 fi
6042 rm -f conftest.err conftest.$ac_objext \
6043       conftest$ac_exeext conftest.$ac_ext
6044   done
6045 fi
6046 LIBS=$ac_func_search_save_LIBS
6047 fi
6048 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6049 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6050 if test "$ac_cv_search_crypt" != no; then
6051   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6052
6053 fi
6054
6055 # Solaris:
6056 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6057 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6058 if test "${ac_cv_search_fdatasync+set}" = set; then
6059   echo $ECHO_N "(cached) $ECHO_C" >&6
6060 else
6061   ac_func_search_save_LIBS=$LIBS
6062 ac_cv_search_fdatasync=no
6063 cat >conftest.$ac_ext <<_ACEOF
6064 /* confdefs.h.  */
6065 _ACEOF
6066 cat confdefs.h >>conftest.$ac_ext
6067 cat >>conftest.$ac_ext <<_ACEOF
6068 /* end confdefs.h.  */
6069
6070 /* Override any gcc2 internal prototype to avoid an error.  */
6071 #ifdef __cplusplus
6072 extern "C"
6073 #endif
6074 /* We use char because int might match the return type of a gcc2
6075    builtin and then its argument prototype would still apply.  */
6076 char fdatasync ();
6077 int
6078 main ()
6079 {
6080 fdatasync ();
6081   ;
6082   return 0;
6083 }
6084 _ACEOF
6085 rm -f conftest.$ac_objext conftest$ac_exeext
6086 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6087   (eval $ac_link) 2>conftest.er1
6088   ac_status=$?
6089   grep -v '^ *+' conftest.er1 >conftest.err
6090   rm -f conftest.er1
6091   cat conftest.err >&5
6092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093   (exit $ac_status); } &&
6094          { ac_try='test -z "$ac_c_werror_flag"
6095                          || test ! -s conftest.err'
6096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6097   (eval $ac_try) 2>&5
6098   ac_status=$?
6099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6100   (exit $ac_status); }; } &&
6101          { ac_try='test -s conftest$ac_exeext'
6102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6103   (eval $ac_try) 2>&5
6104   ac_status=$?
6105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6106   (exit $ac_status); }; }; then
6107   ac_cv_search_fdatasync="none required"
6108 else
6109   echo "$as_me: failed program was:" >&5
6110 sed 's/^/| /' conftest.$ac_ext >&5
6111
6112 fi
6113 rm -f conftest.err conftest.$ac_objext \
6114       conftest$ac_exeext conftest.$ac_ext
6115 if test "$ac_cv_search_fdatasync" = no; then
6116   for ac_lib in rt posix4; do
6117     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6118     cat >conftest.$ac_ext <<_ACEOF
6119 /* confdefs.h.  */
6120 _ACEOF
6121 cat confdefs.h >>conftest.$ac_ext
6122 cat >>conftest.$ac_ext <<_ACEOF
6123 /* end confdefs.h.  */
6124
6125 /* Override any gcc2 internal prototype to avoid an error.  */
6126 #ifdef __cplusplus
6127 extern "C"
6128 #endif
6129 /* We use char because int might match the return type of a gcc2
6130    builtin and then its argument prototype would still apply.  */
6131 char fdatasync ();
6132 int
6133 main ()
6134 {
6135 fdatasync ();
6136   ;
6137   return 0;
6138 }
6139 _ACEOF
6140 rm -f conftest.$ac_objext conftest$ac_exeext
6141 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6142   (eval $ac_link) 2>conftest.er1
6143   ac_status=$?
6144   grep -v '^ *+' conftest.er1 >conftest.err
6145   rm -f conftest.er1
6146   cat conftest.err >&5
6147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6148   (exit $ac_status); } &&
6149          { ac_try='test -z "$ac_c_werror_flag"
6150                          || test ! -s conftest.err'
6151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6152   (eval $ac_try) 2>&5
6153   ac_status=$?
6154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6155   (exit $ac_status); }; } &&
6156          { ac_try='test -s conftest$ac_exeext'
6157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6158   (eval $ac_try) 2>&5
6159   ac_status=$?
6160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6161   (exit $ac_status); }; }; then
6162   ac_cv_search_fdatasync="-l$ac_lib"
6163 break
6164 else
6165   echo "$as_me: failed program was:" >&5
6166 sed 's/^/| /' conftest.$ac_ext >&5
6167
6168 fi
6169 rm -f conftest.err conftest.$ac_objext \
6170       conftest$ac_exeext conftest.$ac_ext
6171   done
6172 fi
6173 LIBS=$ac_func_search_save_LIBS
6174 fi
6175 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6176 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6177 if test "$ac_cv_search_fdatasync" != no; then
6178   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6179
6180 fi
6181
6182 # Cygwin:
6183 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6184 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6185 if test "${ac_cv_search_shmget+set}" = set; then
6186   echo $ECHO_N "(cached) $ECHO_C" >&6
6187 else
6188   ac_func_search_save_LIBS=$LIBS
6189 ac_cv_search_shmget=no
6190 cat >conftest.$ac_ext <<_ACEOF
6191 /* confdefs.h.  */
6192 _ACEOF
6193 cat confdefs.h >>conftest.$ac_ext
6194 cat >>conftest.$ac_ext <<_ACEOF
6195 /* end confdefs.h.  */
6196
6197 /* Override any gcc2 internal prototype to avoid an error.  */
6198 #ifdef __cplusplus
6199 extern "C"
6200 #endif
6201 /* We use char because int might match the return type of a gcc2
6202    builtin and then its argument prototype would still apply.  */
6203 char shmget ();
6204 int
6205 main ()
6206 {
6207 shmget ();
6208   ;
6209   return 0;
6210 }
6211 _ACEOF
6212 rm -f conftest.$ac_objext conftest$ac_exeext
6213 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6214   (eval $ac_link) 2>conftest.er1
6215   ac_status=$?
6216   grep -v '^ *+' conftest.er1 >conftest.err
6217   rm -f conftest.er1
6218   cat conftest.err >&5
6219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6220   (exit $ac_status); } &&
6221          { ac_try='test -z "$ac_c_werror_flag"
6222                          || test ! -s conftest.err'
6223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6224   (eval $ac_try) 2>&5
6225   ac_status=$?
6226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227   (exit $ac_status); }; } &&
6228          { ac_try='test -s conftest$ac_exeext'
6229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6230   (eval $ac_try) 2>&5
6231   ac_status=$?
6232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6233   (exit $ac_status); }; }; then
6234   ac_cv_search_shmget="none required"
6235 else
6236   echo "$as_me: failed program was:" >&5
6237 sed 's/^/| /' conftest.$ac_ext >&5
6238
6239 fi
6240 rm -f conftest.err conftest.$ac_objext \
6241       conftest$ac_exeext conftest.$ac_ext
6242 if test "$ac_cv_search_shmget" = no; then
6243   for ac_lib in cygipc; do
6244     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6245     cat >conftest.$ac_ext <<_ACEOF
6246 /* confdefs.h.  */
6247 _ACEOF
6248 cat confdefs.h >>conftest.$ac_ext
6249 cat >>conftest.$ac_ext <<_ACEOF
6250 /* end confdefs.h.  */
6251
6252 /* Override any gcc2 internal prototype to avoid an error.  */
6253 #ifdef __cplusplus
6254 extern "C"
6255 #endif
6256 /* We use char because int might match the return type of a gcc2
6257    builtin and then its argument prototype would still apply.  */
6258 char shmget ();
6259 int
6260 main ()
6261 {
6262 shmget ();
6263   ;
6264   return 0;
6265 }
6266 _ACEOF
6267 rm -f conftest.$ac_objext conftest$ac_exeext
6268 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6269   (eval $ac_link) 2>conftest.er1
6270   ac_status=$?
6271   grep -v '^ *+' conftest.er1 >conftest.err
6272   rm -f conftest.er1
6273   cat conftest.err >&5
6274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6275   (exit $ac_status); } &&
6276          { ac_try='test -z "$ac_c_werror_flag"
6277                          || test ! -s conftest.err'
6278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6279   (eval $ac_try) 2>&5
6280   ac_status=$?
6281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282   (exit $ac_status); }; } &&
6283          { ac_try='test -s conftest$ac_exeext'
6284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6285   (eval $ac_try) 2>&5
6286   ac_status=$?
6287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6288   (exit $ac_status); }; }; then
6289   ac_cv_search_shmget="-l$ac_lib"
6290 break
6291 else
6292   echo "$as_me: failed program was:" >&5
6293 sed 's/^/| /' conftest.$ac_ext >&5
6294
6295 fi
6296 rm -f conftest.err conftest.$ac_objext \
6297       conftest$ac_exeext conftest.$ac_ext
6298   done
6299 fi
6300 LIBS=$ac_func_search_save_LIBS
6301 fi
6302 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6303 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6304 if test "$ac_cv_search_shmget" != no; then
6305   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6306
6307 fi
6308
6309
6310 if test "$with_readline" = yes; then
6311
6312
6313 if test "${pgac_cv_check_readline+set}" = set; then
6314   echo $ECHO_N "(cached) $ECHO_C" >&6
6315 else
6316   pgac_cv_check_readline=no
6317 pgac_save_LIBS=$LIBS
6318 if test x"$with_libedit_preferred" != x"yes"
6319 then    READLINE_ORDER="-lreadline -ledit"
6320 else    READLINE_ORDER="-ledit -lreadline"
6321 fi
6322 for pgac_rllib in $READLINE_ORDER ; do
6323   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6324 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6325   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6326     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6327     cat >conftest.$ac_ext <<_ACEOF
6328 /* confdefs.h.  */
6329 _ACEOF
6330 cat confdefs.h >>conftest.$ac_ext
6331 cat >>conftest.$ac_ext <<_ACEOF
6332 /* end confdefs.h.  */
6333
6334 /* Override any gcc2 internal prototype to avoid an error.  */
6335 #ifdef __cplusplus
6336 extern "C"
6337 #endif
6338 /* We use char because int might match the return type of a gcc2
6339    builtin and then its argument prototype would still apply.  */
6340 char readline ();
6341 int
6342 main ()
6343 {
6344 readline ();
6345   ;
6346   return 0;
6347 }
6348 _ACEOF
6349 rm -f conftest.$ac_objext conftest$ac_exeext
6350 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6351   (eval $ac_link) 2>conftest.er1
6352   ac_status=$?
6353   grep -v '^ *+' conftest.er1 >conftest.err
6354   rm -f conftest.er1
6355   cat conftest.err >&5
6356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6357   (exit $ac_status); } &&
6358          { ac_try='test -z "$ac_c_werror_flag"
6359                          || test ! -s conftest.err'
6360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6361   (eval $ac_try) 2>&5
6362   ac_status=$?
6363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364   (exit $ac_status); }; } &&
6365          { ac_try='test -s conftest$ac_exeext'
6366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6367   (eval $ac_try) 2>&5
6368   ac_status=$?
6369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6370   (exit $ac_status); }; }; then
6371
6372       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6373       # recognize dependent libraries; assume curses is needed if we didn't
6374       # find any dependency.
6375       case $host_os in
6376         netbsd* | openbsd* | irix*)
6377           if test x"$pgac_lib" = x"" ; then
6378             pgac_lib=" -lcurses"
6379           fi ;;
6380       esac
6381
6382       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6383       break
6384
6385 else
6386   echo "$as_me: failed program was:" >&5
6387 sed 's/^/| /' conftest.$ac_ext >&5
6388
6389 fi
6390 rm -f conftest.err conftest.$ac_objext \
6391       conftest$ac_exeext conftest.$ac_ext
6392   done
6393   if test "$pgac_cv_check_readline" != no ; then
6394     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6395 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6396     break
6397   else
6398     echo "$as_me:$LINENO: result: no" >&5
6399 echo "${ECHO_T}no" >&6
6400   fi
6401 done
6402 LIBS=$pgac_save_LIBS
6403
6404 fi
6405
6406 if test "$pgac_cv_check_readline" != no ; then
6407   LIBS="$pgac_cv_check_readline $LIBS"
6408
6409 cat >>confdefs.h <<\_ACEOF
6410 #define HAVE_LIBREADLINE 1
6411 _ACEOF
6412
6413 fi
6414
6415
6416   if test x"$pgac_cv_check_readline" = x"no"; then
6417     { { echo "$as_me:$LINENO: error: readline library not found
6418 If you have readline already installed, see config.log for details on the
6419 failure.  It is possible the compiler isn't looking in the proper directory.
6420 Use --without-readline to disable readline support." >&5
6421 echo "$as_me: error: readline library not found
6422 If you have readline already installed, see config.log for details on the
6423 failure.  It is possible the compiler isn't looking in the proper directory.
6424 Use --without-readline to disable readline support." >&2;}
6425    { (exit 1); exit 1; }; }
6426   fi
6427 fi
6428
6429 if test "$with_zlib" = yes; then
6430
6431 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6432 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6433 if test "${ac_cv_lib_z_inflate+set}" = set; then
6434   echo $ECHO_N "(cached) $ECHO_C" >&6
6435 else
6436   ac_check_lib_save_LIBS=$LIBS
6437 LIBS="-lz  $LIBS"
6438 cat >conftest.$ac_ext <<_ACEOF
6439 /* confdefs.h.  */
6440 _ACEOF
6441 cat confdefs.h >>conftest.$ac_ext
6442 cat >>conftest.$ac_ext <<_ACEOF
6443 /* end confdefs.h.  */
6444
6445 /* Override any gcc2 internal prototype to avoid an error.  */
6446 #ifdef __cplusplus
6447 extern "C"
6448 #endif
6449 /* We use char because int might match the return type of a gcc2
6450    builtin and then its argument prototype would still apply.  */
6451 char inflate ();
6452 int
6453 main ()
6454 {
6455 inflate ();
6456   ;
6457   return 0;
6458 }
6459 _ACEOF
6460 rm -f conftest.$ac_objext conftest$ac_exeext
6461 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6462   (eval $ac_link) 2>conftest.er1
6463   ac_status=$?
6464   grep -v '^ *+' conftest.er1 >conftest.err
6465   rm -f conftest.er1
6466   cat conftest.err >&5
6467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6468   (exit $ac_status); } &&
6469          { ac_try='test -z "$ac_c_werror_flag"
6470                          || test ! -s conftest.err'
6471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6472   (eval $ac_try) 2>&5
6473   ac_status=$?
6474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6475   (exit $ac_status); }; } &&
6476          { ac_try='test -s conftest$ac_exeext'
6477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6478   (eval $ac_try) 2>&5
6479   ac_status=$?
6480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6481   (exit $ac_status); }; }; then
6482   ac_cv_lib_z_inflate=yes
6483 else
6484   echo "$as_me: failed program was:" >&5
6485 sed 's/^/| /' conftest.$ac_ext >&5
6486
6487 ac_cv_lib_z_inflate=no
6488 fi
6489 rm -f conftest.err conftest.$ac_objext \
6490       conftest$ac_exeext conftest.$ac_ext
6491 LIBS=$ac_check_lib_save_LIBS
6492 fi
6493 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6494 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6495 if test $ac_cv_lib_z_inflate = yes; then
6496   cat >>confdefs.h <<_ACEOF
6497 #define HAVE_LIBZ 1
6498 _ACEOF
6499
6500   LIBS="-lz $LIBS"
6501
6502 else
6503   { { echo "$as_me:$LINENO: error: zlib library not found
6504 If you have zlib already installed, see config.log for details on the
6505 failure.  It is possible the compiler isn't looking in the proper directory.
6506 Use --without-zlib to disable zlib support." >&5
6507 echo "$as_me: error: zlib library not found
6508 If you have zlib already installed, see config.log for details on the
6509 failure.  It is possible the compiler isn't looking in the proper directory.
6510 Use --without-zlib to disable zlib support." >&2;}
6511    { (exit 1); exit 1; }; }
6512 fi
6513
6514 fi
6515
6516 if test "$enable_spinlocks" = yes; then
6517
6518 cat >>confdefs.h <<\_ACEOF
6519 #define HAVE_SPINLOCKS 1
6520 _ACEOF
6521
6522 else
6523   { echo "$as_me:$LINENO: WARNING:
6524 *** Not using spinlocks will cause poor performance." >&5
6525 echo "$as_me: WARNING:
6526 *** Not using spinlocks will cause poor performance." >&2;}
6527 fi
6528
6529 if test "$with_krb5" = yes ; then
6530   if test "$PORTNAME" != "win32"; then
6531      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6532 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6533 if test "${ac_cv_search_com_err+set}" = set; then
6534   echo $ECHO_N "(cached) $ECHO_C" >&6
6535 else
6536   ac_func_search_save_LIBS=$LIBS
6537 ac_cv_search_com_err=no
6538 cat >conftest.$ac_ext <<_ACEOF
6539 /* confdefs.h.  */
6540 _ACEOF
6541 cat confdefs.h >>conftest.$ac_ext
6542 cat >>conftest.$ac_ext <<_ACEOF
6543 /* end confdefs.h.  */
6544
6545 /* Override any gcc2 internal prototype to avoid an error.  */
6546 #ifdef __cplusplus
6547 extern "C"
6548 #endif
6549 /* We use char because int might match the return type of a gcc2
6550    builtin and then its argument prototype would still apply.  */
6551 char com_err ();
6552 int
6553 main ()
6554 {
6555 com_err ();
6556   ;
6557   return 0;
6558 }
6559 _ACEOF
6560 rm -f conftest.$ac_objext conftest$ac_exeext
6561 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6562   (eval $ac_link) 2>conftest.er1
6563   ac_status=$?
6564   grep -v '^ *+' conftest.er1 >conftest.err
6565   rm -f conftest.er1
6566   cat conftest.err >&5
6567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568   (exit $ac_status); } &&
6569          { ac_try='test -z "$ac_c_werror_flag"
6570                          || test ! -s conftest.err'
6571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6572   (eval $ac_try) 2>&5
6573   ac_status=$?
6574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6575   (exit $ac_status); }; } &&
6576          { ac_try='test -s conftest$ac_exeext'
6577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6578   (eval $ac_try) 2>&5
6579   ac_status=$?
6580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6581   (exit $ac_status); }; }; then
6582   ac_cv_search_com_err="none required"
6583 else
6584   echo "$as_me: failed program was:" >&5
6585 sed 's/^/| /' conftest.$ac_ext >&5
6586
6587 fi
6588 rm -f conftest.err conftest.$ac_objext \
6589       conftest$ac_exeext conftest.$ac_ext
6590 if test "$ac_cv_search_com_err" = no; then
6591   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6592     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6593     cat >conftest.$ac_ext <<_ACEOF
6594 /* confdefs.h.  */
6595 _ACEOF
6596 cat confdefs.h >>conftest.$ac_ext
6597 cat >>conftest.$ac_ext <<_ACEOF
6598 /* end confdefs.h.  */
6599
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 #ifdef __cplusplus
6602 extern "C"
6603 #endif
6604 /* We use char because int might match the return type of a gcc2
6605    builtin and then its argument prototype would still apply.  */
6606 char com_err ();
6607 int
6608 main ()
6609 {
6610 com_err ();
6611   ;
6612   return 0;
6613 }
6614 _ACEOF
6615 rm -f conftest.$ac_objext conftest$ac_exeext
6616 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6617   (eval $ac_link) 2>conftest.er1
6618   ac_status=$?
6619   grep -v '^ *+' conftest.er1 >conftest.err
6620   rm -f conftest.er1
6621   cat conftest.err >&5
6622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623   (exit $ac_status); } &&
6624          { ac_try='test -z "$ac_c_werror_flag"
6625                          || test ! -s conftest.err'
6626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6627   (eval $ac_try) 2>&5
6628   ac_status=$?
6629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630   (exit $ac_status); }; } &&
6631          { ac_try='test -s conftest$ac_exeext'
6632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6633   (eval $ac_try) 2>&5
6634   ac_status=$?
6635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636   (exit $ac_status); }; }; then
6637   ac_cv_search_com_err="-l$ac_lib"
6638 break
6639 else
6640   echo "$as_me: failed program was:" >&5
6641 sed 's/^/| /' conftest.$ac_ext >&5
6642
6643 fi
6644 rm -f conftest.err conftest.$ac_objext \
6645       conftest$ac_exeext conftest.$ac_ext
6646   done
6647 fi
6648 LIBS=$ac_func_search_save_LIBS
6649 fi
6650 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6651 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6652 if test "$ac_cv_search_com_err" != no; then
6653   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6654
6655 else
6656   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6657 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6658    { (exit 1); exit 1; }; }
6659 fi
6660
6661      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6662 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6663 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6664   echo $ECHO_N "(cached) $ECHO_C" >&6
6665 else
6666   ac_func_search_save_LIBS=$LIBS
6667 ac_cv_search_krb5_sendauth=no
6668 cat >conftest.$ac_ext <<_ACEOF
6669 /* confdefs.h.  */
6670 _ACEOF
6671 cat confdefs.h >>conftest.$ac_ext
6672 cat >>conftest.$ac_ext <<_ACEOF
6673 /* end confdefs.h.  */
6674
6675 /* Override any gcc2 internal prototype to avoid an error.  */
6676 #ifdef __cplusplus
6677 extern "C"
6678 #endif
6679 /* We use char because int might match the return type of a gcc2
6680    builtin and then its argument prototype would still apply.  */
6681 char krb5_sendauth ();
6682 int
6683 main ()
6684 {
6685 krb5_sendauth ();
6686   ;
6687   return 0;
6688 }
6689 _ACEOF
6690 rm -f conftest.$ac_objext conftest$ac_exeext
6691 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6692   (eval $ac_link) 2>conftest.er1
6693   ac_status=$?
6694   grep -v '^ *+' conftest.er1 >conftest.err
6695   rm -f conftest.er1
6696   cat conftest.err >&5
6697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6698   (exit $ac_status); } &&
6699          { ac_try='test -z "$ac_c_werror_flag"
6700                          || test ! -s conftest.err'
6701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6702   (eval $ac_try) 2>&5
6703   ac_status=$?
6704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6705   (exit $ac_status); }; } &&
6706          { ac_try='test -s conftest$ac_exeext'
6707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6708   (eval $ac_try) 2>&5
6709   ac_status=$?
6710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6711   (exit $ac_status); }; }; then
6712   ac_cv_search_krb5_sendauth="none required"
6713 else
6714   echo "$as_me: failed program was:" >&5
6715 sed 's/^/| /' conftest.$ac_ext >&5
6716
6717 fi
6718 rm -f conftest.err conftest.$ac_objext \
6719       conftest$ac_exeext conftest.$ac_ext
6720 if test "$ac_cv_search_krb5_sendauth" = no; then
6721   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6722     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6723     cat >conftest.$ac_ext <<_ACEOF
6724 /* confdefs.h.  */
6725 _ACEOF
6726 cat confdefs.h >>conftest.$ac_ext
6727 cat >>conftest.$ac_ext <<_ACEOF
6728 /* end confdefs.h.  */
6729
6730 /* Override any gcc2 internal prototype to avoid an error.  */
6731 #ifdef __cplusplus
6732 extern "C"
6733 #endif
6734 /* We use char because int might match the return type of a gcc2
6735    builtin and then its argument prototype would still apply.  */
6736 char krb5_sendauth ();
6737 int
6738 main ()
6739 {
6740 krb5_sendauth ();
6741   ;
6742   return 0;
6743 }
6744 _ACEOF
6745 rm -f conftest.$ac_objext conftest$ac_exeext
6746 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6747   (eval $ac_link) 2>conftest.er1
6748   ac_status=$?
6749   grep -v '^ *+' conftest.er1 >conftest.err
6750   rm -f conftest.er1
6751   cat conftest.err >&5
6752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6753   (exit $ac_status); } &&
6754          { ac_try='test -z "$ac_c_werror_flag"
6755                          || test ! -s conftest.err'
6756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6757   (eval $ac_try) 2>&5
6758   ac_status=$?
6759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6760   (exit $ac_status); }; } &&
6761          { ac_try='test -s conftest$ac_exeext'
6762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6763   (eval $ac_try) 2>&5
6764   ac_status=$?
6765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766   (exit $ac_status); }; }; then
6767   ac_cv_search_krb5_sendauth="-l$ac_lib"
6768 break
6769 else
6770   echo "$as_me: failed program was:" >&5
6771 sed 's/^/| /' conftest.$ac_ext >&5
6772
6773 fi
6774 rm -f conftest.err conftest.$ac_objext \
6775       conftest$ac_exeext conftest.$ac_ext
6776   done
6777 fi
6778 LIBS=$ac_func_search_save_LIBS
6779 fi
6780 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6781 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6782 if test "$ac_cv_search_krb5_sendauth" != no; then
6783   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6784
6785 else
6786   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6787 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6788    { (exit 1); exit 1; }; }
6789 fi
6790
6791   else
6792      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6793 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6794 if test "${ac_cv_search_com_err+set}" = set; then
6795   echo $ECHO_N "(cached) $ECHO_C" >&6
6796 else
6797   ac_func_search_save_LIBS=$LIBS
6798 ac_cv_search_com_err=no
6799 cat >conftest.$ac_ext <<_ACEOF
6800 /* confdefs.h.  */
6801 _ACEOF
6802 cat confdefs.h >>conftest.$ac_ext
6803 cat >>conftest.$ac_ext <<_ACEOF
6804 /* end confdefs.h.  */
6805
6806 /* Override any gcc2 internal prototype to avoid an error.  */
6807 #ifdef __cplusplus
6808 extern "C"
6809 #endif
6810 /* We use char because int might match the return type of a gcc2
6811    builtin and then its argument prototype would still apply.  */
6812 char com_err ();
6813 int
6814 main ()
6815 {
6816 com_err ();
6817   ;
6818   return 0;
6819 }
6820 _ACEOF
6821 rm -f conftest.$ac_objext conftest$ac_exeext
6822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6823   (eval $ac_link) 2>conftest.er1
6824   ac_status=$?
6825   grep -v '^ *+' conftest.er1 >conftest.err
6826   rm -f conftest.er1
6827   cat conftest.err >&5
6828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6829   (exit $ac_status); } &&
6830          { ac_try='test -z "$ac_c_werror_flag"
6831                          || test ! -s conftest.err'
6832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6833   (eval $ac_try) 2>&5
6834   ac_status=$?
6835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836   (exit $ac_status); }; } &&
6837          { ac_try='test -s conftest$ac_exeext'
6838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6839   (eval $ac_try) 2>&5
6840   ac_status=$?
6841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6842   (exit $ac_status); }; }; then
6843   ac_cv_search_com_err="none required"
6844 else
6845   echo "$as_me: failed program was:" >&5
6846 sed 's/^/| /' conftest.$ac_ext >&5
6847
6848 fi
6849 rm -f conftest.err conftest.$ac_objext \
6850       conftest$ac_exeext conftest.$ac_ext
6851 if test "$ac_cv_search_com_err" = no; then
6852   for ac_lib in 'comerr32 -lkrb5_32'; do
6853     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6854     cat >conftest.$ac_ext <<_ACEOF
6855 /* confdefs.h.  */
6856 _ACEOF
6857 cat confdefs.h >>conftest.$ac_ext
6858 cat >>conftest.$ac_ext <<_ACEOF
6859 /* end confdefs.h.  */
6860
6861 /* Override any gcc2 internal prototype to avoid an error.  */
6862 #ifdef __cplusplus
6863 extern "C"
6864 #endif
6865 /* We use char because int might match the return type of a gcc2
6866    builtin and then its argument prototype would still apply.  */
6867 char com_err ();
6868 int
6869 main ()
6870 {
6871 com_err ();
6872   ;
6873   return 0;
6874 }
6875 _ACEOF
6876 rm -f conftest.$ac_objext conftest$ac_exeext
6877 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6878   (eval $ac_link) 2>conftest.er1
6879   ac_status=$?
6880   grep -v '^ *+' conftest.er1 >conftest.err
6881   rm -f conftest.er1
6882   cat conftest.err >&5
6883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884   (exit $ac_status); } &&
6885          { ac_try='test -z "$ac_c_werror_flag"
6886                          || test ! -s conftest.err'
6887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6888   (eval $ac_try) 2>&5
6889   ac_status=$?
6890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6891   (exit $ac_status); }; } &&
6892          { ac_try='test -s conftest$ac_exeext'
6893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6894   (eval $ac_try) 2>&5
6895   ac_status=$?
6896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6897   (exit $ac_status); }; }; then
6898   ac_cv_search_com_err="-l$ac_lib"
6899 break
6900 else
6901   echo "$as_me: failed program was:" >&5
6902 sed 's/^/| /' conftest.$ac_ext >&5
6903
6904 fi
6905 rm -f conftest.err conftest.$ac_objext \
6906       conftest$ac_exeext conftest.$ac_ext
6907   done
6908 fi
6909 LIBS=$ac_func_search_save_LIBS
6910 fi
6911 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6912 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6913 if test "$ac_cv_search_com_err" != no; then
6914   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6915
6916 else
6917   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6918 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6919    { (exit 1); exit 1; }; }
6920 fi
6921
6922   fi
6923 fi
6924
6925 if test "$with_openssl" = yes ; then
6926     if test "$PORTNAME" != "win32"; then
6927
6928 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6929 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6930 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6931   echo $ECHO_N "(cached) $ECHO_C" >&6
6932 else
6933   ac_check_lib_save_LIBS=$LIBS
6934 LIBS="-lcrypto  $LIBS"
6935 cat >conftest.$ac_ext <<_ACEOF
6936 /* confdefs.h.  */
6937 _ACEOF
6938 cat confdefs.h >>conftest.$ac_ext
6939 cat >>conftest.$ac_ext <<_ACEOF
6940 /* end confdefs.h.  */
6941
6942 /* Override any gcc2 internal prototype to avoid an error.  */
6943 #ifdef __cplusplus
6944 extern "C"
6945 #endif
6946 /* We use char because int might match the return type of a gcc2
6947    builtin and then its argument prototype would still apply.  */
6948 char CRYPTO_new_ex_data ();
6949 int
6950 main ()
6951 {
6952 CRYPTO_new_ex_data ();
6953   ;
6954   return 0;
6955 }
6956 _ACEOF
6957 rm -f conftest.$ac_objext conftest$ac_exeext
6958 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6959   (eval $ac_link) 2>conftest.er1
6960   ac_status=$?
6961   grep -v '^ *+' conftest.er1 >conftest.err
6962   rm -f conftest.er1
6963   cat conftest.err >&5
6964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6965   (exit $ac_status); } &&
6966          { ac_try='test -z "$ac_c_werror_flag"
6967                          || test ! -s conftest.err'
6968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6969   (eval $ac_try) 2>&5
6970   ac_status=$?
6971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6972   (exit $ac_status); }; } &&
6973          { ac_try='test -s conftest$ac_exeext'
6974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6975   (eval $ac_try) 2>&5
6976   ac_status=$?
6977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6978   (exit $ac_status); }; }; then
6979   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6980 else
6981   echo "$as_me: failed program was:" >&5
6982 sed 's/^/| /' conftest.$ac_ext >&5
6983
6984 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6985 fi
6986 rm -f conftest.err conftest.$ac_objext \
6987       conftest$ac_exeext conftest.$ac_ext
6988 LIBS=$ac_check_lib_save_LIBS
6989 fi
6990 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6991 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6992 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6993   cat >>confdefs.h <<_ACEOF
6994 #define HAVE_LIBCRYPTO 1
6995 _ACEOF
6996
6997   LIBS="-lcrypto $LIBS"
6998
6999 else
7000   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7001 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7002    { (exit 1); exit 1; }; }
7003 fi
7004
7005
7006 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7007 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7008 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7009   echo $ECHO_N "(cached) $ECHO_C" >&6
7010 else
7011   ac_check_lib_save_LIBS=$LIBS
7012 LIBS="-lssl  $LIBS"
7013 cat >conftest.$ac_ext <<_ACEOF
7014 /* confdefs.h.  */
7015 _ACEOF
7016 cat confdefs.h >>conftest.$ac_ext
7017 cat >>conftest.$ac_ext <<_ACEOF
7018 /* end confdefs.h.  */
7019
7020 /* Override any gcc2 internal prototype to avoid an error.  */
7021 #ifdef __cplusplus
7022 extern "C"
7023 #endif
7024 /* We use char because int might match the return type of a gcc2
7025    builtin and then its argument prototype would still apply.  */
7026 char SSL_library_init ();
7027 int
7028 main ()
7029 {
7030 SSL_library_init ();
7031   ;
7032   return 0;
7033 }
7034 _ACEOF
7035 rm -f conftest.$ac_objext conftest$ac_exeext
7036 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7037   (eval $ac_link) 2>conftest.er1
7038   ac_status=$?
7039   grep -v '^ *+' conftest.er1 >conftest.err
7040   rm -f conftest.er1
7041   cat conftest.err >&5
7042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043   (exit $ac_status); } &&
7044          { ac_try='test -z "$ac_c_werror_flag"
7045                          || test ! -s conftest.err'
7046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7047   (eval $ac_try) 2>&5
7048   ac_status=$?
7049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050   (exit $ac_status); }; } &&
7051          { ac_try='test -s conftest$ac_exeext'
7052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7053   (eval $ac_try) 2>&5
7054   ac_status=$?
7055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7056   (exit $ac_status); }; }; then
7057   ac_cv_lib_ssl_SSL_library_init=yes
7058 else
7059   echo "$as_me: failed program was:" >&5
7060 sed 's/^/| /' conftest.$ac_ext >&5
7061
7062 ac_cv_lib_ssl_SSL_library_init=no
7063 fi
7064 rm -f conftest.err conftest.$ac_objext \
7065       conftest$ac_exeext conftest.$ac_ext
7066 LIBS=$ac_check_lib_save_LIBS
7067 fi
7068 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7069 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7070 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7071   cat >>confdefs.h <<_ACEOF
7072 #define HAVE_LIBSSL 1
7073 _ACEOF
7074
7075   LIBS="-lssl $LIBS"
7076
7077 else
7078   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7079 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7080    { (exit 1); exit 1; }; }
7081 fi
7082
7083   else
7084
7085 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7086 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7087 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7088   echo $ECHO_N "(cached) $ECHO_C" >&6
7089 else
7090   ac_check_lib_save_LIBS=$LIBS
7091 LIBS="-leay32  $LIBS"
7092 cat >conftest.$ac_ext <<_ACEOF
7093 /* confdefs.h.  */
7094 _ACEOF
7095 cat confdefs.h >>conftest.$ac_ext
7096 cat >>conftest.$ac_ext <<_ACEOF
7097 /* end confdefs.h.  */
7098
7099 /* Override any gcc2 internal prototype to avoid an error.  */
7100 #ifdef __cplusplus
7101 extern "C"
7102 #endif
7103 /* We use char because int might match the return type of a gcc2
7104    builtin and then its argument prototype would still apply.  */
7105 char CRYPTO_new_ex_data ();
7106 int
7107 main ()
7108 {
7109 CRYPTO_new_ex_data ();
7110   ;
7111   return 0;
7112 }
7113 _ACEOF
7114 rm -f conftest.$ac_objext conftest$ac_exeext
7115 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7116   (eval $ac_link) 2>conftest.er1
7117   ac_status=$?
7118   grep -v '^ *+' conftest.er1 >conftest.err
7119   rm -f conftest.er1
7120   cat conftest.err >&5
7121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122   (exit $ac_status); } &&
7123          { ac_try='test -z "$ac_c_werror_flag"
7124                          || test ! -s conftest.err'
7125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7126   (eval $ac_try) 2>&5
7127   ac_status=$?
7128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7129   (exit $ac_status); }; } &&
7130          { ac_try='test -s conftest$ac_exeext'
7131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7132   (eval $ac_try) 2>&5
7133   ac_status=$?
7134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135   (exit $ac_status); }; }; then
7136   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7137 else
7138   echo "$as_me: failed program was:" >&5
7139 sed 's/^/| /' conftest.$ac_ext >&5
7140
7141 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7142 fi
7143 rm -f conftest.err conftest.$ac_objext \
7144       conftest$ac_exeext conftest.$ac_ext
7145 LIBS=$ac_check_lib_save_LIBS
7146 fi
7147 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7148 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7149 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7150   cat >>confdefs.h <<_ACEOF
7151 #define HAVE_LIBEAY32 1
7152 _ACEOF
7153
7154   LIBS="-leay32 $LIBS"
7155
7156 else
7157   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7158 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7159    { (exit 1); exit 1; }; }
7160 fi
7161
7162
7163 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7164 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7165 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7166   echo $ECHO_N "(cached) $ECHO_C" >&6
7167 else
7168   ac_check_lib_save_LIBS=$LIBS
7169 LIBS="-lssleay32  $LIBS"
7170 cat >conftest.$ac_ext <<_ACEOF
7171 /* confdefs.h.  */
7172 _ACEOF
7173 cat confdefs.h >>conftest.$ac_ext
7174 cat >>conftest.$ac_ext <<_ACEOF
7175 /* end confdefs.h.  */
7176
7177 /* Override any gcc2 internal prototype to avoid an error.  */
7178 #ifdef __cplusplus
7179 extern "C"
7180 #endif
7181 /* We use char because int might match the return type of a gcc2
7182    builtin and then its argument prototype would still apply.  */
7183 char SSL_library_init ();
7184 int
7185 main ()
7186 {
7187 SSL_library_init ();
7188   ;
7189   return 0;
7190 }
7191 _ACEOF
7192 rm -f conftest.$ac_objext conftest$ac_exeext
7193 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7194   (eval $ac_link) 2>conftest.er1
7195   ac_status=$?
7196   grep -v '^ *+' conftest.er1 >conftest.err
7197   rm -f conftest.er1
7198   cat conftest.err >&5
7199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200   (exit $ac_status); } &&
7201          { ac_try='test -z "$ac_c_werror_flag"
7202                          || test ! -s conftest.err'
7203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7204   (eval $ac_try) 2>&5
7205   ac_status=$?
7206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7207   (exit $ac_status); }; } &&
7208          { ac_try='test -s conftest$ac_exeext'
7209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7210   (eval $ac_try) 2>&5
7211   ac_status=$?
7212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213   (exit $ac_status); }; }; then
7214   ac_cv_lib_ssleay32_SSL_library_init=yes
7215 else
7216   echo "$as_me: failed program was:" >&5
7217 sed 's/^/| /' conftest.$ac_ext >&5
7218
7219 ac_cv_lib_ssleay32_SSL_library_init=no
7220 fi
7221 rm -f conftest.err conftest.$ac_objext \
7222       conftest$ac_exeext conftest.$ac_ext
7223 LIBS=$ac_check_lib_save_LIBS
7224 fi
7225 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7226 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7227 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7228   cat >>confdefs.h <<_ACEOF
7229 #define HAVE_LIBSSLEAY32 1
7230 _ACEOF
7231
7232   LIBS="-lssleay32 $LIBS"
7233
7234 else
7235   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7236 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7237    { (exit 1); exit 1; }; }
7238 fi
7239
7240   fi
7241 fi
7242
7243 if test "$with_pam" = yes ; then
7244
7245 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7246 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7247 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7248   echo $ECHO_N "(cached) $ECHO_C" >&6
7249 else
7250   ac_check_lib_save_LIBS=$LIBS
7251 LIBS="-lpam  $LIBS"
7252 cat >conftest.$ac_ext <<_ACEOF
7253 /* confdefs.h.  */
7254 _ACEOF
7255 cat confdefs.h >>conftest.$ac_ext
7256 cat >>conftest.$ac_ext <<_ACEOF
7257 /* end confdefs.h.  */
7258
7259 /* Override any gcc2 internal prototype to avoid an error.  */
7260 #ifdef __cplusplus
7261 extern "C"
7262 #endif
7263 /* We use char because int might match the return type of a gcc2
7264    builtin and then its argument prototype would still apply.  */
7265 char pam_start ();
7266 int
7267 main ()
7268 {
7269 pam_start ();
7270   ;
7271   return 0;
7272 }
7273 _ACEOF
7274 rm -f conftest.$ac_objext conftest$ac_exeext
7275 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7276   (eval $ac_link) 2>conftest.er1
7277   ac_status=$?
7278   grep -v '^ *+' conftest.er1 >conftest.err
7279   rm -f conftest.er1
7280   cat conftest.err >&5
7281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7282   (exit $ac_status); } &&
7283          { ac_try='test -z "$ac_c_werror_flag"
7284                          || test ! -s conftest.err'
7285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7286   (eval $ac_try) 2>&5
7287   ac_status=$?
7288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7289   (exit $ac_status); }; } &&
7290          { ac_try='test -s conftest$ac_exeext'
7291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7292   (eval $ac_try) 2>&5
7293   ac_status=$?
7294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7295   (exit $ac_status); }; }; then
7296   ac_cv_lib_pam_pam_start=yes
7297 else
7298   echo "$as_me: failed program was:" >&5
7299 sed 's/^/| /' conftest.$ac_ext >&5
7300
7301 ac_cv_lib_pam_pam_start=no
7302 fi
7303 rm -f conftest.err conftest.$ac_objext \
7304       conftest$ac_exeext conftest.$ac_ext
7305 LIBS=$ac_check_lib_save_LIBS
7306 fi
7307 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7308 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7309 if test $ac_cv_lib_pam_pam_start = yes; then
7310   cat >>confdefs.h <<_ACEOF
7311 #define HAVE_LIBPAM 1
7312 _ACEOF
7313
7314   LIBS="-lpam $LIBS"
7315
7316 else
7317   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7318 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7319    { (exit 1); exit 1; }; }
7320 fi
7321
7322 fi
7323
7324
7325 ##
7326 ## Header files
7327 ##
7328
7329 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7330 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7331 if test "${ac_cv_header_stdc+set}" = set; then
7332   echo $ECHO_N "(cached) $ECHO_C" >&6
7333 else
7334   cat >conftest.$ac_ext <<_ACEOF
7335 /* confdefs.h.  */
7336 _ACEOF
7337 cat confdefs.h >>conftest.$ac_ext
7338 cat >>conftest.$ac_ext <<_ACEOF
7339 /* end confdefs.h.  */
7340 #include <stdlib.h>
7341 #include <stdarg.h>
7342 #include <string.h>
7343 #include <float.h>
7344
7345 int
7346 main ()
7347 {
7348
7349   ;
7350   return 0;
7351 }
7352 _ACEOF
7353 rm -f conftest.$ac_objext
7354 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7355   (eval $ac_compile) 2>conftest.er1
7356   ac_status=$?
7357   grep -v '^ *+' conftest.er1 >conftest.err
7358   rm -f conftest.er1
7359   cat conftest.err >&5
7360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7361   (exit $ac_status); } &&
7362          { ac_try='test -z "$ac_c_werror_flag"
7363                          || test ! -s conftest.err'
7364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7365   (eval $ac_try) 2>&5
7366   ac_status=$?
7367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7368   (exit $ac_status); }; } &&
7369          { ac_try='test -s conftest.$ac_objext'
7370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7371   (eval $ac_try) 2>&5
7372   ac_status=$?
7373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374   (exit $ac_status); }; }; then
7375   ac_cv_header_stdc=yes
7376 else
7377   echo "$as_me: failed program was:" >&5
7378 sed 's/^/| /' conftest.$ac_ext >&5
7379
7380 ac_cv_header_stdc=no
7381 fi
7382 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7383
7384 if test $ac_cv_header_stdc = yes; then
7385   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7386   cat >conftest.$ac_ext <<_ACEOF
7387 /* confdefs.h.  */
7388 _ACEOF
7389 cat confdefs.h >>conftest.$ac_ext
7390 cat >>conftest.$ac_ext <<_ACEOF
7391 /* end confdefs.h.  */
7392 #include <string.h>
7393
7394 _ACEOF
7395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7396   $EGREP "memchr" >/dev/null 2>&1; then
7397   :
7398 else
7399   ac_cv_header_stdc=no
7400 fi
7401 rm -f conftest*
7402
7403 fi
7404
7405 if test $ac_cv_header_stdc = yes; then
7406   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7407   cat >conftest.$ac_ext <<_ACEOF
7408 /* confdefs.h.  */
7409 _ACEOF
7410 cat confdefs.h >>conftest.$ac_ext
7411 cat >>conftest.$ac_ext <<_ACEOF
7412 /* end confdefs.h.  */
7413 #include <stdlib.h>
7414
7415 _ACEOF
7416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7417   $EGREP "free" >/dev/null 2>&1; then
7418   :
7419 else
7420   ac_cv_header_stdc=no
7421 fi
7422 rm -f conftest*
7423
7424 fi
7425
7426 if test $ac_cv_header_stdc = yes; then
7427   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7428   if test "$cross_compiling" = yes; then
7429   :
7430 else
7431   cat >conftest.$ac_ext <<_ACEOF
7432 /* confdefs.h.  */
7433 _ACEOF
7434 cat confdefs.h >>conftest.$ac_ext
7435 cat >>conftest.$ac_ext <<_ACEOF
7436 /* end confdefs.h.  */
7437 #include <ctype.h>
7438 #if ((' ' & 0x0FF) == 0x020)
7439 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7440 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7441 #else
7442 # define ISLOWER(c) \
7443                    (('a' <= (c) && (c) <= 'i') \
7444                      || ('j' <= (c) && (c) <= 'r') \
7445                      || ('s' <= (c) && (c) <= 'z'))
7446 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7447 #endif
7448
7449 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7450 int
7451 main ()
7452 {
7453   int i;
7454   for (i = 0; i < 256; i++)
7455     if (XOR (islower (i), ISLOWER (i))
7456         || toupper (i) != TOUPPER (i))
7457       exit(2);
7458   exit (0);
7459 }
7460 _ACEOF
7461 rm -f conftest$ac_exeext
7462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7463   (eval $ac_link) 2>&5
7464   ac_status=$?
7465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7466   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7468   (eval $ac_try) 2>&5
7469   ac_status=$?
7470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7471   (exit $ac_status); }; }; then
7472   :
7473 else
7474   echo "$as_me: program exited with status $ac_status" >&5
7475 echo "$as_me: failed program was:" >&5
7476 sed 's/^/| /' conftest.$ac_ext >&5
7477
7478 ( exit $ac_status )
7479 ac_cv_header_stdc=no
7480 fi
7481 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7482 fi
7483 fi
7484 fi
7485 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7486 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7487 if test $ac_cv_header_stdc = yes; then
7488
7489 cat >>confdefs.h <<\_ACEOF
7490 #define STDC_HEADERS 1
7491 _ACEOF
7492
7493 fi
7494
7495 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7506                   inttypes.h stdint.h unistd.h
7507 do
7508 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7509 echo "$as_me:$LINENO: checking for $ac_header" >&5
7510 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7511 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7512   echo $ECHO_N "(cached) $ECHO_C" >&6
7513 else
7514   cat >conftest.$ac_ext <<_ACEOF
7515 /* confdefs.h.  */
7516 _ACEOF
7517 cat confdefs.h >>conftest.$ac_ext
7518 cat >>conftest.$ac_ext <<_ACEOF
7519 /* end confdefs.h.  */
7520 $ac_includes_default
7521
7522 #include <$ac_header>
7523 _ACEOF
7524 rm -f conftest.$ac_objext
7525 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7526   (eval $ac_compile) 2>conftest.er1
7527   ac_status=$?
7528   grep -v '^ *+' conftest.er1 >conftest.err
7529   rm -f conftest.er1
7530   cat conftest.err >&5
7531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7532   (exit $ac_status); } &&
7533          { ac_try='test -z "$ac_c_werror_flag"
7534                          || test ! -s conftest.err'
7535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7536   (eval $ac_try) 2>&5
7537   ac_status=$?
7538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539   (exit $ac_status); }; } &&
7540          { ac_try='test -s conftest.$ac_objext'
7541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7542   (eval $ac_try) 2>&5
7543   ac_status=$?
7544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545   (exit $ac_status); }; }; then
7546   eval "$as_ac_Header=yes"
7547 else
7548   echo "$as_me: failed program was:" >&5
7549 sed 's/^/| /' conftest.$ac_ext >&5
7550
7551 eval "$as_ac_Header=no"
7552 fi
7553 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7554 fi
7555 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7556 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7557 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7558   cat >>confdefs.h <<_ACEOF
7559 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7560 _ACEOF
7561
7562 fi
7563
7564 done
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592 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
7593 do
7594 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7596   echo "$as_me:$LINENO: checking for $ac_header" >&5
7597 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7598 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7599   echo $ECHO_N "(cached) $ECHO_C" >&6
7600 fi
7601 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7602 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7603 else
7604   # Is the header compilable?
7605 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7606 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7607 cat >conftest.$ac_ext <<_ACEOF
7608 /* confdefs.h.  */
7609 _ACEOF
7610 cat confdefs.h >>conftest.$ac_ext
7611 cat >>conftest.$ac_ext <<_ACEOF
7612 /* end confdefs.h.  */
7613 $ac_includes_default
7614 #include <$ac_header>
7615 _ACEOF
7616 rm -f conftest.$ac_objext
7617 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7618   (eval $ac_compile) 2>conftest.er1
7619   ac_status=$?
7620   grep -v '^ *+' conftest.er1 >conftest.err
7621   rm -f conftest.er1
7622   cat conftest.err >&5
7623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624   (exit $ac_status); } &&
7625          { ac_try='test -z "$ac_c_werror_flag"
7626                          || test ! -s conftest.err'
7627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7628   (eval $ac_try) 2>&5
7629   ac_status=$?
7630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7631   (exit $ac_status); }; } &&
7632          { ac_try='test -s conftest.$ac_objext'
7633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7634   (eval $ac_try) 2>&5
7635   ac_status=$?
7636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7637   (exit $ac_status); }; }; then
7638   ac_header_compiler=yes
7639 else
7640   echo "$as_me: failed program was:" >&5
7641 sed 's/^/| /' conftest.$ac_ext >&5
7642
7643 ac_header_compiler=no
7644 fi
7645 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7646 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7647 echo "${ECHO_T}$ac_header_compiler" >&6
7648
7649 # Is the header present?
7650 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7651 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7652 cat >conftest.$ac_ext <<_ACEOF
7653 /* confdefs.h.  */
7654 _ACEOF
7655 cat confdefs.h >>conftest.$ac_ext
7656 cat >>conftest.$ac_ext <<_ACEOF
7657 /* end confdefs.h.  */
7658 #include <$ac_header>
7659 _ACEOF
7660 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7662   ac_status=$?
7663   grep -v '^ *+' conftest.er1 >conftest.err
7664   rm -f conftest.er1
7665   cat conftest.err >&5
7666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7667   (exit $ac_status); } >/dev/null; then
7668   if test -s conftest.err; then
7669     ac_cpp_err=$ac_c_preproc_warn_flag
7670     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7671   else
7672     ac_cpp_err=
7673   fi
7674 else
7675   ac_cpp_err=yes
7676 fi
7677 if test -z "$ac_cpp_err"; then
7678   ac_header_preproc=yes
7679 else
7680   echo "$as_me: failed program was:" >&5
7681 sed 's/^/| /' conftest.$ac_ext >&5
7682
7683   ac_header_preproc=no
7684 fi
7685 rm -f conftest.err conftest.$ac_ext
7686 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7687 echo "${ECHO_T}$ac_header_preproc" >&6
7688
7689 # So?  What about this header?
7690 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7691   yes:no: )
7692     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7693 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7694     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7695 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7696     ac_header_preproc=yes
7697     ;;
7698   no:yes:* )
7699     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7700 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7701     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7702 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7703     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7704 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7705     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7706 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7707     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7708 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7709     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7710 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7711     (
7712       cat <<\_ASBOX
7713 ## ---------------------------------------- ##
7714 ## Report this to pgsql-bugs@postgresql.org ##
7715 ## ---------------------------------------- ##
7716 _ASBOX
7717     ) |
7718       sed "s/^/$as_me: WARNING:     /" >&2
7719     ;;
7720 esac
7721 echo "$as_me:$LINENO: checking for $ac_header" >&5
7722 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7723 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7724   echo $ECHO_N "(cached) $ECHO_C" >&6
7725 else
7726   eval "$as_ac_Header=\$ac_header_preproc"
7727 fi
7728 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7729 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7730
7731 fi
7732 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7733   cat >>confdefs.h <<_ACEOF
7734 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7735 _ACEOF
7736
7737 fi
7738
7739 done
7740
7741
7742 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7743 # netinet/in.h is included first.
7744
7745 for ac_header in netinet/in.h
7746 do
7747 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7748 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7749   echo "$as_me:$LINENO: checking for $ac_header" >&5
7750 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7751 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7752   echo $ECHO_N "(cached) $ECHO_C" >&6
7753 fi
7754 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7755 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7756 else
7757   # Is the header compilable?
7758 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7759 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7760 cat >conftest.$ac_ext <<_ACEOF
7761 /* confdefs.h.  */
7762 _ACEOF
7763 cat confdefs.h >>conftest.$ac_ext
7764 cat >>conftest.$ac_ext <<_ACEOF
7765 /* end confdefs.h.  */
7766 $ac_includes_default
7767 #include <$ac_header>
7768 _ACEOF
7769 rm -f conftest.$ac_objext
7770 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7771   (eval $ac_compile) 2>conftest.er1
7772   ac_status=$?
7773   grep -v '^ *+' conftest.er1 >conftest.err
7774   rm -f conftest.er1
7775   cat conftest.err >&5
7776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7777   (exit $ac_status); } &&
7778          { ac_try='test -z "$ac_c_werror_flag"
7779                          || test ! -s conftest.err'
7780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7781   (eval $ac_try) 2>&5
7782   ac_status=$?
7783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7784   (exit $ac_status); }; } &&
7785          { ac_try='test -s conftest.$ac_objext'
7786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7787   (eval $ac_try) 2>&5
7788   ac_status=$?
7789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7790   (exit $ac_status); }; }; then
7791   ac_header_compiler=yes
7792 else
7793   echo "$as_me: failed program was:" >&5
7794 sed 's/^/| /' conftest.$ac_ext >&5
7795
7796 ac_header_compiler=no
7797 fi
7798 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7799 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7800 echo "${ECHO_T}$ac_header_compiler" >&6
7801
7802 # Is the header present?
7803 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7804 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7805 cat >conftest.$ac_ext <<_ACEOF
7806 /* confdefs.h.  */
7807 _ACEOF
7808 cat confdefs.h >>conftest.$ac_ext
7809 cat >>conftest.$ac_ext <<_ACEOF
7810 /* end confdefs.h.  */
7811 #include <$ac_header>
7812 _ACEOF
7813 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7814   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7815   ac_status=$?
7816   grep -v '^ *+' conftest.er1 >conftest.err
7817   rm -f conftest.er1
7818   cat conftest.err >&5
7819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7820   (exit $ac_status); } >/dev/null; then
7821   if test -s conftest.err; then
7822     ac_cpp_err=$ac_c_preproc_warn_flag
7823     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7824   else
7825     ac_cpp_err=
7826   fi
7827 else
7828   ac_cpp_err=yes
7829 fi
7830 if test -z "$ac_cpp_err"; then
7831   ac_header_preproc=yes
7832 else
7833   echo "$as_me: failed program was:" >&5
7834 sed 's/^/| /' conftest.$ac_ext >&5
7835
7836   ac_header_preproc=no
7837 fi
7838 rm -f conftest.err conftest.$ac_ext
7839 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7840 echo "${ECHO_T}$ac_header_preproc" >&6
7841
7842 # So?  What about this header?
7843 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7844   yes:no: )
7845     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7846 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7847     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7848 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7849     ac_header_preproc=yes
7850     ;;
7851   no:yes:* )
7852     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7853 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7854     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7855 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7856     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7857 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7858     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7859 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7860     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7861 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7862     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7863 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7864     (
7865       cat <<\_ASBOX
7866 ## ---------------------------------------- ##
7867 ## Report this to pgsql-bugs@postgresql.org ##
7868 ## ---------------------------------------- ##
7869 _ASBOX
7870     ) |
7871       sed "s/^/$as_me: WARNING:     /" >&2
7872     ;;
7873 esac
7874 echo "$as_me:$LINENO: checking for $ac_header" >&5
7875 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7876 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7877   echo $ECHO_N "(cached) $ECHO_C" >&6
7878 else
7879   eval "$as_ac_Header=\$ac_header_preproc"
7880 fi
7881 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7882 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7883
7884 fi
7885 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7886   cat >>confdefs.h <<_ACEOF
7887 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7888 _ACEOF
7889
7890 fi
7891
7892 done
7893
7894
7895 for ac_header in netinet/tcp.h
7896 do
7897 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
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 else
7903   cat >conftest.$ac_ext <<_ACEOF
7904 /* confdefs.h.  */
7905 _ACEOF
7906 cat confdefs.h >>conftest.$ac_ext
7907 cat >>conftest.$ac_ext <<_ACEOF
7908 /* end confdefs.h.  */
7909 $ac_includes_default
7910 #ifdef HAVE_NETINET_IN_H
7911 #include <netinet/in.h>
7912 #endif
7913
7914
7915 #include <$ac_header>
7916 _ACEOF
7917 rm -f conftest.$ac_objext
7918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7919   (eval $ac_compile) 2>conftest.er1
7920   ac_status=$?
7921   grep -v '^ *+' conftest.er1 >conftest.err
7922   rm -f conftest.er1
7923   cat conftest.err >&5
7924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7925   (exit $ac_status); } &&
7926          { ac_try='test -z "$ac_c_werror_flag"
7927                          || test ! -s conftest.err'
7928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7929   (eval $ac_try) 2>&5
7930   ac_status=$?
7931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7932   (exit $ac_status); }; } &&
7933          { ac_try='test -s conftest.$ac_objext'
7934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7935   (eval $ac_try) 2>&5
7936   ac_status=$?
7937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938   (exit $ac_status); }; }; then
7939   eval "$as_ac_Header=yes"
7940 else
7941   echo "$as_me: failed program was:" >&5
7942 sed 's/^/| /' conftest.$ac_ext >&5
7943
7944 eval "$as_ac_Header=no"
7945 fi
7946 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7947 fi
7948 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7949 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7950 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7951   cat >>confdefs.h <<_ACEOF
7952 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7953 _ACEOF
7954
7955 fi
7956
7957 done
7958
7959
7960 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
7961
7962 for ac_header in readline/readline.h
7963 do
7964 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7965 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7966   echo "$as_me:$LINENO: checking for $ac_header" >&5
7967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7968 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7969   echo $ECHO_N "(cached) $ECHO_C" >&6
7970 fi
7971 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7972 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7973 else
7974   # Is the header compilable?
7975 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7976 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7977 cat >conftest.$ac_ext <<_ACEOF
7978 /* confdefs.h.  */
7979 _ACEOF
7980 cat confdefs.h >>conftest.$ac_ext
7981 cat >>conftest.$ac_ext <<_ACEOF
7982 /* end confdefs.h.  */
7983 $ac_includes_default
7984 #include <$ac_header>
7985 _ACEOF
7986 rm -f conftest.$ac_objext
7987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7988   (eval $ac_compile) 2>conftest.er1
7989   ac_status=$?
7990   grep -v '^ *+' conftest.er1 >conftest.err
7991   rm -f conftest.er1
7992   cat conftest.err >&5
7993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994   (exit $ac_status); } &&
7995          { ac_try='test -z "$ac_c_werror_flag"
7996                          || test ! -s conftest.err'
7997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7998   (eval $ac_try) 2>&5
7999   ac_status=$?
8000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8001   (exit $ac_status); }; } &&
8002          { ac_try='test -s conftest.$ac_objext'
8003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8004   (eval $ac_try) 2>&5
8005   ac_status=$?
8006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8007   (exit $ac_status); }; }; then
8008   ac_header_compiler=yes
8009 else
8010   echo "$as_me: failed program was:" >&5
8011 sed 's/^/| /' conftest.$ac_ext >&5
8012
8013 ac_header_compiler=no
8014 fi
8015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8016 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8017 echo "${ECHO_T}$ac_header_compiler" >&6
8018
8019 # Is the header present?
8020 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8021 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8022 cat >conftest.$ac_ext <<_ACEOF
8023 /* confdefs.h.  */
8024 _ACEOF
8025 cat confdefs.h >>conftest.$ac_ext
8026 cat >>conftest.$ac_ext <<_ACEOF
8027 /* end confdefs.h.  */
8028 #include <$ac_header>
8029 _ACEOF
8030 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8031   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8032   ac_status=$?
8033   grep -v '^ *+' conftest.er1 >conftest.err
8034   rm -f conftest.er1
8035   cat conftest.err >&5
8036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8037   (exit $ac_status); } >/dev/null; then
8038   if test -s conftest.err; then
8039     ac_cpp_err=$ac_c_preproc_warn_flag
8040     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8041   else
8042     ac_cpp_err=
8043   fi
8044 else
8045   ac_cpp_err=yes
8046 fi
8047 if test -z "$ac_cpp_err"; then
8048   ac_header_preproc=yes
8049 else
8050   echo "$as_me: failed program was:" >&5
8051 sed 's/^/| /' conftest.$ac_ext >&5
8052
8053   ac_header_preproc=no
8054 fi
8055 rm -f conftest.err conftest.$ac_ext
8056 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8057 echo "${ECHO_T}$ac_header_preproc" >&6
8058
8059 # So?  What about this header?
8060 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8061   yes:no: )
8062     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8063 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8064     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8065 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8066     ac_header_preproc=yes
8067     ;;
8068   no:yes:* )
8069     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8070 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8071     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8072 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8073     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8074 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8075     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8076 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8077     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8078 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8079     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8080 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8081     (
8082       cat <<\_ASBOX
8083 ## ---------------------------------------- ##
8084 ## Report this to pgsql-bugs@postgresql.org ##
8085 ## ---------------------------------------- ##
8086 _ASBOX
8087     ) |
8088       sed "s/^/$as_me: WARNING:     /" >&2
8089     ;;
8090 esac
8091 echo "$as_me:$LINENO: checking for $ac_header" >&5
8092 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8093 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8094   echo $ECHO_N "(cached) $ECHO_C" >&6
8095 else
8096   eval "$as_ac_Header=\$ac_header_preproc"
8097 fi
8098 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8099 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8100
8101 fi
8102 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8103   cat >>confdefs.h <<_ACEOF
8104 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8105 _ACEOF
8106
8107 else
8108
8109 for ac_header in readline.h
8110 do
8111 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8112 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8113   echo "$as_me:$LINENO: checking for $ac_header" >&5
8114 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8115 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8116   echo $ECHO_N "(cached) $ECHO_C" >&6
8117 fi
8118 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8119 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8120 else
8121   # Is the header compilable?
8122 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8123 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8124 cat >conftest.$ac_ext <<_ACEOF
8125 /* confdefs.h.  */
8126 _ACEOF
8127 cat confdefs.h >>conftest.$ac_ext
8128 cat >>conftest.$ac_ext <<_ACEOF
8129 /* end confdefs.h.  */
8130 $ac_includes_default
8131 #include <$ac_header>
8132 _ACEOF
8133 rm -f conftest.$ac_objext
8134 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8135   (eval $ac_compile) 2>conftest.er1
8136   ac_status=$?
8137   grep -v '^ *+' conftest.er1 >conftest.err
8138   rm -f conftest.er1
8139   cat conftest.err >&5
8140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8141   (exit $ac_status); } &&
8142          { ac_try='test -z "$ac_c_werror_flag"
8143                          || test ! -s conftest.err'
8144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8145   (eval $ac_try) 2>&5
8146   ac_status=$?
8147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148   (exit $ac_status); }; } &&
8149          { ac_try='test -s conftest.$ac_objext'
8150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8151   (eval $ac_try) 2>&5
8152   ac_status=$?
8153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8154   (exit $ac_status); }; }; then
8155   ac_header_compiler=yes
8156 else
8157   echo "$as_me: failed program was:" >&5
8158 sed 's/^/| /' conftest.$ac_ext >&5
8159
8160 ac_header_compiler=no
8161 fi
8162 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8163 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8164 echo "${ECHO_T}$ac_header_compiler" >&6
8165
8166 # Is the header present?
8167 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8168 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8169 cat >conftest.$ac_ext <<_ACEOF
8170 /* confdefs.h.  */
8171 _ACEOF
8172 cat confdefs.h >>conftest.$ac_ext
8173 cat >>conftest.$ac_ext <<_ACEOF
8174 /* end confdefs.h.  */
8175 #include <$ac_header>
8176 _ACEOF
8177 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8179   ac_status=$?
8180   grep -v '^ *+' conftest.er1 >conftest.err
8181   rm -f conftest.er1
8182   cat conftest.err >&5
8183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8184   (exit $ac_status); } >/dev/null; then
8185   if test -s conftest.err; then
8186     ac_cpp_err=$ac_c_preproc_warn_flag
8187     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8188   else
8189     ac_cpp_err=
8190   fi
8191 else
8192   ac_cpp_err=yes
8193 fi
8194 if test -z "$ac_cpp_err"; then
8195   ac_header_preproc=yes
8196 else
8197   echo "$as_me: failed program was:" >&5
8198 sed 's/^/| /' conftest.$ac_ext >&5
8199
8200   ac_header_preproc=no
8201 fi
8202 rm -f conftest.err conftest.$ac_ext
8203 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8204 echo "${ECHO_T}$ac_header_preproc" >&6
8205
8206 # So?  What about this header?
8207 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8208   yes:no: )
8209     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8210 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8211     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8212 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8213     ac_header_preproc=yes
8214     ;;
8215   no:yes:* )
8216     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8217 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8218     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8219 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8220     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8221 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8222     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8223 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8224     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8225 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8226     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8227 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8228     (
8229       cat <<\_ASBOX
8230 ## ---------------------------------------- ##
8231 ## Report this to pgsql-bugs@postgresql.org ##
8232 ## ---------------------------------------- ##
8233 _ASBOX
8234     ) |
8235       sed "s/^/$as_me: WARNING:     /" >&2
8236     ;;
8237 esac
8238 echo "$as_me:$LINENO: checking for $ac_header" >&5
8239 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8240 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8241   echo $ECHO_N "(cached) $ECHO_C" >&6
8242 else
8243   eval "$as_ac_Header=\$ac_header_preproc"
8244 fi
8245 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8246 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8247
8248 fi
8249 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8250   cat >>confdefs.h <<_ACEOF
8251 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8252 _ACEOF
8253
8254 else
8255   { { echo "$as_me:$LINENO: error: readline header not found
8256 If you have readline already installed, see config.log for details on the
8257 failure.  It is possible the compiler isn't looking in the proper directory.
8258 Use --without-readline to disable readline support." >&5
8259 echo "$as_me: error: readline header not found
8260 If you have readline already installed, see config.log for details on the
8261 failure.  It is possible the compiler isn't looking in the proper directory.
8262 Use --without-readline to disable readline support." >&2;}
8263    { (exit 1); exit 1; }; }
8264 fi
8265
8266 done
8267
8268 fi
8269
8270 done
8271
8272
8273 for ac_header in readline/history.h
8274 do
8275 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8276 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8277   echo "$as_me:$LINENO: checking for $ac_header" >&5
8278 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8279 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8280   echo $ECHO_N "(cached) $ECHO_C" >&6
8281 fi
8282 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8283 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8284 else
8285   # Is the header compilable?
8286 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8287 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8288 cat >conftest.$ac_ext <<_ACEOF
8289 /* confdefs.h.  */
8290 _ACEOF
8291 cat confdefs.h >>conftest.$ac_ext
8292 cat >>conftest.$ac_ext <<_ACEOF
8293 /* end confdefs.h.  */
8294 $ac_includes_default
8295 #include <$ac_header>
8296 _ACEOF
8297 rm -f conftest.$ac_objext
8298 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8299   (eval $ac_compile) 2>conftest.er1
8300   ac_status=$?
8301   grep -v '^ *+' conftest.er1 >conftest.err
8302   rm -f conftest.er1
8303   cat conftest.err >&5
8304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8305   (exit $ac_status); } &&
8306          { ac_try='test -z "$ac_c_werror_flag"
8307                          || test ! -s conftest.err'
8308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8309   (eval $ac_try) 2>&5
8310   ac_status=$?
8311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8312   (exit $ac_status); }; } &&
8313          { ac_try='test -s conftest.$ac_objext'
8314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8315   (eval $ac_try) 2>&5
8316   ac_status=$?
8317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8318   (exit $ac_status); }; }; then
8319   ac_header_compiler=yes
8320 else
8321   echo "$as_me: failed program was:" >&5
8322 sed 's/^/| /' conftest.$ac_ext >&5
8323
8324 ac_header_compiler=no
8325 fi
8326 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8327 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8328 echo "${ECHO_T}$ac_header_compiler" >&6
8329
8330 # Is the header present?
8331 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8332 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8333 cat >conftest.$ac_ext <<_ACEOF
8334 /* confdefs.h.  */
8335 _ACEOF
8336 cat confdefs.h >>conftest.$ac_ext
8337 cat >>conftest.$ac_ext <<_ACEOF
8338 /* end confdefs.h.  */
8339 #include <$ac_header>
8340 _ACEOF
8341 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8342   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8343   ac_status=$?
8344   grep -v '^ *+' conftest.er1 >conftest.err
8345   rm -f conftest.er1
8346   cat conftest.err >&5
8347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8348   (exit $ac_status); } >/dev/null; then
8349   if test -s conftest.err; then
8350     ac_cpp_err=$ac_c_preproc_warn_flag
8351     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8352   else
8353     ac_cpp_err=
8354   fi
8355 else
8356   ac_cpp_err=yes
8357 fi
8358 if test -z "$ac_cpp_err"; then
8359   ac_header_preproc=yes
8360 else
8361   echo "$as_me: failed program was:" >&5
8362 sed 's/^/| /' conftest.$ac_ext >&5
8363
8364   ac_header_preproc=no
8365 fi
8366 rm -f conftest.err conftest.$ac_ext
8367 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8368 echo "${ECHO_T}$ac_header_preproc" >&6
8369
8370 # So?  What about this header?
8371 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8372   yes:no: )
8373     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8374 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8375     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8376 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8377     ac_header_preproc=yes
8378     ;;
8379   no:yes:* )
8380     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8381 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8382     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8383 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8384     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8385 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8386     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8387 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8388     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8389 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8390     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8391 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8392     (
8393       cat <<\_ASBOX
8394 ## ---------------------------------------- ##
8395 ## Report this to pgsql-bugs@postgresql.org ##
8396 ## ---------------------------------------- ##
8397 _ASBOX
8398     ) |
8399       sed "s/^/$as_me: WARNING:     /" >&2
8400     ;;
8401 esac
8402 echo "$as_me:$LINENO: checking for $ac_header" >&5
8403 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8404 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8405   echo $ECHO_N "(cached) $ECHO_C" >&6
8406 else
8407   eval "$as_ac_Header=\$ac_header_preproc"
8408 fi
8409 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8410 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8411
8412 fi
8413 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8414   cat >>confdefs.h <<_ACEOF
8415 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8416 _ACEOF
8417
8418 else
8419
8420 for ac_header in history.h
8421 do
8422 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8423 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8424   echo "$as_me:$LINENO: checking for $ac_header" >&5
8425 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8426 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8427   echo $ECHO_N "(cached) $ECHO_C" >&6
8428 fi
8429 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8431 else
8432   # Is the header compilable?
8433 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8434 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8435 cat >conftest.$ac_ext <<_ACEOF
8436 /* confdefs.h.  */
8437 _ACEOF
8438 cat confdefs.h >>conftest.$ac_ext
8439 cat >>conftest.$ac_ext <<_ACEOF
8440 /* end confdefs.h.  */
8441 $ac_includes_default
8442 #include <$ac_header>
8443 _ACEOF
8444 rm -f conftest.$ac_objext
8445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8446   (eval $ac_compile) 2>conftest.er1
8447   ac_status=$?
8448   grep -v '^ *+' conftest.er1 >conftest.err
8449   rm -f conftest.er1
8450   cat conftest.err >&5
8451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8452   (exit $ac_status); } &&
8453          { ac_try='test -z "$ac_c_werror_flag"
8454                          || test ! -s conftest.err'
8455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8456   (eval $ac_try) 2>&5
8457   ac_status=$?
8458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459   (exit $ac_status); }; } &&
8460          { ac_try='test -s conftest.$ac_objext'
8461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8462   (eval $ac_try) 2>&5
8463   ac_status=$?
8464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8465   (exit $ac_status); }; }; then
8466   ac_header_compiler=yes
8467 else
8468   echo "$as_me: failed program was:" >&5
8469 sed 's/^/| /' conftest.$ac_ext >&5
8470
8471 ac_header_compiler=no
8472 fi
8473 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8474 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8475 echo "${ECHO_T}$ac_header_compiler" >&6
8476
8477 # Is the header present?
8478 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8479 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8480 cat >conftest.$ac_ext <<_ACEOF
8481 /* confdefs.h.  */
8482 _ACEOF
8483 cat confdefs.h >>conftest.$ac_ext
8484 cat >>conftest.$ac_ext <<_ACEOF
8485 /* end confdefs.h.  */
8486 #include <$ac_header>
8487 _ACEOF
8488 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8490   ac_status=$?
8491   grep -v '^ *+' conftest.er1 >conftest.err
8492   rm -f conftest.er1
8493   cat conftest.err >&5
8494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8495   (exit $ac_status); } >/dev/null; then
8496   if test -s conftest.err; then
8497     ac_cpp_err=$ac_c_preproc_warn_flag
8498     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8499   else
8500     ac_cpp_err=
8501   fi
8502 else
8503   ac_cpp_err=yes
8504 fi
8505 if test -z "$ac_cpp_err"; then
8506   ac_header_preproc=yes
8507 else
8508   echo "$as_me: failed program was:" >&5
8509 sed 's/^/| /' conftest.$ac_ext >&5
8510
8511   ac_header_preproc=no
8512 fi
8513 rm -f conftest.err conftest.$ac_ext
8514 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8515 echo "${ECHO_T}$ac_header_preproc" >&6
8516
8517 # So?  What about this header?
8518 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8519   yes:no: )
8520     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8521 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8522     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8523 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8524     ac_header_preproc=yes
8525     ;;
8526   no:yes:* )
8527     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8528 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8529     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8530 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8531     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8532 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8533     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8534 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8535     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8536 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8537     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8538 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8539     (
8540       cat <<\_ASBOX
8541 ## ---------------------------------------- ##
8542 ## Report this to pgsql-bugs@postgresql.org ##
8543 ## ---------------------------------------- ##
8544 _ASBOX
8545     ) |
8546       sed "s/^/$as_me: WARNING:     /" >&2
8547     ;;
8548 esac
8549 echo "$as_me:$LINENO: checking for $ac_header" >&5
8550 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8551 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8552   echo $ECHO_N "(cached) $ECHO_C" >&6
8553 else
8554   eval "$as_ac_Header=\$ac_header_preproc"
8555 fi
8556 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8557 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8558
8559 fi
8560 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8561   cat >>confdefs.h <<_ACEOF
8562 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8563 _ACEOF
8564
8565 else
8566   { { echo "$as_me:$LINENO: error: history header not found
8567 If you have readline already installed, see config.log for details on the
8568 failure.  It is possible the compiler isn't looking in the proper directory.
8569 Use --without-readline to disable readline support." >&5
8570 echo "$as_me: error: history header not found
8571 If you have readline already installed, see config.log for details on the
8572 failure.  It is possible the compiler isn't looking in the proper directory.
8573 Use --without-readline to disable readline support." >&2;}
8574    { (exit 1); exit 1; }; }
8575 fi
8576
8577 done
8578
8579 fi
8580
8581 done
8582
8583 fi
8584
8585 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8586 # Some installations of libedit usurp /usr/include/readline/, which seems
8587 # bad practice, since in combined installations readline will have its headers
8588 # there.  We might have to resort to AC_EGREP checks to make sure we found
8589 # the proper header...
8590
8591 for ac_header in editline/readline.h
8592 do
8593 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8594 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8595   echo "$as_me:$LINENO: checking for $ac_header" >&5
8596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8598   echo $ECHO_N "(cached) $ECHO_C" >&6
8599 fi
8600 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8601 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8602 else
8603   # Is the header compilable?
8604 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8605 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8606 cat >conftest.$ac_ext <<_ACEOF
8607 /* confdefs.h.  */
8608 _ACEOF
8609 cat confdefs.h >>conftest.$ac_ext
8610 cat >>conftest.$ac_ext <<_ACEOF
8611 /* end confdefs.h.  */
8612 $ac_includes_default
8613 #include <$ac_header>
8614 _ACEOF
8615 rm -f conftest.$ac_objext
8616 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8617   (eval $ac_compile) 2>conftest.er1
8618   ac_status=$?
8619   grep -v '^ *+' conftest.er1 >conftest.err
8620   rm -f conftest.er1
8621   cat conftest.err >&5
8622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8623   (exit $ac_status); } &&
8624          { ac_try='test -z "$ac_c_werror_flag"
8625                          || test ! -s conftest.err'
8626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8627   (eval $ac_try) 2>&5
8628   ac_status=$?
8629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8630   (exit $ac_status); }; } &&
8631          { ac_try='test -s conftest.$ac_objext'
8632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8633   (eval $ac_try) 2>&5
8634   ac_status=$?
8635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8636   (exit $ac_status); }; }; then
8637   ac_header_compiler=yes
8638 else
8639   echo "$as_me: failed program was:" >&5
8640 sed 's/^/| /' conftest.$ac_ext >&5
8641
8642 ac_header_compiler=no
8643 fi
8644 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8645 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8646 echo "${ECHO_T}$ac_header_compiler" >&6
8647
8648 # Is the header present?
8649 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8650 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8651 cat >conftest.$ac_ext <<_ACEOF
8652 /* confdefs.h.  */
8653 _ACEOF
8654 cat confdefs.h >>conftest.$ac_ext
8655 cat >>conftest.$ac_ext <<_ACEOF
8656 /* end confdefs.h.  */
8657 #include <$ac_header>
8658 _ACEOF
8659 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8661   ac_status=$?
8662   grep -v '^ *+' conftest.er1 >conftest.err
8663   rm -f conftest.er1
8664   cat conftest.err >&5
8665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8666   (exit $ac_status); } >/dev/null; then
8667   if test -s conftest.err; then
8668     ac_cpp_err=$ac_c_preproc_warn_flag
8669     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8670   else
8671     ac_cpp_err=
8672   fi
8673 else
8674   ac_cpp_err=yes
8675 fi
8676 if test -z "$ac_cpp_err"; then
8677   ac_header_preproc=yes
8678 else
8679   echo "$as_me: failed program was:" >&5
8680 sed 's/^/| /' conftest.$ac_ext >&5
8681
8682   ac_header_preproc=no
8683 fi
8684 rm -f conftest.err conftest.$ac_ext
8685 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8686 echo "${ECHO_T}$ac_header_preproc" >&6
8687
8688 # So?  What about this header?
8689 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8690   yes:no: )
8691     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8692 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8693     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8694 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8695     ac_header_preproc=yes
8696     ;;
8697   no:yes:* )
8698     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8699 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8700     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8701 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8702     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8703 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8704     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8705 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8706     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8707 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8708     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8709 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8710     (
8711       cat <<\_ASBOX
8712 ## ---------------------------------------- ##
8713 ## Report this to pgsql-bugs@postgresql.org ##
8714 ## ---------------------------------------- ##
8715 _ASBOX
8716     ) |
8717       sed "s/^/$as_me: WARNING:     /" >&2
8718     ;;
8719 esac
8720 echo "$as_me:$LINENO: checking for $ac_header" >&5
8721 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8722 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8723   echo $ECHO_N "(cached) $ECHO_C" >&6
8724 else
8725   eval "$as_ac_Header=\$ac_header_preproc"
8726 fi
8727 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8728 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8729
8730 fi
8731 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8732   cat >>confdefs.h <<_ACEOF
8733 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8734 _ACEOF
8735
8736 else
8737
8738 for ac_header in readline.h
8739 do
8740 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8741 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8742   echo "$as_me:$LINENO: checking for $ac_header" >&5
8743 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8744 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8745   echo $ECHO_N "(cached) $ECHO_C" >&6
8746 fi
8747 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8748 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8749 else
8750   # Is the header compilable?
8751 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8752 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8753 cat >conftest.$ac_ext <<_ACEOF
8754 /* confdefs.h.  */
8755 _ACEOF
8756 cat confdefs.h >>conftest.$ac_ext
8757 cat >>conftest.$ac_ext <<_ACEOF
8758 /* end confdefs.h.  */
8759 $ac_includes_default
8760 #include <$ac_header>
8761 _ACEOF
8762 rm -f conftest.$ac_objext
8763 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8764   (eval $ac_compile) 2>conftest.er1
8765   ac_status=$?
8766   grep -v '^ *+' conftest.er1 >conftest.err
8767   rm -f conftest.er1
8768   cat conftest.err >&5
8769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8770   (exit $ac_status); } &&
8771          { ac_try='test -z "$ac_c_werror_flag"
8772                          || test ! -s conftest.err'
8773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8774   (eval $ac_try) 2>&5
8775   ac_status=$?
8776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8777   (exit $ac_status); }; } &&
8778          { ac_try='test -s conftest.$ac_objext'
8779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8780   (eval $ac_try) 2>&5
8781   ac_status=$?
8782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8783   (exit $ac_status); }; }; then
8784   ac_header_compiler=yes
8785 else
8786   echo "$as_me: failed program was:" >&5
8787 sed 's/^/| /' conftest.$ac_ext >&5
8788
8789 ac_header_compiler=no
8790 fi
8791 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8792 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8793 echo "${ECHO_T}$ac_header_compiler" >&6
8794
8795 # Is the header present?
8796 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8797 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8798 cat >conftest.$ac_ext <<_ACEOF
8799 /* confdefs.h.  */
8800 _ACEOF
8801 cat confdefs.h >>conftest.$ac_ext
8802 cat >>conftest.$ac_ext <<_ACEOF
8803 /* end confdefs.h.  */
8804 #include <$ac_header>
8805 _ACEOF
8806 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8807   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8808   ac_status=$?
8809   grep -v '^ *+' conftest.er1 >conftest.err
8810   rm -f conftest.er1
8811   cat conftest.err >&5
8812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8813   (exit $ac_status); } >/dev/null; then
8814   if test -s conftest.err; then
8815     ac_cpp_err=$ac_c_preproc_warn_flag
8816     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8817   else
8818     ac_cpp_err=
8819   fi
8820 else
8821   ac_cpp_err=yes
8822 fi
8823 if test -z "$ac_cpp_err"; then
8824   ac_header_preproc=yes
8825 else
8826   echo "$as_me: failed program was:" >&5
8827 sed 's/^/| /' conftest.$ac_ext >&5
8828
8829   ac_header_preproc=no
8830 fi
8831 rm -f conftest.err conftest.$ac_ext
8832 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8833 echo "${ECHO_T}$ac_header_preproc" >&6
8834
8835 # So?  What about this header?
8836 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8837   yes:no: )
8838     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8839 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8840     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8841 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8842     ac_header_preproc=yes
8843     ;;
8844   no:yes:* )
8845     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8846 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8847     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8848 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8849     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8850 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8851     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8852 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8853     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8854 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8855     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8856 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8857     (
8858       cat <<\_ASBOX
8859 ## ---------------------------------------- ##
8860 ## Report this to pgsql-bugs@postgresql.org ##
8861 ## ---------------------------------------- ##
8862 _ASBOX
8863     ) |
8864       sed "s/^/$as_me: WARNING:     /" >&2
8865     ;;
8866 esac
8867 echo "$as_me:$LINENO: checking for $ac_header" >&5
8868 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8869 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8870   echo $ECHO_N "(cached) $ECHO_C" >&6
8871 else
8872   eval "$as_ac_Header=\$ac_header_preproc"
8873 fi
8874 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8875 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8876
8877 fi
8878 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8879   cat >>confdefs.h <<_ACEOF
8880 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8881 _ACEOF
8882
8883 else
8884
8885 for ac_header in readline/readline.h
8886 do
8887 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8888 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8889   echo "$as_me:$LINENO: checking for $ac_header" >&5
8890 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8891 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8892   echo $ECHO_N "(cached) $ECHO_C" >&6
8893 fi
8894 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8895 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8896 else
8897   # Is the header compilable?
8898 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8899 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8900 cat >conftest.$ac_ext <<_ACEOF
8901 /* confdefs.h.  */
8902 _ACEOF
8903 cat confdefs.h >>conftest.$ac_ext
8904 cat >>conftest.$ac_ext <<_ACEOF
8905 /* end confdefs.h.  */
8906 $ac_includes_default
8907 #include <$ac_header>
8908 _ACEOF
8909 rm -f conftest.$ac_objext
8910 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8911   (eval $ac_compile) 2>conftest.er1
8912   ac_status=$?
8913   grep -v '^ *+' conftest.er1 >conftest.err
8914   rm -f conftest.er1
8915   cat conftest.err >&5
8916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8917   (exit $ac_status); } &&
8918          { ac_try='test -z "$ac_c_werror_flag"
8919                          || test ! -s conftest.err'
8920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8921   (eval $ac_try) 2>&5
8922   ac_status=$?
8923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924   (exit $ac_status); }; } &&
8925          { ac_try='test -s conftest.$ac_objext'
8926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8927   (eval $ac_try) 2>&5
8928   ac_status=$?
8929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8930   (exit $ac_status); }; }; then
8931   ac_header_compiler=yes
8932 else
8933   echo "$as_me: failed program was:" >&5
8934 sed 's/^/| /' conftest.$ac_ext >&5
8935
8936 ac_header_compiler=no
8937 fi
8938 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8939 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8940 echo "${ECHO_T}$ac_header_compiler" >&6
8941
8942 # Is the header present?
8943 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8944 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8945 cat >conftest.$ac_ext <<_ACEOF
8946 /* confdefs.h.  */
8947 _ACEOF
8948 cat confdefs.h >>conftest.$ac_ext
8949 cat >>conftest.$ac_ext <<_ACEOF
8950 /* end confdefs.h.  */
8951 #include <$ac_header>
8952 _ACEOF
8953 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8955   ac_status=$?
8956   grep -v '^ *+' conftest.er1 >conftest.err
8957   rm -f conftest.er1
8958   cat conftest.err >&5
8959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8960   (exit $ac_status); } >/dev/null; then
8961   if test -s conftest.err; then
8962     ac_cpp_err=$ac_c_preproc_warn_flag
8963     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8964   else
8965     ac_cpp_err=
8966   fi
8967 else
8968   ac_cpp_err=yes
8969 fi
8970 if test -z "$ac_cpp_err"; then
8971   ac_header_preproc=yes
8972 else
8973   echo "$as_me: failed program was:" >&5
8974 sed 's/^/| /' conftest.$ac_ext >&5
8975
8976   ac_header_preproc=no
8977 fi
8978 rm -f conftest.err conftest.$ac_ext
8979 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8980 echo "${ECHO_T}$ac_header_preproc" >&6
8981
8982 # So?  What about this header?
8983 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8984   yes:no: )
8985     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8986 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8987     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8988 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8989     ac_header_preproc=yes
8990     ;;
8991   no:yes:* )
8992     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8993 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8994     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8995 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8996     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8997 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8998     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8999 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9000     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9001 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9002     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9003 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9004     (
9005       cat <<\_ASBOX
9006 ## ---------------------------------------- ##
9007 ## Report this to pgsql-bugs@postgresql.org ##
9008 ## ---------------------------------------- ##
9009 _ASBOX
9010     ) |
9011       sed "s/^/$as_me: WARNING:     /" >&2
9012     ;;
9013 esac
9014 echo "$as_me:$LINENO: checking for $ac_header" >&5
9015 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9016 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9017   echo $ECHO_N "(cached) $ECHO_C" >&6
9018 else
9019   eval "$as_ac_Header=\$ac_header_preproc"
9020 fi
9021 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9022 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9023
9024 fi
9025 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9026   cat >>confdefs.h <<_ACEOF
9027 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9028 _ACEOF
9029
9030 else
9031   { { echo "$as_me:$LINENO: error: readline header not found
9032 If you have libedit already installed, see config.log for details on the
9033 failure.  It is possible the compiler isn't looking in the proper directory.
9034 Use --without-readline to disable libedit support." >&5
9035 echo "$as_me: error: readline header not found
9036 If you have libedit already installed, see config.log for details on the
9037 failure.  It is possible the compiler isn't looking in the proper directory.
9038 Use --without-readline to disable libedit support." >&2;}
9039    { (exit 1); exit 1; }; }
9040 fi
9041
9042 done
9043
9044 fi
9045
9046 done
9047
9048 fi
9049
9050 done
9051
9052 # Note: in a libedit installation, history.h is normally a dummy, and may
9053 # not be there at all.  The functions are declared in readline.h instead.
9054 # To avoid including incompatible headers when both libraries are present,
9055 # assume we do not need history.h.
9056 fi
9057
9058 if test "$with_zlib" = yes; then
9059   if test "${ac_cv_header_zlib_h+set}" = set; then
9060   echo "$as_me:$LINENO: checking for zlib.h" >&5
9061 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9062 if test "${ac_cv_header_zlib_h+set}" = set; then
9063   echo $ECHO_N "(cached) $ECHO_C" >&6
9064 fi
9065 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9066 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9067 else
9068   # Is the header compilable?
9069 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9070 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9071 cat >conftest.$ac_ext <<_ACEOF
9072 /* confdefs.h.  */
9073 _ACEOF
9074 cat confdefs.h >>conftest.$ac_ext
9075 cat >>conftest.$ac_ext <<_ACEOF
9076 /* end confdefs.h.  */
9077 $ac_includes_default
9078 #include <zlib.h>
9079 _ACEOF
9080 rm -f conftest.$ac_objext
9081 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9082   (eval $ac_compile) 2>conftest.er1
9083   ac_status=$?
9084   grep -v '^ *+' conftest.er1 >conftest.err
9085   rm -f conftest.er1
9086   cat conftest.err >&5
9087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9088   (exit $ac_status); } &&
9089          { ac_try='test -z "$ac_c_werror_flag"
9090                          || test ! -s conftest.err'
9091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9092   (eval $ac_try) 2>&5
9093   ac_status=$?
9094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095   (exit $ac_status); }; } &&
9096          { ac_try='test -s conftest.$ac_objext'
9097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9098   (eval $ac_try) 2>&5
9099   ac_status=$?
9100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9101   (exit $ac_status); }; }; then
9102   ac_header_compiler=yes
9103 else
9104   echo "$as_me: failed program was:" >&5
9105 sed 's/^/| /' conftest.$ac_ext >&5
9106
9107 ac_header_compiler=no
9108 fi
9109 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9110 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9111 echo "${ECHO_T}$ac_header_compiler" >&6
9112
9113 # Is the header present?
9114 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9115 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9116 cat >conftest.$ac_ext <<_ACEOF
9117 /* confdefs.h.  */
9118 _ACEOF
9119 cat confdefs.h >>conftest.$ac_ext
9120 cat >>conftest.$ac_ext <<_ACEOF
9121 /* end confdefs.h.  */
9122 #include <zlib.h>
9123 _ACEOF
9124 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9125   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9126   ac_status=$?
9127   grep -v '^ *+' conftest.er1 >conftest.err
9128   rm -f conftest.er1
9129   cat conftest.err >&5
9130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9131   (exit $ac_status); } >/dev/null; then
9132   if test -s conftest.err; then
9133     ac_cpp_err=$ac_c_preproc_warn_flag
9134     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9135   else
9136     ac_cpp_err=
9137   fi
9138 else
9139   ac_cpp_err=yes
9140 fi
9141 if test -z "$ac_cpp_err"; then
9142   ac_header_preproc=yes
9143 else
9144   echo "$as_me: failed program was:" >&5
9145 sed 's/^/| /' conftest.$ac_ext >&5
9146
9147   ac_header_preproc=no
9148 fi
9149 rm -f conftest.err conftest.$ac_ext
9150 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9151 echo "${ECHO_T}$ac_header_preproc" >&6
9152
9153 # So?  What about this header?
9154 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9155   yes:no: )
9156     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9157 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9158     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9159 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9160     ac_header_preproc=yes
9161     ;;
9162   no:yes:* )
9163     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9164 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9165     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9166 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9167     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9168 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9169     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9170 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9171     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9172 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9173     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9174 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9175     (
9176       cat <<\_ASBOX
9177 ## ---------------------------------------- ##
9178 ## Report this to pgsql-bugs@postgresql.org ##
9179 ## ---------------------------------------- ##
9180 _ASBOX
9181     ) |
9182       sed "s/^/$as_me: WARNING:     /" >&2
9183     ;;
9184 esac
9185 echo "$as_me:$LINENO: checking for zlib.h" >&5
9186 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9187 if test "${ac_cv_header_zlib_h+set}" = set; then
9188   echo $ECHO_N "(cached) $ECHO_C" >&6
9189 else
9190   ac_cv_header_zlib_h=$ac_header_preproc
9191 fi
9192 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9193 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9194
9195 fi
9196 if test $ac_cv_header_zlib_h = yes; then
9197   :
9198 else
9199   { { echo "$as_me:$LINENO: error: zlib header not found
9200 If you have zlib already installed, see config.log for details on the
9201 failure.  It is possible the compiler isn't looking in the proper directory.
9202 Use --without-zlib to disable zlib support." >&5
9203 echo "$as_me: error: zlib header not found
9204 If you have zlib already installed, see config.log for details on the
9205 failure.  It is possible the compiler isn't looking in the proper directory.
9206 Use --without-zlib to disable zlib support." >&2;}
9207    { (exit 1); exit 1; }; }
9208 fi
9209
9210
9211 fi
9212
9213 if test "$with_krb5" = yes ; then
9214   if test "${ac_cv_header_krb5_h+set}" = set; then
9215   echo "$as_me:$LINENO: checking for krb5.h" >&5
9216 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9217 if test "${ac_cv_header_krb5_h+set}" = set; then
9218   echo $ECHO_N "(cached) $ECHO_C" >&6
9219 fi
9220 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9221 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9222 else
9223   # Is the header compilable?
9224 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9225 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9226 cat >conftest.$ac_ext <<_ACEOF
9227 /* confdefs.h.  */
9228 _ACEOF
9229 cat confdefs.h >>conftest.$ac_ext
9230 cat >>conftest.$ac_ext <<_ACEOF
9231 /* end confdefs.h.  */
9232 $ac_includes_default
9233 #include <krb5.h>
9234 _ACEOF
9235 rm -f conftest.$ac_objext
9236 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9237   (eval $ac_compile) 2>conftest.er1
9238   ac_status=$?
9239   grep -v '^ *+' conftest.er1 >conftest.err
9240   rm -f conftest.er1
9241   cat conftest.err >&5
9242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243   (exit $ac_status); } &&
9244          { ac_try='test -z "$ac_c_werror_flag"
9245                          || test ! -s conftest.err'
9246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9247   (eval $ac_try) 2>&5
9248   ac_status=$?
9249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9250   (exit $ac_status); }; } &&
9251          { ac_try='test -s conftest.$ac_objext'
9252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9253   (eval $ac_try) 2>&5
9254   ac_status=$?
9255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9256   (exit $ac_status); }; }; then
9257   ac_header_compiler=yes
9258 else
9259   echo "$as_me: failed program was:" >&5
9260 sed 's/^/| /' conftest.$ac_ext >&5
9261
9262 ac_header_compiler=no
9263 fi
9264 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9265 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9266 echo "${ECHO_T}$ac_header_compiler" >&6
9267
9268 # Is the header present?
9269 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9270 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9271 cat >conftest.$ac_ext <<_ACEOF
9272 /* confdefs.h.  */
9273 _ACEOF
9274 cat confdefs.h >>conftest.$ac_ext
9275 cat >>conftest.$ac_ext <<_ACEOF
9276 /* end confdefs.h.  */
9277 #include <krb5.h>
9278 _ACEOF
9279 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9280   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9281   ac_status=$?
9282   grep -v '^ *+' conftest.er1 >conftest.err
9283   rm -f conftest.er1
9284   cat conftest.err >&5
9285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9286   (exit $ac_status); } >/dev/null; then
9287   if test -s conftest.err; then
9288     ac_cpp_err=$ac_c_preproc_warn_flag
9289     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9290   else
9291     ac_cpp_err=
9292   fi
9293 else
9294   ac_cpp_err=yes
9295 fi
9296 if test -z "$ac_cpp_err"; then
9297   ac_header_preproc=yes
9298 else
9299   echo "$as_me: failed program was:" >&5
9300 sed 's/^/| /' conftest.$ac_ext >&5
9301
9302   ac_header_preproc=no
9303 fi
9304 rm -f conftest.err conftest.$ac_ext
9305 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9306 echo "${ECHO_T}$ac_header_preproc" >&6
9307
9308 # So?  What about this header?
9309 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9310   yes:no: )
9311     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9312 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9313     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9314 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9315     ac_header_preproc=yes
9316     ;;
9317   no:yes:* )
9318     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9319 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9320     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9321 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9322     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9323 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9324     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9325 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9326     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9327 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9328     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9329 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9330     (
9331       cat <<\_ASBOX
9332 ## ---------------------------------------- ##
9333 ## Report this to pgsql-bugs@postgresql.org ##
9334 ## ---------------------------------------- ##
9335 _ASBOX
9336     ) |
9337       sed "s/^/$as_me: WARNING:     /" >&2
9338     ;;
9339 esac
9340 echo "$as_me:$LINENO: checking for krb5.h" >&5
9341 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9342 if test "${ac_cv_header_krb5_h+set}" = set; then
9343   echo $ECHO_N "(cached) $ECHO_C" >&6
9344 else
9345   ac_cv_header_krb5_h=$ac_header_preproc
9346 fi
9347 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9348 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9349
9350 fi
9351 if test $ac_cv_header_krb5_h = yes; then
9352   :
9353 else
9354   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9355 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9356    { (exit 1); exit 1; }; }
9357 fi
9358
9359
9360 fi
9361
9362 if test "$with_openssl" = yes ; then
9363   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9364   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9365 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9366 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9367   echo $ECHO_N "(cached) $ECHO_C" >&6
9368 fi
9369 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9370 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9371 else
9372   # Is the header compilable?
9373 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9374 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9375 cat >conftest.$ac_ext <<_ACEOF
9376 /* confdefs.h.  */
9377 _ACEOF
9378 cat confdefs.h >>conftest.$ac_ext
9379 cat >>conftest.$ac_ext <<_ACEOF
9380 /* end confdefs.h.  */
9381 $ac_includes_default
9382 #include <openssl/ssl.h>
9383 _ACEOF
9384 rm -f conftest.$ac_objext
9385 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9386   (eval $ac_compile) 2>conftest.er1
9387   ac_status=$?
9388   grep -v '^ *+' conftest.er1 >conftest.err
9389   rm -f conftest.er1
9390   cat conftest.err >&5
9391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9392   (exit $ac_status); } &&
9393          { ac_try='test -z "$ac_c_werror_flag"
9394                          || test ! -s conftest.err'
9395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9396   (eval $ac_try) 2>&5
9397   ac_status=$?
9398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399   (exit $ac_status); }; } &&
9400          { ac_try='test -s conftest.$ac_objext'
9401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9402   (eval $ac_try) 2>&5
9403   ac_status=$?
9404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9405   (exit $ac_status); }; }; then
9406   ac_header_compiler=yes
9407 else
9408   echo "$as_me: failed program was:" >&5
9409 sed 's/^/| /' conftest.$ac_ext >&5
9410
9411 ac_header_compiler=no
9412 fi
9413 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9414 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9415 echo "${ECHO_T}$ac_header_compiler" >&6
9416
9417 # Is the header present?
9418 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
9419 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
9420 cat >conftest.$ac_ext <<_ACEOF
9421 /* confdefs.h.  */
9422 _ACEOF
9423 cat confdefs.h >>conftest.$ac_ext
9424 cat >>conftest.$ac_ext <<_ACEOF
9425 /* end confdefs.h.  */
9426 #include <openssl/ssl.h>
9427 _ACEOF
9428 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9429   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9430   ac_status=$?
9431   grep -v '^ *+' conftest.er1 >conftest.err
9432   rm -f conftest.er1
9433   cat conftest.err >&5
9434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435   (exit $ac_status); } >/dev/null; then
9436   if test -s conftest.err; then
9437     ac_cpp_err=$ac_c_preproc_warn_flag
9438     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9439   else
9440     ac_cpp_err=
9441   fi
9442 else
9443   ac_cpp_err=yes
9444 fi
9445 if test -z "$ac_cpp_err"; then
9446   ac_header_preproc=yes
9447 else
9448   echo "$as_me: failed program was:" >&5
9449 sed 's/^/| /' conftest.$ac_ext >&5
9450
9451   ac_header_preproc=no
9452 fi
9453 rm -f conftest.err conftest.$ac_ext
9454 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9455 echo "${ECHO_T}$ac_header_preproc" >&6
9456
9457 # So?  What about this header?
9458 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9459   yes:no: )
9460     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9461 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9462     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
9463 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
9464     ac_header_preproc=yes
9465     ;;
9466   no:yes:* )
9467     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
9468 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
9469     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
9470 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
9471     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
9472 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
9473     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
9474 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9475     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
9476 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
9477     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
9478 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
9479     (
9480       cat <<\_ASBOX
9481 ## ---------------------------------------- ##
9482 ## Report this to pgsql-bugs@postgresql.org ##
9483 ## ---------------------------------------- ##
9484 _ASBOX
9485     ) |
9486       sed "s/^/$as_me: WARNING:     /" >&2
9487     ;;
9488 esac
9489 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9490 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9491 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9492   echo $ECHO_N "(cached) $ECHO_C" >&6
9493 else
9494   ac_cv_header_openssl_ssl_h=$ac_header_preproc
9495 fi
9496 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9497 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9498
9499 fi
9500 if test $ac_cv_header_openssl_ssl_h = yes; then
9501   :
9502 else
9503   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
9504 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
9505    { (exit 1); exit 1; }; }
9506 fi
9507
9508
9509   if test "${ac_cv_header_openssl_err_h+set}" = set; then
9510   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
9511 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
9512 if test "${ac_cv_header_openssl_err_h+set}" = set; then
9513   echo $ECHO_N "(cached) $ECHO_C" >&6
9514 fi
9515 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
9516 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
9517 else
9518   # Is the header compilable?
9519 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
9520 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
9521 cat >conftest.$ac_ext <<_ACEOF
9522 /* confdefs.h.  */
9523 _ACEOF
9524 cat confdefs.h >>conftest.$ac_ext
9525 cat >>conftest.$ac_ext <<_ACEOF
9526 /* end confdefs.h.  */
9527 $ac_includes_default
9528 #include <openssl/err.h>
9529 _ACEOF
9530 rm -f conftest.$ac_objext
9531 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9532   (eval $ac_compile) 2>conftest.er1
9533   ac_status=$?
9534   grep -v '^ *+' conftest.er1 >conftest.err
9535   rm -f conftest.er1
9536   cat conftest.err >&5
9537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9538   (exit $ac_status); } &&
9539          { ac_try='test -z "$ac_c_werror_flag"
9540                          || test ! -s conftest.err'
9541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9542   (eval $ac_try) 2>&5
9543   ac_status=$?
9544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9545   (exit $ac_status); }; } &&
9546          { ac_try='test -s conftest.$ac_objext'
9547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9548   (eval $ac_try) 2>&5
9549   ac_status=$?
9550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9551   (exit $ac_status); }; }; then
9552   ac_header_compiler=yes
9553 else
9554   echo "$as_me: failed program was:" >&5
9555 sed 's/^/| /' conftest.$ac_ext >&5
9556
9557 ac_header_compiler=no
9558 fi
9559 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9560 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9561 echo "${ECHO_T}$ac_header_compiler" >&6
9562
9563 # Is the header present?
9564 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
9565 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
9566 cat >conftest.$ac_ext <<_ACEOF
9567 /* confdefs.h.  */
9568 _ACEOF
9569 cat confdefs.h >>conftest.$ac_ext
9570 cat >>conftest.$ac_ext <<_ACEOF
9571 /* end confdefs.h.  */
9572 #include <openssl/err.h>
9573 _ACEOF
9574 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9575   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9576   ac_status=$?
9577   grep -v '^ *+' conftest.er1 >conftest.err
9578   rm -f conftest.er1
9579   cat conftest.err >&5
9580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9581   (exit $ac_status); } >/dev/null; then
9582   if test -s conftest.err; then
9583     ac_cpp_err=$ac_c_preproc_warn_flag
9584     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9585   else
9586     ac_cpp_err=
9587   fi
9588 else
9589   ac_cpp_err=yes
9590 fi
9591 if test -z "$ac_cpp_err"; then
9592   ac_header_preproc=yes
9593 else
9594   echo "$as_me: failed program was:" >&5
9595 sed 's/^/| /' conftest.$ac_ext >&5
9596
9597   ac_header_preproc=no
9598 fi
9599 rm -f conftest.err conftest.$ac_ext
9600 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9601 echo "${ECHO_T}$ac_header_preproc" >&6
9602
9603 # So?  What about this header?
9604 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9605   yes:no: )
9606     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
9607 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9608     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
9609 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
9610     ac_header_preproc=yes
9611     ;;
9612   no:yes:* )
9613     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
9614 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
9615     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
9616 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
9617     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
9618 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
9619     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
9620 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9621     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
9622 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
9623     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
9624 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
9625     (
9626       cat <<\_ASBOX
9627 ## ---------------------------------------- ##
9628 ## Report this to pgsql-bugs@postgresql.org ##
9629 ## ---------------------------------------- ##
9630 _ASBOX
9631     ) |
9632       sed "s/^/$as_me: WARNING:     /" >&2
9633     ;;
9634 esac
9635 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
9636 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
9637 if test "${ac_cv_header_openssl_err_h+set}" = set; then
9638   echo $ECHO_N "(cached) $ECHO_C" >&6
9639 else
9640   ac_cv_header_openssl_err_h=$ac_header_preproc
9641 fi
9642 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
9643 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
9644
9645 fi
9646 if test $ac_cv_header_openssl_err_h = yes; then
9647   :
9648 else
9649   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
9650 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
9651    { (exit 1); exit 1; }; }
9652 fi
9653
9654
9655 fi
9656
9657 if test "$with_pam" = yes ; then
9658
9659 for ac_header in security/pam_appl.h
9660 do
9661 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9662 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9663   echo "$as_me:$LINENO: checking for $ac_header" >&5
9664 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9665 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9666   echo $ECHO_N "(cached) $ECHO_C" >&6
9667 fi
9668 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9669 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9670 else
9671   # Is the header compilable?
9672 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9673 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9674 cat >conftest.$ac_ext <<_ACEOF
9675 /* confdefs.h.  */
9676 _ACEOF
9677 cat confdefs.h >>conftest.$ac_ext
9678 cat >>conftest.$ac_ext <<_ACEOF
9679 /* end confdefs.h.  */
9680 $ac_includes_default
9681 #include <$ac_header>
9682 _ACEOF
9683 rm -f conftest.$ac_objext
9684 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9685   (eval $ac_compile) 2>conftest.er1
9686   ac_status=$?
9687   grep -v '^ *+' conftest.er1 >conftest.err
9688   rm -f conftest.er1
9689   cat conftest.err >&5
9690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9691   (exit $ac_status); } &&
9692          { ac_try='test -z "$ac_c_werror_flag"
9693                          || test ! -s conftest.err'
9694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9695   (eval $ac_try) 2>&5
9696   ac_status=$?
9697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9698   (exit $ac_status); }; } &&
9699          { ac_try='test -s conftest.$ac_objext'
9700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9701   (eval $ac_try) 2>&5
9702   ac_status=$?
9703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9704   (exit $ac_status); }; }; then
9705   ac_header_compiler=yes
9706 else
9707   echo "$as_me: failed program was:" >&5
9708 sed 's/^/| /' conftest.$ac_ext >&5
9709
9710 ac_header_compiler=no
9711 fi
9712 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9713 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9714 echo "${ECHO_T}$ac_header_compiler" >&6
9715
9716 # Is the header present?
9717 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9718 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9719 cat >conftest.$ac_ext <<_ACEOF
9720 /* confdefs.h.  */
9721 _ACEOF
9722 cat confdefs.h >>conftest.$ac_ext
9723 cat >>conftest.$ac_ext <<_ACEOF
9724 /* end confdefs.h.  */
9725 #include <$ac_header>
9726 _ACEOF
9727 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9728   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9729   ac_status=$?
9730   grep -v '^ *+' conftest.er1 >conftest.err
9731   rm -f conftest.er1
9732   cat conftest.err >&5
9733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9734   (exit $ac_status); } >/dev/null; then
9735   if test -s conftest.err; then
9736     ac_cpp_err=$ac_c_preproc_warn_flag
9737     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9738   else
9739     ac_cpp_err=
9740   fi
9741 else
9742   ac_cpp_err=yes
9743 fi
9744 if test -z "$ac_cpp_err"; then
9745   ac_header_preproc=yes
9746 else
9747   echo "$as_me: failed program was:" >&5
9748 sed 's/^/| /' conftest.$ac_ext >&5
9749
9750   ac_header_preproc=no
9751 fi
9752 rm -f conftest.err conftest.$ac_ext
9753 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9754 echo "${ECHO_T}$ac_header_preproc" >&6
9755
9756 # So?  What about this header?
9757 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9758   yes:no: )
9759     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9760 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9761     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9762 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9763     ac_header_preproc=yes
9764     ;;
9765   no:yes:* )
9766     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9767 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9768     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9769 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9770     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9771 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9772     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9773 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9774     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9775 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9776     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9777 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9778     (
9779       cat <<\_ASBOX
9780 ## ---------------------------------------- ##
9781 ## Report this to pgsql-bugs@postgresql.org ##
9782 ## ---------------------------------------- ##
9783 _ASBOX
9784     ) |
9785       sed "s/^/$as_me: WARNING:     /" >&2
9786     ;;
9787 esac
9788 echo "$as_me:$LINENO: checking for $ac_header" >&5
9789 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9790 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9791   echo $ECHO_N "(cached) $ECHO_C" >&6
9792 else
9793   eval "$as_ac_Header=\$ac_header_preproc"
9794 fi
9795 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9796 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9797
9798 fi
9799 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9800   cat >>confdefs.h <<_ACEOF
9801 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9802 _ACEOF
9803
9804 else
9805
9806 for ac_header in pam/pam_appl.h
9807 do
9808 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9809 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9810   echo "$as_me:$LINENO: checking for $ac_header" >&5
9811 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9812 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9813   echo $ECHO_N "(cached) $ECHO_C" >&6
9814 fi
9815 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9816 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9817 else
9818   # Is the header compilable?
9819 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9820 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9821 cat >conftest.$ac_ext <<_ACEOF
9822 /* confdefs.h.  */
9823 _ACEOF
9824 cat confdefs.h >>conftest.$ac_ext
9825 cat >>conftest.$ac_ext <<_ACEOF
9826 /* end confdefs.h.  */
9827 $ac_includes_default
9828 #include <$ac_header>
9829 _ACEOF
9830 rm -f conftest.$ac_objext
9831 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9832   (eval $ac_compile) 2>conftest.er1
9833   ac_status=$?
9834   grep -v '^ *+' conftest.er1 >conftest.err
9835   rm -f conftest.er1
9836   cat conftest.err >&5
9837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9838   (exit $ac_status); } &&
9839          { ac_try='test -z "$ac_c_werror_flag"
9840                          || test ! -s conftest.err'
9841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9842   (eval $ac_try) 2>&5
9843   ac_status=$?
9844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845   (exit $ac_status); }; } &&
9846          { ac_try='test -s conftest.$ac_objext'
9847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9848   (eval $ac_try) 2>&5
9849   ac_status=$?
9850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9851   (exit $ac_status); }; }; then
9852   ac_header_compiler=yes
9853 else
9854   echo "$as_me: failed program was:" >&5
9855 sed 's/^/| /' conftest.$ac_ext >&5
9856
9857 ac_header_compiler=no
9858 fi
9859 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9860 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9861 echo "${ECHO_T}$ac_header_compiler" >&6
9862
9863 # Is the header present?
9864 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9865 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9866 cat >conftest.$ac_ext <<_ACEOF
9867 /* confdefs.h.  */
9868 _ACEOF
9869 cat confdefs.h >>conftest.$ac_ext
9870 cat >>conftest.$ac_ext <<_ACEOF
9871 /* end confdefs.h.  */
9872 #include <$ac_header>
9873 _ACEOF
9874 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9875   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9876   ac_status=$?
9877   grep -v '^ *+' conftest.er1 >conftest.err
9878   rm -f conftest.er1
9879   cat conftest.err >&5
9880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9881   (exit $ac_status); } >/dev/null; then
9882   if test -s conftest.err; then
9883     ac_cpp_err=$ac_c_preproc_warn_flag
9884     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9885   else
9886     ac_cpp_err=
9887   fi
9888 else
9889   ac_cpp_err=yes
9890 fi
9891 if test -z "$ac_cpp_err"; then
9892   ac_header_preproc=yes
9893 else
9894   echo "$as_me: failed program was:" >&5
9895 sed 's/^/| /' conftest.$ac_ext >&5
9896
9897   ac_header_preproc=no
9898 fi
9899 rm -f conftest.err conftest.$ac_ext
9900 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9901 echo "${ECHO_T}$ac_header_preproc" >&6
9902
9903 # So?  What about this header?
9904 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9905   yes:no: )
9906     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9907 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9908     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9909 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9910     ac_header_preproc=yes
9911     ;;
9912   no:yes:* )
9913     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9914 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9915     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9916 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9917     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9918 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9919     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9920 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9921     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9922 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9923     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9924 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9925     (
9926       cat <<\_ASBOX
9927 ## ---------------------------------------- ##
9928 ## Report this to pgsql-bugs@postgresql.org ##
9929 ## ---------------------------------------- ##
9930 _ASBOX
9931     ) |
9932       sed "s/^/$as_me: WARNING:     /" >&2
9933     ;;
9934 esac
9935 echo "$as_me:$LINENO: checking for $ac_header" >&5
9936 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9937 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9938   echo $ECHO_N "(cached) $ECHO_C" >&6
9939 else
9940   eval "$as_ac_Header=\$ac_header_preproc"
9941 fi
9942 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9943 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9944
9945 fi
9946 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9947   cat >>confdefs.h <<_ACEOF
9948 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9949 _ACEOF
9950
9951 else
9952   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
9953 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
9954    { (exit 1); exit 1; }; }
9955 fi
9956
9957 done
9958
9959 fi
9960
9961 done
9962
9963 fi
9964
9965 if test "$with_ldap" = yes ; then
9966   if test "$PORTNAME" != "win32"; then
9967
9968 for ac_header in ldap.h
9969 do
9970 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9971 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9972   echo "$as_me:$LINENO: checking for $ac_header" >&5
9973 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9974 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9975   echo $ECHO_N "(cached) $ECHO_C" >&6
9976 fi
9977 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9978 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9979 else
9980   # Is the header compilable?
9981 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9982 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9983 cat >conftest.$ac_ext <<_ACEOF
9984 /* confdefs.h.  */
9985 _ACEOF
9986 cat confdefs.h >>conftest.$ac_ext
9987 cat >>conftest.$ac_ext <<_ACEOF
9988 /* end confdefs.h.  */
9989 $ac_includes_default
9990 #include <$ac_header>
9991 _ACEOF
9992 rm -f conftest.$ac_objext
9993 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9994   (eval $ac_compile) 2>conftest.er1
9995   ac_status=$?
9996   grep -v '^ *+' conftest.er1 >conftest.err
9997   rm -f conftest.er1
9998   cat conftest.err >&5
9999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10000   (exit $ac_status); } &&
10001          { ac_try='test -z "$ac_c_werror_flag"
10002                          || test ! -s conftest.err'
10003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10004   (eval $ac_try) 2>&5
10005   ac_status=$?
10006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007   (exit $ac_status); }; } &&
10008          { ac_try='test -s conftest.$ac_objext'
10009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10010   (eval $ac_try) 2>&5
10011   ac_status=$?
10012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10013   (exit $ac_status); }; }; then
10014   ac_header_compiler=yes
10015 else
10016   echo "$as_me: failed program was:" >&5
10017 sed 's/^/| /' conftest.$ac_ext >&5
10018
10019 ac_header_compiler=no
10020 fi
10021 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10022 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10023 echo "${ECHO_T}$ac_header_compiler" >&6
10024
10025 # Is the header present?
10026 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10027 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10028 cat >conftest.$ac_ext <<_ACEOF
10029 /* confdefs.h.  */
10030 _ACEOF
10031 cat confdefs.h >>conftest.$ac_ext
10032 cat >>conftest.$ac_ext <<_ACEOF
10033 /* end confdefs.h.  */
10034 #include <$ac_header>
10035 _ACEOF
10036 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10037   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10038   ac_status=$?
10039   grep -v '^ *+' conftest.er1 >conftest.err
10040   rm -f conftest.er1
10041   cat conftest.err >&5
10042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10043   (exit $ac_status); } >/dev/null; then
10044   if test -s conftest.err; then
10045     ac_cpp_err=$ac_c_preproc_warn_flag
10046     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10047   else
10048     ac_cpp_err=
10049   fi
10050 else
10051   ac_cpp_err=yes
10052 fi
10053 if test -z "$ac_cpp_err"; then
10054   ac_header_preproc=yes
10055 else
10056   echo "$as_me: failed program was:" >&5
10057 sed 's/^/| /' conftest.$ac_ext >&5
10058
10059   ac_header_preproc=no
10060 fi
10061 rm -f conftest.err conftest.$ac_ext
10062 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10063 echo "${ECHO_T}$ac_header_preproc" >&6
10064
10065 # So?  What about this header?
10066 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10067   yes:no: )
10068     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10069 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10070     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10071 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10072     ac_header_preproc=yes
10073     ;;
10074   no:yes:* )
10075     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10076 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10077     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10078 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10079     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10080 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10081     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10082 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10083     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10084 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10085     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10086 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10087     (
10088       cat <<\_ASBOX
10089 ## ---------------------------------------- ##
10090 ## Report this to pgsql-bugs@postgresql.org ##
10091 ## ---------------------------------------- ##
10092 _ASBOX
10093     ) |
10094       sed "s/^/$as_me: WARNING:     /" >&2
10095     ;;
10096 esac
10097 echo "$as_me:$LINENO: checking for $ac_header" >&5
10098 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10099 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10100   echo $ECHO_N "(cached) $ECHO_C" >&6
10101 else
10102   eval "$as_ac_Header=\$ac_header_preproc"
10103 fi
10104 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10105 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10106
10107 fi
10108 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10109   cat >>confdefs.h <<_ACEOF
10110 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10111 _ACEOF
10112
10113 else
10114   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
10115 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10116    { (exit 1); exit 1; }; }
10117 fi
10118
10119 done
10120
10121   else
10122
10123 for ac_header in winldap.h
10124 do
10125 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10126 echo "$as_me:$LINENO: checking for $ac_header" >&5
10127 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10128 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10129   echo $ECHO_N "(cached) $ECHO_C" >&6
10130 else
10131   cat >conftest.$ac_ext <<_ACEOF
10132 /* confdefs.h.  */
10133 _ACEOF
10134 cat confdefs.h >>conftest.$ac_ext
10135 cat >>conftest.$ac_ext <<_ACEOF
10136 /* end confdefs.h.  */
10137 $ac_includes_default
10138 #include <windows.h>
10139
10140
10141 #include <$ac_header>
10142 _ACEOF
10143 rm -f conftest.$ac_objext
10144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10145   (eval $ac_compile) 2>conftest.er1
10146   ac_status=$?
10147   grep -v '^ *+' conftest.er1 >conftest.err
10148   rm -f conftest.er1
10149   cat conftest.err >&5
10150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10151   (exit $ac_status); } &&
10152          { ac_try='test -z "$ac_c_werror_flag"
10153                          || test ! -s conftest.err'
10154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10155   (eval $ac_try) 2>&5
10156   ac_status=$?
10157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10158   (exit $ac_status); }; } &&
10159          { ac_try='test -s conftest.$ac_objext'
10160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10161   (eval $ac_try) 2>&5
10162   ac_status=$?
10163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10164   (exit $ac_status); }; }; then
10165   eval "$as_ac_Header=yes"
10166 else
10167   echo "$as_me: failed program was:" >&5
10168 sed 's/^/| /' conftest.$ac_ext >&5
10169
10170 eval "$as_ac_Header=no"
10171 fi
10172 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10173 fi
10174 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10175 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10176 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10177   cat >>confdefs.h <<_ACEOF
10178 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10179 _ACEOF
10180
10181 else
10182   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10183 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10184    { (exit 1); exit 1; }; }
10185 fi
10186
10187 done
10188
10189   fi
10190 fi
10191
10192 if test "$with_bonjour" = yes ; then
10193   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10194   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10195 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10196 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10197   echo $ECHO_N "(cached) $ECHO_C" >&6
10198 fi
10199 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10200 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10201 else
10202   # Is the header compilable?
10203 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10204 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10205 cat >conftest.$ac_ext <<_ACEOF
10206 /* confdefs.h.  */
10207 _ACEOF
10208 cat confdefs.h >>conftest.$ac_ext
10209 cat >>conftest.$ac_ext <<_ACEOF
10210 /* end confdefs.h.  */
10211 $ac_includes_default
10212 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10213 _ACEOF
10214 rm -f conftest.$ac_objext
10215 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10216   (eval $ac_compile) 2>conftest.er1
10217   ac_status=$?
10218   grep -v '^ *+' conftest.er1 >conftest.err
10219   rm -f conftest.er1
10220   cat conftest.err >&5
10221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10222   (exit $ac_status); } &&
10223          { ac_try='test -z "$ac_c_werror_flag"
10224                          || test ! -s conftest.err'
10225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10226   (eval $ac_try) 2>&5
10227   ac_status=$?
10228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229   (exit $ac_status); }; } &&
10230          { ac_try='test -s conftest.$ac_objext'
10231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10232   (eval $ac_try) 2>&5
10233   ac_status=$?
10234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10235   (exit $ac_status); }; }; then
10236   ac_header_compiler=yes
10237 else
10238   echo "$as_me: failed program was:" >&5
10239 sed 's/^/| /' conftest.$ac_ext >&5
10240
10241 ac_header_compiler=no
10242 fi
10243 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10244 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10245 echo "${ECHO_T}$ac_header_compiler" >&6
10246
10247 # Is the header present?
10248 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10249 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10250 cat >conftest.$ac_ext <<_ACEOF
10251 /* confdefs.h.  */
10252 _ACEOF
10253 cat confdefs.h >>conftest.$ac_ext
10254 cat >>conftest.$ac_ext <<_ACEOF
10255 /* end confdefs.h.  */
10256 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10257 _ACEOF
10258 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10260   ac_status=$?
10261   grep -v '^ *+' conftest.er1 >conftest.err
10262   rm -f conftest.er1
10263   cat conftest.err >&5
10264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10265   (exit $ac_status); } >/dev/null; then
10266   if test -s conftest.err; then
10267     ac_cpp_err=$ac_c_preproc_warn_flag
10268     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10269   else
10270     ac_cpp_err=
10271   fi
10272 else
10273   ac_cpp_err=yes
10274 fi
10275 if test -z "$ac_cpp_err"; then
10276   ac_header_preproc=yes
10277 else
10278   echo "$as_me: failed program was:" >&5
10279 sed 's/^/| /' conftest.$ac_ext >&5
10280
10281   ac_header_preproc=no
10282 fi
10283 rm -f conftest.err conftest.$ac_ext
10284 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10285 echo "${ECHO_T}$ac_header_preproc" >&6
10286
10287 # So?  What about this header?
10288 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10289   yes:no: )
10290     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10291 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10292     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10293 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10294     ac_header_preproc=yes
10295     ;;
10296   no:yes:* )
10297     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10298 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10299     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10300 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10301     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10302 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10303     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10304 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10305     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10306 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10307     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10308 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10309     (
10310       cat <<\_ASBOX
10311 ## ---------------------------------------- ##
10312 ## Report this to pgsql-bugs@postgresql.org ##
10313 ## ---------------------------------------- ##
10314 _ASBOX
10315     ) |
10316       sed "s/^/$as_me: WARNING:     /" >&2
10317     ;;
10318 esac
10319 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10320 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10321 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10322   echo $ECHO_N "(cached) $ECHO_C" >&6
10323 else
10324   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10325 fi
10326 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10327 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10328
10329 fi
10330 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10331   :
10332 else
10333   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10334 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10335    { (exit 1); exit 1; }; }
10336 fi
10337
10338
10339 fi
10340
10341
10342 ##
10343 ## Types, structures, compiler characteristics
10344 ##
10345
10346  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10347 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10348 if test "${ac_cv_c_const+set}" = set; then
10349   echo $ECHO_N "(cached) $ECHO_C" >&6
10350 else
10351   cat >conftest.$ac_ext <<_ACEOF
10352 /* confdefs.h.  */
10353 _ACEOF
10354 cat confdefs.h >>conftest.$ac_ext
10355 cat >>conftest.$ac_ext <<_ACEOF
10356 /* end confdefs.h.  */
10357
10358 int
10359 main ()
10360 {
10361 /* FIXME: Include the comments suggested by Paul. */
10362 #ifndef __cplusplus
10363   /* Ultrix mips cc rejects this.  */
10364   typedef int charset[2];
10365   const charset x;
10366   /* SunOS 4.1.1 cc rejects this.  */
10367   char const *const *ccp;
10368   char **p;
10369   /* NEC SVR4.0.2 mips cc rejects this.  */
10370   struct point {int x, y;};
10371   static struct point const zero = {0,0};
10372   /* AIX XL C 1.02.0.0 rejects this.
10373      It does not let you subtract one const X* pointer from another in
10374      an arm of an if-expression whose if-part is not a constant
10375      expression */
10376   const char *g = "string";
10377   ccp = &g + (g ? g-g : 0);
10378   /* HPUX 7.0 cc rejects these. */
10379   ++ccp;
10380   p = (char**) ccp;
10381   ccp = (char const *const *) p;
10382   { /* SCO 3.2v4 cc rejects this.  */
10383     char *t;
10384     char const *s = 0 ? (char *) 0 : (char const *) 0;
10385
10386     *t++ = 0;
10387   }
10388   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10389     int x[] = {25, 17};
10390     const int *foo = &x[0];
10391     ++foo;
10392   }
10393   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10394     typedef const int *iptr;
10395     iptr p = 0;
10396     ++p;
10397   }
10398   { /* AIX XL C 1.02.0.0 rejects this saying
10399        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10400     struct s { int j; const int *ap[3]; };
10401     struct s *b; b->j = 5;
10402   }
10403   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10404     const int foo = 10;
10405   }
10406 #endif
10407
10408   ;
10409   return 0;
10410 }
10411 _ACEOF
10412 rm -f conftest.$ac_objext
10413 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10414   (eval $ac_compile) 2>conftest.er1
10415   ac_status=$?
10416   grep -v '^ *+' conftest.er1 >conftest.err
10417   rm -f conftest.er1
10418   cat conftest.err >&5
10419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10420   (exit $ac_status); } &&
10421          { ac_try='test -z "$ac_c_werror_flag"
10422                          || test ! -s conftest.err'
10423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10424   (eval $ac_try) 2>&5
10425   ac_status=$?
10426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427   (exit $ac_status); }; } &&
10428          { ac_try='test -s conftest.$ac_objext'
10429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10430   (eval $ac_try) 2>&5
10431   ac_status=$?
10432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10433   (exit $ac_status); }; }; then
10434   ac_cv_c_const=yes
10435 else
10436   echo "$as_me: failed program was:" >&5
10437 sed 's/^/| /' conftest.$ac_ext >&5
10438
10439 ac_cv_c_const=no
10440 fi
10441 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10442 fi
10443 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10444 echo "${ECHO_T}$ac_cv_c_const" >&6
10445 if test $ac_cv_c_const = no; then
10446
10447 cat >>confdefs.h <<\_ACEOF
10448 #define const
10449 _ACEOF
10450
10451 fi
10452
10453
10454 echo "$as_me:$LINENO: checking for inline" >&5
10455 echo $ECHO_N "checking for inline... $ECHO_C" >&6
10456 if test "${ac_cv_c_inline+set}" = set; then
10457   echo $ECHO_N "(cached) $ECHO_C" >&6
10458 else
10459   ac_cv_c_inline=no
10460 for ac_kw in inline __inline__ __inline; do
10461   cat >conftest.$ac_ext <<_ACEOF
10462 /* confdefs.h.  */
10463 _ACEOF
10464 cat confdefs.h >>conftest.$ac_ext
10465 cat >>conftest.$ac_ext <<_ACEOF
10466 /* end confdefs.h.  */
10467 #ifndef __cplusplus
10468 typedef int foo_t;
10469 static $ac_kw foo_t static_foo () {return 0; }
10470 $ac_kw int foo () {return 0; }
10471 #endif
10472
10473 _ACEOF
10474 rm -f conftest.$ac_objext
10475 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10476   (eval $ac_compile) 2>conftest.er1
10477   ac_status=$?
10478   grep -v '^ *+' conftest.er1 >conftest.err
10479   rm -f conftest.er1
10480   cat conftest.err >&5
10481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10482   (exit $ac_status); } &&
10483          { ac_try='test -z "$ac_c_werror_flag"
10484                          || test ! -s conftest.err'
10485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10486   (eval $ac_try) 2>&5
10487   ac_status=$?
10488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10489   (exit $ac_status); }; } &&
10490          { ac_try='test -s conftest.$ac_objext'
10491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10492   (eval $ac_try) 2>&5
10493   ac_status=$?
10494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10495   (exit $ac_status); }; }; then
10496   ac_cv_c_inline=$ac_kw; break
10497 else
10498   echo "$as_me: failed program was:" >&5
10499 sed 's/^/| /' conftest.$ac_ext >&5
10500
10501 fi
10502 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10503 done
10504
10505 fi
10506 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
10507 echo "${ECHO_T}$ac_cv_c_inline" >&6
10508 case $ac_cv_c_inline in
10509   inline | yes) ;;
10510   no)
10511 cat >>confdefs.h <<\_ACEOF
10512 #define inline
10513 _ACEOF
10514  ;;
10515   *)  cat >>confdefs.h <<_ACEOF
10516 #define inline $ac_cv_c_inline
10517 _ACEOF
10518  ;;
10519 esac
10520
10521 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
10522 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
10523 if test "${ac_cv_c_stringize+set}" = set; then
10524   echo $ECHO_N "(cached) $ECHO_C" >&6
10525 else
10526   cat >conftest.$ac_ext <<_ACEOF
10527 /* confdefs.h.  */
10528 _ACEOF
10529 cat confdefs.h >>conftest.$ac_ext
10530 cat >>conftest.$ac_ext <<_ACEOF
10531 /* end confdefs.h.  */
10532 #define x(y) #y
10533
10534 char *s = x(teststring);
10535 _ACEOF
10536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10537   $EGREP "#teststring" >/dev/null 2>&1; then
10538   ac_cv_c_stringize=no
10539 else
10540   ac_cv_c_stringize=yes
10541 fi
10542 rm -f conftest*
10543
10544 fi
10545 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
10546 echo "${ECHO_T}$ac_cv_c_stringize" >&6
10547 if test $ac_cv_c_stringize = yes; then
10548
10549 cat >>confdefs.h <<\_ACEOF
10550 #define HAVE_STRINGIZE 1
10551 _ACEOF
10552
10553 fi
10554
10555 echo "$as_me:$LINENO: checking for signed types" >&5
10556 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
10557 if test "${pgac_cv_c_signed+set}" = set; then
10558   echo $ECHO_N "(cached) $ECHO_C" >&6
10559 else
10560   cat >conftest.$ac_ext <<_ACEOF
10561 /* confdefs.h.  */
10562 _ACEOF
10563 cat confdefs.h >>conftest.$ac_ext
10564 cat >>conftest.$ac_ext <<_ACEOF
10565 /* end confdefs.h.  */
10566
10567 int
10568 main ()
10569 {
10570 signed char c; signed short s; signed int i;
10571   ;
10572   return 0;
10573 }
10574 _ACEOF
10575 rm -f conftest.$ac_objext
10576 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10577   (eval $ac_compile) 2>conftest.er1
10578   ac_status=$?
10579   grep -v '^ *+' conftest.er1 >conftest.err
10580   rm -f conftest.er1
10581   cat conftest.err >&5
10582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10583   (exit $ac_status); } &&
10584          { ac_try='test -z "$ac_c_werror_flag"
10585                          || test ! -s conftest.err'
10586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10587   (eval $ac_try) 2>&5
10588   ac_status=$?
10589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590   (exit $ac_status); }; } &&
10591          { ac_try='test -s conftest.$ac_objext'
10592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10593   (eval $ac_try) 2>&5
10594   ac_status=$?
10595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10596   (exit $ac_status); }; }; then
10597   pgac_cv_c_signed=yes
10598 else
10599   echo "$as_me: failed program was:" >&5
10600 sed 's/^/| /' conftest.$ac_ext >&5
10601
10602 pgac_cv_c_signed=no
10603 fi
10604 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10605 fi
10606 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
10607 echo "${ECHO_T}$pgac_cv_c_signed" >&6
10608 if test x"$pgac_cv_c_signed" = xno ; then
10609
10610 cat >>confdefs.h <<\_ACEOF
10611 #define signed
10612 _ACEOF
10613
10614 fi
10615 echo "$as_me:$LINENO: checking for working volatile" >&5
10616 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
10617 if test "${ac_cv_c_volatile+set}" = set; then
10618   echo $ECHO_N "(cached) $ECHO_C" >&6
10619 else
10620   cat >conftest.$ac_ext <<_ACEOF
10621 /* confdefs.h.  */
10622 _ACEOF
10623 cat confdefs.h >>conftest.$ac_ext
10624 cat >>conftest.$ac_ext <<_ACEOF
10625 /* end confdefs.h.  */
10626
10627 int
10628 main ()
10629 {
10630
10631 volatile int x;
10632 int * volatile y;
10633   ;
10634   return 0;
10635 }
10636 _ACEOF
10637 rm -f conftest.$ac_objext
10638 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10639   (eval $ac_compile) 2>conftest.er1
10640   ac_status=$?
10641   grep -v '^ *+' conftest.er1 >conftest.err
10642   rm -f conftest.er1
10643   cat conftest.err >&5
10644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10645   (exit $ac_status); } &&
10646          { ac_try='test -z "$ac_c_werror_flag"
10647                          || test ! -s conftest.err'
10648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10649   (eval $ac_try) 2>&5
10650   ac_status=$?
10651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10652   (exit $ac_status); }; } &&
10653          { ac_try='test -s conftest.$ac_objext'
10654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10655   (eval $ac_try) 2>&5
10656   ac_status=$?
10657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658   (exit $ac_status); }; }; then
10659   ac_cv_c_volatile=yes
10660 else
10661   echo "$as_me: failed program was:" >&5
10662 sed 's/^/| /' conftest.$ac_ext >&5
10663
10664 ac_cv_c_volatile=no
10665 fi
10666 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10667 fi
10668 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
10669 echo "${ECHO_T}$ac_cv_c_volatile" >&6
10670 if test $ac_cv_c_volatile = no; then
10671
10672 cat >>confdefs.h <<\_ACEOF
10673 #define volatile
10674 _ACEOF
10675
10676 fi
10677
10678 echo "$as_me:$LINENO: checking for __func__" >&5
10679 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
10680 if test "${pgac_cv_funcname_func_support+set}" = set; then
10681   echo $ECHO_N "(cached) $ECHO_C" >&6
10682 else
10683   cat >conftest.$ac_ext <<_ACEOF
10684 /* confdefs.h.  */
10685 _ACEOF
10686 cat confdefs.h >>conftest.$ac_ext
10687 cat >>conftest.$ac_ext <<_ACEOF
10688 /* end confdefs.h.  */
10689 #include <stdio.h>
10690 int
10691 main ()
10692 {
10693 printf("%s\n", __func__);
10694   ;
10695   return 0;
10696 }
10697 _ACEOF
10698 rm -f conftest.$ac_objext
10699 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10700   (eval $ac_compile) 2>conftest.er1
10701   ac_status=$?
10702   grep -v '^ *+' conftest.er1 >conftest.err
10703   rm -f conftest.er1
10704   cat conftest.err >&5
10705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10706   (exit $ac_status); } &&
10707          { ac_try='test -z "$ac_c_werror_flag"
10708                          || test ! -s conftest.err'
10709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10710   (eval $ac_try) 2>&5
10711   ac_status=$?
10712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10713   (exit $ac_status); }; } &&
10714          { ac_try='test -s conftest.$ac_objext'
10715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10716   (eval $ac_try) 2>&5
10717   ac_status=$?
10718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10719   (exit $ac_status); }; }; then
10720   pgac_cv_funcname_func_support=yes
10721 else
10722   echo "$as_me: failed program was:" >&5
10723 sed 's/^/| /' conftest.$ac_ext >&5
10724
10725 pgac_cv_funcname_func_support=no
10726 fi
10727 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10728 fi
10729 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
10730 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
10731 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10732
10733 cat >>confdefs.h <<\_ACEOF
10734 #define HAVE_FUNCNAME__FUNC 1
10735 _ACEOF
10736
10737 else
10738 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
10739 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
10740 if test "${pgac_cv_funcname_function_support+set}" = set; then
10741   echo $ECHO_N "(cached) $ECHO_C" >&6
10742 else
10743   cat >conftest.$ac_ext <<_ACEOF
10744 /* confdefs.h.  */
10745 _ACEOF
10746 cat confdefs.h >>conftest.$ac_ext
10747 cat >>conftest.$ac_ext <<_ACEOF
10748 /* end confdefs.h.  */
10749 #include <stdio.h>
10750 int
10751 main ()
10752 {
10753 printf("%s\n", __FUNCTION__);
10754   ;
10755   return 0;
10756 }
10757 _ACEOF
10758 rm -f conftest.$ac_objext
10759 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10760   (eval $ac_compile) 2>conftest.er1
10761   ac_status=$?
10762   grep -v '^ *+' conftest.er1 >conftest.err
10763   rm -f conftest.er1
10764   cat conftest.err >&5
10765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10766   (exit $ac_status); } &&
10767          { ac_try='test -z "$ac_c_werror_flag"
10768                          || test ! -s conftest.err'
10769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10770   (eval $ac_try) 2>&5
10771   ac_status=$?
10772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10773   (exit $ac_status); }; } &&
10774          { ac_try='test -s conftest.$ac_objext'
10775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10776   (eval $ac_try) 2>&5
10777   ac_status=$?
10778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10779   (exit $ac_status); }; }; then
10780   pgac_cv_funcname_function_support=yes
10781 else
10782   echo "$as_me: failed program was:" >&5
10783 sed 's/^/| /' conftest.$ac_ext >&5
10784
10785 pgac_cv_funcname_function_support=no
10786 fi
10787 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10788 fi
10789 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
10790 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
10791 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10792
10793 cat >>confdefs.h <<\_ACEOF
10794 #define HAVE_FUNCNAME__FUNCTION 1
10795 _ACEOF
10796
10797 fi
10798 fi
10799 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
10800 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
10801 if test "${ac_cv_struct_tm+set}" = set; then
10802   echo $ECHO_N "(cached) $ECHO_C" >&6
10803 else
10804   cat >conftest.$ac_ext <<_ACEOF
10805 /* confdefs.h.  */
10806 _ACEOF
10807 cat confdefs.h >>conftest.$ac_ext
10808 cat >>conftest.$ac_ext <<_ACEOF
10809 /* end confdefs.h.  */
10810 #include <sys/types.h>
10811 #include <time.h>
10812
10813 int
10814 main ()
10815 {
10816 struct tm *tp; tp->tm_sec;
10817   ;
10818   return 0;
10819 }
10820 _ACEOF
10821 rm -f conftest.$ac_objext
10822 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10823   (eval $ac_compile) 2>conftest.er1
10824   ac_status=$?
10825   grep -v '^ *+' conftest.er1 >conftest.err
10826   rm -f conftest.er1
10827   cat conftest.err >&5
10828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10829   (exit $ac_status); } &&
10830          { ac_try='test -z "$ac_c_werror_flag"
10831                          || test ! -s conftest.err'
10832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10833   (eval $ac_try) 2>&5
10834   ac_status=$?
10835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10836   (exit $ac_status); }; } &&
10837          { ac_try='test -s conftest.$ac_objext'
10838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10839   (eval $ac_try) 2>&5
10840   ac_status=$?
10841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10842   (exit $ac_status); }; }; then
10843   ac_cv_struct_tm=time.h
10844 else
10845   echo "$as_me: failed program was:" >&5
10846 sed 's/^/| /' conftest.$ac_ext >&5
10847
10848 ac_cv_struct_tm=sys/time.h
10849 fi
10850 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10851 fi
10852 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
10853 echo "${ECHO_T}$ac_cv_struct_tm" >&6
10854 if test $ac_cv_struct_tm = sys/time.h; then
10855
10856 cat >>confdefs.h <<\_ACEOF
10857 #define TM_IN_SYS_TIME 1
10858 _ACEOF
10859
10860 fi
10861
10862 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
10863 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
10864 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
10865   echo $ECHO_N "(cached) $ECHO_C" >&6
10866 else
10867   cat >conftest.$ac_ext <<_ACEOF
10868 /* confdefs.h.  */
10869 _ACEOF
10870 cat confdefs.h >>conftest.$ac_ext
10871 cat >>conftest.$ac_ext <<_ACEOF
10872 /* end confdefs.h.  */
10873 #include <sys/types.h>
10874 #include <$ac_cv_struct_tm>
10875
10876
10877 int
10878 main ()
10879 {
10880 static struct tm ac_aggr;
10881 if (ac_aggr.tm_zone)
10882 return 0;
10883   ;
10884   return 0;
10885 }
10886 _ACEOF
10887 rm -f conftest.$ac_objext
10888 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10889   (eval $ac_compile) 2>conftest.er1
10890   ac_status=$?
10891   grep -v '^ *+' conftest.er1 >conftest.err
10892   rm -f conftest.er1
10893   cat conftest.err >&5
10894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10895   (exit $ac_status); } &&
10896          { ac_try='test -z "$ac_c_werror_flag"
10897                          || test ! -s conftest.err'
10898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10899   (eval $ac_try) 2>&5
10900   ac_status=$?
10901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10902   (exit $ac_status); }; } &&
10903          { ac_try='test -s conftest.$ac_objext'
10904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10905   (eval $ac_try) 2>&5
10906   ac_status=$?
10907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10908   (exit $ac_status); }; }; then
10909   ac_cv_member_struct_tm_tm_zone=yes
10910 else
10911   echo "$as_me: failed program was:" >&5
10912 sed 's/^/| /' conftest.$ac_ext >&5
10913
10914 cat >conftest.$ac_ext <<_ACEOF
10915 /* confdefs.h.  */
10916 _ACEOF
10917 cat confdefs.h >>conftest.$ac_ext
10918 cat >>conftest.$ac_ext <<_ACEOF
10919 /* end confdefs.h.  */
10920 #include <sys/types.h>
10921 #include <$ac_cv_struct_tm>
10922
10923
10924 int
10925 main ()
10926 {
10927 static struct tm ac_aggr;
10928 if (sizeof ac_aggr.tm_zone)
10929 return 0;
10930   ;
10931   return 0;
10932 }
10933 _ACEOF
10934 rm -f conftest.$ac_objext
10935 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10936   (eval $ac_compile) 2>conftest.er1
10937   ac_status=$?
10938   grep -v '^ *+' conftest.er1 >conftest.err
10939   rm -f conftest.er1
10940   cat conftest.err >&5
10941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10942   (exit $ac_status); } &&
10943          { ac_try='test -z "$ac_c_werror_flag"
10944                          || test ! -s conftest.err'
10945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10946   (eval $ac_try) 2>&5
10947   ac_status=$?
10948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949   (exit $ac_status); }; } &&
10950          { ac_try='test -s conftest.$ac_objext'
10951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10952   (eval $ac_try) 2>&5
10953   ac_status=$?
10954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10955   (exit $ac_status); }; }; then
10956   ac_cv_member_struct_tm_tm_zone=yes
10957 else
10958   echo "$as_me: failed program was:" >&5
10959 sed 's/^/| /' conftest.$ac_ext >&5
10960
10961 ac_cv_member_struct_tm_tm_zone=no
10962 fi
10963 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10964 fi
10965 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10966 fi
10967 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
10968 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
10969 if test $ac_cv_member_struct_tm_tm_zone = yes; then
10970
10971 cat >>confdefs.h <<_ACEOF
10972 #define HAVE_STRUCT_TM_TM_ZONE 1
10973 _ACEOF
10974
10975
10976 fi
10977
10978 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10979
10980 cat >>confdefs.h <<\_ACEOF
10981 #define HAVE_TM_ZONE 1
10982 _ACEOF
10983
10984 fi
10985 echo "$as_me:$LINENO: checking for tzname" >&5
10986 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
10987 if test "${ac_cv_var_tzname+set}" = set; then
10988   echo $ECHO_N "(cached) $ECHO_C" >&6
10989 else
10990   cat >conftest.$ac_ext <<_ACEOF
10991 /* confdefs.h.  */
10992 _ACEOF
10993 cat confdefs.h >>conftest.$ac_ext
10994 cat >>conftest.$ac_ext <<_ACEOF
10995 /* end confdefs.h.  */
10996 #include <time.h>
10997 #ifndef tzname /* For SGI.  */
10998 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10999 #endif
11000
11001 int
11002 main ()
11003 {
11004 atoi(*tzname);
11005   ;
11006   return 0;
11007 }
11008 _ACEOF
11009 rm -f conftest.$ac_objext conftest$ac_exeext
11010 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11011   (eval $ac_link) 2>conftest.er1
11012   ac_status=$?
11013   grep -v '^ *+' conftest.er1 >conftest.err
11014   rm -f conftest.er1
11015   cat conftest.err >&5
11016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11017   (exit $ac_status); } &&
11018          { ac_try='test -z "$ac_c_werror_flag"
11019                          || test ! -s conftest.err'
11020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11021   (eval $ac_try) 2>&5
11022   ac_status=$?
11023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11024   (exit $ac_status); }; } &&
11025          { ac_try='test -s conftest$ac_exeext'
11026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11027   (eval $ac_try) 2>&5
11028   ac_status=$?
11029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11030   (exit $ac_status); }; }; then
11031   ac_cv_var_tzname=yes
11032 else
11033   echo "$as_me: failed program was:" >&5
11034 sed 's/^/| /' conftest.$ac_ext >&5
11035
11036 ac_cv_var_tzname=no
11037 fi
11038 rm -f conftest.err conftest.$ac_objext \
11039       conftest$ac_exeext conftest.$ac_ext
11040 fi
11041 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11042 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11043 if test $ac_cv_var_tzname = yes; then
11044
11045 cat >>confdefs.h <<\_ACEOF
11046 #define HAVE_TZNAME 1
11047 _ACEOF
11048
11049 fi
11050
11051 echo "$as_me:$LINENO: checking for union semun" >&5
11052 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11053 if test "${ac_cv_type_union_semun+set}" = set; then
11054   echo $ECHO_N "(cached) $ECHO_C" >&6
11055 else
11056   cat >conftest.$ac_ext <<_ACEOF
11057 /* confdefs.h.  */
11058 _ACEOF
11059 cat confdefs.h >>conftest.$ac_ext
11060 cat >>conftest.$ac_ext <<_ACEOF
11061 /* end confdefs.h.  */
11062 #include <sys/types.h>
11063 #include <sys/ipc.h>
11064 #include <sys/sem.h>
11065
11066 int
11067 main ()
11068 {
11069 if ((union semun *) 0)
11070   return 0;
11071 if (sizeof (union semun))
11072   return 0;
11073   ;
11074   return 0;
11075 }
11076 _ACEOF
11077 rm -f conftest.$ac_objext
11078 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11079   (eval $ac_compile) 2>conftest.er1
11080   ac_status=$?
11081   grep -v '^ *+' conftest.er1 >conftest.err
11082   rm -f conftest.er1
11083   cat conftest.err >&5
11084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11085   (exit $ac_status); } &&
11086          { ac_try='test -z "$ac_c_werror_flag"
11087                          || test ! -s conftest.err'
11088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11089   (eval $ac_try) 2>&5
11090   ac_status=$?
11091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11092   (exit $ac_status); }; } &&
11093          { ac_try='test -s conftest.$ac_objext'
11094   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11095   (eval $ac_try) 2>&5
11096   ac_status=$?
11097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11098   (exit $ac_status); }; }; then
11099   ac_cv_type_union_semun=yes
11100 else
11101   echo "$as_me: failed program was:" >&5
11102 sed 's/^/| /' conftest.$ac_ext >&5
11103
11104 ac_cv_type_union_semun=no
11105 fi
11106 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11107 fi
11108 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11109 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11110 if test $ac_cv_type_union_semun = yes; then
11111
11112 cat >>confdefs.h <<_ACEOF
11113 #define HAVE_UNION_SEMUN 1
11114 _ACEOF
11115
11116
11117 fi
11118
11119 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11120 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11121 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11122   echo $ECHO_N "(cached) $ECHO_C" >&6
11123 else
11124   cat >conftest.$ac_ext <<_ACEOF
11125 /* confdefs.h.  */
11126 _ACEOF
11127 cat confdefs.h >>conftest.$ac_ext
11128 cat >>conftest.$ac_ext <<_ACEOF
11129 /* end confdefs.h.  */
11130 #include <sys/types.h>
11131 #ifdef HAVE_SYS_UN_H
11132 #include <sys/un.h>
11133 #endif
11134
11135
11136 int
11137 main ()
11138 {
11139 if ((struct sockaddr_un *) 0)
11140   return 0;
11141 if (sizeof (struct sockaddr_un))
11142   return 0;
11143   ;
11144   return 0;
11145 }
11146 _ACEOF
11147 rm -f conftest.$ac_objext
11148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11149   (eval $ac_compile) 2>conftest.er1
11150   ac_status=$?
11151   grep -v '^ *+' conftest.er1 >conftest.err
11152   rm -f conftest.er1
11153   cat conftest.err >&5
11154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11155   (exit $ac_status); } &&
11156          { ac_try='test -z "$ac_c_werror_flag"
11157                          || test ! -s conftest.err'
11158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11159   (eval $ac_try) 2>&5
11160   ac_status=$?
11161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11162   (exit $ac_status); }; } &&
11163          { ac_try='test -s conftest.$ac_objext'
11164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11165   (eval $ac_try) 2>&5
11166   ac_status=$?
11167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168   (exit $ac_status); }; }; then
11169   ac_cv_type_struct_sockaddr_un=yes
11170 else
11171   echo "$as_me: failed program was:" >&5
11172 sed 's/^/| /' conftest.$ac_ext >&5
11173
11174 ac_cv_type_struct_sockaddr_un=no
11175 fi
11176 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11177 fi
11178 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11179 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11180 if test $ac_cv_type_struct_sockaddr_un = yes; then
11181
11182 cat >>confdefs.h <<_ACEOF
11183 #define HAVE_STRUCT_SOCKADDR_UN 1
11184 _ACEOF
11185
11186
11187 cat >>confdefs.h <<\_ACEOF
11188 #define HAVE_UNIX_SOCKETS 1
11189 _ACEOF
11190
11191 fi
11192
11193 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11194 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11195 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11196   echo $ECHO_N "(cached) $ECHO_C" >&6
11197 else
11198   cat >conftest.$ac_ext <<_ACEOF
11199 /* confdefs.h.  */
11200 _ACEOF
11201 cat confdefs.h >>conftest.$ac_ext
11202 cat >>conftest.$ac_ext <<_ACEOF
11203 /* end confdefs.h.  */
11204 #include <sys/types.h>
11205 #ifdef HAVE_SYS_SOCKET_H
11206 #include <sys/socket.h>
11207 #endif
11208
11209
11210 int
11211 main ()
11212 {
11213 if ((struct sockaddr_storage *) 0)
11214   return 0;
11215 if (sizeof (struct sockaddr_storage))
11216   return 0;
11217   ;
11218   return 0;
11219 }
11220 _ACEOF
11221 rm -f conftest.$ac_objext
11222 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11223   (eval $ac_compile) 2>conftest.er1
11224   ac_status=$?
11225   grep -v '^ *+' conftest.er1 >conftest.err
11226   rm -f conftest.er1
11227   cat conftest.err >&5
11228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11229   (exit $ac_status); } &&
11230          { ac_try='test -z "$ac_c_werror_flag"
11231                          || test ! -s conftest.err'
11232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11233   (eval $ac_try) 2>&5
11234   ac_status=$?
11235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11236   (exit $ac_status); }; } &&
11237          { ac_try='test -s conftest.$ac_objext'
11238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11239   (eval $ac_try) 2>&5
11240   ac_status=$?
11241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11242   (exit $ac_status); }; }; then
11243   ac_cv_type_struct_sockaddr_storage=yes
11244 else
11245   echo "$as_me: failed program was:" >&5
11246 sed 's/^/| /' conftest.$ac_ext >&5
11247
11248 ac_cv_type_struct_sockaddr_storage=no
11249 fi
11250 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11251 fi
11252 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11253 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11254 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11255
11256 cat >>confdefs.h <<_ACEOF
11257 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11258 _ACEOF
11259
11260
11261 fi
11262
11263 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11264 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11265 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11266   echo $ECHO_N "(cached) $ECHO_C" >&6
11267 else
11268   cat >conftest.$ac_ext <<_ACEOF
11269 /* confdefs.h.  */
11270 _ACEOF
11271 cat confdefs.h >>conftest.$ac_ext
11272 cat >>conftest.$ac_ext <<_ACEOF
11273 /* end confdefs.h.  */
11274 #include <sys/types.h>
11275 #ifdef HAVE_SYS_SOCKET_H
11276 #include <sys/socket.h>
11277 #endif
11278
11279
11280 int
11281 main ()
11282 {
11283 static struct sockaddr_storage ac_aggr;
11284 if (ac_aggr.ss_family)
11285 return 0;
11286   ;
11287   return 0;
11288 }
11289 _ACEOF
11290 rm -f conftest.$ac_objext
11291 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11292   (eval $ac_compile) 2>conftest.er1
11293   ac_status=$?
11294   grep -v '^ *+' conftest.er1 >conftest.err
11295   rm -f conftest.er1
11296   cat conftest.err >&5
11297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11298   (exit $ac_status); } &&
11299          { ac_try='test -z "$ac_c_werror_flag"
11300                          || test ! -s conftest.err'
11301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11302   (eval $ac_try) 2>&5
11303   ac_status=$?
11304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11305   (exit $ac_status); }; } &&
11306          { ac_try='test -s conftest.$ac_objext'
11307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11308   (eval $ac_try) 2>&5
11309   ac_status=$?
11310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11311   (exit $ac_status); }; }; then
11312   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11313 else
11314   echo "$as_me: failed program was:" >&5
11315 sed 's/^/| /' conftest.$ac_ext >&5
11316
11317 cat >conftest.$ac_ext <<_ACEOF
11318 /* confdefs.h.  */
11319 _ACEOF
11320 cat confdefs.h >>conftest.$ac_ext
11321 cat >>conftest.$ac_ext <<_ACEOF
11322 /* end confdefs.h.  */
11323 #include <sys/types.h>
11324 #ifdef HAVE_SYS_SOCKET_H
11325 #include <sys/socket.h>
11326 #endif
11327
11328
11329 int
11330 main ()
11331 {
11332 static struct sockaddr_storage ac_aggr;
11333 if (sizeof ac_aggr.ss_family)
11334 return 0;
11335   ;
11336   return 0;
11337 }
11338 _ACEOF
11339 rm -f conftest.$ac_objext
11340 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11341   (eval $ac_compile) 2>conftest.er1
11342   ac_status=$?
11343   grep -v '^ *+' conftest.er1 >conftest.err
11344   rm -f conftest.er1
11345   cat conftest.err >&5
11346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11347   (exit $ac_status); } &&
11348          { ac_try='test -z "$ac_c_werror_flag"
11349                          || test ! -s conftest.err'
11350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11351   (eval $ac_try) 2>&5
11352   ac_status=$?
11353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11354   (exit $ac_status); }; } &&
11355          { ac_try='test -s conftest.$ac_objext'
11356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11357   (eval $ac_try) 2>&5
11358   ac_status=$?
11359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11360   (exit $ac_status); }; }; then
11361   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11362 else
11363   echo "$as_me: failed program was:" >&5
11364 sed 's/^/| /' conftest.$ac_ext >&5
11365
11366 ac_cv_member_struct_sockaddr_storage_ss_family=no
11367 fi
11368 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11369 fi
11370 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11371 fi
11372 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11373 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11374 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11375
11376 cat >>confdefs.h <<_ACEOF
11377 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11378 _ACEOF
11379
11380
11381 fi
11382 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11383 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11384 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11385   echo $ECHO_N "(cached) $ECHO_C" >&6
11386 else
11387   cat >conftest.$ac_ext <<_ACEOF
11388 /* confdefs.h.  */
11389 _ACEOF
11390 cat confdefs.h >>conftest.$ac_ext
11391 cat >>conftest.$ac_ext <<_ACEOF
11392 /* end confdefs.h.  */
11393 #include <sys/types.h>
11394 #ifdef HAVE_SYS_SOCKET_H
11395 #include <sys/socket.h>
11396 #endif
11397
11398
11399 int
11400 main ()
11401 {
11402 static struct sockaddr_storage ac_aggr;
11403 if (ac_aggr.__ss_family)
11404 return 0;
11405   ;
11406   return 0;
11407 }
11408 _ACEOF
11409 rm -f conftest.$ac_objext
11410 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11411   (eval $ac_compile) 2>conftest.er1
11412   ac_status=$?
11413   grep -v '^ *+' conftest.er1 >conftest.err
11414   rm -f conftest.er1
11415   cat conftest.err >&5
11416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11417   (exit $ac_status); } &&
11418          { ac_try='test -z "$ac_c_werror_flag"
11419                          || test ! -s conftest.err'
11420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11421   (eval $ac_try) 2>&5
11422   ac_status=$?
11423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11424   (exit $ac_status); }; } &&
11425          { ac_try='test -s conftest.$ac_objext'
11426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11427   (eval $ac_try) 2>&5
11428   ac_status=$?
11429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11430   (exit $ac_status); }; }; then
11431   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11432 else
11433   echo "$as_me: failed program was:" >&5
11434 sed 's/^/| /' conftest.$ac_ext >&5
11435
11436 cat >conftest.$ac_ext <<_ACEOF
11437 /* confdefs.h.  */
11438 _ACEOF
11439 cat confdefs.h >>conftest.$ac_ext
11440 cat >>conftest.$ac_ext <<_ACEOF
11441 /* end confdefs.h.  */
11442 #include <sys/types.h>
11443 #ifdef HAVE_SYS_SOCKET_H
11444 #include <sys/socket.h>
11445 #endif
11446
11447
11448 int
11449 main ()
11450 {
11451 static struct sockaddr_storage ac_aggr;
11452 if (sizeof ac_aggr.__ss_family)
11453 return 0;
11454   ;
11455   return 0;
11456 }
11457 _ACEOF
11458 rm -f conftest.$ac_objext
11459 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11460   (eval $ac_compile) 2>conftest.er1
11461   ac_status=$?
11462   grep -v '^ *+' conftest.er1 >conftest.err
11463   rm -f conftest.er1
11464   cat conftest.err >&5
11465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11466   (exit $ac_status); } &&
11467          { ac_try='test -z "$ac_c_werror_flag"
11468                          || test ! -s conftest.err'
11469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11470   (eval $ac_try) 2>&5
11471   ac_status=$?
11472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11473   (exit $ac_status); }; } &&
11474          { ac_try='test -s conftest.$ac_objext'
11475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11476   (eval $ac_try) 2>&5
11477   ac_status=$?
11478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11479   (exit $ac_status); }; }; then
11480   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11481 else
11482   echo "$as_me: failed program was:" >&5
11483 sed 's/^/| /' conftest.$ac_ext >&5
11484
11485 ac_cv_member_struct_sockaddr_storage___ss_family=no
11486 fi
11487 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11488 fi
11489 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11490 fi
11491 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
11492 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
11493 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
11494
11495 cat >>confdefs.h <<_ACEOF
11496 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11497 _ACEOF
11498
11499
11500 fi
11501 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
11502 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
11503 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
11504   echo $ECHO_N "(cached) $ECHO_C" >&6
11505 else
11506   cat >conftest.$ac_ext <<_ACEOF
11507 /* confdefs.h.  */
11508 _ACEOF
11509 cat confdefs.h >>conftest.$ac_ext
11510 cat >>conftest.$ac_ext <<_ACEOF
11511 /* end confdefs.h.  */
11512 #include <sys/types.h>
11513 #ifdef HAVE_SYS_SOCKET_H
11514 #include <sys/socket.h>
11515 #endif
11516
11517
11518 int
11519 main ()
11520 {
11521 static struct sockaddr_storage ac_aggr;
11522 if (ac_aggr.ss_len)
11523 return 0;
11524   ;
11525   return 0;
11526 }
11527 _ACEOF
11528 rm -f conftest.$ac_objext
11529 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11530   (eval $ac_compile) 2>conftest.er1
11531   ac_status=$?
11532   grep -v '^ *+' conftest.er1 >conftest.err
11533   rm -f conftest.er1
11534   cat conftest.err >&5
11535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11536   (exit $ac_status); } &&
11537          { ac_try='test -z "$ac_c_werror_flag"
11538                          || test ! -s conftest.err'
11539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11540   (eval $ac_try) 2>&5
11541   ac_status=$?
11542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11543   (exit $ac_status); }; } &&
11544          { ac_try='test -s conftest.$ac_objext'
11545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11546   (eval $ac_try) 2>&5
11547   ac_status=$?
11548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11549   (exit $ac_status); }; }; then
11550   ac_cv_member_struct_sockaddr_storage_ss_len=yes
11551 else
11552   echo "$as_me: failed program was:" >&5
11553 sed 's/^/| /' conftest.$ac_ext >&5
11554
11555 cat >conftest.$ac_ext <<_ACEOF
11556 /* confdefs.h.  */
11557 _ACEOF
11558 cat confdefs.h >>conftest.$ac_ext
11559 cat >>conftest.$ac_ext <<_ACEOF
11560 /* end confdefs.h.  */
11561 #include <sys/types.h>
11562 #ifdef HAVE_SYS_SOCKET_H
11563 #include <sys/socket.h>
11564 #endif
11565
11566
11567 int
11568 main ()
11569 {
11570 static struct sockaddr_storage ac_aggr;
11571 if (sizeof ac_aggr.ss_len)
11572 return 0;
11573   ;
11574   return 0;
11575 }
11576 _ACEOF
11577 rm -f conftest.$ac_objext
11578 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11579   (eval $ac_compile) 2>conftest.er1
11580   ac_status=$?
11581   grep -v '^ *+' conftest.er1 >conftest.err
11582   rm -f conftest.er1
11583   cat conftest.err >&5
11584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11585   (exit $ac_status); } &&
11586          { ac_try='test -z "$ac_c_werror_flag"
11587                          || test ! -s conftest.err'
11588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11589   (eval $ac_try) 2>&5
11590   ac_status=$?
11591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11592   (exit $ac_status); }; } &&
11593          { ac_try='test -s conftest.$ac_objext'
11594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11595   (eval $ac_try) 2>&5
11596   ac_status=$?
11597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598   (exit $ac_status); }; }; then
11599   ac_cv_member_struct_sockaddr_storage_ss_len=yes
11600 else
11601   echo "$as_me: failed program was:" >&5
11602 sed 's/^/| /' conftest.$ac_ext >&5
11603
11604 ac_cv_member_struct_sockaddr_storage_ss_len=no
11605 fi
11606 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11607 fi
11608 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11609 fi
11610 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
11611 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
11612 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
11613
11614 cat >>confdefs.h <<_ACEOF
11615 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
11616 _ACEOF
11617
11618
11619 fi
11620 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
11621 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
11622 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
11623   echo $ECHO_N "(cached) $ECHO_C" >&6
11624 else
11625   cat >conftest.$ac_ext <<_ACEOF
11626 /* confdefs.h.  */
11627 _ACEOF
11628 cat confdefs.h >>conftest.$ac_ext
11629 cat >>conftest.$ac_ext <<_ACEOF
11630 /* end confdefs.h.  */
11631 #include <sys/types.h>
11632 #ifdef HAVE_SYS_SOCKET_H
11633 #include <sys/socket.h>
11634 #endif
11635
11636
11637 int
11638 main ()
11639 {
11640 static struct sockaddr_storage ac_aggr;
11641 if (ac_aggr.__ss_len)
11642 return 0;
11643   ;
11644   return 0;
11645 }
11646 _ACEOF
11647 rm -f conftest.$ac_objext
11648 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11649   (eval $ac_compile) 2>conftest.er1
11650   ac_status=$?
11651   grep -v '^ *+' conftest.er1 >conftest.err
11652   rm -f conftest.er1
11653   cat conftest.err >&5
11654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11655   (exit $ac_status); } &&
11656          { ac_try='test -z "$ac_c_werror_flag"
11657                          || test ! -s conftest.err'
11658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11659   (eval $ac_try) 2>&5
11660   ac_status=$?
11661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662   (exit $ac_status); }; } &&
11663          { ac_try='test -s conftest.$ac_objext'
11664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11665   (eval $ac_try) 2>&5
11666   ac_status=$?
11667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11668   (exit $ac_status); }; }; then
11669   ac_cv_member_struct_sockaddr_storage___ss_len=yes
11670 else
11671   echo "$as_me: failed program was:" >&5
11672 sed 's/^/| /' conftest.$ac_ext >&5
11673
11674 cat >conftest.$ac_ext <<_ACEOF
11675 /* confdefs.h.  */
11676 _ACEOF
11677 cat confdefs.h >>conftest.$ac_ext
11678 cat >>conftest.$ac_ext <<_ACEOF
11679 /* end confdefs.h.  */
11680 #include <sys/types.h>
11681 #ifdef HAVE_SYS_SOCKET_H
11682 #include <sys/socket.h>
11683 #endif
11684
11685
11686 int
11687 main ()
11688 {
11689 static struct sockaddr_storage ac_aggr;
11690 if (sizeof ac_aggr.__ss_len)
11691 return 0;
11692   ;
11693   return 0;
11694 }
11695 _ACEOF
11696 rm -f conftest.$ac_objext
11697 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11698   (eval $ac_compile) 2>conftest.er1
11699   ac_status=$?
11700   grep -v '^ *+' conftest.er1 >conftest.err
11701   rm -f conftest.er1
11702   cat conftest.err >&5
11703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11704   (exit $ac_status); } &&
11705          { ac_try='test -z "$ac_c_werror_flag"
11706                          || test ! -s conftest.err'
11707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11708   (eval $ac_try) 2>&5
11709   ac_status=$?
11710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11711   (exit $ac_status); }; } &&
11712          { ac_try='test -s conftest.$ac_objext'
11713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11714   (eval $ac_try) 2>&5
11715   ac_status=$?
11716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11717   (exit $ac_status); }; }; then
11718   ac_cv_member_struct_sockaddr_storage___ss_len=yes
11719 else
11720   echo "$as_me: failed program was:" >&5
11721 sed 's/^/| /' conftest.$ac_ext >&5
11722
11723 ac_cv_member_struct_sockaddr_storage___ss_len=no
11724 fi
11725 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11726 fi
11727 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11728 fi
11729 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
11730 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
11731 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
11732
11733 cat >>confdefs.h <<_ACEOF
11734 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
11735 _ACEOF
11736
11737
11738 fi
11739 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
11740 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
11741 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
11742   echo $ECHO_N "(cached) $ECHO_C" >&6
11743 else
11744   cat >conftest.$ac_ext <<_ACEOF
11745 /* confdefs.h.  */
11746 _ACEOF
11747 cat confdefs.h >>conftest.$ac_ext
11748 cat >>conftest.$ac_ext <<_ACEOF
11749 /* end confdefs.h.  */
11750 #include <sys/types.h>
11751 #ifdef HAVE_SYS_SOCKET_H
11752 #include <sys/socket.h>
11753 #endif
11754
11755
11756 int
11757 main ()
11758 {
11759 static struct sockaddr ac_aggr;
11760 if (ac_aggr.sa_len)
11761 return 0;
11762   ;
11763   return 0;
11764 }
11765 _ACEOF
11766 rm -f conftest.$ac_objext
11767 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11768   (eval $ac_compile) 2>conftest.er1
11769   ac_status=$?
11770   grep -v '^ *+' conftest.er1 >conftest.err
11771   rm -f conftest.er1
11772   cat conftest.err >&5
11773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11774   (exit $ac_status); } &&
11775          { ac_try='test -z "$ac_c_werror_flag"
11776                          || test ! -s conftest.err'
11777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11778   (eval $ac_try) 2>&5
11779   ac_status=$?
11780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781   (exit $ac_status); }; } &&
11782          { ac_try='test -s conftest.$ac_objext'
11783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11784   (eval $ac_try) 2>&5
11785   ac_status=$?
11786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11787   (exit $ac_status); }; }; then
11788   ac_cv_member_struct_sockaddr_sa_len=yes
11789 else
11790   echo "$as_me: failed program was:" >&5
11791 sed 's/^/| /' conftest.$ac_ext >&5
11792
11793 cat >conftest.$ac_ext <<_ACEOF
11794 /* confdefs.h.  */
11795 _ACEOF
11796 cat confdefs.h >>conftest.$ac_ext
11797 cat >>conftest.$ac_ext <<_ACEOF
11798 /* end confdefs.h.  */
11799 #include <sys/types.h>
11800 #ifdef HAVE_SYS_SOCKET_H
11801 #include <sys/socket.h>
11802 #endif
11803
11804
11805 int
11806 main ()
11807 {
11808 static struct sockaddr ac_aggr;
11809 if (sizeof ac_aggr.sa_len)
11810 return 0;
11811   ;
11812   return 0;
11813 }
11814 _ACEOF
11815 rm -f conftest.$ac_objext
11816 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11817   (eval $ac_compile) 2>conftest.er1
11818   ac_status=$?
11819   grep -v '^ *+' conftest.er1 >conftest.err
11820   rm -f conftest.er1
11821   cat conftest.err >&5
11822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11823   (exit $ac_status); } &&
11824          { ac_try='test -z "$ac_c_werror_flag"
11825                          || test ! -s conftest.err'
11826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11827   (eval $ac_try) 2>&5
11828   ac_status=$?
11829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11830   (exit $ac_status); }; } &&
11831          { ac_try='test -s conftest.$ac_objext'
11832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11833   (eval $ac_try) 2>&5
11834   ac_status=$?
11835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11836   (exit $ac_status); }; }; then
11837   ac_cv_member_struct_sockaddr_sa_len=yes
11838 else
11839   echo "$as_me: failed program was:" >&5
11840 sed 's/^/| /' conftest.$ac_ext >&5
11841
11842 ac_cv_member_struct_sockaddr_sa_len=no
11843 fi
11844 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11845 fi
11846 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11847 fi
11848 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
11849 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
11850 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
11851
11852 cat >>confdefs.h <<_ACEOF
11853 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
11854 _ACEOF
11855
11856
11857 fi
11858
11859 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
11860 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
11861 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
11862   echo $ECHO_N "(cached) $ECHO_C" >&6
11863 else
11864   cat >conftest.$ac_ext <<_ACEOF
11865 /* confdefs.h.  */
11866 _ACEOF
11867 cat confdefs.h >>conftest.$ac_ext
11868 cat >>conftest.$ac_ext <<_ACEOF
11869 /* end confdefs.h.  */
11870 #include <sys/types.h>
11871 #include <sys/socket.h>
11872 #include <netdb.h>
11873
11874
11875 int
11876 main ()
11877 {
11878 if ((struct addrinfo *) 0)
11879   return 0;
11880 if (sizeof (struct addrinfo))
11881   return 0;
11882   ;
11883   return 0;
11884 }
11885 _ACEOF
11886 rm -f conftest.$ac_objext
11887 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11888   (eval $ac_compile) 2>conftest.er1
11889   ac_status=$?
11890   grep -v '^ *+' conftest.er1 >conftest.err
11891   rm -f conftest.er1
11892   cat conftest.err >&5
11893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11894   (exit $ac_status); } &&
11895          { ac_try='test -z "$ac_c_werror_flag"
11896                          || test ! -s conftest.err'
11897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11898   (eval $ac_try) 2>&5
11899   ac_status=$?
11900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11901   (exit $ac_status); }; } &&
11902          { ac_try='test -s conftest.$ac_objext'
11903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11904   (eval $ac_try) 2>&5
11905   ac_status=$?
11906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11907   (exit $ac_status); }; }; then
11908   ac_cv_type_struct_addrinfo=yes
11909 else
11910   echo "$as_me: failed program was:" >&5
11911 sed 's/^/| /' conftest.$ac_ext >&5
11912
11913 ac_cv_type_struct_addrinfo=no
11914 fi
11915 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11916 fi
11917 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
11918 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
11919 if test $ac_cv_type_struct_addrinfo = yes; then
11920
11921 cat >>confdefs.h <<_ACEOF
11922 #define HAVE_STRUCT_ADDRINFO 1
11923 _ACEOF
11924
11925
11926 fi
11927
11928
11929 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
11930 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
11931 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
11932   echo $ECHO_N "(cached) $ECHO_C" >&6
11933 else
11934   cat >conftest.$ac_ext <<_ACEOF
11935 /* confdefs.h.  */
11936 _ACEOF
11937 cat confdefs.h >>conftest.$ac_ext
11938 cat >>conftest.$ac_ext <<_ACEOF
11939 /* end confdefs.h.  */
11940 #include <sys/param.h>
11941 #include <sys/types.h>
11942 #include <sys/socket.h>
11943 #include <sys/ucred.h>
11944
11945 int
11946 main ()
11947 {
11948 if ((struct cmsgcred *) 0)
11949   return 0;
11950 if (sizeof (struct cmsgcred))
11951   return 0;
11952   ;
11953   return 0;
11954 }
11955 _ACEOF
11956 rm -f conftest.$ac_objext
11957 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11958   (eval $ac_compile) 2>conftest.er1
11959   ac_status=$?
11960   grep -v '^ *+' conftest.er1 >conftest.err
11961   rm -f conftest.er1
11962   cat conftest.err >&5
11963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11964   (exit $ac_status); } &&
11965          { ac_try='test -z "$ac_c_werror_flag"
11966                          || test ! -s conftest.err'
11967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11968   (eval $ac_try) 2>&5
11969   ac_status=$?
11970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971   (exit $ac_status); }; } &&
11972          { ac_try='test -s conftest.$ac_objext'
11973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11974   (eval $ac_try) 2>&5
11975   ac_status=$?
11976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11977   (exit $ac_status); }; }; then
11978   ac_cv_type_struct_cmsgcred=yes
11979 else
11980   echo "$as_me: failed program was:" >&5
11981 sed 's/^/| /' conftest.$ac_ext >&5
11982
11983 ac_cv_type_struct_cmsgcred=no
11984 fi
11985 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11986 fi
11987 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
11988 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
11989 if test $ac_cv_type_struct_cmsgcred = yes; then
11990
11991 cat >>confdefs.h <<_ACEOF
11992 #define HAVE_STRUCT_CMSGCRED 1
11993 _ACEOF
11994
11995
11996 fi
11997 echo "$as_me:$LINENO: checking for struct fcred" >&5
11998 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
11999 if test "${ac_cv_type_struct_fcred+set}" = set; then
12000   echo $ECHO_N "(cached) $ECHO_C" >&6
12001 else
12002   cat >conftest.$ac_ext <<_ACEOF
12003 /* confdefs.h.  */
12004 _ACEOF
12005 cat confdefs.h >>conftest.$ac_ext
12006 cat >>conftest.$ac_ext <<_ACEOF
12007 /* end confdefs.h.  */
12008 #include <sys/param.h>
12009 #include <sys/types.h>
12010 #include <sys/socket.h>
12011 #include <sys/ucred.h>
12012
12013 int
12014 main ()
12015 {
12016 if ((struct fcred *) 0)
12017   return 0;
12018 if (sizeof (struct fcred))
12019   return 0;
12020   ;
12021   return 0;
12022 }
12023 _ACEOF
12024 rm -f conftest.$ac_objext
12025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12026   (eval $ac_compile) 2>conftest.er1
12027   ac_status=$?
12028   grep -v '^ *+' conftest.er1 >conftest.err
12029   rm -f conftest.er1
12030   cat conftest.err >&5
12031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12032   (exit $ac_status); } &&
12033          { ac_try='test -z "$ac_c_werror_flag"
12034                          || test ! -s conftest.err'
12035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12036   (eval $ac_try) 2>&5
12037   ac_status=$?
12038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12039   (exit $ac_status); }; } &&
12040          { ac_try='test -s conftest.$ac_objext'
12041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12042   (eval $ac_try) 2>&5
12043   ac_status=$?
12044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12045   (exit $ac_status); }; }; then
12046   ac_cv_type_struct_fcred=yes
12047 else
12048   echo "$as_me: failed program was:" >&5
12049 sed 's/^/| /' conftest.$ac_ext >&5
12050
12051 ac_cv_type_struct_fcred=no
12052 fi
12053 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12054 fi
12055 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12056 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12057 if test $ac_cv_type_struct_fcred = yes; then
12058
12059 cat >>confdefs.h <<_ACEOF
12060 #define HAVE_STRUCT_FCRED 1
12061 _ACEOF
12062
12063
12064 fi
12065 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12066 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12067 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12068   echo $ECHO_N "(cached) $ECHO_C" >&6
12069 else
12070   cat >conftest.$ac_ext <<_ACEOF
12071 /* confdefs.h.  */
12072 _ACEOF
12073 cat confdefs.h >>conftest.$ac_ext
12074 cat >>conftest.$ac_ext <<_ACEOF
12075 /* end confdefs.h.  */
12076 #include <sys/param.h>
12077 #include <sys/types.h>
12078 #include <sys/socket.h>
12079 #include <sys/ucred.h>
12080
12081 int
12082 main ()
12083 {
12084 if ((struct sockcred *) 0)
12085   return 0;
12086 if (sizeof (struct sockcred))
12087   return 0;
12088   ;
12089   return 0;
12090 }
12091 _ACEOF
12092 rm -f conftest.$ac_objext
12093 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12094   (eval $ac_compile) 2>conftest.er1
12095   ac_status=$?
12096   grep -v '^ *+' conftest.er1 >conftest.err
12097   rm -f conftest.er1
12098   cat conftest.err >&5
12099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12100   (exit $ac_status); } &&
12101          { ac_try='test -z "$ac_c_werror_flag"
12102                          || test ! -s conftest.err'
12103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12104   (eval $ac_try) 2>&5
12105   ac_status=$?
12106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12107   (exit $ac_status); }; } &&
12108          { ac_try='test -s conftest.$ac_objext'
12109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12110   (eval $ac_try) 2>&5
12111   ac_status=$?
12112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113   (exit $ac_status); }; }; then
12114   ac_cv_type_struct_sockcred=yes
12115 else
12116   echo "$as_me: failed program was:" >&5
12117 sed 's/^/| /' conftest.$ac_ext >&5
12118
12119 ac_cv_type_struct_sockcred=no
12120 fi
12121 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12122 fi
12123 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12124 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12125 if test $ac_cv_type_struct_sockcred = yes; then
12126
12127 cat >>confdefs.h <<_ACEOF
12128 #define HAVE_STRUCT_SOCKCRED 1
12129 _ACEOF
12130
12131
12132 fi
12133
12134
12135 echo "$as_me:$LINENO: checking for struct option" >&5
12136 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12137 if test "${ac_cv_type_struct_option+set}" = set; then
12138   echo $ECHO_N "(cached) $ECHO_C" >&6
12139 else
12140   cat >conftest.$ac_ext <<_ACEOF
12141 /* confdefs.h.  */
12142 _ACEOF
12143 cat confdefs.h >>conftest.$ac_ext
12144 cat >>conftest.$ac_ext <<_ACEOF
12145 /* end confdefs.h.  */
12146 #ifdef HAVE_GETOPT_H
12147 #include <getopt.h>
12148 #endif
12149
12150 int
12151 main ()
12152 {
12153 if ((struct option *) 0)
12154   return 0;
12155 if (sizeof (struct option))
12156   return 0;
12157   ;
12158   return 0;
12159 }
12160 _ACEOF
12161 rm -f conftest.$ac_objext
12162 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12163   (eval $ac_compile) 2>conftest.er1
12164   ac_status=$?
12165   grep -v '^ *+' conftest.er1 >conftest.err
12166   rm -f conftest.er1
12167   cat conftest.err >&5
12168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12169   (exit $ac_status); } &&
12170          { ac_try='test -z "$ac_c_werror_flag"
12171                          || test ! -s conftest.err'
12172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12173   (eval $ac_try) 2>&5
12174   ac_status=$?
12175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12176   (exit $ac_status); }; } &&
12177          { ac_try='test -s conftest.$ac_objext'
12178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12179   (eval $ac_try) 2>&5
12180   ac_status=$?
12181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182   (exit $ac_status); }; }; then
12183   ac_cv_type_struct_option=yes
12184 else
12185   echo "$as_me: failed program was:" >&5
12186 sed 's/^/| /' conftest.$ac_ext >&5
12187
12188 ac_cv_type_struct_option=no
12189 fi
12190 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12191 fi
12192 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12193 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12194 if test $ac_cv_type_struct_option = yes; then
12195
12196 cat >>confdefs.h <<_ACEOF
12197 #define HAVE_STRUCT_OPTION 1
12198 _ACEOF
12199
12200
12201 fi
12202
12203
12204 if test "$with_zlib" = yes; then
12205   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12206   # did not).  While we could work around the lack of z_streamp, it
12207   # seems unwise to encourage people to use such old zlib versions...
12208   echo "$as_me:$LINENO: checking for z_streamp" >&5
12209 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12210 if test "${ac_cv_type_z_streamp+set}" = set; then
12211   echo $ECHO_N "(cached) $ECHO_C" >&6
12212 else
12213   cat >conftest.$ac_ext <<_ACEOF
12214 /* confdefs.h.  */
12215 _ACEOF
12216 cat confdefs.h >>conftest.$ac_ext
12217 cat >>conftest.$ac_ext <<_ACEOF
12218 /* end confdefs.h.  */
12219 #include <zlib.h>
12220
12221 int
12222 main ()
12223 {
12224 if ((z_streamp *) 0)
12225   return 0;
12226 if (sizeof (z_streamp))
12227   return 0;
12228   ;
12229   return 0;
12230 }
12231 _ACEOF
12232 rm -f conftest.$ac_objext
12233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12234   (eval $ac_compile) 2>conftest.er1
12235   ac_status=$?
12236   grep -v '^ *+' conftest.er1 >conftest.err
12237   rm -f conftest.er1
12238   cat conftest.err >&5
12239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12240   (exit $ac_status); } &&
12241          { ac_try='test -z "$ac_c_werror_flag"
12242                          || test ! -s conftest.err'
12243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12244   (eval $ac_try) 2>&5
12245   ac_status=$?
12246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12247   (exit $ac_status); }; } &&
12248          { ac_try='test -s conftest.$ac_objext'
12249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12250   (eval $ac_try) 2>&5
12251   ac_status=$?
12252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12253   (exit $ac_status); }; }; then
12254   ac_cv_type_z_streamp=yes
12255 else
12256   echo "$as_me: failed program was:" >&5
12257 sed 's/^/| /' conftest.$ac_ext >&5
12258
12259 ac_cv_type_z_streamp=no
12260 fi
12261 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12262 fi
12263 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12264 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12265 if test $ac_cv_type_z_streamp = yes; then
12266   :
12267 else
12268   { { echo "$as_me:$LINENO: error: zlib version is too old
12269 Use --without-zlib to disable zlib support." >&5
12270 echo "$as_me: error: zlib version is too old
12271 Use --without-zlib to disable zlib support." >&2;}
12272    { (exit 1); exit 1; }; }
12273 fi
12274
12275 fi
12276
12277 if test "$with_krb5" = yes; then
12278 # Check for differences between MIT and Heimdal (KTH) releases
12279   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12280 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12281 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12282   echo $ECHO_N "(cached) $ECHO_C" >&6
12283 else
12284   cat >conftest.$ac_ext <<_ACEOF
12285 /* confdefs.h.  */
12286 _ACEOF
12287 cat confdefs.h >>conftest.$ac_ext
12288 cat >>conftest.$ac_ext <<_ACEOF
12289 /* end confdefs.h.  */
12290 #include <krb5.h>
12291
12292 int
12293 main ()
12294 {
12295 static krb5_ticket ac_aggr;
12296 if (ac_aggr.enc_part2)
12297 return 0;
12298   ;
12299   return 0;
12300 }
12301 _ACEOF
12302 rm -f conftest.$ac_objext
12303 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12304   (eval $ac_compile) 2>conftest.er1
12305   ac_status=$?
12306   grep -v '^ *+' conftest.er1 >conftest.err
12307   rm -f conftest.er1
12308   cat conftest.err >&5
12309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12310   (exit $ac_status); } &&
12311          { ac_try='test -z "$ac_c_werror_flag"
12312                          || test ! -s conftest.err'
12313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12314   (eval $ac_try) 2>&5
12315   ac_status=$?
12316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12317   (exit $ac_status); }; } &&
12318          { ac_try='test -s conftest.$ac_objext'
12319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12320   (eval $ac_try) 2>&5
12321   ac_status=$?
12322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323   (exit $ac_status); }; }; then
12324   ac_cv_member_krb5_ticket_enc_part2=yes
12325 else
12326   echo "$as_me: failed program was:" >&5
12327 sed 's/^/| /' conftest.$ac_ext >&5
12328
12329 cat >conftest.$ac_ext <<_ACEOF
12330 /* confdefs.h.  */
12331 _ACEOF
12332 cat confdefs.h >>conftest.$ac_ext
12333 cat >>conftest.$ac_ext <<_ACEOF
12334 /* end confdefs.h.  */
12335 #include <krb5.h>
12336
12337 int
12338 main ()
12339 {
12340 static krb5_ticket ac_aggr;
12341 if (sizeof ac_aggr.enc_part2)
12342 return 0;
12343   ;
12344   return 0;
12345 }
12346 _ACEOF
12347 rm -f conftest.$ac_objext
12348 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12349   (eval $ac_compile) 2>conftest.er1
12350   ac_status=$?
12351   grep -v '^ *+' conftest.er1 >conftest.err
12352   rm -f conftest.er1
12353   cat conftest.err >&5
12354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12355   (exit $ac_status); } &&
12356          { ac_try='test -z "$ac_c_werror_flag"
12357                          || test ! -s conftest.err'
12358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12359   (eval $ac_try) 2>&5
12360   ac_status=$?
12361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12362   (exit $ac_status); }; } &&
12363          { ac_try='test -s conftest.$ac_objext'
12364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12365   (eval $ac_try) 2>&5
12366   ac_status=$?
12367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12368   (exit $ac_status); }; }; then
12369   ac_cv_member_krb5_ticket_enc_part2=yes
12370 else
12371   echo "$as_me: failed program was:" >&5
12372 sed 's/^/| /' conftest.$ac_ext >&5
12373
12374 ac_cv_member_krb5_ticket_enc_part2=no
12375 fi
12376 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12377 fi
12378 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12379 fi
12380 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12381 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12382 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12383
12384 cat >>confdefs.h <<_ACEOF
12385 #define HAVE_KRB5_TICKET_ENC_PART2 1
12386 _ACEOF
12387
12388
12389 else
12390   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12391 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12392 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12393   echo $ECHO_N "(cached) $ECHO_C" >&6
12394 else
12395   cat >conftest.$ac_ext <<_ACEOF
12396 /* confdefs.h.  */
12397 _ACEOF
12398 cat confdefs.h >>conftest.$ac_ext
12399 cat >>conftest.$ac_ext <<_ACEOF
12400 /* end confdefs.h.  */
12401 #include <krb5.h>
12402
12403 int
12404 main ()
12405 {
12406 static krb5_ticket ac_aggr;
12407 if (ac_aggr.client)
12408 return 0;
12409   ;
12410   return 0;
12411 }
12412 _ACEOF
12413 rm -f conftest.$ac_objext
12414 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12415   (eval $ac_compile) 2>conftest.er1
12416   ac_status=$?
12417   grep -v '^ *+' conftest.er1 >conftest.err
12418   rm -f conftest.er1
12419   cat conftest.err >&5
12420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12421   (exit $ac_status); } &&
12422          { ac_try='test -z "$ac_c_werror_flag"
12423                          || test ! -s conftest.err'
12424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12425   (eval $ac_try) 2>&5
12426   ac_status=$?
12427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12428   (exit $ac_status); }; } &&
12429          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
12435   ac_cv_member_krb5_ticket_client=yes
12436 else
12437   echo "$as_me: failed program was:" >&5
12438 sed 's/^/| /' conftest.$ac_ext >&5
12439
12440 cat >conftest.$ac_ext <<_ACEOF
12441 /* confdefs.h.  */
12442 _ACEOF
12443 cat confdefs.h >>conftest.$ac_ext
12444 cat >>conftest.$ac_ext <<_ACEOF
12445 /* end confdefs.h.  */
12446 #include <krb5.h>
12447
12448 int
12449 main ()
12450 {
12451 static krb5_ticket ac_aggr;
12452 if (sizeof ac_aggr.client)
12453 return 0;
12454   ;
12455   return 0;
12456 }
12457 _ACEOF
12458 rm -f conftest.$ac_objext
12459 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12460   (eval $ac_compile) 2>conftest.er1
12461   ac_status=$?
12462   grep -v '^ *+' conftest.er1 >conftest.err
12463   rm -f conftest.er1
12464   cat conftest.err >&5
12465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12466   (exit $ac_status); } &&
12467          { ac_try='test -z "$ac_c_werror_flag"
12468                          || test ! -s conftest.err'
12469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12470   (eval $ac_try) 2>&5
12471   ac_status=$?
12472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12473   (exit $ac_status); }; } &&
12474          { ac_try='test -s conftest.$ac_objext'
12475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12476   (eval $ac_try) 2>&5
12477   ac_status=$?
12478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12479   (exit $ac_status); }; }; then
12480   ac_cv_member_krb5_ticket_client=yes
12481 else
12482   echo "$as_me: failed program was:" >&5
12483 sed 's/^/| /' conftest.$ac_ext >&5
12484
12485 ac_cv_member_krb5_ticket_client=no
12486 fi
12487 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12488 fi
12489 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12490 fi
12491 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
12492 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
12493 if test $ac_cv_member_krb5_ticket_client = yes; then
12494
12495 cat >>confdefs.h <<_ACEOF
12496 #define HAVE_KRB5_TICKET_CLIENT 1
12497 _ACEOF
12498
12499
12500 else
12501   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
12502 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
12503    { (exit 1); exit 1; }; }
12504 fi
12505
12506 fi
12507
12508   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
12509 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
12510 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
12511   echo $ECHO_N "(cached) $ECHO_C" >&6
12512 else
12513   cat >conftest.$ac_ext <<_ACEOF
12514 /* confdefs.h.  */
12515 _ACEOF
12516 cat confdefs.h >>conftest.$ac_ext
12517 cat >>conftest.$ac_ext <<_ACEOF
12518 /* end confdefs.h.  */
12519 #include <krb5.h>
12520
12521 int
12522 main ()
12523 {
12524 static krb5_error ac_aggr;
12525 if (ac_aggr.text.data)
12526 return 0;
12527   ;
12528   return 0;
12529 }
12530 _ACEOF
12531 rm -f conftest.$ac_objext
12532 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12533   (eval $ac_compile) 2>conftest.er1
12534   ac_status=$?
12535   grep -v '^ *+' conftest.er1 >conftest.err
12536   rm -f conftest.er1
12537   cat conftest.err >&5
12538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12539   (exit $ac_status); } &&
12540          { ac_try='test -z "$ac_c_werror_flag"
12541                          || test ! -s conftest.err'
12542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12543   (eval $ac_try) 2>&5
12544   ac_status=$?
12545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546   (exit $ac_status); }; } &&
12547          { ac_try='test -s conftest.$ac_objext'
12548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12549   (eval $ac_try) 2>&5
12550   ac_status=$?
12551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552   (exit $ac_status); }; }; then
12553   ac_cv_member_krb5_error_text_data=yes
12554 else
12555   echo "$as_me: failed program was:" >&5
12556 sed 's/^/| /' conftest.$ac_ext >&5
12557
12558 cat >conftest.$ac_ext <<_ACEOF
12559 /* confdefs.h.  */
12560 _ACEOF
12561 cat confdefs.h >>conftest.$ac_ext
12562 cat >>conftest.$ac_ext <<_ACEOF
12563 /* end confdefs.h.  */
12564 #include <krb5.h>
12565
12566 int
12567 main ()
12568 {
12569 static krb5_error ac_aggr;
12570 if (sizeof ac_aggr.text.data)
12571 return 0;
12572   ;
12573   return 0;
12574 }
12575 _ACEOF
12576 rm -f conftest.$ac_objext
12577 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12578   (eval $ac_compile) 2>conftest.er1
12579   ac_status=$?
12580   grep -v '^ *+' conftest.er1 >conftest.err
12581   rm -f conftest.er1
12582   cat conftest.err >&5
12583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12584   (exit $ac_status); } &&
12585          { ac_try='test -z "$ac_c_werror_flag"
12586                          || test ! -s conftest.err'
12587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12588   (eval $ac_try) 2>&5
12589   ac_status=$?
12590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12591   (exit $ac_status); }; } &&
12592          { ac_try='test -s conftest.$ac_objext'
12593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12594   (eval $ac_try) 2>&5
12595   ac_status=$?
12596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12597   (exit $ac_status); }; }; then
12598   ac_cv_member_krb5_error_text_data=yes
12599 else
12600   echo "$as_me: failed program was:" >&5
12601 sed 's/^/| /' conftest.$ac_ext >&5
12602
12603 ac_cv_member_krb5_error_text_data=no
12604 fi
12605 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12606 fi
12607 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12608 fi
12609 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
12610 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
12611 if test $ac_cv_member_krb5_error_text_data = yes; then
12612
12613 cat >>confdefs.h <<_ACEOF
12614 #define HAVE_KRB5_ERROR_TEXT_DATA 1
12615 _ACEOF
12616
12617
12618 else
12619   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
12620 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
12621 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
12622   echo $ECHO_N "(cached) $ECHO_C" >&6
12623 else
12624   cat >conftest.$ac_ext <<_ACEOF
12625 /* confdefs.h.  */
12626 _ACEOF
12627 cat confdefs.h >>conftest.$ac_ext
12628 cat >>conftest.$ac_ext <<_ACEOF
12629 /* end confdefs.h.  */
12630 #include <krb5.h>
12631
12632 int
12633 main ()
12634 {
12635 static krb5_error ac_aggr;
12636 if (ac_aggr.e_data)
12637 return 0;
12638   ;
12639   return 0;
12640 }
12641 _ACEOF
12642 rm -f conftest.$ac_objext
12643 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12644   (eval $ac_compile) 2>conftest.er1
12645   ac_status=$?
12646   grep -v '^ *+' conftest.er1 >conftest.err
12647   rm -f conftest.er1
12648   cat conftest.err >&5
12649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12650   (exit $ac_status); } &&
12651          { ac_try='test -z "$ac_c_werror_flag"
12652                          || test ! -s conftest.err'
12653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12654   (eval $ac_try) 2>&5
12655   ac_status=$?
12656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12657   (exit $ac_status); }; } &&
12658          { ac_try='test -s conftest.$ac_objext'
12659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12660   (eval $ac_try) 2>&5
12661   ac_status=$?
12662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12663   (exit $ac_status); }; }; then
12664   ac_cv_member_krb5_error_e_data=yes
12665 else
12666   echo "$as_me: failed program was:" >&5
12667 sed 's/^/| /' conftest.$ac_ext >&5
12668
12669 cat >conftest.$ac_ext <<_ACEOF
12670 /* confdefs.h.  */
12671 _ACEOF
12672 cat confdefs.h >>conftest.$ac_ext
12673 cat >>conftest.$ac_ext <<_ACEOF
12674 /* end confdefs.h.  */
12675 #include <krb5.h>
12676
12677 int
12678 main ()
12679 {
12680 static krb5_error ac_aggr;
12681 if (sizeof ac_aggr.e_data)
12682 return 0;
12683   ;
12684   return 0;
12685 }
12686 _ACEOF
12687 rm -f conftest.$ac_objext
12688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12689   (eval $ac_compile) 2>conftest.er1
12690   ac_status=$?
12691   grep -v '^ *+' conftest.er1 >conftest.err
12692   rm -f conftest.er1
12693   cat conftest.err >&5
12694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695   (exit $ac_status); } &&
12696          { ac_try='test -z "$ac_c_werror_flag"
12697                          || test ! -s conftest.err'
12698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12699   (eval $ac_try) 2>&5
12700   ac_status=$?
12701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702   (exit $ac_status); }; } &&
12703          { ac_try='test -s conftest.$ac_objext'
12704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12705   (eval $ac_try) 2>&5
12706   ac_status=$?
12707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12708   (exit $ac_status); }; }; then
12709   ac_cv_member_krb5_error_e_data=yes
12710 else
12711   echo "$as_me: failed program was:" >&5
12712 sed 's/^/| /' conftest.$ac_ext >&5
12713
12714 ac_cv_member_krb5_error_e_data=no
12715 fi
12716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12717 fi
12718 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12719 fi
12720 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
12721 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
12722 if test $ac_cv_member_krb5_error_e_data = yes; then
12723
12724 cat >>confdefs.h <<_ACEOF
12725 #define HAVE_KRB5_ERROR_E_DATA 1
12726 _ACEOF
12727
12728
12729 else
12730   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
12731 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
12732    { (exit 1); exit 1; }; }
12733 fi
12734
12735 fi
12736
12737 fi
12738
12739
12740 ##
12741 ## Functions, global variables
12742 ##
12743
12744 echo "$as_me:$LINENO: checking for int timezone" >&5
12745 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
12746 if test "${pgac_cv_var_int_timezone+set}" = set; then
12747   echo $ECHO_N "(cached) $ECHO_C" >&6
12748 else
12749   cat >conftest.$ac_ext <<_ACEOF
12750 /* confdefs.h.  */
12751 _ACEOF
12752 cat confdefs.h >>conftest.$ac_ext
12753 cat >>conftest.$ac_ext <<_ACEOF
12754 /* end confdefs.h.  */
12755 #include <time.h>
12756 int res;
12757 int
12758 main ()
12759 {
12760 #ifndef __CYGWIN__
12761 res = timezone / 60;
12762 #else
12763 res = _timezone / 60;
12764 #endif
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 rm -f conftest.$ac_objext conftest$ac_exeext
12770 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12771   (eval $ac_link) 2>conftest.er1
12772   ac_status=$?
12773   grep -v '^ *+' conftest.er1 >conftest.err
12774   rm -f conftest.er1
12775   cat conftest.err >&5
12776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12777   (exit $ac_status); } &&
12778          { ac_try='test -z "$ac_c_werror_flag"
12779                          || test ! -s conftest.err'
12780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12781   (eval $ac_try) 2>&5
12782   ac_status=$?
12783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12784   (exit $ac_status); }; } &&
12785          { ac_try='test -s conftest$ac_exeext'
12786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12787   (eval $ac_try) 2>&5
12788   ac_status=$?
12789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12790   (exit $ac_status); }; }; then
12791   pgac_cv_var_int_timezone=yes
12792 else
12793   echo "$as_me: failed program was:" >&5
12794 sed 's/^/| /' conftest.$ac_ext >&5
12795
12796 pgac_cv_var_int_timezone=no
12797 fi
12798 rm -f conftest.err conftest.$ac_objext \
12799       conftest$ac_exeext conftest.$ac_ext
12800 fi
12801 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
12802 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
12803 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12804
12805 cat >>confdefs.h <<\_ACEOF
12806 #define HAVE_INT_TIMEZONE
12807 _ACEOF
12808
12809 fi
12810 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
12811 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
12812  if test "${ac_cv_func_accept_return+set}" = set; then
12813   echo $ECHO_N "(cached) $ECHO_C" >&6
12814 else
12815    if test "${ac_cv_func_accept_arg1+set}" = set; then
12816   echo $ECHO_N "(cached) $ECHO_C" >&6
12817 else
12818     if test "${ac_cv_func_accept_arg2+set}" = set; then
12819   echo $ECHO_N "(cached) $ECHO_C" >&6
12820 else
12821      if test "${ac_cv_func_accept_arg3+set}" = set; then
12822   echo $ECHO_N "(cached) $ECHO_C" >&6
12823 else
12824       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
12825       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
12826        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12827         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12828          cat >conftest.$ac_ext <<_ACEOF
12829 /* confdefs.h.  */
12830 _ACEOF
12831 cat confdefs.h >>conftest.$ac_ext
12832 cat >>conftest.$ac_ext <<_ACEOF
12833 /* end confdefs.h.  */
12834 #ifdef HAVE_SYS_TYPES_H
12835 #include <sys/types.h>
12836 #endif
12837 #ifdef HAVE_SYS_SOCKET_H
12838 #include <sys/socket.h>
12839 #endif
12840 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12841 int
12842 main ()
12843 {
12844
12845   ;
12846   return 0;
12847 }
12848 _ACEOF
12849 rm -f conftest.$ac_objext
12850 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12851   (eval $ac_compile) 2>conftest.er1
12852   ac_status=$?
12853   grep -v '^ *+' conftest.er1 >conftest.err
12854   rm -f conftest.er1
12855   cat conftest.err >&5
12856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12857   (exit $ac_status); } &&
12858          { ac_try='test -z "$ac_c_werror_flag"
12859                          || test ! -s conftest.err'
12860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12861   (eval $ac_try) 2>&5
12862   ac_status=$?
12863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12864   (exit $ac_status); }; } &&
12865          { ac_try='test -s conftest.$ac_objext'
12866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12867   (eval $ac_try) 2>&5
12868   ac_status=$?
12869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12870   (exit $ac_status); }; }; then
12871   ac_not_found=no; break 4
12872 else
12873   echo "$as_me: failed program was:" >&5
12874 sed 's/^/| /' conftest.$ac_ext >&5
12875
12876 ac_not_found=yes
12877 fi
12878 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12879        done
12880       done
12881      done
12882     done
12883     if test "$ac_not_found" = yes; then
12884       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
12885 echo "$as_me: error: could not determine argument types" >&2;}
12886    { (exit 1); exit 1; }; }
12887     fi
12888     if test "$ac_cv_func_accept_arg3" = "void"; then
12889       ac_cv_func_accept_arg3=int
12890     fi
12891
12892 fi
12893
12894 fi
12895
12896 fi
12897
12898 fi
12899  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
12900 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
12901
12902 cat >>confdefs.h <<_ACEOF
12903 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12904 _ACEOF
12905
12906
12907 cat >>confdefs.h <<_ACEOF
12908 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12909 _ACEOF
12910
12911
12912 cat >>confdefs.h <<_ACEOF
12913 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12914 _ACEOF
12915
12916
12917 cat >>confdefs.h <<_ACEOF
12918 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12919 _ACEOF
12920
12921
12922 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
12923 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
12924 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
12925   echo $ECHO_N "(cached) $ECHO_C" >&6
12926 else
12927   cat >conftest.$ac_ext <<_ACEOF
12928 /* confdefs.h.  */
12929 _ACEOF
12930 cat confdefs.h >>conftest.$ac_ext
12931 cat >>conftest.$ac_ext <<_ACEOF
12932 /* end confdefs.h.  */
12933 #include <sys/time.h>
12934 int
12935 main ()
12936 {
12937 struct timeval *tp;
12938 struct timezone *tzp;
12939 gettimeofday(tp,tzp);
12940   ;
12941   return 0;
12942 }
12943 _ACEOF
12944 rm -f conftest.$ac_objext
12945 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12946   (eval $ac_compile) 2>conftest.er1
12947   ac_status=$?
12948   grep -v '^ *+' conftest.er1 >conftest.err
12949   rm -f conftest.er1
12950   cat conftest.err >&5
12951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12952   (exit $ac_status); } &&
12953          { ac_try='test -z "$ac_c_werror_flag"
12954                          || test ! -s conftest.err'
12955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12956   (eval $ac_try) 2>&5
12957   ac_status=$?
12958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12959   (exit $ac_status); }; } &&
12960          { ac_try='test -s conftest.$ac_objext'
12961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12962   (eval $ac_try) 2>&5
12963   ac_status=$?
12964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12965   (exit $ac_status); }; }; then
12966   pgac_cv_func_gettimeofday_1arg=no
12967 else
12968   echo "$as_me: failed program was:" >&5
12969 sed 's/^/| /' conftest.$ac_ext >&5
12970
12971 pgac_cv_func_gettimeofday_1arg=yes
12972 fi
12973 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12974 fi
12975 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
12976 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
12977 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12978
12979 cat >>confdefs.h <<\_ACEOF
12980 #define GETTIMEOFDAY_1ARG
12981 _ACEOF
12982
12983 fi
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13007 do
13008 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13009 echo "$as_me:$LINENO: checking for $ac_func" >&5
13010 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13011 if eval "test \"\${$as_ac_var+set}\" = set"; then
13012   echo $ECHO_N "(cached) $ECHO_C" >&6
13013 else
13014   cat >conftest.$ac_ext <<_ACEOF
13015 /* confdefs.h.  */
13016 _ACEOF
13017 cat confdefs.h >>conftest.$ac_ext
13018 cat >>conftest.$ac_ext <<_ACEOF
13019 /* end confdefs.h.  */
13020 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13021    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13022 #define $ac_func innocuous_$ac_func
13023
13024 /* System header to define __stub macros and hopefully few prototypes,
13025     which can conflict with char $ac_func (); below.
13026     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13027     <limits.h> exists even on freestanding compilers.  */
13028
13029 #ifdef __STDC__
13030 # include <limits.h>
13031 #else
13032 # include <assert.h>
13033 #endif
13034
13035 #undef $ac_func
13036
13037 /* Override any gcc2 internal prototype to avoid an error.  */
13038 #ifdef __cplusplus
13039 extern "C"
13040 {
13041 #endif
13042 /* We use char because int might match the return type of a gcc2
13043    builtin and then its argument prototype would still apply.  */
13044 char $ac_func ();
13045 /* The GNU C library defines this for functions which it implements
13046     to always fail with ENOSYS.  Some functions are actually named
13047     something starting with __ and the normal name is an alias.  */
13048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13049 choke me
13050 #else
13051 char (*f) () = $ac_func;
13052 #endif
13053 #ifdef __cplusplus
13054 }
13055 #endif
13056
13057 int
13058 main ()
13059 {
13060 return f != $ac_func;
13061   ;
13062   return 0;
13063 }
13064 _ACEOF
13065 rm -f conftest.$ac_objext conftest$ac_exeext
13066 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13067   (eval $ac_link) 2>conftest.er1
13068   ac_status=$?
13069   grep -v '^ *+' conftest.er1 >conftest.err
13070   rm -f conftest.er1
13071   cat conftest.err >&5
13072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13073   (exit $ac_status); } &&
13074          { ac_try='test -z "$ac_c_werror_flag"
13075                          || test ! -s conftest.err'
13076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13077   (eval $ac_try) 2>&5
13078   ac_status=$?
13079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13080   (exit $ac_status); }; } &&
13081          { ac_try='test -s conftest$ac_exeext'
13082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13083   (eval $ac_try) 2>&5
13084   ac_status=$?
13085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13086   (exit $ac_status); }; }; then
13087   eval "$as_ac_var=yes"
13088 else
13089   echo "$as_me: failed program was:" >&5
13090 sed 's/^/| /' conftest.$ac_ext >&5
13091
13092 eval "$as_ac_var=no"
13093 fi
13094 rm -f conftest.err conftest.$ac_objext \
13095       conftest$ac_exeext conftest.$ac_ext
13096 fi
13097 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13098 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13099 if test `eval echo '${'$as_ac_var'}'` = yes; then
13100   cat >>confdefs.h <<_ACEOF
13101 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13102 _ACEOF
13103
13104 fi
13105 done
13106
13107
13108 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13109 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13110 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13111   echo $ECHO_N "(cached) $ECHO_C" >&6
13112 else
13113   cat >conftest.$ac_ext <<_ACEOF
13114 /* confdefs.h.  */
13115 _ACEOF
13116 cat confdefs.h >>conftest.$ac_ext
13117 cat >>conftest.$ac_ext <<_ACEOF
13118 /* end confdefs.h.  */
13119 #include <unistd.h>
13120
13121 int
13122 main ()
13123 {
13124 #ifndef fdatasync
13125   char *p = (char *) fdatasync;
13126 #endif
13127
13128   ;
13129   return 0;
13130 }
13131 _ACEOF
13132 rm -f conftest.$ac_objext
13133 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13134   (eval $ac_compile) 2>conftest.er1
13135   ac_status=$?
13136   grep -v '^ *+' conftest.er1 >conftest.err
13137   rm -f conftest.er1
13138   cat conftest.err >&5
13139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13140   (exit $ac_status); } &&
13141          { ac_try='test -z "$ac_c_werror_flag"
13142                          || test ! -s conftest.err'
13143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13144   (eval $ac_try) 2>&5
13145   ac_status=$?
13146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13147   (exit $ac_status); }; } &&
13148          { ac_try='test -s conftest.$ac_objext'
13149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13150   (eval $ac_try) 2>&5
13151   ac_status=$?
13152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13153   (exit $ac_status); }; }; then
13154   ac_cv_have_decl_fdatasync=yes
13155 else
13156   echo "$as_me: failed program was:" >&5
13157 sed 's/^/| /' conftest.$ac_ext >&5
13158
13159 ac_cv_have_decl_fdatasync=no
13160 fi
13161 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13162 fi
13163 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13164 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13165 if test $ac_cv_have_decl_fdatasync = yes; then
13166
13167 cat >>confdefs.h <<_ACEOF
13168 #define HAVE_DECL_FDATASYNC 1
13169 _ACEOF
13170
13171
13172 else
13173   cat >>confdefs.h <<_ACEOF
13174 #define HAVE_DECL_FDATASYNC 0
13175 _ACEOF
13176
13177
13178 fi
13179
13180
13181 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13182 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13183 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13184   echo $ECHO_N "(cached) $ECHO_C" >&6
13185 else
13186   cat >conftest.$ac_ext <<_ACEOF
13187 /* confdefs.h.  */
13188 _ACEOF
13189 cat confdefs.h >>conftest.$ac_ext
13190 cat >>conftest.$ac_ext <<_ACEOF
13191 /* end confdefs.h.  */
13192 #include <fcntl.h>
13193
13194 int
13195 main ()
13196 {
13197 #ifndef posix_fadvise
13198   char *p = (char *) posix_fadvise;
13199 #endif
13200
13201   ;
13202   return 0;
13203 }
13204 _ACEOF
13205 rm -f conftest.$ac_objext
13206 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13207   (eval $ac_compile) 2>conftest.er1
13208   ac_status=$?
13209   grep -v '^ *+' conftest.er1 >conftest.err
13210   rm -f conftest.er1
13211   cat conftest.err >&5
13212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13213   (exit $ac_status); } &&
13214          { ac_try='test -z "$ac_c_werror_flag"
13215                          || test ! -s conftest.err'
13216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13217   (eval $ac_try) 2>&5
13218   ac_status=$?
13219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13220   (exit $ac_status); }; } &&
13221          { ac_try='test -s conftest.$ac_objext'
13222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13223   (eval $ac_try) 2>&5
13224   ac_status=$?
13225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13226   (exit $ac_status); }; }; then
13227   ac_cv_have_decl_posix_fadvise=yes
13228 else
13229   echo "$as_me: failed program was:" >&5
13230 sed 's/^/| /' conftest.$ac_ext >&5
13231
13232 ac_cv_have_decl_posix_fadvise=no
13233 fi
13234 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13235 fi
13236 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
13237 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
13238 if test $ac_cv_have_decl_posix_fadvise = yes; then
13239
13240 cat >>confdefs.h <<_ACEOF
13241 #define HAVE_DECL_POSIX_FADVISE 1
13242 _ACEOF
13243
13244
13245 else
13246   cat >>confdefs.h <<_ACEOF
13247 #define HAVE_DECL_POSIX_FADVISE 0
13248 _ACEOF
13249
13250
13251 fi
13252
13253
13254 echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
13255 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6
13256 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
13257   echo $ECHO_N "(cached) $ECHO_C" >&6
13258 else
13259   cat >conftest.$ac_ext <<_ACEOF
13260 /* confdefs.h.  */
13261 _ACEOF
13262 cat confdefs.h >>conftest.$ac_ext
13263 cat >>conftest.$ac_ext <<_ACEOF
13264 /* end confdefs.h.  */
13265 $ac_includes_default
13266 int
13267 main ()
13268 {
13269 #ifndef strlcpy
13270   char *p = (char *) strlcpy;
13271 #endif
13272
13273   ;
13274   return 0;
13275 }
13276 _ACEOF
13277 rm -f conftest.$ac_objext
13278 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13279   (eval $ac_compile) 2>conftest.er1
13280   ac_status=$?
13281   grep -v '^ *+' conftest.er1 >conftest.err
13282   rm -f conftest.er1
13283   cat conftest.err >&5
13284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13285   (exit $ac_status); } &&
13286          { ac_try='test -z "$ac_c_werror_flag"
13287                          || test ! -s conftest.err'
13288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13289   (eval $ac_try) 2>&5
13290   ac_status=$?
13291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13292   (exit $ac_status); }; } &&
13293          { ac_try='test -s conftest.$ac_objext'
13294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13295   (eval $ac_try) 2>&5
13296   ac_status=$?
13297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13298   (exit $ac_status); }; }; then
13299   ac_cv_have_decl_strlcpy=yes
13300 else
13301   echo "$as_me: failed program was:" >&5
13302 sed 's/^/| /' conftest.$ac_ext >&5
13303
13304 ac_cv_have_decl_strlcpy=no
13305 fi
13306 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13307 fi
13308 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
13309 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6
13310 if test $ac_cv_have_decl_strlcpy = yes; then
13311
13312 cat >>confdefs.h <<_ACEOF
13313 #define HAVE_DECL_STRLCPY 1
13314 _ACEOF
13315
13316
13317 else
13318   cat >>confdefs.h <<_ACEOF
13319 #define HAVE_DECL_STRLCPY 0
13320 _ACEOF
13321
13322
13323 fi
13324
13325
13326 # This is probably only present on Darwin, but may as well check always
13327 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
13328 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
13329 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
13330   echo $ECHO_N "(cached) $ECHO_C" >&6
13331 else
13332   cat >conftest.$ac_ext <<_ACEOF
13333 /* confdefs.h.  */
13334 _ACEOF
13335 cat confdefs.h >>conftest.$ac_ext
13336 cat >>conftest.$ac_ext <<_ACEOF
13337 /* end confdefs.h.  */
13338 #include <fcntl.h>
13339
13340 int
13341 main ()
13342 {
13343 #ifndef F_FULLFSYNC
13344   char *p = (char *) F_FULLFSYNC;
13345 #endif
13346
13347   ;
13348   return 0;
13349 }
13350 _ACEOF
13351 rm -f conftest.$ac_objext
13352 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13353   (eval $ac_compile) 2>conftest.er1
13354   ac_status=$?
13355   grep -v '^ *+' conftest.er1 >conftest.err
13356   rm -f conftest.er1
13357   cat conftest.err >&5
13358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13359   (exit $ac_status); } &&
13360          { ac_try='test -z "$ac_c_werror_flag"
13361                          || test ! -s conftest.err'
13362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13363   (eval $ac_try) 2>&5
13364   ac_status=$?
13365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13366   (exit $ac_status); }; } &&
13367          { ac_try='test -s conftest.$ac_objext'
13368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13369   (eval $ac_try) 2>&5
13370   ac_status=$?
13371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13372   (exit $ac_status); }; }; then
13373   ac_cv_have_decl_F_FULLFSYNC=yes
13374 else
13375   echo "$as_me: failed program was:" >&5
13376 sed 's/^/| /' conftest.$ac_ext >&5
13377
13378 ac_cv_have_decl_F_FULLFSYNC=no
13379 fi
13380 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13381 fi
13382 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
13383 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
13384 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
13385
13386 cat >>confdefs.h <<_ACEOF
13387 #define HAVE_DECL_F_FULLFSYNC 1
13388 _ACEOF
13389
13390
13391 else
13392   cat >>confdefs.h <<_ACEOF
13393 #define HAVE_DECL_F_FULLFSYNC 0
13394 _ACEOF
13395
13396
13397 fi
13398
13399
13400
13401 HAVE_IPV6=no
13402 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13403 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13404 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13405   echo $ECHO_N "(cached) $ECHO_C" >&6
13406 else
13407   cat >conftest.$ac_ext <<_ACEOF
13408 /* confdefs.h.  */
13409 _ACEOF
13410 cat confdefs.h >>conftest.$ac_ext
13411 cat >>conftest.$ac_ext <<_ACEOF
13412 /* end confdefs.h.  */
13413 $ac_includes_default
13414 #include <netinet/in.h>
13415
13416 int
13417 main ()
13418 {
13419 if ((struct sockaddr_in6 *) 0)
13420   return 0;
13421 if (sizeof (struct sockaddr_in6))
13422   return 0;
13423   ;
13424   return 0;
13425 }
13426 _ACEOF
13427 rm -f conftest.$ac_objext
13428 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13429   (eval $ac_compile) 2>conftest.er1
13430   ac_status=$?
13431   grep -v '^ *+' conftest.er1 >conftest.err
13432   rm -f conftest.er1
13433   cat conftest.err >&5
13434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435   (exit $ac_status); } &&
13436          { ac_try='test -z "$ac_c_werror_flag"
13437                          || test ! -s conftest.err'
13438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13439   (eval $ac_try) 2>&5
13440   ac_status=$?
13441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13442   (exit $ac_status); }; } &&
13443          { ac_try='test -s conftest.$ac_objext'
13444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13445   (eval $ac_try) 2>&5
13446   ac_status=$?
13447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13448   (exit $ac_status); }; }; then
13449   ac_cv_type_struct_sockaddr_in6=yes
13450 else
13451   echo "$as_me: failed program was:" >&5
13452 sed 's/^/| /' conftest.$ac_ext >&5
13453
13454 ac_cv_type_struct_sockaddr_in6=no
13455 fi
13456 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13457 fi
13458 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13459 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13460 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13461
13462 cat >>confdefs.h <<\_ACEOF
13463 #define HAVE_IPV6 1
13464 _ACEOF
13465
13466          HAVE_IPV6=yes
13467 fi
13468
13469
13470
13471 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13472 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13473 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13474   echo $ECHO_N "(cached) $ECHO_C" >&6
13475 else
13476   cat >conftest.$ac_ext <<_ACEOF
13477 /* confdefs.h.  */
13478 _ACEOF
13479 cat confdefs.h >>conftest.$ac_ext
13480 cat >>conftest.$ac_ext <<_ACEOF
13481 /* end confdefs.h.  */
13482 #include <machine/vmparam.h>
13483 #include <sys/exec.h>
13484
13485 int
13486 main ()
13487 {
13488 PS_STRINGS->ps_nargvstr = 1;
13489 PS_STRINGS->ps_argvstr = "foo";
13490   ;
13491   return 0;
13492 }
13493 _ACEOF
13494 rm -f conftest.$ac_objext conftest$ac_exeext
13495 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13496   (eval $ac_link) 2>conftest.er1
13497   ac_status=$?
13498   grep -v '^ *+' conftest.er1 >conftest.err
13499   rm -f conftest.er1
13500   cat conftest.err >&5
13501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13502   (exit $ac_status); } &&
13503          { ac_try='test -z "$ac_c_werror_flag"
13504                          || test ! -s conftest.err'
13505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13506   (eval $ac_try) 2>&5
13507   ac_status=$?
13508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13509   (exit $ac_status); }; } &&
13510          { ac_try='test -s conftest$ac_exeext'
13511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13512   (eval $ac_try) 2>&5
13513   ac_status=$?
13514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515   (exit $ac_status); }; }; then
13516   pgac_cv_var_PS_STRINGS=yes
13517 else
13518   echo "$as_me: failed program was:" >&5
13519 sed 's/^/| /' conftest.$ac_ext >&5
13520
13521 pgac_cv_var_PS_STRINGS=no
13522 fi
13523 rm -f conftest.err conftest.$ac_objext \
13524       conftest$ac_exeext conftest.$ac_ext
13525 fi
13526 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13527 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13528 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13529
13530 cat >>confdefs.h <<\_ACEOF
13531 #define HAVE_PS_STRINGS
13532 _ACEOF
13533
13534 fi
13535
13536
13537 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13538 # is missing.  Yes, there are machines that have only one.  We may
13539 # also decide to use snprintf.c if snprintf() is present but does not
13540 # have all the features we need --- see below.
13541
13542 if test "$PORTNAME" = "win32"; then
13543   # Win32 gets snprintf.c built unconditionally.
13544   #
13545   # To properly translate all NLS languages strings, we must support the
13546   # *printf() %$ format, which allows *printf() arguments to be selected
13547   # by position in the translated string.
13548   #
13549   # libintl versions < 0.13 use the native *printf() functions, and Win32
13550   # *printf() doesn't understand %$, so we must use our /port versions,
13551   # which do understand %$. libintl versions >= 0.13 include their own
13552   # *printf versions on Win32.  The libintl 0.13 release note text is:
13553   #
13554   #   C format strings with positions, as they arise when a translator
13555   #   needs to reorder a sentence, are now supported on all platforms.
13556   #   On those few platforms (NetBSD and Woe32) for which the native
13557   #   printf()/fprintf()/... functions don't support such format
13558   #   strings, replacements are provided through <libintl.h>.
13559   #
13560   # We could use libintl >= 0.13's *printf() if we were sure that we had
13561   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13562   # to guarantee that, it is best to just use our own, so we are sure to
13563   # get %$ support. In include/port.h we disable the *printf() macros
13564   # that might have been defined by libintl.
13565   #
13566   # We do this unconditionally whether NLS is used or not so we are sure
13567   # that all Win32 libraries and binaries behave the same.
13568   pgac_need_repl_snprintf=yes
13569 else
13570   pgac_need_repl_snprintf=no
13571
13572 for ac_func in snprintf
13573 do
13574 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13575 echo "$as_me:$LINENO: checking for $ac_func" >&5
13576 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13577 if eval "test \"\${$as_ac_var+set}\" = set"; then
13578   echo $ECHO_N "(cached) $ECHO_C" >&6
13579 else
13580   cat >conftest.$ac_ext <<_ACEOF
13581 /* confdefs.h.  */
13582 _ACEOF
13583 cat confdefs.h >>conftest.$ac_ext
13584 cat >>conftest.$ac_ext <<_ACEOF
13585 /* end confdefs.h.  */
13586 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13587    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13588 #define $ac_func innocuous_$ac_func
13589
13590 /* System header to define __stub macros and hopefully few prototypes,
13591     which can conflict with char $ac_func (); below.
13592     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13593     <limits.h> exists even on freestanding compilers.  */
13594
13595 #ifdef __STDC__
13596 # include <limits.h>
13597 #else
13598 # include <assert.h>
13599 #endif
13600
13601 #undef $ac_func
13602
13603 /* Override any gcc2 internal prototype to avoid an error.  */
13604 #ifdef __cplusplus
13605 extern "C"
13606 {
13607 #endif
13608 /* We use char because int might match the return type of a gcc2
13609    builtin and then its argument prototype would still apply.  */
13610 char $ac_func ();
13611 /* The GNU C library defines this for functions which it implements
13612     to always fail with ENOSYS.  Some functions are actually named
13613     something starting with __ and the normal name is an alias.  */
13614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13615 choke me
13616 #else
13617 char (*f) () = $ac_func;
13618 #endif
13619 #ifdef __cplusplus
13620 }
13621 #endif
13622
13623 int
13624 main ()
13625 {
13626 return f != $ac_func;
13627   ;
13628   return 0;
13629 }
13630 _ACEOF
13631 rm -f conftest.$ac_objext conftest$ac_exeext
13632 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13633   (eval $ac_link) 2>conftest.er1
13634   ac_status=$?
13635   grep -v '^ *+' conftest.er1 >conftest.err
13636   rm -f conftest.er1
13637   cat conftest.err >&5
13638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13639   (exit $ac_status); } &&
13640          { ac_try='test -z "$ac_c_werror_flag"
13641                          || test ! -s conftest.err'
13642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13643   (eval $ac_try) 2>&5
13644   ac_status=$?
13645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13646   (exit $ac_status); }; } &&
13647          { ac_try='test -s conftest$ac_exeext'
13648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13649   (eval $ac_try) 2>&5
13650   ac_status=$?
13651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652   (exit $ac_status); }; }; then
13653   eval "$as_ac_var=yes"
13654 else
13655   echo "$as_me: failed program was:" >&5
13656 sed 's/^/| /' conftest.$ac_ext >&5
13657
13658 eval "$as_ac_var=no"
13659 fi
13660 rm -f conftest.err conftest.$ac_objext \
13661       conftest$ac_exeext conftest.$ac_ext
13662 fi
13663 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13664 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13665 if test `eval echo '${'$as_ac_var'}'` = yes; then
13666   cat >>confdefs.h <<_ACEOF
13667 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13668 _ACEOF
13669
13670 else
13671   pgac_need_repl_snprintf=yes
13672 fi
13673 done
13674
13675
13676 for ac_func in vsnprintf
13677 do
13678 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13679 echo "$as_me:$LINENO: checking for $ac_func" >&5
13680 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13681 if eval "test \"\${$as_ac_var+set}\" = set"; then
13682   echo $ECHO_N "(cached) $ECHO_C" >&6
13683 else
13684   cat >conftest.$ac_ext <<_ACEOF
13685 /* confdefs.h.  */
13686 _ACEOF
13687 cat confdefs.h >>conftest.$ac_ext
13688 cat >>conftest.$ac_ext <<_ACEOF
13689 /* end confdefs.h.  */
13690 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13691    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13692 #define $ac_func innocuous_$ac_func
13693
13694 /* System header to define __stub macros and hopefully few prototypes,
13695     which can conflict with char $ac_func (); below.
13696     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13697     <limits.h> exists even on freestanding compilers.  */
13698
13699 #ifdef __STDC__
13700 # include <limits.h>
13701 #else
13702 # include <assert.h>
13703 #endif
13704
13705 #undef $ac_func
13706
13707 /* Override any gcc2 internal prototype to avoid an error.  */
13708 #ifdef __cplusplus
13709 extern "C"
13710 {
13711 #endif
13712 /* We use char because int might match the return type of a gcc2
13713    builtin and then its argument prototype would still apply.  */
13714 char $ac_func ();
13715 /* The GNU C library defines this for functions which it implements
13716     to always fail with ENOSYS.  Some functions are actually named
13717     something starting with __ and the normal name is an alias.  */
13718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13719 choke me
13720 #else
13721 char (*f) () = $ac_func;
13722 #endif
13723 #ifdef __cplusplus
13724 }
13725 #endif
13726
13727 int
13728 main ()
13729 {
13730 return f != $ac_func;
13731   ;
13732   return 0;
13733 }
13734 _ACEOF
13735 rm -f conftest.$ac_objext conftest$ac_exeext
13736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13737   (eval $ac_link) 2>conftest.er1
13738   ac_status=$?
13739   grep -v '^ *+' conftest.er1 >conftest.err
13740   rm -f conftest.er1
13741   cat conftest.err >&5
13742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743   (exit $ac_status); } &&
13744          { ac_try='test -z "$ac_c_werror_flag"
13745                          || test ! -s conftest.err'
13746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13747   (eval $ac_try) 2>&5
13748   ac_status=$?
13749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13750   (exit $ac_status); }; } &&
13751          { ac_try='test -s conftest$ac_exeext'
13752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13753   (eval $ac_try) 2>&5
13754   ac_status=$?
13755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13756   (exit $ac_status); }; }; then
13757   eval "$as_ac_var=yes"
13758 else
13759   echo "$as_me: failed program was:" >&5
13760 sed 's/^/| /' conftest.$ac_ext >&5
13761
13762 eval "$as_ac_var=no"
13763 fi
13764 rm -f conftest.err conftest.$ac_objext \
13765       conftest$ac_exeext conftest.$ac_ext
13766 fi
13767 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13768 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13769 if test `eval echo '${'$as_ac_var'}'` = yes; then
13770   cat >>confdefs.h <<_ACEOF
13771 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13772 _ACEOF
13773
13774 else
13775   pgac_need_repl_snprintf=yes
13776 fi
13777 done
13778
13779 fi
13780
13781
13782 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13783 # include/c.h will provide declarations.  Note this is a separate test
13784 # from whether the functions exist in the C library --- there are
13785 # systems that have the functions but don't bother to declare them :-(
13786
13787 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13788 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
13789 if test "${ac_cv_have_decl_snprintf+set}" = set; then
13790   echo $ECHO_N "(cached) $ECHO_C" >&6
13791 else
13792   cat >conftest.$ac_ext <<_ACEOF
13793 /* confdefs.h.  */
13794 _ACEOF
13795 cat confdefs.h >>conftest.$ac_ext
13796 cat >>conftest.$ac_ext <<_ACEOF
13797 /* end confdefs.h.  */
13798 $ac_includes_default
13799 int
13800 main ()
13801 {
13802 #ifndef snprintf
13803   char *p = (char *) snprintf;
13804 #endif
13805
13806   ;
13807   return 0;
13808 }
13809 _ACEOF
13810 rm -f conftest.$ac_objext
13811 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13812   (eval $ac_compile) 2>conftest.er1
13813   ac_status=$?
13814   grep -v '^ *+' conftest.er1 >conftest.err
13815   rm -f conftest.er1
13816   cat conftest.err >&5
13817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13818   (exit $ac_status); } &&
13819          { ac_try='test -z "$ac_c_werror_flag"
13820                          || test ! -s conftest.err'
13821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13822   (eval $ac_try) 2>&5
13823   ac_status=$?
13824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13825   (exit $ac_status); }; } &&
13826          { ac_try='test -s conftest.$ac_objext'
13827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13828   (eval $ac_try) 2>&5
13829   ac_status=$?
13830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13831   (exit $ac_status); }; }; then
13832   ac_cv_have_decl_snprintf=yes
13833 else
13834   echo "$as_me: failed program was:" >&5
13835 sed 's/^/| /' conftest.$ac_ext >&5
13836
13837 ac_cv_have_decl_snprintf=no
13838 fi
13839 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13840 fi
13841 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13842 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
13843 if test $ac_cv_have_decl_snprintf = yes; then
13844
13845 cat >>confdefs.h <<_ACEOF
13846 #define HAVE_DECL_SNPRINTF 1
13847 _ACEOF
13848
13849
13850 else
13851   cat >>confdefs.h <<_ACEOF
13852 #define HAVE_DECL_SNPRINTF 0
13853 _ACEOF
13854
13855
13856 fi
13857 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13858 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
13859 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13860   echo $ECHO_N "(cached) $ECHO_C" >&6
13861 else
13862   cat >conftest.$ac_ext <<_ACEOF
13863 /* confdefs.h.  */
13864 _ACEOF
13865 cat confdefs.h >>conftest.$ac_ext
13866 cat >>conftest.$ac_ext <<_ACEOF
13867 /* end confdefs.h.  */
13868 $ac_includes_default
13869 int
13870 main ()
13871 {
13872 #ifndef vsnprintf
13873   char *p = (char *) vsnprintf;
13874 #endif
13875
13876   ;
13877   return 0;
13878 }
13879 _ACEOF
13880 rm -f conftest.$ac_objext
13881 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13882   (eval $ac_compile) 2>conftest.er1
13883   ac_status=$?
13884   grep -v '^ *+' conftest.er1 >conftest.err
13885   rm -f conftest.er1
13886   cat conftest.err >&5
13887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13888   (exit $ac_status); } &&
13889          { ac_try='test -z "$ac_c_werror_flag"
13890                          || test ! -s conftest.err'
13891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13892   (eval $ac_try) 2>&5
13893   ac_status=$?
13894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13895   (exit $ac_status); }; } &&
13896          { ac_try='test -s conftest.$ac_objext'
13897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13898   (eval $ac_try) 2>&5
13899   ac_status=$?
13900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13901   (exit $ac_status); }; }; then
13902   ac_cv_have_decl_vsnprintf=yes
13903 else
13904   echo "$as_me: failed program was:" >&5
13905 sed 's/^/| /' conftest.$ac_ext >&5
13906
13907 ac_cv_have_decl_vsnprintf=no
13908 fi
13909 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13910 fi
13911 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13912 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
13913 if test $ac_cv_have_decl_vsnprintf = yes; then
13914
13915 cat >>confdefs.h <<_ACEOF
13916 #define HAVE_DECL_VSNPRINTF 1
13917 _ACEOF
13918
13919
13920 else
13921   cat >>confdefs.h <<_ACEOF
13922 #define HAVE_DECL_VSNPRINTF 0
13923 _ACEOF
13924
13925
13926 fi
13927
13928
13929
13930
13931 echo "$as_me:$LINENO: checking for isinf" >&5
13932 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
13933 if test "${ac_cv_func_isinf+set}" = set; then
13934   echo $ECHO_N "(cached) $ECHO_C" >&6
13935 else
13936   cat >conftest.$ac_ext <<_ACEOF
13937 /* confdefs.h.  */
13938 _ACEOF
13939 cat confdefs.h >>conftest.$ac_ext
13940 cat >>conftest.$ac_ext <<_ACEOF
13941 /* end confdefs.h.  */
13942
13943 #include <math.h>
13944 double glob_double;
13945
13946 int
13947 main ()
13948 {
13949 return isinf(glob_double) ? 0 : 1;
13950   ;
13951   return 0;
13952 }
13953 _ACEOF
13954 rm -f conftest.$ac_objext conftest$ac_exeext
13955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13956   (eval $ac_link) 2>conftest.er1
13957   ac_status=$?
13958   grep -v '^ *+' conftest.er1 >conftest.err
13959   rm -f conftest.er1
13960   cat conftest.err >&5
13961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13962   (exit $ac_status); } &&
13963          { ac_try='test -z "$ac_c_werror_flag"
13964                          || test ! -s conftest.err'
13965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13966   (eval $ac_try) 2>&5
13967   ac_status=$?
13968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13969   (exit $ac_status); }; } &&
13970          { ac_try='test -s conftest$ac_exeext'
13971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13972   (eval $ac_try) 2>&5
13973   ac_status=$?
13974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975   (exit $ac_status); }; }; then
13976   ac_cv_func_isinf=yes
13977 else
13978   echo "$as_me: failed program was:" >&5
13979 sed 's/^/| /' conftest.$ac_ext >&5
13980
13981 ac_cv_func_isinf=no
13982 fi
13983 rm -f conftest.err conftest.$ac_objext \
13984       conftest$ac_exeext conftest.$ac_ext
13985 fi
13986 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
13987 echo "${ECHO_T}$ac_cv_func_isinf" >&6
13988
13989 if test $ac_cv_func_isinf = yes ; then
13990
13991 cat >>confdefs.h <<\_ACEOF
13992 #define HAVE_ISINF 1
13993 _ACEOF
13994
13995 else
13996   case $LIBOBJS in
13997     "isinf.$ac_objext"   | \
13998   *" isinf.$ac_objext"   | \
13999     "isinf.$ac_objext "* | \
14000   *" isinf.$ac_objext "* ) ;;
14001   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14002 esac
14003
14004   # Look for a way to implement a substitute for isinf()
14005
14006
14007
14008
14009 for ac_func in fpclass fp_class fp_class_d class
14010 do
14011 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14012 echo "$as_me:$LINENO: checking for $ac_func" >&5
14013 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14014 if eval "test \"\${$as_ac_var+set}\" = set"; then
14015   echo $ECHO_N "(cached) $ECHO_C" >&6
14016 else
14017   cat >conftest.$ac_ext <<_ACEOF
14018 /* confdefs.h.  */
14019 _ACEOF
14020 cat confdefs.h >>conftest.$ac_ext
14021 cat >>conftest.$ac_ext <<_ACEOF
14022 /* end confdefs.h.  */
14023 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14024    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14025 #define $ac_func innocuous_$ac_func
14026
14027 /* System header to define __stub macros and hopefully few prototypes,
14028     which can conflict with char $ac_func (); below.
14029     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14030     <limits.h> exists even on freestanding compilers.  */
14031
14032 #ifdef __STDC__
14033 # include <limits.h>
14034 #else
14035 # include <assert.h>
14036 #endif
14037
14038 #undef $ac_func
14039
14040 /* Override any gcc2 internal prototype to avoid an error.  */
14041 #ifdef __cplusplus
14042 extern "C"
14043 {
14044 #endif
14045 /* We use char because int might match the return type of a gcc2
14046    builtin and then its argument prototype would still apply.  */
14047 char $ac_func ();
14048 /* The GNU C library defines this for functions which it implements
14049     to always fail with ENOSYS.  Some functions are actually named
14050     something starting with __ and the normal name is an alias.  */
14051 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14052 choke me
14053 #else
14054 char (*f) () = $ac_func;
14055 #endif
14056 #ifdef __cplusplus
14057 }
14058 #endif
14059
14060 int
14061 main ()
14062 {
14063 return f != $ac_func;
14064   ;
14065   return 0;
14066 }
14067 _ACEOF
14068 rm -f conftest.$ac_objext conftest$ac_exeext
14069 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14070   (eval $ac_link) 2>conftest.er1
14071   ac_status=$?
14072   grep -v '^ *+' conftest.er1 >conftest.err
14073   rm -f conftest.er1
14074   cat conftest.err >&5
14075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14076   (exit $ac_status); } &&
14077          { ac_try='test -z "$ac_c_werror_flag"
14078                          || test ! -s conftest.err'
14079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14080   (eval $ac_try) 2>&5
14081   ac_status=$?
14082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14083   (exit $ac_status); }; } &&
14084          { ac_try='test -s conftest$ac_exeext'
14085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14086   (eval $ac_try) 2>&5
14087   ac_status=$?
14088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14089   (exit $ac_status); }; }; then
14090   eval "$as_ac_var=yes"
14091 else
14092   echo "$as_me: failed program was:" >&5
14093 sed 's/^/| /' conftest.$ac_ext >&5
14094
14095 eval "$as_ac_var=no"
14096 fi
14097 rm -f conftest.err conftest.$ac_objext \
14098       conftest$ac_exeext conftest.$ac_ext
14099 fi
14100 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14101 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14102 if test `eval echo '${'$as_ac_var'}'` = yes; then
14103   cat >>confdefs.h <<_ACEOF
14104 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14105 _ACEOF
14106  break
14107 fi
14108 done
14109
14110 fi
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strlcpy strtol strtoul unsetenv
14127 do
14128 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14129 echo "$as_me:$LINENO: checking for $ac_func" >&5
14130 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14131 if eval "test \"\${$as_ac_var+set}\" = set"; then
14132   echo $ECHO_N "(cached) $ECHO_C" >&6
14133 else
14134   cat >conftest.$ac_ext <<_ACEOF
14135 /* confdefs.h.  */
14136 _ACEOF
14137 cat confdefs.h >>conftest.$ac_ext
14138 cat >>conftest.$ac_ext <<_ACEOF
14139 /* end confdefs.h.  */
14140 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14141    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14142 #define $ac_func innocuous_$ac_func
14143
14144 /* System header to define __stub macros and hopefully few prototypes,
14145     which can conflict with char $ac_func (); below.
14146     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14147     <limits.h> exists even on freestanding compilers.  */
14148
14149 #ifdef __STDC__
14150 # include <limits.h>
14151 #else
14152 # include <assert.h>
14153 #endif
14154
14155 #undef $ac_func
14156
14157 /* Override any gcc2 internal prototype to avoid an error.  */
14158 #ifdef __cplusplus
14159 extern "C"
14160 {
14161 #endif
14162 /* We use char because int might match the return type of a gcc2
14163    builtin and then its argument prototype would still apply.  */
14164 char $ac_func ();
14165 /* The GNU C library defines this for functions which it implements
14166     to always fail with ENOSYS.  Some functions are actually named
14167     something starting with __ and the normal name is an alias.  */
14168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14169 choke me
14170 #else
14171 char (*f) () = $ac_func;
14172 #endif
14173 #ifdef __cplusplus
14174 }
14175 #endif
14176
14177 int
14178 main ()
14179 {
14180 return f != $ac_func;
14181   ;
14182   return 0;
14183 }
14184 _ACEOF
14185 rm -f conftest.$ac_objext conftest$ac_exeext
14186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14187   (eval $ac_link) 2>conftest.er1
14188   ac_status=$?
14189   grep -v '^ *+' conftest.er1 >conftest.err
14190   rm -f conftest.er1
14191   cat conftest.err >&5
14192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14193   (exit $ac_status); } &&
14194          { ac_try='test -z "$ac_c_werror_flag"
14195                          || test ! -s conftest.err'
14196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14197   (eval $ac_try) 2>&5
14198   ac_status=$?
14199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14200   (exit $ac_status); }; } &&
14201          { ac_try='test -s conftest$ac_exeext'
14202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14203   (eval $ac_try) 2>&5
14204   ac_status=$?
14205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14206   (exit $ac_status); }; }; then
14207   eval "$as_ac_var=yes"
14208 else
14209   echo "$as_me: failed program was:" >&5
14210 sed 's/^/| /' conftest.$ac_ext >&5
14211
14212 eval "$as_ac_var=no"
14213 fi
14214 rm -f conftest.err conftest.$ac_objext \
14215       conftest$ac_exeext conftest.$ac_ext
14216 fi
14217 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14218 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14219 if test `eval echo '${'$as_ac_var'}'` = yes; then
14220   cat >>confdefs.h <<_ACEOF
14221 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14222 _ACEOF
14223
14224 else
14225   case $LIBOBJS in
14226     "$ac_func.$ac_objext"   | \
14227   *" $ac_func.$ac_objext"   | \
14228     "$ac_func.$ac_objext "* | \
14229   *" $ac_func.$ac_objext "* ) ;;
14230   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14231 esac
14232
14233 fi
14234 done
14235
14236
14237
14238 # System's version of getaddrinfo(), if any, may be used only if we found
14239 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14240 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14241 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14242 # because we want to use our own getaddrinfo.c on Windows anyway.)
14243 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14244
14245 for ac_func in getaddrinfo
14246 do
14247 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14248 echo "$as_me:$LINENO: checking for $ac_func" >&5
14249 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14250 if eval "test \"\${$as_ac_var+set}\" = set"; then
14251   echo $ECHO_N "(cached) $ECHO_C" >&6
14252 else
14253   cat >conftest.$ac_ext <<_ACEOF
14254 /* confdefs.h.  */
14255 _ACEOF
14256 cat confdefs.h >>conftest.$ac_ext
14257 cat >>conftest.$ac_ext <<_ACEOF
14258 /* end confdefs.h.  */
14259 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14260    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14261 #define $ac_func innocuous_$ac_func
14262
14263 /* System header to define __stub macros and hopefully few prototypes,
14264     which can conflict with char $ac_func (); below.
14265     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14266     <limits.h> exists even on freestanding compilers.  */
14267
14268 #ifdef __STDC__
14269 # include <limits.h>
14270 #else
14271 # include <assert.h>
14272 #endif
14273
14274 #undef $ac_func
14275
14276 /* Override any gcc2 internal prototype to avoid an error.  */
14277 #ifdef __cplusplus
14278 extern "C"
14279 {
14280 #endif
14281 /* We use char because int might match the return type of a gcc2
14282    builtin and then its argument prototype would still apply.  */
14283 char $ac_func ();
14284 /* The GNU C library defines this for functions which it implements
14285     to always fail with ENOSYS.  Some functions are actually named
14286     something starting with __ and the normal name is an alias.  */
14287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14288 choke me
14289 #else
14290 char (*f) () = $ac_func;
14291 #endif
14292 #ifdef __cplusplus
14293 }
14294 #endif
14295
14296 int
14297 main ()
14298 {
14299 return f != $ac_func;
14300   ;
14301   return 0;
14302 }
14303 _ACEOF
14304 rm -f conftest.$ac_objext conftest$ac_exeext
14305 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14306   (eval $ac_link) 2>conftest.er1
14307   ac_status=$?
14308   grep -v '^ *+' conftest.er1 >conftest.err
14309   rm -f conftest.er1
14310   cat conftest.err >&5
14311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14312   (exit $ac_status); } &&
14313          { ac_try='test -z "$ac_c_werror_flag"
14314                          || test ! -s conftest.err'
14315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14316   (eval $ac_try) 2>&5
14317   ac_status=$?
14318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14319   (exit $ac_status); }; } &&
14320          { ac_try='test -s conftest$ac_exeext'
14321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14322   (eval $ac_try) 2>&5
14323   ac_status=$?
14324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14325   (exit $ac_status); }; }; then
14326   eval "$as_ac_var=yes"
14327 else
14328   echo "$as_me: failed program was:" >&5
14329 sed 's/^/| /' conftest.$ac_ext >&5
14330
14331 eval "$as_ac_var=no"
14332 fi
14333 rm -f conftest.err conftest.$ac_objext \
14334       conftest$ac_exeext conftest.$ac_ext
14335 fi
14336 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14337 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14338 if test `eval echo '${'$as_ac_var'}'` = yes; then
14339   cat >>confdefs.h <<_ACEOF
14340 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14341 _ACEOF
14342
14343 else
14344   case $LIBOBJS in
14345     "$ac_func.$ac_objext"   | \
14346   *" $ac_func.$ac_objext"   | \
14347     "$ac_func.$ac_objext "* | \
14348   *" $ac_func.$ac_objext "* ) ;;
14349   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14350 esac
14351
14352 fi
14353 done
14354
14355
14356 else
14357   case $LIBOBJS in
14358     "getaddrinfo.$ac_objext"   | \
14359   *" getaddrinfo.$ac_objext"   | \
14360     "getaddrinfo.$ac_objext "* | \
14361   *" getaddrinfo.$ac_objext "* ) ;;
14362   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14363 esac
14364
14365 fi
14366
14367 # similarly, use system's getopt_long() only if system provides struct option.
14368 if test x"$ac_cv_type_struct_option" = xyes ; then
14369
14370 for ac_func in getopt_long
14371 do
14372 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14373 echo "$as_me:$LINENO: checking for $ac_func" >&5
14374 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14375 if eval "test \"\${$as_ac_var+set}\" = set"; then
14376   echo $ECHO_N "(cached) $ECHO_C" >&6
14377 else
14378   cat >conftest.$ac_ext <<_ACEOF
14379 /* confdefs.h.  */
14380 _ACEOF
14381 cat confdefs.h >>conftest.$ac_ext
14382 cat >>conftest.$ac_ext <<_ACEOF
14383 /* end confdefs.h.  */
14384 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14385    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14386 #define $ac_func innocuous_$ac_func
14387
14388 /* System header to define __stub macros and hopefully few prototypes,
14389     which can conflict with char $ac_func (); below.
14390     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14391     <limits.h> exists even on freestanding compilers.  */
14392
14393 #ifdef __STDC__
14394 # include <limits.h>
14395 #else
14396 # include <assert.h>
14397 #endif
14398
14399 #undef $ac_func
14400
14401 /* Override any gcc2 internal prototype to avoid an error.  */
14402 #ifdef __cplusplus
14403 extern "C"
14404 {
14405 #endif
14406 /* We use char because int might match the return type of a gcc2
14407    builtin and then its argument prototype would still apply.  */
14408 char $ac_func ();
14409 /* The GNU C library defines this for functions which it implements
14410     to always fail with ENOSYS.  Some functions are actually named
14411     something starting with __ and the normal name is an alias.  */
14412 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14413 choke me
14414 #else
14415 char (*f) () = $ac_func;
14416 #endif
14417 #ifdef __cplusplus
14418 }
14419 #endif
14420
14421 int
14422 main ()
14423 {
14424 return f != $ac_func;
14425   ;
14426   return 0;
14427 }
14428 _ACEOF
14429 rm -f conftest.$ac_objext conftest$ac_exeext
14430 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14431   (eval $ac_link) 2>conftest.er1
14432   ac_status=$?
14433   grep -v '^ *+' conftest.er1 >conftest.err
14434   rm -f conftest.er1
14435   cat conftest.err >&5
14436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14437   (exit $ac_status); } &&
14438          { ac_try='test -z "$ac_c_werror_flag"
14439                          || test ! -s conftest.err'
14440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14441   (eval $ac_try) 2>&5
14442   ac_status=$?
14443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14444   (exit $ac_status); }; } &&
14445          { ac_try='test -s conftest$ac_exeext'
14446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14447   (eval $ac_try) 2>&5
14448   ac_status=$?
14449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14450   (exit $ac_status); }; }; then
14451   eval "$as_ac_var=yes"
14452 else
14453   echo "$as_me: failed program was:" >&5
14454 sed 's/^/| /' conftest.$ac_ext >&5
14455
14456 eval "$as_ac_var=no"
14457 fi
14458 rm -f conftest.err conftest.$ac_objext \
14459       conftest$ac_exeext conftest.$ac_ext
14460 fi
14461 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14462 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14463 if test `eval echo '${'$as_ac_var'}'` = yes; then
14464   cat >>confdefs.h <<_ACEOF
14465 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14466 _ACEOF
14467
14468 else
14469   case $LIBOBJS in
14470     "$ac_func.$ac_objext"   | \
14471   *" $ac_func.$ac_objext"   | \
14472     "$ac_func.$ac_objext "* | \
14473   *" $ac_func.$ac_objext "* ) ;;
14474   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14475 esac
14476
14477 fi
14478 done
14479
14480
14481 else
14482   case $LIBOBJS in
14483     "getopt_long.$ac_objext"   | \
14484   *" getopt_long.$ac_objext"   | \
14485     "getopt_long.$ac_objext "* | \
14486   *" getopt_long.$ac_objext "* ) ;;
14487   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14488 esac
14489
14490 fi
14491
14492 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14493 # We override the previous test that said fseeko/ftello didn't exist
14494 # OS tests are also done in include/c.h and port/fseeko.c
14495 case $host_os in bsdi*|netbsd*)
14496 ac_cv_func_fseeko=yes
14497 esac
14498
14499 # Win32 support
14500 if test "$PORTNAME" = "win32"; then
14501 case $LIBOBJS in
14502     "gettimeofday.$ac_objext"   | \
14503   *" gettimeofday.$ac_objext"   | \
14504     "gettimeofday.$ac_objext "* | \
14505   *" gettimeofday.$ac_objext "* ) ;;
14506   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14507 esac
14508
14509 case $LIBOBJS in
14510     "kill.$ac_objext"   | \
14511   *" kill.$ac_objext"   | \
14512     "kill.$ac_objext "* | \
14513   *" kill.$ac_objext "* ) ;;
14514   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14515 esac
14516
14517 case $LIBOBJS in
14518     "open.$ac_objext"   | \
14519   *" open.$ac_objext"   | \
14520     "open.$ac_objext "* | \
14521   *" open.$ac_objext "* ) ;;
14522   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14523 esac
14524
14525 case $LIBOBJS in
14526     "rand.$ac_objext"   | \
14527   *" rand.$ac_objext"   | \
14528     "rand.$ac_objext "* | \
14529   *" rand.$ac_objext "* ) ;;
14530   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14531 esac
14532
14533 case $LIBOBJS in
14534     "win32error.$ac_objext"   | \
14535   *" win32error.$ac_objext"   | \
14536     "win32error.$ac_objext "* | \
14537   *" win32error.$ac_objext "* ) ;;
14538   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
14539 esac
14540
14541
14542 cat >>confdefs.h <<\_ACEOF
14543 #define HAVE_SYMLINK 1
14544 _ACEOF
14545
14546 fi
14547
14548 if test "$with_readline" = yes; then
14549   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
14550 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
14551 cat >conftest.$ac_ext <<_ACEOF
14552 /* confdefs.h.  */
14553 _ACEOF
14554 cat confdefs.h >>conftest.$ac_ext
14555 cat >>conftest.$ac_ext <<_ACEOF
14556 /* end confdefs.h.  */
14557 #include <stdio.h>
14558 #ifdef HAVE_READLINE_READLINE_H
14559 # include <readline/readline.h>
14560 #elif defined(HAVE_READLINE_H)
14561 # include <readline.h>
14562 #endif
14563
14564 int
14565 main ()
14566 {
14567 rl_completion_append_character = 'x';
14568   ;
14569   return 0;
14570 }
14571 _ACEOF
14572 rm -f conftest.$ac_objext conftest$ac_exeext
14573 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14574   (eval $ac_link) 2>conftest.er1
14575   ac_status=$?
14576   grep -v '^ *+' conftest.er1 >conftest.err
14577   rm -f conftest.er1
14578   cat conftest.err >&5
14579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14580   (exit $ac_status); } &&
14581          { ac_try='test -z "$ac_c_werror_flag"
14582                          || test ! -s conftest.err'
14583   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14584   (eval $ac_try) 2>&5
14585   ac_status=$?
14586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14587   (exit $ac_status); }; } &&
14588          { ac_try='test -s conftest$ac_exeext'
14589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14590   (eval $ac_try) 2>&5
14591   ac_status=$?
14592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14593   (exit $ac_status); }; }; then
14594   echo "$as_me:$LINENO: result: yes" >&5
14595 echo "${ECHO_T}yes" >&6
14596
14597 cat >>confdefs.h <<\_ACEOF
14598 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
14599 _ACEOF
14600
14601 else
14602   echo "$as_me: failed program was:" >&5
14603 sed 's/^/| /' conftest.$ac_ext >&5
14604
14605 echo "$as_me:$LINENO: result: no" >&5
14606 echo "${ECHO_T}no" >&6
14607 fi
14608 rm -f conftest.err conftest.$ac_objext \
14609       conftest$ac_exeext conftest.$ac_ext
14610
14611
14612 for ac_func in rl_completion_matches rl_filename_completion_function
14613 do
14614 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14615 echo "$as_me:$LINENO: checking for $ac_func" >&5
14616 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14617 if eval "test \"\${$as_ac_var+set}\" = set"; then
14618   echo $ECHO_N "(cached) $ECHO_C" >&6
14619 else
14620   cat >conftest.$ac_ext <<_ACEOF
14621 /* confdefs.h.  */
14622 _ACEOF
14623 cat confdefs.h >>conftest.$ac_ext
14624 cat >>conftest.$ac_ext <<_ACEOF
14625 /* end confdefs.h.  */
14626 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14627    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14628 #define $ac_func innocuous_$ac_func
14629
14630 /* System header to define __stub macros and hopefully few prototypes,
14631     which can conflict with char $ac_func (); below.
14632     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14633     <limits.h> exists even on freestanding compilers.  */
14634
14635 #ifdef __STDC__
14636 # include <limits.h>
14637 #else
14638 # include <assert.h>
14639 #endif
14640
14641 #undef $ac_func
14642
14643 /* Override any gcc2 internal prototype to avoid an error.  */
14644 #ifdef __cplusplus
14645 extern "C"
14646 {
14647 #endif
14648 /* We use char because int might match the return type of a gcc2
14649    builtin and then its argument prototype would still apply.  */
14650 char $ac_func ();
14651 /* The GNU C library defines this for functions which it implements
14652     to always fail with ENOSYS.  Some functions are actually named
14653     something starting with __ and the normal name is an alias.  */
14654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14655 choke me
14656 #else
14657 char (*f) () = $ac_func;
14658 #endif
14659 #ifdef __cplusplus
14660 }
14661 #endif
14662
14663 int
14664 main ()
14665 {
14666 return f != $ac_func;
14667   ;
14668   return 0;
14669 }
14670 _ACEOF
14671 rm -f conftest.$ac_objext conftest$ac_exeext
14672 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14673   (eval $ac_link) 2>conftest.er1
14674   ac_status=$?
14675   grep -v '^ *+' conftest.er1 >conftest.err
14676   rm -f conftest.er1
14677   cat conftest.err >&5
14678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14679   (exit $ac_status); } &&
14680          { ac_try='test -z "$ac_c_werror_flag"
14681                          || test ! -s conftest.err'
14682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14683   (eval $ac_try) 2>&5
14684   ac_status=$?
14685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14686   (exit $ac_status); }; } &&
14687          { ac_try='test -s conftest$ac_exeext'
14688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14689   (eval $ac_try) 2>&5
14690   ac_status=$?
14691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14692   (exit $ac_status); }; }; then
14693   eval "$as_ac_var=yes"
14694 else
14695   echo "$as_me: failed program was:" >&5
14696 sed 's/^/| /' conftest.$ac_ext >&5
14697
14698 eval "$as_ac_var=no"
14699 fi
14700 rm -f conftest.err conftest.$ac_objext \
14701       conftest$ac_exeext conftest.$ac_ext
14702 fi
14703 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14704 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14705 if test `eval echo '${'$as_ac_var'}'` = yes; then
14706   cat >>confdefs.h <<_ACEOF
14707 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14708 _ACEOF
14709
14710 fi
14711 done
14712
14713
14714 for ac_func in replace_history_entry
14715 do
14716 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14717 echo "$as_me:$LINENO: checking for $ac_func" >&5
14718 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14719 if eval "test \"\${$as_ac_var+set}\" = set"; then
14720   echo $ECHO_N "(cached) $ECHO_C" >&6
14721 else
14722   cat >conftest.$ac_ext <<_ACEOF
14723 /* confdefs.h.  */
14724 _ACEOF
14725 cat confdefs.h >>conftest.$ac_ext
14726 cat >>conftest.$ac_ext <<_ACEOF
14727 /* end confdefs.h.  */
14728 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14729    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14730 #define $ac_func innocuous_$ac_func
14731
14732 /* System header to define __stub macros and hopefully few prototypes,
14733     which can conflict with char $ac_func (); below.
14734     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14735     <limits.h> exists even on freestanding compilers.  */
14736
14737 #ifdef __STDC__
14738 # include <limits.h>
14739 #else
14740 # include <assert.h>
14741 #endif
14742
14743 #undef $ac_func
14744
14745 /* Override any gcc2 internal prototype to avoid an error.  */
14746 #ifdef __cplusplus
14747 extern "C"
14748 {
14749 #endif
14750 /* We use char because int might match the return type of a gcc2
14751    builtin and then its argument prototype would still apply.  */
14752 char $ac_func ();
14753 /* The GNU C library defines this for functions which it implements
14754     to always fail with ENOSYS.  Some functions are actually named
14755     something starting with __ and the normal name is an alias.  */
14756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14757 choke me
14758 #else
14759 char (*f) () = $ac_func;
14760 #endif
14761 #ifdef __cplusplus
14762 }
14763 #endif
14764
14765 int
14766 main ()
14767 {
14768 return f != $ac_func;
14769   ;
14770   return 0;
14771 }
14772 _ACEOF
14773 rm -f conftest.$ac_objext conftest$ac_exeext
14774 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14775   (eval $ac_link) 2>conftest.er1
14776   ac_status=$?
14777   grep -v '^ *+' conftest.er1 >conftest.err
14778   rm -f conftest.er1
14779   cat conftest.err >&5
14780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14781   (exit $ac_status); } &&
14782          { ac_try='test -z "$ac_c_werror_flag"
14783                          || test ! -s conftest.err'
14784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14785   (eval $ac_try) 2>&5
14786   ac_status=$?
14787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14788   (exit $ac_status); }; } &&
14789          { ac_try='test -s conftest$ac_exeext'
14790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14791   (eval $ac_try) 2>&5
14792   ac_status=$?
14793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14794   (exit $ac_status); }; }; then
14795   eval "$as_ac_var=yes"
14796 else
14797   echo "$as_me: failed program was:" >&5
14798 sed 's/^/| /' conftest.$ac_ext >&5
14799
14800 eval "$as_ac_var=no"
14801 fi
14802 rm -f conftest.err conftest.$ac_objext \
14803       conftest$ac_exeext conftest.$ac_ext
14804 fi
14805 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14806 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14807 if test `eval echo '${'$as_ac_var'}'` = yes; then
14808   cat >>confdefs.h <<_ACEOF
14809 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14810 _ACEOF
14811
14812 fi
14813 done
14814
14815 fi
14816
14817
14818 echo "$as_me:$LINENO: checking for finite" >&5
14819 echo $ECHO_N "checking for finite... $ECHO_C" >&6
14820 cat >conftest.$ac_ext <<_ACEOF
14821 /* confdefs.h.  */
14822 _ACEOF
14823 cat confdefs.h >>conftest.$ac_ext
14824 cat >>conftest.$ac_ext <<_ACEOF
14825 /* end confdefs.h.  */
14826
14827 #include <math.h>
14828 double glob_double;
14829
14830 int
14831 main ()
14832 {
14833 return finite(glob_double) ? 0 : 1;
14834   ;
14835   return 0;
14836 }
14837 _ACEOF
14838 rm -f conftest.$ac_objext conftest$ac_exeext
14839 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14840   (eval $ac_link) 2>conftest.er1
14841   ac_status=$?
14842   grep -v '^ *+' conftest.er1 >conftest.err
14843   rm -f conftest.er1
14844   cat conftest.err >&5
14845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14846   (exit $ac_status); } &&
14847          { ac_try='test -z "$ac_c_werror_flag"
14848                          || test ! -s conftest.err'
14849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14850   (eval $ac_try) 2>&5
14851   ac_status=$?
14852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853   (exit $ac_status); }; } &&
14854          { ac_try='test -s conftest$ac_exeext'
14855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14856   (eval $ac_try) 2>&5
14857   ac_status=$?
14858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859   (exit $ac_status); }; }; then
14860
14861 cat >>confdefs.h <<\_ACEOF
14862 #define HAVE_FINITE 1
14863 _ACEOF
14864
14865 echo "$as_me:$LINENO: result: yes" >&5
14866 echo "${ECHO_T}yes" >&6
14867 else
14868   echo "$as_me: failed program was:" >&5
14869 sed 's/^/| /' conftest.$ac_ext >&5
14870
14871 echo "$as_me:$LINENO: result: no" >&5
14872 echo "${ECHO_T}no" >&6
14873 fi
14874 rm -f conftest.err conftest.$ac_objext \
14875       conftest$ac_exeext conftest.$ac_ext
14876
14877 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
14878 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
14879 cat >conftest.$ac_ext <<_ACEOF
14880 /* confdefs.h.  */
14881 _ACEOF
14882 cat confdefs.h >>conftest.$ac_ext
14883 cat >>conftest.$ac_ext <<_ACEOF
14884 /* end confdefs.h.  */
14885 #include <setjmp.h>
14886 int
14887 main ()
14888 {
14889 sigjmp_buf x; sigsetjmp(x, 1);
14890   ;
14891   return 0;
14892 }
14893 _ACEOF
14894 rm -f conftest.$ac_objext conftest$ac_exeext
14895 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14896   (eval $ac_link) 2>conftest.er1
14897   ac_status=$?
14898   grep -v '^ *+' conftest.er1 >conftest.err
14899   rm -f conftest.er1
14900   cat conftest.err >&5
14901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14902   (exit $ac_status); } &&
14903          { ac_try='test -z "$ac_c_werror_flag"
14904                          || test ! -s conftest.err'
14905   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14906   (eval $ac_try) 2>&5
14907   ac_status=$?
14908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909   (exit $ac_status); }; } &&
14910          { ac_try='test -s conftest$ac_exeext'
14911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14912   (eval $ac_try) 2>&5
14913   ac_status=$?
14914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14915   (exit $ac_status); }; }; then
14916
14917 cat >>confdefs.h <<\_ACEOF
14918 #define HAVE_SIGSETJMP 1
14919 _ACEOF
14920
14921 echo "$as_me:$LINENO: result: yes" >&5
14922 echo "${ECHO_T}yes" >&6
14923 else
14924   echo "$as_me: failed program was:" >&5
14925 sed 's/^/| /' conftest.$ac_ext >&5
14926
14927 echo "$as_me:$LINENO: result: no" >&5
14928 echo "${ECHO_T}no" >&6
14929 fi
14930 rm -f conftest.err conftest.$ac_objext \
14931       conftest$ac_exeext conftest.$ac_ext
14932
14933 echo "$as_me:$LINENO: checking for syslog" >&5
14934 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
14935 if test "${ac_cv_func_syslog+set}" = set; then
14936   echo $ECHO_N "(cached) $ECHO_C" >&6
14937 else
14938   cat >conftest.$ac_ext <<_ACEOF
14939 /* confdefs.h.  */
14940 _ACEOF
14941 cat confdefs.h >>conftest.$ac_ext
14942 cat >>conftest.$ac_ext <<_ACEOF
14943 /* end confdefs.h.  */
14944 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
14945    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14946 #define syslog innocuous_syslog
14947
14948 /* System header to define __stub macros and hopefully few prototypes,
14949     which can conflict with char syslog (); below.
14950     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14951     <limits.h> exists even on freestanding compilers.  */
14952
14953 #ifdef __STDC__
14954 # include <limits.h>
14955 #else
14956 # include <assert.h>
14957 #endif
14958
14959 #undef syslog
14960
14961 /* Override any gcc2 internal prototype to avoid an error.  */
14962 #ifdef __cplusplus
14963 extern "C"
14964 {
14965 #endif
14966 /* We use char because int might match the return type of a gcc2
14967    builtin and then its argument prototype would still apply.  */
14968 char syslog ();
14969 /* The GNU C library defines this for functions which it implements
14970     to always fail with ENOSYS.  Some functions are actually named
14971     something starting with __ and the normal name is an alias.  */
14972 #if defined (__stub_syslog) || defined (__stub___syslog)
14973 choke me
14974 #else
14975 char (*f) () = syslog;
14976 #endif
14977 #ifdef __cplusplus
14978 }
14979 #endif
14980
14981 int
14982 main ()
14983 {
14984 return f != syslog;
14985   ;
14986   return 0;
14987 }
14988 _ACEOF
14989 rm -f conftest.$ac_objext conftest$ac_exeext
14990 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14991   (eval $ac_link) 2>conftest.er1
14992   ac_status=$?
14993   grep -v '^ *+' conftest.er1 >conftest.err
14994   rm -f conftest.er1
14995   cat conftest.err >&5
14996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14997   (exit $ac_status); } &&
14998          { ac_try='test -z "$ac_c_werror_flag"
14999                          || test ! -s conftest.err'
15000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15001   (eval $ac_try) 2>&5
15002   ac_status=$?
15003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15004   (exit $ac_status); }; } &&
15005          { ac_try='test -s conftest$ac_exeext'
15006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15007   (eval $ac_try) 2>&5
15008   ac_status=$?
15009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15010   (exit $ac_status); }; }; then
15011   ac_cv_func_syslog=yes
15012 else
15013   echo "$as_me: failed program was:" >&5
15014 sed 's/^/| /' conftest.$ac_ext >&5
15015
15016 ac_cv_func_syslog=no
15017 fi
15018 rm -f conftest.err conftest.$ac_objext \
15019       conftest$ac_exeext conftest.$ac_ext
15020 fi
15021 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15022 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15023 if test $ac_cv_func_syslog = yes; then
15024   if test "${ac_cv_header_syslog_h+set}" = set; then
15025   echo "$as_me:$LINENO: checking for syslog.h" >&5
15026 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15027 if test "${ac_cv_header_syslog_h+set}" = set; then
15028   echo $ECHO_N "(cached) $ECHO_C" >&6
15029 fi
15030 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15031 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15032 else
15033   # Is the header compilable?
15034 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15035 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15036 cat >conftest.$ac_ext <<_ACEOF
15037 /* confdefs.h.  */
15038 _ACEOF
15039 cat confdefs.h >>conftest.$ac_ext
15040 cat >>conftest.$ac_ext <<_ACEOF
15041 /* end confdefs.h.  */
15042 $ac_includes_default
15043 #include <syslog.h>
15044 _ACEOF
15045 rm -f conftest.$ac_objext
15046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15047   (eval $ac_compile) 2>conftest.er1
15048   ac_status=$?
15049   grep -v '^ *+' conftest.er1 >conftest.err
15050   rm -f conftest.er1
15051   cat conftest.err >&5
15052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15053   (exit $ac_status); } &&
15054          { ac_try='test -z "$ac_c_werror_flag"
15055                          || test ! -s conftest.err'
15056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15057   (eval $ac_try) 2>&5
15058   ac_status=$?
15059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15060   (exit $ac_status); }; } &&
15061          { ac_try='test -s conftest.$ac_objext'
15062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15063   (eval $ac_try) 2>&5
15064   ac_status=$?
15065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15066   (exit $ac_status); }; }; then
15067   ac_header_compiler=yes
15068 else
15069   echo "$as_me: failed program was:" >&5
15070 sed 's/^/| /' conftest.$ac_ext >&5
15071
15072 ac_header_compiler=no
15073 fi
15074 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15075 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15076 echo "${ECHO_T}$ac_header_compiler" >&6
15077
15078 # Is the header present?
15079 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15080 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15081 cat >conftest.$ac_ext <<_ACEOF
15082 /* confdefs.h.  */
15083 _ACEOF
15084 cat confdefs.h >>conftest.$ac_ext
15085 cat >>conftest.$ac_ext <<_ACEOF
15086 /* end confdefs.h.  */
15087 #include <syslog.h>
15088 _ACEOF
15089 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15090   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15091   ac_status=$?
15092   grep -v '^ *+' conftest.er1 >conftest.err
15093   rm -f conftest.er1
15094   cat conftest.err >&5
15095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15096   (exit $ac_status); } >/dev/null; then
15097   if test -s conftest.err; then
15098     ac_cpp_err=$ac_c_preproc_warn_flag
15099     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15100   else
15101     ac_cpp_err=
15102   fi
15103 else
15104   ac_cpp_err=yes
15105 fi
15106 if test -z "$ac_cpp_err"; then
15107   ac_header_preproc=yes
15108 else
15109   echo "$as_me: failed program was:" >&5
15110 sed 's/^/| /' conftest.$ac_ext >&5
15111
15112   ac_header_preproc=no
15113 fi
15114 rm -f conftest.err conftest.$ac_ext
15115 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15116 echo "${ECHO_T}$ac_header_preproc" >&6
15117
15118 # So?  What about this header?
15119 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15120   yes:no: )
15121     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15122 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15123     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15124 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15125     ac_header_preproc=yes
15126     ;;
15127   no:yes:* )
15128     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15129 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15130     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15131 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15132     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15133 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15134     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15135 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15136     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15137 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15138     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15139 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15140     (
15141       cat <<\_ASBOX
15142 ## ---------------------------------------- ##
15143 ## Report this to pgsql-bugs@postgresql.org ##
15144 ## ---------------------------------------- ##
15145 _ASBOX
15146     ) |
15147       sed "s/^/$as_me: WARNING:     /" >&2
15148     ;;
15149 esac
15150 echo "$as_me:$LINENO: checking for syslog.h" >&5
15151 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15152 if test "${ac_cv_header_syslog_h+set}" = set; then
15153   echo $ECHO_N "(cached) $ECHO_C" >&6
15154 else
15155   ac_cv_header_syslog_h=$ac_header_preproc
15156 fi
15157 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15158 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15159
15160 fi
15161 if test $ac_cv_header_syslog_h = yes; then
15162
15163 cat >>confdefs.h <<\_ACEOF
15164 #define HAVE_SYSLOG 1
15165 _ACEOF
15166
15167 fi
15168
15169
15170 fi
15171
15172
15173 echo "$as_me:$LINENO: checking for optreset" >&5
15174 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15175 if test "${pgac_cv_var_int_optreset+set}" = set; then
15176   echo $ECHO_N "(cached) $ECHO_C" >&6
15177 else
15178   cat >conftest.$ac_ext <<_ACEOF
15179 /* confdefs.h.  */
15180 _ACEOF
15181 cat confdefs.h >>conftest.$ac_ext
15182 cat >>conftest.$ac_ext <<_ACEOF
15183 /* end confdefs.h.  */
15184 #include <unistd.h>
15185 int
15186 main ()
15187 {
15188 extern int optreset; optreset = 1;
15189   ;
15190   return 0;
15191 }
15192 _ACEOF
15193 rm -f conftest.$ac_objext conftest$ac_exeext
15194 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15195   (eval $ac_link) 2>conftest.er1
15196   ac_status=$?
15197   grep -v '^ *+' conftest.er1 >conftest.err
15198   rm -f conftest.er1
15199   cat conftest.err >&5
15200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15201   (exit $ac_status); } &&
15202          { ac_try='test -z "$ac_c_werror_flag"
15203                          || test ! -s conftest.err'
15204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15205   (eval $ac_try) 2>&5
15206   ac_status=$?
15207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15208   (exit $ac_status); }; } &&
15209          { ac_try='test -s conftest$ac_exeext'
15210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15211   (eval $ac_try) 2>&5
15212   ac_status=$?
15213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15214   (exit $ac_status); }; }; then
15215   pgac_cv_var_int_optreset=yes
15216 else
15217   echo "$as_me: failed program was:" >&5
15218 sed 's/^/| /' conftest.$ac_ext >&5
15219
15220 pgac_cv_var_int_optreset=no
15221 fi
15222 rm -f conftest.err conftest.$ac_objext \
15223       conftest$ac_exeext conftest.$ac_ext
15224 fi
15225 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15226 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15227 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15228
15229 cat >>confdefs.h <<\_ACEOF
15230 #define HAVE_INT_OPTRESET 1
15231 _ACEOF
15232
15233 fi
15234
15235
15236
15237 for ac_func in strtoll strtoq
15238 do
15239 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15240 echo "$as_me:$LINENO: checking for $ac_func" >&5
15241 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15242 if eval "test \"\${$as_ac_var+set}\" = set"; then
15243   echo $ECHO_N "(cached) $ECHO_C" >&6
15244 else
15245   cat >conftest.$ac_ext <<_ACEOF
15246 /* confdefs.h.  */
15247 _ACEOF
15248 cat confdefs.h >>conftest.$ac_ext
15249 cat >>conftest.$ac_ext <<_ACEOF
15250 /* end confdefs.h.  */
15251 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15252    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15253 #define $ac_func innocuous_$ac_func
15254
15255 /* System header to define __stub macros and hopefully few prototypes,
15256     which can conflict with char $ac_func (); below.
15257     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15258     <limits.h> exists even on freestanding compilers.  */
15259
15260 #ifdef __STDC__
15261 # include <limits.h>
15262 #else
15263 # include <assert.h>
15264 #endif
15265
15266 #undef $ac_func
15267
15268 /* Override any gcc2 internal prototype to avoid an error.  */
15269 #ifdef __cplusplus
15270 extern "C"
15271 {
15272 #endif
15273 /* We use char because int might match the return type of a gcc2
15274    builtin and then its argument prototype would still apply.  */
15275 char $ac_func ();
15276 /* The GNU C library defines this for functions which it implements
15277     to always fail with ENOSYS.  Some functions are actually named
15278     something starting with __ and the normal name is an alias.  */
15279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15280 choke me
15281 #else
15282 char (*f) () = $ac_func;
15283 #endif
15284 #ifdef __cplusplus
15285 }
15286 #endif
15287
15288 int
15289 main ()
15290 {
15291 return f != $ac_func;
15292   ;
15293   return 0;
15294 }
15295 _ACEOF
15296 rm -f conftest.$ac_objext conftest$ac_exeext
15297 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15298   (eval $ac_link) 2>conftest.er1
15299   ac_status=$?
15300   grep -v '^ *+' conftest.er1 >conftest.err
15301   rm -f conftest.er1
15302   cat conftest.err >&5
15303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15304   (exit $ac_status); } &&
15305          { ac_try='test -z "$ac_c_werror_flag"
15306                          || test ! -s conftest.err'
15307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15308   (eval $ac_try) 2>&5
15309   ac_status=$?
15310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311   (exit $ac_status); }; } &&
15312          { ac_try='test -s conftest$ac_exeext'
15313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15314   (eval $ac_try) 2>&5
15315   ac_status=$?
15316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15317   (exit $ac_status); }; }; then
15318   eval "$as_ac_var=yes"
15319 else
15320   echo "$as_me: failed program was:" >&5
15321 sed 's/^/| /' conftest.$ac_ext >&5
15322
15323 eval "$as_ac_var=no"
15324 fi
15325 rm -f conftest.err conftest.$ac_objext \
15326       conftest$ac_exeext conftest.$ac_ext
15327 fi
15328 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15329 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15330 if test `eval echo '${'$as_ac_var'}'` = yes; then
15331   cat >>confdefs.h <<_ACEOF
15332 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15333 _ACEOF
15334  break
15335 fi
15336 done
15337
15338
15339
15340 for ac_func in strtoull strtouq
15341 do
15342 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15343 echo "$as_me:$LINENO: checking for $ac_func" >&5
15344 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15345 if eval "test \"\${$as_ac_var+set}\" = set"; then
15346   echo $ECHO_N "(cached) $ECHO_C" >&6
15347 else
15348   cat >conftest.$ac_ext <<_ACEOF
15349 /* confdefs.h.  */
15350 _ACEOF
15351 cat confdefs.h >>conftest.$ac_ext
15352 cat >>conftest.$ac_ext <<_ACEOF
15353 /* end confdefs.h.  */
15354 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15355    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15356 #define $ac_func innocuous_$ac_func
15357
15358 /* System header to define __stub macros and hopefully few prototypes,
15359     which can conflict with char $ac_func (); below.
15360     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15361     <limits.h> exists even on freestanding compilers.  */
15362
15363 #ifdef __STDC__
15364 # include <limits.h>
15365 #else
15366 # include <assert.h>
15367 #endif
15368
15369 #undef $ac_func
15370
15371 /* Override any gcc2 internal prototype to avoid an error.  */
15372 #ifdef __cplusplus
15373 extern "C"
15374 {
15375 #endif
15376 /* We use char because int might match the return type of a gcc2
15377    builtin and then its argument prototype would still apply.  */
15378 char $ac_func ();
15379 /* The GNU C library defines this for functions which it implements
15380     to always fail with ENOSYS.  Some functions are actually named
15381     something starting with __ and the normal name is an alias.  */
15382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15383 choke me
15384 #else
15385 char (*f) () = $ac_func;
15386 #endif
15387 #ifdef __cplusplus
15388 }
15389 #endif
15390
15391 int
15392 main ()
15393 {
15394 return f != $ac_func;
15395   ;
15396   return 0;
15397 }
15398 _ACEOF
15399 rm -f conftest.$ac_objext conftest$ac_exeext
15400 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15401   (eval $ac_link) 2>conftest.er1
15402   ac_status=$?
15403   grep -v '^ *+' conftest.er1 >conftest.err
15404   rm -f conftest.er1
15405   cat conftest.err >&5
15406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15407   (exit $ac_status); } &&
15408          { ac_try='test -z "$ac_c_werror_flag"
15409                          || test ! -s conftest.err'
15410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15411   (eval $ac_try) 2>&5
15412   ac_status=$?
15413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15414   (exit $ac_status); }; } &&
15415          { ac_try='test -s conftest$ac_exeext'
15416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15417   (eval $ac_try) 2>&5
15418   ac_status=$?
15419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15420   (exit $ac_status); }; }; then
15421   eval "$as_ac_var=yes"
15422 else
15423   echo "$as_me: failed program was:" >&5
15424 sed 's/^/| /' conftest.$ac_ext >&5
15425
15426 eval "$as_ac_var=no"
15427 fi
15428 rm -f conftest.err conftest.$ac_objext \
15429       conftest$ac_exeext conftest.$ac_ext
15430 fi
15431 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15432 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15433 if test `eval echo '${'$as_ac_var'}'` = yes; then
15434   cat >>confdefs.h <<_ACEOF
15435 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15436 _ACEOF
15437  break
15438 fi
15439 done
15440
15441
15442 # Check for one of atexit() or on_exit()
15443
15444 for ac_func in atexit
15445 do
15446 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15447 echo "$as_me:$LINENO: checking for $ac_func" >&5
15448 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15449 if eval "test \"\${$as_ac_var+set}\" = set"; then
15450   echo $ECHO_N "(cached) $ECHO_C" >&6
15451 else
15452   cat >conftest.$ac_ext <<_ACEOF
15453 /* confdefs.h.  */
15454 _ACEOF
15455 cat confdefs.h >>conftest.$ac_ext
15456 cat >>conftest.$ac_ext <<_ACEOF
15457 /* end confdefs.h.  */
15458 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15459    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15460 #define $ac_func innocuous_$ac_func
15461
15462 /* System header to define __stub macros and hopefully few prototypes,
15463     which can conflict with char $ac_func (); below.
15464     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15465     <limits.h> exists even on freestanding compilers.  */
15466
15467 #ifdef __STDC__
15468 # include <limits.h>
15469 #else
15470 # include <assert.h>
15471 #endif
15472
15473 #undef $ac_func
15474
15475 /* Override any gcc2 internal prototype to avoid an error.  */
15476 #ifdef __cplusplus
15477 extern "C"
15478 {
15479 #endif
15480 /* We use char because int might match the return type of a gcc2
15481    builtin and then its argument prototype would still apply.  */
15482 char $ac_func ();
15483 /* The GNU C library defines this for functions which it implements
15484     to always fail with ENOSYS.  Some functions are actually named
15485     something starting with __ and the normal name is an alias.  */
15486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15487 choke me
15488 #else
15489 char (*f) () = $ac_func;
15490 #endif
15491 #ifdef __cplusplus
15492 }
15493 #endif
15494
15495 int
15496 main ()
15497 {
15498 return f != $ac_func;
15499   ;
15500   return 0;
15501 }
15502 _ACEOF
15503 rm -f conftest.$ac_objext conftest$ac_exeext
15504 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15505   (eval $ac_link) 2>conftest.er1
15506   ac_status=$?
15507   grep -v '^ *+' conftest.er1 >conftest.err
15508   rm -f conftest.er1
15509   cat conftest.err >&5
15510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15511   (exit $ac_status); } &&
15512          { ac_try='test -z "$ac_c_werror_flag"
15513                          || test ! -s conftest.err'
15514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15515   (eval $ac_try) 2>&5
15516   ac_status=$?
15517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518   (exit $ac_status); }; } &&
15519          { ac_try='test -s conftest$ac_exeext'
15520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15521   (eval $ac_try) 2>&5
15522   ac_status=$?
15523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524   (exit $ac_status); }; }; then
15525   eval "$as_ac_var=yes"
15526 else
15527   echo "$as_me: failed program was:" >&5
15528 sed 's/^/| /' conftest.$ac_ext >&5
15529
15530 eval "$as_ac_var=no"
15531 fi
15532 rm -f conftest.err conftest.$ac_objext \
15533       conftest$ac_exeext conftest.$ac_ext
15534 fi
15535 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15536 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15537 if test `eval echo '${'$as_ac_var'}'` = yes; then
15538   cat >>confdefs.h <<_ACEOF
15539 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15540 _ACEOF
15541
15542 else
15543
15544 for ac_func in on_exit
15545 do
15546 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15547 echo "$as_me:$LINENO: checking for $ac_func" >&5
15548 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15549 if eval "test \"\${$as_ac_var+set}\" = set"; then
15550   echo $ECHO_N "(cached) $ECHO_C" >&6
15551 else
15552   cat >conftest.$ac_ext <<_ACEOF
15553 /* confdefs.h.  */
15554 _ACEOF
15555 cat confdefs.h >>conftest.$ac_ext
15556 cat >>conftest.$ac_ext <<_ACEOF
15557 /* end confdefs.h.  */
15558 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15559    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15560 #define $ac_func innocuous_$ac_func
15561
15562 /* System header to define __stub macros and hopefully few prototypes,
15563     which can conflict with char $ac_func (); below.
15564     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15565     <limits.h> exists even on freestanding compilers.  */
15566
15567 #ifdef __STDC__
15568 # include <limits.h>
15569 #else
15570 # include <assert.h>
15571 #endif
15572
15573 #undef $ac_func
15574
15575 /* Override any gcc2 internal prototype to avoid an error.  */
15576 #ifdef __cplusplus
15577 extern "C"
15578 {
15579 #endif
15580 /* We use char because int might match the return type of a gcc2
15581    builtin and then its argument prototype would still apply.  */
15582 char $ac_func ();
15583 /* The GNU C library defines this for functions which it implements
15584     to always fail with ENOSYS.  Some functions are actually named
15585     something starting with __ and the normal name is an alias.  */
15586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15587 choke me
15588 #else
15589 char (*f) () = $ac_func;
15590 #endif
15591 #ifdef __cplusplus
15592 }
15593 #endif
15594
15595 int
15596 main ()
15597 {
15598 return f != $ac_func;
15599   ;
15600   return 0;
15601 }
15602 _ACEOF
15603 rm -f conftest.$ac_objext conftest$ac_exeext
15604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15605   (eval $ac_link) 2>conftest.er1
15606   ac_status=$?
15607   grep -v '^ *+' conftest.er1 >conftest.err
15608   rm -f conftest.er1
15609   cat conftest.err >&5
15610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15611   (exit $ac_status); } &&
15612          { ac_try='test -z "$ac_c_werror_flag"
15613                          || test ! -s conftest.err'
15614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15615   (eval $ac_try) 2>&5
15616   ac_status=$?
15617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15618   (exit $ac_status); }; } &&
15619          { ac_try='test -s conftest$ac_exeext'
15620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15621   (eval $ac_try) 2>&5
15622   ac_status=$?
15623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15624   (exit $ac_status); }; }; then
15625   eval "$as_ac_var=yes"
15626 else
15627   echo "$as_me: failed program was:" >&5
15628 sed 's/^/| /' conftest.$ac_ext >&5
15629
15630 eval "$as_ac_var=no"
15631 fi
15632 rm -f conftest.err conftest.$ac_objext \
15633       conftest$ac_exeext conftest.$ac_ext
15634 fi
15635 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15636 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15637 if test `eval echo '${'$as_ac_var'}'` = yes; then
15638   cat >>confdefs.h <<_ACEOF
15639 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15640 _ACEOF
15641
15642 else
15643   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
15644 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
15645    { (exit 1); exit 1; }; }
15646 fi
15647 done
15648
15649 fi
15650 done
15651
15652
15653 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15654 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
15655 if test "${ac_cv_sys_largefile_source+set}" = set; then
15656   echo $ECHO_N "(cached) $ECHO_C" >&6
15657 else
15658   while :; do
15659   ac_cv_sys_largefile_source=no
15660   cat >conftest.$ac_ext <<_ACEOF
15661 /* confdefs.h.  */
15662 _ACEOF
15663 cat confdefs.h >>conftest.$ac_ext
15664 cat >>conftest.$ac_ext <<_ACEOF
15665 /* end confdefs.h.  */
15666 #include <stdio.h>
15667 int
15668 main ()
15669 {
15670 return !fseeko;
15671   ;
15672   return 0;
15673 }
15674 _ACEOF
15675 rm -f conftest.$ac_objext
15676 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15677   (eval $ac_compile) 2>conftest.er1
15678   ac_status=$?
15679   grep -v '^ *+' conftest.er1 >conftest.err
15680   rm -f conftest.er1
15681   cat conftest.err >&5
15682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15683   (exit $ac_status); } &&
15684          { ac_try='test -z "$ac_c_werror_flag"
15685                          || test ! -s conftest.err'
15686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15687   (eval $ac_try) 2>&5
15688   ac_status=$?
15689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15690   (exit $ac_status); }; } &&
15691          { ac_try='test -s conftest.$ac_objext'
15692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15693   (eval $ac_try) 2>&5
15694   ac_status=$?
15695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15696   (exit $ac_status); }; }; then
15697   break
15698 else
15699   echo "$as_me: failed program was:" >&5
15700 sed 's/^/| /' conftest.$ac_ext >&5
15701
15702 fi
15703 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15704   cat >conftest.$ac_ext <<_ACEOF
15705 /* confdefs.h.  */
15706 _ACEOF
15707 cat confdefs.h >>conftest.$ac_ext
15708 cat >>conftest.$ac_ext <<_ACEOF
15709 /* end confdefs.h.  */
15710 #define _LARGEFILE_SOURCE 1
15711 #include <stdio.h>
15712 int
15713 main ()
15714 {
15715 return !fseeko;
15716   ;
15717   return 0;
15718 }
15719 _ACEOF
15720 rm -f conftest.$ac_objext
15721 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15722   (eval $ac_compile) 2>conftest.er1
15723   ac_status=$?
15724   grep -v '^ *+' conftest.er1 >conftest.err
15725   rm -f conftest.er1
15726   cat conftest.err >&5
15727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15728   (exit $ac_status); } &&
15729          { ac_try='test -z "$ac_c_werror_flag"
15730                          || test ! -s conftest.err'
15731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15732   (eval $ac_try) 2>&5
15733   ac_status=$?
15734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15735   (exit $ac_status); }; } &&
15736          { ac_try='test -s conftest.$ac_objext'
15737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15738   (eval $ac_try) 2>&5
15739   ac_status=$?
15740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15741   (exit $ac_status); }; }; then
15742   ac_cv_sys_largefile_source=1; break
15743 else
15744   echo "$as_me: failed program was:" >&5
15745 sed 's/^/| /' conftest.$ac_ext >&5
15746
15747 fi
15748 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15749   break
15750 done
15751 fi
15752 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
15753 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
15754 if test "$ac_cv_sys_largefile_source" != no; then
15755
15756 cat >>confdefs.h <<_ACEOF
15757 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15758 _ACEOF
15759
15760 fi
15761 rm -f conftest*
15762
15763 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15764 # in glibc 2.1.3, but that breaks too many other things.
15765 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15766 echo "$as_me:$LINENO: checking for fseeko" >&5
15767 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
15768 if test "${ac_cv_func_fseeko+set}" = set; then
15769   echo $ECHO_N "(cached) $ECHO_C" >&6
15770 else
15771   cat >conftest.$ac_ext <<_ACEOF
15772 /* confdefs.h.  */
15773 _ACEOF
15774 cat confdefs.h >>conftest.$ac_ext
15775 cat >>conftest.$ac_ext <<_ACEOF
15776 /* end confdefs.h.  */
15777 #include <stdio.h>
15778 int
15779 main ()
15780 {
15781 return fseeko && fseeko (stdin, 0, 0);
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   ac_cv_func_fseeko=yes
15809 else
15810   echo "$as_me: failed program was:" >&5
15811 sed 's/^/| /' conftest.$ac_ext >&5
15812
15813 ac_cv_func_fseeko=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: $ac_cv_func_fseeko" >&5
15819 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
15820 if test $ac_cv_func_fseeko = yes; then
15821
15822 cat >>confdefs.h <<\_ACEOF
15823 #define HAVE_FSEEKO 1
15824 _ACEOF
15825
15826 fi
15827
15828
15829 #
15830 # Pthreads
15831 #
15832 # For each platform, we need to know about any special compile and link
15833 # libraries, and whether the normal C function names are thread-safe.
15834 # See the comment at the top of src/port/thread.c for more information.
15835 #
15836 if test "$enable_thread_safety" = yes; then
15837
15838
15839
15840
15841 ac_ext=c
15842 ac_cpp='$CPP $CPPFLAGS'
15843 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15844 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15845 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15846
15847 acx_pthread_ok=no
15848
15849 # We used to check for pthread.h first, but this fails if pthread.h
15850 # requires special compiler flags (e.g. on True64 or Sequent).
15851 # It gets checked for in the link test anyway.
15852
15853 # First of all, check if the user has set any of the PTHREAD_LIBS,
15854 # etcetera environment variables, and if threads linking works using
15855 # them:
15856 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
15857         save_CFLAGS="$CFLAGS"
15858         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15859         save_LIBS="$LIBS"
15860         LIBS="$PTHREAD_LIBS $LIBS"
15861         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
15862 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
15863         cat >conftest.$ac_ext <<_ACEOF
15864 /* confdefs.h.  */
15865 _ACEOF
15866 cat confdefs.h >>conftest.$ac_ext
15867 cat >>conftest.$ac_ext <<_ACEOF
15868 /* end confdefs.h.  */
15869
15870 /* Override any gcc2 internal prototype to avoid an error.  */
15871 #ifdef __cplusplus
15872 extern "C"
15873 #endif
15874 /* We use char because int might match the return type of a gcc2
15875    builtin and then its argument prototype would still apply.  */
15876 char pthread_join ();
15877 int
15878 main ()
15879 {
15880 pthread_join ();
15881   ;
15882   return 0;
15883 }
15884 _ACEOF
15885 rm -f conftest.$ac_objext conftest$ac_exeext
15886 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15887   (eval $ac_link) 2>conftest.er1
15888   ac_status=$?
15889   grep -v '^ *+' conftest.er1 >conftest.err
15890   rm -f conftest.er1
15891   cat conftest.err >&5
15892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15893   (exit $ac_status); } &&
15894          { ac_try='test -z "$ac_c_werror_flag"
15895                          || test ! -s conftest.err'
15896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15897   (eval $ac_try) 2>&5
15898   ac_status=$?
15899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15900   (exit $ac_status); }; } &&
15901          { ac_try='test -s conftest$ac_exeext'
15902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15903   (eval $ac_try) 2>&5
15904   ac_status=$?
15905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15906   (exit $ac_status); }; }; then
15907   acx_pthread_ok=yes
15908 else
15909   echo "$as_me: failed program was:" >&5
15910 sed 's/^/| /' conftest.$ac_ext >&5
15911
15912 fi
15913 rm -f conftest.err conftest.$ac_objext \
15914       conftest$ac_exeext conftest.$ac_ext
15915         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
15916 echo "${ECHO_T}$acx_pthread_ok" >&6
15917         if test x"$acx_pthread_ok" = xno; then
15918                 PTHREAD_LIBS=""
15919                 PTHREAD_CFLAGS=""
15920         fi
15921         LIBS="$save_LIBS"
15922         CFLAGS="$save_CFLAGS"
15923 fi
15924
15925 # We must check for the threads library under a number of different
15926 # names; the ordering is very important because some systems
15927 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
15928 # libraries is broken (non-POSIX).
15929
15930 # Create a list of thread flags to try.  Items starting with a "-" are
15931 # C compiler flags, and other items are library names, except for "none"
15932 # which indicates that we try without any flags at all, and "pthread-config"
15933 # which is a program returning the flags for the Pth emulation library.
15934
15935 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
15936
15937 # The ordering *is* (sometimes) important.  Some notes on the
15938 # individual items follow:
15939
15940 # pthreads: AIX (must check this before -lpthread)
15941 # none: in case threads are in libc; should be tried before -Kthread and
15942 #       other compiler flags to prevent continual compiler warnings
15943 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
15944 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
15945 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
15946 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
15947 # -pthreads: Solaris/gcc
15948 # -mthreads: Mingw32/gcc, Lynx/gcc
15949 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
15950 #      doesn't hurt to check since this sometimes defines pthreads too;
15951 #      also defines -D_REENTRANT)
15952 # pthread: Linux, etcetera
15953 # --thread-safe: KAI C++
15954 # pthread-config: use pthread-config program (for GNU Pth library)
15955
15956 case "${host_cpu}-${host_os}" in
15957         *solaris*)
15958
15959         # On Solaris (at least, for some versions), libc contains stubbed
15960         # (non-functional) versions of the pthreads routines, so link-based
15961         # tests will erroneously succeed.  (We need to link with -pthread or
15962         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
15963         # a function called by this macro, so we could check for that, but
15964         # who knows whether they'll stub that too in a future libc.)  So,
15965         # we'll just look for -pthreads and -lpthread first:
15966
15967         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
15968         ;;
15969 esac
15970
15971 if test x"$acx_pthread_ok" = xno; then
15972 for flag in $acx_pthread_flags; do
15973
15974         tryPTHREAD_CFLAGS=""
15975         tryPTHREAD_LIBS=""
15976         case $flag in
15977                 none)
15978                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
15979 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
15980                 ;;
15981
15982                 -*)
15983                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
15984 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
15985                 tryPTHREAD_CFLAGS="$flag"
15986                 ;;
15987
15988                 pthread-config)
15989                 # skip this if we already have flags defined, for PostgreSQL
15990                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
15991                 # Extract the first word of "pthread-config", so it can be a program name with args.
15992 set dummy pthread-config; ac_word=$2
15993 echo "$as_me:$LINENO: checking for $ac_word" >&5
15994 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15995 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
15996   echo $ECHO_N "(cached) $ECHO_C" >&6
15997 else
15998   if test -n "$acx_pthread_config"; then
15999   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16000 else
16001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16002 for as_dir in $PATH
16003 do
16004   IFS=$as_save_IFS
16005   test -z "$as_dir" && as_dir=.
16006   for ac_exec_ext in '' $ac_executable_extensions; do
16007   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16008     ac_cv_prog_acx_pthread_config="yes"
16009     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16010     break 2
16011   fi
16012 done
16013 done
16014
16015   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16016 fi
16017 fi
16018 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16019 if test -n "$acx_pthread_config"; then
16020   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16021 echo "${ECHO_T}$acx_pthread_config" >&6
16022 else
16023   echo "$as_me:$LINENO: result: no" >&5
16024 echo "${ECHO_T}no" >&6
16025 fi
16026
16027                 if test x"$acx_pthread_config" = xno; then continue; fi
16028                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16029                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16030                 ;;
16031
16032                 *)
16033                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16034 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16035                 tryPTHREAD_LIBS="-l$flag"
16036                 ;;
16037         esac
16038
16039         save_LIBS="$LIBS"
16040         save_CFLAGS="$CFLAGS"
16041         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16042         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16043
16044         # Check for various functions.  We must include pthread.h,
16045         # since some functions may be macros.  (On the Sequent, we
16046         # need a special flag -Kthread to make this header compile.)
16047         # We check for pthread_join because it is in -lpthread on IRIX
16048         # while pthread_create is in libc.  We check for pthread_attr_init
16049         # due to DEC craziness with -lpthreads.  We check for
16050         # pthread_cleanup_push because it is one of the few pthread
16051         # functions on Solaris that doesn't have a non-functional libc stub.
16052         # We try pthread_create on general principles.
16053         cat >conftest.$ac_ext <<_ACEOF
16054 /* confdefs.h.  */
16055 _ACEOF
16056 cat confdefs.h >>conftest.$ac_ext
16057 cat >>conftest.$ac_ext <<_ACEOF
16058 /* end confdefs.h.  */
16059 #include <pthread.h>
16060 int
16061 main ()
16062 {
16063 pthread_t th; pthread_join(th, 0);
16064                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16065                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16066   ;
16067   return 0;
16068 }
16069 _ACEOF
16070 rm -f conftest.$ac_objext conftest$ac_exeext
16071 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16072   (eval $ac_link) 2>conftest.er1
16073   ac_status=$?
16074   grep -v '^ *+' conftest.er1 >conftest.err
16075   rm -f conftest.er1
16076   cat conftest.err >&5
16077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16078   (exit $ac_status); } &&
16079          { ac_try='test -z "$ac_c_werror_flag"
16080                          || test ! -s conftest.err'
16081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16082   (eval $ac_try) 2>&5
16083   ac_status=$?
16084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16085   (exit $ac_status); }; } &&
16086          { ac_try='test -s conftest$ac_exeext'
16087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16088   (eval $ac_try) 2>&5
16089   ac_status=$?
16090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16091   (exit $ac_status); }; }; then
16092   acx_pthread_ok=yes
16093 else
16094   echo "$as_me: failed program was:" >&5
16095 sed 's/^/| /' conftest.$ac_ext >&5
16096
16097 acx_pthread_ok=no
16098 fi
16099 rm -f conftest.err conftest.$ac_objext \
16100       conftest$ac_exeext conftest.$ac_ext
16101
16102         if test "x$acx_pthread_ok" = xyes; then
16103             # Don't use options that are ignored by the compiler.
16104             # We find them by checking stderror.
16105             cat >conftest.$ac_ext <<_ACEOF
16106 int
16107 main (int argc, char **argv)
16108 {
16109   (void) argc;
16110   (void) argv;
16111   return 0;
16112 }
16113 _ACEOF
16114             rm -f conftest.$ac_objext conftest$ac_exeext
16115             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16116                 # we continue with more flags because Linux needs -lpthread
16117                 # for libpq builds on PostgreSQL.  The test above only
16118                 # tests for building binaries, not shared libraries.
16119                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16120                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16121             else   acx_pthread_ok=no
16122             fi
16123         fi
16124
16125         LIBS="$save_LIBS"
16126         CFLAGS="$save_CFLAGS"
16127
16128         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16129 echo "${ECHO_T}$acx_pthread_ok" >&6
16130 done
16131 fi
16132
16133 # Various other checks:
16134 if test "x$acx_pthread_ok" = xyes; then
16135         save_LIBS="$LIBS"
16136         LIBS="$PTHREAD_LIBS $LIBS"
16137         save_CFLAGS="$CFLAGS"
16138         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16139
16140         # Detect AIX lossage: threads are created detached by default
16141         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16142         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16143 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16144         cat >conftest.$ac_ext <<_ACEOF
16145 /* confdefs.h.  */
16146 _ACEOF
16147 cat confdefs.h >>conftest.$ac_ext
16148 cat >>conftest.$ac_ext <<_ACEOF
16149 /* end confdefs.h.  */
16150 #include <pthread.h>
16151 int
16152 main ()
16153 {
16154 int attr=PTHREAD_CREATE_JOINABLE;
16155   ;
16156   return 0;
16157 }
16158 _ACEOF
16159 rm -f conftest.$ac_objext conftest$ac_exeext
16160 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16161   (eval $ac_link) 2>conftest.er1
16162   ac_status=$?
16163   grep -v '^ *+' conftest.er1 >conftest.err
16164   rm -f conftest.er1
16165   cat conftest.err >&5
16166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16167   (exit $ac_status); } &&
16168          { ac_try='test -z "$ac_c_werror_flag"
16169                          || test ! -s conftest.err'
16170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16171   (eval $ac_try) 2>&5
16172   ac_status=$?
16173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16174   (exit $ac_status); }; } &&
16175          { ac_try='test -s conftest$ac_exeext'
16176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16177   (eval $ac_try) 2>&5
16178   ac_status=$?
16179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16180   (exit $ac_status); }; }; then
16181   ok=PTHREAD_CREATE_JOINABLE
16182 else
16183   echo "$as_me: failed program was:" >&5
16184 sed 's/^/| /' conftest.$ac_ext >&5
16185
16186 ok=unknown
16187 fi
16188 rm -f conftest.err conftest.$ac_objext \
16189       conftest$ac_exeext conftest.$ac_ext
16190         if test x"$ok" = xunknown; then
16191                 cat >conftest.$ac_ext <<_ACEOF
16192 /* confdefs.h.  */
16193 _ACEOF
16194 cat confdefs.h >>conftest.$ac_ext
16195 cat >>conftest.$ac_ext <<_ACEOF
16196 /* end confdefs.h.  */
16197 #include <pthread.h>
16198 int
16199 main ()
16200 {
16201 int attr=PTHREAD_CREATE_UNDETACHED;
16202   ;
16203   return 0;
16204 }
16205 _ACEOF
16206 rm -f conftest.$ac_objext conftest$ac_exeext
16207 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16208   (eval $ac_link) 2>conftest.er1
16209   ac_status=$?
16210   grep -v '^ *+' conftest.er1 >conftest.err
16211   rm -f conftest.er1
16212   cat conftest.err >&5
16213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16214   (exit $ac_status); } &&
16215          { ac_try='test -z "$ac_c_werror_flag"
16216                          || test ! -s conftest.err'
16217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16218   (eval $ac_try) 2>&5
16219   ac_status=$?
16220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16221   (exit $ac_status); }; } &&
16222          { ac_try='test -s conftest$ac_exeext'
16223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16224   (eval $ac_try) 2>&5
16225   ac_status=$?
16226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16227   (exit $ac_status); }; }; then
16228   ok=PTHREAD_CREATE_UNDETACHED
16229 else
16230   echo "$as_me: failed program was:" >&5
16231 sed 's/^/| /' conftest.$ac_ext >&5
16232
16233 ok=unknown
16234 fi
16235 rm -f conftest.err conftest.$ac_objext \
16236       conftest$ac_exeext conftest.$ac_ext
16237         fi
16238         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16239
16240 cat >>confdefs.h <<\_ACEOF
16241 #define PTHREAD_CREATE_JOINABLE $ok
16242 _ACEOF
16243
16244         fi
16245         echo "$as_me:$LINENO: result: ${ok}" >&5
16246 echo "${ECHO_T}${ok}" >&6
16247         if test x"$ok" = xunknown; then
16248                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16249 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16250         fi
16251
16252         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16253 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16254         flag=no
16255 # We always add these in PostgreSQL
16256 #       case "${host_cpu}-${host_os}" in
16257 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16258 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16259 #       esac
16260         echo "$as_me:$LINENO: result: ${flag}" >&5
16261 echo "${ECHO_T}${flag}" >&6
16262         if test "x$flag" != xno; then
16263                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16264         fi
16265
16266         LIBS="$save_LIBS"
16267         CFLAGS="$save_CFLAGS"
16268
16269 # Supporting cc_r would require a special CC in all places that
16270 # use libpq, and that is ugly, so we don't do it.  Users can still
16271 # define their compiler as cc_r to do thread builds of everything.
16272         # More AIX lossage: must compile with cc_r
16273         # Extract the first word of "cc_r", so it can be a program name with args.
16274 set dummy cc_r; ac_word=$2
16275 echo "$as_me:$LINENO: checking for $ac_word" >&5
16276 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16277 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16278   echo $ECHO_N "(cached) $ECHO_C" >&6
16279 else
16280   if test -n "$PTHREAD_CC"; then
16281   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16282 else
16283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16284 for as_dir in $PATH
16285 do
16286   IFS=$as_save_IFS
16287   test -z "$as_dir" && as_dir=.
16288   for ac_exec_ext in '' $ac_executable_extensions; do
16289   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16290     ac_cv_prog_PTHREAD_CC="cc_r"
16291     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16292     break 2
16293   fi
16294 done
16295 done
16296
16297   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16298 fi
16299 fi
16300 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16301 if test -n "$PTHREAD_CC"; then
16302   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16303 echo "${ECHO_T}$PTHREAD_CC" >&6
16304 else
16305   echo "$as_me:$LINENO: result: no" >&5
16306 echo "${ECHO_T}no" >&6
16307 fi
16308
16309 else
16310         PTHREAD_CC="$CC"
16311 fi
16312
16313
16314
16315
16316
16317 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16318 if test x"$acx_pthread_ok" = xyes; then
16319
16320 cat >>confdefs.h <<\_ACEOF
16321 #define HAVE_PTHREAD 1
16322 _ACEOF
16323
16324         :
16325 else
16326         acx_pthread_ok=no
16327
16328 fi
16329 ac_ext=c
16330 ac_cpp='$CPP $CPPFLAGS'
16331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16334
16335         # set thread flags
16336
16337 # Some platforms use these, so just defineed them.  They can't hurt if they
16338 # are not supported.
16339 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16340
16341
16342 # At this point, we don't want to muck with the compiler name for threading.
16343 # Let's see who fails, perhaps AIX.  2004-04-23
16344 if test "$PTHREAD_CC" != "$CC"; then
16345 { { echo "$as_me:$LINENO: error:
16346 PostgreSQL does not support platforms that require a special
16347 compiler binary for thread-safety.
16348 " >&5
16349 echo "$as_me: error:
16350 PostgreSQL does not support platforms that require a special
16351 compiler binary for thread-safety.
16352 " >&2;}
16353    { (exit 1); exit 1; }; }
16354 fi
16355
16356 if test "$THREAD_SUPPORT" = no; then
16357 { { echo "$as_me:$LINENO: error:
16358 Cannot enable threads on your platform.
16359 Your platform is known to not support thread-safe programs.
16360 For details, compile and run src/bin/pg_thread_test.
16361 " >&5
16362 echo "$as_me: error:
16363 Cannot enable threads on your platform.
16364 Your platform is known to not support thread-safe programs.
16365 For details, compile and run src/bin/pg_thread_test.
16366 " >&2;}
16367    { (exit 1); exit 1; }; }
16368 fi
16369
16370 # Check for *_r functions
16371 _CFLAGS="$CFLAGS"
16372 _LIBS="$LIBS"
16373 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16374 LIBS="$LIBS $PTHREAD_LIBS"
16375
16376 if test "${ac_cv_header_pthread_h+set}" = set; then
16377   echo "$as_me:$LINENO: checking for pthread.h" >&5
16378 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16379 if test "${ac_cv_header_pthread_h+set}" = set; then
16380   echo $ECHO_N "(cached) $ECHO_C" >&6
16381 fi
16382 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16383 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16384 else
16385   # Is the header compilable?
16386 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16387 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16388 cat >conftest.$ac_ext <<_ACEOF
16389 /* confdefs.h.  */
16390 _ACEOF
16391 cat confdefs.h >>conftest.$ac_ext
16392 cat >>conftest.$ac_ext <<_ACEOF
16393 /* end confdefs.h.  */
16394 $ac_includes_default
16395 #include <pthread.h>
16396 _ACEOF
16397 rm -f conftest.$ac_objext
16398 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16399   (eval $ac_compile) 2>conftest.er1
16400   ac_status=$?
16401   grep -v '^ *+' conftest.er1 >conftest.err
16402   rm -f conftest.er1
16403   cat conftest.err >&5
16404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16405   (exit $ac_status); } &&
16406          { ac_try='test -z "$ac_c_werror_flag"
16407                          || test ! -s conftest.err'
16408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16409   (eval $ac_try) 2>&5
16410   ac_status=$?
16411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16412   (exit $ac_status); }; } &&
16413          { ac_try='test -s conftest.$ac_objext'
16414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16415   (eval $ac_try) 2>&5
16416   ac_status=$?
16417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16418   (exit $ac_status); }; }; then
16419   ac_header_compiler=yes
16420 else
16421   echo "$as_me: failed program was:" >&5
16422 sed 's/^/| /' conftest.$ac_ext >&5
16423
16424 ac_header_compiler=no
16425 fi
16426 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16427 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16428 echo "${ECHO_T}$ac_header_compiler" >&6
16429
16430 # Is the header present?
16431 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16432 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16433 cat >conftest.$ac_ext <<_ACEOF
16434 /* confdefs.h.  */
16435 _ACEOF
16436 cat confdefs.h >>conftest.$ac_ext
16437 cat >>conftest.$ac_ext <<_ACEOF
16438 /* end confdefs.h.  */
16439 #include <pthread.h>
16440 _ACEOF
16441 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16442   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16443   ac_status=$?
16444   grep -v '^ *+' conftest.er1 >conftest.err
16445   rm -f conftest.er1
16446   cat conftest.err >&5
16447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16448   (exit $ac_status); } >/dev/null; then
16449   if test -s conftest.err; then
16450     ac_cpp_err=$ac_c_preproc_warn_flag
16451     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16452   else
16453     ac_cpp_err=
16454   fi
16455 else
16456   ac_cpp_err=yes
16457 fi
16458 if test -z "$ac_cpp_err"; then
16459   ac_header_preproc=yes
16460 else
16461   echo "$as_me: failed program was:" >&5
16462 sed 's/^/| /' conftest.$ac_ext >&5
16463
16464   ac_header_preproc=no
16465 fi
16466 rm -f conftest.err conftest.$ac_ext
16467 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16468 echo "${ECHO_T}$ac_header_preproc" >&6
16469
16470 # So?  What about this header?
16471 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16472   yes:no: )
16473     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16474 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16475     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16476 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16477     ac_header_preproc=yes
16478     ;;
16479   no:yes:* )
16480     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16481 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16482     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16483 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16484     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16485 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16486     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16487 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16488     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16489 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16490     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16491 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16492     (
16493       cat <<\_ASBOX
16494 ## ---------------------------------------- ##
16495 ## Report this to pgsql-bugs@postgresql.org ##
16496 ## ---------------------------------------- ##
16497 _ASBOX
16498     ) |
16499       sed "s/^/$as_me: WARNING:     /" >&2
16500     ;;
16501 esac
16502 echo "$as_me:$LINENO: checking for pthread.h" >&5
16503 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16504 if test "${ac_cv_header_pthread_h+set}" = set; then
16505   echo $ECHO_N "(cached) $ECHO_C" >&6
16506 else
16507   ac_cv_header_pthread_h=$ac_header_preproc
16508 fi
16509 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16510 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16511
16512 fi
16513 if test $ac_cv_header_pthread_h = yes; then
16514   :
16515 else
16516   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16517 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16518    { (exit 1); exit 1; }; }
16519 fi
16520
16521
16522
16523
16524
16525
16526 for ac_func in strerror_r getpwuid_r gethostbyname_r
16527 do
16528 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16529 echo "$as_me:$LINENO: checking for $ac_func" >&5
16530 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16531 if eval "test \"\${$as_ac_var+set}\" = set"; then
16532   echo $ECHO_N "(cached) $ECHO_C" >&6
16533 else
16534   cat >conftest.$ac_ext <<_ACEOF
16535 /* confdefs.h.  */
16536 _ACEOF
16537 cat confdefs.h >>conftest.$ac_ext
16538 cat >>conftest.$ac_ext <<_ACEOF
16539 /* end confdefs.h.  */
16540 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16541    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16542 #define $ac_func innocuous_$ac_func
16543
16544 /* System header to define __stub macros and hopefully few prototypes,
16545     which can conflict with char $ac_func (); below.
16546     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16547     <limits.h> exists even on freestanding compilers.  */
16548
16549 #ifdef __STDC__
16550 # include <limits.h>
16551 #else
16552 # include <assert.h>
16553 #endif
16554
16555 #undef $ac_func
16556
16557 /* Override any gcc2 internal prototype to avoid an error.  */
16558 #ifdef __cplusplus
16559 extern "C"
16560 {
16561 #endif
16562 /* We use char because int might match the return type of a gcc2
16563    builtin and then its argument prototype would still apply.  */
16564 char $ac_func ();
16565 /* The GNU C library defines this for functions which it implements
16566     to always fail with ENOSYS.  Some functions are actually named
16567     something starting with __ and the normal name is an alias.  */
16568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16569 choke me
16570 #else
16571 char (*f) () = $ac_func;
16572 #endif
16573 #ifdef __cplusplus
16574 }
16575 #endif
16576
16577 int
16578 main ()
16579 {
16580 return f != $ac_func;
16581   ;
16582   return 0;
16583 }
16584 _ACEOF
16585 rm -f conftest.$ac_objext conftest$ac_exeext
16586 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16587   (eval $ac_link) 2>conftest.er1
16588   ac_status=$?
16589   grep -v '^ *+' conftest.er1 >conftest.err
16590   rm -f conftest.er1
16591   cat conftest.err >&5
16592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16593   (exit $ac_status); } &&
16594          { ac_try='test -z "$ac_c_werror_flag"
16595                          || test ! -s conftest.err'
16596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16597   (eval $ac_try) 2>&5
16598   ac_status=$?
16599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16600   (exit $ac_status); }; } &&
16601          { ac_try='test -s conftest$ac_exeext'
16602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16603   (eval $ac_try) 2>&5
16604   ac_status=$?
16605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16606   (exit $ac_status); }; }; then
16607   eval "$as_ac_var=yes"
16608 else
16609   echo "$as_me: failed program was:" >&5
16610 sed 's/^/| /' conftest.$ac_ext >&5
16611
16612 eval "$as_ac_var=no"
16613 fi
16614 rm -f conftest.err conftest.$ac_objext \
16615       conftest$ac_exeext conftest.$ac_ext
16616 fi
16617 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16618 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16619 if test `eval echo '${'$as_ac_var'}'` = yes; then
16620   cat >>confdefs.h <<_ACEOF
16621 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16622 _ACEOF
16623
16624 fi
16625 done
16626
16627
16628 # Do test here with the proper thread flags
16629 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
16630 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
16631 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
16632   echo $ECHO_N "(cached) $ECHO_C" >&6
16633 else
16634   cat >conftest.$ac_ext <<_ACEOF
16635 /* confdefs.h.  */
16636 _ACEOF
16637 cat confdefs.h >>conftest.$ac_ext
16638 cat >>conftest.$ac_ext <<_ACEOF
16639 /* end confdefs.h.  */
16640 #include <sys/types.h>
16641 #include <pwd.h>
16642 int
16643 main ()
16644 {
16645 uid_t uid;
16646 struct passwd *space;
16647 char *buf;
16648 size_t bufsize;
16649 struct passwd **result;
16650 getpwuid_r(uid, space, buf, bufsize, result);
16651   ;
16652   return 0;
16653 }
16654 _ACEOF
16655 rm -f conftest.$ac_objext
16656 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16657   (eval $ac_compile) 2>conftest.er1
16658   ac_status=$?
16659   grep -v '^ *+' conftest.er1 >conftest.err
16660   rm -f conftest.er1
16661   cat conftest.err >&5
16662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16663   (exit $ac_status); } &&
16664          { ac_try='test -z "$ac_c_werror_flag"
16665                          || test ! -s conftest.err'
16666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16667   (eval $ac_try) 2>&5
16668   ac_status=$?
16669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16670   (exit $ac_status); }; } &&
16671          { ac_try='test -s conftest.$ac_objext'
16672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16673   (eval $ac_try) 2>&5
16674   ac_status=$?
16675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16676   (exit $ac_status); }; }; then
16677   pgac_func_getpwuid_r_5arg=yes
16678 else
16679   echo "$as_me: failed program was:" >&5
16680 sed 's/^/| /' conftest.$ac_ext >&5
16681
16682 pgac_func_getpwuid_r_5arg=no
16683 fi
16684 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16685 fi
16686 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
16687 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
16688 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
16689
16690 cat >>confdefs.h <<\_ACEOF
16691 #define GETPWUID_R_5ARG
16692 _ACEOF
16693
16694 fi
16695
16696 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
16697 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
16698 if test "${pgac_func_strerror_r_int+set}" = set; then
16699   echo $ECHO_N "(cached) $ECHO_C" >&6
16700 else
16701   cat >conftest.$ac_ext <<_ACEOF
16702 /* confdefs.h.  */
16703 _ACEOF
16704 cat confdefs.h >>conftest.$ac_ext
16705 cat >>conftest.$ac_ext <<_ACEOF
16706 /* end confdefs.h.  */
16707 #include <string.h>
16708 int
16709 main ()
16710 {
16711 #ifndef _AIX
16712 int strerror_r(int, char *, size_t);
16713 #else
16714 /* Older AIX has 'int' for the third argument so we don't test the args. */
16715 int strerror_r();
16716 #endif
16717   ;
16718   return 0;
16719 }
16720 _ACEOF
16721 rm -f conftest.$ac_objext
16722 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16723   (eval $ac_compile) 2>conftest.er1
16724   ac_status=$?
16725   grep -v '^ *+' conftest.er1 >conftest.err
16726   rm -f conftest.er1
16727   cat conftest.err >&5
16728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729   (exit $ac_status); } &&
16730          { ac_try='test -z "$ac_c_werror_flag"
16731                          || test ! -s conftest.err'
16732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16733   (eval $ac_try) 2>&5
16734   ac_status=$?
16735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16736   (exit $ac_status); }; } &&
16737          { ac_try='test -s conftest.$ac_objext'
16738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16739   (eval $ac_try) 2>&5
16740   ac_status=$?
16741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16742   (exit $ac_status); }; }; then
16743   pgac_func_strerror_r_int=yes
16744 else
16745   echo "$as_me: failed program was:" >&5
16746 sed 's/^/| /' conftest.$ac_ext >&5
16747
16748 pgac_func_strerror_r_int=no
16749 fi
16750 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16751 fi
16752 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
16753 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
16754 if test x"$pgac_func_strerror_r_int" = xyes ; then
16755
16756 cat >>confdefs.h <<\_ACEOF
16757 #define STRERROR_R_INT
16758 _ACEOF
16759
16760 fi
16761
16762
16763 CFLAGS="$_CFLAGS"
16764 LIBS="$_LIBS"
16765
16766 else
16767 # do not use values from template file
16768 PTHREAD_CFLAGS=
16769 PTHREAD_LIBS=
16770 fi
16771
16772
16773
16774
16775
16776 # We can test for libldap_r only after we know PTHREAD_LIBS
16777 if test "$with_ldap" = yes ; then
16778   _LIBS="$LIBS"
16779   if test "$PORTNAME" != "win32"; then
16780
16781 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
16782 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
16783 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
16784   echo $ECHO_N "(cached) $ECHO_C" >&6
16785 else
16786   ac_check_lib_save_LIBS=$LIBS
16787 LIBS="-lldap  $LIBS"
16788 cat >conftest.$ac_ext <<_ACEOF
16789 /* confdefs.h.  */
16790 _ACEOF
16791 cat confdefs.h >>conftest.$ac_ext
16792 cat >>conftest.$ac_ext <<_ACEOF
16793 /* end confdefs.h.  */
16794
16795 /* Override any gcc2 internal prototype to avoid an error.  */
16796 #ifdef __cplusplus
16797 extern "C"
16798 #endif
16799 /* We use char because int might match the return type of a gcc2
16800    builtin and then its argument prototype would still apply.  */
16801 char ldap_bind ();
16802 int
16803 main ()
16804 {
16805 ldap_bind ();
16806   ;
16807   return 0;
16808 }
16809 _ACEOF
16810 rm -f conftest.$ac_objext conftest$ac_exeext
16811 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16812   (eval $ac_link) 2>conftest.er1
16813   ac_status=$?
16814   grep -v '^ *+' conftest.er1 >conftest.err
16815   rm -f conftest.er1
16816   cat conftest.err >&5
16817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16818   (exit $ac_status); } &&
16819          { ac_try='test -z "$ac_c_werror_flag"
16820                          || test ! -s conftest.err'
16821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16822   (eval $ac_try) 2>&5
16823   ac_status=$?
16824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16825   (exit $ac_status); }; } &&
16826          { ac_try='test -s conftest$ac_exeext'
16827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16828   (eval $ac_try) 2>&5
16829   ac_status=$?
16830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16831   (exit $ac_status); }; }; then
16832   ac_cv_lib_ldap_ldap_bind=yes
16833 else
16834   echo "$as_me: failed program was:" >&5
16835 sed 's/^/| /' conftest.$ac_ext >&5
16836
16837 ac_cv_lib_ldap_ldap_bind=no
16838 fi
16839 rm -f conftest.err conftest.$ac_objext \
16840       conftest$ac_exeext conftest.$ac_ext
16841 LIBS=$ac_check_lib_save_LIBS
16842 fi
16843 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
16844 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
16845 if test $ac_cv_lib_ldap_ldap_bind = yes; then
16846   cat >>confdefs.h <<_ACEOF
16847 #define HAVE_LIBLDAP 1
16848 _ACEOF
16849
16850   LIBS="-lldap $LIBS"
16851
16852 else
16853   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
16854 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
16855    { (exit 1); exit 1; }; }
16856 fi
16857
16858     LDAP_LIBS_BE="-lldap"
16859     if test "$enable_thread_safety" = yes; then
16860       # on some platforms ldap_r fails to link without PTHREAD_LIBS
16861
16862 echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
16863 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6
16864 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
16865   echo $ECHO_N "(cached) $ECHO_C" >&6
16866 else
16867   ac_check_lib_save_LIBS=$LIBS
16868 LIBS="-lldap_r $PTHREAD_LIBS $LIBS"
16869 cat >conftest.$ac_ext <<_ACEOF
16870 /* confdefs.h.  */
16871 _ACEOF
16872 cat confdefs.h >>conftest.$ac_ext
16873 cat >>conftest.$ac_ext <<_ACEOF
16874 /* end confdefs.h.  */
16875
16876 /* Override any gcc2 internal prototype to avoid an error.  */
16877 #ifdef __cplusplus
16878 extern "C"
16879 #endif
16880 /* We use char because int might match the return type of a gcc2
16881    builtin and then its argument prototype would still apply.  */
16882 char ldap_simple_bind ();
16883 int
16884 main ()
16885 {
16886 ldap_simple_bind ();
16887   ;
16888   return 0;
16889 }
16890 _ACEOF
16891 rm -f conftest.$ac_objext conftest$ac_exeext
16892 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16893   (eval $ac_link) 2>conftest.er1
16894   ac_status=$?
16895   grep -v '^ *+' conftest.er1 >conftest.err
16896   rm -f conftest.er1
16897   cat conftest.err >&5
16898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16899   (exit $ac_status); } &&
16900          { ac_try='test -z "$ac_c_werror_flag"
16901                          || test ! -s conftest.err'
16902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16903   (eval $ac_try) 2>&5
16904   ac_status=$?
16905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16906   (exit $ac_status); }; } &&
16907          { ac_try='test -s conftest$ac_exeext'
16908   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16909   (eval $ac_try) 2>&5
16910   ac_status=$?
16911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16912   (exit $ac_status); }; }; then
16913   ac_cv_lib_ldap_r_ldap_simple_bind=yes
16914 else
16915   echo "$as_me: failed program was:" >&5
16916 sed 's/^/| /' conftest.$ac_ext >&5
16917
16918 ac_cv_lib_ldap_r_ldap_simple_bind=no
16919 fi
16920 rm -f conftest.err conftest.$ac_objext \
16921       conftest$ac_exeext conftest.$ac_ext
16922 LIBS=$ac_check_lib_save_LIBS
16923 fi
16924 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
16925 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6
16926 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
16927   cat >>confdefs.h <<_ACEOF
16928 #define HAVE_LIBLDAP_R 1
16929 _ACEOF
16930
16931   LIBS="-lldap_r $LIBS"
16932
16933 else
16934   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
16935 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
16936    { (exit 1); exit 1; }; }
16937 fi
16938
16939       LDAP_LIBS_FE="-lldap_r"
16940     else
16941       LDAP_LIBS_FE="-lldap"
16942     fi
16943   else
16944
16945 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
16946 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
16947 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
16948   echo $ECHO_N "(cached) $ECHO_C" >&6
16949 else
16950   ac_check_lib_save_LIBS=$LIBS
16951 LIBS="-lwldap32  $LIBS"
16952 cat >conftest.$ac_ext <<_ACEOF
16953 /* confdefs.h.  */
16954 _ACEOF
16955 cat confdefs.h >>conftest.$ac_ext
16956 cat >>conftest.$ac_ext <<_ACEOF
16957 /* end confdefs.h.  */
16958
16959 /* Override any gcc2 internal prototype to avoid an error.  */
16960 #ifdef __cplusplus
16961 extern "C"
16962 #endif
16963 /* We use char because int might match the return type of a gcc2
16964    builtin and then its argument prototype would still apply.  */
16965 char ldap_bind ();
16966 int
16967 main ()
16968 {
16969 ldap_bind ();
16970   ;
16971   return 0;
16972 }
16973 _ACEOF
16974 rm -f conftest.$ac_objext conftest$ac_exeext
16975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16976   (eval $ac_link) 2>conftest.er1
16977   ac_status=$?
16978   grep -v '^ *+' conftest.er1 >conftest.err
16979   rm -f conftest.er1
16980   cat conftest.err >&5
16981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16982   (exit $ac_status); } &&
16983          { ac_try='test -z "$ac_c_werror_flag"
16984                          || test ! -s conftest.err'
16985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16986   (eval $ac_try) 2>&5
16987   ac_status=$?
16988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16989   (exit $ac_status); }; } &&
16990          { ac_try='test -s conftest$ac_exeext'
16991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16992   (eval $ac_try) 2>&5
16993   ac_status=$?
16994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16995   (exit $ac_status); }; }; then
16996   ac_cv_lib_wldap32_ldap_bind=yes
16997 else
16998   echo "$as_me: failed program was:" >&5
16999 sed 's/^/| /' conftest.$ac_ext >&5
17000
17001 ac_cv_lib_wldap32_ldap_bind=no
17002 fi
17003 rm -f conftest.err conftest.$ac_objext \
17004       conftest$ac_exeext conftest.$ac_ext
17005 LIBS=$ac_check_lib_save_LIBS
17006 fi
17007 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
17008 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
17009 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
17010   cat >>confdefs.h <<_ACEOF
17011 #define HAVE_LIBWLDAP32 1
17012 _ACEOF
17013
17014   LIBS="-lwldap32 $LIBS"
17015
17016 else
17017   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
17018 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
17019    { (exit 1); exit 1; }; }
17020 fi
17021
17022     LDAP_LIBS_FE="-lwldap32"
17023     LDAP_LIBS_BE="-lwldap32"
17024   fi
17025   LIBS="$_LIBS"
17026 fi
17027
17028
17029
17030
17031 # This test makes sure that run tests work at all.  Sometimes a shared
17032 # library is found by the linker, but the runtime linker can't find it.
17033 # This check should come after all modifications of compiler or linker
17034 # variables, and before any other run tests.
17035 echo "$as_me:$LINENO: checking test program" >&5
17036 echo $ECHO_N "checking test program... $ECHO_C" >&6
17037 if test "$cross_compiling" = yes; then
17038   echo "$as_me:$LINENO: result: cross-compiling" >&5
17039 echo "${ECHO_T}cross-compiling" >&6
17040 else
17041   cat >conftest.$ac_ext <<_ACEOF
17042 /* confdefs.h.  */
17043 _ACEOF
17044 cat confdefs.h >>conftest.$ac_ext
17045 cat >>conftest.$ac_ext <<_ACEOF
17046 /* end confdefs.h.  */
17047 int main() { return 0; }
17048 _ACEOF
17049 rm -f conftest$ac_exeext
17050 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17051   (eval $ac_link) 2>&5
17052   ac_status=$?
17053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17054   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17056   (eval $ac_try) 2>&5
17057   ac_status=$?
17058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17059   (exit $ac_status); }; }; then
17060   echo "$as_me:$LINENO: result: ok" >&5
17061 echo "${ECHO_T}ok" >&6
17062 else
17063   echo "$as_me: program exited with status $ac_status" >&5
17064 echo "$as_me: failed program was:" >&5
17065 sed 's/^/| /' conftest.$ac_ext >&5
17066
17067 ( exit $ac_status )
17068 echo "$as_me:$LINENO: result: failed" >&5
17069 echo "${ECHO_T}failed" >&6
17070 { { echo "$as_me:$LINENO: error:
17071 *** Could not execute a simple test program.  This may be a problem
17072 *** related to locating shared libraries.  Check the file 'config.log'
17073 *** for the exact reason." >&5
17074 echo "$as_me: error:
17075 *** Could not execute a simple test program.  This may be a problem
17076 *** related to locating shared libraries.  Check the file 'config.log'
17077 *** for the exact reason." >&2;}
17078    { (exit 1); exit 1; }; }
17079 fi
17080 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17081 fi
17082
17083 # --------------------
17084 # Run tests below here
17085 # --------------------
17086
17087 # Force use of our snprintf if system's doesn't do arg control
17088 # See comment above at snprintf test for details.
17089 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17090   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17091 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17092 if test "${pgac_cv_printf_arg_control+set}" = set; then
17093   echo $ECHO_N "(cached) $ECHO_C" >&6
17094 else
17095   if test "$cross_compiling" = yes; then
17096   pgac_cv_printf_arg_control=cross
17097 else
17098   cat >conftest.$ac_ext <<_ACEOF
17099 /* confdefs.h.  */
17100 _ACEOF
17101 cat confdefs.h >>conftest.$ac_ext
17102 cat >>conftest.$ac_ext <<_ACEOF
17103 /* end confdefs.h.  */
17104 #include <stdio.h>
17105 #include <string.h>
17106
17107 int main()
17108 {
17109   char buf[100];
17110
17111   /* can it swap arguments? */
17112   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17113   if (strcmp(buf, "4 3") != 0)
17114     return 1;
17115   return 0;
17116 }
17117 _ACEOF
17118 rm -f conftest$ac_exeext
17119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17120   (eval $ac_link) 2>&5
17121   ac_status=$?
17122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17123   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17125   (eval $ac_try) 2>&5
17126   ac_status=$?
17127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17128   (exit $ac_status); }; }; then
17129   pgac_cv_printf_arg_control=yes
17130 else
17131   echo "$as_me: program exited with status $ac_status" >&5
17132 echo "$as_me: failed program was:" >&5
17133 sed 's/^/| /' conftest.$ac_ext >&5
17134
17135 ( exit $ac_status )
17136 pgac_cv_printf_arg_control=no
17137 fi
17138 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17139 fi
17140
17141 fi
17142 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17143 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17144
17145   if test $pgac_cv_printf_arg_control != yes ; then
17146     pgac_need_repl_snprintf=yes
17147   fi
17148 fi
17149
17150
17151
17152 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17153 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17154 if test "${pgac_cv_type_long_int_64+set}" = set; then
17155   echo $ECHO_N "(cached) $ECHO_C" >&6
17156 else
17157   if test "$cross_compiling" = yes; then
17158   # If cross-compiling, check the size reported by the compiler and
17159 # trust that the arithmetic works.
17160 cat >conftest.$ac_ext <<_ACEOF
17161 /* confdefs.h.  */
17162 _ACEOF
17163 cat confdefs.h >>conftest.$ac_ext
17164 cat >>conftest.$ac_ext <<_ACEOF
17165 /* end confdefs.h.  */
17166
17167 int
17168 main ()
17169 {
17170 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17171 test_array [0] = 0
17172
17173   ;
17174   return 0;
17175 }
17176 _ACEOF
17177 rm -f conftest.$ac_objext
17178 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17179   (eval $ac_compile) 2>conftest.er1
17180   ac_status=$?
17181   grep -v '^ *+' conftest.er1 >conftest.err
17182   rm -f conftest.er1
17183   cat conftest.err >&5
17184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17185   (exit $ac_status); } &&
17186          { ac_try='test -z "$ac_c_werror_flag"
17187                          || test ! -s conftest.err'
17188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17189   (eval $ac_try) 2>&5
17190   ac_status=$?
17191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17192   (exit $ac_status); }; } &&
17193          { ac_try='test -s conftest.$ac_objext'
17194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17195   (eval $ac_try) 2>&5
17196   ac_status=$?
17197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17198   (exit $ac_status); }; }; then
17199   pgac_cv_type_long_int_64=yes
17200 else
17201   echo "$as_me: failed program was:" >&5
17202 sed 's/^/| /' conftest.$ac_ext >&5
17203
17204 pgac_cv_type_long_int_64=no
17205 fi
17206 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17207 else
17208   cat >conftest.$ac_ext <<_ACEOF
17209 /* confdefs.h.  */
17210 _ACEOF
17211 cat confdefs.h >>conftest.$ac_ext
17212 cat >>conftest.$ac_ext <<_ACEOF
17213 /* end confdefs.h.  */
17214 typedef long int ac_int64;
17215
17216 /*
17217  * These are globals to discourage the compiler from folding all the
17218  * arithmetic tests down to compile-time constants.
17219  */
17220 ac_int64 a = 20000001;
17221 ac_int64 b = 40000005;
17222
17223 int does_int64_work()
17224 {
17225   ac_int64 c,d;
17226
17227   if (sizeof(ac_int64) != 8)
17228     return 0;                   /* definitely not the right size */
17229
17230   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17231   c = a * b;
17232   d = (c + b) / b;
17233   if (d != a+1)
17234     return 0;
17235   return 1;
17236 }
17237 main() {
17238   exit(! does_int64_work());
17239 }
17240 _ACEOF
17241 rm -f conftest$ac_exeext
17242 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17243   (eval $ac_link) 2>&5
17244   ac_status=$?
17245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17246   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17248   (eval $ac_try) 2>&5
17249   ac_status=$?
17250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17251   (exit $ac_status); }; }; then
17252   pgac_cv_type_long_int_64=yes
17253 else
17254   echo "$as_me: program exited with status $ac_status" >&5
17255 echo "$as_me: failed program was:" >&5
17256 sed 's/^/| /' conftest.$ac_ext >&5
17257
17258 ( exit $ac_status )
17259 pgac_cv_type_long_int_64=no
17260 fi
17261 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17262 fi
17263 fi
17264 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17265 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17266
17267 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17268 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17269
17270 cat >>confdefs.h <<\_ACEOF
17271 #define HAVE_LONG_INT_64
17272 _ACEOF
17273
17274 fi
17275
17276
17277 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17278   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17279 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17280 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17281   echo $ECHO_N "(cached) $ECHO_C" >&6
17282 else
17283   if test "$cross_compiling" = yes; then
17284   # If cross-compiling, check the size reported by the compiler and
17285 # trust that the arithmetic works.
17286 cat >conftest.$ac_ext <<_ACEOF
17287 /* confdefs.h.  */
17288 _ACEOF
17289 cat confdefs.h >>conftest.$ac_ext
17290 cat >>conftest.$ac_ext <<_ACEOF
17291 /* end confdefs.h.  */
17292
17293 int
17294 main ()
17295 {
17296 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17297 test_array [0] = 0
17298
17299   ;
17300   return 0;
17301 }
17302 _ACEOF
17303 rm -f conftest.$ac_objext
17304 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17305   (eval $ac_compile) 2>conftest.er1
17306   ac_status=$?
17307   grep -v '^ *+' conftest.er1 >conftest.err
17308   rm -f conftest.er1
17309   cat conftest.err >&5
17310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17311   (exit $ac_status); } &&
17312          { ac_try='test -z "$ac_c_werror_flag"
17313                          || test ! -s conftest.err'
17314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17315   (eval $ac_try) 2>&5
17316   ac_status=$?
17317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17318   (exit $ac_status); }; } &&
17319          { ac_try='test -s conftest.$ac_objext'
17320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17321   (eval $ac_try) 2>&5
17322   ac_status=$?
17323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17324   (exit $ac_status); }; }; then
17325   pgac_cv_type_long_long_int_64=yes
17326 else
17327   echo "$as_me: failed program was:" >&5
17328 sed 's/^/| /' conftest.$ac_ext >&5
17329
17330 pgac_cv_type_long_long_int_64=no
17331 fi
17332 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17333 else
17334   cat >conftest.$ac_ext <<_ACEOF
17335 /* confdefs.h.  */
17336 _ACEOF
17337 cat confdefs.h >>conftest.$ac_ext
17338 cat >>conftest.$ac_ext <<_ACEOF
17339 /* end confdefs.h.  */
17340 typedef long long int ac_int64;
17341
17342 /*
17343  * These are globals to discourage the compiler from folding all the
17344  * arithmetic tests down to compile-time constants.
17345  */
17346 ac_int64 a = 20000001;
17347 ac_int64 b = 40000005;
17348
17349 int does_int64_work()
17350 {
17351   ac_int64 c,d;
17352
17353   if (sizeof(ac_int64) != 8)
17354     return 0;                   /* definitely not the right size */
17355
17356   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17357   c = a * b;
17358   d = (c + b) / b;
17359   if (d != a+1)
17360     return 0;
17361   return 1;
17362 }
17363 main() {
17364   exit(! does_int64_work());
17365 }
17366 _ACEOF
17367 rm -f conftest$ac_exeext
17368 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17369   (eval $ac_link) 2>&5
17370   ac_status=$?
17371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17372   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17374   (eval $ac_try) 2>&5
17375   ac_status=$?
17376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17377   (exit $ac_status); }; }; then
17378   pgac_cv_type_long_long_int_64=yes
17379 else
17380   echo "$as_me: program exited with status $ac_status" >&5
17381 echo "$as_me: failed program was:" >&5
17382 sed 's/^/| /' conftest.$ac_ext >&5
17383
17384 ( exit $ac_status )
17385 pgac_cv_type_long_long_int_64=no
17386 fi
17387 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17388 fi
17389 fi
17390 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17391 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17392
17393 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17394 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17395
17396 cat >>confdefs.h <<\_ACEOF
17397 #define HAVE_LONG_LONG_INT_64
17398 _ACEOF
17399
17400 fi
17401
17402 fi
17403
17404
17405
17406 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17407   cat >conftest.$ac_ext <<_ACEOF
17408 /* confdefs.h.  */
17409 _ACEOF
17410 cat confdefs.h >>conftest.$ac_ext
17411 cat >>conftest.$ac_ext <<_ACEOF
17412 /* end confdefs.h.  */
17413
17414 #define INT64CONST(x)  x##LL
17415 long long int foo = INT64CONST(0x1234567890123456);
17416
17417 int
17418 main ()
17419 {
17420
17421   ;
17422   return 0;
17423 }
17424 _ACEOF
17425 rm -f conftest.$ac_objext
17426 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17427   (eval $ac_compile) 2>conftest.er1
17428   ac_status=$?
17429   grep -v '^ *+' conftest.er1 >conftest.err
17430   rm -f conftest.er1
17431   cat conftest.err >&5
17432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17433   (exit $ac_status); } &&
17434          { ac_try='test -z "$ac_c_werror_flag"
17435                          || test ! -s conftest.err'
17436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17437   (eval $ac_try) 2>&5
17438   ac_status=$?
17439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17440   (exit $ac_status); }; } &&
17441          { ac_try='test -s conftest.$ac_objext'
17442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17443   (eval $ac_try) 2>&5
17444   ac_status=$?
17445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17446   (exit $ac_status); }; }; then
17447
17448 cat >>confdefs.h <<\_ACEOF
17449 #define HAVE_LL_CONSTANTS 1
17450 _ACEOF
17451
17452 else
17453   echo "$as_me: failed program was:" >&5
17454 sed 's/^/| /' conftest.$ac_ext >&5
17455
17456 fi
17457 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17458 fi
17459
17460
17461 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17462 # we found we need to use "long long int", better check.  We cope with
17463 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17464 # work, fall back to our own snprintf emulation (which we know uses %lld).
17465
17466 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17467   if test $pgac_need_repl_snprintf = no; then
17468     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17469 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17470 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17471   echo $ECHO_N "(cached) $ECHO_C" >&6
17472 else
17473   for pgac_format in '%lld' '%qd' '%I64d'; do
17474 if test "$cross_compiling" = yes; then
17475   pgac_cv_snprintf_long_long_int_format=cross; break
17476 else
17477   cat >conftest.$ac_ext <<_ACEOF
17478 /* confdefs.h.  */
17479 _ACEOF
17480 cat confdefs.h >>conftest.$ac_ext
17481 cat >>conftest.$ac_ext <<_ACEOF
17482 /* end confdefs.h.  */
17483 #include <stdio.h>
17484 typedef long long int ac_int64;
17485 #define INT64_FORMAT "$pgac_format"
17486
17487 ac_int64 a = 20000001;
17488 ac_int64 b = 40000005;
17489
17490 int does_int64_snprintf_work()
17491 {
17492   ac_int64 c;
17493   char buf[100];
17494
17495   if (sizeof(ac_int64) != 8)
17496     return 0;                   /* doesn't look like the right size */
17497
17498   c = a * b;
17499   snprintf(buf, 100, INT64_FORMAT, c);
17500   if (strcmp(buf, "800000140000005") != 0)
17501     return 0;                   /* either multiply or snprintf is busted */
17502   return 1;
17503 }
17504 main() {
17505   exit(! does_int64_snprintf_work());
17506 }
17507 _ACEOF
17508 rm -f conftest$ac_exeext
17509 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17510   (eval $ac_link) 2>&5
17511   ac_status=$?
17512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17513   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17515   (eval $ac_try) 2>&5
17516   ac_status=$?
17517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17518   (exit $ac_status); }; }; then
17519   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17520 else
17521   echo "$as_me: program exited with status $ac_status" >&5
17522 echo "$as_me: failed program was:" >&5
17523 sed 's/^/| /' conftest.$ac_ext >&5
17524
17525 fi
17526 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17527 fi
17528 done
17529 fi
17530
17531 LONG_LONG_INT_FORMAT=''
17532
17533 case $pgac_cv_snprintf_long_long_int_format in
17534   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17535 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17536   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17537 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17538          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17539   *)     echo "$as_me:$LINENO: result: none" >&5
17540 echo "${ECHO_T}none" >&6;;
17541 esac
17542     if test "$LONG_LONG_INT_FORMAT" = ""; then
17543       # Force usage of our own snprintf, since system snprintf is broken
17544       pgac_need_repl_snprintf=yes
17545       LONG_LONG_INT_FORMAT='%lld'
17546     fi
17547   else
17548     # Here if we previously decided we needed to use our own snprintf
17549     LONG_LONG_INT_FORMAT='%lld'
17550   fi
17551   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17552   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17553   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17554 else
17555   # Here if we are not using 'long long int' at all
17556   INT64_FORMAT='"%ld"'
17557   UINT64_FORMAT='"%lu"'
17558 fi
17559
17560
17561 cat >>confdefs.h <<_ACEOF
17562 #define INT64_FORMAT $INT64_FORMAT
17563 _ACEOF
17564
17565
17566
17567 cat >>confdefs.h <<_ACEOF
17568 #define UINT64_FORMAT $UINT64_FORMAT
17569 _ACEOF
17570
17571
17572 # Now we have checked all the reasons to replace snprintf
17573 if test $pgac_need_repl_snprintf = yes; then
17574
17575 cat >>confdefs.h <<\_ACEOF
17576 #define USE_REPL_SNPRINTF 1
17577 _ACEOF
17578
17579   case $LIBOBJS in
17580     "snprintf.$ac_objext"   | \
17581   *" snprintf.$ac_objext"   | \
17582     "snprintf.$ac_objext "* | \
17583   *" snprintf.$ac_objext "* ) ;;
17584   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17585 esac
17586
17587 fi
17588
17589 # Need a #define for the size of Datum (unsigned long)
17590 echo "$as_me:$LINENO: checking for unsigned long" >&5
17591 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17592 if test "${ac_cv_type_unsigned_long+set}" = set; then
17593   echo $ECHO_N "(cached) $ECHO_C" >&6
17594 else
17595   cat >conftest.$ac_ext <<_ACEOF
17596 /* confdefs.h.  */
17597 _ACEOF
17598 cat confdefs.h >>conftest.$ac_ext
17599 cat >>conftest.$ac_ext <<_ACEOF
17600 /* end confdefs.h.  */
17601 $ac_includes_default
17602 int
17603 main ()
17604 {
17605 if ((unsigned long *) 0)
17606   return 0;
17607 if (sizeof (unsigned long))
17608   return 0;
17609   ;
17610   return 0;
17611 }
17612 _ACEOF
17613 rm -f conftest.$ac_objext
17614 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17615   (eval $ac_compile) 2>conftest.er1
17616   ac_status=$?
17617   grep -v '^ *+' conftest.er1 >conftest.err
17618   rm -f conftest.er1
17619   cat conftest.err >&5
17620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17621   (exit $ac_status); } &&
17622          { ac_try='test -z "$ac_c_werror_flag"
17623                          || test ! -s conftest.err'
17624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17625   (eval $ac_try) 2>&5
17626   ac_status=$?
17627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17628   (exit $ac_status); }; } &&
17629          { ac_try='test -s conftest.$ac_objext'
17630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17631   (eval $ac_try) 2>&5
17632   ac_status=$?
17633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17634   (exit $ac_status); }; }; then
17635   ac_cv_type_unsigned_long=yes
17636 else
17637   echo "$as_me: failed program was:" >&5
17638 sed 's/^/| /' conftest.$ac_ext >&5
17639
17640 ac_cv_type_unsigned_long=no
17641 fi
17642 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17643 fi
17644 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
17645 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
17646
17647 echo "$as_me:$LINENO: checking size of unsigned long" >&5
17648 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
17649 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
17650   echo $ECHO_N "(cached) $ECHO_C" >&6
17651 else
17652   if test "$ac_cv_type_unsigned_long" = yes; then
17653   # The cast to unsigned long works around a bug in the HP C Compiler
17654   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17655   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17656   # This bug is HP SR number 8606223364.
17657   if test "$cross_compiling" = yes; then
17658   # Depending upon the size, compute the lo and hi bounds.
17659 cat >conftest.$ac_ext <<_ACEOF
17660 /* confdefs.h.  */
17661 _ACEOF
17662 cat confdefs.h >>conftest.$ac_ext
17663 cat >>conftest.$ac_ext <<_ACEOF
17664 /* end confdefs.h.  */
17665 $ac_includes_default
17666 int
17667 main ()
17668 {
17669 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
17670 test_array [0] = 0
17671
17672   ;
17673   return 0;
17674 }
17675 _ACEOF
17676 rm -f conftest.$ac_objext
17677 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17678   (eval $ac_compile) 2>conftest.er1
17679   ac_status=$?
17680   grep -v '^ *+' conftest.er1 >conftest.err
17681   rm -f conftest.er1
17682   cat conftest.err >&5
17683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17684   (exit $ac_status); } &&
17685          { ac_try='test -z "$ac_c_werror_flag"
17686                          || test ! -s conftest.err'
17687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17688   (eval $ac_try) 2>&5
17689   ac_status=$?
17690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17691   (exit $ac_status); }; } &&
17692          { ac_try='test -s conftest.$ac_objext'
17693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17694   (eval $ac_try) 2>&5
17695   ac_status=$?
17696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17697   (exit $ac_status); }; }; then
17698   ac_lo=0 ac_mid=0
17699   while :; do
17700     cat >conftest.$ac_ext <<_ACEOF
17701 /* confdefs.h.  */
17702 _ACEOF
17703 cat confdefs.h >>conftest.$ac_ext
17704 cat >>conftest.$ac_ext <<_ACEOF
17705 /* end confdefs.h.  */
17706 $ac_includes_default
17707 int
17708 main ()
17709 {
17710 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17711 test_array [0] = 0
17712
17713   ;
17714   return 0;
17715 }
17716 _ACEOF
17717 rm -f conftest.$ac_objext
17718 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17719   (eval $ac_compile) 2>conftest.er1
17720   ac_status=$?
17721   grep -v '^ *+' conftest.er1 >conftest.err
17722   rm -f conftest.er1
17723   cat conftest.err >&5
17724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17725   (exit $ac_status); } &&
17726          { ac_try='test -z "$ac_c_werror_flag"
17727                          || test ! -s conftest.err'
17728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17729   (eval $ac_try) 2>&5
17730   ac_status=$?
17731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17732   (exit $ac_status); }; } &&
17733          { ac_try='test -s conftest.$ac_objext'
17734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17735   (eval $ac_try) 2>&5
17736   ac_status=$?
17737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17738   (exit $ac_status); }; }; then
17739   ac_hi=$ac_mid; break
17740 else
17741   echo "$as_me: failed program was:" >&5
17742 sed 's/^/| /' conftest.$ac_ext >&5
17743
17744 ac_lo=`expr $ac_mid + 1`
17745                     if test $ac_lo -le $ac_mid; then
17746                       ac_lo= ac_hi=
17747                       break
17748                     fi
17749                     ac_mid=`expr 2 '*' $ac_mid + 1`
17750 fi
17751 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17752   done
17753 else
17754   echo "$as_me: failed program was:" >&5
17755 sed 's/^/| /' conftest.$ac_ext >&5
17756
17757 cat >conftest.$ac_ext <<_ACEOF
17758 /* confdefs.h.  */
17759 _ACEOF
17760 cat confdefs.h >>conftest.$ac_ext
17761 cat >>conftest.$ac_ext <<_ACEOF
17762 /* end confdefs.h.  */
17763 $ac_includes_default
17764 int
17765 main ()
17766 {
17767 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
17768 test_array [0] = 0
17769
17770   ;
17771   return 0;
17772 }
17773 _ACEOF
17774 rm -f conftest.$ac_objext
17775 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17776   (eval $ac_compile) 2>conftest.er1
17777   ac_status=$?
17778   grep -v '^ *+' conftest.er1 >conftest.err
17779   rm -f conftest.er1
17780   cat conftest.err >&5
17781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17782   (exit $ac_status); } &&
17783          { ac_try='test -z "$ac_c_werror_flag"
17784                          || test ! -s conftest.err'
17785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17786   (eval $ac_try) 2>&5
17787   ac_status=$?
17788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17789   (exit $ac_status); }; } &&
17790          { ac_try='test -s conftest.$ac_objext'
17791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17792   (eval $ac_try) 2>&5
17793   ac_status=$?
17794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17795   (exit $ac_status); }; }; then
17796   ac_hi=-1 ac_mid=-1
17797   while :; do
17798     cat >conftest.$ac_ext <<_ACEOF
17799 /* confdefs.h.  */
17800 _ACEOF
17801 cat confdefs.h >>conftest.$ac_ext
17802 cat >>conftest.$ac_ext <<_ACEOF
17803 /* end confdefs.h.  */
17804 $ac_includes_default
17805 int
17806 main ()
17807 {
17808 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
17809 test_array [0] = 0
17810
17811   ;
17812   return 0;
17813 }
17814 _ACEOF
17815 rm -f conftest.$ac_objext
17816 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17817   (eval $ac_compile) 2>conftest.er1
17818   ac_status=$?
17819   grep -v '^ *+' conftest.er1 >conftest.err
17820   rm -f conftest.er1
17821   cat conftest.err >&5
17822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17823   (exit $ac_status); } &&
17824          { ac_try='test -z "$ac_c_werror_flag"
17825                          || test ! -s conftest.err'
17826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17827   (eval $ac_try) 2>&5
17828   ac_status=$?
17829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17830   (exit $ac_status); }; } &&
17831          { ac_try='test -s conftest.$ac_objext'
17832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17833   (eval $ac_try) 2>&5
17834   ac_status=$?
17835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17836   (exit $ac_status); }; }; then
17837   ac_lo=$ac_mid; break
17838 else
17839   echo "$as_me: failed program was:" >&5
17840 sed 's/^/| /' conftest.$ac_ext >&5
17841
17842 ac_hi=`expr '(' $ac_mid ')' - 1`
17843                        if test $ac_mid -le $ac_hi; then
17844                          ac_lo= ac_hi=
17845                          break
17846                        fi
17847                        ac_mid=`expr 2 '*' $ac_mid`
17848 fi
17849 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17850   done
17851 else
17852   echo "$as_me: failed program was:" >&5
17853 sed 's/^/| /' conftest.$ac_ext >&5
17854
17855 ac_lo= ac_hi=
17856 fi
17857 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17858 fi
17859 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17860 # Binary search between lo and hi bounds.
17861 while test "x$ac_lo" != "x$ac_hi"; do
17862   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17863   cat >conftest.$ac_ext <<_ACEOF
17864 /* confdefs.h.  */
17865 _ACEOF
17866 cat confdefs.h >>conftest.$ac_ext
17867 cat >>conftest.$ac_ext <<_ACEOF
17868 /* end confdefs.h.  */
17869 $ac_includes_default
17870 int
17871 main ()
17872 {
17873 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17874 test_array [0] = 0
17875
17876   ;
17877   return 0;
17878 }
17879 _ACEOF
17880 rm -f conftest.$ac_objext
17881 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17882   (eval $ac_compile) 2>conftest.er1
17883   ac_status=$?
17884   grep -v '^ *+' conftest.er1 >conftest.err
17885   rm -f conftest.er1
17886   cat conftest.err >&5
17887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17888   (exit $ac_status); } &&
17889          { ac_try='test -z "$ac_c_werror_flag"
17890                          || test ! -s conftest.err'
17891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17892   (eval $ac_try) 2>&5
17893   ac_status=$?
17894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17895   (exit $ac_status); }; } &&
17896          { ac_try='test -s conftest.$ac_objext'
17897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17898   (eval $ac_try) 2>&5
17899   ac_status=$?
17900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17901   (exit $ac_status); }; }; then
17902   ac_hi=$ac_mid
17903 else
17904   echo "$as_me: failed program was:" >&5
17905 sed 's/^/| /' conftest.$ac_ext >&5
17906
17907 ac_lo=`expr '(' $ac_mid ')' + 1`
17908 fi
17909 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17910 done
17911 case $ac_lo in
17912 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
17913 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
17914 See \`config.log' for more details." >&5
17915 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
17916 See \`config.log' for more details." >&2;}
17917    { (exit 1); exit 1; }; } ;;
17918 esac
17919 else
17920   if test "$cross_compiling" = yes; then
17921   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17922 See \`config.log' for more details." >&5
17923 echo "$as_me: error: cannot run test program while cross compiling
17924 See \`config.log' for more details." >&2;}
17925    { (exit 1); exit 1; }; }
17926 else
17927   cat >conftest.$ac_ext <<_ACEOF
17928 /* confdefs.h.  */
17929 _ACEOF
17930 cat confdefs.h >>conftest.$ac_ext
17931 cat >>conftest.$ac_ext <<_ACEOF
17932 /* end confdefs.h.  */
17933 $ac_includes_default
17934 long longval () { return (long) (sizeof (unsigned long)); }
17935 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
17936 #include <stdio.h>
17937 #include <stdlib.h>
17938 int
17939 main ()
17940 {
17941
17942   FILE *f = fopen ("conftest.val", "w");
17943   if (! f)
17944     exit (1);
17945   if (((long) (sizeof (unsigned long))) < 0)
17946     {
17947       long i = longval ();
17948       if (i != ((long) (sizeof (unsigned long))))
17949         exit (1);
17950       fprintf (f, "%ld\n", i);
17951     }
17952   else
17953     {
17954       unsigned long i = ulongval ();
17955       if (i != ((long) (sizeof (unsigned long))))
17956         exit (1);
17957       fprintf (f, "%lu\n", i);
17958     }
17959   exit (ferror (f) || fclose (f) != 0);
17960
17961   ;
17962   return 0;
17963 }
17964 _ACEOF
17965 rm -f conftest$ac_exeext
17966 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17967   (eval $ac_link) 2>&5
17968   ac_status=$?
17969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17970   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17972   (eval $ac_try) 2>&5
17973   ac_status=$?
17974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17975   (exit $ac_status); }; }; then
17976   ac_cv_sizeof_unsigned_long=`cat conftest.val`
17977 else
17978   echo "$as_me: program exited with status $ac_status" >&5
17979 echo "$as_me: failed program was:" >&5
17980 sed 's/^/| /' conftest.$ac_ext >&5
17981
17982 ( exit $ac_status )
17983 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
17984 See \`config.log' for more details." >&5
17985 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
17986 See \`config.log' for more details." >&2;}
17987    { (exit 1); exit 1; }; }
17988 fi
17989 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17990 fi
17991 fi
17992 rm -f conftest.val
17993 else
17994   ac_cv_sizeof_unsigned_long=0
17995 fi
17996 fi
17997 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
17998 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
17999 cat >>confdefs.h <<_ACEOF
18000 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18001 _ACEOF
18002
18003
18004
18005 # And one for the size of size_t (enables tweaks for > 32bit address space)
18006 echo "$as_me:$LINENO: checking for size_t" >&5
18007 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18008 if test "${ac_cv_type_size_t+set}" = set; then
18009   echo $ECHO_N "(cached) $ECHO_C" >&6
18010 else
18011   cat >conftest.$ac_ext <<_ACEOF
18012 /* confdefs.h.  */
18013 _ACEOF
18014 cat confdefs.h >>conftest.$ac_ext
18015 cat >>conftest.$ac_ext <<_ACEOF
18016 /* end confdefs.h.  */
18017 $ac_includes_default
18018 int
18019 main ()
18020 {
18021 if ((size_t *) 0)
18022   return 0;
18023 if (sizeof (size_t))
18024   return 0;
18025   ;
18026   return 0;
18027 }
18028 _ACEOF
18029 rm -f conftest.$ac_objext
18030 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18031   (eval $ac_compile) 2>conftest.er1
18032   ac_status=$?
18033   grep -v '^ *+' conftest.er1 >conftest.err
18034   rm -f conftest.er1
18035   cat conftest.err >&5
18036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18037   (exit $ac_status); } &&
18038          { ac_try='test -z "$ac_c_werror_flag"
18039                          || test ! -s conftest.err'
18040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18041   (eval $ac_try) 2>&5
18042   ac_status=$?
18043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18044   (exit $ac_status); }; } &&
18045          { ac_try='test -s conftest.$ac_objext'
18046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18047   (eval $ac_try) 2>&5
18048   ac_status=$?
18049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18050   (exit $ac_status); }; }; then
18051   ac_cv_type_size_t=yes
18052 else
18053   echo "$as_me: failed program was:" >&5
18054 sed 's/^/| /' conftest.$ac_ext >&5
18055
18056 ac_cv_type_size_t=no
18057 fi
18058 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18059 fi
18060 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18061 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18062
18063 echo "$as_me:$LINENO: checking size of size_t" >&5
18064 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18065 if test "${ac_cv_sizeof_size_t+set}" = set; then
18066   echo $ECHO_N "(cached) $ECHO_C" >&6
18067 else
18068   if test "$ac_cv_type_size_t" = yes; then
18069   # The cast to unsigned long works around a bug in the HP C Compiler
18070   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18071   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18072   # This bug is HP SR number 8606223364.
18073   if test "$cross_compiling" = yes; then
18074   # Depending upon the size, compute the lo and hi bounds.
18075 cat >conftest.$ac_ext <<_ACEOF
18076 /* confdefs.h.  */
18077 _ACEOF
18078 cat confdefs.h >>conftest.$ac_ext
18079 cat >>conftest.$ac_ext <<_ACEOF
18080 /* end confdefs.h.  */
18081 $ac_includes_default
18082 int
18083 main ()
18084 {
18085 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18086 test_array [0] = 0
18087
18088   ;
18089   return 0;
18090 }
18091 _ACEOF
18092 rm -f conftest.$ac_objext
18093 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18094   (eval $ac_compile) 2>conftest.er1
18095   ac_status=$?
18096   grep -v '^ *+' conftest.er1 >conftest.err
18097   rm -f conftest.er1
18098   cat conftest.err >&5
18099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18100   (exit $ac_status); } &&
18101          { ac_try='test -z "$ac_c_werror_flag"
18102                          || test ! -s conftest.err'
18103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18104   (eval $ac_try) 2>&5
18105   ac_status=$?
18106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18107   (exit $ac_status); }; } &&
18108          { ac_try='test -s conftest.$ac_objext'
18109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18110   (eval $ac_try) 2>&5
18111   ac_status=$?
18112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18113   (exit $ac_status); }; }; then
18114   ac_lo=0 ac_mid=0
18115   while :; do
18116     cat >conftest.$ac_ext <<_ACEOF
18117 /* confdefs.h.  */
18118 _ACEOF
18119 cat confdefs.h >>conftest.$ac_ext
18120 cat >>conftest.$ac_ext <<_ACEOF
18121 /* end confdefs.h.  */
18122 $ac_includes_default
18123 int
18124 main ()
18125 {
18126 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18127 test_array [0] = 0
18128
18129   ;
18130   return 0;
18131 }
18132 _ACEOF
18133 rm -f conftest.$ac_objext
18134 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18135   (eval $ac_compile) 2>conftest.er1
18136   ac_status=$?
18137   grep -v '^ *+' conftest.er1 >conftest.err
18138   rm -f conftest.er1
18139   cat conftest.err >&5
18140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18141   (exit $ac_status); } &&
18142          { ac_try='test -z "$ac_c_werror_flag"
18143                          || test ! -s conftest.err'
18144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18145   (eval $ac_try) 2>&5
18146   ac_status=$?
18147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18148   (exit $ac_status); }; } &&
18149          { ac_try='test -s conftest.$ac_objext'
18150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18151   (eval $ac_try) 2>&5
18152   ac_status=$?
18153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18154   (exit $ac_status); }; }; then
18155   ac_hi=$ac_mid; break
18156 else
18157   echo "$as_me: failed program was:" >&5
18158 sed 's/^/| /' conftest.$ac_ext >&5
18159
18160 ac_lo=`expr $ac_mid + 1`
18161                     if test $ac_lo -le $ac_mid; then
18162                       ac_lo= ac_hi=
18163                       break
18164                     fi
18165                     ac_mid=`expr 2 '*' $ac_mid + 1`
18166 fi
18167 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18168   done
18169 else
18170   echo "$as_me: failed program was:" >&5
18171 sed 's/^/| /' conftest.$ac_ext >&5
18172
18173 cat >conftest.$ac_ext <<_ACEOF
18174 /* confdefs.h.  */
18175 _ACEOF
18176 cat confdefs.h >>conftest.$ac_ext
18177 cat >>conftest.$ac_ext <<_ACEOF
18178 /* end confdefs.h.  */
18179 $ac_includes_default
18180 int
18181 main ()
18182 {
18183 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18184 test_array [0] = 0
18185
18186   ;
18187   return 0;
18188 }
18189 _ACEOF
18190 rm -f conftest.$ac_objext
18191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18192   (eval $ac_compile) 2>conftest.er1
18193   ac_status=$?
18194   grep -v '^ *+' conftest.er1 >conftest.err
18195   rm -f conftest.er1
18196   cat conftest.err >&5
18197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18198   (exit $ac_status); } &&
18199          { ac_try='test -z "$ac_c_werror_flag"
18200                          || test ! -s conftest.err'
18201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18202   (eval $ac_try) 2>&5
18203   ac_status=$?
18204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18205   (exit $ac_status); }; } &&
18206          { ac_try='test -s conftest.$ac_objext'
18207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18208   (eval $ac_try) 2>&5
18209   ac_status=$?
18210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18211   (exit $ac_status); }; }; then
18212   ac_hi=-1 ac_mid=-1
18213   while :; do
18214     cat >conftest.$ac_ext <<_ACEOF
18215 /* confdefs.h.  */
18216 _ACEOF
18217 cat confdefs.h >>conftest.$ac_ext
18218 cat >>conftest.$ac_ext <<_ACEOF
18219 /* end confdefs.h.  */
18220 $ac_includes_default
18221 int
18222 main ()
18223 {
18224 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18225 test_array [0] = 0
18226
18227   ;
18228   return 0;
18229 }
18230 _ACEOF
18231 rm -f conftest.$ac_objext
18232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18233   (eval $ac_compile) 2>conftest.er1
18234   ac_status=$?
18235   grep -v '^ *+' conftest.er1 >conftest.err
18236   rm -f conftest.er1
18237   cat conftest.err >&5
18238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18239   (exit $ac_status); } &&
18240          { ac_try='test -z "$ac_c_werror_flag"
18241                          || test ! -s conftest.err'
18242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18243   (eval $ac_try) 2>&5
18244   ac_status=$?
18245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18246   (exit $ac_status); }; } &&
18247          { ac_try='test -s conftest.$ac_objext'
18248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18249   (eval $ac_try) 2>&5
18250   ac_status=$?
18251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18252   (exit $ac_status); }; }; then
18253   ac_lo=$ac_mid; break
18254 else
18255   echo "$as_me: failed program was:" >&5
18256 sed 's/^/| /' conftest.$ac_ext >&5
18257
18258 ac_hi=`expr '(' $ac_mid ')' - 1`
18259                        if test $ac_mid -le $ac_hi; then
18260                          ac_lo= ac_hi=
18261                          break
18262                        fi
18263                        ac_mid=`expr 2 '*' $ac_mid`
18264 fi
18265 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18266   done
18267 else
18268   echo "$as_me: failed program was:" >&5
18269 sed 's/^/| /' conftest.$ac_ext >&5
18270
18271 ac_lo= ac_hi=
18272 fi
18273 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18274 fi
18275 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18276 # Binary search between lo and hi bounds.
18277 while test "x$ac_lo" != "x$ac_hi"; do
18278   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18279   cat >conftest.$ac_ext <<_ACEOF
18280 /* confdefs.h.  */
18281 _ACEOF
18282 cat confdefs.h >>conftest.$ac_ext
18283 cat >>conftest.$ac_ext <<_ACEOF
18284 /* end confdefs.h.  */
18285 $ac_includes_default
18286 int
18287 main ()
18288 {
18289 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18290 test_array [0] = 0
18291
18292   ;
18293   return 0;
18294 }
18295 _ACEOF
18296 rm -f conftest.$ac_objext
18297 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18298   (eval $ac_compile) 2>conftest.er1
18299   ac_status=$?
18300   grep -v '^ *+' conftest.er1 >conftest.err
18301   rm -f conftest.er1
18302   cat conftest.err >&5
18303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18304   (exit $ac_status); } &&
18305          { ac_try='test -z "$ac_c_werror_flag"
18306                          || test ! -s conftest.err'
18307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18308   (eval $ac_try) 2>&5
18309   ac_status=$?
18310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18311   (exit $ac_status); }; } &&
18312          { ac_try='test -s conftest.$ac_objext'
18313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18314   (eval $ac_try) 2>&5
18315   ac_status=$?
18316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18317   (exit $ac_status); }; }; then
18318   ac_hi=$ac_mid
18319 else
18320   echo "$as_me: failed program was:" >&5
18321 sed 's/^/| /' conftest.$ac_ext >&5
18322
18323 ac_lo=`expr '(' $ac_mid ')' + 1`
18324 fi
18325 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18326 done
18327 case $ac_lo in
18328 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18329 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18330 See \`config.log' for more details." >&5
18331 echo "$as_me: error: cannot compute sizeof (size_t), 77
18332 See \`config.log' for more details." >&2;}
18333    { (exit 1); exit 1; }; } ;;
18334 esac
18335 else
18336   if test "$cross_compiling" = yes; then
18337   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18338 See \`config.log' for more details." >&5
18339 echo "$as_me: error: cannot run test program while cross compiling
18340 See \`config.log' for more details." >&2;}
18341    { (exit 1); exit 1; }; }
18342 else
18343   cat >conftest.$ac_ext <<_ACEOF
18344 /* confdefs.h.  */
18345 _ACEOF
18346 cat confdefs.h >>conftest.$ac_ext
18347 cat >>conftest.$ac_ext <<_ACEOF
18348 /* end confdefs.h.  */
18349 $ac_includes_default
18350 long longval () { return (long) (sizeof (size_t)); }
18351 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18352 #include <stdio.h>
18353 #include <stdlib.h>
18354 int
18355 main ()
18356 {
18357
18358   FILE *f = fopen ("conftest.val", "w");
18359   if (! f)
18360     exit (1);
18361   if (((long) (sizeof (size_t))) < 0)
18362     {
18363       long i = longval ();
18364       if (i != ((long) (sizeof (size_t))))
18365         exit (1);
18366       fprintf (f, "%ld\n", i);
18367     }
18368   else
18369     {
18370       unsigned long i = ulongval ();
18371       if (i != ((long) (sizeof (size_t))))
18372         exit (1);
18373       fprintf (f, "%lu\n", i);
18374     }
18375   exit (ferror (f) || fclose (f) != 0);
18376
18377   ;
18378   return 0;
18379 }
18380 _ACEOF
18381 rm -f conftest$ac_exeext
18382 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18383   (eval $ac_link) 2>&5
18384   ac_status=$?
18385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18386   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18388   (eval $ac_try) 2>&5
18389   ac_status=$?
18390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18391   (exit $ac_status); }; }; then
18392   ac_cv_sizeof_size_t=`cat conftest.val`
18393 else
18394   echo "$as_me: program exited with status $ac_status" >&5
18395 echo "$as_me: failed program was:" >&5
18396 sed 's/^/| /' conftest.$ac_ext >&5
18397
18398 ( exit $ac_status )
18399 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18400 See \`config.log' for more details." >&5
18401 echo "$as_me: error: cannot compute sizeof (size_t), 77
18402 See \`config.log' for more details." >&2;}
18403    { (exit 1); exit 1; }; }
18404 fi
18405 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18406 fi
18407 fi
18408 rm -f conftest.val
18409 else
18410   ac_cv_sizeof_size_t=0
18411 fi
18412 fi
18413 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18414 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18415 cat >>confdefs.h <<_ACEOF
18416 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18417 _ACEOF
18418
18419
18420
18421 # Determine memory alignment requirements for the basic C data types.
18422
18423 echo "$as_me:$LINENO: checking for short" >&5
18424 echo $ECHO_N "checking for short... $ECHO_C" >&6
18425 if test "${ac_cv_type_short+set}" = set; then
18426   echo $ECHO_N "(cached) $ECHO_C" >&6
18427 else
18428   cat >conftest.$ac_ext <<_ACEOF
18429 /* confdefs.h.  */
18430 _ACEOF
18431 cat confdefs.h >>conftest.$ac_ext
18432 cat >>conftest.$ac_ext <<_ACEOF
18433 /* end confdefs.h.  */
18434 $ac_includes_default
18435 int
18436 main ()
18437 {
18438 if ((short *) 0)
18439   return 0;
18440 if (sizeof (short))
18441   return 0;
18442   ;
18443   return 0;
18444 }
18445 _ACEOF
18446 rm -f conftest.$ac_objext
18447 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18448   (eval $ac_compile) 2>conftest.er1
18449   ac_status=$?
18450   grep -v '^ *+' conftest.er1 >conftest.err
18451   rm -f conftest.er1
18452   cat conftest.err >&5
18453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18454   (exit $ac_status); } &&
18455          { ac_try='test -z "$ac_c_werror_flag"
18456                          || test ! -s conftest.err'
18457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18458   (eval $ac_try) 2>&5
18459   ac_status=$?
18460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18461   (exit $ac_status); }; } &&
18462          { ac_try='test -s conftest.$ac_objext'
18463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18464   (eval $ac_try) 2>&5
18465   ac_status=$?
18466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18467   (exit $ac_status); }; }; then
18468   ac_cv_type_short=yes
18469 else
18470   echo "$as_me: failed program was:" >&5
18471 sed 's/^/| /' conftest.$ac_ext >&5
18472
18473 ac_cv_type_short=no
18474 fi
18475 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18476 fi
18477 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18478 echo "${ECHO_T}$ac_cv_type_short" >&6
18479
18480 echo "$as_me:$LINENO: checking alignment of short" >&5
18481 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18482 if test "${pgac_cv_alignof_short+set}" = set; then
18483   echo $ECHO_N "(cached) $ECHO_C" >&6
18484 else
18485   if test "$ac_cv_type_short" = yes; then
18486   if test "$cross_compiling" = yes; then
18487   # Depending upon the size, compute the lo and hi bounds.
18488 cat >conftest.$ac_ext <<_ACEOF
18489 /* confdefs.h.  */
18490 _ACEOF
18491 cat confdefs.h >>conftest.$ac_ext
18492 cat >>conftest.$ac_ext <<_ACEOF
18493 /* end confdefs.h.  */
18494 $ac_includes_default
18495 struct { char filler; short field; } pgac_struct;
18496 int
18497 main ()
18498 {
18499 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18500 test_array [0] = 0
18501
18502   ;
18503   return 0;
18504 }
18505 _ACEOF
18506 rm -f conftest.$ac_objext
18507 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18508   (eval $ac_compile) 2>conftest.er1
18509   ac_status=$?
18510   grep -v '^ *+' conftest.er1 >conftest.err
18511   rm -f conftest.er1
18512   cat conftest.err >&5
18513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18514   (exit $ac_status); } &&
18515          { ac_try='test -z "$ac_c_werror_flag"
18516                          || test ! -s conftest.err'
18517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18518   (eval $ac_try) 2>&5
18519   ac_status=$?
18520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18521   (exit $ac_status); }; } &&
18522          { ac_try='test -s conftest.$ac_objext'
18523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18524   (eval $ac_try) 2>&5
18525   ac_status=$?
18526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18527   (exit $ac_status); }; }; then
18528   ac_lo=0 ac_mid=0
18529   while :; do
18530     cat >conftest.$ac_ext <<_ACEOF
18531 /* confdefs.h.  */
18532 _ACEOF
18533 cat confdefs.h >>conftest.$ac_ext
18534 cat >>conftest.$ac_ext <<_ACEOF
18535 /* end confdefs.h.  */
18536 $ac_includes_default
18537 struct { char filler; short field; } pgac_struct;
18538 int
18539 main ()
18540 {
18541 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18542 test_array [0] = 0
18543
18544   ;
18545   return 0;
18546 }
18547 _ACEOF
18548 rm -f conftest.$ac_objext
18549 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18550   (eval $ac_compile) 2>conftest.er1
18551   ac_status=$?
18552   grep -v '^ *+' conftest.er1 >conftest.err
18553   rm -f conftest.er1
18554   cat conftest.err >&5
18555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18556   (exit $ac_status); } &&
18557          { ac_try='test -z "$ac_c_werror_flag"
18558                          || test ! -s conftest.err'
18559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18560   (eval $ac_try) 2>&5
18561   ac_status=$?
18562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18563   (exit $ac_status); }; } &&
18564          { ac_try='test -s conftest.$ac_objext'
18565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18566   (eval $ac_try) 2>&5
18567   ac_status=$?
18568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18569   (exit $ac_status); }; }; then
18570   ac_hi=$ac_mid; break
18571 else
18572   echo "$as_me: failed program was:" >&5
18573 sed 's/^/| /' conftest.$ac_ext >&5
18574
18575 ac_lo=`expr $ac_mid + 1`
18576                     if test $ac_lo -le $ac_mid; then
18577                       ac_lo= ac_hi=
18578                       break
18579                     fi
18580                     ac_mid=`expr 2 '*' $ac_mid + 1`
18581 fi
18582 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18583   done
18584 else
18585   echo "$as_me: failed program was:" >&5
18586 sed 's/^/| /' conftest.$ac_ext >&5
18587
18588 cat >conftest.$ac_ext <<_ACEOF
18589 /* confdefs.h.  */
18590 _ACEOF
18591 cat confdefs.h >>conftest.$ac_ext
18592 cat >>conftest.$ac_ext <<_ACEOF
18593 /* end confdefs.h.  */
18594 $ac_includes_default
18595 struct { char filler; short field; } pgac_struct;
18596 int
18597 main ()
18598 {
18599 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18600 test_array [0] = 0
18601
18602   ;
18603   return 0;
18604 }
18605 _ACEOF
18606 rm -f conftest.$ac_objext
18607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18608   (eval $ac_compile) 2>conftest.er1
18609   ac_status=$?
18610   grep -v '^ *+' conftest.er1 >conftest.err
18611   rm -f conftest.er1
18612   cat conftest.err >&5
18613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18614   (exit $ac_status); } &&
18615          { ac_try='test -z "$ac_c_werror_flag"
18616                          || test ! -s conftest.err'
18617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18618   (eval $ac_try) 2>&5
18619   ac_status=$?
18620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18621   (exit $ac_status); }; } &&
18622          { ac_try='test -s conftest.$ac_objext'
18623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18624   (eval $ac_try) 2>&5
18625   ac_status=$?
18626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18627   (exit $ac_status); }; }; then
18628   ac_hi=-1 ac_mid=-1
18629   while :; do
18630     cat >conftest.$ac_ext <<_ACEOF
18631 /* confdefs.h.  */
18632 _ACEOF
18633 cat confdefs.h >>conftest.$ac_ext
18634 cat >>conftest.$ac_ext <<_ACEOF
18635 /* end confdefs.h.  */
18636 $ac_includes_default
18637 struct { char filler; short field; } pgac_struct;
18638 int
18639 main ()
18640 {
18641 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18642 test_array [0] = 0
18643
18644   ;
18645   return 0;
18646 }
18647 _ACEOF
18648 rm -f conftest.$ac_objext
18649 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18650   (eval $ac_compile) 2>conftest.er1
18651   ac_status=$?
18652   grep -v '^ *+' conftest.er1 >conftest.err
18653   rm -f conftest.er1
18654   cat conftest.err >&5
18655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18656   (exit $ac_status); } &&
18657          { ac_try='test -z "$ac_c_werror_flag"
18658                          || test ! -s conftest.err'
18659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18660   (eval $ac_try) 2>&5
18661   ac_status=$?
18662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18663   (exit $ac_status); }; } &&
18664          { ac_try='test -s conftest.$ac_objext'
18665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18666   (eval $ac_try) 2>&5
18667   ac_status=$?
18668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18669   (exit $ac_status); }; }; then
18670   ac_lo=$ac_mid; break
18671 else
18672   echo "$as_me: failed program was:" >&5
18673 sed 's/^/| /' conftest.$ac_ext >&5
18674
18675 ac_hi=`expr '(' $ac_mid ')' - 1`
18676                        if test $ac_mid -le $ac_hi; then
18677                          ac_lo= ac_hi=
18678                          break
18679                        fi
18680                        ac_mid=`expr 2 '*' $ac_mid`
18681 fi
18682 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18683   done
18684 else
18685   echo "$as_me: failed program was:" >&5
18686 sed 's/^/| /' conftest.$ac_ext >&5
18687
18688 ac_lo= ac_hi=
18689 fi
18690 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18691 fi
18692 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18693 # Binary search between lo and hi bounds.
18694 while test "x$ac_lo" != "x$ac_hi"; do
18695   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18696   cat >conftest.$ac_ext <<_ACEOF
18697 /* confdefs.h.  */
18698 _ACEOF
18699 cat confdefs.h >>conftest.$ac_ext
18700 cat >>conftest.$ac_ext <<_ACEOF
18701 /* end confdefs.h.  */
18702 $ac_includes_default
18703 struct { char filler; short field; } pgac_struct;
18704 int
18705 main ()
18706 {
18707 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18708 test_array [0] = 0
18709
18710   ;
18711   return 0;
18712 }
18713 _ACEOF
18714 rm -f conftest.$ac_objext
18715 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18716   (eval $ac_compile) 2>conftest.er1
18717   ac_status=$?
18718   grep -v '^ *+' conftest.er1 >conftest.err
18719   rm -f conftest.er1
18720   cat conftest.err >&5
18721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18722   (exit $ac_status); } &&
18723          { ac_try='test -z "$ac_c_werror_flag"
18724                          || test ! -s conftest.err'
18725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18726   (eval $ac_try) 2>&5
18727   ac_status=$?
18728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18729   (exit $ac_status); }; } &&
18730          { ac_try='test -s conftest.$ac_objext'
18731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18732   (eval $ac_try) 2>&5
18733   ac_status=$?
18734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18735   (exit $ac_status); }; }; then
18736   ac_hi=$ac_mid
18737 else
18738   echo "$as_me: failed program was:" >&5
18739 sed 's/^/| /' conftest.$ac_ext >&5
18740
18741 ac_lo=`expr '(' $ac_mid ')' + 1`
18742 fi
18743 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18744 done
18745 case $ac_lo in
18746 ?*) pgac_cv_alignof_short=$ac_lo;;
18747 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18748 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18749    { (exit 1); exit 1; }; } ;;
18750 esac
18751 else
18752   if test "$cross_compiling" = yes; then
18753   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18754 See \`config.log' for more details." >&5
18755 echo "$as_me: error: cannot run test program while cross compiling
18756 See \`config.log' for more details." >&2;}
18757    { (exit 1); exit 1; }; }
18758 else
18759   cat >conftest.$ac_ext <<_ACEOF
18760 /* confdefs.h.  */
18761 _ACEOF
18762 cat confdefs.h >>conftest.$ac_ext
18763 cat >>conftest.$ac_ext <<_ACEOF
18764 /* end confdefs.h.  */
18765 $ac_includes_default
18766 struct { char filler; short field; } pgac_struct;
18767 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18768 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18769 #include <stdio.h>
18770 #include <stdlib.h>
18771 int
18772 main ()
18773 {
18774
18775   FILE *f = fopen ("conftest.val", "w");
18776   if (! f)
18777     exit (1);
18778   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
18779     {
18780       long i = longval ();
18781       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18782         exit (1);
18783       fprintf (f, "%ld\n", i);
18784     }
18785   else
18786     {
18787       unsigned long i = ulongval ();
18788       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18789         exit (1);
18790       fprintf (f, "%lu\n", i);
18791     }
18792   exit (ferror (f) || fclose (f) != 0);
18793
18794   ;
18795   return 0;
18796 }
18797 _ACEOF
18798 rm -f conftest$ac_exeext
18799 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18800   (eval $ac_link) 2>&5
18801   ac_status=$?
18802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18803   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18805   (eval $ac_try) 2>&5
18806   ac_status=$?
18807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18808   (exit $ac_status); }; }; then
18809   pgac_cv_alignof_short=`cat conftest.val`
18810 else
18811   echo "$as_me: program exited with status $ac_status" >&5
18812 echo "$as_me: failed program was:" >&5
18813 sed 's/^/| /' conftest.$ac_ext >&5
18814
18815 ( exit $ac_status )
18816 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18817 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18818    { (exit 1); exit 1; }; }
18819 fi
18820 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18821 fi
18822 fi
18823 rm -f conftest.val
18824 else
18825   pgac_cv_alignof_short=0
18826 fi
18827 fi
18828 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
18829 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
18830 cat >>confdefs.h <<_ACEOF
18831 #define ALIGNOF_SHORT $pgac_cv_alignof_short
18832 _ACEOF
18833
18834
18835 echo "$as_me:$LINENO: checking for int" >&5
18836 echo $ECHO_N "checking for int... $ECHO_C" >&6
18837 if test "${ac_cv_type_int+set}" = set; then
18838   echo $ECHO_N "(cached) $ECHO_C" >&6
18839 else
18840   cat >conftest.$ac_ext <<_ACEOF
18841 /* confdefs.h.  */
18842 _ACEOF
18843 cat confdefs.h >>conftest.$ac_ext
18844 cat >>conftest.$ac_ext <<_ACEOF
18845 /* end confdefs.h.  */
18846 $ac_includes_default
18847 int
18848 main ()
18849 {
18850 if ((int *) 0)
18851   return 0;
18852 if (sizeof (int))
18853   return 0;
18854   ;
18855   return 0;
18856 }
18857 _ACEOF
18858 rm -f conftest.$ac_objext
18859 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18860   (eval $ac_compile) 2>conftest.er1
18861   ac_status=$?
18862   grep -v '^ *+' conftest.er1 >conftest.err
18863   rm -f conftest.er1
18864   cat conftest.err >&5
18865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18866   (exit $ac_status); } &&
18867          { ac_try='test -z "$ac_c_werror_flag"
18868                          || test ! -s conftest.err'
18869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18870   (eval $ac_try) 2>&5
18871   ac_status=$?
18872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18873   (exit $ac_status); }; } &&
18874          { ac_try='test -s conftest.$ac_objext'
18875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18876   (eval $ac_try) 2>&5
18877   ac_status=$?
18878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18879   (exit $ac_status); }; }; then
18880   ac_cv_type_int=yes
18881 else
18882   echo "$as_me: failed program was:" >&5
18883 sed 's/^/| /' conftest.$ac_ext >&5
18884
18885 ac_cv_type_int=no
18886 fi
18887 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18888 fi
18889 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
18890 echo "${ECHO_T}$ac_cv_type_int" >&6
18891
18892 echo "$as_me:$LINENO: checking alignment of int" >&5
18893 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
18894 if test "${pgac_cv_alignof_int+set}" = set; then
18895   echo $ECHO_N "(cached) $ECHO_C" >&6
18896 else
18897   if test "$ac_cv_type_int" = yes; then
18898   if test "$cross_compiling" = yes; then
18899   # Depending upon the size, compute the lo and hi bounds.
18900 cat >conftest.$ac_ext <<_ACEOF
18901 /* confdefs.h.  */
18902 _ACEOF
18903 cat confdefs.h >>conftest.$ac_ext
18904 cat >>conftest.$ac_ext <<_ACEOF
18905 /* end confdefs.h.  */
18906 $ac_includes_default
18907 struct { char filler; int field; } pgac_struct;
18908 int
18909 main ()
18910 {
18911 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18912 test_array [0] = 0
18913
18914   ;
18915   return 0;
18916 }
18917 _ACEOF
18918 rm -f conftest.$ac_objext
18919 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18920   (eval $ac_compile) 2>conftest.er1
18921   ac_status=$?
18922   grep -v '^ *+' conftest.er1 >conftest.err
18923   rm -f conftest.er1
18924   cat conftest.err >&5
18925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18926   (exit $ac_status); } &&
18927          { ac_try='test -z "$ac_c_werror_flag"
18928                          || test ! -s conftest.err'
18929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18930   (eval $ac_try) 2>&5
18931   ac_status=$?
18932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18933   (exit $ac_status); }; } &&
18934          { ac_try='test -s conftest.$ac_objext'
18935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18936   (eval $ac_try) 2>&5
18937   ac_status=$?
18938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18939   (exit $ac_status); }; }; then
18940   ac_lo=0 ac_mid=0
18941   while :; do
18942     cat >conftest.$ac_ext <<_ACEOF
18943 /* confdefs.h.  */
18944 _ACEOF
18945 cat confdefs.h >>conftest.$ac_ext
18946 cat >>conftest.$ac_ext <<_ACEOF
18947 /* end confdefs.h.  */
18948 $ac_includes_default
18949 struct { char filler; int field; } pgac_struct;
18950 int
18951 main ()
18952 {
18953 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18954 test_array [0] = 0
18955
18956   ;
18957   return 0;
18958 }
18959 _ACEOF
18960 rm -f conftest.$ac_objext
18961 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18962   (eval $ac_compile) 2>conftest.er1
18963   ac_status=$?
18964   grep -v '^ *+' conftest.er1 >conftest.err
18965   rm -f conftest.er1
18966   cat conftest.err >&5
18967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18968   (exit $ac_status); } &&
18969          { ac_try='test -z "$ac_c_werror_flag"
18970                          || test ! -s conftest.err'
18971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18972   (eval $ac_try) 2>&5
18973   ac_status=$?
18974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18975   (exit $ac_status); }; } &&
18976          { ac_try='test -s conftest.$ac_objext'
18977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18978   (eval $ac_try) 2>&5
18979   ac_status=$?
18980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18981   (exit $ac_status); }; }; then
18982   ac_hi=$ac_mid; break
18983 else
18984   echo "$as_me: failed program was:" >&5
18985 sed 's/^/| /' conftest.$ac_ext >&5
18986
18987 ac_lo=`expr $ac_mid + 1`
18988                     if test $ac_lo -le $ac_mid; then
18989                       ac_lo= ac_hi=
18990                       break
18991                     fi
18992                     ac_mid=`expr 2 '*' $ac_mid + 1`
18993 fi
18994 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18995   done
18996 else
18997   echo "$as_me: failed program was:" >&5
18998 sed 's/^/| /' conftest.$ac_ext >&5
18999
19000 cat >conftest.$ac_ext <<_ACEOF
19001 /* confdefs.h.  */
19002 _ACEOF
19003 cat confdefs.h >>conftest.$ac_ext
19004 cat >>conftest.$ac_ext <<_ACEOF
19005 /* end confdefs.h.  */
19006 $ac_includes_default
19007 struct { char filler; int field; } pgac_struct;
19008 int
19009 main ()
19010 {
19011 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19012 test_array [0] = 0
19013
19014   ;
19015   return 0;
19016 }
19017 _ACEOF
19018 rm -f conftest.$ac_objext
19019 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19020   (eval $ac_compile) 2>conftest.er1
19021   ac_status=$?
19022   grep -v '^ *+' conftest.er1 >conftest.err
19023   rm -f conftest.er1
19024   cat conftest.err >&5
19025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19026   (exit $ac_status); } &&
19027          { ac_try='test -z "$ac_c_werror_flag"
19028                          || test ! -s conftest.err'
19029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19030   (eval $ac_try) 2>&5
19031   ac_status=$?
19032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19033   (exit $ac_status); }; } &&
19034          { ac_try='test -s conftest.$ac_objext'
19035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19036   (eval $ac_try) 2>&5
19037   ac_status=$?
19038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19039   (exit $ac_status); }; }; then
19040   ac_hi=-1 ac_mid=-1
19041   while :; do
19042     cat >conftest.$ac_ext <<_ACEOF
19043 /* confdefs.h.  */
19044 _ACEOF
19045 cat confdefs.h >>conftest.$ac_ext
19046 cat >>conftest.$ac_ext <<_ACEOF
19047 /* end confdefs.h.  */
19048 $ac_includes_default
19049 struct { char filler; int field; } pgac_struct;
19050 int
19051 main ()
19052 {
19053 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19054 test_array [0] = 0
19055
19056   ;
19057   return 0;
19058 }
19059 _ACEOF
19060 rm -f conftest.$ac_objext
19061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19062   (eval $ac_compile) 2>conftest.er1
19063   ac_status=$?
19064   grep -v '^ *+' conftest.er1 >conftest.err
19065   rm -f conftest.er1
19066   cat conftest.err >&5
19067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19068   (exit $ac_status); } &&
19069          { ac_try='test -z "$ac_c_werror_flag"
19070                          || test ! -s conftest.err'
19071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19072   (eval $ac_try) 2>&5
19073   ac_status=$?
19074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19075   (exit $ac_status); }; } &&
19076          { ac_try='test -s conftest.$ac_objext'
19077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19078   (eval $ac_try) 2>&5
19079   ac_status=$?
19080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19081   (exit $ac_status); }; }; then
19082   ac_lo=$ac_mid; break
19083 else
19084   echo "$as_me: failed program was:" >&5
19085 sed 's/^/| /' conftest.$ac_ext >&5
19086
19087 ac_hi=`expr '(' $ac_mid ')' - 1`
19088                        if test $ac_mid -le $ac_hi; then
19089                          ac_lo= ac_hi=
19090                          break
19091                        fi
19092                        ac_mid=`expr 2 '*' $ac_mid`
19093 fi
19094 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19095   done
19096 else
19097   echo "$as_me: failed program was:" >&5
19098 sed 's/^/| /' conftest.$ac_ext >&5
19099
19100 ac_lo= ac_hi=
19101 fi
19102 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19103 fi
19104 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19105 # Binary search between lo and hi bounds.
19106 while test "x$ac_lo" != "x$ac_hi"; do
19107   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19108   cat >conftest.$ac_ext <<_ACEOF
19109 /* confdefs.h.  */
19110 _ACEOF
19111 cat confdefs.h >>conftest.$ac_ext
19112 cat >>conftest.$ac_ext <<_ACEOF
19113 /* end confdefs.h.  */
19114 $ac_includes_default
19115 struct { char filler; int field; } pgac_struct;
19116 int
19117 main ()
19118 {
19119 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19120 test_array [0] = 0
19121
19122   ;
19123   return 0;
19124 }
19125 _ACEOF
19126 rm -f conftest.$ac_objext
19127 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19128   (eval $ac_compile) 2>conftest.er1
19129   ac_status=$?
19130   grep -v '^ *+' conftest.er1 >conftest.err
19131   rm -f conftest.er1
19132   cat conftest.err >&5
19133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19134   (exit $ac_status); } &&
19135          { ac_try='test -z "$ac_c_werror_flag"
19136                          || test ! -s conftest.err'
19137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19138   (eval $ac_try) 2>&5
19139   ac_status=$?
19140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19141   (exit $ac_status); }; } &&
19142          { ac_try='test -s conftest.$ac_objext'
19143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19144   (eval $ac_try) 2>&5
19145   ac_status=$?
19146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19147   (exit $ac_status); }; }; then
19148   ac_hi=$ac_mid
19149 else
19150   echo "$as_me: failed program was:" >&5
19151 sed 's/^/| /' conftest.$ac_ext >&5
19152
19153 ac_lo=`expr '(' $ac_mid ')' + 1`
19154 fi
19155 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19156 done
19157 case $ac_lo in
19158 ?*) pgac_cv_alignof_int=$ac_lo;;
19159 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19160 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19161    { (exit 1); exit 1; }; } ;;
19162 esac
19163 else
19164   if test "$cross_compiling" = yes; then
19165   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19166 See \`config.log' for more details." >&5
19167 echo "$as_me: error: cannot run test program while cross compiling
19168 See \`config.log' for more details." >&2;}
19169    { (exit 1); exit 1; }; }
19170 else
19171   cat >conftest.$ac_ext <<_ACEOF
19172 /* confdefs.h.  */
19173 _ACEOF
19174 cat confdefs.h >>conftest.$ac_ext
19175 cat >>conftest.$ac_ext <<_ACEOF
19176 /* end confdefs.h.  */
19177 $ac_includes_default
19178 struct { char filler; int field; } pgac_struct;
19179 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19180 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19181 #include <stdio.h>
19182 #include <stdlib.h>
19183 int
19184 main ()
19185 {
19186
19187   FILE *f = fopen ("conftest.val", "w");
19188   if (! f)
19189     exit (1);
19190   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19191     {
19192       long i = longval ();
19193       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19194         exit (1);
19195       fprintf (f, "%ld\n", i);
19196     }
19197   else
19198     {
19199       unsigned long i = ulongval ();
19200       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19201         exit (1);
19202       fprintf (f, "%lu\n", i);
19203     }
19204   exit (ferror (f) || fclose (f) != 0);
19205
19206   ;
19207   return 0;
19208 }
19209 _ACEOF
19210 rm -f conftest$ac_exeext
19211 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19212   (eval $ac_link) 2>&5
19213   ac_status=$?
19214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19215   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19217   (eval $ac_try) 2>&5
19218   ac_status=$?
19219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19220   (exit $ac_status); }; }; then
19221   pgac_cv_alignof_int=`cat conftest.val`
19222 else
19223   echo "$as_me: program exited with status $ac_status" >&5
19224 echo "$as_me: failed program was:" >&5
19225 sed 's/^/| /' conftest.$ac_ext >&5
19226
19227 ( exit $ac_status )
19228 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19229 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19230    { (exit 1); exit 1; }; }
19231 fi
19232 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19233 fi
19234 fi
19235 rm -f conftest.val
19236 else
19237   pgac_cv_alignof_int=0
19238 fi
19239 fi
19240 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19241 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19242 cat >>confdefs.h <<_ACEOF
19243 #define ALIGNOF_INT $pgac_cv_alignof_int
19244 _ACEOF
19245
19246
19247 echo "$as_me:$LINENO: checking for long" >&5
19248 echo $ECHO_N "checking for long... $ECHO_C" >&6
19249 if test "${ac_cv_type_long+set}" = set; then
19250   echo $ECHO_N "(cached) $ECHO_C" >&6
19251 else
19252   cat >conftest.$ac_ext <<_ACEOF
19253 /* confdefs.h.  */
19254 _ACEOF
19255 cat confdefs.h >>conftest.$ac_ext
19256 cat >>conftest.$ac_ext <<_ACEOF
19257 /* end confdefs.h.  */
19258 $ac_includes_default
19259 int
19260 main ()
19261 {
19262 if ((long *) 0)
19263   return 0;
19264 if (sizeof (long))
19265   return 0;
19266   ;
19267   return 0;
19268 }
19269 _ACEOF
19270 rm -f conftest.$ac_objext
19271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19272   (eval $ac_compile) 2>conftest.er1
19273   ac_status=$?
19274   grep -v '^ *+' conftest.er1 >conftest.err
19275   rm -f conftest.er1
19276   cat conftest.err >&5
19277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19278   (exit $ac_status); } &&
19279          { ac_try='test -z "$ac_c_werror_flag"
19280                          || test ! -s conftest.err'
19281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19282   (eval $ac_try) 2>&5
19283   ac_status=$?
19284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19285   (exit $ac_status); }; } &&
19286          { ac_try='test -s conftest.$ac_objext'
19287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19288   (eval $ac_try) 2>&5
19289   ac_status=$?
19290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19291   (exit $ac_status); }; }; then
19292   ac_cv_type_long=yes
19293 else
19294   echo "$as_me: failed program was:" >&5
19295 sed 's/^/| /' conftest.$ac_ext >&5
19296
19297 ac_cv_type_long=no
19298 fi
19299 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19300 fi
19301 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19302 echo "${ECHO_T}$ac_cv_type_long" >&6
19303
19304 echo "$as_me:$LINENO: checking alignment of long" >&5
19305 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19306 if test "${pgac_cv_alignof_long+set}" = set; then
19307   echo $ECHO_N "(cached) $ECHO_C" >&6
19308 else
19309   if test "$ac_cv_type_long" = yes; then
19310   if test "$cross_compiling" = yes; then
19311   # Depending upon the size, compute the lo and hi bounds.
19312 cat >conftest.$ac_ext <<_ACEOF
19313 /* confdefs.h.  */
19314 _ACEOF
19315 cat confdefs.h >>conftest.$ac_ext
19316 cat >>conftest.$ac_ext <<_ACEOF
19317 /* end confdefs.h.  */
19318 $ac_includes_default
19319 struct { char filler; long field; } pgac_struct;
19320 int
19321 main ()
19322 {
19323 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19324 test_array [0] = 0
19325
19326   ;
19327   return 0;
19328 }
19329 _ACEOF
19330 rm -f conftest.$ac_objext
19331 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19332   (eval $ac_compile) 2>conftest.er1
19333   ac_status=$?
19334   grep -v '^ *+' conftest.er1 >conftest.err
19335   rm -f conftest.er1
19336   cat conftest.err >&5
19337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19338   (exit $ac_status); } &&
19339          { ac_try='test -z "$ac_c_werror_flag"
19340                          || test ! -s conftest.err'
19341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19342   (eval $ac_try) 2>&5
19343   ac_status=$?
19344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19345   (exit $ac_status); }; } &&
19346          { ac_try='test -s conftest.$ac_objext'
19347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19348   (eval $ac_try) 2>&5
19349   ac_status=$?
19350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19351   (exit $ac_status); }; }; then
19352   ac_lo=0 ac_mid=0
19353   while :; do
19354     cat >conftest.$ac_ext <<_ACEOF
19355 /* confdefs.h.  */
19356 _ACEOF
19357 cat confdefs.h >>conftest.$ac_ext
19358 cat >>conftest.$ac_ext <<_ACEOF
19359 /* end confdefs.h.  */
19360 $ac_includes_default
19361 struct { char filler; long field; } pgac_struct;
19362 int
19363 main ()
19364 {
19365 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19366 test_array [0] = 0
19367
19368   ;
19369   return 0;
19370 }
19371 _ACEOF
19372 rm -f conftest.$ac_objext
19373 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19374   (eval $ac_compile) 2>conftest.er1
19375   ac_status=$?
19376   grep -v '^ *+' conftest.er1 >conftest.err
19377   rm -f conftest.er1
19378   cat conftest.err >&5
19379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19380   (exit $ac_status); } &&
19381          { ac_try='test -z "$ac_c_werror_flag"
19382                          || test ! -s conftest.err'
19383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19384   (eval $ac_try) 2>&5
19385   ac_status=$?
19386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19387   (exit $ac_status); }; } &&
19388          { ac_try='test -s conftest.$ac_objext'
19389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19390   (eval $ac_try) 2>&5
19391   ac_status=$?
19392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19393   (exit $ac_status); }; }; then
19394   ac_hi=$ac_mid; break
19395 else
19396   echo "$as_me: failed program was:" >&5
19397 sed 's/^/| /' conftest.$ac_ext >&5
19398
19399 ac_lo=`expr $ac_mid + 1`
19400                     if test $ac_lo -le $ac_mid; then
19401                       ac_lo= ac_hi=
19402                       break
19403                     fi
19404                     ac_mid=`expr 2 '*' $ac_mid + 1`
19405 fi
19406 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19407   done
19408 else
19409   echo "$as_me: failed program was:" >&5
19410 sed 's/^/| /' conftest.$ac_ext >&5
19411
19412 cat >conftest.$ac_ext <<_ACEOF
19413 /* confdefs.h.  */
19414 _ACEOF
19415 cat confdefs.h >>conftest.$ac_ext
19416 cat >>conftest.$ac_ext <<_ACEOF
19417 /* end confdefs.h.  */
19418 $ac_includes_default
19419 struct { char filler; long field; } pgac_struct;
19420 int
19421 main ()
19422 {
19423 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19424 test_array [0] = 0
19425
19426   ;
19427   return 0;
19428 }
19429 _ACEOF
19430 rm -f conftest.$ac_objext
19431 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19432   (eval $ac_compile) 2>conftest.er1
19433   ac_status=$?
19434   grep -v '^ *+' conftest.er1 >conftest.err
19435   rm -f conftest.er1
19436   cat conftest.err >&5
19437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19438   (exit $ac_status); } &&
19439          { ac_try='test -z "$ac_c_werror_flag"
19440                          || test ! -s conftest.err'
19441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19442   (eval $ac_try) 2>&5
19443   ac_status=$?
19444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19445   (exit $ac_status); }; } &&
19446          { ac_try='test -s conftest.$ac_objext'
19447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19448   (eval $ac_try) 2>&5
19449   ac_status=$?
19450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19451   (exit $ac_status); }; }; then
19452   ac_hi=-1 ac_mid=-1
19453   while :; do
19454     cat >conftest.$ac_ext <<_ACEOF
19455 /* confdefs.h.  */
19456 _ACEOF
19457 cat confdefs.h >>conftest.$ac_ext
19458 cat >>conftest.$ac_ext <<_ACEOF
19459 /* end confdefs.h.  */
19460 $ac_includes_default
19461 struct { char filler; long field; } pgac_struct;
19462 int
19463 main ()
19464 {
19465 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19466 test_array [0] = 0
19467
19468   ;
19469   return 0;
19470 }
19471 _ACEOF
19472 rm -f conftest.$ac_objext
19473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19474   (eval $ac_compile) 2>conftest.er1
19475   ac_status=$?
19476   grep -v '^ *+' conftest.er1 >conftest.err
19477   rm -f conftest.er1
19478   cat conftest.err >&5
19479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19480   (exit $ac_status); } &&
19481          { ac_try='test -z "$ac_c_werror_flag"
19482                          || test ! -s conftest.err'
19483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19484   (eval $ac_try) 2>&5
19485   ac_status=$?
19486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19487   (exit $ac_status); }; } &&
19488          { ac_try='test -s conftest.$ac_objext'
19489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19490   (eval $ac_try) 2>&5
19491   ac_status=$?
19492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19493   (exit $ac_status); }; }; then
19494   ac_lo=$ac_mid; break
19495 else
19496   echo "$as_me: failed program was:" >&5
19497 sed 's/^/| /' conftest.$ac_ext >&5
19498
19499 ac_hi=`expr '(' $ac_mid ')' - 1`
19500                        if test $ac_mid -le $ac_hi; then
19501                          ac_lo= ac_hi=
19502                          break
19503                        fi
19504                        ac_mid=`expr 2 '*' $ac_mid`
19505 fi
19506 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19507   done
19508 else
19509   echo "$as_me: failed program was:" >&5
19510 sed 's/^/| /' conftest.$ac_ext >&5
19511
19512 ac_lo= ac_hi=
19513 fi
19514 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19515 fi
19516 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19517 # Binary search between lo and hi bounds.
19518 while test "x$ac_lo" != "x$ac_hi"; do
19519   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19520   cat >conftest.$ac_ext <<_ACEOF
19521 /* confdefs.h.  */
19522 _ACEOF
19523 cat confdefs.h >>conftest.$ac_ext
19524 cat >>conftest.$ac_ext <<_ACEOF
19525 /* end confdefs.h.  */
19526 $ac_includes_default
19527 struct { char filler; long field; } pgac_struct;
19528 int
19529 main ()
19530 {
19531 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19532 test_array [0] = 0
19533
19534   ;
19535   return 0;
19536 }
19537 _ACEOF
19538 rm -f conftest.$ac_objext
19539 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19540   (eval $ac_compile) 2>conftest.er1
19541   ac_status=$?
19542   grep -v '^ *+' conftest.er1 >conftest.err
19543   rm -f conftest.er1
19544   cat conftest.err >&5
19545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19546   (exit $ac_status); } &&
19547          { ac_try='test -z "$ac_c_werror_flag"
19548                          || test ! -s conftest.err'
19549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19550   (eval $ac_try) 2>&5
19551   ac_status=$?
19552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19553   (exit $ac_status); }; } &&
19554          { ac_try='test -s conftest.$ac_objext'
19555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19556   (eval $ac_try) 2>&5
19557   ac_status=$?
19558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19559   (exit $ac_status); }; }; then
19560   ac_hi=$ac_mid
19561 else
19562   echo "$as_me: failed program was:" >&5
19563 sed 's/^/| /' conftest.$ac_ext >&5
19564
19565 ac_lo=`expr '(' $ac_mid ')' + 1`
19566 fi
19567 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19568 done
19569 case $ac_lo in
19570 ?*) pgac_cv_alignof_long=$ac_lo;;
19571 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19572 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19573    { (exit 1); exit 1; }; } ;;
19574 esac
19575 else
19576   if test "$cross_compiling" = yes; then
19577   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19578 See \`config.log' for more details." >&5
19579 echo "$as_me: error: cannot run test program while cross compiling
19580 See \`config.log' for more details." >&2;}
19581    { (exit 1); exit 1; }; }
19582 else
19583   cat >conftest.$ac_ext <<_ACEOF
19584 /* confdefs.h.  */
19585 _ACEOF
19586 cat confdefs.h >>conftest.$ac_ext
19587 cat >>conftest.$ac_ext <<_ACEOF
19588 /* end confdefs.h.  */
19589 $ac_includes_default
19590 struct { char filler; long field; } pgac_struct;
19591 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19592 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19593 #include <stdio.h>
19594 #include <stdlib.h>
19595 int
19596 main ()
19597 {
19598
19599   FILE *f = fopen ("conftest.val", "w");
19600   if (! f)
19601     exit (1);
19602   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19603     {
19604       long i = longval ();
19605       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19606         exit (1);
19607       fprintf (f, "%ld\n", i);
19608     }
19609   else
19610     {
19611       unsigned long i = ulongval ();
19612       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19613         exit (1);
19614       fprintf (f, "%lu\n", i);
19615     }
19616   exit (ferror (f) || fclose (f) != 0);
19617
19618   ;
19619   return 0;
19620 }
19621 _ACEOF
19622 rm -f conftest$ac_exeext
19623 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19624   (eval $ac_link) 2>&5
19625   ac_status=$?
19626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19627   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19629   (eval $ac_try) 2>&5
19630   ac_status=$?
19631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19632   (exit $ac_status); }; }; then
19633   pgac_cv_alignof_long=`cat conftest.val`
19634 else
19635   echo "$as_me: program exited with status $ac_status" >&5
19636 echo "$as_me: failed program was:" >&5
19637 sed 's/^/| /' conftest.$ac_ext >&5
19638
19639 ( exit $ac_status )
19640 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19641 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19642    { (exit 1); exit 1; }; }
19643 fi
19644 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19645 fi
19646 fi
19647 rm -f conftest.val
19648 else
19649   pgac_cv_alignof_long=0
19650 fi
19651 fi
19652 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
19653 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
19654 cat >>confdefs.h <<_ACEOF
19655 #define ALIGNOF_LONG $pgac_cv_alignof_long
19656 _ACEOF
19657
19658
19659 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
19660   echo "$as_me:$LINENO: checking for long long int" >&5
19661 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
19662 if test "${ac_cv_type_long_long_int+set}" = set; then
19663   echo $ECHO_N "(cached) $ECHO_C" >&6
19664 else
19665   cat >conftest.$ac_ext <<_ACEOF
19666 /* confdefs.h.  */
19667 _ACEOF
19668 cat confdefs.h >>conftest.$ac_ext
19669 cat >>conftest.$ac_ext <<_ACEOF
19670 /* end confdefs.h.  */
19671 $ac_includes_default
19672 int
19673 main ()
19674 {
19675 if ((long long int *) 0)
19676   return 0;
19677 if (sizeof (long long int))
19678   return 0;
19679   ;
19680   return 0;
19681 }
19682 _ACEOF
19683 rm -f conftest.$ac_objext
19684 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19685   (eval $ac_compile) 2>conftest.er1
19686   ac_status=$?
19687   grep -v '^ *+' conftest.er1 >conftest.err
19688   rm -f conftest.er1
19689   cat conftest.err >&5
19690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19691   (exit $ac_status); } &&
19692          { ac_try='test -z "$ac_c_werror_flag"
19693                          || test ! -s conftest.err'
19694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19695   (eval $ac_try) 2>&5
19696   ac_status=$?
19697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19698   (exit $ac_status); }; } &&
19699          { ac_try='test -s conftest.$ac_objext'
19700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19701   (eval $ac_try) 2>&5
19702   ac_status=$?
19703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19704   (exit $ac_status); }; }; then
19705   ac_cv_type_long_long_int=yes
19706 else
19707   echo "$as_me: failed program was:" >&5
19708 sed 's/^/| /' conftest.$ac_ext >&5
19709
19710 ac_cv_type_long_long_int=no
19711 fi
19712 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19713 fi
19714 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
19715 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
19716
19717 echo "$as_me:$LINENO: checking alignment of long long int" >&5
19718 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
19719 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
19720   echo $ECHO_N "(cached) $ECHO_C" >&6
19721 else
19722   if test "$ac_cv_type_long_long_int" = yes; then
19723   if test "$cross_compiling" = yes; then
19724   # Depending upon the size, compute the lo and hi bounds.
19725 cat >conftest.$ac_ext <<_ACEOF
19726 /* confdefs.h.  */
19727 _ACEOF
19728 cat confdefs.h >>conftest.$ac_ext
19729 cat >>conftest.$ac_ext <<_ACEOF
19730 /* end confdefs.h.  */
19731 $ac_includes_default
19732 struct { char filler; long long int field; } pgac_struct;
19733 int
19734 main ()
19735 {
19736 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19737 test_array [0] = 0
19738
19739   ;
19740   return 0;
19741 }
19742 _ACEOF
19743 rm -f conftest.$ac_objext
19744 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19745   (eval $ac_compile) 2>conftest.er1
19746   ac_status=$?
19747   grep -v '^ *+' conftest.er1 >conftest.err
19748   rm -f conftest.er1
19749   cat conftest.err >&5
19750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19751   (exit $ac_status); } &&
19752          { ac_try='test -z "$ac_c_werror_flag"
19753                          || test ! -s conftest.err'
19754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19755   (eval $ac_try) 2>&5
19756   ac_status=$?
19757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19758   (exit $ac_status); }; } &&
19759          { ac_try='test -s conftest.$ac_objext'
19760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19761   (eval $ac_try) 2>&5
19762   ac_status=$?
19763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19764   (exit $ac_status); }; }; then
19765   ac_lo=0 ac_mid=0
19766   while :; do
19767     cat >conftest.$ac_ext <<_ACEOF
19768 /* confdefs.h.  */
19769 _ACEOF
19770 cat confdefs.h >>conftest.$ac_ext
19771 cat >>conftest.$ac_ext <<_ACEOF
19772 /* end confdefs.h.  */
19773 $ac_includes_default
19774 struct { char filler; long long int field; } pgac_struct;
19775 int
19776 main ()
19777 {
19778 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19779 test_array [0] = 0
19780
19781   ;
19782   return 0;
19783 }
19784 _ACEOF
19785 rm -f conftest.$ac_objext
19786 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19787   (eval $ac_compile) 2>conftest.er1
19788   ac_status=$?
19789   grep -v '^ *+' conftest.er1 >conftest.err
19790   rm -f conftest.er1
19791   cat conftest.err >&5
19792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19793   (exit $ac_status); } &&
19794          { ac_try='test -z "$ac_c_werror_flag"
19795                          || test ! -s conftest.err'
19796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19797   (eval $ac_try) 2>&5
19798   ac_status=$?
19799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19800   (exit $ac_status); }; } &&
19801          { ac_try='test -s conftest.$ac_objext'
19802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19803   (eval $ac_try) 2>&5
19804   ac_status=$?
19805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19806   (exit $ac_status); }; }; then
19807   ac_hi=$ac_mid; break
19808 else
19809   echo "$as_me: failed program was:" >&5
19810 sed 's/^/| /' conftest.$ac_ext >&5
19811
19812 ac_lo=`expr $ac_mid + 1`
19813                     if test $ac_lo -le $ac_mid; then
19814                       ac_lo= ac_hi=
19815                       break
19816                     fi
19817                     ac_mid=`expr 2 '*' $ac_mid + 1`
19818 fi
19819 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19820   done
19821 else
19822   echo "$as_me: failed program was:" >&5
19823 sed 's/^/| /' conftest.$ac_ext >&5
19824
19825 cat >conftest.$ac_ext <<_ACEOF
19826 /* confdefs.h.  */
19827 _ACEOF
19828 cat confdefs.h >>conftest.$ac_ext
19829 cat >>conftest.$ac_ext <<_ACEOF
19830 /* end confdefs.h.  */
19831 $ac_includes_default
19832 struct { char filler; long long int field; } pgac_struct;
19833 int
19834 main ()
19835 {
19836 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19837 test_array [0] = 0
19838
19839   ;
19840   return 0;
19841 }
19842 _ACEOF
19843 rm -f conftest.$ac_objext
19844 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19845   (eval $ac_compile) 2>conftest.er1
19846   ac_status=$?
19847   grep -v '^ *+' conftest.er1 >conftest.err
19848   rm -f conftest.er1
19849   cat conftest.err >&5
19850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19851   (exit $ac_status); } &&
19852          { ac_try='test -z "$ac_c_werror_flag"
19853                          || test ! -s conftest.err'
19854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19855   (eval $ac_try) 2>&5
19856   ac_status=$?
19857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19858   (exit $ac_status); }; } &&
19859          { ac_try='test -s conftest.$ac_objext'
19860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19861   (eval $ac_try) 2>&5
19862   ac_status=$?
19863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19864   (exit $ac_status); }; }; then
19865   ac_hi=-1 ac_mid=-1
19866   while :; do
19867     cat >conftest.$ac_ext <<_ACEOF
19868 /* confdefs.h.  */
19869 _ACEOF
19870 cat confdefs.h >>conftest.$ac_ext
19871 cat >>conftest.$ac_ext <<_ACEOF
19872 /* end confdefs.h.  */
19873 $ac_includes_default
19874 struct { char filler; long long int field; } pgac_struct;
19875 int
19876 main ()
19877 {
19878 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19879 test_array [0] = 0
19880
19881   ;
19882   return 0;
19883 }
19884 _ACEOF
19885 rm -f conftest.$ac_objext
19886 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19887   (eval $ac_compile) 2>conftest.er1
19888   ac_status=$?
19889   grep -v '^ *+' conftest.er1 >conftest.err
19890   rm -f conftest.er1
19891   cat conftest.err >&5
19892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19893   (exit $ac_status); } &&
19894          { ac_try='test -z "$ac_c_werror_flag"
19895                          || test ! -s conftest.err'
19896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19897   (eval $ac_try) 2>&5
19898   ac_status=$?
19899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19900   (exit $ac_status); }; } &&
19901          { ac_try='test -s conftest.$ac_objext'
19902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19903   (eval $ac_try) 2>&5
19904   ac_status=$?
19905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19906   (exit $ac_status); }; }; then
19907   ac_lo=$ac_mid; break
19908 else
19909   echo "$as_me: failed program was:" >&5
19910 sed 's/^/| /' conftest.$ac_ext >&5
19911
19912 ac_hi=`expr '(' $ac_mid ')' - 1`
19913                        if test $ac_mid -le $ac_hi; then
19914                          ac_lo= ac_hi=
19915                          break
19916                        fi
19917                        ac_mid=`expr 2 '*' $ac_mid`
19918 fi
19919 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19920   done
19921 else
19922   echo "$as_me: failed program was:" >&5
19923 sed 's/^/| /' conftest.$ac_ext >&5
19924
19925 ac_lo= ac_hi=
19926 fi
19927 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19928 fi
19929 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19930 # Binary search between lo and hi bounds.
19931 while test "x$ac_lo" != "x$ac_hi"; do
19932   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19933   cat >conftest.$ac_ext <<_ACEOF
19934 /* confdefs.h.  */
19935 _ACEOF
19936 cat confdefs.h >>conftest.$ac_ext
19937 cat >>conftest.$ac_ext <<_ACEOF
19938 /* end confdefs.h.  */
19939 $ac_includes_default
19940 struct { char filler; long long int field; } pgac_struct;
19941 int
19942 main ()
19943 {
19944 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19945 test_array [0] = 0
19946
19947   ;
19948   return 0;
19949 }
19950 _ACEOF
19951 rm -f conftest.$ac_objext
19952 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19953   (eval $ac_compile) 2>conftest.er1
19954   ac_status=$?
19955   grep -v '^ *+' conftest.er1 >conftest.err
19956   rm -f conftest.er1
19957   cat conftest.err >&5
19958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19959   (exit $ac_status); } &&
19960          { ac_try='test -z "$ac_c_werror_flag"
19961                          || test ! -s conftest.err'
19962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19963   (eval $ac_try) 2>&5
19964   ac_status=$?
19965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19966   (exit $ac_status); }; } &&
19967          { ac_try='test -s conftest.$ac_objext'
19968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19969   (eval $ac_try) 2>&5
19970   ac_status=$?
19971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19972   (exit $ac_status); }; }; then
19973   ac_hi=$ac_mid
19974 else
19975   echo "$as_me: failed program was:" >&5
19976 sed 's/^/| /' conftest.$ac_ext >&5
19977
19978 ac_lo=`expr '(' $ac_mid ')' + 1`
19979 fi
19980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19981 done
19982 case $ac_lo in
19983 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
19984 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
19985 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
19986    { (exit 1); exit 1; }; } ;;
19987 esac
19988 else
19989   if test "$cross_compiling" = yes; then
19990   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19991 See \`config.log' for more details." >&5
19992 echo "$as_me: error: cannot run test program while cross compiling
19993 See \`config.log' for more details." >&2;}
19994    { (exit 1); exit 1; }; }
19995 else
19996   cat >conftest.$ac_ext <<_ACEOF
19997 /* confdefs.h.  */
19998 _ACEOF
19999 cat confdefs.h >>conftest.$ac_ext
20000 cat >>conftest.$ac_ext <<_ACEOF
20001 /* end confdefs.h.  */
20002 $ac_includes_default
20003 struct { char filler; long long int field; } pgac_struct;
20004 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20005 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20006 #include <stdio.h>
20007 #include <stdlib.h>
20008 int
20009 main ()
20010 {
20011
20012   FILE *f = fopen ("conftest.val", "w");
20013   if (! f)
20014     exit (1);
20015   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20016     {
20017       long i = longval ();
20018       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20019         exit (1);
20020       fprintf (f, "%ld\n", i);
20021     }
20022   else
20023     {
20024       unsigned long i = ulongval ();
20025       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20026         exit (1);
20027       fprintf (f, "%lu\n", i);
20028     }
20029   exit (ferror (f) || fclose (f) != 0);
20030
20031   ;
20032   return 0;
20033 }
20034 _ACEOF
20035 rm -f conftest$ac_exeext
20036 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20037   (eval $ac_link) 2>&5
20038   ac_status=$?
20039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20040   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20042   (eval $ac_try) 2>&5
20043   ac_status=$?
20044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20045   (exit $ac_status); }; }; then
20046   pgac_cv_alignof_long_long_int=`cat conftest.val`
20047 else
20048   echo "$as_me: program exited with status $ac_status" >&5
20049 echo "$as_me: failed program was:" >&5
20050 sed 's/^/| /' conftest.$ac_ext >&5
20051
20052 ( exit $ac_status )
20053 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20054 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20055    { (exit 1); exit 1; }; }
20056 fi
20057 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20058 fi
20059 fi
20060 rm -f conftest.val
20061 else
20062   pgac_cv_alignof_long_long_int=0
20063 fi
20064 fi
20065 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20066 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20067 cat >>confdefs.h <<_ACEOF
20068 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20069 _ACEOF
20070
20071
20072 fi
20073 echo "$as_me:$LINENO: checking for double" >&5
20074 echo $ECHO_N "checking for double... $ECHO_C" >&6
20075 if test "${ac_cv_type_double+set}" = set; then
20076   echo $ECHO_N "(cached) $ECHO_C" >&6
20077 else
20078   cat >conftest.$ac_ext <<_ACEOF
20079 /* confdefs.h.  */
20080 _ACEOF
20081 cat confdefs.h >>conftest.$ac_ext
20082 cat >>conftest.$ac_ext <<_ACEOF
20083 /* end confdefs.h.  */
20084 $ac_includes_default
20085 int
20086 main ()
20087 {
20088 if ((double *) 0)
20089   return 0;
20090 if (sizeof (double))
20091   return 0;
20092   ;
20093   return 0;
20094 }
20095 _ACEOF
20096 rm -f conftest.$ac_objext
20097 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20098   (eval $ac_compile) 2>conftest.er1
20099   ac_status=$?
20100   grep -v '^ *+' conftest.er1 >conftest.err
20101   rm -f conftest.er1
20102   cat conftest.err >&5
20103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20104   (exit $ac_status); } &&
20105          { ac_try='test -z "$ac_c_werror_flag"
20106                          || test ! -s conftest.err'
20107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20108   (eval $ac_try) 2>&5
20109   ac_status=$?
20110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20111   (exit $ac_status); }; } &&
20112          { ac_try='test -s conftest.$ac_objext'
20113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20114   (eval $ac_try) 2>&5
20115   ac_status=$?
20116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20117   (exit $ac_status); }; }; then
20118   ac_cv_type_double=yes
20119 else
20120   echo "$as_me: failed program was:" >&5
20121 sed 's/^/| /' conftest.$ac_ext >&5
20122
20123 ac_cv_type_double=no
20124 fi
20125 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20126 fi
20127 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20128 echo "${ECHO_T}$ac_cv_type_double" >&6
20129
20130 echo "$as_me:$LINENO: checking alignment of double" >&5
20131 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20132 if test "${pgac_cv_alignof_double+set}" = set; then
20133   echo $ECHO_N "(cached) $ECHO_C" >&6
20134 else
20135   if test "$ac_cv_type_double" = yes; then
20136   if test "$cross_compiling" = yes; then
20137   # Depending upon the size, compute the lo and hi bounds.
20138 cat >conftest.$ac_ext <<_ACEOF
20139 /* confdefs.h.  */
20140 _ACEOF
20141 cat confdefs.h >>conftest.$ac_ext
20142 cat >>conftest.$ac_ext <<_ACEOF
20143 /* end confdefs.h.  */
20144 $ac_includes_default
20145 struct { char filler; double field; } pgac_struct;
20146 int
20147 main ()
20148 {
20149 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20150 test_array [0] = 0
20151
20152   ;
20153   return 0;
20154 }
20155 _ACEOF
20156 rm -f conftest.$ac_objext
20157 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20158   (eval $ac_compile) 2>conftest.er1
20159   ac_status=$?
20160   grep -v '^ *+' conftest.er1 >conftest.err
20161   rm -f conftest.er1
20162   cat conftest.err >&5
20163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20164   (exit $ac_status); } &&
20165          { ac_try='test -z "$ac_c_werror_flag"
20166                          || test ! -s conftest.err'
20167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20168   (eval $ac_try) 2>&5
20169   ac_status=$?
20170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20171   (exit $ac_status); }; } &&
20172          { ac_try='test -s conftest.$ac_objext'
20173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20174   (eval $ac_try) 2>&5
20175   ac_status=$?
20176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20177   (exit $ac_status); }; }; then
20178   ac_lo=0 ac_mid=0
20179   while :; do
20180     cat >conftest.$ac_ext <<_ACEOF
20181 /* confdefs.h.  */
20182 _ACEOF
20183 cat confdefs.h >>conftest.$ac_ext
20184 cat >>conftest.$ac_ext <<_ACEOF
20185 /* end confdefs.h.  */
20186 $ac_includes_default
20187 struct { char filler; double field; } pgac_struct;
20188 int
20189 main ()
20190 {
20191 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20192 test_array [0] = 0
20193
20194   ;
20195   return 0;
20196 }
20197 _ACEOF
20198 rm -f conftest.$ac_objext
20199 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20200   (eval $ac_compile) 2>conftest.er1
20201   ac_status=$?
20202   grep -v '^ *+' conftest.er1 >conftest.err
20203   rm -f conftest.er1
20204   cat conftest.err >&5
20205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20206   (exit $ac_status); } &&
20207          { ac_try='test -z "$ac_c_werror_flag"
20208                          || test ! -s conftest.err'
20209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20210   (eval $ac_try) 2>&5
20211   ac_status=$?
20212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20213   (exit $ac_status); }; } &&
20214          { ac_try='test -s conftest.$ac_objext'
20215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20216   (eval $ac_try) 2>&5
20217   ac_status=$?
20218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20219   (exit $ac_status); }; }; then
20220   ac_hi=$ac_mid; break
20221 else
20222   echo "$as_me: failed program was:" >&5
20223 sed 's/^/| /' conftest.$ac_ext >&5
20224
20225 ac_lo=`expr $ac_mid + 1`
20226                     if test $ac_lo -le $ac_mid; then
20227                       ac_lo= ac_hi=
20228                       break
20229                     fi
20230                     ac_mid=`expr 2 '*' $ac_mid + 1`
20231 fi
20232 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20233   done
20234 else
20235   echo "$as_me: failed program was:" >&5
20236 sed 's/^/| /' conftest.$ac_ext >&5
20237
20238 cat >conftest.$ac_ext <<_ACEOF
20239 /* confdefs.h.  */
20240 _ACEOF
20241 cat confdefs.h >>conftest.$ac_ext
20242 cat >>conftest.$ac_ext <<_ACEOF
20243 /* end confdefs.h.  */
20244 $ac_includes_default
20245 struct { char filler; double field; } pgac_struct;
20246 int
20247 main ()
20248 {
20249 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20250 test_array [0] = 0
20251
20252   ;
20253   return 0;
20254 }
20255 _ACEOF
20256 rm -f conftest.$ac_objext
20257 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20258   (eval $ac_compile) 2>conftest.er1
20259   ac_status=$?
20260   grep -v '^ *+' conftest.er1 >conftest.err
20261   rm -f conftest.er1
20262   cat conftest.err >&5
20263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20264   (exit $ac_status); } &&
20265          { ac_try='test -z "$ac_c_werror_flag"
20266                          || test ! -s conftest.err'
20267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20268   (eval $ac_try) 2>&5
20269   ac_status=$?
20270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20271   (exit $ac_status); }; } &&
20272          { ac_try='test -s conftest.$ac_objext'
20273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20274   (eval $ac_try) 2>&5
20275   ac_status=$?
20276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20277   (exit $ac_status); }; }; then
20278   ac_hi=-1 ac_mid=-1
20279   while :; do
20280     cat >conftest.$ac_ext <<_ACEOF
20281 /* confdefs.h.  */
20282 _ACEOF
20283 cat confdefs.h >>conftest.$ac_ext
20284 cat >>conftest.$ac_ext <<_ACEOF
20285 /* end confdefs.h.  */
20286 $ac_includes_default
20287 struct { char filler; double field; } pgac_struct;
20288 int
20289 main ()
20290 {
20291 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20292 test_array [0] = 0
20293
20294   ;
20295   return 0;
20296 }
20297 _ACEOF
20298 rm -f conftest.$ac_objext
20299 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20300   (eval $ac_compile) 2>conftest.er1
20301   ac_status=$?
20302   grep -v '^ *+' conftest.er1 >conftest.err
20303   rm -f conftest.er1
20304   cat conftest.err >&5
20305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20306   (exit $ac_status); } &&
20307          { ac_try='test -z "$ac_c_werror_flag"
20308                          || test ! -s conftest.err'
20309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20310   (eval $ac_try) 2>&5
20311   ac_status=$?
20312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20313   (exit $ac_status); }; } &&
20314          { ac_try='test -s conftest.$ac_objext'
20315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20316   (eval $ac_try) 2>&5
20317   ac_status=$?
20318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20319   (exit $ac_status); }; }; then
20320   ac_lo=$ac_mid; break
20321 else
20322   echo "$as_me: failed program was:" >&5
20323 sed 's/^/| /' conftest.$ac_ext >&5
20324
20325 ac_hi=`expr '(' $ac_mid ')' - 1`
20326                        if test $ac_mid -le $ac_hi; then
20327                          ac_lo= ac_hi=
20328                          break
20329                        fi
20330                        ac_mid=`expr 2 '*' $ac_mid`
20331 fi
20332 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20333   done
20334 else
20335   echo "$as_me: failed program was:" >&5
20336 sed 's/^/| /' conftest.$ac_ext >&5
20337
20338 ac_lo= ac_hi=
20339 fi
20340 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20341 fi
20342 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20343 # Binary search between lo and hi bounds.
20344 while test "x$ac_lo" != "x$ac_hi"; do
20345   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20346   cat >conftest.$ac_ext <<_ACEOF
20347 /* confdefs.h.  */
20348 _ACEOF
20349 cat confdefs.h >>conftest.$ac_ext
20350 cat >>conftest.$ac_ext <<_ACEOF
20351 /* end confdefs.h.  */
20352 $ac_includes_default
20353 struct { char filler; double field; } pgac_struct;
20354 int
20355 main ()
20356 {
20357 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20358 test_array [0] = 0
20359
20360   ;
20361   return 0;
20362 }
20363 _ACEOF
20364 rm -f conftest.$ac_objext
20365 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20366   (eval $ac_compile) 2>conftest.er1
20367   ac_status=$?
20368   grep -v '^ *+' conftest.er1 >conftest.err
20369   rm -f conftest.er1
20370   cat conftest.err >&5
20371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20372   (exit $ac_status); } &&
20373          { ac_try='test -z "$ac_c_werror_flag"
20374                          || test ! -s conftest.err'
20375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20376   (eval $ac_try) 2>&5
20377   ac_status=$?
20378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20379   (exit $ac_status); }; } &&
20380          { ac_try='test -s conftest.$ac_objext'
20381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20382   (eval $ac_try) 2>&5
20383   ac_status=$?
20384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20385   (exit $ac_status); }; }; then
20386   ac_hi=$ac_mid
20387 else
20388   echo "$as_me: failed program was:" >&5
20389 sed 's/^/| /' conftest.$ac_ext >&5
20390
20391 ac_lo=`expr '(' $ac_mid ')' + 1`
20392 fi
20393 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20394 done
20395 case $ac_lo in
20396 ?*) pgac_cv_alignof_double=$ac_lo;;
20397 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20398 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20399    { (exit 1); exit 1; }; } ;;
20400 esac
20401 else
20402   if test "$cross_compiling" = yes; then
20403   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20404 See \`config.log' for more details." >&5
20405 echo "$as_me: error: cannot run test program while cross compiling
20406 See \`config.log' for more details." >&2;}
20407    { (exit 1); exit 1; }; }
20408 else
20409   cat >conftest.$ac_ext <<_ACEOF
20410 /* confdefs.h.  */
20411 _ACEOF
20412 cat confdefs.h >>conftest.$ac_ext
20413 cat >>conftest.$ac_ext <<_ACEOF
20414 /* end confdefs.h.  */
20415 $ac_includes_default
20416 struct { char filler; double field; } pgac_struct;
20417 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20418 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20419 #include <stdio.h>
20420 #include <stdlib.h>
20421 int
20422 main ()
20423 {
20424
20425   FILE *f = fopen ("conftest.val", "w");
20426   if (! f)
20427     exit (1);
20428   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20429     {
20430       long i = longval ();
20431       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20432         exit (1);
20433       fprintf (f, "%ld\n", i);
20434     }
20435   else
20436     {
20437       unsigned long i = ulongval ();
20438       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20439         exit (1);
20440       fprintf (f, "%lu\n", i);
20441     }
20442   exit (ferror (f) || fclose (f) != 0);
20443
20444   ;
20445   return 0;
20446 }
20447 _ACEOF
20448 rm -f conftest$ac_exeext
20449 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20450   (eval $ac_link) 2>&5
20451   ac_status=$?
20452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20453   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20455   (eval $ac_try) 2>&5
20456   ac_status=$?
20457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20458   (exit $ac_status); }; }; then
20459   pgac_cv_alignof_double=`cat conftest.val`
20460 else
20461   echo "$as_me: program exited with status $ac_status" >&5
20462 echo "$as_me: failed program was:" >&5
20463 sed 's/^/| /' conftest.$ac_ext >&5
20464
20465 ( exit $ac_status )
20466 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20467 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20468    { (exit 1); exit 1; }; }
20469 fi
20470 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20471 fi
20472 fi
20473 rm -f conftest.val
20474 else
20475   pgac_cv_alignof_double=0
20476 fi
20477 fi
20478 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20479 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20480 cat >>confdefs.h <<_ACEOF
20481 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20482 _ACEOF
20483
20484
20485
20486 # Compute maximum alignment of any basic type.
20487 # We assume long's alignment is at least as strong as char, short, or int;
20488 # but we must check long long (if it exists) and double.
20489
20490 MAX_ALIGNOF=$pgac_cv_alignof_long
20491 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20492   MAX_ALIGNOF=$pgac_cv_alignof_double
20493 fi
20494 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20495   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20496 fi
20497
20498 cat >>confdefs.h <<_ACEOF
20499 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20500 _ACEOF
20501
20502
20503
20504 # Some platforms predefine the types int8, int16, etc.  Only check
20505 # a (hopefully) representative subset.
20506 echo "$as_me:$LINENO: checking for int8" >&5
20507 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20508 if test "${ac_cv_type_int8+set}" = set; then
20509   echo $ECHO_N "(cached) $ECHO_C" >&6
20510 else
20511   cat >conftest.$ac_ext <<_ACEOF
20512 /* confdefs.h.  */
20513 _ACEOF
20514 cat confdefs.h >>conftest.$ac_ext
20515 cat >>conftest.$ac_ext <<_ACEOF
20516 /* end confdefs.h.  */
20517 #include <stdio.h>
20518 #ifdef HAVE_SUPPORTDEFS_H
20519 #include <SupportDefs.h>
20520 #endif
20521
20522 int
20523 main ()
20524 {
20525 if ((int8 *) 0)
20526   return 0;
20527 if (sizeof (int8))
20528   return 0;
20529   ;
20530   return 0;
20531 }
20532 _ACEOF
20533 rm -f conftest.$ac_objext
20534 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20535   (eval $ac_compile) 2>conftest.er1
20536   ac_status=$?
20537   grep -v '^ *+' conftest.er1 >conftest.err
20538   rm -f conftest.er1
20539   cat conftest.err >&5
20540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20541   (exit $ac_status); } &&
20542          { ac_try='test -z "$ac_c_werror_flag"
20543                          || test ! -s conftest.err'
20544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20545   (eval $ac_try) 2>&5
20546   ac_status=$?
20547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20548   (exit $ac_status); }; } &&
20549          { ac_try='test -s conftest.$ac_objext'
20550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20551   (eval $ac_try) 2>&5
20552   ac_status=$?
20553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20554   (exit $ac_status); }; }; then
20555   ac_cv_type_int8=yes
20556 else
20557   echo "$as_me: failed program was:" >&5
20558 sed 's/^/| /' conftest.$ac_ext >&5
20559
20560 ac_cv_type_int8=no
20561 fi
20562 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20563 fi
20564 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20565 echo "${ECHO_T}$ac_cv_type_int8" >&6
20566 if test $ac_cv_type_int8 = yes; then
20567
20568 cat >>confdefs.h <<_ACEOF
20569 #define HAVE_INT8 1
20570 _ACEOF
20571
20572
20573 fi
20574 echo "$as_me:$LINENO: checking for uint8" >&5
20575 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20576 if test "${ac_cv_type_uint8+set}" = set; then
20577   echo $ECHO_N "(cached) $ECHO_C" >&6
20578 else
20579   cat >conftest.$ac_ext <<_ACEOF
20580 /* confdefs.h.  */
20581 _ACEOF
20582 cat confdefs.h >>conftest.$ac_ext
20583 cat >>conftest.$ac_ext <<_ACEOF
20584 /* end confdefs.h.  */
20585 #include <stdio.h>
20586 #ifdef HAVE_SUPPORTDEFS_H
20587 #include <SupportDefs.h>
20588 #endif
20589
20590 int
20591 main ()
20592 {
20593 if ((uint8 *) 0)
20594   return 0;
20595 if (sizeof (uint8))
20596   return 0;
20597   ;
20598   return 0;
20599 }
20600 _ACEOF
20601 rm -f conftest.$ac_objext
20602 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20603   (eval $ac_compile) 2>conftest.er1
20604   ac_status=$?
20605   grep -v '^ *+' conftest.er1 >conftest.err
20606   rm -f conftest.er1
20607   cat conftest.err >&5
20608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20609   (exit $ac_status); } &&
20610          { ac_try='test -z "$ac_c_werror_flag"
20611                          || test ! -s conftest.err'
20612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20613   (eval $ac_try) 2>&5
20614   ac_status=$?
20615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20616   (exit $ac_status); }; } &&
20617          { ac_try='test -s conftest.$ac_objext'
20618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20619   (eval $ac_try) 2>&5
20620   ac_status=$?
20621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20622   (exit $ac_status); }; }; then
20623   ac_cv_type_uint8=yes
20624 else
20625   echo "$as_me: failed program was:" >&5
20626 sed 's/^/| /' conftest.$ac_ext >&5
20627
20628 ac_cv_type_uint8=no
20629 fi
20630 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20631 fi
20632 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20633 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20634 if test $ac_cv_type_uint8 = yes; then
20635
20636 cat >>confdefs.h <<_ACEOF
20637 #define HAVE_UINT8 1
20638 _ACEOF
20639
20640
20641 fi
20642 echo "$as_me:$LINENO: checking for int64" >&5
20643 echo $ECHO_N "checking for int64... $ECHO_C" >&6
20644 if test "${ac_cv_type_int64+set}" = set; then
20645   echo $ECHO_N "(cached) $ECHO_C" >&6
20646 else
20647   cat >conftest.$ac_ext <<_ACEOF
20648 /* confdefs.h.  */
20649 _ACEOF
20650 cat confdefs.h >>conftest.$ac_ext
20651 cat >>conftest.$ac_ext <<_ACEOF
20652 /* end confdefs.h.  */
20653 #include <stdio.h>
20654 #ifdef HAVE_SUPPORTDEFS_H
20655 #include <SupportDefs.h>
20656 #endif
20657
20658 int
20659 main ()
20660 {
20661 if ((int64 *) 0)
20662   return 0;
20663 if (sizeof (int64))
20664   return 0;
20665   ;
20666   return 0;
20667 }
20668 _ACEOF
20669 rm -f conftest.$ac_objext
20670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20671   (eval $ac_compile) 2>conftest.er1
20672   ac_status=$?
20673   grep -v '^ *+' conftest.er1 >conftest.err
20674   rm -f conftest.er1
20675   cat conftest.err >&5
20676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20677   (exit $ac_status); } &&
20678          { ac_try='test -z "$ac_c_werror_flag"
20679                          || test ! -s conftest.err'
20680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20681   (eval $ac_try) 2>&5
20682   ac_status=$?
20683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20684   (exit $ac_status); }; } &&
20685          { ac_try='test -s conftest.$ac_objext'
20686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20687   (eval $ac_try) 2>&5
20688   ac_status=$?
20689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20690   (exit $ac_status); }; }; then
20691   ac_cv_type_int64=yes
20692 else
20693   echo "$as_me: failed program was:" >&5
20694 sed 's/^/| /' conftest.$ac_ext >&5
20695
20696 ac_cv_type_int64=no
20697 fi
20698 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20699 fi
20700 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
20701 echo "${ECHO_T}$ac_cv_type_int64" >&6
20702 if test $ac_cv_type_int64 = yes; then
20703
20704 cat >>confdefs.h <<_ACEOF
20705 #define HAVE_INT64 1
20706 _ACEOF
20707
20708
20709 fi
20710 echo "$as_me:$LINENO: checking for uint64" >&5
20711 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
20712 if test "${ac_cv_type_uint64+set}" = set; then
20713   echo $ECHO_N "(cached) $ECHO_C" >&6
20714 else
20715   cat >conftest.$ac_ext <<_ACEOF
20716 /* confdefs.h.  */
20717 _ACEOF
20718 cat confdefs.h >>conftest.$ac_ext
20719 cat >>conftest.$ac_ext <<_ACEOF
20720 /* end confdefs.h.  */
20721 #include <stdio.h>
20722 #ifdef HAVE_SUPPORTDEFS_H
20723 #include <SupportDefs.h>
20724 #endif
20725
20726 int
20727 main ()
20728 {
20729 if ((uint64 *) 0)
20730   return 0;
20731 if (sizeof (uint64))
20732   return 0;
20733   ;
20734   return 0;
20735 }
20736 _ACEOF
20737 rm -f conftest.$ac_objext
20738 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20739   (eval $ac_compile) 2>conftest.er1
20740   ac_status=$?
20741   grep -v '^ *+' conftest.er1 >conftest.err
20742   rm -f conftest.er1
20743   cat conftest.err >&5
20744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20745   (exit $ac_status); } &&
20746          { ac_try='test -z "$ac_c_werror_flag"
20747                          || test ! -s conftest.err'
20748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20749   (eval $ac_try) 2>&5
20750   ac_status=$?
20751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20752   (exit $ac_status); }; } &&
20753          { ac_try='test -s conftest.$ac_objext'
20754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20755   (eval $ac_try) 2>&5
20756   ac_status=$?
20757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20758   (exit $ac_status); }; }; then
20759   ac_cv_type_uint64=yes
20760 else
20761   echo "$as_me: failed program was:" >&5
20762 sed 's/^/| /' conftest.$ac_ext >&5
20763
20764 ac_cv_type_uint64=no
20765 fi
20766 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20767 fi
20768 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
20769 echo "${ECHO_T}$ac_cv_type_uint64" >&6
20770 if test $ac_cv_type_uint64 = yes; then
20771
20772 cat >>confdefs.h <<_ACEOF
20773 #define HAVE_UINT64 1
20774 _ACEOF
20775
20776
20777 fi
20778
20779
20780 # We also check for sig_atomic_t, which *should* be defined per ANSI
20781 # C, but is missing on some old platforms.
20782 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
20783 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
20784 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
20785   echo $ECHO_N "(cached) $ECHO_C" >&6
20786 else
20787   cat >conftest.$ac_ext <<_ACEOF
20788 /* confdefs.h.  */
20789 _ACEOF
20790 cat confdefs.h >>conftest.$ac_ext
20791 cat >>conftest.$ac_ext <<_ACEOF
20792 /* end confdefs.h.  */
20793 #include <signal.h>
20794
20795 int
20796 main ()
20797 {
20798 if ((sig_atomic_t *) 0)
20799   return 0;
20800 if (sizeof (sig_atomic_t))
20801   return 0;
20802   ;
20803   return 0;
20804 }
20805 _ACEOF
20806 rm -f conftest.$ac_objext
20807 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20808   (eval $ac_compile) 2>conftest.er1
20809   ac_status=$?
20810   grep -v '^ *+' conftest.er1 >conftest.err
20811   rm -f conftest.er1
20812   cat conftest.err >&5
20813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20814   (exit $ac_status); } &&
20815          { ac_try='test -z "$ac_c_werror_flag"
20816                          || test ! -s conftest.err'
20817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20818   (eval $ac_try) 2>&5
20819   ac_status=$?
20820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20821   (exit $ac_status); }; } &&
20822          { ac_try='test -s conftest.$ac_objext'
20823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20824   (eval $ac_try) 2>&5
20825   ac_status=$?
20826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20827   (exit $ac_status); }; }; then
20828   ac_cv_type_sig_atomic_t=yes
20829 else
20830   echo "$as_me: failed program was:" >&5
20831 sed 's/^/| /' conftest.$ac_ext >&5
20832
20833 ac_cv_type_sig_atomic_t=no
20834 fi
20835 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20836 fi
20837 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
20838 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
20839 if test $ac_cv_type_sig_atomic_t = yes; then
20840
20841 cat >>confdefs.h <<_ACEOF
20842 #define HAVE_SIG_ATOMIC_T 1
20843 _ACEOF
20844
20845
20846 fi
20847
20848
20849
20850 if test x"$template" != x"win32"
20851 then
20852 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
20853 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
20854 if test "${pgac_cv_func_posix_signals+set}" = set; then
20855   echo $ECHO_N "(cached) $ECHO_C" >&6
20856 else
20857   cat >conftest.$ac_ext <<_ACEOF
20858 /* confdefs.h.  */
20859 _ACEOF
20860 cat confdefs.h >>conftest.$ac_ext
20861 cat >>conftest.$ac_ext <<_ACEOF
20862 /* end confdefs.h.  */
20863 #include <signal.h>
20864
20865 int
20866 main ()
20867 {
20868 struct sigaction act, oact;
20869 sigemptyset(&act.sa_mask);
20870 act.sa_flags = SA_RESTART;
20871 sigaction(0, &act, &oact);
20872   ;
20873   return 0;
20874 }
20875 _ACEOF
20876 rm -f conftest.$ac_objext conftest$ac_exeext
20877 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20878   (eval $ac_link) 2>conftest.er1
20879   ac_status=$?
20880   grep -v '^ *+' conftest.er1 >conftest.err
20881   rm -f conftest.er1
20882   cat conftest.err >&5
20883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20884   (exit $ac_status); } &&
20885          { ac_try='test -z "$ac_c_werror_flag"
20886                          || test ! -s conftest.err'
20887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20888   (eval $ac_try) 2>&5
20889   ac_status=$?
20890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20891   (exit $ac_status); }; } &&
20892          { ac_try='test -s conftest$ac_exeext'
20893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20894   (eval $ac_try) 2>&5
20895   ac_status=$?
20896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20897   (exit $ac_status); }; }; then
20898   pgac_cv_func_posix_signals=yes
20899 else
20900   echo "$as_me: failed program was:" >&5
20901 sed 's/^/| /' conftest.$ac_ext >&5
20902
20903 pgac_cv_func_posix_signals=no
20904 fi
20905 rm -f conftest.err conftest.$ac_objext \
20906       conftest$ac_exeext conftest.$ac_ext
20907 fi
20908 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
20909 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
20910 if test x"$pgac_cv_func_posix_signals" = xyes ; then
20911
20912 cat >>confdefs.h <<\_ACEOF
20913 #define HAVE_POSIX_SIGNALS
20914 _ACEOF
20915
20916 fi
20917 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
20918
20919 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
20920   { { echo "$as_me:$LINENO: error:
20921 *** Thread-safety requires POSIX signals, which are not supported by your
20922 *** operating system.
20923 " >&5
20924 echo "$as_me: error:
20925 *** Thread-safety requires POSIX signals, which are not supported by your
20926 *** operating system.
20927 " >&2;}
20928    { (exit 1); exit 1; }; }
20929 fi
20930 fi
20931
20932 if test $ac_cv_func_fseeko = yes; then
20933 # Check whether --enable-largefile or --disable-largefile was given.
20934 if test "${enable_largefile+set}" = set; then
20935   enableval="$enable_largefile"
20936
20937 fi;
20938 if test "$enable_largefile" != no; then
20939
20940   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
20941 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
20942 if test "${ac_cv_sys_largefile_CC+set}" = set; then
20943   echo $ECHO_N "(cached) $ECHO_C" >&6
20944 else
20945   ac_cv_sys_largefile_CC=no
20946      if test "$GCC" != yes; then
20947        ac_save_CC=$CC
20948        while :; do
20949          # IRIX 6.2 and later do not support large files by default,
20950          # so use the C compiler's -n32 option if that helps.
20951          cat >conftest.$ac_ext <<_ACEOF
20952 /* confdefs.h.  */
20953 _ACEOF
20954 cat confdefs.h >>conftest.$ac_ext
20955 cat >>conftest.$ac_ext <<_ACEOF
20956 /* end confdefs.h.  */
20957 #include <sys/types.h>
20958  /* Check that off_t can represent 2**63 - 1 correctly.
20959     We can't simply define LARGE_OFF_T to be 9223372036854775807,
20960     since some C++ compilers masquerading as C compilers
20961     incorrectly reject 9223372036854775807.  */
20962 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20963   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20964                        && LARGE_OFF_T % 2147483647 == 1)
20965                       ? 1 : -1];
20966 int
20967 main ()
20968 {
20969
20970   ;
20971   return 0;
20972 }
20973 _ACEOF
20974          rm -f conftest.$ac_objext
20975 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20976   (eval $ac_compile) 2>conftest.er1
20977   ac_status=$?
20978   grep -v '^ *+' conftest.er1 >conftest.err
20979   rm -f conftest.er1
20980   cat conftest.err >&5
20981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20982   (exit $ac_status); } &&
20983          { ac_try='test -z "$ac_c_werror_flag"
20984                          || test ! -s conftest.err'
20985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20986   (eval $ac_try) 2>&5
20987   ac_status=$?
20988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20989   (exit $ac_status); }; } &&
20990          { ac_try='test -s conftest.$ac_objext'
20991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20992   (eval $ac_try) 2>&5
20993   ac_status=$?
20994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20995   (exit $ac_status); }; }; then
20996   break
20997 else
20998   echo "$as_me: failed program was:" >&5
20999 sed 's/^/| /' conftest.$ac_ext >&5
21000
21001 fi
21002 rm -f conftest.err conftest.$ac_objext
21003          CC="$CC -n32"
21004          rm -f conftest.$ac_objext
21005 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21006   (eval $ac_compile) 2>conftest.er1
21007   ac_status=$?
21008   grep -v '^ *+' conftest.er1 >conftest.err
21009   rm -f conftest.er1
21010   cat conftest.err >&5
21011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21012   (exit $ac_status); } &&
21013          { ac_try='test -z "$ac_c_werror_flag"
21014                          || test ! -s conftest.err'
21015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21016   (eval $ac_try) 2>&5
21017   ac_status=$?
21018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21019   (exit $ac_status); }; } &&
21020          { ac_try='test -s conftest.$ac_objext'
21021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21022   (eval $ac_try) 2>&5
21023   ac_status=$?
21024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21025   (exit $ac_status); }; }; then
21026   ac_cv_sys_largefile_CC=' -n32'; break
21027 else
21028   echo "$as_me: failed program was:" >&5
21029 sed 's/^/| /' conftest.$ac_ext >&5
21030
21031 fi
21032 rm -f conftest.err conftest.$ac_objext
21033          break
21034        done
21035        CC=$ac_save_CC
21036        rm -f conftest.$ac_ext
21037     fi
21038 fi
21039 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21040 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21041   if test "$ac_cv_sys_largefile_CC" != no; then
21042     CC=$CC$ac_cv_sys_largefile_CC
21043   fi
21044
21045   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21046 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21047 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21048   echo $ECHO_N "(cached) $ECHO_C" >&6
21049 else
21050   while :; do
21051   ac_cv_sys_file_offset_bits=no
21052   cat >conftest.$ac_ext <<_ACEOF
21053 /* confdefs.h.  */
21054 _ACEOF
21055 cat confdefs.h >>conftest.$ac_ext
21056 cat >>conftest.$ac_ext <<_ACEOF
21057 /* end confdefs.h.  */
21058 #include <sys/types.h>
21059  /* Check that off_t can represent 2**63 - 1 correctly.
21060     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21061     since some C++ compilers masquerading as C compilers
21062     incorrectly reject 9223372036854775807.  */
21063 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21064   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21065                        && LARGE_OFF_T % 2147483647 == 1)
21066                       ? 1 : -1];
21067 int
21068 main ()
21069 {
21070
21071   ;
21072   return 0;
21073 }
21074 _ACEOF
21075 rm -f conftest.$ac_objext
21076 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21077   (eval $ac_compile) 2>conftest.er1
21078   ac_status=$?
21079   grep -v '^ *+' conftest.er1 >conftest.err
21080   rm -f conftest.er1
21081   cat conftest.err >&5
21082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21083   (exit $ac_status); } &&
21084          { ac_try='test -z "$ac_c_werror_flag"
21085                          || test ! -s conftest.err'
21086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21087   (eval $ac_try) 2>&5
21088   ac_status=$?
21089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21090   (exit $ac_status); }; } &&
21091          { ac_try='test -s conftest.$ac_objext'
21092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21093   (eval $ac_try) 2>&5
21094   ac_status=$?
21095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21096   (exit $ac_status); }; }; then
21097   break
21098 else
21099   echo "$as_me: failed program was:" >&5
21100 sed 's/^/| /' conftest.$ac_ext >&5
21101
21102 fi
21103 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21104   cat >conftest.$ac_ext <<_ACEOF
21105 /* confdefs.h.  */
21106 _ACEOF
21107 cat confdefs.h >>conftest.$ac_ext
21108 cat >>conftest.$ac_ext <<_ACEOF
21109 /* end confdefs.h.  */
21110 #define _FILE_OFFSET_BITS 64
21111 #include <sys/types.h>
21112  /* Check that off_t can represent 2**63 - 1 correctly.
21113     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21114     since some C++ compilers masquerading as C compilers
21115     incorrectly reject 9223372036854775807.  */
21116 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21117   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21118                        && LARGE_OFF_T % 2147483647 == 1)
21119                       ? 1 : -1];
21120 int
21121 main ()
21122 {
21123
21124   ;
21125   return 0;
21126 }
21127 _ACEOF
21128 rm -f conftest.$ac_objext
21129 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21130   (eval $ac_compile) 2>conftest.er1
21131   ac_status=$?
21132   grep -v '^ *+' conftest.er1 >conftest.err
21133   rm -f conftest.er1
21134   cat conftest.err >&5
21135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21136   (exit $ac_status); } &&
21137          { ac_try='test -z "$ac_c_werror_flag"
21138                          || test ! -s conftest.err'
21139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21140   (eval $ac_try) 2>&5
21141   ac_status=$?
21142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21143   (exit $ac_status); }; } &&
21144          { ac_try='test -s conftest.$ac_objext'
21145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21146   (eval $ac_try) 2>&5
21147   ac_status=$?
21148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21149   (exit $ac_status); }; }; then
21150   ac_cv_sys_file_offset_bits=64; break
21151 else
21152   echo "$as_me: failed program was:" >&5
21153 sed 's/^/| /' conftest.$ac_ext >&5
21154
21155 fi
21156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21157   break
21158 done
21159 fi
21160 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21161 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21162 if test "$ac_cv_sys_file_offset_bits" != no; then
21163
21164 cat >>confdefs.h <<_ACEOF
21165 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21166 _ACEOF
21167
21168 fi
21169 rm -f conftest*
21170   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21171 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21172 if test "${ac_cv_sys_large_files+set}" = set; then
21173   echo $ECHO_N "(cached) $ECHO_C" >&6
21174 else
21175   while :; do
21176   ac_cv_sys_large_files=no
21177   cat >conftest.$ac_ext <<_ACEOF
21178 /* confdefs.h.  */
21179 _ACEOF
21180 cat confdefs.h >>conftest.$ac_ext
21181 cat >>conftest.$ac_ext <<_ACEOF
21182 /* end confdefs.h.  */
21183 #include <sys/types.h>
21184  /* Check that off_t can represent 2**63 - 1 correctly.
21185     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21186     since some C++ compilers masquerading as C compilers
21187     incorrectly reject 9223372036854775807.  */
21188 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21189   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21190                        && LARGE_OFF_T % 2147483647 == 1)
21191                       ? 1 : -1];
21192 int
21193 main ()
21194 {
21195
21196   ;
21197   return 0;
21198 }
21199 _ACEOF
21200 rm -f conftest.$ac_objext
21201 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21202   (eval $ac_compile) 2>conftest.er1
21203   ac_status=$?
21204   grep -v '^ *+' conftest.er1 >conftest.err
21205   rm -f conftest.er1
21206   cat conftest.err >&5
21207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21208   (exit $ac_status); } &&
21209          { ac_try='test -z "$ac_c_werror_flag"
21210                          || test ! -s conftest.err'
21211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21212   (eval $ac_try) 2>&5
21213   ac_status=$?
21214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21215   (exit $ac_status); }; } &&
21216          { ac_try='test -s conftest.$ac_objext'
21217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21218   (eval $ac_try) 2>&5
21219   ac_status=$?
21220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21221   (exit $ac_status); }; }; then
21222   break
21223 else
21224   echo "$as_me: failed program was:" >&5
21225 sed 's/^/| /' conftest.$ac_ext >&5
21226
21227 fi
21228 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21229   cat >conftest.$ac_ext <<_ACEOF
21230 /* confdefs.h.  */
21231 _ACEOF
21232 cat confdefs.h >>conftest.$ac_ext
21233 cat >>conftest.$ac_ext <<_ACEOF
21234 /* end confdefs.h.  */
21235 #define _LARGE_FILES 1
21236 #include <sys/types.h>
21237  /* Check that off_t can represent 2**63 - 1 correctly.
21238     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21239     since some C++ compilers masquerading as C compilers
21240     incorrectly reject 9223372036854775807.  */
21241 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21242   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21243                        && LARGE_OFF_T % 2147483647 == 1)
21244                       ? 1 : -1];
21245 int
21246 main ()
21247 {
21248
21249   ;
21250   return 0;
21251 }
21252 _ACEOF
21253 rm -f conftest.$ac_objext
21254 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21255   (eval $ac_compile) 2>conftest.er1
21256   ac_status=$?
21257   grep -v '^ *+' conftest.er1 >conftest.err
21258   rm -f conftest.er1
21259   cat conftest.err >&5
21260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21261   (exit $ac_status); } &&
21262          { ac_try='test -z "$ac_c_werror_flag"
21263                          || test ! -s conftest.err'
21264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21265   (eval $ac_try) 2>&5
21266   ac_status=$?
21267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21268   (exit $ac_status); }; } &&
21269          { ac_try='test -s conftest.$ac_objext'
21270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21271   (eval $ac_try) 2>&5
21272   ac_status=$?
21273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21274   (exit $ac_status); }; }; then
21275   ac_cv_sys_large_files=1; break
21276 else
21277   echo "$as_me: failed program was:" >&5
21278 sed 's/^/| /' conftest.$ac_ext >&5
21279
21280 fi
21281 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21282   break
21283 done
21284 fi
21285 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21286 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21287 if test "$ac_cv_sys_large_files" != no; then
21288
21289 cat >>confdefs.h <<_ACEOF
21290 #define _LARGE_FILES $ac_cv_sys_large_files
21291 _ACEOF
21292
21293 fi
21294 rm -f conftest*
21295 fi
21296
21297 fi
21298
21299 # SunOS doesn't handle negative byte comparisons properly with +/- return
21300 echo "$as_me:$LINENO: checking for working memcmp" >&5
21301 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21302 if test "${ac_cv_func_memcmp_working+set}" = set; then
21303   echo $ECHO_N "(cached) $ECHO_C" >&6
21304 else
21305   if test "$cross_compiling" = yes; then
21306   ac_cv_func_memcmp_working=no
21307 else
21308   cat >conftest.$ac_ext <<_ACEOF
21309 /* confdefs.h.  */
21310 _ACEOF
21311 cat confdefs.h >>conftest.$ac_ext
21312 cat >>conftest.$ac_ext <<_ACEOF
21313 /* end confdefs.h.  */
21314 $ac_includes_default
21315 int
21316 main ()
21317 {
21318
21319   /* Some versions of memcmp are not 8-bit clean.  */
21320   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21321   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21322     exit (1);
21323
21324   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21325      or more and with at least one buffer not starting on a 4-byte boundary.
21326      William Lewis provided this test program.   */
21327   {
21328     char foo[21];
21329     char bar[21];
21330     int i;
21331     for (i = 0; i < 4; i++)
21332       {
21333         char *a = foo + i;
21334         char *b = bar + i;
21335         strcpy (a, "--------01111111");
21336         strcpy (b, "--------10000000");
21337         if (memcmp (a, b, 16) >= 0)
21338           exit (1);
21339       }
21340     exit (0);
21341   }
21342
21343   ;
21344   return 0;
21345 }
21346 _ACEOF
21347 rm -f conftest$ac_exeext
21348 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21349   (eval $ac_link) 2>&5
21350   ac_status=$?
21351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21352   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21354   (eval $ac_try) 2>&5
21355   ac_status=$?
21356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21357   (exit $ac_status); }; }; then
21358   ac_cv_func_memcmp_working=yes
21359 else
21360   echo "$as_me: program exited with status $ac_status" >&5
21361 echo "$as_me: failed program was:" >&5
21362 sed 's/^/| /' conftest.$ac_ext >&5
21363
21364 ( exit $ac_status )
21365 ac_cv_func_memcmp_working=no
21366 fi
21367 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21368 fi
21369 fi
21370 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21371 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21372 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21373     "memcmp.$ac_objext"   | \
21374   *" memcmp.$ac_objext"   | \
21375     "memcmp.$ac_objext "* | \
21376   *" memcmp.$ac_objext "* ) ;;
21377   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21378 esac
21379
21380
21381
21382
21383 # Select semaphore implementation type.
21384 if test "$PORTNAME" != "win32"; then
21385   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21386
21387 cat >>confdefs.h <<\_ACEOF
21388 #define USE_NAMED_POSIX_SEMAPHORES 1
21389 _ACEOF
21390
21391     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21392   else
21393     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21394
21395 cat >>confdefs.h <<\_ACEOF
21396 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21397 _ACEOF
21398
21399       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21400     else
21401
21402 cat >>confdefs.h <<\_ACEOF
21403 #define USE_SYSV_SEMAPHORES 1
21404 _ACEOF
21405
21406       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21407     fi
21408   fi
21409 else
21410
21411 cat >>confdefs.h <<\_ACEOF
21412 #define USE_WIN32_SEMAPHORES 1
21413 _ACEOF
21414
21415   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
21416 fi
21417
21418
21419 # Select shared-memory implementation type.
21420
21421 cat >>confdefs.h <<\_ACEOF
21422 #define USE_SYSV_SHARED_MEMORY 1
21423 _ACEOF
21424
21425 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21426
21427
21428 # If not set in template file, set bytes to use libc memset()
21429 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
21430   MEMSET_LOOP_LIMIT=1024
21431 fi
21432
21433 cat >>confdefs.h <<_ACEOF
21434 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
21435 _ACEOF
21436
21437
21438
21439 if test "$enable_nls" = yes ; then
21440
21441   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21442 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21443 if test "${ac_cv_search_gettext+set}" = set; then
21444   echo $ECHO_N "(cached) $ECHO_C" >&6
21445 else
21446   ac_func_search_save_LIBS=$LIBS
21447 ac_cv_search_gettext=no
21448 cat >conftest.$ac_ext <<_ACEOF
21449 /* confdefs.h.  */
21450 _ACEOF
21451 cat confdefs.h >>conftest.$ac_ext
21452 cat >>conftest.$ac_ext <<_ACEOF
21453 /* end confdefs.h.  */
21454
21455 /* Override any gcc2 internal prototype to avoid an error.  */
21456 #ifdef __cplusplus
21457 extern "C"
21458 #endif
21459 /* We use char because int might match the return type of a gcc2
21460    builtin and then its argument prototype would still apply.  */
21461 char gettext ();
21462 int
21463 main ()
21464 {
21465 gettext ();
21466   ;
21467   return 0;
21468 }
21469 _ACEOF
21470 rm -f conftest.$ac_objext conftest$ac_exeext
21471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21472   (eval $ac_link) 2>conftest.er1
21473   ac_status=$?
21474   grep -v '^ *+' conftest.er1 >conftest.err
21475   rm -f conftest.er1
21476   cat conftest.err >&5
21477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21478   (exit $ac_status); } &&
21479          { ac_try='test -z "$ac_c_werror_flag"
21480                          || test ! -s conftest.err'
21481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21482   (eval $ac_try) 2>&5
21483   ac_status=$?
21484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21485   (exit $ac_status); }; } &&
21486          { ac_try='test -s conftest$ac_exeext'
21487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21488   (eval $ac_try) 2>&5
21489   ac_status=$?
21490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21491   (exit $ac_status); }; }; then
21492   ac_cv_search_gettext="none required"
21493 else
21494   echo "$as_me: failed program was:" >&5
21495 sed 's/^/| /' conftest.$ac_ext >&5
21496
21497 fi
21498 rm -f conftest.err conftest.$ac_objext \
21499       conftest$ac_exeext conftest.$ac_ext
21500 if test "$ac_cv_search_gettext" = no; then
21501   for ac_lib in intl; do
21502     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21503     cat >conftest.$ac_ext <<_ACEOF
21504 /* confdefs.h.  */
21505 _ACEOF
21506 cat confdefs.h >>conftest.$ac_ext
21507 cat >>conftest.$ac_ext <<_ACEOF
21508 /* end confdefs.h.  */
21509
21510 /* Override any gcc2 internal prototype to avoid an error.  */
21511 #ifdef __cplusplus
21512 extern "C"
21513 #endif
21514 /* We use char because int might match the return type of a gcc2
21515    builtin and then its argument prototype would still apply.  */
21516 char gettext ();
21517 int
21518 main ()
21519 {
21520 gettext ();
21521   ;
21522   return 0;
21523 }
21524 _ACEOF
21525 rm -f conftest.$ac_objext conftest$ac_exeext
21526 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21527   (eval $ac_link) 2>conftest.er1
21528   ac_status=$?
21529   grep -v '^ *+' conftest.er1 >conftest.err
21530   rm -f conftest.er1
21531   cat conftest.err >&5
21532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21533   (exit $ac_status); } &&
21534          { ac_try='test -z "$ac_c_werror_flag"
21535                          || test ! -s conftest.err'
21536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21537   (eval $ac_try) 2>&5
21538   ac_status=$?
21539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21540   (exit $ac_status); }; } &&
21541          { ac_try='test -s conftest$ac_exeext'
21542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21543   (eval $ac_try) 2>&5
21544   ac_status=$?
21545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21546   (exit $ac_status); }; }; then
21547   ac_cv_search_gettext="-l$ac_lib"
21548 break
21549 else
21550   echo "$as_me: failed program was:" >&5
21551 sed 's/^/| /' conftest.$ac_ext >&5
21552
21553 fi
21554 rm -f conftest.err conftest.$ac_objext \
21555       conftest$ac_exeext conftest.$ac_ext
21556   done
21557 fi
21558 LIBS=$ac_func_search_save_LIBS
21559 fi
21560 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21561 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21562 if test "$ac_cv_search_gettext" != no; then
21563   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21564
21565 else
21566   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21567 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21568    { (exit 1); exit 1; }; }
21569 fi
21570
21571   if test "${ac_cv_header_libintl_h+set}" = set; then
21572   echo "$as_me:$LINENO: checking for libintl.h" >&5
21573 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21574 if test "${ac_cv_header_libintl_h+set}" = set; then
21575   echo $ECHO_N "(cached) $ECHO_C" >&6
21576 fi
21577 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21578 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21579 else
21580   # Is the header compilable?
21581 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21582 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21583 cat >conftest.$ac_ext <<_ACEOF
21584 /* confdefs.h.  */
21585 _ACEOF
21586 cat confdefs.h >>conftest.$ac_ext
21587 cat >>conftest.$ac_ext <<_ACEOF
21588 /* end confdefs.h.  */
21589 $ac_includes_default
21590 #include <libintl.h>
21591 _ACEOF
21592 rm -f conftest.$ac_objext
21593 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21594   (eval $ac_compile) 2>conftest.er1
21595   ac_status=$?
21596   grep -v '^ *+' conftest.er1 >conftest.err
21597   rm -f conftest.er1
21598   cat conftest.err >&5
21599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21600   (exit $ac_status); } &&
21601          { ac_try='test -z "$ac_c_werror_flag"
21602                          || test ! -s conftest.err'
21603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21604   (eval $ac_try) 2>&5
21605   ac_status=$?
21606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21607   (exit $ac_status); }; } &&
21608          { ac_try='test -s conftest.$ac_objext'
21609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21610   (eval $ac_try) 2>&5
21611   ac_status=$?
21612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21613   (exit $ac_status); }; }; then
21614   ac_header_compiler=yes
21615 else
21616   echo "$as_me: failed program was:" >&5
21617 sed 's/^/| /' conftest.$ac_ext >&5
21618
21619 ac_header_compiler=no
21620 fi
21621 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21622 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21623 echo "${ECHO_T}$ac_header_compiler" >&6
21624
21625 # Is the header present?
21626 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21627 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21628 cat >conftest.$ac_ext <<_ACEOF
21629 /* confdefs.h.  */
21630 _ACEOF
21631 cat confdefs.h >>conftest.$ac_ext
21632 cat >>conftest.$ac_ext <<_ACEOF
21633 /* end confdefs.h.  */
21634 #include <libintl.h>
21635 _ACEOF
21636 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21637   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21638   ac_status=$?
21639   grep -v '^ *+' conftest.er1 >conftest.err
21640   rm -f conftest.er1
21641   cat conftest.err >&5
21642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21643   (exit $ac_status); } >/dev/null; then
21644   if test -s conftest.err; then
21645     ac_cpp_err=$ac_c_preproc_warn_flag
21646     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21647   else
21648     ac_cpp_err=
21649   fi
21650 else
21651   ac_cpp_err=yes
21652 fi
21653 if test -z "$ac_cpp_err"; then
21654   ac_header_preproc=yes
21655 else
21656   echo "$as_me: failed program was:" >&5
21657 sed 's/^/| /' conftest.$ac_ext >&5
21658
21659   ac_header_preproc=no
21660 fi
21661 rm -f conftest.err conftest.$ac_ext
21662 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21663 echo "${ECHO_T}$ac_header_preproc" >&6
21664
21665 # So?  What about this header?
21666 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21667   yes:no: )
21668     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21669 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21670     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
21671 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
21672     ac_header_preproc=yes
21673     ;;
21674   no:yes:* )
21675     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
21676 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
21677     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
21678 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
21679     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
21680 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
21681     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
21682 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21683     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
21684 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
21685     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
21686 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
21687     (
21688       cat <<\_ASBOX
21689 ## ---------------------------------------- ##
21690 ## Report this to pgsql-bugs@postgresql.org ##
21691 ## ---------------------------------------- ##
21692 _ASBOX
21693     ) |
21694       sed "s/^/$as_me: WARNING:     /" >&2
21695     ;;
21696 esac
21697 echo "$as_me:$LINENO: checking for libintl.h" >&5
21698 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21699 if test "${ac_cv_header_libintl_h+set}" = set; then
21700   echo $ECHO_N "(cached) $ECHO_C" >&6
21701 else
21702   ac_cv_header_libintl_h=$ac_header_preproc
21703 fi
21704 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21705 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21706
21707 fi
21708 if test $ac_cv_header_libintl_h = yes; then
21709   :
21710 else
21711   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
21712 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
21713    { (exit 1); exit 1; }; }
21714 fi
21715
21716
21717   for ac_prog in msgfmt
21718 do
21719   # Extract the first word of "$ac_prog", so it can be a program name with args.
21720 set dummy $ac_prog; ac_word=$2
21721 echo "$as_me:$LINENO: checking for $ac_word" >&5
21722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21723 if test "${ac_cv_prog_MSGFMT+set}" = set; then
21724   echo $ECHO_N "(cached) $ECHO_C" >&6
21725 else
21726   if test -n "$MSGFMT"; then
21727   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
21728 else
21729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21730 for as_dir in $PATH
21731 do
21732   IFS=$as_save_IFS
21733   test -z "$as_dir" && as_dir=.
21734   for ac_exec_ext in '' $ac_executable_extensions; do
21735   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21736     ac_cv_prog_MSGFMT="$ac_prog"
21737     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21738     break 2
21739   fi
21740 done
21741 done
21742
21743 fi
21744 fi
21745 MSGFMT=$ac_cv_prog_MSGFMT
21746 if test -n "$MSGFMT"; then
21747   echo "$as_me:$LINENO: result: $MSGFMT" >&5
21748 echo "${ECHO_T}$MSGFMT" >&6
21749 else
21750   echo "$as_me:$LINENO: result: no" >&5
21751 echo "${ECHO_T}no" >&6
21752 fi
21753
21754   test -n "$MSGFMT" && break
21755 done
21756
21757   if test -z "$MSGFMT"; then
21758     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
21759 echo "$as_me: error: msgfmt is required for NLS" >&2;}
21760    { (exit 1); exit 1; }; }
21761   fi
21762   for ac_prog in msgmerge
21763 do
21764   # Extract the first word of "$ac_prog", so it can be a program name with args.
21765 set dummy $ac_prog; ac_word=$2
21766 echo "$as_me:$LINENO: checking for $ac_word" >&5
21767 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21768 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
21769   echo $ECHO_N "(cached) $ECHO_C" >&6
21770 else
21771   if test -n "$MSGMERGE"; then
21772   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
21773 else
21774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21775 for as_dir in $PATH
21776 do
21777   IFS=$as_save_IFS
21778   test -z "$as_dir" && as_dir=.
21779   for ac_exec_ext in '' $ac_executable_extensions; do
21780   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21781     ac_cv_prog_MSGMERGE="$ac_prog"
21782     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21783     break 2
21784   fi
21785 done
21786 done
21787
21788 fi
21789 fi
21790 MSGMERGE=$ac_cv_prog_MSGMERGE
21791 if test -n "$MSGMERGE"; then
21792   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
21793 echo "${ECHO_T}$MSGMERGE" >&6
21794 else
21795   echo "$as_me:$LINENO: result: no" >&5
21796 echo "${ECHO_T}no" >&6
21797 fi
21798
21799   test -n "$MSGMERGE" && break
21800 done
21801
21802   for ac_prog in xgettext
21803 do
21804   # Extract the first word of "$ac_prog", so it can be a program name with args.
21805 set dummy $ac_prog; ac_word=$2
21806 echo "$as_me:$LINENO: checking for $ac_word" >&5
21807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21808 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
21809   echo $ECHO_N "(cached) $ECHO_C" >&6
21810 else
21811   if test -n "$XGETTEXT"; then
21812   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
21813 else
21814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21815 for as_dir in $PATH
21816 do
21817   IFS=$as_save_IFS
21818   test -z "$as_dir" && as_dir=.
21819   for ac_exec_ext in '' $ac_executable_extensions; do
21820   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21821     ac_cv_prog_XGETTEXT="$ac_prog"
21822     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21823     break 2
21824   fi
21825 done
21826 done
21827
21828 fi
21829 fi
21830 XGETTEXT=$ac_cv_prog_XGETTEXT
21831 if test -n "$XGETTEXT"; then
21832   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
21833 echo "${ECHO_T}$XGETTEXT" >&6
21834 else
21835   echo "$as_me:$LINENO: result: no" >&5
21836 echo "${ECHO_T}no" >&6
21837 fi
21838
21839   test -n "$XGETTEXT" && break
21840 done
21841
21842
21843   # Note: share/locale is always the default, independent of $datadir
21844   localedir='${prefix}/share/locale'
21845
21846
21847 fi
21848
21849 # Check for Tcl configuration script tclConfig.sh
21850 if test "$with_tcl" = yes; then
21851     for ac_prog in tclsh tcl
21852 do
21853   # Extract the first word of "$ac_prog", so it can be a program name with args.
21854 set dummy $ac_prog; ac_word=$2
21855 echo "$as_me:$LINENO: checking for $ac_word" >&5
21856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21857 if test "${ac_cv_path_TCLSH+set}" = set; then
21858   echo $ECHO_N "(cached) $ECHO_C" >&6
21859 else
21860   case $TCLSH in
21861   [\\/]* | ?:[\\/]*)
21862   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
21863   ;;
21864   *)
21865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21866 for as_dir in $PATH
21867 do
21868   IFS=$as_save_IFS
21869   test -z "$as_dir" && as_dir=.
21870   for ac_exec_ext in '' $ac_executable_extensions; do
21871   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21872     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
21873     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21874     break 2
21875   fi
21876 done
21877 done
21878
21879   ;;
21880 esac
21881 fi
21882 TCLSH=$ac_cv_path_TCLSH
21883
21884 if test -n "$TCLSH"; then
21885   echo "$as_me:$LINENO: result: $TCLSH" >&5
21886 echo "${ECHO_T}$TCLSH" >&6
21887 else
21888   echo "$as_me:$LINENO: result: no" >&5
21889 echo "${ECHO_T}no" >&6
21890 fi
21891
21892   test -n "$TCLSH" && break
21893 done
21894
21895 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
21896 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
21897 # Let user override test
21898 if test -z "$TCL_CONFIG_SH"; then
21899     pgac_test_dirs="$with_tclconfig"
21900
21901     set X $pgac_test_dirs; shift
21902     if test $# -eq 0; then
21903         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
21904 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
21905    { (exit 1); exit 1; }; }
21906         set X `echo 'puts $auto_path' | $TCLSH`; shift
21907     fi
21908
21909     for pgac_dir do
21910         if test -r "$pgac_dir/tclConfig.sh"; then
21911             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
21912             break
21913         fi
21914     done
21915 fi
21916
21917 if test -z "$TCL_CONFIG_SH"; then
21918     echo "$as_me:$LINENO: result: no" >&5
21919 echo "${ECHO_T}no" >&6
21920     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
21921 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
21922    { (exit 1); exit 1; }; }
21923 else
21924     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
21925 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
21926 fi
21927
21928
21929
21930     . "$TCL_CONFIG_SH"
21931 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
21932 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
21933 eval TCL_LIBS=\"$TCL_LIBS\"
21934 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
21935 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
21936
21937         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
21938     ac_save_CPPFLAGS=$CPPFLAGS
21939     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
21940     if test "${ac_cv_header_tcl_h+set}" = set; then
21941   echo "$as_me:$LINENO: checking for tcl.h" >&5
21942 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
21943 if test "${ac_cv_header_tcl_h+set}" = set; then
21944   echo $ECHO_N "(cached) $ECHO_C" >&6
21945 fi
21946 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
21947 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
21948 else
21949   # Is the header compilable?
21950 echo "$as_me:$LINENO: checking tcl.h usability" >&5
21951 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
21952 cat >conftest.$ac_ext <<_ACEOF
21953 /* confdefs.h.  */
21954 _ACEOF
21955 cat confdefs.h >>conftest.$ac_ext
21956 cat >>conftest.$ac_ext <<_ACEOF
21957 /* end confdefs.h.  */
21958 $ac_includes_default
21959 #include <tcl.h>
21960 _ACEOF
21961 rm -f conftest.$ac_objext
21962 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21963   (eval $ac_compile) 2>conftest.er1
21964   ac_status=$?
21965   grep -v '^ *+' conftest.er1 >conftest.err
21966   rm -f conftest.er1
21967   cat conftest.err >&5
21968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21969   (exit $ac_status); } &&
21970          { ac_try='test -z "$ac_c_werror_flag"
21971                          || test ! -s conftest.err'
21972   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21973   (eval $ac_try) 2>&5
21974   ac_status=$?
21975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21976   (exit $ac_status); }; } &&
21977          { ac_try='test -s conftest.$ac_objext'
21978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21979   (eval $ac_try) 2>&5
21980   ac_status=$?
21981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21982   (exit $ac_status); }; }; then
21983   ac_header_compiler=yes
21984 else
21985   echo "$as_me: failed program was:" >&5
21986 sed 's/^/| /' conftest.$ac_ext >&5
21987
21988 ac_header_compiler=no
21989 fi
21990 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21991 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21992 echo "${ECHO_T}$ac_header_compiler" >&6
21993
21994 # Is the header present?
21995 echo "$as_me:$LINENO: checking tcl.h presence" >&5
21996 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
21997 cat >conftest.$ac_ext <<_ACEOF
21998 /* confdefs.h.  */
21999 _ACEOF
22000 cat confdefs.h >>conftest.$ac_ext
22001 cat >>conftest.$ac_ext <<_ACEOF
22002 /* end confdefs.h.  */
22003 #include <tcl.h>
22004 _ACEOF
22005 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22006   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22007   ac_status=$?
22008   grep -v '^ *+' conftest.er1 >conftest.err
22009   rm -f conftest.er1
22010   cat conftest.err >&5
22011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22012   (exit $ac_status); } >/dev/null; then
22013   if test -s conftest.err; then
22014     ac_cpp_err=$ac_c_preproc_warn_flag
22015     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22016   else
22017     ac_cpp_err=
22018   fi
22019 else
22020   ac_cpp_err=yes
22021 fi
22022 if test -z "$ac_cpp_err"; then
22023   ac_header_preproc=yes
22024 else
22025   echo "$as_me: failed program was:" >&5
22026 sed 's/^/| /' conftest.$ac_ext >&5
22027
22028   ac_header_preproc=no
22029 fi
22030 rm -f conftest.err conftest.$ac_ext
22031 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22032 echo "${ECHO_T}$ac_header_preproc" >&6
22033
22034 # So?  What about this header?
22035 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22036   yes:no: )
22037     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22038 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22039     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22040 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22041     ac_header_preproc=yes
22042     ;;
22043   no:yes:* )
22044     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22045 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22046     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22047 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22048     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22049 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22050     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22051 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22052     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22053 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22054     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22055 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22056     (
22057       cat <<\_ASBOX
22058 ## ---------------------------------------- ##
22059 ## Report this to pgsql-bugs@postgresql.org ##
22060 ## ---------------------------------------- ##
22061 _ASBOX
22062     ) |
22063       sed "s/^/$as_me: WARNING:     /" >&2
22064     ;;
22065 esac
22066 echo "$as_me:$LINENO: checking for tcl.h" >&5
22067 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22068 if test "${ac_cv_header_tcl_h+set}" = set; then
22069   echo $ECHO_N "(cached) $ECHO_C" >&6
22070 else
22071   ac_cv_header_tcl_h=$ac_header_preproc
22072 fi
22073 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22074 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22075
22076 fi
22077 if test $ac_cv_header_tcl_h = yes; then
22078   :
22079 else
22080   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22081 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22082    { (exit 1); exit 1; }; }
22083 fi
22084
22085
22086     CPPFLAGS=$ac_save_CPPFLAGS
22087 fi
22088
22089 #
22090 # Check for DocBook and tools
22091 #
22092 for ac_prog in onsgmls nsgmls
22093 do
22094   # Extract the first word of "$ac_prog", so it can be a program name with args.
22095 set dummy $ac_prog; ac_word=$2
22096 echo "$as_me:$LINENO: checking for $ac_word" >&5
22097 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22098 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22099   echo $ECHO_N "(cached) $ECHO_C" >&6
22100 else
22101   if test -n "$NSGMLS"; then
22102   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22103 else
22104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22105 for as_dir in $PATH
22106 do
22107   IFS=$as_save_IFS
22108   test -z "$as_dir" && as_dir=.
22109   for ac_exec_ext in '' $ac_executable_extensions; do
22110   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22111     ac_cv_prog_NSGMLS="$ac_prog"
22112     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22113     break 2
22114   fi
22115 done
22116 done
22117
22118 fi
22119 fi
22120 NSGMLS=$ac_cv_prog_NSGMLS
22121 if test -n "$NSGMLS"; then
22122   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22123 echo "${ECHO_T}$NSGMLS" >&6
22124 else
22125   echo "$as_me:$LINENO: result: no" >&5
22126 echo "${ECHO_T}no" >&6
22127 fi
22128
22129   test -n "$NSGMLS" && break
22130 done
22131
22132 for ac_prog in openjade jade
22133 do
22134   # Extract the first word of "$ac_prog", so it can be a program name with args.
22135 set dummy $ac_prog; ac_word=$2
22136 echo "$as_me:$LINENO: checking for $ac_word" >&5
22137 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22138 if test "${ac_cv_prog_JADE+set}" = set; then
22139   echo $ECHO_N "(cached) $ECHO_C" >&6
22140 else
22141   if test -n "$JADE"; then
22142   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22143 else
22144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22145 for as_dir in $PATH
22146 do
22147   IFS=$as_save_IFS
22148   test -z "$as_dir" && as_dir=.
22149   for ac_exec_ext in '' $ac_executable_extensions; do
22150   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22151     ac_cv_prog_JADE="$ac_prog"
22152     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22153     break 2
22154   fi
22155 done
22156 done
22157
22158 fi
22159 fi
22160 JADE=$ac_cv_prog_JADE
22161 if test -n "$JADE"; then
22162   echo "$as_me:$LINENO: result: $JADE" >&5
22163 echo "${ECHO_T}$JADE" >&6
22164 else
22165   echo "$as_me:$LINENO: result: no" >&5
22166 echo "${ECHO_T}no" >&6
22167 fi
22168
22169   test -n "$JADE" && break
22170 done
22171
22172
22173 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22174 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22175 if test "${pgac_cv_check_docbook+set}" = set; then
22176   echo $ECHO_N "(cached) $ECHO_C" >&6
22177 else
22178   cat >conftest.sgml <<EOF
22179 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22180 <book>
22181  <title>test</title>
22182  <chapter>
22183   <title>random</title>
22184    <sect1>
22185     <title>testsect</title>
22186     <para>text</para>
22187   </sect1>
22188  </chapter>
22189 </book>
22190 EOF
22191
22192 pgac_cv_check_docbook=no
22193
22194 if test -n "$NSGMLS"; then
22195   $NSGMLS -s conftest.sgml 1>&5 2>&1
22196   if test $? -eq 0; then
22197     pgac_cv_check_docbook=yes
22198   fi
22199 fi
22200 rm -f conftest.sgml
22201 fi
22202 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22203 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22204
22205 have_docbook=$pgac_cv_check_docbook
22206
22207
22208 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22209 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22210 if test "${pgac_cv_path_stylesheets+set}" = set; then
22211   echo $ECHO_N "(cached) $ECHO_C" >&6
22212 else
22213   if test -n "$DOCBOOKSTYLE"; then
22214   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22215 else
22216   for pgac_prefix in /usr /usr/local /opt; do
22217     for pgac_infix in share lib; do
22218       for pgac_postfix in \
22219         sgml/stylesheets/nwalsh-modular \
22220         sgml/stylesheets/docbook \
22221                 sgml/docbook-dsssl \
22222         sgml/docbook/dsssl/modular \
22223         sgml/docbook/stylesheet/dsssl/modular \
22224         sgml/docbook/dsssl-stylesheets
22225       do
22226         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22227         if test -r "$pgac_candidate/html/docbook.dsl" \
22228            && test -r "$pgac_candidate/print/docbook.dsl"
22229         then
22230           pgac_cv_path_stylesheets=$pgac_candidate
22231           break 3
22232         fi
22233       done
22234     done
22235   done
22236 fi
22237 fi
22238
22239 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22240
22241 if test -n "$DOCBOOKSTYLE"; then
22242   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22243 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22244 else
22245   echo "$as_me:$LINENO: result: no" >&5
22246 echo "${ECHO_T}no" >&6
22247 fi
22248 if test -n "$DOCBOOKSTYLE"; then
22249   for ac_prog in collateindex.pl
22250 do
22251   # Extract the first word of "$ac_prog", so it can be a program name with args.
22252 set dummy $ac_prog; ac_word=$2
22253 echo "$as_me:$LINENO: checking for $ac_word" >&5
22254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22255 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22256   echo $ECHO_N "(cached) $ECHO_C" >&6
22257 else
22258   case $COLLATEINDEX in
22259   [\\/]* | ?:[\\/]*)
22260   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22261   ;;
22262   *)
22263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22264 for as_dir in $DOCBOOKSTYLE/bin $PATH
22265 do
22266   IFS=$as_save_IFS
22267   test -z "$as_dir" && as_dir=.
22268   for ac_exec_ext in '' $ac_executable_extensions; do
22269   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22270     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22271     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22272     break 2
22273   fi
22274 done
22275 done
22276
22277   ;;
22278 esac
22279 fi
22280 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22281
22282 if test -n "$COLLATEINDEX"; then
22283   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22284 echo "${ECHO_T}$COLLATEINDEX" >&6
22285 else
22286   echo "$as_me:$LINENO: result: no" >&5
22287 echo "${ECHO_T}no" >&6
22288 fi
22289
22290   test -n "$COLLATEINDEX" && break
22291 done
22292
22293 else
22294   for ac_prog in collateindex.pl
22295 do
22296   # Extract the first word of "$ac_prog", so it can be a program name with args.
22297 set dummy $ac_prog; ac_word=$2
22298 echo "$as_me:$LINENO: checking for $ac_word" >&5
22299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22300 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22301   echo $ECHO_N "(cached) $ECHO_C" >&6
22302 else
22303   case $COLLATEINDEX in
22304   [\\/]* | ?:[\\/]*)
22305   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22306   ;;
22307   *)
22308   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22309 for as_dir in $PATH
22310 do
22311   IFS=$as_save_IFS
22312   test -z "$as_dir" && as_dir=.
22313   for ac_exec_ext in '' $ac_executable_extensions; do
22314   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22315     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22316     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22317     break 2
22318   fi
22319 done
22320 done
22321
22322   ;;
22323 esac
22324 fi
22325 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22326
22327 if test -n "$COLLATEINDEX"; then
22328   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22329 echo "${ECHO_T}$COLLATEINDEX" >&6
22330 else
22331   echo "$as_me:$LINENO: result: no" >&5
22332 echo "${ECHO_T}no" >&6
22333 fi
22334
22335   test -n "$COLLATEINDEX" && break
22336 done
22337
22338 fi
22339 for ac_prog in sgmlspl
22340 do
22341   # Extract the first word of "$ac_prog", so it can be a program name with args.
22342 set dummy $ac_prog; ac_word=$2
22343 echo "$as_me:$LINENO: checking for $ac_word" >&5
22344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22345 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22346   echo $ECHO_N "(cached) $ECHO_C" >&6
22347 else
22348   if test -n "$SGMLSPL"; then
22349   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22350 else
22351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22352 for as_dir in $PATH
22353 do
22354   IFS=$as_save_IFS
22355   test -z "$as_dir" && as_dir=.
22356   for ac_exec_ext in '' $ac_executable_extensions; do
22357   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22358     ac_cv_prog_SGMLSPL="$ac_prog"
22359     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22360     break 2
22361   fi
22362 done
22363 done
22364
22365 fi
22366 fi
22367 SGMLSPL=$ac_cv_prog_SGMLSPL
22368 if test -n "$SGMLSPL"; then
22369   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22370 echo "${ECHO_T}$SGMLSPL" >&6
22371 else
22372   echo "$as_me:$LINENO: result: no" >&5
22373 echo "${ECHO_T}no" >&6
22374 fi
22375
22376   test -n "$SGMLSPL" && break
22377 done
22378
22379
22380 # Thread testing
22381
22382 # We have to run the thread test near the end so we have all our symbols
22383 # defined.  Cross compiling throws a warning.
22384 #
22385 if test "$enable_thread_safety_force" = yes; then
22386 if test x"$template" != x"win32"
22387 then
22388   { echo "$as_me:$LINENO: WARNING:
22389 *** Skipping thread test program.  --enable-thread-safety-force was used.
22390 *** Run the program in src/test/thread on the your machine and add
22391 proper locking function calls to your applications to guarantee thread
22392 safety.
22393 " >&5
22394 echo "$as_me: WARNING:
22395 *** Skipping thread test program.  --enable-thread-safety-force was used.
22396 *** Run the program in src/test/thread on the your machine and add
22397 proper locking function calls to your applications to guarantee thread
22398 safety.
22399 " >&2;}
22400 else
22401 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22402 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22403 fi
22404 elif test "$enable_thread_safety" = yes; then
22405 if test x"$template" != x"win32"
22406 then
22407 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22408 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22409
22410 _CFLAGS="$CFLAGS"
22411 _LIBS="$LIBS"
22412 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22413 LIBS="$LIBS $PTHREAD_LIBS"
22414 if test "$cross_compiling" = yes; then
22415   echo "$as_me:$LINENO: result: maybe" >&5
22416 echo "${ECHO_T}maybe" >&6
22417   { echo "$as_me:$LINENO: WARNING:
22418 *** Skipping thread test program because of cross-compile build.
22419 *** Run the program in src/test/thread on the target machine.
22420 " >&5
22421 echo "$as_me: WARNING:
22422 *** Skipping thread test program because of cross-compile build.
22423 *** Run the program in src/test/thread on the target machine.
22424 " >&2;}
22425 else
22426   cat >conftest.$ac_ext <<_ACEOF
22427 /* confdefs.h.  */
22428 _ACEOF
22429 cat confdefs.h >>conftest.$ac_ext
22430 cat >>conftest.$ac_ext <<_ACEOF
22431 /* end confdefs.h.  */
22432 #include "$srcdir/src/test/thread/thread_test.c"
22433 _ACEOF
22434 rm -f conftest$ac_exeext
22435 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22436   (eval $ac_link) 2>&5
22437   ac_status=$?
22438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22439   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22441   (eval $ac_try) 2>&5
22442   ac_status=$?
22443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22444   (exit $ac_status); }; }; then
22445   echo "$as_me:$LINENO: result: yes" >&5
22446 echo "${ECHO_T}yes" >&6
22447 else
22448   echo "$as_me: program exited with status $ac_status" >&5
22449 echo "$as_me: failed program was:" >&5
22450 sed 's/^/| /' conftest.$ac_ext >&5
22451
22452 ( exit $ac_status )
22453 echo "$as_me:$LINENO: result: no" >&5
22454 echo "${ECHO_T}no" >&6
22455   { { echo "$as_me:$LINENO: error:
22456 *** Thread test program failed.  Your platform is not thread-safe.
22457 *** Check the file 'config.log'for the exact reason.
22458 ***
22459 *** You can use the configure option --enable-thread-safety-force
22460 *** to force threads to be enabled.  However, you must then run
22461 *** the program in src/test/thread and add locking function calls
22462 *** to your applications to guarantee thread safety.
22463 " >&5
22464 echo "$as_me: error:
22465 *** Thread test program failed.  Your platform is not thread-safe.
22466 *** Check the file 'config.log'for the exact reason.
22467 ***
22468 *** You can use the configure option --enable-thread-safety-force
22469 *** to force threads to be enabled.  However, you must then run
22470 *** the program in src/test/thread and add locking function calls
22471 *** to your applications to guarantee thread safety.
22472 " >&2;}
22473    { (exit 1); exit 1; }; }
22474 fi
22475 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22476 fi
22477 CFLAGS="$_CFLAGS"
22478 LIBS="$_LIBS"
22479 else
22480 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22481 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22482 fi
22483 fi
22484
22485 # prepare build tree if outside source tree
22486 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22487 # Note 2: /bin/pwd might be better than shell's built-in at getting
22488 #         a symlink-free name.
22489 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22490   vpath_build=no
22491 else
22492   vpath_build=yes
22493   if test "$no_create" != yes; then
22494     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22495     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22496     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22497       || { { echo "$as_me:$LINENO: error: failed" >&5
22498 echo "$as_me: error: failed" >&2;}
22499    { (exit 1); exit 1; }; }
22500     echo "$as_me:$LINENO: result: done" >&5
22501 echo "${ECHO_T}done" >&6
22502   fi
22503 fi
22504
22505
22506
22507                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22508
22509
22510                                                             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}"
22511
22512
22513 if test "$PORTNAME" = "win32"; then
22514           ac_config_commands="$ac_config_commands check_win32_symlinks"
22515
22516 fi
22517
22518           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22519
22520
22521           ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
22522
22523
22524
22525 #
22526 # Warn about unknown options
22527 #
22528
22529
22530   for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do
22531      case $var in
22532        with_template) ;;
22533 with_docdir) ;;
22534 with_includes) ;;
22535 with_libraries) ;;
22536 with_libs) ;;
22537 enable_integer_datetimes) ;;
22538 enable_nls) ;;
22539 with_pgport) ;;
22540 enable_shared) ;;
22541 enable_rpath) ;;
22542 enable_spinlocks) ;;
22543 enable_debug) ;;
22544 enable_dtrace) ;;
22545 with_CC) ;;
22546 enable_depend) ;;
22547 enable_cassert) ;;
22548 enable_thread_safety) ;;
22549 enable_thread_safety_force) ;;
22550 with_tcl) ;;
22551 with_tclconfig) ;;
22552 with_perl) ;;
22553 with_python) ;;
22554 with_krb5) ;;
22555 with_krb_srvnam) ;;
22556 with_pam) ;;
22557 with_ldap) ;;
22558 with_bonjour) ;;
22559 with_openssl) ;;
22560 with_readline) ;;
22561 with_libedit_preferred) ;;
22562 with_zlib) ;;
22563
22564        with_gnu_ld) ;;
22565      *)
22566        echo -n "*** Option ignored: "
22567        echo $var | sed -e 's/\(^=*\)/--\1/;s/_/-/g'
22568        ;;
22569      esac
22570   done
22571
22572
22573 cat >confcache <<\_ACEOF
22574 # This file is a shell script that caches the results of configure
22575 # tests run on this system so they can be shared between configure
22576 # scripts and configure runs, see configure's option --config-cache.
22577 # It is not useful on other systems.  If it contains results you don't
22578 # want to keep, you may remove or edit it.
22579 #
22580 # config.status only pays attention to the cache file if you give it
22581 # the --recheck option to rerun configure.
22582 #
22583 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22584 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22585 # following values.
22586
22587 _ACEOF
22588
22589 # The following way of writing the cache mishandles newlines in values,
22590 # but we know of no workaround that is simple, portable, and efficient.
22591 # So, don't put newlines in cache variables' values.
22592 # Ultrix sh set writes to stderr and can't be redirected directly,
22593 # and sets the high bit in the cache file unless we assign to the vars.
22594 {
22595   (set) 2>&1 |
22596     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22597     *ac_space=\ *)
22598       # `set' does not quote correctly, so add quotes (double-quote
22599       # substitution turns \\\\ into \\, and sed turns \\ into \).
22600       sed -n \
22601         "s/'/'\\\\''/g;
22602           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22603       ;;
22604     *)
22605       # `set' quotes correctly as required by POSIX, so do not add quotes.
22606       sed -n \
22607         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22608       ;;
22609     esac;
22610 } |
22611   sed '
22612      t clear
22613      : clear
22614      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22615      t end
22616      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22617      : end' >>confcache
22618 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22619   if test -w $cache_file; then
22620     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22621     cat confcache >$cache_file
22622   else
22623     echo "not updating unwritable cache $cache_file"
22624   fi
22625 fi
22626 rm -f confcache
22627
22628 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22629 # Let make expand exec_prefix.
22630 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22631
22632 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22633 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22634 # trailing colons and then remove the whole line if VPATH becomes empty
22635 # (actually we leave an empty line to preserve line numbers).
22636 if test "x$srcdir" = x.; then
22637   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22638 s/:*\$(srcdir):*/:/;
22639 s/:*\${srcdir}:*/:/;
22640 s/:*@srcdir@:*/:/;
22641 s/^\([^=]*=[     ]*\):*/\1/;
22642 s/:*$//;
22643 s/^[^=]*=[       ]*$//;
22644 }'
22645 fi
22646
22647 DEFS=-DHAVE_CONFIG_H
22648
22649 ac_libobjs=
22650 ac_ltlibobjs=
22651 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22652   # 1. Remove the extension, and $U if already installed.
22653   ac_i=`echo "$ac_i" |
22654          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22655   # 2. Add them.
22656   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22657   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22658 done
22659 LIBOBJS=$ac_libobjs
22660
22661 LTLIBOBJS=$ac_ltlibobjs
22662
22663
22664
22665 : ${CONFIG_STATUS=./config.status}
22666 ac_clean_files_save=$ac_clean_files
22667 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22668 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22669 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22670 cat >$CONFIG_STATUS <<_ACEOF
22671 #! $SHELL
22672 # Generated by $as_me.
22673 # Run this file to recreate the current configuration.
22674 # Compiler output produced by configure, useful for debugging
22675 # configure, is in config.log if it exists.
22676
22677 debug=false
22678 ac_cs_recheck=false
22679 ac_cs_silent=false
22680 SHELL=\${CONFIG_SHELL-$SHELL}
22681 _ACEOF
22682
22683 cat >>$CONFIG_STATUS <<\_ACEOF
22684 ## --------------------- ##
22685 ## M4sh Initialization.  ##
22686 ## --------------------- ##
22687
22688 # Be Bourne compatible
22689 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22690   emulate sh
22691   NULLCMD=:
22692   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22693   # is contrary to our usage.  Disable this feature.
22694   alias -g '${1+"$@"}'='"$@"'
22695 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22696   set -o posix
22697 fi
22698 DUALCASE=1; export DUALCASE # for MKS sh
22699
22700 # Support unset when possible.
22701 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22702   as_unset=unset
22703 else
22704   as_unset=false
22705 fi
22706
22707
22708 # Work around bugs in pre-3.0 UWIN ksh.
22709 $as_unset ENV MAIL MAILPATH
22710 PS1='$ '
22711 PS2='> '
22712 PS4='+ '
22713
22714 # NLS nuisances.
22715 for as_var in \
22716   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22717   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22718   LC_TELEPHONE LC_TIME
22719 do
22720   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22721     eval $as_var=C; export $as_var
22722   else
22723     $as_unset $as_var
22724   fi
22725 done
22726
22727 # Required to use basename.
22728 if expr a : '\(a\)' >/dev/null 2>&1; then
22729   as_expr=expr
22730 else
22731   as_expr=false
22732 fi
22733
22734 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22735   as_basename=basename
22736 else
22737   as_basename=false
22738 fi
22739
22740
22741 # Name of the executable.
22742 as_me=`$as_basename "$0" ||
22743 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22744          X"$0" : 'X\(//\)$' \| \
22745          X"$0" : 'X\(/\)$' \| \
22746          .     : '\(.\)' 2>/dev/null ||
22747 echo X/"$0" |
22748     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22749           /^X\/\(\/\/\)$/{ s//\1/; q; }
22750           /^X\/\(\/\).*/{ s//\1/; q; }
22751           s/.*/./; q'`
22752
22753
22754 # PATH needs CR, and LINENO needs CR and PATH.
22755 # Avoid depending upon Character Ranges.
22756 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22757 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22758 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22759 as_cr_digits='0123456789'
22760 as_cr_alnum=$as_cr_Letters$as_cr_digits
22761
22762 # The user is always right.
22763 if test "${PATH_SEPARATOR+set}" != set; then
22764   echo "#! /bin/sh" >conf$$.sh
22765   echo  "exit 0"   >>conf$$.sh
22766   chmod +x conf$$.sh
22767   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22768     PATH_SEPARATOR=';'
22769   else
22770     PATH_SEPARATOR=:
22771   fi
22772   rm -f conf$$.sh
22773 fi
22774
22775
22776   as_lineno_1=$LINENO
22777   as_lineno_2=$LINENO
22778   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22779   test "x$as_lineno_1" != "x$as_lineno_2" &&
22780   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
22781   # Find who we are.  Look in the path if we contain no path at all
22782   # relative or not.
22783   case $0 in
22784     *[\\/]* ) as_myself=$0 ;;
22785     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22786 for as_dir in $PATH
22787 do
22788   IFS=$as_save_IFS
22789   test -z "$as_dir" && as_dir=.
22790   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22791 done
22792
22793        ;;
22794   esac
22795   # We did not find ourselves, most probably we were run as `sh COMMAND'
22796   # in which case we are not to be found in the path.
22797   if test "x$as_myself" = x; then
22798     as_myself=$0
22799   fi
22800   if test ! -f "$as_myself"; then
22801     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22802 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22803    { (exit 1); exit 1; }; }
22804   fi
22805   case $CONFIG_SHELL in
22806   '')
22807     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22808 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22809 do
22810   IFS=$as_save_IFS
22811   test -z "$as_dir" && as_dir=.
22812   for as_base in sh bash ksh sh5; do
22813          case $as_dir in
22814          /*)
22815            if ("$as_dir/$as_base" -c '
22816   as_lineno_1=$LINENO
22817   as_lineno_2=$LINENO
22818   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22819   test "x$as_lineno_1" != "x$as_lineno_2" &&
22820   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
22821              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22822              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22823              CONFIG_SHELL=$as_dir/$as_base
22824              export CONFIG_SHELL
22825              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22826            fi;;
22827          esac
22828        done
22829 done
22830 ;;
22831   esac
22832
22833   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22834   # uniformly replaced by the line number.  The first 'sed' inserts a
22835   # line-number line before each line; the second 'sed' does the real
22836   # work.  The second script uses 'N' to pair each line-number line
22837   # with the numbered line, and appends trailing '-' during
22838   # substitution so that $LINENO is not a special case at line end.
22839   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22840   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
22841   sed '=' <$as_myself |
22842     sed '
22843       N
22844       s,$,-,
22845       : loop
22846       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22847       t loop
22848       s,-$,,
22849       s,^['$as_cr_digits']*\n,,
22850     ' >$as_me.lineno &&
22851   chmod +x $as_me.lineno ||
22852     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22853 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22854    { (exit 1); exit 1; }; }
22855
22856   # Don't try to exec as it changes $[0], causing all sort of problems
22857   # (the dirname of $[0] is not the place where we might find the
22858   # original and so on.  Autoconf is especially sensible to this).
22859   . ./$as_me.lineno
22860   # Exit status is that of the last command.
22861   exit
22862 }
22863
22864
22865 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22866   *c*,-n*) ECHO_N= ECHO_C='
22867 ' ECHO_T='      ' ;;
22868   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22869   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
22870 esac
22871
22872 if expr a : '\(a\)' >/dev/null 2>&1; then
22873   as_expr=expr
22874 else
22875   as_expr=false
22876 fi
22877
22878 rm -f conf$$ conf$$.exe conf$$.file
22879 echo >conf$$.file
22880 if ln -s conf$$.file conf$$ 2>/dev/null; then
22881   # We could just check for DJGPP; but this test a) works b) is more generic
22882   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22883   if test -f conf$$.exe; then
22884     # Don't use ln at all; we don't have any links
22885     as_ln_s='cp -p'
22886   else
22887     as_ln_s='ln -s'
22888   fi
22889 elif ln conf$$.file conf$$ 2>/dev/null; then
22890   as_ln_s=ln
22891 else
22892   as_ln_s='cp -p'
22893 fi
22894 rm -f conf$$ conf$$.exe conf$$.file
22895
22896 if mkdir -p . 2>/dev/null; then
22897   as_mkdir_p=:
22898 else
22899   test -d ./-p && rmdir ./-p
22900   as_mkdir_p=false
22901 fi
22902
22903 as_executable_p="test -f"
22904
22905 # Sed expression to map a string onto a valid CPP name.
22906 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22907
22908 # Sed expression to map a string onto a valid variable name.
22909 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22910
22911
22912 # IFS
22913 # We need space, tab and new line, in precisely that order.
22914 as_nl='
22915 '
22916 IFS="   $as_nl"
22917
22918 # CDPATH.
22919 $as_unset CDPATH
22920
22921 exec 6>&1
22922
22923 # Open the log real soon, to keep \$[0] and so on meaningful, and to
22924 # report actual input values of CONFIG_FILES etc. instead of their
22925 # values after options handling.  Logging --version etc. is OK.
22926 exec 5>>config.log
22927 {
22928   echo
22929   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22930 ## Running $as_me. ##
22931 _ASBOX
22932 } >&5
22933 cat >&5 <<_CSEOF
22934
22935 This file was extended by PostgreSQL $as_me 8.2beta1, which was
22936 generated by GNU Autoconf 2.59.  Invocation command line was
22937
22938   CONFIG_FILES    = $CONFIG_FILES
22939   CONFIG_HEADERS  = $CONFIG_HEADERS
22940   CONFIG_LINKS    = $CONFIG_LINKS
22941   CONFIG_COMMANDS = $CONFIG_COMMANDS
22942   $ $0 $@
22943
22944 _CSEOF
22945 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22946 echo >&5
22947 _ACEOF
22948
22949 # Files that config.status was made for.
22950 if test -n "$ac_config_files"; then
22951   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22952 fi
22953
22954 if test -n "$ac_config_headers"; then
22955   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22956 fi
22957
22958 if test -n "$ac_config_links"; then
22959   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22960 fi
22961
22962 if test -n "$ac_config_commands"; then
22963   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22964 fi
22965
22966 cat >>$CONFIG_STATUS <<\_ACEOF
22967
22968 ac_cs_usage="\
22969 \`$as_me' instantiates files from templates according to the
22970 current configuration.
22971
22972 Usage: $0 [OPTIONS] [FILE]...
22973
22974   -h, --help       print this help, then exit
22975   -V, --version    print version number, then exit
22976   -q, --quiet      do not print progress messages
22977   -d, --debug      don't remove temporary files
22978       --recheck    update $as_me by reconfiguring in the same conditions
22979   --file=FILE[:TEMPLATE]
22980                    instantiate the configuration file FILE
22981   --header=FILE[:TEMPLATE]
22982                    instantiate the configuration header FILE
22983
22984 Configuration files:
22985 $config_files
22986
22987 Configuration headers:
22988 $config_headers
22989
22990 Configuration links:
22991 $config_links
22992
22993 Configuration commands:
22994 $config_commands
22995
22996 Report bugs to <bug-autoconf@gnu.org>."
22997 _ACEOF
22998
22999 cat >>$CONFIG_STATUS <<_ACEOF
23000 ac_cs_version="\\
23001 PostgreSQL config.status 8.2beta1
23002 configured by $0, generated by GNU Autoconf 2.59,
23003   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23004
23005 Copyright (C) 2003 Free Software Foundation, Inc.
23006 This config.status script is free software; the Free Software Foundation
23007 gives unlimited permission to copy, distribute and modify it."
23008 srcdir=$srcdir
23009 _ACEOF
23010
23011 cat >>$CONFIG_STATUS <<\_ACEOF
23012 # If no file are specified by the user, then we need to provide default
23013 # value.  By we need to know if files were specified by the user.
23014 ac_need_defaults=:
23015 while test $# != 0
23016 do
23017   case $1 in
23018   --*=*)
23019     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23020     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23021     ac_shift=:
23022     ;;
23023   -*)
23024     ac_option=$1
23025     ac_optarg=$2
23026     ac_shift=shift
23027     ;;
23028   *) # This is not an option, so the user has probably given explicit
23029      # arguments.
23030      ac_option=$1
23031      ac_need_defaults=false;;
23032   esac
23033
23034   case $ac_option in
23035   # Handling of the options.
23036 _ACEOF
23037 cat >>$CONFIG_STATUS <<\_ACEOF
23038   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23039     ac_cs_recheck=: ;;
23040   --version | --vers* | -V )
23041     echo "$ac_cs_version"; exit 0 ;;
23042   --he | --h)
23043     # Conflict between --help and --header
23044     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23045 Try \`$0 --help' for more information." >&5
23046 echo "$as_me: error: ambiguous option: $1
23047 Try \`$0 --help' for more information." >&2;}
23048    { (exit 1); exit 1; }; };;
23049   --help | --hel | -h )
23050     echo "$ac_cs_usage"; exit 0 ;;
23051   --debug | --d* | -d )
23052     debug=: ;;
23053   --file | --fil | --fi | --f )
23054     $ac_shift
23055     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23056     ac_need_defaults=false;;
23057   --header | --heade | --head | --hea )
23058     $ac_shift
23059     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23060     ac_need_defaults=false;;
23061   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23062   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23063     ac_cs_silent=: ;;
23064
23065   # This is an error.
23066   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23067 Try \`$0 --help' for more information." >&5
23068 echo "$as_me: error: unrecognized option: $1
23069 Try \`$0 --help' for more information." >&2;}
23070    { (exit 1); exit 1; }; } ;;
23071
23072   *) ac_config_targets="$ac_config_targets $1" ;;
23073
23074   esac
23075   shift
23076 done
23077
23078 ac_configure_extra_args=
23079
23080 if $ac_cs_silent; then
23081   exec 6>/dev/null
23082   ac_configure_extra_args="$ac_configure_extra_args --silent"
23083 fi
23084
23085 _ACEOF
23086 cat >>$CONFIG_STATUS <<_ACEOF
23087 if \$ac_cs_recheck; then
23088   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23089   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23090 fi
23091
23092 _ACEOF
23093
23094
23095
23096
23097
23098 cat >>$CONFIG_STATUS <<\_ACEOF
23099 for ac_config_target in $ac_config_targets
23100 do
23101   case "$ac_config_target" in
23102   # Handling of arguments.
23103   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23104   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23105   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23106   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23107   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23108   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23109   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23110   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23111   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23112   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23113   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23114   "src/interfaces/ecpg/include/ecpg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
23115   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23116 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23117    { (exit 1); exit 1; }; };;
23118   esac
23119 done
23120
23121 # If the user did not use the arguments to specify the items to instantiate,
23122 # then the envvar interface is used.  Set only those that are not.
23123 # We use the long form for the default assignment because of an extremely
23124 # bizarre bug on SunOS 4.1.3.
23125 if $ac_need_defaults; then
23126   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23127   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23128   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23129   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23130 fi
23131
23132 # Have a temporary directory for convenience.  Make it in the build tree
23133 # simply because there is no reason to put it here, and in addition,
23134 # creating and moving files from /tmp can sometimes cause problems.
23135 # Create a temporary directory, and hook for its removal unless debugging.
23136 $debug ||
23137 {
23138   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23139   trap '{ (exit 1); exit 1; }' 1 2 13 15
23140 }
23141
23142 # Create a (secure) tmp directory for tmp files.
23143
23144 {
23145   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23146   test -n "$tmp" && test -d "$tmp"
23147 }  ||
23148 {
23149   tmp=./confstat$$-$RANDOM
23150   (umask 077 && mkdir $tmp)
23151 } ||
23152 {
23153    echo "$me: cannot create a temporary directory in ." >&2
23154    { (exit 1); exit 1; }
23155 }
23156
23157 _ACEOF
23158
23159 cat >>$CONFIG_STATUS <<_ACEOF
23160
23161 #
23162 # CONFIG_FILES section.
23163 #
23164
23165 # No need to generate the scripts if there are no CONFIG_FILES.
23166 # This happens for instance when ./config.status config.h
23167 if test -n "\$CONFIG_FILES"; then
23168   # Protect against being on the right side of a sed subst in config.status.
23169   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23170    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23171 s,@SHELL@,$SHELL,;t t
23172 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23173 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23174 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23175 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23176 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23177 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23178 s,@exec_prefix@,$exec_prefix,;t t
23179 s,@prefix@,$prefix,;t t
23180 s,@program_transform_name@,$program_transform_name,;t t
23181 s,@bindir@,$bindir,;t t
23182 s,@sbindir@,$sbindir,;t t
23183 s,@libexecdir@,$libexecdir,;t t
23184 s,@datadir@,$datadir,;t t
23185 s,@sysconfdir@,$sysconfdir,;t t
23186 s,@sharedstatedir@,$sharedstatedir,;t t
23187 s,@localstatedir@,$localstatedir,;t t
23188 s,@libdir@,$libdir,;t t
23189 s,@includedir@,$includedir,;t t
23190 s,@oldincludedir@,$oldincludedir,;t t
23191 s,@infodir@,$infodir,;t t
23192 s,@mandir@,$mandir,;t t
23193 s,@build_alias@,$build_alias,;t t
23194 s,@host_alias@,$host_alias,;t t
23195 s,@target_alias@,$target_alias,;t t
23196 s,@DEFS@,$DEFS,;t t
23197 s,@ECHO_C@,$ECHO_C,;t t
23198 s,@ECHO_N@,$ECHO_N,;t t
23199 s,@ECHO_T@,$ECHO_T,;t t
23200 s,@LIBS@,$LIBS,;t t
23201 s,@configure_args@,$configure_args,;t t
23202 s,@build@,$build,;t t
23203 s,@build_cpu@,$build_cpu,;t t
23204 s,@build_vendor@,$build_vendor,;t t
23205 s,@build_os@,$build_os,;t t
23206 s,@host@,$host,;t t
23207 s,@host_cpu@,$host_cpu,;t t
23208 s,@host_vendor@,$host_vendor,;t t
23209 s,@host_os@,$host_os,;t t
23210 s,@PORTNAME@,$PORTNAME,;t t
23211 s,@docdir@,$docdir,;t t
23212 s,@enable_nls@,$enable_nls,;t t
23213 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23214 s,@default_port@,$default_port,;t t
23215 s,@enable_shared@,$enable_shared,;t t
23216 s,@enable_rpath@,$enable_rpath,;t t
23217 s,@enable_debug@,$enable_debug,;t t
23218 s,@DTRACE@,$DTRACE,;t t
23219 s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
23220 s,@enable_dtrace@,$enable_dtrace,;t t
23221 s,@CC@,$CC,;t t
23222 s,@CFLAGS@,$CFLAGS,;t t
23223 s,@LDFLAGS@,$LDFLAGS,;t t
23224 s,@CPPFLAGS@,$CPPFLAGS,;t t
23225 s,@ac_ct_CC@,$ac_ct_CC,;t t
23226 s,@EXEEXT@,$EXEEXT,;t t
23227 s,@OBJEXT@,$OBJEXT,;t t
23228 s,@CPP@,$CPP,;t t
23229 s,@GCC@,$GCC,;t t
23230 s,@TAS@,$TAS,;t t
23231 s,@autodepend@,$autodepend,;t t
23232 s,@INCLUDES@,$INCLUDES,;t t
23233 s,@enable_thread_safety@,$enable_thread_safety,;t t
23234 s,@with_tcl@,$with_tcl,;t t
23235 s,@with_perl@,$with_perl,;t t
23236 s,@with_python@,$with_python,;t t
23237 s,@with_krb5@,$with_krb5,;t t
23238 s,@krb_srvtab@,$krb_srvtab,;t t
23239 s,@with_pam@,$with_pam,;t t
23240 s,@with_ldap@,$with_ldap,;t t
23241 s,@with_bonjour@,$with_bonjour,;t t
23242 s,@with_openssl@,$with_openssl,;t t
23243 s,@with_zlib@,$with_zlib,;t t
23244 s,@EGREP@,$EGREP,;t t
23245 s,@ELF_SYS@,$ELF_SYS,;t t
23246 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23247 s,@AWK@,$AWK,;t t
23248 s,@FLEX@,$FLEX,;t t
23249 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23250 s,@LN_S@,$LN_S,;t t
23251 s,@LD@,$LD,;t t
23252 s,@with_gnu_ld@,$with_gnu_ld,;t t
23253 s,@ld_R_works@,$ld_R_works,;t t
23254 s,@RANLIB@,$RANLIB,;t t
23255 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23256 s,@TAR@,$TAR,;t t
23257 s,@STRIP@,$STRIP,;t t
23258 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23259 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23260 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23261 s,@YACC@,$YACC,;t t
23262 s,@YFLAGS@,$YFLAGS,;t t
23263 s,@PERL@,$PERL,;t t
23264 s,@perl_archlibexp@,$perl_archlibexp,;t t
23265 s,@perl_privlibexp@,$perl_privlibexp,;t t
23266 s,@perl_useshrplib@,$perl_useshrplib,;t t
23267 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23268 s,@PYTHON@,$PYTHON,;t t
23269 s,@python_version@,$python_version,;t t
23270 s,@python_configdir@,$python_configdir,;t t
23271 s,@python_includespec@,$python_includespec,;t t
23272 s,@python_libdir@,$python_libdir,;t t
23273 s,@python_libspec@,$python_libspec,;t t
23274 s,@python_additional_libs@,$python_additional_libs,;t t
23275 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23276 s,@LIBOBJS@,$LIBOBJS,;t t
23277 s,@acx_pthread_config@,$acx_pthread_config,;t t
23278 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23279 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23280 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23281 s,@LDAP_LIBS_FE@,$LDAP_LIBS_FE,;t t
23282 s,@LDAP_LIBS_BE@,$LDAP_LIBS_BE,;t t
23283 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23284 s,@MSGFMT@,$MSGFMT,;t t
23285 s,@MSGMERGE@,$MSGMERGE,;t t
23286 s,@XGETTEXT@,$XGETTEXT,;t t
23287 s,@localedir@,$localedir,;t t
23288 s,@TCLSH@,$TCLSH,;t t
23289 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23290 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23291 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23292 s,@TCL_LIBS@,$TCL_LIBS,;t t
23293 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23294 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23295 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23296 s,@NSGMLS@,$NSGMLS,;t t
23297 s,@JADE@,$JADE,;t t
23298 s,@have_docbook@,$have_docbook,;t t
23299 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23300 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23301 s,@SGMLSPL@,$SGMLSPL,;t t
23302 s,@vpath_build@,$vpath_build,;t t
23303 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23304 CEOF
23305
23306 _ACEOF
23307
23308   cat >>$CONFIG_STATUS <<\_ACEOF
23309   # Split the substitutions into bite-sized pieces for seds with
23310   # small command number limits, like on Digital OSF/1 and HP-UX.
23311   ac_max_sed_lines=48
23312   ac_sed_frag=1 # Number of current file.
23313   ac_beg=1 # First line for current file.
23314   ac_end=$ac_max_sed_lines # Line after last line for current file.
23315   ac_more_lines=:
23316   ac_sed_cmds=
23317   while $ac_more_lines; do
23318     if test $ac_beg -gt 1; then
23319       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23320     else
23321       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23322     fi
23323     if test ! -s $tmp/subs.frag; then
23324       ac_more_lines=false
23325     else
23326       # The purpose of the label and of the branching condition is to
23327       # speed up the sed processing (if there are no `@' at all, there
23328       # is no need to browse any of the substitutions).
23329       # These are the two extra sed commands mentioned above.
23330       (echo ':t
23331   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23332       if test -z "$ac_sed_cmds"; then
23333         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23334       else
23335         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23336       fi
23337       ac_sed_frag=`expr $ac_sed_frag + 1`
23338       ac_beg=$ac_end
23339       ac_end=`expr $ac_end + $ac_max_sed_lines`
23340     fi
23341   done
23342   if test -z "$ac_sed_cmds"; then
23343     ac_sed_cmds=cat
23344   fi
23345 fi # test -n "$CONFIG_FILES"
23346
23347 _ACEOF
23348 cat >>$CONFIG_STATUS <<\_ACEOF
23349 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23350   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23351   case $ac_file in
23352   - | *:- | *:-:* ) # input from stdin
23353         cat >$tmp/stdin
23354         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23355         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23356   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23357         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23358   * )   ac_file_in=$ac_file.in ;;
23359   esac
23360
23361   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23362   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23363 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23364          X"$ac_file" : 'X\(//\)[^/]' \| \
23365          X"$ac_file" : 'X\(//\)$' \| \
23366          X"$ac_file" : 'X\(/\)' \| \
23367          .     : '\(.\)' 2>/dev/null ||
23368 echo X"$ac_file" |
23369     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23370           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23371           /^X\(\/\/\)$/{ s//\1/; q; }
23372           /^X\(\/\).*/{ s//\1/; q; }
23373           s/.*/./; q'`
23374   { if $as_mkdir_p; then
23375     mkdir -p "$ac_dir"
23376   else
23377     as_dir="$ac_dir"
23378     as_dirs=
23379     while test ! -d "$as_dir"; do
23380       as_dirs="$as_dir $as_dirs"
23381       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23382 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23383          X"$as_dir" : 'X\(//\)[^/]' \| \
23384          X"$as_dir" : 'X\(//\)$' \| \
23385          X"$as_dir" : 'X\(/\)' \| \
23386          .     : '\(.\)' 2>/dev/null ||
23387 echo X"$as_dir" |
23388     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23389           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23390           /^X\(\/\/\)$/{ s//\1/; q; }
23391           /^X\(\/\).*/{ s//\1/; q; }
23392           s/.*/./; q'`
23393     done
23394     test ! -n "$as_dirs" || mkdir $as_dirs
23395   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23396 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23397    { (exit 1); exit 1; }; }; }
23398
23399   ac_builddir=.
23400
23401 if test "$ac_dir" != .; then
23402   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23403   # A "../" for each directory in $ac_dir_suffix.
23404   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23405 else
23406   ac_dir_suffix= ac_top_builddir=
23407 fi
23408
23409 case $srcdir in
23410   .)  # No --srcdir option.  We are building in place.
23411     ac_srcdir=.
23412     if test -z "$ac_top_builddir"; then
23413        ac_top_srcdir=.
23414     else
23415        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23416     fi ;;
23417   [\\/]* | ?:[\\/]* )  # Absolute path.
23418     ac_srcdir=$srcdir$ac_dir_suffix;
23419     ac_top_srcdir=$srcdir ;;
23420   *) # Relative path.
23421     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23422     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23423 esac
23424
23425 # Do not use `cd foo && pwd` to compute absolute paths, because
23426 # the directories may not exist.
23427 case `pwd` in
23428 .) ac_abs_builddir="$ac_dir";;
23429 *)
23430   case "$ac_dir" in
23431   .) ac_abs_builddir=`pwd`;;
23432   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23433   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23434   esac;;
23435 esac
23436 case $ac_abs_builddir in
23437 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23438 *)
23439   case ${ac_top_builddir}. in
23440   .) ac_abs_top_builddir=$ac_abs_builddir;;
23441   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23442   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23443   esac;;
23444 esac
23445 case $ac_abs_builddir in
23446 .) ac_abs_srcdir=$ac_srcdir;;
23447 *)
23448   case $ac_srcdir in
23449   .) ac_abs_srcdir=$ac_abs_builddir;;
23450   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23451   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23452   esac;;
23453 esac
23454 case $ac_abs_builddir in
23455 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23456 *)
23457   case $ac_top_srcdir in
23458   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23459   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23460   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23461   esac;;
23462 esac
23463
23464
23465
23466   if test x"$ac_file" != x-; then
23467     { echo "$as_me:$LINENO: creating $ac_file" >&5
23468 echo "$as_me: creating $ac_file" >&6;}
23469     rm -f "$ac_file"
23470   fi
23471   # Let's still pretend it is `configure' which instantiates (i.e., don't
23472   # use $as_me), people would be surprised to read:
23473   #    /* config.h.  Generated by config.status.  */
23474   if test x"$ac_file" = x-; then
23475     configure_input=
23476   else
23477     configure_input="$ac_file.  "
23478   fi
23479   configure_input=$configure_input"Generated from `echo $ac_file_in |
23480                                      sed 's,.*/,,'` by configure."
23481
23482   # First look for the input files in the build tree, otherwise in the
23483   # src tree.
23484   ac_file_inputs=`IFS=:
23485     for f in $ac_file_in; do
23486       case $f in
23487       -) echo $tmp/stdin ;;
23488       [\\/$]*)
23489          # Absolute (can't be DOS-style, as IFS=:)
23490          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23491 echo "$as_me: error: cannot find input file: $f" >&2;}
23492    { (exit 1); exit 1; }; }
23493          echo "$f";;
23494       *) # Relative
23495          if test -f "$f"; then
23496            # Build tree
23497            echo "$f"
23498          elif test -f "$srcdir/$f"; then
23499            # Source tree
23500            echo "$srcdir/$f"
23501          else
23502            # /dev/null tree
23503            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23504 echo "$as_me: error: cannot find input file: $f" >&2;}
23505    { (exit 1); exit 1; }; }
23506          fi;;
23507       esac
23508     done` || { (exit 1); exit 1; }
23509 _ACEOF
23510 cat >>$CONFIG_STATUS <<_ACEOF
23511   sed "$ac_vpsub
23512 $extrasub
23513 _ACEOF
23514 cat >>$CONFIG_STATUS <<\_ACEOF
23515 :t
23516 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23517 s,@configure_input@,$configure_input,;t t
23518 s,@srcdir@,$ac_srcdir,;t t
23519 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23520 s,@top_srcdir@,$ac_top_srcdir,;t t
23521 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23522 s,@builddir@,$ac_builddir,;t t
23523 s,@abs_builddir@,$ac_abs_builddir,;t t
23524 s,@top_builddir@,$ac_top_builddir,;t t
23525 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23526 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23527   rm -f $tmp/stdin
23528   if test x"$ac_file" != x-; then
23529     mv $tmp/out $ac_file
23530   else
23531     cat $tmp/out
23532     rm -f $tmp/out
23533   fi
23534
23535 done
23536 _ACEOF
23537 cat >>$CONFIG_STATUS <<\_ACEOF
23538
23539 #
23540 # CONFIG_HEADER section.
23541 #
23542
23543 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23544 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23545 #
23546 # ac_d sets the value in "#define NAME VALUE" lines.
23547 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23548 ac_dB='[         ].*$,\1#\2'
23549 ac_dC=' '
23550 ac_dD=',;t'
23551 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23552 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23553 ac_uB='$,\1#\2define\3'
23554 ac_uC=' '
23555 ac_uD=',;t'
23556
23557 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23558   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23559   case $ac_file in
23560   - | *:- | *:-:* ) # input from stdin
23561         cat >$tmp/stdin
23562         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23563         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23564   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23565         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23566   * )   ac_file_in=$ac_file.in ;;
23567   esac
23568
23569   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23570 echo "$as_me: creating $ac_file" >&6;}
23571
23572   # First look for the input files in the build tree, otherwise in the
23573   # src tree.
23574   ac_file_inputs=`IFS=:
23575     for f in $ac_file_in; do
23576       case $f in
23577       -) echo $tmp/stdin ;;
23578       [\\/$]*)
23579          # Absolute (can't be DOS-style, as IFS=:)
23580          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23581 echo "$as_me: error: cannot find input file: $f" >&2;}
23582    { (exit 1); exit 1; }; }
23583          # Do quote $f, to prevent DOS paths from being IFS'd.
23584          echo "$f";;
23585       *) # Relative
23586          if test -f "$f"; then
23587            # Build tree
23588            echo "$f"
23589          elif test -f "$srcdir/$f"; then
23590            # Source tree
23591            echo "$srcdir/$f"
23592          else
23593            # /dev/null tree
23594            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23595 echo "$as_me: error: cannot find input file: $f" >&2;}
23596    { (exit 1); exit 1; }; }
23597          fi;;
23598       esac
23599     done` || { (exit 1); exit 1; }
23600   # Remove the trailing spaces.
23601   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23602
23603 _ACEOF
23604
23605 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23606 # `conftest.undefs', that substitutes the proper values into
23607 # config.h.in to produce config.h.  The first handles `#define'
23608 # templates, and the second `#undef' templates.
23609 # And first: Protect against being on the right side of a sed subst in
23610 # config.status.  Protect against being in an unquoted here document
23611 # in config.status.
23612 rm -f conftest.defines conftest.undefs
23613 # Using a here document instead of a string reduces the quoting nightmare.
23614 # Putting comments in sed scripts is not portable.
23615 #
23616 # `end' is used to avoid that the second main sed command (meant for
23617 # 0-ary CPP macros) applies to n-ary macro definitions.
23618 # See the Autoconf documentation for `clear'.
23619 cat >confdef2sed.sed <<\_ACEOF
23620 s/[\\&,]/\\&/g
23621 s,[\\$`],\\&,g
23622 t clear
23623 : clear
23624 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23625 t end
23626 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23627 : end
23628 _ACEOF
23629 # If some macros were called several times there might be several times
23630 # the same #defines, which is useless.  Nevertheless, we may not want to
23631 # sort them, since we want the *last* AC-DEFINE to be honored.
23632 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23633 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23634 rm -f confdef2sed.sed
23635
23636 # This sed command replaces #undef with comments.  This is necessary, for
23637 # example, in the case of _POSIX_SOURCE, which is predefined and required
23638 # on some systems where configure will not decide to define it.
23639 cat >>conftest.undefs <<\_ACEOF
23640 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23641 _ACEOF
23642
23643 # Break up conftest.defines because some shells have a limit on the size
23644 # of here documents, and old seds have small limits too (100 cmds).
23645 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23646 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23647 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23648 echo '  :' >>$CONFIG_STATUS
23649 rm -f conftest.tail
23650 while grep . conftest.defines >/dev/null
23651 do
23652   # Write a limited-size here document to $tmp/defines.sed.
23653   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23654   # Speed up: don't consider the non `#define' lines.
23655   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23656   # Work around the forget-to-reset-the-flag bug.
23657   echo 't clr' >>$CONFIG_STATUS
23658   echo ': clr' >>$CONFIG_STATUS
23659   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23660   echo 'CEOF
23661   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23662   rm -f $tmp/in
23663   mv $tmp/out $tmp/in
23664 ' >>$CONFIG_STATUS
23665   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23666   rm -f conftest.defines
23667   mv conftest.tail conftest.defines
23668 done
23669 rm -f conftest.defines
23670 echo '  fi # grep' >>$CONFIG_STATUS
23671 echo >>$CONFIG_STATUS
23672
23673 # Break up conftest.undefs because some shells have a limit on the size
23674 # of here documents, and old seds have small limits too (100 cmds).
23675 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23676 rm -f conftest.tail
23677 while grep . conftest.undefs >/dev/null
23678 do
23679   # Write a limited-size here document to $tmp/undefs.sed.
23680   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23681   # Speed up: don't consider the non `#undef'
23682   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23683   # Work around the forget-to-reset-the-flag bug.
23684   echo 't clr' >>$CONFIG_STATUS
23685   echo ': clr' >>$CONFIG_STATUS
23686   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23687   echo 'CEOF
23688   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23689   rm -f $tmp/in
23690   mv $tmp/out $tmp/in
23691 ' >>$CONFIG_STATUS
23692   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23693   rm -f conftest.undefs
23694   mv conftest.tail conftest.undefs
23695 done
23696 rm -f conftest.undefs
23697
23698 cat >>$CONFIG_STATUS <<\_ACEOF
23699   # Let's still pretend it is `configure' which instantiates (i.e., don't
23700   # use $as_me), people would be surprised to read:
23701   #    /* config.h.  Generated by config.status.  */
23702   if test x"$ac_file" = x-; then
23703     echo "/* Generated by configure.  */" >$tmp/config.h
23704   else
23705     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
23706   fi
23707   cat $tmp/in >>$tmp/config.h
23708   rm -f $tmp/in
23709   if test x"$ac_file" != x-; then
23710     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
23711       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23712 echo "$as_me: $ac_file is unchanged" >&6;}
23713     else
23714       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23715 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23716          X"$ac_file" : 'X\(//\)[^/]' \| \
23717          X"$ac_file" : 'X\(//\)$' \| \
23718          X"$ac_file" : 'X\(/\)' \| \
23719          .     : '\(.\)' 2>/dev/null ||
23720 echo X"$ac_file" |
23721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23722           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23723           /^X\(\/\/\)$/{ s//\1/; q; }
23724           /^X\(\/\).*/{ s//\1/; q; }
23725           s/.*/./; q'`
23726       { if $as_mkdir_p; then
23727     mkdir -p "$ac_dir"
23728   else
23729     as_dir="$ac_dir"
23730     as_dirs=
23731     while test ! -d "$as_dir"; do
23732       as_dirs="$as_dir $as_dirs"
23733       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23734 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23735          X"$as_dir" : 'X\(//\)[^/]' \| \
23736          X"$as_dir" : 'X\(//\)$' \| \
23737          X"$as_dir" : 'X\(/\)' \| \
23738          .     : '\(.\)' 2>/dev/null ||
23739 echo X"$as_dir" |
23740     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23741           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23742           /^X\(\/\/\)$/{ s//\1/; q; }
23743           /^X\(\/\).*/{ s//\1/; q; }
23744           s/.*/./; q'`
23745     done
23746     test ! -n "$as_dirs" || mkdir $as_dirs
23747   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23748 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23749    { (exit 1); exit 1; }; }; }
23750
23751       rm -f $ac_file
23752       mv $tmp/config.h $ac_file
23753     fi
23754   else
23755     cat $tmp/config.h
23756     rm -f $tmp/config.h
23757   fi
23758   # Run the commands associated with the file.
23759   case $ac_file in
23760     src/include/pg_config.h )
23761 # Update timestamp for pg_config.h (see Makefile.global)
23762 echo >src/include/stamp-h
23763  ;;
23764   esac
23765 done
23766 _ACEOF
23767 cat >>$CONFIG_STATUS <<\_ACEOF
23768
23769 #
23770 # CONFIG_LINKS section.
23771 #
23772
23773 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23774   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23775   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23776
23777   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23778 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
23779
23780   if test ! -r $srcdir/$ac_source; then
23781     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23782 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23783    { (exit 1); exit 1; }; }
23784   fi
23785   rm -f $ac_dest
23786
23787   # Make relative symlinks.
23788   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
23789 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23790          X"$ac_dest" : 'X\(//\)[^/]' \| \
23791          X"$ac_dest" : 'X\(//\)$' \| \
23792          X"$ac_dest" : 'X\(/\)' \| \
23793          .     : '\(.\)' 2>/dev/null ||
23794 echo X"$ac_dest" |
23795     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23796           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23797           /^X\(\/\/\)$/{ s//\1/; q; }
23798           /^X\(\/\).*/{ s//\1/; q; }
23799           s/.*/./; q'`
23800   { if $as_mkdir_p; then
23801     mkdir -p "$ac_dest_dir"
23802   else
23803     as_dir="$ac_dest_dir"
23804     as_dirs=
23805     while test ! -d "$as_dir"; do
23806       as_dirs="$as_dir $as_dirs"
23807       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23808 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23809          X"$as_dir" : 'X\(//\)[^/]' \| \
23810          X"$as_dir" : 'X\(//\)$' \| \
23811          X"$as_dir" : 'X\(/\)' \| \
23812          .     : '\(.\)' 2>/dev/null ||
23813 echo X"$as_dir" |
23814     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23815           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23816           /^X\(\/\/\)$/{ s//\1/; q; }
23817           /^X\(\/\).*/{ s//\1/; q; }
23818           s/.*/./; q'`
23819     done
23820     test ! -n "$as_dirs" || mkdir $as_dirs
23821   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
23822 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
23823    { (exit 1); exit 1; }; }; }
23824
23825   ac_builddir=.
23826
23827 if test "$ac_dest_dir" != .; then
23828   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
23829   # A "../" for each directory in $ac_dir_suffix.
23830   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23831 else
23832   ac_dir_suffix= ac_top_builddir=
23833 fi
23834
23835 case $srcdir in
23836   .)  # No --srcdir option.  We are building in place.
23837     ac_srcdir=.
23838     if test -z "$ac_top_builddir"; then
23839        ac_top_srcdir=.
23840     else
23841        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23842     fi ;;
23843   [\\/]* | ?:[\\/]* )  # Absolute path.
23844     ac_srcdir=$srcdir$ac_dir_suffix;
23845     ac_top_srcdir=$srcdir ;;
23846   *) # Relative path.
23847     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23848     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23849 esac
23850
23851 # Do not use `cd foo && pwd` to compute absolute paths, because
23852 # the directories may not exist.
23853 case `pwd` in
23854 .) ac_abs_builddir="$ac_dest_dir";;
23855 *)
23856   case "$ac_dest_dir" in
23857   .) ac_abs_builddir=`pwd`;;
23858   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
23859   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
23860   esac;;
23861 esac
23862 case $ac_abs_builddir in
23863 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23864 *)
23865   case ${ac_top_builddir}. in
23866   .) ac_abs_top_builddir=$ac_abs_builddir;;
23867   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23868   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23869   esac;;
23870 esac
23871 case $ac_abs_builddir in
23872 .) ac_abs_srcdir=$ac_srcdir;;
23873 *)
23874   case $ac_srcdir in
23875   .) ac_abs_srcdir=$ac_abs_builddir;;
23876   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23877   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23878   esac;;
23879 esac
23880 case $ac_abs_builddir in
23881 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23882 *)
23883   case $ac_top_srcdir in
23884   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23885   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23886   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23887   esac;;
23888 esac
23889
23890
23891   case $srcdir in
23892   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
23893       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
23894   esac
23895
23896   # Try a symlink, then a hard link, then a copy.
23897   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
23898     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
23899     cp -p $srcdir/$ac_source $ac_dest ||
23900     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
23901 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
23902    { (exit 1); exit 1; }; }
23903 done
23904 _ACEOF
23905 cat >>$CONFIG_STATUS <<\_ACEOF
23906
23907 #
23908 # CONFIG_COMMANDS section.
23909 #
23910 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23911   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23912   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23913   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23914 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23915          X"$ac_dest" : 'X\(//\)[^/]' \| \
23916          X"$ac_dest" : 'X\(//\)$' \| \
23917          X"$ac_dest" : 'X\(/\)' \| \
23918          .     : '\(.\)' 2>/dev/null ||
23919 echo X"$ac_dest" |
23920     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23921           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23922           /^X\(\/\/\)$/{ s//\1/; q; }
23923           /^X\(\/\).*/{ s//\1/; q; }
23924           s/.*/./; q'`
23925   { if $as_mkdir_p; then
23926     mkdir -p "$ac_dir"
23927   else
23928     as_dir="$ac_dir"
23929     as_dirs=
23930     while test ! -d "$as_dir"; do
23931       as_dirs="$as_dir $as_dirs"
23932       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23933 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23934          X"$as_dir" : 'X\(//\)[^/]' \| \
23935          X"$as_dir" : 'X\(//\)$' \| \
23936          X"$as_dir" : 'X\(/\)' \| \
23937          .     : '\(.\)' 2>/dev/null ||
23938 echo X"$as_dir" |
23939     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23940           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23941           /^X\(\/\/\)$/{ s//\1/; q; }
23942           /^X\(\/\).*/{ s//\1/; q; }
23943           s/.*/./; q'`
23944     done
23945     test ! -n "$as_dirs" || mkdir $as_dirs
23946   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23947 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23948    { (exit 1); exit 1; }; }; }
23949
23950   ac_builddir=.
23951
23952 if test "$ac_dir" != .; then
23953   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23954   # A "../" for each directory in $ac_dir_suffix.
23955   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23956 else
23957   ac_dir_suffix= ac_top_builddir=
23958 fi
23959
23960 case $srcdir in
23961   .)  # No --srcdir option.  We are building in place.
23962     ac_srcdir=.
23963     if test -z "$ac_top_builddir"; then
23964        ac_top_srcdir=.
23965     else
23966        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23967     fi ;;
23968   [\\/]* | ?:[\\/]* )  # Absolute path.
23969     ac_srcdir=$srcdir$ac_dir_suffix;
23970     ac_top_srcdir=$srcdir ;;
23971   *) # Relative path.
23972     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23973     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23974 esac
23975
23976 # Do not use `cd foo && pwd` to compute absolute paths, because
23977 # the directories may not exist.
23978 case `pwd` in
23979 .) ac_abs_builddir="$ac_dir";;
23980 *)
23981   case "$ac_dir" in
23982   .) ac_abs_builddir=`pwd`;;
23983   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23984   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23985   esac;;
23986 esac
23987 case $ac_abs_builddir in
23988 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23989 *)
23990   case ${ac_top_builddir}. in
23991   .) ac_abs_top_builddir=$ac_abs_builddir;;
23992   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23993   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23994   esac;;
23995 esac
23996 case $ac_abs_builddir in
23997 .) ac_abs_srcdir=$ac_srcdir;;
23998 *)
23999   case $ac_srcdir in
24000   .) ac_abs_srcdir=$ac_abs_builddir;;
24001   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24002   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24003   esac;;
24004 esac
24005 case $ac_abs_builddir in
24006 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24007 *)
24008   case $ac_top_srcdir in
24009   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24010   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24011   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24012   esac;;
24013 esac
24014
24015
24016   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24017 echo "$as_me: executing $ac_dest commands" >&6;}
24018   case $ac_dest in
24019     check_win32_symlinks )
24020 # Links sometimes fail undetected on Mingw -
24021 # so here we detect it and warn the user
24022 for FILE in $CONFIG_LINKS
24023  do
24024         # test -e works for symlinks in the MinGW console
24025         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24026 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24027  done
24028  ;;
24029   esac
24030 done
24031 _ACEOF
24032
24033 cat >>$CONFIG_STATUS <<\_ACEOF
24034
24035 { (exit 0); exit 0; }
24036 _ACEOF
24037 chmod +x $CONFIG_STATUS
24038 ac_clean_files=$ac_clean_files_save
24039
24040
24041 # configure is writing to config.log, and then calls config.status.
24042 # config.status does its own redirection, appending to config.log.
24043 # Unfortunately, on DOS this fails, as config.log is still kept open
24044 # by configure, so config.status won't be able to write to it; its
24045 # output is simply discarded.  So we exec the FD to /dev/null,
24046 # effectively closing config.log, so it can be properly (re)opened and
24047 # appended to by config.status.  When coming back to configure, we
24048 # need to make the FD available again.
24049 if test "$no_create" != yes; then
24050   ac_cs_success=:
24051   ac_config_status_args=
24052   test "$silent" = yes &&
24053     ac_config_status_args="$ac_config_status_args --quiet"
24054   exec 5>/dev/null
24055   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24056   exec 5>>config.log
24057   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24058   # would make configure fail if this is the last instruction.
24059   $ac_cs_success || { (exit 1); exit 1; }
24060 fi
24061
24062