]> granicus.if.org Git - postgresql/blob - configure
Fix path problem in MSVC bison wrapper. per Joachim Wieland.
[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.3devel.
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-2007, 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.3devel'
275 PACKAGE_STRING='PostgreSQL 8.3devel'
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 XML2_CONFIG 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.3devel 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.3devel:";;
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   --with-libxml           build with XML support
898   --without-zlib          do not use Zlib
899   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
900
901 Some influential environment variables:
902   CC          C compiler command
903   CFLAGS      C compiler flags
904   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
905               nonstandard directory <lib dir>
906   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
907               headers in a nonstandard directory <include dir>
908   CPP         C preprocessor
909   LDFLAGS_SL
910   DOCBOOKSTYLE
911               location of DocBook stylesheets
912
913 Use these variables to override the choices made by `configure' or to help
914 it to find libraries and programs with nonstandard names/locations.
915
916 Report bugs to <pgsql-bugs@postgresql.org>.
917 _ACEOF
918 fi
919
920 if test "$ac_init_help" = "recursive"; then
921   # If there are subdirs, report their specific --help.
922   ac_popdir=`pwd`
923   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
924     test -d $ac_dir || continue
925     ac_builddir=.
926
927 if test "$ac_dir" != .; then
928   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
929   # A "../" for each directory in $ac_dir_suffix.
930   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
931 else
932   ac_dir_suffix= ac_top_builddir=
933 fi
934
935 case $srcdir in
936   .)  # No --srcdir option.  We are building in place.
937     ac_srcdir=.
938     if test -z "$ac_top_builddir"; then
939        ac_top_srcdir=.
940     else
941        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
942     fi ;;
943   [\\/]* | ?:[\\/]* )  # Absolute path.
944     ac_srcdir=$srcdir$ac_dir_suffix;
945     ac_top_srcdir=$srcdir ;;
946   *) # Relative path.
947     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
948     ac_top_srcdir=$ac_top_builddir$srcdir ;;
949 esac
950
951 # Do not use `cd foo && pwd` to compute absolute paths, because
952 # the directories may not exist.
953 case `pwd` in
954 .) ac_abs_builddir="$ac_dir";;
955 *)
956   case "$ac_dir" in
957   .) ac_abs_builddir=`pwd`;;
958   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
959   *) ac_abs_builddir=`pwd`/"$ac_dir";;
960   esac;;
961 esac
962 case $ac_abs_builddir in
963 .) ac_abs_top_builddir=${ac_top_builddir}.;;
964 *)
965   case ${ac_top_builddir}. in
966   .) ac_abs_top_builddir=$ac_abs_builddir;;
967   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
968   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
969   esac;;
970 esac
971 case $ac_abs_builddir in
972 .) ac_abs_srcdir=$ac_srcdir;;
973 *)
974   case $ac_srcdir in
975   .) ac_abs_srcdir=$ac_abs_builddir;;
976   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
977   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
978   esac;;
979 esac
980 case $ac_abs_builddir in
981 .) ac_abs_top_srcdir=$ac_top_srcdir;;
982 *)
983   case $ac_top_srcdir in
984   .) ac_abs_top_srcdir=$ac_abs_builddir;;
985   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
986   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
987   esac;;
988 esac
989
990     cd $ac_dir
991     # Check for guested configure; otherwise get Cygnus style configure.
992     if test -f $ac_srcdir/configure.gnu; then
993       echo
994       $SHELL $ac_srcdir/configure.gnu  --help=recursive
995     elif test -f $ac_srcdir/configure; then
996       echo
997       $SHELL $ac_srcdir/configure  --help=recursive
998     elif test -f $ac_srcdir/configure.ac ||
999            test -f $ac_srcdir/configure.in; then
1000       echo
1001       $ac_configure --help
1002     else
1003       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1004     fi
1005     cd $ac_popdir
1006   done
1007 fi
1008
1009 test -n "$ac_init_help" && exit 0
1010 if $ac_init_version; then
1011   cat <<\_ACEOF
1012 PostgreSQL configure 8.3devel
1013 generated by GNU Autoconf 2.59
1014
1015 Copyright (C) 2003 Free Software Foundation, Inc.
1016 This configure script is free software; the Free Software Foundation
1017 gives unlimited permission to copy, distribute and modify it.
1018
1019 Copyright (c) 1996-2007, PostgreSQL Global Development Group
1020 _ACEOF
1021   exit 0
1022 fi
1023 exec 5>config.log
1024 cat >&5 <<_ACEOF
1025 This file contains any messages produced by compilers while
1026 running configure, to aid debugging if configure makes a mistake.
1027
1028 It was created by PostgreSQL $as_me 8.3devel, which was
1029 generated by GNU Autoconf 2.59.  Invocation command line was
1030
1031   $ $0 $@
1032
1033 _ACEOF
1034 {
1035 cat <<_ASUNAME
1036 ## --------- ##
1037 ## Platform. ##
1038 ## --------- ##
1039
1040 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1041 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1042 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1043 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1044 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1045
1046 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1047 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1048
1049 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1050 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1051 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1052 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1053 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1054 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1055 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1056
1057 _ASUNAME
1058
1059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1060 for as_dir in $PATH
1061 do
1062   IFS=$as_save_IFS
1063   test -z "$as_dir" && as_dir=.
1064   echo "PATH: $as_dir"
1065 done
1066
1067 } >&5
1068
1069 cat >&5 <<_ACEOF
1070
1071
1072 ## ----------- ##
1073 ## Core tests. ##
1074 ## ----------- ##
1075
1076 _ACEOF
1077
1078
1079 # Keep a trace of the command line.
1080 # Strip out --no-create and --no-recursion so they do not pile up.
1081 # Strip out --silent because we don't want to record it for future runs.
1082 # Also quote any args containing shell meta-characters.
1083 # Make two passes to allow for proper duplicate-argument suppression.
1084 ac_configure_args=
1085 ac_configure_args0=
1086 ac_configure_args1=
1087 ac_sep=
1088 ac_must_keep_next=false
1089 for ac_pass in 1 2
1090 do
1091   for ac_arg
1092   do
1093     case $ac_arg in
1094     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1095     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1096     | -silent | --silent | --silen | --sile | --sil)
1097       continue ;;
1098     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1099       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1100     esac
1101     case $ac_pass in
1102     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1103     2)
1104       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1105       if test $ac_must_keep_next = true; then
1106         ac_must_keep_next=false # Got value, back to normal.
1107       else
1108         case $ac_arg in
1109           *=* | --config-cache | -C | -disable-* | --disable-* \
1110           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1111           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1112           | -with-* | --with-* | -without-* | --without-* | --x)
1113             case "$ac_configure_args0 " in
1114               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1115             esac
1116             ;;
1117           -* ) ac_must_keep_next=true ;;
1118         esac
1119       fi
1120       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1121       # Get rid of the leading space.
1122       ac_sep=" "
1123       ;;
1124     esac
1125   done
1126 done
1127 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1128 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1129
1130 # When interrupted or exit'd, cleanup temporary files, and complete
1131 # config.log.  We remove comments because anyway the quotes in there
1132 # would cause problems or look ugly.
1133 # WARNING: Be sure not to use single quotes in there, as some shells,
1134 # such as our DU 5.0 friend, will then `close' the trap.
1135 trap 'exit_status=$?
1136   # Save into config.log some information that might help in debugging.
1137   {
1138     echo
1139
1140     cat <<\_ASBOX
1141 ## ---------------- ##
1142 ## Cache variables. ##
1143 ## ---------------- ##
1144 _ASBOX
1145     echo
1146     # The following way of writing the cache mishandles newlines in values,
1147 {
1148   (set) 2>&1 |
1149     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1150     *ac_space=\ *)
1151       sed -n \
1152         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1153           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1154       ;;
1155     *)
1156       sed -n \
1157         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1158       ;;
1159     esac;
1160 }
1161     echo
1162
1163     cat <<\_ASBOX
1164 ## ----------------- ##
1165 ## Output variables. ##
1166 ## ----------------- ##
1167 _ASBOX
1168     echo
1169     for ac_var in $ac_subst_vars
1170     do
1171       eval ac_val=$`echo $ac_var`
1172       echo "$ac_var='"'"'$ac_val'"'"'"
1173     done | sort
1174     echo
1175
1176     if test -n "$ac_subst_files"; then
1177       cat <<\_ASBOX
1178 ## ------------- ##
1179 ## Output files. ##
1180 ## ------------- ##
1181 _ASBOX
1182       echo
1183       for ac_var in $ac_subst_files
1184       do
1185         eval ac_val=$`echo $ac_var`
1186         echo "$ac_var='"'"'$ac_val'"'"'"
1187       done | sort
1188       echo
1189     fi
1190
1191     if test -s confdefs.h; then
1192       cat <<\_ASBOX
1193 ## ----------- ##
1194 ## confdefs.h. ##
1195 ## ----------- ##
1196 _ASBOX
1197       echo
1198       sed "/^$/d" confdefs.h | sort
1199       echo
1200     fi
1201     test "$ac_signal" != 0 &&
1202       echo "$as_me: caught signal $ac_signal"
1203     echo "$as_me: exit $exit_status"
1204   } >&5
1205   rm -f core *.core &&
1206   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1207     exit $exit_status
1208      ' 0
1209 for ac_signal in 1 2 13 15; do
1210   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1211 done
1212 ac_signal=0
1213
1214 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1215 rm -rf conftest* confdefs.h
1216 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1217 echo >confdefs.h
1218
1219 # Predefined preprocessor variables.
1220
1221 cat >>confdefs.h <<_ACEOF
1222 #define PACKAGE_NAME "$PACKAGE_NAME"
1223 _ACEOF
1224
1225
1226 cat >>confdefs.h <<_ACEOF
1227 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1228 _ACEOF
1229
1230
1231 cat >>confdefs.h <<_ACEOF
1232 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1233 _ACEOF
1234
1235
1236 cat >>confdefs.h <<_ACEOF
1237 #define PACKAGE_STRING "$PACKAGE_STRING"
1238 _ACEOF
1239
1240
1241 cat >>confdefs.h <<_ACEOF
1242 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1243 _ACEOF
1244
1245
1246 # Let the site file select an alternate cache file if it wants to.
1247 # Prefer explicitly selected file to automatically selected ones.
1248 if test -z "$CONFIG_SITE"; then
1249   if test "x$prefix" != xNONE; then
1250     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1251   else
1252     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1253   fi
1254 fi
1255 for ac_site_file in $CONFIG_SITE; do
1256   if test -r "$ac_site_file"; then
1257     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1258 echo "$as_me: loading site script $ac_site_file" >&6;}
1259     sed 's/^/| /' "$ac_site_file" >&5
1260     . "$ac_site_file"
1261   fi
1262 done
1263
1264 if test -r "$cache_file"; then
1265   # Some versions of bash will fail to source /dev/null (special
1266   # files actually), so we avoid doing that.
1267   if test -f "$cache_file"; then
1268     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1269 echo "$as_me: loading cache $cache_file" >&6;}
1270     case $cache_file in
1271       [\\/]* | ?:[\\/]* ) . $cache_file;;
1272       *)                      . ./$cache_file;;
1273     esac
1274   fi
1275 else
1276   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1277 echo "$as_me: creating cache $cache_file" >&6;}
1278   >$cache_file
1279 fi
1280
1281 # Check that the precious variables saved in the cache have kept the same
1282 # value.
1283 ac_cache_corrupted=false
1284 for ac_var in `(set) 2>&1 |
1285                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1286   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1287   eval ac_new_set=\$ac_env_${ac_var}_set
1288   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1289   eval ac_new_val="\$ac_env_${ac_var}_value"
1290   case $ac_old_set,$ac_new_set in
1291     set,)
1292       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1293 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1294       ac_cache_corrupted=: ;;
1295     ,set)
1296       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1297 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1298       ac_cache_corrupted=: ;;
1299     ,);;
1300     *)
1301       if test "x$ac_old_val" != "x$ac_new_val"; then
1302         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1303 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1304         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1305 echo "$as_me:   former value:  $ac_old_val" >&2;}
1306         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1307 echo "$as_me:   current value: $ac_new_val" >&2;}
1308         ac_cache_corrupted=:
1309       fi;;
1310   esac
1311   # Pass precious variables to config.status.
1312   if test "$ac_new_set" = set; then
1313     case $ac_new_val in
1314     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1315       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1316     *) ac_arg=$ac_var=$ac_new_val ;;
1317     esac
1318     case " $ac_configure_args " in
1319       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1320       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1321     esac
1322   fi
1323 done
1324 if $ac_cache_corrupted; then
1325   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1326 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1327   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1328 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1329    { (exit 1); exit 1; }; }
1330 fi
1331
1332 ac_ext=c
1333 ac_cpp='$CPP $CPPFLAGS'
1334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
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
1368 ac_aux_dir=
1369 for ac_dir in config $srcdir/config; do
1370   if test -f $ac_dir/install-sh; then
1371     ac_aux_dir=$ac_dir
1372     ac_install_sh="$ac_aux_dir/install-sh -c"
1373     break
1374   elif test -f $ac_dir/install.sh; then
1375     ac_aux_dir=$ac_dir
1376     ac_install_sh="$ac_aux_dir/install.sh -c"
1377     break
1378   elif test -f $ac_dir/shtool; then
1379     ac_aux_dir=$ac_dir
1380     ac_install_sh="$ac_aux_dir/shtool install -c"
1381     break
1382   fi
1383 done
1384 if test -z "$ac_aux_dir"; then
1385   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1386 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1387    { (exit 1); exit 1; }; }
1388 fi
1389 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1390 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1391 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1392
1393
1394 configure_args=$ac_configure_args
1395
1396
1397
1398 cat >>confdefs.h <<_ACEOF
1399 #define PG_VERSION "$PACKAGE_VERSION"
1400 _ACEOF
1401
1402
1403 # Make sure we can run config.sub.
1404 $ac_config_sub sun4 >/dev/null 2>&1 ||
1405   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1406 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1407    { (exit 1); exit 1; }; }
1408
1409 echo "$as_me:$LINENO: checking build system type" >&5
1410 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1411 if test "${ac_cv_build+set}" = set; then
1412   echo $ECHO_N "(cached) $ECHO_C" >&6
1413 else
1414   ac_cv_build_alias=$build_alias
1415 test -z "$ac_cv_build_alias" &&
1416   ac_cv_build_alias=`$ac_config_guess`
1417 test -z "$ac_cv_build_alias" &&
1418   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1419 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1420    { (exit 1); exit 1; }; }
1421 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1422   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1423 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1424    { (exit 1); exit 1; }; }
1425
1426 fi
1427 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1428 echo "${ECHO_T}$ac_cv_build" >&6
1429 build=$ac_cv_build
1430 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1431 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1432 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1433
1434
1435 echo "$as_me:$LINENO: checking host system type" >&5
1436 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1437 if test "${ac_cv_host+set}" = set; then
1438   echo $ECHO_N "(cached) $ECHO_C" >&6
1439 else
1440   ac_cv_host_alias=$host_alias
1441 test -z "$ac_cv_host_alias" &&
1442   ac_cv_host_alias=$ac_cv_build_alias
1443 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1444   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1445 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1446    { (exit 1); exit 1; }; }
1447
1448 fi
1449 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1450 echo "${ECHO_T}$ac_cv_host" >&6
1451 host=$ac_cv_host
1452 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1453 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1454 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1455
1456
1457
1458 template=
1459 echo "$as_me:$LINENO: checking which template to use" >&5
1460 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1461
1462
1463 pgac_args="$pgac_args with_template"
1464
1465
1466 # Check whether --with-template or --without-template was given.
1467 if test "${with_template+set}" = set; then
1468   withval="$with_template"
1469
1470   case $withval in
1471     yes)
1472       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1473 echo "$as_me: error: argument required for --with-template option" >&2;}
1474    { (exit 1); exit 1; }; }
1475       ;;
1476     no)
1477       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1478 echo "$as_me: error: argument required for --with-template option" >&2;}
1479    { (exit 1); exit 1; }; }
1480       ;;
1481     *)
1482
1483   case $withval in
1484     list)   echo; ls "$srcdir/src/template"; exit;;
1485     *)      if test -f "$srcdir/src/template/$with_template" ; then
1486               template=$withval
1487             else
1488               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1489 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1490    { (exit 1); exit 1; }; }
1491             fi;;
1492   esac
1493
1494       ;;
1495   esac
1496
1497 else
1498
1499 # --with-template not given
1500
1501 case $host_os in
1502      aix*) template=aix ;;
1503     bsdi*) template=bsdi ;;
1504   cygwin*) template=cygwin ;;
1505   darwin*) template=darwin ;;
1506     dgux*) template=dgux ;;
1507  freebsd*) template=freebsd ;;
1508     hpux*) template=hpux ;;
1509     irix*) template=irix ;;
1510  linux*|gnu*|k*bsd*-gnu)
1511            template=linux ;;
1512    mingw*) template=win32 ;;
1513   netbsd*) template=netbsd ;;
1514 nextstep*) template=nextstep ;;
1515  openbsd*) template=openbsd ;;
1516      osf*) template=osf ;;
1517      sco*) template=sco ;;
1518  solaris*) template=solaris ;;
1519    sunos*) template=sunos4 ;;
1520  sysv4.2*)
1521         case $host_vendor in
1522           univel) template=univel ;;
1523         esac ;;
1524    sysv4*) template=svr4 ;;
1525    sysv5*) template=unixware ;;
1526   ultrix*) template=ultrix4 ;;
1527 esac
1528
1529   if test x"$template" = x"" ; then
1530     { { echo "$as_me:$LINENO: error:
1531 *******************************************************************
1532 PostgreSQL has apparently not been ported to your platform yet.
1533 To try a manual configuration, look into the src/template directory
1534 for a similar platform and use the '--with-template=' option.
1535
1536 Please also contact <pgsql-ports@postgresql.org> to see about
1537 rectifying this.  Include the above 'checking host system type...'
1538 line.
1539 *******************************************************************
1540 " >&5
1541 echo "$as_me: error:
1542 *******************************************************************
1543 PostgreSQL has apparently not been ported to your platform yet.
1544 To try a manual configuration, look into the src/template directory
1545 for a similar platform and use the '--with-template=' option.
1546
1547 Please also contact <pgsql-ports@postgresql.org> to see about
1548 rectifying this.  Include the above 'checking host system type...'
1549 line.
1550 *******************************************************************
1551 " >&2;}
1552    { (exit 1); exit 1; }; }
1553   fi
1554
1555
1556 fi;
1557
1558
1559 echo "$as_me:$LINENO: result: $template" >&5
1560 echo "${ECHO_T}$template" >&6
1561
1562 PORTNAME=$template
1563
1564
1565 # Initialize default assumption that we do not need separate assembly code
1566 # for TAS (test-and-set).  This can be overridden by the template file
1567 # when it's executed.
1568 need_tas=no
1569 tas_file=dummy.s
1570
1571
1572
1573 ##
1574 ## Command line options
1575 ##
1576
1577 #
1578 # Installation directory for documentation
1579 #
1580
1581 pgac_args="$pgac_args with_docdir"
1582
1583
1584 # Check whether --with-docdir or --without-docdir was given.
1585 if test "${with_docdir+set}" = set; then
1586   withval="$with_docdir"
1587
1588   case $withval in
1589     yes)
1590       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1591 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1592    { (exit 1); exit 1; }; }
1593       ;;
1594     no)
1595       docdir=
1596       ;;
1597     *)
1598       docdir=$withval
1599       ;;
1600   esac
1601
1602 else
1603   docdir='${prefix}/doc'
1604 fi;
1605
1606
1607
1608
1609 #
1610 # Add non-standard directories to the include path
1611 #
1612
1613 pgac_args="$pgac_args with_includes"
1614
1615
1616 # Check whether --with-includes or --without-includes was given.
1617 if test "${with_includes+set}" = set; then
1618   withval="$with_includes"
1619
1620   case $withval in
1621     yes)
1622       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1623 echo "$as_me: error: argument required for --with-includes option" >&2;}
1624    { (exit 1); exit 1; }; }
1625       ;;
1626     no)
1627       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1628 echo "$as_me: error: argument required for --with-includes option" >&2;}
1629    { (exit 1); exit 1; }; }
1630       ;;
1631     *)
1632
1633       ;;
1634   esac
1635
1636 fi;
1637
1638
1639
1640 #
1641 # Add non-standard directories to the library search path
1642 #
1643
1644 pgac_args="$pgac_args with_libraries"
1645
1646
1647 # Check whether --with-libraries or --without-libraries was given.
1648 if test "${with_libraries+set}" = set; then
1649   withval="$with_libraries"
1650
1651   case $withval in
1652     yes)
1653       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1654 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1655    { (exit 1); exit 1; }; }
1656       ;;
1657     no)
1658       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1659 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1660    { (exit 1); exit 1; }; }
1661       ;;
1662     *)
1663       LIBRARY_DIRS=$withval
1664       ;;
1665   esac
1666
1667 fi;
1668
1669
1670
1671 pgac_args="$pgac_args with_libs"
1672
1673
1674 # Check whether --with-libs or --without-libs was given.
1675 if test "${with_libs+set}" = set; then
1676   withval="$with_libs"
1677
1678   case $withval in
1679     yes)
1680       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1681 echo "$as_me: error: argument required for --with-libs option" >&2;}
1682    { (exit 1); exit 1; }; }
1683       ;;
1684     no)
1685       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1686 echo "$as_me: error: argument required for --with-libs option" >&2;}
1687    { (exit 1); exit 1; }; }
1688       ;;
1689     *)
1690       LIBRARY_DIRS=$withval
1691       ;;
1692   esac
1693
1694 fi;
1695
1696
1697
1698 #
1699 # 64-bit integer date/time storage (--enable-integer-datetimes)
1700 #
1701 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1702 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1703
1704 pgac_args="$pgac_args enable_integer_datetimes"
1705
1706 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1707 if test "${enable_integer_datetimes+set}" = set; then
1708   enableval="$enable_integer_datetimes"
1709
1710   case $enableval in
1711     yes)
1712
1713 cat >>confdefs.h <<\_ACEOF
1714 #define USE_INTEGER_DATETIMES 1
1715 _ACEOF
1716
1717       ;;
1718     no)
1719       :
1720       ;;
1721     *)
1722       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1723 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1724    { (exit 1); exit 1; }; }
1725       ;;
1726   esac
1727
1728 else
1729   enable_integer_datetimes=no
1730
1731 fi;
1732
1733 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1734 echo "${ECHO_T}$enable_integer_datetimes" >&6
1735
1736
1737 #
1738 # NLS
1739 #
1740 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1741 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1742
1743 pgac_args="$pgac_args enable_nls"
1744
1745 # Check whether --enable-nls or --disable-nls was given.
1746 if test "${enable_nls+set}" = set; then
1747   enableval="$enable_nls"
1748
1749   case $enableval in
1750     yes)
1751       :
1752       ;;
1753     no)
1754       :
1755       ;;
1756     *)
1757       enable_nls=yes
1758 WANTED_LANGUAGES=$enableval
1759       ;;
1760   esac
1761
1762 else
1763   enable_nls=no
1764 fi;
1765
1766
1767 if test "$enable_nls" = yes; then
1768
1769 cat >>confdefs.h <<\_ACEOF
1770 #define ENABLE_NLS 1
1771 _ACEOF
1772
1773 fi
1774
1775 echo "$as_me:$LINENO: result: $enable_nls" >&5
1776 echo "${ECHO_T}$enable_nls" >&6
1777
1778
1779
1780 #
1781 # Default port number (--with-pgport), default 5432
1782 #
1783 echo "$as_me:$LINENO: checking for default port number" >&5
1784 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1785
1786 pgac_args="$pgac_args with_pgport"
1787
1788
1789 # Check whether --with-pgport or --without-pgport was given.
1790 if test "${with_pgport+set}" = set; then
1791   withval="$with_pgport"
1792
1793   case $withval in
1794     yes)
1795       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1796 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1797    { (exit 1); exit 1; }; }
1798       ;;
1799     no)
1800       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1801 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1802    { (exit 1); exit 1; }; }
1803       ;;
1804     *)
1805       default_port=$withval
1806       ;;
1807   esac
1808
1809 else
1810   default_port=5432
1811 fi;
1812
1813 echo "$as_me:$LINENO: result: $default_port" >&5
1814 echo "${ECHO_T}$default_port" >&6
1815 # Need both of these because some places want an integer and some a string
1816
1817 cat >>confdefs.h <<_ACEOF
1818 #define DEF_PGPORT ${default_port}
1819 _ACEOF
1820
1821
1822 cat >>confdefs.h <<_ACEOF
1823 #define DEF_PGPORT_STR "${default_port}"
1824 _ACEOF
1825
1826
1827
1828 #
1829 # Option to disable shared libraries
1830 #
1831
1832 pgac_args="$pgac_args enable_shared"
1833
1834 # Check whether --enable-shared or --disable-shared was given.
1835 if test "${enable_shared+set}" = set; then
1836   enableval="$enable_shared"
1837
1838   case $enableval in
1839     yes)
1840       :
1841       ;;
1842     no)
1843       :
1844       ;;
1845     *)
1846       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1847 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1848    { (exit 1); exit 1; }; }
1849       ;;
1850   esac
1851
1852 else
1853   enable_shared=yes
1854
1855 fi;
1856
1857
1858
1859 #
1860 # '-rpath'-like feature can be disabled
1861 #
1862
1863 pgac_args="$pgac_args enable_rpath"
1864
1865 # Check whether --enable-rpath or --disable-rpath was given.
1866 if test "${enable_rpath+set}" = set; then
1867   enableval="$enable_rpath"
1868
1869   case $enableval in
1870     yes)
1871       :
1872       ;;
1873     no)
1874       :
1875       ;;
1876     *)
1877       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1878 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1879    { (exit 1); exit 1; }; }
1880       ;;
1881   esac
1882
1883 else
1884   enable_rpath=yes
1885
1886 fi;
1887
1888
1889
1890 #
1891 # Spinlocks
1892 #
1893
1894 pgac_args="$pgac_args enable_spinlocks"
1895
1896 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1897 if test "${enable_spinlocks+set}" = set; then
1898   enableval="$enable_spinlocks"
1899
1900   case $enableval in
1901     yes)
1902       :
1903       ;;
1904     no)
1905       :
1906       ;;
1907     *)
1908       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1909 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1910    { (exit 1); exit 1; }; }
1911       ;;
1912   esac
1913
1914 else
1915   enable_spinlocks=yes
1916
1917 fi;
1918
1919
1920 #
1921 # --enable-debug adds -g to compiler flags
1922 #
1923
1924 pgac_args="$pgac_args enable_debug"
1925
1926 # Check whether --enable-debug or --disable-debug was given.
1927 if test "${enable_debug+set}" = set; then
1928   enableval="$enable_debug"
1929
1930   case $enableval in
1931     yes)
1932       :
1933       ;;
1934     no)
1935       :
1936       ;;
1937     *)
1938       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1939 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1940    { (exit 1); exit 1; }; }
1941       ;;
1942   esac
1943
1944 else
1945   enable_debug=no
1946
1947 fi;
1948
1949
1950
1951 #
1952 # DTrace
1953 #
1954
1955 pgac_args="$pgac_args enable_dtrace"
1956
1957 # Check whether --enable-dtrace or --disable-dtrace was given.
1958 if test "${enable_dtrace+set}" = set; then
1959   enableval="$enable_dtrace"
1960
1961   case $enableval in
1962     yes)
1963
1964 cat >>confdefs.h <<\_ACEOF
1965 #define ENABLE_DTRACE 1
1966 _ACEOF
1967
1968 for ac_prog in dtrace
1969 do
1970   # Extract the first word of "$ac_prog", so it can be a program name with args.
1971 set dummy $ac_prog; ac_word=$2
1972 echo "$as_me:$LINENO: checking for $ac_word" >&5
1973 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1974 if test "${ac_cv_prog_DTRACE+set}" = set; then
1975   echo $ECHO_N "(cached) $ECHO_C" >&6
1976 else
1977   if test -n "$DTRACE"; then
1978   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
1979 else
1980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1981 for as_dir in $PATH
1982 do
1983   IFS=$as_save_IFS
1984   test -z "$as_dir" && as_dir=.
1985   for ac_exec_ext in '' $ac_executable_extensions; do
1986   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1987     ac_cv_prog_DTRACE="$ac_prog"
1988     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1989     break 2
1990   fi
1991 done
1992 done
1993
1994 fi
1995 fi
1996 DTRACE=$ac_cv_prog_DTRACE
1997 if test -n "$DTRACE"; then
1998   echo "$as_me:$LINENO: result: $DTRACE" >&5
1999 echo "${ECHO_T}$DTRACE" >&6
2000 else
2001   echo "$as_me:$LINENO: result: no" >&5
2002 echo "${ECHO_T}no" >&6
2003 fi
2004
2005   test -n "$DTRACE" && break
2006 done
2007
2008 if test -z "$DTRACE"; then
2009   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2010 echo "$as_me: error: dtrace not found" >&2;}
2011    { (exit 1); exit 1; }; }
2012 fi
2013
2014       ;;
2015     no)
2016       :
2017       ;;
2018     *)
2019       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2020 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2021    { (exit 1); exit 1; }; }
2022       ;;
2023   esac
2024
2025 else
2026   enable_dtrace=no
2027
2028 fi;
2029
2030
2031
2032 #
2033 # C compiler
2034 #
2035
2036 # For historical reasons you can also use --with-CC to specify the C compiler
2037 # to use, although the standard way to do this is to set the CC environment
2038 # variable.
2039
2040 pgac_args="$pgac_args with_CC"
2041
2042
2043 # Check whether --with-CC or --without-CC was given.
2044 if test "${with_CC+set}" = set; then
2045   withval="$with_CC"
2046
2047   case $withval in
2048     yes)
2049       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2050 echo "$as_me: error: argument required for --with-CC option" >&2;}
2051    { (exit 1); exit 1; }; }
2052       ;;
2053     no)
2054       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2055 echo "$as_me: error: argument required for --with-CC option" >&2;}
2056    { (exit 1); exit 1; }; }
2057       ;;
2058     *)
2059       CC=$with_CC
2060       ;;
2061   esac
2062
2063 fi;
2064
2065
2066 case $template in
2067   aix) pgac_cc_list="gcc xlc";;
2068  irix) pgac_cc_list="cc";; # no gcc
2069     *) pgac_cc_list="gcc cc";;
2070 esac
2071
2072 ac_ext=c
2073 ac_cpp='$CPP $CPPFLAGS'
2074 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2075 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2076 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2077 if test -n "$ac_tool_prefix"; then
2078   for ac_prog in $pgac_cc_list
2079   do
2080     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2081 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2082 echo "$as_me:$LINENO: checking for $ac_word" >&5
2083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2084 if test "${ac_cv_prog_CC+set}" = set; then
2085   echo $ECHO_N "(cached) $ECHO_C" >&6
2086 else
2087   if test -n "$CC"; then
2088   ac_cv_prog_CC="$CC" # Let the user override the test.
2089 else
2090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2091 for as_dir in $PATH
2092 do
2093   IFS=$as_save_IFS
2094   test -z "$as_dir" && as_dir=.
2095   for ac_exec_ext in '' $ac_executable_extensions; do
2096   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2097     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2098     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2099     break 2
2100   fi
2101 done
2102 done
2103
2104 fi
2105 fi
2106 CC=$ac_cv_prog_CC
2107 if test -n "$CC"; then
2108   echo "$as_me:$LINENO: result: $CC" >&5
2109 echo "${ECHO_T}$CC" >&6
2110 else
2111   echo "$as_me:$LINENO: result: no" >&5
2112 echo "${ECHO_T}no" >&6
2113 fi
2114
2115     test -n "$CC" && break
2116   done
2117 fi
2118 if test -z "$CC"; then
2119   ac_ct_CC=$CC
2120   for ac_prog in $pgac_cc_list
2121 do
2122   # Extract the first word of "$ac_prog", so it can be a program name with args.
2123 set dummy $ac_prog; ac_word=$2
2124 echo "$as_me:$LINENO: checking for $ac_word" >&5
2125 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2126 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2127   echo $ECHO_N "(cached) $ECHO_C" >&6
2128 else
2129   if test -n "$ac_ct_CC"; then
2130   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2131 else
2132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2133 for as_dir in $PATH
2134 do
2135   IFS=$as_save_IFS
2136   test -z "$as_dir" && as_dir=.
2137   for ac_exec_ext in '' $ac_executable_extensions; do
2138   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2139     ac_cv_prog_ac_ct_CC="$ac_prog"
2140     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2141     break 2
2142   fi
2143 done
2144 done
2145
2146 fi
2147 fi
2148 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2149 if test -n "$ac_ct_CC"; then
2150   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2151 echo "${ECHO_T}$ac_ct_CC" >&6
2152 else
2153   echo "$as_me:$LINENO: result: no" >&5
2154 echo "${ECHO_T}no" >&6
2155 fi
2156
2157   test -n "$ac_ct_CC" && break
2158 done
2159
2160   CC=$ac_ct_CC
2161 fi
2162
2163
2164 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2165 See \`config.log' for more details." >&5
2166 echo "$as_me: error: no acceptable C compiler found in \$PATH
2167 See \`config.log' for more details." >&2;}
2168    { (exit 1); exit 1; }; }
2169
2170 # Provide some information about the compiler.
2171 echo "$as_me:$LINENO:" \
2172      "checking for C compiler version" >&5
2173 ac_compiler=`set X $ac_compile; echo $2`
2174 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2175   (eval $ac_compiler --version </dev/null >&5) 2>&5
2176   ac_status=$?
2177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178   (exit $ac_status); }
2179 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2180   (eval $ac_compiler -v </dev/null >&5) 2>&5
2181   ac_status=$?
2182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2183   (exit $ac_status); }
2184 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2185   (eval $ac_compiler -V </dev/null >&5) 2>&5
2186   ac_status=$?
2187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188   (exit $ac_status); }
2189
2190 cat >conftest.$ac_ext <<_ACEOF
2191 /* confdefs.h.  */
2192 _ACEOF
2193 cat confdefs.h >>conftest.$ac_ext
2194 cat >>conftest.$ac_ext <<_ACEOF
2195 /* end confdefs.h.  */
2196
2197 int
2198 main ()
2199 {
2200
2201   ;
2202   return 0;
2203 }
2204 _ACEOF
2205 ac_clean_files_save=$ac_clean_files
2206 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2207 # Try to create an executable without -o first, disregard a.out.
2208 # It will help us diagnose broken compilers, and finding out an intuition
2209 # of exeext.
2210 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2211 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2212 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2213 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2214   (eval $ac_link_default) 2>&5
2215   ac_status=$?
2216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2217   (exit $ac_status); }; then
2218   # Find the output, starting from the most likely.  This scheme is
2219 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2220 # resort.
2221
2222 # Be careful to initialize this variable, since it used to be cached.
2223 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2224 ac_cv_exeext=
2225 # b.out is created by i960 compilers.
2226 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2227 do
2228   test -f "$ac_file" || continue
2229   case $ac_file in
2230     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2231         ;;
2232     conftest.$ac_ext )
2233         # This is the source file.
2234         ;;
2235     [ab].out )
2236         # We found the default executable, but exeext='' is most
2237         # certainly right.
2238         break;;
2239     *.* )
2240         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2241         # FIXME: I believe we export ac_cv_exeext for Libtool,
2242         # but it would be cool to find out if it's true.  Does anybody
2243         # maintain Libtool? --akim.
2244         export ac_cv_exeext
2245         break;;
2246     * )
2247         break;;
2248   esac
2249 done
2250 else
2251   echo "$as_me: failed program was:" >&5
2252 sed 's/^/| /' conftest.$ac_ext >&5
2253
2254 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2255 See \`config.log' for more details." >&5
2256 echo "$as_me: error: C compiler cannot create executables
2257 See \`config.log' for more details." >&2;}
2258    { (exit 77); exit 77; }; }
2259 fi
2260
2261 ac_exeext=$ac_cv_exeext
2262 echo "$as_me:$LINENO: result: $ac_file" >&5
2263 echo "${ECHO_T}$ac_file" >&6
2264
2265 # Check the compiler produces executables we can run.  If not, either
2266 # the compiler is broken, or we cross compile.
2267 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2268 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2269 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2270 # If not cross compiling, check that we can run a simple program.
2271 if test "$cross_compiling" != yes; then
2272   if { ac_try='./$ac_file'
2273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2274   (eval $ac_try) 2>&5
2275   ac_status=$?
2276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277   (exit $ac_status); }; }; then
2278     cross_compiling=no
2279   else
2280     if test "$cross_compiling" = maybe; then
2281         cross_compiling=yes
2282     else
2283         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2284 If you meant to cross compile, use \`--host'.
2285 See \`config.log' for more details." >&5
2286 echo "$as_me: error: cannot run C compiled programs.
2287 If you meant to cross compile, use \`--host'.
2288 See \`config.log' for more details." >&2;}
2289    { (exit 1); exit 1; }; }
2290     fi
2291   fi
2292 fi
2293 echo "$as_me:$LINENO: result: yes" >&5
2294 echo "${ECHO_T}yes" >&6
2295
2296 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2297 ac_clean_files=$ac_clean_files_save
2298 # Check the compiler produces executables we can run.  If not, either
2299 # the compiler is broken, or we cross compile.
2300 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2301 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2302 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2303 echo "${ECHO_T}$cross_compiling" >&6
2304
2305 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2306 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2308   (eval $ac_link) 2>&5
2309   ac_status=$?
2310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2311   (exit $ac_status); }; then
2312   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2313 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2314 # work properly (i.e., refer to `conftest.exe'), while it won't with
2315 # `rm'.
2316 for ac_file in conftest.exe conftest conftest.*; do
2317   test -f "$ac_file" || continue
2318   case $ac_file in
2319     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2320     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2321           export ac_cv_exeext
2322           break;;
2323     * ) break;;
2324   esac
2325 done
2326 else
2327   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2328 See \`config.log' for more details." >&5
2329 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2330 See \`config.log' for more details." >&2;}
2331    { (exit 1); exit 1; }; }
2332 fi
2333
2334 rm -f conftest$ac_cv_exeext
2335 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2336 echo "${ECHO_T}$ac_cv_exeext" >&6
2337
2338 rm -f conftest.$ac_ext
2339 EXEEXT=$ac_cv_exeext
2340 ac_exeext=$EXEEXT
2341 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2342 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2343 if test "${ac_cv_objext+set}" = set; then
2344   echo $ECHO_N "(cached) $ECHO_C" >&6
2345 else
2346   cat >conftest.$ac_ext <<_ACEOF
2347 /* confdefs.h.  */
2348 _ACEOF
2349 cat confdefs.h >>conftest.$ac_ext
2350 cat >>conftest.$ac_ext <<_ACEOF
2351 /* end confdefs.h.  */
2352
2353 int
2354 main ()
2355 {
2356
2357   ;
2358   return 0;
2359 }
2360 _ACEOF
2361 rm -f conftest.o conftest.obj
2362 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2363   (eval $ac_compile) 2>&5
2364   ac_status=$?
2365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2366   (exit $ac_status); }; then
2367   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2368   case $ac_file in
2369     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2370     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2371        break;;
2372   esac
2373 done
2374 else
2375   echo "$as_me: failed program was:" >&5
2376 sed 's/^/| /' conftest.$ac_ext >&5
2377
2378 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2379 See \`config.log' for more details." >&5
2380 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2381 See \`config.log' for more details." >&2;}
2382    { (exit 1); exit 1; }; }
2383 fi
2384
2385 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2386 fi
2387 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2388 echo "${ECHO_T}$ac_cv_objext" >&6
2389 OBJEXT=$ac_cv_objext
2390 ac_objext=$OBJEXT
2391 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2392 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2393 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2394   echo $ECHO_N "(cached) $ECHO_C" >&6
2395 else
2396   cat >conftest.$ac_ext <<_ACEOF
2397 /* confdefs.h.  */
2398 _ACEOF
2399 cat confdefs.h >>conftest.$ac_ext
2400 cat >>conftest.$ac_ext <<_ACEOF
2401 /* end confdefs.h.  */
2402
2403 int
2404 main ()
2405 {
2406 #ifndef __GNUC__
2407        choke me
2408 #endif
2409
2410   ;
2411   return 0;
2412 }
2413 _ACEOF
2414 rm -f conftest.$ac_objext
2415 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2416   (eval $ac_compile) 2>conftest.er1
2417   ac_status=$?
2418   grep -v '^ *+' conftest.er1 >conftest.err
2419   rm -f conftest.er1
2420   cat conftest.err >&5
2421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2422   (exit $ac_status); } &&
2423          { ac_try='test -z "$ac_c_werror_flag"
2424                          || test ! -s conftest.err'
2425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2426   (eval $ac_try) 2>&5
2427   ac_status=$?
2428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2429   (exit $ac_status); }; } &&
2430          { ac_try='test -s conftest.$ac_objext'
2431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2432   (eval $ac_try) 2>&5
2433   ac_status=$?
2434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2435   (exit $ac_status); }; }; then
2436   ac_compiler_gnu=yes
2437 else
2438   echo "$as_me: failed program was:" >&5
2439 sed 's/^/| /' conftest.$ac_ext >&5
2440
2441 ac_compiler_gnu=no
2442 fi
2443 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2444 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2445
2446 fi
2447 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2448 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2449 GCC=`test $ac_compiler_gnu = yes && echo yes`
2450 ac_test_CFLAGS=${CFLAGS+set}
2451 ac_save_CFLAGS=$CFLAGS
2452 CFLAGS="-g"
2453 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2454 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2455 if test "${ac_cv_prog_cc_g+set}" = set; then
2456   echo $ECHO_N "(cached) $ECHO_C" >&6
2457 else
2458   cat >conftest.$ac_ext <<_ACEOF
2459 /* confdefs.h.  */
2460 _ACEOF
2461 cat confdefs.h >>conftest.$ac_ext
2462 cat >>conftest.$ac_ext <<_ACEOF
2463 /* end confdefs.h.  */
2464
2465 int
2466 main ()
2467 {
2468
2469   ;
2470   return 0;
2471 }
2472 _ACEOF
2473 rm -f conftest.$ac_objext
2474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2475   (eval $ac_compile) 2>conftest.er1
2476   ac_status=$?
2477   grep -v '^ *+' conftest.er1 >conftest.err
2478   rm -f conftest.er1
2479   cat conftest.err >&5
2480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2481   (exit $ac_status); } &&
2482          { ac_try='test -z "$ac_c_werror_flag"
2483                          || test ! -s conftest.err'
2484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2485   (eval $ac_try) 2>&5
2486   ac_status=$?
2487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2488   (exit $ac_status); }; } &&
2489          { ac_try='test -s conftest.$ac_objext'
2490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2491   (eval $ac_try) 2>&5
2492   ac_status=$?
2493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2494   (exit $ac_status); }; }; then
2495   ac_cv_prog_cc_g=yes
2496 else
2497   echo "$as_me: failed program was:" >&5
2498 sed 's/^/| /' conftest.$ac_ext >&5
2499
2500 ac_cv_prog_cc_g=no
2501 fi
2502 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2503 fi
2504 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2505 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2506 if test "$ac_test_CFLAGS" = set; then
2507   CFLAGS=$ac_save_CFLAGS
2508 elif test $ac_cv_prog_cc_g = yes; then
2509   if test "$GCC" = yes; then
2510     CFLAGS="-g -O2"
2511   else
2512     CFLAGS="-g"
2513   fi
2514 else
2515   if test "$GCC" = yes; then
2516     CFLAGS="-O2"
2517   else
2518     CFLAGS=
2519   fi
2520 fi
2521 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2522 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2523 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2524   echo $ECHO_N "(cached) $ECHO_C" >&6
2525 else
2526   ac_cv_prog_cc_stdc=no
2527 ac_save_CC=$CC
2528 cat >conftest.$ac_ext <<_ACEOF
2529 /* confdefs.h.  */
2530 _ACEOF
2531 cat confdefs.h >>conftest.$ac_ext
2532 cat >>conftest.$ac_ext <<_ACEOF
2533 /* end confdefs.h.  */
2534 #include <stdarg.h>
2535 #include <stdio.h>
2536 #include <sys/types.h>
2537 #include <sys/stat.h>
2538 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2539 struct buf { int x; };
2540 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2541 static char *e (p, i)
2542      char **p;
2543      int i;
2544 {
2545   return p[i];
2546 }
2547 static char *f (char * (*g) (char **, int), char **p, ...)
2548 {
2549   char *s;
2550   va_list v;
2551   va_start (v,p);
2552   s = g (p, va_arg (v,int));
2553   va_end (v);
2554   return s;
2555 }
2556
2557 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2558    function prototypes and stuff, but not '\xHH' hex character constants.
2559    These don't provoke an error unfortunately, instead are silently treated
2560    as 'x'.  The following induces an error, until -std1 is added to get
2561    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2562    array size at least.  It's necessary to write '\x00'==0 to get something
2563    that's true only with -std1.  */
2564 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2565
2566 int test (int i, double x);
2567 struct s1 {int (*f) (int a);};
2568 struct s2 {int (*f) (double a);};
2569 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2570 int argc;
2571 char **argv;
2572 int
2573 main ()
2574 {
2575 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2576   ;
2577   return 0;
2578 }
2579 _ACEOF
2580 # Don't try gcc -ansi; that turns off useful extensions and
2581 # breaks some systems' header files.
2582 # AIX                   -qlanglvl=ansi
2583 # Ultrix and OSF/1      -std1
2584 # HP-UX 10.20 and later -Ae
2585 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2586 # SVR4                  -Xc -D__EXTENSIONS__
2587 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2588 do
2589   CC="$ac_save_CC $ac_arg"
2590   rm -f conftest.$ac_objext
2591 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2592   (eval $ac_compile) 2>conftest.er1
2593   ac_status=$?
2594   grep -v '^ *+' conftest.er1 >conftest.err
2595   rm -f conftest.er1
2596   cat conftest.err >&5
2597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2598   (exit $ac_status); } &&
2599          { ac_try='test -z "$ac_c_werror_flag"
2600                          || test ! -s conftest.err'
2601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2602   (eval $ac_try) 2>&5
2603   ac_status=$?
2604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2605   (exit $ac_status); }; } &&
2606          { ac_try='test -s conftest.$ac_objext'
2607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2608   (eval $ac_try) 2>&5
2609   ac_status=$?
2610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2611   (exit $ac_status); }; }; then
2612   ac_cv_prog_cc_stdc=$ac_arg
2613 break
2614 else
2615   echo "$as_me: failed program was:" >&5
2616 sed 's/^/| /' conftest.$ac_ext >&5
2617
2618 fi
2619 rm -f conftest.err conftest.$ac_objext
2620 done
2621 rm -f conftest.$ac_ext conftest.$ac_objext
2622 CC=$ac_save_CC
2623
2624 fi
2625
2626 case "x$ac_cv_prog_cc_stdc" in
2627   x|xno)
2628     echo "$as_me:$LINENO: result: none needed" >&5
2629 echo "${ECHO_T}none needed" >&6 ;;
2630   *)
2631     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2632 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2633     CC="$CC $ac_cv_prog_cc_stdc" ;;
2634 esac
2635
2636 # Some people use a C++ compiler to compile C.  Since we use `exit',
2637 # in C++ we need to declare it.  In case someone uses the same compiler
2638 # for both compiling C and C++ we need to have the C++ compiler decide
2639 # the declaration of exit, since it's the most demanding environment.
2640 cat >conftest.$ac_ext <<_ACEOF
2641 #ifndef __cplusplus
2642   choke me
2643 #endif
2644 _ACEOF
2645 rm -f conftest.$ac_objext
2646 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2647   (eval $ac_compile) 2>conftest.er1
2648   ac_status=$?
2649   grep -v '^ *+' conftest.er1 >conftest.err
2650   rm -f conftest.er1
2651   cat conftest.err >&5
2652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2653   (exit $ac_status); } &&
2654          { ac_try='test -z "$ac_c_werror_flag"
2655                          || test ! -s conftest.err'
2656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2657   (eval $ac_try) 2>&5
2658   ac_status=$?
2659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660   (exit $ac_status); }; } &&
2661          { ac_try='test -s conftest.$ac_objext'
2662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2663   (eval $ac_try) 2>&5
2664   ac_status=$?
2665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666   (exit $ac_status); }; }; then
2667   for ac_declaration in \
2668    '' \
2669    'extern "C" void std::exit (int) throw (); using std::exit;' \
2670    'extern "C" void std::exit (int); using std::exit;' \
2671    'extern "C" void exit (int) throw ();' \
2672    'extern "C" void exit (int);' \
2673    'void exit (int);'
2674 do
2675   cat >conftest.$ac_ext <<_ACEOF
2676 /* confdefs.h.  */
2677 _ACEOF
2678 cat confdefs.h >>conftest.$ac_ext
2679 cat >>conftest.$ac_ext <<_ACEOF
2680 /* end confdefs.h.  */
2681 $ac_declaration
2682 #include <stdlib.h>
2683 int
2684 main ()
2685 {
2686 exit (42);
2687   ;
2688   return 0;
2689 }
2690 _ACEOF
2691 rm -f conftest.$ac_objext
2692 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2693   (eval $ac_compile) 2>conftest.er1
2694   ac_status=$?
2695   grep -v '^ *+' conftest.er1 >conftest.err
2696   rm -f conftest.er1
2697   cat conftest.err >&5
2698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699   (exit $ac_status); } &&
2700          { ac_try='test -z "$ac_c_werror_flag"
2701                          || test ! -s conftest.err'
2702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2703   (eval $ac_try) 2>&5
2704   ac_status=$?
2705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2706   (exit $ac_status); }; } &&
2707          { ac_try='test -s conftest.$ac_objext'
2708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2709   (eval $ac_try) 2>&5
2710   ac_status=$?
2711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2712   (exit $ac_status); }; }; then
2713   :
2714 else
2715   echo "$as_me: failed program was:" >&5
2716 sed 's/^/| /' conftest.$ac_ext >&5
2717
2718 continue
2719 fi
2720 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2721   cat >conftest.$ac_ext <<_ACEOF
2722 /* confdefs.h.  */
2723 _ACEOF
2724 cat confdefs.h >>conftest.$ac_ext
2725 cat >>conftest.$ac_ext <<_ACEOF
2726 /* end confdefs.h.  */
2727 $ac_declaration
2728 int
2729 main ()
2730 {
2731 exit (42);
2732   ;
2733   return 0;
2734 }
2735 _ACEOF
2736 rm -f conftest.$ac_objext
2737 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2738   (eval $ac_compile) 2>conftest.er1
2739   ac_status=$?
2740   grep -v '^ *+' conftest.er1 >conftest.err
2741   rm -f conftest.er1
2742   cat conftest.err >&5
2743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2744   (exit $ac_status); } &&
2745          { ac_try='test -z "$ac_c_werror_flag"
2746                          || test ! -s conftest.err'
2747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2748   (eval $ac_try) 2>&5
2749   ac_status=$?
2750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2751   (exit $ac_status); }; } &&
2752          { ac_try='test -s conftest.$ac_objext'
2753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2754   (eval $ac_try) 2>&5
2755   ac_status=$?
2756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2757   (exit $ac_status); }; }; then
2758   break
2759 else
2760   echo "$as_me: failed program was:" >&5
2761 sed 's/^/| /' conftest.$ac_ext >&5
2762
2763 fi
2764 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2765 done
2766 rm -f conftest*
2767 if test -n "$ac_declaration"; then
2768   echo '#ifdef __cplusplus' >>confdefs.h
2769   echo $ac_declaration      >>confdefs.h
2770   echo '#endif'             >>confdefs.h
2771 fi
2772
2773 else
2774   echo "$as_me: failed program was:" >&5
2775 sed 's/^/| /' conftest.$ac_ext >&5
2776
2777 fi
2778 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2779 ac_ext=c
2780 ac_cpp='$CPP $CPPFLAGS'
2781 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2782 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2783 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2784
2785
2786 unset CFLAGS
2787
2788 #
2789 # Read the template
2790 #
2791 . "$srcdir/src/template/$template" || exit
2792
2793 # CFLAGS are selected so:
2794 # If the user specifies something in the environment, that is used.
2795 # else:  If the template file set something, that is used.
2796 # else:  If the compiler is GCC, then we use -O2.
2797 # else:  If the compiler is something else, then we use -0.
2798
2799 if test "$ac_env_CFLAGS_set" = set; then
2800   CFLAGS=$ac_env_CFLAGS_value
2801 elif test "${CFLAGS+set}" = set; then
2802   : # (keep what template set)
2803 elif test "$GCC" = yes; then
2804   CFLAGS="-O2"
2805 else
2806   # if the user selected debug mode, don't use -O
2807   if test "$enable_debug" != yes; then
2808     CFLAGS="-O"
2809   fi
2810 fi
2811
2812 # Some versions of GCC support some additional useful warning flags.
2813 # Check whether they are supported, and add them to CFLAGS if so.
2814
2815 if test "$GCC" = yes; then
2816
2817 # ICC pretends to be GCC but it's lying; it doesn't support these options.
2818 # So we have to check if "GCC" is really ICC.
2819
2820 cat >conftest.$ac_ext <<_ACEOF
2821 /* confdefs.h.  */
2822 _ACEOF
2823 cat confdefs.h >>conftest.$ac_ext
2824 cat >>conftest.$ac_ext <<_ACEOF
2825 /* end confdefs.h.  */
2826
2827 int
2828 main ()
2829 {
2830 #ifndef __INTEL_COMPILER
2831 choke me
2832 #endif
2833   ;
2834   return 0;
2835 }
2836 _ACEOF
2837 rm -f conftest.$ac_objext
2838 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2839   (eval $ac_compile) 2>conftest.er1
2840   ac_status=$?
2841   grep -v '^ *+' conftest.er1 >conftest.err
2842   rm -f conftest.er1
2843   cat conftest.err >&5
2844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2845   (exit $ac_status); } &&
2846          { ac_try='test -z "$ac_c_werror_flag"
2847                          || test ! -s conftest.err'
2848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2849   (eval $ac_try) 2>&5
2850   ac_status=$?
2851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2852   (exit $ac_status); }; } &&
2853          { ac_try='test -s conftest.$ac_objext'
2854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2855   (eval $ac_try) 2>&5
2856   ac_status=$?
2857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2858   (exit $ac_status); }; }; then
2859   ICC=yes
2860 else
2861   echo "$as_me: failed program was:" >&5
2862 sed 's/^/| /' conftest.$ac_ext >&5
2863
2864 ICC=no
2865 fi
2866 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2867
2868   if test "$ICC" = no; then
2869     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2870
2871     echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2872 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2873 pgac_save_CFLAGS=$CFLAGS
2874 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2875 cat >conftest.$ac_ext <<_ACEOF
2876 /* confdefs.h.  */
2877 _ACEOF
2878 cat confdefs.h >>conftest.$ac_ext
2879 cat >>conftest.$ac_ext <<_ACEOF
2880 /* end confdefs.h.  */
2881
2882 int
2883 main ()
2884 {
2885
2886   ;
2887   return 0;
2888 }
2889 _ACEOF
2890 rm -f conftest.$ac_objext
2891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2892   (eval $ac_compile) 2>conftest.er1
2893   ac_status=$?
2894   grep -v '^ *+' conftest.er1 >conftest.err
2895   rm -f conftest.er1
2896   cat conftest.err >&5
2897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898   (exit $ac_status); } &&
2899          { ac_try='test -z "$ac_c_werror_flag"
2900                          || test ! -s conftest.err'
2901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2902   (eval $ac_try) 2>&5
2903   ac_status=$?
2904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2905   (exit $ac_status); }; } &&
2906          { ac_try='test -s conftest.$ac_objext'
2907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2908   (eval $ac_try) 2>&5
2909   ac_status=$?
2910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2911   (exit $ac_status); }; }; then
2912   echo "$as_me:$LINENO: result: yes" >&5
2913 echo "${ECHO_T}yes" >&6
2914 else
2915   echo "$as_me: failed program was:" >&5
2916 sed 's/^/| /' conftest.$ac_ext >&5
2917
2918 CFLAGS="$pgac_save_CFLAGS"
2919                     echo "$as_me:$LINENO: result: no" >&5
2920 echo "${ECHO_T}no" >&6
2921 fi
2922 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2923
2924     echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2925 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2926 pgac_save_CFLAGS=$CFLAGS
2927 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2928 cat >conftest.$ac_ext <<_ACEOF
2929 /* confdefs.h.  */
2930 _ACEOF
2931 cat confdefs.h >>conftest.$ac_ext
2932 cat >>conftest.$ac_ext <<_ACEOF
2933 /* end confdefs.h.  */
2934
2935 int
2936 main ()
2937 {
2938
2939   ;
2940   return 0;
2941 }
2942 _ACEOF
2943 rm -f conftest.$ac_objext
2944 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2945   (eval $ac_compile) 2>conftest.er1
2946   ac_status=$?
2947   grep -v '^ *+' conftest.er1 >conftest.err
2948   rm -f conftest.er1
2949   cat conftest.err >&5
2950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951   (exit $ac_status); } &&
2952          { ac_try='test -z "$ac_c_werror_flag"
2953                          || test ! -s conftest.err'
2954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2955   (eval $ac_try) 2>&5
2956   ac_status=$?
2957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2958   (exit $ac_status); }; } &&
2959          { ac_try='test -s conftest.$ac_objext'
2960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2961   (eval $ac_try) 2>&5
2962   ac_status=$?
2963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2964   (exit $ac_status); }; }; then
2965   echo "$as_me:$LINENO: result: yes" >&5
2966 echo "${ECHO_T}yes" >&6
2967 else
2968   echo "$as_me: failed program was:" >&5
2969 sed 's/^/| /' conftest.$ac_ext >&5
2970
2971 CFLAGS="$pgac_save_CFLAGS"
2972                     echo "$as_me:$LINENO: result: no" >&5
2973 echo "${ECHO_T}no" >&6
2974 fi
2975 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2976
2977   else
2978     # Intel compiler has a bug/misoptimization in checking for
2979     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
2980     # CFLAGS.
2981     echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
2982 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6
2983 pgac_save_CFLAGS=$CFLAGS
2984 CFLAGS="$pgac_save_CFLAGS -mp1"
2985 cat >conftest.$ac_ext <<_ACEOF
2986 /* confdefs.h.  */
2987 _ACEOF
2988 cat confdefs.h >>conftest.$ac_ext
2989 cat >>conftest.$ac_ext <<_ACEOF
2990 /* end confdefs.h.  */
2991
2992 int
2993 main ()
2994 {
2995
2996   ;
2997   return 0;
2998 }
2999 _ACEOF
3000 rm -f conftest.$ac_objext
3001 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3002   (eval $ac_compile) 2>conftest.er1
3003   ac_status=$?
3004   grep -v '^ *+' conftest.er1 >conftest.err
3005   rm -f conftest.er1
3006   cat conftest.err >&5
3007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3008   (exit $ac_status); } &&
3009          { ac_try='test -z "$ac_c_werror_flag"
3010                          || test ! -s conftest.err'
3011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3012   (eval $ac_try) 2>&5
3013   ac_status=$?
3014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3015   (exit $ac_status); }; } &&
3016          { ac_try='test -s conftest.$ac_objext'
3017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3018   (eval $ac_try) 2>&5
3019   ac_status=$?
3020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3021   (exit $ac_status); }; }; then
3022   echo "$as_me:$LINENO: result: yes" >&5
3023 echo "${ECHO_T}yes" >&6
3024 else
3025   echo "$as_me: failed program was:" >&5
3026 sed 's/^/| /' conftest.$ac_ext >&5
3027
3028 CFLAGS="$pgac_save_CFLAGS"
3029                     echo "$as_me:$LINENO: result: no" >&5
3030 echo "${ECHO_T}no" >&6
3031 fi
3032 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3033
3034   fi
3035
3036   # Disable strict-aliasing rules; needed for gcc 3.3+
3037   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3038 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
3039 pgac_save_CFLAGS=$CFLAGS
3040 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3041 cat >conftest.$ac_ext <<_ACEOF
3042 /* confdefs.h.  */
3043 _ACEOF
3044 cat confdefs.h >>conftest.$ac_ext
3045 cat >>conftest.$ac_ext <<_ACEOF
3046 /* end confdefs.h.  */
3047
3048 int
3049 main ()
3050 {
3051
3052   ;
3053   return 0;
3054 }
3055 _ACEOF
3056 rm -f conftest.$ac_objext
3057 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3058   (eval $ac_compile) 2>conftest.er1
3059   ac_status=$?
3060   grep -v '^ *+' conftest.er1 >conftest.err
3061   rm -f conftest.er1
3062   cat conftest.err >&5
3063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3064   (exit $ac_status); } &&
3065          { ac_try='test -z "$ac_c_werror_flag"
3066                          || test ! -s conftest.err'
3067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3068   (eval $ac_try) 2>&5
3069   ac_status=$?
3070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3071   (exit $ac_status); }; } &&
3072          { ac_try='test -s conftest.$ac_objext'
3073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3074   (eval $ac_try) 2>&5
3075   ac_status=$?
3076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3077   (exit $ac_status); }; }; then
3078   echo "$as_me:$LINENO: result: yes" >&5
3079 echo "${ECHO_T}yes" >&6
3080 else
3081   echo "$as_me: failed program was:" >&5
3082 sed 's/^/| /' conftest.$ac_ext >&5
3083
3084 CFLAGS="$pgac_save_CFLAGS"
3085                     echo "$as_me:$LINENO: result: no" >&5
3086 echo "${ECHO_T}no" >&6
3087 fi
3088 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3089
3090 elif test x"${CC}" = x"xlc"; then
3091   # AIX xlc has to have strict aliasing turned off too
3092   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3093 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
3094 pgac_save_CFLAGS=$CFLAGS
3095 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3096 cat >conftest.$ac_ext <<_ACEOF
3097 /* confdefs.h.  */
3098 _ACEOF
3099 cat confdefs.h >>conftest.$ac_ext
3100 cat >>conftest.$ac_ext <<_ACEOF
3101 /* end confdefs.h.  */
3102
3103 int
3104 main ()
3105 {
3106
3107   ;
3108   return 0;
3109 }
3110 _ACEOF
3111 rm -f conftest.$ac_objext
3112 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3113   (eval $ac_compile) 2>conftest.er1
3114   ac_status=$?
3115   grep -v '^ *+' conftest.er1 >conftest.err
3116   rm -f conftest.er1
3117   cat conftest.err >&5
3118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3119   (exit $ac_status); } &&
3120          { ac_try='test -z "$ac_c_werror_flag"
3121                          || test ! -s conftest.err'
3122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3123   (eval $ac_try) 2>&5
3124   ac_status=$?
3125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3126   (exit $ac_status); }; } &&
3127          { ac_try='test -s conftest.$ac_objext'
3128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3129   (eval $ac_try) 2>&5
3130   ac_status=$?
3131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3132   (exit $ac_status); }; }; then
3133   echo "$as_me:$LINENO: result: yes" >&5
3134 echo "${ECHO_T}yes" >&6
3135 else
3136   echo "$as_me: failed program was:" >&5
3137 sed 's/^/| /' conftest.$ac_ext >&5
3138
3139 CFLAGS="$pgac_save_CFLAGS"
3140                     echo "$as_me:$LINENO: result: no" >&5
3141 echo "${ECHO_T}no" >&6
3142 fi
3143 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3144
3145 fi
3146
3147 # supply -g if --enable-debug
3148 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3149   CFLAGS="$CFLAGS -g"
3150 fi
3151
3152 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3153 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3154
3155 # We already have this in Makefile.win32, but configure needs it too
3156 if test "$PORTNAME" = "win32"; then
3157   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3158 fi
3159
3160 # Check if the compiler still works with the template settings
3161 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3162 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
3163 cat >conftest.$ac_ext <<_ACEOF
3164 /* confdefs.h.  */
3165 _ACEOF
3166 cat confdefs.h >>conftest.$ac_ext
3167 cat >>conftest.$ac_ext <<_ACEOF
3168 /* end confdefs.h.  */
3169
3170 int
3171 main ()
3172 {
3173 return 0;
3174   ;
3175   return 0;
3176 }
3177 _ACEOF
3178 rm -f conftest.$ac_objext conftest$ac_exeext
3179 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3180   (eval $ac_link) 2>conftest.er1
3181   ac_status=$?
3182   grep -v '^ *+' conftest.er1 >conftest.err
3183   rm -f conftest.er1
3184   cat conftest.err >&5
3185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3186   (exit $ac_status); } &&
3187          { ac_try='test -z "$ac_c_werror_flag"
3188                          || test ! -s conftest.err'
3189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3190   (eval $ac_try) 2>&5
3191   ac_status=$?
3192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3193   (exit $ac_status); }; } &&
3194          { ac_try='test -s conftest$ac_exeext'
3195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3196   (eval $ac_try) 2>&5
3197   ac_status=$?
3198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3199   (exit $ac_status); }; }; then
3200   echo "$as_me:$LINENO: result: yes" >&5
3201 echo "${ECHO_T}yes" >&6
3202 else
3203   echo "$as_me: failed program was:" >&5
3204 sed 's/^/| /' conftest.$ac_ext >&5
3205
3206 echo "$as_me:$LINENO: result: no" >&5
3207 echo "${ECHO_T}no" >&6
3208    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3209 echo "$as_me: error: cannot proceed" >&2;}
3210    { (exit 1); exit 1; }; }
3211 fi
3212 rm -f conftest.err conftest.$ac_objext \
3213       conftest$ac_exeext conftest.$ac_ext
3214
3215 # Defend against gcc -ffast-math
3216 if test "$GCC" = yes; then
3217 cat >conftest.$ac_ext <<_ACEOF
3218 /* confdefs.h.  */
3219 _ACEOF
3220 cat confdefs.h >>conftest.$ac_ext
3221 cat >>conftest.$ac_ext <<_ACEOF
3222 /* end confdefs.h.  */
3223
3224 int
3225 main ()
3226 {
3227 #ifdef __FAST_MATH__
3228 choke me
3229 #endif
3230   ;
3231   return 0;
3232 }
3233 _ACEOF
3234 rm -f conftest.$ac_objext
3235 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3236   (eval $ac_compile) 2>conftest.er1
3237   ac_status=$?
3238   grep -v '^ *+' conftest.er1 >conftest.err
3239   rm -f conftest.er1
3240   cat conftest.err >&5
3241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3242   (exit $ac_status); } &&
3243          { ac_try='test -z "$ac_c_werror_flag"
3244                          || test ! -s conftest.err'
3245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3246   (eval $ac_try) 2>&5
3247   ac_status=$?
3248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3249   (exit $ac_status); }; } &&
3250          { ac_try='test -s conftest.$ac_objext'
3251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3252   (eval $ac_try) 2>&5
3253   ac_status=$?
3254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3255   (exit $ac_status); }; }; then
3256   :
3257 else
3258   echo "$as_me: failed program was:" >&5
3259 sed 's/^/| /' conftest.$ac_ext >&5
3260
3261 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3262 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3263    { (exit 1); exit 1; }; }
3264 fi
3265 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3266 fi
3267
3268 ac_ext=c
3269 ac_cpp='$CPP $CPPFLAGS'
3270 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3271 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3272 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3273 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3274 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3275 # On Suns, sometimes $CPP names a directory.
3276 if test -n "$CPP" && test -d "$CPP"; then
3277   CPP=
3278 fi
3279 if test -z "$CPP"; then
3280   if test "${ac_cv_prog_CPP+set}" = set; then
3281   echo $ECHO_N "(cached) $ECHO_C" >&6
3282 else
3283       # Double quotes because CPP needs to be expanded
3284     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3285     do
3286       ac_preproc_ok=false
3287 for ac_c_preproc_warn_flag in '' yes
3288 do
3289   # Use a header file that comes with gcc, so configuring glibc
3290   # with a fresh cross-compiler works.
3291   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3292   # <limits.h> exists even on freestanding compilers.
3293   # On the NeXT, cc -E runs the code through the compiler's parser,
3294   # not just through cpp. "Syntax error" is here to catch this case.
3295   cat >conftest.$ac_ext <<_ACEOF
3296 /* confdefs.h.  */
3297 _ACEOF
3298 cat confdefs.h >>conftest.$ac_ext
3299 cat >>conftest.$ac_ext <<_ACEOF
3300 /* end confdefs.h.  */
3301 #ifdef __STDC__
3302 # include <limits.h>
3303 #else
3304 # include <assert.h>
3305 #endif
3306                      Syntax error
3307 _ACEOF
3308 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3309   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3310   ac_status=$?
3311   grep -v '^ *+' conftest.er1 >conftest.err
3312   rm -f conftest.er1
3313   cat conftest.err >&5
3314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3315   (exit $ac_status); } >/dev/null; then
3316   if test -s conftest.err; then
3317     ac_cpp_err=$ac_c_preproc_warn_flag
3318     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3319   else
3320     ac_cpp_err=
3321   fi
3322 else
3323   ac_cpp_err=yes
3324 fi
3325 if test -z "$ac_cpp_err"; then
3326   :
3327 else
3328   echo "$as_me: failed program was:" >&5
3329 sed 's/^/| /' conftest.$ac_ext >&5
3330
3331   # Broken: fails on valid input.
3332 continue
3333 fi
3334 rm -f conftest.err conftest.$ac_ext
3335
3336   # OK, works on sane cases.  Now check whether non-existent headers
3337   # can be detected and how.
3338   cat >conftest.$ac_ext <<_ACEOF
3339 /* confdefs.h.  */
3340 _ACEOF
3341 cat confdefs.h >>conftest.$ac_ext
3342 cat >>conftest.$ac_ext <<_ACEOF
3343 /* end confdefs.h.  */
3344 #include <ac_nonexistent.h>
3345 _ACEOF
3346 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3347   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3348   ac_status=$?
3349   grep -v '^ *+' conftest.er1 >conftest.err
3350   rm -f conftest.er1
3351   cat conftest.err >&5
3352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3353   (exit $ac_status); } >/dev/null; then
3354   if test -s conftest.err; then
3355     ac_cpp_err=$ac_c_preproc_warn_flag
3356     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3357   else
3358     ac_cpp_err=
3359   fi
3360 else
3361   ac_cpp_err=yes
3362 fi
3363 if test -z "$ac_cpp_err"; then
3364   # Broken: success on invalid input.
3365 continue
3366 else
3367   echo "$as_me: failed program was:" >&5
3368 sed 's/^/| /' conftest.$ac_ext >&5
3369
3370   # Passes both tests.
3371 ac_preproc_ok=:
3372 break
3373 fi
3374 rm -f conftest.err conftest.$ac_ext
3375
3376 done
3377 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3378 rm -f conftest.err conftest.$ac_ext
3379 if $ac_preproc_ok; then
3380   break
3381 fi
3382
3383     done
3384     ac_cv_prog_CPP=$CPP
3385
3386 fi
3387   CPP=$ac_cv_prog_CPP
3388 else
3389   ac_cv_prog_CPP=$CPP
3390 fi
3391 echo "$as_me:$LINENO: result: $CPP" >&5
3392 echo "${ECHO_T}$CPP" >&6
3393 ac_preproc_ok=false
3394 for ac_c_preproc_warn_flag in '' yes
3395 do
3396   # Use a header file that comes with gcc, so configuring glibc
3397   # with a fresh cross-compiler works.
3398   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3399   # <limits.h> exists even on freestanding compilers.
3400   # On the NeXT, cc -E runs the code through the compiler's parser,
3401   # not just through cpp. "Syntax error" is here to catch this case.
3402   cat >conftest.$ac_ext <<_ACEOF
3403 /* confdefs.h.  */
3404 _ACEOF
3405 cat confdefs.h >>conftest.$ac_ext
3406 cat >>conftest.$ac_ext <<_ACEOF
3407 /* end confdefs.h.  */
3408 #ifdef __STDC__
3409 # include <limits.h>
3410 #else
3411 # include <assert.h>
3412 #endif
3413                      Syntax error
3414 _ACEOF
3415 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3416   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3417   ac_status=$?
3418   grep -v '^ *+' conftest.er1 >conftest.err
3419   rm -f conftest.er1
3420   cat conftest.err >&5
3421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3422   (exit $ac_status); } >/dev/null; then
3423   if test -s conftest.err; then
3424     ac_cpp_err=$ac_c_preproc_warn_flag
3425     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3426   else
3427     ac_cpp_err=
3428   fi
3429 else
3430   ac_cpp_err=yes
3431 fi
3432 if test -z "$ac_cpp_err"; then
3433   :
3434 else
3435   echo "$as_me: failed program was:" >&5
3436 sed 's/^/| /' conftest.$ac_ext >&5
3437
3438   # Broken: fails on valid input.
3439 continue
3440 fi
3441 rm -f conftest.err conftest.$ac_ext
3442
3443   # OK, works on sane cases.  Now check whether non-existent headers
3444   # can be detected and how.
3445   cat >conftest.$ac_ext <<_ACEOF
3446 /* confdefs.h.  */
3447 _ACEOF
3448 cat confdefs.h >>conftest.$ac_ext
3449 cat >>conftest.$ac_ext <<_ACEOF
3450 /* end confdefs.h.  */
3451 #include <ac_nonexistent.h>
3452 _ACEOF
3453 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3454   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3455   ac_status=$?
3456   grep -v '^ *+' conftest.er1 >conftest.err
3457   rm -f conftest.er1
3458   cat conftest.err >&5
3459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3460   (exit $ac_status); } >/dev/null; then
3461   if test -s conftest.err; then
3462     ac_cpp_err=$ac_c_preproc_warn_flag
3463     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3464   else
3465     ac_cpp_err=
3466   fi
3467 else
3468   ac_cpp_err=yes
3469 fi
3470 if test -z "$ac_cpp_err"; then
3471   # Broken: success on invalid input.
3472 continue
3473 else
3474   echo "$as_me: failed program was:" >&5
3475 sed 's/^/| /' conftest.$ac_ext >&5
3476
3477   # Passes both tests.
3478 ac_preproc_ok=:
3479 break
3480 fi
3481 rm -f conftest.err conftest.$ac_ext
3482
3483 done
3484 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3485 rm -f conftest.err conftest.$ac_ext
3486 if $ac_preproc_ok; then
3487   :
3488 else
3489   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3490 See \`config.log' for more details." >&5
3491 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3492 See \`config.log' for more details." >&2;}
3493    { (exit 1); exit 1; }; }
3494 fi
3495
3496 ac_ext=c
3497 ac_cpp='$CPP $CPPFLAGS'
3498 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3499 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3501
3502
3503
3504 # Create compiler version string
3505 if test x"$GCC" = x"yes" ; then
3506   cc_string="GCC `${CC} --version | sed q`"
3507 else
3508   cc_string=$CC
3509 fi
3510
3511 cat >>confdefs.h <<_ACEOF
3512 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3513 _ACEOF
3514
3515
3516
3517 #
3518 # Set up TAS assembly code if needed; the template file has now had its
3519 # chance to request this.
3520 #
3521           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3522
3523
3524 if test "$need_tas" = yes ; then
3525   TAS=tas.o
3526 else
3527   TAS=""
3528 fi
3529
3530
3531
3532 #
3533 # Automatic dependency tracking
3534 #
3535
3536 pgac_args="$pgac_args enable_depend"
3537
3538 # Check whether --enable-depend or --disable-depend was given.
3539 if test "${enable_depend+set}" = set; then
3540   enableval="$enable_depend"
3541
3542   case $enableval in
3543     yes)
3544       autodepend=yes
3545       ;;
3546     no)
3547       :
3548       ;;
3549     *)
3550       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3551 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3552    { (exit 1); exit 1; }; }
3553       ;;
3554   esac
3555
3556 else
3557   enable_depend=no
3558
3559 fi;
3560
3561
3562
3563
3564 #
3565 # Enable assert checks
3566 #
3567
3568 pgac_args="$pgac_args enable_cassert"
3569
3570 # Check whether --enable-cassert or --disable-cassert was given.
3571 if test "${enable_cassert+set}" = set; then
3572   enableval="$enable_cassert"
3573
3574   case $enableval in
3575     yes)
3576
3577 cat >>confdefs.h <<\_ACEOF
3578 #define USE_ASSERT_CHECKING 1
3579 _ACEOF
3580
3581       ;;
3582     no)
3583       :
3584       ;;
3585     *)
3586       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3587 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3588    { (exit 1); exit 1; }; }
3589       ;;
3590   esac
3591
3592 else
3593   enable_cassert=no
3594
3595 fi;
3596
3597
3598
3599 #
3600 # Include directories
3601 #
3602 ac_save_IFS=$IFS
3603 IFS="${IFS}${PATH_SEPARATOR}"
3604 # SRCH_INC comes from the template file
3605 for dir in $with_includes $SRCH_INC; do
3606   if test -d "$dir"; then
3607     INCLUDES="$INCLUDES -I$dir"
3608   else
3609     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3610 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3611   fi
3612 done
3613 IFS=$ac_save_IFS
3614
3615
3616
3617 #
3618 # Library directories
3619 #
3620 ac_save_IFS=$IFS
3621 IFS="${IFS}${PATH_SEPARATOR}"
3622 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3623 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3624   if test -d "$dir"; then
3625     LIBDIRS="$LIBDIRS -L$dir"
3626   else
3627     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3628 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3629   fi
3630 done
3631 IFS=$ac_save_IFS
3632
3633 #
3634 # Enable thread-safe client libraries
3635 #
3636 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3637 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3638
3639 pgac_args="$pgac_args enable_thread_safety"
3640
3641 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3642 if test "${enable_thread_safety+set}" = set; then
3643   enableval="$enable_thread_safety"
3644
3645   case $enableval in
3646     yes)
3647       :
3648       ;;
3649     no)
3650       :
3651       ;;
3652     *)
3653       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3654 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3655    { (exit 1); exit 1; }; }
3656       ;;
3657   esac
3658
3659 else
3660   enable_thread_safety=no
3661
3662 fi;
3663
3664
3665 pgac_args="$pgac_args enable_thread_safety_force"
3666
3667 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3668 if test "${enable_thread_safety_force+set}" = set; then
3669   enableval="$enable_thread_safety_force"
3670
3671   case $enableval in
3672     yes)
3673       :
3674       ;;
3675     no)
3676       :
3677       ;;
3678     *)
3679       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3680 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3681    { (exit 1); exit 1; }; }
3682       ;;
3683   esac
3684
3685 else
3686   enable_thread_safety_force=no
3687
3688 fi;
3689
3690 if test "$enable_thread_safety" = yes -o \
3691         "$enable_thread_safety_force" = yes; then
3692   enable_thread_safety="yes"    # for 'force'
3693
3694 cat >>confdefs.h <<\_ACEOF
3695 #define ENABLE_THREAD_SAFETY 1
3696 _ACEOF
3697
3698 fi
3699 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3700 echo "${ECHO_T}$enable_thread_safety" >&6
3701
3702
3703 #
3704 # Optionally build Tcl modules (PL/Tcl)
3705 #
3706 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3707 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3708
3709 pgac_args="$pgac_args with_tcl"
3710
3711
3712 # Check whether --with-tcl or --without-tcl was given.
3713 if test "${with_tcl+set}" = set; then
3714   withval="$with_tcl"
3715
3716   case $withval in
3717     yes)
3718       :
3719       ;;
3720     no)
3721       :
3722       ;;
3723     *)
3724       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3725 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3726    { (exit 1); exit 1; }; }
3727       ;;
3728   esac
3729
3730 else
3731   with_tcl=no
3732
3733 fi;
3734
3735 echo "$as_me:$LINENO: result: $with_tcl" >&5
3736 echo "${ECHO_T}$with_tcl" >&6
3737
3738
3739 # We see if the path to the Tcl/Tk configuration scripts is specified.
3740 # This will override the use of tclsh to find the paths to search.
3741
3742
3743 pgac_args="$pgac_args with_tclconfig"
3744
3745
3746 # Check whether --with-tclconfig or --without-tclconfig was given.
3747 if test "${with_tclconfig+set}" = set; then
3748   withval="$with_tclconfig"
3749
3750   case $withval in
3751     yes)
3752       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3753 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3754    { (exit 1); exit 1; }; }
3755       ;;
3756     no)
3757       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3758 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3759    { (exit 1); exit 1; }; }
3760       ;;
3761     *)
3762
3763       ;;
3764   esac
3765
3766 fi;
3767
3768
3769 #
3770 # Optionally build Perl modules (PL/Perl)
3771 #
3772 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3773 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3774
3775 pgac_args="$pgac_args with_perl"
3776
3777
3778 # Check whether --with-perl or --without-perl was given.
3779 if test "${with_perl+set}" = set; then
3780   withval="$with_perl"
3781
3782   case $withval in
3783     yes)
3784       :
3785       ;;
3786     no)
3787       :
3788       ;;
3789     *)
3790       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3791 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3792    { (exit 1); exit 1; }; }
3793       ;;
3794   esac
3795
3796 else
3797   with_perl=no
3798
3799 fi;
3800
3801 echo "$as_me:$LINENO: result: $with_perl" >&5
3802 echo "${ECHO_T}$with_perl" >&6
3803
3804
3805 #
3806 # Optionally build Python modules (PL/Python)
3807 #
3808 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3809 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3810
3811 pgac_args="$pgac_args with_python"
3812
3813
3814 # Check whether --with-python or --without-python was given.
3815 if test "${with_python+set}" = set; then
3816   withval="$with_python"
3817
3818   case $withval in
3819     yes)
3820       :
3821       ;;
3822     no)
3823       :
3824       ;;
3825     *)
3826       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3827 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3828    { (exit 1); exit 1; }; }
3829       ;;
3830   esac
3831
3832 else
3833   with_python=no
3834
3835 fi;
3836
3837 echo "$as_me:$LINENO: result: $with_python" >&5
3838 echo "${ECHO_T}$with_python" >&6
3839
3840
3841 #
3842 # Kerberos 5
3843 #
3844 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3845 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3846
3847 pgac_args="$pgac_args with_krb5"
3848
3849
3850 # Check whether --with-krb5 or --without-krb5 was given.
3851 if test "${with_krb5+set}" = set; then
3852   withval="$with_krb5"
3853
3854   case $withval in
3855     yes)
3856
3857
3858 cat >>confdefs.h <<\_ACEOF
3859 #define KRB5 1
3860 _ACEOF
3861
3862   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3863
3864       ;;
3865     no)
3866       :
3867       ;;
3868     *)
3869       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3870 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3871    { (exit 1); exit 1; }; }
3872       ;;
3873   esac
3874
3875 else
3876   with_krb5=no
3877
3878 fi;
3879
3880 echo "$as_me:$LINENO: result: $with_krb5" >&5
3881 echo "${ECHO_T}$with_krb5" >&6
3882
3883
3884
3885
3886
3887
3888 #
3889 # Kerberos configuration parameters
3890 #
3891
3892 pgac_args="$pgac_args with_krb_srvnam"
3893
3894
3895 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3896 if test "${with_krb_srvnam+set}" = set; then
3897   withval="$with_krb_srvnam"
3898
3899   case $withval in
3900     yes)
3901       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3902 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3903    { (exit 1); exit 1; }; }
3904       ;;
3905     no)
3906       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3907 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3908    { (exit 1); exit 1; }; }
3909       ;;
3910     *)
3911
3912       ;;
3913   esac
3914
3915 else
3916   with_krb_srvnam="postgres"
3917 fi;
3918
3919
3920 cat >>confdefs.h <<_ACEOF
3921 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3922 _ACEOF
3923
3924
3925
3926 #
3927 # PAM
3928 #
3929 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3930 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3931
3932 pgac_args="$pgac_args with_pam"
3933
3934
3935 # Check whether --with-pam or --without-pam was given.
3936 if test "${with_pam+set}" = set; then
3937   withval="$with_pam"
3938
3939   case $withval in
3940     yes)
3941
3942 cat >>confdefs.h <<\_ACEOF
3943 #define USE_PAM 1
3944 _ACEOF
3945
3946       ;;
3947     no)
3948       :
3949       ;;
3950     *)
3951       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3952 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3953    { (exit 1); exit 1; }; }
3954       ;;
3955   esac
3956
3957 else
3958   with_pam=no
3959
3960 fi;
3961
3962 echo "$as_me:$LINENO: result: $with_pam" >&5
3963 echo "${ECHO_T}$with_pam" >&6
3964
3965
3966
3967 #
3968 # LDAP
3969 #
3970 echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
3971 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
3972
3973 pgac_args="$pgac_args with_ldap"
3974
3975
3976 # Check whether --with-ldap or --without-ldap was given.
3977 if test "${with_ldap+set}" = set; then
3978   withval="$with_ldap"
3979
3980   case $withval in
3981     yes)
3982
3983 cat >>confdefs.h <<\_ACEOF
3984 #define USE_LDAP 1
3985 _ACEOF
3986
3987       ;;
3988     no)
3989       :
3990       ;;
3991     *)
3992       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
3993 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
3994    { (exit 1); exit 1; }; }
3995       ;;
3996   esac
3997
3998 else
3999   with_ldap=no
4000
4001 fi;
4002
4003 echo "$as_me:$LINENO: result: $with_ldap" >&5
4004 echo "${ECHO_T}$with_ldap" >&6
4005
4006
4007
4008 #
4009 # Bonjour
4010 #
4011 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
4012 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
4013
4014 pgac_args="$pgac_args with_bonjour"
4015
4016
4017 # Check whether --with-bonjour or --without-bonjour was given.
4018 if test "${with_bonjour+set}" = set; then
4019   withval="$with_bonjour"
4020
4021   case $withval in
4022     yes)
4023
4024 cat >>confdefs.h <<\_ACEOF
4025 #define USE_BONJOUR 1
4026 _ACEOF
4027
4028       ;;
4029     no)
4030       :
4031       ;;
4032     *)
4033       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4034 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4035    { (exit 1); exit 1; }; }
4036       ;;
4037   esac
4038
4039 else
4040   with_bonjour=no
4041
4042 fi;
4043
4044 echo "$as_me:$LINENO: result: $with_bonjour" >&5
4045 echo "${ECHO_T}$with_bonjour" >&6
4046
4047
4048
4049 #
4050 # OpenSSL
4051 #
4052 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4053 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
4054
4055 pgac_args="$pgac_args with_openssl"
4056
4057
4058 # Check whether --with-openssl or --without-openssl was given.
4059 if test "${with_openssl+set}" = set; then
4060   withval="$with_openssl"
4061
4062   case $withval in
4063     yes)
4064
4065 cat >>confdefs.h <<\_ACEOF
4066 #define USE_SSL 1
4067 _ACEOF
4068
4069       ;;
4070     no)
4071       :
4072       ;;
4073     *)
4074       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4075 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4076    { (exit 1); exit 1; }; }
4077       ;;
4078   esac
4079
4080 else
4081   with_openssl=no
4082
4083 fi;
4084
4085 echo "$as_me:$LINENO: result: $with_openssl" >&5
4086 echo "${ECHO_T}$with_openssl" >&6
4087
4088
4089
4090 #
4091 # Readline
4092 #
4093
4094 pgac_args="$pgac_args with_readline"
4095
4096
4097 # Check whether --with-readline or --without-readline was given.
4098 if test "${with_readline+set}" = set; then
4099   withval="$with_readline"
4100
4101   case $withval in
4102     yes)
4103       :
4104       ;;
4105     no)
4106       :
4107       ;;
4108     *)
4109       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4110 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4111    { (exit 1); exit 1; }; }
4112       ;;
4113   esac
4114
4115 else
4116   with_readline=yes
4117
4118 fi;
4119
4120 # readline on MinGW has problems with backslashes in psql and other bugs.
4121 # This is particularly a problem with non-US code pages.
4122 # Therefore disable its use until we understand the cause. 2004-07-20
4123 if test "$PORTNAME" = "win32"; then
4124   if test "$with_readline" = yes; then
4125     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4126 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4127     with_readline=no
4128   fi
4129 fi
4130
4131
4132 #
4133 # Prefer libedit
4134 #
4135
4136 pgac_args="$pgac_args with_libedit_preferred"
4137
4138
4139 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
4140 if test "${with_libedit_preferred+set}" = set; then
4141   withval="$with_libedit_preferred"
4142
4143   case $withval in
4144     yes)
4145       :
4146       ;;
4147     no)
4148       :
4149       ;;
4150     *)
4151       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4152 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4153    { (exit 1); exit 1; }; }
4154       ;;
4155   esac
4156
4157 else
4158   with_libedit_preferred=no
4159
4160 fi;
4161
4162
4163
4164 #
4165 # XML
4166 #
4167
4168 pgac_args="$pgac_args with_libxml"
4169
4170
4171 # Check whether --with-libxml or --without-libxml was given.
4172 if test "${with_libxml+set}" = set; then
4173   withval="$with_libxml"
4174
4175   case $withval in
4176     yes)
4177
4178 cat >>confdefs.h <<\_ACEOF
4179 #define USE_LIBXML 1
4180 _ACEOF
4181
4182       ;;
4183     no)
4184       :
4185       ;;
4186     *)
4187       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
4188 echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
4189    { (exit 1); exit 1; }; }
4190       ;;
4191   esac
4192
4193 else
4194   with_libxml=no
4195
4196 fi;
4197
4198
4199 if test "$with_libxml" = yes ; then
4200   for ac_prog in xml2-config
4201 do
4202   # Extract the first word of "$ac_prog", so it can be a program name with args.
4203 set dummy $ac_prog; ac_word=$2
4204 echo "$as_me:$LINENO: checking for $ac_word" >&5
4205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4206 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
4207   echo $ECHO_N "(cached) $ECHO_C" >&6
4208 else
4209   if test -n "$XML2_CONFIG"; then
4210   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
4211 else
4212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213 for as_dir in $PATH
4214 do
4215   IFS=$as_save_IFS
4216   test -z "$as_dir" && as_dir=.
4217   for ac_exec_ext in '' $ac_executable_extensions; do
4218   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4219     ac_cv_prog_XML2_CONFIG="$ac_prog"
4220     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4221     break 2
4222   fi
4223 done
4224 done
4225
4226 fi
4227 fi
4228 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
4229 if test -n "$XML2_CONFIG"; then
4230   echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
4231 echo "${ECHO_T}$XML2_CONFIG" >&6
4232 else
4233   echo "$as_me:$LINENO: result: no" >&5
4234 echo "${ECHO_T}no" >&6
4235 fi
4236
4237   test -n "$XML2_CONFIG" && break
4238 done
4239
4240   if test -n "$XML2_CONFIG"; then
4241     for pgac_option in `$XML2_CONFIG --cflags`; do
4242       case $pgac_option in
4243         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
4244       esac
4245     done
4246     for pgac_option in `$XML2_CONFIG --libs`; do
4247       case $pgac_option in
4248         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
4249       esac
4250     done
4251   fi
4252 fi
4253
4254
4255 #
4256 # Zlib
4257 #
4258
4259 pgac_args="$pgac_args with_zlib"
4260
4261
4262 # Check whether --with-zlib or --without-zlib was given.
4263 if test "${with_zlib+set}" = set; then
4264   withval="$with_zlib"
4265
4266   case $withval in
4267     yes)
4268       :
4269       ;;
4270     no)
4271       :
4272       ;;
4273     *)
4274       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
4275 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
4276    { (exit 1); exit 1; }; }
4277       ;;
4278   esac
4279
4280 else
4281   with_zlib=yes
4282
4283 fi;
4284
4285
4286
4287 #
4288 # Elf
4289 #
4290
4291 # Assume system is ELF if it predefines __ELF__ as 1,
4292 # otherwise believe host_os based default.
4293 case $host_os in
4294     freebsd1*|freebsd2*) elf=no;;
4295     freebsd3*|freebsd4*) elf=yes;;
4296 esac
4297
4298
4299 echo "$as_me:$LINENO: checking for egrep" >&5
4300 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4301 if test "${ac_cv_prog_egrep+set}" = set; then
4302   echo $ECHO_N "(cached) $ECHO_C" >&6
4303 else
4304   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4305     then ac_cv_prog_egrep='grep -E'
4306     else ac_cv_prog_egrep='egrep'
4307     fi
4308 fi
4309 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4310 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4311  EGREP=$ac_cv_prog_egrep
4312
4313
4314 cat >conftest.$ac_ext <<_ACEOF
4315 /* confdefs.h.  */
4316 _ACEOF
4317 cat confdefs.h >>conftest.$ac_ext
4318 cat >>conftest.$ac_ext <<_ACEOF
4319 /* end confdefs.h.  */
4320 #if __ELF__
4321   yes
4322 #endif
4323
4324 _ACEOF
4325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4326   $EGREP "yes" >/dev/null 2>&1; then
4327   ELF_SYS=true
4328 else
4329   if test "X$elf" = "Xyes" ; then
4330   ELF_SYS=true
4331 else
4332   ELF_SYS=
4333 fi
4334 fi
4335 rm -f conftest*
4336
4337
4338
4339 #
4340 # Assignments
4341 #
4342
4343 CPPFLAGS="$CPPFLAGS $INCLUDES"
4344 LDFLAGS="$LDFLAGS $LIBDIRS"
4345
4346 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4347 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4348 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4349 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4350
4351
4352
4353 for ac_prog in gawk mawk nawk awk
4354 do
4355   # Extract the first word of "$ac_prog", so it can be a program name with args.
4356 set dummy $ac_prog; ac_word=$2
4357 echo "$as_me:$LINENO: checking for $ac_word" >&5
4358 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4359 if test "${ac_cv_prog_AWK+set}" = set; then
4360   echo $ECHO_N "(cached) $ECHO_C" >&6
4361 else
4362   if test -n "$AWK"; then
4363   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4364 else
4365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4366 for as_dir in $PATH
4367 do
4368   IFS=$as_save_IFS
4369   test -z "$as_dir" && as_dir=.
4370   for ac_exec_ext in '' $ac_executable_extensions; do
4371   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4372     ac_cv_prog_AWK="$ac_prog"
4373     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4374     break 2
4375   fi
4376 done
4377 done
4378
4379 fi
4380 fi
4381 AWK=$ac_cv_prog_AWK
4382 if test -n "$AWK"; then
4383   echo "$as_me:$LINENO: result: $AWK" >&5
4384 echo "${ECHO_T}$AWK" >&6
4385 else
4386   echo "$as_me:$LINENO: result: no" >&5
4387 echo "${ECHO_T}no" >&6
4388 fi
4389
4390   test -n "$AWK" && break
4391 done
4392
4393 echo "$as_me:$LINENO: checking for flex" >&5
4394 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4395 if test "${pgac_cv_path_flex+set}" = set; then
4396   echo $ECHO_N "(cached) $ECHO_C" >&6
4397 else
4398   # Let the user override the test
4399 if test -n "$FLEX"; then
4400   pgac_cv_path_flex=$FLEX
4401 else
4402   pgac_save_IFS=$IFS
4403   IFS=$PATH_SEPARATOR
4404   for pgac_dir in $PATH; do
4405     IFS=$pgac_save_IFS
4406     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4407       pgac_dir=`pwd`
4408     fi
4409     for pgac_prog in flex lex; do
4410       pgac_candidate="$pgac_dir/$pgac_prog"
4411       if test -f "$pgac_candidate" \
4412         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4413       then
4414         echo '%%'  > conftest.l
4415         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4416           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4417             pgac_broken_flex=$pgac_candidate
4418             continue
4419           fi
4420
4421           pgac_cv_path_flex=$pgac_candidate
4422           break 2
4423         fi
4424       fi
4425     done
4426   done
4427   rm -f conftest.l lex.yy.c
4428   : ${pgac_cv_path_flex=no}
4429 fi
4430
4431 fi
4432 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4433 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4434 if test x"$pgac_cv_path_flex" = x"no"; then
4435   if test -n "$pgac_broken_flex"; then
4436     { echo "$as_me:$LINENO: WARNING:
4437 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4438 *** should get version 2.5.4 or later." >&5
4439 echo "$as_me: WARNING:
4440 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4441 *** should get version 2.5.4 or later." >&2;}
4442   fi
4443
4444   { echo "$as_me:$LINENO: WARNING:
4445 *** Without Flex you will not be able to build PostgreSQL from CVS or
4446 *** change any of the scanner definition files.  You can obtain Flex from
4447 *** a GNU mirror site.  (If you are using the official distribution of
4448 *** PostgreSQL then you do not need to worry about this because the Flex
4449 *** output is pre-generated.)" >&5
4450 echo "$as_me: WARNING:
4451 *** Without Flex you will not be able to build PostgreSQL from CVS or
4452 *** change any of the scanner definition files.  You can obtain Flex from
4453 *** a GNU mirror site.  (If you are using the official distribution of
4454 *** PostgreSQL then you do not need to worry about this because the Flex
4455 *** output is pre-generated.)" >&2;}
4456 fi
4457
4458 if test x"$pgac_cv_path_flex" = x"no"; then
4459   FLEX=
4460 else
4461   FLEX=$pgac_cv_path_flex
4462 fi
4463
4464
4465
4466
4467 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4468 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4469 LN_S=$as_ln_s
4470 if test "$LN_S" = "ln -s"; then
4471   echo "$as_me:$LINENO: result: yes" >&5
4472 echo "${ECHO_T}yes" >&6
4473 else
4474   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4475 echo "${ECHO_T}no, using $LN_S" >&6
4476 fi
4477
4478
4479 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4480 if test "${with_gnu_ld+set}" = set; then
4481   withval="$with_gnu_ld"
4482   test "$withval" = no || with_gnu_ld=yes
4483 else
4484   with_gnu_ld=no
4485 fi;
4486 ac_prog=ld
4487 if test "$GCC" = yes; then
4488   # Check if gcc -print-prog-name=ld gives a path.
4489   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4490 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4491   case $host in
4492   *-*-mingw*)
4493     # gcc leaves a trailing carriage return which upsets mingw
4494     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4495   *)
4496     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4497   esac
4498   case "$ac_prog" in
4499     # Accept absolute paths.
4500     [\\/]* | [A-Za-z]:[\\/]*)
4501       re_direlt='/[^/][^/]*/\.\./'
4502       # Canonicalize the path of ld
4503       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4504       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4505         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4506       done
4507       test -z "$LD" && LD="$ac_prog"
4508       ;;
4509   "")
4510     # If it fails, then pretend we aren't using GCC.
4511     ac_prog=ld
4512     ;;
4513   *)
4514     # If it is relative, then search for the first ld in PATH.
4515     with_gnu_ld=unknown
4516     ;;
4517   esac
4518 elif test "$with_gnu_ld" = yes; then
4519   echo "$as_me:$LINENO: checking for GNU ld" >&5
4520 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4521 else
4522   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4523 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4524 fi
4525 if test "${ac_cv_path_LD+set}" = set; then
4526   echo $ECHO_N "(cached) $ECHO_C" >&6
4527 else
4528   if test -z "$LD"; then
4529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4530   for ac_dir in $PATH; do
4531     test -z "$ac_dir" && ac_dir=.
4532     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4533       ac_cv_path_LD="$ac_dir/$ac_prog"
4534       # Check to see if the program is GNU ld.  I'd rather use --version,
4535       # but apparently some GNU ld's only accept -v.
4536       # Break only if it was the GNU/non-GNU ld that we prefer.
4537       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4538         test "$with_gnu_ld" != no && break
4539       else
4540         test "$with_gnu_ld" != yes && break
4541       fi
4542     fi
4543   done
4544   IFS="$ac_save_ifs"
4545 else
4546   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4547 fi
4548 fi
4549
4550 LD="$ac_cv_path_LD"
4551 if test -n "$LD"; then
4552   echo "$as_me:$LINENO: result: $LD" >&5
4553 echo "${ECHO_T}$LD" >&6
4554 else
4555   echo "$as_me:$LINENO: result: no" >&5
4556 echo "${ECHO_T}no" >&6
4557 fi
4558 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4559 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4560    { (exit 1); exit 1; }; }
4561 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4562 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4563 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4564   echo $ECHO_N "(cached) $ECHO_C" >&6
4565 else
4566   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4567 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4568   ac_cv_prog_gnu_ld=yes
4569 else
4570   ac_cv_prog_gnu_ld=no
4571 fi
4572 fi
4573 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4574 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4575 with_gnu_ld=$ac_cv_prog_gnu_ld
4576
4577
4578
4579
4580 case $host_os in sysv5*)
4581   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4582 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4583 if test "${pgac_cv_prog_ld_R+set}" = set; then
4584   echo $ECHO_N "(cached) $ECHO_C" >&6
4585 else
4586
4587     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4588     cat >conftest.$ac_ext <<_ACEOF
4589 /* confdefs.h.  */
4590 _ACEOF
4591 cat confdefs.h >>conftest.$ac_ext
4592 cat >>conftest.$ac_ext <<_ACEOF
4593 /* end confdefs.h.  */
4594
4595 int
4596 main ()
4597 {
4598
4599   ;
4600   return 0;
4601 }
4602 _ACEOF
4603 rm -f conftest.$ac_objext conftest$ac_exeext
4604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4605   (eval $ac_link) 2>conftest.er1
4606   ac_status=$?
4607   grep -v '^ *+' conftest.er1 >conftest.err
4608   rm -f conftest.er1
4609   cat conftest.err >&5
4610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611   (exit $ac_status); } &&
4612          { ac_try='test -z "$ac_c_werror_flag"
4613                          || test ! -s conftest.err'
4614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4615   (eval $ac_try) 2>&5
4616   ac_status=$?
4617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618   (exit $ac_status); }; } &&
4619          { ac_try='test -s conftest$ac_exeext'
4620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4621   (eval $ac_try) 2>&5
4622   ac_status=$?
4623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4624   (exit $ac_status); }; }; then
4625   pgac_cv_prog_ld_R=yes
4626 else
4627   echo "$as_me: failed program was:" >&5
4628 sed 's/^/| /' conftest.$ac_ext >&5
4629
4630 pgac_cv_prog_ld_R=no
4631 fi
4632 rm -f conftest.err conftest.$ac_objext \
4633       conftest$ac_exeext conftest.$ac_ext
4634     LDFLAGS=$pgac_save_LDFLAGS
4635
4636 fi
4637 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4638 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4639   ld_R_works=$pgac_cv_prog_ld_R
4640
4641 esac
4642 if test -n "$ac_tool_prefix"; then
4643   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4644 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4645 echo "$as_me:$LINENO: checking for $ac_word" >&5
4646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4647 if test "${ac_cv_prog_RANLIB+set}" = set; then
4648   echo $ECHO_N "(cached) $ECHO_C" >&6
4649 else
4650   if test -n "$RANLIB"; then
4651   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4652 else
4653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654 for as_dir in $PATH
4655 do
4656   IFS=$as_save_IFS
4657   test -z "$as_dir" && as_dir=.
4658   for ac_exec_ext in '' $ac_executable_extensions; do
4659   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4660     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4661     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4662     break 2
4663   fi
4664 done
4665 done
4666
4667 fi
4668 fi
4669 RANLIB=$ac_cv_prog_RANLIB
4670 if test -n "$RANLIB"; then
4671   echo "$as_me:$LINENO: result: $RANLIB" >&5
4672 echo "${ECHO_T}$RANLIB" >&6
4673 else
4674   echo "$as_me:$LINENO: result: no" >&5
4675 echo "${ECHO_T}no" >&6
4676 fi
4677
4678 fi
4679 if test -z "$ac_cv_prog_RANLIB"; then
4680   ac_ct_RANLIB=$RANLIB
4681   # Extract the first word of "ranlib", so it can be a program name with args.
4682 set dummy ranlib; ac_word=$2
4683 echo "$as_me:$LINENO: checking for $ac_word" >&5
4684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4685 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4686   echo $ECHO_N "(cached) $ECHO_C" >&6
4687 else
4688   if test -n "$ac_ct_RANLIB"; then
4689   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4690 else
4691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692 for as_dir in $PATH
4693 do
4694   IFS=$as_save_IFS
4695   test -z "$as_dir" && as_dir=.
4696   for ac_exec_ext in '' $ac_executable_extensions; do
4697   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4698     ac_cv_prog_ac_ct_RANLIB="ranlib"
4699     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4700     break 2
4701   fi
4702 done
4703 done
4704
4705   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4706 fi
4707 fi
4708 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4709 if test -n "$ac_ct_RANLIB"; then
4710   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4711 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4712 else
4713   echo "$as_me:$LINENO: result: no" >&5
4714 echo "${ECHO_T}no" >&6
4715 fi
4716
4717   RANLIB=$ac_ct_RANLIB
4718 else
4719   RANLIB="$ac_cv_prog_RANLIB"
4720 fi
4721
4722 # Extract the first word of "tar", so it can be a program name with args.
4723 set dummy tar; ac_word=$2
4724 echo "$as_me:$LINENO: checking for $ac_word" >&5
4725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4726 if test "${ac_cv_path_TAR+set}" = set; then
4727   echo $ECHO_N "(cached) $ECHO_C" >&6
4728 else
4729   case $TAR in
4730   [\\/]* | ?:[\\/]*)
4731   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4732   ;;
4733   *)
4734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735 for as_dir in $PATH
4736 do
4737   IFS=$as_save_IFS
4738   test -z "$as_dir" && as_dir=.
4739   for ac_exec_ext in '' $ac_executable_extensions; do
4740   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4741     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4742     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4743     break 2
4744   fi
4745 done
4746 done
4747
4748   ;;
4749 esac
4750 fi
4751 TAR=$ac_cv_path_TAR
4752
4753 if test -n "$TAR"; then
4754   echo "$as_me:$LINENO: result: $TAR" >&5
4755 echo "${ECHO_T}$TAR" >&6
4756 else
4757   echo "$as_me:$LINENO: result: no" >&5
4758 echo "${ECHO_T}no" >&6
4759 fi
4760
4761
4762   if test -n "$ac_tool_prefix"; then
4763   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4764 set dummy ${ac_tool_prefix}strip; ac_word=$2
4765 echo "$as_me:$LINENO: checking for $ac_word" >&5
4766 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4767 if test "${ac_cv_prog_STRIP+set}" = set; then
4768   echo $ECHO_N "(cached) $ECHO_C" >&6
4769 else
4770   if test -n "$STRIP"; then
4771   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4772 else
4773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774 for as_dir in $PATH
4775 do
4776   IFS=$as_save_IFS
4777   test -z "$as_dir" && as_dir=.
4778   for ac_exec_ext in '' $ac_executable_extensions; do
4779   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4780     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4781     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4782     break 2
4783   fi
4784 done
4785 done
4786
4787 fi
4788 fi
4789 STRIP=$ac_cv_prog_STRIP
4790 if test -n "$STRIP"; then
4791   echo "$as_me:$LINENO: result: $STRIP" >&5
4792 echo "${ECHO_T}$STRIP" >&6
4793 else
4794   echo "$as_me:$LINENO: result: no" >&5
4795 echo "${ECHO_T}no" >&6
4796 fi
4797
4798 fi
4799 if test -z "$ac_cv_prog_STRIP"; then
4800   ac_ct_STRIP=$STRIP
4801   # Extract the first word of "strip", so it can be a program name with args.
4802 set dummy strip; ac_word=$2
4803 echo "$as_me:$LINENO: checking for $ac_word" >&5
4804 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4805 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4806   echo $ECHO_N "(cached) $ECHO_C" >&6
4807 else
4808   if test -n "$ac_ct_STRIP"; then
4809   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4810 else
4811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812 for as_dir in $PATH
4813 do
4814   IFS=$as_save_IFS
4815   test -z "$as_dir" && as_dir=.
4816   for ac_exec_ext in '' $ac_executable_extensions; do
4817   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4818     ac_cv_prog_ac_ct_STRIP="strip"
4819     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4820     break 2
4821   fi
4822 done
4823 done
4824
4825   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4826 fi
4827 fi
4828 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4829 if test -n "$ac_ct_STRIP"; then
4830   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4831 echo "${ECHO_T}$ac_ct_STRIP" >&6
4832 else
4833   echo "$as_me:$LINENO: result: no" >&5
4834 echo "${ECHO_T}no" >&6
4835 fi
4836
4837   STRIP=$ac_ct_STRIP
4838 else
4839   STRIP="$ac_cv_prog_STRIP"
4840 fi
4841
4842
4843   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4844 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4845   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4846     STRIP_STATIC_LIB="$STRIP -x"
4847     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4848     echo "$as_me:$LINENO: result: yes" >&5
4849 echo "${ECHO_T}yes" >&6
4850   else
4851     STRIP_STATIC_LIB=:
4852     STRIP_SHARED_LIB=:
4853     echo "$as_me:$LINENO: result: no" >&5
4854 echo "${ECHO_T}no" >&6
4855   fi
4856
4857
4858
4859
4860 if test -z "$YACC"; then
4861   for ac_prog in 'bison -y'
4862 do
4863   # Extract the first word of "$ac_prog", so it can be a program name with args.
4864 set dummy $ac_prog; ac_word=$2
4865 echo "$as_me:$LINENO: checking for $ac_word" >&5
4866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4867 if test "${ac_cv_prog_YACC+set}" = set; then
4868   echo $ECHO_N "(cached) $ECHO_C" >&6
4869 else
4870   if test -n "$YACC"; then
4871   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4872 else
4873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874 for as_dir in $PATH
4875 do
4876   IFS=$as_save_IFS
4877   test -z "$as_dir" && as_dir=.
4878   for ac_exec_ext in '' $ac_executable_extensions; do
4879   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4880     ac_cv_prog_YACC="$ac_prog"
4881     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4882     break 2
4883   fi
4884 done
4885 done
4886
4887 fi
4888 fi
4889 YACC=$ac_cv_prog_YACC
4890 if test -n "$YACC"; then
4891   echo "$as_me:$LINENO: result: $YACC" >&5
4892 echo "${ECHO_T}$YACC" >&6
4893 else
4894   echo "$as_me:$LINENO: result: no" >&5
4895 echo "${ECHO_T}no" >&6
4896 fi
4897
4898   test -n "$YACC" && break
4899 done
4900
4901
4902   if test "$YACC"; then
4903     if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4904       { echo "$as_me:$LINENO: WARNING:
4905 *** The installed version of Bison is too old to use with PostgreSQL.
4906 *** Bison version 1.875 or later is required." >&5
4907 echo "$as_me: WARNING:
4908 *** The installed version of Bison is too old to use with PostgreSQL.
4909 *** Bison version 1.875 or later is required." >&2;}
4910       YACC=""
4911     fi
4912   fi
4913
4914   if test -z "$YACC"; then
4915     { echo "$as_me:$LINENO: WARNING:
4916 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4917 *** change any of the parser definition files.  You can obtain Bison from
4918 *** a GNU mirror site.  (If you are using the official distribution of
4919 *** PostgreSQL then you do not need to worry about this, because the Bison
4920 *** output is pre-generated.)  To use a different yacc program (possible,
4921 *** but not recommended), set the environment variable YACC before running
4922 *** 'configure'." >&5
4923 echo "$as_me: WARNING:
4924 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4925 *** change any of the parser definition files.  You can obtain Bison from
4926 *** a GNU mirror site.  (If you are using the official distribution of
4927 *** PostgreSQL then you do not need to worry about this, because the Bison
4928 *** output is pre-generated.)  To use a different yacc program (possible,
4929 *** but not recommended), set the environment variable YACC before running
4930 *** 'configure'." >&2;}
4931   fi
4932 fi
4933
4934
4935 # Extract the first word of "perl", so it can be a program name with args.
4936 set dummy perl; ac_word=$2
4937 echo "$as_me:$LINENO: checking for $ac_word" >&5
4938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4939 if test "${ac_cv_path_PERL+set}" = set; then
4940   echo $ECHO_N "(cached) $ECHO_C" >&6
4941 else
4942   case $PERL in
4943   [\\/]* | ?:[\\/]*)
4944   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4945   ;;
4946   *)
4947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948 for as_dir in $PATH
4949 do
4950   IFS=$as_save_IFS
4951   test -z "$as_dir" && as_dir=.
4952   for ac_exec_ext in '' $ac_executable_extensions; do
4953   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4955     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4956     break 2
4957   fi
4958 done
4959 done
4960
4961   ;;
4962 esac
4963 fi
4964 PERL=$ac_cv_path_PERL
4965
4966 if test -n "$PERL"; then
4967   echo "$as_me:$LINENO: result: $PERL" >&5
4968 echo "${ECHO_T}$PERL" >&6
4969 else
4970   echo "$as_me:$LINENO: result: no" >&5
4971 echo "${ECHO_T}no" >&6
4972 fi
4973
4974 if test "$with_perl" = yes; then
4975
4976 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4977 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4978 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4979 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4980 echo "${ECHO_T}$perl_archlibexp" >&6
4981 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4982 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4983 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4984 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4985 echo "${ECHO_T}$perl_privlibexp" >&6
4986 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4987 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4988 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4989 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4990 echo "${ECHO_T}$perl_useshrplib" >&6
4991
4992 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4993 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4994 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4995 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4996 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4997 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4998 echo "${ECHO_T}$perl_embed_ldflags" >&6
4999 fi
5000
5001 if test "$with_python" = yes; then
5002   # Extract the first word of "python", so it can be a program name with args.
5003 set dummy python; ac_word=$2
5004 echo "$as_me:$LINENO: checking for $ac_word" >&5
5005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5006 if test "${ac_cv_path_PYTHON+set}" = set; then
5007   echo $ECHO_N "(cached) $ECHO_C" >&6
5008 else
5009   case $PYTHON in
5010   [\\/]* | ?:[\\/]*)
5011   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
5012   ;;
5013   *)
5014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015 for as_dir in $PATH
5016 do
5017   IFS=$as_save_IFS
5018   test -z "$as_dir" && as_dir=.
5019   for ac_exec_ext in '' $ac_executable_extensions; do
5020   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5021     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
5022     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5023     break 2
5024   fi
5025 done
5026 done
5027
5028   ;;
5029 esac
5030 fi
5031 PYTHON=$ac_cv_path_PYTHON
5032
5033 if test -n "$PYTHON"; then
5034   echo "$as_me:$LINENO: result: $PYTHON" >&5
5035 echo "${ECHO_T}$PYTHON" >&6
5036 else
5037   echo "$as_me:$LINENO: result: no" >&5
5038 echo "${ECHO_T}no" >&6
5039 fi
5040
5041 if test x"$PYTHON" = x""; then
5042   { { echo "$as_me:$LINENO: error: Python not found" >&5
5043 echo "$as_me: error: Python not found" >&2;}
5044    { (exit 1); exit 1; }; }
5045 fi
5046
5047
5048 echo "$as_me:$LINENO: checking for Python distutils module" >&5
5049 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
5050 if "${PYTHON}" 2>&- -c 'import distutils'
5051 then
5052     echo "$as_me:$LINENO: result: yes" >&5
5053 echo "${ECHO_T}yes" >&6
5054 else
5055     echo "$as_me:$LINENO: result: no" >&5
5056 echo "${ECHO_T}no" >&6
5057     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
5058 echo "$as_me: error: distutils module not found" >&2;}
5059    { (exit 1); exit 1; }; }
5060 fi
5061 echo "$as_me:$LINENO: checking Python configuration directory" >&5
5062 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
5063 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
5064 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')"`
5065 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
5066
5067 # This should be enough of a message.
5068 echo "$as_me:$LINENO: result: $python_configdir" >&5
5069 echo "${ECHO_T}$python_configdir" >&6
5070
5071
5072 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
5073 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
5074
5075 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
5076 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
5077 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
5078 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
5079
5080 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
5081 then
5082         # New way: use the official shared library
5083         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
5084         python_libspec="-L${python_libdir} -l${ldlibrary}"
5085 else
5086         # Old way: use libpython from python_configdir
5087         python_libdir="${python_configdir}"
5088         python_libspec="-L${python_libdir} -lpython${python_version}"
5089 fi
5090
5091 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
5092
5093 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
5094 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
5095
5096
5097 # threaded python is not supported on bsd's
5098 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
5099 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
5100 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
5101 if test "$pythreads" = "1"; then
5102   echo "$as_me:$LINENO: result: yes" >&5
5103 echo "${ECHO_T}yes" >&6
5104   case $host_os in
5105   openbsd*|freebsd*)
5106     { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
5107 echo "$as_me: error: threaded Python not supported on this platform" >&2;}
5108    { (exit 1); exit 1; }; }
5109     ;;
5110   esac
5111 else
5112   echo "$as_me:$LINENO: result: no" >&5
5113 echo "${ECHO_T}no" >&6
5114 fi
5115
5116
5117 fi
5118
5119 # Supply a numeric version string for use by 3rd party add-ons
5120 # awk -F is a regex on some platforms, and not on others, so make "." a tab
5121 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
5122 tr '.' '        ' |
5123 $AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
5124
5125 cat >>confdefs.h <<_ACEOF
5126 #define PG_VERSION_NUM $PG_VERSION_NUM
5127 _ACEOF
5128
5129
5130 ##
5131 ## Libraries
5132 ##
5133 ## Most libraries are included only if they demonstrably provide a function
5134 ## we need, but libm is an exception: always include it, because there are
5135 ## too many compilers that play cute optimization games that will break
5136 ## probes for standard functions such as pow().
5137 ##
5138
5139
5140 echo "$as_me:$LINENO: checking for main in -lm" >&5
5141 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
5142 if test "${ac_cv_lib_m_main+set}" = set; then
5143   echo $ECHO_N "(cached) $ECHO_C" >&6
5144 else
5145   ac_check_lib_save_LIBS=$LIBS
5146 LIBS="-lm  $LIBS"
5147 cat >conftest.$ac_ext <<_ACEOF
5148 /* confdefs.h.  */
5149 _ACEOF
5150 cat confdefs.h >>conftest.$ac_ext
5151 cat >>conftest.$ac_ext <<_ACEOF
5152 /* end confdefs.h.  */
5153
5154
5155 int
5156 main ()
5157 {
5158 main ();
5159   ;
5160   return 0;
5161 }
5162 _ACEOF
5163 rm -f conftest.$ac_objext conftest$ac_exeext
5164 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5165   (eval $ac_link) 2>conftest.er1
5166   ac_status=$?
5167   grep -v '^ *+' conftest.er1 >conftest.err
5168   rm -f conftest.er1
5169   cat conftest.err >&5
5170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5171   (exit $ac_status); } &&
5172          { ac_try='test -z "$ac_c_werror_flag"
5173                          || test ! -s conftest.err'
5174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5175   (eval $ac_try) 2>&5
5176   ac_status=$?
5177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178   (exit $ac_status); }; } &&
5179          { ac_try='test -s conftest$ac_exeext'
5180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5181   (eval $ac_try) 2>&5
5182   ac_status=$?
5183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5184   (exit $ac_status); }; }; then
5185   ac_cv_lib_m_main=yes
5186 else
5187   echo "$as_me: failed program was:" >&5
5188 sed 's/^/| /' conftest.$ac_ext >&5
5189
5190 ac_cv_lib_m_main=no
5191 fi
5192 rm -f conftest.err conftest.$ac_objext \
5193       conftest$ac_exeext conftest.$ac_ext
5194 LIBS=$ac_check_lib_save_LIBS
5195 fi
5196 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
5197 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
5198 if test $ac_cv_lib_m_main = yes; then
5199   cat >>confdefs.h <<_ACEOF
5200 #define HAVE_LIBM 1
5201 _ACEOF
5202
5203   LIBS="-lm $LIBS"
5204
5205 fi
5206
5207 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
5208 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
5209 if test "${ac_cv_search_setproctitle+set}" = set; then
5210   echo $ECHO_N "(cached) $ECHO_C" >&6
5211 else
5212   ac_func_search_save_LIBS=$LIBS
5213 ac_cv_search_setproctitle=no
5214 cat >conftest.$ac_ext <<_ACEOF
5215 /* confdefs.h.  */
5216 _ACEOF
5217 cat confdefs.h >>conftest.$ac_ext
5218 cat >>conftest.$ac_ext <<_ACEOF
5219 /* end confdefs.h.  */
5220
5221 /* Override any gcc2 internal prototype to avoid an error.  */
5222 #ifdef __cplusplus
5223 extern "C"
5224 #endif
5225 /* We use char because int might match the return type of a gcc2
5226    builtin and then its argument prototype would still apply.  */
5227 char setproctitle ();
5228 int
5229 main ()
5230 {
5231 setproctitle ();
5232   ;
5233   return 0;
5234 }
5235 _ACEOF
5236 rm -f conftest.$ac_objext conftest$ac_exeext
5237 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5238   (eval $ac_link) 2>conftest.er1
5239   ac_status=$?
5240   grep -v '^ *+' conftest.er1 >conftest.err
5241   rm -f conftest.er1
5242   cat conftest.err >&5
5243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244   (exit $ac_status); } &&
5245          { ac_try='test -z "$ac_c_werror_flag"
5246                          || test ! -s conftest.err'
5247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5248   (eval $ac_try) 2>&5
5249   ac_status=$?
5250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5251   (exit $ac_status); }; } &&
5252          { ac_try='test -s conftest$ac_exeext'
5253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5254   (eval $ac_try) 2>&5
5255   ac_status=$?
5256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5257   (exit $ac_status); }; }; then
5258   ac_cv_search_setproctitle="none required"
5259 else
5260   echo "$as_me: failed program was:" >&5
5261 sed 's/^/| /' conftest.$ac_ext >&5
5262
5263 fi
5264 rm -f conftest.err conftest.$ac_objext \
5265       conftest$ac_exeext conftest.$ac_ext
5266 if test "$ac_cv_search_setproctitle" = no; then
5267   for ac_lib in util; do
5268     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5269     cat >conftest.$ac_ext <<_ACEOF
5270 /* confdefs.h.  */
5271 _ACEOF
5272 cat confdefs.h >>conftest.$ac_ext
5273 cat >>conftest.$ac_ext <<_ACEOF
5274 /* end confdefs.h.  */
5275
5276 /* Override any gcc2 internal prototype to avoid an error.  */
5277 #ifdef __cplusplus
5278 extern "C"
5279 #endif
5280 /* We use char because int might match the return type of a gcc2
5281    builtin and then its argument prototype would still apply.  */
5282 char setproctitle ();
5283 int
5284 main ()
5285 {
5286 setproctitle ();
5287   ;
5288   return 0;
5289 }
5290 _ACEOF
5291 rm -f conftest.$ac_objext conftest$ac_exeext
5292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5293   (eval $ac_link) 2>conftest.er1
5294   ac_status=$?
5295   grep -v '^ *+' conftest.er1 >conftest.err
5296   rm -f conftest.er1
5297   cat conftest.err >&5
5298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5299   (exit $ac_status); } &&
5300          { ac_try='test -z "$ac_c_werror_flag"
5301                          || test ! -s conftest.err'
5302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5303   (eval $ac_try) 2>&5
5304   ac_status=$?
5305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306   (exit $ac_status); }; } &&
5307          { ac_try='test -s conftest$ac_exeext'
5308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5309   (eval $ac_try) 2>&5
5310   ac_status=$?
5311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312   (exit $ac_status); }; }; then
5313   ac_cv_search_setproctitle="-l$ac_lib"
5314 break
5315 else
5316   echo "$as_me: failed program was:" >&5
5317 sed 's/^/| /' conftest.$ac_ext >&5
5318
5319 fi
5320 rm -f conftest.err conftest.$ac_objext \
5321       conftest$ac_exeext conftest.$ac_ext
5322   done
5323 fi
5324 LIBS=$ac_func_search_save_LIBS
5325 fi
5326 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
5327 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
5328 if test "$ac_cv_search_setproctitle" != no; then
5329   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
5330
5331 fi
5332
5333 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5334 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5335 if test "${ac_cv_search_dlopen+set}" = set; then
5336   echo $ECHO_N "(cached) $ECHO_C" >&6
5337 else
5338   ac_func_search_save_LIBS=$LIBS
5339 ac_cv_search_dlopen=no
5340 cat >conftest.$ac_ext <<_ACEOF
5341 /* confdefs.h.  */
5342 _ACEOF
5343 cat confdefs.h >>conftest.$ac_ext
5344 cat >>conftest.$ac_ext <<_ACEOF
5345 /* end confdefs.h.  */
5346
5347 /* Override any gcc2 internal prototype to avoid an error.  */
5348 #ifdef __cplusplus
5349 extern "C"
5350 #endif
5351 /* We use char because int might match the return type of a gcc2
5352    builtin and then its argument prototype would still apply.  */
5353 char dlopen ();
5354 int
5355 main ()
5356 {
5357 dlopen ();
5358   ;
5359   return 0;
5360 }
5361 _ACEOF
5362 rm -f conftest.$ac_objext conftest$ac_exeext
5363 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5364   (eval $ac_link) 2>conftest.er1
5365   ac_status=$?
5366   grep -v '^ *+' conftest.er1 >conftest.err
5367   rm -f conftest.er1
5368   cat conftest.err >&5
5369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370   (exit $ac_status); } &&
5371          { ac_try='test -z "$ac_c_werror_flag"
5372                          || test ! -s conftest.err'
5373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5374   (eval $ac_try) 2>&5
5375   ac_status=$?
5376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5377   (exit $ac_status); }; } &&
5378          { ac_try='test -s conftest$ac_exeext'
5379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5380   (eval $ac_try) 2>&5
5381   ac_status=$?
5382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5383   (exit $ac_status); }; }; then
5384   ac_cv_search_dlopen="none required"
5385 else
5386   echo "$as_me: failed program was:" >&5
5387 sed 's/^/| /' conftest.$ac_ext >&5
5388
5389 fi
5390 rm -f conftest.err conftest.$ac_objext \
5391       conftest$ac_exeext conftest.$ac_ext
5392 if test "$ac_cv_search_dlopen" = no; then
5393   for ac_lib in dl; do
5394     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5395     cat >conftest.$ac_ext <<_ACEOF
5396 /* confdefs.h.  */
5397 _ACEOF
5398 cat confdefs.h >>conftest.$ac_ext
5399 cat >>conftest.$ac_ext <<_ACEOF
5400 /* end confdefs.h.  */
5401
5402 /* Override any gcc2 internal prototype to avoid an error.  */
5403 #ifdef __cplusplus
5404 extern "C"
5405 #endif
5406 /* We use char because int might match the return type of a gcc2
5407    builtin and then its argument prototype would still apply.  */
5408 char dlopen ();
5409 int
5410 main ()
5411 {
5412 dlopen ();
5413   ;
5414   return 0;
5415 }
5416 _ACEOF
5417 rm -f conftest.$ac_objext conftest$ac_exeext
5418 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5419   (eval $ac_link) 2>conftest.er1
5420   ac_status=$?
5421   grep -v '^ *+' conftest.er1 >conftest.err
5422   rm -f conftest.er1
5423   cat conftest.err >&5
5424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5425   (exit $ac_status); } &&
5426          { ac_try='test -z "$ac_c_werror_flag"
5427                          || test ! -s conftest.err'
5428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5429   (eval $ac_try) 2>&5
5430   ac_status=$?
5431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5432   (exit $ac_status); }; } &&
5433          { ac_try='test -s conftest$ac_exeext'
5434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5435   (eval $ac_try) 2>&5
5436   ac_status=$?
5437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438   (exit $ac_status); }; }; then
5439   ac_cv_search_dlopen="-l$ac_lib"
5440 break
5441 else
5442   echo "$as_me: failed program was:" >&5
5443 sed 's/^/| /' conftest.$ac_ext >&5
5444
5445 fi
5446 rm -f conftest.err conftest.$ac_objext \
5447       conftest$ac_exeext conftest.$ac_ext
5448   done
5449 fi
5450 LIBS=$ac_func_search_save_LIBS
5451 fi
5452 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5453 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5454 if test "$ac_cv_search_dlopen" != no; then
5455   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5456
5457 fi
5458
5459 echo "$as_me:$LINENO: checking for library containing socket" >&5
5460 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5461 if test "${ac_cv_search_socket+set}" = set; then
5462   echo $ECHO_N "(cached) $ECHO_C" >&6
5463 else
5464   ac_func_search_save_LIBS=$LIBS
5465 ac_cv_search_socket=no
5466 cat >conftest.$ac_ext <<_ACEOF
5467 /* confdefs.h.  */
5468 _ACEOF
5469 cat confdefs.h >>conftest.$ac_ext
5470 cat >>conftest.$ac_ext <<_ACEOF
5471 /* end confdefs.h.  */
5472
5473 /* Override any gcc2 internal prototype to avoid an error.  */
5474 #ifdef __cplusplus
5475 extern "C"
5476 #endif
5477 /* We use char because int might match the return type of a gcc2
5478    builtin and then its argument prototype would still apply.  */
5479 char socket ();
5480 int
5481 main ()
5482 {
5483 socket ();
5484   ;
5485   return 0;
5486 }
5487 _ACEOF
5488 rm -f conftest.$ac_objext conftest$ac_exeext
5489 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5490   (eval $ac_link) 2>conftest.er1
5491   ac_status=$?
5492   grep -v '^ *+' conftest.er1 >conftest.err
5493   rm -f conftest.er1
5494   cat conftest.err >&5
5495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496   (exit $ac_status); } &&
5497          { ac_try='test -z "$ac_c_werror_flag"
5498                          || test ! -s conftest.err'
5499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5500   (eval $ac_try) 2>&5
5501   ac_status=$?
5502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503   (exit $ac_status); }; } &&
5504          { ac_try='test -s conftest$ac_exeext'
5505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5506   (eval $ac_try) 2>&5
5507   ac_status=$?
5508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509   (exit $ac_status); }; }; then
5510   ac_cv_search_socket="none required"
5511 else
5512   echo "$as_me: failed program was:" >&5
5513 sed 's/^/| /' conftest.$ac_ext >&5
5514
5515 fi
5516 rm -f conftest.err conftest.$ac_objext \
5517       conftest$ac_exeext conftest.$ac_ext
5518 if test "$ac_cv_search_socket" = no; then
5519   for ac_lib in socket wsock32; do
5520     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5521     cat >conftest.$ac_ext <<_ACEOF
5522 /* confdefs.h.  */
5523 _ACEOF
5524 cat confdefs.h >>conftest.$ac_ext
5525 cat >>conftest.$ac_ext <<_ACEOF
5526 /* end confdefs.h.  */
5527
5528 /* Override any gcc2 internal prototype to avoid an error.  */
5529 #ifdef __cplusplus
5530 extern "C"
5531 #endif
5532 /* We use char because int might match the return type of a gcc2
5533    builtin and then its argument prototype would still apply.  */
5534 char socket ();
5535 int
5536 main ()
5537 {
5538 socket ();
5539   ;
5540   return 0;
5541 }
5542 _ACEOF
5543 rm -f conftest.$ac_objext conftest$ac_exeext
5544 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5545   (eval $ac_link) 2>conftest.er1
5546   ac_status=$?
5547   grep -v '^ *+' conftest.er1 >conftest.err
5548   rm -f conftest.er1
5549   cat conftest.err >&5
5550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5551   (exit $ac_status); } &&
5552          { ac_try='test -z "$ac_c_werror_flag"
5553                          || test ! -s conftest.err'
5554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5555   (eval $ac_try) 2>&5
5556   ac_status=$?
5557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5558   (exit $ac_status); }; } &&
5559          { ac_try='test -s conftest$ac_exeext'
5560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5561   (eval $ac_try) 2>&5
5562   ac_status=$?
5563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564   (exit $ac_status); }; }; then
5565   ac_cv_search_socket="-l$ac_lib"
5566 break
5567 else
5568   echo "$as_me: failed program was:" >&5
5569 sed 's/^/| /' conftest.$ac_ext >&5
5570
5571 fi
5572 rm -f conftest.err conftest.$ac_objext \
5573       conftest$ac_exeext conftest.$ac_ext
5574   done
5575 fi
5576 LIBS=$ac_func_search_save_LIBS
5577 fi
5578 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5579 echo "${ECHO_T}$ac_cv_search_socket" >&6
5580 if test "$ac_cv_search_socket" != no; then
5581   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5582
5583 fi
5584
5585 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5586 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5587 if test "${ac_cv_search_shl_load+set}" = set; then
5588   echo $ECHO_N "(cached) $ECHO_C" >&6
5589 else
5590   ac_func_search_save_LIBS=$LIBS
5591 ac_cv_search_shl_load=no
5592 cat >conftest.$ac_ext <<_ACEOF
5593 /* confdefs.h.  */
5594 _ACEOF
5595 cat confdefs.h >>conftest.$ac_ext
5596 cat >>conftest.$ac_ext <<_ACEOF
5597 /* end confdefs.h.  */
5598
5599 /* Override any gcc2 internal prototype to avoid an error.  */
5600 #ifdef __cplusplus
5601 extern "C"
5602 #endif
5603 /* We use char because int might match the return type of a gcc2
5604    builtin and then its argument prototype would still apply.  */
5605 char shl_load ();
5606 int
5607 main ()
5608 {
5609 shl_load ();
5610   ;
5611   return 0;
5612 }
5613 _ACEOF
5614 rm -f conftest.$ac_objext conftest$ac_exeext
5615 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5616   (eval $ac_link) 2>conftest.er1
5617   ac_status=$?
5618   grep -v '^ *+' conftest.er1 >conftest.err
5619   rm -f conftest.er1
5620   cat conftest.err >&5
5621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622   (exit $ac_status); } &&
5623          { ac_try='test -z "$ac_c_werror_flag"
5624                          || test ! -s conftest.err'
5625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5626   (eval $ac_try) 2>&5
5627   ac_status=$?
5628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629   (exit $ac_status); }; } &&
5630          { ac_try='test -s conftest$ac_exeext'
5631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5632   (eval $ac_try) 2>&5
5633   ac_status=$?
5634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5635   (exit $ac_status); }; }; then
5636   ac_cv_search_shl_load="none required"
5637 else
5638   echo "$as_me: failed program was:" >&5
5639 sed 's/^/| /' conftest.$ac_ext >&5
5640
5641 fi
5642 rm -f conftest.err conftest.$ac_objext \
5643       conftest$ac_exeext conftest.$ac_ext
5644 if test "$ac_cv_search_shl_load" = no; then
5645   for ac_lib in dld; do
5646     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5647     cat >conftest.$ac_ext <<_ACEOF
5648 /* confdefs.h.  */
5649 _ACEOF
5650 cat confdefs.h >>conftest.$ac_ext
5651 cat >>conftest.$ac_ext <<_ACEOF
5652 /* end confdefs.h.  */
5653
5654 /* Override any gcc2 internal prototype to avoid an error.  */
5655 #ifdef __cplusplus
5656 extern "C"
5657 #endif
5658 /* We use char because int might match the return type of a gcc2
5659    builtin and then its argument prototype would still apply.  */
5660 char shl_load ();
5661 int
5662 main ()
5663 {
5664 shl_load ();
5665   ;
5666   return 0;
5667 }
5668 _ACEOF
5669 rm -f conftest.$ac_objext conftest$ac_exeext
5670 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5671   (eval $ac_link) 2>conftest.er1
5672   ac_status=$?
5673   grep -v '^ *+' conftest.er1 >conftest.err
5674   rm -f conftest.er1
5675   cat conftest.err >&5
5676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -z "$ac_c_werror_flag"
5679                          || test ! -s conftest.err'
5680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681   (eval $ac_try) 2>&5
5682   ac_status=$?
5683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684   (exit $ac_status); }; } &&
5685          { ac_try='test -s conftest$ac_exeext'
5686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5687   (eval $ac_try) 2>&5
5688   ac_status=$?
5689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690   (exit $ac_status); }; }; then
5691   ac_cv_search_shl_load="-l$ac_lib"
5692 break
5693 else
5694   echo "$as_me: failed program was:" >&5
5695 sed 's/^/| /' conftest.$ac_ext >&5
5696
5697 fi
5698 rm -f conftest.err conftest.$ac_objext \
5699       conftest$ac_exeext conftest.$ac_ext
5700   done
5701 fi
5702 LIBS=$ac_func_search_save_LIBS
5703 fi
5704 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5705 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5706 if test "$ac_cv_search_shl_load" != no; then
5707   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5708
5709 fi
5710
5711 # We only use libld in port/dynloader/aix.c
5712 case $host_os in
5713      aix*)
5714         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5715 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5716 if test "${ac_cv_search_ldopen+set}" = set; then
5717   echo $ECHO_N "(cached) $ECHO_C" >&6
5718 else
5719   ac_func_search_save_LIBS=$LIBS
5720 ac_cv_search_ldopen=no
5721 cat >conftest.$ac_ext <<_ACEOF
5722 /* confdefs.h.  */
5723 _ACEOF
5724 cat confdefs.h >>conftest.$ac_ext
5725 cat >>conftest.$ac_ext <<_ACEOF
5726 /* end confdefs.h.  */
5727
5728 /* Override any gcc2 internal prototype to avoid an error.  */
5729 #ifdef __cplusplus
5730 extern "C"
5731 #endif
5732 /* We use char because int might match the return type of a gcc2
5733    builtin and then its argument prototype would still apply.  */
5734 char ldopen ();
5735 int
5736 main ()
5737 {
5738 ldopen ();
5739   ;
5740   return 0;
5741 }
5742 _ACEOF
5743 rm -f conftest.$ac_objext conftest$ac_exeext
5744 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5745   (eval $ac_link) 2>conftest.er1
5746   ac_status=$?
5747   grep -v '^ *+' conftest.er1 >conftest.err
5748   rm -f conftest.er1
5749   cat conftest.err >&5
5750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751   (exit $ac_status); } &&
5752          { ac_try='test -z "$ac_c_werror_flag"
5753                          || test ! -s conftest.err'
5754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5755   (eval $ac_try) 2>&5
5756   ac_status=$?
5757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758   (exit $ac_status); }; } &&
5759          { ac_try='test -s conftest$ac_exeext'
5760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5761   (eval $ac_try) 2>&5
5762   ac_status=$?
5763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764   (exit $ac_status); }; }; then
5765   ac_cv_search_ldopen="none required"
5766 else
5767   echo "$as_me: failed program was:" >&5
5768 sed 's/^/| /' conftest.$ac_ext >&5
5769
5770 fi
5771 rm -f conftest.err conftest.$ac_objext \
5772       conftest$ac_exeext conftest.$ac_ext
5773 if test "$ac_cv_search_ldopen" = no; then
5774   for ac_lib in ld; do
5775     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5776     cat >conftest.$ac_ext <<_ACEOF
5777 /* confdefs.h.  */
5778 _ACEOF
5779 cat confdefs.h >>conftest.$ac_ext
5780 cat >>conftest.$ac_ext <<_ACEOF
5781 /* end confdefs.h.  */
5782
5783 /* Override any gcc2 internal prototype to avoid an error.  */
5784 #ifdef __cplusplus
5785 extern "C"
5786 #endif
5787 /* We use char because int might match the return type of a gcc2
5788    builtin and then its argument prototype would still apply.  */
5789 char ldopen ();
5790 int
5791 main ()
5792 {
5793 ldopen ();
5794   ;
5795   return 0;
5796 }
5797 _ACEOF
5798 rm -f conftest.$ac_objext conftest$ac_exeext
5799 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5800   (eval $ac_link) 2>conftest.er1
5801   ac_status=$?
5802   grep -v '^ *+' conftest.er1 >conftest.err
5803   rm -f conftest.er1
5804   cat conftest.err >&5
5805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5806   (exit $ac_status); } &&
5807          { ac_try='test -z "$ac_c_werror_flag"
5808                          || test ! -s conftest.err'
5809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5810   (eval $ac_try) 2>&5
5811   ac_status=$?
5812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5813   (exit $ac_status); }; } &&
5814          { ac_try='test -s conftest$ac_exeext'
5815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5816   (eval $ac_try) 2>&5
5817   ac_status=$?
5818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819   (exit $ac_status); }; }; then
5820   ac_cv_search_ldopen="-l$ac_lib"
5821 break
5822 else
5823   echo "$as_me: failed program was:" >&5
5824 sed 's/^/| /' conftest.$ac_ext >&5
5825
5826 fi
5827 rm -f conftest.err conftest.$ac_objext \
5828       conftest$ac_exeext conftest.$ac_ext
5829   done
5830 fi
5831 LIBS=$ac_func_search_save_LIBS
5832 fi
5833 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5834 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5835 if test "$ac_cv_search_ldopen" != no; then
5836   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5837
5838 fi
5839
5840         ;;
5841 esac
5842 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5843 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5844 if test "${ac_cv_search_getopt_long+set}" = set; then
5845   echo $ECHO_N "(cached) $ECHO_C" >&6
5846 else
5847   ac_func_search_save_LIBS=$LIBS
5848 ac_cv_search_getopt_long=no
5849 cat >conftest.$ac_ext <<_ACEOF
5850 /* confdefs.h.  */
5851 _ACEOF
5852 cat confdefs.h >>conftest.$ac_ext
5853 cat >>conftest.$ac_ext <<_ACEOF
5854 /* end confdefs.h.  */
5855
5856 /* Override any gcc2 internal prototype to avoid an error.  */
5857 #ifdef __cplusplus
5858 extern "C"
5859 #endif
5860 /* We use char because int might match the return type of a gcc2
5861    builtin and then its argument prototype would still apply.  */
5862 char getopt_long ();
5863 int
5864 main ()
5865 {
5866 getopt_long ();
5867   ;
5868   return 0;
5869 }
5870 _ACEOF
5871 rm -f conftest.$ac_objext conftest$ac_exeext
5872 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5873   (eval $ac_link) 2>conftest.er1
5874   ac_status=$?
5875   grep -v '^ *+' conftest.er1 >conftest.err
5876   rm -f conftest.er1
5877   cat conftest.err >&5
5878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5879   (exit $ac_status); } &&
5880          { ac_try='test -z "$ac_c_werror_flag"
5881                          || test ! -s conftest.err'
5882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5883   (eval $ac_try) 2>&5
5884   ac_status=$?
5885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886   (exit $ac_status); }; } &&
5887          { ac_try='test -s conftest$ac_exeext'
5888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5889   (eval $ac_try) 2>&5
5890   ac_status=$?
5891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5892   (exit $ac_status); }; }; then
5893   ac_cv_search_getopt_long="none required"
5894 else
5895   echo "$as_me: failed program was:" >&5
5896 sed 's/^/| /' conftest.$ac_ext >&5
5897
5898 fi
5899 rm -f conftest.err conftest.$ac_objext \
5900       conftest$ac_exeext conftest.$ac_ext
5901 if test "$ac_cv_search_getopt_long" = no; then
5902   for ac_lib in getopt gnugetopt; do
5903     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5904     cat >conftest.$ac_ext <<_ACEOF
5905 /* confdefs.h.  */
5906 _ACEOF
5907 cat confdefs.h >>conftest.$ac_ext
5908 cat >>conftest.$ac_ext <<_ACEOF
5909 /* end confdefs.h.  */
5910
5911 /* Override any gcc2 internal prototype to avoid an error.  */
5912 #ifdef __cplusplus
5913 extern "C"
5914 #endif
5915 /* We use char because int might match the return type of a gcc2
5916    builtin and then its argument prototype would still apply.  */
5917 char getopt_long ();
5918 int
5919 main ()
5920 {
5921 getopt_long ();
5922   ;
5923   return 0;
5924 }
5925 _ACEOF
5926 rm -f conftest.$ac_objext conftest$ac_exeext
5927 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5928   (eval $ac_link) 2>conftest.er1
5929   ac_status=$?
5930   grep -v '^ *+' conftest.er1 >conftest.err
5931   rm -f conftest.er1
5932   cat conftest.err >&5
5933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934   (exit $ac_status); } &&
5935          { ac_try='test -z "$ac_c_werror_flag"
5936                          || test ! -s conftest.err'
5937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5938   (eval $ac_try) 2>&5
5939   ac_status=$?
5940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941   (exit $ac_status); }; } &&
5942          { ac_try='test -s conftest$ac_exeext'
5943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5944   (eval $ac_try) 2>&5
5945   ac_status=$?
5946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5947   (exit $ac_status); }; }; then
5948   ac_cv_search_getopt_long="-l$ac_lib"
5949 break
5950 else
5951   echo "$as_me: failed program was:" >&5
5952 sed 's/^/| /' conftest.$ac_ext >&5
5953
5954 fi
5955 rm -f conftest.err conftest.$ac_objext \
5956       conftest$ac_exeext conftest.$ac_ext
5957   done
5958 fi
5959 LIBS=$ac_func_search_save_LIBS
5960 fi
5961 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5962 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5963 if test "$ac_cv_search_getopt_long" != no; then
5964   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5965
5966 fi
5967
5968 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5969 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5970 if test "${ac_cv_search_crypt+set}" = set; then
5971   echo $ECHO_N "(cached) $ECHO_C" >&6
5972 else
5973   ac_func_search_save_LIBS=$LIBS
5974 ac_cv_search_crypt=no
5975 cat >conftest.$ac_ext <<_ACEOF
5976 /* confdefs.h.  */
5977 _ACEOF
5978 cat confdefs.h >>conftest.$ac_ext
5979 cat >>conftest.$ac_ext <<_ACEOF
5980 /* end confdefs.h.  */
5981
5982 /* Override any gcc2 internal prototype to avoid an error.  */
5983 #ifdef __cplusplus
5984 extern "C"
5985 #endif
5986 /* We use char because int might match the return type of a gcc2
5987    builtin and then its argument prototype would still apply.  */
5988 char crypt ();
5989 int
5990 main ()
5991 {
5992 crypt ();
5993   ;
5994   return 0;
5995 }
5996 _ACEOF
5997 rm -f conftest.$ac_objext conftest$ac_exeext
5998 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5999   (eval $ac_link) 2>conftest.er1
6000   ac_status=$?
6001   grep -v '^ *+' conftest.er1 >conftest.err
6002   rm -f conftest.er1
6003   cat conftest.err >&5
6004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6005   (exit $ac_status); } &&
6006          { ac_try='test -z "$ac_c_werror_flag"
6007                          || test ! -s conftest.err'
6008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6009   (eval $ac_try) 2>&5
6010   ac_status=$?
6011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012   (exit $ac_status); }; } &&
6013          { ac_try='test -s conftest$ac_exeext'
6014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6015   (eval $ac_try) 2>&5
6016   ac_status=$?
6017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6018   (exit $ac_status); }; }; then
6019   ac_cv_search_crypt="none required"
6020 else
6021   echo "$as_me: failed program was:" >&5
6022 sed 's/^/| /' conftest.$ac_ext >&5
6023
6024 fi
6025 rm -f conftest.err conftest.$ac_objext \
6026       conftest$ac_exeext conftest.$ac_ext
6027 if test "$ac_cv_search_crypt" = no; then
6028   for ac_lib in crypt; do
6029     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6030     cat >conftest.$ac_ext <<_ACEOF
6031 /* confdefs.h.  */
6032 _ACEOF
6033 cat confdefs.h >>conftest.$ac_ext
6034 cat >>conftest.$ac_ext <<_ACEOF
6035 /* end confdefs.h.  */
6036
6037 /* Override any gcc2 internal prototype to avoid an error.  */
6038 #ifdef __cplusplus
6039 extern "C"
6040 #endif
6041 /* We use char because int might match the return type of a gcc2
6042    builtin and then its argument prototype would still apply.  */
6043 char crypt ();
6044 int
6045 main ()
6046 {
6047 crypt ();
6048   ;
6049   return 0;
6050 }
6051 _ACEOF
6052 rm -f conftest.$ac_objext conftest$ac_exeext
6053 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6054   (eval $ac_link) 2>conftest.er1
6055   ac_status=$?
6056   grep -v '^ *+' conftest.er1 >conftest.err
6057   rm -f conftest.er1
6058   cat conftest.err >&5
6059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060   (exit $ac_status); } &&
6061          { ac_try='test -z "$ac_c_werror_flag"
6062                          || test ! -s conftest.err'
6063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6064   (eval $ac_try) 2>&5
6065   ac_status=$?
6066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067   (exit $ac_status); }; } &&
6068          { ac_try='test -s conftest$ac_exeext'
6069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6070   (eval $ac_try) 2>&5
6071   ac_status=$?
6072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6073   (exit $ac_status); }; }; then
6074   ac_cv_search_crypt="-l$ac_lib"
6075 break
6076 else
6077   echo "$as_me: failed program was:" >&5
6078 sed 's/^/| /' conftest.$ac_ext >&5
6079
6080 fi
6081 rm -f conftest.err conftest.$ac_objext \
6082       conftest$ac_exeext conftest.$ac_ext
6083   done
6084 fi
6085 LIBS=$ac_func_search_save_LIBS
6086 fi
6087 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6088 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6089 if test "$ac_cv_search_crypt" != no; then
6090   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6091
6092 fi
6093
6094 # Solaris:
6095 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6096 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6097 if test "${ac_cv_search_fdatasync+set}" = set; then
6098   echo $ECHO_N "(cached) $ECHO_C" >&6
6099 else
6100   ac_func_search_save_LIBS=$LIBS
6101 ac_cv_search_fdatasync=no
6102 cat >conftest.$ac_ext <<_ACEOF
6103 /* confdefs.h.  */
6104 _ACEOF
6105 cat confdefs.h >>conftest.$ac_ext
6106 cat >>conftest.$ac_ext <<_ACEOF
6107 /* end confdefs.h.  */
6108
6109 /* Override any gcc2 internal prototype to avoid an error.  */
6110 #ifdef __cplusplus
6111 extern "C"
6112 #endif
6113 /* We use char because int might match the return type of a gcc2
6114    builtin and then its argument prototype would still apply.  */
6115 char fdatasync ();
6116 int
6117 main ()
6118 {
6119 fdatasync ();
6120   ;
6121   return 0;
6122 }
6123 _ACEOF
6124 rm -f conftest.$ac_objext conftest$ac_exeext
6125 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6126   (eval $ac_link) 2>conftest.er1
6127   ac_status=$?
6128   grep -v '^ *+' conftest.er1 >conftest.err
6129   rm -f conftest.er1
6130   cat conftest.err >&5
6131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132   (exit $ac_status); } &&
6133          { ac_try='test -z "$ac_c_werror_flag"
6134                          || test ! -s conftest.err'
6135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6136   (eval $ac_try) 2>&5
6137   ac_status=$?
6138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6139   (exit $ac_status); }; } &&
6140          { ac_try='test -s conftest$ac_exeext'
6141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6142   (eval $ac_try) 2>&5
6143   ac_status=$?
6144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6145   (exit $ac_status); }; }; then
6146   ac_cv_search_fdatasync="none required"
6147 else
6148   echo "$as_me: failed program was:" >&5
6149 sed 's/^/| /' conftest.$ac_ext >&5
6150
6151 fi
6152 rm -f conftest.err conftest.$ac_objext \
6153       conftest$ac_exeext conftest.$ac_ext
6154 if test "$ac_cv_search_fdatasync" = no; then
6155   for ac_lib in rt posix4; do
6156     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6157     cat >conftest.$ac_ext <<_ACEOF
6158 /* confdefs.h.  */
6159 _ACEOF
6160 cat confdefs.h >>conftest.$ac_ext
6161 cat >>conftest.$ac_ext <<_ACEOF
6162 /* end confdefs.h.  */
6163
6164 /* Override any gcc2 internal prototype to avoid an error.  */
6165 #ifdef __cplusplus
6166 extern "C"
6167 #endif
6168 /* We use char because int might match the return type of a gcc2
6169    builtin and then its argument prototype would still apply.  */
6170 char fdatasync ();
6171 int
6172 main ()
6173 {
6174 fdatasync ();
6175   ;
6176   return 0;
6177 }
6178 _ACEOF
6179 rm -f conftest.$ac_objext conftest$ac_exeext
6180 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6181   (eval $ac_link) 2>conftest.er1
6182   ac_status=$?
6183   grep -v '^ *+' conftest.er1 >conftest.err
6184   rm -f conftest.er1
6185   cat conftest.err >&5
6186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187   (exit $ac_status); } &&
6188          { ac_try='test -z "$ac_c_werror_flag"
6189                          || test ! -s conftest.err'
6190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191   (eval $ac_try) 2>&5
6192   ac_status=$?
6193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194   (exit $ac_status); }; } &&
6195          { ac_try='test -s conftest$ac_exeext'
6196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6197   (eval $ac_try) 2>&5
6198   ac_status=$?
6199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6200   (exit $ac_status); }; }; then
6201   ac_cv_search_fdatasync="-l$ac_lib"
6202 break
6203 else
6204   echo "$as_me: failed program was:" >&5
6205 sed 's/^/| /' conftest.$ac_ext >&5
6206
6207 fi
6208 rm -f conftest.err conftest.$ac_objext \
6209       conftest$ac_exeext conftest.$ac_ext
6210   done
6211 fi
6212 LIBS=$ac_func_search_save_LIBS
6213 fi
6214 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6215 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6216 if test "$ac_cv_search_fdatasync" != no; then
6217   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6218
6219 fi
6220
6221 # Cygwin:
6222 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6223 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6224 if test "${ac_cv_search_shmget+set}" = set; then
6225   echo $ECHO_N "(cached) $ECHO_C" >&6
6226 else
6227   ac_func_search_save_LIBS=$LIBS
6228 ac_cv_search_shmget=no
6229 cat >conftest.$ac_ext <<_ACEOF
6230 /* confdefs.h.  */
6231 _ACEOF
6232 cat confdefs.h >>conftest.$ac_ext
6233 cat >>conftest.$ac_ext <<_ACEOF
6234 /* end confdefs.h.  */
6235
6236 /* Override any gcc2 internal prototype to avoid an error.  */
6237 #ifdef __cplusplus
6238 extern "C"
6239 #endif
6240 /* We use char because int might match the return type of a gcc2
6241    builtin and then its argument prototype would still apply.  */
6242 char shmget ();
6243 int
6244 main ()
6245 {
6246 shmget ();
6247   ;
6248   return 0;
6249 }
6250 _ACEOF
6251 rm -f conftest.$ac_objext conftest$ac_exeext
6252 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6253   (eval $ac_link) 2>conftest.er1
6254   ac_status=$?
6255   grep -v '^ *+' conftest.er1 >conftest.err
6256   rm -f conftest.er1
6257   cat conftest.err >&5
6258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6259   (exit $ac_status); } &&
6260          { ac_try='test -z "$ac_c_werror_flag"
6261                          || test ! -s conftest.err'
6262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6263   (eval $ac_try) 2>&5
6264   ac_status=$?
6265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6266   (exit $ac_status); }; } &&
6267          { ac_try='test -s conftest$ac_exeext'
6268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6269   (eval $ac_try) 2>&5
6270   ac_status=$?
6271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6272   (exit $ac_status); }; }; then
6273   ac_cv_search_shmget="none required"
6274 else
6275   echo "$as_me: failed program was:" >&5
6276 sed 's/^/| /' conftest.$ac_ext >&5
6277
6278 fi
6279 rm -f conftest.err conftest.$ac_objext \
6280       conftest$ac_exeext conftest.$ac_ext
6281 if test "$ac_cv_search_shmget" = no; then
6282   for ac_lib in cygipc; do
6283     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6284     cat >conftest.$ac_ext <<_ACEOF
6285 /* confdefs.h.  */
6286 _ACEOF
6287 cat confdefs.h >>conftest.$ac_ext
6288 cat >>conftest.$ac_ext <<_ACEOF
6289 /* end confdefs.h.  */
6290
6291 /* Override any gcc2 internal prototype to avoid an error.  */
6292 #ifdef __cplusplus
6293 extern "C"
6294 #endif
6295 /* We use char because int might match the return type of a gcc2
6296    builtin and then its argument prototype would still apply.  */
6297 char shmget ();
6298 int
6299 main ()
6300 {
6301 shmget ();
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306 rm -f conftest.$ac_objext conftest$ac_exeext
6307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6308   (eval $ac_link) 2>conftest.er1
6309   ac_status=$?
6310   grep -v '^ *+' conftest.er1 >conftest.err
6311   rm -f conftest.er1
6312   cat conftest.err >&5
6313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6314   (exit $ac_status); } &&
6315          { ac_try='test -z "$ac_c_werror_flag"
6316                          || test ! -s conftest.err'
6317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6318   (eval $ac_try) 2>&5
6319   ac_status=$?
6320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6321   (exit $ac_status); }; } &&
6322          { ac_try='test -s conftest$ac_exeext'
6323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6324   (eval $ac_try) 2>&5
6325   ac_status=$?
6326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6327   (exit $ac_status); }; }; then
6328   ac_cv_search_shmget="-l$ac_lib"
6329 break
6330 else
6331   echo "$as_me: failed program was:" >&5
6332 sed 's/^/| /' conftest.$ac_ext >&5
6333
6334 fi
6335 rm -f conftest.err conftest.$ac_objext \
6336       conftest$ac_exeext conftest.$ac_ext
6337   done
6338 fi
6339 LIBS=$ac_func_search_save_LIBS
6340 fi
6341 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6342 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6343 if test "$ac_cv_search_shmget" != no; then
6344   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6345
6346 fi
6347
6348
6349 if test "$with_readline" = yes; then
6350
6351
6352 if test "${pgac_cv_check_readline+set}" = set; then
6353   echo $ECHO_N "(cached) $ECHO_C" >&6
6354 else
6355   pgac_cv_check_readline=no
6356 pgac_save_LIBS=$LIBS
6357 if test x"$with_libedit_preferred" != x"yes"
6358 then    READLINE_ORDER="-lreadline -ledit"
6359 else    READLINE_ORDER="-ledit -lreadline"
6360 fi
6361 for pgac_rllib in $READLINE_ORDER ; do
6362   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6363 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6364   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6365     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6366     cat >conftest.$ac_ext <<_ACEOF
6367 /* confdefs.h.  */
6368 _ACEOF
6369 cat confdefs.h >>conftest.$ac_ext
6370 cat >>conftest.$ac_ext <<_ACEOF
6371 /* end confdefs.h.  */
6372
6373 /* Override any gcc2 internal prototype to avoid an error.  */
6374 #ifdef __cplusplus
6375 extern "C"
6376 #endif
6377 /* We use char because int might match the return type of a gcc2
6378    builtin and then its argument prototype would still apply.  */
6379 char readline ();
6380 int
6381 main ()
6382 {
6383 readline ();
6384   ;
6385   return 0;
6386 }
6387 _ACEOF
6388 rm -f conftest.$ac_objext conftest$ac_exeext
6389 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6390   (eval $ac_link) 2>conftest.er1
6391   ac_status=$?
6392   grep -v '^ *+' conftest.er1 >conftest.err
6393   rm -f conftest.er1
6394   cat conftest.err >&5
6395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6396   (exit $ac_status); } &&
6397          { ac_try='test -z "$ac_c_werror_flag"
6398                          || test ! -s conftest.err'
6399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6400   (eval $ac_try) 2>&5
6401   ac_status=$?
6402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6403   (exit $ac_status); }; } &&
6404          { ac_try='test -s conftest$ac_exeext'
6405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6406   (eval $ac_try) 2>&5
6407   ac_status=$?
6408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6409   (exit $ac_status); }; }; then
6410
6411       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6412       # recognize dependent libraries; assume curses is needed if we didn't
6413       # find any dependency.
6414       case $host_os in
6415         netbsd* | openbsd* | irix*)
6416           if test x"$pgac_lib" = x"" ; then
6417             pgac_lib=" -lcurses"
6418           fi ;;
6419       esac
6420
6421       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6422       break
6423
6424 else
6425   echo "$as_me: failed program was:" >&5
6426 sed 's/^/| /' conftest.$ac_ext >&5
6427
6428 fi
6429 rm -f conftest.err conftest.$ac_objext \
6430       conftest$ac_exeext conftest.$ac_ext
6431   done
6432   if test "$pgac_cv_check_readline" != no ; then
6433     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6434 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6435     break
6436   else
6437     echo "$as_me:$LINENO: result: no" >&5
6438 echo "${ECHO_T}no" >&6
6439   fi
6440 done
6441 LIBS=$pgac_save_LIBS
6442
6443 fi
6444
6445 if test "$pgac_cv_check_readline" != no ; then
6446   LIBS="$pgac_cv_check_readline $LIBS"
6447
6448 cat >>confdefs.h <<\_ACEOF
6449 #define HAVE_LIBREADLINE 1
6450 _ACEOF
6451
6452 fi
6453
6454
6455   if test x"$pgac_cv_check_readline" = x"no"; then
6456     { { echo "$as_me:$LINENO: error: readline library not found
6457 If you have readline already installed, see config.log for details on the
6458 failure.  It is possible the compiler isn't looking in the proper directory.
6459 Use --without-readline to disable readline support." >&5
6460 echo "$as_me: error: readline library not found
6461 If you have readline already installed, see config.log for details on the
6462 failure.  It is possible the compiler isn't looking in the proper directory.
6463 Use --without-readline to disable readline support." >&2;}
6464    { (exit 1); exit 1; }; }
6465   fi
6466 fi
6467
6468 if test "$with_zlib" = yes; then
6469
6470 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6471 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6472 if test "${ac_cv_lib_z_inflate+set}" = set; then
6473   echo $ECHO_N "(cached) $ECHO_C" >&6
6474 else
6475   ac_check_lib_save_LIBS=$LIBS
6476 LIBS="-lz  $LIBS"
6477 cat >conftest.$ac_ext <<_ACEOF
6478 /* confdefs.h.  */
6479 _ACEOF
6480 cat confdefs.h >>conftest.$ac_ext
6481 cat >>conftest.$ac_ext <<_ACEOF
6482 /* end confdefs.h.  */
6483
6484 /* Override any gcc2 internal prototype to avoid an error.  */
6485 #ifdef __cplusplus
6486 extern "C"
6487 #endif
6488 /* We use char because int might match the return type of a gcc2
6489    builtin and then its argument prototype would still apply.  */
6490 char inflate ();
6491 int
6492 main ()
6493 {
6494 inflate ();
6495   ;
6496   return 0;
6497 }
6498 _ACEOF
6499 rm -f conftest.$ac_objext conftest$ac_exeext
6500 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6501   (eval $ac_link) 2>conftest.er1
6502   ac_status=$?
6503   grep -v '^ *+' conftest.er1 >conftest.err
6504   rm -f conftest.er1
6505   cat conftest.err >&5
6506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507   (exit $ac_status); } &&
6508          { ac_try='test -z "$ac_c_werror_flag"
6509                          || test ! -s conftest.err'
6510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6511   (eval $ac_try) 2>&5
6512   ac_status=$?
6513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6514   (exit $ac_status); }; } &&
6515          { ac_try='test -s conftest$ac_exeext'
6516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6517   (eval $ac_try) 2>&5
6518   ac_status=$?
6519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6520   (exit $ac_status); }; }; then
6521   ac_cv_lib_z_inflate=yes
6522 else
6523   echo "$as_me: failed program was:" >&5
6524 sed 's/^/| /' conftest.$ac_ext >&5
6525
6526 ac_cv_lib_z_inflate=no
6527 fi
6528 rm -f conftest.err conftest.$ac_objext \
6529       conftest$ac_exeext conftest.$ac_ext
6530 LIBS=$ac_check_lib_save_LIBS
6531 fi
6532 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6533 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6534 if test $ac_cv_lib_z_inflate = yes; then
6535   cat >>confdefs.h <<_ACEOF
6536 #define HAVE_LIBZ 1
6537 _ACEOF
6538
6539   LIBS="-lz $LIBS"
6540
6541 else
6542   { { echo "$as_me:$LINENO: error: zlib library not found
6543 If you have zlib already installed, see config.log for details on the
6544 failure.  It is possible the compiler isn't looking in the proper directory.
6545 Use --without-zlib to disable zlib support." >&5
6546 echo "$as_me: error: zlib library not found
6547 If you have zlib already installed, see config.log for details on the
6548 failure.  It is possible the compiler isn't looking in the proper directory.
6549 Use --without-zlib to disable zlib support." >&2;}
6550    { (exit 1); exit 1; }; }
6551 fi
6552
6553 fi
6554
6555 if test "$enable_spinlocks" = yes; then
6556
6557 cat >>confdefs.h <<\_ACEOF
6558 #define HAVE_SPINLOCKS 1
6559 _ACEOF
6560
6561 else
6562   { echo "$as_me:$LINENO: WARNING:
6563 *** Not using spinlocks will cause poor performance." >&5
6564 echo "$as_me: WARNING:
6565 *** Not using spinlocks will cause poor performance." >&2;}
6566 fi
6567
6568 if test "$with_krb5" = yes ; then
6569   if test "$PORTNAME" != "win32"; then
6570      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6571 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6572 if test "${ac_cv_search_com_err+set}" = set; then
6573   echo $ECHO_N "(cached) $ECHO_C" >&6
6574 else
6575   ac_func_search_save_LIBS=$LIBS
6576 ac_cv_search_com_err=no
6577 cat >conftest.$ac_ext <<_ACEOF
6578 /* confdefs.h.  */
6579 _ACEOF
6580 cat confdefs.h >>conftest.$ac_ext
6581 cat >>conftest.$ac_ext <<_ACEOF
6582 /* end confdefs.h.  */
6583
6584 /* Override any gcc2 internal prototype to avoid an error.  */
6585 #ifdef __cplusplus
6586 extern "C"
6587 #endif
6588 /* We use char because int might match the return type of a gcc2
6589    builtin and then its argument prototype would still apply.  */
6590 char com_err ();
6591 int
6592 main ()
6593 {
6594 com_err ();
6595   ;
6596   return 0;
6597 }
6598 _ACEOF
6599 rm -f conftest.$ac_objext conftest$ac_exeext
6600 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6601   (eval $ac_link) 2>conftest.er1
6602   ac_status=$?
6603   grep -v '^ *+' conftest.er1 >conftest.err
6604   rm -f conftest.er1
6605   cat conftest.err >&5
6606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6607   (exit $ac_status); } &&
6608          { ac_try='test -z "$ac_c_werror_flag"
6609                          || test ! -s conftest.err'
6610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6611   (eval $ac_try) 2>&5
6612   ac_status=$?
6613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6614   (exit $ac_status); }; } &&
6615          { ac_try='test -s conftest$ac_exeext'
6616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6617   (eval $ac_try) 2>&5
6618   ac_status=$?
6619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6620   (exit $ac_status); }; }; then
6621   ac_cv_search_com_err="none required"
6622 else
6623   echo "$as_me: failed program was:" >&5
6624 sed 's/^/| /' conftest.$ac_ext >&5
6625
6626 fi
6627 rm -f conftest.err conftest.$ac_objext \
6628       conftest$ac_exeext conftest.$ac_ext
6629 if test "$ac_cv_search_com_err" = no; then
6630   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6631     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6632     cat >conftest.$ac_ext <<_ACEOF
6633 /* confdefs.h.  */
6634 _ACEOF
6635 cat confdefs.h >>conftest.$ac_ext
6636 cat >>conftest.$ac_ext <<_ACEOF
6637 /* end confdefs.h.  */
6638
6639 /* Override any gcc2 internal prototype to avoid an error.  */
6640 #ifdef __cplusplus
6641 extern "C"
6642 #endif
6643 /* We use char because int might match the return type of a gcc2
6644    builtin and then its argument prototype would still apply.  */
6645 char com_err ();
6646 int
6647 main ()
6648 {
6649 com_err ();
6650   ;
6651   return 0;
6652 }
6653 _ACEOF
6654 rm -f conftest.$ac_objext conftest$ac_exeext
6655 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6656   (eval $ac_link) 2>conftest.er1
6657   ac_status=$?
6658   grep -v '^ *+' conftest.er1 >conftest.err
6659   rm -f conftest.er1
6660   cat conftest.err >&5
6661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6662   (exit $ac_status); } &&
6663          { ac_try='test -z "$ac_c_werror_flag"
6664                          || test ! -s conftest.err'
6665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6666   (eval $ac_try) 2>&5
6667   ac_status=$?
6668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6669   (exit $ac_status); }; } &&
6670          { ac_try='test -s conftest$ac_exeext'
6671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6672   (eval $ac_try) 2>&5
6673   ac_status=$?
6674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675   (exit $ac_status); }; }; then
6676   ac_cv_search_com_err="-l$ac_lib"
6677 break
6678 else
6679   echo "$as_me: failed program was:" >&5
6680 sed 's/^/| /' conftest.$ac_ext >&5
6681
6682 fi
6683 rm -f conftest.err conftest.$ac_objext \
6684       conftest$ac_exeext conftest.$ac_ext
6685   done
6686 fi
6687 LIBS=$ac_func_search_save_LIBS
6688 fi
6689 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6690 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6691 if test "$ac_cv_search_com_err" != no; then
6692   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6693
6694 else
6695   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6696 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6697    { (exit 1); exit 1; }; }
6698 fi
6699
6700      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6701 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6702 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6703   echo $ECHO_N "(cached) $ECHO_C" >&6
6704 else
6705   ac_func_search_save_LIBS=$LIBS
6706 ac_cv_search_krb5_sendauth=no
6707 cat >conftest.$ac_ext <<_ACEOF
6708 /* confdefs.h.  */
6709 _ACEOF
6710 cat confdefs.h >>conftest.$ac_ext
6711 cat >>conftest.$ac_ext <<_ACEOF
6712 /* end confdefs.h.  */
6713
6714 /* Override any gcc2 internal prototype to avoid an error.  */
6715 #ifdef __cplusplus
6716 extern "C"
6717 #endif
6718 /* We use char because int might match the return type of a gcc2
6719    builtin and then its argument prototype would still apply.  */
6720 char krb5_sendauth ();
6721 int
6722 main ()
6723 {
6724 krb5_sendauth ();
6725   ;
6726   return 0;
6727 }
6728 _ACEOF
6729 rm -f conftest.$ac_objext conftest$ac_exeext
6730 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6731   (eval $ac_link) 2>conftest.er1
6732   ac_status=$?
6733   grep -v '^ *+' conftest.er1 >conftest.err
6734   rm -f conftest.er1
6735   cat conftest.err >&5
6736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6737   (exit $ac_status); } &&
6738          { ac_try='test -z "$ac_c_werror_flag"
6739                          || test ! -s conftest.err'
6740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6741   (eval $ac_try) 2>&5
6742   ac_status=$?
6743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6744   (exit $ac_status); }; } &&
6745          { ac_try='test -s conftest$ac_exeext'
6746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6747   (eval $ac_try) 2>&5
6748   ac_status=$?
6749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6750   (exit $ac_status); }; }; then
6751   ac_cv_search_krb5_sendauth="none required"
6752 else
6753   echo "$as_me: failed program was:" >&5
6754 sed 's/^/| /' conftest.$ac_ext >&5
6755
6756 fi
6757 rm -f conftest.err conftest.$ac_objext \
6758       conftest$ac_exeext conftest.$ac_ext
6759 if test "$ac_cv_search_krb5_sendauth" = no; then
6760   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6761     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6762     cat >conftest.$ac_ext <<_ACEOF
6763 /* confdefs.h.  */
6764 _ACEOF
6765 cat confdefs.h >>conftest.$ac_ext
6766 cat >>conftest.$ac_ext <<_ACEOF
6767 /* end confdefs.h.  */
6768
6769 /* Override any gcc2 internal prototype to avoid an error.  */
6770 #ifdef __cplusplus
6771 extern "C"
6772 #endif
6773 /* We use char because int might match the return type of a gcc2
6774    builtin and then its argument prototype would still apply.  */
6775 char krb5_sendauth ();
6776 int
6777 main ()
6778 {
6779 krb5_sendauth ();
6780   ;
6781   return 0;
6782 }
6783 _ACEOF
6784 rm -f conftest.$ac_objext conftest$ac_exeext
6785 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6786   (eval $ac_link) 2>conftest.er1
6787   ac_status=$?
6788   grep -v '^ *+' conftest.er1 >conftest.err
6789   rm -f conftest.er1
6790   cat conftest.err >&5
6791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792   (exit $ac_status); } &&
6793          { ac_try='test -z "$ac_c_werror_flag"
6794                          || test ! -s conftest.err'
6795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6796   (eval $ac_try) 2>&5
6797   ac_status=$?
6798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6799   (exit $ac_status); }; } &&
6800          { ac_try='test -s conftest$ac_exeext'
6801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6802   (eval $ac_try) 2>&5
6803   ac_status=$?
6804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6805   (exit $ac_status); }; }; then
6806   ac_cv_search_krb5_sendauth="-l$ac_lib"
6807 break
6808 else
6809   echo "$as_me: failed program was:" >&5
6810 sed 's/^/| /' conftest.$ac_ext >&5
6811
6812 fi
6813 rm -f conftest.err conftest.$ac_objext \
6814       conftest$ac_exeext conftest.$ac_ext
6815   done
6816 fi
6817 LIBS=$ac_func_search_save_LIBS
6818 fi
6819 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6820 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6821 if test "$ac_cv_search_krb5_sendauth" != no; then
6822   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6823
6824 else
6825   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6826 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6827    { (exit 1); exit 1; }; }
6828 fi
6829
6830   else
6831      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6832 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6833 if test "${ac_cv_search_com_err+set}" = set; then
6834   echo $ECHO_N "(cached) $ECHO_C" >&6
6835 else
6836   ac_func_search_save_LIBS=$LIBS
6837 ac_cv_search_com_err=no
6838 cat >conftest.$ac_ext <<_ACEOF
6839 /* confdefs.h.  */
6840 _ACEOF
6841 cat confdefs.h >>conftest.$ac_ext
6842 cat >>conftest.$ac_ext <<_ACEOF
6843 /* end confdefs.h.  */
6844
6845 /* Override any gcc2 internal prototype to avoid an error.  */
6846 #ifdef __cplusplus
6847 extern "C"
6848 #endif
6849 /* We use char because int might match the return type of a gcc2
6850    builtin and then its argument prototype would still apply.  */
6851 char com_err ();
6852 int
6853 main ()
6854 {
6855 com_err ();
6856   ;
6857   return 0;
6858 }
6859 _ACEOF
6860 rm -f conftest.$ac_objext conftest$ac_exeext
6861 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6862   (eval $ac_link) 2>conftest.er1
6863   ac_status=$?
6864   grep -v '^ *+' conftest.er1 >conftest.err
6865   rm -f conftest.er1
6866   cat conftest.err >&5
6867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6868   (exit $ac_status); } &&
6869          { ac_try='test -z "$ac_c_werror_flag"
6870                          || test ! -s conftest.err'
6871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6872   (eval $ac_try) 2>&5
6873   ac_status=$?
6874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6875   (exit $ac_status); }; } &&
6876          { ac_try='test -s conftest$ac_exeext'
6877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6878   (eval $ac_try) 2>&5
6879   ac_status=$?
6880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6881   (exit $ac_status); }; }; then
6882   ac_cv_search_com_err="none required"
6883 else
6884   echo "$as_me: failed program was:" >&5
6885 sed 's/^/| /' conftest.$ac_ext >&5
6886
6887 fi
6888 rm -f conftest.err conftest.$ac_objext \
6889       conftest$ac_exeext conftest.$ac_ext
6890 if test "$ac_cv_search_com_err" = no; then
6891   for ac_lib in 'comerr32 -lkrb5_32'; do
6892     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6893     cat >conftest.$ac_ext <<_ACEOF
6894 /* confdefs.h.  */
6895 _ACEOF
6896 cat confdefs.h >>conftest.$ac_ext
6897 cat >>conftest.$ac_ext <<_ACEOF
6898 /* end confdefs.h.  */
6899
6900 /* Override any gcc2 internal prototype to avoid an error.  */
6901 #ifdef __cplusplus
6902 extern "C"
6903 #endif
6904 /* We use char because int might match the return type of a gcc2
6905    builtin and then its argument prototype would still apply.  */
6906 char com_err ();
6907 int
6908 main ()
6909 {
6910 com_err ();
6911   ;
6912   return 0;
6913 }
6914 _ACEOF
6915 rm -f conftest.$ac_objext conftest$ac_exeext
6916 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6917   (eval $ac_link) 2>conftest.er1
6918   ac_status=$?
6919   grep -v '^ *+' conftest.er1 >conftest.err
6920   rm -f conftest.er1
6921   cat conftest.err >&5
6922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6923   (exit $ac_status); } &&
6924          { ac_try='test -z "$ac_c_werror_flag"
6925                          || test ! -s conftest.err'
6926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6927   (eval $ac_try) 2>&5
6928   ac_status=$?
6929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6930   (exit $ac_status); }; } &&
6931          { ac_try='test -s conftest$ac_exeext'
6932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6933   (eval $ac_try) 2>&5
6934   ac_status=$?
6935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6936   (exit $ac_status); }; }; then
6937   ac_cv_search_com_err="-l$ac_lib"
6938 break
6939 else
6940   echo "$as_me: failed program was:" >&5
6941 sed 's/^/| /' conftest.$ac_ext >&5
6942
6943 fi
6944 rm -f conftest.err conftest.$ac_objext \
6945       conftest$ac_exeext conftest.$ac_ext
6946   done
6947 fi
6948 LIBS=$ac_func_search_save_LIBS
6949 fi
6950 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6951 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6952 if test "$ac_cv_search_com_err" != no; then
6953   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6954
6955 else
6956   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6957 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6958    { (exit 1); exit 1; }; }
6959 fi
6960
6961   fi
6962 fi
6963
6964 if test "$with_openssl" = yes ; then
6965     if test "$PORTNAME" != "win32"; then
6966
6967 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6968 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6969 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6970   echo $ECHO_N "(cached) $ECHO_C" >&6
6971 else
6972   ac_check_lib_save_LIBS=$LIBS
6973 LIBS="-lcrypto  $LIBS"
6974 cat >conftest.$ac_ext <<_ACEOF
6975 /* confdefs.h.  */
6976 _ACEOF
6977 cat confdefs.h >>conftest.$ac_ext
6978 cat >>conftest.$ac_ext <<_ACEOF
6979 /* end confdefs.h.  */
6980
6981 /* Override any gcc2 internal prototype to avoid an error.  */
6982 #ifdef __cplusplus
6983 extern "C"
6984 #endif
6985 /* We use char because int might match the return type of a gcc2
6986    builtin and then its argument prototype would still apply.  */
6987 char CRYPTO_new_ex_data ();
6988 int
6989 main ()
6990 {
6991 CRYPTO_new_ex_data ();
6992   ;
6993   return 0;
6994 }
6995 _ACEOF
6996 rm -f conftest.$ac_objext conftest$ac_exeext
6997 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6998   (eval $ac_link) 2>conftest.er1
6999   ac_status=$?
7000   grep -v '^ *+' conftest.er1 >conftest.err
7001   rm -f conftest.er1
7002   cat conftest.err >&5
7003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7004   (exit $ac_status); } &&
7005          { ac_try='test -z "$ac_c_werror_flag"
7006                          || test ! -s conftest.err'
7007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7008   (eval $ac_try) 2>&5
7009   ac_status=$?
7010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7011   (exit $ac_status); }; } &&
7012          { ac_try='test -s conftest$ac_exeext'
7013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7014   (eval $ac_try) 2>&5
7015   ac_status=$?
7016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7017   (exit $ac_status); }; }; then
7018   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7019 else
7020   echo "$as_me: failed program was:" >&5
7021 sed 's/^/| /' conftest.$ac_ext >&5
7022
7023 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7024 fi
7025 rm -f conftest.err conftest.$ac_objext \
7026       conftest$ac_exeext conftest.$ac_ext
7027 LIBS=$ac_check_lib_save_LIBS
7028 fi
7029 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7030 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
7031 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7032   cat >>confdefs.h <<_ACEOF
7033 #define HAVE_LIBCRYPTO 1
7034 _ACEOF
7035
7036   LIBS="-lcrypto $LIBS"
7037
7038 else
7039   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7040 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7041    { (exit 1); exit 1; }; }
7042 fi
7043
7044
7045 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7046 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7047 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7048   echo $ECHO_N "(cached) $ECHO_C" >&6
7049 else
7050   ac_check_lib_save_LIBS=$LIBS
7051 LIBS="-lssl  $LIBS"
7052 cat >conftest.$ac_ext <<_ACEOF
7053 /* confdefs.h.  */
7054 _ACEOF
7055 cat confdefs.h >>conftest.$ac_ext
7056 cat >>conftest.$ac_ext <<_ACEOF
7057 /* end confdefs.h.  */
7058
7059 /* Override any gcc2 internal prototype to avoid an error.  */
7060 #ifdef __cplusplus
7061 extern "C"
7062 #endif
7063 /* We use char because int might match the return type of a gcc2
7064    builtin and then its argument prototype would still apply.  */
7065 char SSL_library_init ();
7066 int
7067 main ()
7068 {
7069 SSL_library_init ();
7070   ;
7071   return 0;
7072 }
7073 _ACEOF
7074 rm -f conftest.$ac_objext conftest$ac_exeext
7075 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7076   (eval $ac_link) 2>conftest.er1
7077   ac_status=$?
7078   grep -v '^ *+' conftest.er1 >conftest.err
7079   rm -f conftest.er1
7080   cat conftest.err >&5
7081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7082   (exit $ac_status); } &&
7083          { ac_try='test -z "$ac_c_werror_flag"
7084                          || test ! -s conftest.err'
7085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7086   (eval $ac_try) 2>&5
7087   ac_status=$?
7088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7089   (exit $ac_status); }; } &&
7090          { ac_try='test -s conftest$ac_exeext'
7091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7092   (eval $ac_try) 2>&5
7093   ac_status=$?
7094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7095   (exit $ac_status); }; }; then
7096   ac_cv_lib_ssl_SSL_library_init=yes
7097 else
7098   echo "$as_me: failed program was:" >&5
7099 sed 's/^/| /' conftest.$ac_ext >&5
7100
7101 ac_cv_lib_ssl_SSL_library_init=no
7102 fi
7103 rm -f conftest.err conftest.$ac_objext \
7104       conftest$ac_exeext conftest.$ac_ext
7105 LIBS=$ac_check_lib_save_LIBS
7106 fi
7107 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7108 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7109 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7110   cat >>confdefs.h <<_ACEOF
7111 #define HAVE_LIBSSL 1
7112 _ACEOF
7113
7114   LIBS="-lssl $LIBS"
7115
7116 else
7117   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7118 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7119    { (exit 1); exit 1; }; }
7120 fi
7121
7122   else
7123
7124 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7125 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7126 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7127   echo $ECHO_N "(cached) $ECHO_C" >&6
7128 else
7129   ac_check_lib_save_LIBS=$LIBS
7130 LIBS="-leay32  $LIBS"
7131 cat >conftest.$ac_ext <<_ACEOF
7132 /* confdefs.h.  */
7133 _ACEOF
7134 cat confdefs.h >>conftest.$ac_ext
7135 cat >>conftest.$ac_ext <<_ACEOF
7136 /* end confdefs.h.  */
7137
7138 /* Override any gcc2 internal prototype to avoid an error.  */
7139 #ifdef __cplusplus
7140 extern "C"
7141 #endif
7142 /* We use char because int might match the return type of a gcc2
7143    builtin and then its argument prototype would still apply.  */
7144 char CRYPTO_new_ex_data ();
7145 int
7146 main ()
7147 {
7148 CRYPTO_new_ex_data ();
7149   ;
7150   return 0;
7151 }
7152 _ACEOF
7153 rm -f conftest.$ac_objext conftest$ac_exeext
7154 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7155   (eval $ac_link) 2>conftest.er1
7156   ac_status=$?
7157   grep -v '^ *+' conftest.er1 >conftest.err
7158   rm -f conftest.er1
7159   cat conftest.err >&5
7160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7161   (exit $ac_status); } &&
7162          { ac_try='test -z "$ac_c_werror_flag"
7163                          || test ! -s conftest.err'
7164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7165   (eval $ac_try) 2>&5
7166   ac_status=$?
7167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7168   (exit $ac_status); }; } &&
7169          { ac_try='test -s conftest$ac_exeext'
7170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7171   (eval $ac_try) 2>&5
7172   ac_status=$?
7173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7174   (exit $ac_status); }; }; then
7175   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7176 else
7177   echo "$as_me: failed program was:" >&5
7178 sed 's/^/| /' conftest.$ac_ext >&5
7179
7180 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7181 fi
7182 rm -f conftest.err conftest.$ac_objext \
7183       conftest$ac_exeext conftest.$ac_ext
7184 LIBS=$ac_check_lib_save_LIBS
7185 fi
7186 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7187 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7188 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7189   cat >>confdefs.h <<_ACEOF
7190 #define HAVE_LIBEAY32 1
7191 _ACEOF
7192
7193   LIBS="-leay32 $LIBS"
7194
7195 else
7196   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7197 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7198    { (exit 1); exit 1; }; }
7199 fi
7200
7201
7202 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7203 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7204 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7205   echo $ECHO_N "(cached) $ECHO_C" >&6
7206 else
7207   ac_check_lib_save_LIBS=$LIBS
7208 LIBS="-lssleay32  $LIBS"
7209 cat >conftest.$ac_ext <<_ACEOF
7210 /* confdefs.h.  */
7211 _ACEOF
7212 cat confdefs.h >>conftest.$ac_ext
7213 cat >>conftest.$ac_ext <<_ACEOF
7214 /* end confdefs.h.  */
7215
7216 /* Override any gcc2 internal prototype to avoid an error.  */
7217 #ifdef __cplusplus
7218 extern "C"
7219 #endif
7220 /* We use char because int might match the return type of a gcc2
7221    builtin and then its argument prototype would still apply.  */
7222 char SSL_library_init ();
7223 int
7224 main ()
7225 {
7226 SSL_library_init ();
7227   ;
7228   return 0;
7229 }
7230 _ACEOF
7231 rm -f conftest.$ac_objext conftest$ac_exeext
7232 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7233   (eval $ac_link) 2>conftest.er1
7234   ac_status=$?
7235   grep -v '^ *+' conftest.er1 >conftest.err
7236   rm -f conftest.er1
7237   cat conftest.err >&5
7238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7239   (exit $ac_status); } &&
7240          { ac_try='test -z "$ac_c_werror_flag"
7241                          || test ! -s conftest.err'
7242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7243   (eval $ac_try) 2>&5
7244   ac_status=$?
7245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7246   (exit $ac_status); }; } &&
7247          { ac_try='test -s conftest$ac_exeext'
7248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7249   (eval $ac_try) 2>&5
7250   ac_status=$?
7251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7252   (exit $ac_status); }; }; then
7253   ac_cv_lib_ssleay32_SSL_library_init=yes
7254 else
7255   echo "$as_me: failed program was:" >&5
7256 sed 's/^/| /' conftest.$ac_ext >&5
7257
7258 ac_cv_lib_ssleay32_SSL_library_init=no
7259 fi
7260 rm -f conftest.err conftest.$ac_objext \
7261       conftest$ac_exeext conftest.$ac_ext
7262 LIBS=$ac_check_lib_save_LIBS
7263 fi
7264 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7265 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7266 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7267   cat >>confdefs.h <<_ACEOF
7268 #define HAVE_LIBSSLEAY32 1
7269 _ACEOF
7270
7271   LIBS="-lssleay32 $LIBS"
7272
7273 else
7274   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7275 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7276    { (exit 1); exit 1; }; }
7277 fi
7278
7279   fi
7280 fi
7281
7282 if test "$with_pam" = yes ; then
7283
7284 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7285 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7286 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7287   echo $ECHO_N "(cached) $ECHO_C" >&6
7288 else
7289   ac_check_lib_save_LIBS=$LIBS
7290 LIBS="-lpam  $LIBS"
7291 cat >conftest.$ac_ext <<_ACEOF
7292 /* confdefs.h.  */
7293 _ACEOF
7294 cat confdefs.h >>conftest.$ac_ext
7295 cat >>conftest.$ac_ext <<_ACEOF
7296 /* end confdefs.h.  */
7297
7298 /* Override any gcc2 internal prototype to avoid an error.  */
7299 #ifdef __cplusplus
7300 extern "C"
7301 #endif
7302 /* We use char because int might match the return type of a gcc2
7303    builtin and then its argument prototype would still apply.  */
7304 char pam_start ();
7305 int
7306 main ()
7307 {
7308 pam_start ();
7309   ;
7310   return 0;
7311 }
7312 _ACEOF
7313 rm -f conftest.$ac_objext conftest$ac_exeext
7314 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7315   (eval $ac_link) 2>conftest.er1
7316   ac_status=$?
7317   grep -v '^ *+' conftest.er1 >conftest.err
7318   rm -f conftest.er1
7319   cat conftest.err >&5
7320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321   (exit $ac_status); } &&
7322          { ac_try='test -z "$ac_c_werror_flag"
7323                          || test ! -s conftest.err'
7324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7325   (eval $ac_try) 2>&5
7326   ac_status=$?
7327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328   (exit $ac_status); }; } &&
7329          { ac_try='test -s conftest$ac_exeext'
7330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7331   (eval $ac_try) 2>&5
7332   ac_status=$?
7333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7334   (exit $ac_status); }; }; then
7335   ac_cv_lib_pam_pam_start=yes
7336 else
7337   echo "$as_me: failed program was:" >&5
7338 sed 's/^/| /' conftest.$ac_ext >&5
7339
7340 ac_cv_lib_pam_pam_start=no
7341 fi
7342 rm -f conftest.err conftest.$ac_objext \
7343       conftest$ac_exeext conftest.$ac_ext
7344 LIBS=$ac_check_lib_save_LIBS
7345 fi
7346 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7347 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7348 if test $ac_cv_lib_pam_pam_start = yes; then
7349   cat >>confdefs.h <<_ACEOF
7350 #define HAVE_LIBPAM 1
7351 _ACEOF
7352
7353   LIBS="-lpam $LIBS"
7354
7355 else
7356   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7357 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7358    { (exit 1); exit 1; }; }
7359 fi
7360
7361 fi
7362
7363 if test "$with_libxml" = yes ; then
7364
7365 echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
7366 echo $ECHO_N "checking for xmlSaveToBuffer in -lxml2... $ECHO_C" >&6
7367 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
7368   echo $ECHO_N "(cached) $ECHO_C" >&6
7369 else
7370   ac_check_lib_save_LIBS=$LIBS
7371 LIBS="-lxml2  $LIBS"
7372 cat >conftest.$ac_ext <<_ACEOF
7373 /* confdefs.h.  */
7374 _ACEOF
7375 cat confdefs.h >>conftest.$ac_ext
7376 cat >>conftest.$ac_ext <<_ACEOF
7377 /* end confdefs.h.  */
7378
7379 /* Override any gcc2 internal prototype to avoid an error.  */
7380 #ifdef __cplusplus
7381 extern "C"
7382 #endif
7383 /* We use char because int might match the return type of a gcc2
7384    builtin and then its argument prototype would still apply.  */
7385 char xmlSaveToBuffer ();
7386 int
7387 main ()
7388 {
7389 xmlSaveToBuffer ();
7390   ;
7391   return 0;
7392 }
7393 _ACEOF
7394 rm -f conftest.$ac_objext conftest$ac_exeext
7395 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7396   (eval $ac_link) 2>conftest.er1
7397   ac_status=$?
7398   grep -v '^ *+' conftest.er1 >conftest.err
7399   rm -f conftest.er1
7400   cat conftest.err >&5
7401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7402   (exit $ac_status); } &&
7403          { ac_try='test -z "$ac_c_werror_flag"
7404                          || test ! -s conftest.err'
7405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7406   (eval $ac_try) 2>&5
7407   ac_status=$?
7408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7409   (exit $ac_status); }; } &&
7410          { ac_try='test -s conftest$ac_exeext'
7411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7412   (eval $ac_try) 2>&5
7413   ac_status=$?
7414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7415   (exit $ac_status); }; }; then
7416   ac_cv_lib_xml2_xmlSaveToBuffer=yes
7417 else
7418   echo "$as_me: failed program was:" >&5
7419 sed 's/^/| /' conftest.$ac_ext >&5
7420
7421 ac_cv_lib_xml2_xmlSaveToBuffer=no
7422 fi
7423 rm -f conftest.err conftest.$ac_objext \
7424       conftest$ac_exeext conftest.$ac_ext
7425 LIBS=$ac_check_lib_save_LIBS
7426 fi
7427 echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
7428 echo "${ECHO_T}$ac_cv_lib_xml2_xmlSaveToBuffer" >&6
7429 if test $ac_cv_lib_xml2_xmlSaveToBuffer = yes; then
7430   cat >>confdefs.h <<_ACEOF
7431 #define HAVE_LIBXML2 1
7432 _ACEOF
7433
7434   LIBS="-lxml2 $LIBS"
7435
7436 else
7437   { { echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
7438 echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
7439    { (exit 1); exit 1; }; }
7440 fi
7441
7442 fi
7443
7444
7445 ##
7446 ## Header files
7447 ##
7448
7449 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7450 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7451 if test "${ac_cv_header_stdc+set}" = set; then
7452   echo $ECHO_N "(cached) $ECHO_C" >&6
7453 else
7454   cat >conftest.$ac_ext <<_ACEOF
7455 /* confdefs.h.  */
7456 _ACEOF
7457 cat confdefs.h >>conftest.$ac_ext
7458 cat >>conftest.$ac_ext <<_ACEOF
7459 /* end confdefs.h.  */
7460 #include <stdlib.h>
7461 #include <stdarg.h>
7462 #include <string.h>
7463 #include <float.h>
7464
7465 int
7466 main ()
7467 {
7468
7469   ;
7470   return 0;
7471 }
7472 _ACEOF
7473 rm -f conftest.$ac_objext
7474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7475   (eval $ac_compile) 2>conftest.er1
7476   ac_status=$?
7477   grep -v '^ *+' conftest.er1 >conftest.err
7478   rm -f conftest.er1
7479   cat conftest.err >&5
7480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7481   (exit $ac_status); } &&
7482          { ac_try='test -z "$ac_c_werror_flag"
7483                          || test ! -s conftest.err'
7484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7485   (eval $ac_try) 2>&5
7486   ac_status=$?
7487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7488   (exit $ac_status); }; } &&
7489          { ac_try='test -s conftest.$ac_objext'
7490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7491   (eval $ac_try) 2>&5
7492   ac_status=$?
7493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7494   (exit $ac_status); }; }; then
7495   ac_cv_header_stdc=yes
7496 else
7497   echo "$as_me: failed program was:" >&5
7498 sed 's/^/| /' conftest.$ac_ext >&5
7499
7500 ac_cv_header_stdc=no
7501 fi
7502 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7503
7504 if test $ac_cv_header_stdc = yes; then
7505   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7506   cat >conftest.$ac_ext <<_ACEOF
7507 /* confdefs.h.  */
7508 _ACEOF
7509 cat confdefs.h >>conftest.$ac_ext
7510 cat >>conftest.$ac_ext <<_ACEOF
7511 /* end confdefs.h.  */
7512 #include <string.h>
7513
7514 _ACEOF
7515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7516   $EGREP "memchr" >/dev/null 2>&1; then
7517   :
7518 else
7519   ac_cv_header_stdc=no
7520 fi
7521 rm -f conftest*
7522
7523 fi
7524
7525 if test $ac_cv_header_stdc = yes; then
7526   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7527   cat >conftest.$ac_ext <<_ACEOF
7528 /* confdefs.h.  */
7529 _ACEOF
7530 cat confdefs.h >>conftest.$ac_ext
7531 cat >>conftest.$ac_ext <<_ACEOF
7532 /* end confdefs.h.  */
7533 #include <stdlib.h>
7534
7535 _ACEOF
7536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7537   $EGREP "free" >/dev/null 2>&1; then
7538   :
7539 else
7540   ac_cv_header_stdc=no
7541 fi
7542 rm -f conftest*
7543
7544 fi
7545
7546 if test $ac_cv_header_stdc = yes; then
7547   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7548   if test "$cross_compiling" = yes; then
7549   :
7550 else
7551   cat >conftest.$ac_ext <<_ACEOF
7552 /* confdefs.h.  */
7553 _ACEOF
7554 cat confdefs.h >>conftest.$ac_ext
7555 cat >>conftest.$ac_ext <<_ACEOF
7556 /* end confdefs.h.  */
7557 #include <ctype.h>
7558 #if ((' ' & 0x0FF) == 0x020)
7559 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7560 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7561 #else
7562 # define ISLOWER(c) \
7563                    (('a' <= (c) && (c) <= 'i') \
7564                      || ('j' <= (c) && (c) <= 'r') \
7565                      || ('s' <= (c) && (c) <= 'z'))
7566 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7567 #endif
7568
7569 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7570 int
7571 main ()
7572 {
7573   int i;
7574   for (i = 0; i < 256; i++)
7575     if (XOR (islower (i), ISLOWER (i))
7576         || toupper (i) != TOUPPER (i))
7577       exit(2);
7578   exit (0);
7579 }
7580 _ACEOF
7581 rm -f conftest$ac_exeext
7582 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7583   (eval $ac_link) 2>&5
7584   ac_status=$?
7585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7586   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7588   (eval $ac_try) 2>&5
7589   ac_status=$?
7590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7591   (exit $ac_status); }; }; then
7592   :
7593 else
7594   echo "$as_me: program exited with status $ac_status" >&5
7595 echo "$as_me: failed program was:" >&5
7596 sed 's/^/| /' conftest.$ac_ext >&5
7597
7598 ( exit $ac_status )
7599 ac_cv_header_stdc=no
7600 fi
7601 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7602 fi
7603 fi
7604 fi
7605 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7606 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7607 if test $ac_cv_header_stdc = yes; then
7608
7609 cat >>confdefs.h <<\_ACEOF
7610 #define STDC_HEADERS 1
7611 _ACEOF
7612
7613 fi
7614
7615 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7626                   inttypes.h stdint.h unistd.h
7627 do
7628 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7629 echo "$as_me:$LINENO: checking for $ac_header" >&5
7630 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7631 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7632   echo $ECHO_N "(cached) $ECHO_C" >&6
7633 else
7634   cat >conftest.$ac_ext <<_ACEOF
7635 /* confdefs.h.  */
7636 _ACEOF
7637 cat confdefs.h >>conftest.$ac_ext
7638 cat >>conftest.$ac_ext <<_ACEOF
7639 /* end confdefs.h.  */
7640 $ac_includes_default
7641
7642 #include <$ac_header>
7643 _ACEOF
7644 rm -f conftest.$ac_objext
7645 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7646   (eval $ac_compile) 2>conftest.er1
7647   ac_status=$?
7648   grep -v '^ *+' conftest.er1 >conftest.err
7649   rm -f conftest.er1
7650   cat conftest.err >&5
7651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7652   (exit $ac_status); } &&
7653          { ac_try='test -z "$ac_c_werror_flag"
7654                          || test ! -s conftest.err'
7655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7656   (eval $ac_try) 2>&5
7657   ac_status=$?
7658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7659   (exit $ac_status); }; } &&
7660          { ac_try='test -s conftest.$ac_objext'
7661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7662   (eval $ac_try) 2>&5
7663   ac_status=$?
7664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7665   (exit $ac_status); }; }; then
7666   eval "$as_ac_Header=yes"
7667 else
7668   echo "$as_me: failed program was:" >&5
7669 sed 's/^/| /' conftest.$ac_ext >&5
7670
7671 eval "$as_ac_Header=no"
7672 fi
7673 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7674 fi
7675 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7676 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7677 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7678   cat >>confdefs.h <<_ACEOF
7679 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7680 _ACEOF
7681
7682 fi
7683
7684 done
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713 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
7714 do
7715 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7716 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7717   echo "$as_me:$LINENO: checking for $ac_header" >&5
7718 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7719 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7720   echo $ECHO_N "(cached) $ECHO_C" >&6
7721 fi
7722 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7723 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7724 else
7725   # Is the header compilable?
7726 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7727 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7728 cat >conftest.$ac_ext <<_ACEOF
7729 /* confdefs.h.  */
7730 _ACEOF
7731 cat confdefs.h >>conftest.$ac_ext
7732 cat >>conftest.$ac_ext <<_ACEOF
7733 /* end confdefs.h.  */
7734 $ac_includes_default
7735 #include <$ac_header>
7736 _ACEOF
7737 rm -f conftest.$ac_objext
7738 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7739   (eval $ac_compile) 2>conftest.er1
7740   ac_status=$?
7741   grep -v '^ *+' conftest.er1 >conftest.err
7742   rm -f conftest.er1
7743   cat conftest.err >&5
7744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7745   (exit $ac_status); } &&
7746          { ac_try='test -z "$ac_c_werror_flag"
7747                          || test ! -s conftest.err'
7748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7749   (eval $ac_try) 2>&5
7750   ac_status=$?
7751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7752   (exit $ac_status); }; } &&
7753          { ac_try='test -s conftest.$ac_objext'
7754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7755   (eval $ac_try) 2>&5
7756   ac_status=$?
7757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7758   (exit $ac_status); }; }; then
7759   ac_header_compiler=yes
7760 else
7761   echo "$as_me: failed program was:" >&5
7762 sed 's/^/| /' conftest.$ac_ext >&5
7763
7764 ac_header_compiler=no
7765 fi
7766 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7767 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7768 echo "${ECHO_T}$ac_header_compiler" >&6
7769
7770 # Is the header present?
7771 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7772 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7773 cat >conftest.$ac_ext <<_ACEOF
7774 /* confdefs.h.  */
7775 _ACEOF
7776 cat confdefs.h >>conftest.$ac_ext
7777 cat >>conftest.$ac_ext <<_ACEOF
7778 /* end confdefs.h.  */
7779 #include <$ac_header>
7780 _ACEOF
7781 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7782   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7783   ac_status=$?
7784   grep -v '^ *+' conftest.er1 >conftest.err
7785   rm -f conftest.er1
7786   cat conftest.err >&5
7787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788   (exit $ac_status); } >/dev/null; then
7789   if test -s conftest.err; then
7790     ac_cpp_err=$ac_c_preproc_warn_flag
7791     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7792   else
7793     ac_cpp_err=
7794   fi
7795 else
7796   ac_cpp_err=yes
7797 fi
7798 if test -z "$ac_cpp_err"; then
7799   ac_header_preproc=yes
7800 else
7801   echo "$as_me: failed program was:" >&5
7802 sed 's/^/| /' conftest.$ac_ext >&5
7803
7804   ac_header_preproc=no
7805 fi
7806 rm -f conftest.err conftest.$ac_ext
7807 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7808 echo "${ECHO_T}$ac_header_preproc" >&6
7809
7810 # So?  What about this header?
7811 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7812   yes:no: )
7813     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7814 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7815     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7816 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7817     ac_header_preproc=yes
7818     ;;
7819   no:yes:* )
7820     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7821 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7822     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7823 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7824     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7825 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7826     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7827 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7828     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7829 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7830     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7831 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7832     (
7833       cat <<\_ASBOX
7834 ## ---------------------------------------- ##
7835 ## Report this to pgsql-bugs@postgresql.org ##
7836 ## ---------------------------------------- ##
7837 _ASBOX
7838     ) |
7839       sed "s/^/$as_me: WARNING:     /" >&2
7840     ;;
7841 esac
7842 echo "$as_me:$LINENO: checking for $ac_header" >&5
7843 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7844 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7845   echo $ECHO_N "(cached) $ECHO_C" >&6
7846 else
7847   eval "$as_ac_Header=\$ac_header_preproc"
7848 fi
7849 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7850 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7851
7852 fi
7853 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7854   cat >>confdefs.h <<_ACEOF
7855 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7856 _ACEOF
7857
7858 fi
7859
7860 done
7861
7862
7863 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7864 # netinet/in.h is included first.
7865
7866 for ac_header in netinet/in.h
7867 do
7868 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7869 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7870   echo "$as_me:$LINENO: checking for $ac_header" >&5
7871 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7872 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7873   echo $ECHO_N "(cached) $ECHO_C" >&6
7874 fi
7875 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7876 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7877 else
7878   # Is the header compilable?
7879 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7880 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7881 cat >conftest.$ac_ext <<_ACEOF
7882 /* confdefs.h.  */
7883 _ACEOF
7884 cat confdefs.h >>conftest.$ac_ext
7885 cat >>conftest.$ac_ext <<_ACEOF
7886 /* end confdefs.h.  */
7887 $ac_includes_default
7888 #include <$ac_header>
7889 _ACEOF
7890 rm -f conftest.$ac_objext
7891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7892   (eval $ac_compile) 2>conftest.er1
7893   ac_status=$?
7894   grep -v '^ *+' conftest.er1 >conftest.err
7895   rm -f conftest.er1
7896   cat conftest.err >&5
7897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898   (exit $ac_status); } &&
7899          { ac_try='test -z "$ac_c_werror_flag"
7900                          || test ! -s conftest.err'
7901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7902   (eval $ac_try) 2>&5
7903   ac_status=$?
7904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7905   (exit $ac_status); }; } &&
7906          { ac_try='test -s conftest.$ac_objext'
7907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7908   (eval $ac_try) 2>&5
7909   ac_status=$?
7910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7911   (exit $ac_status); }; }; then
7912   ac_header_compiler=yes
7913 else
7914   echo "$as_me: failed program was:" >&5
7915 sed 's/^/| /' conftest.$ac_ext >&5
7916
7917 ac_header_compiler=no
7918 fi
7919 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7920 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7921 echo "${ECHO_T}$ac_header_compiler" >&6
7922
7923 # Is the header present?
7924 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7925 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7926 cat >conftest.$ac_ext <<_ACEOF
7927 /* confdefs.h.  */
7928 _ACEOF
7929 cat confdefs.h >>conftest.$ac_ext
7930 cat >>conftest.$ac_ext <<_ACEOF
7931 /* end confdefs.h.  */
7932 #include <$ac_header>
7933 _ACEOF
7934 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7935   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7936   ac_status=$?
7937   grep -v '^ *+' conftest.er1 >conftest.err
7938   rm -f conftest.er1
7939   cat conftest.err >&5
7940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941   (exit $ac_status); } >/dev/null; then
7942   if test -s conftest.err; then
7943     ac_cpp_err=$ac_c_preproc_warn_flag
7944     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7945   else
7946     ac_cpp_err=
7947   fi
7948 else
7949   ac_cpp_err=yes
7950 fi
7951 if test -z "$ac_cpp_err"; then
7952   ac_header_preproc=yes
7953 else
7954   echo "$as_me: failed program was:" >&5
7955 sed 's/^/| /' conftest.$ac_ext >&5
7956
7957   ac_header_preproc=no
7958 fi
7959 rm -f conftest.err conftest.$ac_ext
7960 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7961 echo "${ECHO_T}$ac_header_preproc" >&6
7962
7963 # So?  What about this header?
7964 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7965   yes:no: )
7966     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7967 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7968     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7969 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7970     ac_header_preproc=yes
7971     ;;
7972   no:yes:* )
7973     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7974 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7975     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7976 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7977     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7978 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7979     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7980 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7981     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7982 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7983     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7984 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7985     (
7986       cat <<\_ASBOX
7987 ## ---------------------------------------- ##
7988 ## Report this to pgsql-bugs@postgresql.org ##
7989 ## ---------------------------------------- ##
7990 _ASBOX
7991     ) |
7992       sed "s/^/$as_me: WARNING:     /" >&2
7993     ;;
7994 esac
7995 echo "$as_me:$LINENO: checking for $ac_header" >&5
7996 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7997 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7998   echo $ECHO_N "(cached) $ECHO_C" >&6
7999 else
8000   eval "$as_ac_Header=\$ac_header_preproc"
8001 fi
8002 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8003 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8004
8005 fi
8006 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8007   cat >>confdefs.h <<_ACEOF
8008 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8009 _ACEOF
8010
8011 fi
8012
8013 done
8014
8015
8016 for ac_header in netinet/tcp.h
8017 do
8018 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8019 echo "$as_me:$LINENO: checking for $ac_header" >&5
8020 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8021 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8022   echo $ECHO_N "(cached) $ECHO_C" >&6
8023 else
8024   cat >conftest.$ac_ext <<_ACEOF
8025 /* confdefs.h.  */
8026 _ACEOF
8027 cat confdefs.h >>conftest.$ac_ext
8028 cat >>conftest.$ac_ext <<_ACEOF
8029 /* end confdefs.h.  */
8030 $ac_includes_default
8031 #ifdef HAVE_NETINET_IN_H
8032 #include <netinet/in.h>
8033 #endif
8034
8035
8036 #include <$ac_header>
8037 _ACEOF
8038 rm -f conftest.$ac_objext
8039 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8040   (eval $ac_compile) 2>conftest.er1
8041   ac_status=$?
8042   grep -v '^ *+' conftest.er1 >conftest.err
8043   rm -f conftest.er1
8044   cat conftest.err >&5
8045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046   (exit $ac_status); } &&
8047          { ac_try='test -z "$ac_c_werror_flag"
8048                          || test ! -s conftest.err'
8049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8050   (eval $ac_try) 2>&5
8051   ac_status=$?
8052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8053   (exit $ac_status); }; } &&
8054          { ac_try='test -s conftest.$ac_objext'
8055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8056   (eval $ac_try) 2>&5
8057   ac_status=$?
8058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8059   (exit $ac_status); }; }; then
8060   eval "$as_ac_Header=yes"
8061 else
8062   echo "$as_me: failed program was:" >&5
8063 sed 's/^/| /' conftest.$ac_ext >&5
8064
8065 eval "$as_ac_Header=no"
8066 fi
8067 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8068 fi
8069 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8070 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8071 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8072   cat >>confdefs.h <<_ACEOF
8073 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8074 _ACEOF
8075
8076 fi
8077
8078 done
8079
8080
8081 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8082
8083 for ac_header in readline/readline.h
8084 do
8085 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8086 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8087   echo "$as_me:$LINENO: checking for $ac_header" >&5
8088 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8089 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8090   echo $ECHO_N "(cached) $ECHO_C" >&6
8091 fi
8092 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8093 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8094 else
8095   # Is the header compilable?
8096 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8097 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8098 cat >conftest.$ac_ext <<_ACEOF
8099 /* confdefs.h.  */
8100 _ACEOF
8101 cat confdefs.h >>conftest.$ac_ext
8102 cat >>conftest.$ac_ext <<_ACEOF
8103 /* end confdefs.h.  */
8104 $ac_includes_default
8105 #include <$ac_header>
8106 _ACEOF
8107 rm -f conftest.$ac_objext
8108 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8109   (eval $ac_compile) 2>conftest.er1
8110   ac_status=$?
8111   grep -v '^ *+' conftest.er1 >conftest.err
8112   rm -f conftest.er1
8113   cat conftest.err >&5
8114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8115   (exit $ac_status); } &&
8116          { ac_try='test -z "$ac_c_werror_flag"
8117                          || test ! -s conftest.err'
8118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8119   (eval $ac_try) 2>&5
8120   ac_status=$?
8121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8122   (exit $ac_status); }; } &&
8123          { ac_try='test -s conftest.$ac_objext'
8124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8125   (eval $ac_try) 2>&5
8126   ac_status=$?
8127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8128   (exit $ac_status); }; }; then
8129   ac_header_compiler=yes
8130 else
8131   echo "$as_me: failed program was:" >&5
8132 sed 's/^/| /' conftest.$ac_ext >&5
8133
8134 ac_header_compiler=no
8135 fi
8136 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8137 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8138 echo "${ECHO_T}$ac_header_compiler" >&6
8139
8140 # Is the header present?
8141 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8142 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8143 cat >conftest.$ac_ext <<_ACEOF
8144 /* confdefs.h.  */
8145 _ACEOF
8146 cat confdefs.h >>conftest.$ac_ext
8147 cat >>conftest.$ac_ext <<_ACEOF
8148 /* end confdefs.h.  */
8149 #include <$ac_header>
8150 _ACEOF
8151 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8152   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8153   ac_status=$?
8154   grep -v '^ *+' conftest.er1 >conftest.err
8155   rm -f conftest.er1
8156   cat conftest.err >&5
8157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8158   (exit $ac_status); } >/dev/null; then
8159   if test -s conftest.err; then
8160     ac_cpp_err=$ac_c_preproc_warn_flag
8161     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8162   else
8163     ac_cpp_err=
8164   fi
8165 else
8166   ac_cpp_err=yes
8167 fi
8168 if test -z "$ac_cpp_err"; then
8169   ac_header_preproc=yes
8170 else
8171   echo "$as_me: failed program was:" >&5
8172 sed 's/^/| /' conftest.$ac_ext >&5
8173
8174   ac_header_preproc=no
8175 fi
8176 rm -f conftest.err conftest.$ac_ext
8177 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8178 echo "${ECHO_T}$ac_header_preproc" >&6
8179
8180 # So?  What about this header?
8181 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8182   yes:no: )
8183     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8184 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8185     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8186 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8187     ac_header_preproc=yes
8188     ;;
8189   no:yes:* )
8190     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8191 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8192     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8193 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8194     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8195 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8196     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8197 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8198     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8199 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8200     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8201 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8202     (
8203       cat <<\_ASBOX
8204 ## ---------------------------------------- ##
8205 ## Report this to pgsql-bugs@postgresql.org ##
8206 ## ---------------------------------------- ##
8207 _ASBOX
8208     ) |
8209       sed "s/^/$as_me: WARNING:     /" >&2
8210     ;;
8211 esac
8212 echo "$as_me:$LINENO: checking for $ac_header" >&5
8213 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8214 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8215   echo $ECHO_N "(cached) $ECHO_C" >&6
8216 else
8217   eval "$as_ac_Header=\$ac_header_preproc"
8218 fi
8219 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8220 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8221
8222 fi
8223 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8224   cat >>confdefs.h <<_ACEOF
8225 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8226 _ACEOF
8227
8228 else
8229
8230 for ac_header in readline.h
8231 do
8232 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8233 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8234   echo "$as_me:$LINENO: checking for $ac_header" >&5
8235 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8236 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8237   echo $ECHO_N "(cached) $ECHO_C" >&6
8238 fi
8239 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8240 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8241 else
8242   # Is the header compilable?
8243 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8244 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8245 cat >conftest.$ac_ext <<_ACEOF
8246 /* confdefs.h.  */
8247 _ACEOF
8248 cat confdefs.h >>conftest.$ac_ext
8249 cat >>conftest.$ac_ext <<_ACEOF
8250 /* end confdefs.h.  */
8251 $ac_includes_default
8252 #include <$ac_header>
8253 _ACEOF
8254 rm -f conftest.$ac_objext
8255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8256   (eval $ac_compile) 2>conftest.er1
8257   ac_status=$?
8258   grep -v '^ *+' conftest.er1 >conftest.err
8259   rm -f conftest.er1
8260   cat conftest.err >&5
8261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262   (exit $ac_status); } &&
8263          { ac_try='test -z "$ac_c_werror_flag"
8264                          || test ! -s conftest.err'
8265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8266   (eval $ac_try) 2>&5
8267   ac_status=$?
8268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8269   (exit $ac_status); }; } &&
8270          { ac_try='test -s conftest.$ac_objext'
8271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8272   (eval $ac_try) 2>&5
8273   ac_status=$?
8274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8275   (exit $ac_status); }; }; then
8276   ac_header_compiler=yes
8277 else
8278   echo "$as_me: failed program was:" >&5
8279 sed 's/^/| /' conftest.$ac_ext >&5
8280
8281 ac_header_compiler=no
8282 fi
8283 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8284 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8285 echo "${ECHO_T}$ac_header_compiler" >&6
8286
8287 # Is the header present?
8288 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8289 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8290 cat >conftest.$ac_ext <<_ACEOF
8291 /* confdefs.h.  */
8292 _ACEOF
8293 cat confdefs.h >>conftest.$ac_ext
8294 cat >>conftest.$ac_ext <<_ACEOF
8295 /* end confdefs.h.  */
8296 #include <$ac_header>
8297 _ACEOF
8298 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8299   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8300   ac_status=$?
8301   grep -v '^ *+' conftest.er1 >conftest.err
8302   rm -f conftest.er1
8303   cat conftest.err >&5
8304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8305   (exit $ac_status); } >/dev/null; then
8306   if test -s conftest.err; then
8307     ac_cpp_err=$ac_c_preproc_warn_flag
8308     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8309   else
8310     ac_cpp_err=
8311   fi
8312 else
8313   ac_cpp_err=yes
8314 fi
8315 if test -z "$ac_cpp_err"; then
8316   ac_header_preproc=yes
8317 else
8318   echo "$as_me: failed program was:" >&5
8319 sed 's/^/| /' conftest.$ac_ext >&5
8320
8321   ac_header_preproc=no
8322 fi
8323 rm -f conftest.err conftest.$ac_ext
8324 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8325 echo "${ECHO_T}$ac_header_preproc" >&6
8326
8327 # So?  What about this header?
8328 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8329   yes:no: )
8330     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8331 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8332     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8333 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8334     ac_header_preproc=yes
8335     ;;
8336   no:yes:* )
8337     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8338 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8339     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8340 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8341     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8342 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8343     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8344 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8345     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8346 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8347     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8348 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8349     (
8350       cat <<\_ASBOX
8351 ## ---------------------------------------- ##
8352 ## Report this to pgsql-bugs@postgresql.org ##
8353 ## ---------------------------------------- ##
8354 _ASBOX
8355     ) |
8356       sed "s/^/$as_me: WARNING:     /" >&2
8357     ;;
8358 esac
8359 echo "$as_me:$LINENO: checking for $ac_header" >&5
8360 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8361 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8362   echo $ECHO_N "(cached) $ECHO_C" >&6
8363 else
8364   eval "$as_ac_Header=\$ac_header_preproc"
8365 fi
8366 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8367 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8368
8369 fi
8370 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8371   cat >>confdefs.h <<_ACEOF
8372 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8373 _ACEOF
8374
8375 else
8376   { { echo "$as_me:$LINENO: error: readline header not found
8377 If you have readline already installed, see config.log for details on the
8378 failure.  It is possible the compiler isn't looking in the proper directory.
8379 Use --without-readline to disable readline support." >&5
8380 echo "$as_me: error: readline header not found
8381 If you have readline already installed, see config.log for details on the
8382 failure.  It is possible the compiler isn't looking in the proper directory.
8383 Use --without-readline to disable readline support." >&2;}
8384    { (exit 1); exit 1; }; }
8385 fi
8386
8387 done
8388
8389 fi
8390
8391 done
8392
8393
8394 for ac_header in readline/history.h
8395 do
8396 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8397 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8398   echo "$as_me:$LINENO: checking for $ac_header" >&5
8399 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8401   echo $ECHO_N "(cached) $ECHO_C" >&6
8402 fi
8403 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8404 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8405 else
8406   # Is the header compilable?
8407 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8408 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8409 cat >conftest.$ac_ext <<_ACEOF
8410 /* confdefs.h.  */
8411 _ACEOF
8412 cat confdefs.h >>conftest.$ac_ext
8413 cat >>conftest.$ac_ext <<_ACEOF
8414 /* end confdefs.h.  */
8415 $ac_includes_default
8416 #include <$ac_header>
8417 _ACEOF
8418 rm -f conftest.$ac_objext
8419 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8420   (eval $ac_compile) 2>conftest.er1
8421   ac_status=$?
8422   grep -v '^ *+' conftest.er1 >conftest.err
8423   rm -f conftest.er1
8424   cat conftest.err >&5
8425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426   (exit $ac_status); } &&
8427          { ac_try='test -z "$ac_c_werror_flag"
8428                          || test ! -s conftest.err'
8429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8430   (eval $ac_try) 2>&5
8431   ac_status=$?
8432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8433   (exit $ac_status); }; } &&
8434          { ac_try='test -s conftest.$ac_objext'
8435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8436   (eval $ac_try) 2>&5
8437   ac_status=$?
8438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8439   (exit $ac_status); }; }; then
8440   ac_header_compiler=yes
8441 else
8442   echo "$as_me: failed program was:" >&5
8443 sed 's/^/| /' conftest.$ac_ext >&5
8444
8445 ac_header_compiler=no
8446 fi
8447 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8448 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8449 echo "${ECHO_T}$ac_header_compiler" >&6
8450
8451 # Is the header present?
8452 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8453 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8454 cat >conftest.$ac_ext <<_ACEOF
8455 /* confdefs.h.  */
8456 _ACEOF
8457 cat confdefs.h >>conftest.$ac_ext
8458 cat >>conftest.$ac_ext <<_ACEOF
8459 /* end confdefs.h.  */
8460 #include <$ac_header>
8461 _ACEOF
8462 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8463   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8464   ac_status=$?
8465   grep -v '^ *+' conftest.er1 >conftest.err
8466   rm -f conftest.er1
8467   cat conftest.err >&5
8468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8469   (exit $ac_status); } >/dev/null; then
8470   if test -s conftest.err; then
8471     ac_cpp_err=$ac_c_preproc_warn_flag
8472     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8473   else
8474     ac_cpp_err=
8475   fi
8476 else
8477   ac_cpp_err=yes
8478 fi
8479 if test -z "$ac_cpp_err"; then
8480   ac_header_preproc=yes
8481 else
8482   echo "$as_me: failed program was:" >&5
8483 sed 's/^/| /' conftest.$ac_ext >&5
8484
8485   ac_header_preproc=no
8486 fi
8487 rm -f conftest.err conftest.$ac_ext
8488 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8489 echo "${ECHO_T}$ac_header_preproc" >&6
8490
8491 # So?  What about this header?
8492 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8493   yes:no: )
8494     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8495 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8496     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8497 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8498     ac_header_preproc=yes
8499     ;;
8500   no:yes:* )
8501     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8502 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8503     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8504 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8505     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8506 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8507     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8508 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8509     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8510 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8511     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8512 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8513     (
8514       cat <<\_ASBOX
8515 ## ---------------------------------------- ##
8516 ## Report this to pgsql-bugs@postgresql.org ##
8517 ## ---------------------------------------- ##
8518 _ASBOX
8519     ) |
8520       sed "s/^/$as_me: WARNING:     /" >&2
8521     ;;
8522 esac
8523 echo "$as_me:$LINENO: checking for $ac_header" >&5
8524 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8525 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8526   echo $ECHO_N "(cached) $ECHO_C" >&6
8527 else
8528   eval "$as_ac_Header=\$ac_header_preproc"
8529 fi
8530 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8531 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8532
8533 fi
8534 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8535   cat >>confdefs.h <<_ACEOF
8536 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8537 _ACEOF
8538
8539 else
8540
8541 for ac_header in history.h
8542 do
8543 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8544 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8545   echo "$as_me:$LINENO: checking for $ac_header" >&5
8546 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8547 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8548   echo $ECHO_N "(cached) $ECHO_C" >&6
8549 fi
8550 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8551 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8552 else
8553   # Is the header compilable?
8554 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8555 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8556 cat >conftest.$ac_ext <<_ACEOF
8557 /* confdefs.h.  */
8558 _ACEOF
8559 cat confdefs.h >>conftest.$ac_ext
8560 cat >>conftest.$ac_ext <<_ACEOF
8561 /* end confdefs.h.  */
8562 $ac_includes_default
8563 #include <$ac_header>
8564 _ACEOF
8565 rm -f conftest.$ac_objext
8566 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8567   (eval $ac_compile) 2>conftest.er1
8568   ac_status=$?
8569   grep -v '^ *+' conftest.er1 >conftest.err
8570   rm -f conftest.er1
8571   cat conftest.err >&5
8572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8573   (exit $ac_status); } &&
8574          { ac_try='test -z "$ac_c_werror_flag"
8575                          || test ! -s conftest.err'
8576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8577   (eval $ac_try) 2>&5
8578   ac_status=$?
8579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8580   (exit $ac_status); }; } &&
8581          { ac_try='test -s conftest.$ac_objext'
8582   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8583   (eval $ac_try) 2>&5
8584   ac_status=$?
8585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8586   (exit $ac_status); }; }; then
8587   ac_header_compiler=yes
8588 else
8589   echo "$as_me: failed program was:" >&5
8590 sed 's/^/| /' conftest.$ac_ext >&5
8591
8592 ac_header_compiler=no
8593 fi
8594 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8595 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8596 echo "${ECHO_T}$ac_header_compiler" >&6
8597
8598 # Is the header present?
8599 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8600 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8601 cat >conftest.$ac_ext <<_ACEOF
8602 /* confdefs.h.  */
8603 _ACEOF
8604 cat confdefs.h >>conftest.$ac_ext
8605 cat >>conftest.$ac_ext <<_ACEOF
8606 /* end confdefs.h.  */
8607 #include <$ac_header>
8608 _ACEOF
8609 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8610   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8611   ac_status=$?
8612   grep -v '^ *+' conftest.er1 >conftest.err
8613   rm -f conftest.er1
8614   cat conftest.err >&5
8615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8616   (exit $ac_status); } >/dev/null; then
8617   if test -s conftest.err; then
8618     ac_cpp_err=$ac_c_preproc_warn_flag
8619     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8620   else
8621     ac_cpp_err=
8622   fi
8623 else
8624   ac_cpp_err=yes
8625 fi
8626 if test -z "$ac_cpp_err"; then
8627   ac_header_preproc=yes
8628 else
8629   echo "$as_me: failed program was:" >&5
8630 sed 's/^/| /' conftest.$ac_ext >&5
8631
8632   ac_header_preproc=no
8633 fi
8634 rm -f conftest.err conftest.$ac_ext
8635 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8636 echo "${ECHO_T}$ac_header_preproc" >&6
8637
8638 # So?  What about this header?
8639 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8640   yes:no: )
8641     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8642 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8643     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8644 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8645     ac_header_preproc=yes
8646     ;;
8647   no:yes:* )
8648     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8649 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8650     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8651 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8652     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8653 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8654     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8655 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8656     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8657 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8658     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8659 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8660     (
8661       cat <<\_ASBOX
8662 ## ---------------------------------------- ##
8663 ## Report this to pgsql-bugs@postgresql.org ##
8664 ## ---------------------------------------- ##
8665 _ASBOX
8666     ) |
8667       sed "s/^/$as_me: WARNING:     /" >&2
8668     ;;
8669 esac
8670 echo "$as_me:$LINENO: checking for $ac_header" >&5
8671 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8672 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8673   echo $ECHO_N "(cached) $ECHO_C" >&6
8674 else
8675   eval "$as_ac_Header=\$ac_header_preproc"
8676 fi
8677 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8678 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8679
8680 fi
8681 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8682   cat >>confdefs.h <<_ACEOF
8683 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8684 _ACEOF
8685
8686 else
8687   { { echo "$as_me:$LINENO: error: history header not found
8688 If you have readline already installed, see config.log for details on the
8689 failure.  It is possible the compiler isn't looking in the proper directory.
8690 Use --without-readline to disable readline support." >&5
8691 echo "$as_me: error: history header not found
8692 If you have readline already installed, see config.log for details on the
8693 failure.  It is possible the compiler isn't looking in the proper directory.
8694 Use --without-readline to disable readline support." >&2;}
8695    { (exit 1); exit 1; }; }
8696 fi
8697
8698 done
8699
8700 fi
8701
8702 done
8703
8704 fi
8705
8706 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8707 # Some installations of libedit usurp /usr/include/readline/, which seems
8708 # bad practice, since in combined installations readline will have its headers
8709 # there.  We might have to resort to AC_EGREP checks to make sure we found
8710 # the proper header...
8711
8712 for ac_header in editline/readline.h
8713 do
8714 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8715 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8716   echo "$as_me:$LINENO: checking for $ac_header" >&5
8717 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8718 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8719   echo $ECHO_N "(cached) $ECHO_C" >&6
8720 fi
8721 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8722 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8723 else
8724   # Is the header compilable?
8725 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8726 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8727 cat >conftest.$ac_ext <<_ACEOF
8728 /* confdefs.h.  */
8729 _ACEOF
8730 cat confdefs.h >>conftest.$ac_ext
8731 cat >>conftest.$ac_ext <<_ACEOF
8732 /* end confdefs.h.  */
8733 $ac_includes_default
8734 #include <$ac_header>
8735 _ACEOF
8736 rm -f conftest.$ac_objext
8737 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8738   (eval $ac_compile) 2>conftest.er1
8739   ac_status=$?
8740   grep -v '^ *+' conftest.er1 >conftest.err
8741   rm -f conftest.er1
8742   cat conftest.err >&5
8743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8744   (exit $ac_status); } &&
8745          { ac_try='test -z "$ac_c_werror_flag"
8746                          || test ! -s conftest.err'
8747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8748   (eval $ac_try) 2>&5
8749   ac_status=$?
8750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751   (exit $ac_status); }; } &&
8752          { ac_try='test -s conftest.$ac_objext'
8753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8754   (eval $ac_try) 2>&5
8755   ac_status=$?
8756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757   (exit $ac_status); }; }; then
8758   ac_header_compiler=yes
8759 else
8760   echo "$as_me: failed program was:" >&5
8761 sed 's/^/| /' conftest.$ac_ext >&5
8762
8763 ac_header_compiler=no
8764 fi
8765 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8766 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8767 echo "${ECHO_T}$ac_header_compiler" >&6
8768
8769 # Is the header present?
8770 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8771 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8772 cat >conftest.$ac_ext <<_ACEOF
8773 /* confdefs.h.  */
8774 _ACEOF
8775 cat confdefs.h >>conftest.$ac_ext
8776 cat >>conftest.$ac_ext <<_ACEOF
8777 /* end confdefs.h.  */
8778 #include <$ac_header>
8779 _ACEOF
8780 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8781   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8782   ac_status=$?
8783   grep -v '^ *+' conftest.er1 >conftest.err
8784   rm -f conftest.er1
8785   cat conftest.err >&5
8786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8787   (exit $ac_status); } >/dev/null; then
8788   if test -s conftest.err; then
8789     ac_cpp_err=$ac_c_preproc_warn_flag
8790     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8791   else
8792     ac_cpp_err=
8793   fi
8794 else
8795   ac_cpp_err=yes
8796 fi
8797 if test -z "$ac_cpp_err"; then
8798   ac_header_preproc=yes
8799 else
8800   echo "$as_me: failed program was:" >&5
8801 sed 's/^/| /' conftest.$ac_ext >&5
8802
8803   ac_header_preproc=no
8804 fi
8805 rm -f conftest.err conftest.$ac_ext
8806 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8807 echo "${ECHO_T}$ac_header_preproc" >&6
8808
8809 # So?  What about this header?
8810 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8811   yes:no: )
8812     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8813 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8814     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8815 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8816     ac_header_preproc=yes
8817     ;;
8818   no:yes:* )
8819     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8820 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8821     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8822 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8823     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8824 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8825     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8826 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8827     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8828 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8829     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8830 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8831     (
8832       cat <<\_ASBOX
8833 ## ---------------------------------------- ##
8834 ## Report this to pgsql-bugs@postgresql.org ##
8835 ## ---------------------------------------- ##
8836 _ASBOX
8837     ) |
8838       sed "s/^/$as_me: WARNING:     /" >&2
8839     ;;
8840 esac
8841 echo "$as_me:$LINENO: checking for $ac_header" >&5
8842 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8843 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8844   echo $ECHO_N "(cached) $ECHO_C" >&6
8845 else
8846   eval "$as_ac_Header=\$ac_header_preproc"
8847 fi
8848 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8849 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8850
8851 fi
8852 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8853   cat >>confdefs.h <<_ACEOF
8854 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8855 _ACEOF
8856
8857 else
8858
8859 for ac_header in readline.h
8860 do
8861 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8862 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8863   echo "$as_me:$LINENO: checking for $ac_header" >&5
8864 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8865 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8866   echo $ECHO_N "(cached) $ECHO_C" >&6
8867 fi
8868 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8869 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8870 else
8871   # Is the header compilable?
8872 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8873 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8874 cat >conftest.$ac_ext <<_ACEOF
8875 /* confdefs.h.  */
8876 _ACEOF
8877 cat confdefs.h >>conftest.$ac_ext
8878 cat >>conftest.$ac_ext <<_ACEOF
8879 /* end confdefs.h.  */
8880 $ac_includes_default
8881 #include <$ac_header>
8882 _ACEOF
8883 rm -f conftest.$ac_objext
8884 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8885   (eval $ac_compile) 2>conftest.er1
8886   ac_status=$?
8887   grep -v '^ *+' conftest.er1 >conftest.err
8888   rm -f conftest.er1
8889   cat conftest.err >&5
8890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891   (exit $ac_status); } &&
8892          { ac_try='test -z "$ac_c_werror_flag"
8893                          || test ! -s conftest.err'
8894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8895   (eval $ac_try) 2>&5
8896   ac_status=$?
8897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8898   (exit $ac_status); }; } &&
8899          { ac_try='test -s conftest.$ac_objext'
8900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8901   (eval $ac_try) 2>&5
8902   ac_status=$?
8903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8904   (exit $ac_status); }; }; then
8905   ac_header_compiler=yes
8906 else
8907   echo "$as_me: failed program was:" >&5
8908 sed 's/^/| /' conftest.$ac_ext >&5
8909
8910 ac_header_compiler=no
8911 fi
8912 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8913 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8914 echo "${ECHO_T}$ac_header_compiler" >&6
8915
8916 # Is the header present?
8917 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8918 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8919 cat >conftest.$ac_ext <<_ACEOF
8920 /* confdefs.h.  */
8921 _ACEOF
8922 cat confdefs.h >>conftest.$ac_ext
8923 cat >>conftest.$ac_ext <<_ACEOF
8924 /* end confdefs.h.  */
8925 #include <$ac_header>
8926 _ACEOF
8927 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8928   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8929   ac_status=$?
8930   grep -v '^ *+' conftest.er1 >conftest.err
8931   rm -f conftest.er1
8932   cat conftest.err >&5
8933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8934   (exit $ac_status); } >/dev/null; then
8935   if test -s conftest.err; then
8936     ac_cpp_err=$ac_c_preproc_warn_flag
8937     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8938   else
8939     ac_cpp_err=
8940   fi
8941 else
8942   ac_cpp_err=yes
8943 fi
8944 if test -z "$ac_cpp_err"; then
8945   ac_header_preproc=yes
8946 else
8947   echo "$as_me: failed program was:" >&5
8948 sed 's/^/| /' conftest.$ac_ext >&5
8949
8950   ac_header_preproc=no
8951 fi
8952 rm -f conftest.err conftest.$ac_ext
8953 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8954 echo "${ECHO_T}$ac_header_preproc" >&6
8955
8956 # So?  What about this header?
8957 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8958   yes:no: )
8959     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8960 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8961     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8962 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8963     ac_header_preproc=yes
8964     ;;
8965   no:yes:* )
8966     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8967 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8968     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8969 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8970     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8971 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8972     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8973 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8974     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8975 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8976     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8977 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8978     (
8979       cat <<\_ASBOX
8980 ## ---------------------------------------- ##
8981 ## Report this to pgsql-bugs@postgresql.org ##
8982 ## ---------------------------------------- ##
8983 _ASBOX
8984     ) |
8985       sed "s/^/$as_me: WARNING:     /" >&2
8986     ;;
8987 esac
8988 echo "$as_me:$LINENO: checking for $ac_header" >&5
8989 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8990 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8991   echo $ECHO_N "(cached) $ECHO_C" >&6
8992 else
8993   eval "$as_ac_Header=\$ac_header_preproc"
8994 fi
8995 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8996 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8997
8998 fi
8999 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9000   cat >>confdefs.h <<_ACEOF
9001 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9002 _ACEOF
9003
9004 else
9005
9006 for ac_header in readline/readline.h
9007 do
9008 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9009 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9010   echo "$as_me:$LINENO: checking for $ac_header" >&5
9011 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9012 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9013   echo $ECHO_N "(cached) $ECHO_C" >&6
9014 fi
9015 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9016 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9017 else
9018   # Is the header compilable?
9019 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9020 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9021 cat >conftest.$ac_ext <<_ACEOF
9022 /* confdefs.h.  */
9023 _ACEOF
9024 cat confdefs.h >>conftest.$ac_ext
9025 cat >>conftest.$ac_ext <<_ACEOF
9026 /* end confdefs.h.  */
9027 $ac_includes_default
9028 #include <$ac_header>
9029 _ACEOF
9030 rm -f conftest.$ac_objext
9031 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9032   (eval $ac_compile) 2>conftest.er1
9033   ac_status=$?
9034   grep -v '^ *+' conftest.er1 >conftest.err
9035   rm -f conftest.er1
9036   cat conftest.err >&5
9037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9038   (exit $ac_status); } &&
9039          { ac_try='test -z "$ac_c_werror_flag"
9040                          || test ! -s conftest.err'
9041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9042   (eval $ac_try) 2>&5
9043   ac_status=$?
9044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9045   (exit $ac_status); }; } &&
9046          { ac_try='test -s conftest.$ac_objext'
9047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9048   (eval $ac_try) 2>&5
9049   ac_status=$?
9050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9051   (exit $ac_status); }; }; then
9052   ac_header_compiler=yes
9053 else
9054   echo "$as_me: failed program was:" >&5
9055 sed 's/^/| /' conftest.$ac_ext >&5
9056
9057 ac_header_compiler=no
9058 fi
9059 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9060 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9061 echo "${ECHO_T}$ac_header_compiler" >&6
9062
9063 # Is the header present?
9064 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9065 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9066 cat >conftest.$ac_ext <<_ACEOF
9067 /* confdefs.h.  */
9068 _ACEOF
9069 cat confdefs.h >>conftest.$ac_ext
9070 cat >>conftest.$ac_ext <<_ACEOF
9071 /* end confdefs.h.  */
9072 #include <$ac_header>
9073 _ACEOF
9074 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9075   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9076   ac_status=$?
9077   grep -v '^ *+' conftest.er1 >conftest.err
9078   rm -f conftest.er1
9079   cat conftest.err >&5
9080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9081   (exit $ac_status); } >/dev/null; then
9082   if test -s conftest.err; then
9083     ac_cpp_err=$ac_c_preproc_warn_flag
9084     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9085   else
9086     ac_cpp_err=
9087   fi
9088 else
9089   ac_cpp_err=yes
9090 fi
9091 if test -z "$ac_cpp_err"; then
9092   ac_header_preproc=yes
9093 else
9094   echo "$as_me: failed program was:" >&5
9095 sed 's/^/| /' conftest.$ac_ext >&5
9096
9097   ac_header_preproc=no
9098 fi
9099 rm -f conftest.err conftest.$ac_ext
9100 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9101 echo "${ECHO_T}$ac_header_preproc" >&6
9102
9103 # So?  What about this header?
9104 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9105   yes:no: )
9106     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9107 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9108     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9109 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9110     ac_header_preproc=yes
9111     ;;
9112   no:yes:* )
9113     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9114 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9115     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9116 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9117     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9118 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9119     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9120 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9121     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9122 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9123     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9124 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9125     (
9126       cat <<\_ASBOX
9127 ## ---------------------------------------- ##
9128 ## Report this to pgsql-bugs@postgresql.org ##
9129 ## ---------------------------------------- ##
9130 _ASBOX
9131     ) |
9132       sed "s/^/$as_me: WARNING:     /" >&2
9133     ;;
9134 esac
9135 echo "$as_me:$LINENO: checking for $ac_header" >&5
9136 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9137 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9138   echo $ECHO_N "(cached) $ECHO_C" >&6
9139 else
9140   eval "$as_ac_Header=\$ac_header_preproc"
9141 fi
9142 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9143 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9144
9145 fi
9146 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9147   cat >>confdefs.h <<_ACEOF
9148 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9149 _ACEOF
9150
9151 else
9152   { { echo "$as_me:$LINENO: error: readline header not found
9153 If you have libedit already installed, see config.log for details on the
9154 failure.  It is possible the compiler isn't looking in the proper directory.
9155 Use --without-readline to disable libedit support." >&5
9156 echo "$as_me: error: readline header not found
9157 If you have libedit already installed, see config.log for details on the
9158 failure.  It is possible the compiler isn't looking in the proper directory.
9159 Use --without-readline to disable libedit support." >&2;}
9160    { (exit 1); exit 1; }; }
9161 fi
9162
9163 done
9164
9165 fi
9166
9167 done
9168
9169 fi
9170
9171 done
9172
9173 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9174 # not be there at all.  Hence, don't complain if not found.  We must check
9175 # though, since in yet other versions it is an independent header.
9176
9177 for ac_header in editline/history.h
9178 do
9179 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9180 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9181   echo "$as_me:$LINENO: checking for $ac_header" >&5
9182 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9183 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9184   echo $ECHO_N "(cached) $ECHO_C" >&6
9185 fi
9186 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9187 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9188 else
9189   # Is the header compilable?
9190 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9191 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9192 cat >conftest.$ac_ext <<_ACEOF
9193 /* confdefs.h.  */
9194 _ACEOF
9195 cat confdefs.h >>conftest.$ac_ext
9196 cat >>conftest.$ac_ext <<_ACEOF
9197 /* end confdefs.h.  */
9198 $ac_includes_default
9199 #include <$ac_header>
9200 _ACEOF
9201 rm -f conftest.$ac_objext
9202 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9203   (eval $ac_compile) 2>conftest.er1
9204   ac_status=$?
9205   grep -v '^ *+' conftest.er1 >conftest.err
9206   rm -f conftest.er1
9207   cat conftest.err >&5
9208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9209   (exit $ac_status); } &&
9210          { ac_try='test -z "$ac_c_werror_flag"
9211                          || test ! -s conftest.err'
9212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9213   (eval $ac_try) 2>&5
9214   ac_status=$?
9215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9216   (exit $ac_status); }; } &&
9217          { ac_try='test -s conftest.$ac_objext'
9218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9219   (eval $ac_try) 2>&5
9220   ac_status=$?
9221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9222   (exit $ac_status); }; }; then
9223   ac_header_compiler=yes
9224 else
9225   echo "$as_me: failed program was:" >&5
9226 sed 's/^/| /' conftest.$ac_ext >&5
9227
9228 ac_header_compiler=no
9229 fi
9230 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9231 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9232 echo "${ECHO_T}$ac_header_compiler" >&6
9233
9234 # Is the header present?
9235 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9236 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9237 cat >conftest.$ac_ext <<_ACEOF
9238 /* confdefs.h.  */
9239 _ACEOF
9240 cat confdefs.h >>conftest.$ac_ext
9241 cat >>conftest.$ac_ext <<_ACEOF
9242 /* end confdefs.h.  */
9243 #include <$ac_header>
9244 _ACEOF
9245 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9246   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9247   ac_status=$?
9248   grep -v '^ *+' conftest.er1 >conftest.err
9249   rm -f conftest.er1
9250   cat conftest.err >&5
9251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9252   (exit $ac_status); } >/dev/null; then
9253   if test -s conftest.err; then
9254     ac_cpp_err=$ac_c_preproc_warn_flag
9255     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9256   else
9257     ac_cpp_err=
9258   fi
9259 else
9260   ac_cpp_err=yes
9261 fi
9262 if test -z "$ac_cpp_err"; then
9263   ac_header_preproc=yes
9264 else
9265   echo "$as_me: failed program was:" >&5
9266 sed 's/^/| /' conftest.$ac_ext >&5
9267
9268   ac_header_preproc=no
9269 fi
9270 rm -f conftest.err conftest.$ac_ext
9271 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9272 echo "${ECHO_T}$ac_header_preproc" >&6
9273
9274 # So?  What about this header?
9275 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9276   yes:no: )
9277     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9278 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9279     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9280 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9281     ac_header_preproc=yes
9282     ;;
9283   no:yes:* )
9284     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9285 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9286     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9287 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9288     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9289 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9290     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9291 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9292     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9293 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9294     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9295 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9296     (
9297       cat <<\_ASBOX
9298 ## ---------------------------------------- ##
9299 ## Report this to pgsql-bugs@postgresql.org ##
9300 ## ---------------------------------------- ##
9301 _ASBOX
9302     ) |
9303       sed "s/^/$as_me: WARNING:     /" >&2
9304     ;;
9305 esac
9306 echo "$as_me:$LINENO: checking for $ac_header" >&5
9307 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9309   echo $ECHO_N "(cached) $ECHO_C" >&6
9310 else
9311   eval "$as_ac_Header=\$ac_header_preproc"
9312 fi
9313 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9314 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9315
9316 fi
9317 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9318   cat >>confdefs.h <<_ACEOF
9319 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9320 _ACEOF
9321
9322 else
9323
9324 for ac_header in history.h
9325 do
9326 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9328   echo "$as_me:$LINENO: checking for $ac_header" >&5
9329 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9330 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9331   echo $ECHO_N "(cached) $ECHO_C" >&6
9332 fi
9333 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9334 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9335 else
9336   # Is the header compilable?
9337 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9338 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9339 cat >conftest.$ac_ext <<_ACEOF
9340 /* confdefs.h.  */
9341 _ACEOF
9342 cat confdefs.h >>conftest.$ac_ext
9343 cat >>conftest.$ac_ext <<_ACEOF
9344 /* end confdefs.h.  */
9345 $ac_includes_default
9346 #include <$ac_header>
9347 _ACEOF
9348 rm -f conftest.$ac_objext
9349 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9350   (eval $ac_compile) 2>conftest.er1
9351   ac_status=$?
9352   grep -v '^ *+' conftest.er1 >conftest.err
9353   rm -f conftest.er1
9354   cat conftest.err >&5
9355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9356   (exit $ac_status); } &&
9357          { ac_try='test -z "$ac_c_werror_flag"
9358                          || test ! -s conftest.err'
9359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9360   (eval $ac_try) 2>&5
9361   ac_status=$?
9362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9363   (exit $ac_status); }; } &&
9364          { ac_try='test -s conftest.$ac_objext'
9365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9366   (eval $ac_try) 2>&5
9367   ac_status=$?
9368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9369   (exit $ac_status); }; }; then
9370   ac_header_compiler=yes
9371 else
9372   echo "$as_me: failed program was:" >&5
9373 sed 's/^/| /' conftest.$ac_ext >&5
9374
9375 ac_header_compiler=no
9376 fi
9377 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9378 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9379 echo "${ECHO_T}$ac_header_compiler" >&6
9380
9381 # Is the header present?
9382 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9383 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9384 cat >conftest.$ac_ext <<_ACEOF
9385 /* confdefs.h.  */
9386 _ACEOF
9387 cat confdefs.h >>conftest.$ac_ext
9388 cat >>conftest.$ac_ext <<_ACEOF
9389 /* end confdefs.h.  */
9390 #include <$ac_header>
9391 _ACEOF
9392 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9393   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9394   ac_status=$?
9395   grep -v '^ *+' conftest.er1 >conftest.err
9396   rm -f conftest.er1
9397   cat conftest.err >&5
9398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399   (exit $ac_status); } >/dev/null; then
9400   if test -s conftest.err; then
9401     ac_cpp_err=$ac_c_preproc_warn_flag
9402     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9403   else
9404     ac_cpp_err=
9405   fi
9406 else
9407   ac_cpp_err=yes
9408 fi
9409 if test -z "$ac_cpp_err"; then
9410   ac_header_preproc=yes
9411 else
9412   echo "$as_me: failed program was:" >&5
9413 sed 's/^/| /' conftest.$ac_ext >&5
9414
9415   ac_header_preproc=no
9416 fi
9417 rm -f conftest.err conftest.$ac_ext
9418 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9419 echo "${ECHO_T}$ac_header_preproc" >&6
9420
9421 # So?  What about this header?
9422 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9423   yes:no: )
9424     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9425 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9426     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9427 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9428     ac_header_preproc=yes
9429     ;;
9430   no:yes:* )
9431     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9432 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9433     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9434 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9435     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9436 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9437     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9438 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9439     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9440 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9441     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9442 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9443     (
9444       cat <<\_ASBOX
9445 ## ---------------------------------------- ##
9446 ## Report this to pgsql-bugs@postgresql.org ##
9447 ## ---------------------------------------- ##
9448 _ASBOX
9449     ) |
9450       sed "s/^/$as_me: WARNING:     /" >&2
9451     ;;
9452 esac
9453 echo "$as_me:$LINENO: checking for $ac_header" >&5
9454 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9455 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9456   echo $ECHO_N "(cached) $ECHO_C" >&6
9457 else
9458   eval "$as_ac_Header=\$ac_header_preproc"
9459 fi
9460 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9461 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9462
9463 fi
9464 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9465   cat >>confdefs.h <<_ACEOF
9466 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9467 _ACEOF
9468
9469 else
9470
9471 for ac_header in readline/history.h
9472 do
9473 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9474 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9475   echo "$as_me:$LINENO: checking for $ac_header" >&5
9476 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9477 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9478   echo $ECHO_N "(cached) $ECHO_C" >&6
9479 fi
9480 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9481 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9482 else
9483   # Is the header compilable?
9484 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9485 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9486 cat >conftest.$ac_ext <<_ACEOF
9487 /* confdefs.h.  */
9488 _ACEOF
9489 cat confdefs.h >>conftest.$ac_ext
9490 cat >>conftest.$ac_ext <<_ACEOF
9491 /* end confdefs.h.  */
9492 $ac_includes_default
9493 #include <$ac_header>
9494 _ACEOF
9495 rm -f conftest.$ac_objext
9496 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9497   (eval $ac_compile) 2>conftest.er1
9498   ac_status=$?
9499   grep -v '^ *+' conftest.er1 >conftest.err
9500   rm -f conftest.er1
9501   cat conftest.err >&5
9502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9503   (exit $ac_status); } &&
9504          { ac_try='test -z "$ac_c_werror_flag"
9505                          || test ! -s conftest.err'
9506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9507   (eval $ac_try) 2>&5
9508   ac_status=$?
9509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9510   (exit $ac_status); }; } &&
9511          { ac_try='test -s conftest.$ac_objext'
9512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9513   (eval $ac_try) 2>&5
9514   ac_status=$?
9515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9516   (exit $ac_status); }; }; then
9517   ac_header_compiler=yes
9518 else
9519   echo "$as_me: failed program was:" >&5
9520 sed 's/^/| /' conftest.$ac_ext >&5
9521
9522 ac_header_compiler=no
9523 fi
9524 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9525 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9526 echo "${ECHO_T}$ac_header_compiler" >&6
9527
9528 # Is the header present?
9529 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9530 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9531 cat >conftest.$ac_ext <<_ACEOF
9532 /* confdefs.h.  */
9533 _ACEOF
9534 cat confdefs.h >>conftest.$ac_ext
9535 cat >>conftest.$ac_ext <<_ACEOF
9536 /* end confdefs.h.  */
9537 #include <$ac_header>
9538 _ACEOF
9539 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9540   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9541   ac_status=$?
9542   grep -v '^ *+' conftest.er1 >conftest.err
9543   rm -f conftest.er1
9544   cat conftest.err >&5
9545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9546   (exit $ac_status); } >/dev/null; then
9547   if test -s conftest.err; then
9548     ac_cpp_err=$ac_c_preproc_warn_flag
9549     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9550   else
9551     ac_cpp_err=
9552   fi
9553 else
9554   ac_cpp_err=yes
9555 fi
9556 if test -z "$ac_cpp_err"; then
9557   ac_header_preproc=yes
9558 else
9559   echo "$as_me: failed program was:" >&5
9560 sed 's/^/| /' conftest.$ac_ext >&5
9561
9562   ac_header_preproc=no
9563 fi
9564 rm -f conftest.err conftest.$ac_ext
9565 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9566 echo "${ECHO_T}$ac_header_preproc" >&6
9567
9568 # So?  What about this header?
9569 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9570   yes:no: )
9571     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9572 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9573     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9574 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9575     ac_header_preproc=yes
9576     ;;
9577   no:yes:* )
9578     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9579 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9580     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9581 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9582     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9583 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9584     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9585 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9586     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9587 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9588     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9589 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9590     (
9591       cat <<\_ASBOX
9592 ## ---------------------------------------- ##
9593 ## Report this to pgsql-bugs@postgresql.org ##
9594 ## ---------------------------------------- ##
9595 _ASBOX
9596     ) |
9597       sed "s/^/$as_me: WARNING:     /" >&2
9598     ;;
9599 esac
9600 echo "$as_me:$LINENO: checking for $ac_header" >&5
9601 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9602 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9603   echo $ECHO_N "(cached) $ECHO_C" >&6
9604 else
9605   eval "$as_ac_Header=\$ac_header_preproc"
9606 fi
9607 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9608 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9609
9610 fi
9611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9612   cat >>confdefs.h <<_ACEOF
9613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9614 _ACEOF
9615
9616 fi
9617
9618 done
9619
9620 fi
9621
9622 done
9623
9624 fi
9625
9626 done
9627
9628 fi
9629
9630 if test "$with_zlib" = yes; then
9631   if test "${ac_cv_header_zlib_h+set}" = set; then
9632   echo "$as_me:$LINENO: checking for zlib.h" >&5
9633 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9634 if test "${ac_cv_header_zlib_h+set}" = set; then
9635   echo $ECHO_N "(cached) $ECHO_C" >&6
9636 fi
9637 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9638 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9639 else
9640   # Is the header compilable?
9641 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9642 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9643 cat >conftest.$ac_ext <<_ACEOF
9644 /* confdefs.h.  */
9645 _ACEOF
9646 cat confdefs.h >>conftest.$ac_ext
9647 cat >>conftest.$ac_ext <<_ACEOF
9648 /* end confdefs.h.  */
9649 $ac_includes_default
9650 #include <zlib.h>
9651 _ACEOF
9652 rm -f conftest.$ac_objext
9653 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9654   (eval $ac_compile) 2>conftest.er1
9655   ac_status=$?
9656   grep -v '^ *+' conftest.er1 >conftest.err
9657   rm -f conftest.er1
9658   cat conftest.err >&5
9659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9660   (exit $ac_status); } &&
9661          { ac_try='test -z "$ac_c_werror_flag"
9662                          || test ! -s conftest.err'
9663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9664   (eval $ac_try) 2>&5
9665   ac_status=$?
9666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667   (exit $ac_status); }; } &&
9668          { ac_try='test -s conftest.$ac_objext'
9669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9670   (eval $ac_try) 2>&5
9671   ac_status=$?
9672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9673   (exit $ac_status); }; }; then
9674   ac_header_compiler=yes
9675 else
9676   echo "$as_me: failed program was:" >&5
9677 sed 's/^/| /' conftest.$ac_ext >&5
9678
9679 ac_header_compiler=no
9680 fi
9681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9682 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9683 echo "${ECHO_T}$ac_header_compiler" >&6
9684
9685 # Is the header present?
9686 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9687 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9688 cat >conftest.$ac_ext <<_ACEOF
9689 /* confdefs.h.  */
9690 _ACEOF
9691 cat confdefs.h >>conftest.$ac_ext
9692 cat >>conftest.$ac_ext <<_ACEOF
9693 /* end confdefs.h.  */
9694 #include <zlib.h>
9695 _ACEOF
9696 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9697   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9698   ac_status=$?
9699   grep -v '^ *+' conftest.er1 >conftest.err
9700   rm -f conftest.er1
9701   cat conftest.err >&5
9702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9703   (exit $ac_status); } >/dev/null; then
9704   if test -s conftest.err; then
9705     ac_cpp_err=$ac_c_preproc_warn_flag
9706     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9707   else
9708     ac_cpp_err=
9709   fi
9710 else
9711   ac_cpp_err=yes
9712 fi
9713 if test -z "$ac_cpp_err"; then
9714   ac_header_preproc=yes
9715 else
9716   echo "$as_me: failed program was:" >&5
9717 sed 's/^/| /' conftest.$ac_ext >&5
9718
9719   ac_header_preproc=no
9720 fi
9721 rm -f conftest.err conftest.$ac_ext
9722 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9723 echo "${ECHO_T}$ac_header_preproc" >&6
9724
9725 # So?  What about this header?
9726 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9727   yes:no: )
9728     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9729 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9730     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9731 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9732     ac_header_preproc=yes
9733     ;;
9734   no:yes:* )
9735     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9736 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9737     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9738 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9739     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9740 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9741     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9742 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9743     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9744 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9745     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9746 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9747     (
9748       cat <<\_ASBOX
9749 ## ---------------------------------------- ##
9750 ## Report this to pgsql-bugs@postgresql.org ##
9751 ## ---------------------------------------- ##
9752 _ASBOX
9753     ) |
9754       sed "s/^/$as_me: WARNING:     /" >&2
9755     ;;
9756 esac
9757 echo "$as_me:$LINENO: checking for zlib.h" >&5
9758 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9759 if test "${ac_cv_header_zlib_h+set}" = set; then
9760   echo $ECHO_N "(cached) $ECHO_C" >&6
9761 else
9762   ac_cv_header_zlib_h=$ac_header_preproc
9763 fi
9764 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9765 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9766
9767 fi
9768 if test $ac_cv_header_zlib_h = yes; then
9769   :
9770 else
9771   { { echo "$as_me:$LINENO: error: zlib header not found
9772 If you have zlib already installed, see config.log for details on the
9773 failure.  It is possible the compiler isn't looking in the proper directory.
9774 Use --without-zlib to disable zlib support." >&5
9775 echo "$as_me: error: zlib header not found
9776 If you have zlib already installed, see config.log for details on the
9777 failure.  It is possible the compiler isn't looking in the proper directory.
9778 Use --without-zlib to disable zlib support." >&2;}
9779    { (exit 1); exit 1; }; }
9780 fi
9781
9782
9783 fi
9784
9785 if test "$with_krb5" = yes ; then
9786   if test "${ac_cv_header_krb5_h+set}" = set; then
9787   echo "$as_me:$LINENO: checking for krb5.h" >&5
9788 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9789 if test "${ac_cv_header_krb5_h+set}" = set; then
9790   echo $ECHO_N "(cached) $ECHO_C" >&6
9791 fi
9792 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9793 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9794 else
9795   # Is the header compilable?
9796 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9797 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9798 cat >conftest.$ac_ext <<_ACEOF
9799 /* confdefs.h.  */
9800 _ACEOF
9801 cat confdefs.h >>conftest.$ac_ext
9802 cat >>conftest.$ac_ext <<_ACEOF
9803 /* end confdefs.h.  */
9804 $ac_includes_default
9805 #include <krb5.h>
9806 _ACEOF
9807 rm -f conftest.$ac_objext
9808 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9809   (eval $ac_compile) 2>conftest.er1
9810   ac_status=$?
9811   grep -v '^ *+' conftest.er1 >conftest.err
9812   rm -f conftest.er1
9813   cat conftest.err >&5
9814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9815   (exit $ac_status); } &&
9816          { ac_try='test -z "$ac_c_werror_flag"
9817                          || test ! -s conftest.err'
9818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9819   (eval $ac_try) 2>&5
9820   ac_status=$?
9821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9822   (exit $ac_status); }; } &&
9823          { ac_try='test -s conftest.$ac_objext'
9824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9825   (eval $ac_try) 2>&5
9826   ac_status=$?
9827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9828   (exit $ac_status); }; }; then
9829   ac_header_compiler=yes
9830 else
9831   echo "$as_me: failed program was:" >&5
9832 sed 's/^/| /' conftest.$ac_ext >&5
9833
9834 ac_header_compiler=no
9835 fi
9836 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9837 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9838 echo "${ECHO_T}$ac_header_compiler" >&6
9839
9840 # Is the header present?
9841 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9842 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9843 cat >conftest.$ac_ext <<_ACEOF
9844 /* confdefs.h.  */
9845 _ACEOF
9846 cat confdefs.h >>conftest.$ac_ext
9847 cat >>conftest.$ac_ext <<_ACEOF
9848 /* end confdefs.h.  */
9849 #include <krb5.h>
9850 _ACEOF
9851 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9852   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9853   ac_status=$?
9854   grep -v '^ *+' conftest.er1 >conftest.err
9855   rm -f conftest.er1
9856   cat conftest.err >&5
9857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858   (exit $ac_status); } >/dev/null; then
9859   if test -s conftest.err; then
9860     ac_cpp_err=$ac_c_preproc_warn_flag
9861     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9862   else
9863     ac_cpp_err=
9864   fi
9865 else
9866   ac_cpp_err=yes
9867 fi
9868 if test -z "$ac_cpp_err"; then
9869   ac_header_preproc=yes
9870 else
9871   echo "$as_me: failed program was:" >&5
9872 sed 's/^/| /' conftest.$ac_ext >&5
9873
9874   ac_header_preproc=no
9875 fi
9876 rm -f conftest.err conftest.$ac_ext
9877 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9878 echo "${ECHO_T}$ac_header_preproc" >&6
9879
9880 # So?  What about this header?
9881 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9882   yes:no: )
9883     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9884 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9885     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9886 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9887     ac_header_preproc=yes
9888     ;;
9889   no:yes:* )
9890     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9891 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9892     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9893 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9894     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9895 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9896     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9897 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9898     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9899 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9900     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9901 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9902     (
9903       cat <<\_ASBOX
9904 ## ---------------------------------------- ##
9905 ## Report this to pgsql-bugs@postgresql.org ##
9906 ## ---------------------------------------- ##
9907 _ASBOX
9908     ) |
9909       sed "s/^/$as_me: WARNING:     /" >&2
9910     ;;
9911 esac
9912 echo "$as_me:$LINENO: checking for krb5.h" >&5
9913 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9914 if test "${ac_cv_header_krb5_h+set}" = set; then
9915   echo $ECHO_N "(cached) $ECHO_C" >&6
9916 else
9917   ac_cv_header_krb5_h=$ac_header_preproc
9918 fi
9919 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9920 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9921
9922 fi
9923 if test $ac_cv_header_krb5_h = yes; then
9924   :
9925 else
9926   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9927 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9928    { (exit 1); exit 1; }; }
9929 fi
9930
9931
9932 fi
9933
9934 if test "$with_openssl" = yes ; then
9935   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9936   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9937 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9938 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9939   echo $ECHO_N "(cached) $ECHO_C" >&6
9940 fi
9941 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9942 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9943 else
9944   # Is the header compilable?
9945 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9946 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9947 cat >conftest.$ac_ext <<_ACEOF
9948 /* confdefs.h.  */
9949 _ACEOF
9950 cat confdefs.h >>conftest.$ac_ext
9951 cat >>conftest.$ac_ext <<_ACEOF
9952 /* end confdefs.h.  */
9953 $ac_includes_default
9954 #include <openssl/ssl.h>
9955 _ACEOF
9956 rm -f conftest.$ac_objext
9957 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9958   (eval $ac_compile) 2>conftest.er1
9959   ac_status=$?
9960   grep -v '^ *+' conftest.er1 >conftest.err
9961   rm -f conftest.er1
9962   cat conftest.err >&5
9963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9964   (exit $ac_status); } &&
9965          { ac_try='test -z "$ac_c_werror_flag"
9966                          || test ! -s conftest.err'
9967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9968   (eval $ac_try) 2>&5
9969   ac_status=$?
9970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9971   (exit $ac_status); }; } &&
9972          { ac_try='test -s conftest.$ac_objext'
9973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9974   (eval $ac_try) 2>&5
9975   ac_status=$?
9976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9977   (exit $ac_status); }; }; then
9978   ac_header_compiler=yes
9979 else
9980   echo "$as_me: failed program was:" >&5
9981 sed 's/^/| /' conftest.$ac_ext >&5
9982
9983 ac_header_compiler=no
9984 fi
9985 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9986 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9987 echo "${ECHO_T}$ac_header_compiler" >&6
9988
9989 # Is the header present?
9990 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
9991 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
9992 cat >conftest.$ac_ext <<_ACEOF
9993 /* confdefs.h.  */
9994 _ACEOF
9995 cat confdefs.h >>conftest.$ac_ext
9996 cat >>conftest.$ac_ext <<_ACEOF
9997 /* end confdefs.h.  */
9998 #include <openssl/ssl.h>
9999 _ACEOF
10000 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10001   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10002   ac_status=$?
10003   grep -v '^ *+' conftest.er1 >conftest.err
10004   rm -f conftest.er1
10005   cat conftest.err >&5
10006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007   (exit $ac_status); } >/dev/null; then
10008   if test -s conftest.err; then
10009     ac_cpp_err=$ac_c_preproc_warn_flag
10010     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10011   else
10012     ac_cpp_err=
10013   fi
10014 else
10015   ac_cpp_err=yes
10016 fi
10017 if test -z "$ac_cpp_err"; then
10018   ac_header_preproc=yes
10019 else
10020   echo "$as_me: failed program was:" >&5
10021 sed 's/^/| /' conftest.$ac_ext >&5
10022
10023   ac_header_preproc=no
10024 fi
10025 rm -f conftest.err conftest.$ac_ext
10026 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10027 echo "${ECHO_T}$ac_header_preproc" >&6
10028
10029 # So?  What about this header?
10030 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10031   yes:no: )
10032     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10033 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10034     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10035 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10036     ac_header_preproc=yes
10037     ;;
10038   no:yes:* )
10039     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10040 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10041     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10042 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10043     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10044 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10045     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10046 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10047     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10048 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10049     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10050 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10051     (
10052       cat <<\_ASBOX
10053 ## ---------------------------------------- ##
10054 ## Report this to pgsql-bugs@postgresql.org ##
10055 ## ---------------------------------------- ##
10056 _ASBOX
10057     ) |
10058       sed "s/^/$as_me: WARNING:     /" >&2
10059     ;;
10060 esac
10061 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10062 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10063 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10064   echo $ECHO_N "(cached) $ECHO_C" >&6
10065 else
10066   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10067 fi
10068 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10069 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10070
10071 fi
10072 if test $ac_cv_header_openssl_ssl_h = yes; then
10073   :
10074 else
10075   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10076 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10077    { (exit 1); exit 1; }; }
10078 fi
10079
10080
10081   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10082   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10083 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10084 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10085   echo $ECHO_N "(cached) $ECHO_C" >&6
10086 fi
10087 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10088 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10089 else
10090   # Is the header compilable?
10091 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10092 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10093 cat >conftest.$ac_ext <<_ACEOF
10094 /* confdefs.h.  */
10095 _ACEOF
10096 cat confdefs.h >>conftest.$ac_ext
10097 cat >>conftest.$ac_ext <<_ACEOF
10098 /* end confdefs.h.  */
10099 $ac_includes_default
10100 #include <openssl/err.h>
10101 _ACEOF
10102 rm -f conftest.$ac_objext
10103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10104   (eval $ac_compile) 2>conftest.er1
10105   ac_status=$?
10106   grep -v '^ *+' conftest.er1 >conftest.err
10107   rm -f conftest.er1
10108   cat conftest.err >&5
10109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10110   (exit $ac_status); } &&
10111          { ac_try='test -z "$ac_c_werror_flag"
10112                          || test ! -s conftest.err'
10113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10114   (eval $ac_try) 2>&5
10115   ac_status=$?
10116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10117   (exit $ac_status); }; } &&
10118          { ac_try='test -s conftest.$ac_objext'
10119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10120   (eval $ac_try) 2>&5
10121   ac_status=$?
10122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10123   (exit $ac_status); }; }; then
10124   ac_header_compiler=yes
10125 else
10126   echo "$as_me: failed program was:" >&5
10127 sed 's/^/| /' conftest.$ac_ext >&5
10128
10129 ac_header_compiler=no
10130 fi
10131 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10132 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10133 echo "${ECHO_T}$ac_header_compiler" >&6
10134
10135 # Is the header present?
10136 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10137 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10138 cat >conftest.$ac_ext <<_ACEOF
10139 /* confdefs.h.  */
10140 _ACEOF
10141 cat confdefs.h >>conftest.$ac_ext
10142 cat >>conftest.$ac_ext <<_ACEOF
10143 /* end confdefs.h.  */
10144 #include <openssl/err.h>
10145 _ACEOF
10146 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10147   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10148   ac_status=$?
10149   grep -v '^ *+' conftest.er1 >conftest.err
10150   rm -f conftest.er1
10151   cat conftest.err >&5
10152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153   (exit $ac_status); } >/dev/null; then
10154   if test -s conftest.err; then
10155     ac_cpp_err=$ac_c_preproc_warn_flag
10156     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10157   else
10158     ac_cpp_err=
10159   fi
10160 else
10161   ac_cpp_err=yes
10162 fi
10163 if test -z "$ac_cpp_err"; then
10164   ac_header_preproc=yes
10165 else
10166   echo "$as_me: failed program was:" >&5
10167 sed 's/^/| /' conftest.$ac_ext >&5
10168
10169   ac_header_preproc=no
10170 fi
10171 rm -f conftest.err conftest.$ac_ext
10172 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10173 echo "${ECHO_T}$ac_header_preproc" >&6
10174
10175 # So?  What about this header?
10176 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10177   yes:no: )
10178     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10179 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10180     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10181 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10182     ac_header_preproc=yes
10183     ;;
10184   no:yes:* )
10185     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10186 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10187     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10188 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10189     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10190 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10191     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10192 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10193     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10194 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10195     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10196 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10197     (
10198       cat <<\_ASBOX
10199 ## ---------------------------------------- ##
10200 ## Report this to pgsql-bugs@postgresql.org ##
10201 ## ---------------------------------------- ##
10202 _ASBOX
10203     ) |
10204       sed "s/^/$as_me: WARNING:     /" >&2
10205     ;;
10206 esac
10207 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10208 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10209 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10210   echo $ECHO_N "(cached) $ECHO_C" >&6
10211 else
10212   ac_cv_header_openssl_err_h=$ac_header_preproc
10213 fi
10214 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10215 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10216
10217 fi
10218 if test $ac_cv_header_openssl_err_h = yes; then
10219   :
10220 else
10221   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10222 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10223    { (exit 1); exit 1; }; }
10224 fi
10225
10226
10227 fi
10228
10229 if test "$with_pam" = yes ; then
10230
10231 for ac_header in security/pam_appl.h
10232 do
10233 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10234 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10235   echo "$as_me:$LINENO: checking for $ac_header" >&5
10236 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10237 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10238   echo $ECHO_N "(cached) $ECHO_C" >&6
10239 fi
10240 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10241 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10242 else
10243   # Is the header compilable?
10244 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10245 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10246 cat >conftest.$ac_ext <<_ACEOF
10247 /* confdefs.h.  */
10248 _ACEOF
10249 cat confdefs.h >>conftest.$ac_ext
10250 cat >>conftest.$ac_ext <<_ACEOF
10251 /* end confdefs.h.  */
10252 $ac_includes_default
10253 #include <$ac_header>
10254 _ACEOF
10255 rm -f conftest.$ac_objext
10256 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10257   (eval $ac_compile) 2>conftest.er1
10258   ac_status=$?
10259   grep -v '^ *+' conftest.er1 >conftest.err
10260   rm -f conftest.er1
10261   cat conftest.err >&5
10262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10263   (exit $ac_status); } &&
10264          { ac_try='test -z "$ac_c_werror_flag"
10265                          || test ! -s conftest.err'
10266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10267   (eval $ac_try) 2>&5
10268   ac_status=$?
10269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10270   (exit $ac_status); }; } &&
10271          { ac_try='test -s conftest.$ac_objext'
10272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10273   (eval $ac_try) 2>&5
10274   ac_status=$?
10275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10276   (exit $ac_status); }; }; then
10277   ac_header_compiler=yes
10278 else
10279   echo "$as_me: failed program was:" >&5
10280 sed 's/^/| /' conftest.$ac_ext >&5
10281
10282 ac_header_compiler=no
10283 fi
10284 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10285 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10286 echo "${ECHO_T}$ac_header_compiler" >&6
10287
10288 # Is the header present?
10289 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10290 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10291 cat >conftest.$ac_ext <<_ACEOF
10292 /* confdefs.h.  */
10293 _ACEOF
10294 cat confdefs.h >>conftest.$ac_ext
10295 cat >>conftest.$ac_ext <<_ACEOF
10296 /* end confdefs.h.  */
10297 #include <$ac_header>
10298 _ACEOF
10299 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10300   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10301   ac_status=$?
10302   grep -v '^ *+' conftest.er1 >conftest.err
10303   rm -f conftest.er1
10304   cat conftest.err >&5
10305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10306   (exit $ac_status); } >/dev/null; then
10307   if test -s conftest.err; then
10308     ac_cpp_err=$ac_c_preproc_warn_flag
10309     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10310   else
10311     ac_cpp_err=
10312   fi
10313 else
10314   ac_cpp_err=yes
10315 fi
10316 if test -z "$ac_cpp_err"; then
10317   ac_header_preproc=yes
10318 else
10319   echo "$as_me: failed program was:" >&5
10320 sed 's/^/| /' conftest.$ac_ext >&5
10321
10322   ac_header_preproc=no
10323 fi
10324 rm -f conftest.err conftest.$ac_ext
10325 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10326 echo "${ECHO_T}$ac_header_preproc" >&6
10327
10328 # So?  What about this header?
10329 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10330   yes:no: )
10331     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10332 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10333     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10334 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10335     ac_header_preproc=yes
10336     ;;
10337   no:yes:* )
10338     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10339 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10340     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10341 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10342     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10343 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10344     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10345 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10346     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10347 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10348     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10349 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10350     (
10351       cat <<\_ASBOX
10352 ## ---------------------------------------- ##
10353 ## Report this to pgsql-bugs@postgresql.org ##
10354 ## ---------------------------------------- ##
10355 _ASBOX
10356     ) |
10357       sed "s/^/$as_me: WARNING:     /" >&2
10358     ;;
10359 esac
10360 echo "$as_me:$LINENO: checking for $ac_header" >&5
10361 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10362 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10363   echo $ECHO_N "(cached) $ECHO_C" >&6
10364 else
10365   eval "$as_ac_Header=\$ac_header_preproc"
10366 fi
10367 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10368 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10369
10370 fi
10371 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10372   cat >>confdefs.h <<_ACEOF
10373 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10374 _ACEOF
10375
10376 else
10377
10378 for ac_header in pam/pam_appl.h
10379 do
10380 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10381 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10382   echo "$as_me:$LINENO: checking for $ac_header" >&5
10383 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10384 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10385   echo $ECHO_N "(cached) $ECHO_C" >&6
10386 fi
10387 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10388 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10389 else
10390   # Is the header compilable?
10391 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10392 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10393 cat >conftest.$ac_ext <<_ACEOF
10394 /* confdefs.h.  */
10395 _ACEOF
10396 cat confdefs.h >>conftest.$ac_ext
10397 cat >>conftest.$ac_ext <<_ACEOF
10398 /* end confdefs.h.  */
10399 $ac_includes_default
10400 #include <$ac_header>
10401 _ACEOF
10402 rm -f conftest.$ac_objext
10403 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10404   (eval $ac_compile) 2>conftest.er1
10405   ac_status=$?
10406   grep -v '^ *+' conftest.er1 >conftest.err
10407   rm -f conftest.er1
10408   cat conftest.err >&5
10409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10410   (exit $ac_status); } &&
10411          { ac_try='test -z "$ac_c_werror_flag"
10412                          || test ! -s conftest.err'
10413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10414   (eval $ac_try) 2>&5
10415   ac_status=$?
10416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10417   (exit $ac_status); }; } &&
10418          { ac_try='test -s conftest.$ac_objext'
10419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10420   (eval $ac_try) 2>&5
10421   ac_status=$?
10422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10423   (exit $ac_status); }; }; then
10424   ac_header_compiler=yes
10425 else
10426   echo "$as_me: failed program was:" >&5
10427 sed 's/^/| /' conftest.$ac_ext >&5
10428
10429 ac_header_compiler=no
10430 fi
10431 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10432 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10433 echo "${ECHO_T}$ac_header_compiler" >&6
10434
10435 # Is the header present?
10436 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10437 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10438 cat >conftest.$ac_ext <<_ACEOF
10439 /* confdefs.h.  */
10440 _ACEOF
10441 cat confdefs.h >>conftest.$ac_ext
10442 cat >>conftest.$ac_ext <<_ACEOF
10443 /* end confdefs.h.  */
10444 #include <$ac_header>
10445 _ACEOF
10446 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10447   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10448   ac_status=$?
10449   grep -v '^ *+' conftest.er1 >conftest.err
10450   rm -f conftest.er1
10451   cat conftest.err >&5
10452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453   (exit $ac_status); } >/dev/null; then
10454   if test -s conftest.err; then
10455     ac_cpp_err=$ac_c_preproc_warn_flag
10456     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10457   else
10458     ac_cpp_err=
10459   fi
10460 else
10461   ac_cpp_err=yes
10462 fi
10463 if test -z "$ac_cpp_err"; then
10464   ac_header_preproc=yes
10465 else
10466   echo "$as_me: failed program was:" >&5
10467 sed 's/^/| /' conftest.$ac_ext >&5
10468
10469   ac_header_preproc=no
10470 fi
10471 rm -f conftest.err conftest.$ac_ext
10472 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10473 echo "${ECHO_T}$ac_header_preproc" >&6
10474
10475 # So?  What about this header?
10476 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10477   yes:no: )
10478     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10479 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10480     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10481 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10482     ac_header_preproc=yes
10483     ;;
10484   no:yes:* )
10485     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10486 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10487     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10488 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10489     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10490 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10491     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10492 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10493     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10494 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10495     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10496 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10497     (
10498       cat <<\_ASBOX
10499 ## ---------------------------------------- ##
10500 ## Report this to pgsql-bugs@postgresql.org ##
10501 ## ---------------------------------------- ##
10502 _ASBOX
10503     ) |
10504       sed "s/^/$as_me: WARNING:     /" >&2
10505     ;;
10506 esac
10507 echo "$as_me:$LINENO: checking for $ac_header" >&5
10508 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10509 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10510   echo $ECHO_N "(cached) $ECHO_C" >&6
10511 else
10512   eval "$as_ac_Header=\$ac_header_preproc"
10513 fi
10514 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10515 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10516
10517 fi
10518 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10519   cat >>confdefs.h <<_ACEOF
10520 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10521 _ACEOF
10522
10523 else
10524   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10525 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10526    { (exit 1); exit 1; }; }
10527 fi
10528
10529 done
10530
10531 fi
10532
10533 done
10534
10535 fi
10536
10537 if test "$with_libxml" = yes ; then
10538   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
10539   echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
10540 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6
10541 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
10542   echo $ECHO_N "(cached) $ECHO_C" >&6
10543 fi
10544 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
10545 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6
10546 else
10547   # Is the header compilable?
10548 echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
10549 echo $ECHO_N "checking libxml/parser.h usability... $ECHO_C" >&6
10550 cat >conftest.$ac_ext <<_ACEOF
10551 /* confdefs.h.  */
10552 _ACEOF
10553 cat confdefs.h >>conftest.$ac_ext
10554 cat >>conftest.$ac_ext <<_ACEOF
10555 /* end confdefs.h.  */
10556 $ac_includes_default
10557 #include <libxml/parser.h>
10558 _ACEOF
10559 rm -f conftest.$ac_objext
10560 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10561   (eval $ac_compile) 2>conftest.er1
10562   ac_status=$?
10563   grep -v '^ *+' conftest.er1 >conftest.err
10564   rm -f conftest.er1
10565   cat conftest.err >&5
10566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10567   (exit $ac_status); } &&
10568          { ac_try='test -z "$ac_c_werror_flag"
10569                          || test ! -s conftest.err'
10570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10571   (eval $ac_try) 2>&5
10572   ac_status=$?
10573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10574   (exit $ac_status); }; } &&
10575          { ac_try='test -s conftest.$ac_objext'
10576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10577   (eval $ac_try) 2>&5
10578   ac_status=$?
10579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10580   (exit $ac_status); }; }; then
10581   ac_header_compiler=yes
10582 else
10583   echo "$as_me: failed program was:" >&5
10584 sed 's/^/| /' conftest.$ac_ext >&5
10585
10586 ac_header_compiler=no
10587 fi
10588 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10589 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10590 echo "${ECHO_T}$ac_header_compiler" >&6
10591
10592 # Is the header present?
10593 echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
10594 echo $ECHO_N "checking libxml/parser.h presence... $ECHO_C" >&6
10595 cat >conftest.$ac_ext <<_ACEOF
10596 /* confdefs.h.  */
10597 _ACEOF
10598 cat confdefs.h >>conftest.$ac_ext
10599 cat >>conftest.$ac_ext <<_ACEOF
10600 /* end confdefs.h.  */
10601 #include <libxml/parser.h>
10602 _ACEOF
10603 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10604   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10605   ac_status=$?
10606   grep -v '^ *+' conftest.er1 >conftest.err
10607   rm -f conftest.er1
10608   cat conftest.err >&5
10609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10610   (exit $ac_status); } >/dev/null; then
10611   if test -s conftest.err; then
10612     ac_cpp_err=$ac_c_preproc_warn_flag
10613     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10614   else
10615     ac_cpp_err=
10616   fi
10617 else
10618   ac_cpp_err=yes
10619 fi
10620 if test -z "$ac_cpp_err"; then
10621   ac_header_preproc=yes
10622 else
10623   echo "$as_me: failed program was:" >&5
10624 sed 's/^/| /' conftest.$ac_ext >&5
10625
10626   ac_header_preproc=no
10627 fi
10628 rm -f conftest.err conftest.$ac_ext
10629 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10630 echo "${ECHO_T}$ac_header_preproc" >&6
10631
10632 # So?  What about this header?
10633 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10634   yes:no: )
10635     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
10636 echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10637     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
10638 echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
10639     ac_header_preproc=yes
10640     ;;
10641   no:yes:* )
10642     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
10643 echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
10644     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
10645 echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
10646     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
10647 echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
10648     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
10649 echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10650     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
10651 echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
10652     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
10653 echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
10654     (
10655       cat <<\_ASBOX
10656 ## ---------------------------------------- ##
10657 ## Report this to pgsql-bugs@postgresql.org ##
10658 ## ---------------------------------------- ##
10659 _ASBOX
10660     ) |
10661       sed "s/^/$as_me: WARNING:     /" >&2
10662     ;;
10663 esac
10664 echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
10665 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6
10666 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
10667   echo $ECHO_N "(cached) $ECHO_C" >&6
10668 else
10669   ac_cv_header_libxml_parser_h=$ac_header_preproc
10670 fi
10671 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
10672 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6
10673
10674 fi
10675 if test $ac_cv_header_libxml_parser_h = yes; then
10676   :
10677 else
10678   { { echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
10679 echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
10680    { (exit 1); exit 1; }; }
10681 fi
10682
10683
10684 fi
10685
10686 if test "$with_ldap" = yes ; then
10687   if test "$PORTNAME" != "win32"; then
10688
10689 for ac_header in ldap.h
10690 do
10691 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10692 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10693   echo "$as_me:$LINENO: checking for $ac_header" >&5
10694 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10695 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10696   echo $ECHO_N "(cached) $ECHO_C" >&6
10697 fi
10698 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10699 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10700 else
10701   # Is the header compilable?
10702 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10703 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10704 cat >conftest.$ac_ext <<_ACEOF
10705 /* confdefs.h.  */
10706 _ACEOF
10707 cat confdefs.h >>conftest.$ac_ext
10708 cat >>conftest.$ac_ext <<_ACEOF
10709 /* end confdefs.h.  */
10710 $ac_includes_default
10711 #include <$ac_header>
10712 _ACEOF
10713 rm -f conftest.$ac_objext
10714 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10715   (eval $ac_compile) 2>conftest.er1
10716   ac_status=$?
10717   grep -v '^ *+' conftest.er1 >conftest.err
10718   rm -f conftest.er1
10719   cat conftest.err >&5
10720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10721   (exit $ac_status); } &&
10722          { ac_try='test -z "$ac_c_werror_flag"
10723                          || test ! -s conftest.err'
10724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10725   (eval $ac_try) 2>&5
10726   ac_status=$?
10727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728   (exit $ac_status); }; } &&
10729          { ac_try='test -s conftest.$ac_objext'
10730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10731   (eval $ac_try) 2>&5
10732   ac_status=$?
10733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10734   (exit $ac_status); }; }; then
10735   ac_header_compiler=yes
10736 else
10737   echo "$as_me: failed program was:" >&5
10738 sed 's/^/| /' conftest.$ac_ext >&5
10739
10740 ac_header_compiler=no
10741 fi
10742 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10743 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10744 echo "${ECHO_T}$ac_header_compiler" >&6
10745
10746 # Is the header present?
10747 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10748 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10749 cat >conftest.$ac_ext <<_ACEOF
10750 /* confdefs.h.  */
10751 _ACEOF
10752 cat confdefs.h >>conftest.$ac_ext
10753 cat >>conftest.$ac_ext <<_ACEOF
10754 /* end confdefs.h.  */
10755 #include <$ac_header>
10756 _ACEOF
10757 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10758   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10759   ac_status=$?
10760   grep -v '^ *+' conftest.er1 >conftest.err
10761   rm -f conftest.er1
10762   cat conftest.err >&5
10763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10764   (exit $ac_status); } >/dev/null; then
10765   if test -s conftest.err; then
10766     ac_cpp_err=$ac_c_preproc_warn_flag
10767     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10768   else
10769     ac_cpp_err=
10770   fi
10771 else
10772   ac_cpp_err=yes
10773 fi
10774 if test -z "$ac_cpp_err"; then
10775   ac_header_preproc=yes
10776 else
10777   echo "$as_me: failed program was:" >&5
10778 sed 's/^/| /' conftest.$ac_ext >&5
10779
10780   ac_header_preproc=no
10781 fi
10782 rm -f conftest.err conftest.$ac_ext
10783 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10784 echo "${ECHO_T}$ac_header_preproc" >&6
10785
10786 # So?  What about this header?
10787 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10788   yes:no: )
10789     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10790 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10791     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10792 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10793     ac_header_preproc=yes
10794     ;;
10795   no:yes:* )
10796     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10797 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10798     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10799 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10800     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10801 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10802     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10803 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10804     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10805 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10806     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10807 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10808     (
10809       cat <<\_ASBOX
10810 ## ---------------------------------------- ##
10811 ## Report this to pgsql-bugs@postgresql.org ##
10812 ## ---------------------------------------- ##
10813 _ASBOX
10814     ) |
10815       sed "s/^/$as_me: WARNING:     /" >&2
10816     ;;
10817 esac
10818 echo "$as_me:$LINENO: checking for $ac_header" >&5
10819 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10820 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10821   echo $ECHO_N "(cached) $ECHO_C" >&6
10822 else
10823   eval "$as_ac_Header=\$ac_header_preproc"
10824 fi
10825 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10826 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10827
10828 fi
10829 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10830   cat >>confdefs.h <<_ACEOF
10831 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10832 _ACEOF
10833
10834 else
10835   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
10836 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10837    { (exit 1); exit 1; }; }
10838 fi
10839
10840 done
10841
10842   else
10843
10844 for ac_header in winldap.h
10845 do
10846 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10847 echo "$as_me:$LINENO: checking for $ac_header" >&5
10848 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10849 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10850   echo $ECHO_N "(cached) $ECHO_C" >&6
10851 else
10852   cat >conftest.$ac_ext <<_ACEOF
10853 /* confdefs.h.  */
10854 _ACEOF
10855 cat confdefs.h >>conftest.$ac_ext
10856 cat >>conftest.$ac_ext <<_ACEOF
10857 /* end confdefs.h.  */
10858 $ac_includes_default
10859 #include <windows.h>
10860
10861
10862 #include <$ac_header>
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   eval "$as_ac_Header=yes"
10887 else
10888   echo "$as_me: failed program was:" >&5
10889 sed 's/^/| /' conftest.$ac_ext >&5
10890
10891 eval "$as_ac_Header=no"
10892 fi
10893 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10894 fi
10895 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10896 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10897 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10898   cat >>confdefs.h <<_ACEOF
10899 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10900 _ACEOF
10901
10902 else
10903   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10904 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10905    { (exit 1); exit 1; }; }
10906 fi
10907
10908 done
10909
10910   fi
10911 fi
10912
10913 if test "$with_bonjour" = yes ; then
10914   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10915   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10916 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10917 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10918   echo $ECHO_N "(cached) $ECHO_C" >&6
10919 fi
10920 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10921 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10922 else
10923   # Is the header compilable?
10924 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10925 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10926 cat >conftest.$ac_ext <<_ACEOF
10927 /* confdefs.h.  */
10928 _ACEOF
10929 cat confdefs.h >>conftest.$ac_ext
10930 cat >>conftest.$ac_ext <<_ACEOF
10931 /* end confdefs.h.  */
10932 $ac_includes_default
10933 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10934 _ACEOF
10935 rm -f conftest.$ac_objext
10936 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10937   (eval $ac_compile) 2>conftest.er1
10938   ac_status=$?
10939   grep -v '^ *+' conftest.er1 >conftest.err
10940   rm -f conftest.er1
10941   cat conftest.err >&5
10942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10943   (exit $ac_status); } &&
10944          { ac_try='test -z "$ac_c_werror_flag"
10945                          || test ! -s conftest.err'
10946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10947   (eval $ac_try) 2>&5
10948   ac_status=$?
10949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10950   (exit $ac_status); }; } &&
10951          { ac_try='test -s conftest.$ac_objext'
10952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10953   (eval $ac_try) 2>&5
10954   ac_status=$?
10955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10956   (exit $ac_status); }; }; then
10957   ac_header_compiler=yes
10958 else
10959   echo "$as_me: failed program was:" >&5
10960 sed 's/^/| /' conftest.$ac_ext >&5
10961
10962 ac_header_compiler=no
10963 fi
10964 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10965 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10966 echo "${ECHO_T}$ac_header_compiler" >&6
10967
10968 # Is the header present?
10969 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10970 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10971 cat >conftest.$ac_ext <<_ACEOF
10972 /* confdefs.h.  */
10973 _ACEOF
10974 cat confdefs.h >>conftest.$ac_ext
10975 cat >>conftest.$ac_ext <<_ACEOF
10976 /* end confdefs.h.  */
10977 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10978 _ACEOF
10979 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10980   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10981   ac_status=$?
10982   grep -v '^ *+' conftest.er1 >conftest.err
10983   rm -f conftest.er1
10984   cat conftest.err >&5
10985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10986   (exit $ac_status); } >/dev/null; then
10987   if test -s conftest.err; then
10988     ac_cpp_err=$ac_c_preproc_warn_flag
10989     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10990   else
10991     ac_cpp_err=
10992   fi
10993 else
10994   ac_cpp_err=yes
10995 fi
10996 if test -z "$ac_cpp_err"; then
10997   ac_header_preproc=yes
10998 else
10999   echo "$as_me: failed program was:" >&5
11000 sed 's/^/| /' conftest.$ac_ext >&5
11001
11002   ac_header_preproc=no
11003 fi
11004 rm -f conftest.err conftest.$ac_ext
11005 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11006 echo "${ECHO_T}$ac_header_preproc" >&6
11007
11008 # So?  What about this header?
11009 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11010   yes:no: )
11011     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
11012 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11013     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
11014 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
11015     ac_header_preproc=yes
11016     ;;
11017   no:yes:* )
11018     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
11019 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
11020     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
11021 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
11022     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
11023 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
11024     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
11025 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11026     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
11027 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
11028     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
11029 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
11030     (
11031       cat <<\_ASBOX
11032 ## ---------------------------------------- ##
11033 ## Report this to pgsql-bugs@postgresql.org ##
11034 ## ---------------------------------------- ##
11035 _ASBOX
11036     ) |
11037       sed "s/^/$as_me: WARNING:     /" >&2
11038     ;;
11039 esac
11040 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
11041 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
11042 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
11043   echo $ECHO_N "(cached) $ECHO_C" >&6
11044 else
11045   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
11046 fi
11047 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
11048 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
11049
11050 fi
11051 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
11052   :
11053 else
11054   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
11055 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
11056    { (exit 1); exit 1; }; }
11057 fi
11058
11059
11060 fi
11061
11062
11063 ##
11064 ## Types, structures, compiler characteristics
11065 ##
11066
11067  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
11068 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11069 if test "${ac_cv_c_const+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 /* FIXME: Include the comments suggested by Paul. */
11083 #ifndef __cplusplus
11084   /* Ultrix mips cc rejects this.  */
11085   typedef int charset[2];
11086   const charset x;
11087   /* SunOS 4.1.1 cc rejects this.  */
11088   char const *const *ccp;
11089   char **p;
11090   /* NEC SVR4.0.2 mips cc rejects this.  */
11091   struct point {int x, y;};
11092   static struct point const zero = {0,0};
11093   /* AIX XL C 1.02.0.0 rejects this.
11094      It does not let you subtract one const X* pointer from another in
11095      an arm of an if-expression whose if-part is not a constant
11096      expression */
11097   const char *g = "string";
11098   ccp = &g + (g ? g-g : 0);
11099   /* HPUX 7.0 cc rejects these. */
11100   ++ccp;
11101   p = (char**) ccp;
11102   ccp = (char const *const *) p;
11103   { /* SCO 3.2v4 cc rejects this.  */
11104     char *t;
11105     char const *s = 0 ? (char *) 0 : (char const *) 0;
11106
11107     *t++ = 0;
11108   }
11109   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11110     int x[] = {25, 17};
11111     const int *foo = &x[0];
11112     ++foo;
11113   }
11114   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11115     typedef const int *iptr;
11116     iptr p = 0;
11117     ++p;
11118   }
11119   { /* AIX XL C 1.02.0.0 rejects this saying
11120        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11121     struct s { int j; const int *ap[3]; };
11122     struct s *b; b->j = 5;
11123   }
11124   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11125     const int foo = 10;
11126   }
11127 #endif
11128
11129   ;
11130   return 0;
11131 }
11132 _ACEOF
11133 rm -f conftest.$ac_objext
11134 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11135   (eval $ac_compile) 2>conftest.er1
11136   ac_status=$?
11137   grep -v '^ *+' conftest.er1 >conftest.err
11138   rm -f conftest.er1
11139   cat conftest.err >&5
11140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11141   (exit $ac_status); } &&
11142          { ac_try='test -z "$ac_c_werror_flag"
11143                          || test ! -s conftest.err'
11144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11145   (eval $ac_try) 2>&5
11146   ac_status=$?
11147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11148   (exit $ac_status); }; } &&
11149          { ac_try='test -s conftest.$ac_objext'
11150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11151   (eval $ac_try) 2>&5
11152   ac_status=$?
11153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11154   (exit $ac_status); }; }; then
11155   ac_cv_c_const=yes
11156 else
11157   echo "$as_me: failed program was:" >&5
11158 sed 's/^/| /' conftest.$ac_ext >&5
11159
11160 ac_cv_c_const=no
11161 fi
11162 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11163 fi
11164 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
11165 echo "${ECHO_T}$ac_cv_c_const" >&6
11166 if test $ac_cv_c_const = no; then
11167
11168 cat >>confdefs.h <<\_ACEOF
11169 #define const
11170 _ACEOF
11171
11172 fi
11173
11174
11175 echo "$as_me:$LINENO: checking for inline" >&5
11176 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11177 if test "${ac_cv_c_inline+set}" = set; then
11178   echo $ECHO_N "(cached) $ECHO_C" >&6
11179 else
11180   ac_cv_c_inline=no
11181 for ac_kw in inline __inline__ __inline; do
11182   cat >conftest.$ac_ext <<_ACEOF
11183 /* confdefs.h.  */
11184 _ACEOF
11185 cat confdefs.h >>conftest.$ac_ext
11186 cat >>conftest.$ac_ext <<_ACEOF
11187 /* end confdefs.h.  */
11188 #ifndef __cplusplus
11189 typedef int foo_t;
11190 static $ac_kw foo_t static_foo () {return 0; }
11191 $ac_kw int foo () {return 0; }
11192 #endif
11193
11194 _ACEOF
11195 rm -f conftest.$ac_objext
11196 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11197   (eval $ac_compile) 2>conftest.er1
11198   ac_status=$?
11199   grep -v '^ *+' conftest.er1 >conftest.err
11200   rm -f conftest.er1
11201   cat conftest.err >&5
11202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11203   (exit $ac_status); } &&
11204          { ac_try='test -z "$ac_c_werror_flag"
11205                          || test ! -s conftest.err'
11206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11207   (eval $ac_try) 2>&5
11208   ac_status=$?
11209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11210   (exit $ac_status); }; } &&
11211          { ac_try='test -s conftest.$ac_objext'
11212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11213   (eval $ac_try) 2>&5
11214   ac_status=$?
11215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11216   (exit $ac_status); }; }; then
11217   ac_cv_c_inline=$ac_kw; break
11218 else
11219   echo "$as_me: failed program was:" >&5
11220 sed 's/^/| /' conftest.$ac_ext >&5
11221
11222 fi
11223 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11224 done
11225
11226 fi
11227 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11228 echo "${ECHO_T}$ac_cv_c_inline" >&6
11229 case $ac_cv_c_inline in
11230   inline | yes) ;;
11231   no)
11232 cat >>confdefs.h <<\_ACEOF
11233 #define inline
11234 _ACEOF
11235  ;;
11236   *)  cat >>confdefs.h <<_ACEOF
11237 #define inline $ac_cv_c_inline
11238 _ACEOF
11239  ;;
11240 esac
11241
11242 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11243 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11244 if test "${ac_cv_c_stringize+set}" = set; then
11245   echo $ECHO_N "(cached) $ECHO_C" >&6
11246 else
11247   cat >conftest.$ac_ext <<_ACEOF
11248 /* confdefs.h.  */
11249 _ACEOF
11250 cat confdefs.h >>conftest.$ac_ext
11251 cat >>conftest.$ac_ext <<_ACEOF
11252 /* end confdefs.h.  */
11253 #define x(y) #y
11254
11255 char *s = x(teststring);
11256 _ACEOF
11257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11258   $EGREP "#teststring" >/dev/null 2>&1; then
11259   ac_cv_c_stringize=no
11260 else
11261   ac_cv_c_stringize=yes
11262 fi
11263 rm -f conftest*
11264
11265 fi
11266 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11267 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11268 if test $ac_cv_c_stringize = yes; then
11269
11270 cat >>confdefs.h <<\_ACEOF
11271 #define HAVE_STRINGIZE 1
11272 _ACEOF
11273
11274 fi
11275
11276 echo "$as_me:$LINENO: checking for signed types" >&5
11277 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11278 if test "${pgac_cv_c_signed+set}" = set; then
11279   echo $ECHO_N "(cached) $ECHO_C" >&6
11280 else
11281   cat >conftest.$ac_ext <<_ACEOF
11282 /* confdefs.h.  */
11283 _ACEOF
11284 cat confdefs.h >>conftest.$ac_ext
11285 cat >>conftest.$ac_ext <<_ACEOF
11286 /* end confdefs.h.  */
11287
11288 int
11289 main ()
11290 {
11291 signed char c; signed short s; signed int i;
11292   ;
11293   return 0;
11294 }
11295 _ACEOF
11296 rm -f conftest.$ac_objext
11297 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11298   (eval $ac_compile) 2>conftest.er1
11299   ac_status=$?
11300   grep -v '^ *+' conftest.er1 >conftest.err
11301   rm -f conftest.er1
11302   cat conftest.err >&5
11303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11304   (exit $ac_status); } &&
11305          { ac_try='test -z "$ac_c_werror_flag"
11306                          || test ! -s conftest.err'
11307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11308   (eval $ac_try) 2>&5
11309   ac_status=$?
11310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11311   (exit $ac_status); }; } &&
11312          { ac_try='test -s conftest.$ac_objext'
11313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11314   (eval $ac_try) 2>&5
11315   ac_status=$?
11316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11317   (exit $ac_status); }; }; then
11318   pgac_cv_c_signed=yes
11319 else
11320   echo "$as_me: failed program was:" >&5
11321 sed 's/^/| /' conftest.$ac_ext >&5
11322
11323 pgac_cv_c_signed=no
11324 fi
11325 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11326 fi
11327 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11328 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11329 if test x"$pgac_cv_c_signed" = xno ; then
11330
11331 cat >>confdefs.h <<\_ACEOF
11332 #define signed
11333 _ACEOF
11334
11335 fi
11336 echo "$as_me:$LINENO: checking for working volatile" >&5
11337 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11338 if test "${ac_cv_c_volatile+set}" = set; then
11339   echo $ECHO_N "(cached) $ECHO_C" >&6
11340 else
11341   cat >conftest.$ac_ext <<_ACEOF
11342 /* confdefs.h.  */
11343 _ACEOF
11344 cat confdefs.h >>conftest.$ac_ext
11345 cat >>conftest.$ac_ext <<_ACEOF
11346 /* end confdefs.h.  */
11347
11348 int
11349 main ()
11350 {
11351
11352 volatile int x;
11353 int * volatile y;
11354   ;
11355   return 0;
11356 }
11357 _ACEOF
11358 rm -f conftest.$ac_objext
11359 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11360   (eval $ac_compile) 2>conftest.er1
11361   ac_status=$?
11362   grep -v '^ *+' conftest.er1 >conftest.err
11363   rm -f conftest.er1
11364   cat conftest.err >&5
11365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11366   (exit $ac_status); } &&
11367          { ac_try='test -z "$ac_c_werror_flag"
11368                          || test ! -s conftest.err'
11369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11370   (eval $ac_try) 2>&5
11371   ac_status=$?
11372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11373   (exit $ac_status); }; } &&
11374          { ac_try='test -s conftest.$ac_objext'
11375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11376   (eval $ac_try) 2>&5
11377   ac_status=$?
11378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11379   (exit $ac_status); }; }; then
11380   ac_cv_c_volatile=yes
11381 else
11382   echo "$as_me: failed program was:" >&5
11383 sed 's/^/| /' conftest.$ac_ext >&5
11384
11385 ac_cv_c_volatile=no
11386 fi
11387 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11388 fi
11389 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11390 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11391 if test $ac_cv_c_volatile = no; then
11392
11393 cat >>confdefs.h <<\_ACEOF
11394 #define volatile
11395 _ACEOF
11396
11397 fi
11398
11399 echo "$as_me:$LINENO: checking for __func__" >&5
11400 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11401 if test "${pgac_cv_funcname_func_support+set}" = set; then
11402   echo $ECHO_N "(cached) $ECHO_C" >&6
11403 else
11404   cat >conftest.$ac_ext <<_ACEOF
11405 /* confdefs.h.  */
11406 _ACEOF
11407 cat confdefs.h >>conftest.$ac_ext
11408 cat >>conftest.$ac_ext <<_ACEOF
11409 /* end confdefs.h.  */
11410 #include <stdio.h>
11411 int
11412 main ()
11413 {
11414 printf("%s\n", __func__);
11415   ;
11416   return 0;
11417 }
11418 _ACEOF
11419 rm -f conftest.$ac_objext
11420 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11421   (eval $ac_compile) 2>conftest.er1
11422   ac_status=$?
11423   grep -v '^ *+' conftest.er1 >conftest.err
11424   rm -f conftest.er1
11425   cat conftest.err >&5
11426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11427   (exit $ac_status); } &&
11428          { ac_try='test -z "$ac_c_werror_flag"
11429                          || test ! -s conftest.err'
11430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11431   (eval $ac_try) 2>&5
11432   ac_status=$?
11433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11434   (exit $ac_status); }; } &&
11435          { ac_try='test -s conftest.$ac_objext'
11436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11437   (eval $ac_try) 2>&5
11438   ac_status=$?
11439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11440   (exit $ac_status); }; }; then
11441   pgac_cv_funcname_func_support=yes
11442 else
11443   echo "$as_me: failed program was:" >&5
11444 sed 's/^/| /' conftest.$ac_ext >&5
11445
11446 pgac_cv_funcname_func_support=no
11447 fi
11448 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11449 fi
11450 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11451 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11452 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11453
11454 cat >>confdefs.h <<\_ACEOF
11455 #define HAVE_FUNCNAME__FUNC 1
11456 _ACEOF
11457
11458 else
11459 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11460 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11461 if test "${pgac_cv_funcname_function_support+set}" = set; then
11462   echo $ECHO_N "(cached) $ECHO_C" >&6
11463 else
11464   cat >conftest.$ac_ext <<_ACEOF
11465 /* confdefs.h.  */
11466 _ACEOF
11467 cat confdefs.h >>conftest.$ac_ext
11468 cat >>conftest.$ac_ext <<_ACEOF
11469 /* end confdefs.h.  */
11470 #include <stdio.h>
11471 int
11472 main ()
11473 {
11474 printf("%s\n", __FUNCTION__);
11475   ;
11476   return 0;
11477 }
11478 _ACEOF
11479 rm -f conftest.$ac_objext
11480 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11481   (eval $ac_compile) 2>conftest.er1
11482   ac_status=$?
11483   grep -v '^ *+' conftest.er1 >conftest.err
11484   rm -f conftest.er1
11485   cat conftest.err >&5
11486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11487   (exit $ac_status); } &&
11488          { ac_try='test -z "$ac_c_werror_flag"
11489                          || test ! -s conftest.err'
11490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11491   (eval $ac_try) 2>&5
11492   ac_status=$?
11493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11494   (exit $ac_status); }; } &&
11495          { ac_try='test -s conftest.$ac_objext'
11496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11497   (eval $ac_try) 2>&5
11498   ac_status=$?
11499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11500   (exit $ac_status); }; }; then
11501   pgac_cv_funcname_function_support=yes
11502 else
11503   echo "$as_me: failed program was:" >&5
11504 sed 's/^/| /' conftest.$ac_ext >&5
11505
11506 pgac_cv_funcname_function_support=no
11507 fi
11508 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11509 fi
11510 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11511 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11512 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11513
11514 cat >>confdefs.h <<\_ACEOF
11515 #define HAVE_FUNCNAME__FUNCTION 1
11516 _ACEOF
11517
11518 fi
11519 fi
11520 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11521 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11522 if test "${ac_cv_struct_tm+set}" = set; then
11523   echo $ECHO_N "(cached) $ECHO_C" >&6
11524 else
11525   cat >conftest.$ac_ext <<_ACEOF
11526 /* confdefs.h.  */
11527 _ACEOF
11528 cat confdefs.h >>conftest.$ac_ext
11529 cat >>conftest.$ac_ext <<_ACEOF
11530 /* end confdefs.h.  */
11531 #include <sys/types.h>
11532 #include <time.h>
11533
11534 int
11535 main ()
11536 {
11537 struct tm *tp; tp->tm_sec;
11538   ;
11539   return 0;
11540 }
11541 _ACEOF
11542 rm -f conftest.$ac_objext
11543 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11544   (eval $ac_compile) 2>conftest.er1
11545   ac_status=$?
11546   grep -v '^ *+' conftest.er1 >conftest.err
11547   rm -f conftest.er1
11548   cat conftest.err >&5
11549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550   (exit $ac_status); } &&
11551          { ac_try='test -z "$ac_c_werror_flag"
11552                          || test ! -s conftest.err'
11553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11554   (eval $ac_try) 2>&5
11555   ac_status=$?
11556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11557   (exit $ac_status); }; } &&
11558          { ac_try='test -s conftest.$ac_objext'
11559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11560   (eval $ac_try) 2>&5
11561   ac_status=$?
11562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11563   (exit $ac_status); }; }; then
11564   ac_cv_struct_tm=time.h
11565 else
11566   echo "$as_me: failed program was:" >&5
11567 sed 's/^/| /' conftest.$ac_ext >&5
11568
11569 ac_cv_struct_tm=sys/time.h
11570 fi
11571 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11572 fi
11573 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11574 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11575 if test $ac_cv_struct_tm = sys/time.h; then
11576
11577 cat >>confdefs.h <<\_ACEOF
11578 #define TM_IN_SYS_TIME 1
11579 _ACEOF
11580
11581 fi
11582
11583 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11584 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11585 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11586   echo $ECHO_N "(cached) $ECHO_C" >&6
11587 else
11588   cat >conftest.$ac_ext <<_ACEOF
11589 /* confdefs.h.  */
11590 _ACEOF
11591 cat confdefs.h >>conftest.$ac_ext
11592 cat >>conftest.$ac_ext <<_ACEOF
11593 /* end confdefs.h.  */
11594 #include <sys/types.h>
11595 #include <$ac_cv_struct_tm>
11596
11597
11598 int
11599 main ()
11600 {
11601 static struct tm ac_aggr;
11602 if (ac_aggr.tm_zone)
11603 return 0;
11604   ;
11605   return 0;
11606 }
11607 _ACEOF
11608 rm -f conftest.$ac_objext
11609 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11610   (eval $ac_compile) 2>conftest.er1
11611   ac_status=$?
11612   grep -v '^ *+' conftest.er1 >conftest.err
11613   rm -f conftest.er1
11614   cat conftest.err >&5
11615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11616   (exit $ac_status); } &&
11617          { ac_try='test -z "$ac_c_werror_flag"
11618                          || test ! -s conftest.err'
11619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11620   (eval $ac_try) 2>&5
11621   ac_status=$?
11622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11623   (exit $ac_status); }; } &&
11624          { ac_try='test -s conftest.$ac_objext'
11625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11626   (eval $ac_try) 2>&5
11627   ac_status=$?
11628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11629   (exit $ac_status); }; }; then
11630   ac_cv_member_struct_tm_tm_zone=yes
11631 else
11632   echo "$as_me: failed program was:" >&5
11633 sed 's/^/| /' conftest.$ac_ext >&5
11634
11635 cat >conftest.$ac_ext <<_ACEOF
11636 /* confdefs.h.  */
11637 _ACEOF
11638 cat confdefs.h >>conftest.$ac_ext
11639 cat >>conftest.$ac_ext <<_ACEOF
11640 /* end confdefs.h.  */
11641 #include <sys/types.h>
11642 #include <$ac_cv_struct_tm>
11643
11644
11645 int
11646 main ()
11647 {
11648 static struct tm ac_aggr;
11649 if (sizeof ac_aggr.tm_zone)
11650 return 0;
11651   ;
11652   return 0;
11653 }
11654 _ACEOF
11655 rm -f conftest.$ac_objext
11656 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11657   (eval $ac_compile) 2>conftest.er1
11658   ac_status=$?
11659   grep -v '^ *+' conftest.er1 >conftest.err
11660   rm -f conftest.er1
11661   cat conftest.err >&5
11662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11663   (exit $ac_status); } &&
11664          { ac_try='test -z "$ac_c_werror_flag"
11665                          || test ! -s conftest.err'
11666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11667   (eval $ac_try) 2>&5
11668   ac_status=$?
11669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11670   (exit $ac_status); }; } &&
11671          { ac_try='test -s conftest.$ac_objext'
11672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11673   (eval $ac_try) 2>&5
11674   ac_status=$?
11675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11676   (exit $ac_status); }; }; then
11677   ac_cv_member_struct_tm_tm_zone=yes
11678 else
11679   echo "$as_me: failed program was:" >&5
11680 sed 's/^/| /' conftest.$ac_ext >&5
11681
11682 ac_cv_member_struct_tm_tm_zone=no
11683 fi
11684 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11685 fi
11686 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11687 fi
11688 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11689 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11690 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11691
11692 cat >>confdefs.h <<_ACEOF
11693 #define HAVE_STRUCT_TM_TM_ZONE 1
11694 _ACEOF
11695
11696
11697 fi
11698
11699 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11700
11701 cat >>confdefs.h <<\_ACEOF
11702 #define HAVE_TM_ZONE 1
11703 _ACEOF
11704
11705 fi
11706 echo "$as_me:$LINENO: checking for tzname" >&5
11707 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11708 if test "${ac_cv_var_tzname+set}" = set; then
11709   echo $ECHO_N "(cached) $ECHO_C" >&6
11710 else
11711   cat >conftest.$ac_ext <<_ACEOF
11712 /* confdefs.h.  */
11713 _ACEOF
11714 cat confdefs.h >>conftest.$ac_ext
11715 cat >>conftest.$ac_ext <<_ACEOF
11716 /* end confdefs.h.  */
11717 #include <time.h>
11718 #ifndef tzname /* For SGI.  */
11719 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11720 #endif
11721
11722 int
11723 main ()
11724 {
11725 atoi(*tzname);
11726   ;
11727   return 0;
11728 }
11729 _ACEOF
11730 rm -f conftest.$ac_objext conftest$ac_exeext
11731 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11732   (eval $ac_link) 2>conftest.er1
11733   ac_status=$?
11734   grep -v '^ *+' conftest.er1 >conftest.err
11735   rm -f conftest.er1
11736   cat conftest.err >&5
11737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11738   (exit $ac_status); } &&
11739          { ac_try='test -z "$ac_c_werror_flag"
11740                          || test ! -s conftest.err'
11741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11742   (eval $ac_try) 2>&5
11743   ac_status=$?
11744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11745   (exit $ac_status); }; } &&
11746          { ac_try='test -s conftest$ac_exeext'
11747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11748   (eval $ac_try) 2>&5
11749   ac_status=$?
11750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11751   (exit $ac_status); }; }; then
11752   ac_cv_var_tzname=yes
11753 else
11754   echo "$as_me: failed program was:" >&5
11755 sed 's/^/| /' conftest.$ac_ext >&5
11756
11757 ac_cv_var_tzname=no
11758 fi
11759 rm -f conftest.err conftest.$ac_objext \
11760       conftest$ac_exeext conftest.$ac_ext
11761 fi
11762 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11763 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11764 if test $ac_cv_var_tzname = yes; then
11765
11766 cat >>confdefs.h <<\_ACEOF
11767 #define HAVE_TZNAME 1
11768 _ACEOF
11769
11770 fi
11771
11772 echo "$as_me:$LINENO: checking for union semun" >&5
11773 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11774 if test "${ac_cv_type_union_semun+set}" = set; then
11775   echo $ECHO_N "(cached) $ECHO_C" >&6
11776 else
11777   cat >conftest.$ac_ext <<_ACEOF
11778 /* confdefs.h.  */
11779 _ACEOF
11780 cat confdefs.h >>conftest.$ac_ext
11781 cat >>conftest.$ac_ext <<_ACEOF
11782 /* end confdefs.h.  */
11783 #include <sys/types.h>
11784 #include <sys/ipc.h>
11785 #include <sys/sem.h>
11786
11787 int
11788 main ()
11789 {
11790 if ((union semun *) 0)
11791   return 0;
11792 if (sizeof (union semun))
11793   return 0;
11794   ;
11795   return 0;
11796 }
11797 _ACEOF
11798 rm -f conftest.$ac_objext
11799 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11800   (eval $ac_compile) 2>conftest.er1
11801   ac_status=$?
11802   grep -v '^ *+' conftest.er1 >conftest.err
11803   rm -f conftest.er1
11804   cat conftest.err >&5
11805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11806   (exit $ac_status); } &&
11807          { ac_try='test -z "$ac_c_werror_flag"
11808                          || test ! -s conftest.err'
11809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11810   (eval $ac_try) 2>&5
11811   ac_status=$?
11812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11813   (exit $ac_status); }; } &&
11814          { ac_try='test -s conftest.$ac_objext'
11815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11816   (eval $ac_try) 2>&5
11817   ac_status=$?
11818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11819   (exit $ac_status); }; }; then
11820   ac_cv_type_union_semun=yes
11821 else
11822   echo "$as_me: failed program was:" >&5
11823 sed 's/^/| /' conftest.$ac_ext >&5
11824
11825 ac_cv_type_union_semun=no
11826 fi
11827 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11828 fi
11829 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11830 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11831 if test $ac_cv_type_union_semun = yes; then
11832
11833 cat >>confdefs.h <<_ACEOF
11834 #define HAVE_UNION_SEMUN 1
11835 _ACEOF
11836
11837
11838 fi
11839
11840 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11841 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11842 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11843   echo $ECHO_N "(cached) $ECHO_C" >&6
11844 else
11845   cat >conftest.$ac_ext <<_ACEOF
11846 /* confdefs.h.  */
11847 _ACEOF
11848 cat confdefs.h >>conftest.$ac_ext
11849 cat >>conftest.$ac_ext <<_ACEOF
11850 /* end confdefs.h.  */
11851 #include <sys/types.h>
11852 #ifdef HAVE_SYS_UN_H
11853 #include <sys/un.h>
11854 #endif
11855
11856
11857 int
11858 main ()
11859 {
11860 if ((struct sockaddr_un *) 0)
11861   return 0;
11862 if (sizeof (struct sockaddr_un))
11863   return 0;
11864   ;
11865   return 0;
11866 }
11867 _ACEOF
11868 rm -f conftest.$ac_objext
11869 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11870   (eval $ac_compile) 2>conftest.er1
11871   ac_status=$?
11872   grep -v '^ *+' conftest.er1 >conftest.err
11873   rm -f conftest.er1
11874   cat conftest.err >&5
11875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11876   (exit $ac_status); } &&
11877          { ac_try='test -z "$ac_c_werror_flag"
11878                          || test ! -s conftest.err'
11879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11880   (eval $ac_try) 2>&5
11881   ac_status=$?
11882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11883   (exit $ac_status); }; } &&
11884          { ac_try='test -s conftest.$ac_objext'
11885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11886   (eval $ac_try) 2>&5
11887   ac_status=$?
11888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11889   (exit $ac_status); }; }; then
11890   ac_cv_type_struct_sockaddr_un=yes
11891 else
11892   echo "$as_me: failed program was:" >&5
11893 sed 's/^/| /' conftest.$ac_ext >&5
11894
11895 ac_cv_type_struct_sockaddr_un=no
11896 fi
11897 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11898 fi
11899 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11900 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11901 if test $ac_cv_type_struct_sockaddr_un = yes; then
11902
11903 cat >>confdefs.h <<_ACEOF
11904 #define HAVE_STRUCT_SOCKADDR_UN 1
11905 _ACEOF
11906
11907
11908 cat >>confdefs.h <<\_ACEOF
11909 #define HAVE_UNIX_SOCKETS 1
11910 _ACEOF
11911
11912 fi
11913
11914 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11915 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11916 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11917   echo $ECHO_N "(cached) $ECHO_C" >&6
11918 else
11919   cat >conftest.$ac_ext <<_ACEOF
11920 /* confdefs.h.  */
11921 _ACEOF
11922 cat confdefs.h >>conftest.$ac_ext
11923 cat >>conftest.$ac_ext <<_ACEOF
11924 /* end confdefs.h.  */
11925 #include <sys/types.h>
11926 #ifdef HAVE_SYS_SOCKET_H
11927 #include <sys/socket.h>
11928 #endif
11929
11930
11931 int
11932 main ()
11933 {
11934 if ((struct sockaddr_storage *) 0)
11935   return 0;
11936 if (sizeof (struct sockaddr_storage))
11937   return 0;
11938   ;
11939   return 0;
11940 }
11941 _ACEOF
11942 rm -f conftest.$ac_objext
11943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11944   (eval $ac_compile) 2>conftest.er1
11945   ac_status=$?
11946   grep -v '^ *+' conftest.er1 >conftest.err
11947   rm -f conftest.er1
11948   cat conftest.err >&5
11949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11950   (exit $ac_status); } &&
11951          { ac_try='test -z "$ac_c_werror_flag"
11952                          || test ! -s conftest.err'
11953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11954   (eval $ac_try) 2>&5
11955   ac_status=$?
11956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11957   (exit $ac_status); }; } &&
11958          { ac_try='test -s conftest.$ac_objext'
11959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11960   (eval $ac_try) 2>&5
11961   ac_status=$?
11962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11963   (exit $ac_status); }; }; then
11964   ac_cv_type_struct_sockaddr_storage=yes
11965 else
11966   echo "$as_me: failed program was:" >&5
11967 sed 's/^/| /' conftest.$ac_ext >&5
11968
11969 ac_cv_type_struct_sockaddr_storage=no
11970 fi
11971 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11972 fi
11973 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11974 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11975 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11976
11977 cat >>confdefs.h <<_ACEOF
11978 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11979 _ACEOF
11980
11981
11982 fi
11983
11984 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11985 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11986 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11987   echo $ECHO_N "(cached) $ECHO_C" >&6
11988 else
11989   cat >conftest.$ac_ext <<_ACEOF
11990 /* confdefs.h.  */
11991 _ACEOF
11992 cat confdefs.h >>conftest.$ac_ext
11993 cat >>conftest.$ac_ext <<_ACEOF
11994 /* end confdefs.h.  */
11995 #include <sys/types.h>
11996 #ifdef HAVE_SYS_SOCKET_H
11997 #include <sys/socket.h>
11998 #endif
11999
12000
12001 int
12002 main ()
12003 {
12004 static struct sockaddr_storage ac_aggr;
12005 if (ac_aggr.ss_family)
12006 return 0;
12007   ;
12008   return 0;
12009 }
12010 _ACEOF
12011 rm -f conftest.$ac_objext
12012 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12013   (eval $ac_compile) 2>conftest.er1
12014   ac_status=$?
12015   grep -v '^ *+' conftest.er1 >conftest.err
12016   rm -f conftest.er1
12017   cat conftest.err >&5
12018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12019   (exit $ac_status); } &&
12020          { ac_try='test -z "$ac_c_werror_flag"
12021                          || test ! -s conftest.err'
12022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12023   (eval $ac_try) 2>&5
12024   ac_status=$?
12025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12026   (exit $ac_status); }; } &&
12027          { ac_try='test -s conftest.$ac_objext'
12028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12029   (eval $ac_try) 2>&5
12030   ac_status=$?
12031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12032   (exit $ac_status); }; }; then
12033   ac_cv_member_struct_sockaddr_storage_ss_family=yes
12034 else
12035   echo "$as_me: failed program was:" >&5
12036 sed 's/^/| /' conftest.$ac_ext >&5
12037
12038 cat >conftest.$ac_ext <<_ACEOF
12039 /* confdefs.h.  */
12040 _ACEOF
12041 cat confdefs.h >>conftest.$ac_ext
12042 cat >>conftest.$ac_ext <<_ACEOF
12043 /* end confdefs.h.  */
12044 #include <sys/types.h>
12045 #ifdef HAVE_SYS_SOCKET_H
12046 #include <sys/socket.h>
12047 #endif
12048
12049
12050 int
12051 main ()
12052 {
12053 static struct sockaddr_storage ac_aggr;
12054 if (sizeof ac_aggr.ss_family)
12055 return 0;
12056   ;
12057   return 0;
12058 }
12059 _ACEOF
12060 rm -f conftest.$ac_objext
12061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12062   (eval $ac_compile) 2>conftest.er1
12063   ac_status=$?
12064   grep -v '^ *+' conftest.er1 >conftest.err
12065   rm -f conftest.er1
12066   cat conftest.err >&5
12067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12068   (exit $ac_status); } &&
12069          { ac_try='test -z "$ac_c_werror_flag"
12070                          || test ! -s conftest.err'
12071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12072   (eval $ac_try) 2>&5
12073   ac_status=$?
12074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12075   (exit $ac_status); }; } &&
12076          { ac_try='test -s conftest.$ac_objext'
12077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12078   (eval $ac_try) 2>&5
12079   ac_status=$?
12080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12081   (exit $ac_status); }; }; then
12082   ac_cv_member_struct_sockaddr_storage_ss_family=yes
12083 else
12084   echo "$as_me: failed program was:" >&5
12085 sed 's/^/| /' conftest.$ac_ext >&5
12086
12087 ac_cv_member_struct_sockaddr_storage_ss_family=no
12088 fi
12089 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12090 fi
12091 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12092 fi
12093 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
12094 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
12095 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
12096
12097 cat >>confdefs.h <<_ACEOF
12098 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12099 _ACEOF
12100
12101
12102 fi
12103 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
12104 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
12105 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
12106   echo $ECHO_N "(cached) $ECHO_C" >&6
12107 else
12108   cat >conftest.$ac_ext <<_ACEOF
12109 /* confdefs.h.  */
12110 _ACEOF
12111 cat confdefs.h >>conftest.$ac_ext
12112 cat >>conftest.$ac_ext <<_ACEOF
12113 /* end confdefs.h.  */
12114 #include <sys/types.h>
12115 #ifdef HAVE_SYS_SOCKET_H
12116 #include <sys/socket.h>
12117 #endif
12118
12119
12120 int
12121 main ()
12122 {
12123 static struct sockaddr_storage ac_aggr;
12124 if (ac_aggr.__ss_family)
12125 return 0;
12126   ;
12127   return 0;
12128 }
12129 _ACEOF
12130 rm -f conftest.$ac_objext
12131 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12132   (eval $ac_compile) 2>conftest.er1
12133   ac_status=$?
12134   grep -v '^ *+' conftest.er1 >conftest.err
12135   rm -f conftest.er1
12136   cat conftest.err >&5
12137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12138   (exit $ac_status); } &&
12139          { ac_try='test -z "$ac_c_werror_flag"
12140                          || test ! -s conftest.err'
12141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12142   (eval $ac_try) 2>&5
12143   ac_status=$?
12144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12145   (exit $ac_status); }; } &&
12146          { ac_try='test -s conftest.$ac_objext'
12147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12148   (eval $ac_try) 2>&5
12149   ac_status=$?
12150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12151   (exit $ac_status); }; }; then
12152   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12153 else
12154   echo "$as_me: failed program was:" >&5
12155 sed 's/^/| /' conftest.$ac_ext >&5
12156
12157 cat >conftest.$ac_ext <<_ACEOF
12158 /* confdefs.h.  */
12159 _ACEOF
12160 cat confdefs.h >>conftest.$ac_ext
12161 cat >>conftest.$ac_ext <<_ACEOF
12162 /* end confdefs.h.  */
12163 #include <sys/types.h>
12164 #ifdef HAVE_SYS_SOCKET_H
12165 #include <sys/socket.h>
12166 #endif
12167
12168
12169 int
12170 main ()
12171 {
12172 static struct sockaddr_storage ac_aggr;
12173 if (sizeof ac_aggr.__ss_family)
12174 return 0;
12175   ;
12176   return 0;
12177 }
12178 _ACEOF
12179 rm -f conftest.$ac_objext
12180 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12181   (eval $ac_compile) 2>conftest.er1
12182   ac_status=$?
12183   grep -v '^ *+' conftest.er1 >conftest.err
12184   rm -f conftest.er1
12185   cat conftest.err >&5
12186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12187   (exit $ac_status); } &&
12188          { ac_try='test -z "$ac_c_werror_flag"
12189                          || test ! -s conftest.err'
12190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12191   (eval $ac_try) 2>&5
12192   ac_status=$?
12193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12194   (exit $ac_status); }; } &&
12195          { ac_try='test -s conftest.$ac_objext'
12196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12197   (eval $ac_try) 2>&5
12198   ac_status=$?
12199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12200   (exit $ac_status); }; }; then
12201   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12202 else
12203   echo "$as_me: failed program was:" >&5
12204 sed 's/^/| /' conftest.$ac_ext >&5
12205
12206 ac_cv_member_struct_sockaddr_storage___ss_family=no
12207 fi
12208 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12209 fi
12210 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12211 fi
12212 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12213 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12214 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12215
12216 cat >>confdefs.h <<_ACEOF
12217 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12218 _ACEOF
12219
12220
12221 fi
12222 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12223 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12224 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12225   echo $ECHO_N "(cached) $ECHO_C" >&6
12226 else
12227   cat >conftest.$ac_ext <<_ACEOF
12228 /* confdefs.h.  */
12229 _ACEOF
12230 cat confdefs.h >>conftest.$ac_ext
12231 cat >>conftest.$ac_ext <<_ACEOF
12232 /* end confdefs.h.  */
12233 #include <sys/types.h>
12234 #ifdef HAVE_SYS_SOCKET_H
12235 #include <sys/socket.h>
12236 #endif
12237
12238
12239 int
12240 main ()
12241 {
12242 static struct sockaddr_storage ac_aggr;
12243 if (ac_aggr.ss_len)
12244 return 0;
12245   ;
12246   return 0;
12247 }
12248 _ACEOF
12249 rm -f conftest.$ac_objext
12250 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12251   (eval $ac_compile) 2>conftest.er1
12252   ac_status=$?
12253   grep -v '^ *+' conftest.er1 >conftest.err
12254   rm -f conftest.er1
12255   cat conftest.err >&5
12256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12257   (exit $ac_status); } &&
12258          { ac_try='test -z "$ac_c_werror_flag"
12259                          || test ! -s conftest.err'
12260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12261   (eval $ac_try) 2>&5
12262   ac_status=$?
12263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12264   (exit $ac_status); }; } &&
12265          { ac_try='test -s conftest.$ac_objext'
12266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12267   (eval $ac_try) 2>&5
12268   ac_status=$?
12269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12270   (exit $ac_status); }; }; then
12271   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12272 else
12273   echo "$as_me: failed program was:" >&5
12274 sed 's/^/| /' conftest.$ac_ext >&5
12275
12276 cat >conftest.$ac_ext <<_ACEOF
12277 /* confdefs.h.  */
12278 _ACEOF
12279 cat confdefs.h >>conftest.$ac_ext
12280 cat >>conftest.$ac_ext <<_ACEOF
12281 /* end confdefs.h.  */
12282 #include <sys/types.h>
12283 #ifdef HAVE_SYS_SOCKET_H
12284 #include <sys/socket.h>
12285 #endif
12286
12287
12288 int
12289 main ()
12290 {
12291 static struct sockaddr_storage ac_aggr;
12292 if (sizeof ac_aggr.ss_len)
12293 return 0;
12294   ;
12295   return 0;
12296 }
12297 _ACEOF
12298 rm -f conftest.$ac_objext
12299 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12300   (eval $ac_compile) 2>conftest.er1
12301   ac_status=$?
12302   grep -v '^ *+' conftest.er1 >conftest.err
12303   rm -f conftest.er1
12304   cat conftest.err >&5
12305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12306   (exit $ac_status); } &&
12307          { ac_try='test -z "$ac_c_werror_flag"
12308                          || test ! -s conftest.err'
12309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12310   (eval $ac_try) 2>&5
12311   ac_status=$?
12312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12313   (exit $ac_status); }; } &&
12314          { ac_try='test -s conftest.$ac_objext'
12315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12316   (eval $ac_try) 2>&5
12317   ac_status=$?
12318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12319   (exit $ac_status); }; }; then
12320   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12321 else
12322   echo "$as_me: failed program was:" >&5
12323 sed 's/^/| /' conftest.$ac_ext >&5
12324
12325 ac_cv_member_struct_sockaddr_storage_ss_len=no
12326 fi
12327 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12328 fi
12329 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12330 fi
12331 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12332 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12333 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12334
12335 cat >>confdefs.h <<_ACEOF
12336 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12337 _ACEOF
12338
12339
12340 fi
12341 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12342 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12343 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12344   echo $ECHO_N "(cached) $ECHO_C" >&6
12345 else
12346   cat >conftest.$ac_ext <<_ACEOF
12347 /* confdefs.h.  */
12348 _ACEOF
12349 cat confdefs.h >>conftest.$ac_ext
12350 cat >>conftest.$ac_ext <<_ACEOF
12351 /* end confdefs.h.  */
12352 #include <sys/types.h>
12353 #ifdef HAVE_SYS_SOCKET_H
12354 #include <sys/socket.h>
12355 #endif
12356
12357
12358 int
12359 main ()
12360 {
12361 static struct sockaddr_storage ac_aggr;
12362 if (ac_aggr.__ss_len)
12363 return 0;
12364   ;
12365   return 0;
12366 }
12367 _ACEOF
12368 rm -f conftest.$ac_objext
12369 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12370   (eval $ac_compile) 2>conftest.er1
12371   ac_status=$?
12372   grep -v '^ *+' conftest.er1 >conftest.err
12373   rm -f conftest.er1
12374   cat conftest.err >&5
12375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12376   (exit $ac_status); } &&
12377          { ac_try='test -z "$ac_c_werror_flag"
12378                          || test ! -s conftest.err'
12379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12380   (eval $ac_try) 2>&5
12381   ac_status=$?
12382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12383   (exit $ac_status); }; } &&
12384          { ac_try='test -s conftest.$ac_objext'
12385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12386   (eval $ac_try) 2>&5
12387   ac_status=$?
12388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389   (exit $ac_status); }; }; then
12390   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12391 else
12392   echo "$as_me: failed program was:" >&5
12393 sed 's/^/| /' conftest.$ac_ext >&5
12394
12395 cat >conftest.$ac_ext <<_ACEOF
12396 /* confdefs.h.  */
12397 _ACEOF
12398 cat confdefs.h >>conftest.$ac_ext
12399 cat >>conftest.$ac_ext <<_ACEOF
12400 /* end confdefs.h.  */
12401 #include <sys/types.h>
12402 #ifdef HAVE_SYS_SOCKET_H
12403 #include <sys/socket.h>
12404 #endif
12405
12406
12407 int
12408 main ()
12409 {
12410 static struct sockaddr_storage ac_aggr;
12411 if (sizeof ac_aggr.__ss_len)
12412 return 0;
12413   ;
12414   return 0;
12415 }
12416 _ACEOF
12417 rm -f conftest.$ac_objext
12418 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12419   (eval $ac_compile) 2>conftest.er1
12420   ac_status=$?
12421   grep -v '^ *+' conftest.er1 >conftest.err
12422   rm -f conftest.er1
12423   cat conftest.err >&5
12424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12425   (exit $ac_status); } &&
12426          { ac_try='test -z "$ac_c_werror_flag"
12427                          || test ! -s conftest.err'
12428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12429   (eval $ac_try) 2>&5
12430   ac_status=$?
12431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12432   (exit $ac_status); }; } &&
12433          { ac_try='test -s conftest.$ac_objext'
12434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12435   (eval $ac_try) 2>&5
12436   ac_status=$?
12437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438   (exit $ac_status); }; }; then
12439   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12440 else
12441   echo "$as_me: failed program was:" >&5
12442 sed 's/^/| /' conftest.$ac_ext >&5
12443
12444 ac_cv_member_struct_sockaddr_storage___ss_len=no
12445 fi
12446 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12447 fi
12448 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12449 fi
12450 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12451 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12452 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12453
12454 cat >>confdefs.h <<_ACEOF
12455 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12456 _ACEOF
12457
12458
12459 fi
12460 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12461 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12462 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12463   echo $ECHO_N "(cached) $ECHO_C" >&6
12464 else
12465   cat >conftest.$ac_ext <<_ACEOF
12466 /* confdefs.h.  */
12467 _ACEOF
12468 cat confdefs.h >>conftest.$ac_ext
12469 cat >>conftest.$ac_ext <<_ACEOF
12470 /* end confdefs.h.  */
12471 #include <sys/types.h>
12472 #ifdef HAVE_SYS_SOCKET_H
12473 #include <sys/socket.h>
12474 #endif
12475
12476
12477 int
12478 main ()
12479 {
12480 static struct sockaddr ac_aggr;
12481 if (ac_aggr.sa_len)
12482 return 0;
12483   ;
12484   return 0;
12485 }
12486 _ACEOF
12487 rm -f conftest.$ac_objext
12488 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12489   (eval $ac_compile) 2>conftest.er1
12490   ac_status=$?
12491   grep -v '^ *+' conftest.er1 >conftest.err
12492   rm -f conftest.er1
12493   cat conftest.err >&5
12494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495   (exit $ac_status); } &&
12496          { ac_try='test -z "$ac_c_werror_flag"
12497                          || test ! -s conftest.err'
12498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12499   (eval $ac_try) 2>&5
12500   ac_status=$?
12501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12502   (exit $ac_status); }; } &&
12503          { ac_try='test -s conftest.$ac_objext'
12504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12505   (eval $ac_try) 2>&5
12506   ac_status=$?
12507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12508   (exit $ac_status); }; }; then
12509   ac_cv_member_struct_sockaddr_sa_len=yes
12510 else
12511   echo "$as_me: failed program was:" >&5
12512 sed 's/^/| /' conftest.$ac_ext >&5
12513
12514 cat >conftest.$ac_ext <<_ACEOF
12515 /* confdefs.h.  */
12516 _ACEOF
12517 cat confdefs.h >>conftest.$ac_ext
12518 cat >>conftest.$ac_ext <<_ACEOF
12519 /* end confdefs.h.  */
12520 #include <sys/types.h>
12521 #ifdef HAVE_SYS_SOCKET_H
12522 #include <sys/socket.h>
12523 #endif
12524
12525
12526 int
12527 main ()
12528 {
12529 static struct sockaddr ac_aggr;
12530 if (sizeof ac_aggr.sa_len)
12531 return 0;
12532   ;
12533   return 0;
12534 }
12535 _ACEOF
12536 rm -f conftest.$ac_objext
12537 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12538   (eval $ac_compile) 2>conftest.er1
12539   ac_status=$?
12540   grep -v '^ *+' conftest.er1 >conftest.err
12541   rm -f conftest.er1
12542   cat conftest.err >&5
12543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12544   (exit $ac_status); } &&
12545          { ac_try='test -z "$ac_c_werror_flag"
12546                          || test ! -s conftest.err'
12547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12548   (eval $ac_try) 2>&5
12549   ac_status=$?
12550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12551   (exit $ac_status); }; } &&
12552          { ac_try='test -s conftest.$ac_objext'
12553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12554   (eval $ac_try) 2>&5
12555   ac_status=$?
12556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12557   (exit $ac_status); }; }; then
12558   ac_cv_member_struct_sockaddr_sa_len=yes
12559 else
12560   echo "$as_me: failed program was:" >&5
12561 sed 's/^/| /' conftest.$ac_ext >&5
12562
12563 ac_cv_member_struct_sockaddr_sa_len=no
12564 fi
12565 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12566 fi
12567 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12568 fi
12569 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12570 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12571 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12572
12573 cat >>confdefs.h <<_ACEOF
12574 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12575 _ACEOF
12576
12577
12578 fi
12579
12580 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12581 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12582 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12583   echo $ECHO_N "(cached) $ECHO_C" >&6
12584 else
12585   cat >conftest.$ac_ext <<_ACEOF
12586 /* confdefs.h.  */
12587 _ACEOF
12588 cat confdefs.h >>conftest.$ac_ext
12589 cat >>conftest.$ac_ext <<_ACEOF
12590 /* end confdefs.h.  */
12591 #include <sys/types.h>
12592 #include <sys/socket.h>
12593 #include <netdb.h>
12594
12595
12596 int
12597 main ()
12598 {
12599 if ((struct addrinfo *) 0)
12600   return 0;
12601 if (sizeof (struct addrinfo))
12602   return 0;
12603   ;
12604   return 0;
12605 }
12606 _ACEOF
12607 rm -f conftest.$ac_objext
12608 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12609   (eval $ac_compile) 2>conftest.er1
12610   ac_status=$?
12611   grep -v '^ *+' conftest.er1 >conftest.err
12612   rm -f conftest.er1
12613   cat conftest.err >&5
12614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12615   (exit $ac_status); } &&
12616          { ac_try='test -z "$ac_c_werror_flag"
12617                          || test ! -s conftest.err'
12618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12619   (eval $ac_try) 2>&5
12620   ac_status=$?
12621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12622   (exit $ac_status); }; } &&
12623          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
12629   ac_cv_type_struct_addrinfo=yes
12630 else
12631   echo "$as_me: failed program was:" >&5
12632 sed 's/^/| /' conftest.$ac_ext >&5
12633
12634 ac_cv_type_struct_addrinfo=no
12635 fi
12636 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12637 fi
12638 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12639 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12640 if test $ac_cv_type_struct_addrinfo = yes; then
12641
12642 cat >>confdefs.h <<_ACEOF
12643 #define HAVE_STRUCT_ADDRINFO 1
12644 _ACEOF
12645
12646
12647 fi
12648
12649
12650 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12651 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12652 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12653   echo $ECHO_N "(cached) $ECHO_C" >&6
12654 else
12655   cat >conftest.$ac_ext <<_ACEOF
12656 /* confdefs.h.  */
12657 _ACEOF
12658 cat confdefs.h >>conftest.$ac_ext
12659 cat >>conftest.$ac_ext <<_ACEOF
12660 /* end confdefs.h.  */
12661 #include <sys/param.h>
12662 #include <sys/types.h>
12663 #include <sys/socket.h>
12664 #include <sys/ucred.h>
12665
12666 int
12667 main ()
12668 {
12669 if ((struct cmsgcred *) 0)
12670   return 0;
12671 if (sizeof (struct cmsgcred))
12672   return 0;
12673   ;
12674   return 0;
12675 }
12676 _ACEOF
12677 rm -f conftest.$ac_objext
12678 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12679   (eval $ac_compile) 2>conftest.er1
12680   ac_status=$?
12681   grep -v '^ *+' conftest.er1 >conftest.err
12682   rm -f conftest.er1
12683   cat conftest.err >&5
12684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12685   (exit $ac_status); } &&
12686          { ac_try='test -z "$ac_c_werror_flag"
12687                          || test ! -s conftest.err'
12688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12689   (eval $ac_try) 2>&5
12690   ac_status=$?
12691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12692   (exit $ac_status); }; } &&
12693          { ac_try='test -s conftest.$ac_objext'
12694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12695   (eval $ac_try) 2>&5
12696   ac_status=$?
12697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12698   (exit $ac_status); }; }; then
12699   ac_cv_type_struct_cmsgcred=yes
12700 else
12701   echo "$as_me: failed program was:" >&5
12702 sed 's/^/| /' conftest.$ac_ext >&5
12703
12704 ac_cv_type_struct_cmsgcred=no
12705 fi
12706 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12707 fi
12708 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12709 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12710 if test $ac_cv_type_struct_cmsgcred = yes; then
12711
12712 cat >>confdefs.h <<_ACEOF
12713 #define HAVE_STRUCT_CMSGCRED 1
12714 _ACEOF
12715
12716
12717 fi
12718 echo "$as_me:$LINENO: checking for struct fcred" >&5
12719 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12720 if test "${ac_cv_type_struct_fcred+set}" = set; then
12721   echo $ECHO_N "(cached) $ECHO_C" >&6
12722 else
12723   cat >conftest.$ac_ext <<_ACEOF
12724 /* confdefs.h.  */
12725 _ACEOF
12726 cat confdefs.h >>conftest.$ac_ext
12727 cat >>conftest.$ac_ext <<_ACEOF
12728 /* end confdefs.h.  */
12729 #include <sys/param.h>
12730 #include <sys/types.h>
12731 #include <sys/socket.h>
12732 #include <sys/ucred.h>
12733
12734 int
12735 main ()
12736 {
12737 if ((struct fcred *) 0)
12738   return 0;
12739 if (sizeof (struct fcred))
12740   return 0;
12741   ;
12742   return 0;
12743 }
12744 _ACEOF
12745 rm -f conftest.$ac_objext
12746 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12747   (eval $ac_compile) 2>conftest.er1
12748   ac_status=$?
12749   grep -v '^ *+' conftest.er1 >conftest.err
12750   rm -f conftest.er1
12751   cat conftest.err >&5
12752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753   (exit $ac_status); } &&
12754          { ac_try='test -z "$ac_c_werror_flag"
12755                          || test ! -s conftest.err'
12756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12757   (eval $ac_try) 2>&5
12758   ac_status=$?
12759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12760   (exit $ac_status); }; } &&
12761          { ac_try='test -s conftest.$ac_objext'
12762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12763   (eval $ac_try) 2>&5
12764   ac_status=$?
12765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12766   (exit $ac_status); }; }; then
12767   ac_cv_type_struct_fcred=yes
12768 else
12769   echo "$as_me: failed program was:" >&5
12770 sed 's/^/| /' conftest.$ac_ext >&5
12771
12772 ac_cv_type_struct_fcred=no
12773 fi
12774 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12775 fi
12776 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12777 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12778 if test $ac_cv_type_struct_fcred = yes; then
12779
12780 cat >>confdefs.h <<_ACEOF
12781 #define HAVE_STRUCT_FCRED 1
12782 _ACEOF
12783
12784
12785 fi
12786 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12787 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12788 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12789   echo $ECHO_N "(cached) $ECHO_C" >&6
12790 else
12791   cat >conftest.$ac_ext <<_ACEOF
12792 /* confdefs.h.  */
12793 _ACEOF
12794 cat confdefs.h >>conftest.$ac_ext
12795 cat >>conftest.$ac_ext <<_ACEOF
12796 /* end confdefs.h.  */
12797 #include <sys/param.h>
12798 #include <sys/types.h>
12799 #include <sys/socket.h>
12800 #include <sys/ucred.h>
12801
12802 int
12803 main ()
12804 {
12805 if ((struct sockcred *) 0)
12806   return 0;
12807 if (sizeof (struct sockcred))
12808   return 0;
12809   ;
12810   return 0;
12811 }
12812 _ACEOF
12813 rm -f conftest.$ac_objext
12814 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12815   (eval $ac_compile) 2>conftest.er1
12816   ac_status=$?
12817   grep -v '^ *+' conftest.er1 >conftest.err
12818   rm -f conftest.er1
12819   cat conftest.err >&5
12820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821   (exit $ac_status); } &&
12822          { ac_try='test -z "$ac_c_werror_flag"
12823                          || test ! -s conftest.err'
12824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12825   (eval $ac_try) 2>&5
12826   ac_status=$?
12827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12828   (exit $ac_status); }; } &&
12829          { ac_try='test -s conftest.$ac_objext'
12830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12831   (eval $ac_try) 2>&5
12832   ac_status=$?
12833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12834   (exit $ac_status); }; }; then
12835   ac_cv_type_struct_sockcred=yes
12836 else
12837   echo "$as_me: failed program was:" >&5
12838 sed 's/^/| /' conftest.$ac_ext >&5
12839
12840 ac_cv_type_struct_sockcred=no
12841 fi
12842 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12843 fi
12844 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12845 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12846 if test $ac_cv_type_struct_sockcred = yes; then
12847
12848 cat >>confdefs.h <<_ACEOF
12849 #define HAVE_STRUCT_SOCKCRED 1
12850 _ACEOF
12851
12852
12853 fi
12854
12855
12856 echo "$as_me:$LINENO: checking for struct option" >&5
12857 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12858 if test "${ac_cv_type_struct_option+set}" = set; then
12859   echo $ECHO_N "(cached) $ECHO_C" >&6
12860 else
12861   cat >conftest.$ac_ext <<_ACEOF
12862 /* confdefs.h.  */
12863 _ACEOF
12864 cat confdefs.h >>conftest.$ac_ext
12865 cat >>conftest.$ac_ext <<_ACEOF
12866 /* end confdefs.h.  */
12867 #ifdef HAVE_GETOPT_H
12868 #include <getopt.h>
12869 #endif
12870
12871 int
12872 main ()
12873 {
12874 if ((struct option *) 0)
12875   return 0;
12876 if (sizeof (struct option))
12877   return 0;
12878   ;
12879   return 0;
12880 }
12881 _ACEOF
12882 rm -f conftest.$ac_objext
12883 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12884   (eval $ac_compile) 2>conftest.er1
12885   ac_status=$?
12886   grep -v '^ *+' conftest.er1 >conftest.err
12887   rm -f conftest.er1
12888   cat conftest.err >&5
12889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12890   (exit $ac_status); } &&
12891          { ac_try='test -z "$ac_c_werror_flag"
12892                          || test ! -s conftest.err'
12893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12894   (eval $ac_try) 2>&5
12895   ac_status=$?
12896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12897   (exit $ac_status); }; } &&
12898          { ac_try='test -s conftest.$ac_objext'
12899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12900   (eval $ac_try) 2>&5
12901   ac_status=$?
12902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12903   (exit $ac_status); }; }; then
12904   ac_cv_type_struct_option=yes
12905 else
12906   echo "$as_me: failed program was:" >&5
12907 sed 's/^/| /' conftest.$ac_ext >&5
12908
12909 ac_cv_type_struct_option=no
12910 fi
12911 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12912 fi
12913 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12914 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12915 if test $ac_cv_type_struct_option = yes; then
12916
12917 cat >>confdefs.h <<_ACEOF
12918 #define HAVE_STRUCT_OPTION 1
12919 _ACEOF
12920
12921
12922 fi
12923
12924
12925 if test "$with_zlib" = yes; then
12926   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12927   # did not).  While we could work around the lack of z_streamp, it
12928   # seems unwise to encourage people to use such old zlib versions...
12929   echo "$as_me:$LINENO: checking for z_streamp" >&5
12930 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12931 if test "${ac_cv_type_z_streamp+set}" = set; then
12932   echo $ECHO_N "(cached) $ECHO_C" >&6
12933 else
12934   cat >conftest.$ac_ext <<_ACEOF
12935 /* confdefs.h.  */
12936 _ACEOF
12937 cat confdefs.h >>conftest.$ac_ext
12938 cat >>conftest.$ac_ext <<_ACEOF
12939 /* end confdefs.h.  */
12940 #include <zlib.h>
12941
12942 int
12943 main ()
12944 {
12945 if ((z_streamp *) 0)
12946   return 0;
12947 if (sizeof (z_streamp))
12948   return 0;
12949   ;
12950   return 0;
12951 }
12952 _ACEOF
12953 rm -f conftest.$ac_objext
12954 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12955   (eval $ac_compile) 2>conftest.er1
12956   ac_status=$?
12957   grep -v '^ *+' conftest.er1 >conftest.err
12958   rm -f conftest.er1
12959   cat conftest.err >&5
12960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12961   (exit $ac_status); } &&
12962          { ac_try='test -z "$ac_c_werror_flag"
12963                          || test ! -s conftest.err'
12964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12965   (eval $ac_try) 2>&5
12966   ac_status=$?
12967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12968   (exit $ac_status); }; } &&
12969          { ac_try='test -s conftest.$ac_objext'
12970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12971   (eval $ac_try) 2>&5
12972   ac_status=$?
12973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12974   (exit $ac_status); }; }; then
12975   ac_cv_type_z_streamp=yes
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 sed 's/^/| /' conftest.$ac_ext >&5
12979
12980 ac_cv_type_z_streamp=no
12981 fi
12982 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12983 fi
12984 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12985 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12986 if test $ac_cv_type_z_streamp = yes; then
12987   :
12988 else
12989   { { echo "$as_me:$LINENO: error: zlib version is too old
12990 Use --without-zlib to disable zlib support." >&5
12991 echo "$as_me: error: zlib version is too old
12992 Use --without-zlib to disable zlib support." >&2;}
12993    { (exit 1); exit 1; }; }
12994 fi
12995
12996 fi
12997
12998 if test "$with_krb5" = yes; then
12999 # Check for differences between MIT and Heimdal (KTH) releases
13000   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
13001 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
13002 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
13003   echo $ECHO_N "(cached) $ECHO_C" >&6
13004 else
13005   cat >conftest.$ac_ext <<_ACEOF
13006 /* confdefs.h.  */
13007 _ACEOF
13008 cat confdefs.h >>conftest.$ac_ext
13009 cat >>conftest.$ac_ext <<_ACEOF
13010 /* end confdefs.h.  */
13011 #include <krb5.h>
13012
13013 int
13014 main ()
13015 {
13016 static krb5_ticket ac_aggr;
13017 if (ac_aggr.enc_part2)
13018 return 0;
13019   ;
13020   return 0;
13021 }
13022 _ACEOF
13023 rm -f conftest.$ac_objext
13024 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13025   (eval $ac_compile) 2>conftest.er1
13026   ac_status=$?
13027   grep -v '^ *+' conftest.er1 >conftest.err
13028   rm -f conftest.er1
13029   cat conftest.err >&5
13030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13031   (exit $ac_status); } &&
13032          { ac_try='test -z "$ac_c_werror_flag"
13033                          || test ! -s conftest.err'
13034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13035   (eval $ac_try) 2>&5
13036   ac_status=$?
13037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13038   (exit $ac_status); }; } &&
13039          { ac_try='test -s conftest.$ac_objext'
13040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13041   (eval $ac_try) 2>&5
13042   ac_status=$?
13043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13044   (exit $ac_status); }; }; then
13045   ac_cv_member_krb5_ticket_enc_part2=yes
13046 else
13047   echo "$as_me: failed program was:" >&5
13048 sed 's/^/| /' conftest.$ac_ext >&5
13049
13050 cat >conftest.$ac_ext <<_ACEOF
13051 /* confdefs.h.  */
13052 _ACEOF
13053 cat confdefs.h >>conftest.$ac_ext
13054 cat >>conftest.$ac_ext <<_ACEOF
13055 /* end confdefs.h.  */
13056 #include <krb5.h>
13057
13058 int
13059 main ()
13060 {
13061 static krb5_ticket ac_aggr;
13062 if (sizeof ac_aggr.enc_part2)
13063 return 0;
13064   ;
13065   return 0;
13066 }
13067 _ACEOF
13068 rm -f conftest.$ac_objext
13069 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13070   (eval $ac_compile) 2>conftest.er1
13071   ac_status=$?
13072   grep -v '^ *+' conftest.er1 >conftest.err
13073   rm -f conftest.er1
13074   cat conftest.err >&5
13075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13076   (exit $ac_status); } &&
13077          { ac_try='test -z "$ac_c_werror_flag"
13078                          || test ! -s conftest.err'
13079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13080   (eval $ac_try) 2>&5
13081   ac_status=$?
13082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13083   (exit $ac_status); }; } &&
13084          { ac_try='test -s conftest.$ac_objext'
13085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13086   (eval $ac_try) 2>&5
13087   ac_status=$?
13088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13089   (exit $ac_status); }; }; then
13090   ac_cv_member_krb5_ticket_enc_part2=yes
13091 else
13092   echo "$as_me: failed program was:" >&5
13093 sed 's/^/| /' conftest.$ac_ext >&5
13094
13095 ac_cv_member_krb5_ticket_enc_part2=no
13096 fi
13097 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13098 fi
13099 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13100 fi
13101 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
13102 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
13103 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
13104
13105 cat >>confdefs.h <<_ACEOF
13106 #define HAVE_KRB5_TICKET_ENC_PART2 1
13107 _ACEOF
13108
13109
13110 else
13111   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
13112 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
13113 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
13114   echo $ECHO_N "(cached) $ECHO_C" >&6
13115 else
13116   cat >conftest.$ac_ext <<_ACEOF
13117 /* confdefs.h.  */
13118 _ACEOF
13119 cat confdefs.h >>conftest.$ac_ext
13120 cat >>conftest.$ac_ext <<_ACEOF
13121 /* end confdefs.h.  */
13122 #include <krb5.h>
13123
13124 int
13125 main ()
13126 {
13127 static krb5_ticket ac_aggr;
13128 if (ac_aggr.client)
13129 return 0;
13130   ;
13131   return 0;
13132 }
13133 _ACEOF
13134 rm -f conftest.$ac_objext
13135 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13136   (eval $ac_compile) 2>conftest.er1
13137   ac_status=$?
13138   grep -v '^ *+' conftest.er1 >conftest.err
13139   rm -f conftest.er1
13140   cat conftest.err >&5
13141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13142   (exit $ac_status); } &&
13143          { ac_try='test -z "$ac_c_werror_flag"
13144                          || test ! -s conftest.err'
13145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13146   (eval $ac_try) 2>&5
13147   ac_status=$?
13148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13149   (exit $ac_status); }; } &&
13150          { ac_try='test -s conftest.$ac_objext'
13151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13152   (eval $ac_try) 2>&5
13153   ac_status=$?
13154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13155   (exit $ac_status); }; }; then
13156   ac_cv_member_krb5_ticket_client=yes
13157 else
13158   echo "$as_me: failed program was:" >&5
13159 sed 's/^/| /' conftest.$ac_ext >&5
13160
13161 cat >conftest.$ac_ext <<_ACEOF
13162 /* confdefs.h.  */
13163 _ACEOF
13164 cat confdefs.h >>conftest.$ac_ext
13165 cat >>conftest.$ac_ext <<_ACEOF
13166 /* end confdefs.h.  */
13167 #include <krb5.h>
13168
13169 int
13170 main ()
13171 {
13172 static krb5_ticket ac_aggr;
13173 if (sizeof ac_aggr.client)
13174 return 0;
13175   ;
13176   return 0;
13177 }
13178 _ACEOF
13179 rm -f conftest.$ac_objext
13180 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13181   (eval $ac_compile) 2>conftest.er1
13182   ac_status=$?
13183   grep -v '^ *+' conftest.er1 >conftest.err
13184   rm -f conftest.er1
13185   cat conftest.err >&5
13186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13187   (exit $ac_status); } &&
13188          { ac_try='test -z "$ac_c_werror_flag"
13189                          || test ! -s conftest.err'
13190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13191   (eval $ac_try) 2>&5
13192   ac_status=$?
13193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13194   (exit $ac_status); }; } &&
13195          { ac_try='test -s conftest.$ac_objext'
13196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13197   (eval $ac_try) 2>&5
13198   ac_status=$?
13199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13200   (exit $ac_status); }; }; then
13201   ac_cv_member_krb5_ticket_client=yes
13202 else
13203   echo "$as_me: failed program was:" >&5
13204 sed 's/^/| /' conftest.$ac_ext >&5
13205
13206 ac_cv_member_krb5_ticket_client=no
13207 fi
13208 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13209 fi
13210 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13211 fi
13212 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13213 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13214 if test $ac_cv_member_krb5_ticket_client = yes; then
13215
13216 cat >>confdefs.h <<_ACEOF
13217 #define HAVE_KRB5_TICKET_CLIENT 1
13218 _ACEOF
13219
13220
13221 else
13222   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13223 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13224    { (exit 1); exit 1; }; }
13225 fi
13226
13227 fi
13228
13229   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13230 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13231 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13232   echo $ECHO_N "(cached) $ECHO_C" >&6
13233 else
13234   cat >conftest.$ac_ext <<_ACEOF
13235 /* confdefs.h.  */
13236 _ACEOF
13237 cat confdefs.h >>conftest.$ac_ext
13238 cat >>conftest.$ac_ext <<_ACEOF
13239 /* end confdefs.h.  */
13240 #include <krb5.h>
13241
13242 int
13243 main ()
13244 {
13245 static krb5_error ac_aggr;
13246 if (ac_aggr.text.data)
13247 return 0;
13248   ;
13249   return 0;
13250 }
13251 _ACEOF
13252 rm -f conftest.$ac_objext
13253 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13254   (eval $ac_compile) 2>conftest.er1
13255   ac_status=$?
13256   grep -v '^ *+' conftest.er1 >conftest.err
13257   rm -f conftest.er1
13258   cat conftest.err >&5
13259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13260   (exit $ac_status); } &&
13261          { ac_try='test -z "$ac_c_werror_flag"
13262                          || test ! -s conftest.err'
13263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13264   (eval $ac_try) 2>&5
13265   ac_status=$?
13266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13267   (exit $ac_status); }; } &&
13268          { ac_try='test -s conftest.$ac_objext'
13269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13270   (eval $ac_try) 2>&5
13271   ac_status=$?
13272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273   (exit $ac_status); }; }; then
13274   ac_cv_member_krb5_error_text_data=yes
13275 else
13276   echo "$as_me: failed program was:" >&5
13277 sed 's/^/| /' conftest.$ac_ext >&5
13278
13279 cat >conftest.$ac_ext <<_ACEOF
13280 /* confdefs.h.  */
13281 _ACEOF
13282 cat confdefs.h >>conftest.$ac_ext
13283 cat >>conftest.$ac_ext <<_ACEOF
13284 /* end confdefs.h.  */
13285 #include <krb5.h>
13286
13287 int
13288 main ()
13289 {
13290 static krb5_error ac_aggr;
13291 if (sizeof ac_aggr.text.data)
13292 return 0;
13293   ;
13294   return 0;
13295 }
13296 _ACEOF
13297 rm -f conftest.$ac_objext
13298 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13299   (eval $ac_compile) 2>conftest.er1
13300   ac_status=$?
13301   grep -v '^ *+' conftest.er1 >conftest.err
13302   rm -f conftest.er1
13303   cat conftest.err >&5
13304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13305   (exit $ac_status); } &&
13306          { ac_try='test -z "$ac_c_werror_flag"
13307                          || test ! -s conftest.err'
13308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13309   (eval $ac_try) 2>&5
13310   ac_status=$?
13311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13312   (exit $ac_status); }; } &&
13313          { ac_try='test -s conftest.$ac_objext'
13314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13315   (eval $ac_try) 2>&5
13316   ac_status=$?
13317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13318   (exit $ac_status); }; }; then
13319   ac_cv_member_krb5_error_text_data=yes
13320 else
13321   echo "$as_me: failed program was:" >&5
13322 sed 's/^/| /' conftest.$ac_ext >&5
13323
13324 ac_cv_member_krb5_error_text_data=no
13325 fi
13326 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13327 fi
13328 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13329 fi
13330 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13331 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13332 if test $ac_cv_member_krb5_error_text_data = yes; then
13333
13334 cat >>confdefs.h <<_ACEOF
13335 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13336 _ACEOF
13337
13338
13339 else
13340   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13341 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13342 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13343   echo $ECHO_N "(cached) $ECHO_C" >&6
13344 else
13345   cat >conftest.$ac_ext <<_ACEOF
13346 /* confdefs.h.  */
13347 _ACEOF
13348 cat confdefs.h >>conftest.$ac_ext
13349 cat >>conftest.$ac_ext <<_ACEOF
13350 /* end confdefs.h.  */
13351 #include <krb5.h>
13352
13353 int
13354 main ()
13355 {
13356 static krb5_error ac_aggr;
13357 if (ac_aggr.e_data)
13358 return 0;
13359   ;
13360   return 0;
13361 }
13362 _ACEOF
13363 rm -f conftest.$ac_objext
13364 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13365   (eval $ac_compile) 2>conftest.er1
13366   ac_status=$?
13367   grep -v '^ *+' conftest.er1 >conftest.err
13368   rm -f conftest.er1
13369   cat conftest.err >&5
13370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13371   (exit $ac_status); } &&
13372          { ac_try='test -z "$ac_c_werror_flag"
13373                          || test ! -s conftest.err'
13374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13375   (eval $ac_try) 2>&5
13376   ac_status=$?
13377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13378   (exit $ac_status); }; } &&
13379          { ac_try='test -s conftest.$ac_objext'
13380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13381   (eval $ac_try) 2>&5
13382   ac_status=$?
13383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13384   (exit $ac_status); }; }; then
13385   ac_cv_member_krb5_error_e_data=yes
13386 else
13387   echo "$as_me: failed program was:" >&5
13388 sed 's/^/| /' conftest.$ac_ext >&5
13389
13390 cat >conftest.$ac_ext <<_ACEOF
13391 /* confdefs.h.  */
13392 _ACEOF
13393 cat confdefs.h >>conftest.$ac_ext
13394 cat >>conftest.$ac_ext <<_ACEOF
13395 /* end confdefs.h.  */
13396 #include <krb5.h>
13397
13398 int
13399 main ()
13400 {
13401 static krb5_error ac_aggr;
13402 if (sizeof ac_aggr.e_data)
13403 return 0;
13404   ;
13405   return 0;
13406 }
13407 _ACEOF
13408 rm -f conftest.$ac_objext
13409 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13410   (eval $ac_compile) 2>conftest.er1
13411   ac_status=$?
13412   grep -v '^ *+' conftest.er1 >conftest.err
13413   rm -f conftest.er1
13414   cat conftest.err >&5
13415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13416   (exit $ac_status); } &&
13417          { ac_try='test -z "$ac_c_werror_flag"
13418                          || test ! -s conftest.err'
13419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13420   (eval $ac_try) 2>&5
13421   ac_status=$?
13422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13423   (exit $ac_status); }; } &&
13424          { ac_try='test -s conftest.$ac_objext'
13425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13426   (eval $ac_try) 2>&5
13427   ac_status=$?
13428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13429   (exit $ac_status); }; }; then
13430   ac_cv_member_krb5_error_e_data=yes
13431 else
13432   echo "$as_me: failed program was:" >&5
13433 sed 's/^/| /' conftest.$ac_ext >&5
13434
13435 ac_cv_member_krb5_error_e_data=no
13436 fi
13437 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13438 fi
13439 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13440 fi
13441 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13442 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13443 if test $ac_cv_member_krb5_error_e_data = yes; then
13444
13445 cat >>confdefs.h <<_ACEOF
13446 #define HAVE_KRB5_ERROR_E_DATA 1
13447 _ACEOF
13448
13449
13450 else
13451   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13452 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13453    { (exit 1); exit 1; }; }
13454 fi
13455
13456 fi
13457
13458 fi
13459
13460
13461 ##
13462 ## Functions, global variables
13463 ##
13464
13465 echo "$as_me:$LINENO: checking for int timezone" >&5
13466 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13467 if test "${pgac_cv_var_int_timezone+set}" = set; then
13468   echo $ECHO_N "(cached) $ECHO_C" >&6
13469 else
13470   cat >conftest.$ac_ext <<_ACEOF
13471 /* confdefs.h.  */
13472 _ACEOF
13473 cat confdefs.h >>conftest.$ac_ext
13474 cat >>conftest.$ac_ext <<_ACEOF
13475 /* end confdefs.h.  */
13476 #include <time.h>
13477 int res;
13478 int
13479 main ()
13480 {
13481 #ifndef __CYGWIN__
13482 res = timezone / 60;
13483 #else
13484 res = _timezone / 60;
13485 #endif
13486   ;
13487   return 0;
13488 }
13489 _ACEOF
13490 rm -f conftest.$ac_objext conftest$ac_exeext
13491 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13492   (eval $ac_link) 2>conftest.er1
13493   ac_status=$?
13494   grep -v '^ *+' conftest.er1 >conftest.err
13495   rm -f conftest.er1
13496   cat conftest.err >&5
13497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13498   (exit $ac_status); } &&
13499          { ac_try='test -z "$ac_c_werror_flag"
13500                          || test ! -s conftest.err'
13501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13502   (eval $ac_try) 2>&5
13503   ac_status=$?
13504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13505   (exit $ac_status); }; } &&
13506          { ac_try='test -s conftest$ac_exeext'
13507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13508   (eval $ac_try) 2>&5
13509   ac_status=$?
13510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13511   (exit $ac_status); }; }; then
13512   pgac_cv_var_int_timezone=yes
13513 else
13514   echo "$as_me: failed program was:" >&5
13515 sed 's/^/| /' conftest.$ac_ext >&5
13516
13517 pgac_cv_var_int_timezone=no
13518 fi
13519 rm -f conftest.err conftest.$ac_objext \
13520       conftest$ac_exeext conftest.$ac_ext
13521 fi
13522 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13523 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13524 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13525
13526 cat >>confdefs.h <<\_ACEOF
13527 #define HAVE_INT_TIMEZONE
13528 _ACEOF
13529
13530 fi
13531 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13532 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13533  if test "${ac_cv_func_accept_return+set}" = set; then
13534   echo $ECHO_N "(cached) $ECHO_C" >&6
13535 else
13536    if test "${ac_cv_func_accept_arg1+set}" = set; then
13537   echo $ECHO_N "(cached) $ECHO_C" >&6
13538 else
13539     if test "${ac_cv_func_accept_arg2+set}" = set; then
13540   echo $ECHO_N "(cached) $ECHO_C" >&6
13541 else
13542      if test "${ac_cv_func_accept_arg3+set}" = set; then
13543   echo $ECHO_N "(cached) $ECHO_C" >&6
13544 else
13545       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13546       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13547        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13548         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13549          cat >conftest.$ac_ext <<_ACEOF
13550 /* confdefs.h.  */
13551 _ACEOF
13552 cat confdefs.h >>conftest.$ac_ext
13553 cat >>conftest.$ac_ext <<_ACEOF
13554 /* end confdefs.h.  */
13555 #ifdef HAVE_SYS_TYPES_H
13556 #include <sys/types.h>
13557 #endif
13558 #ifdef HAVE_SYS_SOCKET_H
13559 #include <sys/socket.h>
13560 #endif
13561 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13562 int
13563 main ()
13564 {
13565
13566   ;
13567   return 0;
13568 }
13569 _ACEOF
13570 rm -f conftest.$ac_objext
13571 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13572   (eval $ac_compile) 2>conftest.er1
13573   ac_status=$?
13574   grep -v '^ *+' conftest.er1 >conftest.err
13575   rm -f conftest.er1
13576   cat conftest.err >&5
13577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13578   (exit $ac_status); } &&
13579          { ac_try='test -z "$ac_c_werror_flag"
13580                          || test ! -s conftest.err'
13581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585   (exit $ac_status); }; } &&
13586          { ac_try='test -s conftest.$ac_objext'
13587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13588   (eval $ac_try) 2>&5
13589   ac_status=$?
13590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13591   (exit $ac_status); }; }; then
13592   ac_not_found=no; break 4
13593 else
13594   echo "$as_me: failed program was:" >&5
13595 sed 's/^/| /' conftest.$ac_ext >&5
13596
13597 ac_not_found=yes
13598 fi
13599 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13600        done
13601       done
13602      done
13603     done
13604     if test "$ac_not_found" = yes; then
13605       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13606 echo "$as_me: error: could not determine argument types" >&2;}
13607    { (exit 1); exit 1; }; }
13608     fi
13609     if test "$ac_cv_func_accept_arg3" = "void"; then
13610       ac_cv_func_accept_arg3=int
13611     fi
13612
13613 fi
13614
13615 fi
13616
13617 fi
13618
13619 fi
13620  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
13621 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13622
13623 cat >>confdefs.h <<_ACEOF
13624 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13625 _ACEOF
13626
13627
13628 cat >>confdefs.h <<_ACEOF
13629 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13630 _ACEOF
13631
13632
13633 cat >>confdefs.h <<_ACEOF
13634 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13635 _ACEOF
13636
13637
13638 cat >>confdefs.h <<_ACEOF
13639 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13640 _ACEOF
13641
13642
13643 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13644 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13645 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13646   echo $ECHO_N "(cached) $ECHO_C" >&6
13647 else
13648   cat >conftest.$ac_ext <<_ACEOF
13649 /* confdefs.h.  */
13650 _ACEOF
13651 cat confdefs.h >>conftest.$ac_ext
13652 cat >>conftest.$ac_ext <<_ACEOF
13653 /* end confdefs.h.  */
13654 #include <sys/time.h>
13655 int
13656 main ()
13657 {
13658 struct timeval *tp;
13659 struct timezone *tzp;
13660 gettimeofday(tp,tzp);
13661   ;
13662   return 0;
13663 }
13664 _ACEOF
13665 rm -f conftest.$ac_objext
13666 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13667   (eval $ac_compile) 2>conftest.er1
13668   ac_status=$?
13669   grep -v '^ *+' conftest.er1 >conftest.err
13670   rm -f conftest.er1
13671   cat conftest.err >&5
13672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13673   (exit $ac_status); } &&
13674          { ac_try='test -z "$ac_c_werror_flag"
13675                          || test ! -s conftest.err'
13676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13677   (eval $ac_try) 2>&5
13678   ac_status=$?
13679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13680   (exit $ac_status); }; } &&
13681          { ac_try='test -s conftest.$ac_objext'
13682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13683   (eval $ac_try) 2>&5
13684   ac_status=$?
13685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13686   (exit $ac_status); }; }; then
13687   pgac_cv_func_gettimeofday_1arg=no
13688 else
13689   echo "$as_me: failed program was:" >&5
13690 sed 's/^/| /' conftest.$ac_ext >&5
13691
13692 pgac_cv_func_gettimeofday_1arg=yes
13693 fi
13694 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13695 fi
13696 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13697 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13698 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13699
13700 cat >>confdefs.h <<\_ACEOF
13701 #define GETTIMEOFDAY_1ARG
13702 _ACEOF
13703
13704 fi
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728 for ac_func in cbrt dlopen fcvt fdatasync getpeereid getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13729 do
13730 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13731 echo "$as_me:$LINENO: checking for $ac_func" >&5
13732 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13733 if eval "test \"\${$as_ac_var+set}\" = set"; then
13734   echo $ECHO_N "(cached) $ECHO_C" >&6
13735 else
13736   cat >conftest.$ac_ext <<_ACEOF
13737 /* confdefs.h.  */
13738 _ACEOF
13739 cat confdefs.h >>conftest.$ac_ext
13740 cat >>conftest.$ac_ext <<_ACEOF
13741 /* end confdefs.h.  */
13742 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13743    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13744 #define $ac_func innocuous_$ac_func
13745
13746 /* System header to define __stub macros and hopefully few prototypes,
13747     which can conflict with char $ac_func (); below.
13748     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13749     <limits.h> exists even on freestanding compilers.  */
13750
13751 #ifdef __STDC__
13752 # include <limits.h>
13753 #else
13754 # include <assert.h>
13755 #endif
13756
13757 #undef $ac_func
13758
13759 /* Override any gcc2 internal prototype to avoid an error.  */
13760 #ifdef __cplusplus
13761 extern "C"
13762 {
13763 #endif
13764 /* We use char because int might match the return type of a gcc2
13765    builtin and then its argument prototype would still apply.  */
13766 char $ac_func ();
13767 /* The GNU C library defines this for functions which it implements
13768     to always fail with ENOSYS.  Some functions are actually named
13769     something starting with __ and the normal name is an alias.  */
13770 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13771 choke me
13772 #else
13773 char (*f) () = $ac_func;
13774 #endif
13775 #ifdef __cplusplus
13776 }
13777 #endif
13778
13779 int
13780 main ()
13781 {
13782 return f != $ac_func;
13783   ;
13784   return 0;
13785 }
13786 _ACEOF
13787 rm -f conftest.$ac_objext conftest$ac_exeext
13788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13789   (eval $ac_link) 2>conftest.er1
13790   ac_status=$?
13791   grep -v '^ *+' conftest.er1 >conftest.err
13792   rm -f conftest.er1
13793   cat conftest.err >&5
13794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13795   (exit $ac_status); } &&
13796          { ac_try='test -z "$ac_c_werror_flag"
13797                          || test ! -s conftest.err'
13798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13799   (eval $ac_try) 2>&5
13800   ac_status=$?
13801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13802   (exit $ac_status); }; } &&
13803          { ac_try='test -s conftest$ac_exeext'
13804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13805   (eval $ac_try) 2>&5
13806   ac_status=$?
13807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13808   (exit $ac_status); }; }; then
13809   eval "$as_ac_var=yes"
13810 else
13811   echo "$as_me: failed program was:" >&5
13812 sed 's/^/| /' conftest.$ac_ext >&5
13813
13814 eval "$as_ac_var=no"
13815 fi
13816 rm -f conftest.err conftest.$ac_objext \
13817       conftest$ac_exeext conftest.$ac_ext
13818 fi
13819 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13820 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13821 if test `eval echo '${'$as_ac_var'}'` = yes; then
13822   cat >>confdefs.h <<_ACEOF
13823 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13824 _ACEOF
13825
13826 fi
13827 done
13828
13829
13830 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13831 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13832 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13833   echo $ECHO_N "(cached) $ECHO_C" >&6
13834 else
13835   cat >conftest.$ac_ext <<_ACEOF
13836 /* confdefs.h.  */
13837 _ACEOF
13838 cat confdefs.h >>conftest.$ac_ext
13839 cat >>conftest.$ac_ext <<_ACEOF
13840 /* end confdefs.h.  */
13841 #include <unistd.h>
13842
13843 int
13844 main ()
13845 {
13846 #ifndef fdatasync
13847   char *p = (char *) fdatasync;
13848 #endif
13849
13850   ;
13851   return 0;
13852 }
13853 _ACEOF
13854 rm -f conftest.$ac_objext
13855 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13856   (eval $ac_compile) 2>conftest.er1
13857   ac_status=$?
13858   grep -v '^ *+' conftest.er1 >conftest.err
13859   rm -f conftest.er1
13860   cat conftest.err >&5
13861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13862   (exit $ac_status); } &&
13863          { ac_try='test -z "$ac_c_werror_flag"
13864                          || test ! -s conftest.err'
13865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13866   (eval $ac_try) 2>&5
13867   ac_status=$?
13868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869   (exit $ac_status); }; } &&
13870          { ac_try='test -s conftest.$ac_objext'
13871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13872   (eval $ac_try) 2>&5
13873   ac_status=$?
13874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875   (exit $ac_status); }; }; then
13876   ac_cv_have_decl_fdatasync=yes
13877 else
13878   echo "$as_me: failed program was:" >&5
13879 sed 's/^/| /' conftest.$ac_ext >&5
13880
13881 ac_cv_have_decl_fdatasync=no
13882 fi
13883 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13884 fi
13885 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13886 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13887 if test $ac_cv_have_decl_fdatasync = yes; then
13888
13889 cat >>confdefs.h <<_ACEOF
13890 #define HAVE_DECL_FDATASYNC 1
13891 _ACEOF
13892
13893
13894 else
13895   cat >>confdefs.h <<_ACEOF
13896 #define HAVE_DECL_FDATASYNC 0
13897 _ACEOF
13898
13899
13900 fi
13901
13902
13903 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13904 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13905 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13906   echo $ECHO_N "(cached) $ECHO_C" >&6
13907 else
13908   cat >conftest.$ac_ext <<_ACEOF
13909 /* confdefs.h.  */
13910 _ACEOF
13911 cat confdefs.h >>conftest.$ac_ext
13912 cat >>conftest.$ac_ext <<_ACEOF
13913 /* end confdefs.h.  */
13914 #include <fcntl.h>
13915
13916 int
13917 main ()
13918 {
13919 #ifndef posix_fadvise
13920   char *p = (char *) posix_fadvise;
13921 #endif
13922
13923   ;
13924   return 0;
13925 }
13926 _ACEOF
13927 rm -f conftest.$ac_objext
13928 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13929   (eval $ac_compile) 2>conftest.er1
13930   ac_status=$?
13931   grep -v '^ *+' conftest.er1 >conftest.err
13932   rm -f conftest.er1
13933   cat conftest.err >&5
13934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13935   (exit $ac_status); } &&
13936          { ac_try='test -z "$ac_c_werror_flag"
13937                          || test ! -s conftest.err'
13938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13939   (eval $ac_try) 2>&5
13940   ac_status=$?
13941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13942   (exit $ac_status); }; } &&
13943          { ac_try='test -s conftest.$ac_objext'
13944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13945   (eval $ac_try) 2>&5
13946   ac_status=$?
13947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948   (exit $ac_status); }; }; then
13949   ac_cv_have_decl_posix_fadvise=yes
13950 else
13951   echo "$as_me: failed program was:" >&5
13952 sed 's/^/| /' conftest.$ac_ext >&5
13953
13954 ac_cv_have_decl_posix_fadvise=no
13955 fi
13956 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13957 fi
13958 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
13959 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
13960 if test $ac_cv_have_decl_posix_fadvise = yes; then
13961
13962 cat >>confdefs.h <<_ACEOF
13963 #define HAVE_DECL_POSIX_FADVISE 1
13964 _ACEOF
13965
13966
13967 else
13968   cat >>confdefs.h <<_ACEOF
13969 #define HAVE_DECL_POSIX_FADVISE 0
13970 _ACEOF
13971
13972
13973 fi
13974
13975
13976 echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
13977 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6
13978 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
13979   echo $ECHO_N "(cached) $ECHO_C" >&6
13980 else
13981   cat >conftest.$ac_ext <<_ACEOF
13982 /* confdefs.h.  */
13983 _ACEOF
13984 cat confdefs.h >>conftest.$ac_ext
13985 cat >>conftest.$ac_ext <<_ACEOF
13986 /* end confdefs.h.  */
13987 $ac_includes_default
13988 int
13989 main ()
13990 {
13991 #ifndef strlcpy
13992   char *p = (char *) strlcpy;
13993 #endif
13994
13995   ;
13996   return 0;
13997 }
13998 _ACEOF
13999 rm -f conftest.$ac_objext
14000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14001   (eval $ac_compile) 2>conftest.er1
14002   ac_status=$?
14003   grep -v '^ *+' conftest.er1 >conftest.err
14004   rm -f conftest.er1
14005   cat conftest.err >&5
14006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14007   (exit $ac_status); } &&
14008          { ac_try='test -z "$ac_c_werror_flag"
14009                          || test ! -s conftest.err'
14010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14011   (eval $ac_try) 2>&5
14012   ac_status=$?
14013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14014   (exit $ac_status); }; } &&
14015          { ac_try='test -s conftest.$ac_objext'
14016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14017   (eval $ac_try) 2>&5
14018   ac_status=$?
14019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14020   (exit $ac_status); }; }; then
14021   ac_cv_have_decl_strlcpy=yes
14022 else
14023   echo "$as_me: failed program was:" >&5
14024 sed 's/^/| /' conftest.$ac_ext >&5
14025
14026 ac_cv_have_decl_strlcpy=no
14027 fi
14028 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14029 fi
14030 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
14031 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6
14032 if test $ac_cv_have_decl_strlcpy = yes; then
14033
14034 cat >>confdefs.h <<_ACEOF
14035 #define HAVE_DECL_STRLCPY 1
14036 _ACEOF
14037
14038
14039 else
14040   cat >>confdefs.h <<_ACEOF
14041 #define HAVE_DECL_STRLCPY 0
14042 _ACEOF
14043
14044
14045 fi
14046
14047
14048 # This is probably only present on Darwin, but may as well check always
14049 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
14050 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
14051 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
14052   echo $ECHO_N "(cached) $ECHO_C" >&6
14053 else
14054   cat >conftest.$ac_ext <<_ACEOF
14055 /* confdefs.h.  */
14056 _ACEOF
14057 cat confdefs.h >>conftest.$ac_ext
14058 cat >>conftest.$ac_ext <<_ACEOF
14059 /* end confdefs.h.  */
14060 #include <fcntl.h>
14061
14062 int
14063 main ()
14064 {
14065 #ifndef F_FULLFSYNC
14066   char *p = (char *) F_FULLFSYNC;
14067 #endif
14068
14069   ;
14070   return 0;
14071 }
14072 _ACEOF
14073 rm -f conftest.$ac_objext
14074 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14075   (eval $ac_compile) 2>conftest.er1
14076   ac_status=$?
14077   grep -v '^ *+' conftest.er1 >conftest.err
14078   rm -f conftest.er1
14079   cat conftest.err >&5
14080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14081   (exit $ac_status); } &&
14082          { ac_try='test -z "$ac_c_werror_flag"
14083                          || test ! -s conftest.err'
14084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14085   (eval $ac_try) 2>&5
14086   ac_status=$?
14087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14088   (exit $ac_status); }; } &&
14089          { ac_try='test -s conftest.$ac_objext'
14090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14091   (eval $ac_try) 2>&5
14092   ac_status=$?
14093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14094   (exit $ac_status); }; }; then
14095   ac_cv_have_decl_F_FULLFSYNC=yes
14096 else
14097   echo "$as_me: failed program was:" >&5
14098 sed 's/^/| /' conftest.$ac_ext >&5
14099
14100 ac_cv_have_decl_F_FULLFSYNC=no
14101 fi
14102 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14103 fi
14104 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
14105 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
14106 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
14107
14108 cat >>confdefs.h <<_ACEOF
14109 #define HAVE_DECL_F_FULLFSYNC 1
14110 _ACEOF
14111
14112
14113 else
14114   cat >>confdefs.h <<_ACEOF
14115 #define HAVE_DECL_F_FULLFSYNC 0
14116 _ACEOF
14117
14118
14119 fi
14120
14121
14122
14123 HAVE_IPV6=no
14124 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
14125 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
14126 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
14127   echo $ECHO_N "(cached) $ECHO_C" >&6
14128 else
14129   cat >conftest.$ac_ext <<_ACEOF
14130 /* confdefs.h.  */
14131 _ACEOF
14132 cat confdefs.h >>conftest.$ac_ext
14133 cat >>conftest.$ac_ext <<_ACEOF
14134 /* end confdefs.h.  */
14135 $ac_includes_default
14136 #include <netinet/in.h>
14137
14138 int
14139 main ()
14140 {
14141 if ((struct sockaddr_in6 *) 0)
14142   return 0;
14143 if (sizeof (struct sockaddr_in6))
14144   return 0;
14145   ;
14146   return 0;
14147 }
14148 _ACEOF
14149 rm -f conftest.$ac_objext
14150 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14151   (eval $ac_compile) 2>conftest.er1
14152   ac_status=$?
14153   grep -v '^ *+' conftest.er1 >conftest.err
14154   rm -f conftest.er1
14155   cat conftest.err >&5
14156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14157   (exit $ac_status); } &&
14158          { ac_try='test -z "$ac_c_werror_flag"
14159                          || test ! -s conftest.err'
14160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14161   (eval $ac_try) 2>&5
14162   ac_status=$?
14163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14164   (exit $ac_status); }; } &&
14165          { ac_try='test -s conftest.$ac_objext'
14166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14167   (eval $ac_try) 2>&5
14168   ac_status=$?
14169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14170   (exit $ac_status); }; }; then
14171   ac_cv_type_struct_sockaddr_in6=yes
14172 else
14173   echo "$as_me: failed program was:" >&5
14174 sed 's/^/| /' conftest.$ac_ext >&5
14175
14176 ac_cv_type_struct_sockaddr_in6=no
14177 fi
14178 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14179 fi
14180 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
14181 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
14182 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
14183
14184 cat >>confdefs.h <<\_ACEOF
14185 #define HAVE_IPV6 1
14186 _ACEOF
14187
14188          HAVE_IPV6=yes
14189 fi
14190
14191
14192
14193 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
14194 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
14195 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
14196   echo $ECHO_N "(cached) $ECHO_C" >&6
14197 else
14198   cat >conftest.$ac_ext <<_ACEOF
14199 /* confdefs.h.  */
14200 _ACEOF
14201 cat confdefs.h >>conftest.$ac_ext
14202 cat >>conftest.$ac_ext <<_ACEOF
14203 /* end confdefs.h.  */
14204 #include <machine/vmparam.h>
14205 #include <sys/exec.h>
14206
14207 int
14208 main ()
14209 {
14210 PS_STRINGS->ps_nargvstr = 1;
14211 PS_STRINGS->ps_argvstr = "foo";
14212   ;
14213   return 0;
14214 }
14215 _ACEOF
14216 rm -f conftest.$ac_objext conftest$ac_exeext
14217 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14218   (eval $ac_link) 2>conftest.er1
14219   ac_status=$?
14220   grep -v '^ *+' conftest.er1 >conftest.err
14221   rm -f conftest.er1
14222   cat conftest.err >&5
14223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14224   (exit $ac_status); } &&
14225          { ac_try='test -z "$ac_c_werror_flag"
14226                          || test ! -s conftest.err'
14227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14228   (eval $ac_try) 2>&5
14229   ac_status=$?
14230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14231   (exit $ac_status); }; } &&
14232          { ac_try='test -s conftest$ac_exeext'
14233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14234   (eval $ac_try) 2>&5
14235   ac_status=$?
14236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237   (exit $ac_status); }; }; then
14238   pgac_cv_var_PS_STRINGS=yes
14239 else
14240   echo "$as_me: failed program was:" >&5
14241 sed 's/^/| /' conftest.$ac_ext >&5
14242
14243 pgac_cv_var_PS_STRINGS=no
14244 fi
14245 rm -f conftest.err conftest.$ac_objext \
14246       conftest$ac_exeext conftest.$ac_ext
14247 fi
14248 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
14249 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
14250 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
14251
14252 cat >>confdefs.h <<\_ACEOF
14253 #define HAVE_PS_STRINGS
14254 _ACEOF
14255
14256 fi
14257
14258
14259 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
14260 # is missing.  Yes, there are machines that have only one.  We may
14261 # also decide to use snprintf.c if snprintf() is present but does not
14262 # have all the features we need --- see below.
14263
14264 if test "$PORTNAME" = "win32"; then
14265   # Win32 gets snprintf.c built unconditionally.
14266   #
14267   # To properly translate all NLS languages strings, we must support the
14268   # *printf() %$ format, which allows *printf() arguments to be selected
14269   # by position in the translated string.
14270   #
14271   # libintl versions < 0.13 use the native *printf() functions, and Win32
14272   # *printf() doesn't understand %$, so we must use our /port versions,
14273   # which do understand %$. libintl versions >= 0.13 include their own
14274   # *printf versions on Win32.  The libintl 0.13 release note text is:
14275   #
14276   #   C format strings with positions, as they arise when a translator
14277   #   needs to reorder a sentence, are now supported on all platforms.
14278   #   On those few platforms (NetBSD and Woe32) for which the native
14279   #   printf()/fprintf()/... functions don't support such format
14280   #   strings, replacements are provided through <libintl.h>.
14281   #
14282   # We could use libintl >= 0.13's *printf() if we were sure that we had
14283   # a litint >= 0.13 at runtime, but seeing that there is no clean way
14284   # to guarantee that, it is best to just use our own, so we are sure to
14285   # get %$ support. In include/port.h we disable the *printf() macros
14286   # that might have been defined by libintl.
14287   #
14288   # We do this unconditionally whether NLS is used or not so we are sure
14289   # that all Win32 libraries and binaries behave the same.
14290   pgac_need_repl_snprintf=yes
14291 else
14292   pgac_need_repl_snprintf=no
14293
14294 for ac_func in snprintf
14295 do
14296 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14297 echo "$as_me:$LINENO: checking for $ac_func" >&5
14298 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14299 if eval "test \"\${$as_ac_var+set}\" = set"; then
14300   echo $ECHO_N "(cached) $ECHO_C" >&6
14301 else
14302   cat >conftest.$ac_ext <<_ACEOF
14303 /* confdefs.h.  */
14304 _ACEOF
14305 cat confdefs.h >>conftest.$ac_ext
14306 cat >>conftest.$ac_ext <<_ACEOF
14307 /* end confdefs.h.  */
14308 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14309    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14310 #define $ac_func innocuous_$ac_func
14311
14312 /* System header to define __stub macros and hopefully few prototypes,
14313     which can conflict with char $ac_func (); below.
14314     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14315     <limits.h> exists even on freestanding compilers.  */
14316
14317 #ifdef __STDC__
14318 # include <limits.h>
14319 #else
14320 # include <assert.h>
14321 #endif
14322
14323 #undef $ac_func
14324
14325 /* Override any gcc2 internal prototype to avoid an error.  */
14326 #ifdef __cplusplus
14327 extern "C"
14328 {
14329 #endif
14330 /* We use char because int might match the return type of a gcc2
14331    builtin and then its argument prototype would still apply.  */
14332 char $ac_func ();
14333 /* The GNU C library defines this for functions which it implements
14334     to always fail with ENOSYS.  Some functions are actually named
14335     something starting with __ and the normal name is an alias.  */
14336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14337 choke me
14338 #else
14339 char (*f) () = $ac_func;
14340 #endif
14341 #ifdef __cplusplus
14342 }
14343 #endif
14344
14345 int
14346 main ()
14347 {
14348 return f != $ac_func;
14349   ;
14350   return 0;
14351 }
14352 _ACEOF
14353 rm -f conftest.$ac_objext conftest$ac_exeext
14354 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14355   (eval $ac_link) 2>conftest.er1
14356   ac_status=$?
14357   grep -v '^ *+' conftest.er1 >conftest.err
14358   rm -f conftest.er1
14359   cat conftest.err >&5
14360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14361   (exit $ac_status); } &&
14362          { ac_try='test -z "$ac_c_werror_flag"
14363                          || test ! -s conftest.err'
14364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14365   (eval $ac_try) 2>&5
14366   ac_status=$?
14367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14368   (exit $ac_status); }; } &&
14369          { ac_try='test -s conftest$ac_exeext'
14370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14371   (eval $ac_try) 2>&5
14372   ac_status=$?
14373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14374   (exit $ac_status); }; }; then
14375   eval "$as_ac_var=yes"
14376 else
14377   echo "$as_me: failed program was:" >&5
14378 sed 's/^/| /' conftest.$ac_ext >&5
14379
14380 eval "$as_ac_var=no"
14381 fi
14382 rm -f conftest.err conftest.$ac_objext \
14383       conftest$ac_exeext conftest.$ac_ext
14384 fi
14385 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14386 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14387 if test `eval echo '${'$as_ac_var'}'` = yes; then
14388   cat >>confdefs.h <<_ACEOF
14389 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14390 _ACEOF
14391
14392 else
14393   pgac_need_repl_snprintf=yes
14394 fi
14395 done
14396
14397
14398 for ac_func in vsnprintf
14399 do
14400 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14401 echo "$as_me:$LINENO: checking for $ac_func" >&5
14402 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14403 if eval "test \"\${$as_ac_var+set}\" = set"; then
14404   echo $ECHO_N "(cached) $ECHO_C" >&6
14405 else
14406   cat >conftest.$ac_ext <<_ACEOF
14407 /* confdefs.h.  */
14408 _ACEOF
14409 cat confdefs.h >>conftest.$ac_ext
14410 cat >>conftest.$ac_ext <<_ACEOF
14411 /* end confdefs.h.  */
14412 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14413    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14414 #define $ac_func innocuous_$ac_func
14415
14416 /* System header to define __stub macros and hopefully few prototypes,
14417     which can conflict with char $ac_func (); below.
14418     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14419     <limits.h> exists even on freestanding compilers.  */
14420
14421 #ifdef __STDC__
14422 # include <limits.h>
14423 #else
14424 # include <assert.h>
14425 #endif
14426
14427 #undef $ac_func
14428
14429 /* Override any gcc2 internal prototype to avoid an error.  */
14430 #ifdef __cplusplus
14431 extern "C"
14432 {
14433 #endif
14434 /* We use char because int might match the return type of a gcc2
14435    builtin and then its argument prototype would still apply.  */
14436 char $ac_func ();
14437 /* The GNU C library defines this for functions which it implements
14438     to always fail with ENOSYS.  Some functions are actually named
14439     something starting with __ and the normal name is an alias.  */
14440 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14441 choke me
14442 #else
14443 char (*f) () = $ac_func;
14444 #endif
14445 #ifdef __cplusplus
14446 }
14447 #endif
14448
14449 int
14450 main ()
14451 {
14452 return f != $ac_func;
14453   ;
14454   return 0;
14455 }
14456 _ACEOF
14457 rm -f conftest.$ac_objext conftest$ac_exeext
14458 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14459   (eval $ac_link) 2>conftest.er1
14460   ac_status=$?
14461   grep -v '^ *+' conftest.er1 >conftest.err
14462   rm -f conftest.er1
14463   cat conftest.err >&5
14464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14465   (exit $ac_status); } &&
14466          { ac_try='test -z "$ac_c_werror_flag"
14467                          || test ! -s conftest.err'
14468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14469   (eval $ac_try) 2>&5
14470   ac_status=$?
14471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14472   (exit $ac_status); }; } &&
14473          { ac_try='test -s conftest$ac_exeext'
14474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14475   (eval $ac_try) 2>&5
14476   ac_status=$?
14477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14478   (exit $ac_status); }; }; then
14479   eval "$as_ac_var=yes"
14480 else
14481   echo "$as_me: failed program was:" >&5
14482 sed 's/^/| /' conftest.$ac_ext >&5
14483
14484 eval "$as_ac_var=no"
14485 fi
14486 rm -f conftest.err conftest.$ac_objext \
14487       conftest$ac_exeext conftest.$ac_ext
14488 fi
14489 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14490 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14491 if test `eval echo '${'$as_ac_var'}'` = yes; then
14492   cat >>confdefs.h <<_ACEOF
14493 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14494 _ACEOF
14495
14496 else
14497   pgac_need_repl_snprintf=yes
14498 fi
14499 done
14500
14501 fi
14502
14503
14504 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14505 # include/c.h will provide declarations.  Note this is a separate test
14506 # from whether the functions exist in the C library --- there are
14507 # systems that have the functions but don't bother to declare them :-(
14508
14509 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14510 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14511 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14512   echo $ECHO_N "(cached) $ECHO_C" >&6
14513 else
14514   cat >conftest.$ac_ext <<_ACEOF
14515 /* confdefs.h.  */
14516 _ACEOF
14517 cat confdefs.h >>conftest.$ac_ext
14518 cat >>conftest.$ac_ext <<_ACEOF
14519 /* end confdefs.h.  */
14520 $ac_includes_default
14521 int
14522 main ()
14523 {
14524 #ifndef snprintf
14525   char *p = (char *) snprintf;
14526 #endif
14527
14528   ;
14529   return 0;
14530 }
14531 _ACEOF
14532 rm -f conftest.$ac_objext
14533 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14534   (eval $ac_compile) 2>conftest.er1
14535   ac_status=$?
14536   grep -v '^ *+' conftest.er1 >conftest.err
14537   rm -f conftest.er1
14538   cat conftest.err >&5
14539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14540   (exit $ac_status); } &&
14541          { ac_try='test -z "$ac_c_werror_flag"
14542                          || test ! -s conftest.err'
14543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14544   (eval $ac_try) 2>&5
14545   ac_status=$?
14546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547   (exit $ac_status); }; } &&
14548          { ac_try='test -s conftest.$ac_objext'
14549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14550   (eval $ac_try) 2>&5
14551   ac_status=$?
14552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14553   (exit $ac_status); }; }; then
14554   ac_cv_have_decl_snprintf=yes
14555 else
14556   echo "$as_me: failed program was:" >&5
14557 sed 's/^/| /' conftest.$ac_ext >&5
14558
14559 ac_cv_have_decl_snprintf=no
14560 fi
14561 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14562 fi
14563 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14564 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14565 if test $ac_cv_have_decl_snprintf = yes; then
14566
14567 cat >>confdefs.h <<_ACEOF
14568 #define HAVE_DECL_SNPRINTF 1
14569 _ACEOF
14570
14571
14572 else
14573   cat >>confdefs.h <<_ACEOF
14574 #define HAVE_DECL_SNPRINTF 0
14575 _ACEOF
14576
14577
14578 fi
14579 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14580 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14581 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14582   echo $ECHO_N "(cached) $ECHO_C" >&6
14583 else
14584   cat >conftest.$ac_ext <<_ACEOF
14585 /* confdefs.h.  */
14586 _ACEOF
14587 cat confdefs.h >>conftest.$ac_ext
14588 cat >>conftest.$ac_ext <<_ACEOF
14589 /* end confdefs.h.  */
14590 $ac_includes_default
14591 int
14592 main ()
14593 {
14594 #ifndef vsnprintf
14595   char *p = (char *) vsnprintf;
14596 #endif
14597
14598   ;
14599   return 0;
14600 }
14601 _ACEOF
14602 rm -f conftest.$ac_objext
14603 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14604   (eval $ac_compile) 2>conftest.er1
14605   ac_status=$?
14606   grep -v '^ *+' conftest.er1 >conftest.err
14607   rm -f conftest.er1
14608   cat conftest.err >&5
14609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14610   (exit $ac_status); } &&
14611          { ac_try='test -z "$ac_c_werror_flag"
14612                          || test ! -s conftest.err'
14613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14614   (eval $ac_try) 2>&5
14615   ac_status=$?
14616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617   (exit $ac_status); }; } &&
14618          { ac_try='test -s conftest.$ac_objext'
14619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14620   (eval $ac_try) 2>&5
14621   ac_status=$?
14622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14623   (exit $ac_status); }; }; then
14624   ac_cv_have_decl_vsnprintf=yes
14625 else
14626   echo "$as_me: failed program was:" >&5
14627 sed 's/^/| /' conftest.$ac_ext >&5
14628
14629 ac_cv_have_decl_vsnprintf=no
14630 fi
14631 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14632 fi
14633 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14634 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14635 if test $ac_cv_have_decl_vsnprintf = yes; then
14636
14637 cat >>confdefs.h <<_ACEOF
14638 #define HAVE_DECL_VSNPRINTF 1
14639 _ACEOF
14640
14641
14642 else
14643   cat >>confdefs.h <<_ACEOF
14644 #define HAVE_DECL_VSNPRINTF 0
14645 _ACEOF
14646
14647
14648 fi
14649
14650
14651
14652
14653 echo "$as_me:$LINENO: checking for isinf" >&5
14654 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14655 if test "${ac_cv_func_isinf+set}" = set; then
14656   echo $ECHO_N "(cached) $ECHO_C" >&6
14657 else
14658   cat >conftest.$ac_ext <<_ACEOF
14659 /* confdefs.h.  */
14660 _ACEOF
14661 cat confdefs.h >>conftest.$ac_ext
14662 cat >>conftest.$ac_ext <<_ACEOF
14663 /* end confdefs.h.  */
14664
14665 #include <math.h>
14666 double glob_double;
14667
14668 int
14669 main ()
14670 {
14671 return isinf(glob_double) ? 0 : 1;
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 rm -f conftest.$ac_objext conftest$ac_exeext
14677 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14678   (eval $ac_link) 2>conftest.er1
14679   ac_status=$?
14680   grep -v '^ *+' conftest.er1 >conftest.err
14681   rm -f conftest.er1
14682   cat conftest.err >&5
14683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684   (exit $ac_status); } &&
14685          { ac_try='test -z "$ac_c_werror_flag"
14686                          || test ! -s conftest.err'
14687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14688   (eval $ac_try) 2>&5
14689   ac_status=$?
14690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14691   (exit $ac_status); }; } &&
14692          { ac_try='test -s conftest$ac_exeext'
14693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14694   (eval $ac_try) 2>&5
14695   ac_status=$?
14696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14697   (exit $ac_status); }; }; then
14698   ac_cv_func_isinf=yes
14699 else
14700   echo "$as_me: failed program was:" >&5
14701 sed 's/^/| /' conftest.$ac_ext >&5
14702
14703 ac_cv_func_isinf=no
14704 fi
14705 rm -f conftest.err conftest.$ac_objext \
14706       conftest$ac_exeext conftest.$ac_ext
14707 fi
14708 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14709 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14710
14711 if test $ac_cv_func_isinf = yes ; then
14712
14713 cat >>confdefs.h <<\_ACEOF
14714 #define HAVE_ISINF 1
14715 _ACEOF
14716
14717 else
14718   case $LIBOBJS in
14719     "isinf.$ac_objext"   | \
14720   *" isinf.$ac_objext"   | \
14721     "isinf.$ac_objext "* | \
14722   *" isinf.$ac_objext "* ) ;;
14723   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14724 esac
14725
14726   # Look for a way to implement a substitute for isinf()
14727
14728
14729
14730
14731 for ac_func in fpclass fp_class fp_class_d class
14732 do
14733 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14734 echo "$as_me:$LINENO: checking for $ac_func" >&5
14735 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14736 if eval "test \"\${$as_ac_var+set}\" = set"; then
14737   echo $ECHO_N "(cached) $ECHO_C" >&6
14738 else
14739   cat >conftest.$ac_ext <<_ACEOF
14740 /* confdefs.h.  */
14741 _ACEOF
14742 cat confdefs.h >>conftest.$ac_ext
14743 cat >>conftest.$ac_ext <<_ACEOF
14744 /* end confdefs.h.  */
14745 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14746    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14747 #define $ac_func innocuous_$ac_func
14748
14749 /* System header to define __stub macros and hopefully few prototypes,
14750     which can conflict with char $ac_func (); below.
14751     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14752     <limits.h> exists even on freestanding compilers.  */
14753
14754 #ifdef __STDC__
14755 # include <limits.h>
14756 #else
14757 # include <assert.h>
14758 #endif
14759
14760 #undef $ac_func
14761
14762 /* Override any gcc2 internal prototype to avoid an error.  */
14763 #ifdef __cplusplus
14764 extern "C"
14765 {
14766 #endif
14767 /* We use char because int might match the return type of a gcc2
14768    builtin and then its argument prototype would still apply.  */
14769 char $ac_func ();
14770 /* The GNU C library defines this for functions which it implements
14771     to always fail with ENOSYS.  Some functions are actually named
14772     something starting with __ and the normal name is an alias.  */
14773 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14774 choke me
14775 #else
14776 char (*f) () = $ac_func;
14777 #endif
14778 #ifdef __cplusplus
14779 }
14780 #endif
14781
14782 int
14783 main ()
14784 {
14785 return f != $ac_func;
14786   ;
14787   return 0;
14788 }
14789 _ACEOF
14790 rm -f conftest.$ac_objext conftest$ac_exeext
14791 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14792   (eval $ac_link) 2>conftest.er1
14793   ac_status=$?
14794   grep -v '^ *+' conftest.er1 >conftest.err
14795   rm -f conftest.er1
14796   cat conftest.err >&5
14797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14798   (exit $ac_status); } &&
14799          { ac_try='test -z "$ac_c_werror_flag"
14800                          || test ! -s conftest.err'
14801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14802   (eval $ac_try) 2>&5
14803   ac_status=$?
14804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14805   (exit $ac_status); }; } &&
14806          { ac_try='test -s conftest$ac_exeext'
14807   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14808   (eval $ac_try) 2>&5
14809   ac_status=$?
14810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14811   (exit $ac_status); }; }; then
14812   eval "$as_ac_var=yes"
14813 else
14814   echo "$as_me: failed program was:" >&5
14815 sed 's/^/| /' conftest.$ac_ext >&5
14816
14817 eval "$as_ac_var=no"
14818 fi
14819 rm -f conftest.err conftest.$ac_objext \
14820       conftest$ac_exeext conftest.$ac_ext
14821 fi
14822 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14823 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14824 if test `eval echo '${'$as_ac_var'}'` = yes; then
14825   cat >>confdefs.h <<_ACEOF
14826 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14827 _ACEOF
14828  break
14829 fi
14830 done
14831
14832 fi
14833
14834 # Some versions of libedit contain strlcpy(); so disregard that library while
14835 # checking for these standard libc functions.
14836 pgac_save_LIBS="$LIBS"
14837 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strlcpy strtol strtoul unsetenv
14854 do
14855 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14856 echo "$as_me:$LINENO: checking for $ac_func" >&5
14857 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14858 if eval "test \"\${$as_ac_var+set}\" = set"; then
14859   echo $ECHO_N "(cached) $ECHO_C" >&6
14860 else
14861   cat >conftest.$ac_ext <<_ACEOF
14862 /* confdefs.h.  */
14863 _ACEOF
14864 cat confdefs.h >>conftest.$ac_ext
14865 cat >>conftest.$ac_ext <<_ACEOF
14866 /* end confdefs.h.  */
14867 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14868    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14869 #define $ac_func innocuous_$ac_func
14870
14871 /* System header to define __stub macros and hopefully few prototypes,
14872     which can conflict with char $ac_func (); below.
14873     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14874     <limits.h> exists even on freestanding compilers.  */
14875
14876 #ifdef __STDC__
14877 # include <limits.h>
14878 #else
14879 # include <assert.h>
14880 #endif
14881
14882 #undef $ac_func
14883
14884 /* Override any gcc2 internal prototype to avoid an error.  */
14885 #ifdef __cplusplus
14886 extern "C"
14887 {
14888 #endif
14889 /* We use char because int might match the return type of a gcc2
14890    builtin and then its argument prototype would still apply.  */
14891 char $ac_func ();
14892 /* The GNU C library defines this for functions which it implements
14893     to always fail with ENOSYS.  Some functions are actually named
14894     something starting with __ and the normal name is an alias.  */
14895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14896 choke me
14897 #else
14898 char (*f) () = $ac_func;
14899 #endif
14900 #ifdef __cplusplus
14901 }
14902 #endif
14903
14904 int
14905 main ()
14906 {
14907 return f != $ac_func;
14908   ;
14909   return 0;
14910 }
14911 _ACEOF
14912 rm -f conftest.$ac_objext conftest$ac_exeext
14913 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14914   (eval $ac_link) 2>conftest.er1
14915   ac_status=$?
14916   grep -v '^ *+' conftest.er1 >conftest.err
14917   rm -f conftest.er1
14918   cat conftest.err >&5
14919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14920   (exit $ac_status); } &&
14921          { ac_try='test -z "$ac_c_werror_flag"
14922                          || test ! -s conftest.err'
14923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14924   (eval $ac_try) 2>&5
14925   ac_status=$?
14926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14927   (exit $ac_status); }; } &&
14928          { ac_try='test -s conftest$ac_exeext'
14929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14930   (eval $ac_try) 2>&5
14931   ac_status=$?
14932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14933   (exit $ac_status); }; }; then
14934   eval "$as_ac_var=yes"
14935 else
14936   echo "$as_me: failed program was:" >&5
14937 sed 's/^/| /' conftest.$ac_ext >&5
14938
14939 eval "$as_ac_var=no"
14940 fi
14941 rm -f conftest.err conftest.$ac_objext \
14942       conftest$ac_exeext conftest.$ac_ext
14943 fi
14944 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14945 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14946 if test `eval echo '${'$as_ac_var'}'` = yes; then
14947   cat >>confdefs.h <<_ACEOF
14948 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14949 _ACEOF
14950
14951 else
14952   case $LIBOBJS in
14953     "$ac_func.$ac_objext"   | \
14954   *" $ac_func.$ac_objext"   | \
14955     "$ac_func.$ac_objext "* | \
14956   *" $ac_func.$ac_objext "* ) ;;
14957   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14958 esac
14959
14960 fi
14961 done
14962
14963
14964
14965 LIBS="$pgac_save_LIBS"
14966
14967 # System's version of getaddrinfo(), if any, may be used only if we found
14968 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14969 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14970 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14971 # because we want to use our own getaddrinfo.c on Windows anyway.)
14972 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14973
14974 for ac_func in getaddrinfo
14975 do
14976 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14977 echo "$as_me:$LINENO: checking for $ac_func" >&5
14978 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14979 if eval "test \"\${$as_ac_var+set}\" = set"; then
14980   echo $ECHO_N "(cached) $ECHO_C" >&6
14981 else
14982   cat >conftest.$ac_ext <<_ACEOF
14983 /* confdefs.h.  */
14984 _ACEOF
14985 cat confdefs.h >>conftest.$ac_ext
14986 cat >>conftest.$ac_ext <<_ACEOF
14987 /* end confdefs.h.  */
14988 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14989    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14990 #define $ac_func innocuous_$ac_func
14991
14992 /* System header to define __stub macros and hopefully few prototypes,
14993     which can conflict with char $ac_func (); below.
14994     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14995     <limits.h> exists even on freestanding compilers.  */
14996
14997 #ifdef __STDC__
14998 # include <limits.h>
14999 #else
15000 # include <assert.h>
15001 #endif
15002
15003 #undef $ac_func
15004
15005 /* Override any gcc2 internal prototype to avoid an error.  */
15006 #ifdef __cplusplus
15007 extern "C"
15008 {
15009 #endif
15010 /* We use char because int might match the return type of a gcc2
15011    builtin and then its argument prototype would still apply.  */
15012 char $ac_func ();
15013 /* The GNU C library defines this for functions which it implements
15014     to always fail with ENOSYS.  Some functions are actually named
15015     something starting with __ and the normal name is an alias.  */
15016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15017 choke me
15018 #else
15019 char (*f) () = $ac_func;
15020 #endif
15021 #ifdef __cplusplus
15022 }
15023 #endif
15024
15025 int
15026 main ()
15027 {
15028 return f != $ac_func;
15029   ;
15030   return 0;
15031 }
15032 _ACEOF
15033 rm -f conftest.$ac_objext conftest$ac_exeext
15034 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15035   (eval $ac_link) 2>conftest.er1
15036   ac_status=$?
15037   grep -v '^ *+' conftest.er1 >conftest.err
15038   rm -f conftest.er1
15039   cat conftest.err >&5
15040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15041   (exit $ac_status); } &&
15042          { ac_try='test -z "$ac_c_werror_flag"
15043                          || test ! -s conftest.err'
15044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15045   (eval $ac_try) 2>&5
15046   ac_status=$?
15047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15048   (exit $ac_status); }; } &&
15049          { ac_try='test -s conftest$ac_exeext'
15050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15051   (eval $ac_try) 2>&5
15052   ac_status=$?
15053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15054   (exit $ac_status); }; }; then
15055   eval "$as_ac_var=yes"
15056 else
15057   echo "$as_me: failed program was:" >&5
15058 sed 's/^/| /' conftest.$ac_ext >&5
15059
15060 eval "$as_ac_var=no"
15061 fi
15062 rm -f conftest.err conftest.$ac_objext \
15063       conftest$ac_exeext conftest.$ac_ext
15064 fi
15065 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15066 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15067 if test `eval echo '${'$as_ac_var'}'` = yes; then
15068   cat >>confdefs.h <<_ACEOF
15069 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15070 _ACEOF
15071
15072 else
15073   case $LIBOBJS in
15074     "$ac_func.$ac_objext"   | \
15075   *" $ac_func.$ac_objext"   | \
15076     "$ac_func.$ac_objext "* | \
15077   *" $ac_func.$ac_objext "* ) ;;
15078   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15079 esac
15080
15081 fi
15082 done
15083
15084
15085 else
15086   case $LIBOBJS in
15087     "getaddrinfo.$ac_objext"   | \
15088   *" getaddrinfo.$ac_objext"   | \
15089     "getaddrinfo.$ac_objext "* | \
15090   *" getaddrinfo.$ac_objext "* ) ;;
15091   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
15092 esac
15093
15094 fi
15095
15096 # similarly, use system's getopt_long() only if system provides struct option.
15097 if test x"$ac_cv_type_struct_option" = xyes ; then
15098
15099 for ac_func in getopt_long
15100 do
15101 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15102 echo "$as_me:$LINENO: checking for $ac_func" >&5
15103 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15104 if eval "test \"\${$as_ac_var+set}\" = set"; then
15105   echo $ECHO_N "(cached) $ECHO_C" >&6
15106 else
15107   cat >conftest.$ac_ext <<_ACEOF
15108 /* confdefs.h.  */
15109 _ACEOF
15110 cat confdefs.h >>conftest.$ac_ext
15111 cat >>conftest.$ac_ext <<_ACEOF
15112 /* end confdefs.h.  */
15113 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15114    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15115 #define $ac_func innocuous_$ac_func
15116
15117 /* System header to define __stub macros and hopefully few prototypes,
15118     which can conflict with char $ac_func (); below.
15119     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15120     <limits.h> exists even on freestanding compilers.  */
15121
15122 #ifdef __STDC__
15123 # include <limits.h>
15124 #else
15125 # include <assert.h>
15126 #endif
15127
15128 #undef $ac_func
15129
15130 /* Override any gcc2 internal prototype to avoid an error.  */
15131 #ifdef __cplusplus
15132 extern "C"
15133 {
15134 #endif
15135 /* We use char because int might match the return type of a gcc2
15136    builtin and then its argument prototype would still apply.  */
15137 char $ac_func ();
15138 /* The GNU C library defines this for functions which it implements
15139     to always fail with ENOSYS.  Some functions are actually named
15140     something starting with __ and the normal name is an alias.  */
15141 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15142 choke me
15143 #else
15144 char (*f) () = $ac_func;
15145 #endif
15146 #ifdef __cplusplus
15147 }
15148 #endif
15149
15150 int
15151 main ()
15152 {
15153 return f != $ac_func;
15154   ;
15155   return 0;
15156 }
15157 _ACEOF
15158 rm -f conftest.$ac_objext conftest$ac_exeext
15159 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15160   (eval $ac_link) 2>conftest.er1
15161   ac_status=$?
15162   grep -v '^ *+' conftest.er1 >conftest.err
15163   rm -f conftest.er1
15164   cat conftest.err >&5
15165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15166   (exit $ac_status); } &&
15167          { ac_try='test -z "$ac_c_werror_flag"
15168                          || test ! -s conftest.err'
15169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15170   (eval $ac_try) 2>&5
15171   ac_status=$?
15172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15173   (exit $ac_status); }; } &&
15174          { ac_try='test -s conftest$ac_exeext'
15175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15176   (eval $ac_try) 2>&5
15177   ac_status=$?
15178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179   (exit $ac_status); }; }; then
15180   eval "$as_ac_var=yes"
15181 else
15182   echo "$as_me: failed program was:" >&5
15183 sed 's/^/| /' conftest.$ac_ext >&5
15184
15185 eval "$as_ac_var=no"
15186 fi
15187 rm -f conftest.err conftest.$ac_objext \
15188       conftest$ac_exeext conftest.$ac_ext
15189 fi
15190 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15191 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15192 if test `eval echo '${'$as_ac_var'}'` = yes; then
15193   cat >>confdefs.h <<_ACEOF
15194 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15195 _ACEOF
15196
15197 else
15198   case $LIBOBJS in
15199     "$ac_func.$ac_objext"   | \
15200   *" $ac_func.$ac_objext"   | \
15201     "$ac_func.$ac_objext "* | \
15202   *" $ac_func.$ac_objext "* ) ;;
15203   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15204 esac
15205
15206 fi
15207 done
15208
15209
15210 else
15211   case $LIBOBJS in
15212     "getopt_long.$ac_objext"   | \
15213   *" getopt_long.$ac_objext"   | \
15214     "getopt_long.$ac_objext "* | \
15215   *" getopt_long.$ac_objext "* ) ;;
15216   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
15217 esac
15218
15219 fi
15220
15221 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
15222 # We override the previous test that said fseeko/ftello didn't exist
15223 # OS tests are also done in include/c.h and port/fseeko.c
15224 case $host_os in bsdi*|netbsd*)
15225 ac_cv_func_fseeko=yes
15226 esac
15227
15228 # Win32 support
15229 if test "$PORTNAME" = "win32"; then
15230 case $LIBOBJS in
15231     "gettimeofday.$ac_objext"   | \
15232   *" gettimeofday.$ac_objext"   | \
15233     "gettimeofday.$ac_objext "* | \
15234   *" gettimeofday.$ac_objext "* ) ;;
15235   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
15236 esac
15237
15238 case $LIBOBJS in
15239     "kill.$ac_objext"   | \
15240   *" kill.$ac_objext"   | \
15241     "kill.$ac_objext "* | \
15242   *" kill.$ac_objext "* ) ;;
15243   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
15244 esac
15245
15246 case $LIBOBJS in
15247     "open.$ac_objext"   | \
15248   *" open.$ac_objext"   | \
15249     "open.$ac_objext "* | \
15250   *" open.$ac_objext "* ) ;;
15251   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
15252 esac
15253
15254 case $LIBOBJS in
15255     "rand.$ac_objext"   | \
15256   *" rand.$ac_objext"   | \
15257     "rand.$ac_objext "* | \
15258   *" rand.$ac_objext "* ) ;;
15259   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
15260 esac
15261
15262 case $LIBOBJS in
15263     "win32error.$ac_objext"   | \
15264   *" win32error.$ac_objext"   | \
15265     "win32error.$ac_objext "* | \
15266   *" win32error.$ac_objext "* ) ;;
15267   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
15268 esac
15269
15270
15271 cat >>confdefs.h <<\_ACEOF
15272 #define HAVE_SYMLINK 1
15273 _ACEOF
15274
15275 fi
15276
15277 if test "$with_readline" = yes; then
15278   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
15279 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
15280 cat >conftest.$ac_ext <<_ACEOF
15281 /* confdefs.h.  */
15282 _ACEOF
15283 cat confdefs.h >>conftest.$ac_ext
15284 cat >>conftest.$ac_ext <<_ACEOF
15285 /* end confdefs.h.  */
15286 #include <stdio.h>
15287 #ifdef HAVE_READLINE_READLINE_H
15288 # include <readline/readline.h>
15289 #elif defined(HAVE_READLINE_H)
15290 # include <readline.h>
15291 #endif
15292
15293 int
15294 main ()
15295 {
15296 rl_completion_append_character = 'x';
15297   ;
15298   return 0;
15299 }
15300 _ACEOF
15301 rm -f conftest.$ac_objext conftest$ac_exeext
15302 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15303   (eval $ac_link) 2>conftest.er1
15304   ac_status=$?
15305   grep -v '^ *+' conftest.er1 >conftest.err
15306   rm -f conftest.er1
15307   cat conftest.err >&5
15308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15309   (exit $ac_status); } &&
15310          { ac_try='test -z "$ac_c_werror_flag"
15311                          || test ! -s conftest.err'
15312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15313   (eval $ac_try) 2>&5
15314   ac_status=$?
15315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15316   (exit $ac_status); }; } &&
15317          { ac_try='test -s conftest$ac_exeext'
15318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15319   (eval $ac_try) 2>&5
15320   ac_status=$?
15321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15322   (exit $ac_status); }; }; then
15323   echo "$as_me:$LINENO: result: yes" >&5
15324 echo "${ECHO_T}yes" >&6
15325
15326 cat >>confdefs.h <<\_ACEOF
15327 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15328 _ACEOF
15329
15330 else
15331   echo "$as_me: failed program was:" >&5
15332 sed 's/^/| /' conftest.$ac_ext >&5
15333
15334 echo "$as_me:$LINENO: result: no" >&5
15335 echo "${ECHO_T}no" >&6
15336 fi
15337 rm -f conftest.err conftest.$ac_objext \
15338       conftest$ac_exeext conftest.$ac_ext
15339
15340
15341 for ac_func in rl_completion_matches rl_filename_completion_function
15342 do
15343 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15344 echo "$as_me:$LINENO: checking for $ac_func" >&5
15345 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15346 if eval "test \"\${$as_ac_var+set}\" = set"; then
15347   echo $ECHO_N "(cached) $ECHO_C" >&6
15348 else
15349   cat >conftest.$ac_ext <<_ACEOF
15350 /* confdefs.h.  */
15351 _ACEOF
15352 cat confdefs.h >>conftest.$ac_ext
15353 cat >>conftest.$ac_ext <<_ACEOF
15354 /* end confdefs.h.  */
15355 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15356    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15357 #define $ac_func innocuous_$ac_func
15358
15359 /* System header to define __stub macros and hopefully few prototypes,
15360     which can conflict with char $ac_func (); below.
15361     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15362     <limits.h> exists even on freestanding compilers.  */
15363
15364 #ifdef __STDC__
15365 # include <limits.h>
15366 #else
15367 # include <assert.h>
15368 #endif
15369
15370 #undef $ac_func
15371
15372 /* Override any gcc2 internal prototype to avoid an error.  */
15373 #ifdef __cplusplus
15374 extern "C"
15375 {
15376 #endif
15377 /* We use char because int might match the return type of a gcc2
15378    builtin and then its argument prototype would still apply.  */
15379 char $ac_func ();
15380 /* The GNU C library defines this for functions which it implements
15381     to always fail with ENOSYS.  Some functions are actually named
15382     something starting with __ and the normal name is an alias.  */
15383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15384 choke me
15385 #else
15386 char (*f) () = $ac_func;
15387 #endif
15388 #ifdef __cplusplus
15389 }
15390 #endif
15391
15392 int
15393 main ()
15394 {
15395 return f != $ac_func;
15396   ;
15397   return 0;
15398 }
15399 _ACEOF
15400 rm -f conftest.$ac_objext conftest$ac_exeext
15401 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15402   (eval $ac_link) 2>conftest.er1
15403   ac_status=$?
15404   grep -v '^ *+' conftest.er1 >conftest.err
15405   rm -f conftest.er1
15406   cat conftest.err >&5
15407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15408   (exit $ac_status); } &&
15409          { ac_try='test -z "$ac_c_werror_flag"
15410                          || test ! -s conftest.err'
15411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15412   (eval $ac_try) 2>&5
15413   ac_status=$?
15414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15415   (exit $ac_status); }; } &&
15416          { ac_try='test -s conftest$ac_exeext'
15417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15418   (eval $ac_try) 2>&5
15419   ac_status=$?
15420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15421   (exit $ac_status); }; }; then
15422   eval "$as_ac_var=yes"
15423 else
15424   echo "$as_me: failed program was:" >&5
15425 sed 's/^/| /' conftest.$ac_ext >&5
15426
15427 eval "$as_ac_var=no"
15428 fi
15429 rm -f conftest.err conftest.$ac_objext \
15430       conftest$ac_exeext conftest.$ac_ext
15431 fi
15432 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15433 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15434 if test `eval echo '${'$as_ac_var'}'` = yes; then
15435   cat >>confdefs.h <<_ACEOF
15436 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15437 _ACEOF
15438
15439 fi
15440 done
15441
15442
15443 for ac_func in replace_history_entry
15444 do
15445 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15446 echo "$as_me:$LINENO: checking for $ac_func" >&5
15447 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15448 if eval "test \"\${$as_ac_var+set}\" = set"; then
15449   echo $ECHO_N "(cached) $ECHO_C" >&6
15450 else
15451   cat >conftest.$ac_ext <<_ACEOF
15452 /* confdefs.h.  */
15453 _ACEOF
15454 cat confdefs.h >>conftest.$ac_ext
15455 cat >>conftest.$ac_ext <<_ACEOF
15456 /* end confdefs.h.  */
15457 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15458    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15459 #define $ac_func innocuous_$ac_func
15460
15461 /* System header to define __stub macros and hopefully few prototypes,
15462     which can conflict with char $ac_func (); below.
15463     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15464     <limits.h> exists even on freestanding compilers.  */
15465
15466 #ifdef __STDC__
15467 # include <limits.h>
15468 #else
15469 # include <assert.h>
15470 #endif
15471
15472 #undef $ac_func
15473
15474 /* Override any gcc2 internal prototype to avoid an error.  */
15475 #ifdef __cplusplus
15476 extern "C"
15477 {
15478 #endif
15479 /* We use char because int might match the return type of a gcc2
15480    builtin and then its argument prototype would still apply.  */
15481 char $ac_func ();
15482 /* The GNU C library defines this for functions which it implements
15483     to always fail with ENOSYS.  Some functions are actually named
15484     something starting with __ and the normal name is an alias.  */
15485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15486 choke me
15487 #else
15488 char (*f) () = $ac_func;
15489 #endif
15490 #ifdef __cplusplus
15491 }
15492 #endif
15493
15494 int
15495 main ()
15496 {
15497 return f != $ac_func;
15498   ;
15499   return 0;
15500 }
15501 _ACEOF
15502 rm -f conftest.$ac_objext conftest$ac_exeext
15503 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15504   (eval $ac_link) 2>conftest.er1
15505   ac_status=$?
15506   grep -v '^ *+' conftest.er1 >conftest.err
15507   rm -f conftest.er1
15508   cat conftest.err >&5
15509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15510   (exit $ac_status); } &&
15511          { ac_try='test -z "$ac_c_werror_flag"
15512                          || test ! -s conftest.err'
15513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15514   (eval $ac_try) 2>&5
15515   ac_status=$?
15516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15517   (exit $ac_status); }; } &&
15518          { ac_try='test -s conftest$ac_exeext'
15519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15520   (eval $ac_try) 2>&5
15521   ac_status=$?
15522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15523   (exit $ac_status); }; }; then
15524   eval "$as_ac_var=yes"
15525 else
15526   echo "$as_me: failed program was:" >&5
15527 sed 's/^/| /' conftest.$ac_ext >&5
15528
15529 eval "$as_ac_var=no"
15530 fi
15531 rm -f conftest.err conftest.$ac_objext \
15532       conftest$ac_exeext conftest.$ac_ext
15533 fi
15534 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15535 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15536 if test `eval echo '${'$as_ac_var'}'` = yes; then
15537   cat >>confdefs.h <<_ACEOF
15538 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15539 _ACEOF
15540
15541 fi
15542 done
15543
15544 fi
15545
15546
15547 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15548 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15549 cat >conftest.$ac_ext <<_ACEOF
15550 /* confdefs.h.  */
15551 _ACEOF
15552 cat confdefs.h >>conftest.$ac_ext
15553 cat >>conftest.$ac_ext <<_ACEOF
15554 /* end confdefs.h.  */
15555 #include <setjmp.h>
15556 int
15557 main ()
15558 {
15559 sigjmp_buf x; sigsetjmp(x, 1);
15560   ;
15561   return 0;
15562 }
15563 _ACEOF
15564 rm -f conftest.$ac_objext conftest$ac_exeext
15565 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15566   (eval $ac_link) 2>conftest.er1
15567   ac_status=$?
15568   grep -v '^ *+' conftest.er1 >conftest.err
15569   rm -f conftest.er1
15570   cat conftest.err >&5
15571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15572   (exit $ac_status); } &&
15573          { ac_try='test -z "$ac_c_werror_flag"
15574                          || test ! -s conftest.err'
15575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15576   (eval $ac_try) 2>&5
15577   ac_status=$?
15578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579   (exit $ac_status); }; } &&
15580          { ac_try='test -s conftest$ac_exeext'
15581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15582   (eval $ac_try) 2>&5
15583   ac_status=$?
15584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15585   (exit $ac_status); }; }; then
15586
15587 cat >>confdefs.h <<\_ACEOF
15588 #define HAVE_SIGSETJMP 1
15589 _ACEOF
15590
15591 echo "$as_me:$LINENO: result: yes" >&5
15592 echo "${ECHO_T}yes" >&6
15593 else
15594   echo "$as_me: failed program was:" >&5
15595 sed 's/^/| /' conftest.$ac_ext >&5
15596
15597 echo "$as_me:$LINENO: result: no" >&5
15598 echo "${ECHO_T}no" >&6
15599 fi
15600 rm -f conftest.err conftest.$ac_objext \
15601       conftest$ac_exeext conftest.$ac_ext
15602
15603 echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
15604 echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
15605 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
15606   echo $ECHO_N "(cached) $ECHO_C" >&6
15607 else
15608   cat >conftest.$ac_ext <<_ACEOF
15609 /* confdefs.h.  */
15610 _ACEOF
15611 cat confdefs.h >>conftest.$ac_ext
15612 cat >>conftest.$ac_ext <<_ACEOF
15613 /* end confdefs.h.  */
15614 #include <signal.h>
15615 /* NetBSD declares sys_siglist in unistd.h.  */
15616 #if HAVE_UNISTD_H
15617 # include <unistd.h>
15618 #endif
15619
15620
15621 int
15622 main ()
15623 {
15624 #ifndef sys_siglist
15625   char *p = (char *) sys_siglist;
15626 #endif
15627
15628   ;
15629   return 0;
15630 }
15631 _ACEOF
15632 rm -f conftest.$ac_objext
15633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15634   (eval $ac_compile) 2>conftest.er1
15635   ac_status=$?
15636   grep -v '^ *+' conftest.er1 >conftest.err
15637   rm -f conftest.er1
15638   cat conftest.err >&5
15639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640   (exit $ac_status); } &&
15641          { ac_try='test -z "$ac_c_werror_flag"
15642                          || test ! -s conftest.err'
15643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15644   (eval $ac_try) 2>&5
15645   ac_status=$?
15646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647   (exit $ac_status); }; } &&
15648          { ac_try='test -s conftest.$ac_objext'
15649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15650   (eval $ac_try) 2>&5
15651   ac_status=$?
15652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15653   (exit $ac_status); }; }; then
15654   ac_cv_have_decl_sys_siglist=yes
15655 else
15656   echo "$as_me: failed program was:" >&5
15657 sed 's/^/| /' conftest.$ac_ext >&5
15658
15659 ac_cv_have_decl_sys_siglist=no
15660 fi
15661 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15662 fi
15663 echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
15664 echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
15665 if test $ac_cv_have_decl_sys_siglist = yes; then
15666
15667 cat >>confdefs.h <<_ACEOF
15668 #define HAVE_DECL_SYS_SIGLIST 1
15669 _ACEOF
15670
15671
15672 else
15673   cat >>confdefs.h <<_ACEOF
15674 #define HAVE_DECL_SYS_SIGLIST 0
15675 _ACEOF
15676
15677
15678 fi
15679
15680
15681
15682
15683 echo "$as_me:$LINENO: checking for syslog" >&5
15684 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15685 if test "${ac_cv_func_syslog+set}" = set; then
15686   echo $ECHO_N "(cached) $ECHO_C" >&6
15687 else
15688   cat >conftest.$ac_ext <<_ACEOF
15689 /* confdefs.h.  */
15690 _ACEOF
15691 cat confdefs.h >>conftest.$ac_ext
15692 cat >>conftest.$ac_ext <<_ACEOF
15693 /* end confdefs.h.  */
15694 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15695    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15696 #define syslog innocuous_syslog
15697
15698 /* System header to define __stub macros and hopefully few prototypes,
15699     which can conflict with char syslog (); below.
15700     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15701     <limits.h> exists even on freestanding compilers.  */
15702
15703 #ifdef __STDC__
15704 # include <limits.h>
15705 #else
15706 # include <assert.h>
15707 #endif
15708
15709 #undef syslog
15710
15711 /* Override any gcc2 internal prototype to avoid an error.  */
15712 #ifdef __cplusplus
15713 extern "C"
15714 {
15715 #endif
15716 /* We use char because int might match the return type of a gcc2
15717    builtin and then its argument prototype would still apply.  */
15718 char syslog ();
15719 /* The GNU C library defines this for functions which it implements
15720     to always fail with ENOSYS.  Some functions are actually named
15721     something starting with __ and the normal name is an alias.  */
15722 #if defined (__stub_syslog) || defined (__stub___syslog)
15723 choke me
15724 #else
15725 char (*f) () = syslog;
15726 #endif
15727 #ifdef __cplusplus
15728 }
15729 #endif
15730
15731 int
15732 main ()
15733 {
15734 return f != syslog;
15735   ;
15736   return 0;
15737 }
15738 _ACEOF
15739 rm -f conftest.$ac_objext conftest$ac_exeext
15740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15741   (eval $ac_link) 2>conftest.er1
15742   ac_status=$?
15743   grep -v '^ *+' conftest.er1 >conftest.err
15744   rm -f conftest.er1
15745   cat conftest.err >&5
15746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15747   (exit $ac_status); } &&
15748          { ac_try='test -z "$ac_c_werror_flag"
15749                          || test ! -s conftest.err'
15750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15751   (eval $ac_try) 2>&5
15752   ac_status=$?
15753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15754   (exit $ac_status); }; } &&
15755          { ac_try='test -s conftest$ac_exeext'
15756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15757   (eval $ac_try) 2>&5
15758   ac_status=$?
15759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15760   (exit $ac_status); }; }; then
15761   ac_cv_func_syslog=yes
15762 else
15763   echo "$as_me: failed program was:" >&5
15764 sed 's/^/| /' conftest.$ac_ext >&5
15765
15766 ac_cv_func_syslog=no
15767 fi
15768 rm -f conftest.err conftest.$ac_objext \
15769       conftest$ac_exeext conftest.$ac_ext
15770 fi
15771 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15772 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15773 if test $ac_cv_func_syslog = yes; then
15774   if test "${ac_cv_header_syslog_h+set}" = set; then
15775   echo "$as_me:$LINENO: checking for syslog.h" >&5
15776 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15777 if test "${ac_cv_header_syslog_h+set}" = set; then
15778   echo $ECHO_N "(cached) $ECHO_C" >&6
15779 fi
15780 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15781 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15782 else
15783   # Is the header compilable?
15784 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15785 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15786 cat >conftest.$ac_ext <<_ACEOF
15787 /* confdefs.h.  */
15788 _ACEOF
15789 cat confdefs.h >>conftest.$ac_ext
15790 cat >>conftest.$ac_ext <<_ACEOF
15791 /* end confdefs.h.  */
15792 $ac_includes_default
15793 #include <syslog.h>
15794 _ACEOF
15795 rm -f conftest.$ac_objext
15796 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15797   (eval $ac_compile) 2>conftest.er1
15798   ac_status=$?
15799   grep -v '^ *+' conftest.er1 >conftest.err
15800   rm -f conftest.er1
15801   cat conftest.err >&5
15802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15803   (exit $ac_status); } &&
15804          { ac_try='test -z "$ac_c_werror_flag"
15805                          || test ! -s conftest.err'
15806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15807   (eval $ac_try) 2>&5
15808   ac_status=$?
15809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15810   (exit $ac_status); }; } &&
15811          { ac_try='test -s conftest.$ac_objext'
15812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15813   (eval $ac_try) 2>&5
15814   ac_status=$?
15815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15816   (exit $ac_status); }; }; then
15817   ac_header_compiler=yes
15818 else
15819   echo "$as_me: failed program was:" >&5
15820 sed 's/^/| /' conftest.$ac_ext >&5
15821
15822 ac_header_compiler=no
15823 fi
15824 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15825 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15826 echo "${ECHO_T}$ac_header_compiler" >&6
15827
15828 # Is the header present?
15829 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15830 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15831 cat >conftest.$ac_ext <<_ACEOF
15832 /* confdefs.h.  */
15833 _ACEOF
15834 cat confdefs.h >>conftest.$ac_ext
15835 cat >>conftest.$ac_ext <<_ACEOF
15836 /* end confdefs.h.  */
15837 #include <syslog.h>
15838 _ACEOF
15839 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15840   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15841   ac_status=$?
15842   grep -v '^ *+' conftest.er1 >conftest.err
15843   rm -f conftest.er1
15844   cat conftest.err >&5
15845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15846   (exit $ac_status); } >/dev/null; then
15847   if test -s conftest.err; then
15848     ac_cpp_err=$ac_c_preproc_warn_flag
15849     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15850   else
15851     ac_cpp_err=
15852   fi
15853 else
15854   ac_cpp_err=yes
15855 fi
15856 if test -z "$ac_cpp_err"; then
15857   ac_header_preproc=yes
15858 else
15859   echo "$as_me: failed program was:" >&5
15860 sed 's/^/| /' conftest.$ac_ext >&5
15861
15862   ac_header_preproc=no
15863 fi
15864 rm -f conftest.err conftest.$ac_ext
15865 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15866 echo "${ECHO_T}$ac_header_preproc" >&6
15867
15868 # So?  What about this header?
15869 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15870   yes:no: )
15871     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15872 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15873     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15874 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15875     ac_header_preproc=yes
15876     ;;
15877   no:yes:* )
15878     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15879 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15880     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15881 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15882     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15883 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15884     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15885 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15886     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15887 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15888     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15889 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15890     (
15891       cat <<\_ASBOX
15892 ## ---------------------------------------- ##
15893 ## Report this to pgsql-bugs@postgresql.org ##
15894 ## ---------------------------------------- ##
15895 _ASBOX
15896     ) |
15897       sed "s/^/$as_me: WARNING:     /" >&2
15898     ;;
15899 esac
15900 echo "$as_me:$LINENO: checking for syslog.h" >&5
15901 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15902 if test "${ac_cv_header_syslog_h+set}" = set; then
15903   echo $ECHO_N "(cached) $ECHO_C" >&6
15904 else
15905   ac_cv_header_syslog_h=$ac_header_preproc
15906 fi
15907 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15908 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15909
15910 fi
15911 if test $ac_cv_header_syslog_h = yes; then
15912
15913 cat >>confdefs.h <<\_ACEOF
15914 #define HAVE_SYSLOG 1
15915 _ACEOF
15916
15917 fi
15918
15919
15920 fi
15921
15922
15923 echo "$as_me:$LINENO: checking for optreset" >&5
15924 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15925 if test "${pgac_cv_var_int_optreset+set}" = set; then
15926   echo $ECHO_N "(cached) $ECHO_C" >&6
15927 else
15928   cat >conftest.$ac_ext <<_ACEOF
15929 /* confdefs.h.  */
15930 _ACEOF
15931 cat confdefs.h >>conftest.$ac_ext
15932 cat >>conftest.$ac_ext <<_ACEOF
15933 /* end confdefs.h.  */
15934 #include <unistd.h>
15935 int
15936 main ()
15937 {
15938 extern int optreset; optreset = 1;
15939   ;
15940   return 0;
15941 }
15942 _ACEOF
15943 rm -f conftest.$ac_objext conftest$ac_exeext
15944 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15945   (eval $ac_link) 2>conftest.er1
15946   ac_status=$?
15947   grep -v '^ *+' conftest.er1 >conftest.err
15948   rm -f conftest.er1
15949   cat conftest.err >&5
15950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15951   (exit $ac_status); } &&
15952          { ac_try='test -z "$ac_c_werror_flag"
15953                          || test ! -s conftest.err'
15954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15955   (eval $ac_try) 2>&5
15956   ac_status=$?
15957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15958   (exit $ac_status); }; } &&
15959          { ac_try='test -s conftest$ac_exeext'
15960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15961   (eval $ac_try) 2>&5
15962   ac_status=$?
15963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964   (exit $ac_status); }; }; then
15965   pgac_cv_var_int_optreset=yes
15966 else
15967   echo "$as_me: failed program was:" >&5
15968 sed 's/^/| /' conftest.$ac_ext >&5
15969
15970 pgac_cv_var_int_optreset=no
15971 fi
15972 rm -f conftest.err conftest.$ac_objext \
15973       conftest$ac_exeext conftest.$ac_ext
15974 fi
15975 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15976 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15977 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15978
15979 cat >>confdefs.h <<\_ACEOF
15980 #define HAVE_INT_OPTRESET 1
15981 _ACEOF
15982
15983 fi
15984
15985
15986
15987 for ac_func in strtoll strtoq
15988 do
15989 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15990 echo "$as_me:$LINENO: checking for $ac_func" >&5
15991 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15992 if eval "test \"\${$as_ac_var+set}\" = set"; then
15993   echo $ECHO_N "(cached) $ECHO_C" >&6
15994 else
15995   cat >conftest.$ac_ext <<_ACEOF
15996 /* confdefs.h.  */
15997 _ACEOF
15998 cat confdefs.h >>conftest.$ac_ext
15999 cat >>conftest.$ac_ext <<_ACEOF
16000 /* end confdefs.h.  */
16001 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16002    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16003 #define $ac_func innocuous_$ac_func
16004
16005 /* System header to define __stub macros and hopefully few prototypes,
16006     which can conflict with char $ac_func (); below.
16007     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16008     <limits.h> exists even on freestanding compilers.  */
16009
16010 #ifdef __STDC__
16011 # include <limits.h>
16012 #else
16013 # include <assert.h>
16014 #endif
16015
16016 #undef $ac_func
16017
16018 /* Override any gcc2 internal prototype to avoid an error.  */
16019 #ifdef __cplusplus
16020 extern "C"
16021 {
16022 #endif
16023 /* We use char because int might match the return type of a gcc2
16024    builtin and then its argument prototype would still apply.  */
16025 char $ac_func ();
16026 /* The GNU C library defines this for functions which it implements
16027     to always fail with ENOSYS.  Some functions are actually named
16028     something starting with __ and the normal name is an alias.  */
16029 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16030 choke me
16031 #else
16032 char (*f) () = $ac_func;
16033 #endif
16034 #ifdef __cplusplus
16035 }
16036 #endif
16037
16038 int
16039 main ()
16040 {
16041 return f != $ac_func;
16042   ;
16043   return 0;
16044 }
16045 _ACEOF
16046 rm -f conftest.$ac_objext conftest$ac_exeext
16047 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16048   (eval $ac_link) 2>conftest.er1
16049   ac_status=$?
16050   grep -v '^ *+' conftest.er1 >conftest.err
16051   rm -f conftest.er1
16052   cat conftest.err >&5
16053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16054   (exit $ac_status); } &&
16055          { ac_try='test -z "$ac_c_werror_flag"
16056                          || test ! -s conftest.err'
16057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16058   (eval $ac_try) 2>&5
16059   ac_status=$?
16060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16061   (exit $ac_status); }; } &&
16062          { ac_try='test -s conftest$ac_exeext'
16063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16064   (eval $ac_try) 2>&5
16065   ac_status=$?
16066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16067   (exit $ac_status); }; }; then
16068   eval "$as_ac_var=yes"
16069 else
16070   echo "$as_me: failed program was:" >&5
16071 sed 's/^/| /' conftest.$ac_ext >&5
16072
16073 eval "$as_ac_var=no"
16074 fi
16075 rm -f conftest.err conftest.$ac_objext \
16076       conftest$ac_exeext conftest.$ac_ext
16077 fi
16078 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16079 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16080 if test `eval echo '${'$as_ac_var'}'` = yes; then
16081   cat >>confdefs.h <<_ACEOF
16082 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16083 _ACEOF
16084  break
16085 fi
16086 done
16087
16088
16089
16090 for ac_func in strtoull strtouq
16091 do
16092 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16093 echo "$as_me:$LINENO: checking for $ac_func" >&5
16094 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16095 if eval "test \"\${$as_ac_var+set}\" = set"; then
16096   echo $ECHO_N "(cached) $ECHO_C" >&6
16097 else
16098   cat >conftest.$ac_ext <<_ACEOF
16099 /* confdefs.h.  */
16100 _ACEOF
16101 cat confdefs.h >>conftest.$ac_ext
16102 cat >>conftest.$ac_ext <<_ACEOF
16103 /* end confdefs.h.  */
16104 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16105    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16106 #define $ac_func innocuous_$ac_func
16107
16108 /* System header to define __stub macros and hopefully few prototypes,
16109     which can conflict with char $ac_func (); below.
16110     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16111     <limits.h> exists even on freestanding compilers.  */
16112
16113 #ifdef __STDC__
16114 # include <limits.h>
16115 #else
16116 # include <assert.h>
16117 #endif
16118
16119 #undef $ac_func
16120
16121 /* Override any gcc2 internal prototype to avoid an error.  */
16122 #ifdef __cplusplus
16123 extern "C"
16124 {
16125 #endif
16126 /* We use char because int might match the return type of a gcc2
16127    builtin and then its argument prototype would still apply.  */
16128 char $ac_func ();
16129 /* The GNU C library defines this for functions which it implements
16130     to always fail with ENOSYS.  Some functions are actually named
16131     something starting with __ and the normal name is an alias.  */
16132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16133 choke me
16134 #else
16135 char (*f) () = $ac_func;
16136 #endif
16137 #ifdef __cplusplus
16138 }
16139 #endif
16140
16141 int
16142 main ()
16143 {
16144 return f != $ac_func;
16145   ;
16146   return 0;
16147 }
16148 _ACEOF
16149 rm -f conftest.$ac_objext conftest$ac_exeext
16150 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16151   (eval $ac_link) 2>conftest.er1
16152   ac_status=$?
16153   grep -v '^ *+' conftest.er1 >conftest.err
16154   rm -f conftest.er1
16155   cat conftest.err >&5
16156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16157   (exit $ac_status); } &&
16158          { ac_try='test -z "$ac_c_werror_flag"
16159                          || test ! -s conftest.err'
16160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16161   (eval $ac_try) 2>&5
16162   ac_status=$?
16163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16164   (exit $ac_status); }; } &&
16165          { ac_try='test -s conftest$ac_exeext'
16166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16167   (eval $ac_try) 2>&5
16168   ac_status=$?
16169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16170   (exit $ac_status); }; }; then
16171   eval "$as_ac_var=yes"
16172 else
16173   echo "$as_me: failed program was:" >&5
16174 sed 's/^/| /' conftest.$ac_ext >&5
16175
16176 eval "$as_ac_var=no"
16177 fi
16178 rm -f conftest.err conftest.$ac_objext \
16179       conftest$ac_exeext conftest.$ac_ext
16180 fi
16181 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16182 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16183 if test `eval echo '${'$as_ac_var'}'` = yes; then
16184   cat >>confdefs.h <<_ACEOF
16185 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16186 _ACEOF
16187  break
16188 fi
16189 done
16190
16191
16192 # Check for one of atexit() or on_exit()
16193
16194 for ac_func in atexit
16195 do
16196 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16197 echo "$as_me:$LINENO: checking for $ac_func" >&5
16198 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16199 if eval "test \"\${$as_ac_var+set}\" = set"; then
16200   echo $ECHO_N "(cached) $ECHO_C" >&6
16201 else
16202   cat >conftest.$ac_ext <<_ACEOF
16203 /* confdefs.h.  */
16204 _ACEOF
16205 cat confdefs.h >>conftest.$ac_ext
16206 cat >>conftest.$ac_ext <<_ACEOF
16207 /* end confdefs.h.  */
16208 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16209    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16210 #define $ac_func innocuous_$ac_func
16211
16212 /* System header to define __stub macros and hopefully few prototypes,
16213     which can conflict with char $ac_func (); below.
16214     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16215     <limits.h> exists even on freestanding compilers.  */
16216
16217 #ifdef __STDC__
16218 # include <limits.h>
16219 #else
16220 # include <assert.h>
16221 #endif
16222
16223 #undef $ac_func
16224
16225 /* Override any gcc2 internal prototype to avoid an error.  */
16226 #ifdef __cplusplus
16227 extern "C"
16228 {
16229 #endif
16230 /* We use char because int might match the return type of a gcc2
16231    builtin and then its argument prototype would still apply.  */
16232 char $ac_func ();
16233 /* The GNU C library defines this for functions which it implements
16234     to always fail with ENOSYS.  Some functions are actually named
16235     something starting with __ and the normal name is an alias.  */
16236 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16237 choke me
16238 #else
16239 char (*f) () = $ac_func;
16240 #endif
16241 #ifdef __cplusplus
16242 }
16243 #endif
16244
16245 int
16246 main ()
16247 {
16248 return f != $ac_func;
16249   ;
16250   return 0;
16251 }
16252 _ACEOF
16253 rm -f conftest.$ac_objext conftest$ac_exeext
16254 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16255   (eval $ac_link) 2>conftest.er1
16256   ac_status=$?
16257   grep -v '^ *+' conftest.er1 >conftest.err
16258   rm -f conftest.er1
16259   cat conftest.err >&5
16260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16261   (exit $ac_status); } &&
16262          { ac_try='test -z "$ac_c_werror_flag"
16263                          || test ! -s conftest.err'
16264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16265   (eval $ac_try) 2>&5
16266   ac_status=$?
16267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16268   (exit $ac_status); }; } &&
16269          { ac_try='test -s conftest$ac_exeext'
16270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16271   (eval $ac_try) 2>&5
16272   ac_status=$?
16273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16274   (exit $ac_status); }; }; then
16275   eval "$as_ac_var=yes"
16276 else
16277   echo "$as_me: failed program was:" >&5
16278 sed 's/^/| /' conftest.$ac_ext >&5
16279
16280 eval "$as_ac_var=no"
16281 fi
16282 rm -f conftest.err conftest.$ac_objext \
16283       conftest$ac_exeext conftest.$ac_ext
16284 fi
16285 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16286 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16287 if test `eval echo '${'$as_ac_var'}'` = yes; then
16288   cat >>confdefs.h <<_ACEOF
16289 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16290 _ACEOF
16291
16292 else
16293
16294 for ac_func in on_exit
16295 do
16296 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16297 echo "$as_me:$LINENO: checking for $ac_func" >&5
16298 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16299 if eval "test \"\${$as_ac_var+set}\" = set"; then
16300   echo $ECHO_N "(cached) $ECHO_C" >&6
16301 else
16302   cat >conftest.$ac_ext <<_ACEOF
16303 /* confdefs.h.  */
16304 _ACEOF
16305 cat confdefs.h >>conftest.$ac_ext
16306 cat >>conftest.$ac_ext <<_ACEOF
16307 /* end confdefs.h.  */
16308 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16309    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16310 #define $ac_func innocuous_$ac_func
16311
16312 /* System header to define __stub macros and hopefully few prototypes,
16313     which can conflict with char $ac_func (); below.
16314     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16315     <limits.h> exists even on freestanding compilers.  */
16316
16317 #ifdef __STDC__
16318 # include <limits.h>
16319 #else
16320 # include <assert.h>
16321 #endif
16322
16323 #undef $ac_func
16324
16325 /* Override any gcc2 internal prototype to avoid an error.  */
16326 #ifdef __cplusplus
16327 extern "C"
16328 {
16329 #endif
16330 /* We use char because int might match the return type of a gcc2
16331    builtin and then its argument prototype would still apply.  */
16332 char $ac_func ();
16333 /* The GNU C library defines this for functions which it implements
16334     to always fail with ENOSYS.  Some functions are actually named
16335     something starting with __ and the normal name is an alias.  */
16336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16337 choke me
16338 #else
16339 char (*f) () = $ac_func;
16340 #endif
16341 #ifdef __cplusplus
16342 }
16343 #endif
16344
16345 int
16346 main ()
16347 {
16348 return f != $ac_func;
16349   ;
16350   return 0;
16351 }
16352 _ACEOF
16353 rm -f conftest.$ac_objext conftest$ac_exeext
16354 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16355   (eval $ac_link) 2>conftest.er1
16356   ac_status=$?
16357   grep -v '^ *+' conftest.er1 >conftest.err
16358   rm -f conftest.er1
16359   cat conftest.err >&5
16360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16361   (exit $ac_status); } &&
16362          { ac_try='test -z "$ac_c_werror_flag"
16363                          || test ! -s conftest.err'
16364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16365   (eval $ac_try) 2>&5
16366   ac_status=$?
16367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16368   (exit $ac_status); }; } &&
16369          { ac_try='test -s conftest$ac_exeext'
16370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16371   (eval $ac_try) 2>&5
16372   ac_status=$?
16373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16374   (exit $ac_status); }; }; then
16375   eval "$as_ac_var=yes"
16376 else
16377   echo "$as_me: failed program was:" >&5
16378 sed 's/^/| /' conftest.$ac_ext >&5
16379
16380 eval "$as_ac_var=no"
16381 fi
16382 rm -f conftest.err conftest.$ac_objext \
16383       conftest$ac_exeext conftest.$ac_ext
16384 fi
16385 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16386 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16387 if test `eval echo '${'$as_ac_var'}'` = yes; then
16388   cat >>confdefs.h <<_ACEOF
16389 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16390 _ACEOF
16391
16392 else
16393   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16394 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16395    { (exit 1); exit 1; }; }
16396 fi
16397 done
16398
16399 fi
16400 done
16401
16402
16403 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16404 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16405 if test "${ac_cv_sys_largefile_source+set}" = set; then
16406   echo $ECHO_N "(cached) $ECHO_C" >&6
16407 else
16408   while :; do
16409   ac_cv_sys_largefile_source=no
16410   cat >conftest.$ac_ext <<_ACEOF
16411 /* confdefs.h.  */
16412 _ACEOF
16413 cat confdefs.h >>conftest.$ac_ext
16414 cat >>conftest.$ac_ext <<_ACEOF
16415 /* end confdefs.h.  */
16416 #include <stdio.h>
16417 int
16418 main ()
16419 {
16420 return !fseeko;
16421   ;
16422   return 0;
16423 }
16424 _ACEOF
16425 rm -f conftest.$ac_objext
16426 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16427   (eval $ac_compile) 2>conftest.er1
16428   ac_status=$?
16429   grep -v '^ *+' conftest.er1 >conftest.err
16430   rm -f conftest.er1
16431   cat conftest.err >&5
16432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16433   (exit $ac_status); } &&
16434          { ac_try='test -z "$ac_c_werror_flag"
16435                          || test ! -s conftest.err'
16436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16437   (eval $ac_try) 2>&5
16438   ac_status=$?
16439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16440   (exit $ac_status); }; } &&
16441          { ac_try='test -s conftest.$ac_objext'
16442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16443   (eval $ac_try) 2>&5
16444   ac_status=$?
16445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16446   (exit $ac_status); }; }; then
16447   break
16448 else
16449   echo "$as_me: failed program was:" >&5
16450 sed 's/^/| /' conftest.$ac_ext >&5
16451
16452 fi
16453 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16454   cat >conftest.$ac_ext <<_ACEOF
16455 /* confdefs.h.  */
16456 _ACEOF
16457 cat confdefs.h >>conftest.$ac_ext
16458 cat >>conftest.$ac_ext <<_ACEOF
16459 /* end confdefs.h.  */
16460 #define _LARGEFILE_SOURCE 1
16461 #include <stdio.h>
16462 int
16463 main ()
16464 {
16465 return !fseeko;
16466   ;
16467   return 0;
16468 }
16469 _ACEOF
16470 rm -f conftest.$ac_objext
16471 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16472   (eval $ac_compile) 2>conftest.er1
16473   ac_status=$?
16474   grep -v '^ *+' conftest.er1 >conftest.err
16475   rm -f conftest.er1
16476   cat conftest.err >&5
16477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16478   (exit $ac_status); } &&
16479          { ac_try='test -z "$ac_c_werror_flag"
16480                          || test ! -s conftest.err'
16481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16482   (eval $ac_try) 2>&5
16483   ac_status=$?
16484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16485   (exit $ac_status); }; } &&
16486          { ac_try='test -s conftest.$ac_objext'
16487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16488   (eval $ac_try) 2>&5
16489   ac_status=$?
16490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16491   (exit $ac_status); }; }; then
16492   ac_cv_sys_largefile_source=1; break
16493 else
16494   echo "$as_me: failed program was:" >&5
16495 sed 's/^/| /' conftest.$ac_ext >&5
16496
16497 fi
16498 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16499   break
16500 done
16501 fi
16502 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16503 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16504 if test "$ac_cv_sys_largefile_source" != no; then
16505
16506 cat >>confdefs.h <<_ACEOF
16507 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16508 _ACEOF
16509
16510 fi
16511 rm -f conftest*
16512
16513 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16514 # in glibc 2.1.3, but that breaks too many other things.
16515 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16516 echo "$as_me:$LINENO: checking for fseeko" >&5
16517 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16518 if test "${ac_cv_func_fseeko+set}" = set; then
16519   echo $ECHO_N "(cached) $ECHO_C" >&6
16520 else
16521   cat >conftest.$ac_ext <<_ACEOF
16522 /* confdefs.h.  */
16523 _ACEOF
16524 cat confdefs.h >>conftest.$ac_ext
16525 cat >>conftest.$ac_ext <<_ACEOF
16526 /* end confdefs.h.  */
16527 #include <stdio.h>
16528 int
16529 main ()
16530 {
16531 return fseeko && fseeko (stdin, 0, 0);
16532   ;
16533   return 0;
16534 }
16535 _ACEOF
16536 rm -f conftest.$ac_objext conftest$ac_exeext
16537 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16538   (eval $ac_link) 2>conftest.er1
16539   ac_status=$?
16540   grep -v '^ *+' conftest.er1 >conftest.err
16541   rm -f conftest.er1
16542   cat conftest.err >&5
16543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16544   (exit $ac_status); } &&
16545          { ac_try='test -z "$ac_c_werror_flag"
16546                          || test ! -s conftest.err'
16547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16548   (eval $ac_try) 2>&5
16549   ac_status=$?
16550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16551   (exit $ac_status); }; } &&
16552          { ac_try='test -s conftest$ac_exeext'
16553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16554   (eval $ac_try) 2>&5
16555   ac_status=$?
16556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557   (exit $ac_status); }; }; then
16558   ac_cv_func_fseeko=yes
16559 else
16560   echo "$as_me: failed program was:" >&5
16561 sed 's/^/| /' conftest.$ac_ext >&5
16562
16563 ac_cv_func_fseeko=no
16564 fi
16565 rm -f conftest.err conftest.$ac_objext \
16566       conftest$ac_exeext conftest.$ac_ext
16567 fi
16568 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16569 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16570 if test $ac_cv_func_fseeko = yes; then
16571
16572 cat >>confdefs.h <<\_ACEOF
16573 #define HAVE_FSEEKO 1
16574 _ACEOF
16575
16576 fi
16577
16578
16579 #
16580 # Pthreads
16581 #
16582 # For each platform, we need to know about any special compile and link
16583 # libraries, and whether the normal C function names are thread-safe.
16584 # See the comment at the top of src/port/thread.c for more information.
16585 #
16586 if test "$enable_thread_safety" = yes; then
16587
16588
16589
16590
16591 ac_ext=c
16592 ac_cpp='$CPP $CPPFLAGS'
16593 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16594 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16595 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16596
16597 acx_pthread_ok=no
16598
16599 # We used to check for pthread.h first, but this fails if pthread.h
16600 # requires special compiler flags (e.g. on True64 or Sequent).
16601 # It gets checked for in the link test anyway.
16602
16603 # First of all, check if the user has set any of the PTHREAD_LIBS,
16604 # etcetera environment variables, and if threads linking works using
16605 # them:
16606 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16607         save_CFLAGS="$CFLAGS"
16608         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16609         save_LIBS="$LIBS"
16610         LIBS="$PTHREAD_LIBS $LIBS"
16611         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16612 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16613         cat >conftest.$ac_ext <<_ACEOF
16614 /* confdefs.h.  */
16615 _ACEOF
16616 cat confdefs.h >>conftest.$ac_ext
16617 cat >>conftest.$ac_ext <<_ACEOF
16618 /* end confdefs.h.  */
16619
16620 /* Override any gcc2 internal prototype to avoid an error.  */
16621 #ifdef __cplusplus
16622 extern "C"
16623 #endif
16624 /* We use char because int might match the return type of a gcc2
16625    builtin and then its argument prototype would still apply.  */
16626 char pthread_join ();
16627 int
16628 main ()
16629 {
16630 pthread_join ();
16631   ;
16632   return 0;
16633 }
16634 _ACEOF
16635 rm -f conftest.$ac_objext conftest$ac_exeext
16636 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16637   (eval $ac_link) 2>conftest.er1
16638   ac_status=$?
16639   grep -v '^ *+' conftest.er1 >conftest.err
16640   rm -f conftest.er1
16641   cat conftest.err >&5
16642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16643   (exit $ac_status); } &&
16644          { ac_try='test -z "$ac_c_werror_flag"
16645                          || test ! -s conftest.err'
16646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16647   (eval $ac_try) 2>&5
16648   ac_status=$?
16649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16650   (exit $ac_status); }; } &&
16651          { ac_try='test -s conftest$ac_exeext'
16652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16653   (eval $ac_try) 2>&5
16654   ac_status=$?
16655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16656   (exit $ac_status); }; }; then
16657   acx_pthread_ok=yes
16658 else
16659   echo "$as_me: failed program was:" >&5
16660 sed 's/^/| /' conftest.$ac_ext >&5
16661
16662 fi
16663 rm -f conftest.err conftest.$ac_objext \
16664       conftest$ac_exeext conftest.$ac_ext
16665         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16666 echo "${ECHO_T}$acx_pthread_ok" >&6
16667         if test x"$acx_pthread_ok" = xno; then
16668                 PTHREAD_LIBS=""
16669                 PTHREAD_CFLAGS=""
16670         fi
16671         LIBS="$save_LIBS"
16672         CFLAGS="$save_CFLAGS"
16673 fi
16674
16675 # We must check for the threads library under a number of different
16676 # names; the ordering is very important because some systems
16677 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16678 # libraries is broken (non-POSIX).
16679
16680 # Create a list of thread flags to try.  Items starting with a "-" are
16681 # C compiler flags, and other items are library names, except for "none"
16682 # which indicates that we try without any flags at all, and "pthread-config"
16683 # which is a program returning the flags for the Pth emulation library.
16684
16685 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16686
16687 # The ordering *is* (sometimes) important.  Some notes on the
16688 # individual items follow:
16689
16690 # pthreads: AIX (must check this before -lpthread)
16691 # none: in case threads are in libc; should be tried before -Kthread and
16692 #       other compiler flags to prevent continual compiler warnings
16693 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16694 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16695 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16696 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16697 # -pthreads: Solaris/gcc
16698 # -mthreads: Mingw32/gcc, Lynx/gcc
16699 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16700 #      doesn't hurt to check since this sometimes defines pthreads too;
16701 #      also defines -D_REENTRANT)
16702 # pthread: Linux, etcetera
16703 # --thread-safe: KAI C++
16704 # pthread-config: use pthread-config program (for GNU Pth library)
16705
16706 case "${host_cpu}-${host_os}" in
16707         *solaris*)
16708
16709         # On Solaris (at least, for some versions), libc contains stubbed
16710         # (non-functional) versions of the pthreads routines, so link-based
16711         # tests will erroneously succeed.  (We need to link with -pthread or
16712         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16713         # a function called by this macro, so we could check for that, but
16714         # who knows whether they'll stub that too in a future libc.)  So,
16715         # we'll just look for -pthreads and -lpthread first:
16716
16717         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16718         ;;
16719 esac
16720
16721 if test x"$acx_pthread_ok" = xno; then
16722 for flag in $acx_pthread_flags; do
16723
16724         tryPTHREAD_CFLAGS=""
16725         tryPTHREAD_LIBS=""
16726         case $flag in
16727                 none)
16728                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16729 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16730                 ;;
16731
16732                 -*)
16733                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16734 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16735                 tryPTHREAD_CFLAGS="$flag"
16736                 ;;
16737
16738                 pthread-config)
16739                 # skip this if we already have flags defined, for PostgreSQL
16740                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16741                 # Extract the first word of "pthread-config", so it can be a program name with args.
16742 set dummy pthread-config; ac_word=$2
16743 echo "$as_me:$LINENO: checking for $ac_word" >&5
16744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16745 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16746   echo $ECHO_N "(cached) $ECHO_C" >&6
16747 else
16748   if test -n "$acx_pthread_config"; then
16749   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16750 else
16751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16752 for as_dir in $PATH
16753 do
16754   IFS=$as_save_IFS
16755   test -z "$as_dir" && as_dir=.
16756   for ac_exec_ext in '' $ac_executable_extensions; do
16757   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16758     ac_cv_prog_acx_pthread_config="yes"
16759     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16760     break 2
16761   fi
16762 done
16763 done
16764
16765   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16766 fi
16767 fi
16768 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16769 if test -n "$acx_pthread_config"; then
16770   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16771 echo "${ECHO_T}$acx_pthread_config" >&6
16772 else
16773   echo "$as_me:$LINENO: result: no" >&5
16774 echo "${ECHO_T}no" >&6
16775 fi
16776
16777                 if test x"$acx_pthread_config" = xno; then continue; fi
16778                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16779                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16780                 ;;
16781
16782                 *)
16783                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16784 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16785                 tryPTHREAD_LIBS="-l$flag"
16786                 ;;
16787         esac
16788
16789         save_LIBS="$LIBS"
16790         save_CFLAGS="$CFLAGS"
16791         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16792         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16793
16794         # Check for various functions.  We must include pthread.h,
16795         # since some functions may be macros.  (On the Sequent, we
16796         # need a special flag -Kthread to make this header compile.)
16797         # We check for pthread_join because it is in -lpthread on IRIX
16798         # while pthread_create is in libc.  We check for pthread_attr_init
16799         # due to DEC craziness with -lpthreads.  We check for
16800         # pthread_cleanup_push because it is one of the few pthread
16801         # functions on Solaris that doesn't have a non-functional libc stub.
16802         # We try pthread_create on general principles.
16803         cat >conftest.$ac_ext <<_ACEOF
16804 /* confdefs.h.  */
16805 _ACEOF
16806 cat confdefs.h >>conftest.$ac_ext
16807 cat >>conftest.$ac_ext <<_ACEOF
16808 /* end confdefs.h.  */
16809 #include <pthread.h>
16810 int
16811 main ()
16812 {
16813 pthread_t th; pthread_join(th, 0);
16814                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16815                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16816   ;
16817   return 0;
16818 }
16819 _ACEOF
16820 rm -f conftest.$ac_objext conftest$ac_exeext
16821 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16822   (eval $ac_link) 2>conftest.er1
16823   ac_status=$?
16824   grep -v '^ *+' conftest.er1 >conftest.err
16825   rm -f conftest.er1
16826   cat conftest.err >&5
16827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828   (exit $ac_status); } &&
16829          { ac_try='test -z "$ac_c_werror_flag"
16830                          || test ! -s conftest.err'
16831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16832   (eval $ac_try) 2>&5
16833   ac_status=$?
16834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16835   (exit $ac_status); }; } &&
16836          { ac_try='test -s conftest$ac_exeext'
16837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16838   (eval $ac_try) 2>&5
16839   ac_status=$?
16840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16841   (exit $ac_status); }; }; then
16842   acx_pthread_ok=yes
16843 else
16844   echo "$as_me: failed program was:" >&5
16845 sed 's/^/| /' conftest.$ac_ext >&5
16846
16847 acx_pthread_ok=no
16848 fi
16849 rm -f conftest.err conftest.$ac_objext \
16850       conftest$ac_exeext conftest.$ac_ext
16851
16852         if test "x$acx_pthread_ok" = xyes; then
16853             # Don't use options that are ignored by the compiler.
16854             # We find them by checking stderror.
16855             cat >conftest.$ac_ext <<_ACEOF
16856 int
16857 main (int argc, char **argv)
16858 {
16859   (void) argc;
16860   (void) argv;
16861   return 0;
16862 }
16863 _ACEOF
16864             rm -f conftest.$ac_objext conftest$ac_exeext
16865             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16866                 # we continue with more flags because Linux needs -lpthread
16867                 # for libpq builds on PostgreSQL.  The test above only
16868                 # tests for building binaries, not shared libraries.
16869                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16870                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16871             else   acx_pthread_ok=no
16872             fi
16873         fi
16874
16875         LIBS="$save_LIBS"
16876         CFLAGS="$save_CFLAGS"
16877
16878         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16879 echo "${ECHO_T}$acx_pthread_ok" >&6
16880 done
16881 fi
16882
16883 # Various other checks:
16884 if test "x$acx_pthread_ok" = xyes; then
16885         save_LIBS="$LIBS"
16886         LIBS="$PTHREAD_LIBS $LIBS"
16887         save_CFLAGS="$CFLAGS"
16888         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16889
16890         # Detect AIX lossage: threads are created detached by default
16891         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16892         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16893 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16894         cat >conftest.$ac_ext <<_ACEOF
16895 /* confdefs.h.  */
16896 _ACEOF
16897 cat confdefs.h >>conftest.$ac_ext
16898 cat >>conftest.$ac_ext <<_ACEOF
16899 /* end confdefs.h.  */
16900 #include <pthread.h>
16901 int
16902 main ()
16903 {
16904 int attr=PTHREAD_CREATE_JOINABLE;
16905   ;
16906   return 0;
16907 }
16908 _ACEOF
16909 rm -f conftest.$ac_objext conftest$ac_exeext
16910 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16911   (eval $ac_link) 2>conftest.er1
16912   ac_status=$?
16913   grep -v '^ *+' conftest.er1 >conftest.err
16914   rm -f conftest.er1
16915   cat conftest.err >&5
16916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16917   (exit $ac_status); } &&
16918          { ac_try='test -z "$ac_c_werror_flag"
16919                          || test ! -s conftest.err'
16920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16921   (eval $ac_try) 2>&5
16922   ac_status=$?
16923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16924   (exit $ac_status); }; } &&
16925          { ac_try='test -s conftest$ac_exeext'
16926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16927   (eval $ac_try) 2>&5
16928   ac_status=$?
16929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16930   (exit $ac_status); }; }; then
16931   ok=PTHREAD_CREATE_JOINABLE
16932 else
16933   echo "$as_me: failed program was:" >&5
16934 sed 's/^/| /' conftest.$ac_ext >&5
16935
16936 ok=unknown
16937 fi
16938 rm -f conftest.err conftest.$ac_objext \
16939       conftest$ac_exeext conftest.$ac_ext
16940         if test x"$ok" = xunknown; then
16941                 cat >conftest.$ac_ext <<_ACEOF
16942 /* confdefs.h.  */
16943 _ACEOF
16944 cat confdefs.h >>conftest.$ac_ext
16945 cat >>conftest.$ac_ext <<_ACEOF
16946 /* end confdefs.h.  */
16947 #include <pthread.h>
16948 int
16949 main ()
16950 {
16951 int attr=PTHREAD_CREATE_UNDETACHED;
16952   ;
16953   return 0;
16954 }
16955 _ACEOF
16956 rm -f conftest.$ac_objext conftest$ac_exeext
16957 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16958   (eval $ac_link) 2>conftest.er1
16959   ac_status=$?
16960   grep -v '^ *+' conftest.er1 >conftest.err
16961   rm -f conftest.er1
16962   cat conftest.err >&5
16963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16964   (exit $ac_status); } &&
16965          { ac_try='test -z "$ac_c_werror_flag"
16966                          || test ! -s conftest.err'
16967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16968   (eval $ac_try) 2>&5
16969   ac_status=$?
16970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16971   (exit $ac_status); }; } &&
16972          { ac_try='test -s conftest$ac_exeext'
16973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16974   (eval $ac_try) 2>&5
16975   ac_status=$?
16976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16977   (exit $ac_status); }; }; then
16978   ok=PTHREAD_CREATE_UNDETACHED
16979 else
16980   echo "$as_me: failed program was:" >&5
16981 sed 's/^/| /' conftest.$ac_ext >&5
16982
16983 ok=unknown
16984 fi
16985 rm -f conftest.err conftest.$ac_objext \
16986       conftest$ac_exeext conftest.$ac_ext
16987         fi
16988         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16989
16990 cat >>confdefs.h <<\_ACEOF
16991 #define PTHREAD_CREATE_JOINABLE $ok
16992 _ACEOF
16993
16994         fi
16995         echo "$as_me:$LINENO: result: ${ok}" >&5
16996 echo "${ECHO_T}${ok}" >&6
16997         if test x"$ok" = xunknown; then
16998                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16999 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
17000         fi
17001
17002         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
17003 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
17004         flag=no
17005 # We always add these in PostgreSQL
17006 #       case "${host_cpu}-${host_os}" in
17007 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
17008 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
17009 #       esac
17010         echo "$as_me:$LINENO: result: ${flag}" >&5
17011 echo "${ECHO_T}${flag}" >&6
17012         if test "x$flag" != xno; then
17013                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
17014         fi
17015
17016         LIBS="$save_LIBS"
17017         CFLAGS="$save_CFLAGS"
17018
17019 # Supporting cc_r would require a special CC in all places that
17020 # use libpq, and that is ugly, so we don't do it.  Users can still
17021 # define their compiler as cc_r to do thread builds of everything.
17022         # More AIX lossage: must compile with cc_r
17023         # Extract the first word of "cc_r", so it can be a program name with args.
17024 set dummy cc_r; ac_word=$2
17025 echo "$as_me:$LINENO: checking for $ac_word" >&5
17026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17027 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
17028   echo $ECHO_N "(cached) $ECHO_C" >&6
17029 else
17030   if test -n "$PTHREAD_CC"; then
17031   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
17032 else
17033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17034 for as_dir in $PATH
17035 do
17036   IFS=$as_save_IFS
17037   test -z "$as_dir" && as_dir=.
17038   for ac_exec_ext in '' $ac_executable_extensions; do
17039   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17040     ac_cv_prog_PTHREAD_CC="cc_r"
17041     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17042     break 2
17043   fi
17044 done
17045 done
17046
17047   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
17048 fi
17049 fi
17050 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
17051 if test -n "$PTHREAD_CC"; then
17052   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
17053 echo "${ECHO_T}$PTHREAD_CC" >&6
17054 else
17055   echo "$as_me:$LINENO: result: no" >&5
17056 echo "${ECHO_T}no" >&6
17057 fi
17058
17059 else
17060         PTHREAD_CC="$CC"
17061 fi
17062
17063
17064
17065
17066
17067 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
17068 if test x"$acx_pthread_ok" = xyes; then
17069
17070 cat >>confdefs.h <<\_ACEOF
17071 #define HAVE_PTHREAD 1
17072 _ACEOF
17073
17074         :
17075 else
17076         acx_pthread_ok=no
17077
17078 fi
17079 ac_ext=c
17080 ac_cpp='$CPP $CPPFLAGS'
17081 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17082 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17083 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17084
17085         # set thread flags
17086
17087 # Some platforms use these, so just defineed them.  They can't hurt if they
17088 # are not supported.
17089 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
17090
17091
17092 # At this point, we don't want to muck with the compiler name for threading.
17093 # Let's see who fails, perhaps AIX.  2004-04-23
17094 if test "$PTHREAD_CC" != "$CC"; then
17095 { { echo "$as_me:$LINENO: error:
17096 PostgreSQL does not support platforms that require a special compiler
17097 for thread safety." >&5
17098 echo "$as_me: error:
17099 PostgreSQL does not support platforms that require a special compiler
17100 for thread safety." >&2;}
17101    { (exit 1); exit 1; }; }
17102 fi
17103
17104 if test "$THREAD_SUPPORT" = no; then
17105 { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
17106 This platform is known to not support thread-safe programs.  For details,
17107 compile and run src/bin/pg_thread_test." >&5
17108 echo "$as_me: error: cannot enable threads on this platform
17109 This platform is known to not support thread-safe programs.  For details,
17110 compile and run src/bin/pg_thread_test." >&2;}
17111    { (exit 1); exit 1; }; }
17112 fi
17113
17114 # Check for *_r functions
17115 _CFLAGS="$CFLAGS"
17116 _LIBS="$LIBS"
17117 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
17118 LIBS="$LIBS $PTHREAD_LIBS"
17119
17120 if test "${ac_cv_header_pthread_h+set}" = set; then
17121   echo "$as_me:$LINENO: checking for pthread.h" >&5
17122 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
17123 if test "${ac_cv_header_pthread_h+set}" = set; then
17124   echo $ECHO_N "(cached) $ECHO_C" >&6
17125 fi
17126 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
17127 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
17128 else
17129   # Is the header compilable?
17130 echo "$as_me:$LINENO: checking pthread.h usability" >&5
17131 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
17132 cat >conftest.$ac_ext <<_ACEOF
17133 /* confdefs.h.  */
17134 _ACEOF
17135 cat confdefs.h >>conftest.$ac_ext
17136 cat >>conftest.$ac_ext <<_ACEOF
17137 /* end confdefs.h.  */
17138 $ac_includes_default
17139 #include <pthread.h>
17140 _ACEOF
17141 rm -f conftest.$ac_objext
17142 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17143   (eval $ac_compile) 2>conftest.er1
17144   ac_status=$?
17145   grep -v '^ *+' conftest.er1 >conftest.err
17146   rm -f conftest.er1
17147   cat conftest.err >&5
17148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17149   (exit $ac_status); } &&
17150          { ac_try='test -z "$ac_c_werror_flag"
17151                          || test ! -s conftest.err'
17152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17153   (eval $ac_try) 2>&5
17154   ac_status=$?
17155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17156   (exit $ac_status); }; } &&
17157          { ac_try='test -s conftest.$ac_objext'
17158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17159   (eval $ac_try) 2>&5
17160   ac_status=$?
17161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17162   (exit $ac_status); }; }; then
17163   ac_header_compiler=yes
17164 else
17165   echo "$as_me: failed program was:" >&5
17166 sed 's/^/| /' conftest.$ac_ext >&5
17167
17168 ac_header_compiler=no
17169 fi
17170 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17171 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17172 echo "${ECHO_T}$ac_header_compiler" >&6
17173
17174 # Is the header present?
17175 echo "$as_me:$LINENO: checking pthread.h presence" >&5
17176 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
17177 cat >conftest.$ac_ext <<_ACEOF
17178 /* confdefs.h.  */
17179 _ACEOF
17180 cat confdefs.h >>conftest.$ac_ext
17181 cat >>conftest.$ac_ext <<_ACEOF
17182 /* end confdefs.h.  */
17183 #include <pthread.h>
17184 _ACEOF
17185 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17186   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17187   ac_status=$?
17188   grep -v '^ *+' conftest.er1 >conftest.err
17189   rm -f conftest.er1
17190   cat conftest.err >&5
17191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17192   (exit $ac_status); } >/dev/null; then
17193   if test -s conftest.err; then
17194     ac_cpp_err=$ac_c_preproc_warn_flag
17195     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17196   else
17197     ac_cpp_err=
17198   fi
17199 else
17200   ac_cpp_err=yes
17201 fi
17202 if test -z "$ac_cpp_err"; then
17203   ac_header_preproc=yes
17204 else
17205   echo "$as_me: failed program was:" >&5
17206 sed 's/^/| /' conftest.$ac_ext >&5
17207
17208   ac_header_preproc=no
17209 fi
17210 rm -f conftest.err conftest.$ac_ext
17211 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17212 echo "${ECHO_T}$ac_header_preproc" >&6
17213
17214 # So?  What about this header?
17215 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17216   yes:no: )
17217     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
17218 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17219     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
17220 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
17221     ac_header_preproc=yes
17222     ;;
17223   no:yes:* )
17224     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
17225 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
17226     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
17227 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
17228     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
17229 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
17230     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
17231 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17232     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
17233 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
17234     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
17235 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
17236     (
17237       cat <<\_ASBOX
17238 ## ---------------------------------------- ##
17239 ## Report this to pgsql-bugs@postgresql.org ##
17240 ## ---------------------------------------- ##
17241 _ASBOX
17242     ) |
17243       sed "s/^/$as_me: WARNING:     /" >&2
17244     ;;
17245 esac
17246 echo "$as_me:$LINENO: checking for pthread.h" >&5
17247 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
17248 if test "${ac_cv_header_pthread_h+set}" = set; then
17249   echo $ECHO_N "(cached) $ECHO_C" >&6
17250 else
17251   ac_cv_header_pthread_h=$ac_header_preproc
17252 fi
17253 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
17254 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
17255
17256 fi
17257 if test $ac_cv_header_pthread_h = yes; then
17258   :
17259 else
17260   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
17261 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
17262    { (exit 1); exit 1; }; }
17263 fi
17264
17265
17266
17267
17268
17269
17270 for ac_func in strerror_r getpwuid_r gethostbyname_r
17271 do
17272 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17273 echo "$as_me:$LINENO: checking for $ac_func" >&5
17274 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17275 if eval "test \"\${$as_ac_var+set}\" = set"; then
17276   echo $ECHO_N "(cached) $ECHO_C" >&6
17277 else
17278   cat >conftest.$ac_ext <<_ACEOF
17279 /* confdefs.h.  */
17280 _ACEOF
17281 cat confdefs.h >>conftest.$ac_ext
17282 cat >>conftest.$ac_ext <<_ACEOF
17283 /* end confdefs.h.  */
17284 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17285    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17286 #define $ac_func innocuous_$ac_func
17287
17288 /* System header to define __stub macros and hopefully few prototypes,
17289     which can conflict with char $ac_func (); below.
17290     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17291     <limits.h> exists even on freestanding compilers.  */
17292
17293 #ifdef __STDC__
17294 # include <limits.h>
17295 #else
17296 # include <assert.h>
17297 #endif
17298
17299 #undef $ac_func
17300
17301 /* Override any gcc2 internal prototype to avoid an error.  */
17302 #ifdef __cplusplus
17303 extern "C"
17304 {
17305 #endif
17306 /* We use char because int might match the return type of a gcc2
17307    builtin and then its argument prototype would still apply.  */
17308 char $ac_func ();
17309 /* The GNU C library defines this for functions which it implements
17310     to always fail with ENOSYS.  Some functions are actually named
17311     something starting with __ and the normal name is an alias.  */
17312 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17313 choke me
17314 #else
17315 char (*f) () = $ac_func;
17316 #endif
17317 #ifdef __cplusplus
17318 }
17319 #endif
17320
17321 int
17322 main ()
17323 {
17324 return f != $ac_func;
17325   ;
17326   return 0;
17327 }
17328 _ACEOF
17329 rm -f conftest.$ac_objext conftest$ac_exeext
17330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17331   (eval $ac_link) 2>conftest.er1
17332   ac_status=$?
17333   grep -v '^ *+' conftest.er1 >conftest.err
17334   rm -f conftest.er1
17335   cat conftest.err >&5
17336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17337   (exit $ac_status); } &&
17338          { ac_try='test -z "$ac_c_werror_flag"
17339                          || test ! -s conftest.err'
17340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17341   (eval $ac_try) 2>&5
17342   ac_status=$?
17343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17344   (exit $ac_status); }; } &&
17345          { ac_try='test -s conftest$ac_exeext'
17346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17347   (eval $ac_try) 2>&5
17348   ac_status=$?
17349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17350   (exit $ac_status); }; }; then
17351   eval "$as_ac_var=yes"
17352 else
17353   echo "$as_me: failed program was:" >&5
17354 sed 's/^/| /' conftest.$ac_ext >&5
17355
17356 eval "$as_ac_var=no"
17357 fi
17358 rm -f conftest.err conftest.$ac_objext \
17359       conftest$ac_exeext conftest.$ac_ext
17360 fi
17361 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17362 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17363 if test `eval echo '${'$as_ac_var'}'` = yes; then
17364   cat >>confdefs.h <<_ACEOF
17365 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17366 _ACEOF
17367
17368 fi
17369 done
17370
17371
17372 # Do test here with the proper thread flags
17373 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17374 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17375 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17376   echo $ECHO_N "(cached) $ECHO_C" >&6
17377 else
17378   cat >conftest.$ac_ext <<_ACEOF
17379 /* confdefs.h.  */
17380 _ACEOF
17381 cat confdefs.h >>conftest.$ac_ext
17382 cat >>conftest.$ac_ext <<_ACEOF
17383 /* end confdefs.h.  */
17384 #include <sys/types.h>
17385 #include <pwd.h>
17386 int
17387 main ()
17388 {
17389 uid_t uid;
17390 struct passwd *space;
17391 char *buf;
17392 size_t bufsize;
17393 struct passwd **result;
17394 getpwuid_r(uid, space, buf, bufsize, result);
17395   ;
17396   return 0;
17397 }
17398 _ACEOF
17399 rm -f conftest.$ac_objext
17400 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17401   (eval $ac_compile) 2>conftest.er1
17402   ac_status=$?
17403   grep -v '^ *+' conftest.er1 >conftest.err
17404   rm -f conftest.er1
17405   cat conftest.err >&5
17406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17407   (exit $ac_status); } &&
17408          { ac_try='test -z "$ac_c_werror_flag"
17409                          || test ! -s conftest.err'
17410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17411   (eval $ac_try) 2>&5
17412   ac_status=$?
17413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414   (exit $ac_status); }; } &&
17415          { ac_try='test -s conftest.$ac_objext'
17416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17417   (eval $ac_try) 2>&5
17418   ac_status=$?
17419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17420   (exit $ac_status); }; }; then
17421   pgac_func_getpwuid_r_5arg=yes
17422 else
17423   echo "$as_me: failed program was:" >&5
17424 sed 's/^/| /' conftest.$ac_ext >&5
17425
17426 pgac_func_getpwuid_r_5arg=no
17427 fi
17428 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17429 fi
17430 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17431 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17432 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17433
17434 cat >>confdefs.h <<\_ACEOF
17435 #define GETPWUID_R_5ARG
17436 _ACEOF
17437
17438 fi
17439
17440 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17441 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17442 if test "${pgac_func_strerror_r_int+set}" = set; then
17443   echo $ECHO_N "(cached) $ECHO_C" >&6
17444 else
17445   cat >conftest.$ac_ext <<_ACEOF
17446 /* confdefs.h.  */
17447 _ACEOF
17448 cat confdefs.h >>conftest.$ac_ext
17449 cat >>conftest.$ac_ext <<_ACEOF
17450 /* end confdefs.h.  */
17451 #include <string.h>
17452 int
17453 main ()
17454 {
17455 #ifndef _AIX
17456 int strerror_r(int, char *, size_t);
17457 #else
17458 /* Older AIX has 'int' for the third argument so we don't test the args. */
17459 int strerror_r();
17460 #endif
17461   ;
17462   return 0;
17463 }
17464 _ACEOF
17465 rm -f conftest.$ac_objext
17466 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17467   (eval $ac_compile) 2>conftest.er1
17468   ac_status=$?
17469   grep -v '^ *+' conftest.er1 >conftest.err
17470   rm -f conftest.er1
17471   cat conftest.err >&5
17472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17473   (exit $ac_status); } &&
17474          { ac_try='test -z "$ac_c_werror_flag"
17475                          || test ! -s conftest.err'
17476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17477   (eval $ac_try) 2>&5
17478   ac_status=$?
17479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17480   (exit $ac_status); }; } &&
17481          { ac_try='test -s conftest.$ac_objext'
17482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17483   (eval $ac_try) 2>&5
17484   ac_status=$?
17485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17486   (exit $ac_status); }; }; then
17487   pgac_func_strerror_r_int=yes
17488 else
17489   echo "$as_me: failed program was:" >&5
17490 sed 's/^/| /' conftest.$ac_ext >&5
17491
17492 pgac_func_strerror_r_int=no
17493 fi
17494 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17495 fi
17496 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17497 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17498 if test x"$pgac_func_strerror_r_int" = xyes ; then
17499
17500 cat >>confdefs.h <<\_ACEOF
17501 #define STRERROR_R_INT
17502 _ACEOF
17503
17504 fi
17505
17506
17507 CFLAGS="$_CFLAGS"
17508 LIBS="$_LIBS"
17509
17510 else
17511 # do not use values from template file
17512 PTHREAD_CFLAGS=
17513 PTHREAD_LIBS=
17514 fi
17515
17516
17517
17518
17519
17520 # We can test for libldap_r only after we know PTHREAD_LIBS
17521 if test "$with_ldap" = yes ; then
17522   _LIBS="$LIBS"
17523   if test "$PORTNAME" != "win32"; then
17524
17525 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
17526 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
17527 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
17528   echo $ECHO_N "(cached) $ECHO_C" >&6
17529 else
17530   ac_check_lib_save_LIBS=$LIBS
17531 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
17532 cat >conftest.$ac_ext <<_ACEOF
17533 /* confdefs.h.  */
17534 _ACEOF
17535 cat confdefs.h >>conftest.$ac_ext
17536 cat >>conftest.$ac_ext <<_ACEOF
17537 /* end confdefs.h.  */
17538
17539 /* Override any gcc2 internal prototype to avoid an error.  */
17540 #ifdef __cplusplus
17541 extern "C"
17542 #endif
17543 /* We use char because int might match the return type of a gcc2
17544    builtin and then its argument prototype would still apply.  */
17545 char ldap_bind ();
17546 int
17547 main ()
17548 {
17549 ldap_bind ();
17550   ;
17551   return 0;
17552 }
17553 _ACEOF
17554 rm -f conftest.$ac_objext conftest$ac_exeext
17555 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17556   (eval $ac_link) 2>conftest.er1
17557   ac_status=$?
17558   grep -v '^ *+' conftest.er1 >conftest.err
17559   rm -f conftest.er1
17560   cat conftest.err >&5
17561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17562   (exit $ac_status); } &&
17563          { ac_try='test -z "$ac_c_werror_flag"
17564                          || test ! -s conftest.err'
17565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17566   (eval $ac_try) 2>&5
17567   ac_status=$?
17568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17569   (exit $ac_status); }; } &&
17570          { ac_try='test -s conftest$ac_exeext'
17571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17572   (eval $ac_try) 2>&5
17573   ac_status=$?
17574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17575   (exit $ac_status); }; }; then
17576   ac_cv_lib_ldap_ldap_bind=yes
17577 else
17578   echo "$as_me: failed program was:" >&5
17579 sed 's/^/| /' conftest.$ac_ext >&5
17580
17581 ac_cv_lib_ldap_ldap_bind=no
17582 fi
17583 rm -f conftest.err conftest.$ac_objext \
17584       conftest$ac_exeext conftest.$ac_ext
17585 LIBS=$ac_check_lib_save_LIBS
17586 fi
17587 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
17588 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
17589 if test $ac_cv_lib_ldap_ldap_bind = yes; then
17590   cat >>confdefs.h <<_ACEOF
17591 #define HAVE_LIBLDAP 1
17592 _ACEOF
17593
17594   LIBS="-lldap $LIBS"
17595
17596 else
17597   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
17598 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
17599    { (exit 1); exit 1; }; }
17600 fi
17601
17602     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
17603     if test "$enable_thread_safety" = yes; then
17604       # on some platforms ldap_r fails to link without PTHREAD_LIBS
17605
17606 echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
17607 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6
17608 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
17609   echo $ECHO_N "(cached) $ECHO_C" >&6
17610 else
17611   ac_check_lib_save_LIBS=$LIBS
17612 LIBS="-lldap_r $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
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 /* Override any gcc2 internal prototype to avoid an error.  */
17621 #ifdef __cplusplus
17622 extern "C"
17623 #endif
17624 /* We use char because int might match the return type of a gcc2
17625    builtin and then its argument prototype would still apply.  */
17626 char ldap_simple_bind ();
17627 int
17628 main ()
17629 {
17630 ldap_simple_bind ();
17631   ;
17632   return 0;
17633 }
17634 _ACEOF
17635 rm -f conftest.$ac_objext conftest$ac_exeext
17636 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17637   (eval $ac_link) 2>conftest.er1
17638   ac_status=$?
17639   grep -v '^ *+' conftest.er1 >conftest.err
17640   rm -f conftest.er1
17641   cat conftest.err >&5
17642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17643   (exit $ac_status); } &&
17644          { ac_try='test -z "$ac_c_werror_flag"
17645                          || test ! -s conftest.err'
17646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17647   (eval $ac_try) 2>&5
17648   ac_status=$?
17649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17650   (exit $ac_status); }; } &&
17651          { ac_try='test -s conftest$ac_exeext'
17652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17653   (eval $ac_try) 2>&5
17654   ac_status=$?
17655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17656   (exit $ac_status); }; }; then
17657   ac_cv_lib_ldap_r_ldap_simple_bind=yes
17658 else
17659   echo "$as_me: failed program was:" >&5
17660 sed 's/^/| /' conftest.$ac_ext >&5
17661
17662 ac_cv_lib_ldap_r_ldap_simple_bind=no
17663 fi
17664 rm -f conftest.err conftest.$ac_objext \
17665       conftest$ac_exeext conftest.$ac_ext
17666 LIBS=$ac_check_lib_save_LIBS
17667 fi
17668 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
17669 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6
17670 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
17671   cat >>confdefs.h <<_ACEOF
17672 #define HAVE_LIBLDAP_R 1
17673 _ACEOF
17674
17675   LIBS="-lldap_r $LIBS"
17676
17677 else
17678   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
17679 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
17680    { (exit 1); exit 1; }; }
17681 fi
17682
17683       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
17684     else
17685       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
17686     fi
17687   else
17688
17689 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
17690 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
17691 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
17692   echo $ECHO_N "(cached) $ECHO_C" >&6
17693 else
17694   ac_check_lib_save_LIBS=$LIBS
17695 LIBS="-lwldap32  $LIBS"
17696 cat >conftest.$ac_ext <<_ACEOF
17697 /* confdefs.h.  */
17698 _ACEOF
17699 cat confdefs.h >>conftest.$ac_ext
17700 cat >>conftest.$ac_ext <<_ACEOF
17701 /* end confdefs.h.  */
17702
17703 /* Override any gcc2 internal prototype to avoid an error.  */
17704 #ifdef __cplusplus
17705 extern "C"
17706 #endif
17707 /* We use char because int might match the return type of a gcc2
17708    builtin and then its argument prototype would still apply.  */
17709 char ldap_bind ();
17710 int
17711 main ()
17712 {
17713 ldap_bind ();
17714   ;
17715   return 0;
17716 }
17717 _ACEOF
17718 rm -f conftest.$ac_objext conftest$ac_exeext
17719 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17720   (eval $ac_link) 2>conftest.er1
17721   ac_status=$?
17722   grep -v '^ *+' conftest.er1 >conftest.err
17723   rm -f conftest.er1
17724   cat conftest.err >&5
17725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17726   (exit $ac_status); } &&
17727          { ac_try='test -z "$ac_c_werror_flag"
17728                          || test ! -s conftest.err'
17729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17730   (eval $ac_try) 2>&5
17731   ac_status=$?
17732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17733   (exit $ac_status); }; } &&
17734          { ac_try='test -s conftest$ac_exeext'
17735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17736   (eval $ac_try) 2>&5
17737   ac_status=$?
17738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17739   (exit $ac_status); }; }; then
17740   ac_cv_lib_wldap32_ldap_bind=yes
17741 else
17742   echo "$as_me: failed program was:" >&5
17743 sed 's/^/| /' conftest.$ac_ext >&5
17744
17745 ac_cv_lib_wldap32_ldap_bind=no
17746 fi
17747 rm -f conftest.err conftest.$ac_objext \
17748       conftest$ac_exeext conftest.$ac_ext
17749 LIBS=$ac_check_lib_save_LIBS
17750 fi
17751 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
17752 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
17753 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
17754   cat >>confdefs.h <<_ACEOF
17755 #define HAVE_LIBWLDAP32 1
17756 _ACEOF
17757
17758   LIBS="-lwldap32 $LIBS"
17759
17760 else
17761   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
17762 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
17763    { (exit 1); exit 1; }; }
17764 fi
17765
17766     LDAP_LIBS_FE="-lwldap32"
17767     LDAP_LIBS_BE="-lwldap32"
17768   fi
17769   LIBS="$_LIBS"
17770 fi
17771
17772
17773
17774
17775 # This test makes sure that run tests work at all.  Sometimes a shared
17776 # library is found by the linker, but the runtime linker can't find it.
17777 # This check should come after all modifications of compiler or linker
17778 # variables, and before any other run tests.
17779 echo "$as_me:$LINENO: checking test program" >&5
17780 echo $ECHO_N "checking test program... $ECHO_C" >&6
17781 if test "$cross_compiling" = yes; then
17782   echo "$as_me:$LINENO: result: cross-compiling" >&5
17783 echo "${ECHO_T}cross-compiling" >&6
17784 else
17785   cat >conftest.$ac_ext <<_ACEOF
17786 /* confdefs.h.  */
17787 _ACEOF
17788 cat confdefs.h >>conftest.$ac_ext
17789 cat >>conftest.$ac_ext <<_ACEOF
17790 /* end confdefs.h.  */
17791 int main() { return 0; }
17792 _ACEOF
17793 rm -f conftest$ac_exeext
17794 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17795   (eval $ac_link) 2>&5
17796   ac_status=$?
17797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17798   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17800   (eval $ac_try) 2>&5
17801   ac_status=$?
17802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17803   (exit $ac_status); }; }; then
17804   echo "$as_me:$LINENO: result: ok" >&5
17805 echo "${ECHO_T}ok" >&6
17806 else
17807   echo "$as_me: program exited with status $ac_status" >&5
17808 echo "$as_me: failed program was:" >&5
17809 sed 's/^/| /' conftest.$ac_ext >&5
17810
17811 ( exit $ac_status )
17812 echo "$as_me:$LINENO: result: failed" >&5
17813 echo "${ECHO_T}failed" >&6
17814 { { echo "$as_me:$LINENO: error:
17815 Could not execute a simple test program.  This may be a problem
17816 related to locating shared libraries.  Check the file 'config.log'
17817 for the exact reason." >&5
17818 echo "$as_me: error:
17819 Could not execute a simple test program.  This may be a problem
17820 related to locating shared libraries.  Check the file 'config.log'
17821 for the exact reason." >&2;}
17822    { (exit 1); exit 1; }; }
17823 fi
17824 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17825 fi
17826
17827 # --------------------
17828 # Run tests below here
17829 # --------------------
17830
17831 # Force use of our snprintf if system's doesn't do arg control
17832 # See comment above at snprintf test for details.
17833 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17834   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17835 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17836 if test "${pgac_cv_printf_arg_control+set}" = set; then
17837   echo $ECHO_N "(cached) $ECHO_C" >&6
17838 else
17839   if test "$cross_compiling" = yes; then
17840   pgac_cv_printf_arg_control=cross
17841 else
17842   cat >conftest.$ac_ext <<_ACEOF
17843 /* confdefs.h.  */
17844 _ACEOF
17845 cat confdefs.h >>conftest.$ac_ext
17846 cat >>conftest.$ac_ext <<_ACEOF
17847 /* end confdefs.h.  */
17848 #include <stdio.h>
17849 #include <string.h>
17850
17851 int main()
17852 {
17853   char buf[100];
17854
17855   /* can it swap arguments? */
17856   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17857   if (strcmp(buf, "4 3") != 0)
17858     return 1;
17859   return 0;
17860 }
17861 _ACEOF
17862 rm -f conftest$ac_exeext
17863 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17864   (eval $ac_link) 2>&5
17865   ac_status=$?
17866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17867   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17869   (eval $ac_try) 2>&5
17870   ac_status=$?
17871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17872   (exit $ac_status); }; }; then
17873   pgac_cv_printf_arg_control=yes
17874 else
17875   echo "$as_me: program exited with status $ac_status" >&5
17876 echo "$as_me: failed program was:" >&5
17877 sed 's/^/| /' conftest.$ac_ext >&5
17878
17879 ( exit $ac_status )
17880 pgac_cv_printf_arg_control=no
17881 fi
17882 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17883 fi
17884
17885 fi
17886 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17887 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17888
17889   if test $pgac_cv_printf_arg_control != yes ; then
17890     pgac_need_repl_snprintf=yes
17891   fi
17892 fi
17893
17894
17895
17896 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17897 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17898 if test "${pgac_cv_type_long_int_64+set}" = set; then
17899   echo $ECHO_N "(cached) $ECHO_C" >&6
17900 else
17901   if test "$cross_compiling" = yes; then
17902   # If cross-compiling, check the size reported by the compiler and
17903 # trust that the arithmetic works.
17904 cat >conftest.$ac_ext <<_ACEOF
17905 /* confdefs.h.  */
17906 _ACEOF
17907 cat confdefs.h >>conftest.$ac_ext
17908 cat >>conftest.$ac_ext <<_ACEOF
17909 /* end confdefs.h.  */
17910
17911 int
17912 main ()
17913 {
17914 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17915 test_array [0] = 0
17916
17917   ;
17918   return 0;
17919 }
17920 _ACEOF
17921 rm -f conftest.$ac_objext
17922 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17923   (eval $ac_compile) 2>conftest.er1
17924   ac_status=$?
17925   grep -v '^ *+' conftest.er1 >conftest.err
17926   rm -f conftest.er1
17927   cat conftest.err >&5
17928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17929   (exit $ac_status); } &&
17930          { ac_try='test -z "$ac_c_werror_flag"
17931                          || test ! -s conftest.err'
17932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17933   (eval $ac_try) 2>&5
17934   ac_status=$?
17935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17936   (exit $ac_status); }; } &&
17937          { ac_try='test -s conftest.$ac_objext'
17938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17939   (eval $ac_try) 2>&5
17940   ac_status=$?
17941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17942   (exit $ac_status); }; }; then
17943   pgac_cv_type_long_int_64=yes
17944 else
17945   echo "$as_me: failed program was:" >&5
17946 sed 's/^/| /' conftest.$ac_ext >&5
17947
17948 pgac_cv_type_long_int_64=no
17949 fi
17950 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17951 else
17952   cat >conftest.$ac_ext <<_ACEOF
17953 /* confdefs.h.  */
17954 _ACEOF
17955 cat confdefs.h >>conftest.$ac_ext
17956 cat >>conftest.$ac_ext <<_ACEOF
17957 /* end confdefs.h.  */
17958 typedef long int ac_int64;
17959
17960 /*
17961  * These are globals to discourage the compiler from folding all the
17962  * arithmetic tests down to compile-time constants.
17963  */
17964 ac_int64 a = 20000001;
17965 ac_int64 b = 40000005;
17966
17967 int does_int64_work()
17968 {
17969   ac_int64 c,d;
17970
17971   if (sizeof(ac_int64) != 8)
17972     return 0;                   /* definitely not the right size */
17973
17974   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17975   c = a * b;
17976   d = (c + b) / b;
17977   if (d != a+1)
17978     return 0;
17979   return 1;
17980 }
17981 main() {
17982   exit(! does_int64_work());
17983 }
17984 _ACEOF
17985 rm -f conftest$ac_exeext
17986 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17987   (eval $ac_link) 2>&5
17988   ac_status=$?
17989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17990   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17992   (eval $ac_try) 2>&5
17993   ac_status=$?
17994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17995   (exit $ac_status); }; }; then
17996   pgac_cv_type_long_int_64=yes
17997 else
17998   echo "$as_me: program exited with status $ac_status" >&5
17999 echo "$as_me: failed program was:" >&5
18000 sed 's/^/| /' conftest.$ac_ext >&5
18001
18002 ( exit $ac_status )
18003 pgac_cv_type_long_int_64=no
18004 fi
18005 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18006 fi
18007 fi
18008 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
18009 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
18010
18011 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
18012 if test x"$pgac_cv_type_long_int_64" = xyes ; then
18013
18014 cat >>confdefs.h <<\_ACEOF
18015 #define HAVE_LONG_INT_64
18016 _ACEOF
18017
18018 fi
18019
18020
18021 if test x"$HAVE_LONG_INT_64" = x"no" ; then
18022   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
18023 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
18024 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
18025   echo $ECHO_N "(cached) $ECHO_C" >&6
18026 else
18027   if test "$cross_compiling" = yes; then
18028   # If cross-compiling, check the size reported by the compiler and
18029 # trust that the arithmetic works.
18030 cat >conftest.$ac_ext <<_ACEOF
18031 /* confdefs.h.  */
18032 _ACEOF
18033 cat confdefs.h >>conftest.$ac_ext
18034 cat >>conftest.$ac_ext <<_ACEOF
18035 /* end confdefs.h.  */
18036
18037 int
18038 main ()
18039 {
18040 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
18041 test_array [0] = 0
18042
18043   ;
18044   return 0;
18045 }
18046 _ACEOF
18047 rm -f conftest.$ac_objext
18048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18049   (eval $ac_compile) 2>conftest.er1
18050   ac_status=$?
18051   grep -v '^ *+' conftest.er1 >conftest.err
18052   rm -f conftest.er1
18053   cat conftest.err >&5
18054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18055   (exit $ac_status); } &&
18056          { ac_try='test -z "$ac_c_werror_flag"
18057                          || test ! -s conftest.err'
18058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18059   (eval $ac_try) 2>&5
18060   ac_status=$?
18061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18062   (exit $ac_status); }; } &&
18063          { ac_try='test -s conftest.$ac_objext'
18064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18065   (eval $ac_try) 2>&5
18066   ac_status=$?
18067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068   (exit $ac_status); }; }; then
18069   pgac_cv_type_long_long_int_64=yes
18070 else
18071   echo "$as_me: failed program was:" >&5
18072 sed 's/^/| /' conftest.$ac_ext >&5
18073
18074 pgac_cv_type_long_long_int_64=no
18075 fi
18076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18077 else
18078   cat >conftest.$ac_ext <<_ACEOF
18079 /* confdefs.h.  */
18080 _ACEOF
18081 cat confdefs.h >>conftest.$ac_ext
18082 cat >>conftest.$ac_ext <<_ACEOF
18083 /* end confdefs.h.  */
18084 typedef long long int ac_int64;
18085
18086 /*
18087  * These are globals to discourage the compiler from folding all the
18088  * arithmetic tests down to compile-time constants.
18089  */
18090 ac_int64 a = 20000001;
18091 ac_int64 b = 40000005;
18092
18093 int does_int64_work()
18094 {
18095   ac_int64 c,d;
18096
18097   if (sizeof(ac_int64) != 8)
18098     return 0;                   /* definitely not the right size */
18099
18100   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
18101   c = a * b;
18102   d = (c + b) / b;
18103   if (d != a+1)
18104     return 0;
18105   return 1;
18106 }
18107 main() {
18108   exit(! does_int64_work());
18109 }
18110 _ACEOF
18111 rm -f conftest$ac_exeext
18112 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18113   (eval $ac_link) 2>&5
18114   ac_status=$?
18115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18116   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18118   (eval $ac_try) 2>&5
18119   ac_status=$?
18120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18121   (exit $ac_status); }; }; then
18122   pgac_cv_type_long_long_int_64=yes
18123 else
18124   echo "$as_me: program exited with status $ac_status" >&5
18125 echo "$as_me: failed program was:" >&5
18126 sed 's/^/| /' conftest.$ac_ext >&5
18127
18128 ( exit $ac_status )
18129 pgac_cv_type_long_long_int_64=no
18130 fi
18131 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18132 fi
18133 fi
18134 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
18135 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
18136
18137 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
18138 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
18139
18140 cat >>confdefs.h <<\_ACEOF
18141 #define HAVE_LONG_LONG_INT_64
18142 _ACEOF
18143
18144 fi
18145
18146 fi
18147
18148
18149
18150 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
18151   cat >conftest.$ac_ext <<_ACEOF
18152 /* confdefs.h.  */
18153 _ACEOF
18154 cat confdefs.h >>conftest.$ac_ext
18155 cat >>conftest.$ac_ext <<_ACEOF
18156 /* end confdefs.h.  */
18157
18158 #define INT64CONST(x)  x##LL
18159 long long int foo = INT64CONST(0x1234567890123456);
18160
18161 int
18162 main ()
18163 {
18164
18165   ;
18166   return 0;
18167 }
18168 _ACEOF
18169 rm -f conftest.$ac_objext
18170 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18171   (eval $ac_compile) 2>conftest.er1
18172   ac_status=$?
18173   grep -v '^ *+' conftest.er1 >conftest.err
18174   rm -f conftest.er1
18175   cat conftest.err >&5
18176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18177   (exit $ac_status); } &&
18178          { ac_try='test -z "$ac_c_werror_flag"
18179                          || test ! -s conftest.err'
18180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18181   (eval $ac_try) 2>&5
18182   ac_status=$?
18183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18184   (exit $ac_status); }; } &&
18185          { ac_try='test -s conftest.$ac_objext'
18186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18187   (eval $ac_try) 2>&5
18188   ac_status=$?
18189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18190   (exit $ac_status); }; }; then
18191
18192 cat >>confdefs.h <<\_ACEOF
18193 #define HAVE_LL_CONSTANTS 1
18194 _ACEOF
18195
18196 else
18197   echo "$as_me: failed program was:" >&5
18198 sed 's/^/| /' conftest.$ac_ext >&5
18199
18200 fi
18201 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18202 fi
18203
18204
18205 # If we found "long int" is 64 bits, assume snprintf handles it.  If
18206 # we found we need to use "long long int", better check.  We cope with
18207 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
18208 # work, fall back to our own snprintf emulation (which we know uses %lld).
18209
18210 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
18211   if test $pgac_need_repl_snprintf = no; then
18212     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
18213 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
18214 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
18215   echo $ECHO_N "(cached) $ECHO_C" >&6
18216 else
18217   for pgac_format in '%lld' '%qd' '%I64d'; do
18218 if test "$cross_compiling" = yes; then
18219   pgac_cv_snprintf_long_long_int_format=cross; break
18220 else
18221   cat >conftest.$ac_ext <<_ACEOF
18222 /* confdefs.h.  */
18223 _ACEOF
18224 cat confdefs.h >>conftest.$ac_ext
18225 cat >>conftest.$ac_ext <<_ACEOF
18226 /* end confdefs.h.  */
18227 #include <stdio.h>
18228 typedef long long int ac_int64;
18229 #define INT64_FORMAT "$pgac_format"
18230
18231 ac_int64 a = 20000001;
18232 ac_int64 b = 40000005;
18233
18234 int does_int64_snprintf_work()
18235 {
18236   ac_int64 c;
18237   char buf[100];
18238
18239   if (sizeof(ac_int64) != 8)
18240     return 0;                   /* doesn't look like the right size */
18241
18242   c = a * b;
18243   snprintf(buf, 100, INT64_FORMAT, c);
18244   if (strcmp(buf, "800000140000005") != 0)
18245     return 0;                   /* either multiply or snprintf is busted */
18246   return 1;
18247 }
18248 main() {
18249   exit(! does_int64_snprintf_work());
18250 }
18251 _ACEOF
18252 rm -f conftest$ac_exeext
18253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18254   (eval $ac_link) 2>&5
18255   ac_status=$?
18256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18257   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18259   (eval $ac_try) 2>&5
18260   ac_status=$?
18261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18262   (exit $ac_status); }; }; then
18263   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
18264 else
18265   echo "$as_me: program exited with status $ac_status" >&5
18266 echo "$as_me: failed program was:" >&5
18267 sed 's/^/| /' conftest.$ac_ext >&5
18268
18269 fi
18270 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18271 fi
18272 done
18273 fi
18274
18275 LONG_LONG_INT_FORMAT=''
18276
18277 case $pgac_cv_snprintf_long_long_int_format in
18278   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
18279 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
18280   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
18281 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
18282          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
18283   *)     echo "$as_me:$LINENO: result: none" >&5
18284 echo "${ECHO_T}none" >&6;;
18285 esac
18286     if test "$LONG_LONG_INT_FORMAT" = ""; then
18287       # Force usage of our own snprintf, since system snprintf is broken
18288       pgac_need_repl_snprintf=yes
18289       LONG_LONG_INT_FORMAT='%lld'
18290     fi
18291   else
18292     # Here if we previously decided we needed to use our own snprintf
18293     LONG_LONG_INT_FORMAT='%lld'
18294   fi
18295   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
18296   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
18297   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
18298 else
18299   # Here if we are not using 'long long int' at all
18300   INT64_FORMAT='"%ld"'
18301   UINT64_FORMAT='"%lu"'
18302 fi
18303
18304
18305 cat >>confdefs.h <<_ACEOF
18306 #define INT64_FORMAT $INT64_FORMAT
18307 _ACEOF
18308
18309
18310
18311 cat >>confdefs.h <<_ACEOF
18312 #define UINT64_FORMAT $UINT64_FORMAT
18313 _ACEOF
18314
18315
18316 # Now we have checked all the reasons to replace snprintf
18317 if test $pgac_need_repl_snprintf = yes; then
18318
18319 cat >>confdefs.h <<\_ACEOF
18320 #define USE_REPL_SNPRINTF 1
18321 _ACEOF
18322
18323   case $LIBOBJS in
18324     "snprintf.$ac_objext"   | \
18325   *" snprintf.$ac_objext"   | \
18326     "snprintf.$ac_objext "* | \
18327   *" snprintf.$ac_objext "* ) ;;
18328   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
18329 esac
18330
18331 fi
18332
18333 # Need a #define for the size of Datum (unsigned long)
18334 echo "$as_me:$LINENO: checking for unsigned long" >&5
18335 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
18336 if test "${ac_cv_type_unsigned_long+set}" = set; then
18337   echo $ECHO_N "(cached) $ECHO_C" >&6
18338 else
18339   cat >conftest.$ac_ext <<_ACEOF
18340 /* confdefs.h.  */
18341 _ACEOF
18342 cat confdefs.h >>conftest.$ac_ext
18343 cat >>conftest.$ac_ext <<_ACEOF
18344 /* end confdefs.h.  */
18345 $ac_includes_default
18346 int
18347 main ()
18348 {
18349 if ((unsigned long *) 0)
18350   return 0;
18351 if (sizeof (unsigned long))
18352   return 0;
18353   ;
18354   return 0;
18355 }
18356 _ACEOF
18357 rm -f conftest.$ac_objext
18358 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18359   (eval $ac_compile) 2>conftest.er1
18360   ac_status=$?
18361   grep -v '^ *+' conftest.er1 >conftest.err
18362   rm -f conftest.er1
18363   cat conftest.err >&5
18364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18365   (exit $ac_status); } &&
18366          { ac_try='test -z "$ac_c_werror_flag"
18367                          || test ! -s conftest.err'
18368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18369   (eval $ac_try) 2>&5
18370   ac_status=$?
18371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18372   (exit $ac_status); }; } &&
18373          { ac_try='test -s conftest.$ac_objext'
18374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18375   (eval $ac_try) 2>&5
18376   ac_status=$?
18377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18378   (exit $ac_status); }; }; then
18379   ac_cv_type_unsigned_long=yes
18380 else
18381   echo "$as_me: failed program was:" >&5
18382 sed 's/^/| /' conftest.$ac_ext >&5
18383
18384 ac_cv_type_unsigned_long=no
18385 fi
18386 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18387 fi
18388 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
18389 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
18390
18391 echo "$as_me:$LINENO: checking size of unsigned long" >&5
18392 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
18393 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
18394   echo $ECHO_N "(cached) $ECHO_C" >&6
18395 else
18396   if test "$ac_cv_type_unsigned_long" = yes; then
18397   # The cast to unsigned long works around a bug in the HP C Compiler
18398   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18399   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18400   # This bug is HP SR number 8606223364.
18401   if test "$cross_compiling" = yes; then
18402   # Depending upon the size, compute the lo and hi bounds.
18403 cat >conftest.$ac_ext <<_ACEOF
18404 /* confdefs.h.  */
18405 _ACEOF
18406 cat confdefs.h >>conftest.$ac_ext
18407 cat >>conftest.$ac_ext <<_ACEOF
18408 /* end confdefs.h.  */
18409 $ac_includes_default
18410 int
18411 main ()
18412 {
18413 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
18414 test_array [0] = 0
18415
18416   ;
18417   return 0;
18418 }
18419 _ACEOF
18420 rm -f conftest.$ac_objext
18421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18422   (eval $ac_compile) 2>conftest.er1
18423   ac_status=$?
18424   grep -v '^ *+' conftest.er1 >conftest.err
18425   rm -f conftest.er1
18426   cat conftest.err >&5
18427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18428   (exit $ac_status); } &&
18429          { ac_try='test -z "$ac_c_werror_flag"
18430                          || test ! -s conftest.err'
18431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18432   (eval $ac_try) 2>&5
18433   ac_status=$?
18434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18435   (exit $ac_status); }; } &&
18436          { ac_try='test -s conftest.$ac_objext'
18437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18438   (eval $ac_try) 2>&5
18439   ac_status=$?
18440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18441   (exit $ac_status); }; }; then
18442   ac_lo=0 ac_mid=0
18443   while :; do
18444     cat >conftest.$ac_ext <<_ACEOF
18445 /* confdefs.h.  */
18446 _ACEOF
18447 cat confdefs.h >>conftest.$ac_ext
18448 cat >>conftest.$ac_ext <<_ACEOF
18449 /* end confdefs.h.  */
18450 $ac_includes_default
18451 int
18452 main ()
18453 {
18454 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18455 test_array [0] = 0
18456
18457   ;
18458   return 0;
18459 }
18460 _ACEOF
18461 rm -f conftest.$ac_objext
18462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18463   (eval $ac_compile) 2>conftest.er1
18464   ac_status=$?
18465   grep -v '^ *+' conftest.er1 >conftest.err
18466   rm -f conftest.er1
18467   cat conftest.err >&5
18468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18469   (exit $ac_status); } &&
18470          { ac_try='test -z "$ac_c_werror_flag"
18471                          || test ! -s conftest.err'
18472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18473   (eval $ac_try) 2>&5
18474   ac_status=$?
18475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18476   (exit $ac_status); }; } &&
18477          { ac_try='test -s conftest.$ac_objext'
18478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18479   (eval $ac_try) 2>&5
18480   ac_status=$?
18481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18482   (exit $ac_status); }; }; then
18483   ac_hi=$ac_mid; break
18484 else
18485   echo "$as_me: failed program was:" >&5
18486 sed 's/^/| /' conftest.$ac_ext >&5
18487
18488 ac_lo=`expr $ac_mid + 1`
18489                     if test $ac_lo -le $ac_mid; then
18490                       ac_lo= ac_hi=
18491                       break
18492                     fi
18493                     ac_mid=`expr 2 '*' $ac_mid + 1`
18494 fi
18495 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18496   done
18497 else
18498   echo "$as_me: failed program was:" >&5
18499 sed 's/^/| /' conftest.$ac_ext >&5
18500
18501 cat >conftest.$ac_ext <<_ACEOF
18502 /* confdefs.h.  */
18503 _ACEOF
18504 cat confdefs.h >>conftest.$ac_ext
18505 cat >>conftest.$ac_ext <<_ACEOF
18506 /* end confdefs.h.  */
18507 $ac_includes_default
18508 int
18509 main ()
18510 {
18511 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
18512 test_array [0] = 0
18513
18514   ;
18515   return 0;
18516 }
18517 _ACEOF
18518 rm -f conftest.$ac_objext
18519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18520   (eval $ac_compile) 2>conftest.er1
18521   ac_status=$?
18522   grep -v '^ *+' conftest.er1 >conftest.err
18523   rm -f conftest.er1
18524   cat conftest.err >&5
18525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18526   (exit $ac_status); } &&
18527          { ac_try='test -z "$ac_c_werror_flag"
18528                          || test ! -s conftest.err'
18529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18530   (eval $ac_try) 2>&5
18531   ac_status=$?
18532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18533   (exit $ac_status); }; } &&
18534          { ac_try='test -s conftest.$ac_objext'
18535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18536   (eval $ac_try) 2>&5
18537   ac_status=$?
18538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18539   (exit $ac_status); }; }; then
18540   ac_hi=-1 ac_mid=-1
18541   while :; do
18542     cat >conftest.$ac_ext <<_ACEOF
18543 /* confdefs.h.  */
18544 _ACEOF
18545 cat confdefs.h >>conftest.$ac_ext
18546 cat >>conftest.$ac_ext <<_ACEOF
18547 /* end confdefs.h.  */
18548 $ac_includes_default
18549 int
18550 main ()
18551 {
18552 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18553 test_array [0] = 0
18554
18555   ;
18556   return 0;
18557 }
18558 _ACEOF
18559 rm -f conftest.$ac_objext
18560 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18561   (eval $ac_compile) 2>conftest.er1
18562   ac_status=$?
18563   grep -v '^ *+' conftest.er1 >conftest.err
18564   rm -f conftest.er1
18565   cat conftest.err >&5
18566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18567   (exit $ac_status); } &&
18568          { ac_try='test -z "$ac_c_werror_flag"
18569                          || test ! -s conftest.err'
18570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18571   (eval $ac_try) 2>&5
18572   ac_status=$?
18573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18574   (exit $ac_status); }; } &&
18575          { ac_try='test -s conftest.$ac_objext'
18576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18577   (eval $ac_try) 2>&5
18578   ac_status=$?
18579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18580   (exit $ac_status); }; }; then
18581   ac_lo=$ac_mid; break
18582 else
18583   echo "$as_me: failed program was:" >&5
18584 sed 's/^/| /' conftest.$ac_ext >&5
18585
18586 ac_hi=`expr '(' $ac_mid ')' - 1`
18587                        if test $ac_mid -le $ac_hi; then
18588                          ac_lo= ac_hi=
18589                          break
18590                        fi
18591                        ac_mid=`expr 2 '*' $ac_mid`
18592 fi
18593 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18594   done
18595 else
18596   echo "$as_me: failed program was:" >&5
18597 sed 's/^/| /' conftest.$ac_ext >&5
18598
18599 ac_lo= ac_hi=
18600 fi
18601 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18602 fi
18603 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18604 # Binary search between lo and hi bounds.
18605 while test "x$ac_lo" != "x$ac_hi"; do
18606   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18607   cat >conftest.$ac_ext <<_ACEOF
18608 /* confdefs.h.  */
18609 _ACEOF
18610 cat confdefs.h >>conftest.$ac_ext
18611 cat >>conftest.$ac_ext <<_ACEOF
18612 /* end confdefs.h.  */
18613 $ac_includes_default
18614 int
18615 main ()
18616 {
18617 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18618 test_array [0] = 0
18619
18620   ;
18621   return 0;
18622 }
18623 _ACEOF
18624 rm -f conftest.$ac_objext
18625 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18626   (eval $ac_compile) 2>conftest.er1
18627   ac_status=$?
18628   grep -v '^ *+' conftest.er1 >conftest.err
18629   rm -f conftest.er1
18630   cat conftest.err >&5
18631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18632   (exit $ac_status); } &&
18633          { ac_try='test -z "$ac_c_werror_flag"
18634                          || test ! -s conftest.err'
18635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18636   (eval $ac_try) 2>&5
18637   ac_status=$?
18638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18639   (exit $ac_status); }; } &&
18640          { ac_try='test -s conftest.$ac_objext'
18641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18642   (eval $ac_try) 2>&5
18643   ac_status=$?
18644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18645   (exit $ac_status); }; }; then
18646   ac_hi=$ac_mid
18647 else
18648   echo "$as_me: failed program was:" >&5
18649 sed 's/^/| /' conftest.$ac_ext >&5
18650
18651 ac_lo=`expr '(' $ac_mid ')' + 1`
18652 fi
18653 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18654 done
18655 case $ac_lo in
18656 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18657 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18658 See \`config.log' for more details." >&5
18659 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18660 See \`config.log' for more details." >&2;}
18661    { (exit 1); exit 1; }; } ;;
18662 esac
18663 else
18664   if test "$cross_compiling" = yes; then
18665   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18666 See \`config.log' for more details." >&5
18667 echo "$as_me: error: cannot run test program while cross compiling
18668 See \`config.log' for more details." >&2;}
18669    { (exit 1); exit 1; }; }
18670 else
18671   cat >conftest.$ac_ext <<_ACEOF
18672 /* confdefs.h.  */
18673 _ACEOF
18674 cat confdefs.h >>conftest.$ac_ext
18675 cat >>conftest.$ac_ext <<_ACEOF
18676 /* end confdefs.h.  */
18677 $ac_includes_default
18678 long longval () { return (long) (sizeof (unsigned long)); }
18679 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18680 #include <stdio.h>
18681 #include <stdlib.h>
18682 int
18683 main ()
18684 {
18685
18686   FILE *f = fopen ("conftest.val", "w");
18687   if (! f)
18688     exit (1);
18689   if (((long) (sizeof (unsigned long))) < 0)
18690     {
18691       long i = longval ();
18692       if (i != ((long) (sizeof (unsigned long))))
18693         exit (1);
18694       fprintf (f, "%ld\n", i);
18695     }
18696   else
18697     {
18698       unsigned long i = ulongval ();
18699       if (i != ((long) (sizeof (unsigned long))))
18700         exit (1);
18701       fprintf (f, "%lu\n", i);
18702     }
18703   exit (ferror (f) || fclose (f) != 0);
18704
18705   ;
18706   return 0;
18707 }
18708 _ACEOF
18709 rm -f conftest$ac_exeext
18710 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18711   (eval $ac_link) 2>&5
18712   ac_status=$?
18713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18714   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18716   (eval $ac_try) 2>&5
18717   ac_status=$?
18718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18719   (exit $ac_status); }; }; then
18720   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18721 else
18722   echo "$as_me: program exited with status $ac_status" >&5
18723 echo "$as_me: failed program was:" >&5
18724 sed 's/^/| /' conftest.$ac_ext >&5
18725
18726 ( exit $ac_status )
18727 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18728 See \`config.log' for more details." >&5
18729 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18730 See \`config.log' for more details." >&2;}
18731    { (exit 1); exit 1; }; }
18732 fi
18733 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18734 fi
18735 fi
18736 rm -f conftest.val
18737 else
18738   ac_cv_sizeof_unsigned_long=0
18739 fi
18740 fi
18741 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18742 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18743 cat >>confdefs.h <<_ACEOF
18744 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18745 _ACEOF
18746
18747
18748
18749 # And one for the size of size_t (enables tweaks for > 32bit address space)
18750 echo "$as_me:$LINENO: checking for size_t" >&5
18751 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18752 if test "${ac_cv_type_size_t+set}" = set; then
18753   echo $ECHO_N "(cached) $ECHO_C" >&6
18754 else
18755   cat >conftest.$ac_ext <<_ACEOF
18756 /* confdefs.h.  */
18757 _ACEOF
18758 cat confdefs.h >>conftest.$ac_ext
18759 cat >>conftest.$ac_ext <<_ACEOF
18760 /* end confdefs.h.  */
18761 $ac_includes_default
18762 int
18763 main ()
18764 {
18765 if ((size_t *) 0)
18766   return 0;
18767 if (sizeof (size_t))
18768   return 0;
18769   ;
18770   return 0;
18771 }
18772 _ACEOF
18773 rm -f conftest.$ac_objext
18774 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18775   (eval $ac_compile) 2>conftest.er1
18776   ac_status=$?
18777   grep -v '^ *+' conftest.er1 >conftest.err
18778   rm -f conftest.er1
18779   cat conftest.err >&5
18780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18781   (exit $ac_status); } &&
18782          { ac_try='test -z "$ac_c_werror_flag"
18783                          || test ! -s conftest.err'
18784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18785   (eval $ac_try) 2>&5
18786   ac_status=$?
18787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18788   (exit $ac_status); }; } &&
18789          { ac_try='test -s conftest.$ac_objext'
18790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18791   (eval $ac_try) 2>&5
18792   ac_status=$?
18793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18794   (exit $ac_status); }; }; then
18795   ac_cv_type_size_t=yes
18796 else
18797   echo "$as_me: failed program was:" >&5
18798 sed 's/^/| /' conftest.$ac_ext >&5
18799
18800 ac_cv_type_size_t=no
18801 fi
18802 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18803 fi
18804 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18805 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18806
18807 echo "$as_me:$LINENO: checking size of size_t" >&5
18808 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18809 if test "${ac_cv_sizeof_size_t+set}" = set; then
18810   echo $ECHO_N "(cached) $ECHO_C" >&6
18811 else
18812   if test "$ac_cv_type_size_t" = yes; then
18813   # The cast to unsigned long works around a bug in the HP C Compiler
18814   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18815   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18816   # This bug is HP SR number 8606223364.
18817   if test "$cross_compiling" = yes; then
18818   # Depending upon the size, compute the lo and hi bounds.
18819 cat >conftest.$ac_ext <<_ACEOF
18820 /* confdefs.h.  */
18821 _ACEOF
18822 cat confdefs.h >>conftest.$ac_ext
18823 cat >>conftest.$ac_ext <<_ACEOF
18824 /* end confdefs.h.  */
18825 $ac_includes_default
18826 int
18827 main ()
18828 {
18829 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18830 test_array [0] = 0
18831
18832   ;
18833   return 0;
18834 }
18835 _ACEOF
18836 rm -f conftest.$ac_objext
18837 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18838   (eval $ac_compile) 2>conftest.er1
18839   ac_status=$?
18840   grep -v '^ *+' conftest.er1 >conftest.err
18841   rm -f conftest.er1
18842   cat conftest.err >&5
18843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18844   (exit $ac_status); } &&
18845          { ac_try='test -z "$ac_c_werror_flag"
18846                          || test ! -s conftest.err'
18847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18848   (eval $ac_try) 2>&5
18849   ac_status=$?
18850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18851   (exit $ac_status); }; } &&
18852          { ac_try='test -s conftest.$ac_objext'
18853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18854   (eval $ac_try) 2>&5
18855   ac_status=$?
18856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18857   (exit $ac_status); }; }; then
18858   ac_lo=0 ac_mid=0
18859   while :; do
18860     cat >conftest.$ac_ext <<_ACEOF
18861 /* confdefs.h.  */
18862 _ACEOF
18863 cat confdefs.h >>conftest.$ac_ext
18864 cat >>conftest.$ac_ext <<_ACEOF
18865 /* end confdefs.h.  */
18866 $ac_includes_default
18867 int
18868 main ()
18869 {
18870 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18871 test_array [0] = 0
18872
18873   ;
18874   return 0;
18875 }
18876 _ACEOF
18877 rm -f conftest.$ac_objext
18878 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18879   (eval $ac_compile) 2>conftest.er1
18880   ac_status=$?
18881   grep -v '^ *+' conftest.er1 >conftest.err
18882   rm -f conftest.er1
18883   cat conftest.err >&5
18884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18885   (exit $ac_status); } &&
18886          { ac_try='test -z "$ac_c_werror_flag"
18887                          || test ! -s conftest.err'
18888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18889   (eval $ac_try) 2>&5
18890   ac_status=$?
18891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18892   (exit $ac_status); }; } &&
18893          { ac_try='test -s conftest.$ac_objext'
18894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18895   (eval $ac_try) 2>&5
18896   ac_status=$?
18897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18898   (exit $ac_status); }; }; then
18899   ac_hi=$ac_mid; break
18900 else
18901   echo "$as_me: failed program was:" >&5
18902 sed 's/^/| /' conftest.$ac_ext >&5
18903
18904 ac_lo=`expr $ac_mid + 1`
18905                     if test $ac_lo -le $ac_mid; then
18906                       ac_lo= ac_hi=
18907                       break
18908                     fi
18909                     ac_mid=`expr 2 '*' $ac_mid + 1`
18910 fi
18911 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18912   done
18913 else
18914   echo "$as_me: failed program was:" >&5
18915 sed 's/^/| /' conftest.$ac_ext >&5
18916
18917 cat >conftest.$ac_ext <<_ACEOF
18918 /* confdefs.h.  */
18919 _ACEOF
18920 cat confdefs.h >>conftest.$ac_ext
18921 cat >>conftest.$ac_ext <<_ACEOF
18922 /* end confdefs.h.  */
18923 $ac_includes_default
18924 int
18925 main ()
18926 {
18927 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18928 test_array [0] = 0
18929
18930   ;
18931   return 0;
18932 }
18933 _ACEOF
18934 rm -f conftest.$ac_objext
18935 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18936   (eval $ac_compile) 2>conftest.er1
18937   ac_status=$?
18938   grep -v '^ *+' conftest.er1 >conftest.err
18939   rm -f conftest.er1
18940   cat conftest.err >&5
18941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18942   (exit $ac_status); } &&
18943          { ac_try='test -z "$ac_c_werror_flag"
18944                          || test ! -s conftest.err'
18945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18946   (eval $ac_try) 2>&5
18947   ac_status=$?
18948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18949   (exit $ac_status); }; } &&
18950          { ac_try='test -s conftest.$ac_objext'
18951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18952   (eval $ac_try) 2>&5
18953   ac_status=$?
18954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18955   (exit $ac_status); }; }; then
18956   ac_hi=-1 ac_mid=-1
18957   while :; do
18958     cat >conftest.$ac_ext <<_ACEOF
18959 /* confdefs.h.  */
18960 _ACEOF
18961 cat confdefs.h >>conftest.$ac_ext
18962 cat >>conftest.$ac_ext <<_ACEOF
18963 /* end confdefs.h.  */
18964 $ac_includes_default
18965 int
18966 main ()
18967 {
18968 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18969 test_array [0] = 0
18970
18971   ;
18972   return 0;
18973 }
18974 _ACEOF
18975 rm -f conftest.$ac_objext
18976 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18977   (eval $ac_compile) 2>conftest.er1
18978   ac_status=$?
18979   grep -v '^ *+' conftest.er1 >conftest.err
18980   rm -f conftest.er1
18981   cat conftest.err >&5
18982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18983   (exit $ac_status); } &&
18984          { ac_try='test -z "$ac_c_werror_flag"
18985                          || test ! -s conftest.err'
18986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18987   (eval $ac_try) 2>&5
18988   ac_status=$?
18989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18990   (exit $ac_status); }; } &&
18991          { ac_try='test -s conftest.$ac_objext'
18992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18993   (eval $ac_try) 2>&5
18994   ac_status=$?
18995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18996   (exit $ac_status); }; }; then
18997   ac_lo=$ac_mid; break
18998 else
18999   echo "$as_me: failed program was:" >&5
19000 sed 's/^/| /' conftest.$ac_ext >&5
19001
19002 ac_hi=`expr '(' $ac_mid ')' - 1`
19003                        if test $ac_mid -le $ac_hi; then
19004                          ac_lo= ac_hi=
19005                          break
19006                        fi
19007                        ac_mid=`expr 2 '*' $ac_mid`
19008 fi
19009 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19010   done
19011 else
19012   echo "$as_me: failed program was:" >&5
19013 sed 's/^/| /' conftest.$ac_ext >&5
19014
19015 ac_lo= ac_hi=
19016 fi
19017 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19018 fi
19019 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19020 # Binary search between lo and hi bounds.
19021 while test "x$ac_lo" != "x$ac_hi"; do
19022   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19023   cat >conftest.$ac_ext <<_ACEOF
19024 /* confdefs.h.  */
19025 _ACEOF
19026 cat confdefs.h >>conftest.$ac_ext
19027 cat >>conftest.$ac_ext <<_ACEOF
19028 /* end confdefs.h.  */
19029 $ac_includes_default
19030 int
19031 main ()
19032 {
19033 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
19034 test_array [0] = 0
19035
19036   ;
19037   return 0;
19038 }
19039 _ACEOF
19040 rm -f conftest.$ac_objext
19041 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19042   (eval $ac_compile) 2>conftest.er1
19043   ac_status=$?
19044   grep -v '^ *+' conftest.er1 >conftest.err
19045   rm -f conftest.er1
19046   cat conftest.err >&5
19047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19048   (exit $ac_status); } &&
19049          { ac_try='test -z "$ac_c_werror_flag"
19050                          || test ! -s conftest.err'
19051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19052   (eval $ac_try) 2>&5
19053   ac_status=$?
19054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19055   (exit $ac_status); }; } &&
19056          { ac_try='test -s conftest.$ac_objext'
19057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19058   (eval $ac_try) 2>&5
19059   ac_status=$?
19060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19061   (exit $ac_status); }; }; then
19062   ac_hi=$ac_mid
19063 else
19064   echo "$as_me: failed program was:" >&5
19065 sed 's/^/| /' conftest.$ac_ext >&5
19066
19067 ac_lo=`expr '(' $ac_mid ')' + 1`
19068 fi
19069 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19070 done
19071 case $ac_lo in
19072 ?*) ac_cv_sizeof_size_t=$ac_lo;;
19073 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
19074 See \`config.log' for more details." >&5
19075 echo "$as_me: error: cannot compute sizeof (size_t), 77
19076 See \`config.log' for more details." >&2;}
19077    { (exit 1); exit 1; }; } ;;
19078 esac
19079 else
19080   if test "$cross_compiling" = yes; then
19081   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19082 See \`config.log' for more details." >&5
19083 echo "$as_me: error: cannot run test program while cross compiling
19084 See \`config.log' for more details." >&2;}
19085    { (exit 1); exit 1; }; }
19086 else
19087   cat >conftest.$ac_ext <<_ACEOF
19088 /* confdefs.h.  */
19089 _ACEOF
19090 cat confdefs.h >>conftest.$ac_ext
19091 cat >>conftest.$ac_ext <<_ACEOF
19092 /* end confdefs.h.  */
19093 $ac_includes_default
19094 long longval () { return (long) (sizeof (size_t)); }
19095 unsigned long ulongval () { return (long) (sizeof (size_t)); }
19096 #include <stdio.h>
19097 #include <stdlib.h>
19098 int
19099 main ()
19100 {
19101
19102   FILE *f = fopen ("conftest.val", "w");
19103   if (! f)
19104     exit (1);
19105   if (((long) (sizeof (size_t))) < 0)
19106     {
19107       long i = longval ();
19108       if (i != ((long) (sizeof (size_t))))
19109         exit (1);
19110       fprintf (f, "%ld\n", i);
19111     }
19112   else
19113     {
19114       unsigned long i = ulongval ();
19115       if (i != ((long) (sizeof (size_t))))
19116         exit (1);
19117       fprintf (f, "%lu\n", i);
19118     }
19119   exit (ferror (f) || fclose (f) != 0);
19120
19121   ;
19122   return 0;
19123 }
19124 _ACEOF
19125 rm -f conftest$ac_exeext
19126 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19127   (eval $ac_link) 2>&5
19128   ac_status=$?
19129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19130   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19132   (eval $ac_try) 2>&5
19133   ac_status=$?
19134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19135   (exit $ac_status); }; }; then
19136   ac_cv_sizeof_size_t=`cat conftest.val`
19137 else
19138   echo "$as_me: program exited with status $ac_status" >&5
19139 echo "$as_me: failed program was:" >&5
19140 sed 's/^/| /' conftest.$ac_ext >&5
19141
19142 ( exit $ac_status )
19143 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
19144 See \`config.log' for more details." >&5
19145 echo "$as_me: error: cannot compute sizeof (size_t), 77
19146 See \`config.log' for more details." >&2;}
19147    { (exit 1); exit 1; }; }
19148 fi
19149 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19150 fi
19151 fi
19152 rm -f conftest.val
19153 else
19154   ac_cv_sizeof_size_t=0
19155 fi
19156 fi
19157 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
19158 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
19159 cat >>confdefs.h <<_ACEOF
19160 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
19161 _ACEOF
19162
19163
19164
19165 # Determine memory alignment requirements for the basic C data types.
19166
19167 echo "$as_me:$LINENO: checking for short" >&5
19168 echo $ECHO_N "checking for short... $ECHO_C" >&6
19169 if test "${ac_cv_type_short+set}" = set; then
19170   echo $ECHO_N "(cached) $ECHO_C" >&6
19171 else
19172   cat >conftest.$ac_ext <<_ACEOF
19173 /* confdefs.h.  */
19174 _ACEOF
19175 cat confdefs.h >>conftest.$ac_ext
19176 cat >>conftest.$ac_ext <<_ACEOF
19177 /* end confdefs.h.  */
19178 $ac_includes_default
19179 int
19180 main ()
19181 {
19182 if ((short *) 0)
19183   return 0;
19184 if (sizeof (short))
19185   return 0;
19186   ;
19187   return 0;
19188 }
19189 _ACEOF
19190 rm -f conftest.$ac_objext
19191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19192   (eval $ac_compile) 2>conftest.er1
19193   ac_status=$?
19194   grep -v '^ *+' conftest.er1 >conftest.err
19195   rm -f conftest.er1
19196   cat conftest.err >&5
19197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19198   (exit $ac_status); } &&
19199          { ac_try='test -z "$ac_c_werror_flag"
19200                          || test ! -s conftest.err'
19201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19202   (eval $ac_try) 2>&5
19203   ac_status=$?
19204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19205   (exit $ac_status); }; } &&
19206          { ac_try='test -s conftest.$ac_objext'
19207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19208   (eval $ac_try) 2>&5
19209   ac_status=$?
19210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19211   (exit $ac_status); }; }; then
19212   ac_cv_type_short=yes
19213 else
19214   echo "$as_me: failed program was:" >&5
19215 sed 's/^/| /' conftest.$ac_ext >&5
19216
19217 ac_cv_type_short=no
19218 fi
19219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19220 fi
19221 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
19222 echo "${ECHO_T}$ac_cv_type_short" >&6
19223
19224 echo "$as_me:$LINENO: checking alignment of short" >&5
19225 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
19226 if test "${pgac_cv_alignof_short+set}" = set; then
19227   echo $ECHO_N "(cached) $ECHO_C" >&6
19228 else
19229   if test "$ac_cv_type_short" = yes; then
19230   if test "$cross_compiling" = yes; then
19231   # Depending upon the size, compute the lo and hi bounds.
19232 cat >conftest.$ac_ext <<_ACEOF
19233 /* confdefs.h.  */
19234 _ACEOF
19235 cat confdefs.h >>conftest.$ac_ext
19236 cat >>conftest.$ac_ext <<_ACEOF
19237 /* end confdefs.h.  */
19238 $ac_includes_default
19239 struct { char filler; short field; } pgac_struct;
19240 int
19241 main ()
19242 {
19243 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19244 test_array [0] = 0
19245
19246   ;
19247   return 0;
19248 }
19249 _ACEOF
19250 rm -f conftest.$ac_objext
19251 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19252   (eval $ac_compile) 2>conftest.er1
19253   ac_status=$?
19254   grep -v '^ *+' conftest.er1 >conftest.err
19255   rm -f conftest.er1
19256   cat conftest.err >&5
19257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19258   (exit $ac_status); } &&
19259          { ac_try='test -z "$ac_c_werror_flag"
19260                          || test ! -s conftest.err'
19261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19262   (eval $ac_try) 2>&5
19263   ac_status=$?
19264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19265   (exit $ac_status); }; } &&
19266          { ac_try='test -s conftest.$ac_objext'
19267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19268   (eval $ac_try) 2>&5
19269   ac_status=$?
19270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19271   (exit $ac_status); }; }; then
19272   ac_lo=0 ac_mid=0
19273   while :; do
19274     cat >conftest.$ac_ext <<_ACEOF
19275 /* confdefs.h.  */
19276 _ACEOF
19277 cat confdefs.h >>conftest.$ac_ext
19278 cat >>conftest.$ac_ext <<_ACEOF
19279 /* end confdefs.h.  */
19280 $ac_includes_default
19281 struct { char filler; short field; } pgac_struct;
19282 int
19283 main ()
19284 {
19285 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19286 test_array [0] = 0
19287
19288   ;
19289   return 0;
19290 }
19291 _ACEOF
19292 rm -f conftest.$ac_objext
19293 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19294   (eval $ac_compile) 2>conftest.er1
19295   ac_status=$?
19296   grep -v '^ *+' conftest.er1 >conftest.err
19297   rm -f conftest.er1
19298   cat conftest.err >&5
19299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19300   (exit $ac_status); } &&
19301          { ac_try='test -z "$ac_c_werror_flag"
19302                          || test ! -s conftest.err'
19303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19304   (eval $ac_try) 2>&5
19305   ac_status=$?
19306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19307   (exit $ac_status); }; } &&
19308          { ac_try='test -s conftest.$ac_objext'
19309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19310   (eval $ac_try) 2>&5
19311   ac_status=$?
19312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19313   (exit $ac_status); }; }; then
19314   ac_hi=$ac_mid; break
19315 else
19316   echo "$as_me: failed program was:" >&5
19317 sed 's/^/| /' conftest.$ac_ext >&5
19318
19319 ac_lo=`expr $ac_mid + 1`
19320                     if test $ac_lo -le $ac_mid; then
19321                       ac_lo= ac_hi=
19322                       break
19323                     fi
19324                     ac_mid=`expr 2 '*' $ac_mid + 1`
19325 fi
19326 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19327   done
19328 else
19329   echo "$as_me: failed program was:" >&5
19330 sed 's/^/| /' conftest.$ac_ext >&5
19331
19332 cat >conftest.$ac_ext <<_ACEOF
19333 /* confdefs.h.  */
19334 _ACEOF
19335 cat confdefs.h >>conftest.$ac_ext
19336 cat >>conftest.$ac_ext <<_ACEOF
19337 /* end confdefs.h.  */
19338 $ac_includes_default
19339 struct { char filler; short field; } pgac_struct;
19340 int
19341 main ()
19342 {
19343 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19344 test_array [0] = 0
19345
19346   ;
19347   return 0;
19348 }
19349 _ACEOF
19350 rm -f conftest.$ac_objext
19351 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19352   (eval $ac_compile) 2>conftest.er1
19353   ac_status=$?
19354   grep -v '^ *+' conftest.er1 >conftest.err
19355   rm -f conftest.er1
19356   cat conftest.err >&5
19357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19358   (exit $ac_status); } &&
19359          { ac_try='test -z "$ac_c_werror_flag"
19360                          || test ! -s conftest.err'
19361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19362   (eval $ac_try) 2>&5
19363   ac_status=$?
19364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19365   (exit $ac_status); }; } &&
19366          { ac_try='test -s conftest.$ac_objext'
19367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19368   (eval $ac_try) 2>&5
19369   ac_status=$?
19370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19371   (exit $ac_status); }; }; then
19372   ac_hi=-1 ac_mid=-1
19373   while :; do
19374     cat >conftest.$ac_ext <<_ACEOF
19375 /* confdefs.h.  */
19376 _ACEOF
19377 cat confdefs.h >>conftest.$ac_ext
19378 cat >>conftest.$ac_ext <<_ACEOF
19379 /* end confdefs.h.  */
19380 $ac_includes_default
19381 struct { char filler; short field; } pgac_struct;
19382 int
19383 main ()
19384 {
19385 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19386 test_array [0] = 0
19387
19388   ;
19389   return 0;
19390 }
19391 _ACEOF
19392 rm -f conftest.$ac_objext
19393 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19394   (eval $ac_compile) 2>conftest.er1
19395   ac_status=$?
19396   grep -v '^ *+' conftest.er1 >conftest.err
19397   rm -f conftest.er1
19398   cat conftest.err >&5
19399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19400   (exit $ac_status); } &&
19401          { ac_try='test -z "$ac_c_werror_flag"
19402                          || test ! -s conftest.err'
19403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19404   (eval $ac_try) 2>&5
19405   ac_status=$?
19406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19407   (exit $ac_status); }; } &&
19408          { ac_try='test -s conftest.$ac_objext'
19409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19410   (eval $ac_try) 2>&5
19411   ac_status=$?
19412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19413   (exit $ac_status); }; }; then
19414   ac_lo=$ac_mid; break
19415 else
19416   echo "$as_me: failed program was:" >&5
19417 sed 's/^/| /' conftest.$ac_ext >&5
19418
19419 ac_hi=`expr '(' $ac_mid ')' - 1`
19420                        if test $ac_mid -le $ac_hi; then
19421                          ac_lo= ac_hi=
19422                          break
19423                        fi
19424                        ac_mid=`expr 2 '*' $ac_mid`
19425 fi
19426 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19427   done
19428 else
19429   echo "$as_me: failed program was:" >&5
19430 sed 's/^/| /' conftest.$ac_ext >&5
19431
19432 ac_lo= ac_hi=
19433 fi
19434 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19435 fi
19436 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19437 # Binary search between lo and hi bounds.
19438 while test "x$ac_lo" != "x$ac_hi"; do
19439   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19440   cat >conftest.$ac_ext <<_ACEOF
19441 /* confdefs.h.  */
19442 _ACEOF
19443 cat confdefs.h >>conftest.$ac_ext
19444 cat >>conftest.$ac_ext <<_ACEOF
19445 /* end confdefs.h.  */
19446 $ac_includes_default
19447 struct { char filler; short field; } pgac_struct;
19448 int
19449 main ()
19450 {
19451 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19452 test_array [0] = 0
19453
19454   ;
19455   return 0;
19456 }
19457 _ACEOF
19458 rm -f conftest.$ac_objext
19459 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19460   (eval $ac_compile) 2>conftest.er1
19461   ac_status=$?
19462   grep -v '^ *+' conftest.er1 >conftest.err
19463   rm -f conftest.er1
19464   cat conftest.err >&5
19465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19466   (exit $ac_status); } &&
19467          { ac_try='test -z "$ac_c_werror_flag"
19468                          || test ! -s conftest.err'
19469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19470   (eval $ac_try) 2>&5
19471   ac_status=$?
19472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19473   (exit $ac_status); }; } &&
19474          { ac_try='test -s conftest.$ac_objext'
19475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19476   (eval $ac_try) 2>&5
19477   ac_status=$?
19478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19479   (exit $ac_status); }; }; then
19480   ac_hi=$ac_mid
19481 else
19482   echo "$as_me: failed program was:" >&5
19483 sed 's/^/| /' conftest.$ac_ext >&5
19484
19485 ac_lo=`expr '(' $ac_mid ')' + 1`
19486 fi
19487 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19488 done
19489 case $ac_lo in
19490 ?*) pgac_cv_alignof_short=$ac_lo;;
19491 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19492 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19493    { (exit 1); exit 1; }; } ;;
19494 esac
19495 else
19496   if test "$cross_compiling" = yes; then
19497   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19498 See \`config.log' for more details." >&5
19499 echo "$as_me: error: cannot run test program while cross compiling
19500 See \`config.log' for more details." >&2;}
19501    { (exit 1); exit 1; }; }
19502 else
19503   cat >conftest.$ac_ext <<_ACEOF
19504 /* confdefs.h.  */
19505 _ACEOF
19506 cat confdefs.h >>conftest.$ac_ext
19507 cat >>conftest.$ac_ext <<_ACEOF
19508 /* end confdefs.h.  */
19509 $ac_includes_default
19510 struct { char filler; short field; } pgac_struct;
19511 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19512 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19513 #include <stdio.h>
19514 #include <stdlib.h>
19515 int
19516 main ()
19517 {
19518
19519   FILE *f = fopen ("conftest.val", "w");
19520   if (! f)
19521     exit (1);
19522   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19523     {
19524       long i = longval ();
19525       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19526         exit (1);
19527       fprintf (f, "%ld\n", i);
19528     }
19529   else
19530     {
19531       unsigned long i = ulongval ();
19532       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19533         exit (1);
19534       fprintf (f, "%lu\n", i);
19535     }
19536   exit (ferror (f) || fclose (f) != 0);
19537
19538   ;
19539   return 0;
19540 }
19541 _ACEOF
19542 rm -f conftest$ac_exeext
19543 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19544   (eval $ac_link) 2>&5
19545   ac_status=$?
19546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19547   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19549   (eval $ac_try) 2>&5
19550   ac_status=$?
19551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19552   (exit $ac_status); }; }; then
19553   pgac_cv_alignof_short=`cat conftest.val`
19554 else
19555   echo "$as_me: program exited with status $ac_status" >&5
19556 echo "$as_me: failed program was:" >&5
19557 sed 's/^/| /' conftest.$ac_ext >&5
19558
19559 ( exit $ac_status )
19560 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19561 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19562    { (exit 1); exit 1; }; }
19563 fi
19564 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19565 fi
19566 fi
19567 rm -f conftest.val
19568 else
19569   pgac_cv_alignof_short=0
19570 fi
19571 fi
19572 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19573 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19574 cat >>confdefs.h <<_ACEOF
19575 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19576 _ACEOF
19577
19578
19579 echo "$as_me:$LINENO: checking for int" >&5
19580 echo $ECHO_N "checking for int... $ECHO_C" >&6
19581 if test "${ac_cv_type_int+set}" = set; then
19582   echo $ECHO_N "(cached) $ECHO_C" >&6
19583 else
19584   cat >conftest.$ac_ext <<_ACEOF
19585 /* confdefs.h.  */
19586 _ACEOF
19587 cat confdefs.h >>conftest.$ac_ext
19588 cat >>conftest.$ac_ext <<_ACEOF
19589 /* end confdefs.h.  */
19590 $ac_includes_default
19591 int
19592 main ()
19593 {
19594 if ((int *) 0)
19595   return 0;
19596 if (sizeof (int))
19597   return 0;
19598   ;
19599   return 0;
19600 }
19601 _ACEOF
19602 rm -f conftest.$ac_objext
19603 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19604   (eval $ac_compile) 2>conftest.er1
19605   ac_status=$?
19606   grep -v '^ *+' conftest.er1 >conftest.err
19607   rm -f conftest.er1
19608   cat conftest.err >&5
19609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19610   (exit $ac_status); } &&
19611          { ac_try='test -z "$ac_c_werror_flag"
19612                          || test ! -s conftest.err'
19613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19614   (eval $ac_try) 2>&5
19615   ac_status=$?
19616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19617   (exit $ac_status); }; } &&
19618          { ac_try='test -s conftest.$ac_objext'
19619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19620   (eval $ac_try) 2>&5
19621   ac_status=$?
19622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19623   (exit $ac_status); }; }; then
19624   ac_cv_type_int=yes
19625 else
19626   echo "$as_me: failed program was:" >&5
19627 sed 's/^/| /' conftest.$ac_ext >&5
19628
19629 ac_cv_type_int=no
19630 fi
19631 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19632 fi
19633 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19634 echo "${ECHO_T}$ac_cv_type_int" >&6
19635
19636 echo "$as_me:$LINENO: checking alignment of int" >&5
19637 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19638 if test "${pgac_cv_alignof_int+set}" = set; then
19639   echo $ECHO_N "(cached) $ECHO_C" >&6
19640 else
19641   if test "$ac_cv_type_int" = yes; then
19642   if test "$cross_compiling" = yes; then
19643   # Depending upon the size, compute the lo and hi bounds.
19644 cat >conftest.$ac_ext <<_ACEOF
19645 /* confdefs.h.  */
19646 _ACEOF
19647 cat confdefs.h >>conftest.$ac_ext
19648 cat >>conftest.$ac_ext <<_ACEOF
19649 /* end confdefs.h.  */
19650 $ac_includes_default
19651 struct { char filler; int field; } pgac_struct;
19652 int
19653 main ()
19654 {
19655 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19656 test_array [0] = 0
19657
19658   ;
19659   return 0;
19660 }
19661 _ACEOF
19662 rm -f conftest.$ac_objext
19663 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19664   (eval $ac_compile) 2>conftest.er1
19665   ac_status=$?
19666   grep -v '^ *+' conftest.er1 >conftest.err
19667   rm -f conftest.er1
19668   cat conftest.err >&5
19669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19670   (exit $ac_status); } &&
19671          { ac_try='test -z "$ac_c_werror_flag"
19672                          || test ! -s conftest.err'
19673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19674   (eval $ac_try) 2>&5
19675   ac_status=$?
19676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19677   (exit $ac_status); }; } &&
19678          { ac_try='test -s conftest.$ac_objext'
19679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19680   (eval $ac_try) 2>&5
19681   ac_status=$?
19682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19683   (exit $ac_status); }; }; then
19684   ac_lo=0 ac_mid=0
19685   while :; do
19686     cat >conftest.$ac_ext <<_ACEOF
19687 /* confdefs.h.  */
19688 _ACEOF
19689 cat confdefs.h >>conftest.$ac_ext
19690 cat >>conftest.$ac_ext <<_ACEOF
19691 /* end confdefs.h.  */
19692 $ac_includes_default
19693 struct { char filler; int field; } pgac_struct;
19694 int
19695 main ()
19696 {
19697 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19698 test_array [0] = 0
19699
19700   ;
19701   return 0;
19702 }
19703 _ACEOF
19704 rm -f conftest.$ac_objext
19705 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19706   (eval $ac_compile) 2>conftest.er1
19707   ac_status=$?
19708   grep -v '^ *+' conftest.er1 >conftest.err
19709   rm -f conftest.er1
19710   cat conftest.err >&5
19711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19712   (exit $ac_status); } &&
19713          { ac_try='test -z "$ac_c_werror_flag"
19714                          || test ! -s conftest.err'
19715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19716   (eval $ac_try) 2>&5
19717   ac_status=$?
19718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19719   (exit $ac_status); }; } &&
19720          { ac_try='test -s conftest.$ac_objext'
19721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19722   (eval $ac_try) 2>&5
19723   ac_status=$?
19724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19725   (exit $ac_status); }; }; then
19726   ac_hi=$ac_mid; break
19727 else
19728   echo "$as_me: failed program was:" >&5
19729 sed 's/^/| /' conftest.$ac_ext >&5
19730
19731 ac_lo=`expr $ac_mid + 1`
19732                     if test $ac_lo -le $ac_mid; then
19733                       ac_lo= ac_hi=
19734                       break
19735                     fi
19736                     ac_mid=`expr 2 '*' $ac_mid + 1`
19737 fi
19738 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19739   done
19740 else
19741   echo "$as_me: failed program was:" >&5
19742 sed 's/^/| /' conftest.$ac_ext >&5
19743
19744 cat >conftest.$ac_ext <<_ACEOF
19745 /* confdefs.h.  */
19746 _ACEOF
19747 cat confdefs.h >>conftest.$ac_ext
19748 cat >>conftest.$ac_ext <<_ACEOF
19749 /* end confdefs.h.  */
19750 $ac_includes_default
19751 struct { char filler; int field; } pgac_struct;
19752 int
19753 main ()
19754 {
19755 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19756 test_array [0] = 0
19757
19758   ;
19759   return 0;
19760 }
19761 _ACEOF
19762 rm -f conftest.$ac_objext
19763 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19764   (eval $ac_compile) 2>conftest.er1
19765   ac_status=$?
19766   grep -v '^ *+' conftest.er1 >conftest.err
19767   rm -f conftest.er1
19768   cat conftest.err >&5
19769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19770   (exit $ac_status); } &&
19771          { ac_try='test -z "$ac_c_werror_flag"
19772                          || test ! -s conftest.err'
19773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19774   (eval $ac_try) 2>&5
19775   ac_status=$?
19776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19777   (exit $ac_status); }; } &&
19778          { ac_try='test -s conftest.$ac_objext'
19779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19780   (eval $ac_try) 2>&5
19781   ac_status=$?
19782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19783   (exit $ac_status); }; }; then
19784   ac_hi=-1 ac_mid=-1
19785   while :; do
19786     cat >conftest.$ac_ext <<_ACEOF
19787 /* confdefs.h.  */
19788 _ACEOF
19789 cat confdefs.h >>conftest.$ac_ext
19790 cat >>conftest.$ac_ext <<_ACEOF
19791 /* end confdefs.h.  */
19792 $ac_includes_default
19793 struct { char filler; int field; } pgac_struct;
19794 int
19795 main ()
19796 {
19797 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19798 test_array [0] = 0
19799
19800   ;
19801   return 0;
19802 }
19803 _ACEOF
19804 rm -f conftest.$ac_objext
19805 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19806   (eval $ac_compile) 2>conftest.er1
19807   ac_status=$?
19808   grep -v '^ *+' conftest.er1 >conftest.err
19809   rm -f conftest.er1
19810   cat conftest.err >&5
19811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19812   (exit $ac_status); } &&
19813          { ac_try='test -z "$ac_c_werror_flag"
19814                          || test ! -s conftest.err'
19815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19816   (eval $ac_try) 2>&5
19817   ac_status=$?
19818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19819   (exit $ac_status); }; } &&
19820          { ac_try='test -s conftest.$ac_objext'
19821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19822   (eval $ac_try) 2>&5
19823   ac_status=$?
19824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19825   (exit $ac_status); }; }; then
19826   ac_lo=$ac_mid; break
19827 else
19828   echo "$as_me: failed program was:" >&5
19829 sed 's/^/| /' conftest.$ac_ext >&5
19830
19831 ac_hi=`expr '(' $ac_mid ')' - 1`
19832                        if test $ac_mid -le $ac_hi; then
19833                          ac_lo= ac_hi=
19834                          break
19835                        fi
19836                        ac_mid=`expr 2 '*' $ac_mid`
19837 fi
19838 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19839   done
19840 else
19841   echo "$as_me: failed program was:" >&5
19842 sed 's/^/| /' conftest.$ac_ext >&5
19843
19844 ac_lo= ac_hi=
19845 fi
19846 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19847 fi
19848 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19849 # Binary search between lo and hi bounds.
19850 while test "x$ac_lo" != "x$ac_hi"; do
19851   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19852   cat >conftest.$ac_ext <<_ACEOF
19853 /* confdefs.h.  */
19854 _ACEOF
19855 cat confdefs.h >>conftest.$ac_ext
19856 cat >>conftest.$ac_ext <<_ACEOF
19857 /* end confdefs.h.  */
19858 $ac_includes_default
19859 struct { char filler; int field; } pgac_struct;
19860 int
19861 main ()
19862 {
19863 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19864 test_array [0] = 0
19865
19866   ;
19867   return 0;
19868 }
19869 _ACEOF
19870 rm -f conftest.$ac_objext
19871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19872   (eval $ac_compile) 2>conftest.er1
19873   ac_status=$?
19874   grep -v '^ *+' conftest.er1 >conftest.err
19875   rm -f conftest.er1
19876   cat conftest.err >&5
19877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19878   (exit $ac_status); } &&
19879          { ac_try='test -z "$ac_c_werror_flag"
19880                          || test ! -s conftest.err'
19881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19882   (eval $ac_try) 2>&5
19883   ac_status=$?
19884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19885   (exit $ac_status); }; } &&
19886          { ac_try='test -s conftest.$ac_objext'
19887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19888   (eval $ac_try) 2>&5
19889   ac_status=$?
19890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19891   (exit $ac_status); }; }; then
19892   ac_hi=$ac_mid
19893 else
19894   echo "$as_me: failed program was:" >&5
19895 sed 's/^/| /' conftest.$ac_ext >&5
19896
19897 ac_lo=`expr '(' $ac_mid ')' + 1`
19898 fi
19899 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19900 done
19901 case $ac_lo in
19902 ?*) pgac_cv_alignof_int=$ac_lo;;
19903 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19904 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19905    { (exit 1); exit 1; }; } ;;
19906 esac
19907 else
19908   if test "$cross_compiling" = yes; then
19909   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19910 See \`config.log' for more details." >&5
19911 echo "$as_me: error: cannot run test program while cross compiling
19912 See \`config.log' for more details." >&2;}
19913    { (exit 1); exit 1; }; }
19914 else
19915   cat >conftest.$ac_ext <<_ACEOF
19916 /* confdefs.h.  */
19917 _ACEOF
19918 cat confdefs.h >>conftest.$ac_ext
19919 cat >>conftest.$ac_ext <<_ACEOF
19920 /* end confdefs.h.  */
19921 $ac_includes_default
19922 struct { char filler; int field; } pgac_struct;
19923 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19924 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19925 #include <stdio.h>
19926 #include <stdlib.h>
19927 int
19928 main ()
19929 {
19930
19931   FILE *f = fopen ("conftest.val", "w");
19932   if (! f)
19933     exit (1);
19934   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19935     {
19936       long i = longval ();
19937       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19938         exit (1);
19939       fprintf (f, "%ld\n", i);
19940     }
19941   else
19942     {
19943       unsigned long i = ulongval ();
19944       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19945         exit (1);
19946       fprintf (f, "%lu\n", i);
19947     }
19948   exit (ferror (f) || fclose (f) != 0);
19949
19950   ;
19951   return 0;
19952 }
19953 _ACEOF
19954 rm -f conftest$ac_exeext
19955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19956   (eval $ac_link) 2>&5
19957   ac_status=$?
19958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19959   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19961   (eval $ac_try) 2>&5
19962   ac_status=$?
19963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19964   (exit $ac_status); }; }; then
19965   pgac_cv_alignof_int=`cat conftest.val`
19966 else
19967   echo "$as_me: program exited with status $ac_status" >&5
19968 echo "$as_me: failed program was:" >&5
19969 sed 's/^/| /' conftest.$ac_ext >&5
19970
19971 ( exit $ac_status )
19972 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19973 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19974    { (exit 1); exit 1; }; }
19975 fi
19976 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19977 fi
19978 fi
19979 rm -f conftest.val
19980 else
19981   pgac_cv_alignof_int=0
19982 fi
19983 fi
19984 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19985 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19986 cat >>confdefs.h <<_ACEOF
19987 #define ALIGNOF_INT $pgac_cv_alignof_int
19988 _ACEOF
19989
19990
19991 echo "$as_me:$LINENO: checking for long" >&5
19992 echo $ECHO_N "checking for long... $ECHO_C" >&6
19993 if test "${ac_cv_type_long+set}" = set; then
19994   echo $ECHO_N "(cached) $ECHO_C" >&6
19995 else
19996   cat >conftest.$ac_ext <<_ACEOF
19997 /* confdefs.h.  */
19998 _ACEOF
19999 cat confdefs.h >>conftest.$ac_ext
20000 cat >>conftest.$ac_ext <<_ACEOF
20001 /* end confdefs.h.  */
20002 $ac_includes_default
20003 int
20004 main ()
20005 {
20006 if ((long *) 0)
20007   return 0;
20008 if (sizeof (long))
20009   return 0;
20010   ;
20011   return 0;
20012 }
20013 _ACEOF
20014 rm -f conftest.$ac_objext
20015 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20016   (eval $ac_compile) 2>conftest.er1
20017   ac_status=$?
20018   grep -v '^ *+' conftest.er1 >conftest.err
20019   rm -f conftest.er1
20020   cat conftest.err >&5
20021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20022   (exit $ac_status); } &&
20023          { ac_try='test -z "$ac_c_werror_flag"
20024                          || test ! -s conftest.err'
20025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20026   (eval $ac_try) 2>&5
20027   ac_status=$?
20028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20029   (exit $ac_status); }; } &&
20030          { ac_try='test -s conftest.$ac_objext'
20031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20032   (eval $ac_try) 2>&5
20033   ac_status=$?
20034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20035   (exit $ac_status); }; }; then
20036   ac_cv_type_long=yes
20037 else
20038   echo "$as_me: failed program was:" >&5
20039 sed 's/^/| /' conftest.$ac_ext >&5
20040
20041 ac_cv_type_long=no
20042 fi
20043 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20044 fi
20045 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
20046 echo "${ECHO_T}$ac_cv_type_long" >&6
20047
20048 echo "$as_me:$LINENO: checking alignment of long" >&5
20049 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
20050 if test "${pgac_cv_alignof_long+set}" = set; then
20051   echo $ECHO_N "(cached) $ECHO_C" >&6
20052 else
20053   if test "$ac_cv_type_long" = yes; then
20054   if test "$cross_compiling" = yes; then
20055   # Depending upon the size, compute the lo and hi bounds.
20056 cat >conftest.$ac_ext <<_ACEOF
20057 /* confdefs.h.  */
20058 _ACEOF
20059 cat confdefs.h >>conftest.$ac_ext
20060 cat >>conftest.$ac_ext <<_ACEOF
20061 /* end confdefs.h.  */
20062 $ac_includes_default
20063 struct { char filler; long field; } pgac_struct;
20064 int
20065 main ()
20066 {
20067 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20068 test_array [0] = 0
20069
20070   ;
20071   return 0;
20072 }
20073 _ACEOF
20074 rm -f conftest.$ac_objext
20075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20076   (eval $ac_compile) 2>conftest.er1
20077   ac_status=$?
20078   grep -v '^ *+' conftest.er1 >conftest.err
20079   rm -f conftest.er1
20080   cat conftest.err >&5
20081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20082   (exit $ac_status); } &&
20083          { ac_try='test -z "$ac_c_werror_flag"
20084                          || test ! -s conftest.err'
20085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20086   (eval $ac_try) 2>&5
20087   ac_status=$?
20088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20089   (exit $ac_status); }; } &&
20090          { ac_try='test -s conftest.$ac_objext'
20091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20092   (eval $ac_try) 2>&5
20093   ac_status=$?
20094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20095   (exit $ac_status); }; }; then
20096   ac_lo=0 ac_mid=0
20097   while :; do
20098     cat >conftest.$ac_ext <<_ACEOF
20099 /* confdefs.h.  */
20100 _ACEOF
20101 cat confdefs.h >>conftest.$ac_ext
20102 cat >>conftest.$ac_ext <<_ACEOF
20103 /* end confdefs.h.  */
20104 $ac_includes_default
20105 struct { char filler; long field; } pgac_struct;
20106 int
20107 main ()
20108 {
20109 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20110 test_array [0] = 0
20111
20112   ;
20113   return 0;
20114 }
20115 _ACEOF
20116 rm -f conftest.$ac_objext
20117 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20118   (eval $ac_compile) 2>conftest.er1
20119   ac_status=$?
20120   grep -v '^ *+' conftest.er1 >conftest.err
20121   rm -f conftest.er1
20122   cat conftest.err >&5
20123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20124   (exit $ac_status); } &&
20125          { ac_try='test -z "$ac_c_werror_flag"
20126                          || test ! -s conftest.err'
20127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20128   (eval $ac_try) 2>&5
20129   ac_status=$?
20130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20131   (exit $ac_status); }; } &&
20132          { ac_try='test -s conftest.$ac_objext'
20133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20134   (eval $ac_try) 2>&5
20135   ac_status=$?
20136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20137   (exit $ac_status); }; }; then
20138   ac_hi=$ac_mid; break
20139 else
20140   echo "$as_me: failed program was:" >&5
20141 sed 's/^/| /' conftest.$ac_ext >&5
20142
20143 ac_lo=`expr $ac_mid + 1`
20144                     if test $ac_lo -le $ac_mid; then
20145                       ac_lo= ac_hi=
20146                       break
20147                     fi
20148                     ac_mid=`expr 2 '*' $ac_mid + 1`
20149 fi
20150 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20151   done
20152 else
20153   echo "$as_me: failed program was:" >&5
20154 sed 's/^/| /' conftest.$ac_ext >&5
20155
20156 cat >conftest.$ac_ext <<_ACEOF
20157 /* confdefs.h.  */
20158 _ACEOF
20159 cat confdefs.h >>conftest.$ac_ext
20160 cat >>conftest.$ac_ext <<_ACEOF
20161 /* end confdefs.h.  */
20162 $ac_includes_default
20163 struct { char filler; long field; } pgac_struct;
20164 int
20165 main ()
20166 {
20167 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20168 test_array [0] = 0
20169
20170   ;
20171   return 0;
20172 }
20173 _ACEOF
20174 rm -f conftest.$ac_objext
20175 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20176   (eval $ac_compile) 2>conftest.er1
20177   ac_status=$?
20178   grep -v '^ *+' conftest.er1 >conftest.err
20179   rm -f conftest.er1
20180   cat conftest.err >&5
20181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20182   (exit $ac_status); } &&
20183          { ac_try='test -z "$ac_c_werror_flag"
20184                          || test ! -s conftest.err'
20185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20186   (eval $ac_try) 2>&5
20187   ac_status=$?
20188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20189   (exit $ac_status); }; } &&
20190          { ac_try='test -s conftest.$ac_objext'
20191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20192   (eval $ac_try) 2>&5
20193   ac_status=$?
20194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20195   (exit $ac_status); }; }; then
20196   ac_hi=-1 ac_mid=-1
20197   while :; do
20198     cat >conftest.$ac_ext <<_ACEOF
20199 /* confdefs.h.  */
20200 _ACEOF
20201 cat confdefs.h >>conftest.$ac_ext
20202 cat >>conftest.$ac_ext <<_ACEOF
20203 /* end confdefs.h.  */
20204 $ac_includes_default
20205 struct { char filler; long field; } pgac_struct;
20206 int
20207 main ()
20208 {
20209 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20210 test_array [0] = 0
20211
20212   ;
20213   return 0;
20214 }
20215 _ACEOF
20216 rm -f conftest.$ac_objext
20217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20218   (eval $ac_compile) 2>conftest.er1
20219   ac_status=$?
20220   grep -v '^ *+' conftest.er1 >conftest.err
20221   rm -f conftest.er1
20222   cat conftest.err >&5
20223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20224   (exit $ac_status); } &&
20225          { ac_try='test -z "$ac_c_werror_flag"
20226                          || test ! -s conftest.err'
20227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20228   (eval $ac_try) 2>&5
20229   ac_status=$?
20230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20231   (exit $ac_status); }; } &&
20232          { ac_try='test -s conftest.$ac_objext'
20233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20234   (eval $ac_try) 2>&5
20235   ac_status=$?
20236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20237   (exit $ac_status); }; }; then
20238   ac_lo=$ac_mid; break
20239 else
20240   echo "$as_me: failed program was:" >&5
20241 sed 's/^/| /' conftest.$ac_ext >&5
20242
20243 ac_hi=`expr '(' $ac_mid ')' - 1`
20244                        if test $ac_mid -le $ac_hi; then
20245                          ac_lo= ac_hi=
20246                          break
20247                        fi
20248                        ac_mid=`expr 2 '*' $ac_mid`
20249 fi
20250 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20251   done
20252 else
20253   echo "$as_me: failed program was:" >&5
20254 sed 's/^/| /' conftest.$ac_ext >&5
20255
20256 ac_lo= ac_hi=
20257 fi
20258 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20259 fi
20260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20261 # Binary search between lo and hi bounds.
20262 while test "x$ac_lo" != "x$ac_hi"; do
20263   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20264   cat >conftest.$ac_ext <<_ACEOF
20265 /* confdefs.h.  */
20266 _ACEOF
20267 cat confdefs.h >>conftest.$ac_ext
20268 cat >>conftest.$ac_ext <<_ACEOF
20269 /* end confdefs.h.  */
20270 $ac_includes_default
20271 struct { char filler; long field; } pgac_struct;
20272 int
20273 main ()
20274 {
20275 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20276 test_array [0] = 0
20277
20278   ;
20279   return 0;
20280 }
20281 _ACEOF
20282 rm -f conftest.$ac_objext
20283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20284   (eval $ac_compile) 2>conftest.er1
20285   ac_status=$?
20286   grep -v '^ *+' conftest.er1 >conftest.err
20287   rm -f conftest.er1
20288   cat conftest.err >&5
20289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20290   (exit $ac_status); } &&
20291          { ac_try='test -z "$ac_c_werror_flag"
20292                          || test ! -s conftest.err'
20293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20294   (eval $ac_try) 2>&5
20295   ac_status=$?
20296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20297   (exit $ac_status); }; } &&
20298          { ac_try='test -s conftest.$ac_objext'
20299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20300   (eval $ac_try) 2>&5
20301   ac_status=$?
20302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20303   (exit $ac_status); }; }; then
20304   ac_hi=$ac_mid
20305 else
20306   echo "$as_me: failed program was:" >&5
20307 sed 's/^/| /' conftest.$ac_ext >&5
20308
20309 ac_lo=`expr '(' $ac_mid ')' + 1`
20310 fi
20311 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20312 done
20313 case $ac_lo in
20314 ?*) pgac_cv_alignof_long=$ac_lo;;
20315 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20316 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20317    { (exit 1); exit 1; }; } ;;
20318 esac
20319 else
20320   if test "$cross_compiling" = yes; then
20321   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20322 See \`config.log' for more details." >&5
20323 echo "$as_me: error: cannot run test program while cross compiling
20324 See \`config.log' for more details." >&2;}
20325    { (exit 1); exit 1; }; }
20326 else
20327   cat >conftest.$ac_ext <<_ACEOF
20328 /* confdefs.h.  */
20329 _ACEOF
20330 cat confdefs.h >>conftest.$ac_ext
20331 cat >>conftest.$ac_ext <<_ACEOF
20332 /* end confdefs.h.  */
20333 $ac_includes_default
20334 struct { char filler; long field; } pgac_struct;
20335 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20336 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20337 #include <stdio.h>
20338 #include <stdlib.h>
20339 int
20340 main ()
20341 {
20342
20343   FILE *f = fopen ("conftest.val", "w");
20344   if (! f)
20345     exit (1);
20346   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20347     {
20348       long i = longval ();
20349       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20350         exit (1);
20351       fprintf (f, "%ld\n", i);
20352     }
20353   else
20354     {
20355       unsigned long i = ulongval ();
20356       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20357         exit (1);
20358       fprintf (f, "%lu\n", i);
20359     }
20360   exit (ferror (f) || fclose (f) != 0);
20361
20362   ;
20363   return 0;
20364 }
20365 _ACEOF
20366 rm -f conftest$ac_exeext
20367 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20368   (eval $ac_link) 2>&5
20369   ac_status=$?
20370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20371   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20373   (eval $ac_try) 2>&5
20374   ac_status=$?
20375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20376   (exit $ac_status); }; }; then
20377   pgac_cv_alignof_long=`cat conftest.val`
20378 else
20379   echo "$as_me: program exited with status $ac_status" >&5
20380 echo "$as_me: failed program was:" >&5
20381 sed 's/^/| /' conftest.$ac_ext >&5
20382
20383 ( exit $ac_status )
20384 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20385 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20386    { (exit 1); exit 1; }; }
20387 fi
20388 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20389 fi
20390 fi
20391 rm -f conftest.val
20392 else
20393   pgac_cv_alignof_long=0
20394 fi
20395 fi
20396 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
20397 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
20398 cat >>confdefs.h <<_ACEOF
20399 #define ALIGNOF_LONG $pgac_cv_alignof_long
20400 _ACEOF
20401
20402
20403 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
20404   echo "$as_me:$LINENO: checking for long long int" >&5
20405 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
20406 if test "${ac_cv_type_long_long_int+set}" = set; then
20407   echo $ECHO_N "(cached) $ECHO_C" >&6
20408 else
20409   cat >conftest.$ac_ext <<_ACEOF
20410 /* confdefs.h.  */
20411 _ACEOF
20412 cat confdefs.h >>conftest.$ac_ext
20413 cat >>conftest.$ac_ext <<_ACEOF
20414 /* end confdefs.h.  */
20415 $ac_includes_default
20416 int
20417 main ()
20418 {
20419 if ((long long int *) 0)
20420   return 0;
20421 if (sizeof (long long int))
20422   return 0;
20423   ;
20424   return 0;
20425 }
20426 _ACEOF
20427 rm -f conftest.$ac_objext
20428 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20429   (eval $ac_compile) 2>conftest.er1
20430   ac_status=$?
20431   grep -v '^ *+' conftest.er1 >conftest.err
20432   rm -f conftest.er1
20433   cat conftest.err >&5
20434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20435   (exit $ac_status); } &&
20436          { ac_try='test -z "$ac_c_werror_flag"
20437                          || test ! -s conftest.err'
20438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20439   (eval $ac_try) 2>&5
20440   ac_status=$?
20441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20442   (exit $ac_status); }; } &&
20443          { ac_try='test -s conftest.$ac_objext'
20444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20445   (eval $ac_try) 2>&5
20446   ac_status=$?
20447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20448   (exit $ac_status); }; }; then
20449   ac_cv_type_long_long_int=yes
20450 else
20451   echo "$as_me: failed program was:" >&5
20452 sed 's/^/| /' conftest.$ac_ext >&5
20453
20454 ac_cv_type_long_long_int=no
20455 fi
20456 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20457 fi
20458 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
20459 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
20460
20461 echo "$as_me:$LINENO: checking alignment of long long int" >&5
20462 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
20463 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
20464   echo $ECHO_N "(cached) $ECHO_C" >&6
20465 else
20466   if test "$ac_cv_type_long_long_int" = yes; then
20467   if test "$cross_compiling" = yes; then
20468   # Depending upon the size, compute the lo and hi bounds.
20469 cat >conftest.$ac_ext <<_ACEOF
20470 /* confdefs.h.  */
20471 _ACEOF
20472 cat confdefs.h >>conftest.$ac_ext
20473 cat >>conftest.$ac_ext <<_ACEOF
20474 /* end confdefs.h.  */
20475 $ac_includes_default
20476 struct { char filler; long long int field; } pgac_struct;
20477 int
20478 main ()
20479 {
20480 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20481 test_array [0] = 0
20482
20483   ;
20484   return 0;
20485 }
20486 _ACEOF
20487 rm -f conftest.$ac_objext
20488 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20489   (eval $ac_compile) 2>conftest.er1
20490   ac_status=$?
20491   grep -v '^ *+' conftest.er1 >conftest.err
20492   rm -f conftest.er1
20493   cat conftest.err >&5
20494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20495   (exit $ac_status); } &&
20496          { ac_try='test -z "$ac_c_werror_flag"
20497                          || test ! -s conftest.err'
20498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20499   (eval $ac_try) 2>&5
20500   ac_status=$?
20501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20502   (exit $ac_status); }; } &&
20503          { ac_try='test -s conftest.$ac_objext'
20504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20505   (eval $ac_try) 2>&5
20506   ac_status=$?
20507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20508   (exit $ac_status); }; }; then
20509   ac_lo=0 ac_mid=0
20510   while :; do
20511     cat >conftest.$ac_ext <<_ACEOF
20512 /* confdefs.h.  */
20513 _ACEOF
20514 cat confdefs.h >>conftest.$ac_ext
20515 cat >>conftest.$ac_ext <<_ACEOF
20516 /* end confdefs.h.  */
20517 $ac_includes_default
20518 struct { char filler; long long int field; } pgac_struct;
20519 int
20520 main ()
20521 {
20522 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20523 test_array [0] = 0
20524
20525   ;
20526   return 0;
20527 }
20528 _ACEOF
20529 rm -f conftest.$ac_objext
20530 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20531   (eval $ac_compile) 2>conftest.er1
20532   ac_status=$?
20533   grep -v '^ *+' conftest.er1 >conftest.err
20534   rm -f conftest.er1
20535   cat conftest.err >&5
20536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20537   (exit $ac_status); } &&
20538          { ac_try='test -z "$ac_c_werror_flag"
20539                          || test ! -s conftest.err'
20540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20541   (eval $ac_try) 2>&5
20542   ac_status=$?
20543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20544   (exit $ac_status); }; } &&
20545          { ac_try='test -s conftest.$ac_objext'
20546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20547   (eval $ac_try) 2>&5
20548   ac_status=$?
20549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20550   (exit $ac_status); }; }; then
20551   ac_hi=$ac_mid; break
20552 else
20553   echo "$as_me: failed program was:" >&5
20554 sed 's/^/| /' conftest.$ac_ext >&5
20555
20556 ac_lo=`expr $ac_mid + 1`
20557                     if test $ac_lo -le $ac_mid; then
20558                       ac_lo= ac_hi=
20559                       break
20560                     fi
20561                     ac_mid=`expr 2 '*' $ac_mid + 1`
20562 fi
20563 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20564   done
20565 else
20566   echo "$as_me: failed program was:" >&5
20567 sed 's/^/| /' conftest.$ac_ext >&5
20568
20569 cat >conftest.$ac_ext <<_ACEOF
20570 /* confdefs.h.  */
20571 _ACEOF
20572 cat confdefs.h >>conftest.$ac_ext
20573 cat >>conftest.$ac_ext <<_ACEOF
20574 /* end confdefs.h.  */
20575 $ac_includes_default
20576 struct { char filler; long long int field; } pgac_struct;
20577 int
20578 main ()
20579 {
20580 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20581 test_array [0] = 0
20582
20583   ;
20584   return 0;
20585 }
20586 _ACEOF
20587 rm -f conftest.$ac_objext
20588 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20589   (eval $ac_compile) 2>conftest.er1
20590   ac_status=$?
20591   grep -v '^ *+' conftest.er1 >conftest.err
20592   rm -f conftest.er1
20593   cat conftest.err >&5
20594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20595   (exit $ac_status); } &&
20596          { ac_try='test -z "$ac_c_werror_flag"
20597                          || test ! -s conftest.err'
20598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20599   (eval $ac_try) 2>&5
20600   ac_status=$?
20601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20602   (exit $ac_status); }; } &&
20603          { ac_try='test -s conftest.$ac_objext'
20604   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20605   (eval $ac_try) 2>&5
20606   ac_status=$?
20607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20608   (exit $ac_status); }; }; then
20609   ac_hi=-1 ac_mid=-1
20610   while :; do
20611     cat >conftest.$ac_ext <<_ACEOF
20612 /* confdefs.h.  */
20613 _ACEOF
20614 cat confdefs.h >>conftest.$ac_ext
20615 cat >>conftest.$ac_ext <<_ACEOF
20616 /* end confdefs.h.  */
20617 $ac_includes_default
20618 struct { char filler; long long int field; } pgac_struct;
20619 int
20620 main ()
20621 {
20622 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20623 test_array [0] = 0
20624
20625   ;
20626   return 0;
20627 }
20628 _ACEOF
20629 rm -f conftest.$ac_objext
20630 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20631   (eval $ac_compile) 2>conftest.er1
20632   ac_status=$?
20633   grep -v '^ *+' conftest.er1 >conftest.err
20634   rm -f conftest.er1
20635   cat conftest.err >&5
20636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20637   (exit $ac_status); } &&
20638          { ac_try='test -z "$ac_c_werror_flag"
20639                          || test ! -s conftest.err'
20640   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20641   (eval $ac_try) 2>&5
20642   ac_status=$?
20643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20644   (exit $ac_status); }; } &&
20645          { ac_try='test -s conftest.$ac_objext'
20646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20647   (eval $ac_try) 2>&5
20648   ac_status=$?
20649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20650   (exit $ac_status); }; }; then
20651   ac_lo=$ac_mid; break
20652 else
20653   echo "$as_me: failed program was:" >&5
20654 sed 's/^/| /' conftest.$ac_ext >&5
20655
20656 ac_hi=`expr '(' $ac_mid ')' - 1`
20657                        if test $ac_mid -le $ac_hi; then
20658                          ac_lo= ac_hi=
20659                          break
20660                        fi
20661                        ac_mid=`expr 2 '*' $ac_mid`
20662 fi
20663 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20664   done
20665 else
20666   echo "$as_me: failed program was:" >&5
20667 sed 's/^/| /' conftest.$ac_ext >&5
20668
20669 ac_lo= ac_hi=
20670 fi
20671 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20672 fi
20673 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20674 # Binary search between lo and hi bounds.
20675 while test "x$ac_lo" != "x$ac_hi"; do
20676   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20677   cat >conftest.$ac_ext <<_ACEOF
20678 /* confdefs.h.  */
20679 _ACEOF
20680 cat confdefs.h >>conftest.$ac_ext
20681 cat >>conftest.$ac_ext <<_ACEOF
20682 /* end confdefs.h.  */
20683 $ac_includes_default
20684 struct { char filler; long long int field; } pgac_struct;
20685 int
20686 main ()
20687 {
20688 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20689 test_array [0] = 0
20690
20691   ;
20692   return 0;
20693 }
20694 _ACEOF
20695 rm -f conftest.$ac_objext
20696 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20697   (eval $ac_compile) 2>conftest.er1
20698   ac_status=$?
20699   grep -v '^ *+' conftest.er1 >conftest.err
20700   rm -f conftest.er1
20701   cat conftest.err >&5
20702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20703   (exit $ac_status); } &&
20704          { ac_try='test -z "$ac_c_werror_flag"
20705                          || test ! -s conftest.err'
20706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20707   (eval $ac_try) 2>&5
20708   ac_status=$?
20709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20710   (exit $ac_status); }; } &&
20711          { ac_try='test -s conftest.$ac_objext'
20712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20713   (eval $ac_try) 2>&5
20714   ac_status=$?
20715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20716   (exit $ac_status); }; }; then
20717   ac_hi=$ac_mid
20718 else
20719   echo "$as_me: failed program was:" >&5
20720 sed 's/^/| /' conftest.$ac_ext >&5
20721
20722 ac_lo=`expr '(' $ac_mid ')' + 1`
20723 fi
20724 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20725 done
20726 case $ac_lo in
20727 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20728 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20729 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20730    { (exit 1); exit 1; }; } ;;
20731 esac
20732 else
20733   if test "$cross_compiling" = yes; then
20734   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20735 See \`config.log' for more details." >&5
20736 echo "$as_me: error: cannot run test program while cross compiling
20737 See \`config.log' for more details." >&2;}
20738    { (exit 1); exit 1; }; }
20739 else
20740   cat >conftest.$ac_ext <<_ACEOF
20741 /* confdefs.h.  */
20742 _ACEOF
20743 cat confdefs.h >>conftest.$ac_ext
20744 cat >>conftest.$ac_ext <<_ACEOF
20745 /* end confdefs.h.  */
20746 $ac_includes_default
20747 struct { char filler; long long int field; } pgac_struct;
20748 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20749 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20750 #include <stdio.h>
20751 #include <stdlib.h>
20752 int
20753 main ()
20754 {
20755
20756   FILE *f = fopen ("conftest.val", "w");
20757   if (! f)
20758     exit (1);
20759   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20760     {
20761       long i = longval ();
20762       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20763         exit (1);
20764       fprintf (f, "%ld\n", i);
20765     }
20766   else
20767     {
20768       unsigned long i = ulongval ();
20769       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20770         exit (1);
20771       fprintf (f, "%lu\n", i);
20772     }
20773   exit (ferror (f) || fclose (f) != 0);
20774
20775   ;
20776   return 0;
20777 }
20778 _ACEOF
20779 rm -f conftest$ac_exeext
20780 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20781   (eval $ac_link) 2>&5
20782   ac_status=$?
20783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20784   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20786   (eval $ac_try) 2>&5
20787   ac_status=$?
20788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20789   (exit $ac_status); }; }; then
20790   pgac_cv_alignof_long_long_int=`cat conftest.val`
20791 else
20792   echo "$as_me: program exited with status $ac_status" >&5
20793 echo "$as_me: failed program was:" >&5
20794 sed 's/^/| /' conftest.$ac_ext >&5
20795
20796 ( exit $ac_status )
20797 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20798 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20799    { (exit 1); exit 1; }; }
20800 fi
20801 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20802 fi
20803 fi
20804 rm -f conftest.val
20805 else
20806   pgac_cv_alignof_long_long_int=0
20807 fi
20808 fi
20809 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20810 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20811 cat >>confdefs.h <<_ACEOF
20812 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20813 _ACEOF
20814
20815
20816 fi
20817 echo "$as_me:$LINENO: checking for double" >&5
20818 echo $ECHO_N "checking for double... $ECHO_C" >&6
20819 if test "${ac_cv_type_double+set}" = set; then
20820   echo $ECHO_N "(cached) $ECHO_C" >&6
20821 else
20822   cat >conftest.$ac_ext <<_ACEOF
20823 /* confdefs.h.  */
20824 _ACEOF
20825 cat confdefs.h >>conftest.$ac_ext
20826 cat >>conftest.$ac_ext <<_ACEOF
20827 /* end confdefs.h.  */
20828 $ac_includes_default
20829 int
20830 main ()
20831 {
20832 if ((double *) 0)
20833   return 0;
20834 if (sizeof (double))
20835   return 0;
20836   ;
20837   return 0;
20838 }
20839 _ACEOF
20840 rm -f conftest.$ac_objext
20841 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20842   (eval $ac_compile) 2>conftest.er1
20843   ac_status=$?
20844   grep -v '^ *+' conftest.er1 >conftest.err
20845   rm -f conftest.er1
20846   cat conftest.err >&5
20847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20848   (exit $ac_status); } &&
20849          { ac_try='test -z "$ac_c_werror_flag"
20850                          || test ! -s conftest.err'
20851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20852   (eval $ac_try) 2>&5
20853   ac_status=$?
20854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20855   (exit $ac_status); }; } &&
20856          { ac_try='test -s conftest.$ac_objext'
20857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20858   (eval $ac_try) 2>&5
20859   ac_status=$?
20860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20861   (exit $ac_status); }; }; then
20862   ac_cv_type_double=yes
20863 else
20864   echo "$as_me: failed program was:" >&5
20865 sed 's/^/| /' conftest.$ac_ext >&5
20866
20867 ac_cv_type_double=no
20868 fi
20869 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20870 fi
20871 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20872 echo "${ECHO_T}$ac_cv_type_double" >&6
20873
20874 echo "$as_me:$LINENO: checking alignment of double" >&5
20875 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20876 if test "${pgac_cv_alignof_double+set}" = set; then
20877   echo $ECHO_N "(cached) $ECHO_C" >&6
20878 else
20879   if test "$ac_cv_type_double" = yes; then
20880   if test "$cross_compiling" = yes; then
20881   # Depending upon the size, compute the lo and hi bounds.
20882 cat >conftest.$ac_ext <<_ACEOF
20883 /* confdefs.h.  */
20884 _ACEOF
20885 cat confdefs.h >>conftest.$ac_ext
20886 cat >>conftest.$ac_ext <<_ACEOF
20887 /* end confdefs.h.  */
20888 $ac_includes_default
20889 struct { char filler; double field; } pgac_struct;
20890 int
20891 main ()
20892 {
20893 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20894 test_array [0] = 0
20895
20896   ;
20897   return 0;
20898 }
20899 _ACEOF
20900 rm -f conftest.$ac_objext
20901 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20902   (eval $ac_compile) 2>conftest.er1
20903   ac_status=$?
20904   grep -v '^ *+' conftest.er1 >conftest.err
20905   rm -f conftest.er1
20906   cat conftest.err >&5
20907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20908   (exit $ac_status); } &&
20909          { ac_try='test -z "$ac_c_werror_flag"
20910                          || test ! -s conftest.err'
20911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20912   (eval $ac_try) 2>&5
20913   ac_status=$?
20914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20915   (exit $ac_status); }; } &&
20916          { ac_try='test -s conftest.$ac_objext'
20917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20918   (eval $ac_try) 2>&5
20919   ac_status=$?
20920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20921   (exit $ac_status); }; }; then
20922   ac_lo=0 ac_mid=0
20923   while :; do
20924     cat >conftest.$ac_ext <<_ACEOF
20925 /* confdefs.h.  */
20926 _ACEOF
20927 cat confdefs.h >>conftest.$ac_ext
20928 cat >>conftest.$ac_ext <<_ACEOF
20929 /* end confdefs.h.  */
20930 $ac_includes_default
20931 struct { char filler; double field; } pgac_struct;
20932 int
20933 main ()
20934 {
20935 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20936 test_array [0] = 0
20937
20938   ;
20939   return 0;
20940 }
20941 _ACEOF
20942 rm -f conftest.$ac_objext
20943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20944   (eval $ac_compile) 2>conftest.er1
20945   ac_status=$?
20946   grep -v '^ *+' conftest.er1 >conftest.err
20947   rm -f conftest.er1
20948   cat conftest.err >&5
20949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20950   (exit $ac_status); } &&
20951          { ac_try='test -z "$ac_c_werror_flag"
20952                          || test ! -s conftest.err'
20953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20954   (eval $ac_try) 2>&5
20955   ac_status=$?
20956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20957   (exit $ac_status); }; } &&
20958          { ac_try='test -s conftest.$ac_objext'
20959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20960   (eval $ac_try) 2>&5
20961   ac_status=$?
20962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20963   (exit $ac_status); }; }; then
20964   ac_hi=$ac_mid; break
20965 else
20966   echo "$as_me: failed program was:" >&5
20967 sed 's/^/| /' conftest.$ac_ext >&5
20968
20969 ac_lo=`expr $ac_mid + 1`
20970                     if test $ac_lo -le $ac_mid; then
20971                       ac_lo= ac_hi=
20972                       break
20973                     fi
20974                     ac_mid=`expr 2 '*' $ac_mid + 1`
20975 fi
20976 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20977   done
20978 else
20979   echo "$as_me: failed program was:" >&5
20980 sed 's/^/| /' conftest.$ac_ext >&5
20981
20982 cat >conftest.$ac_ext <<_ACEOF
20983 /* confdefs.h.  */
20984 _ACEOF
20985 cat confdefs.h >>conftest.$ac_ext
20986 cat >>conftest.$ac_ext <<_ACEOF
20987 /* end confdefs.h.  */
20988 $ac_includes_default
20989 struct { char filler; double field; } pgac_struct;
20990 int
20991 main ()
20992 {
20993 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20994 test_array [0] = 0
20995
20996   ;
20997   return 0;
20998 }
20999 _ACEOF
21000 rm -f conftest.$ac_objext
21001 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21002   (eval $ac_compile) 2>conftest.er1
21003   ac_status=$?
21004   grep -v '^ *+' conftest.er1 >conftest.err
21005   rm -f conftest.er1
21006   cat conftest.err >&5
21007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21008   (exit $ac_status); } &&
21009          { ac_try='test -z "$ac_c_werror_flag"
21010                          || test ! -s conftest.err'
21011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21012   (eval $ac_try) 2>&5
21013   ac_status=$?
21014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21015   (exit $ac_status); }; } &&
21016          { ac_try='test -s conftest.$ac_objext'
21017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21018   (eval $ac_try) 2>&5
21019   ac_status=$?
21020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21021   (exit $ac_status); }; }; then
21022   ac_hi=-1 ac_mid=-1
21023   while :; do
21024     cat >conftest.$ac_ext <<_ACEOF
21025 /* confdefs.h.  */
21026 _ACEOF
21027 cat confdefs.h >>conftest.$ac_ext
21028 cat >>conftest.$ac_ext <<_ACEOF
21029 /* end confdefs.h.  */
21030 $ac_includes_default
21031 struct { char filler; double field; } pgac_struct;
21032 int
21033 main ()
21034 {
21035 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
21036 test_array [0] = 0
21037
21038   ;
21039   return 0;
21040 }
21041 _ACEOF
21042 rm -f conftest.$ac_objext
21043 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21044   (eval $ac_compile) 2>conftest.er1
21045   ac_status=$?
21046   grep -v '^ *+' conftest.er1 >conftest.err
21047   rm -f conftest.er1
21048   cat conftest.err >&5
21049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21050   (exit $ac_status); } &&
21051          { ac_try='test -z "$ac_c_werror_flag"
21052                          || test ! -s conftest.err'
21053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21054   (eval $ac_try) 2>&5
21055   ac_status=$?
21056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21057   (exit $ac_status); }; } &&
21058          { ac_try='test -s conftest.$ac_objext'
21059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21060   (eval $ac_try) 2>&5
21061   ac_status=$?
21062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21063   (exit $ac_status); }; }; then
21064   ac_lo=$ac_mid; break
21065 else
21066   echo "$as_me: failed program was:" >&5
21067 sed 's/^/| /' conftest.$ac_ext >&5
21068
21069 ac_hi=`expr '(' $ac_mid ')' - 1`
21070                        if test $ac_mid -le $ac_hi; then
21071                          ac_lo= ac_hi=
21072                          break
21073                        fi
21074                        ac_mid=`expr 2 '*' $ac_mid`
21075 fi
21076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21077   done
21078 else
21079   echo "$as_me: failed program was:" >&5
21080 sed 's/^/| /' conftest.$ac_ext >&5
21081
21082 ac_lo= ac_hi=
21083 fi
21084 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21085 fi
21086 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21087 # Binary search between lo and hi bounds.
21088 while test "x$ac_lo" != "x$ac_hi"; do
21089   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21090   cat >conftest.$ac_ext <<_ACEOF
21091 /* confdefs.h.  */
21092 _ACEOF
21093 cat confdefs.h >>conftest.$ac_ext
21094 cat >>conftest.$ac_ext <<_ACEOF
21095 /* end confdefs.h.  */
21096 $ac_includes_default
21097 struct { char filler; double field; } pgac_struct;
21098 int
21099 main ()
21100 {
21101 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
21102 test_array [0] = 0
21103
21104   ;
21105   return 0;
21106 }
21107 _ACEOF
21108 rm -f conftest.$ac_objext
21109 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21110   (eval $ac_compile) 2>conftest.er1
21111   ac_status=$?
21112   grep -v '^ *+' conftest.er1 >conftest.err
21113   rm -f conftest.er1
21114   cat conftest.err >&5
21115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21116   (exit $ac_status); } &&
21117          { ac_try='test -z "$ac_c_werror_flag"
21118                          || test ! -s conftest.err'
21119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21120   (eval $ac_try) 2>&5
21121   ac_status=$?
21122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21123   (exit $ac_status); }; } &&
21124          { ac_try='test -s conftest.$ac_objext'
21125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21126   (eval $ac_try) 2>&5
21127   ac_status=$?
21128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21129   (exit $ac_status); }; }; then
21130   ac_hi=$ac_mid
21131 else
21132   echo "$as_me: failed program was:" >&5
21133 sed 's/^/| /' conftest.$ac_ext >&5
21134
21135 ac_lo=`expr '(' $ac_mid ')' + 1`
21136 fi
21137 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21138 done
21139 case $ac_lo in
21140 ?*) pgac_cv_alignof_double=$ac_lo;;
21141 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
21142 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
21143    { (exit 1); exit 1; }; } ;;
21144 esac
21145 else
21146   if test "$cross_compiling" = yes; then
21147   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
21148 See \`config.log' for more details." >&5
21149 echo "$as_me: error: cannot run test program while cross compiling
21150 See \`config.log' for more details." >&2;}
21151    { (exit 1); exit 1; }; }
21152 else
21153   cat >conftest.$ac_ext <<_ACEOF
21154 /* confdefs.h.  */
21155 _ACEOF
21156 cat confdefs.h >>conftest.$ac_ext
21157 cat >>conftest.$ac_ext <<_ACEOF
21158 /* end confdefs.h.  */
21159 $ac_includes_default
21160 struct { char filler; double field; } pgac_struct;
21161 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
21162 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
21163 #include <stdio.h>
21164 #include <stdlib.h>
21165 int
21166 main ()
21167 {
21168
21169   FILE *f = fopen ("conftest.val", "w");
21170   if (! f)
21171     exit (1);
21172   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
21173     {
21174       long i = longval ();
21175       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
21176         exit (1);
21177       fprintf (f, "%ld\n", i);
21178     }
21179   else
21180     {
21181       unsigned long i = ulongval ();
21182       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
21183         exit (1);
21184       fprintf (f, "%lu\n", i);
21185     }
21186   exit (ferror (f) || fclose (f) != 0);
21187
21188   ;
21189   return 0;
21190 }
21191 _ACEOF
21192 rm -f conftest$ac_exeext
21193 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21194   (eval $ac_link) 2>&5
21195   ac_status=$?
21196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21197   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21199   (eval $ac_try) 2>&5
21200   ac_status=$?
21201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21202   (exit $ac_status); }; }; then
21203   pgac_cv_alignof_double=`cat conftest.val`
21204 else
21205   echo "$as_me: program exited with status $ac_status" >&5
21206 echo "$as_me: failed program was:" >&5
21207 sed 's/^/| /' conftest.$ac_ext >&5
21208
21209 ( exit $ac_status )
21210 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
21211 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
21212    { (exit 1); exit 1; }; }
21213 fi
21214 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21215 fi
21216 fi
21217 rm -f conftest.val
21218 else
21219   pgac_cv_alignof_double=0
21220 fi
21221 fi
21222 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
21223 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
21224 cat >>confdefs.h <<_ACEOF
21225 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
21226 _ACEOF
21227
21228
21229
21230 # Compute maximum alignment of any basic type.
21231 # We assume long's alignment is at least as strong as char, short, or int;
21232 # but we must check long long (if it exists) and double.
21233
21234 MAX_ALIGNOF=$pgac_cv_alignof_long
21235 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
21236   MAX_ALIGNOF=$pgac_cv_alignof_double
21237 fi
21238 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
21239   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
21240 fi
21241
21242 cat >>confdefs.h <<_ACEOF
21243 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
21244 _ACEOF
21245
21246
21247
21248 # Some platforms predefine the types int8, int16, etc.  Only check
21249 # a (hopefully) representative subset.
21250 echo "$as_me:$LINENO: checking for int8" >&5
21251 echo $ECHO_N "checking for int8... $ECHO_C" >&6
21252 if test "${ac_cv_type_int8+set}" = set; then
21253   echo $ECHO_N "(cached) $ECHO_C" >&6
21254 else
21255   cat >conftest.$ac_ext <<_ACEOF
21256 /* confdefs.h.  */
21257 _ACEOF
21258 cat confdefs.h >>conftest.$ac_ext
21259 cat >>conftest.$ac_ext <<_ACEOF
21260 /* end confdefs.h.  */
21261 #include <stdio.h>
21262 #ifdef HAVE_SUPPORTDEFS_H
21263 #include <SupportDefs.h>
21264 #endif
21265
21266 int
21267 main ()
21268 {
21269 if ((int8 *) 0)
21270   return 0;
21271 if (sizeof (int8))
21272   return 0;
21273   ;
21274   return 0;
21275 }
21276 _ACEOF
21277 rm -f conftest.$ac_objext
21278 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21279   (eval $ac_compile) 2>conftest.er1
21280   ac_status=$?
21281   grep -v '^ *+' conftest.er1 >conftest.err
21282   rm -f conftest.er1
21283   cat conftest.err >&5
21284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21285   (exit $ac_status); } &&
21286          { ac_try='test -z "$ac_c_werror_flag"
21287                          || test ! -s conftest.err'
21288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21289   (eval $ac_try) 2>&5
21290   ac_status=$?
21291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21292   (exit $ac_status); }; } &&
21293          { ac_try='test -s conftest.$ac_objext'
21294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21295   (eval $ac_try) 2>&5
21296   ac_status=$?
21297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21298   (exit $ac_status); }; }; then
21299   ac_cv_type_int8=yes
21300 else
21301   echo "$as_me: failed program was:" >&5
21302 sed 's/^/| /' conftest.$ac_ext >&5
21303
21304 ac_cv_type_int8=no
21305 fi
21306 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21307 fi
21308 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
21309 echo "${ECHO_T}$ac_cv_type_int8" >&6
21310 if test $ac_cv_type_int8 = yes; then
21311
21312 cat >>confdefs.h <<_ACEOF
21313 #define HAVE_INT8 1
21314 _ACEOF
21315
21316
21317 fi
21318 echo "$as_me:$LINENO: checking for uint8" >&5
21319 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
21320 if test "${ac_cv_type_uint8+set}" = set; then
21321   echo $ECHO_N "(cached) $ECHO_C" >&6
21322 else
21323   cat >conftest.$ac_ext <<_ACEOF
21324 /* confdefs.h.  */
21325 _ACEOF
21326 cat confdefs.h >>conftest.$ac_ext
21327 cat >>conftest.$ac_ext <<_ACEOF
21328 /* end confdefs.h.  */
21329 #include <stdio.h>
21330 #ifdef HAVE_SUPPORTDEFS_H
21331 #include <SupportDefs.h>
21332 #endif
21333
21334 int
21335 main ()
21336 {
21337 if ((uint8 *) 0)
21338   return 0;
21339 if (sizeof (uint8))
21340   return 0;
21341   ;
21342   return 0;
21343 }
21344 _ACEOF
21345 rm -f conftest.$ac_objext
21346 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21347   (eval $ac_compile) 2>conftest.er1
21348   ac_status=$?
21349   grep -v '^ *+' conftest.er1 >conftest.err
21350   rm -f conftest.er1
21351   cat conftest.err >&5
21352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21353   (exit $ac_status); } &&
21354          { ac_try='test -z "$ac_c_werror_flag"
21355                          || test ! -s conftest.err'
21356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21357   (eval $ac_try) 2>&5
21358   ac_status=$?
21359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21360   (exit $ac_status); }; } &&
21361          { ac_try='test -s conftest.$ac_objext'
21362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21363   (eval $ac_try) 2>&5
21364   ac_status=$?
21365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21366   (exit $ac_status); }; }; then
21367   ac_cv_type_uint8=yes
21368 else
21369   echo "$as_me: failed program was:" >&5
21370 sed 's/^/| /' conftest.$ac_ext >&5
21371
21372 ac_cv_type_uint8=no
21373 fi
21374 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21375 fi
21376 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
21377 echo "${ECHO_T}$ac_cv_type_uint8" >&6
21378 if test $ac_cv_type_uint8 = yes; then
21379
21380 cat >>confdefs.h <<_ACEOF
21381 #define HAVE_UINT8 1
21382 _ACEOF
21383
21384
21385 fi
21386 echo "$as_me:$LINENO: checking for int64" >&5
21387 echo $ECHO_N "checking for int64... $ECHO_C" >&6
21388 if test "${ac_cv_type_int64+set}" = set; then
21389   echo $ECHO_N "(cached) $ECHO_C" >&6
21390 else
21391   cat >conftest.$ac_ext <<_ACEOF
21392 /* confdefs.h.  */
21393 _ACEOF
21394 cat confdefs.h >>conftest.$ac_ext
21395 cat >>conftest.$ac_ext <<_ACEOF
21396 /* end confdefs.h.  */
21397 #include <stdio.h>
21398 #ifdef HAVE_SUPPORTDEFS_H
21399 #include <SupportDefs.h>
21400 #endif
21401
21402 int
21403 main ()
21404 {
21405 if ((int64 *) 0)
21406   return 0;
21407 if (sizeof (int64))
21408   return 0;
21409   ;
21410   return 0;
21411 }
21412 _ACEOF
21413 rm -f conftest.$ac_objext
21414 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21415   (eval $ac_compile) 2>conftest.er1
21416   ac_status=$?
21417   grep -v '^ *+' conftest.er1 >conftest.err
21418   rm -f conftest.er1
21419   cat conftest.err >&5
21420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21421   (exit $ac_status); } &&
21422          { ac_try='test -z "$ac_c_werror_flag"
21423                          || test ! -s conftest.err'
21424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21425   (eval $ac_try) 2>&5
21426   ac_status=$?
21427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21428   (exit $ac_status); }; } &&
21429          { ac_try='test -s conftest.$ac_objext'
21430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21431   (eval $ac_try) 2>&5
21432   ac_status=$?
21433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21434   (exit $ac_status); }; }; then
21435   ac_cv_type_int64=yes
21436 else
21437   echo "$as_me: failed program was:" >&5
21438 sed 's/^/| /' conftest.$ac_ext >&5
21439
21440 ac_cv_type_int64=no
21441 fi
21442 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21443 fi
21444 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
21445 echo "${ECHO_T}$ac_cv_type_int64" >&6
21446 if test $ac_cv_type_int64 = yes; then
21447
21448 cat >>confdefs.h <<_ACEOF
21449 #define HAVE_INT64 1
21450 _ACEOF
21451
21452
21453 fi
21454 echo "$as_me:$LINENO: checking for uint64" >&5
21455 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
21456 if test "${ac_cv_type_uint64+set}" = set; then
21457   echo $ECHO_N "(cached) $ECHO_C" >&6
21458 else
21459   cat >conftest.$ac_ext <<_ACEOF
21460 /* confdefs.h.  */
21461 _ACEOF
21462 cat confdefs.h >>conftest.$ac_ext
21463 cat >>conftest.$ac_ext <<_ACEOF
21464 /* end confdefs.h.  */
21465 #include <stdio.h>
21466 #ifdef HAVE_SUPPORTDEFS_H
21467 #include <SupportDefs.h>
21468 #endif
21469
21470 int
21471 main ()
21472 {
21473 if ((uint64 *) 0)
21474   return 0;
21475 if (sizeof (uint64))
21476   return 0;
21477   ;
21478   return 0;
21479 }
21480 _ACEOF
21481 rm -f conftest.$ac_objext
21482 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21483   (eval $ac_compile) 2>conftest.er1
21484   ac_status=$?
21485   grep -v '^ *+' conftest.er1 >conftest.err
21486   rm -f conftest.er1
21487   cat conftest.err >&5
21488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21489   (exit $ac_status); } &&
21490          { ac_try='test -z "$ac_c_werror_flag"
21491                          || test ! -s conftest.err'
21492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21493   (eval $ac_try) 2>&5
21494   ac_status=$?
21495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21496   (exit $ac_status); }; } &&
21497          { ac_try='test -s conftest.$ac_objext'
21498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21499   (eval $ac_try) 2>&5
21500   ac_status=$?
21501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21502   (exit $ac_status); }; }; then
21503   ac_cv_type_uint64=yes
21504 else
21505   echo "$as_me: failed program was:" >&5
21506 sed 's/^/| /' conftest.$ac_ext >&5
21507
21508 ac_cv_type_uint64=no
21509 fi
21510 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21511 fi
21512 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
21513 echo "${ECHO_T}$ac_cv_type_uint64" >&6
21514 if test $ac_cv_type_uint64 = yes; then
21515
21516 cat >>confdefs.h <<_ACEOF
21517 #define HAVE_UINT64 1
21518 _ACEOF
21519
21520
21521 fi
21522
21523
21524 # We also check for sig_atomic_t, which *should* be defined per ANSI
21525 # C, but is missing on some old platforms.
21526 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
21527 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
21528 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
21529   echo $ECHO_N "(cached) $ECHO_C" >&6
21530 else
21531   cat >conftest.$ac_ext <<_ACEOF
21532 /* confdefs.h.  */
21533 _ACEOF
21534 cat confdefs.h >>conftest.$ac_ext
21535 cat >>conftest.$ac_ext <<_ACEOF
21536 /* end confdefs.h.  */
21537 #include <signal.h>
21538
21539 int
21540 main ()
21541 {
21542 if ((sig_atomic_t *) 0)
21543   return 0;
21544 if (sizeof (sig_atomic_t))
21545   return 0;
21546   ;
21547   return 0;
21548 }
21549 _ACEOF
21550 rm -f conftest.$ac_objext
21551 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21552   (eval $ac_compile) 2>conftest.er1
21553   ac_status=$?
21554   grep -v '^ *+' conftest.er1 >conftest.err
21555   rm -f conftest.er1
21556   cat conftest.err >&5
21557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21558   (exit $ac_status); } &&
21559          { ac_try='test -z "$ac_c_werror_flag"
21560                          || test ! -s conftest.err'
21561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21562   (eval $ac_try) 2>&5
21563   ac_status=$?
21564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21565   (exit $ac_status); }; } &&
21566          { ac_try='test -s conftest.$ac_objext'
21567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21568   (eval $ac_try) 2>&5
21569   ac_status=$?
21570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21571   (exit $ac_status); }; }; then
21572   ac_cv_type_sig_atomic_t=yes
21573 else
21574   echo "$as_me: failed program was:" >&5
21575 sed 's/^/| /' conftest.$ac_ext >&5
21576
21577 ac_cv_type_sig_atomic_t=no
21578 fi
21579 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21580 fi
21581 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21582 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21583 if test $ac_cv_type_sig_atomic_t = yes; then
21584
21585 cat >>confdefs.h <<_ACEOF
21586 #define HAVE_SIG_ATOMIC_T 1
21587 _ACEOF
21588
21589
21590 fi
21591
21592
21593
21594 if test x"$template" != x"win32"
21595 then
21596 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21597 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21598 if test "${pgac_cv_func_posix_signals+set}" = set; then
21599   echo $ECHO_N "(cached) $ECHO_C" >&6
21600 else
21601   cat >conftest.$ac_ext <<_ACEOF
21602 /* confdefs.h.  */
21603 _ACEOF
21604 cat confdefs.h >>conftest.$ac_ext
21605 cat >>conftest.$ac_ext <<_ACEOF
21606 /* end confdefs.h.  */
21607 #include <signal.h>
21608
21609 int
21610 main ()
21611 {
21612 struct sigaction act, oact;
21613 sigemptyset(&act.sa_mask);
21614 act.sa_flags = SA_RESTART;
21615 sigaction(0, &act, &oact);
21616   ;
21617   return 0;
21618 }
21619 _ACEOF
21620 rm -f conftest.$ac_objext conftest$ac_exeext
21621 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21622   (eval $ac_link) 2>conftest.er1
21623   ac_status=$?
21624   grep -v '^ *+' conftest.er1 >conftest.err
21625   rm -f conftest.er1
21626   cat conftest.err >&5
21627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21628   (exit $ac_status); } &&
21629          { ac_try='test -z "$ac_c_werror_flag"
21630                          || test ! -s conftest.err'
21631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21632   (eval $ac_try) 2>&5
21633   ac_status=$?
21634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21635   (exit $ac_status); }; } &&
21636          { ac_try='test -s conftest$ac_exeext'
21637   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21638   (eval $ac_try) 2>&5
21639   ac_status=$?
21640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21641   (exit $ac_status); }; }; then
21642   pgac_cv_func_posix_signals=yes
21643 else
21644   echo "$as_me: failed program was:" >&5
21645 sed 's/^/| /' conftest.$ac_ext >&5
21646
21647 pgac_cv_func_posix_signals=no
21648 fi
21649 rm -f conftest.err conftest.$ac_objext \
21650       conftest$ac_exeext conftest.$ac_ext
21651 fi
21652 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21653 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21654 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21655
21656 cat >>confdefs.h <<\_ACEOF
21657 #define HAVE_POSIX_SIGNALS
21658 _ACEOF
21659
21660 fi
21661 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21662
21663 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21664   { { echo "$as_me:$LINENO: error:
21665 Thread-safety requires POSIX signals, which are not supported by this
21666 operating system." >&5
21667 echo "$as_me: error:
21668 Thread-safety requires POSIX signals, which are not supported by this
21669 operating system." >&2;}
21670    { (exit 1); exit 1; }; }
21671 fi
21672 fi
21673
21674 if test $ac_cv_func_fseeko = yes; then
21675 # Check whether --enable-largefile or --disable-largefile was given.
21676 if test "${enable_largefile+set}" = set; then
21677   enableval="$enable_largefile"
21678
21679 fi;
21680 if test "$enable_largefile" != no; then
21681
21682   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21683 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21684 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21685   echo $ECHO_N "(cached) $ECHO_C" >&6
21686 else
21687   ac_cv_sys_largefile_CC=no
21688      if test "$GCC" != yes; then
21689        ac_save_CC=$CC
21690        while :; do
21691          # IRIX 6.2 and later do not support large files by default,
21692          # so use the C compiler's -n32 option if that helps.
21693          cat >conftest.$ac_ext <<_ACEOF
21694 /* confdefs.h.  */
21695 _ACEOF
21696 cat confdefs.h >>conftest.$ac_ext
21697 cat >>conftest.$ac_ext <<_ACEOF
21698 /* end confdefs.h.  */
21699 #include <sys/types.h>
21700  /* Check that off_t can represent 2**63 - 1 correctly.
21701     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21702     since some C++ compilers masquerading as C compilers
21703     incorrectly reject 9223372036854775807.  */
21704 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21705   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21706                        && LARGE_OFF_T % 2147483647 == 1)
21707                       ? 1 : -1];
21708 int
21709 main ()
21710 {
21711
21712   ;
21713   return 0;
21714 }
21715 _ACEOF
21716          rm -f conftest.$ac_objext
21717 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21718   (eval $ac_compile) 2>conftest.er1
21719   ac_status=$?
21720   grep -v '^ *+' conftest.er1 >conftest.err
21721   rm -f conftest.er1
21722   cat conftest.err >&5
21723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21724   (exit $ac_status); } &&
21725          { ac_try='test -z "$ac_c_werror_flag"
21726                          || test ! -s conftest.err'
21727   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21728   (eval $ac_try) 2>&5
21729   ac_status=$?
21730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21731   (exit $ac_status); }; } &&
21732          { ac_try='test -s conftest.$ac_objext'
21733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21734   (eval $ac_try) 2>&5
21735   ac_status=$?
21736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21737   (exit $ac_status); }; }; then
21738   break
21739 else
21740   echo "$as_me: failed program was:" >&5
21741 sed 's/^/| /' conftest.$ac_ext >&5
21742
21743 fi
21744 rm -f conftest.err conftest.$ac_objext
21745          CC="$CC -n32"
21746          rm -f conftest.$ac_objext
21747 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21748   (eval $ac_compile) 2>conftest.er1
21749   ac_status=$?
21750   grep -v '^ *+' conftest.er1 >conftest.err
21751   rm -f conftest.er1
21752   cat conftest.err >&5
21753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21754   (exit $ac_status); } &&
21755          { ac_try='test -z "$ac_c_werror_flag"
21756                          || test ! -s conftest.err'
21757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21758   (eval $ac_try) 2>&5
21759   ac_status=$?
21760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21761   (exit $ac_status); }; } &&
21762          { ac_try='test -s conftest.$ac_objext'
21763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21764   (eval $ac_try) 2>&5
21765   ac_status=$?
21766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21767   (exit $ac_status); }; }; then
21768   ac_cv_sys_largefile_CC=' -n32'; break
21769 else
21770   echo "$as_me: failed program was:" >&5
21771 sed 's/^/| /' conftest.$ac_ext >&5
21772
21773 fi
21774 rm -f conftest.err conftest.$ac_objext
21775          break
21776        done
21777        CC=$ac_save_CC
21778        rm -f conftest.$ac_ext
21779     fi
21780 fi
21781 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21782 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21783   if test "$ac_cv_sys_largefile_CC" != no; then
21784     CC=$CC$ac_cv_sys_largefile_CC
21785   fi
21786
21787   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21788 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21789 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21790   echo $ECHO_N "(cached) $ECHO_C" >&6
21791 else
21792   while :; do
21793   ac_cv_sys_file_offset_bits=no
21794   cat >conftest.$ac_ext <<_ACEOF
21795 /* confdefs.h.  */
21796 _ACEOF
21797 cat confdefs.h >>conftest.$ac_ext
21798 cat >>conftest.$ac_ext <<_ACEOF
21799 /* end confdefs.h.  */
21800 #include <sys/types.h>
21801  /* Check that off_t can represent 2**63 - 1 correctly.
21802     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21803     since some C++ compilers masquerading as C compilers
21804     incorrectly reject 9223372036854775807.  */
21805 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21806   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21807                        && LARGE_OFF_T % 2147483647 == 1)
21808                       ? 1 : -1];
21809 int
21810 main ()
21811 {
21812
21813   ;
21814   return 0;
21815 }
21816 _ACEOF
21817 rm -f conftest.$ac_objext
21818 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21819   (eval $ac_compile) 2>conftest.er1
21820   ac_status=$?
21821   grep -v '^ *+' conftest.er1 >conftest.err
21822   rm -f conftest.er1
21823   cat conftest.err >&5
21824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21825   (exit $ac_status); } &&
21826          { ac_try='test -z "$ac_c_werror_flag"
21827                          || test ! -s conftest.err'
21828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21829   (eval $ac_try) 2>&5
21830   ac_status=$?
21831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21832   (exit $ac_status); }; } &&
21833          { ac_try='test -s conftest.$ac_objext'
21834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21835   (eval $ac_try) 2>&5
21836   ac_status=$?
21837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21838   (exit $ac_status); }; }; then
21839   break
21840 else
21841   echo "$as_me: failed program was:" >&5
21842 sed 's/^/| /' conftest.$ac_ext >&5
21843
21844 fi
21845 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21846   cat >conftest.$ac_ext <<_ACEOF
21847 /* confdefs.h.  */
21848 _ACEOF
21849 cat confdefs.h >>conftest.$ac_ext
21850 cat >>conftest.$ac_ext <<_ACEOF
21851 /* end confdefs.h.  */
21852 #define _FILE_OFFSET_BITS 64
21853 #include <sys/types.h>
21854  /* Check that off_t can represent 2**63 - 1 correctly.
21855     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21856     since some C++ compilers masquerading as C compilers
21857     incorrectly reject 9223372036854775807.  */
21858 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21859   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21860                        && LARGE_OFF_T % 2147483647 == 1)
21861                       ? 1 : -1];
21862 int
21863 main ()
21864 {
21865
21866   ;
21867   return 0;
21868 }
21869 _ACEOF
21870 rm -f conftest.$ac_objext
21871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21872   (eval $ac_compile) 2>conftest.er1
21873   ac_status=$?
21874   grep -v '^ *+' conftest.er1 >conftest.err
21875   rm -f conftest.er1
21876   cat conftest.err >&5
21877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21878   (exit $ac_status); } &&
21879          { ac_try='test -z "$ac_c_werror_flag"
21880                          || test ! -s conftest.err'
21881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21882   (eval $ac_try) 2>&5
21883   ac_status=$?
21884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21885   (exit $ac_status); }; } &&
21886          { ac_try='test -s conftest.$ac_objext'
21887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21888   (eval $ac_try) 2>&5
21889   ac_status=$?
21890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21891   (exit $ac_status); }; }; then
21892   ac_cv_sys_file_offset_bits=64; break
21893 else
21894   echo "$as_me: failed program was:" >&5
21895 sed 's/^/| /' conftest.$ac_ext >&5
21896
21897 fi
21898 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21899   break
21900 done
21901 fi
21902 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21903 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21904 if test "$ac_cv_sys_file_offset_bits" != no; then
21905
21906 cat >>confdefs.h <<_ACEOF
21907 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21908 _ACEOF
21909
21910 fi
21911 rm -f conftest*
21912   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21913 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21914 if test "${ac_cv_sys_large_files+set}" = set; then
21915   echo $ECHO_N "(cached) $ECHO_C" >&6
21916 else
21917   while :; do
21918   ac_cv_sys_large_files=no
21919   cat >conftest.$ac_ext <<_ACEOF
21920 /* confdefs.h.  */
21921 _ACEOF
21922 cat confdefs.h >>conftest.$ac_ext
21923 cat >>conftest.$ac_ext <<_ACEOF
21924 /* end confdefs.h.  */
21925 #include <sys/types.h>
21926  /* Check that off_t can represent 2**63 - 1 correctly.
21927     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21928     since some C++ compilers masquerading as C compilers
21929     incorrectly reject 9223372036854775807.  */
21930 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21931   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21932                        && LARGE_OFF_T % 2147483647 == 1)
21933                       ? 1 : -1];
21934 int
21935 main ()
21936 {
21937
21938   ;
21939   return 0;
21940 }
21941 _ACEOF
21942 rm -f conftest.$ac_objext
21943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21944   (eval $ac_compile) 2>conftest.er1
21945   ac_status=$?
21946   grep -v '^ *+' conftest.er1 >conftest.err
21947   rm -f conftest.er1
21948   cat conftest.err >&5
21949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21950   (exit $ac_status); } &&
21951          { ac_try='test -z "$ac_c_werror_flag"
21952                          || test ! -s conftest.err'
21953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21954   (eval $ac_try) 2>&5
21955   ac_status=$?
21956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21957   (exit $ac_status); }; } &&
21958          { ac_try='test -s conftest.$ac_objext'
21959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21960   (eval $ac_try) 2>&5
21961   ac_status=$?
21962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21963   (exit $ac_status); }; }; then
21964   break
21965 else
21966   echo "$as_me: failed program was:" >&5
21967 sed 's/^/| /' conftest.$ac_ext >&5
21968
21969 fi
21970 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21971   cat >conftest.$ac_ext <<_ACEOF
21972 /* confdefs.h.  */
21973 _ACEOF
21974 cat confdefs.h >>conftest.$ac_ext
21975 cat >>conftest.$ac_ext <<_ACEOF
21976 /* end confdefs.h.  */
21977 #define _LARGE_FILES 1
21978 #include <sys/types.h>
21979  /* Check that off_t can represent 2**63 - 1 correctly.
21980     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21981     since some C++ compilers masquerading as C compilers
21982     incorrectly reject 9223372036854775807.  */
21983 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21984   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21985                        && LARGE_OFF_T % 2147483647 == 1)
21986                       ? 1 : -1];
21987 int
21988 main ()
21989 {
21990
21991   ;
21992   return 0;
21993 }
21994 _ACEOF
21995 rm -f conftest.$ac_objext
21996 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21997   (eval $ac_compile) 2>conftest.er1
21998   ac_status=$?
21999   grep -v '^ *+' conftest.er1 >conftest.err
22000   rm -f conftest.er1
22001   cat conftest.err >&5
22002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22003   (exit $ac_status); } &&
22004          { ac_try='test -z "$ac_c_werror_flag"
22005                          || test ! -s conftest.err'
22006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22007   (eval $ac_try) 2>&5
22008   ac_status=$?
22009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22010   (exit $ac_status); }; } &&
22011          { ac_try='test -s conftest.$ac_objext'
22012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22013   (eval $ac_try) 2>&5
22014   ac_status=$?
22015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22016   (exit $ac_status); }; }; then
22017   ac_cv_sys_large_files=1; break
22018 else
22019   echo "$as_me: failed program was:" >&5
22020 sed 's/^/| /' conftest.$ac_ext >&5
22021
22022 fi
22023 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22024   break
22025 done
22026 fi
22027 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
22028 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
22029 if test "$ac_cv_sys_large_files" != no; then
22030
22031 cat >>confdefs.h <<_ACEOF
22032 #define _LARGE_FILES $ac_cv_sys_large_files
22033 _ACEOF
22034
22035 fi
22036 rm -f conftest*
22037 fi
22038
22039 fi
22040
22041 # SunOS doesn't handle negative byte comparisons properly with +/- return
22042 echo "$as_me:$LINENO: checking for working memcmp" >&5
22043 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
22044 if test "${ac_cv_func_memcmp_working+set}" = set; then
22045   echo $ECHO_N "(cached) $ECHO_C" >&6
22046 else
22047   if test "$cross_compiling" = yes; then
22048   ac_cv_func_memcmp_working=no
22049 else
22050   cat >conftest.$ac_ext <<_ACEOF
22051 /* confdefs.h.  */
22052 _ACEOF
22053 cat confdefs.h >>conftest.$ac_ext
22054 cat >>conftest.$ac_ext <<_ACEOF
22055 /* end confdefs.h.  */
22056 $ac_includes_default
22057 int
22058 main ()
22059 {
22060
22061   /* Some versions of memcmp are not 8-bit clean.  */
22062   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22063   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
22064     exit (1);
22065
22066   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
22067      or more and with at least one buffer not starting on a 4-byte boundary.
22068      William Lewis provided this test program.   */
22069   {
22070     char foo[21];
22071     char bar[21];
22072     int i;
22073     for (i = 0; i < 4; i++)
22074       {
22075         char *a = foo + i;
22076         char *b = bar + i;
22077         strcpy (a, "--------01111111");
22078         strcpy (b, "--------10000000");
22079         if (memcmp (a, b, 16) >= 0)
22080           exit (1);
22081       }
22082     exit (0);
22083   }
22084
22085   ;
22086   return 0;
22087 }
22088 _ACEOF
22089 rm -f conftest$ac_exeext
22090 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22091   (eval $ac_link) 2>&5
22092   ac_status=$?
22093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22094   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22096   (eval $ac_try) 2>&5
22097   ac_status=$?
22098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22099   (exit $ac_status); }; }; then
22100   ac_cv_func_memcmp_working=yes
22101 else
22102   echo "$as_me: program exited with status $ac_status" >&5
22103 echo "$as_me: failed program was:" >&5
22104 sed 's/^/| /' conftest.$ac_ext >&5
22105
22106 ( exit $ac_status )
22107 ac_cv_func_memcmp_working=no
22108 fi
22109 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22110 fi
22111 fi
22112 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
22113 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
22114 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
22115     "memcmp.$ac_objext"   | \
22116   *" memcmp.$ac_objext"   | \
22117     "memcmp.$ac_objext "* | \
22118   *" memcmp.$ac_objext "* ) ;;
22119   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
22120 esac
22121
22122
22123
22124
22125 # Select semaphore implementation type.
22126 if test "$PORTNAME" != "win32"; then
22127   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
22128
22129 cat >>confdefs.h <<\_ACEOF
22130 #define USE_NAMED_POSIX_SEMAPHORES 1
22131 _ACEOF
22132
22133     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
22134   else
22135     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
22136
22137 cat >>confdefs.h <<\_ACEOF
22138 #define USE_UNNAMED_POSIX_SEMAPHORES 1
22139 _ACEOF
22140
22141       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
22142     else
22143
22144 cat >>confdefs.h <<\_ACEOF
22145 #define USE_SYSV_SEMAPHORES 1
22146 _ACEOF
22147
22148       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
22149     fi
22150   fi
22151 else
22152
22153 cat >>confdefs.h <<\_ACEOF
22154 #define USE_WIN32_SEMAPHORES 1
22155 _ACEOF
22156
22157   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
22158 fi
22159
22160
22161 # Select shared-memory implementation type.
22162
22163 cat >>confdefs.h <<\_ACEOF
22164 #define USE_SYSV_SHARED_MEMORY 1
22165 _ACEOF
22166
22167 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
22168
22169
22170 # If not set in template file, set bytes to use libc memset()
22171 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
22172   MEMSET_LOOP_LIMIT=1024
22173 fi
22174
22175 cat >>confdefs.h <<_ACEOF
22176 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
22177 _ACEOF
22178
22179
22180
22181 if test "$enable_nls" = yes ; then
22182
22183   echo "$as_me:$LINENO: checking for library containing gettext" >&5
22184 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
22185 if test "${ac_cv_search_gettext+set}" = set; then
22186   echo $ECHO_N "(cached) $ECHO_C" >&6
22187 else
22188   ac_func_search_save_LIBS=$LIBS
22189 ac_cv_search_gettext=no
22190 cat >conftest.$ac_ext <<_ACEOF
22191 /* confdefs.h.  */
22192 _ACEOF
22193 cat confdefs.h >>conftest.$ac_ext
22194 cat >>conftest.$ac_ext <<_ACEOF
22195 /* end confdefs.h.  */
22196
22197 /* Override any gcc2 internal prototype to avoid an error.  */
22198 #ifdef __cplusplus
22199 extern "C"
22200 #endif
22201 /* We use char because int might match the return type of a gcc2
22202    builtin and then its argument prototype would still apply.  */
22203 char gettext ();
22204 int
22205 main ()
22206 {
22207 gettext ();
22208   ;
22209   return 0;
22210 }
22211 _ACEOF
22212 rm -f conftest.$ac_objext conftest$ac_exeext
22213 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22214   (eval $ac_link) 2>conftest.er1
22215   ac_status=$?
22216   grep -v '^ *+' conftest.er1 >conftest.err
22217   rm -f conftest.er1
22218   cat conftest.err >&5
22219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22220   (exit $ac_status); } &&
22221          { ac_try='test -z "$ac_c_werror_flag"
22222                          || test ! -s conftest.err'
22223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22224   (eval $ac_try) 2>&5
22225   ac_status=$?
22226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22227   (exit $ac_status); }; } &&
22228          { ac_try='test -s conftest$ac_exeext'
22229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22230   (eval $ac_try) 2>&5
22231   ac_status=$?
22232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22233   (exit $ac_status); }; }; then
22234   ac_cv_search_gettext="none required"
22235 else
22236   echo "$as_me: failed program was:" >&5
22237 sed 's/^/| /' conftest.$ac_ext >&5
22238
22239 fi
22240 rm -f conftest.err conftest.$ac_objext \
22241       conftest$ac_exeext conftest.$ac_ext
22242 if test "$ac_cv_search_gettext" = no; then
22243   for ac_lib in intl; do
22244     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22245     cat >conftest.$ac_ext <<_ACEOF
22246 /* confdefs.h.  */
22247 _ACEOF
22248 cat confdefs.h >>conftest.$ac_ext
22249 cat >>conftest.$ac_ext <<_ACEOF
22250 /* end confdefs.h.  */
22251
22252 /* Override any gcc2 internal prototype to avoid an error.  */
22253 #ifdef __cplusplus
22254 extern "C"
22255 #endif
22256 /* We use char because int might match the return type of a gcc2
22257    builtin and then its argument prototype would still apply.  */
22258 char gettext ();
22259 int
22260 main ()
22261 {
22262 gettext ();
22263   ;
22264   return 0;
22265 }
22266 _ACEOF
22267 rm -f conftest.$ac_objext conftest$ac_exeext
22268 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22269   (eval $ac_link) 2>conftest.er1
22270   ac_status=$?
22271   grep -v '^ *+' conftest.er1 >conftest.err
22272   rm -f conftest.er1
22273   cat conftest.err >&5
22274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22275   (exit $ac_status); } &&
22276          { ac_try='test -z "$ac_c_werror_flag"
22277                          || test ! -s conftest.err'
22278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22279   (eval $ac_try) 2>&5
22280   ac_status=$?
22281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22282   (exit $ac_status); }; } &&
22283          { ac_try='test -s conftest$ac_exeext'
22284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22285   (eval $ac_try) 2>&5
22286   ac_status=$?
22287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22288   (exit $ac_status); }; }; then
22289   ac_cv_search_gettext="-l$ac_lib"
22290 break
22291 else
22292   echo "$as_me: failed program was:" >&5
22293 sed 's/^/| /' conftest.$ac_ext >&5
22294
22295 fi
22296 rm -f conftest.err conftest.$ac_objext \
22297       conftest$ac_exeext conftest.$ac_ext
22298   done
22299 fi
22300 LIBS=$ac_func_search_save_LIBS
22301 fi
22302 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
22303 echo "${ECHO_T}$ac_cv_search_gettext" >&6
22304 if test "$ac_cv_search_gettext" != no; then
22305   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
22306
22307 else
22308   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
22309 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
22310    { (exit 1); exit 1; }; }
22311 fi
22312
22313   if test "${ac_cv_header_libintl_h+set}" = set; then
22314   echo "$as_me:$LINENO: checking for libintl.h" >&5
22315 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22316 if test "${ac_cv_header_libintl_h+set}" = set; then
22317   echo $ECHO_N "(cached) $ECHO_C" >&6
22318 fi
22319 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22320 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22321 else
22322   # Is the header compilable?
22323 echo "$as_me:$LINENO: checking libintl.h usability" >&5
22324 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
22325 cat >conftest.$ac_ext <<_ACEOF
22326 /* confdefs.h.  */
22327 _ACEOF
22328 cat confdefs.h >>conftest.$ac_ext
22329 cat >>conftest.$ac_ext <<_ACEOF
22330 /* end confdefs.h.  */
22331 $ac_includes_default
22332 #include <libintl.h>
22333 _ACEOF
22334 rm -f conftest.$ac_objext
22335 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22336   (eval $ac_compile) 2>conftest.er1
22337   ac_status=$?
22338   grep -v '^ *+' conftest.er1 >conftest.err
22339   rm -f conftest.er1
22340   cat conftest.err >&5
22341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22342   (exit $ac_status); } &&
22343          { ac_try='test -z "$ac_c_werror_flag"
22344                          || test ! -s conftest.err'
22345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22346   (eval $ac_try) 2>&5
22347   ac_status=$?
22348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22349   (exit $ac_status); }; } &&
22350          { ac_try='test -s conftest.$ac_objext'
22351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22352   (eval $ac_try) 2>&5
22353   ac_status=$?
22354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22355   (exit $ac_status); }; }; then
22356   ac_header_compiler=yes
22357 else
22358   echo "$as_me: failed program was:" >&5
22359 sed 's/^/| /' conftest.$ac_ext >&5
22360
22361 ac_header_compiler=no
22362 fi
22363 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22364 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22365 echo "${ECHO_T}$ac_header_compiler" >&6
22366
22367 # Is the header present?
22368 echo "$as_me:$LINENO: checking libintl.h presence" >&5
22369 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
22370 cat >conftest.$ac_ext <<_ACEOF
22371 /* confdefs.h.  */
22372 _ACEOF
22373 cat confdefs.h >>conftest.$ac_ext
22374 cat >>conftest.$ac_ext <<_ACEOF
22375 /* end confdefs.h.  */
22376 #include <libintl.h>
22377 _ACEOF
22378 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22379   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22380   ac_status=$?
22381   grep -v '^ *+' conftest.er1 >conftest.err
22382   rm -f conftest.er1
22383   cat conftest.err >&5
22384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22385   (exit $ac_status); } >/dev/null; then
22386   if test -s conftest.err; then
22387     ac_cpp_err=$ac_c_preproc_warn_flag
22388     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22389   else
22390     ac_cpp_err=
22391   fi
22392 else
22393   ac_cpp_err=yes
22394 fi
22395 if test -z "$ac_cpp_err"; then
22396   ac_header_preproc=yes
22397 else
22398   echo "$as_me: failed program was:" >&5
22399 sed 's/^/| /' conftest.$ac_ext >&5
22400
22401   ac_header_preproc=no
22402 fi
22403 rm -f conftest.err conftest.$ac_ext
22404 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22405 echo "${ECHO_T}$ac_header_preproc" >&6
22406
22407 # So?  What about this header?
22408 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22409   yes:no: )
22410     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22411 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22412     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
22413 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
22414     ac_header_preproc=yes
22415     ;;
22416   no:yes:* )
22417     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
22418 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
22419     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
22420 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
22421     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
22422 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
22423     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
22424 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22425     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
22426 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
22427     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
22428 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
22429     (
22430       cat <<\_ASBOX
22431 ## ---------------------------------------- ##
22432 ## Report this to pgsql-bugs@postgresql.org ##
22433 ## ---------------------------------------- ##
22434 _ASBOX
22435     ) |
22436       sed "s/^/$as_me: WARNING:     /" >&2
22437     ;;
22438 esac
22439 echo "$as_me:$LINENO: checking for libintl.h" >&5
22440 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22441 if test "${ac_cv_header_libintl_h+set}" = set; then
22442   echo $ECHO_N "(cached) $ECHO_C" >&6
22443 else
22444   ac_cv_header_libintl_h=$ac_header_preproc
22445 fi
22446 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22447 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22448
22449 fi
22450 if test $ac_cv_header_libintl_h = yes; then
22451   :
22452 else
22453   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
22454 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
22455    { (exit 1); exit 1; }; }
22456 fi
22457
22458
22459   for ac_prog in msgfmt
22460 do
22461   # Extract the first word of "$ac_prog", so it can be a program name with args.
22462 set dummy $ac_prog; ac_word=$2
22463 echo "$as_me:$LINENO: checking for $ac_word" >&5
22464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22465 if test "${ac_cv_prog_MSGFMT+set}" = set; then
22466   echo $ECHO_N "(cached) $ECHO_C" >&6
22467 else
22468   if test -n "$MSGFMT"; then
22469   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
22470 else
22471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22472 for as_dir in $PATH
22473 do
22474   IFS=$as_save_IFS
22475   test -z "$as_dir" && as_dir=.
22476   for ac_exec_ext in '' $ac_executable_extensions; do
22477   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22478     ac_cv_prog_MSGFMT="$ac_prog"
22479     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22480     break 2
22481   fi
22482 done
22483 done
22484
22485 fi
22486 fi
22487 MSGFMT=$ac_cv_prog_MSGFMT
22488 if test -n "$MSGFMT"; then
22489   echo "$as_me:$LINENO: result: $MSGFMT" >&5
22490 echo "${ECHO_T}$MSGFMT" >&6
22491 else
22492   echo "$as_me:$LINENO: result: no" >&5
22493 echo "${ECHO_T}no" >&6
22494 fi
22495
22496   test -n "$MSGFMT" && break
22497 done
22498
22499   if test -z "$MSGFMT"; then
22500     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
22501 echo "$as_me: error: msgfmt is required for NLS" >&2;}
22502    { (exit 1); exit 1; }; }
22503   fi
22504   for ac_prog in msgmerge
22505 do
22506   # Extract the first word of "$ac_prog", so it can be a program name with args.
22507 set dummy $ac_prog; ac_word=$2
22508 echo "$as_me:$LINENO: checking for $ac_word" >&5
22509 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22510 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
22511   echo $ECHO_N "(cached) $ECHO_C" >&6
22512 else
22513   if test -n "$MSGMERGE"; then
22514   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
22515 else
22516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22517 for as_dir in $PATH
22518 do
22519   IFS=$as_save_IFS
22520   test -z "$as_dir" && as_dir=.
22521   for ac_exec_ext in '' $ac_executable_extensions; do
22522   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22523     ac_cv_prog_MSGMERGE="$ac_prog"
22524     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22525     break 2
22526   fi
22527 done
22528 done
22529
22530 fi
22531 fi
22532 MSGMERGE=$ac_cv_prog_MSGMERGE
22533 if test -n "$MSGMERGE"; then
22534   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
22535 echo "${ECHO_T}$MSGMERGE" >&6
22536 else
22537   echo "$as_me:$LINENO: result: no" >&5
22538 echo "${ECHO_T}no" >&6
22539 fi
22540
22541   test -n "$MSGMERGE" && break
22542 done
22543
22544   for ac_prog in xgettext
22545 do
22546   # Extract the first word of "$ac_prog", so it can be a program name with args.
22547 set dummy $ac_prog; ac_word=$2
22548 echo "$as_me:$LINENO: checking for $ac_word" >&5
22549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22550 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
22551   echo $ECHO_N "(cached) $ECHO_C" >&6
22552 else
22553   if test -n "$XGETTEXT"; then
22554   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
22555 else
22556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22557 for as_dir in $PATH
22558 do
22559   IFS=$as_save_IFS
22560   test -z "$as_dir" && as_dir=.
22561   for ac_exec_ext in '' $ac_executable_extensions; do
22562   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22563     ac_cv_prog_XGETTEXT="$ac_prog"
22564     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22565     break 2
22566   fi
22567 done
22568 done
22569
22570 fi
22571 fi
22572 XGETTEXT=$ac_cv_prog_XGETTEXT
22573 if test -n "$XGETTEXT"; then
22574   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
22575 echo "${ECHO_T}$XGETTEXT" >&6
22576 else
22577   echo "$as_me:$LINENO: result: no" >&5
22578 echo "${ECHO_T}no" >&6
22579 fi
22580
22581   test -n "$XGETTEXT" && break
22582 done
22583
22584
22585   # Note: share/locale is always the default, independent of $datadir
22586   localedir='${prefix}/share/locale'
22587
22588
22589 fi
22590
22591 # Check for Tcl configuration script tclConfig.sh
22592 if test "$with_tcl" = yes; then
22593     for ac_prog in tclsh tcl
22594 do
22595   # Extract the first word of "$ac_prog", so it can be a program name with args.
22596 set dummy $ac_prog; ac_word=$2
22597 echo "$as_me:$LINENO: checking for $ac_word" >&5
22598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22599 if test "${ac_cv_path_TCLSH+set}" = set; then
22600   echo $ECHO_N "(cached) $ECHO_C" >&6
22601 else
22602   case $TCLSH in
22603   [\\/]* | ?:[\\/]*)
22604   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22605   ;;
22606   *)
22607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22608 for as_dir in $PATH
22609 do
22610   IFS=$as_save_IFS
22611   test -z "$as_dir" && as_dir=.
22612   for ac_exec_ext in '' $ac_executable_extensions; do
22613   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22614     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22615     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22616     break 2
22617   fi
22618 done
22619 done
22620
22621   ;;
22622 esac
22623 fi
22624 TCLSH=$ac_cv_path_TCLSH
22625
22626 if test -n "$TCLSH"; then
22627   echo "$as_me:$LINENO: result: $TCLSH" >&5
22628 echo "${ECHO_T}$TCLSH" >&6
22629 else
22630   echo "$as_me:$LINENO: result: no" >&5
22631 echo "${ECHO_T}no" >&6
22632 fi
22633
22634   test -n "$TCLSH" && break
22635 done
22636
22637 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22638 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22639 # Let user override test
22640 if test -z "$TCL_CONFIG_SH"; then
22641     pgac_test_dirs="$with_tclconfig"
22642
22643     set X $pgac_test_dirs; shift
22644     if test $# -eq 0; then
22645         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22646 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22647    { (exit 1); exit 1; }; }
22648         set X `echo 'puts $auto_path' | $TCLSH`; shift
22649     fi
22650
22651     for pgac_dir do
22652         if test -r "$pgac_dir/tclConfig.sh"; then
22653             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22654             break
22655         fi
22656     done
22657 fi
22658
22659 if test -z "$TCL_CONFIG_SH"; then
22660     echo "$as_me:$LINENO: result: no" >&5
22661 echo "${ECHO_T}no" >&6
22662     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22663 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22664    { (exit 1); exit 1; }; }
22665 else
22666     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22667 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22668 fi
22669
22670
22671
22672     . "$TCL_CONFIG_SH"
22673 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22674 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22675 eval TCL_LIBS=\"$TCL_LIBS\"
22676 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22677 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22678
22679         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22680     ac_save_CPPFLAGS=$CPPFLAGS
22681     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22682     if test "${ac_cv_header_tcl_h+set}" = set; then
22683   echo "$as_me:$LINENO: checking for tcl.h" >&5
22684 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22685 if test "${ac_cv_header_tcl_h+set}" = set; then
22686   echo $ECHO_N "(cached) $ECHO_C" >&6
22687 fi
22688 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22689 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22690 else
22691   # Is the header compilable?
22692 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22693 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22694 cat >conftest.$ac_ext <<_ACEOF
22695 /* confdefs.h.  */
22696 _ACEOF
22697 cat confdefs.h >>conftest.$ac_ext
22698 cat >>conftest.$ac_ext <<_ACEOF
22699 /* end confdefs.h.  */
22700 $ac_includes_default
22701 #include <tcl.h>
22702 _ACEOF
22703 rm -f conftest.$ac_objext
22704 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22705   (eval $ac_compile) 2>conftest.er1
22706   ac_status=$?
22707   grep -v '^ *+' conftest.er1 >conftest.err
22708   rm -f conftest.er1
22709   cat conftest.err >&5
22710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22711   (exit $ac_status); } &&
22712          { ac_try='test -z "$ac_c_werror_flag"
22713                          || test ! -s conftest.err'
22714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22715   (eval $ac_try) 2>&5
22716   ac_status=$?
22717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22718   (exit $ac_status); }; } &&
22719          { ac_try='test -s conftest.$ac_objext'
22720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22721   (eval $ac_try) 2>&5
22722   ac_status=$?
22723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22724   (exit $ac_status); }; }; then
22725   ac_header_compiler=yes
22726 else
22727   echo "$as_me: failed program was:" >&5
22728 sed 's/^/| /' conftest.$ac_ext >&5
22729
22730 ac_header_compiler=no
22731 fi
22732 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22733 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22734 echo "${ECHO_T}$ac_header_compiler" >&6
22735
22736 # Is the header present?
22737 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22738 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22739 cat >conftest.$ac_ext <<_ACEOF
22740 /* confdefs.h.  */
22741 _ACEOF
22742 cat confdefs.h >>conftest.$ac_ext
22743 cat >>conftest.$ac_ext <<_ACEOF
22744 /* end confdefs.h.  */
22745 #include <tcl.h>
22746 _ACEOF
22747 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22748   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22749   ac_status=$?
22750   grep -v '^ *+' conftest.er1 >conftest.err
22751   rm -f conftest.er1
22752   cat conftest.err >&5
22753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22754   (exit $ac_status); } >/dev/null; then
22755   if test -s conftest.err; then
22756     ac_cpp_err=$ac_c_preproc_warn_flag
22757     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22758   else
22759     ac_cpp_err=
22760   fi
22761 else
22762   ac_cpp_err=yes
22763 fi
22764 if test -z "$ac_cpp_err"; then
22765   ac_header_preproc=yes
22766 else
22767   echo "$as_me: failed program was:" >&5
22768 sed 's/^/| /' conftest.$ac_ext >&5
22769
22770   ac_header_preproc=no
22771 fi
22772 rm -f conftest.err conftest.$ac_ext
22773 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22774 echo "${ECHO_T}$ac_header_preproc" >&6
22775
22776 # So?  What about this header?
22777 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22778   yes:no: )
22779     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22780 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22781     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22782 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22783     ac_header_preproc=yes
22784     ;;
22785   no:yes:* )
22786     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22787 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22788     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22789 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22790     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22791 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22792     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22793 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22794     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22795 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22796     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22797 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22798     (
22799       cat <<\_ASBOX
22800 ## ---------------------------------------- ##
22801 ## Report this to pgsql-bugs@postgresql.org ##
22802 ## ---------------------------------------- ##
22803 _ASBOX
22804     ) |
22805       sed "s/^/$as_me: WARNING:     /" >&2
22806     ;;
22807 esac
22808 echo "$as_me:$LINENO: checking for tcl.h" >&5
22809 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22810 if test "${ac_cv_header_tcl_h+set}" = set; then
22811   echo $ECHO_N "(cached) $ECHO_C" >&6
22812 else
22813   ac_cv_header_tcl_h=$ac_header_preproc
22814 fi
22815 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22816 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22817
22818 fi
22819 if test $ac_cv_header_tcl_h = yes; then
22820   :
22821 else
22822   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22823 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22824    { (exit 1); exit 1; }; }
22825 fi
22826
22827
22828     CPPFLAGS=$ac_save_CPPFLAGS
22829 fi
22830
22831 #
22832 # Check for DocBook and tools
22833 #
22834 for ac_prog in onsgmls nsgmls
22835 do
22836   # Extract the first word of "$ac_prog", so it can be a program name with args.
22837 set dummy $ac_prog; ac_word=$2
22838 echo "$as_me:$LINENO: checking for $ac_word" >&5
22839 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22840 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22841   echo $ECHO_N "(cached) $ECHO_C" >&6
22842 else
22843   if test -n "$NSGMLS"; then
22844   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22845 else
22846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22847 for as_dir in $PATH
22848 do
22849   IFS=$as_save_IFS
22850   test -z "$as_dir" && as_dir=.
22851   for ac_exec_ext in '' $ac_executable_extensions; do
22852   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22853     ac_cv_prog_NSGMLS="$ac_prog"
22854     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22855     break 2
22856   fi
22857 done
22858 done
22859
22860 fi
22861 fi
22862 NSGMLS=$ac_cv_prog_NSGMLS
22863 if test -n "$NSGMLS"; then
22864   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22865 echo "${ECHO_T}$NSGMLS" >&6
22866 else
22867   echo "$as_me:$LINENO: result: no" >&5
22868 echo "${ECHO_T}no" >&6
22869 fi
22870
22871   test -n "$NSGMLS" && break
22872 done
22873
22874 for ac_prog in openjade jade
22875 do
22876   # Extract the first word of "$ac_prog", so it can be a program name with args.
22877 set dummy $ac_prog; ac_word=$2
22878 echo "$as_me:$LINENO: checking for $ac_word" >&5
22879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22880 if test "${ac_cv_prog_JADE+set}" = set; then
22881   echo $ECHO_N "(cached) $ECHO_C" >&6
22882 else
22883   if test -n "$JADE"; then
22884   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22885 else
22886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22887 for as_dir in $PATH
22888 do
22889   IFS=$as_save_IFS
22890   test -z "$as_dir" && as_dir=.
22891   for ac_exec_ext in '' $ac_executable_extensions; do
22892   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22893     ac_cv_prog_JADE="$ac_prog"
22894     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22895     break 2
22896   fi
22897 done
22898 done
22899
22900 fi
22901 fi
22902 JADE=$ac_cv_prog_JADE
22903 if test -n "$JADE"; then
22904   echo "$as_me:$LINENO: result: $JADE" >&5
22905 echo "${ECHO_T}$JADE" >&6
22906 else
22907   echo "$as_me:$LINENO: result: no" >&5
22908 echo "${ECHO_T}no" >&6
22909 fi
22910
22911   test -n "$JADE" && break
22912 done
22913
22914
22915 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22916 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22917 if test "${pgac_cv_check_docbook+set}" = set; then
22918   echo $ECHO_N "(cached) $ECHO_C" >&6
22919 else
22920   cat >conftest.sgml <<EOF
22921 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22922 <book>
22923  <title>test</title>
22924  <chapter>
22925   <title>random</title>
22926    <sect1>
22927     <title>testsect</title>
22928     <para>text</para>
22929   </sect1>
22930  </chapter>
22931 </book>
22932 EOF
22933
22934 pgac_cv_check_docbook=no
22935
22936 if test -n "$NSGMLS"; then
22937   $NSGMLS -s conftest.sgml 1>&5 2>&1
22938   if test $? -eq 0; then
22939     pgac_cv_check_docbook=yes
22940   fi
22941 fi
22942 rm -f conftest.sgml
22943 fi
22944 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22945 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22946
22947 have_docbook=$pgac_cv_check_docbook
22948
22949
22950 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22951 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22952 if test "${pgac_cv_path_stylesheets+set}" = set; then
22953   echo $ECHO_N "(cached) $ECHO_C" >&6
22954 else
22955   if test -n "$DOCBOOKSTYLE"; then
22956   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22957 else
22958   for pgac_prefix in /usr /usr/local /opt; do
22959     for pgac_infix in share lib; do
22960       for pgac_postfix in \
22961         sgml/stylesheets/nwalsh-modular \
22962         sgml/stylesheets/docbook \
22963                 sgml/docbook-dsssl \
22964         sgml/docbook/dsssl/modular \
22965         sgml/docbook/stylesheet/dsssl/modular \
22966         sgml/docbook/dsssl-stylesheets
22967       do
22968         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22969         if test -r "$pgac_candidate/html/docbook.dsl" \
22970            && test -r "$pgac_candidate/print/docbook.dsl"
22971         then
22972           pgac_cv_path_stylesheets=$pgac_candidate
22973           break 3
22974         fi
22975       done
22976     done
22977   done
22978 fi
22979 fi
22980
22981 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22982
22983 if test -n "$DOCBOOKSTYLE"; then
22984   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22985 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22986 else
22987   echo "$as_me:$LINENO: result: no" >&5
22988 echo "${ECHO_T}no" >&6
22989 fi
22990 if test -n "$DOCBOOKSTYLE"; then
22991   for ac_prog in collateindex.pl
22992 do
22993   # Extract the first word of "$ac_prog", so it can be a program name with args.
22994 set dummy $ac_prog; ac_word=$2
22995 echo "$as_me:$LINENO: checking for $ac_word" >&5
22996 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22997 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22998   echo $ECHO_N "(cached) $ECHO_C" >&6
22999 else
23000   case $COLLATEINDEX in
23001   [\\/]* | ?:[\\/]*)
23002   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
23003   ;;
23004   *)
23005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23006 for as_dir in $DOCBOOKSTYLE/bin $PATH
23007 do
23008   IFS=$as_save_IFS
23009   test -z "$as_dir" && as_dir=.
23010   for ac_exec_ext in '' $ac_executable_extensions; do
23011   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23012     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
23013     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23014     break 2
23015   fi
23016 done
23017 done
23018
23019   ;;
23020 esac
23021 fi
23022 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
23023
23024 if test -n "$COLLATEINDEX"; then
23025   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
23026 echo "${ECHO_T}$COLLATEINDEX" >&6
23027 else
23028   echo "$as_me:$LINENO: result: no" >&5
23029 echo "${ECHO_T}no" >&6
23030 fi
23031
23032   test -n "$COLLATEINDEX" && break
23033 done
23034
23035 else
23036   for ac_prog in collateindex.pl
23037 do
23038   # Extract the first word of "$ac_prog", so it can be a program name with args.
23039 set dummy $ac_prog; ac_word=$2
23040 echo "$as_me:$LINENO: checking for $ac_word" >&5
23041 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23042 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
23043   echo $ECHO_N "(cached) $ECHO_C" >&6
23044 else
23045   case $COLLATEINDEX in
23046   [\\/]* | ?:[\\/]*)
23047   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
23048   ;;
23049   *)
23050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23051 for as_dir in $PATH
23052 do
23053   IFS=$as_save_IFS
23054   test -z "$as_dir" && as_dir=.
23055   for ac_exec_ext in '' $ac_executable_extensions; do
23056   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23057     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
23058     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23059     break 2
23060   fi
23061 done
23062 done
23063
23064   ;;
23065 esac
23066 fi
23067 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
23068
23069 if test -n "$COLLATEINDEX"; then
23070   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
23071 echo "${ECHO_T}$COLLATEINDEX" >&6
23072 else
23073   echo "$as_me:$LINENO: result: no" >&5
23074 echo "${ECHO_T}no" >&6
23075 fi
23076
23077   test -n "$COLLATEINDEX" && break
23078 done
23079
23080 fi
23081 for ac_prog in sgmlspl
23082 do
23083   # Extract the first word of "$ac_prog", so it can be a program name with args.
23084 set dummy $ac_prog; ac_word=$2
23085 echo "$as_me:$LINENO: checking for $ac_word" >&5
23086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23087 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
23088   echo $ECHO_N "(cached) $ECHO_C" >&6
23089 else
23090   if test -n "$SGMLSPL"; then
23091   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
23092 else
23093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23094 for as_dir in $PATH
23095 do
23096   IFS=$as_save_IFS
23097   test -z "$as_dir" && as_dir=.
23098   for ac_exec_ext in '' $ac_executable_extensions; do
23099   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23100     ac_cv_prog_SGMLSPL="$ac_prog"
23101     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23102     break 2
23103   fi
23104 done
23105 done
23106
23107 fi
23108 fi
23109 SGMLSPL=$ac_cv_prog_SGMLSPL
23110 if test -n "$SGMLSPL"; then
23111   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
23112 echo "${ECHO_T}$SGMLSPL" >&6
23113 else
23114   echo "$as_me:$LINENO: result: no" >&5
23115 echo "${ECHO_T}no" >&6
23116 fi
23117
23118   test -n "$SGMLSPL" && break
23119 done
23120
23121
23122 # Thread testing
23123
23124 # We have to run the thread test near the end so we have all our symbols
23125 # defined.  Cross compiling throws a warning.
23126 #
23127 if test "$enable_thread_safety_force" = yes; then
23128 if test x"$template" != x"win32"
23129 then
23130   { echo "$as_me:$LINENO: WARNING:
23131 *** Skipping thread test program.  --enable-thread-safety-force was used.
23132 *** Run the program in src/test/thread on the your machine and add proper
23133 *** locking function calls to your applications to guarantee thread safety.
23134 " >&5
23135 echo "$as_me: WARNING:
23136 *** Skipping thread test program.  --enable-thread-safety-force was used.
23137 *** Run the program in src/test/thread on the your machine and add proper
23138 *** locking function calls to your applications to guarantee thread safety.
23139 " >&2;}
23140 else
23141 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
23142 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
23143 fi
23144 elif test "$enable_thread_safety" = yes; then
23145 if test x"$template" != x"win32"
23146 then
23147 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
23148 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
23149
23150 _CFLAGS="$CFLAGS"
23151 _LIBS="$LIBS"
23152 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
23153 LIBS="$LIBS $PTHREAD_LIBS"
23154 if test "$cross_compiling" = yes; then
23155   echo "$as_me:$LINENO: result: maybe" >&5
23156 echo "${ECHO_T}maybe" >&6
23157   { echo "$as_me:$LINENO: WARNING:
23158 *** Skipping thread test program because of cross-compile build.
23159 *** Run the program in src/test/thread on the target machine.
23160 " >&5
23161 echo "$as_me: WARNING:
23162 *** Skipping thread test program because of cross-compile build.
23163 *** Run the program in src/test/thread on the target machine.
23164 " >&2;}
23165 else
23166   cat >conftest.$ac_ext <<_ACEOF
23167 /* confdefs.h.  */
23168 _ACEOF
23169 cat confdefs.h >>conftest.$ac_ext
23170 cat >>conftest.$ac_ext <<_ACEOF
23171 /* end confdefs.h.  */
23172 #include "$srcdir/src/test/thread/thread_test.c"
23173 _ACEOF
23174 rm -f conftest$ac_exeext
23175 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23176   (eval $ac_link) 2>&5
23177   ac_status=$?
23178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23179   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23181   (eval $ac_try) 2>&5
23182   ac_status=$?
23183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23184   (exit $ac_status); }; }; then
23185   echo "$as_me:$LINENO: result: yes" >&5
23186 echo "${ECHO_T}yes" >&6
23187 else
23188   echo "$as_me: program exited with status $ac_status" >&5
23189 echo "$as_me: failed program was:" >&5
23190 sed 's/^/| /' conftest.$ac_ext >&5
23191
23192 ( exit $ac_status )
23193 echo "$as_me:$LINENO: result: no" >&5
23194 echo "${ECHO_T}no" >&6
23195   { { echo "$as_me:$LINENO: error: thread test program failed
23196 This platform is not thread-safe.  Check the file 'config.log'for the
23197 exact reason.
23198
23199 You can use the configure option --enable-thread-safety-force to force
23200 threads to be enabled.  But you must then run the program in
23201 src/test/thread and add locking function calls to your applications to
23202 guarantee thread safety." >&5
23203 echo "$as_me: error: thread test program failed
23204 This platform is not thread-safe.  Check the file 'config.log'for the
23205 exact reason.
23206
23207 You can use the configure option --enable-thread-safety-force to force
23208 threads to be enabled.  But you must then run the program in
23209 src/test/thread and add locking function calls to your applications to
23210 guarantee thread safety." >&2;}
23211    { (exit 1); exit 1; }; }
23212 fi
23213 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23214 fi
23215 CFLAGS="$_CFLAGS"
23216 LIBS="$_LIBS"
23217 else
23218 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
23219 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
23220 fi
23221 fi
23222
23223 # prepare build tree if outside source tree
23224 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
23225 # Note 2: /bin/pwd might be better than shell's built-in at getting
23226 #         a symlink-free name.
23227 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
23228   vpath_build=no
23229 else
23230   vpath_build=yes
23231   if test "$no_create" != yes; then
23232     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
23233     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
23234     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
23235       || { { echo "$as_me:$LINENO: error: failed" >&5
23236 echo "$as_me: error: failed" >&2;}
23237    { (exit 1); exit 1; }; }
23238     echo "$as_me:$LINENO: result: done" >&5
23239 echo "${ECHO_T}done" >&6
23240   fi
23241 fi
23242
23243
23244
23245                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
23246
23247
23248                                                             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}"
23249
23250
23251 if test "$PORTNAME" = "win32"; then
23252           ac_config_commands="$ac_config_commands check_win32_symlinks"
23253
23254 fi
23255
23256           ac_config_headers="$ac_config_headers src/include/pg_config.h"
23257
23258
23259           ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
23260
23261
23262 cat >confcache <<\_ACEOF
23263 # This file is a shell script that caches the results of configure
23264 # tests run on this system so they can be shared between configure
23265 # scripts and configure runs, see configure's option --config-cache.
23266 # It is not useful on other systems.  If it contains results you don't
23267 # want to keep, you may remove or edit it.
23268 #
23269 # config.status only pays attention to the cache file if you give it
23270 # the --recheck option to rerun configure.
23271 #
23272 # `ac_cv_env_foo' variables (set or unset) will be overridden when
23273 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23274 # following values.
23275
23276 _ACEOF
23277
23278 # The following way of writing the cache mishandles newlines in values,
23279 # but we know of no workaround that is simple, portable, and efficient.
23280 # So, don't put newlines in cache variables' values.
23281 # Ultrix sh set writes to stderr and can't be redirected directly,
23282 # and sets the high bit in the cache file unless we assign to the vars.
23283 {
23284   (set) 2>&1 |
23285     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23286     *ac_space=\ *)
23287       # `set' does not quote correctly, so add quotes (double-quote
23288       # substitution turns \\\\ into \\, and sed turns \\ into \).
23289       sed -n \
23290         "s/'/'\\\\''/g;
23291           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23292       ;;
23293     *)
23294       # `set' quotes correctly as required by POSIX, so do not add quotes.
23295       sed -n \
23296         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23297       ;;
23298     esac;
23299 } |
23300   sed '
23301      t clear
23302      : clear
23303      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23304      t end
23305      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23306      : end' >>confcache
23307 if diff $cache_file confcache >/dev/null 2>&1; then :; else
23308   if test -w $cache_file; then
23309     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23310     cat confcache >$cache_file
23311   else
23312     echo "not updating unwritable cache $cache_file"
23313   fi
23314 fi
23315 rm -f confcache
23316
23317 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23318 # Let make expand exec_prefix.
23319 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23320
23321 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23322 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23323 # trailing colons and then remove the whole line if VPATH becomes empty
23324 # (actually we leave an empty line to preserve line numbers).
23325 if test "x$srcdir" = x.; then
23326   ac_vpsub='/^[  ]*VPATH[        ]*=/{
23327 s/:*\$(srcdir):*/:/;
23328 s/:*\${srcdir}:*/:/;
23329 s/:*@srcdir@:*/:/;
23330 s/^\([^=]*=[     ]*\):*/\1/;
23331 s/:*$//;
23332 s/^[^=]*=[       ]*$//;
23333 }'
23334 fi
23335
23336 DEFS=-DHAVE_CONFIG_H
23337
23338 ac_libobjs=
23339 ac_ltlibobjs=
23340 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23341   # 1. Remove the extension, and $U if already installed.
23342   ac_i=`echo "$ac_i" |
23343          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
23344   # 2. Add them.
23345   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23346   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23347 done
23348 LIBOBJS=$ac_libobjs
23349
23350 LTLIBOBJS=$ac_ltlibobjs
23351
23352
23353
23354 : ${CONFIG_STATUS=./config.status}
23355 ac_clean_files_save=$ac_clean_files
23356 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23357 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23358 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23359 cat >$CONFIG_STATUS <<_ACEOF
23360 #! $SHELL
23361 # Generated by $as_me.
23362 # Run this file to recreate the current configuration.
23363 # Compiler output produced by configure, useful for debugging
23364 # configure, is in config.log if it exists.
23365
23366 debug=false
23367 ac_cs_recheck=false
23368 ac_cs_silent=false
23369 SHELL=\${CONFIG_SHELL-$SHELL}
23370 _ACEOF
23371
23372 cat >>$CONFIG_STATUS <<\_ACEOF
23373 ## --------------------- ##
23374 ## M4sh Initialization.  ##
23375 ## --------------------- ##
23376
23377 # Be Bourne compatible
23378 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23379   emulate sh
23380   NULLCMD=:
23381   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23382   # is contrary to our usage.  Disable this feature.
23383   alias -g '${1+"$@"}'='"$@"'
23384 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23385   set -o posix
23386 fi
23387 DUALCASE=1; export DUALCASE # for MKS sh
23388
23389 # Support unset when possible.
23390 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23391   as_unset=unset
23392 else
23393   as_unset=false
23394 fi
23395
23396
23397 # Work around bugs in pre-3.0 UWIN ksh.
23398 $as_unset ENV MAIL MAILPATH
23399 PS1='$ '
23400 PS2='> '
23401 PS4='+ '
23402
23403 # NLS nuisances.
23404 for as_var in \
23405   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23406   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23407   LC_TELEPHONE LC_TIME
23408 do
23409   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23410     eval $as_var=C; export $as_var
23411   else
23412     $as_unset $as_var
23413   fi
23414 done
23415
23416 # Required to use basename.
23417 if expr a : '\(a\)' >/dev/null 2>&1; then
23418   as_expr=expr
23419 else
23420   as_expr=false
23421 fi
23422
23423 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23424   as_basename=basename
23425 else
23426   as_basename=false
23427 fi
23428
23429
23430 # Name of the executable.
23431 as_me=`$as_basename "$0" ||
23432 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23433          X"$0" : 'X\(//\)$' \| \
23434          X"$0" : 'X\(/\)$' \| \
23435          .     : '\(.\)' 2>/dev/null ||
23436 echo X/"$0" |
23437     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23438           /^X\/\(\/\/\)$/{ s//\1/; q; }
23439           /^X\/\(\/\).*/{ s//\1/; q; }
23440           s/.*/./; q'`
23441
23442
23443 # PATH needs CR, and LINENO needs CR and PATH.
23444 # Avoid depending upon Character Ranges.
23445 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23446 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23447 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23448 as_cr_digits='0123456789'
23449 as_cr_alnum=$as_cr_Letters$as_cr_digits
23450
23451 # The user is always right.
23452 if test "${PATH_SEPARATOR+set}" != set; then
23453   echo "#! /bin/sh" >conf$$.sh
23454   echo  "exit 0"   >>conf$$.sh
23455   chmod +x conf$$.sh
23456   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23457     PATH_SEPARATOR=';'
23458   else
23459     PATH_SEPARATOR=:
23460   fi
23461   rm -f conf$$.sh
23462 fi
23463
23464
23465   as_lineno_1=$LINENO
23466   as_lineno_2=$LINENO
23467   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23468   test "x$as_lineno_1" != "x$as_lineno_2" &&
23469   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
23470   # Find who we are.  Look in the path if we contain no path at all
23471   # relative or not.
23472   case $0 in
23473     *[\\/]* ) as_myself=$0 ;;
23474     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23475 for as_dir in $PATH
23476 do
23477   IFS=$as_save_IFS
23478   test -z "$as_dir" && as_dir=.
23479   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23480 done
23481
23482        ;;
23483   esac
23484   # We did not find ourselves, most probably we were run as `sh COMMAND'
23485   # in which case we are not to be found in the path.
23486   if test "x$as_myself" = x; then
23487     as_myself=$0
23488   fi
23489   if test ! -f "$as_myself"; then
23490     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23491 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23492    { (exit 1); exit 1; }; }
23493   fi
23494   case $CONFIG_SHELL in
23495   '')
23496     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23497 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23498 do
23499   IFS=$as_save_IFS
23500   test -z "$as_dir" && as_dir=.
23501   for as_base in sh bash ksh sh5; do
23502          case $as_dir in
23503          /*)
23504            if ("$as_dir/$as_base" -c '
23505   as_lineno_1=$LINENO
23506   as_lineno_2=$LINENO
23507   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23508   test "x$as_lineno_1" != "x$as_lineno_2" &&
23509   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
23510              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23511              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23512              CONFIG_SHELL=$as_dir/$as_base
23513              export CONFIG_SHELL
23514              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23515            fi;;
23516          esac
23517        done
23518 done
23519 ;;
23520   esac
23521
23522   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23523   # uniformly replaced by the line number.  The first 'sed' inserts a
23524   # line-number line before each line; the second 'sed' does the real
23525   # work.  The second script uses 'N' to pair each line-number line
23526   # with the numbered line, and appends trailing '-' during
23527   # substitution so that $LINENO is not a special case at line end.
23528   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23529   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23530   sed '=' <$as_myself |
23531     sed '
23532       N
23533       s,$,-,
23534       : loop
23535       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23536       t loop
23537       s,-$,,
23538       s,^['$as_cr_digits']*\n,,
23539     ' >$as_me.lineno &&
23540   chmod +x $as_me.lineno ||
23541     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23542 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23543    { (exit 1); exit 1; }; }
23544
23545   # Don't try to exec as it changes $[0], causing all sort of problems
23546   # (the dirname of $[0] is not the place where we might find the
23547   # original and so on.  Autoconf is especially sensible to this).
23548   . ./$as_me.lineno
23549   # Exit status is that of the last command.
23550   exit
23551 }
23552
23553
23554 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23555   *c*,-n*) ECHO_N= ECHO_C='
23556 ' ECHO_T='      ' ;;
23557   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23558   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23559 esac
23560
23561 if expr a : '\(a\)' >/dev/null 2>&1; then
23562   as_expr=expr
23563 else
23564   as_expr=false
23565 fi
23566
23567 rm -f conf$$ conf$$.exe conf$$.file
23568 echo >conf$$.file
23569 if ln -s conf$$.file conf$$ 2>/dev/null; then
23570   # We could just check for DJGPP; but this test a) works b) is more generic
23571   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23572   if test -f conf$$.exe; then
23573     # Don't use ln at all; we don't have any links
23574     as_ln_s='cp -p'
23575   else
23576     as_ln_s='ln -s'
23577   fi
23578 elif ln conf$$.file conf$$ 2>/dev/null; then
23579   as_ln_s=ln
23580 else
23581   as_ln_s='cp -p'
23582 fi
23583 rm -f conf$$ conf$$.exe conf$$.file
23584
23585 if mkdir -p . 2>/dev/null; then
23586   as_mkdir_p=:
23587 else
23588   test -d ./-p && rmdir ./-p
23589   as_mkdir_p=false
23590 fi
23591
23592 as_executable_p="test -f"
23593
23594 # Sed expression to map a string onto a valid CPP name.
23595 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23596
23597 # Sed expression to map a string onto a valid variable name.
23598 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23599
23600
23601 # IFS
23602 # We need space, tab and new line, in precisely that order.
23603 as_nl='
23604 '
23605 IFS="   $as_nl"
23606
23607 # CDPATH.
23608 $as_unset CDPATH
23609
23610 exec 6>&1
23611
23612 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23613 # report actual input values of CONFIG_FILES etc. instead of their
23614 # values after options handling.  Logging --version etc. is OK.
23615 exec 5>>config.log
23616 {
23617   echo
23618   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23619 ## Running $as_me. ##
23620 _ASBOX
23621 } >&5
23622 cat >&5 <<_CSEOF
23623
23624 This file was extended by PostgreSQL $as_me 8.3devel, which was
23625 generated by GNU Autoconf 2.59.  Invocation command line was
23626
23627   CONFIG_FILES    = $CONFIG_FILES
23628   CONFIG_HEADERS  = $CONFIG_HEADERS
23629   CONFIG_LINKS    = $CONFIG_LINKS
23630   CONFIG_COMMANDS = $CONFIG_COMMANDS
23631   $ $0 $@
23632
23633 _CSEOF
23634 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23635 echo >&5
23636 _ACEOF
23637
23638 # Files that config.status was made for.
23639 if test -n "$ac_config_files"; then
23640   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23641 fi
23642
23643 if test -n "$ac_config_headers"; then
23644   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23645 fi
23646
23647 if test -n "$ac_config_links"; then
23648   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23649 fi
23650
23651 if test -n "$ac_config_commands"; then
23652   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23653 fi
23654
23655 cat >>$CONFIG_STATUS <<\_ACEOF
23656
23657 ac_cs_usage="\
23658 \`$as_me' instantiates files from templates according to the
23659 current configuration.
23660
23661 Usage: $0 [OPTIONS] [FILE]...
23662
23663   -h, --help       print this help, then exit
23664   -V, --version    print version number, then exit
23665   -q, --quiet      do not print progress messages
23666   -d, --debug      don't remove temporary files
23667       --recheck    update $as_me by reconfiguring in the same conditions
23668   --file=FILE[:TEMPLATE]
23669                    instantiate the configuration file FILE
23670   --header=FILE[:TEMPLATE]
23671                    instantiate the configuration header FILE
23672
23673 Configuration files:
23674 $config_files
23675
23676 Configuration headers:
23677 $config_headers
23678
23679 Configuration links:
23680 $config_links
23681
23682 Configuration commands:
23683 $config_commands
23684
23685 Report bugs to <bug-autoconf@gnu.org>."
23686 _ACEOF
23687
23688 cat >>$CONFIG_STATUS <<_ACEOF
23689 ac_cs_version="\\
23690 PostgreSQL config.status 8.3devel
23691 configured by $0, generated by GNU Autoconf 2.59,
23692   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23693
23694 Copyright (C) 2003 Free Software Foundation, Inc.
23695 This config.status script is free software; the Free Software Foundation
23696 gives unlimited permission to copy, distribute and modify it."
23697 srcdir=$srcdir
23698 _ACEOF
23699
23700 cat >>$CONFIG_STATUS <<\_ACEOF
23701 # If no file are specified by the user, then we need to provide default
23702 # value.  By we need to know if files were specified by the user.
23703 ac_need_defaults=:
23704 while test $# != 0
23705 do
23706   case $1 in
23707   --*=*)
23708     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23709     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23710     ac_shift=:
23711     ;;
23712   -*)
23713     ac_option=$1
23714     ac_optarg=$2
23715     ac_shift=shift
23716     ;;
23717   *) # This is not an option, so the user has probably given explicit
23718      # arguments.
23719      ac_option=$1
23720      ac_need_defaults=false;;
23721   esac
23722
23723   case $ac_option in
23724   # Handling of the options.
23725 _ACEOF
23726 cat >>$CONFIG_STATUS <<\_ACEOF
23727   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23728     ac_cs_recheck=: ;;
23729   --version | --vers* | -V )
23730     echo "$ac_cs_version"; exit 0 ;;
23731   --he | --h)
23732     # Conflict between --help and --header
23733     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23734 Try \`$0 --help' for more information." >&5
23735 echo "$as_me: error: ambiguous option: $1
23736 Try \`$0 --help' for more information." >&2;}
23737    { (exit 1); exit 1; }; };;
23738   --help | --hel | -h )
23739     echo "$ac_cs_usage"; exit 0 ;;
23740   --debug | --d* | -d )
23741     debug=: ;;
23742   --file | --fil | --fi | --f )
23743     $ac_shift
23744     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23745     ac_need_defaults=false;;
23746   --header | --heade | --head | --hea )
23747     $ac_shift
23748     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23749     ac_need_defaults=false;;
23750   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23751   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23752     ac_cs_silent=: ;;
23753
23754   # This is an error.
23755   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23756 Try \`$0 --help' for more information." >&5
23757 echo "$as_me: error: unrecognized option: $1
23758 Try \`$0 --help' for more information." >&2;}
23759    { (exit 1); exit 1; }; } ;;
23760
23761   *) ac_config_targets="$ac_config_targets $1" ;;
23762
23763   esac
23764   shift
23765 done
23766
23767 ac_configure_extra_args=
23768
23769 if $ac_cs_silent; then
23770   exec 6>/dev/null
23771   ac_configure_extra_args="$ac_configure_extra_args --silent"
23772 fi
23773
23774 _ACEOF
23775 cat >>$CONFIG_STATUS <<_ACEOF
23776 if \$ac_cs_recheck; then
23777   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23778   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23779 fi
23780
23781 _ACEOF
23782
23783
23784
23785
23786
23787 cat >>$CONFIG_STATUS <<\_ACEOF
23788 for ac_config_target in $ac_config_targets
23789 do
23790   case "$ac_config_target" in
23791   # Handling of arguments.
23792   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23793   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23794   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23795   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23796   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23797   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23798   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23799   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23800   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23801   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23802   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23803   "src/interfaces/ecpg/include/ecpg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
23804   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23805 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23806    { (exit 1); exit 1; }; };;
23807   esac
23808 done
23809
23810 # If the user did not use the arguments to specify the items to instantiate,
23811 # then the envvar interface is used.  Set only those that are not.
23812 # We use the long form for the default assignment because of an extremely
23813 # bizarre bug on SunOS 4.1.3.
23814 if $ac_need_defaults; then
23815   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23816   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23817   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23818   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23819 fi
23820
23821 # Have a temporary directory for convenience.  Make it in the build tree
23822 # simply because there is no reason to put it here, and in addition,
23823 # creating and moving files from /tmp can sometimes cause problems.
23824 # Create a temporary directory, and hook for its removal unless debugging.
23825 $debug ||
23826 {
23827   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23828   trap '{ (exit 1); exit 1; }' 1 2 13 15
23829 }
23830
23831 # Create a (secure) tmp directory for tmp files.
23832
23833 {
23834   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23835   test -n "$tmp" && test -d "$tmp"
23836 }  ||
23837 {
23838   tmp=./confstat$$-$RANDOM
23839   (umask 077 && mkdir $tmp)
23840 } ||
23841 {
23842    echo "$me: cannot create a temporary directory in ." >&2
23843    { (exit 1); exit 1; }
23844 }
23845
23846 _ACEOF
23847
23848 cat >>$CONFIG_STATUS <<_ACEOF
23849
23850 #
23851 # CONFIG_FILES section.
23852 #
23853
23854 # No need to generate the scripts if there are no CONFIG_FILES.
23855 # This happens for instance when ./config.status config.h
23856 if test -n "\$CONFIG_FILES"; then
23857   # Protect against being on the right side of a sed subst in config.status.
23858   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23859    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23860 s,@SHELL@,$SHELL,;t t
23861 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23862 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23863 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23864 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23865 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23866 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23867 s,@exec_prefix@,$exec_prefix,;t t
23868 s,@prefix@,$prefix,;t t
23869 s,@program_transform_name@,$program_transform_name,;t t
23870 s,@bindir@,$bindir,;t t
23871 s,@sbindir@,$sbindir,;t t
23872 s,@libexecdir@,$libexecdir,;t t
23873 s,@datadir@,$datadir,;t t
23874 s,@sysconfdir@,$sysconfdir,;t t
23875 s,@sharedstatedir@,$sharedstatedir,;t t
23876 s,@localstatedir@,$localstatedir,;t t
23877 s,@libdir@,$libdir,;t t
23878 s,@includedir@,$includedir,;t t
23879 s,@oldincludedir@,$oldincludedir,;t t
23880 s,@infodir@,$infodir,;t t
23881 s,@mandir@,$mandir,;t t
23882 s,@build_alias@,$build_alias,;t t
23883 s,@host_alias@,$host_alias,;t t
23884 s,@target_alias@,$target_alias,;t t
23885 s,@DEFS@,$DEFS,;t t
23886 s,@ECHO_C@,$ECHO_C,;t t
23887 s,@ECHO_N@,$ECHO_N,;t t
23888 s,@ECHO_T@,$ECHO_T,;t t
23889 s,@LIBS@,$LIBS,;t t
23890 s,@configure_args@,$configure_args,;t t
23891 s,@build@,$build,;t t
23892 s,@build_cpu@,$build_cpu,;t t
23893 s,@build_vendor@,$build_vendor,;t t
23894 s,@build_os@,$build_os,;t t
23895 s,@host@,$host,;t t
23896 s,@host_cpu@,$host_cpu,;t t
23897 s,@host_vendor@,$host_vendor,;t t
23898 s,@host_os@,$host_os,;t t
23899 s,@PORTNAME@,$PORTNAME,;t t
23900 s,@docdir@,$docdir,;t t
23901 s,@enable_nls@,$enable_nls,;t t
23902 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23903 s,@default_port@,$default_port,;t t
23904 s,@enable_shared@,$enable_shared,;t t
23905 s,@enable_rpath@,$enable_rpath,;t t
23906 s,@enable_debug@,$enable_debug,;t t
23907 s,@DTRACE@,$DTRACE,;t t
23908 s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
23909 s,@enable_dtrace@,$enable_dtrace,;t t
23910 s,@CC@,$CC,;t t
23911 s,@CFLAGS@,$CFLAGS,;t t
23912 s,@LDFLAGS@,$LDFLAGS,;t t
23913 s,@CPPFLAGS@,$CPPFLAGS,;t t
23914 s,@ac_ct_CC@,$ac_ct_CC,;t t
23915 s,@EXEEXT@,$EXEEXT,;t t
23916 s,@OBJEXT@,$OBJEXT,;t t
23917 s,@CPP@,$CPP,;t t
23918 s,@GCC@,$GCC,;t t
23919 s,@TAS@,$TAS,;t t
23920 s,@autodepend@,$autodepend,;t t
23921 s,@INCLUDES@,$INCLUDES,;t t
23922 s,@enable_thread_safety@,$enable_thread_safety,;t t
23923 s,@with_tcl@,$with_tcl,;t t
23924 s,@with_perl@,$with_perl,;t t
23925 s,@with_python@,$with_python,;t t
23926 s,@with_krb5@,$with_krb5,;t t
23927 s,@krb_srvtab@,$krb_srvtab,;t t
23928 s,@with_pam@,$with_pam,;t t
23929 s,@with_ldap@,$with_ldap,;t t
23930 s,@with_bonjour@,$with_bonjour,;t t
23931 s,@with_openssl@,$with_openssl,;t t
23932 s,@XML2_CONFIG@,$XML2_CONFIG,;t t
23933 s,@with_zlib@,$with_zlib,;t t
23934 s,@EGREP@,$EGREP,;t t
23935 s,@ELF_SYS@,$ELF_SYS,;t t
23936 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23937 s,@AWK@,$AWK,;t t
23938 s,@FLEX@,$FLEX,;t t
23939 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23940 s,@LN_S@,$LN_S,;t t
23941 s,@LD@,$LD,;t t
23942 s,@with_gnu_ld@,$with_gnu_ld,;t t
23943 s,@ld_R_works@,$ld_R_works,;t t
23944 s,@RANLIB@,$RANLIB,;t t
23945 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23946 s,@TAR@,$TAR,;t t
23947 s,@STRIP@,$STRIP,;t t
23948 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23949 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23950 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23951 s,@YACC@,$YACC,;t t
23952 s,@YFLAGS@,$YFLAGS,;t t
23953 s,@PERL@,$PERL,;t t
23954 s,@perl_archlibexp@,$perl_archlibexp,;t t
23955 s,@perl_privlibexp@,$perl_privlibexp,;t t
23956 s,@perl_useshrplib@,$perl_useshrplib,;t t
23957 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23958 s,@PYTHON@,$PYTHON,;t t
23959 s,@python_version@,$python_version,;t t
23960 s,@python_configdir@,$python_configdir,;t t
23961 s,@python_includespec@,$python_includespec,;t t
23962 s,@python_libdir@,$python_libdir,;t t
23963 s,@python_libspec@,$python_libspec,;t t
23964 s,@python_additional_libs@,$python_additional_libs,;t t
23965 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23966 s,@LIBOBJS@,$LIBOBJS,;t t
23967 s,@acx_pthread_config@,$acx_pthread_config,;t t
23968 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23969 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23970 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23971 s,@LDAP_LIBS_FE@,$LDAP_LIBS_FE,;t t
23972 s,@LDAP_LIBS_BE@,$LDAP_LIBS_BE,;t t
23973 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23974 s,@MSGFMT@,$MSGFMT,;t t
23975 s,@MSGMERGE@,$MSGMERGE,;t t
23976 s,@XGETTEXT@,$XGETTEXT,;t t
23977 s,@localedir@,$localedir,;t t
23978 s,@TCLSH@,$TCLSH,;t t
23979 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23980 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23981 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23982 s,@TCL_LIBS@,$TCL_LIBS,;t t
23983 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23984 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23985 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23986 s,@NSGMLS@,$NSGMLS,;t t
23987 s,@JADE@,$JADE,;t t
23988 s,@have_docbook@,$have_docbook,;t t
23989 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23990 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23991 s,@SGMLSPL@,$SGMLSPL,;t t
23992 s,@vpath_build@,$vpath_build,;t t
23993 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23994 CEOF
23995
23996 _ACEOF
23997
23998   cat >>$CONFIG_STATUS <<\_ACEOF
23999   # Split the substitutions into bite-sized pieces for seds with
24000   # small command number limits, like on Digital OSF/1 and HP-UX.
24001   ac_max_sed_lines=48
24002   ac_sed_frag=1 # Number of current file.
24003   ac_beg=1 # First line for current file.
24004   ac_end=$ac_max_sed_lines # Line after last line for current file.
24005   ac_more_lines=:
24006   ac_sed_cmds=
24007   while $ac_more_lines; do
24008     if test $ac_beg -gt 1; then
24009       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24010     else
24011       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24012     fi
24013     if test ! -s $tmp/subs.frag; then
24014       ac_more_lines=false
24015     else
24016       # The purpose of the label and of the branching condition is to
24017       # speed up the sed processing (if there are no `@' at all, there
24018       # is no need to browse any of the substitutions).
24019       # These are the two extra sed commands mentioned above.
24020       (echo ':t
24021   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24022       if test -z "$ac_sed_cmds"; then
24023         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24024       else
24025         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24026       fi
24027       ac_sed_frag=`expr $ac_sed_frag + 1`
24028       ac_beg=$ac_end
24029       ac_end=`expr $ac_end + $ac_max_sed_lines`
24030     fi
24031   done
24032   if test -z "$ac_sed_cmds"; then
24033     ac_sed_cmds=cat
24034   fi
24035 fi # test -n "$CONFIG_FILES"
24036
24037 _ACEOF
24038 cat >>$CONFIG_STATUS <<\_ACEOF
24039 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24040   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24041   case $ac_file in
24042   - | *:- | *:-:* ) # input from stdin
24043         cat >$tmp/stdin
24044         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24045         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24046   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24047         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24048   * )   ac_file_in=$ac_file.in ;;
24049   esac
24050
24051   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24052   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24053 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24054          X"$ac_file" : 'X\(//\)[^/]' \| \
24055          X"$ac_file" : 'X\(//\)$' \| \
24056          X"$ac_file" : 'X\(/\)' \| \
24057          .     : '\(.\)' 2>/dev/null ||
24058 echo X"$ac_file" |
24059     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24060           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24061           /^X\(\/\/\)$/{ s//\1/; q; }
24062           /^X\(\/\).*/{ s//\1/; q; }
24063           s/.*/./; q'`
24064   { if $as_mkdir_p; then
24065     mkdir -p "$ac_dir"
24066   else
24067     as_dir="$ac_dir"
24068     as_dirs=
24069     while test ! -d "$as_dir"; do
24070       as_dirs="$as_dir $as_dirs"
24071       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24072 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24073          X"$as_dir" : 'X\(//\)[^/]' \| \
24074          X"$as_dir" : 'X\(//\)$' \| \
24075          X"$as_dir" : 'X\(/\)' \| \
24076          .     : '\(.\)' 2>/dev/null ||
24077 echo X"$as_dir" |
24078     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24079           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24080           /^X\(\/\/\)$/{ s//\1/; q; }
24081           /^X\(\/\).*/{ s//\1/; q; }
24082           s/.*/./; q'`
24083     done
24084     test ! -n "$as_dirs" || mkdir $as_dirs
24085   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24086 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24087    { (exit 1); exit 1; }; }; }
24088
24089   ac_builddir=.
24090
24091 if test "$ac_dir" != .; then
24092   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24093   # A "../" for each directory in $ac_dir_suffix.
24094   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24095 else
24096   ac_dir_suffix= ac_top_builddir=
24097 fi
24098
24099 case $srcdir in
24100   .)  # No --srcdir option.  We are building in place.
24101     ac_srcdir=.
24102     if test -z "$ac_top_builddir"; then
24103        ac_top_srcdir=.
24104     else
24105        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24106     fi ;;
24107   [\\/]* | ?:[\\/]* )  # Absolute path.
24108     ac_srcdir=$srcdir$ac_dir_suffix;
24109     ac_top_srcdir=$srcdir ;;
24110   *) # Relative path.
24111     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24112     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24113 esac
24114
24115 # Do not use `cd foo && pwd` to compute absolute paths, because
24116 # the directories may not exist.
24117 case `pwd` in
24118 .) ac_abs_builddir="$ac_dir";;
24119 *)
24120   case "$ac_dir" in
24121   .) ac_abs_builddir=`pwd`;;
24122   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24123   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24124   esac;;
24125 esac
24126 case $ac_abs_builddir in
24127 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24128 *)
24129   case ${ac_top_builddir}. in
24130   .) ac_abs_top_builddir=$ac_abs_builddir;;
24131   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24132   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24133   esac;;
24134 esac
24135 case $ac_abs_builddir in
24136 .) ac_abs_srcdir=$ac_srcdir;;
24137 *)
24138   case $ac_srcdir in
24139   .) ac_abs_srcdir=$ac_abs_builddir;;
24140   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24141   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24142   esac;;
24143 esac
24144 case $ac_abs_builddir in
24145 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24146 *)
24147   case $ac_top_srcdir in
24148   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24149   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24150   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24151   esac;;
24152 esac
24153
24154
24155
24156   if test x"$ac_file" != x-; then
24157     { echo "$as_me:$LINENO: creating $ac_file" >&5
24158 echo "$as_me: creating $ac_file" >&6;}
24159     rm -f "$ac_file"
24160   fi
24161   # Let's still pretend it is `configure' which instantiates (i.e., don't
24162   # use $as_me), people would be surprised to read:
24163   #    /* config.h.  Generated by config.status.  */
24164   if test x"$ac_file" = x-; then
24165     configure_input=
24166   else
24167     configure_input="$ac_file.  "
24168   fi
24169   configure_input=$configure_input"Generated from `echo $ac_file_in |
24170                                      sed 's,.*/,,'` by configure."
24171
24172   # First look for the input files in the build tree, otherwise in the
24173   # src tree.
24174   ac_file_inputs=`IFS=:
24175     for f in $ac_file_in; do
24176       case $f in
24177       -) echo $tmp/stdin ;;
24178       [\\/$]*)
24179          # Absolute (can't be DOS-style, as IFS=:)
24180          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24181 echo "$as_me: error: cannot find input file: $f" >&2;}
24182    { (exit 1); exit 1; }; }
24183          echo "$f";;
24184       *) # Relative
24185          if test -f "$f"; then
24186            # Build tree
24187            echo "$f"
24188          elif test -f "$srcdir/$f"; then
24189            # Source tree
24190            echo "$srcdir/$f"
24191          else
24192            # /dev/null tree
24193            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24194 echo "$as_me: error: cannot find input file: $f" >&2;}
24195    { (exit 1); exit 1; }; }
24196          fi;;
24197       esac
24198     done` || { (exit 1); exit 1; }
24199 _ACEOF
24200 cat >>$CONFIG_STATUS <<_ACEOF
24201   sed "$ac_vpsub
24202 $extrasub
24203 _ACEOF
24204 cat >>$CONFIG_STATUS <<\_ACEOF
24205 :t
24206 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24207 s,@configure_input@,$configure_input,;t t
24208 s,@srcdir@,$ac_srcdir,;t t
24209 s,@abs_srcdir@,$ac_abs_srcdir,;t t
24210 s,@top_srcdir@,$ac_top_srcdir,;t t
24211 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
24212 s,@builddir@,$ac_builddir,;t t
24213 s,@abs_builddir@,$ac_abs_builddir,;t t
24214 s,@top_builddir@,$ac_top_builddir,;t t
24215 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
24216 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24217   rm -f $tmp/stdin
24218   if test x"$ac_file" != x-; then
24219     mv $tmp/out $ac_file
24220   else
24221     cat $tmp/out
24222     rm -f $tmp/out
24223   fi
24224
24225 done
24226 _ACEOF
24227 cat >>$CONFIG_STATUS <<\_ACEOF
24228
24229 #
24230 # CONFIG_HEADER section.
24231 #
24232
24233 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24234 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24235 #
24236 # ac_d sets the value in "#define NAME VALUE" lines.
24237 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
24238 ac_dB='[         ].*$,\1#\2'
24239 ac_dC=' '
24240 ac_dD=',;t'
24241 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24242 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24243 ac_uB='$,\1#\2define\3'
24244 ac_uC=' '
24245 ac_uD=',;t'
24246
24247 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24248   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24249   case $ac_file in
24250   - | *:- | *:-:* ) # input from stdin
24251         cat >$tmp/stdin
24252         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24253         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24254   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24255         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24256   * )   ac_file_in=$ac_file.in ;;
24257   esac
24258
24259   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
24260 echo "$as_me: creating $ac_file" >&6;}
24261
24262   # First look for the input files in the build tree, otherwise in the
24263   # src tree.
24264   ac_file_inputs=`IFS=:
24265     for f in $ac_file_in; do
24266       case $f in
24267       -) echo $tmp/stdin ;;
24268       [\\/$]*)
24269          # Absolute (can't be DOS-style, as IFS=:)
24270          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24271 echo "$as_me: error: cannot find input file: $f" >&2;}
24272    { (exit 1); exit 1; }; }
24273          # Do quote $f, to prevent DOS paths from being IFS'd.
24274          echo "$f";;
24275       *) # Relative
24276          if test -f "$f"; then
24277            # Build tree
24278            echo "$f"
24279          elif test -f "$srcdir/$f"; then
24280            # Source tree
24281            echo "$srcdir/$f"
24282          else
24283            # /dev/null tree
24284            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24285 echo "$as_me: error: cannot find input file: $f" >&2;}
24286    { (exit 1); exit 1; }; }
24287          fi;;
24288       esac
24289     done` || { (exit 1); exit 1; }
24290   # Remove the trailing spaces.
24291   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
24292
24293 _ACEOF
24294
24295 # Transform confdefs.h into two sed scripts, `conftest.defines' and
24296 # `conftest.undefs', that substitutes the proper values into
24297 # config.h.in to produce config.h.  The first handles `#define'
24298 # templates, and the second `#undef' templates.
24299 # And first: Protect against being on the right side of a sed subst in
24300 # config.status.  Protect against being in an unquoted here document
24301 # in config.status.
24302 rm -f conftest.defines conftest.undefs
24303 # Using a here document instead of a string reduces the quoting nightmare.
24304 # Putting comments in sed scripts is not portable.
24305 #
24306 # `end' is used to avoid that the second main sed command (meant for
24307 # 0-ary CPP macros) applies to n-ary macro definitions.
24308 # See the Autoconf documentation for `clear'.
24309 cat >confdef2sed.sed <<\_ACEOF
24310 s/[\\&,]/\\&/g
24311 s,[\\$`],\\&,g
24312 t clear
24313 : clear
24314 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
24315 t end
24316 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
24317 : end
24318 _ACEOF
24319 # If some macros were called several times there might be several times
24320 # the same #defines, which is useless.  Nevertheless, we may not want to
24321 # sort them, since we want the *last* AC-DEFINE to be honored.
24322 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24323 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24324 rm -f confdef2sed.sed
24325
24326 # This sed command replaces #undef with comments.  This is necessary, for
24327 # example, in the case of _POSIX_SOURCE, which is predefined and required
24328 # on some systems where configure will not decide to define it.
24329 cat >>conftest.undefs <<\_ACEOF
24330 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
24331 _ACEOF
24332
24333 # Break up conftest.defines because some shells have a limit on the size
24334 # of here documents, and old seds have small limits too (100 cmds).
24335 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
24336 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
24337 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24338 echo '  :' >>$CONFIG_STATUS
24339 rm -f conftest.tail
24340 while grep . conftest.defines >/dev/null
24341 do
24342   # Write a limited-size here document to $tmp/defines.sed.
24343   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24344   # Speed up: don't consider the non `#define' lines.
24345   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
24346   # Work around the forget-to-reset-the-flag bug.
24347   echo 't clr' >>$CONFIG_STATUS
24348   echo ': clr' >>$CONFIG_STATUS
24349   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24350   echo 'CEOF
24351   sed -f $tmp/defines.sed $tmp/in >$tmp/out
24352   rm -f $tmp/in
24353   mv $tmp/out $tmp/in
24354 ' >>$CONFIG_STATUS
24355   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24356   rm -f conftest.defines
24357   mv conftest.tail conftest.defines
24358 done
24359 rm -f conftest.defines
24360 echo '  fi # grep' >>$CONFIG_STATUS
24361 echo >>$CONFIG_STATUS
24362
24363 # Break up conftest.undefs because some shells have a limit on the size
24364 # of here documents, and old seds have small limits too (100 cmds).
24365 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
24366 rm -f conftest.tail
24367 while grep . conftest.undefs >/dev/null
24368 do
24369   # Write a limited-size here document to $tmp/undefs.sed.
24370   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24371   # Speed up: don't consider the non `#undef'
24372   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
24373   # Work around the forget-to-reset-the-flag bug.
24374   echo 't clr' >>$CONFIG_STATUS
24375   echo ': clr' >>$CONFIG_STATUS
24376   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
24377   echo 'CEOF
24378   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24379   rm -f $tmp/in
24380   mv $tmp/out $tmp/in
24381 ' >>$CONFIG_STATUS
24382   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24383   rm -f conftest.undefs
24384   mv conftest.tail conftest.undefs
24385 done
24386 rm -f conftest.undefs
24387
24388 cat >>$CONFIG_STATUS <<\_ACEOF
24389   # Let's still pretend it is `configure' which instantiates (i.e., don't
24390   # use $as_me), people would be surprised to read:
24391   #    /* config.h.  Generated by config.status.  */
24392   if test x"$ac_file" = x-; then
24393     echo "/* Generated by configure.  */" >$tmp/config.h
24394   else
24395     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
24396   fi
24397   cat $tmp/in >>$tmp/config.h
24398   rm -f $tmp/in
24399   if test x"$ac_file" != x-; then
24400     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
24401       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24402 echo "$as_me: $ac_file is unchanged" >&6;}
24403     else
24404       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24405 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24406          X"$ac_file" : 'X\(//\)[^/]' \| \
24407          X"$ac_file" : 'X\(//\)$' \| \
24408          X"$ac_file" : 'X\(/\)' \| \
24409          .     : '\(.\)' 2>/dev/null ||
24410 echo X"$ac_file" |
24411     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24412           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24413           /^X\(\/\/\)$/{ s//\1/; q; }
24414           /^X\(\/\).*/{ s//\1/; q; }
24415           s/.*/./; q'`
24416       { if $as_mkdir_p; then
24417     mkdir -p "$ac_dir"
24418   else
24419     as_dir="$ac_dir"
24420     as_dirs=
24421     while test ! -d "$as_dir"; do
24422       as_dirs="$as_dir $as_dirs"
24423       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24424 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24425          X"$as_dir" : 'X\(//\)[^/]' \| \
24426          X"$as_dir" : 'X\(//\)$' \| \
24427          X"$as_dir" : 'X\(/\)' \| \
24428          .     : '\(.\)' 2>/dev/null ||
24429 echo X"$as_dir" |
24430     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24431           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24432           /^X\(\/\/\)$/{ s//\1/; q; }
24433           /^X\(\/\).*/{ s//\1/; q; }
24434           s/.*/./; q'`
24435     done
24436     test ! -n "$as_dirs" || mkdir $as_dirs
24437   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24438 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24439    { (exit 1); exit 1; }; }; }
24440
24441       rm -f $ac_file
24442       mv $tmp/config.h $ac_file
24443     fi
24444   else
24445     cat $tmp/config.h
24446     rm -f $tmp/config.h
24447   fi
24448   # Run the commands associated with the file.
24449   case $ac_file in
24450     src/include/pg_config.h )
24451 # Update timestamp for pg_config.h (see Makefile.global)
24452 echo >src/include/stamp-h
24453  ;;
24454   esac
24455 done
24456 _ACEOF
24457 cat >>$CONFIG_STATUS <<\_ACEOF
24458
24459 #
24460 # CONFIG_LINKS section.
24461 #
24462
24463 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
24464   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24465   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24466
24467   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
24468 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
24469
24470   if test ! -r $srcdir/$ac_source; then
24471     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
24472 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
24473    { (exit 1); exit 1; }; }
24474   fi
24475   rm -f $ac_dest
24476
24477   # Make relative symlinks.
24478   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
24479 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24480          X"$ac_dest" : 'X\(//\)[^/]' \| \
24481          X"$ac_dest" : 'X\(//\)$' \| \
24482          X"$ac_dest" : 'X\(/\)' \| \
24483          .     : '\(.\)' 2>/dev/null ||
24484 echo X"$ac_dest" |
24485     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24486           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24487           /^X\(\/\/\)$/{ s//\1/; q; }
24488           /^X\(\/\).*/{ s//\1/; q; }
24489           s/.*/./; q'`
24490   { if $as_mkdir_p; then
24491     mkdir -p "$ac_dest_dir"
24492   else
24493     as_dir="$ac_dest_dir"
24494     as_dirs=
24495     while test ! -d "$as_dir"; do
24496       as_dirs="$as_dir $as_dirs"
24497       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24498 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24499          X"$as_dir" : 'X\(//\)[^/]' \| \
24500          X"$as_dir" : 'X\(//\)$' \| \
24501          X"$as_dir" : 'X\(/\)' \| \
24502          .     : '\(.\)' 2>/dev/null ||
24503 echo X"$as_dir" |
24504     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24505           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24506           /^X\(\/\/\)$/{ s//\1/; q; }
24507           /^X\(\/\).*/{ s//\1/; q; }
24508           s/.*/./; q'`
24509     done
24510     test ! -n "$as_dirs" || mkdir $as_dirs
24511   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
24512 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
24513    { (exit 1); exit 1; }; }; }
24514
24515   ac_builddir=.
24516
24517 if test "$ac_dest_dir" != .; then
24518   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
24519   # A "../" for each directory in $ac_dir_suffix.
24520   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24521 else
24522   ac_dir_suffix= ac_top_builddir=
24523 fi
24524
24525 case $srcdir in
24526   .)  # No --srcdir option.  We are building in place.
24527     ac_srcdir=.
24528     if test -z "$ac_top_builddir"; then
24529        ac_top_srcdir=.
24530     else
24531        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24532     fi ;;
24533   [\\/]* | ?:[\\/]* )  # Absolute path.
24534     ac_srcdir=$srcdir$ac_dir_suffix;
24535     ac_top_srcdir=$srcdir ;;
24536   *) # Relative path.
24537     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24538     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24539 esac
24540
24541 # Do not use `cd foo && pwd` to compute absolute paths, because
24542 # the directories may not exist.
24543 case `pwd` in
24544 .) ac_abs_builddir="$ac_dest_dir";;
24545 *)
24546   case "$ac_dest_dir" in
24547   .) ac_abs_builddir=`pwd`;;
24548   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24549   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24550   esac;;
24551 esac
24552 case $ac_abs_builddir in
24553 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24554 *)
24555   case ${ac_top_builddir}. in
24556   .) ac_abs_top_builddir=$ac_abs_builddir;;
24557   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24558   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24559   esac;;
24560 esac
24561 case $ac_abs_builddir in
24562 .) ac_abs_srcdir=$ac_srcdir;;
24563 *)
24564   case $ac_srcdir in
24565   .) ac_abs_srcdir=$ac_abs_builddir;;
24566   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24567   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24568   esac;;
24569 esac
24570 case $ac_abs_builddir in
24571 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24572 *)
24573   case $ac_top_srcdir in
24574   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24575   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24576   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24577   esac;;
24578 esac
24579
24580
24581   case $srcdir in
24582   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24583       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24584   esac
24585
24586   # Try a symlink, then a hard link, then a copy.
24587   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24588     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24589     cp -p $srcdir/$ac_source $ac_dest ||
24590     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24591 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24592    { (exit 1); exit 1; }; }
24593 done
24594 _ACEOF
24595 cat >>$CONFIG_STATUS <<\_ACEOF
24596
24597 #
24598 # CONFIG_COMMANDS section.
24599 #
24600 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24601   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24602   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24603   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24604 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24605          X"$ac_dest" : 'X\(//\)[^/]' \| \
24606          X"$ac_dest" : 'X\(//\)$' \| \
24607          X"$ac_dest" : 'X\(/\)' \| \
24608          .     : '\(.\)' 2>/dev/null ||
24609 echo X"$ac_dest" |
24610     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24611           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24612           /^X\(\/\/\)$/{ s//\1/; q; }
24613           /^X\(\/\).*/{ s//\1/; q; }
24614           s/.*/./; q'`
24615   { if $as_mkdir_p; then
24616     mkdir -p "$ac_dir"
24617   else
24618     as_dir="$ac_dir"
24619     as_dirs=
24620     while test ! -d "$as_dir"; do
24621       as_dirs="$as_dir $as_dirs"
24622       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24623 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24624          X"$as_dir" : 'X\(//\)[^/]' \| \
24625          X"$as_dir" : 'X\(//\)$' \| \
24626          X"$as_dir" : 'X\(/\)' \| \
24627          .     : '\(.\)' 2>/dev/null ||
24628 echo X"$as_dir" |
24629     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24630           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24631           /^X\(\/\/\)$/{ s//\1/; q; }
24632           /^X\(\/\).*/{ s//\1/; q; }
24633           s/.*/./; q'`
24634     done
24635     test ! -n "$as_dirs" || mkdir $as_dirs
24636   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24637 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24638    { (exit 1); exit 1; }; }; }
24639
24640   ac_builddir=.
24641
24642 if test "$ac_dir" != .; then
24643   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24644   # A "../" for each directory in $ac_dir_suffix.
24645   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24646 else
24647   ac_dir_suffix= ac_top_builddir=
24648 fi
24649
24650 case $srcdir in
24651   .)  # No --srcdir option.  We are building in place.
24652     ac_srcdir=.
24653     if test -z "$ac_top_builddir"; then
24654        ac_top_srcdir=.
24655     else
24656        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24657     fi ;;
24658   [\\/]* | ?:[\\/]* )  # Absolute path.
24659     ac_srcdir=$srcdir$ac_dir_suffix;
24660     ac_top_srcdir=$srcdir ;;
24661   *) # Relative path.
24662     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24663     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24664 esac
24665
24666 # Do not use `cd foo && pwd` to compute absolute paths, because
24667 # the directories may not exist.
24668 case `pwd` in
24669 .) ac_abs_builddir="$ac_dir";;
24670 *)
24671   case "$ac_dir" in
24672   .) ac_abs_builddir=`pwd`;;
24673   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24674   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24675   esac;;
24676 esac
24677 case $ac_abs_builddir in
24678 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24679 *)
24680   case ${ac_top_builddir}. in
24681   .) ac_abs_top_builddir=$ac_abs_builddir;;
24682   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24683   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24684   esac;;
24685 esac
24686 case $ac_abs_builddir in
24687 .) ac_abs_srcdir=$ac_srcdir;;
24688 *)
24689   case $ac_srcdir in
24690   .) ac_abs_srcdir=$ac_abs_builddir;;
24691   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24692   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24693   esac;;
24694 esac
24695 case $ac_abs_builddir in
24696 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24697 *)
24698   case $ac_top_srcdir in
24699   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24700   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24701   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24702   esac;;
24703 esac
24704
24705
24706   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24707 echo "$as_me: executing $ac_dest commands" >&6;}
24708   case $ac_dest in
24709     check_win32_symlinks )
24710 # Links sometimes fail undetected on Mingw -
24711 # so here we detect it and warn the user
24712 for FILE in $CONFIG_LINKS
24713  do
24714         # test -e works for symlinks in the MinGW console
24715         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
24716 echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
24717  done
24718  ;;
24719   esac
24720 done
24721 _ACEOF
24722
24723 cat >>$CONFIG_STATUS <<\_ACEOF
24724
24725 { (exit 0); exit 0; }
24726 _ACEOF
24727 chmod +x $CONFIG_STATUS
24728 ac_clean_files=$ac_clean_files_save
24729
24730
24731 # configure is writing to config.log, and then calls config.status.
24732 # config.status does its own redirection, appending to config.log.
24733 # Unfortunately, on DOS this fails, as config.log is still kept open
24734 # by configure, so config.status won't be able to write to it; its
24735 # output is simply discarded.  So we exec the FD to /dev/null,
24736 # effectively closing config.log, so it can be properly (re)opened and
24737 # appended to by config.status.  When coming back to configure, we
24738 # need to make the FD available again.
24739 if test "$no_create" != yes; then
24740   ac_cs_success=:
24741   ac_config_status_args=
24742   test "$silent" = yes &&
24743     ac_config_status_args="$ac_config_status_args --quiet"
24744   exec 5>/dev/null
24745   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24746   exec 5>>config.log
24747   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24748   # would make configure fail if this is the last instruction.
24749   $ac_cs_success || { (exit 1); exit 1; }
24750 fi
24751
24752
24753 # Warn about unknown options
24754 for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
24755   for pgac_arg in $pgac_args with_gnu_ld; do
24756     if test "$pgac_var" = "$pgac_arg"; then
24757       continue 2
24758     fi
24759   done
24760   pgac_txt=`echo $pgac_var | sed 's/_/-/g'`
24761   { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
24762 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
24763 done