]> granicus.if.org Git - postgresql/blob - configure
Code review for --no-data-for-failed-tables patch. Instead of trashing
[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
7593 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/resource.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
7594 do
7595 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7596 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7597   echo "$as_me:$LINENO: checking for $ac_header" >&5
7598 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7599 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7600   echo $ECHO_N "(cached) $ECHO_C" >&6
7601 fi
7602 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7603 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7604 else
7605   # Is the header compilable?
7606 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7607 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7608 cat >conftest.$ac_ext <<_ACEOF
7609 /* confdefs.h.  */
7610 _ACEOF
7611 cat confdefs.h >>conftest.$ac_ext
7612 cat >>conftest.$ac_ext <<_ACEOF
7613 /* end confdefs.h.  */
7614 $ac_includes_default
7615 #include <$ac_header>
7616 _ACEOF
7617 rm -f conftest.$ac_objext
7618 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7619   (eval $ac_compile) 2>conftest.er1
7620   ac_status=$?
7621   grep -v '^ *+' conftest.er1 >conftest.err
7622   rm -f conftest.er1
7623   cat conftest.err >&5
7624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625   (exit $ac_status); } &&
7626          { ac_try='test -z "$ac_c_werror_flag"
7627                          || test ! -s conftest.err'
7628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7629   (eval $ac_try) 2>&5
7630   ac_status=$?
7631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632   (exit $ac_status); }; } &&
7633          { ac_try='test -s conftest.$ac_objext'
7634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7635   (eval $ac_try) 2>&5
7636   ac_status=$?
7637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638   (exit $ac_status); }; }; then
7639   ac_header_compiler=yes
7640 else
7641   echo "$as_me: failed program was:" >&5
7642 sed 's/^/| /' conftest.$ac_ext >&5
7643
7644 ac_header_compiler=no
7645 fi
7646 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7647 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7648 echo "${ECHO_T}$ac_header_compiler" >&6
7649
7650 # Is the header present?
7651 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7652 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7653 cat >conftest.$ac_ext <<_ACEOF
7654 /* confdefs.h.  */
7655 _ACEOF
7656 cat confdefs.h >>conftest.$ac_ext
7657 cat >>conftest.$ac_ext <<_ACEOF
7658 /* end confdefs.h.  */
7659 #include <$ac_header>
7660 _ACEOF
7661 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7662   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7663   ac_status=$?
7664   grep -v '^ *+' conftest.er1 >conftest.err
7665   rm -f conftest.er1
7666   cat conftest.err >&5
7667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7668   (exit $ac_status); } >/dev/null; then
7669   if test -s conftest.err; then
7670     ac_cpp_err=$ac_c_preproc_warn_flag
7671     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7672   else
7673     ac_cpp_err=
7674   fi
7675 else
7676   ac_cpp_err=yes
7677 fi
7678 if test -z "$ac_cpp_err"; then
7679   ac_header_preproc=yes
7680 else
7681   echo "$as_me: failed program was:" >&5
7682 sed 's/^/| /' conftest.$ac_ext >&5
7683
7684   ac_header_preproc=no
7685 fi
7686 rm -f conftest.err conftest.$ac_ext
7687 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7688 echo "${ECHO_T}$ac_header_preproc" >&6
7689
7690 # So?  What about this header?
7691 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7692   yes:no: )
7693     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7694 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7695     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7696 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7697     ac_header_preproc=yes
7698     ;;
7699   no:yes:* )
7700     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7701 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7702     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7703 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7704     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7705 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7706     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7707 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7708     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7709 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7710     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7711 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7712     (
7713       cat <<\_ASBOX
7714 ## ---------------------------------------- ##
7715 ## Report this to pgsql-bugs@postgresql.org ##
7716 ## ---------------------------------------- ##
7717 _ASBOX
7718     ) |
7719       sed "s/^/$as_me: WARNING:     /" >&2
7720     ;;
7721 esac
7722 echo "$as_me:$LINENO: checking for $ac_header" >&5
7723 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7724 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7725   echo $ECHO_N "(cached) $ECHO_C" >&6
7726 else
7727   eval "$as_ac_Header=\$ac_header_preproc"
7728 fi
7729 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7730 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7731
7732 fi
7733 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7734   cat >>confdefs.h <<_ACEOF
7735 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7736 _ACEOF
7737
7738 fi
7739
7740 done
7741
7742
7743 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7744 # netinet/in.h is included first.
7745
7746 for ac_header in netinet/in.h
7747 do
7748 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7750   echo "$as_me:$LINENO: checking for $ac_header" >&5
7751 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7752 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7753   echo $ECHO_N "(cached) $ECHO_C" >&6
7754 fi
7755 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7756 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7757 else
7758   # Is the header compilable?
7759 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7760 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7761 cat >conftest.$ac_ext <<_ACEOF
7762 /* confdefs.h.  */
7763 _ACEOF
7764 cat confdefs.h >>conftest.$ac_ext
7765 cat >>conftest.$ac_ext <<_ACEOF
7766 /* end confdefs.h.  */
7767 $ac_includes_default
7768 #include <$ac_header>
7769 _ACEOF
7770 rm -f conftest.$ac_objext
7771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7772   (eval $ac_compile) 2>conftest.er1
7773   ac_status=$?
7774   grep -v '^ *+' conftest.er1 >conftest.err
7775   rm -f conftest.er1
7776   cat conftest.err >&5
7777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778   (exit $ac_status); } &&
7779          { ac_try='test -z "$ac_c_werror_flag"
7780                          || test ! -s conftest.err'
7781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7782   (eval $ac_try) 2>&5
7783   ac_status=$?
7784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7785   (exit $ac_status); }; } &&
7786          { ac_try='test -s conftest.$ac_objext'
7787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7788   (eval $ac_try) 2>&5
7789   ac_status=$?
7790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7791   (exit $ac_status); }; }; then
7792   ac_header_compiler=yes
7793 else
7794   echo "$as_me: failed program was:" >&5
7795 sed 's/^/| /' conftest.$ac_ext >&5
7796
7797 ac_header_compiler=no
7798 fi
7799 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7800 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7801 echo "${ECHO_T}$ac_header_compiler" >&6
7802
7803 # Is the header present?
7804 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7805 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7806 cat >conftest.$ac_ext <<_ACEOF
7807 /* confdefs.h.  */
7808 _ACEOF
7809 cat confdefs.h >>conftest.$ac_ext
7810 cat >>conftest.$ac_ext <<_ACEOF
7811 /* end confdefs.h.  */
7812 #include <$ac_header>
7813 _ACEOF
7814 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7815   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7816   ac_status=$?
7817   grep -v '^ *+' conftest.er1 >conftest.err
7818   rm -f conftest.er1
7819   cat conftest.err >&5
7820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7821   (exit $ac_status); } >/dev/null; then
7822   if test -s conftest.err; then
7823     ac_cpp_err=$ac_c_preproc_warn_flag
7824     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7825   else
7826     ac_cpp_err=
7827   fi
7828 else
7829   ac_cpp_err=yes
7830 fi
7831 if test -z "$ac_cpp_err"; then
7832   ac_header_preproc=yes
7833 else
7834   echo "$as_me: failed program was:" >&5
7835 sed 's/^/| /' conftest.$ac_ext >&5
7836
7837   ac_header_preproc=no
7838 fi
7839 rm -f conftest.err conftest.$ac_ext
7840 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7841 echo "${ECHO_T}$ac_header_preproc" >&6
7842
7843 # So?  What about this header?
7844 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7845   yes:no: )
7846     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7847 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7848     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7849 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7850     ac_header_preproc=yes
7851     ;;
7852   no:yes:* )
7853     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7854 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7855     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7856 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7857     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7858 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7859     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7860 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7861     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7862 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7863     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7864 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7865     (
7866       cat <<\_ASBOX
7867 ## ---------------------------------------- ##
7868 ## Report this to pgsql-bugs@postgresql.org ##
7869 ## ---------------------------------------- ##
7870 _ASBOX
7871     ) |
7872       sed "s/^/$as_me: WARNING:     /" >&2
7873     ;;
7874 esac
7875 echo "$as_me:$LINENO: checking for $ac_header" >&5
7876 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7877 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7878   echo $ECHO_N "(cached) $ECHO_C" >&6
7879 else
7880   eval "$as_ac_Header=\$ac_header_preproc"
7881 fi
7882 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7883 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7884
7885 fi
7886 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7887   cat >>confdefs.h <<_ACEOF
7888 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7889 _ACEOF
7890
7891 fi
7892
7893 done
7894
7895
7896 for ac_header in netinet/tcp.h
7897 do
7898 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7899 echo "$as_me:$LINENO: checking for $ac_header" >&5
7900 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7901 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7902   echo $ECHO_N "(cached) $ECHO_C" >&6
7903 else
7904   cat >conftest.$ac_ext <<_ACEOF
7905 /* confdefs.h.  */
7906 _ACEOF
7907 cat confdefs.h >>conftest.$ac_ext
7908 cat >>conftest.$ac_ext <<_ACEOF
7909 /* end confdefs.h.  */
7910 $ac_includes_default
7911 #ifdef HAVE_NETINET_IN_H
7912 #include <netinet/in.h>
7913 #endif
7914
7915
7916 #include <$ac_header>
7917 _ACEOF
7918 rm -f conftest.$ac_objext
7919 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7920   (eval $ac_compile) 2>conftest.er1
7921   ac_status=$?
7922   grep -v '^ *+' conftest.er1 >conftest.err
7923   rm -f conftest.er1
7924   cat conftest.err >&5
7925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7926   (exit $ac_status); } &&
7927          { ac_try='test -z "$ac_c_werror_flag"
7928                          || test ! -s conftest.err'
7929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7930   (eval $ac_try) 2>&5
7931   ac_status=$?
7932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7933   (exit $ac_status); }; } &&
7934          { ac_try='test -s conftest.$ac_objext'
7935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7936   (eval $ac_try) 2>&5
7937   ac_status=$?
7938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7939   (exit $ac_status); }; }; then
7940   eval "$as_ac_Header=yes"
7941 else
7942   echo "$as_me: failed program was:" >&5
7943 sed 's/^/| /' conftest.$ac_ext >&5
7944
7945 eval "$as_ac_Header=no"
7946 fi
7947 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7948 fi
7949 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7950 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7951 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7952   cat >>confdefs.h <<_ACEOF
7953 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7954 _ACEOF
7955
7956 fi
7957
7958 done
7959
7960
7961 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
7962
7963 for ac_header in readline/readline.h
7964 do
7965 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7966 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7967   echo "$as_me:$LINENO: checking for $ac_header" >&5
7968 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7970   echo $ECHO_N "(cached) $ECHO_C" >&6
7971 fi
7972 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7973 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7974 else
7975   # Is the header compilable?
7976 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7977 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7978 cat >conftest.$ac_ext <<_ACEOF
7979 /* confdefs.h.  */
7980 _ACEOF
7981 cat confdefs.h >>conftest.$ac_ext
7982 cat >>conftest.$ac_ext <<_ACEOF
7983 /* end confdefs.h.  */
7984 $ac_includes_default
7985 #include <$ac_header>
7986 _ACEOF
7987 rm -f conftest.$ac_objext
7988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7989   (eval $ac_compile) 2>conftest.er1
7990   ac_status=$?
7991   grep -v '^ *+' conftest.er1 >conftest.err
7992   rm -f conftest.er1
7993   cat conftest.err >&5
7994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7995   (exit $ac_status); } &&
7996          { ac_try='test -z "$ac_c_werror_flag"
7997                          || test ! -s conftest.err'
7998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7999   (eval $ac_try) 2>&5
8000   ac_status=$?
8001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8002   (exit $ac_status); }; } &&
8003          { ac_try='test -s conftest.$ac_objext'
8004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8005   (eval $ac_try) 2>&5
8006   ac_status=$?
8007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8008   (exit $ac_status); }; }; then
8009   ac_header_compiler=yes
8010 else
8011   echo "$as_me: failed program was:" >&5
8012 sed 's/^/| /' conftest.$ac_ext >&5
8013
8014 ac_header_compiler=no
8015 fi
8016 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8017 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8018 echo "${ECHO_T}$ac_header_compiler" >&6
8019
8020 # Is the header present?
8021 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8022 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8023 cat >conftest.$ac_ext <<_ACEOF
8024 /* confdefs.h.  */
8025 _ACEOF
8026 cat confdefs.h >>conftest.$ac_ext
8027 cat >>conftest.$ac_ext <<_ACEOF
8028 /* end confdefs.h.  */
8029 #include <$ac_header>
8030 _ACEOF
8031 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8032   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8033   ac_status=$?
8034   grep -v '^ *+' conftest.er1 >conftest.err
8035   rm -f conftest.er1
8036   cat conftest.err >&5
8037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8038   (exit $ac_status); } >/dev/null; then
8039   if test -s conftest.err; then
8040     ac_cpp_err=$ac_c_preproc_warn_flag
8041     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8042   else
8043     ac_cpp_err=
8044   fi
8045 else
8046   ac_cpp_err=yes
8047 fi
8048 if test -z "$ac_cpp_err"; then
8049   ac_header_preproc=yes
8050 else
8051   echo "$as_me: failed program was:" >&5
8052 sed 's/^/| /' conftest.$ac_ext >&5
8053
8054   ac_header_preproc=no
8055 fi
8056 rm -f conftest.err conftest.$ac_ext
8057 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8058 echo "${ECHO_T}$ac_header_preproc" >&6
8059
8060 # So?  What about this header?
8061 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8062   yes:no: )
8063     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8064 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8065     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8066 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8067     ac_header_preproc=yes
8068     ;;
8069   no:yes:* )
8070     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8071 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8072     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8073 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8074     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8075 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8076     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8077 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8078     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8079 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8080     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8081 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8082     (
8083       cat <<\_ASBOX
8084 ## ---------------------------------------- ##
8085 ## Report this to pgsql-bugs@postgresql.org ##
8086 ## ---------------------------------------- ##
8087 _ASBOX
8088     ) |
8089       sed "s/^/$as_me: WARNING:     /" >&2
8090     ;;
8091 esac
8092 echo "$as_me:$LINENO: checking for $ac_header" >&5
8093 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8094 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8095   echo $ECHO_N "(cached) $ECHO_C" >&6
8096 else
8097   eval "$as_ac_Header=\$ac_header_preproc"
8098 fi
8099 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8100 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8101
8102 fi
8103 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8104   cat >>confdefs.h <<_ACEOF
8105 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8106 _ACEOF
8107
8108 else
8109
8110 for ac_header in readline.h
8111 do
8112 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8114   echo "$as_me:$LINENO: checking for $ac_header" >&5
8115 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8116 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8117   echo $ECHO_N "(cached) $ECHO_C" >&6
8118 fi
8119 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8120 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8121 else
8122   # Is the header compilable?
8123 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8124 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8125 cat >conftest.$ac_ext <<_ACEOF
8126 /* confdefs.h.  */
8127 _ACEOF
8128 cat confdefs.h >>conftest.$ac_ext
8129 cat >>conftest.$ac_ext <<_ACEOF
8130 /* end confdefs.h.  */
8131 $ac_includes_default
8132 #include <$ac_header>
8133 _ACEOF
8134 rm -f conftest.$ac_objext
8135 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8136   (eval $ac_compile) 2>conftest.er1
8137   ac_status=$?
8138   grep -v '^ *+' conftest.er1 >conftest.err
8139   rm -f conftest.er1
8140   cat conftest.err >&5
8141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142   (exit $ac_status); } &&
8143          { ac_try='test -z "$ac_c_werror_flag"
8144                          || test ! -s conftest.err'
8145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8146   (eval $ac_try) 2>&5
8147   ac_status=$?
8148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149   (exit $ac_status); }; } &&
8150          { ac_try='test -s conftest.$ac_objext'
8151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8152   (eval $ac_try) 2>&5
8153   ac_status=$?
8154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155   (exit $ac_status); }; }; then
8156   ac_header_compiler=yes
8157 else
8158   echo "$as_me: failed program was:" >&5
8159 sed 's/^/| /' conftest.$ac_ext >&5
8160
8161 ac_header_compiler=no
8162 fi
8163 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8164 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8165 echo "${ECHO_T}$ac_header_compiler" >&6
8166
8167 # Is the header present?
8168 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8169 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8170 cat >conftest.$ac_ext <<_ACEOF
8171 /* confdefs.h.  */
8172 _ACEOF
8173 cat confdefs.h >>conftest.$ac_ext
8174 cat >>conftest.$ac_ext <<_ACEOF
8175 /* end confdefs.h.  */
8176 #include <$ac_header>
8177 _ACEOF
8178 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8180   ac_status=$?
8181   grep -v '^ *+' conftest.er1 >conftest.err
8182   rm -f conftest.er1
8183   cat conftest.err >&5
8184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8185   (exit $ac_status); } >/dev/null; then
8186   if test -s conftest.err; then
8187     ac_cpp_err=$ac_c_preproc_warn_flag
8188     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8189   else
8190     ac_cpp_err=
8191   fi
8192 else
8193   ac_cpp_err=yes
8194 fi
8195 if test -z "$ac_cpp_err"; then
8196   ac_header_preproc=yes
8197 else
8198   echo "$as_me: failed program was:" >&5
8199 sed 's/^/| /' conftest.$ac_ext >&5
8200
8201   ac_header_preproc=no
8202 fi
8203 rm -f conftest.err conftest.$ac_ext
8204 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8205 echo "${ECHO_T}$ac_header_preproc" >&6
8206
8207 # So?  What about this header?
8208 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8209   yes:no: )
8210     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8211 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8212     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8213 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8214     ac_header_preproc=yes
8215     ;;
8216   no:yes:* )
8217     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8218 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8219     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8220 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8221     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8222 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8223     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8224 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8225     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8226 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8227     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8228 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8229     (
8230       cat <<\_ASBOX
8231 ## ---------------------------------------- ##
8232 ## Report this to pgsql-bugs@postgresql.org ##
8233 ## ---------------------------------------- ##
8234 _ASBOX
8235     ) |
8236       sed "s/^/$as_me: WARNING:     /" >&2
8237     ;;
8238 esac
8239 echo "$as_me:$LINENO: checking for $ac_header" >&5
8240 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8241 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8242   echo $ECHO_N "(cached) $ECHO_C" >&6
8243 else
8244   eval "$as_ac_Header=\$ac_header_preproc"
8245 fi
8246 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8247 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8248
8249 fi
8250 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8251   cat >>confdefs.h <<_ACEOF
8252 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8253 _ACEOF
8254
8255 else
8256   { { echo "$as_me:$LINENO: error: readline header not found
8257 If you have readline already installed, see config.log for details on the
8258 failure.  It is possible the compiler isn't looking in the proper directory.
8259 Use --without-readline to disable readline support." >&5
8260 echo "$as_me: error: readline header not found
8261 If you have readline already installed, see config.log for details on the
8262 failure.  It is possible the compiler isn't looking in the proper directory.
8263 Use --without-readline to disable readline support." >&2;}
8264    { (exit 1); exit 1; }; }
8265 fi
8266
8267 done
8268
8269 fi
8270
8271 done
8272
8273
8274 for ac_header in readline/history.h
8275 do
8276 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8277 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8278   echo "$as_me:$LINENO: checking for $ac_header" >&5
8279 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8280 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8281   echo $ECHO_N "(cached) $ECHO_C" >&6
8282 fi
8283 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8284 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8285 else
8286   # Is the header compilable?
8287 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8288 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8289 cat >conftest.$ac_ext <<_ACEOF
8290 /* confdefs.h.  */
8291 _ACEOF
8292 cat confdefs.h >>conftest.$ac_ext
8293 cat >>conftest.$ac_ext <<_ACEOF
8294 /* end confdefs.h.  */
8295 $ac_includes_default
8296 #include <$ac_header>
8297 _ACEOF
8298 rm -f conftest.$ac_objext
8299 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8300   (eval $ac_compile) 2>conftest.er1
8301   ac_status=$?
8302   grep -v '^ *+' conftest.er1 >conftest.err
8303   rm -f conftest.er1
8304   cat conftest.err >&5
8305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8306   (exit $ac_status); } &&
8307          { ac_try='test -z "$ac_c_werror_flag"
8308                          || test ! -s conftest.err'
8309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8310   (eval $ac_try) 2>&5
8311   ac_status=$?
8312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8313   (exit $ac_status); }; } &&
8314          { ac_try='test -s conftest.$ac_objext'
8315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8316   (eval $ac_try) 2>&5
8317   ac_status=$?
8318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8319   (exit $ac_status); }; }; then
8320   ac_header_compiler=yes
8321 else
8322   echo "$as_me: failed program was:" >&5
8323 sed 's/^/| /' conftest.$ac_ext >&5
8324
8325 ac_header_compiler=no
8326 fi
8327 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8328 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8329 echo "${ECHO_T}$ac_header_compiler" >&6
8330
8331 # Is the header present?
8332 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8333 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8334 cat >conftest.$ac_ext <<_ACEOF
8335 /* confdefs.h.  */
8336 _ACEOF
8337 cat confdefs.h >>conftest.$ac_ext
8338 cat >>conftest.$ac_ext <<_ACEOF
8339 /* end confdefs.h.  */
8340 #include <$ac_header>
8341 _ACEOF
8342 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8343   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8344   ac_status=$?
8345   grep -v '^ *+' conftest.er1 >conftest.err
8346   rm -f conftest.er1
8347   cat conftest.err >&5
8348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349   (exit $ac_status); } >/dev/null; then
8350   if test -s conftest.err; then
8351     ac_cpp_err=$ac_c_preproc_warn_flag
8352     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8353   else
8354     ac_cpp_err=
8355   fi
8356 else
8357   ac_cpp_err=yes
8358 fi
8359 if test -z "$ac_cpp_err"; then
8360   ac_header_preproc=yes
8361 else
8362   echo "$as_me: failed program was:" >&5
8363 sed 's/^/| /' conftest.$ac_ext >&5
8364
8365   ac_header_preproc=no
8366 fi
8367 rm -f conftest.err conftest.$ac_ext
8368 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8369 echo "${ECHO_T}$ac_header_preproc" >&6
8370
8371 # So?  What about this header?
8372 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8373   yes:no: )
8374     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8375 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8376     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8377 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8378     ac_header_preproc=yes
8379     ;;
8380   no:yes:* )
8381     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8382 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8383     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8384 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8385     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8386 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8387     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8388 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8389     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8390 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8391     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8392 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8393     (
8394       cat <<\_ASBOX
8395 ## ---------------------------------------- ##
8396 ## Report this to pgsql-bugs@postgresql.org ##
8397 ## ---------------------------------------- ##
8398 _ASBOX
8399     ) |
8400       sed "s/^/$as_me: WARNING:     /" >&2
8401     ;;
8402 esac
8403 echo "$as_me:$LINENO: checking for $ac_header" >&5
8404 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8405 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8406   echo $ECHO_N "(cached) $ECHO_C" >&6
8407 else
8408   eval "$as_ac_Header=\$ac_header_preproc"
8409 fi
8410 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8411 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8412
8413 fi
8414 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8415   cat >>confdefs.h <<_ACEOF
8416 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8417 _ACEOF
8418
8419 else
8420
8421 for ac_header in history.h
8422 do
8423 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8424 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8425   echo "$as_me:$LINENO: checking for $ac_header" >&5
8426 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8427 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8428   echo $ECHO_N "(cached) $ECHO_C" >&6
8429 fi
8430 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8431 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8432 else
8433   # Is the header compilable?
8434 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8435 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8436 cat >conftest.$ac_ext <<_ACEOF
8437 /* confdefs.h.  */
8438 _ACEOF
8439 cat confdefs.h >>conftest.$ac_ext
8440 cat >>conftest.$ac_ext <<_ACEOF
8441 /* end confdefs.h.  */
8442 $ac_includes_default
8443 #include <$ac_header>
8444 _ACEOF
8445 rm -f conftest.$ac_objext
8446 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8447   (eval $ac_compile) 2>conftest.er1
8448   ac_status=$?
8449   grep -v '^ *+' conftest.er1 >conftest.err
8450   rm -f conftest.er1
8451   cat conftest.err >&5
8452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8453   (exit $ac_status); } &&
8454          { ac_try='test -z "$ac_c_werror_flag"
8455                          || test ! -s conftest.err'
8456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8457   (eval $ac_try) 2>&5
8458   ac_status=$?
8459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8460   (exit $ac_status); }; } &&
8461          { ac_try='test -s conftest.$ac_objext'
8462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8463   (eval $ac_try) 2>&5
8464   ac_status=$?
8465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466   (exit $ac_status); }; }; then
8467   ac_header_compiler=yes
8468 else
8469   echo "$as_me: failed program was:" >&5
8470 sed 's/^/| /' conftest.$ac_ext >&5
8471
8472 ac_header_compiler=no
8473 fi
8474 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8475 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8476 echo "${ECHO_T}$ac_header_compiler" >&6
8477
8478 # Is the header present?
8479 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8480 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8481 cat >conftest.$ac_ext <<_ACEOF
8482 /* confdefs.h.  */
8483 _ACEOF
8484 cat confdefs.h >>conftest.$ac_ext
8485 cat >>conftest.$ac_ext <<_ACEOF
8486 /* end confdefs.h.  */
8487 #include <$ac_header>
8488 _ACEOF
8489 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8490   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8491   ac_status=$?
8492   grep -v '^ *+' conftest.er1 >conftest.err
8493   rm -f conftest.er1
8494   cat conftest.err >&5
8495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496   (exit $ac_status); } >/dev/null; then
8497   if test -s conftest.err; then
8498     ac_cpp_err=$ac_c_preproc_warn_flag
8499     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8500   else
8501     ac_cpp_err=
8502   fi
8503 else
8504   ac_cpp_err=yes
8505 fi
8506 if test -z "$ac_cpp_err"; then
8507   ac_header_preproc=yes
8508 else
8509   echo "$as_me: failed program was:" >&5
8510 sed 's/^/| /' conftest.$ac_ext >&5
8511
8512   ac_header_preproc=no
8513 fi
8514 rm -f conftest.err conftest.$ac_ext
8515 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8516 echo "${ECHO_T}$ac_header_preproc" >&6
8517
8518 # So?  What about this header?
8519 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8520   yes:no: )
8521     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8522 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8523     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8524 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8525     ac_header_preproc=yes
8526     ;;
8527   no:yes:* )
8528     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8529 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8530     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8531 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8532     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8533 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8534     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8535 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8536     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8537 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8538     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8539 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8540     (
8541       cat <<\_ASBOX
8542 ## ---------------------------------------- ##
8543 ## Report this to pgsql-bugs@postgresql.org ##
8544 ## ---------------------------------------- ##
8545 _ASBOX
8546     ) |
8547       sed "s/^/$as_me: WARNING:     /" >&2
8548     ;;
8549 esac
8550 echo "$as_me:$LINENO: checking for $ac_header" >&5
8551 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8552 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8553   echo $ECHO_N "(cached) $ECHO_C" >&6
8554 else
8555   eval "$as_ac_Header=\$ac_header_preproc"
8556 fi
8557 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8558 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8559
8560 fi
8561 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8562   cat >>confdefs.h <<_ACEOF
8563 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8564 _ACEOF
8565
8566 else
8567   { { echo "$as_me:$LINENO: error: history header not found
8568 If you have readline already installed, see config.log for details on the
8569 failure.  It is possible the compiler isn't looking in the proper directory.
8570 Use --without-readline to disable readline support." >&5
8571 echo "$as_me: error: history header not found
8572 If you have readline already installed, see config.log for details on the
8573 failure.  It is possible the compiler isn't looking in the proper directory.
8574 Use --without-readline to disable readline support." >&2;}
8575    { (exit 1); exit 1; }; }
8576 fi
8577
8578 done
8579
8580 fi
8581
8582 done
8583
8584 fi
8585
8586 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8587 # Some installations of libedit usurp /usr/include/readline/, which seems
8588 # bad practice, since in combined installations readline will have its headers
8589 # there.  We might have to resort to AC_EGREP checks to make sure we found
8590 # the proper header...
8591
8592 for ac_header in editline/readline.h
8593 do
8594 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8596   echo "$as_me:$LINENO: checking for $ac_header" >&5
8597 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8598 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8599   echo $ECHO_N "(cached) $ECHO_C" >&6
8600 fi
8601 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8602 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8603 else
8604   # Is the header compilable?
8605 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8606 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8607 cat >conftest.$ac_ext <<_ACEOF
8608 /* confdefs.h.  */
8609 _ACEOF
8610 cat confdefs.h >>conftest.$ac_ext
8611 cat >>conftest.$ac_ext <<_ACEOF
8612 /* end confdefs.h.  */
8613 $ac_includes_default
8614 #include <$ac_header>
8615 _ACEOF
8616 rm -f conftest.$ac_objext
8617 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8618   (eval $ac_compile) 2>conftest.er1
8619   ac_status=$?
8620   grep -v '^ *+' conftest.er1 >conftest.err
8621   rm -f conftest.er1
8622   cat conftest.err >&5
8623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8624   (exit $ac_status); } &&
8625          { ac_try='test -z "$ac_c_werror_flag"
8626                          || test ! -s conftest.err'
8627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8628   (eval $ac_try) 2>&5
8629   ac_status=$?
8630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8631   (exit $ac_status); }; } &&
8632          { ac_try='test -s conftest.$ac_objext'
8633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8634   (eval $ac_try) 2>&5
8635   ac_status=$?
8636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8637   (exit $ac_status); }; }; then
8638   ac_header_compiler=yes
8639 else
8640   echo "$as_me: failed program was:" >&5
8641 sed 's/^/| /' conftest.$ac_ext >&5
8642
8643 ac_header_compiler=no
8644 fi
8645 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8646 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8647 echo "${ECHO_T}$ac_header_compiler" >&6
8648
8649 # Is the header present?
8650 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8651 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8652 cat >conftest.$ac_ext <<_ACEOF
8653 /* confdefs.h.  */
8654 _ACEOF
8655 cat confdefs.h >>conftest.$ac_ext
8656 cat >>conftest.$ac_ext <<_ACEOF
8657 /* end confdefs.h.  */
8658 #include <$ac_header>
8659 _ACEOF
8660 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8662   ac_status=$?
8663   grep -v '^ *+' conftest.er1 >conftest.err
8664   rm -f conftest.er1
8665   cat conftest.err >&5
8666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667   (exit $ac_status); } >/dev/null; then
8668   if test -s conftest.err; then
8669     ac_cpp_err=$ac_c_preproc_warn_flag
8670     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8671   else
8672     ac_cpp_err=
8673   fi
8674 else
8675   ac_cpp_err=yes
8676 fi
8677 if test -z "$ac_cpp_err"; then
8678   ac_header_preproc=yes
8679 else
8680   echo "$as_me: failed program was:" >&5
8681 sed 's/^/| /' conftest.$ac_ext >&5
8682
8683   ac_header_preproc=no
8684 fi
8685 rm -f conftest.err conftest.$ac_ext
8686 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8687 echo "${ECHO_T}$ac_header_preproc" >&6
8688
8689 # So?  What about this header?
8690 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8691   yes:no: )
8692     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8693 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8694     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8695 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8696     ac_header_preproc=yes
8697     ;;
8698   no:yes:* )
8699     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8700 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8701     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8702 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8703     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8704 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8705     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8706 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8707     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8708 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8709     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8710 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8711     (
8712       cat <<\_ASBOX
8713 ## ---------------------------------------- ##
8714 ## Report this to pgsql-bugs@postgresql.org ##
8715 ## ---------------------------------------- ##
8716 _ASBOX
8717     ) |
8718       sed "s/^/$as_me: WARNING:     /" >&2
8719     ;;
8720 esac
8721 echo "$as_me:$LINENO: checking for $ac_header" >&5
8722 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8723 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8724   echo $ECHO_N "(cached) $ECHO_C" >&6
8725 else
8726   eval "$as_ac_Header=\$ac_header_preproc"
8727 fi
8728 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8729 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8730
8731 fi
8732 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8733   cat >>confdefs.h <<_ACEOF
8734 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8735 _ACEOF
8736
8737 else
8738
8739 for ac_header in readline.h
8740 do
8741 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8742 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8743   echo "$as_me:$LINENO: checking for $ac_header" >&5
8744 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8745 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8746   echo $ECHO_N "(cached) $ECHO_C" >&6
8747 fi
8748 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8749 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8750 else
8751   # Is the header compilable?
8752 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8753 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8754 cat >conftest.$ac_ext <<_ACEOF
8755 /* confdefs.h.  */
8756 _ACEOF
8757 cat confdefs.h >>conftest.$ac_ext
8758 cat >>conftest.$ac_ext <<_ACEOF
8759 /* end confdefs.h.  */
8760 $ac_includes_default
8761 #include <$ac_header>
8762 _ACEOF
8763 rm -f conftest.$ac_objext
8764 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8765   (eval $ac_compile) 2>conftest.er1
8766   ac_status=$?
8767   grep -v '^ *+' conftest.er1 >conftest.err
8768   rm -f conftest.er1
8769   cat conftest.err >&5
8770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8771   (exit $ac_status); } &&
8772          { ac_try='test -z "$ac_c_werror_flag"
8773                          || test ! -s conftest.err'
8774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8775   (eval $ac_try) 2>&5
8776   ac_status=$?
8777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8778   (exit $ac_status); }; } &&
8779          { ac_try='test -s conftest.$ac_objext'
8780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8781   (eval $ac_try) 2>&5
8782   ac_status=$?
8783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8784   (exit $ac_status); }; }; then
8785   ac_header_compiler=yes
8786 else
8787   echo "$as_me: failed program was:" >&5
8788 sed 's/^/| /' conftest.$ac_ext >&5
8789
8790 ac_header_compiler=no
8791 fi
8792 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8793 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8794 echo "${ECHO_T}$ac_header_compiler" >&6
8795
8796 # Is the header present?
8797 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8798 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8799 cat >conftest.$ac_ext <<_ACEOF
8800 /* confdefs.h.  */
8801 _ACEOF
8802 cat confdefs.h >>conftest.$ac_ext
8803 cat >>conftest.$ac_ext <<_ACEOF
8804 /* end confdefs.h.  */
8805 #include <$ac_header>
8806 _ACEOF
8807 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8808   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8809   ac_status=$?
8810   grep -v '^ *+' conftest.er1 >conftest.err
8811   rm -f conftest.er1
8812   cat conftest.err >&5
8813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8814   (exit $ac_status); } >/dev/null; then
8815   if test -s conftest.err; then
8816     ac_cpp_err=$ac_c_preproc_warn_flag
8817     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8818   else
8819     ac_cpp_err=
8820   fi
8821 else
8822   ac_cpp_err=yes
8823 fi
8824 if test -z "$ac_cpp_err"; then
8825   ac_header_preproc=yes
8826 else
8827   echo "$as_me: failed program was:" >&5
8828 sed 's/^/| /' conftest.$ac_ext >&5
8829
8830   ac_header_preproc=no
8831 fi
8832 rm -f conftest.err conftest.$ac_ext
8833 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8834 echo "${ECHO_T}$ac_header_preproc" >&6
8835
8836 # So?  What about this header?
8837 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8838   yes:no: )
8839     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8840 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8841     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8842 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8843     ac_header_preproc=yes
8844     ;;
8845   no:yes:* )
8846     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8847 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8848     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8849 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8850     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8851 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8852     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8853 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8854     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8855 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8856     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8857 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8858     (
8859       cat <<\_ASBOX
8860 ## ---------------------------------------- ##
8861 ## Report this to pgsql-bugs@postgresql.org ##
8862 ## ---------------------------------------- ##
8863 _ASBOX
8864     ) |
8865       sed "s/^/$as_me: WARNING:     /" >&2
8866     ;;
8867 esac
8868 echo "$as_me:$LINENO: checking for $ac_header" >&5
8869 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8870 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8871   echo $ECHO_N "(cached) $ECHO_C" >&6
8872 else
8873   eval "$as_ac_Header=\$ac_header_preproc"
8874 fi
8875 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8876 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8877
8878 fi
8879 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8880   cat >>confdefs.h <<_ACEOF
8881 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8882 _ACEOF
8883
8884 else
8885
8886 for ac_header in readline/readline.h
8887 do
8888 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8889 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8890   echo "$as_me:$LINENO: checking for $ac_header" >&5
8891 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8892 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8893   echo $ECHO_N "(cached) $ECHO_C" >&6
8894 fi
8895 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8896 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8897 else
8898   # Is the header compilable?
8899 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8900 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8901 cat >conftest.$ac_ext <<_ACEOF
8902 /* confdefs.h.  */
8903 _ACEOF
8904 cat confdefs.h >>conftest.$ac_ext
8905 cat >>conftest.$ac_ext <<_ACEOF
8906 /* end confdefs.h.  */
8907 $ac_includes_default
8908 #include <$ac_header>
8909 _ACEOF
8910 rm -f conftest.$ac_objext
8911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8912   (eval $ac_compile) 2>conftest.er1
8913   ac_status=$?
8914   grep -v '^ *+' conftest.er1 >conftest.err
8915   rm -f conftest.er1
8916   cat conftest.err >&5
8917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918   (exit $ac_status); } &&
8919          { ac_try='test -z "$ac_c_werror_flag"
8920                          || test ! -s conftest.err'
8921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8922   (eval $ac_try) 2>&5
8923   ac_status=$?
8924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925   (exit $ac_status); }; } &&
8926          { ac_try='test -s conftest.$ac_objext'
8927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8928   (eval $ac_try) 2>&5
8929   ac_status=$?
8930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931   (exit $ac_status); }; }; then
8932   ac_header_compiler=yes
8933 else
8934   echo "$as_me: failed program was:" >&5
8935 sed 's/^/| /' conftest.$ac_ext >&5
8936
8937 ac_header_compiler=no
8938 fi
8939 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8940 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8941 echo "${ECHO_T}$ac_header_compiler" >&6
8942
8943 # Is the header present?
8944 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8945 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8946 cat >conftest.$ac_ext <<_ACEOF
8947 /* confdefs.h.  */
8948 _ACEOF
8949 cat confdefs.h >>conftest.$ac_ext
8950 cat >>conftest.$ac_ext <<_ACEOF
8951 /* end confdefs.h.  */
8952 #include <$ac_header>
8953 _ACEOF
8954 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8955   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8956   ac_status=$?
8957   grep -v '^ *+' conftest.er1 >conftest.err
8958   rm -f conftest.er1
8959   cat conftest.err >&5
8960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8961   (exit $ac_status); } >/dev/null; then
8962   if test -s conftest.err; then
8963     ac_cpp_err=$ac_c_preproc_warn_flag
8964     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8965   else
8966     ac_cpp_err=
8967   fi
8968 else
8969   ac_cpp_err=yes
8970 fi
8971 if test -z "$ac_cpp_err"; then
8972   ac_header_preproc=yes
8973 else
8974   echo "$as_me: failed program was:" >&5
8975 sed 's/^/| /' conftest.$ac_ext >&5
8976
8977   ac_header_preproc=no
8978 fi
8979 rm -f conftest.err conftest.$ac_ext
8980 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8981 echo "${ECHO_T}$ac_header_preproc" >&6
8982
8983 # So?  What about this header?
8984 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8985   yes:no: )
8986     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8987 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8988     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8989 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8990     ac_header_preproc=yes
8991     ;;
8992   no:yes:* )
8993     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8994 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8995     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8996 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8997     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8998 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8999     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9000 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9001     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9002 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9003     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9004 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9005     (
9006       cat <<\_ASBOX
9007 ## ---------------------------------------- ##
9008 ## Report this to pgsql-bugs@postgresql.org ##
9009 ## ---------------------------------------- ##
9010 _ASBOX
9011     ) |
9012       sed "s/^/$as_me: WARNING:     /" >&2
9013     ;;
9014 esac
9015 echo "$as_me:$LINENO: checking for $ac_header" >&5
9016 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9017 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9018   echo $ECHO_N "(cached) $ECHO_C" >&6
9019 else
9020   eval "$as_ac_Header=\$ac_header_preproc"
9021 fi
9022 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9023 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9024
9025 fi
9026 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9027   cat >>confdefs.h <<_ACEOF
9028 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9029 _ACEOF
9030
9031 else
9032   { { echo "$as_me:$LINENO: error: readline header not found
9033 If you have libedit already installed, see config.log for details on the
9034 failure.  It is possible the compiler isn't looking in the proper directory.
9035 Use --without-readline to disable libedit support." >&5
9036 echo "$as_me: error: readline header not found
9037 If you have libedit already installed, see config.log for details on the
9038 failure.  It is possible the compiler isn't looking in the proper directory.
9039 Use --without-readline to disable libedit support." >&2;}
9040    { (exit 1); exit 1; }; }
9041 fi
9042
9043 done
9044
9045 fi
9046
9047 done
9048
9049 fi
9050
9051 done
9052
9053 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9054 # not be there at all.  Hence, don't complain if not found.  We must check
9055 # though, since in yet other versions it is an independent header.
9056
9057 for ac_header in editline/history.h
9058 do
9059 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9060 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9061   echo "$as_me:$LINENO: checking for $ac_header" >&5
9062 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9063 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9064   echo $ECHO_N "(cached) $ECHO_C" >&6
9065 fi
9066 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9067 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9068 else
9069   # Is the header compilable?
9070 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9071 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9072 cat >conftest.$ac_ext <<_ACEOF
9073 /* confdefs.h.  */
9074 _ACEOF
9075 cat confdefs.h >>conftest.$ac_ext
9076 cat >>conftest.$ac_ext <<_ACEOF
9077 /* end confdefs.h.  */
9078 $ac_includes_default
9079 #include <$ac_header>
9080 _ACEOF
9081 rm -f conftest.$ac_objext
9082 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9083   (eval $ac_compile) 2>conftest.er1
9084   ac_status=$?
9085   grep -v '^ *+' conftest.er1 >conftest.err
9086   rm -f conftest.er1
9087   cat conftest.err >&5
9088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9089   (exit $ac_status); } &&
9090          { ac_try='test -z "$ac_c_werror_flag"
9091                          || test ! -s conftest.err'
9092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9093   (eval $ac_try) 2>&5
9094   ac_status=$?
9095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9096   (exit $ac_status); }; } &&
9097          { ac_try='test -s conftest.$ac_objext'
9098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9099   (eval $ac_try) 2>&5
9100   ac_status=$?
9101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9102   (exit $ac_status); }; }; then
9103   ac_header_compiler=yes
9104 else
9105   echo "$as_me: failed program was:" >&5
9106 sed 's/^/| /' conftest.$ac_ext >&5
9107
9108 ac_header_compiler=no
9109 fi
9110 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9111 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9112 echo "${ECHO_T}$ac_header_compiler" >&6
9113
9114 # Is the header present?
9115 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9116 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9117 cat >conftest.$ac_ext <<_ACEOF
9118 /* confdefs.h.  */
9119 _ACEOF
9120 cat confdefs.h >>conftest.$ac_ext
9121 cat >>conftest.$ac_ext <<_ACEOF
9122 /* end confdefs.h.  */
9123 #include <$ac_header>
9124 _ACEOF
9125 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9126   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9127   ac_status=$?
9128   grep -v '^ *+' conftest.er1 >conftest.err
9129   rm -f conftest.er1
9130   cat conftest.err >&5
9131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9132   (exit $ac_status); } >/dev/null; then
9133   if test -s conftest.err; then
9134     ac_cpp_err=$ac_c_preproc_warn_flag
9135     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9136   else
9137     ac_cpp_err=
9138   fi
9139 else
9140   ac_cpp_err=yes
9141 fi
9142 if test -z "$ac_cpp_err"; then
9143   ac_header_preproc=yes
9144 else
9145   echo "$as_me: failed program was:" >&5
9146 sed 's/^/| /' conftest.$ac_ext >&5
9147
9148   ac_header_preproc=no
9149 fi
9150 rm -f conftest.err conftest.$ac_ext
9151 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9152 echo "${ECHO_T}$ac_header_preproc" >&6
9153
9154 # So?  What about this header?
9155 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9156   yes:no: )
9157     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9158 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9159     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9160 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9161     ac_header_preproc=yes
9162     ;;
9163   no:yes:* )
9164     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9165 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9166     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9167 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9168     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9169 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9170     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9171 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9172     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9173 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9174     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9175 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9176     (
9177       cat <<\_ASBOX
9178 ## ---------------------------------------- ##
9179 ## Report this to pgsql-bugs@postgresql.org ##
9180 ## ---------------------------------------- ##
9181 _ASBOX
9182     ) |
9183       sed "s/^/$as_me: WARNING:     /" >&2
9184     ;;
9185 esac
9186 echo "$as_me:$LINENO: checking for $ac_header" >&5
9187 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9189   echo $ECHO_N "(cached) $ECHO_C" >&6
9190 else
9191   eval "$as_ac_Header=\$ac_header_preproc"
9192 fi
9193 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9194 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9195
9196 fi
9197 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9198   cat >>confdefs.h <<_ACEOF
9199 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9200 _ACEOF
9201
9202 else
9203
9204 for ac_header in history.h
9205 do
9206 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9207 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9208   echo "$as_me:$LINENO: checking for $ac_header" >&5
9209 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9210 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9211   echo $ECHO_N "(cached) $ECHO_C" >&6
9212 fi
9213 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9214 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9215 else
9216   # Is the header compilable?
9217 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9218 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9219 cat >conftest.$ac_ext <<_ACEOF
9220 /* confdefs.h.  */
9221 _ACEOF
9222 cat confdefs.h >>conftest.$ac_ext
9223 cat >>conftest.$ac_ext <<_ACEOF
9224 /* end confdefs.h.  */
9225 $ac_includes_default
9226 #include <$ac_header>
9227 _ACEOF
9228 rm -f conftest.$ac_objext
9229 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9230   (eval $ac_compile) 2>conftest.er1
9231   ac_status=$?
9232   grep -v '^ *+' conftest.er1 >conftest.err
9233   rm -f conftest.er1
9234   cat conftest.err >&5
9235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236   (exit $ac_status); } &&
9237          { ac_try='test -z "$ac_c_werror_flag"
9238                          || test ! -s conftest.err'
9239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9240   (eval $ac_try) 2>&5
9241   ac_status=$?
9242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243   (exit $ac_status); }; } &&
9244          { ac_try='test -s conftest.$ac_objext'
9245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9246   (eval $ac_try) 2>&5
9247   ac_status=$?
9248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9249   (exit $ac_status); }; }; then
9250   ac_header_compiler=yes
9251 else
9252   echo "$as_me: failed program was:" >&5
9253 sed 's/^/| /' conftest.$ac_ext >&5
9254
9255 ac_header_compiler=no
9256 fi
9257 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9258 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9259 echo "${ECHO_T}$ac_header_compiler" >&6
9260
9261 # Is the header present?
9262 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9263 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9264 cat >conftest.$ac_ext <<_ACEOF
9265 /* confdefs.h.  */
9266 _ACEOF
9267 cat confdefs.h >>conftest.$ac_ext
9268 cat >>conftest.$ac_ext <<_ACEOF
9269 /* end confdefs.h.  */
9270 #include <$ac_header>
9271 _ACEOF
9272 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9273   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9274   ac_status=$?
9275   grep -v '^ *+' conftest.er1 >conftest.err
9276   rm -f conftest.er1
9277   cat conftest.err >&5
9278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9279   (exit $ac_status); } >/dev/null; then
9280   if test -s conftest.err; then
9281     ac_cpp_err=$ac_c_preproc_warn_flag
9282     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9283   else
9284     ac_cpp_err=
9285   fi
9286 else
9287   ac_cpp_err=yes
9288 fi
9289 if test -z "$ac_cpp_err"; then
9290   ac_header_preproc=yes
9291 else
9292   echo "$as_me: failed program was:" >&5
9293 sed 's/^/| /' conftest.$ac_ext >&5
9294
9295   ac_header_preproc=no
9296 fi
9297 rm -f conftest.err conftest.$ac_ext
9298 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9299 echo "${ECHO_T}$ac_header_preproc" >&6
9300
9301 # So?  What about this header?
9302 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9303   yes:no: )
9304     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9305 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9306     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9307 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9308     ac_header_preproc=yes
9309     ;;
9310   no:yes:* )
9311     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9312 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9313     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9314 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9315     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9316 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9317     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9318 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9319     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9320 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9321     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9322 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9323     (
9324       cat <<\_ASBOX
9325 ## ---------------------------------------- ##
9326 ## Report this to pgsql-bugs@postgresql.org ##
9327 ## ---------------------------------------- ##
9328 _ASBOX
9329     ) |
9330       sed "s/^/$as_me: WARNING:     /" >&2
9331     ;;
9332 esac
9333 echo "$as_me:$LINENO: checking for $ac_header" >&5
9334 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9335 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9336   echo $ECHO_N "(cached) $ECHO_C" >&6
9337 else
9338   eval "$as_ac_Header=\$ac_header_preproc"
9339 fi
9340 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9341 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9342
9343 fi
9344 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9345   cat >>confdefs.h <<_ACEOF
9346 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9347 _ACEOF
9348
9349 else
9350
9351 for ac_header in readline/history.h
9352 do
9353 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9354 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9355   echo "$as_me:$LINENO: checking for $ac_header" >&5
9356 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9357 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9358   echo $ECHO_N "(cached) $ECHO_C" >&6
9359 fi
9360 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9362 else
9363   # Is the header compilable?
9364 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9365 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9366 cat >conftest.$ac_ext <<_ACEOF
9367 /* confdefs.h.  */
9368 _ACEOF
9369 cat confdefs.h >>conftest.$ac_ext
9370 cat >>conftest.$ac_ext <<_ACEOF
9371 /* end confdefs.h.  */
9372 $ac_includes_default
9373 #include <$ac_header>
9374 _ACEOF
9375 rm -f conftest.$ac_objext
9376 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9377   (eval $ac_compile) 2>conftest.er1
9378   ac_status=$?
9379   grep -v '^ *+' conftest.er1 >conftest.err
9380   rm -f conftest.er1
9381   cat conftest.err >&5
9382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9383   (exit $ac_status); } &&
9384          { ac_try='test -z "$ac_c_werror_flag"
9385                          || test ! -s conftest.err'
9386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9387   (eval $ac_try) 2>&5
9388   ac_status=$?
9389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9390   (exit $ac_status); }; } &&
9391          { ac_try='test -s conftest.$ac_objext'
9392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9393   (eval $ac_try) 2>&5
9394   ac_status=$?
9395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9396   (exit $ac_status); }; }; then
9397   ac_header_compiler=yes
9398 else
9399   echo "$as_me: failed program was:" >&5
9400 sed 's/^/| /' conftest.$ac_ext >&5
9401
9402 ac_header_compiler=no
9403 fi
9404 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9405 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9406 echo "${ECHO_T}$ac_header_compiler" >&6
9407
9408 # Is the header present?
9409 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9410 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9411 cat >conftest.$ac_ext <<_ACEOF
9412 /* confdefs.h.  */
9413 _ACEOF
9414 cat confdefs.h >>conftest.$ac_ext
9415 cat >>conftest.$ac_ext <<_ACEOF
9416 /* end confdefs.h.  */
9417 #include <$ac_header>
9418 _ACEOF
9419 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9420   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9421   ac_status=$?
9422   grep -v '^ *+' conftest.er1 >conftest.err
9423   rm -f conftest.er1
9424   cat conftest.err >&5
9425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9426   (exit $ac_status); } >/dev/null; then
9427   if test -s conftest.err; then
9428     ac_cpp_err=$ac_c_preproc_warn_flag
9429     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9430   else
9431     ac_cpp_err=
9432   fi
9433 else
9434   ac_cpp_err=yes
9435 fi
9436 if test -z "$ac_cpp_err"; then
9437   ac_header_preproc=yes
9438 else
9439   echo "$as_me: failed program was:" >&5
9440 sed 's/^/| /' conftest.$ac_ext >&5
9441
9442   ac_header_preproc=no
9443 fi
9444 rm -f conftest.err conftest.$ac_ext
9445 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9446 echo "${ECHO_T}$ac_header_preproc" >&6
9447
9448 # So?  What about this header?
9449 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9450   yes:no: )
9451     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9452 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9453     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9454 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9455     ac_header_preproc=yes
9456     ;;
9457   no:yes:* )
9458     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9459 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9460     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9461 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9462     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9463 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9464     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9465 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9466     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9467 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9468     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9469 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9470     (
9471       cat <<\_ASBOX
9472 ## ---------------------------------------- ##
9473 ## Report this to pgsql-bugs@postgresql.org ##
9474 ## ---------------------------------------- ##
9475 _ASBOX
9476     ) |
9477       sed "s/^/$as_me: WARNING:     /" >&2
9478     ;;
9479 esac
9480 echo "$as_me:$LINENO: checking for $ac_header" >&5
9481 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9483   echo $ECHO_N "(cached) $ECHO_C" >&6
9484 else
9485   eval "$as_ac_Header=\$ac_header_preproc"
9486 fi
9487 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9488 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9489
9490 fi
9491 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9492   cat >>confdefs.h <<_ACEOF
9493 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9494 _ACEOF
9495
9496 fi
9497
9498 done
9499
9500 fi
9501
9502 done
9503
9504 fi
9505
9506 done
9507
9508 fi
9509
9510 if test "$with_zlib" = yes; then
9511   if test "${ac_cv_header_zlib_h+set}" = set; then
9512   echo "$as_me:$LINENO: checking for zlib.h" >&5
9513 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9514 if test "${ac_cv_header_zlib_h+set}" = set; then
9515   echo $ECHO_N "(cached) $ECHO_C" >&6
9516 fi
9517 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9518 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9519 else
9520   # Is the header compilable?
9521 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9522 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9523 cat >conftest.$ac_ext <<_ACEOF
9524 /* confdefs.h.  */
9525 _ACEOF
9526 cat confdefs.h >>conftest.$ac_ext
9527 cat >>conftest.$ac_ext <<_ACEOF
9528 /* end confdefs.h.  */
9529 $ac_includes_default
9530 #include <zlib.h>
9531 _ACEOF
9532 rm -f conftest.$ac_objext
9533 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9534   (eval $ac_compile) 2>conftest.er1
9535   ac_status=$?
9536   grep -v '^ *+' conftest.er1 >conftest.err
9537   rm -f conftest.er1
9538   cat conftest.err >&5
9539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9540   (exit $ac_status); } &&
9541          { ac_try='test -z "$ac_c_werror_flag"
9542                          || test ! -s conftest.err'
9543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9544   (eval $ac_try) 2>&5
9545   ac_status=$?
9546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547   (exit $ac_status); }; } &&
9548          { ac_try='test -s conftest.$ac_objext'
9549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9550   (eval $ac_try) 2>&5
9551   ac_status=$?
9552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9553   (exit $ac_status); }; }; then
9554   ac_header_compiler=yes
9555 else
9556   echo "$as_me: failed program was:" >&5
9557 sed 's/^/| /' conftest.$ac_ext >&5
9558
9559 ac_header_compiler=no
9560 fi
9561 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9562 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9563 echo "${ECHO_T}$ac_header_compiler" >&6
9564
9565 # Is the header present?
9566 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9567 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9568 cat >conftest.$ac_ext <<_ACEOF
9569 /* confdefs.h.  */
9570 _ACEOF
9571 cat confdefs.h >>conftest.$ac_ext
9572 cat >>conftest.$ac_ext <<_ACEOF
9573 /* end confdefs.h.  */
9574 #include <zlib.h>
9575 _ACEOF
9576 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9577   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9578   ac_status=$?
9579   grep -v '^ *+' conftest.er1 >conftest.err
9580   rm -f conftest.er1
9581   cat conftest.err >&5
9582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9583   (exit $ac_status); } >/dev/null; then
9584   if test -s conftest.err; then
9585     ac_cpp_err=$ac_c_preproc_warn_flag
9586     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9587   else
9588     ac_cpp_err=
9589   fi
9590 else
9591   ac_cpp_err=yes
9592 fi
9593 if test -z "$ac_cpp_err"; then
9594   ac_header_preproc=yes
9595 else
9596   echo "$as_me: failed program was:" >&5
9597 sed 's/^/| /' conftest.$ac_ext >&5
9598
9599   ac_header_preproc=no
9600 fi
9601 rm -f conftest.err conftest.$ac_ext
9602 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9603 echo "${ECHO_T}$ac_header_preproc" >&6
9604
9605 # So?  What about this header?
9606 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9607   yes:no: )
9608     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9609 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9610     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9611 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9612     ac_header_preproc=yes
9613     ;;
9614   no:yes:* )
9615     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9616 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9617     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9618 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9619     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9620 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9621     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9622 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9623     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9624 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9625     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9626 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9627     (
9628       cat <<\_ASBOX
9629 ## ---------------------------------------- ##
9630 ## Report this to pgsql-bugs@postgresql.org ##
9631 ## ---------------------------------------- ##
9632 _ASBOX
9633     ) |
9634       sed "s/^/$as_me: WARNING:     /" >&2
9635     ;;
9636 esac
9637 echo "$as_me:$LINENO: checking for zlib.h" >&5
9638 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9639 if test "${ac_cv_header_zlib_h+set}" = set; then
9640   echo $ECHO_N "(cached) $ECHO_C" >&6
9641 else
9642   ac_cv_header_zlib_h=$ac_header_preproc
9643 fi
9644 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9645 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9646
9647 fi
9648 if test $ac_cv_header_zlib_h = yes; then
9649   :
9650 else
9651   { { echo "$as_me:$LINENO: error: zlib header not found
9652 If you have zlib already installed, see config.log for details on the
9653 failure.  It is possible the compiler isn't looking in the proper directory.
9654 Use --without-zlib to disable zlib support." >&5
9655 echo "$as_me: error: zlib header not found
9656 If you have zlib already installed, see config.log for details on the
9657 failure.  It is possible the compiler isn't looking in the proper directory.
9658 Use --without-zlib to disable zlib support." >&2;}
9659    { (exit 1); exit 1; }; }
9660 fi
9661
9662
9663 fi
9664
9665 if test "$with_krb5" = yes ; then
9666   if test "${ac_cv_header_krb5_h+set}" = set; then
9667   echo "$as_me:$LINENO: checking for krb5.h" >&5
9668 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9669 if test "${ac_cv_header_krb5_h+set}" = set; then
9670   echo $ECHO_N "(cached) $ECHO_C" >&6
9671 fi
9672 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9673 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9674 else
9675   # Is the header compilable?
9676 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9677 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9678 cat >conftest.$ac_ext <<_ACEOF
9679 /* confdefs.h.  */
9680 _ACEOF
9681 cat confdefs.h >>conftest.$ac_ext
9682 cat >>conftest.$ac_ext <<_ACEOF
9683 /* end confdefs.h.  */
9684 $ac_includes_default
9685 #include <krb5.h>
9686 _ACEOF
9687 rm -f conftest.$ac_objext
9688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9689   (eval $ac_compile) 2>conftest.er1
9690   ac_status=$?
9691   grep -v '^ *+' conftest.er1 >conftest.err
9692   rm -f conftest.er1
9693   cat conftest.err >&5
9694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9695   (exit $ac_status); } &&
9696          { ac_try='test -z "$ac_c_werror_flag"
9697                          || test ! -s conftest.err'
9698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9699   (eval $ac_try) 2>&5
9700   ac_status=$?
9701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9702   (exit $ac_status); }; } &&
9703          { ac_try='test -s conftest.$ac_objext'
9704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9705   (eval $ac_try) 2>&5
9706   ac_status=$?
9707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708   (exit $ac_status); }; }; then
9709   ac_header_compiler=yes
9710 else
9711   echo "$as_me: failed program was:" >&5
9712 sed 's/^/| /' conftest.$ac_ext >&5
9713
9714 ac_header_compiler=no
9715 fi
9716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9717 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9718 echo "${ECHO_T}$ac_header_compiler" >&6
9719
9720 # Is the header present?
9721 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9722 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9723 cat >conftest.$ac_ext <<_ACEOF
9724 /* confdefs.h.  */
9725 _ACEOF
9726 cat confdefs.h >>conftest.$ac_ext
9727 cat >>conftest.$ac_ext <<_ACEOF
9728 /* end confdefs.h.  */
9729 #include <krb5.h>
9730 _ACEOF
9731 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9733   ac_status=$?
9734   grep -v '^ *+' conftest.er1 >conftest.err
9735   rm -f conftest.er1
9736   cat conftest.err >&5
9737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9738   (exit $ac_status); } >/dev/null; then
9739   if test -s conftest.err; then
9740     ac_cpp_err=$ac_c_preproc_warn_flag
9741     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9742   else
9743     ac_cpp_err=
9744   fi
9745 else
9746   ac_cpp_err=yes
9747 fi
9748 if test -z "$ac_cpp_err"; then
9749   ac_header_preproc=yes
9750 else
9751   echo "$as_me: failed program was:" >&5
9752 sed 's/^/| /' conftest.$ac_ext >&5
9753
9754   ac_header_preproc=no
9755 fi
9756 rm -f conftest.err conftest.$ac_ext
9757 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9758 echo "${ECHO_T}$ac_header_preproc" >&6
9759
9760 # So?  What about this header?
9761 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9762   yes:no: )
9763     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9764 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9765     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9766 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9767     ac_header_preproc=yes
9768     ;;
9769   no:yes:* )
9770     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9771 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9772     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9773 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9774     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9775 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9776     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9777 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9778     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9779 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9780     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9781 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9782     (
9783       cat <<\_ASBOX
9784 ## ---------------------------------------- ##
9785 ## Report this to pgsql-bugs@postgresql.org ##
9786 ## ---------------------------------------- ##
9787 _ASBOX
9788     ) |
9789       sed "s/^/$as_me: WARNING:     /" >&2
9790     ;;
9791 esac
9792 echo "$as_me:$LINENO: checking for krb5.h" >&5
9793 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9794 if test "${ac_cv_header_krb5_h+set}" = set; then
9795   echo $ECHO_N "(cached) $ECHO_C" >&6
9796 else
9797   ac_cv_header_krb5_h=$ac_header_preproc
9798 fi
9799 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9800 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9801
9802 fi
9803 if test $ac_cv_header_krb5_h = yes; then
9804   :
9805 else
9806   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9807 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9808    { (exit 1); exit 1; }; }
9809 fi
9810
9811
9812 fi
9813
9814 if test "$with_openssl" = yes ; then
9815   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9816   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9817 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9818 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9819   echo $ECHO_N "(cached) $ECHO_C" >&6
9820 fi
9821 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9822 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9823 else
9824   # Is the header compilable?
9825 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9826 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9827 cat >conftest.$ac_ext <<_ACEOF
9828 /* confdefs.h.  */
9829 _ACEOF
9830 cat confdefs.h >>conftest.$ac_ext
9831 cat >>conftest.$ac_ext <<_ACEOF
9832 /* end confdefs.h.  */
9833 $ac_includes_default
9834 #include <openssl/ssl.h>
9835 _ACEOF
9836 rm -f conftest.$ac_objext
9837 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9838   (eval $ac_compile) 2>conftest.er1
9839   ac_status=$?
9840   grep -v '^ *+' conftest.er1 >conftest.err
9841   rm -f conftest.er1
9842   cat conftest.err >&5
9843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844   (exit $ac_status); } &&
9845          { ac_try='test -z "$ac_c_werror_flag"
9846                          || test ! -s conftest.err'
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); }; } &&
9852          { ac_try='test -s conftest.$ac_objext'
9853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9854   (eval $ac_try) 2>&5
9855   ac_status=$?
9856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9857   (exit $ac_status); }; }; then
9858   ac_header_compiler=yes
9859 else
9860   echo "$as_me: failed program was:" >&5
9861 sed 's/^/| /' conftest.$ac_ext >&5
9862
9863 ac_header_compiler=no
9864 fi
9865 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9866 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9867 echo "${ECHO_T}$ac_header_compiler" >&6
9868
9869 # Is the header present?
9870 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
9871 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
9872 cat >conftest.$ac_ext <<_ACEOF
9873 /* confdefs.h.  */
9874 _ACEOF
9875 cat confdefs.h >>conftest.$ac_ext
9876 cat >>conftest.$ac_ext <<_ACEOF
9877 /* end confdefs.h.  */
9878 #include <openssl/ssl.h>
9879 _ACEOF
9880 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9881   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9882   ac_status=$?
9883   grep -v '^ *+' conftest.er1 >conftest.err
9884   rm -f conftest.er1
9885   cat conftest.err >&5
9886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9887   (exit $ac_status); } >/dev/null; then
9888   if test -s conftest.err; then
9889     ac_cpp_err=$ac_c_preproc_warn_flag
9890     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9891   else
9892     ac_cpp_err=
9893   fi
9894 else
9895   ac_cpp_err=yes
9896 fi
9897 if test -z "$ac_cpp_err"; then
9898   ac_header_preproc=yes
9899 else
9900   echo "$as_me: failed program was:" >&5
9901 sed 's/^/| /' conftest.$ac_ext >&5
9902
9903   ac_header_preproc=no
9904 fi
9905 rm -f conftest.err conftest.$ac_ext
9906 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9907 echo "${ECHO_T}$ac_header_preproc" >&6
9908
9909 # So?  What about this header?
9910 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9911   yes:no: )
9912     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9913 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9914     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
9915 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
9916     ac_header_preproc=yes
9917     ;;
9918   no:yes:* )
9919     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
9920 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
9921     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
9922 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
9923     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
9924 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
9925     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
9926 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9927     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
9928 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
9929     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
9930 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
9931     (
9932       cat <<\_ASBOX
9933 ## ---------------------------------------- ##
9934 ## Report this to pgsql-bugs@postgresql.org ##
9935 ## ---------------------------------------- ##
9936 _ASBOX
9937     ) |
9938       sed "s/^/$as_me: WARNING:     /" >&2
9939     ;;
9940 esac
9941 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9942 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9943 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9944   echo $ECHO_N "(cached) $ECHO_C" >&6
9945 else
9946   ac_cv_header_openssl_ssl_h=$ac_header_preproc
9947 fi
9948 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9949 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9950
9951 fi
9952 if test $ac_cv_header_openssl_ssl_h = yes; then
9953   :
9954 else
9955   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
9956 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
9957    { (exit 1); exit 1; }; }
9958 fi
9959
9960
9961   if test "${ac_cv_header_openssl_err_h+set}" = set; then
9962   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
9963 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
9964 if test "${ac_cv_header_openssl_err_h+set}" = set; then
9965   echo $ECHO_N "(cached) $ECHO_C" >&6
9966 fi
9967 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
9968 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
9969 else
9970   # Is the header compilable?
9971 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
9972 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
9973 cat >conftest.$ac_ext <<_ACEOF
9974 /* confdefs.h.  */
9975 _ACEOF
9976 cat confdefs.h >>conftest.$ac_ext
9977 cat >>conftest.$ac_ext <<_ACEOF
9978 /* end confdefs.h.  */
9979 $ac_includes_default
9980 #include <openssl/err.h>
9981 _ACEOF
9982 rm -f conftest.$ac_objext
9983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9984   (eval $ac_compile) 2>conftest.er1
9985   ac_status=$?
9986   grep -v '^ *+' conftest.er1 >conftest.err
9987   rm -f conftest.er1
9988   cat conftest.err >&5
9989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9990   (exit $ac_status); } &&
9991          { ac_try='test -z "$ac_c_werror_flag"
9992                          || test ! -s conftest.err'
9993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9994   (eval $ac_try) 2>&5
9995   ac_status=$?
9996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9997   (exit $ac_status); }; } &&
9998          { ac_try='test -s conftest.$ac_objext'
9999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10000   (eval $ac_try) 2>&5
10001   ac_status=$?
10002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003   (exit $ac_status); }; }; then
10004   ac_header_compiler=yes
10005 else
10006   echo "$as_me: failed program was:" >&5
10007 sed 's/^/| /' conftest.$ac_ext >&5
10008
10009 ac_header_compiler=no
10010 fi
10011 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10012 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10013 echo "${ECHO_T}$ac_header_compiler" >&6
10014
10015 # Is the header present?
10016 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10017 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10018 cat >conftest.$ac_ext <<_ACEOF
10019 /* confdefs.h.  */
10020 _ACEOF
10021 cat confdefs.h >>conftest.$ac_ext
10022 cat >>conftest.$ac_ext <<_ACEOF
10023 /* end confdefs.h.  */
10024 #include <openssl/err.h>
10025 _ACEOF
10026 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10027   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10028   ac_status=$?
10029   grep -v '^ *+' conftest.er1 >conftest.err
10030   rm -f conftest.er1
10031   cat conftest.err >&5
10032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10033   (exit $ac_status); } >/dev/null; then
10034   if test -s conftest.err; then
10035     ac_cpp_err=$ac_c_preproc_warn_flag
10036     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10037   else
10038     ac_cpp_err=
10039   fi
10040 else
10041   ac_cpp_err=yes
10042 fi
10043 if test -z "$ac_cpp_err"; then
10044   ac_header_preproc=yes
10045 else
10046   echo "$as_me: failed program was:" >&5
10047 sed 's/^/| /' conftest.$ac_ext >&5
10048
10049   ac_header_preproc=no
10050 fi
10051 rm -f conftest.err conftest.$ac_ext
10052 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10053 echo "${ECHO_T}$ac_header_preproc" >&6
10054
10055 # So?  What about this header?
10056 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10057   yes:no: )
10058     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10059 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10060     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10061 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10062     ac_header_preproc=yes
10063     ;;
10064   no:yes:* )
10065     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10066 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10067     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10068 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10069     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10070 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10071     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10072 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10073     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10074 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10075     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10076 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10077     (
10078       cat <<\_ASBOX
10079 ## ---------------------------------------- ##
10080 ## Report this to pgsql-bugs@postgresql.org ##
10081 ## ---------------------------------------- ##
10082 _ASBOX
10083     ) |
10084       sed "s/^/$as_me: WARNING:     /" >&2
10085     ;;
10086 esac
10087 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10088 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10089 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10090   echo $ECHO_N "(cached) $ECHO_C" >&6
10091 else
10092   ac_cv_header_openssl_err_h=$ac_header_preproc
10093 fi
10094 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10095 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10096
10097 fi
10098 if test $ac_cv_header_openssl_err_h = yes; then
10099   :
10100 else
10101   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10102 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10103    { (exit 1); exit 1; }; }
10104 fi
10105
10106
10107 fi
10108
10109 if test "$with_pam" = yes ; then
10110
10111 for ac_header in security/pam_appl.h
10112 do
10113 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10114 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10115   echo "$as_me:$LINENO: checking for $ac_header" >&5
10116 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10117 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10118   echo $ECHO_N "(cached) $ECHO_C" >&6
10119 fi
10120 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10121 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10122 else
10123   # Is the header compilable?
10124 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10125 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10126 cat >conftest.$ac_ext <<_ACEOF
10127 /* confdefs.h.  */
10128 _ACEOF
10129 cat confdefs.h >>conftest.$ac_ext
10130 cat >>conftest.$ac_ext <<_ACEOF
10131 /* end confdefs.h.  */
10132 $ac_includes_default
10133 #include <$ac_header>
10134 _ACEOF
10135 rm -f conftest.$ac_objext
10136 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10137   (eval $ac_compile) 2>conftest.er1
10138   ac_status=$?
10139   grep -v '^ *+' conftest.er1 >conftest.err
10140   rm -f conftest.er1
10141   cat conftest.err >&5
10142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10143   (exit $ac_status); } &&
10144          { ac_try='test -z "$ac_c_werror_flag"
10145                          || test ! -s conftest.err'
10146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10147   (eval $ac_try) 2>&5
10148   ac_status=$?
10149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10150   (exit $ac_status); }; } &&
10151          { ac_try='test -s conftest.$ac_objext'
10152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10153   (eval $ac_try) 2>&5
10154   ac_status=$?
10155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10156   (exit $ac_status); }; }; then
10157   ac_header_compiler=yes
10158 else
10159   echo "$as_me: failed program was:" >&5
10160 sed 's/^/| /' conftest.$ac_ext >&5
10161
10162 ac_header_compiler=no
10163 fi
10164 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10165 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10166 echo "${ECHO_T}$ac_header_compiler" >&6
10167
10168 # Is the header present?
10169 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10170 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10171 cat >conftest.$ac_ext <<_ACEOF
10172 /* confdefs.h.  */
10173 _ACEOF
10174 cat confdefs.h >>conftest.$ac_ext
10175 cat >>conftest.$ac_ext <<_ACEOF
10176 /* end confdefs.h.  */
10177 #include <$ac_header>
10178 _ACEOF
10179 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10181   ac_status=$?
10182   grep -v '^ *+' conftest.er1 >conftest.err
10183   rm -f conftest.er1
10184   cat conftest.err >&5
10185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186   (exit $ac_status); } >/dev/null; then
10187   if test -s conftest.err; then
10188     ac_cpp_err=$ac_c_preproc_warn_flag
10189     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10190   else
10191     ac_cpp_err=
10192   fi
10193 else
10194   ac_cpp_err=yes
10195 fi
10196 if test -z "$ac_cpp_err"; then
10197   ac_header_preproc=yes
10198 else
10199   echo "$as_me: failed program was:" >&5
10200 sed 's/^/| /' conftest.$ac_ext >&5
10201
10202   ac_header_preproc=no
10203 fi
10204 rm -f conftest.err conftest.$ac_ext
10205 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10206 echo "${ECHO_T}$ac_header_preproc" >&6
10207
10208 # So?  What about this header?
10209 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10210   yes:no: )
10211     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10212 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10213     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10214 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10215     ac_header_preproc=yes
10216     ;;
10217   no:yes:* )
10218     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10219 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10220     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10221 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10222     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10223 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10224     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10225 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10226     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10227 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10228     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10229 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10230     (
10231       cat <<\_ASBOX
10232 ## ---------------------------------------- ##
10233 ## Report this to pgsql-bugs@postgresql.org ##
10234 ## ---------------------------------------- ##
10235 _ASBOX
10236     ) |
10237       sed "s/^/$as_me: WARNING:     /" >&2
10238     ;;
10239 esac
10240 echo "$as_me:$LINENO: checking for $ac_header" >&5
10241 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10242 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10243   echo $ECHO_N "(cached) $ECHO_C" >&6
10244 else
10245   eval "$as_ac_Header=\$ac_header_preproc"
10246 fi
10247 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10248 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10249
10250 fi
10251 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10252   cat >>confdefs.h <<_ACEOF
10253 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10254 _ACEOF
10255
10256 else
10257
10258 for ac_header in pam/pam_appl.h
10259 do
10260 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10262   echo "$as_me:$LINENO: checking for $ac_header" >&5
10263 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10264 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10265   echo $ECHO_N "(cached) $ECHO_C" >&6
10266 fi
10267 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10268 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10269 else
10270   # Is the header compilable?
10271 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10272 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10273 cat >conftest.$ac_ext <<_ACEOF
10274 /* confdefs.h.  */
10275 _ACEOF
10276 cat confdefs.h >>conftest.$ac_ext
10277 cat >>conftest.$ac_ext <<_ACEOF
10278 /* end confdefs.h.  */
10279 $ac_includes_default
10280 #include <$ac_header>
10281 _ACEOF
10282 rm -f conftest.$ac_objext
10283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10284   (eval $ac_compile) 2>conftest.er1
10285   ac_status=$?
10286   grep -v '^ *+' conftest.er1 >conftest.err
10287   rm -f conftest.er1
10288   cat conftest.err >&5
10289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10290   (exit $ac_status); } &&
10291          { ac_try='test -z "$ac_c_werror_flag"
10292                          || test ! -s conftest.err'
10293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10294   (eval $ac_try) 2>&5
10295   ac_status=$?
10296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297   (exit $ac_status); }; } &&
10298          { ac_try='test -s conftest.$ac_objext'
10299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10300   (eval $ac_try) 2>&5
10301   ac_status=$?
10302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10303   (exit $ac_status); }; }; then
10304   ac_header_compiler=yes
10305 else
10306   echo "$as_me: failed program was:" >&5
10307 sed 's/^/| /' conftest.$ac_ext >&5
10308
10309 ac_header_compiler=no
10310 fi
10311 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10312 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10313 echo "${ECHO_T}$ac_header_compiler" >&6
10314
10315 # Is the header present?
10316 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10317 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10318 cat >conftest.$ac_ext <<_ACEOF
10319 /* confdefs.h.  */
10320 _ACEOF
10321 cat confdefs.h >>conftest.$ac_ext
10322 cat >>conftest.$ac_ext <<_ACEOF
10323 /* end confdefs.h.  */
10324 #include <$ac_header>
10325 _ACEOF
10326 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10327   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10328   ac_status=$?
10329   grep -v '^ *+' conftest.er1 >conftest.err
10330   rm -f conftest.er1
10331   cat conftest.err >&5
10332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10333   (exit $ac_status); } >/dev/null; then
10334   if test -s conftest.err; then
10335     ac_cpp_err=$ac_c_preproc_warn_flag
10336     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10337   else
10338     ac_cpp_err=
10339   fi
10340 else
10341   ac_cpp_err=yes
10342 fi
10343 if test -z "$ac_cpp_err"; then
10344   ac_header_preproc=yes
10345 else
10346   echo "$as_me: failed program was:" >&5
10347 sed 's/^/| /' conftest.$ac_ext >&5
10348
10349   ac_header_preproc=no
10350 fi
10351 rm -f conftest.err conftest.$ac_ext
10352 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10353 echo "${ECHO_T}$ac_header_preproc" >&6
10354
10355 # So?  What about this header?
10356 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10357   yes:no: )
10358     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10359 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10360     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10361 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10362     ac_header_preproc=yes
10363     ;;
10364   no:yes:* )
10365     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10366 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10367     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10368 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10369     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10370 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10371     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10372 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10373     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10374 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10375     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10376 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10377     (
10378       cat <<\_ASBOX
10379 ## ---------------------------------------- ##
10380 ## Report this to pgsql-bugs@postgresql.org ##
10381 ## ---------------------------------------- ##
10382 _ASBOX
10383     ) |
10384       sed "s/^/$as_me: WARNING:     /" >&2
10385     ;;
10386 esac
10387 echo "$as_me:$LINENO: checking for $ac_header" >&5
10388 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10389 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10390   echo $ECHO_N "(cached) $ECHO_C" >&6
10391 else
10392   eval "$as_ac_Header=\$ac_header_preproc"
10393 fi
10394 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10395 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10396
10397 fi
10398 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10399   cat >>confdefs.h <<_ACEOF
10400 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10401 _ACEOF
10402
10403 else
10404   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10405 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10406    { (exit 1); exit 1; }; }
10407 fi
10408
10409 done
10410
10411 fi
10412
10413 done
10414
10415 fi
10416
10417 if test "$with_ldap" = yes ; then
10418   if test "$PORTNAME" != "win32"; then
10419
10420 for ac_header in ldap.h
10421 do
10422 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10423 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10424   echo "$as_me:$LINENO: checking for $ac_header" >&5
10425 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10426 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10427   echo $ECHO_N "(cached) $ECHO_C" >&6
10428 fi
10429 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10431 else
10432   # Is the header compilable?
10433 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10434 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10435 cat >conftest.$ac_ext <<_ACEOF
10436 /* confdefs.h.  */
10437 _ACEOF
10438 cat confdefs.h >>conftest.$ac_ext
10439 cat >>conftest.$ac_ext <<_ACEOF
10440 /* end confdefs.h.  */
10441 $ac_includes_default
10442 #include <$ac_header>
10443 _ACEOF
10444 rm -f conftest.$ac_objext
10445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10446   (eval $ac_compile) 2>conftest.er1
10447   ac_status=$?
10448   grep -v '^ *+' conftest.er1 >conftest.err
10449   rm -f conftest.er1
10450   cat conftest.err >&5
10451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10452   (exit $ac_status); } &&
10453          { ac_try='test -z "$ac_c_werror_flag"
10454                          || test ! -s conftest.err'
10455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10456   (eval $ac_try) 2>&5
10457   ac_status=$?
10458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10459   (exit $ac_status); }; } &&
10460          { ac_try='test -s conftest.$ac_objext'
10461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10462   (eval $ac_try) 2>&5
10463   ac_status=$?
10464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10465   (exit $ac_status); }; }; then
10466   ac_header_compiler=yes
10467 else
10468   echo "$as_me: failed program was:" >&5
10469 sed 's/^/| /' conftest.$ac_ext >&5
10470
10471 ac_header_compiler=no
10472 fi
10473 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10474 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10475 echo "${ECHO_T}$ac_header_compiler" >&6
10476
10477 # Is the header present?
10478 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10479 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10480 cat >conftest.$ac_ext <<_ACEOF
10481 /* confdefs.h.  */
10482 _ACEOF
10483 cat confdefs.h >>conftest.$ac_ext
10484 cat >>conftest.$ac_ext <<_ACEOF
10485 /* end confdefs.h.  */
10486 #include <$ac_header>
10487 _ACEOF
10488 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10490   ac_status=$?
10491   grep -v '^ *+' conftest.er1 >conftest.err
10492   rm -f conftest.er1
10493   cat conftest.err >&5
10494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10495   (exit $ac_status); } >/dev/null; then
10496   if test -s conftest.err; then
10497     ac_cpp_err=$ac_c_preproc_warn_flag
10498     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10499   else
10500     ac_cpp_err=
10501   fi
10502 else
10503   ac_cpp_err=yes
10504 fi
10505 if test -z "$ac_cpp_err"; then
10506   ac_header_preproc=yes
10507 else
10508   echo "$as_me: failed program was:" >&5
10509 sed 's/^/| /' conftest.$ac_ext >&5
10510
10511   ac_header_preproc=no
10512 fi
10513 rm -f conftest.err conftest.$ac_ext
10514 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10515 echo "${ECHO_T}$ac_header_preproc" >&6
10516
10517 # So?  What about this header?
10518 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10519   yes:no: )
10520     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10521 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10522     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10523 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10524     ac_header_preproc=yes
10525     ;;
10526   no:yes:* )
10527     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10528 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10529     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10530 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10531     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10532 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10533     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10534 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10535     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10536 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10537     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10538 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10539     (
10540       cat <<\_ASBOX
10541 ## ---------------------------------------- ##
10542 ## Report this to pgsql-bugs@postgresql.org ##
10543 ## ---------------------------------------- ##
10544 _ASBOX
10545     ) |
10546       sed "s/^/$as_me: WARNING:     /" >&2
10547     ;;
10548 esac
10549 echo "$as_me:$LINENO: checking for $ac_header" >&5
10550 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10551 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10552   echo $ECHO_N "(cached) $ECHO_C" >&6
10553 else
10554   eval "$as_ac_Header=\$ac_header_preproc"
10555 fi
10556 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10557 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10558
10559 fi
10560 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10561   cat >>confdefs.h <<_ACEOF
10562 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10563 _ACEOF
10564
10565 else
10566   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
10567 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10568    { (exit 1); exit 1; }; }
10569 fi
10570
10571 done
10572
10573   else
10574
10575 for ac_header in winldap.h
10576 do
10577 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10578 echo "$as_me:$LINENO: checking for $ac_header" >&5
10579 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10580 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10581   echo $ECHO_N "(cached) $ECHO_C" >&6
10582 else
10583   cat >conftest.$ac_ext <<_ACEOF
10584 /* confdefs.h.  */
10585 _ACEOF
10586 cat confdefs.h >>conftest.$ac_ext
10587 cat >>conftest.$ac_ext <<_ACEOF
10588 /* end confdefs.h.  */
10589 $ac_includes_default
10590 #include <windows.h>
10591
10592
10593 #include <$ac_header>
10594 _ACEOF
10595 rm -f conftest.$ac_objext
10596 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10597   (eval $ac_compile) 2>conftest.er1
10598   ac_status=$?
10599   grep -v '^ *+' conftest.er1 >conftest.err
10600   rm -f conftest.er1
10601   cat conftest.err >&5
10602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10603   (exit $ac_status); } &&
10604          { ac_try='test -z "$ac_c_werror_flag"
10605                          || test ! -s conftest.err'
10606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10607   (eval $ac_try) 2>&5
10608   ac_status=$?
10609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10610   (exit $ac_status); }; } &&
10611          { ac_try='test -s conftest.$ac_objext'
10612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10613   (eval $ac_try) 2>&5
10614   ac_status=$?
10615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10616   (exit $ac_status); }; }; then
10617   eval "$as_ac_Header=yes"
10618 else
10619   echo "$as_me: failed program was:" >&5
10620 sed 's/^/| /' conftest.$ac_ext >&5
10621
10622 eval "$as_ac_Header=no"
10623 fi
10624 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10625 fi
10626 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10627 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10628 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10629   cat >>confdefs.h <<_ACEOF
10630 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10631 _ACEOF
10632
10633 else
10634   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10635 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10636    { (exit 1); exit 1; }; }
10637 fi
10638
10639 done
10640
10641   fi
10642 fi
10643
10644 if test "$with_bonjour" = yes ; then
10645   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10646   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10647 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10648 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10649   echo $ECHO_N "(cached) $ECHO_C" >&6
10650 fi
10651 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10652 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10653 else
10654   # Is the header compilable?
10655 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10656 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10657 cat >conftest.$ac_ext <<_ACEOF
10658 /* confdefs.h.  */
10659 _ACEOF
10660 cat confdefs.h >>conftest.$ac_ext
10661 cat >>conftest.$ac_ext <<_ACEOF
10662 /* end confdefs.h.  */
10663 $ac_includes_default
10664 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10665 _ACEOF
10666 rm -f conftest.$ac_objext
10667 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10668   (eval $ac_compile) 2>conftest.er1
10669   ac_status=$?
10670   grep -v '^ *+' conftest.er1 >conftest.err
10671   rm -f conftest.er1
10672   cat conftest.err >&5
10673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10674   (exit $ac_status); } &&
10675          { ac_try='test -z "$ac_c_werror_flag"
10676                          || test ! -s conftest.err'
10677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10678   (eval $ac_try) 2>&5
10679   ac_status=$?
10680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10681   (exit $ac_status); }; } &&
10682          { ac_try='test -s conftest.$ac_objext'
10683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10684   (eval $ac_try) 2>&5
10685   ac_status=$?
10686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10687   (exit $ac_status); }; }; then
10688   ac_header_compiler=yes
10689 else
10690   echo "$as_me: failed program was:" >&5
10691 sed 's/^/| /' conftest.$ac_ext >&5
10692
10693 ac_header_compiler=no
10694 fi
10695 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10696 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10697 echo "${ECHO_T}$ac_header_compiler" >&6
10698
10699 # Is the header present?
10700 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10701 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10702 cat >conftest.$ac_ext <<_ACEOF
10703 /* confdefs.h.  */
10704 _ACEOF
10705 cat confdefs.h >>conftest.$ac_ext
10706 cat >>conftest.$ac_ext <<_ACEOF
10707 /* end confdefs.h.  */
10708 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10709 _ACEOF
10710 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10711   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10712   ac_status=$?
10713   grep -v '^ *+' conftest.er1 >conftest.err
10714   rm -f conftest.er1
10715   cat conftest.err >&5
10716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10717   (exit $ac_status); } >/dev/null; then
10718   if test -s conftest.err; then
10719     ac_cpp_err=$ac_c_preproc_warn_flag
10720     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10721   else
10722     ac_cpp_err=
10723   fi
10724 else
10725   ac_cpp_err=yes
10726 fi
10727 if test -z "$ac_cpp_err"; then
10728   ac_header_preproc=yes
10729 else
10730   echo "$as_me: failed program was:" >&5
10731 sed 's/^/| /' conftest.$ac_ext >&5
10732
10733   ac_header_preproc=no
10734 fi
10735 rm -f conftest.err conftest.$ac_ext
10736 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10737 echo "${ECHO_T}$ac_header_preproc" >&6
10738
10739 # So?  What about this header?
10740 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10741   yes:no: )
10742     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10743 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10744     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10745 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10746     ac_header_preproc=yes
10747     ;;
10748   no:yes:* )
10749     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10750 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10751     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10752 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10753     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10754 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10755     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10756 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10757     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10758 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10759     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10760 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10761     (
10762       cat <<\_ASBOX
10763 ## ---------------------------------------- ##
10764 ## Report this to pgsql-bugs@postgresql.org ##
10765 ## ---------------------------------------- ##
10766 _ASBOX
10767     ) |
10768       sed "s/^/$as_me: WARNING:     /" >&2
10769     ;;
10770 esac
10771 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10772 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10773 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10774   echo $ECHO_N "(cached) $ECHO_C" >&6
10775 else
10776   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10777 fi
10778 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10779 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10780
10781 fi
10782 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10783   :
10784 else
10785   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10786 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10787    { (exit 1); exit 1; }; }
10788 fi
10789
10790
10791 fi
10792
10793
10794 ##
10795 ## Types, structures, compiler characteristics
10796 ##
10797
10798  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10799 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10800 if test "${ac_cv_c_const+set}" = set; then
10801   echo $ECHO_N "(cached) $ECHO_C" >&6
10802 else
10803   cat >conftest.$ac_ext <<_ACEOF
10804 /* confdefs.h.  */
10805 _ACEOF
10806 cat confdefs.h >>conftest.$ac_ext
10807 cat >>conftest.$ac_ext <<_ACEOF
10808 /* end confdefs.h.  */
10809
10810 int
10811 main ()
10812 {
10813 /* FIXME: Include the comments suggested by Paul. */
10814 #ifndef __cplusplus
10815   /* Ultrix mips cc rejects this.  */
10816   typedef int charset[2];
10817   const charset x;
10818   /* SunOS 4.1.1 cc rejects this.  */
10819   char const *const *ccp;
10820   char **p;
10821   /* NEC SVR4.0.2 mips cc rejects this.  */
10822   struct point {int x, y;};
10823   static struct point const zero = {0,0};
10824   /* AIX XL C 1.02.0.0 rejects this.
10825      It does not let you subtract one const X* pointer from another in
10826      an arm of an if-expression whose if-part is not a constant
10827      expression */
10828   const char *g = "string";
10829   ccp = &g + (g ? g-g : 0);
10830   /* HPUX 7.0 cc rejects these. */
10831   ++ccp;
10832   p = (char**) ccp;
10833   ccp = (char const *const *) p;
10834   { /* SCO 3.2v4 cc rejects this.  */
10835     char *t;
10836     char const *s = 0 ? (char *) 0 : (char const *) 0;
10837
10838     *t++ = 0;
10839   }
10840   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10841     int x[] = {25, 17};
10842     const int *foo = &x[0];
10843     ++foo;
10844   }
10845   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10846     typedef const int *iptr;
10847     iptr p = 0;
10848     ++p;
10849   }
10850   { /* AIX XL C 1.02.0.0 rejects this saying
10851        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10852     struct s { int j; const int *ap[3]; };
10853     struct s *b; b->j = 5;
10854   }
10855   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10856     const int foo = 10;
10857   }
10858 #endif
10859
10860   ;
10861   return 0;
10862 }
10863 _ACEOF
10864 rm -f conftest.$ac_objext
10865 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10866   (eval $ac_compile) 2>conftest.er1
10867   ac_status=$?
10868   grep -v '^ *+' conftest.er1 >conftest.err
10869   rm -f conftest.er1
10870   cat conftest.err >&5
10871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10872   (exit $ac_status); } &&
10873          { ac_try='test -z "$ac_c_werror_flag"
10874                          || test ! -s conftest.err'
10875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10876   (eval $ac_try) 2>&5
10877   ac_status=$?
10878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10879   (exit $ac_status); }; } &&
10880          { ac_try='test -s conftest.$ac_objext'
10881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10882   (eval $ac_try) 2>&5
10883   ac_status=$?
10884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10885   (exit $ac_status); }; }; then
10886   ac_cv_c_const=yes
10887 else
10888   echo "$as_me: failed program was:" >&5
10889 sed 's/^/| /' conftest.$ac_ext >&5
10890
10891 ac_cv_c_const=no
10892 fi
10893 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10894 fi
10895 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10896 echo "${ECHO_T}$ac_cv_c_const" >&6
10897 if test $ac_cv_c_const = no; then
10898
10899 cat >>confdefs.h <<\_ACEOF
10900 #define const
10901 _ACEOF
10902
10903 fi
10904
10905
10906 echo "$as_me:$LINENO: checking for inline" >&5
10907 echo $ECHO_N "checking for inline... $ECHO_C" >&6
10908 if test "${ac_cv_c_inline+set}" = set; then
10909   echo $ECHO_N "(cached) $ECHO_C" >&6
10910 else
10911   ac_cv_c_inline=no
10912 for ac_kw in inline __inline__ __inline; do
10913   cat >conftest.$ac_ext <<_ACEOF
10914 /* confdefs.h.  */
10915 _ACEOF
10916 cat confdefs.h >>conftest.$ac_ext
10917 cat >>conftest.$ac_ext <<_ACEOF
10918 /* end confdefs.h.  */
10919 #ifndef __cplusplus
10920 typedef int foo_t;
10921 static $ac_kw foo_t static_foo () {return 0; }
10922 $ac_kw int foo () {return 0; }
10923 #endif
10924
10925 _ACEOF
10926 rm -f conftest.$ac_objext
10927 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10928   (eval $ac_compile) 2>conftest.er1
10929   ac_status=$?
10930   grep -v '^ *+' conftest.er1 >conftest.err
10931   rm -f conftest.er1
10932   cat conftest.err >&5
10933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10934   (exit $ac_status); } &&
10935          { ac_try='test -z "$ac_c_werror_flag"
10936                          || test ! -s conftest.err'
10937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10938   (eval $ac_try) 2>&5
10939   ac_status=$?
10940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10941   (exit $ac_status); }; } &&
10942          { ac_try='test -s conftest.$ac_objext'
10943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10944   (eval $ac_try) 2>&5
10945   ac_status=$?
10946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10947   (exit $ac_status); }; }; then
10948   ac_cv_c_inline=$ac_kw; break
10949 else
10950   echo "$as_me: failed program was:" >&5
10951 sed 's/^/| /' conftest.$ac_ext >&5
10952
10953 fi
10954 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10955 done
10956
10957 fi
10958 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
10959 echo "${ECHO_T}$ac_cv_c_inline" >&6
10960 case $ac_cv_c_inline in
10961   inline | yes) ;;
10962   no)
10963 cat >>confdefs.h <<\_ACEOF
10964 #define inline
10965 _ACEOF
10966  ;;
10967   *)  cat >>confdefs.h <<_ACEOF
10968 #define inline $ac_cv_c_inline
10969 _ACEOF
10970  ;;
10971 esac
10972
10973 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
10974 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
10975 if test "${ac_cv_c_stringize+set}" = set; then
10976   echo $ECHO_N "(cached) $ECHO_C" >&6
10977 else
10978   cat >conftest.$ac_ext <<_ACEOF
10979 /* confdefs.h.  */
10980 _ACEOF
10981 cat confdefs.h >>conftest.$ac_ext
10982 cat >>conftest.$ac_ext <<_ACEOF
10983 /* end confdefs.h.  */
10984 #define x(y) #y
10985
10986 char *s = x(teststring);
10987 _ACEOF
10988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10989   $EGREP "#teststring" >/dev/null 2>&1; then
10990   ac_cv_c_stringize=no
10991 else
10992   ac_cv_c_stringize=yes
10993 fi
10994 rm -f conftest*
10995
10996 fi
10997 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
10998 echo "${ECHO_T}$ac_cv_c_stringize" >&6
10999 if test $ac_cv_c_stringize = yes; then
11000
11001 cat >>confdefs.h <<\_ACEOF
11002 #define HAVE_STRINGIZE 1
11003 _ACEOF
11004
11005 fi
11006
11007 echo "$as_me:$LINENO: checking for signed types" >&5
11008 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11009 if test "${pgac_cv_c_signed+set}" = set; then
11010   echo $ECHO_N "(cached) $ECHO_C" >&6
11011 else
11012   cat >conftest.$ac_ext <<_ACEOF
11013 /* confdefs.h.  */
11014 _ACEOF
11015 cat confdefs.h >>conftest.$ac_ext
11016 cat >>conftest.$ac_ext <<_ACEOF
11017 /* end confdefs.h.  */
11018
11019 int
11020 main ()
11021 {
11022 signed char c; signed short s; signed int i;
11023   ;
11024   return 0;
11025 }
11026 _ACEOF
11027 rm -f conftest.$ac_objext
11028 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11029   (eval $ac_compile) 2>conftest.er1
11030   ac_status=$?
11031   grep -v '^ *+' conftest.er1 >conftest.err
11032   rm -f conftest.er1
11033   cat conftest.err >&5
11034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11035   (exit $ac_status); } &&
11036          { ac_try='test -z "$ac_c_werror_flag"
11037                          || test ! -s conftest.err'
11038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11039   (eval $ac_try) 2>&5
11040   ac_status=$?
11041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11042   (exit $ac_status); }; } &&
11043          { ac_try='test -s conftest.$ac_objext'
11044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11045   (eval $ac_try) 2>&5
11046   ac_status=$?
11047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11048   (exit $ac_status); }; }; then
11049   pgac_cv_c_signed=yes
11050 else
11051   echo "$as_me: failed program was:" >&5
11052 sed 's/^/| /' conftest.$ac_ext >&5
11053
11054 pgac_cv_c_signed=no
11055 fi
11056 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11057 fi
11058 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11059 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11060 if test x"$pgac_cv_c_signed" = xno ; then
11061
11062 cat >>confdefs.h <<\_ACEOF
11063 #define signed
11064 _ACEOF
11065
11066 fi
11067 echo "$as_me:$LINENO: checking for working volatile" >&5
11068 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11069 if test "${ac_cv_c_volatile+set}" = set; then
11070   echo $ECHO_N "(cached) $ECHO_C" >&6
11071 else
11072   cat >conftest.$ac_ext <<_ACEOF
11073 /* confdefs.h.  */
11074 _ACEOF
11075 cat confdefs.h >>conftest.$ac_ext
11076 cat >>conftest.$ac_ext <<_ACEOF
11077 /* end confdefs.h.  */
11078
11079 int
11080 main ()
11081 {
11082
11083 volatile int x;
11084 int * volatile y;
11085   ;
11086   return 0;
11087 }
11088 _ACEOF
11089 rm -f conftest.$ac_objext
11090 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11091   (eval $ac_compile) 2>conftest.er1
11092   ac_status=$?
11093   grep -v '^ *+' conftest.er1 >conftest.err
11094   rm -f conftest.er1
11095   cat conftest.err >&5
11096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11097   (exit $ac_status); } &&
11098          { ac_try='test -z "$ac_c_werror_flag"
11099                          || test ! -s conftest.err'
11100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11101   (eval $ac_try) 2>&5
11102   ac_status=$?
11103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11104   (exit $ac_status); }; } &&
11105          { ac_try='test -s conftest.$ac_objext'
11106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11107   (eval $ac_try) 2>&5
11108   ac_status=$?
11109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11110   (exit $ac_status); }; }; then
11111   ac_cv_c_volatile=yes
11112 else
11113   echo "$as_me: failed program was:" >&5
11114 sed 's/^/| /' conftest.$ac_ext >&5
11115
11116 ac_cv_c_volatile=no
11117 fi
11118 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11119 fi
11120 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11121 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11122 if test $ac_cv_c_volatile = no; then
11123
11124 cat >>confdefs.h <<\_ACEOF
11125 #define volatile
11126 _ACEOF
11127
11128 fi
11129
11130 echo "$as_me:$LINENO: checking for __func__" >&5
11131 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11132 if test "${pgac_cv_funcname_func_support+set}" = set; then
11133   echo $ECHO_N "(cached) $ECHO_C" >&6
11134 else
11135   cat >conftest.$ac_ext <<_ACEOF
11136 /* confdefs.h.  */
11137 _ACEOF
11138 cat confdefs.h >>conftest.$ac_ext
11139 cat >>conftest.$ac_ext <<_ACEOF
11140 /* end confdefs.h.  */
11141 #include <stdio.h>
11142 int
11143 main ()
11144 {
11145 printf("%s\n", __func__);
11146   ;
11147   return 0;
11148 }
11149 _ACEOF
11150 rm -f conftest.$ac_objext
11151 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11152   (eval $ac_compile) 2>conftest.er1
11153   ac_status=$?
11154   grep -v '^ *+' conftest.er1 >conftest.err
11155   rm -f conftest.er1
11156   cat conftest.err >&5
11157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11158   (exit $ac_status); } &&
11159          { ac_try='test -z "$ac_c_werror_flag"
11160                          || test ! -s conftest.err'
11161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11162   (eval $ac_try) 2>&5
11163   ac_status=$?
11164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11165   (exit $ac_status); }; } &&
11166          { ac_try='test -s conftest.$ac_objext'
11167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11168   (eval $ac_try) 2>&5
11169   ac_status=$?
11170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11171   (exit $ac_status); }; }; then
11172   pgac_cv_funcname_func_support=yes
11173 else
11174   echo "$as_me: failed program was:" >&5
11175 sed 's/^/| /' conftest.$ac_ext >&5
11176
11177 pgac_cv_funcname_func_support=no
11178 fi
11179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11180 fi
11181 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11182 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11183 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11184
11185 cat >>confdefs.h <<\_ACEOF
11186 #define HAVE_FUNCNAME__FUNC 1
11187 _ACEOF
11188
11189 else
11190 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11191 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11192 if test "${pgac_cv_funcname_function_support+set}" = set; then
11193   echo $ECHO_N "(cached) $ECHO_C" >&6
11194 else
11195   cat >conftest.$ac_ext <<_ACEOF
11196 /* confdefs.h.  */
11197 _ACEOF
11198 cat confdefs.h >>conftest.$ac_ext
11199 cat >>conftest.$ac_ext <<_ACEOF
11200 /* end confdefs.h.  */
11201 #include <stdio.h>
11202 int
11203 main ()
11204 {
11205 printf("%s\n", __FUNCTION__);
11206   ;
11207   return 0;
11208 }
11209 _ACEOF
11210 rm -f conftest.$ac_objext
11211 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11212   (eval $ac_compile) 2>conftest.er1
11213   ac_status=$?
11214   grep -v '^ *+' conftest.er1 >conftest.err
11215   rm -f conftest.er1
11216   cat conftest.err >&5
11217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11218   (exit $ac_status); } &&
11219          { ac_try='test -z "$ac_c_werror_flag"
11220                          || test ! -s conftest.err'
11221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11222   (eval $ac_try) 2>&5
11223   ac_status=$?
11224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11225   (exit $ac_status); }; } &&
11226          { ac_try='test -s conftest.$ac_objext'
11227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11228   (eval $ac_try) 2>&5
11229   ac_status=$?
11230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11231   (exit $ac_status); }; }; then
11232   pgac_cv_funcname_function_support=yes
11233 else
11234   echo "$as_me: failed program was:" >&5
11235 sed 's/^/| /' conftest.$ac_ext >&5
11236
11237 pgac_cv_funcname_function_support=no
11238 fi
11239 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11240 fi
11241 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11242 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11243 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11244
11245 cat >>confdefs.h <<\_ACEOF
11246 #define HAVE_FUNCNAME__FUNCTION 1
11247 _ACEOF
11248
11249 fi
11250 fi
11251 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11252 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11253 if test "${ac_cv_struct_tm+set}" = set; then
11254   echo $ECHO_N "(cached) $ECHO_C" >&6
11255 else
11256   cat >conftest.$ac_ext <<_ACEOF
11257 /* confdefs.h.  */
11258 _ACEOF
11259 cat confdefs.h >>conftest.$ac_ext
11260 cat >>conftest.$ac_ext <<_ACEOF
11261 /* end confdefs.h.  */
11262 #include <sys/types.h>
11263 #include <time.h>
11264
11265 int
11266 main ()
11267 {
11268 struct tm *tp; tp->tm_sec;
11269   ;
11270   return 0;
11271 }
11272 _ACEOF
11273 rm -f conftest.$ac_objext
11274 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11275   (eval $ac_compile) 2>conftest.er1
11276   ac_status=$?
11277   grep -v '^ *+' conftest.er1 >conftest.err
11278   rm -f conftest.er1
11279   cat conftest.err >&5
11280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281   (exit $ac_status); } &&
11282          { ac_try='test -z "$ac_c_werror_flag"
11283                          || test ! -s conftest.err'
11284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11285   (eval $ac_try) 2>&5
11286   ac_status=$?
11287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11288   (exit $ac_status); }; } &&
11289          { ac_try='test -s conftest.$ac_objext'
11290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11291   (eval $ac_try) 2>&5
11292   ac_status=$?
11293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11294   (exit $ac_status); }; }; then
11295   ac_cv_struct_tm=time.h
11296 else
11297   echo "$as_me: failed program was:" >&5
11298 sed 's/^/| /' conftest.$ac_ext >&5
11299
11300 ac_cv_struct_tm=sys/time.h
11301 fi
11302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11303 fi
11304 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11305 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11306 if test $ac_cv_struct_tm = sys/time.h; then
11307
11308 cat >>confdefs.h <<\_ACEOF
11309 #define TM_IN_SYS_TIME 1
11310 _ACEOF
11311
11312 fi
11313
11314 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11315 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11316 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11317   echo $ECHO_N "(cached) $ECHO_C" >&6
11318 else
11319   cat >conftest.$ac_ext <<_ACEOF
11320 /* confdefs.h.  */
11321 _ACEOF
11322 cat confdefs.h >>conftest.$ac_ext
11323 cat >>conftest.$ac_ext <<_ACEOF
11324 /* end confdefs.h.  */
11325 #include <sys/types.h>
11326 #include <$ac_cv_struct_tm>
11327
11328
11329 int
11330 main ()
11331 {
11332 static struct tm ac_aggr;
11333 if (ac_aggr.tm_zone)
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_tm_tm_zone=yes
11362 else
11363   echo "$as_me: failed program was:" >&5
11364 sed 's/^/| /' conftest.$ac_ext >&5
11365
11366 cat >conftest.$ac_ext <<_ACEOF
11367 /* confdefs.h.  */
11368 _ACEOF
11369 cat confdefs.h >>conftest.$ac_ext
11370 cat >>conftest.$ac_ext <<_ACEOF
11371 /* end confdefs.h.  */
11372 #include <sys/types.h>
11373 #include <$ac_cv_struct_tm>
11374
11375
11376 int
11377 main ()
11378 {
11379 static struct tm ac_aggr;
11380 if (sizeof ac_aggr.tm_zone)
11381 return 0;
11382   ;
11383   return 0;
11384 }
11385 _ACEOF
11386 rm -f conftest.$ac_objext
11387 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11388   (eval $ac_compile) 2>conftest.er1
11389   ac_status=$?
11390   grep -v '^ *+' conftest.er1 >conftest.err
11391   rm -f conftest.er1
11392   cat conftest.err >&5
11393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394   (exit $ac_status); } &&
11395          { ac_try='test -z "$ac_c_werror_flag"
11396                          || test ! -s conftest.err'
11397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11398   (eval $ac_try) 2>&5
11399   ac_status=$?
11400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11401   (exit $ac_status); }; } &&
11402          { ac_try='test -s conftest.$ac_objext'
11403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11404   (eval $ac_try) 2>&5
11405   ac_status=$?
11406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11407   (exit $ac_status); }; }; then
11408   ac_cv_member_struct_tm_tm_zone=yes
11409 else
11410   echo "$as_me: failed program was:" >&5
11411 sed 's/^/| /' conftest.$ac_ext >&5
11412
11413 ac_cv_member_struct_tm_tm_zone=no
11414 fi
11415 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11416 fi
11417 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11418 fi
11419 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11420 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11421 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11422
11423 cat >>confdefs.h <<_ACEOF
11424 #define HAVE_STRUCT_TM_TM_ZONE 1
11425 _ACEOF
11426
11427
11428 fi
11429
11430 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11431
11432 cat >>confdefs.h <<\_ACEOF
11433 #define HAVE_TM_ZONE 1
11434 _ACEOF
11435
11436 fi
11437 echo "$as_me:$LINENO: checking for tzname" >&5
11438 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11439 if test "${ac_cv_var_tzname+set}" = set; then
11440   echo $ECHO_N "(cached) $ECHO_C" >&6
11441 else
11442   cat >conftest.$ac_ext <<_ACEOF
11443 /* confdefs.h.  */
11444 _ACEOF
11445 cat confdefs.h >>conftest.$ac_ext
11446 cat >>conftest.$ac_ext <<_ACEOF
11447 /* end confdefs.h.  */
11448 #include <time.h>
11449 #ifndef tzname /* For SGI.  */
11450 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11451 #endif
11452
11453 int
11454 main ()
11455 {
11456 atoi(*tzname);
11457   ;
11458   return 0;
11459 }
11460 _ACEOF
11461 rm -f conftest.$ac_objext conftest$ac_exeext
11462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11463   (eval $ac_link) 2>conftest.er1
11464   ac_status=$?
11465   grep -v '^ *+' conftest.er1 >conftest.err
11466   rm -f conftest.er1
11467   cat conftest.err >&5
11468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469   (exit $ac_status); } &&
11470          { ac_try='test -z "$ac_c_werror_flag"
11471                          || test ! -s conftest.err'
11472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11473   (eval $ac_try) 2>&5
11474   ac_status=$?
11475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476   (exit $ac_status); }; } &&
11477          { ac_try='test -s conftest$ac_exeext'
11478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11479   (eval $ac_try) 2>&5
11480   ac_status=$?
11481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482   (exit $ac_status); }; }; then
11483   ac_cv_var_tzname=yes
11484 else
11485   echo "$as_me: failed program was:" >&5
11486 sed 's/^/| /' conftest.$ac_ext >&5
11487
11488 ac_cv_var_tzname=no
11489 fi
11490 rm -f conftest.err conftest.$ac_objext \
11491       conftest$ac_exeext conftest.$ac_ext
11492 fi
11493 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11494 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11495 if test $ac_cv_var_tzname = yes; then
11496
11497 cat >>confdefs.h <<\_ACEOF
11498 #define HAVE_TZNAME 1
11499 _ACEOF
11500
11501 fi
11502
11503 echo "$as_me:$LINENO: checking for union semun" >&5
11504 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11505 if test "${ac_cv_type_union_semun+set}" = set; then
11506   echo $ECHO_N "(cached) $ECHO_C" >&6
11507 else
11508   cat >conftest.$ac_ext <<_ACEOF
11509 /* confdefs.h.  */
11510 _ACEOF
11511 cat confdefs.h >>conftest.$ac_ext
11512 cat >>conftest.$ac_ext <<_ACEOF
11513 /* end confdefs.h.  */
11514 #include <sys/types.h>
11515 #include <sys/ipc.h>
11516 #include <sys/sem.h>
11517
11518 int
11519 main ()
11520 {
11521 if ((union semun *) 0)
11522   return 0;
11523 if (sizeof (union semun))
11524   return 0;
11525   ;
11526   return 0;
11527 }
11528 _ACEOF
11529 rm -f conftest.$ac_objext
11530 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11531   (eval $ac_compile) 2>conftest.er1
11532   ac_status=$?
11533   grep -v '^ *+' conftest.er1 >conftest.err
11534   rm -f conftest.er1
11535   cat conftest.err >&5
11536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11537   (exit $ac_status); } &&
11538          { ac_try='test -z "$ac_c_werror_flag"
11539                          || test ! -s conftest.err'
11540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11541   (eval $ac_try) 2>&5
11542   ac_status=$?
11543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11544   (exit $ac_status); }; } &&
11545          { ac_try='test -s conftest.$ac_objext'
11546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11547   (eval $ac_try) 2>&5
11548   ac_status=$?
11549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550   (exit $ac_status); }; }; then
11551   ac_cv_type_union_semun=yes
11552 else
11553   echo "$as_me: failed program was:" >&5
11554 sed 's/^/| /' conftest.$ac_ext >&5
11555
11556 ac_cv_type_union_semun=no
11557 fi
11558 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11559 fi
11560 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11561 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11562 if test $ac_cv_type_union_semun = yes; then
11563
11564 cat >>confdefs.h <<_ACEOF
11565 #define HAVE_UNION_SEMUN 1
11566 _ACEOF
11567
11568
11569 fi
11570
11571 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11572 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11573 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11574   echo $ECHO_N "(cached) $ECHO_C" >&6
11575 else
11576   cat >conftest.$ac_ext <<_ACEOF
11577 /* confdefs.h.  */
11578 _ACEOF
11579 cat confdefs.h >>conftest.$ac_ext
11580 cat >>conftest.$ac_ext <<_ACEOF
11581 /* end confdefs.h.  */
11582 #include <sys/types.h>
11583 #ifdef HAVE_SYS_UN_H
11584 #include <sys/un.h>
11585 #endif
11586
11587
11588 int
11589 main ()
11590 {
11591 if ((struct sockaddr_un *) 0)
11592   return 0;
11593 if (sizeof (struct sockaddr_un))
11594   return 0;
11595   ;
11596   return 0;
11597 }
11598 _ACEOF
11599 rm -f conftest.$ac_objext
11600 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11601   (eval $ac_compile) 2>conftest.er1
11602   ac_status=$?
11603   grep -v '^ *+' conftest.er1 >conftest.err
11604   rm -f conftest.er1
11605   cat conftest.err >&5
11606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607   (exit $ac_status); } &&
11608          { ac_try='test -z "$ac_c_werror_flag"
11609                          || test ! -s conftest.err'
11610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11611   (eval $ac_try) 2>&5
11612   ac_status=$?
11613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11614   (exit $ac_status); }; } &&
11615          { ac_try='test -s conftest.$ac_objext'
11616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11617   (eval $ac_try) 2>&5
11618   ac_status=$?
11619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620   (exit $ac_status); }; }; then
11621   ac_cv_type_struct_sockaddr_un=yes
11622 else
11623   echo "$as_me: failed program was:" >&5
11624 sed 's/^/| /' conftest.$ac_ext >&5
11625
11626 ac_cv_type_struct_sockaddr_un=no
11627 fi
11628 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11629 fi
11630 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11631 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11632 if test $ac_cv_type_struct_sockaddr_un = yes; then
11633
11634 cat >>confdefs.h <<_ACEOF
11635 #define HAVE_STRUCT_SOCKADDR_UN 1
11636 _ACEOF
11637
11638
11639 cat >>confdefs.h <<\_ACEOF
11640 #define HAVE_UNIX_SOCKETS 1
11641 _ACEOF
11642
11643 fi
11644
11645 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11646 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11647 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11648   echo $ECHO_N "(cached) $ECHO_C" >&6
11649 else
11650   cat >conftest.$ac_ext <<_ACEOF
11651 /* confdefs.h.  */
11652 _ACEOF
11653 cat confdefs.h >>conftest.$ac_ext
11654 cat >>conftest.$ac_ext <<_ACEOF
11655 /* end confdefs.h.  */
11656 #include <sys/types.h>
11657 #ifdef HAVE_SYS_SOCKET_H
11658 #include <sys/socket.h>
11659 #endif
11660
11661
11662 int
11663 main ()
11664 {
11665 if ((struct sockaddr_storage *) 0)
11666   return 0;
11667 if (sizeof (struct sockaddr_storage))
11668   return 0;
11669   ;
11670   return 0;
11671 }
11672 _ACEOF
11673 rm -f conftest.$ac_objext
11674 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11675   (eval $ac_compile) 2>conftest.er1
11676   ac_status=$?
11677   grep -v '^ *+' conftest.er1 >conftest.err
11678   rm -f conftest.er1
11679   cat conftest.err >&5
11680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11681   (exit $ac_status); } &&
11682          { ac_try='test -z "$ac_c_werror_flag"
11683                          || test ! -s conftest.err'
11684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11685   (eval $ac_try) 2>&5
11686   ac_status=$?
11687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11688   (exit $ac_status); }; } &&
11689          { ac_try='test -s conftest.$ac_objext'
11690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11691   (eval $ac_try) 2>&5
11692   ac_status=$?
11693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11694   (exit $ac_status); }; }; then
11695   ac_cv_type_struct_sockaddr_storage=yes
11696 else
11697   echo "$as_me: failed program was:" >&5
11698 sed 's/^/| /' conftest.$ac_ext >&5
11699
11700 ac_cv_type_struct_sockaddr_storage=no
11701 fi
11702 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11703 fi
11704 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11705 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11706 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11707
11708 cat >>confdefs.h <<_ACEOF
11709 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11710 _ACEOF
11711
11712
11713 fi
11714
11715 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11716 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11717 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11718   echo $ECHO_N "(cached) $ECHO_C" >&6
11719 else
11720   cat >conftest.$ac_ext <<_ACEOF
11721 /* confdefs.h.  */
11722 _ACEOF
11723 cat confdefs.h >>conftest.$ac_ext
11724 cat >>conftest.$ac_ext <<_ACEOF
11725 /* end confdefs.h.  */
11726 #include <sys/types.h>
11727 #ifdef HAVE_SYS_SOCKET_H
11728 #include <sys/socket.h>
11729 #endif
11730
11731
11732 int
11733 main ()
11734 {
11735 static struct sockaddr_storage ac_aggr;
11736 if (ac_aggr.ss_family)
11737 return 0;
11738   ;
11739   return 0;
11740 }
11741 _ACEOF
11742 rm -f conftest.$ac_objext
11743 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11744   (eval $ac_compile) 2>conftest.er1
11745   ac_status=$?
11746   grep -v '^ *+' conftest.er1 >conftest.err
11747   rm -f conftest.er1
11748   cat conftest.err >&5
11749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750   (exit $ac_status); } &&
11751          { ac_try='test -z "$ac_c_werror_flag"
11752                          || test ! -s conftest.err'
11753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11754   (eval $ac_try) 2>&5
11755   ac_status=$?
11756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11757   (exit $ac_status); }; } &&
11758          { ac_try='test -s conftest.$ac_objext'
11759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11760   (eval $ac_try) 2>&5
11761   ac_status=$?
11762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763   (exit $ac_status); }; }; then
11764   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11765 else
11766   echo "$as_me: failed program was:" >&5
11767 sed 's/^/| /' conftest.$ac_ext >&5
11768
11769 cat >conftest.$ac_ext <<_ACEOF
11770 /* confdefs.h.  */
11771 _ACEOF
11772 cat confdefs.h >>conftest.$ac_ext
11773 cat >>conftest.$ac_ext <<_ACEOF
11774 /* end confdefs.h.  */
11775 #include <sys/types.h>
11776 #ifdef HAVE_SYS_SOCKET_H
11777 #include <sys/socket.h>
11778 #endif
11779
11780
11781 int
11782 main ()
11783 {
11784 static struct sockaddr_storage ac_aggr;
11785 if (sizeof ac_aggr.ss_family)
11786 return 0;
11787   ;
11788   return 0;
11789 }
11790 _ACEOF
11791 rm -f conftest.$ac_objext
11792 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11793   (eval $ac_compile) 2>conftest.er1
11794   ac_status=$?
11795   grep -v '^ *+' conftest.er1 >conftest.err
11796   rm -f conftest.er1
11797   cat conftest.err >&5
11798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11799   (exit $ac_status); } &&
11800          { ac_try='test -z "$ac_c_werror_flag"
11801                          || test ! -s conftest.err'
11802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11803   (eval $ac_try) 2>&5
11804   ac_status=$?
11805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11806   (exit $ac_status); }; } &&
11807          { ac_try='test -s conftest.$ac_objext'
11808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11809   (eval $ac_try) 2>&5
11810   ac_status=$?
11811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812   (exit $ac_status); }; }; then
11813   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11814 else
11815   echo "$as_me: failed program was:" >&5
11816 sed 's/^/| /' conftest.$ac_ext >&5
11817
11818 ac_cv_member_struct_sockaddr_storage_ss_family=no
11819 fi
11820 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11821 fi
11822 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11823 fi
11824 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11825 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11826 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11827
11828 cat >>confdefs.h <<_ACEOF
11829 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11830 _ACEOF
11831
11832
11833 fi
11834 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11835 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11836 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11837   echo $ECHO_N "(cached) $ECHO_C" >&6
11838 else
11839   cat >conftest.$ac_ext <<_ACEOF
11840 /* confdefs.h.  */
11841 _ACEOF
11842 cat confdefs.h >>conftest.$ac_ext
11843 cat >>conftest.$ac_ext <<_ACEOF
11844 /* end confdefs.h.  */
11845 #include <sys/types.h>
11846 #ifdef HAVE_SYS_SOCKET_H
11847 #include <sys/socket.h>
11848 #endif
11849
11850
11851 int
11852 main ()
11853 {
11854 static struct sockaddr_storage ac_aggr;
11855 if (ac_aggr.__ss_family)
11856 return 0;
11857   ;
11858   return 0;
11859 }
11860 _ACEOF
11861 rm -f conftest.$ac_objext
11862 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11863   (eval $ac_compile) 2>conftest.er1
11864   ac_status=$?
11865   grep -v '^ *+' conftest.er1 >conftest.err
11866   rm -f conftest.er1
11867   cat conftest.err >&5
11868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11869   (exit $ac_status); } &&
11870          { ac_try='test -z "$ac_c_werror_flag"
11871                          || test ! -s conftest.err'
11872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11873   (eval $ac_try) 2>&5
11874   ac_status=$?
11875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11876   (exit $ac_status); }; } &&
11877          { ac_try='test -s conftest.$ac_objext'
11878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11879   (eval $ac_try) 2>&5
11880   ac_status=$?
11881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11882   (exit $ac_status); }; }; then
11883   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11884 else
11885   echo "$as_me: failed program was:" >&5
11886 sed 's/^/| /' conftest.$ac_ext >&5
11887
11888 cat >conftest.$ac_ext <<_ACEOF
11889 /* confdefs.h.  */
11890 _ACEOF
11891 cat confdefs.h >>conftest.$ac_ext
11892 cat >>conftest.$ac_ext <<_ACEOF
11893 /* end confdefs.h.  */
11894 #include <sys/types.h>
11895 #ifdef HAVE_SYS_SOCKET_H
11896 #include <sys/socket.h>
11897 #endif
11898
11899
11900 int
11901 main ()
11902 {
11903 static struct sockaddr_storage ac_aggr;
11904 if (sizeof ac_aggr.__ss_family)
11905 return 0;
11906   ;
11907   return 0;
11908 }
11909 _ACEOF
11910 rm -f conftest.$ac_objext
11911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11912   (eval $ac_compile) 2>conftest.er1
11913   ac_status=$?
11914   grep -v '^ *+' conftest.er1 >conftest.err
11915   rm -f conftest.er1
11916   cat conftest.err >&5
11917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918   (exit $ac_status); } &&
11919          { ac_try='test -z "$ac_c_werror_flag"
11920                          || test ! -s conftest.err'
11921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11922   (eval $ac_try) 2>&5
11923   ac_status=$?
11924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11925   (exit $ac_status); }; } &&
11926          { ac_try='test -s conftest.$ac_objext'
11927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11928   (eval $ac_try) 2>&5
11929   ac_status=$?
11930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11931   (exit $ac_status); }; }; then
11932   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11933 else
11934   echo "$as_me: failed program was:" >&5
11935 sed 's/^/| /' conftest.$ac_ext >&5
11936
11937 ac_cv_member_struct_sockaddr_storage___ss_family=no
11938 fi
11939 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11940 fi
11941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11942 fi
11943 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
11944 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
11945 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
11946
11947 cat >>confdefs.h <<_ACEOF
11948 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11949 _ACEOF
11950
11951
11952 fi
11953 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
11954 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
11955 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
11956   echo $ECHO_N "(cached) $ECHO_C" >&6
11957 else
11958   cat >conftest.$ac_ext <<_ACEOF
11959 /* confdefs.h.  */
11960 _ACEOF
11961 cat confdefs.h >>conftest.$ac_ext
11962 cat >>conftest.$ac_ext <<_ACEOF
11963 /* end confdefs.h.  */
11964 #include <sys/types.h>
11965 #ifdef HAVE_SYS_SOCKET_H
11966 #include <sys/socket.h>
11967 #endif
11968
11969
11970 int
11971 main ()
11972 {
11973 static struct sockaddr_storage ac_aggr;
11974 if (ac_aggr.ss_len)
11975 return 0;
11976   ;
11977   return 0;
11978 }
11979 _ACEOF
11980 rm -f conftest.$ac_objext
11981 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11982   (eval $ac_compile) 2>conftest.er1
11983   ac_status=$?
11984   grep -v '^ *+' conftest.er1 >conftest.err
11985   rm -f conftest.er1
11986   cat conftest.err >&5
11987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11988   (exit $ac_status); } &&
11989          { ac_try='test -z "$ac_c_werror_flag"
11990                          || test ! -s conftest.err'
11991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11992   (eval $ac_try) 2>&5
11993   ac_status=$?
11994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11995   (exit $ac_status); }; } &&
11996          { ac_try='test -s conftest.$ac_objext'
11997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11998   (eval $ac_try) 2>&5
11999   ac_status=$?
12000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12001   (exit $ac_status); }; }; then
12002   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12003 else
12004   echo "$as_me: failed program was:" >&5
12005 sed 's/^/| /' conftest.$ac_ext >&5
12006
12007 cat >conftest.$ac_ext <<_ACEOF
12008 /* confdefs.h.  */
12009 _ACEOF
12010 cat confdefs.h >>conftest.$ac_ext
12011 cat >>conftest.$ac_ext <<_ACEOF
12012 /* end confdefs.h.  */
12013 #include <sys/types.h>
12014 #ifdef HAVE_SYS_SOCKET_H
12015 #include <sys/socket.h>
12016 #endif
12017
12018
12019 int
12020 main ()
12021 {
12022 static struct sockaddr_storage ac_aggr;
12023 if (sizeof ac_aggr.ss_len)
12024 return 0;
12025   ;
12026   return 0;
12027 }
12028 _ACEOF
12029 rm -f conftest.$ac_objext
12030 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12031   (eval $ac_compile) 2>conftest.er1
12032   ac_status=$?
12033   grep -v '^ *+' conftest.er1 >conftest.err
12034   rm -f conftest.er1
12035   cat conftest.err >&5
12036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12037   (exit $ac_status); } &&
12038          { ac_try='test -z "$ac_c_werror_flag"
12039                          || test ! -s conftest.err'
12040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12041   (eval $ac_try) 2>&5
12042   ac_status=$?
12043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12044   (exit $ac_status); }; } &&
12045          { ac_try='test -s conftest.$ac_objext'
12046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12047   (eval $ac_try) 2>&5
12048   ac_status=$?
12049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050   (exit $ac_status); }; }; then
12051   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12052 else
12053   echo "$as_me: failed program was:" >&5
12054 sed 's/^/| /' conftest.$ac_ext >&5
12055
12056 ac_cv_member_struct_sockaddr_storage_ss_len=no
12057 fi
12058 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12059 fi
12060 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12061 fi
12062 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12063 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12064 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12065
12066 cat >>confdefs.h <<_ACEOF
12067 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12068 _ACEOF
12069
12070
12071 fi
12072 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12073 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12074 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12075   echo $ECHO_N "(cached) $ECHO_C" >&6
12076 else
12077   cat >conftest.$ac_ext <<_ACEOF
12078 /* confdefs.h.  */
12079 _ACEOF
12080 cat confdefs.h >>conftest.$ac_ext
12081 cat >>conftest.$ac_ext <<_ACEOF
12082 /* end confdefs.h.  */
12083 #include <sys/types.h>
12084 #ifdef HAVE_SYS_SOCKET_H
12085 #include <sys/socket.h>
12086 #endif
12087
12088
12089 int
12090 main ()
12091 {
12092 static struct sockaddr_storage ac_aggr;
12093 if (ac_aggr.__ss_len)
12094 return 0;
12095   ;
12096   return 0;
12097 }
12098 _ACEOF
12099 rm -f conftest.$ac_objext
12100 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12101   (eval $ac_compile) 2>conftest.er1
12102   ac_status=$?
12103   grep -v '^ *+' conftest.er1 >conftest.err
12104   rm -f conftest.er1
12105   cat conftest.err >&5
12106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12107   (exit $ac_status); } &&
12108          { ac_try='test -z "$ac_c_werror_flag"
12109                          || test ! -s conftest.err'
12110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12111   (eval $ac_try) 2>&5
12112   ac_status=$?
12113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12114   (exit $ac_status); }; } &&
12115          { ac_try='test -s conftest.$ac_objext'
12116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12117   (eval $ac_try) 2>&5
12118   ac_status=$?
12119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120   (exit $ac_status); }; }; then
12121   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12122 else
12123   echo "$as_me: failed program was:" >&5
12124 sed 's/^/| /' conftest.$ac_ext >&5
12125
12126 cat >conftest.$ac_ext <<_ACEOF
12127 /* confdefs.h.  */
12128 _ACEOF
12129 cat confdefs.h >>conftest.$ac_ext
12130 cat >>conftest.$ac_ext <<_ACEOF
12131 /* end confdefs.h.  */
12132 #include <sys/types.h>
12133 #ifdef HAVE_SYS_SOCKET_H
12134 #include <sys/socket.h>
12135 #endif
12136
12137
12138 int
12139 main ()
12140 {
12141 static struct sockaddr_storage ac_aggr;
12142 if (sizeof ac_aggr.__ss_len)
12143 return 0;
12144   ;
12145   return 0;
12146 }
12147 _ACEOF
12148 rm -f conftest.$ac_objext
12149 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12150   (eval $ac_compile) 2>conftest.er1
12151   ac_status=$?
12152   grep -v '^ *+' conftest.er1 >conftest.err
12153   rm -f conftest.er1
12154   cat conftest.err >&5
12155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12156   (exit $ac_status); } &&
12157          { ac_try='test -z "$ac_c_werror_flag"
12158                          || test ! -s conftest.err'
12159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12160   (eval $ac_try) 2>&5
12161   ac_status=$?
12162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12163   (exit $ac_status); }; } &&
12164          { ac_try='test -s conftest.$ac_objext'
12165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12166   (eval $ac_try) 2>&5
12167   ac_status=$?
12168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12169   (exit $ac_status); }; }; then
12170   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12171 else
12172   echo "$as_me: failed program was:" >&5
12173 sed 's/^/| /' conftest.$ac_ext >&5
12174
12175 ac_cv_member_struct_sockaddr_storage___ss_len=no
12176 fi
12177 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12178 fi
12179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12180 fi
12181 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12182 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12183 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12184
12185 cat >>confdefs.h <<_ACEOF
12186 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12187 _ACEOF
12188
12189
12190 fi
12191 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12192 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12193 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12194   echo $ECHO_N "(cached) $ECHO_C" >&6
12195 else
12196   cat >conftest.$ac_ext <<_ACEOF
12197 /* confdefs.h.  */
12198 _ACEOF
12199 cat confdefs.h >>conftest.$ac_ext
12200 cat >>conftest.$ac_ext <<_ACEOF
12201 /* end confdefs.h.  */
12202 #include <sys/types.h>
12203 #ifdef HAVE_SYS_SOCKET_H
12204 #include <sys/socket.h>
12205 #endif
12206
12207
12208 int
12209 main ()
12210 {
12211 static struct sockaddr ac_aggr;
12212 if (ac_aggr.sa_len)
12213 return 0;
12214   ;
12215   return 0;
12216 }
12217 _ACEOF
12218 rm -f conftest.$ac_objext
12219 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12220   (eval $ac_compile) 2>conftest.er1
12221   ac_status=$?
12222   grep -v '^ *+' conftest.er1 >conftest.err
12223   rm -f conftest.er1
12224   cat conftest.err >&5
12225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12226   (exit $ac_status); } &&
12227          { ac_try='test -z "$ac_c_werror_flag"
12228                          || test ! -s conftest.err'
12229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12230   (eval $ac_try) 2>&5
12231   ac_status=$?
12232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12233   (exit $ac_status); }; } &&
12234          { ac_try='test -s conftest.$ac_objext'
12235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12236   (eval $ac_try) 2>&5
12237   ac_status=$?
12238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12239   (exit $ac_status); }; }; then
12240   ac_cv_member_struct_sockaddr_sa_len=yes
12241 else
12242   echo "$as_me: failed program was:" >&5
12243 sed 's/^/| /' conftest.$ac_ext >&5
12244
12245 cat >conftest.$ac_ext <<_ACEOF
12246 /* confdefs.h.  */
12247 _ACEOF
12248 cat confdefs.h >>conftest.$ac_ext
12249 cat >>conftest.$ac_ext <<_ACEOF
12250 /* end confdefs.h.  */
12251 #include <sys/types.h>
12252 #ifdef HAVE_SYS_SOCKET_H
12253 #include <sys/socket.h>
12254 #endif
12255
12256
12257 int
12258 main ()
12259 {
12260 static struct sockaddr ac_aggr;
12261 if (sizeof ac_aggr.sa_len)
12262 return 0;
12263   ;
12264   return 0;
12265 }
12266 _ACEOF
12267 rm -f conftest.$ac_objext
12268 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12269   (eval $ac_compile) 2>conftest.er1
12270   ac_status=$?
12271   grep -v '^ *+' conftest.er1 >conftest.err
12272   rm -f conftest.er1
12273   cat conftest.err >&5
12274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12275   (exit $ac_status); } &&
12276          { ac_try='test -z "$ac_c_werror_flag"
12277                          || test ! -s conftest.err'
12278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12279   (eval $ac_try) 2>&5
12280   ac_status=$?
12281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12282   (exit $ac_status); }; } &&
12283          { ac_try='test -s conftest.$ac_objext'
12284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12285   (eval $ac_try) 2>&5
12286   ac_status=$?
12287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12288   (exit $ac_status); }; }; then
12289   ac_cv_member_struct_sockaddr_sa_len=yes
12290 else
12291   echo "$as_me: failed program was:" >&5
12292 sed 's/^/| /' conftest.$ac_ext >&5
12293
12294 ac_cv_member_struct_sockaddr_sa_len=no
12295 fi
12296 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12297 fi
12298 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12299 fi
12300 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12301 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12302 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12303
12304 cat >>confdefs.h <<_ACEOF
12305 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12306 _ACEOF
12307
12308
12309 fi
12310
12311 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12312 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12313 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12314   echo $ECHO_N "(cached) $ECHO_C" >&6
12315 else
12316   cat >conftest.$ac_ext <<_ACEOF
12317 /* confdefs.h.  */
12318 _ACEOF
12319 cat confdefs.h >>conftest.$ac_ext
12320 cat >>conftest.$ac_ext <<_ACEOF
12321 /* end confdefs.h.  */
12322 #include <sys/types.h>
12323 #include <sys/socket.h>
12324 #include <netdb.h>
12325
12326
12327 int
12328 main ()
12329 {
12330 if ((struct addrinfo *) 0)
12331   return 0;
12332 if (sizeof (struct addrinfo))
12333   return 0;
12334   ;
12335   return 0;
12336 }
12337 _ACEOF
12338 rm -f conftest.$ac_objext
12339 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12340   (eval $ac_compile) 2>conftest.er1
12341   ac_status=$?
12342   grep -v '^ *+' conftest.er1 >conftest.err
12343   rm -f conftest.er1
12344   cat conftest.err >&5
12345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12346   (exit $ac_status); } &&
12347          { ac_try='test -z "$ac_c_werror_flag"
12348                          || test ! -s conftest.err'
12349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12350   (eval $ac_try) 2>&5
12351   ac_status=$?
12352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12353   (exit $ac_status); }; } &&
12354          { ac_try='test -s conftest.$ac_objext'
12355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12356   (eval $ac_try) 2>&5
12357   ac_status=$?
12358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12359   (exit $ac_status); }; }; then
12360   ac_cv_type_struct_addrinfo=yes
12361 else
12362   echo "$as_me: failed program was:" >&5
12363 sed 's/^/| /' conftest.$ac_ext >&5
12364
12365 ac_cv_type_struct_addrinfo=no
12366 fi
12367 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12368 fi
12369 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12370 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12371 if test $ac_cv_type_struct_addrinfo = yes; then
12372
12373 cat >>confdefs.h <<_ACEOF
12374 #define HAVE_STRUCT_ADDRINFO 1
12375 _ACEOF
12376
12377
12378 fi
12379
12380
12381 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12382 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12383 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12384   echo $ECHO_N "(cached) $ECHO_C" >&6
12385 else
12386   cat >conftest.$ac_ext <<_ACEOF
12387 /* confdefs.h.  */
12388 _ACEOF
12389 cat confdefs.h >>conftest.$ac_ext
12390 cat >>conftest.$ac_ext <<_ACEOF
12391 /* end confdefs.h.  */
12392 #include <sys/param.h>
12393 #include <sys/types.h>
12394 #include <sys/socket.h>
12395 #include <sys/ucred.h>
12396
12397 int
12398 main ()
12399 {
12400 if ((struct cmsgcred *) 0)
12401   return 0;
12402 if (sizeof (struct cmsgcred))
12403   return 0;
12404   ;
12405   return 0;
12406 }
12407 _ACEOF
12408 rm -f conftest.$ac_objext
12409 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12410   (eval $ac_compile) 2>conftest.er1
12411   ac_status=$?
12412   grep -v '^ *+' conftest.er1 >conftest.err
12413   rm -f conftest.er1
12414   cat conftest.err >&5
12415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12416   (exit $ac_status); } &&
12417          { ac_try='test -z "$ac_c_werror_flag"
12418                          || test ! -s conftest.err'
12419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12420   (eval $ac_try) 2>&5
12421   ac_status=$?
12422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12423   (exit $ac_status); }; } &&
12424          { ac_try='test -s conftest.$ac_objext'
12425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12426   (eval $ac_try) 2>&5
12427   ac_status=$?
12428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12429   (exit $ac_status); }; }; then
12430   ac_cv_type_struct_cmsgcred=yes
12431 else
12432   echo "$as_me: failed program was:" >&5
12433 sed 's/^/| /' conftest.$ac_ext >&5
12434
12435 ac_cv_type_struct_cmsgcred=no
12436 fi
12437 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12438 fi
12439 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12440 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12441 if test $ac_cv_type_struct_cmsgcred = yes; then
12442
12443 cat >>confdefs.h <<_ACEOF
12444 #define HAVE_STRUCT_CMSGCRED 1
12445 _ACEOF
12446
12447
12448 fi
12449 echo "$as_me:$LINENO: checking for struct fcred" >&5
12450 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12451 if test "${ac_cv_type_struct_fcred+set}" = set; then
12452   echo $ECHO_N "(cached) $ECHO_C" >&6
12453 else
12454   cat >conftest.$ac_ext <<_ACEOF
12455 /* confdefs.h.  */
12456 _ACEOF
12457 cat confdefs.h >>conftest.$ac_ext
12458 cat >>conftest.$ac_ext <<_ACEOF
12459 /* end confdefs.h.  */
12460 #include <sys/param.h>
12461 #include <sys/types.h>
12462 #include <sys/socket.h>
12463 #include <sys/ucred.h>
12464
12465 int
12466 main ()
12467 {
12468 if ((struct fcred *) 0)
12469   return 0;
12470 if (sizeof (struct fcred))
12471   return 0;
12472   ;
12473   return 0;
12474 }
12475 _ACEOF
12476 rm -f conftest.$ac_objext
12477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12478   (eval $ac_compile) 2>conftest.er1
12479   ac_status=$?
12480   grep -v '^ *+' conftest.er1 >conftest.err
12481   rm -f conftest.er1
12482   cat conftest.err >&5
12483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12484   (exit $ac_status); } &&
12485          { ac_try='test -z "$ac_c_werror_flag"
12486                          || test ! -s conftest.err'
12487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12488   (eval $ac_try) 2>&5
12489   ac_status=$?
12490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12491   (exit $ac_status); }; } &&
12492          { ac_try='test -s conftest.$ac_objext'
12493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12494   (eval $ac_try) 2>&5
12495   ac_status=$?
12496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497   (exit $ac_status); }; }; then
12498   ac_cv_type_struct_fcred=yes
12499 else
12500   echo "$as_me: failed program was:" >&5
12501 sed 's/^/| /' conftest.$ac_ext >&5
12502
12503 ac_cv_type_struct_fcred=no
12504 fi
12505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12506 fi
12507 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12508 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12509 if test $ac_cv_type_struct_fcred = yes; then
12510
12511 cat >>confdefs.h <<_ACEOF
12512 #define HAVE_STRUCT_FCRED 1
12513 _ACEOF
12514
12515
12516 fi
12517 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12518 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12519 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12520   echo $ECHO_N "(cached) $ECHO_C" >&6
12521 else
12522   cat >conftest.$ac_ext <<_ACEOF
12523 /* confdefs.h.  */
12524 _ACEOF
12525 cat confdefs.h >>conftest.$ac_ext
12526 cat >>conftest.$ac_ext <<_ACEOF
12527 /* end confdefs.h.  */
12528 #include <sys/param.h>
12529 #include <sys/types.h>
12530 #include <sys/socket.h>
12531 #include <sys/ucred.h>
12532
12533 int
12534 main ()
12535 {
12536 if ((struct sockcred *) 0)
12537   return 0;
12538 if (sizeof (struct sockcred))
12539   return 0;
12540   ;
12541   return 0;
12542 }
12543 _ACEOF
12544 rm -f conftest.$ac_objext
12545 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12546   (eval $ac_compile) 2>conftest.er1
12547   ac_status=$?
12548   grep -v '^ *+' conftest.er1 >conftest.err
12549   rm -f conftest.er1
12550   cat conftest.err >&5
12551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552   (exit $ac_status); } &&
12553          { ac_try='test -z "$ac_c_werror_flag"
12554                          || test ! -s conftest.err'
12555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556   (eval $ac_try) 2>&5
12557   ac_status=$?
12558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559   (exit $ac_status); }; } &&
12560          { ac_try='test -s conftest.$ac_objext'
12561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12562   (eval $ac_try) 2>&5
12563   ac_status=$?
12564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565   (exit $ac_status); }; }; then
12566   ac_cv_type_struct_sockcred=yes
12567 else
12568   echo "$as_me: failed program was:" >&5
12569 sed 's/^/| /' conftest.$ac_ext >&5
12570
12571 ac_cv_type_struct_sockcred=no
12572 fi
12573 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12574 fi
12575 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12576 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12577 if test $ac_cv_type_struct_sockcred = yes; then
12578
12579 cat >>confdefs.h <<_ACEOF
12580 #define HAVE_STRUCT_SOCKCRED 1
12581 _ACEOF
12582
12583
12584 fi
12585
12586
12587 echo "$as_me:$LINENO: checking for struct option" >&5
12588 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12589 if test "${ac_cv_type_struct_option+set}" = set; then
12590   echo $ECHO_N "(cached) $ECHO_C" >&6
12591 else
12592   cat >conftest.$ac_ext <<_ACEOF
12593 /* confdefs.h.  */
12594 _ACEOF
12595 cat confdefs.h >>conftest.$ac_ext
12596 cat >>conftest.$ac_ext <<_ACEOF
12597 /* end confdefs.h.  */
12598 #ifdef HAVE_GETOPT_H
12599 #include <getopt.h>
12600 #endif
12601
12602 int
12603 main ()
12604 {
12605 if ((struct option *) 0)
12606   return 0;
12607 if (sizeof (struct option))
12608   return 0;
12609   ;
12610   return 0;
12611 }
12612 _ACEOF
12613 rm -f conftest.$ac_objext
12614 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12615   (eval $ac_compile) 2>conftest.er1
12616   ac_status=$?
12617   grep -v '^ *+' conftest.er1 >conftest.err
12618   rm -f conftest.er1
12619   cat conftest.err >&5
12620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12621   (exit $ac_status); } &&
12622          { ac_try='test -z "$ac_c_werror_flag"
12623                          || test ! -s conftest.err'
12624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12625   (eval $ac_try) 2>&5
12626   ac_status=$?
12627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12628   (exit $ac_status); }; } &&
12629          { ac_try='test -s conftest.$ac_objext'
12630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12631   (eval $ac_try) 2>&5
12632   ac_status=$?
12633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12634   (exit $ac_status); }; }; then
12635   ac_cv_type_struct_option=yes
12636 else
12637   echo "$as_me: failed program was:" >&5
12638 sed 's/^/| /' conftest.$ac_ext >&5
12639
12640 ac_cv_type_struct_option=no
12641 fi
12642 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12643 fi
12644 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12645 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12646 if test $ac_cv_type_struct_option = yes; then
12647
12648 cat >>confdefs.h <<_ACEOF
12649 #define HAVE_STRUCT_OPTION 1
12650 _ACEOF
12651
12652
12653 fi
12654
12655
12656 if test "$with_zlib" = yes; then
12657   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12658   # did not).  While we could work around the lack of z_streamp, it
12659   # seems unwise to encourage people to use such old zlib versions...
12660   echo "$as_me:$LINENO: checking for z_streamp" >&5
12661 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12662 if test "${ac_cv_type_z_streamp+set}" = set; then
12663   echo $ECHO_N "(cached) $ECHO_C" >&6
12664 else
12665   cat >conftest.$ac_ext <<_ACEOF
12666 /* confdefs.h.  */
12667 _ACEOF
12668 cat confdefs.h >>conftest.$ac_ext
12669 cat >>conftest.$ac_ext <<_ACEOF
12670 /* end confdefs.h.  */
12671 #include <zlib.h>
12672
12673 int
12674 main ()
12675 {
12676 if ((z_streamp *) 0)
12677   return 0;
12678 if (sizeof (z_streamp))
12679   return 0;
12680   ;
12681   return 0;
12682 }
12683 _ACEOF
12684 rm -f conftest.$ac_objext
12685 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12686   (eval $ac_compile) 2>conftest.er1
12687   ac_status=$?
12688   grep -v '^ *+' conftest.er1 >conftest.err
12689   rm -f conftest.er1
12690   cat conftest.err >&5
12691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12692   (exit $ac_status); } &&
12693          { ac_try='test -z "$ac_c_werror_flag"
12694                          || test ! -s conftest.err'
12695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12696   (eval $ac_try) 2>&5
12697   ac_status=$?
12698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12699   (exit $ac_status); }; } &&
12700          { ac_try='test -s conftest.$ac_objext'
12701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12702   (eval $ac_try) 2>&5
12703   ac_status=$?
12704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705   (exit $ac_status); }; }; then
12706   ac_cv_type_z_streamp=yes
12707 else
12708   echo "$as_me: failed program was:" >&5
12709 sed 's/^/| /' conftest.$ac_ext >&5
12710
12711 ac_cv_type_z_streamp=no
12712 fi
12713 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12714 fi
12715 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12716 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12717 if test $ac_cv_type_z_streamp = yes; then
12718   :
12719 else
12720   { { echo "$as_me:$LINENO: error: zlib version is too old
12721 Use --without-zlib to disable zlib support." >&5
12722 echo "$as_me: error: zlib version is too old
12723 Use --without-zlib to disable zlib support." >&2;}
12724    { (exit 1); exit 1; }; }
12725 fi
12726
12727 fi
12728
12729 if test "$with_krb5" = yes; then
12730 # Check for differences between MIT and Heimdal (KTH) releases
12731   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12732 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12733 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12734   echo $ECHO_N "(cached) $ECHO_C" >&6
12735 else
12736   cat >conftest.$ac_ext <<_ACEOF
12737 /* confdefs.h.  */
12738 _ACEOF
12739 cat confdefs.h >>conftest.$ac_ext
12740 cat >>conftest.$ac_ext <<_ACEOF
12741 /* end confdefs.h.  */
12742 #include <krb5.h>
12743
12744 int
12745 main ()
12746 {
12747 static krb5_ticket ac_aggr;
12748 if (ac_aggr.enc_part2)
12749 return 0;
12750   ;
12751   return 0;
12752 }
12753 _ACEOF
12754 rm -f conftest.$ac_objext
12755 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12756   (eval $ac_compile) 2>conftest.er1
12757   ac_status=$?
12758   grep -v '^ *+' conftest.er1 >conftest.err
12759   rm -f conftest.er1
12760   cat conftest.err >&5
12761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12762   (exit $ac_status); } &&
12763          { ac_try='test -z "$ac_c_werror_flag"
12764                          || test ! -s conftest.err'
12765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12766   (eval $ac_try) 2>&5
12767   ac_status=$?
12768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12769   (exit $ac_status); }; } &&
12770          { ac_try='test -s conftest.$ac_objext'
12771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12772   (eval $ac_try) 2>&5
12773   ac_status=$?
12774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12775   (exit $ac_status); }; }; then
12776   ac_cv_member_krb5_ticket_enc_part2=yes
12777 else
12778   echo "$as_me: failed program was:" >&5
12779 sed 's/^/| /' conftest.$ac_ext >&5
12780
12781 cat >conftest.$ac_ext <<_ACEOF
12782 /* confdefs.h.  */
12783 _ACEOF
12784 cat confdefs.h >>conftest.$ac_ext
12785 cat >>conftest.$ac_ext <<_ACEOF
12786 /* end confdefs.h.  */
12787 #include <krb5.h>
12788
12789 int
12790 main ()
12791 {
12792 static krb5_ticket ac_aggr;
12793 if (sizeof ac_aggr.enc_part2)
12794 return 0;
12795   ;
12796   return 0;
12797 }
12798 _ACEOF
12799 rm -f conftest.$ac_objext
12800 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12801   (eval $ac_compile) 2>conftest.er1
12802   ac_status=$?
12803   grep -v '^ *+' conftest.er1 >conftest.err
12804   rm -f conftest.er1
12805   cat conftest.err >&5
12806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12807   (exit $ac_status); } &&
12808          { ac_try='test -z "$ac_c_werror_flag"
12809                          || test ! -s conftest.err'
12810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12811   (eval $ac_try) 2>&5
12812   ac_status=$?
12813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12814   (exit $ac_status); }; } &&
12815          { ac_try='test -s conftest.$ac_objext'
12816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12817   (eval $ac_try) 2>&5
12818   ac_status=$?
12819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12820   (exit $ac_status); }; }; then
12821   ac_cv_member_krb5_ticket_enc_part2=yes
12822 else
12823   echo "$as_me: failed program was:" >&5
12824 sed 's/^/| /' conftest.$ac_ext >&5
12825
12826 ac_cv_member_krb5_ticket_enc_part2=no
12827 fi
12828 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12829 fi
12830 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12831 fi
12832 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12833 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12834 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12835
12836 cat >>confdefs.h <<_ACEOF
12837 #define HAVE_KRB5_TICKET_ENC_PART2 1
12838 _ACEOF
12839
12840
12841 else
12842   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12843 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12844 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12845   echo $ECHO_N "(cached) $ECHO_C" >&6
12846 else
12847   cat >conftest.$ac_ext <<_ACEOF
12848 /* confdefs.h.  */
12849 _ACEOF
12850 cat confdefs.h >>conftest.$ac_ext
12851 cat >>conftest.$ac_ext <<_ACEOF
12852 /* end confdefs.h.  */
12853 #include <krb5.h>
12854
12855 int
12856 main ()
12857 {
12858 static krb5_ticket ac_aggr;
12859 if (ac_aggr.client)
12860 return 0;
12861   ;
12862   return 0;
12863 }
12864 _ACEOF
12865 rm -f conftest.$ac_objext
12866 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12867   (eval $ac_compile) 2>conftest.er1
12868   ac_status=$?
12869   grep -v '^ *+' conftest.er1 >conftest.err
12870   rm -f conftest.er1
12871   cat conftest.err >&5
12872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12873   (exit $ac_status); } &&
12874          { ac_try='test -z "$ac_c_werror_flag"
12875                          || test ! -s conftest.err'
12876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12877   (eval $ac_try) 2>&5
12878   ac_status=$?
12879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12880   (exit $ac_status); }; } &&
12881          { ac_try='test -s conftest.$ac_objext'
12882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12883   (eval $ac_try) 2>&5
12884   ac_status=$?
12885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12886   (exit $ac_status); }; }; then
12887   ac_cv_member_krb5_ticket_client=yes
12888 else
12889   echo "$as_me: failed program was:" >&5
12890 sed 's/^/| /' conftest.$ac_ext >&5
12891
12892 cat >conftest.$ac_ext <<_ACEOF
12893 /* confdefs.h.  */
12894 _ACEOF
12895 cat confdefs.h >>conftest.$ac_ext
12896 cat >>conftest.$ac_ext <<_ACEOF
12897 /* end confdefs.h.  */
12898 #include <krb5.h>
12899
12900 int
12901 main ()
12902 {
12903 static krb5_ticket ac_aggr;
12904 if (sizeof ac_aggr.client)
12905 return 0;
12906   ;
12907   return 0;
12908 }
12909 _ACEOF
12910 rm -f conftest.$ac_objext
12911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12912   (eval $ac_compile) 2>conftest.er1
12913   ac_status=$?
12914   grep -v '^ *+' conftest.er1 >conftest.err
12915   rm -f conftest.er1
12916   cat conftest.err >&5
12917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12918   (exit $ac_status); } &&
12919          { ac_try='test -z "$ac_c_werror_flag"
12920                          || test ! -s conftest.err'
12921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12922   (eval $ac_try) 2>&5
12923   ac_status=$?
12924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12925   (exit $ac_status); }; } &&
12926          { ac_try='test -s conftest.$ac_objext'
12927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12928   (eval $ac_try) 2>&5
12929   ac_status=$?
12930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12931   (exit $ac_status); }; }; then
12932   ac_cv_member_krb5_ticket_client=yes
12933 else
12934   echo "$as_me: failed program was:" >&5
12935 sed 's/^/| /' conftest.$ac_ext >&5
12936
12937 ac_cv_member_krb5_ticket_client=no
12938 fi
12939 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12940 fi
12941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12942 fi
12943 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
12944 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
12945 if test $ac_cv_member_krb5_ticket_client = yes; then
12946
12947 cat >>confdefs.h <<_ACEOF
12948 #define HAVE_KRB5_TICKET_CLIENT 1
12949 _ACEOF
12950
12951
12952 else
12953   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
12954 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
12955    { (exit 1); exit 1; }; }
12956 fi
12957
12958 fi
12959
12960   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
12961 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
12962 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
12963   echo $ECHO_N "(cached) $ECHO_C" >&6
12964 else
12965   cat >conftest.$ac_ext <<_ACEOF
12966 /* confdefs.h.  */
12967 _ACEOF
12968 cat confdefs.h >>conftest.$ac_ext
12969 cat >>conftest.$ac_ext <<_ACEOF
12970 /* end confdefs.h.  */
12971 #include <krb5.h>
12972
12973 int
12974 main ()
12975 {
12976 static krb5_error ac_aggr;
12977 if (ac_aggr.text.data)
12978 return 0;
12979   ;
12980   return 0;
12981 }
12982 _ACEOF
12983 rm -f conftest.$ac_objext
12984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12985   (eval $ac_compile) 2>conftest.er1
12986   ac_status=$?
12987   grep -v '^ *+' conftest.er1 >conftest.err
12988   rm -f conftest.er1
12989   cat conftest.err >&5
12990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12991   (exit $ac_status); } &&
12992          { ac_try='test -z "$ac_c_werror_flag"
12993                          || test ! -s conftest.err'
12994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12995   (eval $ac_try) 2>&5
12996   ac_status=$?
12997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998   (exit $ac_status); }; } &&
12999          { ac_try='test -s conftest.$ac_objext'
13000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13001   (eval $ac_try) 2>&5
13002   ac_status=$?
13003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13004   (exit $ac_status); }; }; then
13005   ac_cv_member_krb5_error_text_data=yes
13006 else
13007   echo "$as_me: failed program was:" >&5
13008 sed 's/^/| /' conftest.$ac_ext >&5
13009
13010 cat >conftest.$ac_ext <<_ACEOF
13011 /* confdefs.h.  */
13012 _ACEOF
13013 cat confdefs.h >>conftest.$ac_ext
13014 cat >>conftest.$ac_ext <<_ACEOF
13015 /* end confdefs.h.  */
13016 #include <krb5.h>
13017
13018 int
13019 main ()
13020 {
13021 static krb5_error ac_aggr;
13022 if (sizeof ac_aggr.text.data)
13023 return 0;
13024   ;
13025   return 0;
13026 }
13027 _ACEOF
13028 rm -f conftest.$ac_objext
13029 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13030   (eval $ac_compile) 2>conftest.er1
13031   ac_status=$?
13032   grep -v '^ *+' conftest.er1 >conftest.err
13033   rm -f conftest.er1
13034   cat conftest.err >&5
13035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036   (exit $ac_status); } &&
13037          { ac_try='test -z "$ac_c_werror_flag"
13038                          || test ! -s conftest.err'
13039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13040   (eval $ac_try) 2>&5
13041   ac_status=$?
13042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13043   (exit $ac_status); }; } &&
13044          { ac_try='test -s conftest.$ac_objext'
13045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13046   (eval $ac_try) 2>&5
13047   ac_status=$?
13048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13049   (exit $ac_status); }; }; then
13050   ac_cv_member_krb5_error_text_data=yes
13051 else
13052   echo "$as_me: failed program was:" >&5
13053 sed 's/^/| /' conftest.$ac_ext >&5
13054
13055 ac_cv_member_krb5_error_text_data=no
13056 fi
13057 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13058 fi
13059 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13060 fi
13061 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13062 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13063 if test $ac_cv_member_krb5_error_text_data = yes; then
13064
13065 cat >>confdefs.h <<_ACEOF
13066 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13067 _ACEOF
13068
13069
13070 else
13071   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13072 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13073 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076   cat >conftest.$ac_ext <<_ACEOF
13077 /* confdefs.h.  */
13078 _ACEOF
13079 cat confdefs.h >>conftest.$ac_ext
13080 cat >>conftest.$ac_ext <<_ACEOF
13081 /* end confdefs.h.  */
13082 #include <krb5.h>
13083
13084 int
13085 main ()
13086 {
13087 static krb5_error ac_aggr;
13088 if (ac_aggr.e_data)
13089 return 0;
13090   ;
13091   return 0;
13092 }
13093 _ACEOF
13094 rm -f conftest.$ac_objext
13095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13096   (eval $ac_compile) 2>conftest.er1
13097   ac_status=$?
13098   grep -v '^ *+' conftest.er1 >conftest.err
13099   rm -f conftest.er1
13100   cat conftest.err >&5
13101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102   (exit $ac_status); } &&
13103          { ac_try='test -z "$ac_c_werror_flag"
13104                          || test ! -s conftest.err'
13105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13106   (eval $ac_try) 2>&5
13107   ac_status=$?
13108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13109   (exit $ac_status); }; } &&
13110          { ac_try='test -s conftest.$ac_objext'
13111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13112   (eval $ac_try) 2>&5
13113   ac_status=$?
13114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13115   (exit $ac_status); }; }; then
13116   ac_cv_member_krb5_error_e_data=yes
13117 else
13118   echo "$as_me: failed program was:" >&5
13119 sed 's/^/| /' conftest.$ac_ext >&5
13120
13121 cat >conftest.$ac_ext <<_ACEOF
13122 /* confdefs.h.  */
13123 _ACEOF
13124 cat confdefs.h >>conftest.$ac_ext
13125 cat >>conftest.$ac_ext <<_ACEOF
13126 /* end confdefs.h.  */
13127 #include <krb5.h>
13128
13129 int
13130 main ()
13131 {
13132 static krb5_error ac_aggr;
13133 if (sizeof ac_aggr.e_data)
13134 return 0;
13135   ;
13136   return 0;
13137 }
13138 _ACEOF
13139 rm -f conftest.$ac_objext
13140 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13141   (eval $ac_compile) 2>conftest.er1
13142   ac_status=$?
13143   grep -v '^ *+' conftest.er1 >conftest.err
13144   rm -f conftest.er1
13145   cat conftest.err >&5
13146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13147   (exit $ac_status); } &&
13148          { ac_try='test -z "$ac_c_werror_flag"
13149                          || test ! -s conftest.err'
13150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13151   (eval $ac_try) 2>&5
13152   ac_status=$?
13153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13154   (exit $ac_status); }; } &&
13155          { ac_try='test -s conftest.$ac_objext'
13156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13157   (eval $ac_try) 2>&5
13158   ac_status=$?
13159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13160   (exit $ac_status); }; }; then
13161   ac_cv_member_krb5_error_e_data=yes
13162 else
13163   echo "$as_me: failed program was:" >&5
13164 sed 's/^/| /' conftest.$ac_ext >&5
13165
13166 ac_cv_member_krb5_error_e_data=no
13167 fi
13168 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13169 fi
13170 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13171 fi
13172 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13173 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13174 if test $ac_cv_member_krb5_error_e_data = yes; then
13175
13176 cat >>confdefs.h <<_ACEOF
13177 #define HAVE_KRB5_ERROR_E_DATA 1
13178 _ACEOF
13179
13180
13181 else
13182   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13183 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13184    { (exit 1); exit 1; }; }
13185 fi
13186
13187 fi
13188
13189 fi
13190
13191
13192 ##
13193 ## Functions, global variables
13194 ##
13195
13196 echo "$as_me:$LINENO: checking for int timezone" >&5
13197 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13198 if test "${pgac_cv_var_int_timezone+set}" = set; then
13199   echo $ECHO_N "(cached) $ECHO_C" >&6
13200 else
13201   cat >conftest.$ac_ext <<_ACEOF
13202 /* confdefs.h.  */
13203 _ACEOF
13204 cat confdefs.h >>conftest.$ac_ext
13205 cat >>conftest.$ac_ext <<_ACEOF
13206 /* end confdefs.h.  */
13207 #include <time.h>
13208 int res;
13209 int
13210 main ()
13211 {
13212 #ifndef __CYGWIN__
13213 res = timezone / 60;
13214 #else
13215 res = _timezone / 60;
13216 #endif
13217   ;
13218   return 0;
13219 }
13220 _ACEOF
13221 rm -f conftest.$ac_objext conftest$ac_exeext
13222 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13223   (eval $ac_link) 2>conftest.er1
13224   ac_status=$?
13225   grep -v '^ *+' conftest.er1 >conftest.err
13226   rm -f conftest.er1
13227   cat conftest.err >&5
13228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13229   (exit $ac_status); } &&
13230          { ac_try='test -z "$ac_c_werror_flag"
13231                          || test ! -s conftest.err'
13232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13233   (eval $ac_try) 2>&5
13234   ac_status=$?
13235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13236   (exit $ac_status); }; } &&
13237          { ac_try='test -s conftest$ac_exeext'
13238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13239   (eval $ac_try) 2>&5
13240   ac_status=$?
13241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242   (exit $ac_status); }; }; then
13243   pgac_cv_var_int_timezone=yes
13244 else
13245   echo "$as_me: failed program was:" >&5
13246 sed 's/^/| /' conftest.$ac_ext >&5
13247
13248 pgac_cv_var_int_timezone=no
13249 fi
13250 rm -f conftest.err conftest.$ac_objext \
13251       conftest$ac_exeext conftest.$ac_ext
13252 fi
13253 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13254 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13255 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13256
13257 cat >>confdefs.h <<\_ACEOF
13258 #define HAVE_INT_TIMEZONE
13259 _ACEOF
13260
13261 fi
13262 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13263 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13264  if test "${ac_cv_func_accept_return+set}" = set; then
13265   echo $ECHO_N "(cached) $ECHO_C" >&6
13266 else
13267    if test "${ac_cv_func_accept_arg1+set}" = set; then
13268   echo $ECHO_N "(cached) $ECHO_C" >&6
13269 else
13270     if test "${ac_cv_func_accept_arg2+set}" = set; then
13271   echo $ECHO_N "(cached) $ECHO_C" >&6
13272 else
13273      if test "${ac_cv_func_accept_arg3+set}" = set; then
13274   echo $ECHO_N "(cached) $ECHO_C" >&6
13275 else
13276       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13277       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13278        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13279         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13280          cat >conftest.$ac_ext <<_ACEOF
13281 /* confdefs.h.  */
13282 _ACEOF
13283 cat confdefs.h >>conftest.$ac_ext
13284 cat >>conftest.$ac_ext <<_ACEOF
13285 /* end confdefs.h.  */
13286 #ifdef HAVE_SYS_TYPES_H
13287 #include <sys/types.h>
13288 #endif
13289 #ifdef HAVE_SYS_SOCKET_H
13290 #include <sys/socket.h>
13291 #endif
13292 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13293 int
13294 main ()
13295 {
13296
13297   ;
13298   return 0;
13299 }
13300 _ACEOF
13301 rm -f conftest.$ac_objext
13302 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13303   (eval $ac_compile) 2>conftest.er1
13304   ac_status=$?
13305   grep -v '^ *+' conftest.er1 >conftest.err
13306   rm -f conftest.er1
13307   cat conftest.err >&5
13308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13309   (exit $ac_status); } &&
13310          { ac_try='test -z "$ac_c_werror_flag"
13311                          || test ! -s conftest.err'
13312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13313   (eval $ac_try) 2>&5
13314   ac_status=$?
13315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13316   (exit $ac_status); }; } &&
13317          { ac_try='test -s conftest.$ac_objext'
13318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13319   (eval $ac_try) 2>&5
13320   ac_status=$?
13321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13322   (exit $ac_status); }; }; then
13323   ac_not_found=no; break 4
13324 else
13325   echo "$as_me: failed program was:" >&5
13326 sed 's/^/| /' conftest.$ac_ext >&5
13327
13328 ac_not_found=yes
13329 fi
13330 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13331        done
13332       done
13333      done
13334     done
13335     if test "$ac_not_found" = yes; then
13336       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13337 echo "$as_me: error: could not determine argument types" >&2;}
13338    { (exit 1); exit 1; }; }
13339     fi
13340     if test "$ac_cv_func_accept_arg3" = "void"; then
13341       ac_cv_func_accept_arg3=int
13342     fi
13343
13344 fi
13345
13346 fi
13347
13348 fi
13349
13350 fi
13351  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
13352 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13353
13354 cat >>confdefs.h <<_ACEOF
13355 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13356 _ACEOF
13357
13358
13359 cat >>confdefs.h <<_ACEOF
13360 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13361 _ACEOF
13362
13363
13364 cat >>confdefs.h <<_ACEOF
13365 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13366 _ACEOF
13367
13368
13369 cat >>confdefs.h <<_ACEOF
13370 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13371 _ACEOF
13372
13373
13374 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13375 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13376 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13377   echo $ECHO_N "(cached) $ECHO_C" >&6
13378 else
13379   cat >conftest.$ac_ext <<_ACEOF
13380 /* confdefs.h.  */
13381 _ACEOF
13382 cat confdefs.h >>conftest.$ac_ext
13383 cat >>conftest.$ac_ext <<_ACEOF
13384 /* end confdefs.h.  */
13385 #include <sys/time.h>
13386 int
13387 main ()
13388 {
13389 struct timeval *tp;
13390 struct timezone *tzp;
13391 gettimeofday(tp,tzp);
13392   ;
13393   return 0;
13394 }
13395 _ACEOF
13396 rm -f conftest.$ac_objext
13397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13398   (eval $ac_compile) 2>conftest.er1
13399   ac_status=$?
13400   grep -v '^ *+' conftest.er1 >conftest.err
13401   rm -f conftest.er1
13402   cat conftest.err >&5
13403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404   (exit $ac_status); } &&
13405          { ac_try='test -z "$ac_c_werror_flag"
13406                          || test ! -s conftest.err'
13407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13408   (eval $ac_try) 2>&5
13409   ac_status=$?
13410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13411   (exit $ac_status); }; } &&
13412          { ac_try='test -s conftest.$ac_objext'
13413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13414   (eval $ac_try) 2>&5
13415   ac_status=$?
13416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13417   (exit $ac_status); }; }; then
13418   pgac_cv_func_gettimeofday_1arg=no
13419 else
13420   echo "$as_me: failed program was:" >&5
13421 sed 's/^/| /' conftest.$ac_ext >&5
13422
13423 pgac_cv_func_gettimeofday_1arg=yes
13424 fi
13425 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13426 fi
13427 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13428 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13429 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13430
13431 cat >>confdefs.h <<\_ACEOF
13432 #define GETTIMEOFDAY_1ARG
13433 _ACEOF
13434
13435 fi
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459 for ac_func in cbrt dlopen fcvt fdatasync getpeereid getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13460 do
13461 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13462 echo "$as_me:$LINENO: checking for $ac_func" >&5
13463 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13464 if eval "test \"\${$as_ac_var+set}\" = set"; then
13465   echo $ECHO_N "(cached) $ECHO_C" >&6
13466 else
13467   cat >conftest.$ac_ext <<_ACEOF
13468 /* confdefs.h.  */
13469 _ACEOF
13470 cat confdefs.h >>conftest.$ac_ext
13471 cat >>conftest.$ac_ext <<_ACEOF
13472 /* end confdefs.h.  */
13473 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13474    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13475 #define $ac_func innocuous_$ac_func
13476
13477 /* System header to define __stub macros and hopefully few prototypes,
13478     which can conflict with char $ac_func (); below.
13479     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13480     <limits.h> exists even on freestanding compilers.  */
13481
13482 #ifdef __STDC__
13483 # include <limits.h>
13484 #else
13485 # include <assert.h>
13486 #endif
13487
13488 #undef $ac_func
13489
13490 /* Override any gcc2 internal prototype to avoid an error.  */
13491 #ifdef __cplusplus
13492 extern "C"
13493 {
13494 #endif
13495 /* We use char because int might match the return type of a gcc2
13496    builtin and then its argument prototype would still apply.  */
13497 char $ac_func ();
13498 /* The GNU C library defines this for functions which it implements
13499     to always fail with ENOSYS.  Some functions are actually named
13500     something starting with __ and the normal name is an alias.  */
13501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13502 choke me
13503 #else
13504 char (*f) () = $ac_func;
13505 #endif
13506 #ifdef __cplusplus
13507 }
13508 #endif
13509
13510 int
13511 main ()
13512 {
13513 return f != $ac_func;
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 rm -f conftest.$ac_objext conftest$ac_exeext
13519 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13520   (eval $ac_link) 2>conftest.er1
13521   ac_status=$?
13522   grep -v '^ *+' conftest.er1 >conftest.err
13523   rm -f conftest.er1
13524   cat conftest.err >&5
13525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13526   (exit $ac_status); } &&
13527          { ac_try='test -z "$ac_c_werror_flag"
13528                          || test ! -s conftest.err'
13529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13530   (eval $ac_try) 2>&5
13531   ac_status=$?
13532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13533   (exit $ac_status); }; } &&
13534          { ac_try='test -s conftest$ac_exeext'
13535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13536   (eval $ac_try) 2>&5
13537   ac_status=$?
13538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13539   (exit $ac_status); }; }; then
13540   eval "$as_ac_var=yes"
13541 else
13542   echo "$as_me: failed program was:" >&5
13543 sed 's/^/| /' conftest.$ac_ext >&5
13544
13545 eval "$as_ac_var=no"
13546 fi
13547 rm -f conftest.err conftest.$ac_objext \
13548       conftest$ac_exeext conftest.$ac_ext
13549 fi
13550 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13551 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13552 if test `eval echo '${'$as_ac_var'}'` = yes; then
13553   cat >>confdefs.h <<_ACEOF
13554 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13555 _ACEOF
13556
13557 fi
13558 done
13559
13560
13561 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13562 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13563 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13564   echo $ECHO_N "(cached) $ECHO_C" >&6
13565 else
13566   cat >conftest.$ac_ext <<_ACEOF
13567 /* confdefs.h.  */
13568 _ACEOF
13569 cat confdefs.h >>conftest.$ac_ext
13570 cat >>conftest.$ac_ext <<_ACEOF
13571 /* end confdefs.h.  */
13572 #include <unistd.h>
13573
13574 int
13575 main ()
13576 {
13577 #ifndef fdatasync
13578   char *p = (char *) fdatasync;
13579 #endif
13580
13581   ;
13582   return 0;
13583 }
13584 _ACEOF
13585 rm -f conftest.$ac_objext
13586 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13587   (eval $ac_compile) 2>conftest.er1
13588   ac_status=$?
13589   grep -v '^ *+' conftest.er1 >conftest.err
13590   rm -f conftest.er1
13591   cat conftest.err >&5
13592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13593   (exit $ac_status); } &&
13594          { ac_try='test -z "$ac_c_werror_flag"
13595                          || test ! -s conftest.err'
13596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13597   (eval $ac_try) 2>&5
13598   ac_status=$?
13599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13600   (exit $ac_status); }; } &&
13601          { ac_try='test -s conftest.$ac_objext'
13602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13603   (eval $ac_try) 2>&5
13604   ac_status=$?
13605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13606   (exit $ac_status); }; }; then
13607   ac_cv_have_decl_fdatasync=yes
13608 else
13609   echo "$as_me: failed program was:" >&5
13610 sed 's/^/| /' conftest.$ac_ext >&5
13611
13612 ac_cv_have_decl_fdatasync=no
13613 fi
13614 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13615 fi
13616 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13617 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13618 if test $ac_cv_have_decl_fdatasync = yes; then
13619
13620 cat >>confdefs.h <<_ACEOF
13621 #define HAVE_DECL_FDATASYNC 1
13622 _ACEOF
13623
13624
13625 else
13626   cat >>confdefs.h <<_ACEOF
13627 #define HAVE_DECL_FDATASYNC 0
13628 _ACEOF
13629
13630
13631 fi
13632
13633
13634 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13635 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13636 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13637   echo $ECHO_N "(cached) $ECHO_C" >&6
13638 else
13639   cat >conftest.$ac_ext <<_ACEOF
13640 /* confdefs.h.  */
13641 _ACEOF
13642 cat confdefs.h >>conftest.$ac_ext
13643 cat >>conftest.$ac_ext <<_ACEOF
13644 /* end confdefs.h.  */
13645 #include <fcntl.h>
13646
13647 int
13648 main ()
13649 {
13650 #ifndef posix_fadvise
13651   char *p = (char *) posix_fadvise;
13652 #endif
13653
13654   ;
13655   return 0;
13656 }
13657 _ACEOF
13658 rm -f conftest.$ac_objext
13659 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13660   (eval $ac_compile) 2>conftest.er1
13661   ac_status=$?
13662   grep -v '^ *+' conftest.er1 >conftest.err
13663   rm -f conftest.er1
13664   cat conftest.err >&5
13665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13666   (exit $ac_status); } &&
13667          { ac_try='test -z "$ac_c_werror_flag"
13668                          || test ! -s conftest.err'
13669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13670   (eval $ac_try) 2>&5
13671   ac_status=$?
13672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13673   (exit $ac_status); }; } &&
13674          { ac_try='test -s conftest.$ac_objext'
13675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13676   (eval $ac_try) 2>&5
13677   ac_status=$?
13678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679   (exit $ac_status); }; }; then
13680   ac_cv_have_decl_posix_fadvise=yes
13681 else
13682   echo "$as_me: failed program was:" >&5
13683 sed 's/^/| /' conftest.$ac_ext >&5
13684
13685 ac_cv_have_decl_posix_fadvise=no
13686 fi
13687 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13688 fi
13689 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
13690 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
13691 if test $ac_cv_have_decl_posix_fadvise = yes; then
13692
13693 cat >>confdefs.h <<_ACEOF
13694 #define HAVE_DECL_POSIX_FADVISE 1
13695 _ACEOF
13696
13697
13698 else
13699   cat >>confdefs.h <<_ACEOF
13700 #define HAVE_DECL_POSIX_FADVISE 0
13701 _ACEOF
13702
13703
13704 fi
13705
13706
13707 echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
13708 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6
13709 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
13710   echo $ECHO_N "(cached) $ECHO_C" >&6
13711 else
13712   cat >conftest.$ac_ext <<_ACEOF
13713 /* confdefs.h.  */
13714 _ACEOF
13715 cat confdefs.h >>conftest.$ac_ext
13716 cat >>conftest.$ac_ext <<_ACEOF
13717 /* end confdefs.h.  */
13718 $ac_includes_default
13719 int
13720 main ()
13721 {
13722 #ifndef strlcpy
13723   char *p = (char *) strlcpy;
13724 #endif
13725
13726   ;
13727   return 0;
13728 }
13729 _ACEOF
13730 rm -f conftest.$ac_objext
13731 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13732   (eval $ac_compile) 2>conftest.er1
13733   ac_status=$?
13734   grep -v '^ *+' conftest.er1 >conftest.err
13735   rm -f conftest.er1
13736   cat conftest.err >&5
13737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13738   (exit $ac_status); } &&
13739          { ac_try='test -z "$ac_c_werror_flag"
13740                          || test ! -s conftest.err'
13741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13742   (eval $ac_try) 2>&5
13743   ac_status=$?
13744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13745   (exit $ac_status); }; } &&
13746          { ac_try='test -s conftest.$ac_objext'
13747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13748   (eval $ac_try) 2>&5
13749   ac_status=$?
13750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13751   (exit $ac_status); }; }; then
13752   ac_cv_have_decl_strlcpy=yes
13753 else
13754   echo "$as_me: failed program was:" >&5
13755 sed 's/^/| /' conftest.$ac_ext >&5
13756
13757 ac_cv_have_decl_strlcpy=no
13758 fi
13759 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13760 fi
13761 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
13762 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6
13763 if test $ac_cv_have_decl_strlcpy = yes; then
13764
13765 cat >>confdefs.h <<_ACEOF
13766 #define HAVE_DECL_STRLCPY 1
13767 _ACEOF
13768
13769
13770 else
13771   cat >>confdefs.h <<_ACEOF
13772 #define HAVE_DECL_STRLCPY 0
13773 _ACEOF
13774
13775
13776 fi
13777
13778
13779 # This is probably only present on Darwin, but may as well check always
13780 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
13781 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
13782 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
13783   echo $ECHO_N "(cached) $ECHO_C" >&6
13784 else
13785   cat >conftest.$ac_ext <<_ACEOF
13786 /* confdefs.h.  */
13787 _ACEOF
13788 cat confdefs.h >>conftest.$ac_ext
13789 cat >>conftest.$ac_ext <<_ACEOF
13790 /* end confdefs.h.  */
13791 #include <fcntl.h>
13792
13793 int
13794 main ()
13795 {
13796 #ifndef F_FULLFSYNC
13797   char *p = (char *) F_FULLFSYNC;
13798 #endif
13799
13800   ;
13801   return 0;
13802 }
13803 _ACEOF
13804 rm -f conftest.$ac_objext
13805 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13806   (eval $ac_compile) 2>conftest.er1
13807   ac_status=$?
13808   grep -v '^ *+' conftest.er1 >conftest.err
13809   rm -f conftest.er1
13810   cat conftest.err >&5
13811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13812   (exit $ac_status); } &&
13813          { ac_try='test -z "$ac_c_werror_flag"
13814                          || test ! -s conftest.err'
13815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13816   (eval $ac_try) 2>&5
13817   ac_status=$?
13818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13819   (exit $ac_status); }; } &&
13820          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
13826   ac_cv_have_decl_F_FULLFSYNC=yes
13827 else
13828   echo "$as_me: failed program was:" >&5
13829 sed 's/^/| /' conftest.$ac_ext >&5
13830
13831 ac_cv_have_decl_F_FULLFSYNC=no
13832 fi
13833 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13834 fi
13835 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
13836 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
13837 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
13838
13839 cat >>confdefs.h <<_ACEOF
13840 #define HAVE_DECL_F_FULLFSYNC 1
13841 _ACEOF
13842
13843
13844 else
13845   cat >>confdefs.h <<_ACEOF
13846 #define HAVE_DECL_F_FULLFSYNC 0
13847 _ACEOF
13848
13849
13850 fi
13851
13852
13853
13854 HAVE_IPV6=no
13855 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13856 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13857 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13858   echo $ECHO_N "(cached) $ECHO_C" >&6
13859 else
13860   cat >conftest.$ac_ext <<_ACEOF
13861 /* confdefs.h.  */
13862 _ACEOF
13863 cat confdefs.h >>conftest.$ac_ext
13864 cat >>conftest.$ac_ext <<_ACEOF
13865 /* end confdefs.h.  */
13866 $ac_includes_default
13867 #include <netinet/in.h>
13868
13869 int
13870 main ()
13871 {
13872 if ((struct sockaddr_in6 *) 0)
13873   return 0;
13874 if (sizeof (struct sockaddr_in6))
13875   return 0;
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_type_struct_sockaddr_in6=yes
13903 else
13904   echo "$as_me: failed program was:" >&5
13905 sed 's/^/| /' conftest.$ac_ext >&5
13906
13907 ac_cv_type_struct_sockaddr_in6=no
13908 fi
13909 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13910 fi
13911 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13912 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13913 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13914
13915 cat >>confdefs.h <<\_ACEOF
13916 #define HAVE_IPV6 1
13917 _ACEOF
13918
13919          HAVE_IPV6=yes
13920 fi
13921
13922
13923
13924 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13925 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13926 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13927   echo $ECHO_N "(cached) $ECHO_C" >&6
13928 else
13929   cat >conftest.$ac_ext <<_ACEOF
13930 /* confdefs.h.  */
13931 _ACEOF
13932 cat confdefs.h >>conftest.$ac_ext
13933 cat >>conftest.$ac_ext <<_ACEOF
13934 /* end confdefs.h.  */
13935 #include <machine/vmparam.h>
13936 #include <sys/exec.h>
13937
13938 int
13939 main ()
13940 {
13941 PS_STRINGS->ps_nargvstr = 1;
13942 PS_STRINGS->ps_argvstr = "foo";
13943   ;
13944   return 0;
13945 }
13946 _ACEOF
13947 rm -f conftest.$ac_objext conftest$ac_exeext
13948 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13949   (eval $ac_link) 2>conftest.er1
13950   ac_status=$?
13951   grep -v '^ *+' conftest.er1 >conftest.err
13952   rm -f conftest.er1
13953   cat conftest.err >&5
13954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13955   (exit $ac_status); } &&
13956          { ac_try='test -z "$ac_c_werror_flag"
13957                          || test ! -s conftest.err'
13958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13959   (eval $ac_try) 2>&5
13960   ac_status=$?
13961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13962   (exit $ac_status); }; } &&
13963          { ac_try='test -s conftest$ac_exeext'
13964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13965   (eval $ac_try) 2>&5
13966   ac_status=$?
13967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968   (exit $ac_status); }; }; then
13969   pgac_cv_var_PS_STRINGS=yes
13970 else
13971   echo "$as_me: failed program was:" >&5
13972 sed 's/^/| /' conftest.$ac_ext >&5
13973
13974 pgac_cv_var_PS_STRINGS=no
13975 fi
13976 rm -f conftest.err conftest.$ac_objext \
13977       conftest$ac_exeext conftest.$ac_ext
13978 fi
13979 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13980 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13981 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13982
13983 cat >>confdefs.h <<\_ACEOF
13984 #define HAVE_PS_STRINGS
13985 _ACEOF
13986
13987 fi
13988
13989
13990 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13991 # is missing.  Yes, there are machines that have only one.  We may
13992 # also decide to use snprintf.c if snprintf() is present but does not
13993 # have all the features we need --- see below.
13994
13995 if test "$PORTNAME" = "win32"; then
13996   # Win32 gets snprintf.c built unconditionally.
13997   #
13998   # To properly translate all NLS languages strings, we must support the
13999   # *printf() %$ format, which allows *printf() arguments to be selected
14000   # by position in the translated string.
14001   #
14002   # libintl versions < 0.13 use the native *printf() functions, and Win32
14003   # *printf() doesn't understand %$, so we must use our /port versions,
14004   # which do understand %$. libintl versions >= 0.13 include their own
14005   # *printf versions on Win32.  The libintl 0.13 release note text is:
14006   #
14007   #   C format strings with positions, as they arise when a translator
14008   #   needs to reorder a sentence, are now supported on all platforms.
14009   #   On those few platforms (NetBSD and Woe32) for which the native
14010   #   printf()/fprintf()/... functions don't support such format
14011   #   strings, replacements are provided through <libintl.h>.
14012   #
14013   # We could use libintl >= 0.13's *printf() if we were sure that we had
14014   # a litint >= 0.13 at runtime, but seeing that there is no clean way
14015   # to guarantee that, it is best to just use our own, so we are sure to
14016   # get %$ support. In include/port.h we disable the *printf() macros
14017   # that might have been defined by libintl.
14018   #
14019   # We do this unconditionally whether NLS is used or not so we are sure
14020   # that all Win32 libraries and binaries behave the same.
14021   pgac_need_repl_snprintf=yes
14022 else
14023   pgac_need_repl_snprintf=no
14024
14025 for ac_func in snprintf
14026 do
14027 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14028 echo "$as_me:$LINENO: checking for $ac_func" >&5
14029 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14030 if eval "test \"\${$as_ac_var+set}\" = set"; then
14031   echo $ECHO_N "(cached) $ECHO_C" >&6
14032 else
14033   cat >conftest.$ac_ext <<_ACEOF
14034 /* confdefs.h.  */
14035 _ACEOF
14036 cat confdefs.h >>conftest.$ac_ext
14037 cat >>conftest.$ac_ext <<_ACEOF
14038 /* end confdefs.h.  */
14039 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14040    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14041 #define $ac_func innocuous_$ac_func
14042
14043 /* System header to define __stub macros and hopefully few prototypes,
14044     which can conflict with char $ac_func (); below.
14045     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14046     <limits.h> exists even on freestanding compilers.  */
14047
14048 #ifdef __STDC__
14049 # include <limits.h>
14050 #else
14051 # include <assert.h>
14052 #endif
14053
14054 #undef $ac_func
14055
14056 /* Override any gcc2 internal prototype to avoid an error.  */
14057 #ifdef __cplusplus
14058 extern "C"
14059 {
14060 #endif
14061 /* We use char because int might match the return type of a gcc2
14062    builtin and then its argument prototype would still apply.  */
14063 char $ac_func ();
14064 /* The GNU C library defines this for functions which it implements
14065     to always fail with ENOSYS.  Some functions are actually named
14066     something starting with __ and the normal name is an alias.  */
14067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14068 choke me
14069 #else
14070 char (*f) () = $ac_func;
14071 #endif
14072 #ifdef __cplusplus
14073 }
14074 #endif
14075
14076 int
14077 main ()
14078 {
14079 return f != $ac_func;
14080   ;
14081   return 0;
14082 }
14083 _ACEOF
14084 rm -f conftest.$ac_objext conftest$ac_exeext
14085 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14086   (eval $ac_link) 2>conftest.er1
14087   ac_status=$?
14088   grep -v '^ *+' conftest.er1 >conftest.err
14089   rm -f conftest.er1
14090   cat conftest.err >&5
14091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092   (exit $ac_status); } &&
14093          { ac_try='test -z "$ac_c_werror_flag"
14094                          || test ! -s conftest.err'
14095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14096   (eval $ac_try) 2>&5
14097   ac_status=$?
14098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14099   (exit $ac_status); }; } &&
14100          { ac_try='test -s conftest$ac_exeext'
14101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14102   (eval $ac_try) 2>&5
14103   ac_status=$?
14104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14105   (exit $ac_status); }; }; then
14106   eval "$as_ac_var=yes"
14107 else
14108   echo "$as_me: failed program was:" >&5
14109 sed 's/^/| /' conftest.$ac_ext >&5
14110
14111 eval "$as_ac_var=no"
14112 fi
14113 rm -f conftest.err conftest.$ac_objext \
14114       conftest$ac_exeext conftest.$ac_ext
14115 fi
14116 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14117 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14118 if test `eval echo '${'$as_ac_var'}'` = yes; then
14119   cat >>confdefs.h <<_ACEOF
14120 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14121 _ACEOF
14122
14123 else
14124   pgac_need_repl_snprintf=yes
14125 fi
14126 done
14127
14128
14129 for ac_func in vsnprintf
14130 do
14131 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14132 echo "$as_me:$LINENO: checking for $ac_func" >&5
14133 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14134 if eval "test \"\${$as_ac_var+set}\" = set"; then
14135   echo $ECHO_N "(cached) $ECHO_C" >&6
14136 else
14137   cat >conftest.$ac_ext <<_ACEOF
14138 /* confdefs.h.  */
14139 _ACEOF
14140 cat confdefs.h >>conftest.$ac_ext
14141 cat >>conftest.$ac_ext <<_ACEOF
14142 /* end confdefs.h.  */
14143 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14144    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14145 #define $ac_func innocuous_$ac_func
14146
14147 /* System header to define __stub macros and hopefully few prototypes,
14148     which can conflict with char $ac_func (); below.
14149     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14150     <limits.h> exists even on freestanding compilers.  */
14151
14152 #ifdef __STDC__
14153 # include <limits.h>
14154 #else
14155 # include <assert.h>
14156 #endif
14157
14158 #undef $ac_func
14159
14160 /* Override any gcc2 internal prototype to avoid an error.  */
14161 #ifdef __cplusplus
14162 extern "C"
14163 {
14164 #endif
14165 /* We use char because int might match the return type of a gcc2
14166    builtin and then its argument prototype would still apply.  */
14167 char $ac_func ();
14168 /* The GNU C library defines this for functions which it implements
14169     to always fail with ENOSYS.  Some functions are actually named
14170     something starting with __ and the normal name is an alias.  */
14171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14172 choke me
14173 #else
14174 char (*f) () = $ac_func;
14175 #endif
14176 #ifdef __cplusplus
14177 }
14178 #endif
14179
14180 int
14181 main ()
14182 {
14183 return f != $ac_func;
14184   ;
14185   return 0;
14186 }
14187 _ACEOF
14188 rm -f conftest.$ac_objext conftest$ac_exeext
14189 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14190   (eval $ac_link) 2>conftest.er1
14191   ac_status=$?
14192   grep -v '^ *+' conftest.er1 >conftest.err
14193   rm -f conftest.er1
14194   cat conftest.err >&5
14195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14196   (exit $ac_status); } &&
14197          { ac_try='test -z "$ac_c_werror_flag"
14198                          || test ! -s conftest.err'
14199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14200   (eval $ac_try) 2>&5
14201   ac_status=$?
14202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203   (exit $ac_status); }; } &&
14204          { ac_try='test -s conftest$ac_exeext'
14205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14206   (eval $ac_try) 2>&5
14207   ac_status=$?
14208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209   (exit $ac_status); }; }; then
14210   eval "$as_ac_var=yes"
14211 else
14212   echo "$as_me: failed program was:" >&5
14213 sed 's/^/| /' conftest.$ac_ext >&5
14214
14215 eval "$as_ac_var=no"
14216 fi
14217 rm -f conftest.err conftest.$ac_objext \
14218       conftest$ac_exeext conftest.$ac_ext
14219 fi
14220 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14221 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14222 if test `eval echo '${'$as_ac_var'}'` = yes; then
14223   cat >>confdefs.h <<_ACEOF
14224 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14225 _ACEOF
14226
14227 else
14228   pgac_need_repl_snprintf=yes
14229 fi
14230 done
14231
14232 fi
14233
14234
14235 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14236 # include/c.h will provide declarations.  Note this is a separate test
14237 # from whether the functions exist in the C library --- there are
14238 # systems that have the functions but don't bother to declare them :-(
14239
14240 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14241 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14242 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14243   echo $ECHO_N "(cached) $ECHO_C" >&6
14244 else
14245   cat >conftest.$ac_ext <<_ACEOF
14246 /* confdefs.h.  */
14247 _ACEOF
14248 cat confdefs.h >>conftest.$ac_ext
14249 cat >>conftest.$ac_ext <<_ACEOF
14250 /* end confdefs.h.  */
14251 $ac_includes_default
14252 int
14253 main ()
14254 {
14255 #ifndef snprintf
14256   char *p = (char *) snprintf;
14257 #endif
14258
14259   ;
14260   return 0;
14261 }
14262 _ACEOF
14263 rm -f conftest.$ac_objext
14264 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14265   (eval $ac_compile) 2>conftest.er1
14266   ac_status=$?
14267   grep -v '^ *+' conftest.er1 >conftest.err
14268   rm -f conftest.er1
14269   cat conftest.err >&5
14270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14271   (exit $ac_status); } &&
14272          { ac_try='test -z "$ac_c_werror_flag"
14273                          || test ! -s conftest.err'
14274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14275   (eval $ac_try) 2>&5
14276   ac_status=$?
14277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14278   (exit $ac_status); }; } &&
14279          { ac_try='test -s conftest.$ac_objext'
14280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14281   (eval $ac_try) 2>&5
14282   ac_status=$?
14283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14284   (exit $ac_status); }; }; then
14285   ac_cv_have_decl_snprintf=yes
14286 else
14287   echo "$as_me: failed program was:" >&5
14288 sed 's/^/| /' conftest.$ac_ext >&5
14289
14290 ac_cv_have_decl_snprintf=no
14291 fi
14292 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14293 fi
14294 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14295 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14296 if test $ac_cv_have_decl_snprintf = yes; then
14297
14298 cat >>confdefs.h <<_ACEOF
14299 #define HAVE_DECL_SNPRINTF 1
14300 _ACEOF
14301
14302
14303 else
14304   cat >>confdefs.h <<_ACEOF
14305 #define HAVE_DECL_SNPRINTF 0
14306 _ACEOF
14307
14308
14309 fi
14310 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14311 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14312 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14313   echo $ECHO_N "(cached) $ECHO_C" >&6
14314 else
14315   cat >conftest.$ac_ext <<_ACEOF
14316 /* confdefs.h.  */
14317 _ACEOF
14318 cat confdefs.h >>conftest.$ac_ext
14319 cat >>conftest.$ac_ext <<_ACEOF
14320 /* end confdefs.h.  */
14321 $ac_includes_default
14322 int
14323 main ()
14324 {
14325 #ifndef vsnprintf
14326   char *p = (char *) vsnprintf;
14327 #endif
14328
14329   ;
14330   return 0;
14331 }
14332 _ACEOF
14333 rm -f conftest.$ac_objext
14334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14335   (eval $ac_compile) 2>conftest.er1
14336   ac_status=$?
14337   grep -v '^ *+' conftest.er1 >conftest.err
14338   rm -f conftest.er1
14339   cat conftest.err >&5
14340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341   (exit $ac_status); } &&
14342          { ac_try='test -z "$ac_c_werror_flag"
14343                          || test ! -s conftest.err'
14344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14345   (eval $ac_try) 2>&5
14346   ac_status=$?
14347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14348   (exit $ac_status); }; } &&
14349          { ac_try='test -s conftest.$ac_objext'
14350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14351   (eval $ac_try) 2>&5
14352   ac_status=$?
14353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354   (exit $ac_status); }; }; then
14355   ac_cv_have_decl_vsnprintf=yes
14356 else
14357   echo "$as_me: failed program was:" >&5
14358 sed 's/^/| /' conftest.$ac_ext >&5
14359
14360 ac_cv_have_decl_vsnprintf=no
14361 fi
14362 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14363 fi
14364 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14365 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14366 if test $ac_cv_have_decl_vsnprintf = yes; then
14367
14368 cat >>confdefs.h <<_ACEOF
14369 #define HAVE_DECL_VSNPRINTF 1
14370 _ACEOF
14371
14372
14373 else
14374   cat >>confdefs.h <<_ACEOF
14375 #define HAVE_DECL_VSNPRINTF 0
14376 _ACEOF
14377
14378
14379 fi
14380
14381
14382
14383
14384 echo "$as_me:$LINENO: checking for isinf" >&5
14385 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14386 if test "${ac_cv_func_isinf+set}" = set; then
14387   echo $ECHO_N "(cached) $ECHO_C" >&6
14388 else
14389   cat >conftest.$ac_ext <<_ACEOF
14390 /* confdefs.h.  */
14391 _ACEOF
14392 cat confdefs.h >>conftest.$ac_ext
14393 cat >>conftest.$ac_ext <<_ACEOF
14394 /* end confdefs.h.  */
14395
14396 #include <math.h>
14397 double glob_double;
14398
14399 int
14400 main ()
14401 {
14402 return isinf(glob_double) ? 0 : 1;
14403   ;
14404   return 0;
14405 }
14406 _ACEOF
14407 rm -f conftest.$ac_objext conftest$ac_exeext
14408 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14409   (eval $ac_link) 2>conftest.er1
14410   ac_status=$?
14411   grep -v '^ *+' conftest.er1 >conftest.err
14412   rm -f conftest.er1
14413   cat conftest.err >&5
14414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14415   (exit $ac_status); } &&
14416          { ac_try='test -z "$ac_c_werror_flag"
14417                          || test ! -s conftest.err'
14418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14419   (eval $ac_try) 2>&5
14420   ac_status=$?
14421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422   (exit $ac_status); }; } &&
14423          { ac_try='test -s conftest$ac_exeext'
14424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14425   (eval $ac_try) 2>&5
14426   ac_status=$?
14427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14428   (exit $ac_status); }; }; then
14429   ac_cv_func_isinf=yes
14430 else
14431   echo "$as_me: failed program was:" >&5
14432 sed 's/^/| /' conftest.$ac_ext >&5
14433
14434 ac_cv_func_isinf=no
14435 fi
14436 rm -f conftest.err conftest.$ac_objext \
14437       conftest$ac_exeext conftest.$ac_ext
14438 fi
14439 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14440 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14441
14442 if test $ac_cv_func_isinf = yes ; then
14443
14444 cat >>confdefs.h <<\_ACEOF
14445 #define HAVE_ISINF 1
14446 _ACEOF
14447
14448 else
14449   case $LIBOBJS in
14450     "isinf.$ac_objext"   | \
14451   *" isinf.$ac_objext"   | \
14452     "isinf.$ac_objext "* | \
14453   *" isinf.$ac_objext "* ) ;;
14454   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14455 esac
14456
14457   # Look for a way to implement a substitute for isinf()
14458
14459
14460
14461
14462 for ac_func in fpclass fp_class fp_class_d class
14463 do
14464 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14465 echo "$as_me:$LINENO: checking for $ac_func" >&5
14466 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14467 if eval "test \"\${$as_ac_var+set}\" = set"; then
14468   echo $ECHO_N "(cached) $ECHO_C" >&6
14469 else
14470   cat >conftest.$ac_ext <<_ACEOF
14471 /* confdefs.h.  */
14472 _ACEOF
14473 cat confdefs.h >>conftest.$ac_ext
14474 cat >>conftest.$ac_ext <<_ACEOF
14475 /* end confdefs.h.  */
14476 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14477    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14478 #define $ac_func innocuous_$ac_func
14479
14480 /* System header to define __stub macros and hopefully few prototypes,
14481     which can conflict with char $ac_func (); below.
14482     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14483     <limits.h> exists even on freestanding compilers.  */
14484
14485 #ifdef __STDC__
14486 # include <limits.h>
14487 #else
14488 # include <assert.h>
14489 #endif
14490
14491 #undef $ac_func
14492
14493 /* Override any gcc2 internal prototype to avoid an error.  */
14494 #ifdef __cplusplus
14495 extern "C"
14496 {
14497 #endif
14498 /* We use char because int might match the return type of a gcc2
14499    builtin and then its argument prototype would still apply.  */
14500 char $ac_func ();
14501 /* The GNU C library defines this for functions which it implements
14502     to always fail with ENOSYS.  Some functions are actually named
14503     something starting with __ and the normal name is an alias.  */
14504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14505 choke me
14506 #else
14507 char (*f) () = $ac_func;
14508 #endif
14509 #ifdef __cplusplus
14510 }
14511 #endif
14512
14513 int
14514 main ()
14515 {
14516 return f != $ac_func;
14517   ;
14518   return 0;
14519 }
14520 _ACEOF
14521 rm -f conftest.$ac_objext conftest$ac_exeext
14522 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14523   (eval $ac_link) 2>conftest.er1
14524   ac_status=$?
14525   grep -v '^ *+' conftest.er1 >conftest.err
14526   rm -f conftest.er1
14527   cat conftest.err >&5
14528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14529   (exit $ac_status); } &&
14530          { ac_try='test -z "$ac_c_werror_flag"
14531                          || test ! -s conftest.err'
14532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14533   (eval $ac_try) 2>&5
14534   ac_status=$?
14535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14536   (exit $ac_status); }; } &&
14537          { ac_try='test -s conftest$ac_exeext'
14538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14539   (eval $ac_try) 2>&5
14540   ac_status=$?
14541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14542   (exit $ac_status); }; }; then
14543   eval "$as_ac_var=yes"
14544 else
14545   echo "$as_me: failed program was:" >&5
14546 sed 's/^/| /' conftest.$ac_ext >&5
14547
14548 eval "$as_ac_var=no"
14549 fi
14550 rm -f conftest.err conftest.$ac_objext \
14551       conftest$ac_exeext conftest.$ac_ext
14552 fi
14553 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14554 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14555 if test `eval echo '${'$as_ac_var'}'` = yes; then
14556   cat >>confdefs.h <<_ACEOF
14557 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14558 _ACEOF
14559  break
14560 fi
14561 done
14562
14563 fi
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strlcpy strtol strtoul unsetenv
14580 do
14581 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14582 echo "$as_me:$LINENO: checking for $ac_func" >&5
14583 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14584 if eval "test \"\${$as_ac_var+set}\" = set"; then
14585   echo $ECHO_N "(cached) $ECHO_C" >&6
14586 else
14587   cat >conftest.$ac_ext <<_ACEOF
14588 /* confdefs.h.  */
14589 _ACEOF
14590 cat confdefs.h >>conftest.$ac_ext
14591 cat >>conftest.$ac_ext <<_ACEOF
14592 /* end confdefs.h.  */
14593 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14594    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14595 #define $ac_func innocuous_$ac_func
14596
14597 /* System header to define __stub macros and hopefully few prototypes,
14598     which can conflict with char $ac_func (); below.
14599     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14600     <limits.h> exists even on freestanding compilers.  */
14601
14602 #ifdef __STDC__
14603 # include <limits.h>
14604 #else
14605 # include <assert.h>
14606 #endif
14607
14608 #undef $ac_func
14609
14610 /* Override any gcc2 internal prototype to avoid an error.  */
14611 #ifdef __cplusplus
14612 extern "C"
14613 {
14614 #endif
14615 /* We use char because int might match the return type of a gcc2
14616    builtin and then its argument prototype would still apply.  */
14617 char $ac_func ();
14618 /* The GNU C library defines this for functions which it implements
14619     to always fail with ENOSYS.  Some functions are actually named
14620     something starting with __ and the normal name is an alias.  */
14621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14622 choke me
14623 #else
14624 char (*f) () = $ac_func;
14625 #endif
14626 #ifdef __cplusplus
14627 }
14628 #endif
14629
14630 int
14631 main ()
14632 {
14633 return f != $ac_func;
14634   ;
14635   return 0;
14636 }
14637 _ACEOF
14638 rm -f conftest.$ac_objext conftest$ac_exeext
14639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14640   (eval $ac_link) 2>conftest.er1
14641   ac_status=$?
14642   grep -v '^ *+' conftest.er1 >conftest.err
14643   rm -f conftest.er1
14644   cat conftest.err >&5
14645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14646   (exit $ac_status); } &&
14647          { ac_try='test -z "$ac_c_werror_flag"
14648                          || test ! -s conftest.err'
14649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14650   (eval $ac_try) 2>&5
14651   ac_status=$?
14652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14653   (exit $ac_status); }; } &&
14654          { ac_try='test -s conftest$ac_exeext'
14655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14656   (eval $ac_try) 2>&5
14657   ac_status=$?
14658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14659   (exit $ac_status); }; }; then
14660   eval "$as_ac_var=yes"
14661 else
14662   echo "$as_me: failed program was:" >&5
14663 sed 's/^/| /' conftest.$ac_ext >&5
14664
14665 eval "$as_ac_var=no"
14666 fi
14667 rm -f conftest.err conftest.$ac_objext \
14668       conftest$ac_exeext conftest.$ac_ext
14669 fi
14670 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14671 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14672 if test `eval echo '${'$as_ac_var'}'` = yes; then
14673   cat >>confdefs.h <<_ACEOF
14674 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14675 _ACEOF
14676
14677 else
14678   case $LIBOBJS in
14679     "$ac_func.$ac_objext"   | \
14680   *" $ac_func.$ac_objext"   | \
14681     "$ac_func.$ac_objext "* | \
14682   *" $ac_func.$ac_objext "* ) ;;
14683   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14684 esac
14685
14686 fi
14687 done
14688
14689
14690
14691 # System's version of getaddrinfo(), if any, may be used only if we found
14692 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14693 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14694 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14695 # because we want to use our own getaddrinfo.c on Windows anyway.)
14696 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14697
14698 for ac_func in getaddrinfo
14699 do
14700 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14701 echo "$as_me:$LINENO: checking for $ac_func" >&5
14702 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14703 if eval "test \"\${$as_ac_var+set}\" = set"; then
14704   echo $ECHO_N "(cached) $ECHO_C" >&6
14705 else
14706   cat >conftest.$ac_ext <<_ACEOF
14707 /* confdefs.h.  */
14708 _ACEOF
14709 cat confdefs.h >>conftest.$ac_ext
14710 cat >>conftest.$ac_ext <<_ACEOF
14711 /* end confdefs.h.  */
14712 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14713    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14714 #define $ac_func innocuous_$ac_func
14715
14716 /* System header to define __stub macros and hopefully few prototypes,
14717     which can conflict with char $ac_func (); below.
14718     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14719     <limits.h> exists even on freestanding compilers.  */
14720
14721 #ifdef __STDC__
14722 # include <limits.h>
14723 #else
14724 # include <assert.h>
14725 #endif
14726
14727 #undef $ac_func
14728
14729 /* Override any gcc2 internal prototype to avoid an error.  */
14730 #ifdef __cplusplus
14731 extern "C"
14732 {
14733 #endif
14734 /* We use char because int might match the return type of a gcc2
14735    builtin and then its argument prototype would still apply.  */
14736 char $ac_func ();
14737 /* The GNU C library defines this for functions which it implements
14738     to always fail with ENOSYS.  Some functions are actually named
14739     something starting with __ and the normal name is an alias.  */
14740 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14741 choke me
14742 #else
14743 char (*f) () = $ac_func;
14744 #endif
14745 #ifdef __cplusplus
14746 }
14747 #endif
14748
14749 int
14750 main ()
14751 {
14752 return f != $ac_func;
14753   ;
14754   return 0;
14755 }
14756 _ACEOF
14757 rm -f conftest.$ac_objext conftest$ac_exeext
14758 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14759   (eval $ac_link) 2>conftest.er1
14760   ac_status=$?
14761   grep -v '^ *+' conftest.er1 >conftest.err
14762   rm -f conftest.er1
14763   cat conftest.err >&5
14764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14765   (exit $ac_status); } &&
14766          { ac_try='test -z "$ac_c_werror_flag"
14767                          || test ! -s conftest.err'
14768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14769   (eval $ac_try) 2>&5
14770   ac_status=$?
14771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772   (exit $ac_status); }; } &&
14773          { ac_try='test -s conftest$ac_exeext'
14774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14775   (eval $ac_try) 2>&5
14776   ac_status=$?
14777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14778   (exit $ac_status); }; }; then
14779   eval "$as_ac_var=yes"
14780 else
14781   echo "$as_me: failed program was:" >&5
14782 sed 's/^/| /' conftest.$ac_ext >&5
14783
14784 eval "$as_ac_var=no"
14785 fi
14786 rm -f conftest.err conftest.$ac_objext \
14787       conftest$ac_exeext conftest.$ac_ext
14788 fi
14789 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14790 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14791 if test `eval echo '${'$as_ac_var'}'` = yes; then
14792   cat >>confdefs.h <<_ACEOF
14793 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14794 _ACEOF
14795
14796 else
14797   case $LIBOBJS in
14798     "$ac_func.$ac_objext"   | \
14799   *" $ac_func.$ac_objext"   | \
14800     "$ac_func.$ac_objext "* | \
14801   *" $ac_func.$ac_objext "* ) ;;
14802   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14803 esac
14804
14805 fi
14806 done
14807
14808
14809 else
14810   case $LIBOBJS in
14811     "getaddrinfo.$ac_objext"   | \
14812   *" getaddrinfo.$ac_objext"   | \
14813     "getaddrinfo.$ac_objext "* | \
14814   *" getaddrinfo.$ac_objext "* ) ;;
14815   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14816 esac
14817
14818 fi
14819
14820 # similarly, use system's getopt_long() only if system provides struct option.
14821 if test x"$ac_cv_type_struct_option" = xyes ; then
14822
14823 for ac_func in getopt_long
14824 do
14825 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14826 echo "$as_me:$LINENO: checking for $ac_func" >&5
14827 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14828 if eval "test \"\${$as_ac_var+set}\" = set"; then
14829   echo $ECHO_N "(cached) $ECHO_C" >&6
14830 else
14831   cat >conftest.$ac_ext <<_ACEOF
14832 /* confdefs.h.  */
14833 _ACEOF
14834 cat confdefs.h >>conftest.$ac_ext
14835 cat >>conftest.$ac_ext <<_ACEOF
14836 /* end confdefs.h.  */
14837 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14838    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14839 #define $ac_func innocuous_$ac_func
14840
14841 /* System header to define __stub macros and hopefully few prototypes,
14842     which can conflict with char $ac_func (); below.
14843     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14844     <limits.h> exists even on freestanding compilers.  */
14845
14846 #ifdef __STDC__
14847 # include <limits.h>
14848 #else
14849 # include <assert.h>
14850 #endif
14851
14852 #undef $ac_func
14853
14854 /* Override any gcc2 internal prototype to avoid an error.  */
14855 #ifdef __cplusplus
14856 extern "C"
14857 {
14858 #endif
14859 /* We use char because int might match the return type of a gcc2
14860    builtin and then its argument prototype would still apply.  */
14861 char $ac_func ();
14862 /* The GNU C library defines this for functions which it implements
14863     to always fail with ENOSYS.  Some functions are actually named
14864     something starting with __ and the normal name is an alias.  */
14865 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14866 choke me
14867 #else
14868 char (*f) () = $ac_func;
14869 #endif
14870 #ifdef __cplusplus
14871 }
14872 #endif
14873
14874 int
14875 main ()
14876 {
14877 return f != $ac_func;
14878   ;
14879   return 0;
14880 }
14881 _ACEOF
14882 rm -f conftest.$ac_objext conftest$ac_exeext
14883 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14884   (eval $ac_link) 2>conftest.er1
14885   ac_status=$?
14886   grep -v '^ *+' conftest.er1 >conftest.err
14887   rm -f conftest.er1
14888   cat conftest.err >&5
14889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14890   (exit $ac_status); } &&
14891          { ac_try='test -z "$ac_c_werror_flag"
14892                          || test ! -s conftest.err'
14893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14894   (eval $ac_try) 2>&5
14895   ac_status=$?
14896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14897   (exit $ac_status); }; } &&
14898          { ac_try='test -s conftest$ac_exeext'
14899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14900   (eval $ac_try) 2>&5
14901   ac_status=$?
14902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14903   (exit $ac_status); }; }; then
14904   eval "$as_ac_var=yes"
14905 else
14906   echo "$as_me: failed program was:" >&5
14907 sed 's/^/| /' conftest.$ac_ext >&5
14908
14909 eval "$as_ac_var=no"
14910 fi
14911 rm -f conftest.err conftest.$ac_objext \
14912       conftest$ac_exeext conftest.$ac_ext
14913 fi
14914 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14915 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14916 if test `eval echo '${'$as_ac_var'}'` = yes; then
14917   cat >>confdefs.h <<_ACEOF
14918 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14919 _ACEOF
14920
14921 else
14922   case $LIBOBJS in
14923     "$ac_func.$ac_objext"   | \
14924   *" $ac_func.$ac_objext"   | \
14925     "$ac_func.$ac_objext "* | \
14926   *" $ac_func.$ac_objext "* ) ;;
14927   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14928 esac
14929
14930 fi
14931 done
14932
14933
14934 else
14935   case $LIBOBJS in
14936     "getopt_long.$ac_objext"   | \
14937   *" getopt_long.$ac_objext"   | \
14938     "getopt_long.$ac_objext "* | \
14939   *" getopt_long.$ac_objext "* ) ;;
14940   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14941 esac
14942
14943 fi
14944
14945 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14946 # We override the previous test that said fseeko/ftello didn't exist
14947 # OS tests are also done in include/c.h and port/fseeko.c
14948 case $host_os in bsdi*|netbsd*)
14949 ac_cv_func_fseeko=yes
14950 esac
14951
14952 # Win32 support
14953 if test "$PORTNAME" = "win32"; then
14954 case $LIBOBJS in
14955     "gettimeofday.$ac_objext"   | \
14956   *" gettimeofday.$ac_objext"   | \
14957     "gettimeofday.$ac_objext "* | \
14958   *" gettimeofday.$ac_objext "* ) ;;
14959   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14960 esac
14961
14962 case $LIBOBJS in
14963     "kill.$ac_objext"   | \
14964   *" kill.$ac_objext"   | \
14965     "kill.$ac_objext "* | \
14966   *" kill.$ac_objext "* ) ;;
14967   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14968 esac
14969
14970 case $LIBOBJS in
14971     "open.$ac_objext"   | \
14972   *" open.$ac_objext"   | \
14973     "open.$ac_objext "* | \
14974   *" open.$ac_objext "* ) ;;
14975   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14976 esac
14977
14978 case $LIBOBJS in
14979     "rand.$ac_objext"   | \
14980   *" rand.$ac_objext"   | \
14981     "rand.$ac_objext "* | \
14982   *" rand.$ac_objext "* ) ;;
14983   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14984 esac
14985
14986 case $LIBOBJS in
14987     "win32error.$ac_objext"   | \
14988   *" win32error.$ac_objext"   | \
14989     "win32error.$ac_objext "* | \
14990   *" win32error.$ac_objext "* ) ;;
14991   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
14992 esac
14993
14994
14995 cat >>confdefs.h <<\_ACEOF
14996 #define HAVE_SYMLINK 1
14997 _ACEOF
14998
14999 fi
15000
15001 if test "$with_readline" = yes; then
15002   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
15003 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
15004 cat >conftest.$ac_ext <<_ACEOF
15005 /* confdefs.h.  */
15006 _ACEOF
15007 cat confdefs.h >>conftest.$ac_ext
15008 cat >>conftest.$ac_ext <<_ACEOF
15009 /* end confdefs.h.  */
15010 #include <stdio.h>
15011 #ifdef HAVE_READLINE_READLINE_H
15012 # include <readline/readline.h>
15013 #elif defined(HAVE_READLINE_H)
15014 # include <readline.h>
15015 #endif
15016
15017 int
15018 main ()
15019 {
15020 rl_completion_append_character = 'x';
15021   ;
15022   return 0;
15023 }
15024 _ACEOF
15025 rm -f conftest.$ac_objext conftest$ac_exeext
15026 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15027   (eval $ac_link) 2>conftest.er1
15028   ac_status=$?
15029   grep -v '^ *+' conftest.er1 >conftest.err
15030   rm -f conftest.er1
15031   cat conftest.err >&5
15032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033   (exit $ac_status); } &&
15034          { ac_try='test -z "$ac_c_werror_flag"
15035                          || test ! -s conftest.err'
15036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15037   (eval $ac_try) 2>&5
15038   ac_status=$?
15039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15040   (exit $ac_status); }; } &&
15041          { ac_try='test -s conftest$ac_exeext'
15042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15043   (eval $ac_try) 2>&5
15044   ac_status=$?
15045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15046   (exit $ac_status); }; }; then
15047   echo "$as_me:$LINENO: result: yes" >&5
15048 echo "${ECHO_T}yes" >&6
15049
15050 cat >>confdefs.h <<\_ACEOF
15051 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15052 _ACEOF
15053
15054 else
15055   echo "$as_me: failed program was:" >&5
15056 sed 's/^/| /' conftest.$ac_ext >&5
15057
15058 echo "$as_me:$LINENO: result: no" >&5
15059 echo "${ECHO_T}no" >&6
15060 fi
15061 rm -f conftest.err conftest.$ac_objext \
15062       conftest$ac_exeext conftest.$ac_ext
15063
15064
15065 for ac_func in rl_completion_matches rl_filename_completion_function
15066 do
15067 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15068 echo "$as_me:$LINENO: checking for $ac_func" >&5
15069 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15070 if eval "test \"\${$as_ac_var+set}\" = set"; then
15071   echo $ECHO_N "(cached) $ECHO_C" >&6
15072 else
15073   cat >conftest.$ac_ext <<_ACEOF
15074 /* confdefs.h.  */
15075 _ACEOF
15076 cat confdefs.h >>conftest.$ac_ext
15077 cat >>conftest.$ac_ext <<_ACEOF
15078 /* end confdefs.h.  */
15079 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15080    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15081 #define $ac_func innocuous_$ac_func
15082
15083 /* System header to define __stub macros and hopefully few prototypes,
15084     which can conflict with char $ac_func (); below.
15085     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15086     <limits.h> exists even on freestanding compilers.  */
15087
15088 #ifdef __STDC__
15089 # include <limits.h>
15090 #else
15091 # include <assert.h>
15092 #endif
15093
15094 #undef $ac_func
15095
15096 /* Override any gcc2 internal prototype to avoid an error.  */
15097 #ifdef __cplusplus
15098 extern "C"
15099 {
15100 #endif
15101 /* We use char because int might match the return type of a gcc2
15102    builtin and then its argument prototype would still apply.  */
15103 char $ac_func ();
15104 /* The GNU C library defines this for functions which it implements
15105     to always fail with ENOSYS.  Some functions are actually named
15106     something starting with __ and the normal name is an alias.  */
15107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15108 choke me
15109 #else
15110 char (*f) () = $ac_func;
15111 #endif
15112 #ifdef __cplusplus
15113 }
15114 #endif
15115
15116 int
15117 main ()
15118 {
15119 return f != $ac_func;
15120   ;
15121   return 0;
15122 }
15123 _ACEOF
15124 rm -f conftest.$ac_objext conftest$ac_exeext
15125 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15126   (eval $ac_link) 2>conftest.er1
15127   ac_status=$?
15128   grep -v '^ *+' conftest.er1 >conftest.err
15129   rm -f conftest.er1
15130   cat conftest.err >&5
15131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15132   (exit $ac_status); } &&
15133          { ac_try='test -z "$ac_c_werror_flag"
15134                          || test ! -s conftest.err'
15135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15136   (eval $ac_try) 2>&5
15137   ac_status=$?
15138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139   (exit $ac_status); }; } &&
15140          { ac_try='test -s conftest$ac_exeext'
15141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15142   (eval $ac_try) 2>&5
15143   ac_status=$?
15144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145   (exit $ac_status); }; }; then
15146   eval "$as_ac_var=yes"
15147 else
15148   echo "$as_me: failed program was:" >&5
15149 sed 's/^/| /' conftest.$ac_ext >&5
15150
15151 eval "$as_ac_var=no"
15152 fi
15153 rm -f conftest.err conftest.$ac_objext \
15154       conftest$ac_exeext conftest.$ac_ext
15155 fi
15156 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15157 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15158 if test `eval echo '${'$as_ac_var'}'` = yes; then
15159   cat >>confdefs.h <<_ACEOF
15160 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15161 _ACEOF
15162
15163 fi
15164 done
15165
15166
15167 for ac_func in replace_history_entry
15168 do
15169 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15170 echo "$as_me:$LINENO: checking for $ac_func" >&5
15171 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15172 if eval "test \"\${$as_ac_var+set}\" = set"; then
15173   echo $ECHO_N "(cached) $ECHO_C" >&6
15174 else
15175   cat >conftest.$ac_ext <<_ACEOF
15176 /* confdefs.h.  */
15177 _ACEOF
15178 cat confdefs.h >>conftest.$ac_ext
15179 cat >>conftest.$ac_ext <<_ACEOF
15180 /* end confdefs.h.  */
15181 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15182    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15183 #define $ac_func innocuous_$ac_func
15184
15185 /* System header to define __stub macros and hopefully few prototypes,
15186     which can conflict with char $ac_func (); below.
15187     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15188     <limits.h> exists even on freestanding compilers.  */
15189
15190 #ifdef __STDC__
15191 # include <limits.h>
15192 #else
15193 # include <assert.h>
15194 #endif
15195
15196 #undef $ac_func
15197
15198 /* Override any gcc2 internal prototype to avoid an error.  */
15199 #ifdef __cplusplus
15200 extern "C"
15201 {
15202 #endif
15203 /* We use char because int might match the return type of a gcc2
15204    builtin and then its argument prototype would still apply.  */
15205 char $ac_func ();
15206 /* The GNU C library defines this for functions which it implements
15207     to always fail with ENOSYS.  Some functions are actually named
15208     something starting with __ and the normal name is an alias.  */
15209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15210 choke me
15211 #else
15212 char (*f) () = $ac_func;
15213 #endif
15214 #ifdef __cplusplus
15215 }
15216 #endif
15217
15218 int
15219 main ()
15220 {
15221 return f != $ac_func;
15222   ;
15223   return 0;
15224 }
15225 _ACEOF
15226 rm -f conftest.$ac_objext conftest$ac_exeext
15227 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15228   (eval $ac_link) 2>conftest.er1
15229   ac_status=$?
15230   grep -v '^ *+' conftest.er1 >conftest.err
15231   rm -f conftest.er1
15232   cat conftest.err >&5
15233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15234   (exit $ac_status); } &&
15235          { ac_try='test -z "$ac_c_werror_flag"
15236                          || test ! -s conftest.err'
15237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15238   (eval $ac_try) 2>&5
15239   ac_status=$?
15240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15241   (exit $ac_status); }; } &&
15242          { ac_try='test -s conftest$ac_exeext'
15243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15244   (eval $ac_try) 2>&5
15245   ac_status=$?
15246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15247   (exit $ac_status); }; }; then
15248   eval "$as_ac_var=yes"
15249 else
15250   echo "$as_me: failed program was:" >&5
15251 sed 's/^/| /' conftest.$ac_ext >&5
15252
15253 eval "$as_ac_var=no"
15254 fi
15255 rm -f conftest.err conftest.$ac_objext \
15256       conftest$ac_exeext conftest.$ac_ext
15257 fi
15258 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15259 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15260 if test `eval echo '${'$as_ac_var'}'` = yes; then
15261   cat >>confdefs.h <<_ACEOF
15262 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15263 _ACEOF
15264
15265 fi
15266 done
15267
15268 fi
15269
15270
15271 echo "$as_me:$LINENO: checking for finite" >&5
15272 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15273 cat >conftest.$ac_ext <<_ACEOF
15274 /* confdefs.h.  */
15275 _ACEOF
15276 cat confdefs.h >>conftest.$ac_ext
15277 cat >>conftest.$ac_ext <<_ACEOF
15278 /* end confdefs.h.  */
15279
15280 #include <math.h>
15281 double glob_double;
15282
15283 int
15284 main ()
15285 {
15286 return finite(glob_double) ? 0 : 1;
15287   ;
15288   return 0;
15289 }
15290 _ACEOF
15291 rm -f conftest.$ac_objext conftest$ac_exeext
15292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15293   (eval $ac_link) 2>conftest.er1
15294   ac_status=$?
15295   grep -v '^ *+' conftest.er1 >conftest.err
15296   rm -f conftest.er1
15297   cat conftest.err >&5
15298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15299   (exit $ac_status); } &&
15300          { ac_try='test -z "$ac_c_werror_flag"
15301                          || test ! -s conftest.err'
15302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15303   (eval $ac_try) 2>&5
15304   ac_status=$?
15305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15306   (exit $ac_status); }; } &&
15307          { ac_try='test -s conftest$ac_exeext'
15308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15309   (eval $ac_try) 2>&5
15310   ac_status=$?
15311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15312   (exit $ac_status); }; }; then
15313
15314 cat >>confdefs.h <<\_ACEOF
15315 #define HAVE_FINITE 1
15316 _ACEOF
15317
15318 echo "$as_me:$LINENO: result: yes" >&5
15319 echo "${ECHO_T}yes" >&6
15320 else
15321   echo "$as_me: failed program was:" >&5
15322 sed 's/^/| /' conftest.$ac_ext >&5
15323
15324 echo "$as_me:$LINENO: result: no" >&5
15325 echo "${ECHO_T}no" >&6
15326 fi
15327 rm -f conftest.err conftest.$ac_objext \
15328       conftest$ac_exeext conftest.$ac_ext
15329
15330 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15331 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15332 cat >conftest.$ac_ext <<_ACEOF
15333 /* confdefs.h.  */
15334 _ACEOF
15335 cat confdefs.h >>conftest.$ac_ext
15336 cat >>conftest.$ac_ext <<_ACEOF
15337 /* end confdefs.h.  */
15338 #include <setjmp.h>
15339 int
15340 main ()
15341 {
15342 sigjmp_buf x; sigsetjmp(x, 1);
15343   ;
15344   return 0;
15345 }
15346 _ACEOF
15347 rm -f conftest.$ac_objext conftest$ac_exeext
15348 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15349   (eval $ac_link) 2>conftest.er1
15350   ac_status=$?
15351   grep -v '^ *+' conftest.er1 >conftest.err
15352   rm -f conftest.er1
15353   cat conftest.err >&5
15354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15355   (exit $ac_status); } &&
15356          { ac_try='test -z "$ac_c_werror_flag"
15357                          || test ! -s conftest.err'
15358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15359   (eval $ac_try) 2>&5
15360   ac_status=$?
15361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15362   (exit $ac_status); }; } &&
15363          { ac_try='test -s conftest$ac_exeext'
15364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15365   (eval $ac_try) 2>&5
15366   ac_status=$?
15367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15368   (exit $ac_status); }; }; then
15369
15370 cat >>confdefs.h <<\_ACEOF
15371 #define HAVE_SIGSETJMP 1
15372 _ACEOF
15373
15374 echo "$as_me:$LINENO: result: yes" >&5
15375 echo "${ECHO_T}yes" >&6
15376 else
15377   echo "$as_me: failed program was:" >&5
15378 sed 's/^/| /' conftest.$ac_ext >&5
15379
15380 echo "$as_me:$LINENO: result: no" >&5
15381 echo "${ECHO_T}no" >&6
15382 fi
15383 rm -f conftest.err conftest.$ac_objext \
15384       conftest$ac_exeext conftest.$ac_ext
15385
15386 echo "$as_me:$LINENO: checking for syslog" >&5
15387 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15388 if test "${ac_cv_func_syslog+set}" = set; then
15389   echo $ECHO_N "(cached) $ECHO_C" >&6
15390 else
15391   cat >conftest.$ac_ext <<_ACEOF
15392 /* confdefs.h.  */
15393 _ACEOF
15394 cat confdefs.h >>conftest.$ac_ext
15395 cat >>conftest.$ac_ext <<_ACEOF
15396 /* end confdefs.h.  */
15397 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15398    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15399 #define syslog innocuous_syslog
15400
15401 /* System header to define __stub macros and hopefully few prototypes,
15402     which can conflict with char syslog (); below.
15403     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15404     <limits.h> exists even on freestanding compilers.  */
15405
15406 #ifdef __STDC__
15407 # include <limits.h>
15408 #else
15409 # include <assert.h>
15410 #endif
15411
15412 #undef syslog
15413
15414 /* Override any gcc2 internal prototype to avoid an error.  */
15415 #ifdef __cplusplus
15416 extern "C"
15417 {
15418 #endif
15419 /* We use char because int might match the return type of a gcc2
15420    builtin and then its argument prototype would still apply.  */
15421 char syslog ();
15422 /* The GNU C library defines this for functions which it implements
15423     to always fail with ENOSYS.  Some functions are actually named
15424     something starting with __ and the normal name is an alias.  */
15425 #if defined (__stub_syslog) || defined (__stub___syslog)
15426 choke me
15427 #else
15428 char (*f) () = syslog;
15429 #endif
15430 #ifdef __cplusplus
15431 }
15432 #endif
15433
15434 int
15435 main ()
15436 {
15437 return f != syslog;
15438   ;
15439   return 0;
15440 }
15441 _ACEOF
15442 rm -f conftest.$ac_objext conftest$ac_exeext
15443 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15444   (eval $ac_link) 2>conftest.er1
15445   ac_status=$?
15446   grep -v '^ *+' conftest.er1 >conftest.err
15447   rm -f conftest.er1
15448   cat conftest.err >&5
15449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15450   (exit $ac_status); } &&
15451          { ac_try='test -z "$ac_c_werror_flag"
15452                          || test ! -s conftest.err'
15453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15454   (eval $ac_try) 2>&5
15455   ac_status=$?
15456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15457   (exit $ac_status); }; } &&
15458          { ac_try='test -s conftest$ac_exeext'
15459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15460   (eval $ac_try) 2>&5
15461   ac_status=$?
15462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15463   (exit $ac_status); }; }; then
15464   ac_cv_func_syslog=yes
15465 else
15466   echo "$as_me: failed program was:" >&5
15467 sed 's/^/| /' conftest.$ac_ext >&5
15468
15469 ac_cv_func_syslog=no
15470 fi
15471 rm -f conftest.err conftest.$ac_objext \
15472       conftest$ac_exeext conftest.$ac_ext
15473 fi
15474 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15475 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15476 if test $ac_cv_func_syslog = yes; then
15477   if test "${ac_cv_header_syslog_h+set}" = set; then
15478   echo "$as_me:$LINENO: checking for syslog.h" >&5
15479 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15480 if test "${ac_cv_header_syslog_h+set}" = set; then
15481   echo $ECHO_N "(cached) $ECHO_C" >&6
15482 fi
15483 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15484 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15485 else
15486   # Is the header compilable?
15487 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15488 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15489 cat >conftest.$ac_ext <<_ACEOF
15490 /* confdefs.h.  */
15491 _ACEOF
15492 cat confdefs.h >>conftest.$ac_ext
15493 cat >>conftest.$ac_ext <<_ACEOF
15494 /* end confdefs.h.  */
15495 $ac_includes_default
15496 #include <syslog.h>
15497 _ACEOF
15498 rm -f conftest.$ac_objext
15499 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15500   (eval $ac_compile) 2>conftest.er1
15501   ac_status=$?
15502   grep -v '^ *+' conftest.er1 >conftest.err
15503   rm -f conftest.er1
15504   cat conftest.err >&5
15505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15506   (exit $ac_status); } &&
15507          { ac_try='test -z "$ac_c_werror_flag"
15508                          || test ! -s conftest.err'
15509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15510   (eval $ac_try) 2>&5
15511   ac_status=$?
15512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513   (exit $ac_status); }; } &&
15514          { ac_try='test -s conftest.$ac_objext'
15515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516   (eval $ac_try) 2>&5
15517   ac_status=$?
15518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519   (exit $ac_status); }; }; then
15520   ac_header_compiler=yes
15521 else
15522   echo "$as_me: failed program was:" >&5
15523 sed 's/^/| /' conftest.$ac_ext >&5
15524
15525 ac_header_compiler=no
15526 fi
15527 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15528 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15529 echo "${ECHO_T}$ac_header_compiler" >&6
15530
15531 # Is the header present?
15532 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15533 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15534 cat >conftest.$ac_ext <<_ACEOF
15535 /* confdefs.h.  */
15536 _ACEOF
15537 cat confdefs.h >>conftest.$ac_ext
15538 cat >>conftest.$ac_ext <<_ACEOF
15539 /* end confdefs.h.  */
15540 #include <syslog.h>
15541 _ACEOF
15542 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15543   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15544   ac_status=$?
15545   grep -v '^ *+' conftest.er1 >conftest.err
15546   rm -f conftest.er1
15547   cat conftest.err >&5
15548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549   (exit $ac_status); } >/dev/null; then
15550   if test -s conftest.err; then
15551     ac_cpp_err=$ac_c_preproc_warn_flag
15552     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15553   else
15554     ac_cpp_err=
15555   fi
15556 else
15557   ac_cpp_err=yes
15558 fi
15559 if test -z "$ac_cpp_err"; then
15560   ac_header_preproc=yes
15561 else
15562   echo "$as_me: failed program was:" >&5
15563 sed 's/^/| /' conftest.$ac_ext >&5
15564
15565   ac_header_preproc=no
15566 fi
15567 rm -f conftest.err conftest.$ac_ext
15568 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15569 echo "${ECHO_T}$ac_header_preproc" >&6
15570
15571 # So?  What about this header?
15572 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15573   yes:no: )
15574     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15575 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15576     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15577 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15578     ac_header_preproc=yes
15579     ;;
15580   no:yes:* )
15581     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15582 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15583     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15584 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15585     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15586 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15587     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15588 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15589     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15590 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15591     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15592 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15593     (
15594       cat <<\_ASBOX
15595 ## ---------------------------------------- ##
15596 ## Report this to pgsql-bugs@postgresql.org ##
15597 ## ---------------------------------------- ##
15598 _ASBOX
15599     ) |
15600       sed "s/^/$as_me: WARNING:     /" >&2
15601     ;;
15602 esac
15603 echo "$as_me:$LINENO: checking for syslog.h" >&5
15604 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15605 if test "${ac_cv_header_syslog_h+set}" = set; then
15606   echo $ECHO_N "(cached) $ECHO_C" >&6
15607 else
15608   ac_cv_header_syslog_h=$ac_header_preproc
15609 fi
15610 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15611 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15612
15613 fi
15614 if test $ac_cv_header_syslog_h = yes; then
15615
15616 cat >>confdefs.h <<\_ACEOF
15617 #define HAVE_SYSLOG 1
15618 _ACEOF
15619
15620 fi
15621
15622
15623 fi
15624
15625
15626 echo "$as_me:$LINENO: checking for optreset" >&5
15627 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15628 if test "${pgac_cv_var_int_optreset+set}" = set; then
15629   echo $ECHO_N "(cached) $ECHO_C" >&6
15630 else
15631   cat >conftest.$ac_ext <<_ACEOF
15632 /* confdefs.h.  */
15633 _ACEOF
15634 cat confdefs.h >>conftest.$ac_ext
15635 cat >>conftest.$ac_ext <<_ACEOF
15636 /* end confdefs.h.  */
15637 #include <unistd.h>
15638 int
15639 main ()
15640 {
15641 extern int optreset; optreset = 1;
15642   ;
15643   return 0;
15644 }
15645 _ACEOF
15646 rm -f conftest.$ac_objext conftest$ac_exeext
15647 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15648   (eval $ac_link) 2>conftest.er1
15649   ac_status=$?
15650   grep -v '^ *+' conftest.er1 >conftest.err
15651   rm -f conftest.er1
15652   cat conftest.err >&5
15653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15654   (exit $ac_status); } &&
15655          { ac_try='test -z "$ac_c_werror_flag"
15656                          || test ! -s conftest.err'
15657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15658   (eval $ac_try) 2>&5
15659   ac_status=$?
15660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15661   (exit $ac_status); }; } &&
15662          { ac_try='test -s conftest$ac_exeext'
15663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15664   (eval $ac_try) 2>&5
15665   ac_status=$?
15666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15667   (exit $ac_status); }; }; then
15668   pgac_cv_var_int_optreset=yes
15669 else
15670   echo "$as_me: failed program was:" >&5
15671 sed 's/^/| /' conftest.$ac_ext >&5
15672
15673 pgac_cv_var_int_optreset=no
15674 fi
15675 rm -f conftest.err conftest.$ac_objext \
15676       conftest$ac_exeext conftest.$ac_ext
15677 fi
15678 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15679 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15680 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15681
15682 cat >>confdefs.h <<\_ACEOF
15683 #define HAVE_INT_OPTRESET 1
15684 _ACEOF
15685
15686 fi
15687
15688
15689
15690 for ac_func in strtoll strtoq
15691 do
15692 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15693 echo "$as_me:$LINENO: checking for $ac_func" >&5
15694 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15695 if eval "test \"\${$as_ac_var+set}\" = set"; then
15696   echo $ECHO_N "(cached) $ECHO_C" >&6
15697 else
15698   cat >conftest.$ac_ext <<_ACEOF
15699 /* confdefs.h.  */
15700 _ACEOF
15701 cat confdefs.h >>conftest.$ac_ext
15702 cat >>conftest.$ac_ext <<_ACEOF
15703 /* end confdefs.h.  */
15704 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15705    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15706 #define $ac_func innocuous_$ac_func
15707
15708 /* System header to define __stub macros and hopefully few prototypes,
15709     which can conflict with char $ac_func (); below.
15710     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15711     <limits.h> exists even on freestanding compilers.  */
15712
15713 #ifdef __STDC__
15714 # include <limits.h>
15715 #else
15716 # include <assert.h>
15717 #endif
15718
15719 #undef $ac_func
15720
15721 /* Override any gcc2 internal prototype to avoid an error.  */
15722 #ifdef __cplusplus
15723 extern "C"
15724 {
15725 #endif
15726 /* We use char because int might match the return type of a gcc2
15727    builtin and then its argument prototype would still apply.  */
15728 char $ac_func ();
15729 /* The GNU C library defines this for functions which it implements
15730     to always fail with ENOSYS.  Some functions are actually named
15731     something starting with __ and the normal name is an alias.  */
15732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15733 choke me
15734 #else
15735 char (*f) () = $ac_func;
15736 #endif
15737 #ifdef __cplusplus
15738 }
15739 #endif
15740
15741 int
15742 main ()
15743 {
15744 return f != $ac_func;
15745   ;
15746   return 0;
15747 }
15748 _ACEOF
15749 rm -f conftest.$ac_objext conftest$ac_exeext
15750 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15751   (eval $ac_link) 2>conftest.er1
15752   ac_status=$?
15753   grep -v '^ *+' conftest.er1 >conftest.err
15754   rm -f conftest.er1
15755   cat conftest.err >&5
15756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15757   (exit $ac_status); } &&
15758          { ac_try='test -z "$ac_c_werror_flag"
15759                          || test ! -s conftest.err'
15760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15761   (eval $ac_try) 2>&5
15762   ac_status=$?
15763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764   (exit $ac_status); }; } &&
15765          { ac_try='test -s conftest$ac_exeext'
15766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15767   (eval $ac_try) 2>&5
15768   ac_status=$?
15769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15770   (exit $ac_status); }; }; then
15771   eval "$as_ac_var=yes"
15772 else
15773   echo "$as_me: failed program was:" >&5
15774 sed 's/^/| /' conftest.$ac_ext >&5
15775
15776 eval "$as_ac_var=no"
15777 fi
15778 rm -f conftest.err conftest.$ac_objext \
15779       conftest$ac_exeext conftest.$ac_ext
15780 fi
15781 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15782 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15783 if test `eval echo '${'$as_ac_var'}'` = yes; then
15784   cat >>confdefs.h <<_ACEOF
15785 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15786 _ACEOF
15787  break
15788 fi
15789 done
15790
15791
15792
15793 for ac_func in strtoull strtouq
15794 do
15795 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15796 echo "$as_me:$LINENO: checking for $ac_func" >&5
15797 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15798 if eval "test \"\${$as_ac_var+set}\" = set"; then
15799   echo $ECHO_N "(cached) $ECHO_C" >&6
15800 else
15801   cat >conftest.$ac_ext <<_ACEOF
15802 /* confdefs.h.  */
15803 _ACEOF
15804 cat confdefs.h >>conftest.$ac_ext
15805 cat >>conftest.$ac_ext <<_ACEOF
15806 /* end confdefs.h.  */
15807 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15808    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15809 #define $ac_func innocuous_$ac_func
15810
15811 /* System header to define __stub macros and hopefully few prototypes,
15812     which can conflict with char $ac_func (); below.
15813     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15814     <limits.h> exists even on freestanding compilers.  */
15815
15816 #ifdef __STDC__
15817 # include <limits.h>
15818 #else
15819 # include <assert.h>
15820 #endif
15821
15822 #undef $ac_func
15823
15824 /* Override any gcc2 internal prototype to avoid an error.  */
15825 #ifdef __cplusplus
15826 extern "C"
15827 {
15828 #endif
15829 /* We use char because int might match the return type of a gcc2
15830    builtin and then its argument prototype would still apply.  */
15831 char $ac_func ();
15832 /* The GNU C library defines this for functions which it implements
15833     to always fail with ENOSYS.  Some functions are actually named
15834     something starting with __ and the normal name is an alias.  */
15835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15836 choke me
15837 #else
15838 char (*f) () = $ac_func;
15839 #endif
15840 #ifdef __cplusplus
15841 }
15842 #endif
15843
15844 int
15845 main ()
15846 {
15847 return f != $ac_func;
15848   ;
15849   return 0;
15850 }
15851 _ACEOF
15852 rm -f conftest.$ac_objext conftest$ac_exeext
15853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15854   (eval $ac_link) 2>conftest.er1
15855   ac_status=$?
15856   grep -v '^ *+' conftest.er1 >conftest.err
15857   rm -f conftest.er1
15858   cat conftest.err >&5
15859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15860   (exit $ac_status); } &&
15861          { ac_try='test -z "$ac_c_werror_flag"
15862                          || test ! -s conftest.err'
15863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15864   (eval $ac_try) 2>&5
15865   ac_status=$?
15866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15867   (exit $ac_status); }; } &&
15868          { ac_try='test -s conftest$ac_exeext'
15869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15870   (eval $ac_try) 2>&5
15871   ac_status=$?
15872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15873   (exit $ac_status); }; }; then
15874   eval "$as_ac_var=yes"
15875 else
15876   echo "$as_me: failed program was:" >&5
15877 sed 's/^/| /' conftest.$ac_ext >&5
15878
15879 eval "$as_ac_var=no"
15880 fi
15881 rm -f conftest.err conftest.$ac_objext \
15882       conftest$ac_exeext conftest.$ac_ext
15883 fi
15884 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15885 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15886 if test `eval echo '${'$as_ac_var'}'` = yes; then
15887   cat >>confdefs.h <<_ACEOF
15888 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15889 _ACEOF
15890  break
15891 fi
15892 done
15893
15894
15895 # Check for one of atexit() or on_exit()
15896
15897 for ac_func in atexit
15898 do
15899 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15900 echo "$as_me:$LINENO: checking for $ac_func" >&5
15901 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15902 if eval "test \"\${$as_ac_var+set}\" = set"; then
15903   echo $ECHO_N "(cached) $ECHO_C" >&6
15904 else
15905   cat >conftest.$ac_ext <<_ACEOF
15906 /* confdefs.h.  */
15907 _ACEOF
15908 cat confdefs.h >>conftest.$ac_ext
15909 cat >>conftest.$ac_ext <<_ACEOF
15910 /* end confdefs.h.  */
15911 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15912    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15913 #define $ac_func innocuous_$ac_func
15914
15915 /* System header to define __stub macros and hopefully few prototypes,
15916     which can conflict with char $ac_func (); below.
15917     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15918     <limits.h> exists even on freestanding compilers.  */
15919
15920 #ifdef __STDC__
15921 # include <limits.h>
15922 #else
15923 # include <assert.h>
15924 #endif
15925
15926 #undef $ac_func
15927
15928 /* Override any gcc2 internal prototype to avoid an error.  */
15929 #ifdef __cplusplus
15930 extern "C"
15931 {
15932 #endif
15933 /* We use char because int might match the return type of a gcc2
15934    builtin and then its argument prototype would still apply.  */
15935 char $ac_func ();
15936 /* The GNU C library defines this for functions which it implements
15937     to always fail with ENOSYS.  Some functions are actually named
15938     something starting with __ and the normal name is an alias.  */
15939 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15940 choke me
15941 #else
15942 char (*f) () = $ac_func;
15943 #endif
15944 #ifdef __cplusplus
15945 }
15946 #endif
15947
15948 int
15949 main ()
15950 {
15951 return f != $ac_func;
15952   ;
15953   return 0;
15954 }
15955 _ACEOF
15956 rm -f conftest.$ac_objext conftest$ac_exeext
15957 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15958   (eval $ac_link) 2>conftest.er1
15959   ac_status=$?
15960   grep -v '^ *+' conftest.er1 >conftest.err
15961   rm -f conftest.er1
15962   cat conftest.err >&5
15963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964   (exit $ac_status); } &&
15965          { ac_try='test -z "$ac_c_werror_flag"
15966                          || test ! -s conftest.err'
15967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15968   (eval $ac_try) 2>&5
15969   ac_status=$?
15970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15971   (exit $ac_status); }; } &&
15972          { ac_try='test -s conftest$ac_exeext'
15973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15974   (eval $ac_try) 2>&5
15975   ac_status=$?
15976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15977   (exit $ac_status); }; }; then
15978   eval "$as_ac_var=yes"
15979 else
15980   echo "$as_me: failed program was:" >&5
15981 sed 's/^/| /' conftest.$ac_ext >&5
15982
15983 eval "$as_ac_var=no"
15984 fi
15985 rm -f conftest.err conftest.$ac_objext \
15986       conftest$ac_exeext conftest.$ac_ext
15987 fi
15988 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15989 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15990 if test `eval echo '${'$as_ac_var'}'` = yes; then
15991   cat >>confdefs.h <<_ACEOF
15992 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15993 _ACEOF
15994
15995 else
15996
15997 for ac_func in on_exit
15998 do
15999 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16000 echo "$as_me:$LINENO: checking for $ac_func" >&5
16001 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16002 if eval "test \"\${$as_ac_var+set}\" = set"; then
16003   echo $ECHO_N "(cached) $ECHO_C" >&6
16004 else
16005   cat >conftest.$ac_ext <<_ACEOF
16006 /* confdefs.h.  */
16007 _ACEOF
16008 cat confdefs.h >>conftest.$ac_ext
16009 cat >>conftest.$ac_ext <<_ACEOF
16010 /* end confdefs.h.  */
16011 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16012    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16013 #define $ac_func innocuous_$ac_func
16014
16015 /* System header to define __stub macros and hopefully few prototypes,
16016     which can conflict with char $ac_func (); below.
16017     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16018     <limits.h> exists even on freestanding compilers.  */
16019
16020 #ifdef __STDC__
16021 # include <limits.h>
16022 #else
16023 # include <assert.h>
16024 #endif
16025
16026 #undef $ac_func
16027
16028 /* Override any gcc2 internal prototype to avoid an error.  */
16029 #ifdef __cplusplus
16030 extern "C"
16031 {
16032 #endif
16033 /* We use char because int might match the return type of a gcc2
16034    builtin and then its argument prototype would still apply.  */
16035 char $ac_func ();
16036 /* The GNU C library defines this for functions which it implements
16037     to always fail with ENOSYS.  Some functions are actually named
16038     something starting with __ and the normal name is an alias.  */
16039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16040 choke me
16041 #else
16042 char (*f) () = $ac_func;
16043 #endif
16044 #ifdef __cplusplus
16045 }
16046 #endif
16047
16048 int
16049 main ()
16050 {
16051 return f != $ac_func;
16052   ;
16053   return 0;
16054 }
16055 _ACEOF
16056 rm -f conftest.$ac_objext conftest$ac_exeext
16057 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16058   (eval $ac_link) 2>conftest.er1
16059   ac_status=$?
16060   grep -v '^ *+' conftest.er1 >conftest.err
16061   rm -f conftest.er1
16062   cat conftest.err >&5
16063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16064   (exit $ac_status); } &&
16065          { ac_try='test -z "$ac_c_werror_flag"
16066                          || test ! -s conftest.err'
16067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16068   (eval $ac_try) 2>&5
16069   ac_status=$?
16070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16071   (exit $ac_status); }; } &&
16072          { ac_try='test -s conftest$ac_exeext'
16073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16074   (eval $ac_try) 2>&5
16075   ac_status=$?
16076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16077   (exit $ac_status); }; }; then
16078   eval "$as_ac_var=yes"
16079 else
16080   echo "$as_me: failed program was:" >&5
16081 sed 's/^/| /' conftest.$ac_ext >&5
16082
16083 eval "$as_ac_var=no"
16084 fi
16085 rm -f conftest.err conftest.$ac_objext \
16086       conftest$ac_exeext conftest.$ac_ext
16087 fi
16088 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16089 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16090 if test `eval echo '${'$as_ac_var'}'` = yes; then
16091   cat >>confdefs.h <<_ACEOF
16092 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16093 _ACEOF
16094
16095 else
16096   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16097 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16098    { (exit 1); exit 1; }; }
16099 fi
16100 done
16101
16102 fi
16103 done
16104
16105
16106 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16107 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16108 if test "${ac_cv_sys_largefile_source+set}" = set; then
16109   echo $ECHO_N "(cached) $ECHO_C" >&6
16110 else
16111   while :; do
16112   ac_cv_sys_largefile_source=no
16113   cat >conftest.$ac_ext <<_ACEOF
16114 /* confdefs.h.  */
16115 _ACEOF
16116 cat confdefs.h >>conftest.$ac_ext
16117 cat >>conftest.$ac_ext <<_ACEOF
16118 /* end confdefs.h.  */
16119 #include <stdio.h>
16120 int
16121 main ()
16122 {
16123 return !fseeko;
16124   ;
16125   return 0;
16126 }
16127 _ACEOF
16128 rm -f conftest.$ac_objext
16129 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16130   (eval $ac_compile) 2>conftest.er1
16131   ac_status=$?
16132   grep -v '^ *+' conftest.er1 >conftest.err
16133   rm -f conftest.er1
16134   cat conftest.err >&5
16135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136   (exit $ac_status); } &&
16137          { ac_try='test -z "$ac_c_werror_flag"
16138                          || test ! -s conftest.err'
16139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16140   (eval $ac_try) 2>&5
16141   ac_status=$?
16142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16143   (exit $ac_status); }; } &&
16144          { ac_try='test -s conftest.$ac_objext'
16145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16146   (eval $ac_try) 2>&5
16147   ac_status=$?
16148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16149   (exit $ac_status); }; }; then
16150   break
16151 else
16152   echo "$as_me: failed program was:" >&5
16153 sed 's/^/| /' conftest.$ac_ext >&5
16154
16155 fi
16156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16157   cat >conftest.$ac_ext <<_ACEOF
16158 /* confdefs.h.  */
16159 _ACEOF
16160 cat confdefs.h >>conftest.$ac_ext
16161 cat >>conftest.$ac_ext <<_ACEOF
16162 /* end confdefs.h.  */
16163 #define _LARGEFILE_SOURCE 1
16164 #include <stdio.h>
16165 int
16166 main ()
16167 {
16168 return !fseeko;
16169   ;
16170   return 0;
16171 }
16172 _ACEOF
16173 rm -f conftest.$ac_objext
16174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16175   (eval $ac_compile) 2>conftest.er1
16176   ac_status=$?
16177   grep -v '^ *+' conftest.er1 >conftest.err
16178   rm -f conftest.er1
16179   cat conftest.err >&5
16180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16181   (exit $ac_status); } &&
16182          { ac_try='test -z "$ac_c_werror_flag"
16183                          || test ! -s conftest.err'
16184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16185   (eval $ac_try) 2>&5
16186   ac_status=$?
16187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16188   (exit $ac_status); }; } &&
16189          { ac_try='test -s conftest.$ac_objext'
16190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16191   (eval $ac_try) 2>&5
16192   ac_status=$?
16193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16194   (exit $ac_status); }; }; then
16195   ac_cv_sys_largefile_source=1; break
16196 else
16197   echo "$as_me: failed program was:" >&5
16198 sed 's/^/| /' conftest.$ac_ext >&5
16199
16200 fi
16201 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16202   break
16203 done
16204 fi
16205 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16206 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16207 if test "$ac_cv_sys_largefile_source" != no; then
16208
16209 cat >>confdefs.h <<_ACEOF
16210 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16211 _ACEOF
16212
16213 fi
16214 rm -f conftest*
16215
16216 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16217 # in glibc 2.1.3, but that breaks too many other things.
16218 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16219 echo "$as_me:$LINENO: checking for fseeko" >&5
16220 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16221 if test "${ac_cv_func_fseeko+set}" = set; then
16222   echo $ECHO_N "(cached) $ECHO_C" >&6
16223 else
16224   cat >conftest.$ac_ext <<_ACEOF
16225 /* confdefs.h.  */
16226 _ACEOF
16227 cat confdefs.h >>conftest.$ac_ext
16228 cat >>conftest.$ac_ext <<_ACEOF
16229 /* end confdefs.h.  */
16230 #include <stdio.h>
16231 int
16232 main ()
16233 {
16234 return fseeko && fseeko (stdin, 0, 0);
16235   ;
16236   return 0;
16237 }
16238 _ACEOF
16239 rm -f conftest.$ac_objext conftest$ac_exeext
16240 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16241   (eval $ac_link) 2>conftest.er1
16242   ac_status=$?
16243   grep -v '^ *+' conftest.er1 >conftest.err
16244   rm -f conftest.er1
16245   cat conftest.err >&5
16246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16247   (exit $ac_status); } &&
16248          { ac_try='test -z "$ac_c_werror_flag"
16249                          || test ! -s conftest.err'
16250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16251   (eval $ac_try) 2>&5
16252   ac_status=$?
16253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16254   (exit $ac_status); }; } &&
16255          { ac_try='test -s conftest$ac_exeext'
16256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16257   (eval $ac_try) 2>&5
16258   ac_status=$?
16259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16260   (exit $ac_status); }; }; then
16261   ac_cv_func_fseeko=yes
16262 else
16263   echo "$as_me: failed program was:" >&5
16264 sed 's/^/| /' conftest.$ac_ext >&5
16265
16266 ac_cv_func_fseeko=no
16267 fi
16268 rm -f conftest.err conftest.$ac_objext \
16269       conftest$ac_exeext conftest.$ac_ext
16270 fi
16271 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16272 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16273 if test $ac_cv_func_fseeko = yes; then
16274
16275 cat >>confdefs.h <<\_ACEOF
16276 #define HAVE_FSEEKO 1
16277 _ACEOF
16278
16279 fi
16280
16281
16282 #
16283 # Pthreads
16284 #
16285 # For each platform, we need to know about any special compile and link
16286 # libraries, and whether the normal C function names are thread-safe.
16287 # See the comment at the top of src/port/thread.c for more information.
16288 #
16289 if test "$enable_thread_safety" = yes; then
16290
16291
16292
16293
16294 ac_ext=c
16295 ac_cpp='$CPP $CPPFLAGS'
16296 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16297 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16298 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16299
16300 acx_pthread_ok=no
16301
16302 # We used to check for pthread.h first, but this fails if pthread.h
16303 # requires special compiler flags (e.g. on True64 or Sequent).
16304 # It gets checked for in the link test anyway.
16305
16306 # First of all, check if the user has set any of the PTHREAD_LIBS,
16307 # etcetera environment variables, and if threads linking works using
16308 # them:
16309 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16310         save_CFLAGS="$CFLAGS"
16311         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16312         save_LIBS="$LIBS"
16313         LIBS="$PTHREAD_LIBS $LIBS"
16314         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16315 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16316         cat >conftest.$ac_ext <<_ACEOF
16317 /* confdefs.h.  */
16318 _ACEOF
16319 cat confdefs.h >>conftest.$ac_ext
16320 cat >>conftest.$ac_ext <<_ACEOF
16321 /* end confdefs.h.  */
16322
16323 /* Override any gcc2 internal prototype to avoid an error.  */
16324 #ifdef __cplusplus
16325 extern "C"
16326 #endif
16327 /* We use char because int might match the return type of a gcc2
16328    builtin and then its argument prototype would still apply.  */
16329 char pthread_join ();
16330 int
16331 main ()
16332 {
16333 pthread_join ();
16334   ;
16335   return 0;
16336 }
16337 _ACEOF
16338 rm -f conftest.$ac_objext conftest$ac_exeext
16339 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16340   (eval $ac_link) 2>conftest.er1
16341   ac_status=$?
16342   grep -v '^ *+' conftest.er1 >conftest.err
16343   rm -f conftest.er1
16344   cat conftest.err >&5
16345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16346   (exit $ac_status); } &&
16347          { ac_try='test -z "$ac_c_werror_flag"
16348                          || test ! -s conftest.err'
16349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16350   (eval $ac_try) 2>&5
16351   ac_status=$?
16352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16353   (exit $ac_status); }; } &&
16354          { ac_try='test -s conftest$ac_exeext'
16355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16356   (eval $ac_try) 2>&5
16357   ac_status=$?
16358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16359   (exit $ac_status); }; }; then
16360   acx_pthread_ok=yes
16361 else
16362   echo "$as_me: failed program was:" >&5
16363 sed 's/^/| /' conftest.$ac_ext >&5
16364
16365 fi
16366 rm -f conftest.err conftest.$ac_objext \
16367       conftest$ac_exeext conftest.$ac_ext
16368         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16369 echo "${ECHO_T}$acx_pthread_ok" >&6
16370         if test x"$acx_pthread_ok" = xno; then
16371                 PTHREAD_LIBS=""
16372                 PTHREAD_CFLAGS=""
16373         fi
16374         LIBS="$save_LIBS"
16375         CFLAGS="$save_CFLAGS"
16376 fi
16377
16378 # We must check for the threads library under a number of different
16379 # names; the ordering is very important because some systems
16380 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16381 # libraries is broken (non-POSIX).
16382
16383 # Create a list of thread flags to try.  Items starting with a "-" are
16384 # C compiler flags, and other items are library names, except for "none"
16385 # which indicates that we try without any flags at all, and "pthread-config"
16386 # which is a program returning the flags for the Pth emulation library.
16387
16388 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16389
16390 # The ordering *is* (sometimes) important.  Some notes on the
16391 # individual items follow:
16392
16393 # pthreads: AIX (must check this before -lpthread)
16394 # none: in case threads are in libc; should be tried before -Kthread and
16395 #       other compiler flags to prevent continual compiler warnings
16396 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16397 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16398 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16399 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16400 # -pthreads: Solaris/gcc
16401 # -mthreads: Mingw32/gcc, Lynx/gcc
16402 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16403 #      doesn't hurt to check since this sometimes defines pthreads too;
16404 #      also defines -D_REENTRANT)
16405 # pthread: Linux, etcetera
16406 # --thread-safe: KAI C++
16407 # pthread-config: use pthread-config program (for GNU Pth library)
16408
16409 case "${host_cpu}-${host_os}" in
16410         *solaris*)
16411
16412         # On Solaris (at least, for some versions), libc contains stubbed
16413         # (non-functional) versions of the pthreads routines, so link-based
16414         # tests will erroneously succeed.  (We need to link with -pthread or
16415         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16416         # a function called by this macro, so we could check for that, but
16417         # who knows whether they'll stub that too in a future libc.)  So,
16418         # we'll just look for -pthreads and -lpthread first:
16419
16420         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16421         ;;
16422 esac
16423
16424 if test x"$acx_pthread_ok" = xno; then
16425 for flag in $acx_pthread_flags; do
16426
16427         tryPTHREAD_CFLAGS=""
16428         tryPTHREAD_LIBS=""
16429         case $flag in
16430                 none)
16431                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16432 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16433                 ;;
16434
16435                 -*)
16436                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16437 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16438                 tryPTHREAD_CFLAGS="$flag"
16439                 ;;
16440
16441                 pthread-config)
16442                 # skip this if we already have flags defined, for PostgreSQL
16443                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16444                 # Extract the first word of "pthread-config", so it can be a program name with args.
16445 set dummy pthread-config; ac_word=$2
16446 echo "$as_me:$LINENO: checking for $ac_word" >&5
16447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16448 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16449   echo $ECHO_N "(cached) $ECHO_C" >&6
16450 else
16451   if test -n "$acx_pthread_config"; then
16452   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16453 else
16454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16455 for as_dir in $PATH
16456 do
16457   IFS=$as_save_IFS
16458   test -z "$as_dir" && as_dir=.
16459   for ac_exec_ext in '' $ac_executable_extensions; do
16460   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16461     ac_cv_prog_acx_pthread_config="yes"
16462     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16463     break 2
16464   fi
16465 done
16466 done
16467
16468   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16469 fi
16470 fi
16471 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16472 if test -n "$acx_pthread_config"; then
16473   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16474 echo "${ECHO_T}$acx_pthread_config" >&6
16475 else
16476   echo "$as_me:$LINENO: result: no" >&5
16477 echo "${ECHO_T}no" >&6
16478 fi
16479
16480                 if test x"$acx_pthread_config" = xno; then continue; fi
16481                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16482                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16483                 ;;
16484
16485                 *)
16486                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16487 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16488                 tryPTHREAD_LIBS="-l$flag"
16489                 ;;
16490         esac
16491
16492         save_LIBS="$LIBS"
16493         save_CFLAGS="$CFLAGS"
16494         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16495         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16496
16497         # Check for various functions.  We must include pthread.h,
16498         # since some functions may be macros.  (On the Sequent, we
16499         # need a special flag -Kthread to make this header compile.)
16500         # We check for pthread_join because it is in -lpthread on IRIX
16501         # while pthread_create is in libc.  We check for pthread_attr_init
16502         # due to DEC craziness with -lpthreads.  We check for
16503         # pthread_cleanup_push because it is one of the few pthread
16504         # functions on Solaris that doesn't have a non-functional libc stub.
16505         # We try pthread_create on general principles.
16506         cat >conftest.$ac_ext <<_ACEOF
16507 /* confdefs.h.  */
16508 _ACEOF
16509 cat confdefs.h >>conftest.$ac_ext
16510 cat >>conftest.$ac_ext <<_ACEOF
16511 /* end confdefs.h.  */
16512 #include <pthread.h>
16513 int
16514 main ()
16515 {
16516 pthread_t th; pthread_join(th, 0);
16517                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16518                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16519   ;
16520   return 0;
16521 }
16522 _ACEOF
16523 rm -f conftest.$ac_objext conftest$ac_exeext
16524 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16525   (eval $ac_link) 2>conftest.er1
16526   ac_status=$?
16527   grep -v '^ *+' conftest.er1 >conftest.err
16528   rm -f conftest.er1
16529   cat conftest.err >&5
16530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16531   (exit $ac_status); } &&
16532          { ac_try='test -z "$ac_c_werror_flag"
16533                          || test ! -s conftest.err'
16534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16535   (eval $ac_try) 2>&5
16536   ac_status=$?
16537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16538   (exit $ac_status); }; } &&
16539          { ac_try='test -s conftest$ac_exeext'
16540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16541   (eval $ac_try) 2>&5
16542   ac_status=$?
16543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16544   (exit $ac_status); }; }; then
16545   acx_pthread_ok=yes
16546 else
16547   echo "$as_me: failed program was:" >&5
16548 sed 's/^/| /' conftest.$ac_ext >&5
16549
16550 acx_pthread_ok=no
16551 fi
16552 rm -f conftest.err conftest.$ac_objext \
16553       conftest$ac_exeext conftest.$ac_ext
16554
16555         if test "x$acx_pthread_ok" = xyes; then
16556             # Don't use options that are ignored by the compiler.
16557             # We find them by checking stderror.
16558             cat >conftest.$ac_ext <<_ACEOF
16559 int
16560 main (int argc, char **argv)
16561 {
16562   (void) argc;
16563   (void) argv;
16564   return 0;
16565 }
16566 _ACEOF
16567             rm -f conftest.$ac_objext conftest$ac_exeext
16568             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16569                 # we continue with more flags because Linux needs -lpthread
16570                 # for libpq builds on PostgreSQL.  The test above only
16571                 # tests for building binaries, not shared libraries.
16572                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16573                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16574             else   acx_pthread_ok=no
16575             fi
16576         fi
16577
16578         LIBS="$save_LIBS"
16579         CFLAGS="$save_CFLAGS"
16580
16581         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16582 echo "${ECHO_T}$acx_pthread_ok" >&6
16583 done
16584 fi
16585
16586 # Various other checks:
16587 if test "x$acx_pthread_ok" = xyes; then
16588         save_LIBS="$LIBS"
16589         LIBS="$PTHREAD_LIBS $LIBS"
16590         save_CFLAGS="$CFLAGS"
16591         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16592
16593         # Detect AIX lossage: threads are created detached by default
16594         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16595         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16596 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16597         cat >conftest.$ac_ext <<_ACEOF
16598 /* confdefs.h.  */
16599 _ACEOF
16600 cat confdefs.h >>conftest.$ac_ext
16601 cat >>conftest.$ac_ext <<_ACEOF
16602 /* end confdefs.h.  */
16603 #include <pthread.h>
16604 int
16605 main ()
16606 {
16607 int attr=PTHREAD_CREATE_JOINABLE;
16608   ;
16609   return 0;
16610 }
16611 _ACEOF
16612 rm -f conftest.$ac_objext conftest$ac_exeext
16613 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16614   (eval $ac_link) 2>conftest.er1
16615   ac_status=$?
16616   grep -v '^ *+' conftest.er1 >conftest.err
16617   rm -f conftest.er1
16618   cat conftest.err >&5
16619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16620   (exit $ac_status); } &&
16621          { ac_try='test -z "$ac_c_werror_flag"
16622                          || test ! -s conftest.err'
16623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16624   (eval $ac_try) 2>&5
16625   ac_status=$?
16626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16627   (exit $ac_status); }; } &&
16628          { ac_try='test -s conftest$ac_exeext'
16629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16630   (eval $ac_try) 2>&5
16631   ac_status=$?
16632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16633   (exit $ac_status); }; }; then
16634   ok=PTHREAD_CREATE_JOINABLE
16635 else
16636   echo "$as_me: failed program was:" >&5
16637 sed 's/^/| /' conftest.$ac_ext >&5
16638
16639 ok=unknown
16640 fi
16641 rm -f conftest.err conftest.$ac_objext \
16642       conftest$ac_exeext conftest.$ac_ext
16643         if test x"$ok" = xunknown; then
16644                 cat >conftest.$ac_ext <<_ACEOF
16645 /* confdefs.h.  */
16646 _ACEOF
16647 cat confdefs.h >>conftest.$ac_ext
16648 cat >>conftest.$ac_ext <<_ACEOF
16649 /* end confdefs.h.  */
16650 #include <pthread.h>
16651 int
16652 main ()
16653 {
16654 int attr=PTHREAD_CREATE_UNDETACHED;
16655   ;
16656   return 0;
16657 }
16658 _ACEOF
16659 rm -f conftest.$ac_objext conftest$ac_exeext
16660 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16661   (eval $ac_link) 2>conftest.er1
16662   ac_status=$?
16663   grep -v '^ *+' conftest.er1 >conftest.err
16664   rm -f conftest.er1
16665   cat conftest.err >&5
16666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16667   (exit $ac_status); } &&
16668          { ac_try='test -z "$ac_c_werror_flag"
16669                          || test ! -s conftest.err'
16670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16671   (eval $ac_try) 2>&5
16672   ac_status=$?
16673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16674   (exit $ac_status); }; } &&
16675          { ac_try='test -s conftest$ac_exeext'
16676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16677   (eval $ac_try) 2>&5
16678   ac_status=$?
16679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16680   (exit $ac_status); }; }; then
16681   ok=PTHREAD_CREATE_UNDETACHED
16682 else
16683   echo "$as_me: failed program was:" >&5
16684 sed 's/^/| /' conftest.$ac_ext >&5
16685
16686 ok=unknown
16687 fi
16688 rm -f conftest.err conftest.$ac_objext \
16689       conftest$ac_exeext conftest.$ac_ext
16690         fi
16691         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16692
16693 cat >>confdefs.h <<\_ACEOF
16694 #define PTHREAD_CREATE_JOINABLE $ok
16695 _ACEOF
16696
16697         fi
16698         echo "$as_me:$LINENO: result: ${ok}" >&5
16699 echo "${ECHO_T}${ok}" >&6
16700         if test x"$ok" = xunknown; then
16701                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16702 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16703         fi
16704
16705         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16706 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16707         flag=no
16708 # We always add these in PostgreSQL
16709 #       case "${host_cpu}-${host_os}" in
16710 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16711 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16712 #       esac
16713         echo "$as_me:$LINENO: result: ${flag}" >&5
16714 echo "${ECHO_T}${flag}" >&6
16715         if test "x$flag" != xno; then
16716                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16717         fi
16718
16719         LIBS="$save_LIBS"
16720         CFLAGS="$save_CFLAGS"
16721
16722 # Supporting cc_r would require a special CC in all places that
16723 # use libpq, and that is ugly, so we don't do it.  Users can still
16724 # define their compiler as cc_r to do thread builds of everything.
16725         # More AIX lossage: must compile with cc_r
16726         # Extract the first word of "cc_r", so it can be a program name with args.
16727 set dummy cc_r; ac_word=$2
16728 echo "$as_me:$LINENO: checking for $ac_word" >&5
16729 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16730 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16731   echo $ECHO_N "(cached) $ECHO_C" >&6
16732 else
16733   if test -n "$PTHREAD_CC"; then
16734   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16735 else
16736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16737 for as_dir in $PATH
16738 do
16739   IFS=$as_save_IFS
16740   test -z "$as_dir" && as_dir=.
16741   for ac_exec_ext in '' $ac_executable_extensions; do
16742   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16743     ac_cv_prog_PTHREAD_CC="cc_r"
16744     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16745     break 2
16746   fi
16747 done
16748 done
16749
16750   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16751 fi
16752 fi
16753 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16754 if test -n "$PTHREAD_CC"; then
16755   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16756 echo "${ECHO_T}$PTHREAD_CC" >&6
16757 else
16758   echo "$as_me:$LINENO: result: no" >&5
16759 echo "${ECHO_T}no" >&6
16760 fi
16761
16762 else
16763         PTHREAD_CC="$CC"
16764 fi
16765
16766
16767
16768
16769
16770 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16771 if test x"$acx_pthread_ok" = xyes; then
16772
16773 cat >>confdefs.h <<\_ACEOF
16774 #define HAVE_PTHREAD 1
16775 _ACEOF
16776
16777         :
16778 else
16779         acx_pthread_ok=no
16780
16781 fi
16782 ac_ext=c
16783 ac_cpp='$CPP $CPPFLAGS'
16784 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16785 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16786 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16787
16788         # set thread flags
16789
16790 # Some platforms use these, so just defineed them.  They can't hurt if they
16791 # are not supported.
16792 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16793
16794
16795 # At this point, we don't want to muck with the compiler name for threading.
16796 # Let's see who fails, perhaps AIX.  2004-04-23
16797 if test "$PTHREAD_CC" != "$CC"; then
16798 { { echo "$as_me:$LINENO: error:
16799 PostgreSQL does not support platforms that require a special
16800 compiler binary for thread-safety.
16801 " >&5
16802 echo "$as_me: error:
16803 PostgreSQL does not support platforms that require a special
16804 compiler binary for thread-safety.
16805 " >&2;}
16806    { (exit 1); exit 1; }; }
16807 fi
16808
16809 if test "$THREAD_SUPPORT" = no; then
16810 { { echo "$as_me:$LINENO: error:
16811 Cannot enable threads on your platform.
16812 Your platform is known to not support thread-safe programs.
16813 For details, compile and run src/bin/pg_thread_test.
16814 " >&5
16815 echo "$as_me: error:
16816 Cannot enable threads on your platform.
16817 Your platform is known to not support thread-safe programs.
16818 For details, compile and run src/bin/pg_thread_test.
16819 " >&2;}
16820    { (exit 1); exit 1; }; }
16821 fi
16822
16823 # Check for *_r functions
16824 _CFLAGS="$CFLAGS"
16825 _LIBS="$LIBS"
16826 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16827 LIBS="$LIBS $PTHREAD_LIBS"
16828
16829 if test "${ac_cv_header_pthread_h+set}" = set; then
16830   echo "$as_me:$LINENO: checking for pthread.h" >&5
16831 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16832 if test "${ac_cv_header_pthread_h+set}" = set; then
16833   echo $ECHO_N "(cached) $ECHO_C" >&6
16834 fi
16835 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16836 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16837 else
16838   # Is the header compilable?
16839 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16840 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16841 cat >conftest.$ac_ext <<_ACEOF
16842 /* confdefs.h.  */
16843 _ACEOF
16844 cat confdefs.h >>conftest.$ac_ext
16845 cat >>conftest.$ac_ext <<_ACEOF
16846 /* end confdefs.h.  */
16847 $ac_includes_default
16848 #include <pthread.h>
16849 _ACEOF
16850 rm -f conftest.$ac_objext
16851 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16852   (eval $ac_compile) 2>conftest.er1
16853   ac_status=$?
16854   grep -v '^ *+' conftest.er1 >conftest.err
16855   rm -f conftest.er1
16856   cat conftest.err >&5
16857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16858   (exit $ac_status); } &&
16859          { ac_try='test -z "$ac_c_werror_flag"
16860                          || test ! -s conftest.err'
16861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16862   (eval $ac_try) 2>&5
16863   ac_status=$?
16864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16865   (exit $ac_status); }; } &&
16866          { ac_try='test -s conftest.$ac_objext'
16867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16868   (eval $ac_try) 2>&5
16869   ac_status=$?
16870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16871   (exit $ac_status); }; }; then
16872   ac_header_compiler=yes
16873 else
16874   echo "$as_me: failed program was:" >&5
16875 sed 's/^/| /' conftest.$ac_ext >&5
16876
16877 ac_header_compiler=no
16878 fi
16879 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16880 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16881 echo "${ECHO_T}$ac_header_compiler" >&6
16882
16883 # Is the header present?
16884 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16885 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16886 cat >conftest.$ac_ext <<_ACEOF
16887 /* confdefs.h.  */
16888 _ACEOF
16889 cat confdefs.h >>conftest.$ac_ext
16890 cat >>conftest.$ac_ext <<_ACEOF
16891 /* end confdefs.h.  */
16892 #include <pthread.h>
16893 _ACEOF
16894 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16895   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16896   ac_status=$?
16897   grep -v '^ *+' conftest.er1 >conftest.err
16898   rm -f conftest.er1
16899   cat conftest.err >&5
16900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16901   (exit $ac_status); } >/dev/null; then
16902   if test -s conftest.err; then
16903     ac_cpp_err=$ac_c_preproc_warn_flag
16904     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16905   else
16906     ac_cpp_err=
16907   fi
16908 else
16909   ac_cpp_err=yes
16910 fi
16911 if test -z "$ac_cpp_err"; then
16912   ac_header_preproc=yes
16913 else
16914   echo "$as_me: failed program was:" >&5
16915 sed 's/^/| /' conftest.$ac_ext >&5
16916
16917   ac_header_preproc=no
16918 fi
16919 rm -f conftest.err conftest.$ac_ext
16920 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16921 echo "${ECHO_T}$ac_header_preproc" >&6
16922
16923 # So?  What about this header?
16924 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16925   yes:no: )
16926     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16927 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16928     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16929 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16930     ac_header_preproc=yes
16931     ;;
16932   no:yes:* )
16933     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16934 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16935     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16936 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16937     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16938 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16939     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16940 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16941     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16942 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16943     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16944 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16945     (
16946       cat <<\_ASBOX
16947 ## ---------------------------------------- ##
16948 ## Report this to pgsql-bugs@postgresql.org ##
16949 ## ---------------------------------------- ##
16950 _ASBOX
16951     ) |
16952       sed "s/^/$as_me: WARNING:     /" >&2
16953     ;;
16954 esac
16955 echo "$as_me:$LINENO: checking for pthread.h" >&5
16956 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16957 if test "${ac_cv_header_pthread_h+set}" = set; then
16958   echo $ECHO_N "(cached) $ECHO_C" >&6
16959 else
16960   ac_cv_header_pthread_h=$ac_header_preproc
16961 fi
16962 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16963 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16964
16965 fi
16966 if test $ac_cv_header_pthread_h = yes; then
16967   :
16968 else
16969   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16970 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16971    { (exit 1); exit 1; }; }
16972 fi
16973
16974
16975
16976
16977
16978
16979 for ac_func in strerror_r getpwuid_r gethostbyname_r
16980 do
16981 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16982 echo "$as_me:$LINENO: checking for $ac_func" >&5
16983 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16984 if eval "test \"\${$as_ac_var+set}\" = set"; then
16985   echo $ECHO_N "(cached) $ECHO_C" >&6
16986 else
16987   cat >conftest.$ac_ext <<_ACEOF
16988 /* confdefs.h.  */
16989 _ACEOF
16990 cat confdefs.h >>conftest.$ac_ext
16991 cat >>conftest.$ac_ext <<_ACEOF
16992 /* end confdefs.h.  */
16993 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16994    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16995 #define $ac_func innocuous_$ac_func
16996
16997 /* System header to define __stub macros and hopefully few prototypes,
16998     which can conflict with char $ac_func (); below.
16999     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17000     <limits.h> exists even on freestanding compilers.  */
17001
17002 #ifdef __STDC__
17003 # include <limits.h>
17004 #else
17005 # include <assert.h>
17006 #endif
17007
17008 #undef $ac_func
17009
17010 /* Override any gcc2 internal prototype to avoid an error.  */
17011 #ifdef __cplusplus
17012 extern "C"
17013 {
17014 #endif
17015 /* We use char because int might match the return type of a gcc2
17016    builtin and then its argument prototype would still apply.  */
17017 char $ac_func ();
17018 /* The GNU C library defines this for functions which it implements
17019     to always fail with ENOSYS.  Some functions are actually named
17020     something starting with __ and the normal name is an alias.  */
17021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17022 choke me
17023 #else
17024 char (*f) () = $ac_func;
17025 #endif
17026 #ifdef __cplusplus
17027 }
17028 #endif
17029
17030 int
17031 main ()
17032 {
17033 return f != $ac_func;
17034   ;
17035   return 0;
17036 }
17037 _ACEOF
17038 rm -f conftest.$ac_objext conftest$ac_exeext
17039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17040   (eval $ac_link) 2>conftest.er1
17041   ac_status=$?
17042   grep -v '^ *+' conftest.er1 >conftest.err
17043   rm -f conftest.er1
17044   cat conftest.err >&5
17045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17046   (exit $ac_status); } &&
17047          { ac_try='test -z "$ac_c_werror_flag"
17048                          || test ! -s conftest.err'
17049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17050   (eval $ac_try) 2>&5
17051   ac_status=$?
17052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17053   (exit $ac_status); }; } &&
17054          { ac_try='test -s 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   eval "$as_ac_var=yes"
17061 else
17062   echo "$as_me: failed program was:" >&5
17063 sed 's/^/| /' conftest.$ac_ext >&5
17064
17065 eval "$as_ac_var=no"
17066 fi
17067 rm -f conftest.err conftest.$ac_objext \
17068       conftest$ac_exeext conftest.$ac_ext
17069 fi
17070 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17071 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17072 if test `eval echo '${'$as_ac_var'}'` = yes; then
17073   cat >>confdefs.h <<_ACEOF
17074 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17075 _ACEOF
17076
17077 fi
17078 done
17079
17080
17081 # Do test here with the proper thread flags
17082 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17083 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17084 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17085   echo $ECHO_N "(cached) $ECHO_C" >&6
17086 else
17087   cat >conftest.$ac_ext <<_ACEOF
17088 /* confdefs.h.  */
17089 _ACEOF
17090 cat confdefs.h >>conftest.$ac_ext
17091 cat >>conftest.$ac_ext <<_ACEOF
17092 /* end confdefs.h.  */
17093 #include <sys/types.h>
17094 #include <pwd.h>
17095 int
17096 main ()
17097 {
17098 uid_t uid;
17099 struct passwd *space;
17100 char *buf;
17101 size_t bufsize;
17102 struct passwd **result;
17103 getpwuid_r(uid, space, buf, bufsize, result);
17104   ;
17105   return 0;
17106 }
17107 _ACEOF
17108 rm -f conftest.$ac_objext
17109 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17110   (eval $ac_compile) 2>conftest.er1
17111   ac_status=$?
17112   grep -v '^ *+' conftest.er1 >conftest.err
17113   rm -f conftest.er1
17114   cat conftest.err >&5
17115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17116   (exit $ac_status); } &&
17117          { ac_try='test -z "$ac_c_werror_flag"
17118                          || test ! -s conftest.err'
17119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17120   (eval $ac_try) 2>&5
17121   ac_status=$?
17122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17123   (exit $ac_status); }; } &&
17124          { ac_try='test -s conftest.$ac_objext'
17125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17126   (eval $ac_try) 2>&5
17127   ac_status=$?
17128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17129   (exit $ac_status); }; }; then
17130   pgac_func_getpwuid_r_5arg=yes
17131 else
17132   echo "$as_me: failed program was:" >&5
17133 sed 's/^/| /' conftest.$ac_ext >&5
17134
17135 pgac_func_getpwuid_r_5arg=no
17136 fi
17137 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17138 fi
17139 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17140 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17141 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17142
17143 cat >>confdefs.h <<\_ACEOF
17144 #define GETPWUID_R_5ARG
17145 _ACEOF
17146
17147 fi
17148
17149 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17150 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17151 if test "${pgac_func_strerror_r_int+set}" = set; then
17152   echo $ECHO_N "(cached) $ECHO_C" >&6
17153 else
17154   cat >conftest.$ac_ext <<_ACEOF
17155 /* confdefs.h.  */
17156 _ACEOF
17157 cat confdefs.h >>conftest.$ac_ext
17158 cat >>conftest.$ac_ext <<_ACEOF
17159 /* end confdefs.h.  */
17160 #include <string.h>
17161 int
17162 main ()
17163 {
17164 #ifndef _AIX
17165 int strerror_r(int, char *, size_t);
17166 #else
17167 /* Older AIX has 'int' for the third argument so we don't test the args. */
17168 int strerror_r();
17169 #endif
17170   ;
17171   return 0;
17172 }
17173 _ACEOF
17174 rm -f conftest.$ac_objext
17175 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17176   (eval $ac_compile) 2>conftest.er1
17177   ac_status=$?
17178   grep -v '^ *+' conftest.er1 >conftest.err
17179   rm -f conftest.er1
17180   cat conftest.err >&5
17181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17182   (exit $ac_status); } &&
17183          { ac_try='test -z "$ac_c_werror_flag"
17184                          || test ! -s conftest.err'
17185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17186   (eval $ac_try) 2>&5
17187   ac_status=$?
17188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17189   (exit $ac_status); }; } &&
17190          { ac_try='test -s conftest.$ac_objext'
17191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17192   (eval $ac_try) 2>&5
17193   ac_status=$?
17194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195   (exit $ac_status); }; }; then
17196   pgac_func_strerror_r_int=yes
17197 else
17198   echo "$as_me: failed program was:" >&5
17199 sed 's/^/| /' conftest.$ac_ext >&5
17200
17201 pgac_func_strerror_r_int=no
17202 fi
17203 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17204 fi
17205 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17206 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17207 if test x"$pgac_func_strerror_r_int" = xyes ; then
17208
17209 cat >>confdefs.h <<\_ACEOF
17210 #define STRERROR_R_INT
17211 _ACEOF
17212
17213 fi
17214
17215
17216 CFLAGS="$_CFLAGS"
17217 LIBS="$_LIBS"
17218
17219 else
17220 # do not use values from template file
17221 PTHREAD_CFLAGS=
17222 PTHREAD_LIBS=
17223 fi
17224
17225
17226
17227
17228
17229 # We can test for libldap_r only after we know PTHREAD_LIBS
17230 if test "$with_ldap" = yes ; then
17231   _LIBS="$LIBS"
17232   if test "$PORTNAME" != "win32"; then
17233
17234 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
17235 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
17236 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
17237   echo $ECHO_N "(cached) $ECHO_C" >&6
17238 else
17239   ac_check_lib_save_LIBS=$LIBS
17240 LIBS="-lldap  $LIBS"
17241 cat >conftest.$ac_ext <<_ACEOF
17242 /* confdefs.h.  */
17243 _ACEOF
17244 cat confdefs.h >>conftest.$ac_ext
17245 cat >>conftest.$ac_ext <<_ACEOF
17246 /* end confdefs.h.  */
17247
17248 /* Override any gcc2 internal prototype to avoid an error.  */
17249 #ifdef __cplusplus
17250 extern "C"
17251 #endif
17252 /* We use char because int might match the return type of a gcc2
17253    builtin and then its argument prototype would still apply.  */
17254 char ldap_bind ();
17255 int
17256 main ()
17257 {
17258 ldap_bind ();
17259   ;
17260   return 0;
17261 }
17262 _ACEOF
17263 rm -f conftest.$ac_objext conftest$ac_exeext
17264 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17265   (eval $ac_link) 2>conftest.er1
17266   ac_status=$?
17267   grep -v '^ *+' conftest.er1 >conftest.err
17268   rm -f conftest.er1
17269   cat conftest.err >&5
17270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17271   (exit $ac_status); } &&
17272          { ac_try='test -z "$ac_c_werror_flag"
17273                          || test ! -s conftest.err'
17274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17275   (eval $ac_try) 2>&5
17276   ac_status=$?
17277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17278   (exit $ac_status); }; } &&
17279          { ac_try='test -s conftest$ac_exeext'
17280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17281   (eval $ac_try) 2>&5
17282   ac_status=$?
17283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17284   (exit $ac_status); }; }; then
17285   ac_cv_lib_ldap_ldap_bind=yes
17286 else
17287   echo "$as_me: failed program was:" >&5
17288 sed 's/^/| /' conftest.$ac_ext >&5
17289
17290 ac_cv_lib_ldap_ldap_bind=no
17291 fi
17292 rm -f conftest.err conftest.$ac_objext \
17293       conftest$ac_exeext conftest.$ac_ext
17294 LIBS=$ac_check_lib_save_LIBS
17295 fi
17296 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
17297 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
17298 if test $ac_cv_lib_ldap_ldap_bind = yes; then
17299   cat >>confdefs.h <<_ACEOF
17300 #define HAVE_LIBLDAP 1
17301 _ACEOF
17302
17303   LIBS="-lldap $LIBS"
17304
17305 else
17306   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
17307 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
17308    { (exit 1); exit 1; }; }
17309 fi
17310
17311     LDAP_LIBS_BE="-lldap"
17312     if test "$enable_thread_safety" = yes; then
17313       # on some platforms ldap_r fails to link without PTHREAD_LIBS
17314
17315 echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
17316 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6
17317 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
17318   echo $ECHO_N "(cached) $ECHO_C" >&6
17319 else
17320   ac_check_lib_save_LIBS=$LIBS
17321 LIBS="-lldap_r $PTHREAD_LIBS $LIBS"
17322 cat >conftest.$ac_ext <<_ACEOF
17323 /* confdefs.h.  */
17324 _ACEOF
17325 cat confdefs.h >>conftest.$ac_ext
17326 cat >>conftest.$ac_ext <<_ACEOF
17327 /* end confdefs.h.  */
17328
17329 /* Override any gcc2 internal prototype to avoid an error.  */
17330 #ifdef __cplusplus
17331 extern "C"
17332 #endif
17333 /* We use char because int might match the return type of a gcc2
17334    builtin and then its argument prototype would still apply.  */
17335 char ldap_simple_bind ();
17336 int
17337 main ()
17338 {
17339 ldap_simple_bind ();
17340   ;
17341   return 0;
17342 }
17343 _ACEOF
17344 rm -f conftest.$ac_objext conftest$ac_exeext
17345 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17346   (eval $ac_link) 2>conftest.er1
17347   ac_status=$?
17348   grep -v '^ *+' conftest.er1 >conftest.err
17349   rm -f conftest.er1
17350   cat conftest.err >&5
17351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17352   (exit $ac_status); } &&
17353          { ac_try='test -z "$ac_c_werror_flag"
17354                          || test ! -s conftest.err'
17355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17356   (eval $ac_try) 2>&5
17357   ac_status=$?
17358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17359   (exit $ac_status); }; } &&
17360          { ac_try='test -s conftest$ac_exeext'
17361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17362   (eval $ac_try) 2>&5
17363   ac_status=$?
17364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17365   (exit $ac_status); }; }; then
17366   ac_cv_lib_ldap_r_ldap_simple_bind=yes
17367 else
17368   echo "$as_me: failed program was:" >&5
17369 sed 's/^/| /' conftest.$ac_ext >&5
17370
17371 ac_cv_lib_ldap_r_ldap_simple_bind=no
17372 fi
17373 rm -f conftest.err conftest.$ac_objext \
17374       conftest$ac_exeext conftest.$ac_ext
17375 LIBS=$ac_check_lib_save_LIBS
17376 fi
17377 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
17378 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6
17379 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
17380   cat >>confdefs.h <<_ACEOF
17381 #define HAVE_LIBLDAP_R 1
17382 _ACEOF
17383
17384   LIBS="-lldap_r $LIBS"
17385
17386 else
17387   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
17388 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
17389    { (exit 1); exit 1; }; }
17390 fi
17391
17392       LDAP_LIBS_FE="-lldap_r"
17393     else
17394       LDAP_LIBS_FE="-lldap"
17395     fi
17396   else
17397
17398 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
17399 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
17400 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
17401   echo $ECHO_N "(cached) $ECHO_C" >&6
17402 else
17403   ac_check_lib_save_LIBS=$LIBS
17404 LIBS="-lwldap32  $LIBS"
17405 cat >conftest.$ac_ext <<_ACEOF
17406 /* confdefs.h.  */
17407 _ACEOF
17408 cat confdefs.h >>conftest.$ac_ext
17409 cat >>conftest.$ac_ext <<_ACEOF
17410 /* end confdefs.h.  */
17411
17412 /* Override any gcc2 internal prototype to avoid an error.  */
17413 #ifdef __cplusplus
17414 extern "C"
17415 #endif
17416 /* We use char because int might match the return type of a gcc2
17417    builtin and then its argument prototype would still apply.  */
17418 char ldap_bind ();
17419 int
17420 main ()
17421 {
17422 ldap_bind ();
17423   ;
17424   return 0;
17425 }
17426 _ACEOF
17427 rm -f conftest.$ac_objext conftest$ac_exeext
17428 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17429   (eval $ac_link) 2>conftest.er1
17430   ac_status=$?
17431   grep -v '^ *+' conftest.er1 >conftest.err
17432   rm -f conftest.er1
17433   cat conftest.err >&5
17434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17435   (exit $ac_status); } &&
17436          { ac_try='test -z "$ac_c_werror_flag"
17437                          || test ! -s conftest.err'
17438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17439   (eval $ac_try) 2>&5
17440   ac_status=$?
17441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442   (exit $ac_status); }; } &&
17443          { ac_try='test -s conftest$ac_exeext'
17444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17445   (eval $ac_try) 2>&5
17446   ac_status=$?
17447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17448   (exit $ac_status); }; }; then
17449   ac_cv_lib_wldap32_ldap_bind=yes
17450 else
17451   echo "$as_me: failed program was:" >&5
17452 sed 's/^/| /' conftest.$ac_ext >&5
17453
17454 ac_cv_lib_wldap32_ldap_bind=no
17455 fi
17456 rm -f conftest.err conftest.$ac_objext \
17457       conftest$ac_exeext conftest.$ac_ext
17458 LIBS=$ac_check_lib_save_LIBS
17459 fi
17460 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
17461 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
17462 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
17463   cat >>confdefs.h <<_ACEOF
17464 #define HAVE_LIBWLDAP32 1
17465 _ACEOF
17466
17467   LIBS="-lwldap32 $LIBS"
17468
17469 else
17470   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
17471 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
17472    { (exit 1); exit 1; }; }
17473 fi
17474
17475     LDAP_LIBS_FE="-lwldap32"
17476     LDAP_LIBS_BE="-lwldap32"
17477   fi
17478   LIBS="$_LIBS"
17479 fi
17480
17481
17482
17483
17484 # This test makes sure that run tests work at all.  Sometimes a shared
17485 # library is found by the linker, but the runtime linker can't find it.
17486 # This check should come after all modifications of compiler or linker
17487 # variables, and before any other run tests.
17488 echo "$as_me:$LINENO: checking test program" >&5
17489 echo $ECHO_N "checking test program... $ECHO_C" >&6
17490 if test "$cross_compiling" = yes; then
17491   echo "$as_me:$LINENO: result: cross-compiling" >&5
17492 echo "${ECHO_T}cross-compiling" >&6
17493 else
17494   cat >conftest.$ac_ext <<_ACEOF
17495 /* confdefs.h.  */
17496 _ACEOF
17497 cat confdefs.h >>conftest.$ac_ext
17498 cat >>conftest.$ac_ext <<_ACEOF
17499 /* end confdefs.h.  */
17500 int main() { return 0; }
17501 _ACEOF
17502 rm -f conftest$ac_exeext
17503 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17504   (eval $ac_link) 2>&5
17505   ac_status=$?
17506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17507   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17509   (eval $ac_try) 2>&5
17510   ac_status=$?
17511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17512   (exit $ac_status); }; }; then
17513   echo "$as_me:$LINENO: result: ok" >&5
17514 echo "${ECHO_T}ok" >&6
17515 else
17516   echo "$as_me: program exited with status $ac_status" >&5
17517 echo "$as_me: failed program was:" >&5
17518 sed 's/^/| /' conftest.$ac_ext >&5
17519
17520 ( exit $ac_status )
17521 echo "$as_me:$LINENO: result: failed" >&5
17522 echo "${ECHO_T}failed" >&6
17523 { { echo "$as_me:$LINENO: error:
17524 *** Could not execute a simple test program.  This may be a problem
17525 *** related to locating shared libraries.  Check the file 'config.log'
17526 *** for the exact reason." >&5
17527 echo "$as_me: error:
17528 *** Could not execute a simple test program.  This may be a problem
17529 *** related to locating shared libraries.  Check the file 'config.log'
17530 *** for the exact reason." >&2;}
17531    { (exit 1); exit 1; }; }
17532 fi
17533 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17534 fi
17535
17536 # --------------------
17537 # Run tests below here
17538 # --------------------
17539
17540 # Force use of our snprintf if system's doesn't do arg control
17541 # See comment above at snprintf test for details.
17542 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17543   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17544 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17545 if test "${pgac_cv_printf_arg_control+set}" = set; then
17546   echo $ECHO_N "(cached) $ECHO_C" >&6
17547 else
17548   if test "$cross_compiling" = yes; then
17549   pgac_cv_printf_arg_control=cross
17550 else
17551   cat >conftest.$ac_ext <<_ACEOF
17552 /* confdefs.h.  */
17553 _ACEOF
17554 cat confdefs.h >>conftest.$ac_ext
17555 cat >>conftest.$ac_ext <<_ACEOF
17556 /* end confdefs.h.  */
17557 #include <stdio.h>
17558 #include <string.h>
17559
17560 int main()
17561 {
17562   char buf[100];
17563
17564   /* can it swap arguments? */
17565   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17566   if (strcmp(buf, "4 3") != 0)
17567     return 1;
17568   return 0;
17569 }
17570 _ACEOF
17571 rm -f conftest$ac_exeext
17572 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17573   (eval $ac_link) 2>&5
17574   ac_status=$?
17575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17576   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17578   (eval $ac_try) 2>&5
17579   ac_status=$?
17580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17581   (exit $ac_status); }; }; then
17582   pgac_cv_printf_arg_control=yes
17583 else
17584   echo "$as_me: program exited with status $ac_status" >&5
17585 echo "$as_me: failed program was:" >&5
17586 sed 's/^/| /' conftest.$ac_ext >&5
17587
17588 ( exit $ac_status )
17589 pgac_cv_printf_arg_control=no
17590 fi
17591 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17592 fi
17593
17594 fi
17595 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17596 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17597
17598   if test $pgac_cv_printf_arg_control != yes ; then
17599     pgac_need_repl_snprintf=yes
17600   fi
17601 fi
17602
17603
17604
17605 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17606 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17607 if test "${pgac_cv_type_long_int_64+set}" = set; then
17608   echo $ECHO_N "(cached) $ECHO_C" >&6
17609 else
17610   if test "$cross_compiling" = yes; then
17611   # If cross-compiling, check the size reported by the compiler and
17612 # trust that the arithmetic works.
17613 cat >conftest.$ac_ext <<_ACEOF
17614 /* confdefs.h.  */
17615 _ACEOF
17616 cat confdefs.h >>conftest.$ac_ext
17617 cat >>conftest.$ac_ext <<_ACEOF
17618 /* end confdefs.h.  */
17619
17620 int
17621 main ()
17622 {
17623 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17624 test_array [0] = 0
17625
17626   ;
17627   return 0;
17628 }
17629 _ACEOF
17630 rm -f conftest.$ac_objext
17631 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17632   (eval $ac_compile) 2>conftest.er1
17633   ac_status=$?
17634   grep -v '^ *+' conftest.er1 >conftest.err
17635   rm -f conftest.er1
17636   cat conftest.err >&5
17637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17638   (exit $ac_status); } &&
17639          { ac_try='test -z "$ac_c_werror_flag"
17640                          || test ! -s conftest.err'
17641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17642   (eval $ac_try) 2>&5
17643   ac_status=$?
17644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17645   (exit $ac_status); }; } &&
17646          { ac_try='test -s conftest.$ac_objext'
17647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17648   (eval $ac_try) 2>&5
17649   ac_status=$?
17650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17651   (exit $ac_status); }; }; then
17652   pgac_cv_type_long_int_64=yes
17653 else
17654   echo "$as_me: failed program was:" >&5
17655 sed 's/^/| /' conftest.$ac_ext >&5
17656
17657 pgac_cv_type_long_int_64=no
17658 fi
17659 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17660 else
17661   cat >conftest.$ac_ext <<_ACEOF
17662 /* confdefs.h.  */
17663 _ACEOF
17664 cat confdefs.h >>conftest.$ac_ext
17665 cat >>conftest.$ac_ext <<_ACEOF
17666 /* end confdefs.h.  */
17667 typedef long int ac_int64;
17668
17669 /*
17670  * These are globals to discourage the compiler from folding all the
17671  * arithmetic tests down to compile-time constants.
17672  */
17673 ac_int64 a = 20000001;
17674 ac_int64 b = 40000005;
17675
17676 int does_int64_work()
17677 {
17678   ac_int64 c,d;
17679
17680   if (sizeof(ac_int64) != 8)
17681     return 0;                   /* definitely not the right size */
17682
17683   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17684   c = a * b;
17685   d = (c + b) / b;
17686   if (d != a+1)
17687     return 0;
17688   return 1;
17689 }
17690 main() {
17691   exit(! does_int64_work());
17692 }
17693 _ACEOF
17694 rm -f conftest$ac_exeext
17695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17696   (eval $ac_link) 2>&5
17697   ac_status=$?
17698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17699   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17701   (eval $ac_try) 2>&5
17702   ac_status=$?
17703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17704   (exit $ac_status); }; }; then
17705   pgac_cv_type_long_int_64=yes
17706 else
17707   echo "$as_me: program exited with status $ac_status" >&5
17708 echo "$as_me: failed program was:" >&5
17709 sed 's/^/| /' conftest.$ac_ext >&5
17710
17711 ( exit $ac_status )
17712 pgac_cv_type_long_int_64=no
17713 fi
17714 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17715 fi
17716 fi
17717 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17718 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17719
17720 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17721 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17722
17723 cat >>confdefs.h <<\_ACEOF
17724 #define HAVE_LONG_INT_64
17725 _ACEOF
17726
17727 fi
17728
17729
17730 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17731   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17732 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17733 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17734   echo $ECHO_N "(cached) $ECHO_C" >&6
17735 else
17736   if test "$cross_compiling" = yes; then
17737   # If cross-compiling, check the size reported by the compiler and
17738 # trust that the arithmetic works.
17739 cat >conftest.$ac_ext <<_ACEOF
17740 /* confdefs.h.  */
17741 _ACEOF
17742 cat confdefs.h >>conftest.$ac_ext
17743 cat >>conftest.$ac_ext <<_ACEOF
17744 /* end confdefs.h.  */
17745
17746 int
17747 main ()
17748 {
17749 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17750 test_array [0] = 0
17751
17752   ;
17753   return 0;
17754 }
17755 _ACEOF
17756 rm -f conftest.$ac_objext
17757 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17758   (eval $ac_compile) 2>conftest.er1
17759   ac_status=$?
17760   grep -v '^ *+' conftest.er1 >conftest.err
17761   rm -f conftest.er1
17762   cat conftest.err >&5
17763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17764   (exit $ac_status); } &&
17765          { ac_try='test -z "$ac_c_werror_flag"
17766                          || test ! -s conftest.err'
17767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17768   (eval $ac_try) 2>&5
17769   ac_status=$?
17770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17771   (exit $ac_status); }; } &&
17772          { ac_try='test -s conftest.$ac_objext'
17773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17774   (eval $ac_try) 2>&5
17775   ac_status=$?
17776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17777   (exit $ac_status); }; }; then
17778   pgac_cv_type_long_long_int_64=yes
17779 else
17780   echo "$as_me: failed program was:" >&5
17781 sed 's/^/| /' conftest.$ac_ext >&5
17782
17783 pgac_cv_type_long_long_int_64=no
17784 fi
17785 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17786 else
17787   cat >conftest.$ac_ext <<_ACEOF
17788 /* confdefs.h.  */
17789 _ACEOF
17790 cat confdefs.h >>conftest.$ac_ext
17791 cat >>conftest.$ac_ext <<_ACEOF
17792 /* end confdefs.h.  */
17793 typedef long long int ac_int64;
17794
17795 /*
17796  * These are globals to discourage the compiler from folding all the
17797  * arithmetic tests down to compile-time constants.
17798  */
17799 ac_int64 a = 20000001;
17800 ac_int64 b = 40000005;
17801
17802 int does_int64_work()
17803 {
17804   ac_int64 c,d;
17805
17806   if (sizeof(ac_int64) != 8)
17807     return 0;                   /* definitely not the right size */
17808
17809   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17810   c = a * b;
17811   d = (c + b) / b;
17812   if (d != a+1)
17813     return 0;
17814   return 1;
17815 }
17816 main() {
17817   exit(! does_int64_work());
17818 }
17819 _ACEOF
17820 rm -f conftest$ac_exeext
17821 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17822   (eval $ac_link) 2>&5
17823   ac_status=$?
17824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17825   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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); }; }; then
17831   pgac_cv_type_long_long_int_64=yes
17832 else
17833   echo "$as_me: program exited with status $ac_status" >&5
17834 echo "$as_me: failed program was:" >&5
17835 sed 's/^/| /' conftest.$ac_ext >&5
17836
17837 ( exit $ac_status )
17838 pgac_cv_type_long_long_int_64=no
17839 fi
17840 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17841 fi
17842 fi
17843 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17844 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17845
17846 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17847 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17848
17849 cat >>confdefs.h <<\_ACEOF
17850 #define HAVE_LONG_LONG_INT_64
17851 _ACEOF
17852
17853 fi
17854
17855 fi
17856
17857
17858
17859 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17860   cat >conftest.$ac_ext <<_ACEOF
17861 /* confdefs.h.  */
17862 _ACEOF
17863 cat confdefs.h >>conftest.$ac_ext
17864 cat >>conftest.$ac_ext <<_ACEOF
17865 /* end confdefs.h.  */
17866
17867 #define INT64CONST(x)  x##LL
17868 long long int foo = INT64CONST(0x1234567890123456);
17869
17870 int
17871 main ()
17872 {
17873
17874   ;
17875   return 0;
17876 }
17877 _ACEOF
17878 rm -f conftest.$ac_objext
17879 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17880   (eval $ac_compile) 2>conftest.er1
17881   ac_status=$?
17882   grep -v '^ *+' conftest.er1 >conftest.err
17883   rm -f conftest.er1
17884   cat conftest.err >&5
17885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17886   (exit $ac_status); } &&
17887          { ac_try='test -z "$ac_c_werror_flag"
17888                          || test ! -s conftest.err'
17889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17890   (eval $ac_try) 2>&5
17891   ac_status=$?
17892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17893   (exit $ac_status); }; } &&
17894          { ac_try='test -s conftest.$ac_objext'
17895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17896   (eval $ac_try) 2>&5
17897   ac_status=$?
17898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17899   (exit $ac_status); }; }; then
17900
17901 cat >>confdefs.h <<\_ACEOF
17902 #define HAVE_LL_CONSTANTS 1
17903 _ACEOF
17904
17905 else
17906   echo "$as_me: failed program was:" >&5
17907 sed 's/^/| /' conftest.$ac_ext >&5
17908
17909 fi
17910 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17911 fi
17912
17913
17914 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17915 # we found we need to use "long long int", better check.  We cope with
17916 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17917 # work, fall back to our own snprintf emulation (which we know uses %lld).
17918
17919 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17920   if test $pgac_need_repl_snprintf = no; then
17921     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17922 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17923 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17924   echo $ECHO_N "(cached) $ECHO_C" >&6
17925 else
17926   for pgac_format in '%lld' '%qd' '%I64d'; do
17927 if test "$cross_compiling" = yes; then
17928   pgac_cv_snprintf_long_long_int_format=cross; break
17929 else
17930   cat >conftest.$ac_ext <<_ACEOF
17931 /* confdefs.h.  */
17932 _ACEOF
17933 cat confdefs.h >>conftest.$ac_ext
17934 cat >>conftest.$ac_ext <<_ACEOF
17935 /* end confdefs.h.  */
17936 #include <stdio.h>
17937 typedef long long int ac_int64;
17938 #define INT64_FORMAT "$pgac_format"
17939
17940 ac_int64 a = 20000001;
17941 ac_int64 b = 40000005;
17942
17943 int does_int64_snprintf_work()
17944 {
17945   ac_int64 c;
17946   char buf[100];
17947
17948   if (sizeof(ac_int64) != 8)
17949     return 0;                   /* doesn't look like the right size */
17950
17951   c = a * b;
17952   snprintf(buf, 100, INT64_FORMAT, c);
17953   if (strcmp(buf, "800000140000005") != 0)
17954     return 0;                   /* either multiply or snprintf is busted */
17955   return 1;
17956 }
17957 main() {
17958   exit(! does_int64_snprintf_work());
17959 }
17960 _ACEOF
17961 rm -f conftest$ac_exeext
17962 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17963   (eval $ac_link) 2>&5
17964   ac_status=$?
17965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17966   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17968   (eval $ac_try) 2>&5
17969   ac_status=$?
17970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17971   (exit $ac_status); }; }; then
17972   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17973 else
17974   echo "$as_me: program exited with status $ac_status" >&5
17975 echo "$as_me: failed program was:" >&5
17976 sed 's/^/| /' conftest.$ac_ext >&5
17977
17978 fi
17979 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17980 fi
17981 done
17982 fi
17983
17984 LONG_LONG_INT_FORMAT=''
17985
17986 case $pgac_cv_snprintf_long_long_int_format in
17987   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17988 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17989   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17990 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17991          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17992   *)     echo "$as_me:$LINENO: result: none" >&5
17993 echo "${ECHO_T}none" >&6;;
17994 esac
17995     if test "$LONG_LONG_INT_FORMAT" = ""; then
17996       # Force usage of our own snprintf, since system snprintf is broken
17997       pgac_need_repl_snprintf=yes
17998       LONG_LONG_INT_FORMAT='%lld'
17999     fi
18000   else
18001     # Here if we previously decided we needed to use our own snprintf
18002     LONG_LONG_INT_FORMAT='%lld'
18003   fi
18004   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
18005   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
18006   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
18007 else
18008   # Here if we are not using 'long long int' at all
18009   INT64_FORMAT='"%ld"'
18010   UINT64_FORMAT='"%lu"'
18011 fi
18012
18013
18014 cat >>confdefs.h <<_ACEOF
18015 #define INT64_FORMAT $INT64_FORMAT
18016 _ACEOF
18017
18018
18019
18020 cat >>confdefs.h <<_ACEOF
18021 #define UINT64_FORMAT $UINT64_FORMAT
18022 _ACEOF
18023
18024
18025 # Now we have checked all the reasons to replace snprintf
18026 if test $pgac_need_repl_snprintf = yes; then
18027
18028 cat >>confdefs.h <<\_ACEOF
18029 #define USE_REPL_SNPRINTF 1
18030 _ACEOF
18031
18032   case $LIBOBJS in
18033     "snprintf.$ac_objext"   | \
18034   *" snprintf.$ac_objext"   | \
18035     "snprintf.$ac_objext "* | \
18036   *" snprintf.$ac_objext "* ) ;;
18037   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
18038 esac
18039
18040 fi
18041
18042 # Need a #define for the size of Datum (unsigned long)
18043 echo "$as_me:$LINENO: checking for unsigned long" >&5
18044 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
18045 if test "${ac_cv_type_unsigned_long+set}" = set; then
18046   echo $ECHO_N "(cached) $ECHO_C" >&6
18047 else
18048   cat >conftest.$ac_ext <<_ACEOF
18049 /* confdefs.h.  */
18050 _ACEOF
18051 cat confdefs.h >>conftest.$ac_ext
18052 cat >>conftest.$ac_ext <<_ACEOF
18053 /* end confdefs.h.  */
18054 $ac_includes_default
18055 int
18056 main ()
18057 {
18058 if ((unsigned long *) 0)
18059   return 0;
18060 if (sizeof (unsigned long))
18061   return 0;
18062   ;
18063   return 0;
18064 }
18065 _ACEOF
18066 rm -f conftest.$ac_objext
18067 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18068   (eval $ac_compile) 2>conftest.er1
18069   ac_status=$?
18070   grep -v '^ *+' conftest.er1 >conftest.err
18071   rm -f conftest.er1
18072   cat conftest.err >&5
18073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18074   (exit $ac_status); } &&
18075          { ac_try='test -z "$ac_c_werror_flag"
18076                          || test ! -s conftest.err'
18077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18078   (eval $ac_try) 2>&5
18079   ac_status=$?
18080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18081   (exit $ac_status); }; } &&
18082          { ac_try='test -s conftest.$ac_objext'
18083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18084   (eval $ac_try) 2>&5
18085   ac_status=$?
18086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18087   (exit $ac_status); }; }; then
18088   ac_cv_type_unsigned_long=yes
18089 else
18090   echo "$as_me: failed program was:" >&5
18091 sed 's/^/| /' conftest.$ac_ext >&5
18092
18093 ac_cv_type_unsigned_long=no
18094 fi
18095 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18096 fi
18097 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
18098 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
18099
18100 echo "$as_me:$LINENO: checking size of unsigned long" >&5
18101 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
18102 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
18103   echo $ECHO_N "(cached) $ECHO_C" >&6
18104 else
18105   if test "$ac_cv_type_unsigned_long" = yes; then
18106   # The cast to unsigned long works around a bug in the HP C Compiler
18107   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18108   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18109   # This bug is HP SR number 8606223364.
18110   if test "$cross_compiling" = yes; then
18111   # Depending upon the size, compute the lo and hi bounds.
18112 cat >conftest.$ac_ext <<_ACEOF
18113 /* confdefs.h.  */
18114 _ACEOF
18115 cat confdefs.h >>conftest.$ac_ext
18116 cat >>conftest.$ac_ext <<_ACEOF
18117 /* end confdefs.h.  */
18118 $ac_includes_default
18119 int
18120 main ()
18121 {
18122 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
18123 test_array [0] = 0
18124
18125   ;
18126   return 0;
18127 }
18128 _ACEOF
18129 rm -f conftest.$ac_objext
18130 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18131   (eval $ac_compile) 2>conftest.er1
18132   ac_status=$?
18133   grep -v '^ *+' conftest.er1 >conftest.err
18134   rm -f conftest.er1
18135   cat conftest.err >&5
18136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18137   (exit $ac_status); } &&
18138          { ac_try='test -z "$ac_c_werror_flag"
18139                          || test ! -s conftest.err'
18140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18141   (eval $ac_try) 2>&5
18142   ac_status=$?
18143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18144   (exit $ac_status); }; } &&
18145          { ac_try='test -s conftest.$ac_objext'
18146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18147   (eval $ac_try) 2>&5
18148   ac_status=$?
18149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18150   (exit $ac_status); }; }; then
18151   ac_lo=0 ac_mid=0
18152   while :; do
18153     cat >conftest.$ac_ext <<_ACEOF
18154 /* confdefs.h.  */
18155 _ACEOF
18156 cat confdefs.h >>conftest.$ac_ext
18157 cat >>conftest.$ac_ext <<_ACEOF
18158 /* end confdefs.h.  */
18159 $ac_includes_default
18160 int
18161 main ()
18162 {
18163 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18164 test_array [0] = 0
18165
18166   ;
18167   return 0;
18168 }
18169 _ACEOF
18170 rm -f conftest.$ac_objext
18171 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18172   (eval $ac_compile) 2>conftest.er1
18173   ac_status=$?
18174   grep -v '^ *+' conftest.er1 >conftest.err
18175   rm -f conftest.er1
18176   cat conftest.err >&5
18177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18178   (exit $ac_status); } &&
18179          { ac_try='test -z "$ac_c_werror_flag"
18180                          || test ! -s conftest.err'
18181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18182   (eval $ac_try) 2>&5
18183   ac_status=$?
18184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18185   (exit $ac_status); }; } &&
18186          { ac_try='test -s conftest.$ac_objext'
18187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18188   (eval $ac_try) 2>&5
18189   ac_status=$?
18190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18191   (exit $ac_status); }; }; then
18192   ac_hi=$ac_mid; break
18193 else
18194   echo "$as_me: failed program was:" >&5
18195 sed 's/^/| /' conftest.$ac_ext >&5
18196
18197 ac_lo=`expr $ac_mid + 1`
18198                     if test $ac_lo -le $ac_mid; then
18199                       ac_lo= ac_hi=
18200                       break
18201                     fi
18202                     ac_mid=`expr 2 '*' $ac_mid + 1`
18203 fi
18204 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18205   done
18206 else
18207   echo "$as_me: failed program was:" >&5
18208 sed 's/^/| /' conftest.$ac_ext >&5
18209
18210 cat >conftest.$ac_ext <<_ACEOF
18211 /* confdefs.h.  */
18212 _ACEOF
18213 cat confdefs.h >>conftest.$ac_ext
18214 cat >>conftest.$ac_ext <<_ACEOF
18215 /* end confdefs.h.  */
18216 $ac_includes_default
18217 int
18218 main ()
18219 {
18220 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
18221 test_array [0] = 0
18222
18223   ;
18224   return 0;
18225 }
18226 _ACEOF
18227 rm -f conftest.$ac_objext
18228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18229   (eval $ac_compile) 2>conftest.er1
18230   ac_status=$?
18231   grep -v '^ *+' conftest.er1 >conftest.err
18232   rm -f conftest.er1
18233   cat conftest.err >&5
18234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18235   (exit $ac_status); } &&
18236          { ac_try='test -z "$ac_c_werror_flag"
18237                          || test ! -s conftest.err'
18238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18239   (eval $ac_try) 2>&5
18240   ac_status=$?
18241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18242   (exit $ac_status); }; } &&
18243          { ac_try='test -s conftest.$ac_objext'
18244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18245   (eval $ac_try) 2>&5
18246   ac_status=$?
18247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18248   (exit $ac_status); }; }; then
18249   ac_hi=-1 ac_mid=-1
18250   while :; do
18251     cat >conftest.$ac_ext <<_ACEOF
18252 /* confdefs.h.  */
18253 _ACEOF
18254 cat confdefs.h >>conftest.$ac_ext
18255 cat >>conftest.$ac_ext <<_ACEOF
18256 /* end confdefs.h.  */
18257 $ac_includes_default
18258 int
18259 main ()
18260 {
18261 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18262 test_array [0] = 0
18263
18264   ;
18265   return 0;
18266 }
18267 _ACEOF
18268 rm -f conftest.$ac_objext
18269 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18270   (eval $ac_compile) 2>conftest.er1
18271   ac_status=$?
18272   grep -v '^ *+' conftest.er1 >conftest.err
18273   rm -f conftest.er1
18274   cat conftest.err >&5
18275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18276   (exit $ac_status); } &&
18277          { ac_try='test -z "$ac_c_werror_flag"
18278                          || test ! -s conftest.err'
18279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18280   (eval $ac_try) 2>&5
18281   ac_status=$?
18282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18283   (exit $ac_status); }; } &&
18284          { ac_try='test -s conftest.$ac_objext'
18285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18286   (eval $ac_try) 2>&5
18287   ac_status=$?
18288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18289   (exit $ac_status); }; }; then
18290   ac_lo=$ac_mid; break
18291 else
18292   echo "$as_me: failed program was:" >&5
18293 sed 's/^/| /' conftest.$ac_ext >&5
18294
18295 ac_hi=`expr '(' $ac_mid ')' - 1`
18296                        if test $ac_mid -le $ac_hi; then
18297                          ac_lo= ac_hi=
18298                          break
18299                        fi
18300                        ac_mid=`expr 2 '*' $ac_mid`
18301 fi
18302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18303   done
18304 else
18305   echo "$as_me: failed program was:" >&5
18306 sed 's/^/| /' conftest.$ac_ext >&5
18307
18308 ac_lo= ac_hi=
18309 fi
18310 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18311 fi
18312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18313 # Binary search between lo and hi bounds.
18314 while test "x$ac_lo" != "x$ac_hi"; do
18315   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18316   cat >conftest.$ac_ext <<_ACEOF
18317 /* confdefs.h.  */
18318 _ACEOF
18319 cat confdefs.h >>conftest.$ac_ext
18320 cat >>conftest.$ac_ext <<_ACEOF
18321 /* end confdefs.h.  */
18322 $ac_includes_default
18323 int
18324 main ()
18325 {
18326 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18327 test_array [0] = 0
18328
18329   ;
18330   return 0;
18331 }
18332 _ACEOF
18333 rm -f conftest.$ac_objext
18334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18335   (eval $ac_compile) 2>conftest.er1
18336   ac_status=$?
18337   grep -v '^ *+' conftest.er1 >conftest.err
18338   rm -f conftest.er1
18339   cat conftest.err >&5
18340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18341   (exit $ac_status); } &&
18342          { ac_try='test -z "$ac_c_werror_flag"
18343                          || test ! -s conftest.err'
18344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18345   (eval $ac_try) 2>&5
18346   ac_status=$?
18347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18348   (exit $ac_status); }; } &&
18349          { ac_try='test -s conftest.$ac_objext'
18350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18351   (eval $ac_try) 2>&5
18352   ac_status=$?
18353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18354   (exit $ac_status); }; }; then
18355   ac_hi=$ac_mid
18356 else
18357   echo "$as_me: failed program was:" >&5
18358 sed 's/^/| /' conftest.$ac_ext >&5
18359
18360 ac_lo=`expr '(' $ac_mid ')' + 1`
18361 fi
18362 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18363 done
18364 case $ac_lo in
18365 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18366 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18367 See \`config.log' for more details." >&5
18368 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18369 See \`config.log' for more details." >&2;}
18370    { (exit 1); exit 1; }; } ;;
18371 esac
18372 else
18373   if test "$cross_compiling" = yes; then
18374   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18375 See \`config.log' for more details." >&5
18376 echo "$as_me: error: cannot run test program while cross compiling
18377 See \`config.log' for more details." >&2;}
18378    { (exit 1); exit 1; }; }
18379 else
18380   cat >conftest.$ac_ext <<_ACEOF
18381 /* confdefs.h.  */
18382 _ACEOF
18383 cat confdefs.h >>conftest.$ac_ext
18384 cat >>conftest.$ac_ext <<_ACEOF
18385 /* end confdefs.h.  */
18386 $ac_includes_default
18387 long longval () { return (long) (sizeof (unsigned long)); }
18388 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18389 #include <stdio.h>
18390 #include <stdlib.h>
18391 int
18392 main ()
18393 {
18394
18395   FILE *f = fopen ("conftest.val", "w");
18396   if (! f)
18397     exit (1);
18398   if (((long) (sizeof (unsigned long))) < 0)
18399     {
18400       long i = longval ();
18401       if (i != ((long) (sizeof (unsigned long))))
18402         exit (1);
18403       fprintf (f, "%ld\n", i);
18404     }
18405   else
18406     {
18407       unsigned long i = ulongval ();
18408       if (i != ((long) (sizeof (unsigned long))))
18409         exit (1);
18410       fprintf (f, "%lu\n", i);
18411     }
18412   exit (ferror (f) || fclose (f) != 0);
18413
18414   ;
18415   return 0;
18416 }
18417 _ACEOF
18418 rm -f conftest$ac_exeext
18419 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18420   (eval $ac_link) 2>&5
18421   ac_status=$?
18422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18423   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18425   (eval $ac_try) 2>&5
18426   ac_status=$?
18427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18428   (exit $ac_status); }; }; then
18429   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18430 else
18431   echo "$as_me: program exited with status $ac_status" >&5
18432 echo "$as_me: failed program was:" >&5
18433 sed 's/^/| /' conftest.$ac_ext >&5
18434
18435 ( exit $ac_status )
18436 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18437 See \`config.log' for more details." >&5
18438 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18439 See \`config.log' for more details." >&2;}
18440    { (exit 1); exit 1; }; }
18441 fi
18442 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18443 fi
18444 fi
18445 rm -f conftest.val
18446 else
18447   ac_cv_sizeof_unsigned_long=0
18448 fi
18449 fi
18450 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18451 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18452 cat >>confdefs.h <<_ACEOF
18453 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18454 _ACEOF
18455
18456
18457
18458 # And one for the size of size_t (enables tweaks for > 32bit address space)
18459 echo "$as_me:$LINENO: checking for size_t" >&5
18460 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18461 if test "${ac_cv_type_size_t+set}" = set; then
18462   echo $ECHO_N "(cached) $ECHO_C" >&6
18463 else
18464   cat >conftest.$ac_ext <<_ACEOF
18465 /* confdefs.h.  */
18466 _ACEOF
18467 cat confdefs.h >>conftest.$ac_ext
18468 cat >>conftest.$ac_ext <<_ACEOF
18469 /* end confdefs.h.  */
18470 $ac_includes_default
18471 int
18472 main ()
18473 {
18474 if ((size_t *) 0)
18475   return 0;
18476 if (sizeof (size_t))
18477   return 0;
18478   ;
18479   return 0;
18480 }
18481 _ACEOF
18482 rm -f conftest.$ac_objext
18483 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18484   (eval $ac_compile) 2>conftest.er1
18485   ac_status=$?
18486   grep -v '^ *+' conftest.er1 >conftest.err
18487   rm -f conftest.er1
18488   cat conftest.err >&5
18489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18490   (exit $ac_status); } &&
18491          { ac_try='test -z "$ac_c_werror_flag"
18492                          || test ! -s conftest.err'
18493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18494   (eval $ac_try) 2>&5
18495   ac_status=$?
18496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18497   (exit $ac_status); }; } &&
18498          { ac_try='test -s conftest.$ac_objext'
18499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18500   (eval $ac_try) 2>&5
18501   ac_status=$?
18502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18503   (exit $ac_status); }; }; then
18504   ac_cv_type_size_t=yes
18505 else
18506   echo "$as_me: failed program was:" >&5
18507 sed 's/^/| /' conftest.$ac_ext >&5
18508
18509 ac_cv_type_size_t=no
18510 fi
18511 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18512 fi
18513 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18514 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18515
18516 echo "$as_me:$LINENO: checking size of size_t" >&5
18517 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18518 if test "${ac_cv_sizeof_size_t+set}" = set; then
18519   echo $ECHO_N "(cached) $ECHO_C" >&6
18520 else
18521   if test "$ac_cv_type_size_t" = yes; then
18522   # The cast to unsigned long works around a bug in the HP C Compiler
18523   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18524   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18525   # This bug is HP SR number 8606223364.
18526   if test "$cross_compiling" = yes; then
18527   # Depending upon the size, compute the lo and hi bounds.
18528 cat >conftest.$ac_ext <<_ACEOF
18529 /* confdefs.h.  */
18530 _ACEOF
18531 cat confdefs.h >>conftest.$ac_ext
18532 cat >>conftest.$ac_ext <<_ACEOF
18533 /* end confdefs.h.  */
18534 $ac_includes_default
18535 int
18536 main ()
18537 {
18538 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18539 test_array [0] = 0
18540
18541   ;
18542   return 0;
18543 }
18544 _ACEOF
18545 rm -f conftest.$ac_objext
18546 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18547   (eval $ac_compile) 2>conftest.er1
18548   ac_status=$?
18549   grep -v '^ *+' conftest.er1 >conftest.err
18550   rm -f conftest.er1
18551   cat conftest.err >&5
18552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18553   (exit $ac_status); } &&
18554          { ac_try='test -z "$ac_c_werror_flag"
18555                          || test ! -s conftest.err'
18556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18557   (eval $ac_try) 2>&5
18558   ac_status=$?
18559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18560   (exit $ac_status); }; } &&
18561          { ac_try='test -s conftest.$ac_objext'
18562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18563   (eval $ac_try) 2>&5
18564   ac_status=$?
18565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18566   (exit $ac_status); }; }; then
18567   ac_lo=0 ac_mid=0
18568   while :; do
18569     cat >conftest.$ac_ext <<_ACEOF
18570 /* confdefs.h.  */
18571 _ACEOF
18572 cat confdefs.h >>conftest.$ac_ext
18573 cat >>conftest.$ac_ext <<_ACEOF
18574 /* end confdefs.h.  */
18575 $ac_includes_default
18576 int
18577 main ()
18578 {
18579 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18580 test_array [0] = 0
18581
18582   ;
18583   return 0;
18584 }
18585 _ACEOF
18586 rm -f conftest.$ac_objext
18587 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18588   (eval $ac_compile) 2>conftest.er1
18589   ac_status=$?
18590   grep -v '^ *+' conftest.er1 >conftest.err
18591   rm -f conftest.er1
18592   cat conftest.err >&5
18593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18594   (exit $ac_status); } &&
18595          { ac_try='test -z "$ac_c_werror_flag"
18596                          || test ! -s conftest.err'
18597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18598   (eval $ac_try) 2>&5
18599   ac_status=$?
18600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18601   (exit $ac_status); }; } &&
18602          { ac_try='test -s conftest.$ac_objext'
18603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18604   (eval $ac_try) 2>&5
18605   ac_status=$?
18606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18607   (exit $ac_status); }; }; then
18608   ac_hi=$ac_mid; break
18609 else
18610   echo "$as_me: failed program was:" >&5
18611 sed 's/^/| /' conftest.$ac_ext >&5
18612
18613 ac_lo=`expr $ac_mid + 1`
18614                     if test $ac_lo -le $ac_mid; then
18615                       ac_lo= ac_hi=
18616                       break
18617                     fi
18618                     ac_mid=`expr 2 '*' $ac_mid + 1`
18619 fi
18620 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18621   done
18622 else
18623   echo "$as_me: failed program was:" >&5
18624 sed 's/^/| /' conftest.$ac_ext >&5
18625
18626 cat >conftest.$ac_ext <<_ACEOF
18627 /* confdefs.h.  */
18628 _ACEOF
18629 cat confdefs.h >>conftest.$ac_ext
18630 cat >>conftest.$ac_ext <<_ACEOF
18631 /* end confdefs.h.  */
18632 $ac_includes_default
18633 int
18634 main ()
18635 {
18636 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18637 test_array [0] = 0
18638
18639   ;
18640   return 0;
18641 }
18642 _ACEOF
18643 rm -f conftest.$ac_objext
18644 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18645   (eval $ac_compile) 2>conftest.er1
18646   ac_status=$?
18647   grep -v '^ *+' conftest.er1 >conftest.err
18648   rm -f conftest.er1
18649   cat conftest.err >&5
18650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18651   (exit $ac_status); } &&
18652          { ac_try='test -z "$ac_c_werror_flag"
18653                          || test ! -s conftest.err'
18654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18655   (eval $ac_try) 2>&5
18656   ac_status=$?
18657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18658   (exit $ac_status); }; } &&
18659          { ac_try='test -s conftest.$ac_objext'
18660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18661   (eval $ac_try) 2>&5
18662   ac_status=$?
18663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18664   (exit $ac_status); }; }; then
18665   ac_hi=-1 ac_mid=-1
18666   while :; do
18667     cat >conftest.$ac_ext <<_ACEOF
18668 /* confdefs.h.  */
18669 _ACEOF
18670 cat confdefs.h >>conftest.$ac_ext
18671 cat >>conftest.$ac_ext <<_ACEOF
18672 /* end confdefs.h.  */
18673 $ac_includes_default
18674 int
18675 main ()
18676 {
18677 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18678 test_array [0] = 0
18679
18680   ;
18681   return 0;
18682 }
18683 _ACEOF
18684 rm -f conftest.$ac_objext
18685 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18686   (eval $ac_compile) 2>conftest.er1
18687   ac_status=$?
18688   grep -v '^ *+' conftest.er1 >conftest.err
18689   rm -f conftest.er1
18690   cat conftest.err >&5
18691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18692   (exit $ac_status); } &&
18693          { ac_try='test -z "$ac_c_werror_flag"
18694                          || test ! -s conftest.err'
18695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18696   (eval $ac_try) 2>&5
18697   ac_status=$?
18698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18699   (exit $ac_status); }; } &&
18700          { ac_try='test -s conftest.$ac_objext'
18701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18702   (eval $ac_try) 2>&5
18703   ac_status=$?
18704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18705   (exit $ac_status); }; }; then
18706   ac_lo=$ac_mid; break
18707 else
18708   echo "$as_me: failed program was:" >&5
18709 sed 's/^/| /' conftest.$ac_ext >&5
18710
18711 ac_hi=`expr '(' $ac_mid ')' - 1`
18712                        if test $ac_mid -le $ac_hi; then
18713                          ac_lo= ac_hi=
18714                          break
18715                        fi
18716                        ac_mid=`expr 2 '*' $ac_mid`
18717 fi
18718 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18719   done
18720 else
18721   echo "$as_me: failed program was:" >&5
18722 sed 's/^/| /' conftest.$ac_ext >&5
18723
18724 ac_lo= ac_hi=
18725 fi
18726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18727 fi
18728 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18729 # Binary search between lo and hi bounds.
18730 while test "x$ac_lo" != "x$ac_hi"; do
18731   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18732   cat >conftest.$ac_ext <<_ACEOF
18733 /* confdefs.h.  */
18734 _ACEOF
18735 cat confdefs.h >>conftest.$ac_ext
18736 cat >>conftest.$ac_ext <<_ACEOF
18737 /* end confdefs.h.  */
18738 $ac_includes_default
18739 int
18740 main ()
18741 {
18742 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18743 test_array [0] = 0
18744
18745   ;
18746   return 0;
18747 }
18748 _ACEOF
18749 rm -f conftest.$ac_objext
18750 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18751   (eval $ac_compile) 2>conftest.er1
18752   ac_status=$?
18753   grep -v '^ *+' conftest.er1 >conftest.err
18754   rm -f conftest.er1
18755   cat conftest.err >&5
18756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18757   (exit $ac_status); } &&
18758          { ac_try='test -z "$ac_c_werror_flag"
18759                          || test ! -s conftest.err'
18760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18761   (eval $ac_try) 2>&5
18762   ac_status=$?
18763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18764   (exit $ac_status); }; } &&
18765          { ac_try='test -s conftest.$ac_objext'
18766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18767   (eval $ac_try) 2>&5
18768   ac_status=$?
18769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18770   (exit $ac_status); }; }; then
18771   ac_hi=$ac_mid
18772 else
18773   echo "$as_me: failed program was:" >&5
18774 sed 's/^/| /' conftest.$ac_ext >&5
18775
18776 ac_lo=`expr '(' $ac_mid ')' + 1`
18777 fi
18778 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18779 done
18780 case $ac_lo in
18781 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18782 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18783 See \`config.log' for more details." >&5
18784 echo "$as_me: error: cannot compute sizeof (size_t), 77
18785 See \`config.log' for more details." >&2;}
18786    { (exit 1); exit 1; }; } ;;
18787 esac
18788 else
18789   if test "$cross_compiling" = yes; then
18790   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18791 See \`config.log' for more details." >&5
18792 echo "$as_me: error: cannot run test program while cross compiling
18793 See \`config.log' for more details." >&2;}
18794    { (exit 1); exit 1; }; }
18795 else
18796   cat >conftest.$ac_ext <<_ACEOF
18797 /* confdefs.h.  */
18798 _ACEOF
18799 cat confdefs.h >>conftest.$ac_ext
18800 cat >>conftest.$ac_ext <<_ACEOF
18801 /* end confdefs.h.  */
18802 $ac_includes_default
18803 long longval () { return (long) (sizeof (size_t)); }
18804 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18805 #include <stdio.h>
18806 #include <stdlib.h>
18807 int
18808 main ()
18809 {
18810
18811   FILE *f = fopen ("conftest.val", "w");
18812   if (! f)
18813     exit (1);
18814   if (((long) (sizeof (size_t))) < 0)
18815     {
18816       long i = longval ();
18817       if (i != ((long) (sizeof (size_t))))
18818         exit (1);
18819       fprintf (f, "%ld\n", i);
18820     }
18821   else
18822     {
18823       unsigned long i = ulongval ();
18824       if (i != ((long) (sizeof (size_t))))
18825         exit (1);
18826       fprintf (f, "%lu\n", i);
18827     }
18828   exit (ferror (f) || fclose (f) != 0);
18829
18830   ;
18831   return 0;
18832 }
18833 _ACEOF
18834 rm -f conftest$ac_exeext
18835 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18836   (eval $ac_link) 2>&5
18837   ac_status=$?
18838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18839   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18841   (eval $ac_try) 2>&5
18842   ac_status=$?
18843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18844   (exit $ac_status); }; }; then
18845   ac_cv_sizeof_size_t=`cat conftest.val`
18846 else
18847   echo "$as_me: program exited with status $ac_status" >&5
18848 echo "$as_me: failed program was:" >&5
18849 sed 's/^/| /' conftest.$ac_ext >&5
18850
18851 ( exit $ac_status )
18852 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18853 See \`config.log' for more details." >&5
18854 echo "$as_me: error: cannot compute sizeof (size_t), 77
18855 See \`config.log' for more details." >&2;}
18856    { (exit 1); exit 1; }; }
18857 fi
18858 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18859 fi
18860 fi
18861 rm -f conftest.val
18862 else
18863   ac_cv_sizeof_size_t=0
18864 fi
18865 fi
18866 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18867 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18868 cat >>confdefs.h <<_ACEOF
18869 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18870 _ACEOF
18871
18872
18873
18874 # Determine memory alignment requirements for the basic C data types.
18875
18876 echo "$as_me:$LINENO: checking for short" >&5
18877 echo $ECHO_N "checking for short... $ECHO_C" >&6
18878 if test "${ac_cv_type_short+set}" = set; then
18879   echo $ECHO_N "(cached) $ECHO_C" >&6
18880 else
18881   cat >conftest.$ac_ext <<_ACEOF
18882 /* confdefs.h.  */
18883 _ACEOF
18884 cat confdefs.h >>conftest.$ac_ext
18885 cat >>conftest.$ac_ext <<_ACEOF
18886 /* end confdefs.h.  */
18887 $ac_includes_default
18888 int
18889 main ()
18890 {
18891 if ((short *) 0)
18892   return 0;
18893 if (sizeof (short))
18894   return 0;
18895   ;
18896   return 0;
18897 }
18898 _ACEOF
18899 rm -f conftest.$ac_objext
18900 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18901   (eval $ac_compile) 2>conftest.er1
18902   ac_status=$?
18903   grep -v '^ *+' conftest.er1 >conftest.err
18904   rm -f conftest.er1
18905   cat conftest.err >&5
18906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18907   (exit $ac_status); } &&
18908          { ac_try='test -z "$ac_c_werror_flag"
18909                          || test ! -s conftest.err'
18910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18911   (eval $ac_try) 2>&5
18912   ac_status=$?
18913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18914   (exit $ac_status); }; } &&
18915          { ac_try='test -s conftest.$ac_objext'
18916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18917   (eval $ac_try) 2>&5
18918   ac_status=$?
18919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18920   (exit $ac_status); }; }; then
18921   ac_cv_type_short=yes
18922 else
18923   echo "$as_me: failed program was:" >&5
18924 sed 's/^/| /' conftest.$ac_ext >&5
18925
18926 ac_cv_type_short=no
18927 fi
18928 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18929 fi
18930 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18931 echo "${ECHO_T}$ac_cv_type_short" >&6
18932
18933 echo "$as_me:$LINENO: checking alignment of short" >&5
18934 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18935 if test "${pgac_cv_alignof_short+set}" = set; then
18936   echo $ECHO_N "(cached) $ECHO_C" >&6
18937 else
18938   if test "$ac_cv_type_short" = yes; then
18939   if test "$cross_compiling" = yes; then
18940   # Depending upon the size, compute the lo and hi bounds.
18941 cat >conftest.$ac_ext <<_ACEOF
18942 /* confdefs.h.  */
18943 _ACEOF
18944 cat confdefs.h >>conftest.$ac_ext
18945 cat >>conftest.$ac_ext <<_ACEOF
18946 /* end confdefs.h.  */
18947 $ac_includes_default
18948 struct { char filler; short field; } pgac_struct;
18949 int
18950 main ()
18951 {
18952 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18953 test_array [0] = 0
18954
18955   ;
18956   return 0;
18957 }
18958 _ACEOF
18959 rm -f conftest.$ac_objext
18960 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18961   (eval $ac_compile) 2>conftest.er1
18962   ac_status=$?
18963   grep -v '^ *+' conftest.er1 >conftest.err
18964   rm -f conftest.er1
18965   cat conftest.err >&5
18966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18967   (exit $ac_status); } &&
18968          { ac_try='test -z "$ac_c_werror_flag"
18969                          || test ! -s conftest.err'
18970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18971   (eval $ac_try) 2>&5
18972   ac_status=$?
18973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18974   (exit $ac_status); }; } &&
18975          { ac_try='test -s conftest.$ac_objext'
18976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18977   (eval $ac_try) 2>&5
18978   ac_status=$?
18979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18980   (exit $ac_status); }; }; then
18981   ac_lo=0 ac_mid=0
18982   while :; do
18983     cat >conftest.$ac_ext <<_ACEOF
18984 /* confdefs.h.  */
18985 _ACEOF
18986 cat confdefs.h >>conftest.$ac_ext
18987 cat >>conftest.$ac_ext <<_ACEOF
18988 /* end confdefs.h.  */
18989 $ac_includes_default
18990 struct { char filler; short field; } pgac_struct;
18991 int
18992 main ()
18993 {
18994 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18995 test_array [0] = 0
18996
18997   ;
18998   return 0;
18999 }
19000 _ACEOF
19001 rm -f conftest.$ac_objext
19002 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19003   (eval $ac_compile) 2>conftest.er1
19004   ac_status=$?
19005   grep -v '^ *+' conftest.er1 >conftest.err
19006   rm -f conftest.er1
19007   cat conftest.err >&5
19008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19009   (exit $ac_status); } &&
19010          { ac_try='test -z "$ac_c_werror_flag"
19011                          || test ! -s conftest.err'
19012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19013   (eval $ac_try) 2>&5
19014   ac_status=$?
19015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19016   (exit $ac_status); }; } &&
19017          { ac_try='test -s conftest.$ac_objext'
19018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19019   (eval $ac_try) 2>&5
19020   ac_status=$?
19021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19022   (exit $ac_status); }; }; then
19023   ac_hi=$ac_mid; break
19024 else
19025   echo "$as_me: failed program was:" >&5
19026 sed 's/^/| /' conftest.$ac_ext >&5
19027
19028 ac_lo=`expr $ac_mid + 1`
19029                     if test $ac_lo -le $ac_mid; then
19030                       ac_lo= ac_hi=
19031                       break
19032                     fi
19033                     ac_mid=`expr 2 '*' $ac_mid + 1`
19034 fi
19035 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19036   done
19037 else
19038   echo "$as_me: failed program was:" >&5
19039 sed 's/^/| /' conftest.$ac_ext >&5
19040
19041 cat >conftest.$ac_ext <<_ACEOF
19042 /* confdefs.h.  */
19043 _ACEOF
19044 cat confdefs.h >>conftest.$ac_ext
19045 cat >>conftest.$ac_ext <<_ACEOF
19046 /* end confdefs.h.  */
19047 $ac_includes_default
19048 struct { char filler; short field; } pgac_struct;
19049 int
19050 main ()
19051 {
19052 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19053 test_array [0] = 0
19054
19055   ;
19056   return 0;
19057 }
19058 _ACEOF
19059 rm -f conftest.$ac_objext
19060 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19061   (eval $ac_compile) 2>conftest.er1
19062   ac_status=$?
19063   grep -v '^ *+' conftest.er1 >conftest.err
19064   rm -f conftest.er1
19065   cat conftest.err >&5
19066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19067   (exit $ac_status); } &&
19068          { ac_try='test -z "$ac_c_werror_flag"
19069                          || test ! -s conftest.err'
19070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19071   (eval $ac_try) 2>&5
19072   ac_status=$?
19073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19074   (exit $ac_status); }; } &&
19075          { ac_try='test -s conftest.$ac_objext'
19076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19077   (eval $ac_try) 2>&5
19078   ac_status=$?
19079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19080   (exit $ac_status); }; }; then
19081   ac_hi=-1 ac_mid=-1
19082   while :; do
19083     cat >conftest.$ac_ext <<_ACEOF
19084 /* confdefs.h.  */
19085 _ACEOF
19086 cat confdefs.h >>conftest.$ac_ext
19087 cat >>conftest.$ac_ext <<_ACEOF
19088 /* end confdefs.h.  */
19089 $ac_includes_default
19090 struct { char filler; short field; } pgac_struct;
19091 int
19092 main ()
19093 {
19094 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19095 test_array [0] = 0
19096
19097   ;
19098   return 0;
19099 }
19100 _ACEOF
19101 rm -f conftest.$ac_objext
19102 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19103   (eval $ac_compile) 2>conftest.er1
19104   ac_status=$?
19105   grep -v '^ *+' conftest.er1 >conftest.err
19106   rm -f conftest.er1
19107   cat conftest.err >&5
19108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19109   (exit $ac_status); } &&
19110          { ac_try='test -z "$ac_c_werror_flag"
19111                          || test ! -s conftest.err'
19112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19113   (eval $ac_try) 2>&5
19114   ac_status=$?
19115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19116   (exit $ac_status); }; } &&
19117          { ac_try='test -s conftest.$ac_objext'
19118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19119   (eval $ac_try) 2>&5
19120   ac_status=$?
19121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19122   (exit $ac_status); }; }; then
19123   ac_lo=$ac_mid; break
19124 else
19125   echo "$as_me: failed program was:" >&5
19126 sed 's/^/| /' conftest.$ac_ext >&5
19127
19128 ac_hi=`expr '(' $ac_mid ')' - 1`
19129                        if test $ac_mid -le $ac_hi; then
19130                          ac_lo= ac_hi=
19131                          break
19132                        fi
19133                        ac_mid=`expr 2 '*' $ac_mid`
19134 fi
19135 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19136   done
19137 else
19138   echo "$as_me: failed program was:" >&5
19139 sed 's/^/| /' conftest.$ac_ext >&5
19140
19141 ac_lo= ac_hi=
19142 fi
19143 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19144 fi
19145 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19146 # Binary search between lo and hi bounds.
19147 while test "x$ac_lo" != "x$ac_hi"; do
19148   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19149   cat >conftest.$ac_ext <<_ACEOF
19150 /* confdefs.h.  */
19151 _ACEOF
19152 cat confdefs.h >>conftest.$ac_ext
19153 cat >>conftest.$ac_ext <<_ACEOF
19154 /* end confdefs.h.  */
19155 $ac_includes_default
19156 struct { char filler; short field; } pgac_struct;
19157 int
19158 main ()
19159 {
19160 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19161 test_array [0] = 0
19162
19163   ;
19164   return 0;
19165 }
19166 _ACEOF
19167 rm -f conftest.$ac_objext
19168 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19169   (eval $ac_compile) 2>conftest.er1
19170   ac_status=$?
19171   grep -v '^ *+' conftest.er1 >conftest.err
19172   rm -f conftest.er1
19173   cat conftest.err >&5
19174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19175   (exit $ac_status); } &&
19176          { ac_try='test -z "$ac_c_werror_flag"
19177                          || test ! -s conftest.err'
19178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19179   (eval $ac_try) 2>&5
19180   ac_status=$?
19181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19182   (exit $ac_status); }; } &&
19183          { ac_try='test -s conftest.$ac_objext'
19184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19185   (eval $ac_try) 2>&5
19186   ac_status=$?
19187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19188   (exit $ac_status); }; }; then
19189   ac_hi=$ac_mid
19190 else
19191   echo "$as_me: failed program was:" >&5
19192 sed 's/^/| /' conftest.$ac_ext >&5
19193
19194 ac_lo=`expr '(' $ac_mid ')' + 1`
19195 fi
19196 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19197 done
19198 case $ac_lo in
19199 ?*) pgac_cv_alignof_short=$ac_lo;;
19200 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19201 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19202    { (exit 1); exit 1; }; } ;;
19203 esac
19204 else
19205   if test "$cross_compiling" = yes; then
19206   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19207 See \`config.log' for more details." >&5
19208 echo "$as_me: error: cannot run test program while cross compiling
19209 See \`config.log' for more details." >&2;}
19210    { (exit 1); exit 1; }; }
19211 else
19212   cat >conftest.$ac_ext <<_ACEOF
19213 /* confdefs.h.  */
19214 _ACEOF
19215 cat confdefs.h >>conftest.$ac_ext
19216 cat >>conftest.$ac_ext <<_ACEOF
19217 /* end confdefs.h.  */
19218 $ac_includes_default
19219 struct { char filler; short field; } pgac_struct;
19220 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19221 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19222 #include <stdio.h>
19223 #include <stdlib.h>
19224 int
19225 main ()
19226 {
19227
19228   FILE *f = fopen ("conftest.val", "w");
19229   if (! f)
19230     exit (1);
19231   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19232     {
19233       long i = longval ();
19234       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19235         exit (1);
19236       fprintf (f, "%ld\n", i);
19237     }
19238   else
19239     {
19240       unsigned long i = ulongval ();
19241       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19242         exit (1);
19243       fprintf (f, "%lu\n", i);
19244     }
19245   exit (ferror (f) || fclose (f) != 0);
19246
19247   ;
19248   return 0;
19249 }
19250 _ACEOF
19251 rm -f conftest$ac_exeext
19252 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19253   (eval $ac_link) 2>&5
19254   ac_status=$?
19255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19256   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19258   (eval $ac_try) 2>&5
19259   ac_status=$?
19260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19261   (exit $ac_status); }; }; then
19262   pgac_cv_alignof_short=`cat conftest.val`
19263 else
19264   echo "$as_me: program exited with status $ac_status" >&5
19265 echo "$as_me: failed program was:" >&5
19266 sed 's/^/| /' conftest.$ac_ext >&5
19267
19268 ( exit $ac_status )
19269 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19270 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19271    { (exit 1); exit 1; }; }
19272 fi
19273 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19274 fi
19275 fi
19276 rm -f conftest.val
19277 else
19278   pgac_cv_alignof_short=0
19279 fi
19280 fi
19281 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19282 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19283 cat >>confdefs.h <<_ACEOF
19284 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19285 _ACEOF
19286
19287
19288 echo "$as_me:$LINENO: checking for int" >&5
19289 echo $ECHO_N "checking for int... $ECHO_C" >&6
19290 if test "${ac_cv_type_int+set}" = set; then
19291   echo $ECHO_N "(cached) $ECHO_C" >&6
19292 else
19293   cat >conftest.$ac_ext <<_ACEOF
19294 /* confdefs.h.  */
19295 _ACEOF
19296 cat confdefs.h >>conftest.$ac_ext
19297 cat >>conftest.$ac_ext <<_ACEOF
19298 /* end confdefs.h.  */
19299 $ac_includes_default
19300 int
19301 main ()
19302 {
19303 if ((int *) 0)
19304   return 0;
19305 if (sizeof (int))
19306   return 0;
19307   ;
19308   return 0;
19309 }
19310 _ACEOF
19311 rm -f conftest.$ac_objext
19312 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19313   (eval $ac_compile) 2>conftest.er1
19314   ac_status=$?
19315   grep -v '^ *+' conftest.er1 >conftest.err
19316   rm -f conftest.er1
19317   cat conftest.err >&5
19318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19319   (exit $ac_status); } &&
19320          { ac_try='test -z "$ac_c_werror_flag"
19321                          || test ! -s conftest.err'
19322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19323   (eval $ac_try) 2>&5
19324   ac_status=$?
19325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19326   (exit $ac_status); }; } &&
19327          { ac_try='test -s conftest.$ac_objext'
19328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19329   (eval $ac_try) 2>&5
19330   ac_status=$?
19331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19332   (exit $ac_status); }; }; then
19333   ac_cv_type_int=yes
19334 else
19335   echo "$as_me: failed program was:" >&5
19336 sed 's/^/| /' conftest.$ac_ext >&5
19337
19338 ac_cv_type_int=no
19339 fi
19340 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19341 fi
19342 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19343 echo "${ECHO_T}$ac_cv_type_int" >&6
19344
19345 echo "$as_me:$LINENO: checking alignment of int" >&5
19346 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19347 if test "${pgac_cv_alignof_int+set}" = set; then
19348   echo $ECHO_N "(cached) $ECHO_C" >&6
19349 else
19350   if test "$ac_cv_type_int" = yes; then
19351   if test "$cross_compiling" = yes; then
19352   # Depending upon the size, compute the lo and hi bounds.
19353 cat >conftest.$ac_ext <<_ACEOF
19354 /* confdefs.h.  */
19355 _ACEOF
19356 cat confdefs.h >>conftest.$ac_ext
19357 cat >>conftest.$ac_ext <<_ACEOF
19358 /* end confdefs.h.  */
19359 $ac_includes_default
19360 struct { char filler; int field; } pgac_struct;
19361 int
19362 main ()
19363 {
19364 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19365 test_array [0] = 0
19366
19367   ;
19368   return 0;
19369 }
19370 _ACEOF
19371 rm -f conftest.$ac_objext
19372 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19373   (eval $ac_compile) 2>conftest.er1
19374   ac_status=$?
19375   grep -v '^ *+' conftest.er1 >conftest.err
19376   rm -f conftest.er1
19377   cat conftest.err >&5
19378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19379   (exit $ac_status); } &&
19380          { ac_try='test -z "$ac_c_werror_flag"
19381                          || test ! -s conftest.err'
19382   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19383   (eval $ac_try) 2>&5
19384   ac_status=$?
19385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19386   (exit $ac_status); }; } &&
19387          { ac_try='test -s conftest.$ac_objext'
19388   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19389   (eval $ac_try) 2>&5
19390   ac_status=$?
19391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19392   (exit $ac_status); }; }; then
19393   ac_lo=0 ac_mid=0
19394   while :; do
19395     cat >conftest.$ac_ext <<_ACEOF
19396 /* confdefs.h.  */
19397 _ACEOF
19398 cat confdefs.h >>conftest.$ac_ext
19399 cat >>conftest.$ac_ext <<_ACEOF
19400 /* end confdefs.h.  */
19401 $ac_includes_default
19402 struct { char filler; int field; } pgac_struct;
19403 int
19404 main ()
19405 {
19406 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19407 test_array [0] = 0
19408
19409   ;
19410   return 0;
19411 }
19412 _ACEOF
19413 rm -f conftest.$ac_objext
19414 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19415   (eval $ac_compile) 2>conftest.er1
19416   ac_status=$?
19417   grep -v '^ *+' conftest.er1 >conftest.err
19418   rm -f conftest.er1
19419   cat conftest.err >&5
19420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19421   (exit $ac_status); } &&
19422          { ac_try='test -z "$ac_c_werror_flag"
19423                          || test ! -s conftest.err'
19424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19425   (eval $ac_try) 2>&5
19426   ac_status=$?
19427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19428   (exit $ac_status); }; } &&
19429          { ac_try='test -s conftest.$ac_objext'
19430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19431   (eval $ac_try) 2>&5
19432   ac_status=$?
19433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19434   (exit $ac_status); }; }; then
19435   ac_hi=$ac_mid; break
19436 else
19437   echo "$as_me: failed program was:" >&5
19438 sed 's/^/| /' conftest.$ac_ext >&5
19439
19440 ac_lo=`expr $ac_mid + 1`
19441                     if test $ac_lo -le $ac_mid; then
19442                       ac_lo= ac_hi=
19443                       break
19444                     fi
19445                     ac_mid=`expr 2 '*' $ac_mid + 1`
19446 fi
19447 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19448   done
19449 else
19450   echo "$as_me: failed program was:" >&5
19451 sed 's/^/| /' conftest.$ac_ext >&5
19452
19453 cat >conftest.$ac_ext <<_ACEOF
19454 /* confdefs.h.  */
19455 _ACEOF
19456 cat confdefs.h >>conftest.$ac_ext
19457 cat >>conftest.$ac_ext <<_ACEOF
19458 /* end confdefs.h.  */
19459 $ac_includes_default
19460 struct { char filler; int field; } pgac_struct;
19461 int
19462 main ()
19463 {
19464 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19465 test_array [0] = 0
19466
19467   ;
19468   return 0;
19469 }
19470 _ACEOF
19471 rm -f conftest.$ac_objext
19472 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19473   (eval $ac_compile) 2>conftest.er1
19474   ac_status=$?
19475   grep -v '^ *+' conftest.er1 >conftest.err
19476   rm -f conftest.er1
19477   cat conftest.err >&5
19478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19479   (exit $ac_status); } &&
19480          { ac_try='test -z "$ac_c_werror_flag"
19481                          || test ! -s conftest.err'
19482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19483   (eval $ac_try) 2>&5
19484   ac_status=$?
19485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19486   (exit $ac_status); }; } &&
19487          { ac_try='test -s conftest.$ac_objext'
19488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19489   (eval $ac_try) 2>&5
19490   ac_status=$?
19491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19492   (exit $ac_status); }; }; then
19493   ac_hi=-1 ac_mid=-1
19494   while :; do
19495     cat >conftest.$ac_ext <<_ACEOF
19496 /* confdefs.h.  */
19497 _ACEOF
19498 cat confdefs.h >>conftest.$ac_ext
19499 cat >>conftest.$ac_ext <<_ACEOF
19500 /* end confdefs.h.  */
19501 $ac_includes_default
19502 struct { char filler; int field; } pgac_struct;
19503 int
19504 main ()
19505 {
19506 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19507 test_array [0] = 0
19508
19509   ;
19510   return 0;
19511 }
19512 _ACEOF
19513 rm -f conftest.$ac_objext
19514 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19515   (eval $ac_compile) 2>conftest.er1
19516   ac_status=$?
19517   grep -v '^ *+' conftest.er1 >conftest.err
19518   rm -f conftest.er1
19519   cat conftest.err >&5
19520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19521   (exit $ac_status); } &&
19522          { ac_try='test -z "$ac_c_werror_flag"
19523                          || test ! -s conftest.err'
19524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19525   (eval $ac_try) 2>&5
19526   ac_status=$?
19527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19528   (exit $ac_status); }; } &&
19529          { ac_try='test -s conftest.$ac_objext'
19530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19531   (eval $ac_try) 2>&5
19532   ac_status=$?
19533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19534   (exit $ac_status); }; }; then
19535   ac_lo=$ac_mid; break
19536 else
19537   echo "$as_me: failed program was:" >&5
19538 sed 's/^/| /' conftest.$ac_ext >&5
19539
19540 ac_hi=`expr '(' $ac_mid ')' - 1`
19541                        if test $ac_mid -le $ac_hi; then
19542                          ac_lo= ac_hi=
19543                          break
19544                        fi
19545                        ac_mid=`expr 2 '*' $ac_mid`
19546 fi
19547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19548   done
19549 else
19550   echo "$as_me: failed program was:" >&5
19551 sed 's/^/| /' conftest.$ac_ext >&5
19552
19553 ac_lo= ac_hi=
19554 fi
19555 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19556 fi
19557 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19558 # Binary search between lo and hi bounds.
19559 while test "x$ac_lo" != "x$ac_hi"; do
19560   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19561   cat >conftest.$ac_ext <<_ACEOF
19562 /* confdefs.h.  */
19563 _ACEOF
19564 cat confdefs.h >>conftest.$ac_ext
19565 cat >>conftest.$ac_ext <<_ACEOF
19566 /* end confdefs.h.  */
19567 $ac_includes_default
19568 struct { char filler; int field; } pgac_struct;
19569 int
19570 main ()
19571 {
19572 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19573 test_array [0] = 0
19574
19575   ;
19576   return 0;
19577 }
19578 _ACEOF
19579 rm -f conftest.$ac_objext
19580 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19581   (eval $ac_compile) 2>conftest.er1
19582   ac_status=$?
19583   grep -v '^ *+' conftest.er1 >conftest.err
19584   rm -f conftest.er1
19585   cat conftest.err >&5
19586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19587   (exit $ac_status); } &&
19588          { ac_try='test -z "$ac_c_werror_flag"
19589                          || test ! -s conftest.err'
19590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19591   (eval $ac_try) 2>&5
19592   ac_status=$?
19593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19594   (exit $ac_status); }; } &&
19595          { ac_try='test -s conftest.$ac_objext'
19596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19597   (eval $ac_try) 2>&5
19598   ac_status=$?
19599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19600   (exit $ac_status); }; }; then
19601   ac_hi=$ac_mid
19602 else
19603   echo "$as_me: failed program was:" >&5
19604 sed 's/^/| /' conftest.$ac_ext >&5
19605
19606 ac_lo=`expr '(' $ac_mid ')' + 1`
19607 fi
19608 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19609 done
19610 case $ac_lo in
19611 ?*) pgac_cv_alignof_int=$ac_lo;;
19612 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19613 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19614    { (exit 1); exit 1; }; } ;;
19615 esac
19616 else
19617   if test "$cross_compiling" = yes; then
19618   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19619 See \`config.log' for more details." >&5
19620 echo "$as_me: error: cannot run test program while cross compiling
19621 See \`config.log' for more details." >&2;}
19622    { (exit 1); exit 1; }; }
19623 else
19624   cat >conftest.$ac_ext <<_ACEOF
19625 /* confdefs.h.  */
19626 _ACEOF
19627 cat confdefs.h >>conftest.$ac_ext
19628 cat >>conftest.$ac_ext <<_ACEOF
19629 /* end confdefs.h.  */
19630 $ac_includes_default
19631 struct { char filler; int field; } pgac_struct;
19632 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19633 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19634 #include <stdio.h>
19635 #include <stdlib.h>
19636 int
19637 main ()
19638 {
19639
19640   FILE *f = fopen ("conftest.val", "w");
19641   if (! f)
19642     exit (1);
19643   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19644     {
19645       long i = longval ();
19646       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19647         exit (1);
19648       fprintf (f, "%ld\n", i);
19649     }
19650   else
19651     {
19652       unsigned long i = ulongval ();
19653       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19654         exit (1);
19655       fprintf (f, "%lu\n", i);
19656     }
19657   exit (ferror (f) || fclose (f) != 0);
19658
19659   ;
19660   return 0;
19661 }
19662 _ACEOF
19663 rm -f conftest$ac_exeext
19664 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19665   (eval $ac_link) 2>&5
19666   ac_status=$?
19667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19668   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19670   (eval $ac_try) 2>&5
19671   ac_status=$?
19672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19673   (exit $ac_status); }; }; then
19674   pgac_cv_alignof_int=`cat conftest.val`
19675 else
19676   echo "$as_me: program exited with status $ac_status" >&5
19677 echo "$as_me: failed program was:" >&5
19678 sed 's/^/| /' conftest.$ac_ext >&5
19679
19680 ( exit $ac_status )
19681 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19682 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19683    { (exit 1); exit 1; }; }
19684 fi
19685 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19686 fi
19687 fi
19688 rm -f conftest.val
19689 else
19690   pgac_cv_alignof_int=0
19691 fi
19692 fi
19693 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19694 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19695 cat >>confdefs.h <<_ACEOF
19696 #define ALIGNOF_INT $pgac_cv_alignof_int
19697 _ACEOF
19698
19699
19700 echo "$as_me:$LINENO: checking for long" >&5
19701 echo $ECHO_N "checking for long... $ECHO_C" >&6
19702 if test "${ac_cv_type_long+set}" = set; then
19703   echo $ECHO_N "(cached) $ECHO_C" >&6
19704 else
19705   cat >conftest.$ac_ext <<_ACEOF
19706 /* confdefs.h.  */
19707 _ACEOF
19708 cat confdefs.h >>conftest.$ac_ext
19709 cat >>conftest.$ac_ext <<_ACEOF
19710 /* end confdefs.h.  */
19711 $ac_includes_default
19712 int
19713 main ()
19714 {
19715 if ((long *) 0)
19716   return 0;
19717 if (sizeof (long))
19718   return 0;
19719   ;
19720   return 0;
19721 }
19722 _ACEOF
19723 rm -f conftest.$ac_objext
19724 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19725   (eval $ac_compile) 2>conftest.er1
19726   ac_status=$?
19727   grep -v '^ *+' conftest.er1 >conftest.err
19728   rm -f conftest.er1
19729   cat conftest.err >&5
19730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19731   (exit $ac_status); } &&
19732          { ac_try='test -z "$ac_c_werror_flag"
19733                          || test ! -s conftest.err'
19734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19735   (eval $ac_try) 2>&5
19736   ac_status=$?
19737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19738   (exit $ac_status); }; } &&
19739          { ac_try='test -s conftest.$ac_objext'
19740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19741   (eval $ac_try) 2>&5
19742   ac_status=$?
19743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19744   (exit $ac_status); }; }; then
19745   ac_cv_type_long=yes
19746 else
19747   echo "$as_me: failed program was:" >&5
19748 sed 's/^/| /' conftest.$ac_ext >&5
19749
19750 ac_cv_type_long=no
19751 fi
19752 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19753 fi
19754 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19755 echo "${ECHO_T}$ac_cv_type_long" >&6
19756
19757 echo "$as_me:$LINENO: checking alignment of long" >&5
19758 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19759 if test "${pgac_cv_alignof_long+set}" = set; then
19760   echo $ECHO_N "(cached) $ECHO_C" >&6
19761 else
19762   if test "$ac_cv_type_long" = yes; then
19763   if test "$cross_compiling" = yes; then
19764   # Depending upon the size, compute the lo and hi bounds.
19765 cat >conftest.$ac_ext <<_ACEOF
19766 /* confdefs.h.  */
19767 _ACEOF
19768 cat confdefs.h >>conftest.$ac_ext
19769 cat >>conftest.$ac_ext <<_ACEOF
19770 /* end confdefs.h.  */
19771 $ac_includes_default
19772 struct { char filler; long field; } pgac_struct;
19773 int
19774 main ()
19775 {
19776 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19777 test_array [0] = 0
19778
19779   ;
19780   return 0;
19781 }
19782 _ACEOF
19783 rm -f conftest.$ac_objext
19784 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19785   (eval $ac_compile) 2>conftest.er1
19786   ac_status=$?
19787   grep -v '^ *+' conftest.er1 >conftest.err
19788   rm -f conftest.er1
19789   cat conftest.err >&5
19790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19791   (exit $ac_status); } &&
19792          { ac_try='test -z "$ac_c_werror_flag"
19793                          || test ! -s conftest.err'
19794   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19795   (eval $ac_try) 2>&5
19796   ac_status=$?
19797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19798   (exit $ac_status); }; } &&
19799          { ac_try='test -s conftest.$ac_objext'
19800   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19801   (eval $ac_try) 2>&5
19802   ac_status=$?
19803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19804   (exit $ac_status); }; }; then
19805   ac_lo=0 ac_mid=0
19806   while :; do
19807     cat >conftest.$ac_ext <<_ACEOF
19808 /* confdefs.h.  */
19809 _ACEOF
19810 cat confdefs.h >>conftest.$ac_ext
19811 cat >>conftest.$ac_ext <<_ACEOF
19812 /* end confdefs.h.  */
19813 $ac_includes_default
19814 struct { char filler; long field; } pgac_struct;
19815 int
19816 main ()
19817 {
19818 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19819 test_array [0] = 0
19820
19821   ;
19822   return 0;
19823 }
19824 _ACEOF
19825 rm -f conftest.$ac_objext
19826 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19827   (eval $ac_compile) 2>conftest.er1
19828   ac_status=$?
19829   grep -v '^ *+' conftest.er1 >conftest.err
19830   rm -f conftest.er1
19831   cat conftest.err >&5
19832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19833   (exit $ac_status); } &&
19834          { ac_try='test -z "$ac_c_werror_flag"
19835                          || test ! -s conftest.err'
19836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19837   (eval $ac_try) 2>&5
19838   ac_status=$?
19839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19840   (exit $ac_status); }; } &&
19841          { ac_try='test -s conftest.$ac_objext'
19842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19843   (eval $ac_try) 2>&5
19844   ac_status=$?
19845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19846   (exit $ac_status); }; }; then
19847   ac_hi=$ac_mid; break
19848 else
19849   echo "$as_me: failed program was:" >&5
19850 sed 's/^/| /' conftest.$ac_ext >&5
19851
19852 ac_lo=`expr $ac_mid + 1`
19853                     if test $ac_lo -le $ac_mid; then
19854                       ac_lo= ac_hi=
19855                       break
19856                     fi
19857                     ac_mid=`expr 2 '*' $ac_mid + 1`
19858 fi
19859 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19860   done
19861 else
19862   echo "$as_me: failed program was:" >&5
19863 sed 's/^/| /' conftest.$ac_ext >&5
19864
19865 cat >conftest.$ac_ext <<_ACEOF
19866 /* confdefs.h.  */
19867 _ACEOF
19868 cat confdefs.h >>conftest.$ac_ext
19869 cat >>conftest.$ac_ext <<_ACEOF
19870 /* end confdefs.h.  */
19871 $ac_includes_default
19872 struct { char filler; long field; } pgac_struct;
19873 int
19874 main ()
19875 {
19876 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19877 test_array [0] = 0
19878
19879   ;
19880   return 0;
19881 }
19882 _ACEOF
19883 rm -f conftest.$ac_objext
19884 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19885   (eval $ac_compile) 2>conftest.er1
19886   ac_status=$?
19887   grep -v '^ *+' conftest.er1 >conftest.err
19888   rm -f conftest.er1
19889   cat conftest.err >&5
19890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19891   (exit $ac_status); } &&
19892          { ac_try='test -z "$ac_c_werror_flag"
19893                          || test ! -s conftest.err'
19894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19895   (eval $ac_try) 2>&5
19896   ac_status=$?
19897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19898   (exit $ac_status); }; } &&
19899          { ac_try='test -s conftest.$ac_objext'
19900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19901   (eval $ac_try) 2>&5
19902   ac_status=$?
19903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19904   (exit $ac_status); }; }; then
19905   ac_hi=-1 ac_mid=-1
19906   while :; do
19907     cat >conftest.$ac_ext <<_ACEOF
19908 /* confdefs.h.  */
19909 _ACEOF
19910 cat confdefs.h >>conftest.$ac_ext
19911 cat >>conftest.$ac_ext <<_ACEOF
19912 /* end confdefs.h.  */
19913 $ac_includes_default
19914 struct { char filler; long field; } pgac_struct;
19915 int
19916 main ()
19917 {
19918 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19919 test_array [0] = 0
19920
19921   ;
19922   return 0;
19923 }
19924 _ACEOF
19925 rm -f conftest.$ac_objext
19926 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19927   (eval $ac_compile) 2>conftest.er1
19928   ac_status=$?
19929   grep -v '^ *+' conftest.er1 >conftest.err
19930   rm -f conftest.er1
19931   cat conftest.err >&5
19932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19933   (exit $ac_status); } &&
19934          { ac_try='test -z "$ac_c_werror_flag"
19935                          || test ! -s conftest.err'
19936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19937   (eval $ac_try) 2>&5
19938   ac_status=$?
19939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19940   (exit $ac_status); }; } &&
19941          { ac_try='test -s conftest.$ac_objext'
19942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19943   (eval $ac_try) 2>&5
19944   ac_status=$?
19945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19946   (exit $ac_status); }; }; then
19947   ac_lo=$ac_mid; break
19948 else
19949   echo "$as_me: failed program was:" >&5
19950 sed 's/^/| /' conftest.$ac_ext >&5
19951
19952 ac_hi=`expr '(' $ac_mid ')' - 1`
19953                        if test $ac_mid -le $ac_hi; then
19954                          ac_lo= ac_hi=
19955                          break
19956                        fi
19957                        ac_mid=`expr 2 '*' $ac_mid`
19958 fi
19959 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19960   done
19961 else
19962   echo "$as_me: failed program was:" >&5
19963 sed 's/^/| /' conftest.$ac_ext >&5
19964
19965 ac_lo= ac_hi=
19966 fi
19967 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19968 fi
19969 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19970 # Binary search between lo and hi bounds.
19971 while test "x$ac_lo" != "x$ac_hi"; do
19972   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19973   cat >conftest.$ac_ext <<_ACEOF
19974 /* confdefs.h.  */
19975 _ACEOF
19976 cat confdefs.h >>conftest.$ac_ext
19977 cat >>conftest.$ac_ext <<_ACEOF
19978 /* end confdefs.h.  */
19979 $ac_includes_default
19980 struct { char filler; long field; } pgac_struct;
19981 int
19982 main ()
19983 {
19984 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19985 test_array [0] = 0
19986
19987   ;
19988   return 0;
19989 }
19990 _ACEOF
19991 rm -f conftest.$ac_objext
19992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19993   (eval $ac_compile) 2>conftest.er1
19994   ac_status=$?
19995   grep -v '^ *+' conftest.er1 >conftest.err
19996   rm -f conftest.er1
19997   cat conftest.err >&5
19998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19999   (exit $ac_status); } &&
20000          { ac_try='test -z "$ac_c_werror_flag"
20001                          || test ! -s conftest.err'
20002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20003   (eval $ac_try) 2>&5
20004   ac_status=$?
20005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20006   (exit $ac_status); }; } &&
20007          { ac_try='test -s conftest.$ac_objext'
20008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20009   (eval $ac_try) 2>&5
20010   ac_status=$?
20011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20012   (exit $ac_status); }; }; then
20013   ac_hi=$ac_mid
20014 else
20015   echo "$as_me: failed program was:" >&5
20016 sed 's/^/| /' conftest.$ac_ext >&5
20017
20018 ac_lo=`expr '(' $ac_mid ')' + 1`
20019 fi
20020 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20021 done
20022 case $ac_lo in
20023 ?*) pgac_cv_alignof_long=$ac_lo;;
20024 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20025 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20026    { (exit 1); exit 1; }; } ;;
20027 esac
20028 else
20029   if test "$cross_compiling" = yes; then
20030   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20031 See \`config.log' for more details." >&5
20032 echo "$as_me: error: cannot run test program while cross compiling
20033 See \`config.log' for more details." >&2;}
20034    { (exit 1); exit 1; }; }
20035 else
20036   cat >conftest.$ac_ext <<_ACEOF
20037 /* confdefs.h.  */
20038 _ACEOF
20039 cat confdefs.h >>conftest.$ac_ext
20040 cat >>conftest.$ac_ext <<_ACEOF
20041 /* end confdefs.h.  */
20042 $ac_includes_default
20043 struct { char filler; long field; } pgac_struct;
20044 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20045 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20046 #include <stdio.h>
20047 #include <stdlib.h>
20048 int
20049 main ()
20050 {
20051
20052   FILE *f = fopen ("conftest.val", "w");
20053   if (! f)
20054     exit (1);
20055   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20056     {
20057       long i = longval ();
20058       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20059         exit (1);
20060       fprintf (f, "%ld\n", i);
20061     }
20062   else
20063     {
20064       unsigned long i = ulongval ();
20065       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20066         exit (1);
20067       fprintf (f, "%lu\n", i);
20068     }
20069   exit (ferror (f) || fclose (f) != 0);
20070
20071   ;
20072   return 0;
20073 }
20074 _ACEOF
20075 rm -f conftest$ac_exeext
20076 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20077   (eval $ac_link) 2>&5
20078   ac_status=$?
20079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20080   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20082   (eval $ac_try) 2>&5
20083   ac_status=$?
20084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20085   (exit $ac_status); }; }; then
20086   pgac_cv_alignof_long=`cat conftest.val`
20087 else
20088   echo "$as_me: program exited with status $ac_status" >&5
20089 echo "$as_me: failed program was:" >&5
20090 sed 's/^/| /' conftest.$ac_ext >&5
20091
20092 ( exit $ac_status )
20093 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20094 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20095    { (exit 1); exit 1; }; }
20096 fi
20097 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20098 fi
20099 fi
20100 rm -f conftest.val
20101 else
20102   pgac_cv_alignof_long=0
20103 fi
20104 fi
20105 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
20106 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
20107 cat >>confdefs.h <<_ACEOF
20108 #define ALIGNOF_LONG $pgac_cv_alignof_long
20109 _ACEOF
20110
20111
20112 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
20113   echo "$as_me:$LINENO: checking for long long int" >&5
20114 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
20115 if test "${ac_cv_type_long_long_int+set}" = set; then
20116   echo $ECHO_N "(cached) $ECHO_C" >&6
20117 else
20118   cat >conftest.$ac_ext <<_ACEOF
20119 /* confdefs.h.  */
20120 _ACEOF
20121 cat confdefs.h >>conftest.$ac_ext
20122 cat >>conftest.$ac_ext <<_ACEOF
20123 /* end confdefs.h.  */
20124 $ac_includes_default
20125 int
20126 main ()
20127 {
20128 if ((long long int *) 0)
20129   return 0;
20130 if (sizeof (long long int))
20131   return 0;
20132   ;
20133   return 0;
20134 }
20135 _ACEOF
20136 rm -f conftest.$ac_objext
20137 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20138   (eval $ac_compile) 2>conftest.er1
20139   ac_status=$?
20140   grep -v '^ *+' conftest.er1 >conftest.err
20141   rm -f conftest.er1
20142   cat conftest.err >&5
20143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20144   (exit $ac_status); } &&
20145          { ac_try='test -z "$ac_c_werror_flag"
20146                          || test ! -s conftest.err'
20147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20148   (eval $ac_try) 2>&5
20149   ac_status=$?
20150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20151   (exit $ac_status); }; } &&
20152          { ac_try='test -s conftest.$ac_objext'
20153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20154   (eval $ac_try) 2>&5
20155   ac_status=$?
20156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20157   (exit $ac_status); }; }; then
20158   ac_cv_type_long_long_int=yes
20159 else
20160   echo "$as_me: failed program was:" >&5
20161 sed 's/^/| /' conftest.$ac_ext >&5
20162
20163 ac_cv_type_long_long_int=no
20164 fi
20165 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20166 fi
20167 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
20168 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
20169
20170 echo "$as_me:$LINENO: checking alignment of long long int" >&5
20171 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
20172 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
20173   echo $ECHO_N "(cached) $ECHO_C" >&6
20174 else
20175   if test "$ac_cv_type_long_long_int" = yes; then
20176   if test "$cross_compiling" = yes; then
20177   # Depending upon the size, compute the lo and hi bounds.
20178 cat >conftest.$ac_ext <<_ACEOF
20179 /* confdefs.h.  */
20180 _ACEOF
20181 cat confdefs.h >>conftest.$ac_ext
20182 cat >>conftest.$ac_ext <<_ACEOF
20183 /* end confdefs.h.  */
20184 $ac_includes_default
20185 struct { char filler; long long int field; } pgac_struct;
20186 int
20187 main ()
20188 {
20189 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20190 test_array [0] = 0
20191
20192   ;
20193   return 0;
20194 }
20195 _ACEOF
20196 rm -f conftest.$ac_objext
20197 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20198   (eval $ac_compile) 2>conftest.er1
20199   ac_status=$?
20200   grep -v '^ *+' conftest.er1 >conftest.err
20201   rm -f conftest.er1
20202   cat conftest.err >&5
20203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20204   (exit $ac_status); } &&
20205          { ac_try='test -z "$ac_c_werror_flag"
20206                          || test ! -s conftest.err'
20207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20208   (eval $ac_try) 2>&5
20209   ac_status=$?
20210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20211   (exit $ac_status); }; } &&
20212          { ac_try='test -s conftest.$ac_objext'
20213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20214   (eval $ac_try) 2>&5
20215   ac_status=$?
20216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20217   (exit $ac_status); }; }; then
20218   ac_lo=0 ac_mid=0
20219   while :; do
20220     cat >conftest.$ac_ext <<_ACEOF
20221 /* confdefs.h.  */
20222 _ACEOF
20223 cat confdefs.h >>conftest.$ac_ext
20224 cat >>conftest.$ac_ext <<_ACEOF
20225 /* end confdefs.h.  */
20226 $ac_includes_default
20227 struct { char filler; long long int field; } pgac_struct;
20228 int
20229 main ()
20230 {
20231 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20232 test_array [0] = 0
20233
20234   ;
20235   return 0;
20236 }
20237 _ACEOF
20238 rm -f conftest.$ac_objext
20239 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20240   (eval $ac_compile) 2>conftest.er1
20241   ac_status=$?
20242   grep -v '^ *+' conftest.er1 >conftest.err
20243   rm -f conftest.er1
20244   cat conftest.err >&5
20245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20246   (exit $ac_status); } &&
20247          { ac_try='test -z "$ac_c_werror_flag"
20248                          || test ! -s conftest.err'
20249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20250   (eval $ac_try) 2>&5
20251   ac_status=$?
20252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20253   (exit $ac_status); }; } &&
20254          { ac_try='test -s conftest.$ac_objext'
20255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20256   (eval $ac_try) 2>&5
20257   ac_status=$?
20258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20259   (exit $ac_status); }; }; then
20260   ac_hi=$ac_mid; break
20261 else
20262   echo "$as_me: failed program was:" >&5
20263 sed 's/^/| /' conftest.$ac_ext >&5
20264
20265 ac_lo=`expr $ac_mid + 1`
20266                     if test $ac_lo -le $ac_mid; then
20267                       ac_lo= ac_hi=
20268                       break
20269                     fi
20270                     ac_mid=`expr 2 '*' $ac_mid + 1`
20271 fi
20272 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20273   done
20274 else
20275   echo "$as_me: failed program was:" >&5
20276 sed 's/^/| /' conftest.$ac_ext >&5
20277
20278 cat >conftest.$ac_ext <<_ACEOF
20279 /* confdefs.h.  */
20280 _ACEOF
20281 cat confdefs.h >>conftest.$ac_ext
20282 cat >>conftest.$ac_ext <<_ACEOF
20283 /* end confdefs.h.  */
20284 $ac_includes_default
20285 struct { char filler; long long int field; } pgac_struct;
20286 int
20287 main ()
20288 {
20289 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20290 test_array [0] = 0
20291
20292   ;
20293   return 0;
20294 }
20295 _ACEOF
20296 rm -f conftest.$ac_objext
20297 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20298   (eval $ac_compile) 2>conftest.er1
20299   ac_status=$?
20300   grep -v '^ *+' conftest.er1 >conftest.err
20301   rm -f conftest.er1
20302   cat conftest.err >&5
20303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20304   (exit $ac_status); } &&
20305          { ac_try='test -z "$ac_c_werror_flag"
20306                          || test ! -s conftest.err'
20307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20308   (eval $ac_try) 2>&5
20309   ac_status=$?
20310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20311   (exit $ac_status); }; } &&
20312          { ac_try='test -s conftest.$ac_objext'
20313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20314   (eval $ac_try) 2>&5
20315   ac_status=$?
20316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20317   (exit $ac_status); }; }; then
20318   ac_hi=-1 ac_mid=-1
20319   while :; do
20320     cat >conftest.$ac_ext <<_ACEOF
20321 /* confdefs.h.  */
20322 _ACEOF
20323 cat confdefs.h >>conftest.$ac_ext
20324 cat >>conftest.$ac_ext <<_ACEOF
20325 /* end confdefs.h.  */
20326 $ac_includes_default
20327 struct { char filler; long long int field; } pgac_struct;
20328 int
20329 main ()
20330 {
20331 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20332 test_array [0] = 0
20333
20334   ;
20335   return 0;
20336 }
20337 _ACEOF
20338 rm -f conftest.$ac_objext
20339 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20340   (eval $ac_compile) 2>conftest.er1
20341   ac_status=$?
20342   grep -v '^ *+' conftest.er1 >conftest.err
20343   rm -f conftest.er1
20344   cat conftest.err >&5
20345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20346   (exit $ac_status); } &&
20347          { ac_try='test -z "$ac_c_werror_flag"
20348                          || test ! -s conftest.err'
20349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20350   (eval $ac_try) 2>&5
20351   ac_status=$?
20352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20353   (exit $ac_status); }; } &&
20354          { ac_try='test -s conftest.$ac_objext'
20355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20356   (eval $ac_try) 2>&5
20357   ac_status=$?
20358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20359   (exit $ac_status); }; }; then
20360   ac_lo=$ac_mid; break
20361 else
20362   echo "$as_me: failed program was:" >&5
20363 sed 's/^/| /' conftest.$ac_ext >&5
20364
20365 ac_hi=`expr '(' $ac_mid ')' - 1`
20366                        if test $ac_mid -le $ac_hi; then
20367                          ac_lo= ac_hi=
20368                          break
20369                        fi
20370                        ac_mid=`expr 2 '*' $ac_mid`
20371 fi
20372 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20373   done
20374 else
20375   echo "$as_me: failed program was:" >&5
20376 sed 's/^/| /' conftest.$ac_ext >&5
20377
20378 ac_lo= ac_hi=
20379 fi
20380 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20381 fi
20382 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20383 # Binary search between lo and hi bounds.
20384 while test "x$ac_lo" != "x$ac_hi"; do
20385   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20386   cat >conftest.$ac_ext <<_ACEOF
20387 /* confdefs.h.  */
20388 _ACEOF
20389 cat confdefs.h >>conftest.$ac_ext
20390 cat >>conftest.$ac_ext <<_ACEOF
20391 /* end confdefs.h.  */
20392 $ac_includes_default
20393 struct { char filler; long long int field; } pgac_struct;
20394 int
20395 main ()
20396 {
20397 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20398 test_array [0] = 0
20399
20400   ;
20401   return 0;
20402 }
20403 _ACEOF
20404 rm -f conftest.$ac_objext
20405 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20406   (eval $ac_compile) 2>conftest.er1
20407   ac_status=$?
20408   grep -v '^ *+' conftest.er1 >conftest.err
20409   rm -f conftest.er1
20410   cat conftest.err >&5
20411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20412   (exit $ac_status); } &&
20413          { ac_try='test -z "$ac_c_werror_flag"
20414                          || test ! -s conftest.err'
20415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20416   (eval $ac_try) 2>&5
20417   ac_status=$?
20418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20419   (exit $ac_status); }; } &&
20420          { ac_try='test -s conftest.$ac_objext'
20421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20422   (eval $ac_try) 2>&5
20423   ac_status=$?
20424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20425   (exit $ac_status); }; }; then
20426   ac_hi=$ac_mid
20427 else
20428   echo "$as_me: failed program was:" >&5
20429 sed 's/^/| /' conftest.$ac_ext >&5
20430
20431 ac_lo=`expr '(' $ac_mid ')' + 1`
20432 fi
20433 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20434 done
20435 case $ac_lo in
20436 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20437 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20438 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20439    { (exit 1); exit 1; }; } ;;
20440 esac
20441 else
20442   if test "$cross_compiling" = yes; then
20443   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20444 See \`config.log' for more details." >&5
20445 echo "$as_me: error: cannot run test program while cross compiling
20446 See \`config.log' for more details." >&2;}
20447    { (exit 1); exit 1; }; }
20448 else
20449   cat >conftest.$ac_ext <<_ACEOF
20450 /* confdefs.h.  */
20451 _ACEOF
20452 cat confdefs.h >>conftest.$ac_ext
20453 cat >>conftest.$ac_ext <<_ACEOF
20454 /* end confdefs.h.  */
20455 $ac_includes_default
20456 struct { char filler; long long int field; } pgac_struct;
20457 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20458 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20459 #include <stdio.h>
20460 #include <stdlib.h>
20461 int
20462 main ()
20463 {
20464
20465   FILE *f = fopen ("conftest.val", "w");
20466   if (! f)
20467     exit (1);
20468   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20469     {
20470       long i = longval ();
20471       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20472         exit (1);
20473       fprintf (f, "%ld\n", i);
20474     }
20475   else
20476     {
20477       unsigned long i = ulongval ();
20478       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20479         exit (1);
20480       fprintf (f, "%lu\n", i);
20481     }
20482   exit (ferror (f) || fclose (f) != 0);
20483
20484   ;
20485   return 0;
20486 }
20487 _ACEOF
20488 rm -f conftest$ac_exeext
20489 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20490   (eval $ac_link) 2>&5
20491   ac_status=$?
20492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20493   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20495   (eval $ac_try) 2>&5
20496   ac_status=$?
20497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20498   (exit $ac_status); }; }; then
20499   pgac_cv_alignof_long_long_int=`cat conftest.val`
20500 else
20501   echo "$as_me: program exited with status $ac_status" >&5
20502 echo "$as_me: failed program was:" >&5
20503 sed 's/^/| /' conftest.$ac_ext >&5
20504
20505 ( exit $ac_status )
20506 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20507 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20508    { (exit 1); exit 1; }; }
20509 fi
20510 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20511 fi
20512 fi
20513 rm -f conftest.val
20514 else
20515   pgac_cv_alignof_long_long_int=0
20516 fi
20517 fi
20518 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20519 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20520 cat >>confdefs.h <<_ACEOF
20521 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20522 _ACEOF
20523
20524
20525 fi
20526 echo "$as_me:$LINENO: checking for double" >&5
20527 echo $ECHO_N "checking for double... $ECHO_C" >&6
20528 if test "${ac_cv_type_double+set}" = set; then
20529   echo $ECHO_N "(cached) $ECHO_C" >&6
20530 else
20531   cat >conftest.$ac_ext <<_ACEOF
20532 /* confdefs.h.  */
20533 _ACEOF
20534 cat confdefs.h >>conftest.$ac_ext
20535 cat >>conftest.$ac_ext <<_ACEOF
20536 /* end confdefs.h.  */
20537 $ac_includes_default
20538 int
20539 main ()
20540 {
20541 if ((double *) 0)
20542   return 0;
20543 if (sizeof (double))
20544   return 0;
20545   ;
20546   return 0;
20547 }
20548 _ACEOF
20549 rm -f conftest.$ac_objext
20550 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20551   (eval $ac_compile) 2>conftest.er1
20552   ac_status=$?
20553   grep -v '^ *+' conftest.er1 >conftest.err
20554   rm -f conftest.er1
20555   cat conftest.err >&5
20556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20557   (exit $ac_status); } &&
20558          { ac_try='test -z "$ac_c_werror_flag"
20559                          || test ! -s conftest.err'
20560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20561   (eval $ac_try) 2>&5
20562   ac_status=$?
20563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20564   (exit $ac_status); }; } &&
20565          { ac_try='test -s conftest.$ac_objext'
20566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20567   (eval $ac_try) 2>&5
20568   ac_status=$?
20569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20570   (exit $ac_status); }; }; then
20571   ac_cv_type_double=yes
20572 else
20573   echo "$as_me: failed program was:" >&5
20574 sed 's/^/| /' conftest.$ac_ext >&5
20575
20576 ac_cv_type_double=no
20577 fi
20578 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20579 fi
20580 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20581 echo "${ECHO_T}$ac_cv_type_double" >&6
20582
20583 echo "$as_me:$LINENO: checking alignment of double" >&5
20584 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20585 if test "${pgac_cv_alignof_double+set}" = set; then
20586   echo $ECHO_N "(cached) $ECHO_C" >&6
20587 else
20588   if test "$ac_cv_type_double" = yes; then
20589   if test "$cross_compiling" = yes; then
20590   # Depending upon the size, compute the lo and hi bounds.
20591 cat >conftest.$ac_ext <<_ACEOF
20592 /* confdefs.h.  */
20593 _ACEOF
20594 cat confdefs.h >>conftest.$ac_ext
20595 cat >>conftest.$ac_ext <<_ACEOF
20596 /* end confdefs.h.  */
20597 $ac_includes_default
20598 struct { char filler; double field; } pgac_struct;
20599 int
20600 main ()
20601 {
20602 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20603 test_array [0] = 0
20604
20605   ;
20606   return 0;
20607 }
20608 _ACEOF
20609 rm -f conftest.$ac_objext
20610 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20611   (eval $ac_compile) 2>conftest.er1
20612   ac_status=$?
20613   grep -v '^ *+' conftest.er1 >conftest.err
20614   rm -f conftest.er1
20615   cat conftest.err >&5
20616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20617   (exit $ac_status); } &&
20618          { ac_try='test -z "$ac_c_werror_flag"
20619                          || test ! -s conftest.err'
20620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20621   (eval $ac_try) 2>&5
20622   ac_status=$?
20623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20624   (exit $ac_status); }; } &&
20625          { ac_try='test -s conftest.$ac_objext'
20626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20627   (eval $ac_try) 2>&5
20628   ac_status=$?
20629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20630   (exit $ac_status); }; }; then
20631   ac_lo=0 ac_mid=0
20632   while :; do
20633     cat >conftest.$ac_ext <<_ACEOF
20634 /* confdefs.h.  */
20635 _ACEOF
20636 cat confdefs.h >>conftest.$ac_ext
20637 cat >>conftest.$ac_ext <<_ACEOF
20638 /* end confdefs.h.  */
20639 $ac_includes_default
20640 struct { char filler; double field; } pgac_struct;
20641 int
20642 main ()
20643 {
20644 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20645 test_array [0] = 0
20646
20647   ;
20648   return 0;
20649 }
20650 _ACEOF
20651 rm -f conftest.$ac_objext
20652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20653   (eval $ac_compile) 2>conftest.er1
20654   ac_status=$?
20655   grep -v '^ *+' conftest.er1 >conftest.err
20656   rm -f conftest.er1
20657   cat conftest.err >&5
20658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20659   (exit $ac_status); } &&
20660          { ac_try='test -z "$ac_c_werror_flag"
20661                          || test ! -s conftest.err'
20662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20663   (eval $ac_try) 2>&5
20664   ac_status=$?
20665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20666   (exit $ac_status); }; } &&
20667          { ac_try='test -s conftest.$ac_objext'
20668   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20669   (eval $ac_try) 2>&5
20670   ac_status=$?
20671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20672   (exit $ac_status); }; }; then
20673   ac_hi=$ac_mid; break
20674 else
20675   echo "$as_me: failed program was:" >&5
20676 sed 's/^/| /' conftest.$ac_ext >&5
20677
20678 ac_lo=`expr $ac_mid + 1`
20679                     if test $ac_lo -le $ac_mid; then
20680                       ac_lo= ac_hi=
20681                       break
20682                     fi
20683                     ac_mid=`expr 2 '*' $ac_mid + 1`
20684 fi
20685 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20686   done
20687 else
20688   echo "$as_me: failed program was:" >&5
20689 sed 's/^/| /' conftest.$ac_ext >&5
20690
20691 cat >conftest.$ac_ext <<_ACEOF
20692 /* confdefs.h.  */
20693 _ACEOF
20694 cat confdefs.h >>conftest.$ac_ext
20695 cat >>conftest.$ac_ext <<_ACEOF
20696 /* end confdefs.h.  */
20697 $ac_includes_default
20698 struct { char filler; double field; } pgac_struct;
20699 int
20700 main ()
20701 {
20702 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20703 test_array [0] = 0
20704
20705   ;
20706   return 0;
20707 }
20708 _ACEOF
20709 rm -f conftest.$ac_objext
20710 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20711   (eval $ac_compile) 2>conftest.er1
20712   ac_status=$?
20713   grep -v '^ *+' conftest.er1 >conftest.err
20714   rm -f conftest.er1
20715   cat conftest.err >&5
20716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20717   (exit $ac_status); } &&
20718          { ac_try='test -z "$ac_c_werror_flag"
20719                          || test ! -s conftest.err'
20720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20721   (eval $ac_try) 2>&5
20722   ac_status=$?
20723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20724   (exit $ac_status); }; } &&
20725          { ac_try='test -s conftest.$ac_objext'
20726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20727   (eval $ac_try) 2>&5
20728   ac_status=$?
20729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20730   (exit $ac_status); }; }; then
20731   ac_hi=-1 ac_mid=-1
20732   while :; do
20733     cat >conftest.$ac_ext <<_ACEOF
20734 /* confdefs.h.  */
20735 _ACEOF
20736 cat confdefs.h >>conftest.$ac_ext
20737 cat >>conftest.$ac_ext <<_ACEOF
20738 /* end confdefs.h.  */
20739 $ac_includes_default
20740 struct { char filler; double field; } pgac_struct;
20741 int
20742 main ()
20743 {
20744 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20745 test_array [0] = 0
20746
20747   ;
20748   return 0;
20749 }
20750 _ACEOF
20751 rm -f conftest.$ac_objext
20752 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20753   (eval $ac_compile) 2>conftest.er1
20754   ac_status=$?
20755   grep -v '^ *+' conftest.er1 >conftest.err
20756   rm -f conftest.er1
20757   cat conftest.err >&5
20758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20759   (exit $ac_status); } &&
20760          { ac_try='test -z "$ac_c_werror_flag"
20761                          || test ! -s conftest.err'
20762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20763   (eval $ac_try) 2>&5
20764   ac_status=$?
20765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20766   (exit $ac_status); }; } &&
20767          { ac_try='test -s conftest.$ac_objext'
20768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20769   (eval $ac_try) 2>&5
20770   ac_status=$?
20771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20772   (exit $ac_status); }; }; then
20773   ac_lo=$ac_mid; break
20774 else
20775   echo "$as_me: failed program was:" >&5
20776 sed 's/^/| /' conftest.$ac_ext >&5
20777
20778 ac_hi=`expr '(' $ac_mid ')' - 1`
20779                        if test $ac_mid -le $ac_hi; then
20780                          ac_lo= ac_hi=
20781                          break
20782                        fi
20783                        ac_mid=`expr 2 '*' $ac_mid`
20784 fi
20785 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20786   done
20787 else
20788   echo "$as_me: failed program was:" >&5
20789 sed 's/^/| /' conftest.$ac_ext >&5
20790
20791 ac_lo= ac_hi=
20792 fi
20793 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20794 fi
20795 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20796 # Binary search between lo and hi bounds.
20797 while test "x$ac_lo" != "x$ac_hi"; do
20798   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20799   cat >conftest.$ac_ext <<_ACEOF
20800 /* confdefs.h.  */
20801 _ACEOF
20802 cat confdefs.h >>conftest.$ac_ext
20803 cat >>conftest.$ac_ext <<_ACEOF
20804 /* end confdefs.h.  */
20805 $ac_includes_default
20806 struct { char filler; double field; } pgac_struct;
20807 int
20808 main ()
20809 {
20810 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20811 test_array [0] = 0
20812
20813   ;
20814   return 0;
20815 }
20816 _ACEOF
20817 rm -f conftest.$ac_objext
20818 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20819   (eval $ac_compile) 2>conftest.er1
20820   ac_status=$?
20821   grep -v '^ *+' conftest.er1 >conftest.err
20822   rm -f conftest.er1
20823   cat conftest.err >&5
20824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20825   (exit $ac_status); } &&
20826          { ac_try='test -z "$ac_c_werror_flag"
20827                          || test ! -s conftest.err'
20828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20829   (eval $ac_try) 2>&5
20830   ac_status=$?
20831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20832   (exit $ac_status); }; } &&
20833          { ac_try='test -s conftest.$ac_objext'
20834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20835   (eval $ac_try) 2>&5
20836   ac_status=$?
20837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20838   (exit $ac_status); }; }; then
20839   ac_hi=$ac_mid
20840 else
20841   echo "$as_me: failed program was:" >&5
20842 sed 's/^/| /' conftest.$ac_ext >&5
20843
20844 ac_lo=`expr '(' $ac_mid ')' + 1`
20845 fi
20846 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20847 done
20848 case $ac_lo in
20849 ?*) pgac_cv_alignof_double=$ac_lo;;
20850 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20851 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20852    { (exit 1); exit 1; }; } ;;
20853 esac
20854 else
20855   if test "$cross_compiling" = yes; then
20856   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20857 See \`config.log' for more details." >&5
20858 echo "$as_me: error: cannot run test program while cross compiling
20859 See \`config.log' for more details." >&2;}
20860    { (exit 1); exit 1; }; }
20861 else
20862   cat >conftest.$ac_ext <<_ACEOF
20863 /* confdefs.h.  */
20864 _ACEOF
20865 cat confdefs.h >>conftest.$ac_ext
20866 cat >>conftest.$ac_ext <<_ACEOF
20867 /* end confdefs.h.  */
20868 $ac_includes_default
20869 struct { char filler; double field; } pgac_struct;
20870 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20871 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20872 #include <stdio.h>
20873 #include <stdlib.h>
20874 int
20875 main ()
20876 {
20877
20878   FILE *f = fopen ("conftest.val", "w");
20879   if (! f)
20880     exit (1);
20881   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20882     {
20883       long i = longval ();
20884       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20885         exit (1);
20886       fprintf (f, "%ld\n", i);
20887     }
20888   else
20889     {
20890       unsigned long i = ulongval ();
20891       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20892         exit (1);
20893       fprintf (f, "%lu\n", i);
20894     }
20895   exit (ferror (f) || fclose (f) != 0);
20896
20897   ;
20898   return 0;
20899 }
20900 _ACEOF
20901 rm -f conftest$ac_exeext
20902 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20903   (eval $ac_link) 2>&5
20904   ac_status=$?
20905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20908   (eval $ac_try) 2>&5
20909   ac_status=$?
20910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20911   (exit $ac_status); }; }; then
20912   pgac_cv_alignof_double=`cat conftest.val`
20913 else
20914   echo "$as_me: program exited with status $ac_status" >&5
20915 echo "$as_me: failed program was:" >&5
20916 sed 's/^/| /' conftest.$ac_ext >&5
20917
20918 ( exit $ac_status )
20919 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20920 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20921    { (exit 1); exit 1; }; }
20922 fi
20923 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20924 fi
20925 fi
20926 rm -f conftest.val
20927 else
20928   pgac_cv_alignof_double=0
20929 fi
20930 fi
20931 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20932 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20933 cat >>confdefs.h <<_ACEOF
20934 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20935 _ACEOF
20936
20937
20938
20939 # Compute maximum alignment of any basic type.
20940 # We assume long's alignment is at least as strong as char, short, or int;
20941 # but we must check long long (if it exists) and double.
20942
20943 MAX_ALIGNOF=$pgac_cv_alignof_long
20944 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20945   MAX_ALIGNOF=$pgac_cv_alignof_double
20946 fi
20947 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20948   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20949 fi
20950
20951 cat >>confdefs.h <<_ACEOF
20952 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20953 _ACEOF
20954
20955
20956
20957 # Some platforms predefine the types int8, int16, etc.  Only check
20958 # a (hopefully) representative subset.
20959 echo "$as_me:$LINENO: checking for int8" >&5
20960 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20961 if test "${ac_cv_type_int8+set}" = set; then
20962   echo $ECHO_N "(cached) $ECHO_C" >&6
20963 else
20964   cat >conftest.$ac_ext <<_ACEOF
20965 /* confdefs.h.  */
20966 _ACEOF
20967 cat confdefs.h >>conftest.$ac_ext
20968 cat >>conftest.$ac_ext <<_ACEOF
20969 /* end confdefs.h.  */
20970 #include <stdio.h>
20971 #ifdef HAVE_SUPPORTDEFS_H
20972 #include <SupportDefs.h>
20973 #endif
20974
20975 int
20976 main ()
20977 {
20978 if ((int8 *) 0)
20979   return 0;
20980 if (sizeof (int8))
20981   return 0;
20982   ;
20983   return 0;
20984 }
20985 _ACEOF
20986 rm -f conftest.$ac_objext
20987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20988   (eval $ac_compile) 2>conftest.er1
20989   ac_status=$?
20990   grep -v '^ *+' conftest.er1 >conftest.err
20991   rm -f conftest.er1
20992   cat conftest.err >&5
20993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20994   (exit $ac_status); } &&
20995          { ac_try='test -z "$ac_c_werror_flag"
20996                          || test ! -s conftest.err'
20997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20998   (eval $ac_try) 2>&5
20999   ac_status=$?
21000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21001   (exit $ac_status); }; } &&
21002          { ac_try='test -s conftest.$ac_objext'
21003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21004   (eval $ac_try) 2>&5
21005   ac_status=$?
21006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21007   (exit $ac_status); }; }; then
21008   ac_cv_type_int8=yes
21009 else
21010   echo "$as_me: failed program was:" >&5
21011 sed 's/^/| /' conftest.$ac_ext >&5
21012
21013 ac_cv_type_int8=no
21014 fi
21015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21016 fi
21017 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
21018 echo "${ECHO_T}$ac_cv_type_int8" >&6
21019 if test $ac_cv_type_int8 = yes; then
21020
21021 cat >>confdefs.h <<_ACEOF
21022 #define HAVE_INT8 1
21023 _ACEOF
21024
21025
21026 fi
21027 echo "$as_me:$LINENO: checking for uint8" >&5
21028 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
21029 if test "${ac_cv_type_uint8+set}" = set; then
21030   echo $ECHO_N "(cached) $ECHO_C" >&6
21031 else
21032   cat >conftest.$ac_ext <<_ACEOF
21033 /* confdefs.h.  */
21034 _ACEOF
21035 cat confdefs.h >>conftest.$ac_ext
21036 cat >>conftest.$ac_ext <<_ACEOF
21037 /* end confdefs.h.  */
21038 #include <stdio.h>
21039 #ifdef HAVE_SUPPORTDEFS_H
21040 #include <SupportDefs.h>
21041 #endif
21042
21043 int
21044 main ()
21045 {
21046 if ((uint8 *) 0)
21047   return 0;
21048 if (sizeof (uint8))
21049   return 0;
21050   ;
21051   return 0;
21052 }
21053 _ACEOF
21054 rm -f conftest.$ac_objext
21055 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21056   (eval $ac_compile) 2>conftest.er1
21057   ac_status=$?
21058   grep -v '^ *+' conftest.er1 >conftest.err
21059   rm -f conftest.er1
21060   cat conftest.err >&5
21061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21062   (exit $ac_status); } &&
21063          { ac_try='test -z "$ac_c_werror_flag"
21064                          || test ! -s conftest.err'
21065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21066   (eval $ac_try) 2>&5
21067   ac_status=$?
21068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21069   (exit $ac_status); }; } &&
21070          { ac_try='test -s conftest.$ac_objext'
21071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21072   (eval $ac_try) 2>&5
21073   ac_status=$?
21074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21075   (exit $ac_status); }; }; then
21076   ac_cv_type_uint8=yes
21077 else
21078   echo "$as_me: failed program was:" >&5
21079 sed 's/^/| /' conftest.$ac_ext >&5
21080
21081 ac_cv_type_uint8=no
21082 fi
21083 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21084 fi
21085 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
21086 echo "${ECHO_T}$ac_cv_type_uint8" >&6
21087 if test $ac_cv_type_uint8 = yes; then
21088
21089 cat >>confdefs.h <<_ACEOF
21090 #define HAVE_UINT8 1
21091 _ACEOF
21092
21093
21094 fi
21095 echo "$as_me:$LINENO: checking for int64" >&5
21096 echo $ECHO_N "checking for int64... $ECHO_C" >&6
21097 if test "${ac_cv_type_int64+set}" = set; then
21098   echo $ECHO_N "(cached) $ECHO_C" >&6
21099 else
21100   cat >conftest.$ac_ext <<_ACEOF
21101 /* confdefs.h.  */
21102 _ACEOF
21103 cat confdefs.h >>conftest.$ac_ext
21104 cat >>conftest.$ac_ext <<_ACEOF
21105 /* end confdefs.h.  */
21106 #include <stdio.h>
21107 #ifdef HAVE_SUPPORTDEFS_H
21108 #include <SupportDefs.h>
21109 #endif
21110
21111 int
21112 main ()
21113 {
21114 if ((int64 *) 0)
21115   return 0;
21116 if (sizeof (int64))
21117   return 0;
21118   ;
21119   return 0;
21120 }
21121 _ACEOF
21122 rm -f conftest.$ac_objext
21123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21124   (eval $ac_compile) 2>conftest.er1
21125   ac_status=$?
21126   grep -v '^ *+' conftest.er1 >conftest.err
21127   rm -f conftest.er1
21128   cat conftest.err >&5
21129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21130   (exit $ac_status); } &&
21131          { ac_try='test -z "$ac_c_werror_flag"
21132                          || test ! -s conftest.err'
21133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21134   (eval $ac_try) 2>&5
21135   ac_status=$?
21136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21137   (exit $ac_status); }; } &&
21138          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
21144   ac_cv_type_int64=yes
21145 else
21146   echo "$as_me: failed program was:" >&5
21147 sed 's/^/| /' conftest.$ac_ext >&5
21148
21149 ac_cv_type_int64=no
21150 fi
21151 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21152 fi
21153 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
21154 echo "${ECHO_T}$ac_cv_type_int64" >&6
21155 if test $ac_cv_type_int64 = yes; then
21156
21157 cat >>confdefs.h <<_ACEOF
21158 #define HAVE_INT64 1
21159 _ACEOF
21160
21161
21162 fi
21163 echo "$as_me:$LINENO: checking for uint64" >&5
21164 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
21165 if test "${ac_cv_type_uint64+set}" = set; then
21166   echo $ECHO_N "(cached) $ECHO_C" >&6
21167 else
21168   cat >conftest.$ac_ext <<_ACEOF
21169 /* confdefs.h.  */
21170 _ACEOF
21171 cat confdefs.h >>conftest.$ac_ext
21172 cat >>conftest.$ac_ext <<_ACEOF
21173 /* end confdefs.h.  */
21174 #include <stdio.h>
21175 #ifdef HAVE_SUPPORTDEFS_H
21176 #include <SupportDefs.h>
21177 #endif
21178
21179 int
21180 main ()
21181 {
21182 if ((uint64 *) 0)
21183   return 0;
21184 if (sizeof (uint64))
21185   return 0;
21186   ;
21187   return 0;
21188 }
21189 _ACEOF
21190 rm -f conftest.$ac_objext
21191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21192   (eval $ac_compile) 2>conftest.er1
21193   ac_status=$?
21194   grep -v '^ *+' conftest.er1 >conftest.err
21195   rm -f conftest.er1
21196   cat conftest.err >&5
21197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21198   (exit $ac_status); } &&
21199          { ac_try='test -z "$ac_c_werror_flag"
21200                          || test ! -s conftest.err'
21201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21202   (eval $ac_try) 2>&5
21203   ac_status=$?
21204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21205   (exit $ac_status); }; } &&
21206          { ac_try='test -s conftest.$ac_objext'
21207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21208   (eval $ac_try) 2>&5
21209   ac_status=$?
21210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21211   (exit $ac_status); }; }; then
21212   ac_cv_type_uint64=yes
21213 else
21214   echo "$as_me: failed program was:" >&5
21215 sed 's/^/| /' conftest.$ac_ext >&5
21216
21217 ac_cv_type_uint64=no
21218 fi
21219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21220 fi
21221 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
21222 echo "${ECHO_T}$ac_cv_type_uint64" >&6
21223 if test $ac_cv_type_uint64 = yes; then
21224
21225 cat >>confdefs.h <<_ACEOF
21226 #define HAVE_UINT64 1
21227 _ACEOF
21228
21229
21230 fi
21231
21232
21233 # We also check for sig_atomic_t, which *should* be defined per ANSI
21234 # C, but is missing on some old platforms.
21235 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
21236 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
21237 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
21238   echo $ECHO_N "(cached) $ECHO_C" >&6
21239 else
21240   cat >conftest.$ac_ext <<_ACEOF
21241 /* confdefs.h.  */
21242 _ACEOF
21243 cat confdefs.h >>conftest.$ac_ext
21244 cat >>conftest.$ac_ext <<_ACEOF
21245 /* end confdefs.h.  */
21246 #include <signal.h>
21247
21248 int
21249 main ()
21250 {
21251 if ((sig_atomic_t *) 0)
21252   return 0;
21253 if (sizeof (sig_atomic_t))
21254   return 0;
21255   ;
21256   return 0;
21257 }
21258 _ACEOF
21259 rm -f conftest.$ac_objext
21260 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21261   (eval $ac_compile) 2>conftest.er1
21262   ac_status=$?
21263   grep -v '^ *+' conftest.er1 >conftest.err
21264   rm -f conftest.er1
21265   cat conftest.err >&5
21266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21267   (exit $ac_status); } &&
21268          { ac_try='test -z "$ac_c_werror_flag"
21269                          || test ! -s conftest.err'
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); }; } &&
21275          { ac_try='test -s conftest.$ac_objext'
21276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21277   (eval $ac_try) 2>&5
21278   ac_status=$?
21279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21280   (exit $ac_status); }; }; then
21281   ac_cv_type_sig_atomic_t=yes
21282 else
21283   echo "$as_me: failed program was:" >&5
21284 sed 's/^/| /' conftest.$ac_ext >&5
21285
21286 ac_cv_type_sig_atomic_t=no
21287 fi
21288 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21289 fi
21290 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21291 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21292 if test $ac_cv_type_sig_atomic_t = yes; then
21293
21294 cat >>confdefs.h <<_ACEOF
21295 #define HAVE_SIG_ATOMIC_T 1
21296 _ACEOF
21297
21298
21299 fi
21300
21301
21302
21303 if test x"$template" != x"win32"
21304 then
21305 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21306 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21307 if test "${pgac_cv_func_posix_signals+set}" = set; then
21308   echo $ECHO_N "(cached) $ECHO_C" >&6
21309 else
21310   cat >conftest.$ac_ext <<_ACEOF
21311 /* confdefs.h.  */
21312 _ACEOF
21313 cat confdefs.h >>conftest.$ac_ext
21314 cat >>conftest.$ac_ext <<_ACEOF
21315 /* end confdefs.h.  */
21316 #include <signal.h>
21317
21318 int
21319 main ()
21320 {
21321 struct sigaction act, oact;
21322 sigemptyset(&act.sa_mask);
21323 act.sa_flags = SA_RESTART;
21324 sigaction(0, &act, &oact);
21325   ;
21326   return 0;
21327 }
21328 _ACEOF
21329 rm -f conftest.$ac_objext conftest$ac_exeext
21330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21331   (eval $ac_link) 2>conftest.er1
21332   ac_status=$?
21333   grep -v '^ *+' conftest.er1 >conftest.err
21334   rm -f conftest.er1
21335   cat conftest.err >&5
21336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21337   (exit $ac_status); } &&
21338          { ac_try='test -z "$ac_c_werror_flag"
21339                          || test ! -s conftest.err'
21340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21341   (eval $ac_try) 2>&5
21342   ac_status=$?
21343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21344   (exit $ac_status); }; } &&
21345          { ac_try='test -s conftest$ac_exeext'
21346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21347   (eval $ac_try) 2>&5
21348   ac_status=$?
21349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21350   (exit $ac_status); }; }; then
21351   pgac_cv_func_posix_signals=yes
21352 else
21353   echo "$as_me: failed program was:" >&5
21354 sed 's/^/| /' conftest.$ac_ext >&5
21355
21356 pgac_cv_func_posix_signals=no
21357 fi
21358 rm -f conftest.err conftest.$ac_objext \
21359       conftest$ac_exeext conftest.$ac_ext
21360 fi
21361 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21362 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21363 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21364
21365 cat >>confdefs.h <<\_ACEOF
21366 #define HAVE_POSIX_SIGNALS
21367 _ACEOF
21368
21369 fi
21370 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21371
21372 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21373   { { echo "$as_me:$LINENO: error:
21374 *** Thread-safety requires POSIX signals, which are not supported by your
21375 *** operating system.
21376 " >&5
21377 echo "$as_me: error:
21378 *** Thread-safety requires POSIX signals, which are not supported by your
21379 *** operating system.
21380 " >&2;}
21381    { (exit 1); exit 1; }; }
21382 fi
21383 fi
21384
21385 if test $ac_cv_func_fseeko = yes; then
21386 # Check whether --enable-largefile or --disable-largefile was given.
21387 if test "${enable_largefile+set}" = set; then
21388   enableval="$enable_largefile"
21389
21390 fi;
21391 if test "$enable_largefile" != no; then
21392
21393   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21394 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21395 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21396   echo $ECHO_N "(cached) $ECHO_C" >&6
21397 else
21398   ac_cv_sys_largefile_CC=no
21399      if test "$GCC" != yes; then
21400        ac_save_CC=$CC
21401        while :; do
21402          # IRIX 6.2 and later do not support large files by default,
21403          # so use the C compiler's -n32 option if that helps.
21404          cat >conftest.$ac_ext <<_ACEOF
21405 /* confdefs.h.  */
21406 _ACEOF
21407 cat confdefs.h >>conftest.$ac_ext
21408 cat >>conftest.$ac_ext <<_ACEOF
21409 /* end confdefs.h.  */
21410 #include <sys/types.h>
21411  /* Check that off_t can represent 2**63 - 1 correctly.
21412     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21413     since some C++ compilers masquerading as C compilers
21414     incorrectly reject 9223372036854775807.  */
21415 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21416   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21417                        && LARGE_OFF_T % 2147483647 == 1)
21418                       ? 1 : -1];
21419 int
21420 main ()
21421 {
21422
21423   ;
21424   return 0;
21425 }
21426 _ACEOF
21427          rm -f conftest.$ac_objext
21428 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21429   (eval $ac_compile) 2>conftest.er1
21430   ac_status=$?
21431   grep -v '^ *+' conftest.er1 >conftest.err
21432   rm -f conftest.er1
21433   cat conftest.err >&5
21434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21435   (exit $ac_status); } &&
21436          { ac_try='test -z "$ac_c_werror_flag"
21437                          || test ! -s conftest.err'
21438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21439   (eval $ac_try) 2>&5
21440   ac_status=$?
21441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21442   (exit $ac_status); }; } &&
21443          { ac_try='test -s conftest.$ac_objext'
21444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21445   (eval $ac_try) 2>&5
21446   ac_status=$?
21447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21448   (exit $ac_status); }; }; then
21449   break
21450 else
21451   echo "$as_me: failed program was:" >&5
21452 sed 's/^/| /' conftest.$ac_ext >&5
21453
21454 fi
21455 rm -f conftest.err conftest.$ac_objext
21456          CC="$CC -n32"
21457          rm -f conftest.$ac_objext
21458 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21459   (eval $ac_compile) 2>conftest.er1
21460   ac_status=$?
21461   grep -v '^ *+' conftest.er1 >conftest.err
21462   rm -f conftest.er1
21463   cat conftest.err >&5
21464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21465   (exit $ac_status); } &&
21466          { ac_try='test -z "$ac_c_werror_flag"
21467                          || test ! -s conftest.err'
21468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21469   (eval $ac_try) 2>&5
21470   ac_status=$?
21471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21472   (exit $ac_status); }; } &&
21473          { ac_try='test -s conftest.$ac_objext'
21474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21475   (eval $ac_try) 2>&5
21476   ac_status=$?
21477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21478   (exit $ac_status); }; }; then
21479   ac_cv_sys_largefile_CC=' -n32'; break
21480 else
21481   echo "$as_me: failed program was:" >&5
21482 sed 's/^/| /' conftest.$ac_ext >&5
21483
21484 fi
21485 rm -f conftest.err conftest.$ac_objext
21486          break
21487        done
21488        CC=$ac_save_CC
21489        rm -f conftest.$ac_ext
21490     fi
21491 fi
21492 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21493 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21494   if test "$ac_cv_sys_largefile_CC" != no; then
21495     CC=$CC$ac_cv_sys_largefile_CC
21496   fi
21497
21498   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21499 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21500 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21501   echo $ECHO_N "(cached) $ECHO_C" >&6
21502 else
21503   while :; do
21504   ac_cv_sys_file_offset_bits=no
21505   cat >conftest.$ac_ext <<_ACEOF
21506 /* confdefs.h.  */
21507 _ACEOF
21508 cat confdefs.h >>conftest.$ac_ext
21509 cat >>conftest.$ac_ext <<_ACEOF
21510 /* end confdefs.h.  */
21511 #include <sys/types.h>
21512  /* Check that off_t can represent 2**63 - 1 correctly.
21513     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21514     since some C++ compilers masquerading as C compilers
21515     incorrectly reject 9223372036854775807.  */
21516 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21517   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21518                        && LARGE_OFF_T % 2147483647 == 1)
21519                       ? 1 : -1];
21520 int
21521 main ()
21522 {
21523
21524   ;
21525   return 0;
21526 }
21527 _ACEOF
21528 rm -f conftest.$ac_objext
21529 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21530   (eval $ac_compile) 2>conftest.er1
21531   ac_status=$?
21532   grep -v '^ *+' conftest.er1 >conftest.err
21533   rm -f conftest.er1
21534   cat conftest.err >&5
21535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21536   (exit $ac_status); } &&
21537          { ac_try='test -z "$ac_c_werror_flag"
21538                          || test ! -s conftest.err'
21539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21540   (eval $ac_try) 2>&5
21541   ac_status=$?
21542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21543   (exit $ac_status); }; } &&
21544          { ac_try='test -s conftest.$ac_objext'
21545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21546   (eval $ac_try) 2>&5
21547   ac_status=$?
21548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21549   (exit $ac_status); }; }; then
21550   break
21551 else
21552   echo "$as_me: failed program was:" >&5
21553 sed 's/^/| /' conftest.$ac_ext >&5
21554
21555 fi
21556 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21557   cat >conftest.$ac_ext <<_ACEOF
21558 /* confdefs.h.  */
21559 _ACEOF
21560 cat confdefs.h >>conftest.$ac_ext
21561 cat >>conftest.$ac_ext <<_ACEOF
21562 /* end confdefs.h.  */
21563 #define _FILE_OFFSET_BITS 64
21564 #include <sys/types.h>
21565  /* Check that off_t can represent 2**63 - 1 correctly.
21566     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21567     since some C++ compilers masquerading as C compilers
21568     incorrectly reject 9223372036854775807.  */
21569 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21570   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21571                        && LARGE_OFF_T % 2147483647 == 1)
21572                       ? 1 : -1];
21573 int
21574 main ()
21575 {
21576
21577   ;
21578   return 0;
21579 }
21580 _ACEOF
21581 rm -f conftest.$ac_objext
21582 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21583   (eval $ac_compile) 2>conftest.er1
21584   ac_status=$?
21585   grep -v '^ *+' conftest.er1 >conftest.err
21586   rm -f conftest.er1
21587   cat conftest.err >&5
21588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21589   (exit $ac_status); } &&
21590          { ac_try='test -z "$ac_c_werror_flag"
21591                          || test ! -s conftest.err'
21592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21593   (eval $ac_try) 2>&5
21594   ac_status=$?
21595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21596   (exit $ac_status); }; } &&
21597          { ac_try='test -s conftest.$ac_objext'
21598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21599   (eval $ac_try) 2>&5
21600   ac_status=$?
21601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21602   (exit $ac_status); }; }; then
21603   ac_cv_sys_file_offset_bits=64; break
21604 else
21605   echo "$as_me: failed program was:" >&5
21606 sed 's/^/| /' conftest.$ac_ext >&5
21607
21608 fi
21609 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21610   break
21611 done
21612 fi
21613 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21614 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21615 if test "$ac_cv_sys_file_offset_bits" != no; then
21616
21617 cat >>confdefs.h <<_ACEOF
21618 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21619 _ACEOF
21620
21621 fi
21622 rm -f conftest*
21623   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21624 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21625 if test "${ac_cv_sys_large_files+set}" = set; then
21626   echo $ECHO_N "(cached) $ECHO_C" >&6
21627 else
21628   while :; do
21629   ac_cv_sys_large_files=no
21630   cat >conftest.$ac_ext <<_ACEOF
21631 /* confdefs.h.  */
21632 _ACEOF
21633 cat confdefs.h >>conftest.$ac_ext
21634 cat >>conftest.$ac_ext <<_ACEOF
21635 /* end confdefs.h.  */
21636 #include <sys/types.h>
21637  /* Check that off_t can represent 2**63 - 1 correctly.
21638     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21639     since some C++ compilers masquerading as C compilers
21640     incorrectly reject 9223372036854775807.  */
21641 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21642   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21643                        && LARGE_OFF_T % 2147483647 == 1)
21644                       ? 1 : -1];
21645 int
21646 main ()
21647 {
21648
21649   ;
21650   return 0;
21651 }
21652 _ACEOF
21653 rm -f conftest.$ac_objext
21654 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21655   (eval $ac_compile) 2>conftest.er1
21656   ac_status=$?
21657   grep -v '^ *+' conftest.er1 >conftest.err
21658   rm -f conftest.er1
21659   cat conftest.err >&5
21660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21661   (exit $ac_status); } &&
21662          { ac_try='test -z "$ac_c_werror_flag"
21663                          || test ! -s conftest.err'
21664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21665   (eval $ac_try) 2>&5
21666   ac_status=$?
21667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21668   (exit $ac_status); }; } &&
21669          { ac_try='test -s conftest.$ac_objext'
21670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21671   (eval $ac_try) 2>&5
21672   ac_status=$?
21673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21674   (exit $ac_status); }; }; then
21675   break
21676 else
21677   echo "$as_me: failed program was:" >&5
21678 sed 's/^/| /' conftest.$ac_ext >&5
21679
21680 fi
21681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21682   cat >conftest.$ac_ext <<_ACEOF
21683 /* confdefs.h.  */
21684 _ACEOF
21685 cat confdefs.h >>conftest.$ac_ext
21686 cat >>conftest.$ac_ext <<_ACEOF
21687 /* end confdefs.h.  */
21688 #define _LARGE_FILES 1
21689 #include <sys/types.h>
21690  /* Check that off_t can represent 2**63 - 1 correctly.
21691     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21692     since some C++ compilers masquerading as C compilers
21693     incorrectly reject 9223372036854775807.  */
21694 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21695   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21696                        && LARGE_OFF_T % 2147483647 == 1)
21697                       ? 1 : -1];
21698 int
21699 main ()
21700 {
21701
21702   ;
21703   return 0;
21704 }
21705 _ACEOF
21706 rm -f conftest.$ac_objext
21707 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21708   (eval $ac_compile) 2>conftest.er1
21709   ac_status=$?
21710   grep -v '^ *+' conftest.er1 >conftest.err
21711   rm -f conftest.er1
21712   cat conftest.err >&5
21713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21714   (exit $ac_status); } &&
21715          { ac_try='test -z "$ac_c_werror_flag"
21716                          || test ! -s conftest.err'
21717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21718   (eval $ac_try) 2>&5
21719   ac_status=$?
21720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21721   (exit $ac_status); }; } &&
21722          { ac_try='test -s conftest.$ac_objext'
21723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21724   (eval $ac_try) 2>&5
21725   ac_status=$?
21726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21727   (exit $ac_status); }; }; then
21728   ac_cv_sys_large_files=1; break
21729 else
21730   echo "$as_me: failed program was:" >&5
21731 sed 's/^/| /' conftest.$ac_ext >&5
21732
21733 fi
21734 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21735   break
21736 done
21737 fi
21738 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21739 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21740 if test "$ac_cv_sys_large_files" != no; then
21741
21742 cat >>confdefs.h <<_ACEOF
21743 #define _LARGE_FILES $ac_cv_sys_large_files
21744 _ACEOF
21745
21746 fi
21747 rm -f conftest*
21748 fi
21749
21750 fi
21751
21752 # SunOS doesn't handle negative byte comparisons properly with +/- return
21753 echo "$as_me:$LINENO: checking for working memcmp" >&5
21754 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21755 if test "${ac_cv_func_memcmp_working+set}" = set; then
21756   echo $ECHO_N "(cached) $ECHO_C" >&6
21757 else
21758   if test "$cross_compiling" = yes; then
21759   ac_cv_func_memcmp_working=no
21760 else
21761   cat >conftest.$ac_ext <<_ACEOF
21762 /* confdefs.h.  */
21763 _ACEOF
21764 cat confdefs.h >>conftest.$ac_ext
21765 cat >>conftest.$ac_ext <<_ACEOF
21766 /* end confdefs.h.  */
21767 $ac_includes_default
21768 int
21769 main ()
21770 {
21771
21772   /* Some versions of memcmp are not 8-bit clean.  */
21773   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21774   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21775     exit (1);
21776
21777   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21778      or more and with at least one buffer not starting on a 4-byte boundary.
21779      William Lewis provided this test program.   */
21780   {
21781     char foo[21];
21782     char bar[21];
21783     int i;
21784     for (i = 0; i < 4; i++)
21785       {
21786         char *a = foo + i;
21787         char *b = bar + i;
21788         strcpy (a, "--------01111111");
21789         strcpy (b, "--------10000000");
21790         if (memcmp (a, b, 16) >= 0)
21791           exit (1);
21792       }
21793     exit (0);
21794   }
21795
21796   ;
21797   return 0;
21798 }
21799 _ACEOF
21800 rm -f conftest$ac_exeext
21801 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21802   (eval $ac_link) 2>&5
21803   ac_status=$?
21804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21805   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21807   (eval $ac_try) 2>&5
21808   ac_status=$?
21809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21810   (exit $ac_status); }; }; then
21811   ac_cv_func_memcmp_working=yes
21812 else
21813   echo "$as_me: program exited with status $ac_status" >&5
21814 echo "$as_me: failed program was:" >&5
21815 sed 's/^/| /' conftest.$ac_ext >&5
21816
21817 ( exit $ac_status )
21818 ac_cv_func_memcmp_working=no
21819 fi
21820 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21821 fi
21822 fi
21823 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21824 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21825 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21826     "memcmp.$ac_objext"   | \
21827   *" memcmp.$ac_objext"   | \
21828     "memcmp.$ac_objext "* | \
21829   *" memcmp.$ac_objext "* ) ;;
21830   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21831 esac
21832
21833
21834
21835
21836 # Select semaphore implementation type.
21837 if test "$PORTNAME" != "win32"; then
21838   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21839
21840 cat >>confdefs.h <<\_ACEOF
21841 #define USE_NAMED_POSIX_SEMAPHORES 1
21842 _ACEOF
21843
21844     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21845   else
21846     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21847
21848 cat >>confdefs.h <<\_ACEOF
21849 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21850 _ACEOF
21851
21852       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21853     else
21854
21855 cat >>confdefs.h <<\_ACEOF
21856 #define USE_SYSV_SEMAPHORES 1
21857 _ACEOF
21858
21859       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21860     fi
21861   fi
21862 else
21863
21864 cat >>confdefs.h <<\_ACEOF
21865 #define USE_WIN32_SEMAPHORES 1
21866 _ACEOF
21867
21868   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
21869 fi
21870
21871
21872 # Select shared-memory implementation type.
21873
21874 cat >>confdefs.h <<\_ACEOF
21875 #define USE_SYSV_SHARED_MEMORY 1
21876 _ACEOF
21877
21878 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21879
21880
21881 # If not set in template file, set bytes to use libc memset()
21882 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
21883   MEMSET_LOOP_LIMIT=1024
21884 fi
21885
21886 cat >>confdefs.h <<_ACEOF
21887 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
21888 _ACEOF
21889
21890
21891
21892 if test "$enable_nls" = yes ; then
21893
21894   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21895 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21896 if test "${ac_cv_search_gettext+set}" = set; then
21897   echo $ECHO_N "(cached) $ECHO_C" >&6
21898 else
21899   ac_func_search_save_LIBS=$LIBS
21900 ac_cv_search_gettext=no
21901 cat >conftest.$ac_ext <<_ACEOF
21902 /* confdefs.h.  */
21903 _ACEOF
21904 cat confdefs.h >>conftest.$ac_ext
21905 cat >>conftest.$ac_ext <<_ACEOF
21906 /* end confdefs.h.  */
21907
21908 /* Override any gcc2 internal prototype to avoid an error.  */
21909 #ifdef __cplusplus
21910 extern "C"
21911 #endif
21912 /* We use char because int might match the return type of a gcc2
21913    builtin and then its argument prototype would still apply.  */
21914 char gettext ();
21915 int
21916 main ()
21917 {
21918 gettext ();
21919   ;
21920   return 0;
21921 }
21922 _ACEOF
21923 rm -f conftest.$ac_objext conftest$ac_exeext
21924 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21925   (eval $ac_link) 2>conftest.er1
21926   ac_status=$?
21927   grep -v '^ *+' conftest.er1 >conftest.err
21928   rm -f conftest.er1
21929   cat conftest.err >&5
21930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21931   (exit $ac_status); } &&
21932          { ac_try='test -z "$ac_c_werror_flag"
21933                          || test ! -s conftest.err'
21934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21935   (eval $ac_try) 2>&5
21936   ac_status=$?
21937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21938   (exit $ac_status); }; } &&
21939          { ac_try='test -s conftest$ac_exeext'
21940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21941   (eval $ac_try) 2>&5
21942   ac_status=$?
21943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21944   (exit $ac_status); }; }; then
21945   ac_cv_search_gettext="none required"
21946 else
21947   echo "$as_me: failed program was:" >&5
21948 sed 's/^/| /' conftest.$ac_ext >&5
21949
21950 fi
21951 rm -f conftest.err conftest.$ac_objext \
21952       conftest$ac_exeext conftest.$ac_ext
21953 if test "$ac_cv_search_gettext" = no; then
21954   for ac_lib in intl; do
21955     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21956     cat >conftest.$ac_ext <<_ACEOF
21957 /* confdefs.h.  */
21958 _ACEOF
21959 cat confdefs.h >>conftest.$ac_ext
21960 cat >>conftest.$ac_ext <<_ACEOF
21961 /* end confdefs.h.  */
21962
21963 /* Override any gcc2 internal prototype to avoid an error.  */
21964 #ifdef __cplusplus
21965 extern "C"
21966 #endif
21967 /* We use char because int might match the return type of a gcc2
21968    builtin and then its argument prototype would still apply.  */
21969 char gettext ();
21970 int
21971 main ()
21972 {
21973 gettext ();
21974   ;
21975   return 0;
21976 }
21977 _ACEOF
21978 rm -f conftest.$ac_objext conftest$ac_exeext
21979 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21980   (eval $ac_link) 2>conftest.er1
21981   ac_status=$?
21982   grep -v '^ *+' conftest.er1 >conftest.err
21983   rm -f conftest.er1
21984   cat conftest.err >&5
21985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21986   (exit $ac_status); } &&
21987          { ac_try='test -z "$ac_c_werror_flag"
21988                          || test ! -s conftest.err'
21989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21990   (eval $ac_try) 2>&5
21991   ac_status=$?
21992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21993   (exit $ac_status); }; } &&
21994          { ac_try='test -s conftest$ac_exeext'
21995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21996   (eval $ac_try) 2>&5
21997   ac_status=$?
21998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21999   (exit $ac_status); }; }; then
22000   ac_cv_search_gettext="-l$ac_lib"
22001 break
22002 else
22003   echo "$as_me: failed program was:" >&5
22004 sed 's/^/| /' conftest.$ac_ext >&5
22005
22006 fi
22007 rm -f conftest.err conftest.$ac_objext \
22008       conftest$ac_exeext conftest.$ac_ext
22009   done
22010 fi
22011 LIBS=$ac_func_search_save_LIBS
22012 fi
22013 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
22014 echo "${ECHO_T}$ac_cv_search_gettext" >&6
22015 if test "$ac_cv_search_gettext" != no; then
22016   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
22017
22018 else
22019   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
22020 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
22021    { (exit 1); exit 1; }; }
22022 fi
22023
22024   if test "${ac_cv_header_libintl_h+set}" = set; then
22025   echo "$as_me:$LINENO: checking for libintl.h" >&5
22026 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22027 if test "${ac_cv_header_libintl_h+set}" = set; then
22028   echo $ECHO_N "(cached) $ECHO_C" >&6
22029 fi
22030 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22031 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22032 else
22033   # Is the header compilable?
22034 echo "$as_me:$LINENO: checking libintl.h usability" >&5
22035 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
22036 cat >conftest.$ac_ext <<_ACEOF
22037 /* confdefs.h.  */
22038 _ACEOF
22039 cat confdefs.h >>conftest.$ac_ext
22040 cat >>conftest.$ac_ext <<_ACEOF
22041 /* end confdefs.h.  */
22042 $ac_includes_default
22043 #include <libintl.h>
22044 _ACEOF
22045 rm -f conftest.$ac_objext
22046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22047   (eval $ac_compile) 2>conftest.er1
22048   ac_status=$?
22049   grep -v '^ *+' conftest.er1 >conftest.err
22050   rm -f conftest.er1
22051   cat conftest.err >&5
22052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22053   (exit $ac_status); } &&
22054          { ac_try='test -z "$ac_c_werror_flag"
22055                          || test ! -s conftest.err'
22056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22057   (eval $ac_try) 2>&5
22058   ac_status=$?
22059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22060   (exit $ac_status); }; } &&
22061          { ac_try='test -s conftest.$ac_objext'
22062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22063   (eval $ac_try) 2>&5
22064   ac_status=$?
22065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22066   (exit $ac_status); }; }; then
22067   ac_header_compiler=yes
22068 else
22069   echo "$as_me: failed program was:" >&5
22070 sed 's/^/| /' conftest.$ac_ext >&5
22071
22072 ac_header_compiler=no
22073 fi
22074 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22075 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22076 echo "${ECHO_T}$ac_header_compiler" >&6
22077
22078 # Is the header present?
22079 echo "$as_me:$LINENO: checking libintl.h presence" >&5
22080 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
22081 cat >conftest.$ac_ext <<_ACEOF
22082 /* confdefs.h.  */
22083 _ACEOF
22084 cat confdefs.h >>conftest.$ac_ext
22085 cat >>conftest.$ac_ext <<_ACEOF
22086 /* end confdefs.h.  */
22087 #include <libintl.h>
22088 _ACEOF
22089 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22090   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22091   ac_status=$?
22092   grep -v '^ *+' conftest.er1 >conftest.err
22093   rm -f conftest.er1
22094   cat conftest.err >&5
22095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22096   (exit $ac_status); } >/dev/null; then
22097   if test -s conftest.err; then
22098     ac_cpp_err=$ac_c_preproc_warn_flag
22099     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22100   else
22101     ac_cpp_err=
22102   fi
22103 else
22104   ac_cpp_err=yes
22105 fi
22106 if test -z "$ac_cpp_err"; then
22107   ac_header_preproc=yes
22108 else
22109   echo "$as_me: failed program was:" >&5
22110 sed 's/^/| /' conftest.$ac_ext >&5
22111
22112   ac_header_preproc=no
22113 fi
22114 rm -f conftest.err conftest.$ac_ext
22115 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22116 echo "${ECHO_T}$ac_header_preproc" >&6
22117
22118 # So?  What about this header?
22119 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22120   yes:no: )
22121     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22122 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22123     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
22124 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
22125     ac_header_preproc=yes
22126     ;;
22127   no:yes:* )
22128     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
22129 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
22130     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
22131 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
22132     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
22133 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
22134     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
22135 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22136     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
22137 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
22138     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
22139 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
22140     (
22141       cat <<\_ASBOX
22142 ## ---------------------------------------- ##
22143 ## Report this to pgsql-bugs@postgresql.org ##
22144 ## ---------------------------------------- ##
22145 _ASBOX
22146     ) |
22147       sed "s/^/$as_me: WARNING:     /" >&2
22148     ;;
22149 esac
22150 echo "$as_me:$LINENO: checking for libintl.h" >&5
22151 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22152 if test "${ac_cv_header_libintl_h+set}" = set; then
22153   echo $ECHO_N "(cached) $ECHO_C" >&6
22154 else
22155   ac_cv_header_libintl_h=$ac_header_preproc
22156 fi
22157 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22158 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22159
22160 fi
22161 if test $ac_cv_header_libintl_h = yes; then
22162   :
22163 else
22164   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
22165 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
22166    { (exit 1); exit 1; }; }
22167 fi
22168
22169
22170   for ac_prog in msgfmt
22171 do
22172   # Extract the first word of "$ac_prog", so it can be a program name with args.
22173 set dummy $ac_prog; ac_word=$2
22174 echo "$as_me:$LINENO: checking for $ac_word" >&5
22175 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22176 if test "${ac_cv_prog_MSGFMT+set}" = set; then
22177   echo $ECHO_N "(cached) $ECHO_C" >&6
22178 else
22179   if test -n "$MSGFMT"; then
22180   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
22181 else
22182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22183 for as_dir in $PATH
22184 do
22185   IFS=$as_save_IFS
22186   test -z "$as_dir" && as_dir=.
22187   for ac_exec_ext in '' $ac_executable_extensions; do
22188   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22189     ac_cv_prog_MSGFMT="$ac_prog"
22190     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22191     break 2
22192   fi
22193 done
22194 done
22195
22196 fi
22197 fi
22198 MSGFMT=$ac_cv_prog_MSGFMT
22199 if test -n "$MSGFMT"; then
22200   echo "$as_me:$LINENO: result: $MSGFMT" >&5
22201 echo "${ECHO_T}$MSGFMT" >&6
22202 else
22203   echo "$as_me:$LINENO: result: no" >&5
22204 echo "${ECHO_T}no" >&6
22205 fi
22206
22207   test -n "$MSGFMT" && break
22208 done
22209
22210   if test -z "$MSGFMT"; then
22211     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
22212 echo "$as_me: error: msgfmt is required for NLS" >&2;}
22213    { (exit 1); exit 1; }; }
22214   fi
22215   for ac_prog in msgmerge
22216 do
22217   # Extract the first word of "$ac_prog", so it can be a program name with args.
22218 set dummy $ac_prog; ac_word=$2
22219 echo "$as_me:$LINENO: checking for $ac_word" >&5
22220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22221 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
22222   echo $ECHO_N "(cached) $ECHO_C" >&6
22223 else
22224   if test -n "$MSGMERGE"; then
22225   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
22226 else
22227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22228 for as_dir in $PATH
22229 do
22230   IFS=$as_save_IFS
22231   test -z "$as_dir" && as_dir=.
22232   for ac_exec_ext in '' $ac_executable_extensions; do
22233   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22234     ac_cv_prog_MSGMERGE="$ac_prog"
22235     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22236     break 2
22237   fi
22238 done
22239 done
22240
22241 fi
22242 fi
22243 MSGMERGE=$ac_cv_prog_MSGMERGE
22244 if test -n "$MSGMERGE"; then
22245   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
22246 echo "${ECHO_T}$MSGMERGE" >&6
22247 else
22248   echo "$as_me:$LINENO: result: no" >&5
22249 echo "${ECHO_T}no" >&6
22250 fi
22251
22252   test -n "$MSGMERGE" && break
22253 done
22254
22255   for ac_prog in xgettext
22256 do
22257   # Extract the first word of "$ac_prog", so it can be a program name with args.
22258 set dummy $ac_prog; ac_word=$2
22259 echo "$as_me:$LINENO: checking for $ac_word" >&5
22260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22261 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
22262   echo $ECHO_N "(cached) $ECHO_C" >&6
22263 else
22264   if test -n "$XGETTEXT"; then
22265   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
22266 else
22267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22268 for as_dir in $PATH
22269 do
22270   IFS=$as_save_IFS
22271   test -z "$as_dir" && as_dir=.
22272   for ac_exec_ext in '' $ac_executable_extensions; do
22273   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22274     ac_cv_prog_XGETTEXT="$ac_prog"
22275     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22276     break 2
22277   fi
22278 done
22279 done
22280
22281 fi
22282 fi
22283 XGETTEXT=$ac_cv_prog_XGETTEXT
22284 if test -n "$XGETTEXT"; then
22285   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
22286 echo "${ECHO_T}$XGETTEXT" >&6
22287 else
22288   echo "$as_me:$LINENO: result: no" >&5
22289 echo "${ECHO_T}no" >&6
22290 fi
22291
22292   test -n "$XGETTEXT" && break
22293 done
22294
22295
22296   # Note: share/locale is always the default, independent of $datadir
22297   localedir='${prefix}/share/locale'
22298
22299
22300 fi
22301
22302 # Check for Tcl configuration script tclConfig.sh
22303 if test "$with_tcl" = yes; then
22304     for ac_prog in tclsh tcl
22305 do
22306   # Extract the first word of "$ac_prog", so it can be a program name with args.
22307 set dummy $ac_prog; ac_word=$2
22308 echo "$as_me:$LINENO: checking for $ac_word" >&5
22309 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22310 if test "${ac_cv_path_TCLSH+set}" = set; then
22311   echo $ECHO_N "(cached) $ECHO_C" >&6
22312 else
22313   case $TCLSH in
22314   [\\/]* | ?:[\\/]*)
22315   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22316   ;;
22317   *)
22318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22319 for as_dir in $PATH
22320 do
22321   IFS=$as_save_IFS
22322   test -z "$as_dir" && as_dir=.
22323   for ac_exec_ext in '' $ac_executable_extensions; do
22324   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22325     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22326     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22327     break 2
22328   fi
22329 done
22330 done
22331
22332   ;;
22333 esac
22334 fi
22335 TCLSH=$ac_cv_path_TCLSH
22336
22337 if test -n "$TCLSH"; then
22338   echo "$as_me:$LINENO: result: $TCLSH" >&5
22339 echo "${ECHO_T}$TCLSH" >&6
22340 else
22341   echo "$as_me:$LINENO: result: no" >&5
22342 echo "${ECHO_T}no" >&6
22343 fi
22344
22345   test -n "$TCLSH" && break
22346 done
22347
22348 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22349 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22350 # Let user override test
22351 if test -z "$TCL_CONFIG_SH"; then
22352     pgac_test_dirs="$with_tclconfig"
22353
22354     set X $pgac_test_dirs; shift
22355     if test $# -eq 0; then
22356         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22357 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22358    { (exit 1); exit 1; }; }
22359         set X `echo 'puts $auto_path' | $TCLSH`; shift
22360     fi
22361
22362     for pgac_dir do
22363         if test -r "$pgac_dir/tclConfig.sh"; then
22364             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22365             break
22366         fi
22367     done
22368 fi
22369
22370 if test -z "$TCL_CONFIG_SH"; then
22371     echo "$as_me:$LINENO: result: no" >&5
22372 echo "${ECHO_T}no" >&6
22373     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22374 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22375    { (exit 1); exit 1; }; }
22376 else
22377     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22378 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22379 fi
22380
22381
22382
22383     . "$TCL_CONFIG_SH"
22384 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22385 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22386 eval TCL_LIBS=\"$TCL_LIBS\"
22387 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22388 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22389
22390         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22391     ac_save_CPPFLAGS=$CPPFLAGS
22392     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22393     if test "${ac_cv_header_tcl_h+set}" = set; then
22394   echo "$as_me:$LINENO: checking for tcl.h" >&5
22395 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22396 if test "${ac_cv_header_tcl_h+set}" = set; then
22397   echo $ECHO_N "(cached) $ECHO_C" >&6
22398 fi
22399 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22400 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22401 else
22402   # Is the header compilable?
22403 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22404 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22405 cat >conftest.$ac_ext <<_ACEOF
22406 /* confdefs.h.  */
22407 _ACEOF
22408 cat confdefs.h >>conftest.$ac_ext
22409 cat >>conftest.$ac_ext <<_ACEOF
22410 /* end confdefs.h.  */
22411 $ac_includes_default
22412 #include <tcl.h>
22413 _ACEOF
22414 rm -f conftest.$ac_objext
22415 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22416   (eval $ac_compile) 2>conftest.er1
22417   ac_status=$?
22418   grep -v '^ *+' conftest.er1 >conftest.err
22419   rm -f conftest.er1
22420   cat conftest.err >&5
22421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22422   (exit $ac_status); } &&
22423          { ac_try='test -z "$ac_c_werror_flag"
22424                          || test ! -s conftest.err'
22425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22426   (eval $ac_try) 2>&5
22427   ac_status=$?
22428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22429   (exit $ac_status); }; } &&
22430          { ac_try='test -s conftest.$ac_objext'
22431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22432   (eval $ac_try) 2>&5
22433   ac_status=$?
22434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22435   (exit $ac_status); }; }; then
22436   ac_header_compiler=yes
22437 else
22438   echo "$as_me: failed program was:" >&5
22439 sed 's/^/| /' conftest.$ac_ext >&5
22440
22441 ac_header_compiler=no
22442 fi
22443 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22444 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22445 echo "${ECHO_T}$ac_header_compiler" >&6
22446
22447 # Is the header present?
22448 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22449 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22450 cat >conftest.$ac_ext <<_ACEOF
22451 /* confdefs.h.  */
22452 _ACEOF
22453 cat confdefs.h >>conftest.$ac_ext
22454 cat >>conftest.$ac_ext <<_ACEOF
22455 /* end confdefs.h.  */
22456 #include <tcl.h>
22457 _ACEOF
22458 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22459   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22460   ac_status=$?
22461   grep -v '^ *+' conftest.er1 >conftest.err
22462   rm -f conftest.er1
22463   cat conftest.err >&5
22464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22465   (exit $ac_status); } >/dev/null; then
22466   if test -s conftest.err; then
22467     ac_cpp_err=$ac_c_preproc_warn_flag
22468     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22469   else
22470     ac_cpp_err=
22471   fi
22472 else
22473   ac_cpp_err=yes
22474 fi
22475 if test -z "$ac_cpp_err"; then
22476   ac_header_preproc=yes
22477 else
22478   echo "$as_me: failed program was:" >&5
22479 sed 's/^/| /' conftest.$ac_ext >&5
22480
22481   ac_header_preproc=no
22482 fi
22483 rm -f conftest.err conftest.$ac_ext
22484 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22485 echo "${ECHO_T}$ac_header_preproc" >&6
22486
22487 # So?  What about this header?
22488 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22489   yes:no: )
22490     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22491 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22492     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22493 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22494     ac_header_preproc=yes
22495     ;;
22496   no:yes:* )
22497     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22498 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22499     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22500 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22501     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22502 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22503     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22504 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22505     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22506 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22507     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22508 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22509     (
22510       cat <<\_ASBOX
22511 ## ---------------------------------------- ##
22512 ## Report this to pgsql-bugs@postgresql.org ##
22513 ## ---------------------------------------- ##
22514 _ASBOX
22515     ) |
22516       sed "s/^/$as_me: WARNING:     /" >&2
22517     ;;
22518 esac
22519 echo "$as_me:$LINENO: checking for tcl.h" >&5
22520 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22521 if test "${ac_cv_header_tcl_h+set}" = set; then
22522   echo $ECHO_N "(cached) $ECHO_C" >&6
22523 else
22524   ac_cv_header_tcl_h=$ac_header_preproc
22525 fi
22526 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22527 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22528
22529 fi
22530 if test $ac_cv_header_tcl_h = yes; then
22531   :
22532 else
22533   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22534 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22535    { (exit 1); exit 1; }; }
22536 fi
22537
22538
22539     CPPFLAGS=$ac_save_CPPFLAGS
22540 fi
22541
22542 #
22543 # Check for DocBook and tools
22544 #
22545 for ac_prog in onsgmls nsgmls
22546 do
22547   # Extract the first word of "$ac_prog", so it can be a program name with args.
22548 set dummy $ac_prog; ac_word=$2
22549 echo "$as_me:$LINENO: checking for $ac_word" >&5
22550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22551 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22552   echo $ECHO_N "(cached) $ECHO_C" >&6
22553 else
22554   if test -n "$NSGMLS"; then
22555   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22556 else
22557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22558 for as_dir in $PATH
22559 do
22560   IFS=$as_save_IFS
22561   test -z "$as_dir" && as_dir=.
22562   for ac_exec_ext in '' $ac_executable_extensions; do
22563   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22564     ac_cv_prog_NSGMLS="$ac_prog"
22565     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22566     break 2
22567   fi
22568 done
22569 done
22570
22571 fi
22572 fi
22573 NSGMLS=$ac_cv_prog_NSGMLS
22574 if test -n "$NSGMLS"; then
22575   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22576 echo "${ECHO_T}$NSGMLS" >&6
22577 else
22578   echo "$as_me:$LINENO: result: no" >&5
22579 echo "${ECHO_T}no" >&6
22580 fi
22581
22582   test -n "$NSGMLS" && break
22583 done
22584
22585 for ac_prog in openjade jade
22586 do
22587   # Extract the first word of "$ac_prog", so it can be a program name with args.
22588 set dummy $ac_prog; ac_word=$2
22589 echo "$as_me:$LINENO: checking for $ac_word" >&5
22590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22591 if test "${ac_cv_prog_JADE+set}" = set; then
22592   echo $ECHO_N "(cached) $ECHO_C" >&6
22593 else
22594   if test -n "$JADE"; then
22595   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22596 else
22597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22598 for as_dir in $PATH
22599 do
22600   IFS=$as_save_IFS
22601   test -z "$as_dir" && as_dir=.
22602   for ac_exec_ext in '' $ac_executable_extensions; do
22603   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22604     ac_cv_prog_JADE="$ac_prog"
22605     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22606     break 2
22607   fi
22608 done
22609 done
22610
22611 fi
22612 fi
22613 JADE=$ac_cv_prog_JADE
22614 if test -n "$JADE"; then
22615   echo "$as_me:$LINENO: result: $JADE" >&5
22616 echo "${ECHO_T}$JADE" >&6
22617 else
22618   echo "$as_me:$LINENO: result: no" >&5
22619 echo "${ECHO_T}no" >&6
22620 fi
22621
22622   test -n "$JADE" && break
22623 done
22624
22625
22626 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22627 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22628 if test "${pgac_cv_check_docbook+set}" = set; then
22629   echo $ECHO_N "(cached) $ECHO_C" >&6
22630 else
22631   cat >conftest.sgml <<EOF
22632 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22633 <book>
22634  <title>test</title>
22635  <chapter>
22636   <title>random</title>
22637    <sect1>
22638     <title>testsect</title>
22639     <para>text</para>
22640   </sect1>
22641  </chapter>
22642 </book>
22643 EOF
22644
22645 pgac_cv_check_docbook=no
22646
22647 if test -n "$NSGMLS"; then
22648   $NSGMLS -s conftest.sgml 1>&5 2>&1
22649   if test $? -eq 0; then
22650     pgac_cv_check_docbook=yes
22651   fi
22652 fi
22653 rm -f conftest.sgml
22654 fi
22655 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22656 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22657
22658 have_docbook=$pgac_cv_check_docbook
22659
22660
22661 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22662 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22663 if test "${pgac_cv_path_stylesheets+set}" = set; then
22664   echo $ECHO_N "(cached) $ECHO_C" >&6
22665 else
22666   if test -n "$DOCBOOKSTYLE"; then
22667   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22668 else
22669   for pgac_prefix in /usr /usr/local /opt; do
22670     for pgac_infix in share lib; do
22671       for pgac_postfix in \
22672         sgml/stylesheets/nwalsh-modular \
22673         sgml/stylesheets/docbook \
22674                 sgml/docbook-dsssl \
22675         sgml/docbook/dsssl/modular \
22676         sgml/docbook/stylesheet/dsssl/modular \
22677         sgml/docbook/dsssl-stylesheets
22678       do
22679         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22680         if test -r "$pgac_candidate/html/docbook.dsl" \
22681            && test -r "$pgac_candidate/print/docbook.dsl"
22682         then
22683           pgac_cv_path_stylesheets=$pgac_candidate
22684           break 3
22685         fi
22686       done
22687     done
22688   done
22689 fi
22690 fi
22691
22692 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22693
22694 if test -n "$DOCBOOKSTYLE"; then
22695   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22696 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22697 else
22698   echo "$as_me:$LINENO: result: no" >&5
22699 echo "${ECHO_T}no" >&6
22700 fi
22701 if test -n "$DOCBOOKSTYLE"; then
22702   for ac_prog in collateindex.pl
22703 do
22704   # Extract the first word of "$ac_prog", so it can be a program name with args.
22705 set dummy $ac_prog; ac_word=$2
22706 echo "$as_me:$LINENO: checking for $ac_word" >&5
22707 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22708 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22709   echo $ECHO_N "(cached) $ECHO_C" >&6
22710 else
22711   case $COLLATEINDEX in
22712   [\\/]* | ?:[\\/]*)
22713   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22714   ;;
22715   *)
22716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22717 for as_dir in $DOCBOOKSTYLE/bin $PATH
22718 do
22719   IFS=$as_save_IFS
22720   test -z "$as_dir" && as_dir=.
22721   for ac_exec_ext in '' $ac_executable_extensions; do
22722   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22723     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22724     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22725     break 2
22726   fi
22727 done
22728 done
22729
22730   ;;
22731 esac
22732 fi
22733 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22734
22735 if test -n "$COLLATEINDEX"; then
22736   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22737 echo "${ECHO_T}$COLLATEINDEX" >&6
22738 else
22739   echo "$as_me:$LINENO: result: no" >&5
22740 echo "${ECHO_T}no" >&6
22741 fi
22742
22743   test -n "$COLLATEINDEX" && break
22744 done
22745
22746 else
22747   for ac_prog in collateindex.pl
22748 do
22749   # Extract the first word of "$ac_prog", so it can be a program name with args.
22750 set dummy $ac_prog; ac_word=$2
22751 echo "$as_me:$LINENO: checking for $ac_word" >&5
22752 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22753 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22754   echo $ECHO_N "(cached) $ECHO_C" >&6
22755 else
22756   case $COLLATEINDEX in
22757   [\\/]* | ?:[\\/]*)
22758   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22759   ;;
22760   *)
22761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22762 for as_dir in $PATH
22763 do
22764   IFS=$as_save_IFS
22765   test -z "$as_dir" && as_dir=.
22766   for ac_exec_ext in '' $ac_executable_extensions; do
22767   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22768     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22769     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22770     break 2
22771   fi
22772 done
22773 done
22774
22775   ;;
22776 esac
22777 fi
22778 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22779
22780 if test -n "$COLLATEINDEX"; then
22781   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22782 echo "${ECHO_T}$COLLATEINDEX" >&6
22783 else
22784   echo "$as_me:$LINENO: result: no" >&5
22785 echo "${ECHO_T}no" >&6
22786 fi
22787
22788   test -n "$COLLATEINDEX" && break
22789 done
22790
22791 fi
22792 for ac_prog in sgmlspl
22793 do
22794   # Extract the first word of "$ac_prog", so it can be a program name with args.
22795 set dummy $ac_prog; ac_word=$2
22796 echo "$as_me:$LINENO: checking for $ac_word" >&5
22797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22798 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22799   echo $ECHO_N "(cached) $ECHO_C" >&6
22800 else
22801   if test -n "$SGMLSPL"; then
22802   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22803 else
22804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22805 for as_dir in $PATH
22806 do
22807   IFS=$as_save_IFS
22808   test -z "$as_dir" && as_dir=.
22809   for ac_exec_ext in '' $ac_executable_extensions; do
22810   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22811     ac_cv_prog_SGMLSPL="$ac_prog"
22812     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22813     break 2
22814   fi
22815 done
22816 done
22817
22818 fi
22819 fi
22820 SGMLSPL=$ac_cv_prog_SGMLSPL
22821 if test -n "$SGMLSPL"; then
22822   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22823 echo "${ECHO_T}$SGMLSPL" >&6
22824 else
22825   echo "$as_me:$LINENO: result: no" >&5
22826 echo "${ECHO_T}no" >&6
22827 fi
22828
22829   test -n "$SGMLSPL" && break
22830 done
22831
22832
22833 # Thread testing
22834
22835 # We have to run the thread test near the end so we have all our symbols
22836 # defined.  Cross compiling throws a warning.
22837 #
22838 if test "$enable_thread_safety_force" = yes; then
22839 if test x"$template" != x"win32"
22840 then
22841   { echo "$as_me:$LINENO: WARNING:
22842 *** Skipping thread test program.  --enable-thread-safety-force was used.
22843 *** Run the program in src/test/thread on the your machine and add
22844 proper locking function calls to your applications to guarantee thread
22845 safety.
22846 " >&5
22847 echo "$as_me: WARNING:
22848 *** Skipping thread test program.  --enable-thread-safety-force was used.
22849 *** Run the program in src/test/thread on the your machine and add
22850 proper locking function calls to your applications to guarantee thread
22851 safety.
22852 " >&2;}
22853 else
22854 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22855 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22856 fi
22857 elif test "$enable_thread_safety" = yes; then
22858 if test x"$template" != x"win32"
22859 then
22860 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22861 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22862
22863 _CFLAGS="$CFLAGS"
22864 _LIBS="$LIBS"
22865 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22866 LIBS="$LIBS $PTHREAD_LIBS"
22867 if test "$cross_compiling" = yes; then
22868   echo "$as_me:$LINENO: result: maybe" >&5
22869 echo "${ECHO_T}maybe" >&6
22870   { echo "$as_me:$LINENO: WARNING:
22871 *** Skipping thread test program because of cross-compile build.
22872 *** Run the program in src/test/thread on the target machine.
22873 " >&5
22874 echo "$as_me: WARNING:
22875 *** Skipping thread test program because of cross-compile build.
22876 *** Run the program in src/test/thread on the target machine.
22877 " >&2;}
22878 else
22879   cat >conftest.$ac_ext <<_ACEOF
22880 /* confdefs.h.  */
22881 _ACEOF
22882 cat confdefs.h >>conftest.$ac_ext
22883 cat >>conftest.$ac_ext <<_ACEOF
22884 /* end confdefs.h.  */
22885 #include "$srcdir/src/test/thread/thread_test.c"
22886 _ACEOF
22887 rm -f conftest$ac_exeext
22888 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22889   (eval $ac_link) 2>&5
22890   ac_status=$?
22891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22892   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22894   (eval $ac_try) 2>&5
22895   ac_status=$?
22896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22897   (exit $ac_status); }; }; then
22898   echo "$as_me:$LINENO: result: yes" >&5
22899 echo "${ECHO_T}yes" >&6
22900 else
22901   echo "$as_me: program exited with status $ac_status" >&5
22902 echo "$as_me: failed program was:" >&5
22903 sed 's/^/| /' conftest.$ac_ext >&5
22904
22905 ( exit $ac_status )
22906 echo "$as_me:$LINENO: result: no" >&5
22907 echo "${ECHO_T}no" >&6
22908   { { echo "$as_me:$LINENO: error:
22909 *** Thread test program failed.  Your platform is not thread-safe.
22910 *** Check the file 'config.log'for the exact reason.
22911 ***
22912 *** You can use the configure option --enable-thread-safety-force
22913 *** to force threads to be enabled.  However, you must then run
22914 *** the program in src/test/thread and add locking function calls
22915 *** to your applications to guarantee thread safety.
22916 " >&5
22917 echo "$as_me: error:
22918 *** Thread test program failed.  Your platform is not thread-safe.
22919 *** Check the file 'config.log'for the exact reason.
22920 ***
22921 *** You can use the configure option --enable-thread-safety-force
22922 *** to force threads to be enabled.  However, you must then run
22923 *** the program in src/test/thread and add locking function calls
22924 *** to your applications to guarantee thread safety.
22925 " >&2;}
22926    { (exit 1); exit 1; }; }
22927 fi
22928 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22929 fi
22930 CFLAGS="$_CFLAGS"
22931 LIBS="$_LIBS"
22932 else
22933 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22934 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22935 fi
22936 fi
22937
22938 # prepare build tree if outside source tree
22939 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22940 # Note 2: /bin/pwd might be better than shell's built-in at getting
22941 #         a symlink-free name.
22942 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22943   vpath_build=no
22944 else
22945   vpath_build=yes
22946   if test "$no_create" != yes; then
22947     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22948     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22949     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22950       || { { echo "$as_me:$LINENO: error: failed" >&5
22951 echo "$as_me: error: failed" >&2;}
22952    { (exit 1); exit 1; }; }
22953     echo "$as_me:$LINENO: result: done" >&5
22954 echo "${ECHO_T}done" >&6
22955   fi
22956 fi
22957
22958
22959
22960                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22961
22962
22963                                                             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}"
22964
22965
22966 if test "$PORTNAME" = "win32"; then
22967           ac_config_commands="$ac_config_commands check_win32_symlinks"
22968
22969 fi
22970
22971           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22972
22973
22974           ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
22975
22976
22977
22978 #
22979 # Warn about unknown options
22980 #
22981
22982
22983   for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
22984     case $pgac_var in
22985       with_template) ;;
22986 with_docdir) ;;
22987 with_includes) ;;
22988 with_libraries) ;;
22989 with_libs) ;;
22990 enable_integer_datetimes) ;;
22991 enable_nls) ;;
22992 with_pgport) ;;
22993 enable_shared) ;;
22994 enable_rpath) ;;
22995 enable_spinlocks) ;;
22996 enable_debug) ;;
22997 enable_dtrace) ;;
22998 with_CC) ;;
22999 enable_depend) ;;
23000 enable_cassert) ;;
23001 enable_thread_safety) ;;
23002 enable_thread_safety_force) ;;
23003 with_tcl) ;;
23004 with_tclconfig) ;;
23005 with_perl) ;;
23006 with_python) ;;
23007 with_krb5) ;;
23008 with_krb_srvnam) ;;
23009 with_pam) ;;
23010 with_ldap) ;;
23011 with_bonjour) ;;
23012 with_openssl) ;;
23013 with_readline) ;;
23014 with_libedit_preferred) ;;
23015 with_zlib) ;;
23016
23017       with_gnu_ld) ;;
23018     *)
23019       pgac_txt=`echo $pgac_var | tr '_' '-'`
23020       { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
23021 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
23022       ;;
23023     esac
23024   done
23025
23026
23027 cat >confcache <<\_ACEOF
23028 # This file is a shell script that caches the results of configure
23029 # tests run on this system so they can be shared between configure
23030 # scripts and configure runs, see configure's option --config-cache.
23031 # It is not useful on other systems.  If it contains results you don't
23032 # want to keep, you may remove or edit it.
23033 #
23034 # config.status only pays attention to the cache file if you give it
23035 # the --recheck option to rerun configure.
23036 #
23037 # `ac_cv_env_foo' variables (set or unset) will be overridden when
23038 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23039 # following values.
23040
23041 _ACEOF
23042
23043 # The following way of writing the cache mishandles newlines in values,
23044 # but we know of no workaround that is simple, portable, and efficient.
23045 # So, don't put newlines in cache variables' values.
23046 # Ultrix sh set writes to stderr and can't be redirected directly,
23047 # and sets the high bit in the cache file unless we assign to the vars.
23048 {
23049   (set) 2>&1 |
23050     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23051     *ac_space=\ *)
23052       # `set' does not quote correctly, so add quotes (double-quote
23053       # substitution turns \\\\ into \\, and sed turns \\ into \).
23054       sed -n \
23055         "s/'/'\\\\''/g;
23056           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23057       ;;
23058     *)
23059       # `set' quotes correctly as required by POSIX, so do not add quotes.
23060       sed -n \
23061         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23062       ;;
23063     esac;
23064 } |
23065   sed '
23066      t clear
23067      : clear
23068      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23069      t end
23070      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23071      : end' >>confcache
23072 if diff $cache_file confcache >/dev/null 2>&1; then :; else
23073   if test -w $cache_file; then
23074     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23075     cat confcache >$cache_file
23076   else
23077     echo "not updating unwritable cache $cache_file"
23078   fi
23079 fi
23080 rm -f confcache
23081
23082 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23083 # Let make expand exec_prefix.
23084 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23085
23086 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23087 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23088 # trailing colons and then remove the whole line if VPATH becomes empty
23089 # (actually we leave an empty line to preserve line numbers).
23090 if test "x$srcdir" = x.; then
23091   ac_vpsub='/^[  ]*VPATH[        ]*=/{
23092 s/:*\$(srcdir):*/:/;
23093 s/:*\${srcdir}:*/:/;
23094 s/:*@srcdir@:*/:/;
23095 s/^\([^=]*=[     ]*\):*/\1/;
23096 s/:*$//;
23097 s/^[^=]*=[       ]*$//;
23098 }'
23099 fi
23100
23101 DEFS=-DHAVE_CONFIG_H
23102
23103 ac_libobjs=
23104 ac_ltlibobjs=
23105 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23106   # 1. Remove the extension, and $U if already installed.
23107   ac_i=`echo "$ac_i" |
23108          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
23109   # 2. Add them.
23110   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23111   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23112 done
23113 LIBOBJS=$ac_libobjs
23114
23115 LTLIBOBJS=$ac_ltlibobjs
23116
23117
23118
23119 : ${CONFIG_STATUS=./config.status}
23120 ac_clean_files_save=$ac_clean_files
23121 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23122 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23123 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23124 cat >$CONFIG_STATUS <<_ACEOF
23125 #! $SHELL
23126 # Generated by $as_me.
23127 # Run this file to recreate the current configuration.
23128 # Compiler output produced by configure, useful for debugging
23129 # configure, is in config.log if it exists.
23130
23131 debug=false
23132 ac_cs_recheck=false
23133 ac_cs_silent=false
23134 SHELL=\${CONFIG_SHELL-$SHELL}
23135 _ACEOF
23136
23137 cat >>$CONFIG_STATUS <<\_ACEOF
23138 ## --------------------- ##
23139 ## M4sh Initialization.  ##
23140 ## --------------------- ##
23141
23142 # Be Bourne compatible
23143 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23144   emulate sh
23145   NULLCMD=:
23146   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23147   # is contrary to our usage.  Disable this feature.
23148   alias -g '${1+"$@"}'='"$@"'
23149 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23150   set -o posix
23151 fi
23152 DUALCASE=1; export DUALCASE # for MKS sh
23153
23154 # Support unset when possible.
23155 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23156   as_unset=unset
23157 else
23158   as_unset=false
23159 fi
23160
23161
23162 # Work around bugs in pre-3.0 UWIN ksh.
23163 $as_unset ENV MAIL MAILPATH
23164 PS1='$ '
23165 PS2='> '
23166 PS4='+ '
23167
23168 # NLS nuisances.
23169 for as_var in \
23170   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23171   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23172   LC_TELEPHONE LC_TIME
23173 do
23174   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23175     eval $as_var=C; export $as_var
23176   else
23177     $as_unset $as_var
23178   fi
23179 done
23180
23181 # Required to use basename.
23182 if expr a : '\(a\)' >/dev/null 2>&1; then
23183   as_expr=expr
23184 else
23185   as_expr=false
23186 fi
23187
23188 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23189   as_basename=basename
23190 else
23191   as_basename=false
23192 fi
23193
23194
23195 # Name of the executable.
23196 as_me=`$as_basename "$0" ||
23197 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23198          X"$0" : 'X\(//\)$' \| \
23199          X"$0" : 'X\(/\)$' \| \
23200          .     : '\(.\)' 2>/dev/null ||
23201 echo X/"$0" |
23202     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23203           /^X\/\(\/\/\)$/{ s//\1/; q; }
23204           /^X\/\(\/\).*/{ s//\1/; q; }
23205           s/.*/./; q'`
23206
23207
23208 # PATH needs CR, and LINENO needs CR and PATH.
23209 # Avoid depending upon Character Ranges.
23210 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23211 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23212 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23213 as_cr_digits='0123456789'
23214 as_cr_alnum=$as_cr_Letters$as_cr_digits
23215
23216 # The user is always right.
23217 if test "${PATH_SEPARATOR+set}" != set; then
23218   echo "#! /bin/sh" >conf$$.sh
23219   echo  "exit 0"   >>conf$$.sh
23220   chmod +x conf$$.sh
23221   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23222     PATH_SEPARATOR=';'
23223   else
23224     PATH_SEPARATOR=:
23225   fi
23226   rm -f conf$$.sh
23227 fi
23228
23229
23230   as_lineno_1=$LINENO
23231   as_lineno_2=$LINENO
23232   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23233   test "x$as_lineno_1" != "x$as_lineno_2" &&
23234   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
23235   # Find who we are.  Look in the path if we contain no path at all
23236   # relative or not.
23237   case $0 in
23238     *[\\/]* ) as_myself=$0 ;;
23239     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23240 for as_dir in $PATH
23241 do
23242   IFS=$as_save_IFS
23243   test -z "$as_dir" && as_dir=.
23244   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23245 done
23246
23247        ;;
23248   esac
23249   # We did not find ourselves, most probably we were run as `sh COMMAND'
23250   # in which case we are not to be found in the path.
23251   if test "x$as_myself" = x; then
23252     as_myself=$0
23253   fi
23254   if test ! -f "$as_myself"; then
23255     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23256 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23257    { (exit 1); exit 1; }; }
23258   fi
23259   case $CONFIG_SHELL in
23260   '')
23261     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23262 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23263 do
23264   IFS=$as_save_IFS
23265   test -z "$as_dir" && as_dir=.
23266   for as_base in sh bash ksh sh5; do
23267          case $as_dir in
23268          /*)
23269            if ("$as_dir/$as_base" -c '
23270   as_lineno_1=$LINENO
23271   as_lineno_2=$LINENO
23272   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23273   test "x$as_lineno_1" != "x$as_lineno_2" &&
23274   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
23275              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23276              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23277              CONFIG_SHELL=$as_dir/$as_base
23278              export CONFIG_SHELL
23279              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23280            fi;;
23281          esac
23282        done
23283 done
23284 ;;
23285   esac
23286
23287   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23288   # uniformly replaced by the line number.  The first 'sed' inserts a
23289   # line-number line before each line; the second 'sed' does the real
23290   # work.  The second script uses 'N' to pair each line-number line
23291   # with the numbered line, and appends trailing '-' during
23292   # substitution so that $LINENO is not a special case at line end.
23293   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23294   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23295   sed '=' <$as_myself |
23296     sed '
23297       N
23298       s,$,-,
23299       : loop
23300       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23301       t loop
23302       s,-$,,
23303       s,^['$as_cr_digits']*\n,,
23304     ' >$as_me.lineno &&
23305   chmod +x $as_me.lineno ||
23306     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23307 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23308    { (exit 1); exit 1; }; }
23309
23310   # Don't try to exec as it changes $[0], causing all sort of problems
23311   # (the dirname of $[0] is not the place where we might find the
23312   # original and so on.  Autoconf is especially sensible to this).
23313   . ./$as_me.lineno
23314   # Exit status is that of the last command.
23315   exit
23316 }
23317
23318
23319 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23320   *c*,-n*) ECHO_N= ECHO_C='
23321 ' ECHO_T='      ' ;;
23322   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23323   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23324 esac
23325
23326 if expr a : '\(a\)' >/dev/null 2>&1; then
23327   as_expr=expr
23328 else
23329   as_expr=false
23330 fi
23331
23332 rm -f conf$$ conf$$.exe conf$$.file
23333 echo >conf$$.file
23334 if ln -s conf$$.file conf$$ 2>/dev/null; then
23335   # We could just check for DJGPP; but this test a) works b) is more generic
23336   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23337   if test -f conf$$.exe; then
23338     # Don't use ln at all; we don't have any links
23339     as_ln_s='cp -p'
23340   else
23341     as_ln_s='ln -s'
23342   fi
23343 elif ln conf$$.file conf$$ 2>/dev/null; then
23344   as_ln_s=ln
23345 else
23346   as_ln_s='cp -p'
23347 fi
23348 rm -f conf$$ conf$$.exe conf$$.file
23349
23350 if mkdir -p . 2>/dev/null; then
23351   as_mkdir_p=:
23352 else
23353   test -d ./-p && rmdir ./-p
23354   as_mkdir_p=false
23355 fi
23356
23357 as_executable_p="test -f"
23358
23359 # Sed expression to map a string onto a valid CPP name.
23360 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23361
23362 # Sed expression to map a string onto a valid variable name.
23363 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23364
23365
23366 # IFS
23367 # We need space, tab and new line, in precisely that order.
23368 as_nl='
23369 '
23370 IFS="   $as_nl"
23371
23372 # CDPATH.
23373 $as_unset CDPATH
23374
23375 exec 6>&1
23376
23377 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23378 # report actual input values of CONFIG_FILES etc. instead of their
23379 # values after options handling.  Logging --version etc. is OK.
23380 exec 5>>config.log
23381 {
23382   echo
23383   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23384 ## Running $as_me. ##
23385 _ASBOX
23386 } >&5
23387 cat >&5 <<_CSEOF
23388
23389 This file was extended by PostgreSQL $as_me 8.2beta1, which was
23390 generated by GNU Autoconf 2.59.  Invocation command line was
23391
23392   CONFIG_FILES    = $CONFIG_FILES
23393   CONFIG_HEADERS  = $CONFIG_HEADERS
23394   CONFIG_LINKS    = $CONFIG_LINKS
23395   CONFIG_COMMANDS = $CONFIG_COMMANDS
23396   $ $0 $@
23397
23398 _CSEOF
23399 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23400 echo >&5
23401 _ACEOF
23402
23403 # Files that config.status was made for.
23404 if test -n "$ac_config_files"; then
23405   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23406 fi
23407
23408 if test -n "$ac_config_headers"; then
23409   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23410 fi
23411
23412 if test -n "$ac_config_links"; then
23413   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23414 fi
23415
23416 if test -n "$ac_config_commands"; then
23417   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23418 fi
23419
23420 cat >>$CONFIG_STATUS <<\_ACEOF
23421
23422 ac_cs_usage="\
23423 \`$as_me' instantiates files from templates according to the
23424 current configuration.
23425
23426 Usage: $0 [OPTIONS] [FILE]...
23427
23428   -h, --help       print this help, then exit
23429   -V, --version    print version number, then exit
23430   -q, --quiet      do not print progress messages
23431   -d, --debug      don't remove temporary files
23432       --recheck    update $as_me by reconfiguring in the same conditions
23433   --file=FILE[:TEMPLATE]
23434                    instantiate the configuration file FILE
23435   --header=FILE[:TEMPLATE]
23436                    instantiate the configuration header FILE
23437
23438 Configuration files:
23439 $config_files
23440
23441 Configuration headers:
23442 $config_headers
23443
23444 Configuration links:
23445 $config_links
23446
23447 Configuration commands:
23448 $config_commands
23449
23450 Report bugs to <bug-autoconf@gnu.org>."
23451 _ACEOF
23452
23453 cat >>$CONFIG_STATUS <<_ACEOF
23454 ac_cs_version="\\
23455 PostgreSQL config.status 8.2beta1
23456 configured by $0, generated by GNU Autoconf 2.59,
23457   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23458
23459 Copyright (C) 2003 Free Software Foundation, Inc.
23460 This config.status script is free software; the Free Software Foundation
23461 gives unlimited permission to copy, distribute and modify it."
23462 srcdir=$srcdir
23463 _ACEOF
23464
23465 cat >>$CONFIG_STATUS <<\_ACEOF
23466 # If no file are specified by the user, then we need to provide default
23467 # value.  By we need to know if files were specified by the user.
23468 ac_need_defaults=:
23469 while test $# != 0
23470 do
23471   case $1 in
23472   --*=*)
23473     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23474     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23475     ac_shift=:
23476     ;;
23477   -*)
23478     ac_option=$1
23479     ac_optarg=$2
23480     ac_shift=shift
23481     ;;
23482   *) # This is not an option, so the user has probably given explicit
23483      # arguments.
23484      ac_option=$1
23485      ac_need_defaults=false;;
23486   esac
23487
23488   case $ac_option in
23489   # Handling of the options.
23490 _ACEOF
23491 cat >>$CONFIG_STATUS <<\_ACEOF
23492   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23493     ac_cs_recheck=: ;;
23494   --version | --vers* | -V )
23495     echo "$ac_cs_version"; exit 0 ;;
23496   --he | --h)
23497     # Conflict between --help and --header
23498     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23499 Try \`$0 --help' for more information." >&5
23500 echo "$as_me: error: ambiguous option: $1
23501 Try \`$0 --help' for more information." >&2;}
23502    { (exit 1); exit 1; }; };;
23503   --help | --hel | -h )
23504     echo "$ac_cs_usage"; exit 0 ;;
23505   --debug | --d* | -d )
23506     debug=: ;;
23507   --file | --fil | --fi | --f )
23508     $ac_shift
23509     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23510     ac_need_defaults=false;;
23511   --header | --heade | --head | --hea )
23512     $ac_shift
23513     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23514     ac_need_defaults=false;;
23515   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23516   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23517     ac_cs_silent=: ;;
23518
23519   # This is an error.
23520   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23521 Try \`$0 --help' for more information." >&5
23522 echo "$as_me: error: unrecognized option: $1
23523 Try \`$0 --help' for more information." >&2;}
23524    { (exit 1); exit 1; }; } ;;
23525
23526   *) ac_config_targets="$ac_config_targets $1" ;;
23527
23528   esac
23529   shift
23530 done
23531
23532 ac_configure_extra_args=
23533
23534 if $ac_cs_silent; then
23535   exec 6>/dev/null
23536   ac_configure_extra_args="$ac_configure_extra_args --silent"
23537 fi
23538
23539 _ACEOF
23540 cat >>$CONFIG_STATUS <<_ACEOF
23541 if \$ac_cs_recheck; then
23542   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23543   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23544 fi
23545
23546 _ACEOF
23547
23548
23549
23550
23551
23552 cat >>$CONFIG_STATUS <<\_ACEOF
23553 for ac_config_target in $ac_config_targets
23554 do
23555   case "$ac_config_target" in
23556   # Handling of arguments.
23557   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23558   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23559   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23560   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23561   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23562   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23563   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23564   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23565   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23566   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23567   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23568   "src/interfaces/ecpg/include/ecpg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
23569   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23570 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23571    { (exit 1); exit 1; }; };;
23572   esac
23573 done
23574
23575 # If the user did not use the arguments to specify the items to instantiate,
23576 # then the envvar interface is used.  Set only those that are not.
23577 # We use the long form for the default assignment because of an extremely
23578 # bizarre bug on SunOS 4.1.3.
23579 if $ac_need_defaults; then
23580   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23581   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23582   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23583   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23584 fi
23585
23586 # Have a temporary directory for convenience.  Make it in the build tree
23587 # simply because there is no reason to put it here, and in addition,
23588 # creating and moving files from /tmp can sometimes cause problems.
23589 # Create a temporary directory, and hook for its removal unless debugging.
23590 $debug ||
23591 {
23592   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23593   trap '{ (exit 1); exit 1; }' 1 2 13 15
23594 }
23595
23596 # Create a (secure) tmp directory for tmp files.
23597
23598 {
23599   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23600   test -n "$tmp" && test -d "$tmp"
23601 }  ||
23602 {
23603   tmp=./confstat$$-$RANDOM
23604   (umask 077 && mkdir $tmp)
23605 } ||
23606 {
23607    echo "$me: cannot create a temporary directory in ." >&2
23608    { (exit 1); exit 1; }
23609 }
23610
23611 _ACEOF
23612
23613 cat >>$CONFIG_STATUS <<_ACEOF
23614
23615 #
23616 # CONFIG_FILES section.
23617 #
23618
23619 # No need to generate the scripts if there are no CONFIG_FILES.
23620 # This happens for instance when ./config.status config.h
23621 if test -n "\$CONFIG_FILES"; then
23622   # Protect against being on the right side of a sed subst in config.status.
23623   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23624    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23625 s,@SHELL@,$SHELL,;t t
23626 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23627 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23628 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23629 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23630 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23631 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23632 s,@exec_prefix@,$exec_prefix,;t t
23633 s,@prefix@,$prefix,;t t
23634 s,@program_transform_name@,$program_transform_name,;t t
23635 s,@bindir@,$bindir,;t t
23636 s,@sbindir@,$sbindir,;t t
23637 s,@libexecdir@,$libexecdir,;t t
23638 s,@datadir@,$datadir,;t t
23639 s,@sysconfdir@,$sysconfdir,;t t
23640 s,@sharedstatedir@,$sharedstatedir,;t t
23641 s,@localstatedir@,$localstatedir,;t t
23642 s,@libdir@,$libdir,;t t
23643 s,@includedir@,$includedir,;t t
23644 s,@oldincludedir@,$oldincludedir,;t t
23645 s,@infodir@,$infodir,;t t
23646 s,@mandir@,$mandir,;t t
23647 s,@build_alias@,$build_alias,;t t
23648 s,@host_alias@,$host_alias,;t t
23649 s,@target_alias@,$target_alias,;t t
23650 s,@DEFS@,$DEFS,;t t
23651 s,@ECHO_C@,$ECHO_C,;t t
23652 s,@ECHO_N@,$ECHO_N,;t t
23653 s,@ECHO_T@,$ECHO_T,;t t
23654 s,@LIBS@,$LIBS,;t t
23655 s,@configure_args@,$configure_args,;t t
23656 s,@build@,$build,;t t
23657 s,@build_cpu@,$build_cpu,;t t
23658 s,@build_vendor@,$build_vendor,;t t
23659 s,@build_os@,$build_os,;t t
23660 s,@host@,$host,;t t
23661 s,@host_cpu@,$host_cpu,;t t
23662 s,@host_vendor@,$host_vendor,;t t
23663 s,@host_os@,$host_os,;t t
23664 s,@PORTNAME@,$PORTNAME,;t t
23665 s,@docdir@,$docdir,;t t
23666 s,@enable_nls@,$enable_nls,;t t
23667 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23668 s,@default_port@,$default_port,;t t
23669 s,@enable_shared@,$enable_shared,;t t
23670 s,@enable_rpath@,$enable_rpath,;t t
23671 s,@enable_debug@,$enable_debug,;t t
23672 s,@DTRACE@,$DTRACE,;t t
23673 s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
23674 s,@enable_dtrace@,$enable_dtrace,;t t
23675 s,@CC@,$CC,;t t
23676 s,@CFLAGS@,$CFLAGS,;t t
23677 s,@LDFLAGS@,$LDFLAGS,;t t
23678 s,@CPPFLAGS@,$CPPFLAGS,;t t
23679 s,@ac_ct_CC@,$ac_ct_CC,;t t
23680 s,@EXEEXT@,$EXEEXT,;t t
23681 s,@OBJEXT@,$OBJEXT,;t t
23682 s,@CPP@,$CPP,;t t
23683 s,@GCC@,$GCC,;t t
23684 s,@TAS@,$TAS,;t t
23685 s,@autodepend@,$autodepend,;t t
23686 s,@INCLUDES@,$INCLUDES,;t t
23687 s,@enable_thread_safety@,$enable_thread_safety,;t t
23688 s,@with_tcl@,$with_tcl,;t t
23689 s,@with_perl@,$with_perl,;t t
23690 s,@with_python@,$with_python,;t t
23691 s,@with_krb5@,$with_krb5,;t t
23692 s,@krb_srvtab@,$krb_srvtab,;t t
23693 s,@with_pam@,$with_pam,;t t
23694 s,@with_ldap@,$with_ldap,;t t
23695 s,@with_bonjour@,$with_bonjour,;t t
23696 s,@with_openssl@,$with_openssl,;t t
23697 s,@with_zlib@,$with_zlib,;t t
23698 s,@EGREP@,$EGREP,;t t
23699 s,@ELF_SYS@,$ELF_SYS,;t t
23700 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23701 s,@AWK@,$AWK,;t t
23702 s,@FLEX@,$FLEX,;t t
23703 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23704 s,@LN_S@,$LN_S,;t t
23705 s,@LD@,$LD,;t t
23706 s,@with_gnu_ld@,$with_gnu_ld,;t t
23707 s,@ld_R_works@,$ld_R_works,;t t
23708 s,@RANLIB@,$RANLIB,;t t
23709 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23710 s,@TAR@,$TAR,;t t
23711 s,@STRIP@,$STRIP,;t t
23712 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23713 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23714 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23715 s,@YACC@,$YACC,;t t
23716 s,@YFLAGS@,$YFLAGS,;t t
23717 s,@PERL@,$PERL,;t t
23718 s,@perl_archlibexp@,$perl_archlibexp,;t t
23719 s,@perl_privlibexp@,$perl_privlibexp,;t t
23720 s,@perl_useshrplib@,$perl_useshrplib,;t t
23721 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23722 s,@PYTHON@,$PYTHON,;t t
23723 s,@python_version@,$python_version,;t t
23724 s,@python_configdir@,$python_configdir,;t t
23725 s,@python_includespec@,$python_includespec,;t t
23726 s,@python_libdir@,$python_libdir,;t t
23727 s,@python_libspec@,$python_libspec,;t t
23728 s,@python_additional_libs@,$python_additional_libs,;t t
23729 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23730 s,@LIBOBJS@,$LIBOBJS,;t t
23731 s,@acx_pthread_config@,$acx_pthread_config,;t t
23732 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23733 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23734 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23735 s,@LDAP_LIBS_FE@,$LDAP_LIBS_FE,;t t
23736 s,@LDAP_LIBS_BE@,$LDAP_LIBS_BE,;t t
23737 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23738 s,@MSGFMT@,$MSGFMT,;t t
23739 s,@MSGMERGE@,$MSGMERGE,;t t
23740 s,@XGETTEXT@,$XGETTEXT,;t t
23741 s,@localedir@,$localedir,;t t
23742 s,@TCLSH@,$TCLSH,;t t
23743 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23744 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23745 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23746 s,@TCL_LIBS@,$TCL_LIBS,;t t
23747 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23748 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23749 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23750 s,@NSGMLS@,$NSGMLS,;t t
23751 s,@JADE@,$JADE,;t t
23752 s,@have_docbook@,$have_docbook,;t t
23753 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23754 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23755 s,@SGMLSPL@,$SGMLSPL,;t t
23756 s,@vpath_build@,$vpath_build,;t t
23757 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23758 CEOF
23759
23760 _ACEOF
23761
23762   cat >>$CONFIG_STATUS <<\_ACEOF
23763   # Split the substitutions into bite-sized pieces for seds with
23764   # small command number limits, like on Digital OSF/1 and HP-UX.
23765   ac_max_sed_lines=48
23766   ac_sed_frag=1 # Number of current file.
23767   ac_beg=1 # First line for current file.
23768   ac_end=$ac_max_sed_lines # Line after last line for current file.
23769   ac_more_lines=:
23770   ac_sed_cmds=
23771   while $ac_more_lines; do
23772     if test $ac_beg -gt 1; then
23773       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23774     else
23775       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23776     fi
23777     if test ! -s $tmp/subs.frag; then
23778       ac_more_lines=false
23779     else
23780       # The purpose of the label and of the branching condition is to
23781       # speed up the sed processing (if there are no `@' at all, there
23782       # is no need to browse any of the substitutions).
23783       # These are the two extra sed commands mentioned above.
23784       (echo ':t
23785   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23786       if test -z "$ac_sed_cmds"; then
23787         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23788       else
23789         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23790       fi
23791       ac_sed_frag=`expr $ac_sed_frag + 1`
23792       ac_beg=$ac_end
23793       ac_end=`expr $ac_end + $ac_max_sed_lines`
23794     fi
23795   done
23796   if test -z "$ac_sed_cmds"; then
23797     ac_sed_cmds=cat
23798   fi
23799 fi # test -n "$CONFIG_FILES"
23800
23801 _ACEOF
23802 cat >>$CONFIG_STATUS <<\_ACEOF
23803 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23804   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23805   case $ac_file in
23806   - | *:- | *:-:* ) # input from stdin
23807         cat >$tmp/stdin
23808         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23809         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23810   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23811         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23812   * )   ac_file_in=$ac_file.in ;;
23813   esac
23814
23815   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23816   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23817 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23818          X"$ac_file" : 'X\(//\)[^/]' \| \
23819          X"$ac_file" : 'X\(//\)$' \| \
23820          X"$ac_file" : 'X\(/\)' \| \
23821          .     : '\(.\)' 2>/dev/null ||
23822 echo X"$ac_file" |
23823     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23824           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23825           /^X\(\/\/\)$/{ s//\1/; q; }
23826           /^X\(\/\).*/{ s//\1/; q; }
23827           s/.*/./; q'`
23828   { if $as_mkdir_p; then
23829     mkdir -p "$ac_dir"
23830   else
23831     as_dir="$ac_dir"
23832     as_dirs=
23833     while test ! -d "$as_dir"; do
23834       as_dirs="$as_dir $as_dirs"
23835       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23836 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23837          X"$as_dir" : 'X\(//\)[^/]' \| \
23838          X"$as_dir" : 'X\(//\)$' \| \
23839          X"$as_dir" : 'X\(/\)' \| \
23840          .     : '\(.\)' 2>/dev/null ||
23841 echo X"$as_dir" |
23842     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23843           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23844           /^X\(\/\/\)$/{ s//\1/; q; }
23845           /^X\(\/\).*/{ s//\1/; q; }
23846           s/.*/./; q'`
23847     done
23848     test ! -n "$as_dirs" || mkdir $as_dirs
23849   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23850 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23851    { (exit 1); exit 1; }; }; }
23852
23853   ac_builddir=.
23854
23855 if test "$ac_dir" != .; then
23856   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23857   # A "../" for each directory in $ac_dir_suffix.
23858   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23859 else
23860   ac_dir_suffix= ac_top_builddir=
23861 fi
23862
23863 case $srcdir in
23864   .)  # No --srcdir option.  We are building in place.
23865     ac_srcdir=.
23866     if test -z "$ac_top_builddir"; then
23867        ac_top_srcdir=.
23868     else
23869        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23870     fi ;;
23871   [\\/]* | ?:[\\/]* )  # Absolute path.
23872     ac_srcdir=$srcdir$ac_dir_suffix;
23873     ac_top_srcdir=$srcdir ;;
23874   *) # Relative path.
23875     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23876     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23877 esac
23878
23879 # Do not use `cd foo && pwd` to compute absolute paths, because
23880 # the directories may not exist.
23881 case `pwd` in
23882 .) ac_abs_builddir="$ac_dir";;
23883 *)
23884   case "$ac_dir" in
23885   .) ac_abs_builddir=`pwd`;;
23886   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23887   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23888   esac;;
23889 esac
23890 case $ac_abs_builddir in
23891 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23892 *)
23893   case ${ac_top_builddir}. in
23894   .) ac_abs_top_builddir=$ac_abs_builddir;;
23895   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23896   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23897   esac;;
23898 esac
23899 case $ac_abs_builddir in
23900 .) ac_abs_srcdir=$ac_srcdir;;
23901 *)
23902   case $ac_srcdir in
23903   .) ac_abs_srcdir=$ac_abs_builddir;;
23904   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23905   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23906   esac;;
23907 esac
23908 case $ac_abs_builddir in
23909 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23910 *)
23911   case $ac_top_srcdir in
23912   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23913   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23914   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23915   esac;;
23916 esac
23917
23918
23919
23920   if test x"$ac_file" != x-; then
23921     { echo "$as_me:$LINENO: creating $ac_file" >&5
23922 echo "$as_me: creating $ac_file" >&6;}
23923     rm -f "$ac_file"
23924   fi
23925   # Let's still pretend it is `configure' which instantiates (i.e., don't
23926   # use $as_me), people would be surprised to read:
23927   #    /* config.h.  Generated by config.status.  */
23928   if test x"$ac_file" = x-; then
23929     configure_input=
23930   else
23931     configure_input="$ac_file.  "
23932   fi
23933   configure_input=$configure_input"Generated from `echo $ac_file_in |
23934                                      sed 's,.*/,,'` by configure."
23935
23936   # First look for the input files in the build tree, otherwise in the
23937   # src tree.
23938   ac_file_inputs=`IFS=:
23939     for f in $ac_file_in; do
23940       case $f in
23941       -) echo $tmp/stdin ;;
23942       [\\/$]*)
23943          # Absolute (can't be DOS-style, as IFS=:)
23944          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23945 echo "$as_me: error: cannot find input file: $f" >&2;}
23946    { (exit 1); exit 1; }; }
23947          echo "$f";;
23948       *) # Relative
23949          if test -f "$f"; then
23950            # Build tree
23951            echo "$f"
23952          elif test -f "$srcdir/$f"; then
23953            # Source tree
23954            echo "$srcdir/$f"
23955          else
23956            # /dev/null tree
23957            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23958 echo "$as_me: error: cannot find input file: $f" >&2;}
23959    { (exit 1); exit 1; }; }
23960          fi;;
23961       esac
23962     done` || { (exit 1); exit 1; }
23963 _ACEOF
23964 cat >>$CONFIG_STATUS <<_ACEOF
23965   sed "$ac_vpsub
23966 $extrasub
23967 _ACEOF
23968 cat >>$CONFIG_STATUS <<\_ACEOF
23969 :t
23970 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23971 s,@configure_input@,$configure_input,;t t
23972 s,@srcdir@,$ac_srcdir,;t t
23973 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23974 s,@top_srcdir@,$ac_top_srcdir,;t t
23975 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23976 s,@builddir@,$ac_builddir,;t t
23977 s,@abs_builddir@,$ac_abs_builddir,;t t
23978 s,@top_builddir@,$ac_top_builddir,;t t
23979 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23980 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23981   rm -f $tmp/stdin
23982   if test x"$ac_file" != x-; then
23983     mv $tmp/out $ac_file
23984   else
23985     cat $tmp/out
23986     rm -f $tmp/out
23987   fi
23988
23989 done
23990 _ACEOF
23991 cat >>$CONFIG_STATUS <<\_ACEOF
23992
23993 #
23994 # CONFIG_HEADER section.
23995 #
23996
23997 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23998 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23999 #
24000 # ac_d sets the value in "#define NAME VALUE" lines.
24001 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
24002 ac_dB='[         ].*$,\1#\2'
24003 ac_dC=' '
24004 ac_dD=',;t'
24005 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24006 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24007 ac_uB='$,\1#\2define\3'
24008 ac_uC=' '
24009 ac_uD=',;t'
24010
24011 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24012   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24013   case $ac_file in
24014   - | *:- | *:-:* ) # input from stdin
24015         cat >$tmp/stdin
24016         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24017         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24018   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24019         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24020   * )   ac_file_in=$ac_file.in ;;
24021   esac
24022
24023   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
24024 echo "$as_me: creating $ac_file" >&6;}
24025
24026   # First look for the input files in the build tree, otherwise in the
24027   # src tree.
24028   ac_file_inputs=`IFS=:
24029     for f in $ac_file_in; do
24030       case $f in
24031       -) echo $tmp/stdin ;;
24032       [\\/$]*)
24033          # Absolute (can't be DOS-style, as IFS=:)
24034          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24035 echo "$as_me: error: cannot find input file: $f" >&2;}
24036    { (exit 1); exit 1; }; }
24037          # Do quote $f, to prevent DOS paths from being IFS'd.
24038          echo "$f";;
24039       *) # Relative
24040          if test -f "$f"; then
24041            # Build tree
24042            echo "$f"
24043          elif test -f "$srcdir/$f"; then
24044            # Source tree
24045            echo "$srcdir/$f"
24046          else
24047            # /dev/null tree
24048            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24049 echo "$as_me: error: cannot find input file: $f" >&2;}
24050    { (exit 1); exit 1; }; }
24051          fi;;
24052       esac
24053     done` || { (exit 1); exit 1; }
24054   # Remove the trailing spaces.
24055   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
24056
24057 _ACEOF
24058
24059 # Transform confdefs.h into two sed scripts, `conftest.defines' and
24060 # `conftest.undefs', that substitutes the proper values into
24061 # config.h.in to produce config.h.  The first handles `#define'
24062 # templates, and the second `#undef' templates.
24063 # And first: Protect against being on the right side of a sed subst in
24064 # config.status.  Protect against being in an unquoted here document
24065 # in config.status.
24066 rm -f conftest.defines conftest.undefs
24067 # Using a here document instead of a string reduces the quoting nightmare.
24068 # Putting comments in sed scripts is not portable.
24069 #
24070 # `end' is used to avoid that the second main sed command (meant for
24071 # 0-ary CPP macros) applies to n-ary macro definitions.
24072 # See the Autoconf documentation for `clear'.
24073 cat >confdef2sed.sed <<\_ACEOF
24074 s/[\\&,]/\\&/g
24075 s,[\\$`],\\&,g
24076 t clear
24077 : clear
24078 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
24079 t end
24080 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
24081 : end
24082 _ACEOF
24083 # If some macros were called several times there might be several times
24084 # the same #defines, which is useless.  Nevertheless, we may not want to
24085 # sort them, since we want the *last* AC-DEFINE to be honored.
24086 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24087 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24088 rm -f confdef2sed.sed
24089
24090 # This sed command replaces #undef with comments.  This is necessary, for
24091 # example, in the case of _POSIX_SOURCE, which is predefined and required
24092 # on some systems where configure will not decide to define it.
24093 cat >>conftest.undefs <<\_ACEOF
24094 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
24095 _ACEOF
24096
24097 # Break up conftest.defines because some shells have a limit on the size
24098 # of here documents, and old seds have small limits too (100 cmds).
24099 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
24100 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
24101 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24102 echo '  :' >>$CONFIG_STATUS
24103 rm -f conftest.tail
24104 while grep . conftest.defines >/dev/null
24105 do
24106   # Write a limited-size here document to $tmp/defines.sed.
24107   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24108   # Speed up: don't consider the non `#define' lines.
24109   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
24110   # Work around the forget-to-reset-the-flag bug.
24111   echo 't clr' >>$CONFIG_STATUS
24112   echo ': clr' >>$CONFIG_STATUS
24113   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24114   echo 'CEOF
24115   sed -f $tmp/defines.sed $tmp/in >$tmp/out
24116   rm -f $tmp/in
24117   mv $tmp/out $tmp/in
24118 ' >>$CONFIG_STATUS
24119   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24120   rm -f conftest.defines
24121   mv conftest.tail conftest.defines
24122 done
24123 rm -f conftest.defines
24124 echo '  fi # grep' >>$CONFIG_STATUS
24125 echo >>$CONFIG_STATUS
24126
24127 # Break up conftest.undefs because some shells have a limit on the size
24128 # of here documents, and old seds have small limits too (100 cmds).
24129 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
24130 rm -f conftest.tail
24131 while grep . conftest.undefs >/dev/null
24132 do
24133   # Write a limited-size here document to $tmp/undefs.sed.
24134   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24135   # Speed up: don't consider the non `#undef'
24136   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
24137   # Work around the forget-to-reset-the-flag bug.
24138   echo 't clr' >>$CONFIG_STATUS
24139   echo ': clr' >>$CONFIG_STATUS
24140   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
24141   echo 'CEOF
24142   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24143   rm -f $tmp/in
24144   mv $tmp/out $tmp/in
24145 ' >>$CONFIG_STATUS
24146   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24147   rm -f conftest.undefs
24148   mv conftest.tail conftest.undefs
24149 done
24150 rm -f conftest.undefs
24151
24152 cat >>$CONFIG_STATUS <<\_ACEOF
24153   # Let's still pretend it is `configure' which instantiates (i.e., don't
24154   # use $as_me), people would be surprised to read:
24155   #    /* config.h.  Generated by config.status.  */
24156   if test x"$ac_file" = x-; then
24157     echo "/* Generated by configure.  */" >$tmp/config.h
24158   else
24159     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
24160   fi
24161   cat $tmp/in >>$tmp/config.h
24162   rm -f $tmp/in
24163   if test x"$ac_file" != x-; then
24164     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
24165       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24166 echo "$as_me: $ac_file is unchanged" >&6;}
24167     else
24168       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24169 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24170          X"$ac_file" : 'X\(//\)[^/]' \| \
24171          X"$ac_file" : 'X\(//\)$' \| \
24172          X"$ac_file" : 'X\(/\)' \| \
24173          .     : '\(.\)' 2>/dev/null ||
24174 echo X"$ac_file" |
24175     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24176           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24177           /^X\(\/\/\)$/{ s//\1/; q; }
24178           /^X\(\/\).*/{ s//\1/; q; }
24179           s/.*/./; q'`
24180       { if $as_mkdir_p; then
24181     mkdir -p "$ac_dir"
24182   else
24183     as_dir="$ac_dir"
24184     as_dirs=
24185     while test ! -d "$as_dir"; do
24186       as_dirs="$as_dir $as_dirs"
24187       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24188 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24189          X"$as_dir" : 'X\(//\)[^/]' \| \
24190          X"$as_dir" : 'X\(//\)$' \| \
24191          X"$as_dir" : 'X\(/\)' \| \
24192          .     : '\(.\)' 2>/dev/null ||
24193 echo X"$as_dir" |
24194     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24195           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24196           /^X\(\/\/\)$/{ s//\1/; q; }
24197           /^X\(\/\).*/{ s//\1/; q; }
24198           s/.*/./; q'`
24199     done
24200     test ! -n "$as_dirs" || mkdir $as_dirs
24201   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24202 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24203    { (exit 1); exit 1; }; }; }
24204
24205       rm -f $ac_file
24206       mv $tmp/config.h $ac_file
24207     fi
24208   else
24209     cat $tmp/config.h
24210     rm -f $tmp/config.h
24211   fi
24212   # Run the commands associated with the file.
24213   case $ac_file in
24214     src/include/pg_config.h )
24215 # Update timestamp for pg_config.h (see Makefile.global)
24216 echo >src/include/stamp-h
24217  ;;
24218   esac
24219 done
24220 _ACEOF
24221 cat >>$CONFIG_STATUS <<\_ACEOF
24222
24223 #
24224 # CONFIG_LINKS section.
24225 #
24226
24227 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
24228   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24229   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24230
24231   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
24232 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
24233
24234   if test ! -r $srcdir/$ac_source; then
24235     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
24236 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
24237    { (exit 1); exit 1; }; }
24238   fi
24239   rm -f $ac_dest
24240
24241   # Make relative symlinks.
24242   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
24243 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24244          X"$ac_dest" : 'X\(//\)[^/]' \| \
24245          X"$ac_dest" : 'X\(//\)$' \| \
24246          X"$ac_dest" : 'X\(/\)' \| \
24247          .     : '\(.\)' 2>/dev/null ||
24248 echo X"$ac_dest" |
24249     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24250           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24251           /^X\(\/\/\)$/{ s//\1/; q; }
24252           /^X\(\/\).*/{ s//\1/; q; }
24253           s/.*/./; q'`
24254   { if $as_mkdir_p; then
24255     mkdir -p "$ac_dest_dir"
24256   else
24257     as_dir="$ac_dest_dir"
24258     as_dirs=
24259     while test ! -d "$as_dir"; do
24260       as_dirs="$as_dir $as_dirs"
24261       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24262 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24263          X"$as_dir" : 'X\(//\)[^/]' \| \
24264          X"$as_dir" : 'X\(//\)$' \| \
24265          X"$as_dir" : 'X\(/\)' \| \
24266          .     : '\(.\)' 2>/dev/null ||
24267 echo X"$as_dir" |
24268     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24269           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24270           /^X\(\/\/\)$/{ s//\1/; q; }
24271           /^X\(\/\).*/{ s//\1/; q; }
24272           s/.*/./; q'`
24273     done
24274     test ! -n "$as_dirs" || mkdir $as_dirs
24275   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
24276 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
24277    { (exit 1); exit 1; }; }; }
24278
24279   ac_builddir=.
24280
24281 if test "$ac_dest_dir" != .; then
24282   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
24283   # A "../" for each directory in $ac_dir_suffix.
24284   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24285 else
24286   ac_dir_suffix= ac_top_builddir=
24287 fi
24288
24289 case $srcdir in
24290   .)  # No --srcdir option.  We are building in place.
24291     ac_srcdir=.
24292     if test -z "$ac_top_builddir"; then
24293        ac_top_srcdir=.
24294     else
24295        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24296     fi ;;
24297   [\\/]* | ?:[\\/]* )  # Absolute path.
24298     ac_srcdir=$srcdir$ac_dir_suffix;
24299     ac_top_srcdir=$srcdir ;;
24300   *) # Relative path.
24301     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24302     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24303 esac
24304
24305 # Do not use `cd foo && pwd` to compute absolute paths, because
24306 # the directories may not exist.
24307 case `pwd` in
24308 .) ac_abs_builddir="$ac_dest_dir";;
24309 *)
24310   case "$ac_dest_dir" in
24311   .) ac_abs_builddir=`pwd`;;
24312   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24313   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24314   esac;;
24315 esac
24316 case $ac_abs_builddir in
24317 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24318 *)
24319   case ${ac_top_builddir}. in
24320   .) ac_abs_top_builddir=$ac_abs_builddir;;
24321   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24322   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24323   esac;;
24324 esac
24325 case $ac_abs_builddir in
24326 .) ac_abs_srcdir=$ac_srcdir;;
24327 *)
24328   case $ac_srcdir in
24329   .) ac_abs_srcdir=$ac_abs_builddir;;
24330   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24331   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24332   esac;;
24333 esac
24334 case $ac_abs_builddir in
24335 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24336 *)
24337   case $ac_top_srcdir in
24338   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24339   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24340   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24341   esac;;
24342 esac
24343
24344
24345   case $srcdir in
24346   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24347       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24348   esac
24349
24350   # Try a symlink, then a hard link, then a copy.
24351   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24352     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24353     cp -p $srcdir/$ac_source $ac_dest ||
24354     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24355 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24356    { (exit 1); exit 1; }; }
24357 done
24358 _ACEOF
24359 cat >>$CONFIG_STATUS <<\_ACEOF
24360
24361 #
24362 # CONFIG_COMMANDS section.
24363 #
24364 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24365   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24366   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24367   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24368 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24369          X"$ac_dest" : 'X\(//\)[^/]' \| \
24370          X"$ac_dest" : 'X\(//\)$' \| \
24371          X"$ac_dest" : 'X\(/\)' \| \
24372          .     : '\(.\)' 2>/dev/null ||
24373 echo X"$ac_dest" |
24374     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24375           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24376           /^X\(\/\/\)$/{ s//\1/; q; }
24377           /^X\(\/\).*/{ s//\1/; q; }
24378           s/.*/./; q'`
24379   { if $as_mkdir_p; then
24380     mkdir -p "$ac_dir"
24381   else
24382     as_dir="$ac_dir"
24383     as_dirs=
24384     while test ! -d "$as_dir"; do
24385       as_dirs="$as_dir $as_dirs"
24386       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24387 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24388          X"$as_dir" : 'X\(//\)[^/]' \| \
24389          X"$as_dir" : 'X\(//\)$' \| \
24390          X"$as_dir" : 'X\(/\)' \| \
24391          .     : '\(.\)' 2>/dev/null ||
24392 echo X"$as_dir" |
24393     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24394           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24395           /^X\(\/\/\)$/{ s//\1/; q; }
24396           /^X\(\/\).*/{ s//\1/; q; }
24397           s/.*/./; q'`
24398     done
24399     test ! -n "$as_dirs" || mkdir $as_dirs
24400   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24401 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24402    { (exit 1); exit 1; }; }; }
24403
24404   ac_builddir=.
24405
24406 if test "$ac_dir" != .; then
24407   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24408   # A "../" for each directory in $ac_dir_suffix.
24409   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24410 else
24411   ac_dir_suffix= ac_top_builddir=
24412 fi
24413
24414 case $srcdir in
24415   .)  # No --srcdir option.  We are building in place.
24416     ac_srcdir=.
24417     if test -z "$ac_top_builddir"; then
24418        ac_top_srcdir=.
24419     else
24420        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24421     fi ;;
24422   [\\/]* | ?:[\\/]* )  # Absolute path.
24423     ac_srcdir=$srcdir$ac_dir_suffix;
24424     ac_top_srcdir=$srcdir ;;
24425   *) # Relative path.
24426     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24427     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24428 esac
24429
24430 # Do not use `cd foo && pwd` to compute absolute paths, because
24431 # the directories may not exist.
24432 case `pwd` in
24433 .) ac_abs_builddir="$ac_dir";;
24434 *)
24435   case "$ac_dir" in
24436   .) ac_abs_builddir=`pwd`;;
24437   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24438   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24439   esac;;
24440 esac
24441 case $ac_abs_builddir in
24442 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24443 *)
24444   case ${ac_top_builddir}. in
24445   .) ac_abs_top_builddir=$ac_abs_builddir;;
24446   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24447   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24448   esac;;
24449 esac
24450 case $ac_abs_builddir in
24451 .) ac_abs_srcdir=$ac_srcdir;;
24452 *)
24453   case $ac_srcdir in
24454   .) ac_abs_srcdir=$ac_abs_builddir;;
24455   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24456   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24457   esac;;
24458 esac
24459 case $ac_abs_builddir in
24460 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24461 *)
24462   case $ac_top_srcdir in
24463   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24464   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24465   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24466   esac;;
24467 esac
24468
24469
24470   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24471 echo "$as_me: executing $ac_dest commands" >&6;}
24472   case $ac_dest in
24473     check_win32_symlinks )
24474 # Links sometimes fail undetected on Mingw -
24475 # so here we detect it and warn the user
24476 for FILE in $CONFIG_LINKS
24477  do
24478         # test -e works for symlinks in the MinGW console
24479         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24480 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24481  done
24482  ;;
24483   esac
24484 done
24485 _ACEOF
24486
24487 cat >>$CONFIG_STATUS <<\_ACEOF
24488
24489 { (exit 0); exit 0; }
24490 _ACEOF
24491 chmod +x $CONFIG_STATUS
24492 ac_clean_files=$ac_clean_files_save
24493
24494
24495 # configure is writing to config.log, and then calls config.status.
24496 # config.status does its own redirection, appending to config.log.
24497 # Unfortunately, on DOS this fails, as config.log is still kept open
24498 # by configure, so config.status won't be able to write to it; its
24499 # output is simply discarded.  So we exec the FD to /dev/null,
24500 # effectively closing config.log, so it can be properly (re)opened and
24501 # appended to by config.status.  When coming back to configure, we
24502 # need to make the FD available again.
24503 if test "$no_create" != yes; then
24504   ac_cs_success=:
24505   ac_config_status_args=
24506   test "$silent" = yes &&
24507     ac_config_status_args="$ac_config_status_args --quiet"
24508   exec 5>/dev/null
24509   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24510   exec 5>>config.log
24511   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24512   # would make configure fail if this is the last instruction.
24513   $ac_cs_success || { (exit 1); exit 1; }
24514 fi
24515
24516